diff options
author | David Benson <david@draw.io> | 2022-09-08 15:39:31 +0300 |
---|---|---|
committer | David Benson <david@draw.io> | 2022-09-08 15:39:31 +0300 |
commit | 8f3f95a05b701175b639ba9572dc4e0fb7c46b02 (patch) | |
tree | d7795c8c7c9a40b3298fba3ed671f1271b50803e | |
parent | 937b3a975e3f8acb5c4c8628c1fa79baef7e1a53 (diff) | |
parent | b5dfeb238369d664fb06a95e2179236b0e75f366 (diff) |
Merge branch 'dev' of https://github.com/jgraph/drawio into dev
27 files changed, 8028 insertions, 7795 deletions
@@ -1,3 +1,14 @@ +07-SEP-2022: 20.3.0 + +- Uses organic as default layout to fix possible NPE in CSV import [DS-910] +- Removes storage.googleapis.com from CSP as no longer needed for PWA [CSP-673] +- Adds ALLOW_CUSTOM_PLUGINS for third party plugins [CSP-676] +- Limits plugins to built-in or same domain [CSP-676] +- Hides connect arrows while freehand drawing [1107] +- Removes yarn.lock file as we removed package.json from this project [DS-911] +- Fixes possible XSS in viewer back/refresh buttons [CSP-677] +- Checks href attribute with no namespace in use tag [CSP-678] + 01-SEP-2022: 20.2.8 - Fixes importing plain SVG images by drag and drop [DS-902] diff --git a/SECURITY.md b/SECURITY.md index 0c1e739c..b053c6fd 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -9,4 +9,5 @@ ## Reporting a Vulnerability -If you discover a security vulnerability in axios please disclose it via our [huntr page](https://huntr.dev/repos/jgraph/drawio/). Bounty eligibility, CVE assignment, response times and past reports are all there. +Email support@diagrams.net. If you do not wish to submit by email, please +ask for an alternative via email or Github issue.
\ No newline at end of file @@ -1 +1 @@ -20.2.8
\ No newline at end of file +20.3.0
\ No newline at end of file diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 4304738a..6e4793f3 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -355,7 +355,6 @@ <link rel="icon" type="image/png" sizes="16x16" href="images/favicon-16x16.png"> <link rel="mask-icon" href="images/safari-pinned-tab.svg" color="#d89000"> <link rel="stylesheet" type="text/css" href="styles/grapheditor.css"> - <link rel="preconnect" href="https://storage.googleapis.com"> <link rel="canonical" href="https://app.diagrams.net"> <link rel="manifest" href="images/manifest.json"> <link rel="shortcut icon" href="favicon.ico"> diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js index bf88ed61..6fec1d8a 100644 --- a/src/main/webapp/js/app.min.js +++ b/src/main/webapp/js/app.min.js @@ -130,7 +130,7 @@ window.EXPORT_URL=window.EXPORT_URL||"https://convert.diagrams.net/node/export"; window.REALTIME_URL=window.REALTIME_URL||("test.draw.io"==window.location.hostname&&"local"!=urlParams.cache?"https://app.diagrams.net/cache":"cache");window.DRAWIO_GITLAB_URL=window.DRAWIO_GITLAB_URL||"https://gitlab.com";window.DRAWIO_GITLAB_ID=window.DRAWIO_GITLAB_ID||"2b14debc5feeb18ba65358d863ec870e4cc9294b28c3c941cb3014eb4af9a9b4";window.DRAWIO_GITHUB_URL=window.DRAWIO_GITHUB_URL||"https://github.com";window.DRAWIO_GITHUB_API_URL=window.DRAWIO_GITHUB_API_URL||"https://api.github.com"; window.DRAWIO_GITHUB_ID=window.DRAWIO_GITHUB_ID||"Iv1.98d62f0431e40543";window.DRAWIO_DROPBOX_ID=window.DRAWIO_DROPBOX_ID||"jg02tc0onwmhlgm";window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"import";window.PROXY_URL=window.PROXY_URL||"proxy";window.DRAWIO_VIEWER_URL=window.DRAWIO_VIEWER_URL||null;window.NOTIFICATIONS_URL=window.NOTIFICATIONS_URL||"https://www.draw.io/notifications"; window.RT_WEBSOCKET_URL=window.RT_WEBSOCKET_URL||"wss://"+("test.draw.io"==window.location.hostname?"app.diagrams.net":window.location.hostname)+"/rt";window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||((null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":window.DRAWIO_BASE_URL+"/iconSearch"); -window.TEMPLATE_PATH=window.TEMPLATE_PATH||"templates";window.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"newDiagramCats";window.PLUGINS_BASE_PATH=window.PLUGINS_BASE_PATH||"";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_CONFIG=window.DRAWIO_CONFIG||null;window.mxLoadResources=window.mxLoadResources||!1; +window.TEMPLATE_PATH=window.TEMPLATE_PATH||"templates";window.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"newDiagramCats";window.PLUGINS_BASE_PATH=window.PLUGINS_BASE_PATH||"";window.ALLOW_CUSTOM_PLUGINS=window.ALLOW_CUSTOM_PLUGINS||!1;window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_CONFIG=window.DRAWIO_CONFIG||null;window.mxLoadResources=window.mxLoadResources||!1; window.mxLanguage=window.mxLanguage||function(){var a=urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null);if(!a&&window.mxIsElectron&&(a=urlParams.appLang,null!=a)){var c=a.indexOf("-");0<=c&&(a=a.substring(0,c));a=a.toLowerCase()}}catch(d){isLocalStorage=!1}return a}(); window.mxLanguageMap=window.mxLanguageMap||{i18n:"",id:"Bahasa Indonesia",ms:"Bahasa Melayu",bs:"Bosanski",bg:"Bulgarian",ca:"Català",cs:"Čeština",da:"Dansk",de:"Deutsch",et:"Eesti",en:"English",es:"Español",eu:"Euskara",fil:"Filipino",fr:"Français",gl:"Galego",it:"Italiano",hu:"Magyar",lt:"Lietuvių",lv:"Latviešu",nl:"Nederlands",no:"Norsk",pl:"Polski","pt-br":"Português (Brasil)",pt:"Português (Portugal)",ro:"Română",fi:"Suomi",sv:"Svenska",vi:"Tiếng Việt",tr:"Türkçe",el:"Ελληνικά",ru:"Русский", sr:"Српски",uk:"Українська",he:"עברית",ar:"العربية",fa:"فارسی",th:"ไทย",ko:"한국어",ja:"日本語",zh:"简体中文","zh-tw":"繁體中文"};"undefined"===typeof window.mxBasePath&&(window.mxBasePath="mxgraph",window.mxImageBasePath="mxgraph/images"); @@ -145,7 +145,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url "se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1"); "embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources"; window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang; -window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.2.8",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"), +window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.3.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"), IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor), IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&& 0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!== @@ -2012,8 +2012,6 @@ Editor.closeBlackImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy Editor.plusImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==";Editor.shapesImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48Zz48cGF0aCBkPSJNMywxMWg4VjNIM1YxMXogTTUsNWg0djRINVY1eiIvPjxwYXRoIGQ9Ik0xMywzdjhoOFYzSDEzeiBNMTksOWgtNFY1aDRWOXoiLz48cGF0aCBkPSJNMywyMWg4di04SDNWMjF6IE01LDE1aDR2NEg1VjE1eiIvPjxwb2x5Z29uIHBvaW50cz0iMTgsMTMgMTYsMTMgMTYsMTYgMTMsMTYgMTMsMTggMTYsMTggMTYsMjEgMTgsMjEgMTgsMTggMjEsMTggMjEsMTYgMTgsMTYiLz48L2c+PC9nPjwvc3ZnPg=="; Editor.formatImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg=="; Editor.freehandImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHJlY3QgZmlsbD0ibm9uZSIgaGVpZ2h0PSIyNCIgd2lkdGg9IjI0Ii8+PHBhdGggZD0iTTQuNSw4YzEuMDQsMCwyLjM0LTEuNSw0LjI1LTEuNWMxLjUyLDAsMi43NSwxLjIzLDIuNzUsMi43NWMwLDIuMDQtMS45OSwzLjE1LTMuOTEsNC4yMkM1LjQyLDE0LjY3LDQsMTUuNTcsNCwxNyBjMCwxLjEsMC45LDIsMiwydjJjLTIuMjEsMC00LTEuNzktNC00YzAtMi43MSwyLjU2LTQuMTQsNC42Mi01LjI4YzEuNDItMC43OSwyLjg4LTEuNiwyLjg4LTIuNDdjMC0wLjQxLTAuMzQtMC43NS0wLjc1LTAuNzUgQzcuNSw4LjUsNi4yNSwxMCw0LjUsMTBDMy4xMiwxMCwyLDguODgsMiw3LjVDMiw1LjQ1LDQuMTcsMi44Myw1LDJsMS40MSwxLjQxQzUuNDEsNC40Miw0LDYuNDMsNCw3LjVDNCw3Ljc4LDQuMjIsOCw0LjUsOHogTTgsMjEgbDMuNzUsMGw4LjA2LTguMDZsLTMuNzUtMy43NUw4LDE3LjI1TDgsMjF6IE0xMCwxOC4wOGw2LjA2LTYuMDZsMC45MiwwLjkyTDEwLjkyLDE5TDEwLDE5TDEwLDE4LjA4eiBNMjAuMzcsNi4yOSBjLTAuMzktMC4zOS0xLjAyLTAuMzktMS40MSwwbC0xLjgzLDEuODNsMy43NSwzLjc1bDEuODMtMS44M2MwLjM5LTAuMzksMC4zOS0xLjAyLDAtMS40MUwyMC4zNyw2LjI5eiIvPjwvc3ZnPg=="; -Editor.darkImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxyZWN0IGZpbGw9Im5vbmUiIGhlaWdodD0iMjQiIHdpZHRoPSIyNCIvPjxwYXRoIGQ9Ik05LjM3LDUuNTFDOS4xOSw2LjE1LDkuMSw2LjgyLDkuMSw3LjVjMCw0LjA4LDMuMzIsNy40LDcuNCw3LjRjMC42OCwwLDEuMzUtMC4wOSwxLjk5LTAuMjdDMTcuNDUsMTcuMTksMTQuOTMsMTksMTIsMTkgYy0zLjg2LDAtNy0zLjE0LTctN0M1LDkuMDcsNi44MSw2LjU1LDkuMzcsNS41MXogTTEyLDNjLTQuOTcsMC05LDQuMDMtOSw5czQuMDMsOSw5LDlzOS00LjAzLDktOWMwLTAuNDYtMC4wNC0wLjkyLTAuMS0xLjM2IGMtMC45OCwxLjM3LTIuNTgsMi4yNi00LjQsMi4yNmMtMi45OCwwLTUuNC0yLjQyLTUuNC01LjRjMC0xLjgxLDAuODktMy40MiwyLjI2LTQuNEMxMi45MiwzLjA0LDEyLjQ2LDMsMTIsM0wxMiwzeiIvPjwvc3ZnPg=="; -Editor.lightImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxyZWN0IGZpbGw9Im5vbmUiIGhlaWdodD0iMjQiIHdpZHRoPSIyNCIvPjxwYXRoIGQ9Ik0xMiw5YzEuNjUsMCwzLDEuMzUsMywzcy0xLjM1LDMtMywzcy0zLTEuMzUtMy0zUzEwLjM1LDksMTIsOSBNMTIsN2MtMi43NiwwLTUsMi4yNC01LDVzMi4yNCw1LDUsNXM1LTIuMjQsNS01IFMxNC43Niw3LDEyLDdMMTIsN3ogTTIsMTNsMiwwYzAuNTUsMCwxLTAuNDUsMS0xcy0wLjQ1LTEtMS0xbC0yLDBjLTAuNTUsMC0xLDAuNDUtMSwxUzEuNDUsMTMsMiwxM3ogTTIwLDEzbDIsMGMwLjU1LDAsMS0wLjQ1LDEtMSBzLTAuNDUtMS0xLTFsLTIsMGMtMC41NSwwLTEsMC40NS0xLDFTMTkuNDUsMTMsMjAsMTN6IE0xMSwydjJjMCwwLjU1LDAuNDUsMSwxLDFzMS0wLjQ1LDEtMVYyYzAtMC41NS0wLjQ1LTEtMS0xUzExLDEuNDUsMTEsMnogTTExLDIwdjJjMCwwLjU1LDAuNDUsMSwxLDFzMS0wLjQ1LDEtMXYtMmMwLTAuNTUtMC40NS0xLTEtMUMxMS40NSwxOSwxMSwxOS40NSwxMSwyMHogTTUuOTksNC41OGMtMC4zOS0wLjM5LTEuMDMtMC4zOS0xLjQxLDAgYy0wLjM5LDAuMzktMC4zOSwxLjAzLDAsMS40MWwxLjA2LDEuMDZjMC4zOSwwLjM5LDEuMDMsMC4zOSwxLjQxLDBzMC4zOS0xLjAzLDAtMS40MUw1Ljk5LDQuNTh6IE0xOC4zNiwxNi45NSBjLTAuMzktMC4zOS0xLjAzLTAuMzktMS40MSwwYy0wLjM5LDAuMzktMC4zOSwxLjAzLDAsMS40MWwxLjA2LDEuMDZjMC4zOSwwLjM5LDEuMDMsMC4zOSwxLjQxLDBjMC4zOS0wLjM5LDAuMzktMS4wMywwLTEuNDEgTDE4LjM2LDE2Ljk1eiBNMTkuNDIsNS45OWMwLjM5LTAuMzksMC4zOS0xLjAzLDAtMS40MWMtMC4zOS0wLjM5LTEuMDMtMC4zOS0xLjQxLDBsLTEuMDYsMS4wNmMtMC4zOSwwLjM5LTAuMzksMS4wMywwLDEuNDEgczEuMDMsMC4zOSwxLjQxLDBMMTkuNDIsNS45OXogTTcuMDUsMTguMzZjMC4zOS0wLjM5LDAuMzktMS4wMywwLTEuNDFjLTAuMzktMC4zOS0xLjAzLTAuMzktMS40MSwwbC0xLjA2LDEuMDYgYy0wLjM5LDAuMzktMC4zOSwxLjAzLDAsMS40MXMxLjAzLDAuMzksMS40MSwwTDcuMDUsMTguMzZ6Ii8+PC9zdmc+"; Editor.undoImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+";Editor.redoImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg=="; Editor.outlineImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjxwYXRoIGQ9Ik0yMC41IDNsLS4xNi4wM0wxNSA1LjEgOSAzIDMuMzYgNC45Yy0uMjEuMDctLjM2LjI1LS4zNi40OFYyMC41YzAgLjI4LjIyLjUuNS41bC4xNi0uMDNMOSAxOC45bDYgMi4xIDUuNjQtMS45Yy4yMS0uMDcuMzYtLjI1LjM2LS40OFYzLjVjMC0uMjgtLjIyLS41LS41LS41ek0xNSAxOWwtNi0yLjExVjVsNiAyLjExVjE5eiIvPjwvc3ZnPg=="; Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDEydjdINXYtN0gzdjdjMCAxLjEuOSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMnYtN2gtMnptLTYgLjY3bDIuNTktMi41OEwxNyAxMS41bC01IDUtNS01IDEuNDEtMS40MUwxMSAxMi42N1YzaDJ2OS42N3oiLz48L3N2Zz4=";Editor.helpImage=Editor.lightHelpImage;Editor.checkmarkImage=Editor.lightCheckmarkImage; @@ -2041,12 +2039,12 @@ Editor.prototype.setFilename=function(a){this.filename=a}; Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(e,g){b.undoableEditHappened(g.getProperty("edit"))};var f=mxUtils.bind(this,function(e,g){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,f);a.getView().addListener(mxEvent.UNDO,f);f=function(e,g){e=a.getSelectionCellsForChanges(g.getProperty("edit").changes,function(k){return!(k instanceof mxChildChange)});if(0<e.length){a.getModel();g=[];for(var d=0;d<e.length;d++)null!= a.view.getState(e[d])&&g.push(e[d]);a.setSelectionCells(g)}};b.addListener(mxEvent.UNDO,f);b.addListener(mxEvent.REDO,f);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()}; OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)}; -function Dialog(a,b,f,e,g,d,k,n,u,m,r){var x=u?57:0,B=f,D=e,F=u?0:64,J=Editor.inlineFullscreen||null==a.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(a.embedViewport);null==a.embedViewport&&null!=window.innerHeight&&(J.height=window.innerHeight);var C=J.height,O=Math.max(1,Math.round((J.width-f-F)/2)),R=Math.max(1,Math.round((C-e-a.footerHeight)/3));b.style.maxHeight="100%";f=null!=document.body?Math.min(f,document.body.scrollWidth-F):f;e=Math.min(e,C-F);0<a.dialogs.length&&(this.zIndex+= -2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=C+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));J=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=J.x+"px";this.bg.style.top=J.y+"px";O+=J.x;R+=J.y;Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px", -R+=a.embedViewport.y,O+=a.embedViewport.x);g&&document.body.appendChild(this.bg);var T=a.createDiv(u?"geTransDialog":"geDialog");g=this.getPosition(O,R,f,e);O=g.x;R=g.y;T.style.width=f+"px";T.style.height=e+"px";T.style.left=O+"px";T.style.top=R+"px";T.style.zIndex=this.zIndex;T.appendChild(b);document.body.appendChild(T);!n&&b.clientHeight>T.clientHeight-F&&(b.style.overflowY="auto");b.style.overflowX="hidden";if(d&&(d=document.createElement("img"),d.setAttribute("src",Dialog.prototype.closeImage), -d.setAttribute("title",mxResources.get("close")),d.className="geDialogClose",d.style.top=R+14+"px",d.style.left=O+f+38-x+"px",d.style.zIndex=this.zIndex,mxEvent.addListener(d,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(d),this.dialogImg=d,!r)){var Q=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(aa){Q=!0}),null,mxUtils.bind(this,function(aa){Q&&(a.hideDialog(!0),Q=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=m){var aa=m(); -null!=aa&&(B=f=aa.w,D=e=aa.h)}aa=mxUtils.getDocumentSize();C=aa.height;this.bg.style.height=C+"px";Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");O=Math.max(1,Math.round((aa.width-f-F)/2));R=Math.max(1,Math.round((C-e-a.footerHeight)/3));f=null!=document.body?Math.min(B,document.body.scrollWidth-F):B;e=Math.min(D,C-F);aa=this.getPosition(O,R,f,e);O=aa.x;R=aa.y;T.style.left=O+"px";T.style.top=R+"px";T.style.width=f+"px";T.style.height=e+ -"px";!n&&b.clientHeight>T.clientHeight-F&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=R+14+"px",this.dialogImg.style.left=O+f+38-x+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=k;this.container=T;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2; +function Dialog(a,b,f,e,g,d,k,n,u,m,r){var x=u?57:0,B=f,D=e,F=u?0:64,I=Editor.inlineFullscreen||null==a.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(a.embedViewport);null==a.embedViewport&&null!=window.innerHeight&&(I.height=window.innerHeight);var C=I.height,N=Math.max(1,Math.round((I.width-f-F)/2)),R=Math.max(1,Math.round((C-e-a.footerHeight)/3));b.style.maxHeight="100%";f=null!=document.body?Math.min(f,document.body.scrollWidth-F):f;e=Math.min(e,C-F);0<a.dialogs.length&&(this.zIndex+= +2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=C+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));I=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=I.x+"px";this.bg.style.top=I.y+"px";N+=I.x;R+=I.y;Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px", +R+=a.embedViewport.y,N+=a.embedViewport.x);g&&document.body.appendChild(this.bg);var S=a.createDiv(u?"geTransDialog":"geDialog");g=this.getPosition(N,R,f,e);N=g.x;R=g.y;S.style.width=f+"px";S.style.height=e+"px";S.style.left=N+"px";S.style.top=R+"px";S.style.zIndex=this.zIndex;S.appendChild(b);document.body.appendChild(S);!n&&b.clientHeight>S.clientHeight-F&&(b.style.overflowY="auto");b.style.overflowX="hidden";if(d&&(d=document.createElement("img"),d.setAttribute("src",Dialog.prototype.closeImage), +d.setAttribute("title",mxResources.get("close")),d.className="geDialogClose",d.style.top=R+14+"px",d.style.left=N+f+38-x+"px",d.style.zIndex=this.zIndex,mxEvent.addListener(d,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(d),this.dialogImg=d,!r)){var Q=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(aa){Q=!0}),null,mxUtils.bind(this,function(aa){Q&&(a.hideDialog(!0),Q=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=m){var aa=m(); +null!=aa&&(B=f=aa.w,D=e=aa.h)}aa=mxUtils.getDocumentSize();C=aa.height;this.bg.style.height=C+"px";Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");N=Math.max(1,Math.round((aa.width-f-F)/2));R=Math.max(1,Math.round((C-e-a.footerHeight)/3));f=null!=document.body?Math.min(B,document.body.scrollWidth-F):B;e=Math.min(D,C-F);aa=this.getPosition(N,R,f,e);N=aa.x;R=aa.y;S.style.left=N+"px";S.style.top=R+"px";S.style.width=f+"px";S.style.height=e+ +"px";!n&&b.clientHeight>S.clientHeight-F&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=R+14+"px",this.dialogImg.style.left=N+f+38-x+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=k;this.container=S;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2; Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+ "/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png"; Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+ @@ -2054,8 +2052,8 @@ Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKA var ErrorDialog=function(a,b,f,e,g,d,k,n,u,m,r){u=null!=u?u:!0;var x=document.createElement("div");x.style.textAlign="center";if(null!=b){var B=document.createElement("div");B.style.padding="0px";B.style.margin="0px";B.style.fontSize="18px";B.style.paddingBottom="16px";B.style.marginBottom="10px";B.style.borderBottom="1px solid #c0c0c0";B.style.color="gray";B.style.whiteSpace="nowrap";B.style.textOverflow="ellipsis";B.style.overflow="hidden";mxUtils.write(B,b);B.setAttribute("title",b);x.appendChild(B)}b= document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=f;x.appendChild(b);f=document.createElement("div");f.style.marginTop="12px";f.style.textAlign="center";null!=d&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();d()}),b.className="geBtn",f.appendChild(b),f.style.textAlign="center");null!=m&&(m=mxUtils.button(m,function(){null!=r&&r()}),m.className="geBtn",f.appendChild(m));var D=mxUtils.button(e,function(){u&&a.hideDialog();null!=g&&g()}); D.className="geBtn";f.appendChild(D);null!=k&&(e=mxUtils.button(k,function(){u&&a.hideDialog();null!=n&&n()}),e.className="geBtn gePrimaryBtn",f.appendChild(e));this.init=function(){D.focus()};x.appendChild(f);this.container=x},PrintDialog=function(a,b){this.create(a,b)}; -PrintDialog.prototype.create=function(a){function b(D){var F=k.checked||m.checked,J=parseInt(x.value)/100;isNaN(J)&&(J=1,x.value="100%");J*=.75;var C=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,O=1/f.pageScale;if(F){var R=k.checked?1:parseInt(r.value);isNaN(R)||(O=mxUtils.getScaleForPageCount(R,f,C))}f.getGraphBounds();var T=R=0;C=mxRectangle.fromRectangle(C);C.width=Math.ceil(C.width*J);C.height=Math.ceil(C.height*J);O*=J;!F&&f.pageVisible?(J=f.getPageLayout(),R-=J.x*C.width,T-=J.y*C.height): -F=!0;F=PrintDialog.createPrintPreview(f,O,C,0,R,T,F);F.open();D&&PrintDialog.printPreview(F)}var f=a.editor.graph,e=document.createElement("table");e.style.width="100%";e.style.height="100%";var g=document.createElement("tbody");var d=document.createElement("tr");var k=document.createElement("input");k.setAttribute("type","checkbox");var n=document.createElement("td");n.setAttribute("colspan","2");n.style.fontSize="10pt";n.appendChild(k);var u=document.createElement("span");mxUtils.write(u," "+mxResources.get("fitPage")); +PrintDialog.prototype.create=function(a){function b(D){var F=k.checked||m.checked,I=parseInt(x.value)/100;isNaN(I)&&(I=1,x.value="100%");I*=.75;var C=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,N=1/f.pageScale;if(F){var R=k.checked?1:parseInt(r.value);isNaN(R)||(N=mxUtils.getScaleForPageCount(R,f,C))}f.getGraphBounds();var S=R=0;C=mxRectangle.fromRectangle(C);C.width=Math.ceil(C.width*I);C.height=Math.ceil(C.height*I);N*=I;!F&&f.pageVisible?(I=f.getPageLayout(),R-=I.x*C.width,S-=I.y*C.height): +F=!0;F=PrintDialog.createPrintPreview(f,N,C,0,R,S,F);F.open();D&&PrintDialog.printPreview(F)}var f=a.editor.graph,e=document.createElement("table");e.style.width="100%";e.style.height="100%";var g=document.createElement("tbody");var d=document.createElement("tr");var k=document.createElement("input");k.setAttribute("type","checkbox");var n=document.createElement("td");n.setAttribute("colspan","2");n.style.fontSize="10pt";n.appendChild(k);var u=document.createElement("span");mxUtils.write(u," "+mxResources.get("fitPage")); n.appendChild(u);mxEvent.addListener(u,"click",function(D){k.checked=!k.checked;m.checked=!k.checked;mxEvent.consume(D)});mxEvent.addListener(k,"change",function(){m.checked=!k.checked});d.appendChild(n);g.appendChild(d);d=d.cloneNode(!1);var m=document.createElement("input");m.setAttribute("type","checkbox");n=document.createElement("td");n.style.fontSize="10pt";n.appendChild(m);u=document.createElement("span");mxUtils.write(u," "+mxResources.get("posterPrint")+":");n.appendChild(u);mxEvent.addListener(u, "click",function(D){m.checked=!m.checked;k.checked=!m.checked;mxEvent.consume(D)});d.appendChild(n);var r=document.createElement("input");r.setAttribute("value","1");r.setAttribute("type","number");r.setAttribute("min","1");r.setAttribute("size","4");r.setAttribute("disabled","disabled");r.style.width="50px";n=document.createElement("td");n.style.fontSize="10pt";n.appendChild(r);mxUtils.write(n," "+mxResources.get("pages")+" (max)");d.appendChild(n);g.appendChild(d);mxEvent.addListener(m,"change", function(){m.checked?r.removeAttribute("disabled"):r.setAttribute("disabled","disabled");k.checked=!m.checked});d=d.cloneNode(!1);n=document.createElement("td");mxUtils.write(n,mxResources.get("pageScale")+":");d.appendChild(n);n=document.createElement("td");var x=document.createElement("input");x.setAttribute("value","100 %");x.setAttribute("size","5");x.style.width="50px";n.appendChild(x);d.appendChild(n);g.appendChild(d);d=document.createElement("tr");n=document.createElement("td");n.colSpan=2; @@ -2066,29 +2064,29 @@ PrintDialog.previewEnabled=!0; var PageSetupDialog=function(a){function b(){null==r||r==mxConstants.NONE?(m.style.backgroundColor="",m.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(m.style.backgroundColor=r,m.style.backgroundImage="")}function f(){var C=F;null!=C&&Graph.isPageLink(C.src)&&(C=a.createImageForPageLink(C.src,null));null!=C&&null!=C.src?(D.setAttribute("src",C.src),D.style.display=""):(D.removeAttribute("src"),D.style.display="none")}var e=a.editor.graph,g=document.createElement("table");g.style.width= "100%";g.style.height="100%";var d=document.createElement("tbody");var k=document.createElement("tr");var n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("paperSize")+":");k.appendChild(n);n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";var u=PageSetupDialog.addPageFormatPanel(n,"pagesetupdialog",e.pageFormat);k.appendChild(n);d.appendChild(k);k=document.createElement("tr");n=document.createElement("td"); mxUtils.write(n,mxResources.get("background")+":");k.appendChild(n);n=document.createElement("td");n.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var m=document.createElement("button");m.style.width="22px";m.style.height="22px";m.style.cursor="pointer";m.style.marginRight="20px";m.style.backgroundPosition="center center";m.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(m.style.position="relative",m.style.top="-6px");var r=e.background;b();mxEvent.addListener(m, -"click",function(C){a.pickColor(r||"none",function(O){r=O;b()});mxEvent.consume(C)});n.appendChild(m);mxUtils.write(n,mxResources.get("gridSize")+":");var x=document.createElement("input");x.setAttribute("type","number");x.setAttribute("min","0");x.style.width="40px";x.style.marginLeft="6px";x.value=e.getGridSize();n.appendChild(x);mxEvent.addListener(x,"change",function(){var C=parseInt(x.value);x.value=Math.max(1,isNaN(C)?e.getGridSize():C)});k.appendChild(n);d.appendChild(k);k=document.createElement("tr"); +"click",function(C){a.pickColor(r||"none",function(N){r=N;b()});mxEvent.consume(C)});n.appendChild(m);mxUtils.write(n,mxResources.get("gridSize")+":");var x=document.createElement("input");x.setAttribute("type","number");x.setAttribute("min","0");x.style.width="40px";x.style.marginLeft="6px";x.value=e.getGridSize();n.appendChild(x);mxEvent.addListener(x,"change",function(){var C=parseInt(x.value);x.value=Math.max(1,isNaN(C)?e.getGridSize():C)});k.appendChild(n);d.appendChild(k);k=document.createElement("tr"); n=document.createElement("td");mxUtils.write(n,mxResources.get("image")+":");k.appendChild(n);n=document.createElement("td");var B=document.createElement("button");B.className="geBtn";B.style.margin="0px";mxUtils.write(B,mxResources.get("change")+"...");var D=document.createElement("img");D.setAttribute("valign","middle");D.style.verticalAlign="middle";D.style.border="1px solid lightGray";D.style.borderRadius="4px";D.style.marginRight="14px";D.style.maxWidth="100px";D.style.cursor="pointer";D.style.height= -"60px";D.style.padding="4px";var F=e.backgroundImage,J=function(C){a.showBackgroundImageDialog(function(O,R){R||(F=O,f())},F);mxEvent.consume(C)};mxEvent.addListener(B,"click",J);mxEvent.addListener(D,"click",J);f();n.appendChild(D);n.appendChild(B);k.appendChild(n);d.appendChild(k);k=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.paddingTop="16px";n.setAttribute("align","right");B=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});B.className="geBtn"; -a.editor.cancelFirst&&n.appendChild(B);J=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var C=parseInt(x.value);isNaN(C)||e.gridSize===C||e.setGridSize(C);C=new ChangePageSetup(a,r,F,u.get());C.ignoreColor=e.background==r;C.ignoreImage=(null!=e.backgroundImage?e.backgroundImage.src:null)===(null!=F?F.src:null);e.pageFormat.width==C.previousFormat.width&&e.pageFormat.height==C.previousFormat.height&&C.ignoreColor&&C.ignoreImage||e.model.execute(C)});J.className="geBtn gePrimaryBtn"; -n.appendChild(J);a.editor.cancelFirst||n.appendChild(B);k.appendChild(n);d.appendChild(k);g.appendChild(d);this.container=g}; -PageSetupDialog.addPageFormatPanel=function(a,b,f,e){function g(aa,S,P){if(P||x!=document.activeElement&&B!=document.activeElement){aa=!1;for(S=0;S<F.length;S++)P=F[S],R?"custom"==P.key&&(n.value=P.key,R=!1):null!=P.format&&("a4"==P.key?826==f.width?(f=mxRectangle.fromRectangle(f),f.width=827):826==f.height&&(f=mxRectangle.fromRectangle(f),f.height=827):"a5"==P.key&&(584==f.width?(f=mxRectangle.fromRectangle(f),f.width=583):584==f.height&&(f=mxRectangle.fromRectangle(f),f.height=583)),f.width==P.format.width&& +"60px";D.style.padding="4px";var F=e.backgroundImage,I=function(C){a.showBackgroundImageDialog(function(N,R){R||(F=N,f())},F);mxEvent.consume(C)};mxEvent.addListener(B,"click",I);mxEvent.addListener(D,"click",I);f();n.appendChild(D);n.appendChild(B);k.appendChild(n);d.appendChild(k);k=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.paddingTop="16px";n.setAttribute("align","right");B=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});B.className="geBtn"; +a.editor.cancelFirst&&n.appendChild(B);I=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var C=parseInt(x.value);isNaN(C)||e.gridSize===C||e.setGridSize(C);C=new ChangePageSetup(a,r,F,u.get());C.ignoreColor=e.background==r;C.ignoreImage=(null!=e.backgroundImage?e.backgroundImage.src:null)===(null!=F?F.src:null);e.pageFormat.width==C.previousFormat.width&&e.pageFormat.height==C.previousFormat.height&&C.ignoreColor&&C.ignoreImage||e.model.execute(C)});I.className="geBtn gePrimaryBtn"; +n.appendChild(I);a.editor.cancelFirst||n.appendChild(B);k.appendChild(n);d.appendChild(k);g.appendChild(d);this.container=g}; +PageSetupDialog.addPageFormatPanel=function(a,b,f,e){function g(aa,U,P){if(P||x!=document.activeElement&&B!=document.activeElement){aa=!1;for(U=0;U<F.length;U++)P=F[U],R?"custom"==P.key&&(n.value=P.key,R=!1):null!=P.format&&("a4"==P.key?826==f.width?(f=mxRectangle.fromRectangle(f),f.width=827):826==f.height&&(f=mxRectangle.fromRectangle(f),f.height=827):"a5"==P.key&&(584==f.width?(f=mxRectangle.fromRectangle(f),f.width=583):584==f.height&&(f=mxRectangle.fromRectangle(f),f.height=583)),f.width==P.format.width&& f.height==P.format.height?(n.value=P.key,d.setAttribute("checked","checked"),d.defaultChecked=!0,d.checked=!0,k.removeAttribute("checked"),k.defaultChecked=!1,k.checked=!1,aa=!0):f.width==P.format.height&&f.height==P.format.width&&(n.value=P.key,d.removeAttribute("checked"),d.defaultChecked=!1,d.checked=!1,k.setAttribute("checked","checked"),k.defaultChecked=!0,aa=k.checked=!0));aa?(u.style.display="",r.style.display="none"):(x.value=f.width/100,B.value=f.height/100,d.setAttribute("checked","checked"), n.value="custom",u.style.display="none",r.style.display="")}}b="format-"+b;var d=document.createElement("input");d.setAttribute("name",b);d.setAttribute("type","radio");d.setAttribute("value","portrait");var k=document.createElement("input");k.setAttribute("name",b);k.setAttribute("type","radio");k.setAttribute("value","landscape");var n=document.createElement("select");n.style.marginBottom="8px";n.style.borderRadius="4px";n.style.border="1px solid rgb(160, 160, 160)";n.style.width="206px";var u= document.createElement("div");u.style.marginLeft="4px";u.style.width="210px";u.style.height="24px";d.style.marginRight="6px";u.appendChild(d);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));u.appendChild(b);k.style.marginLeft="10px";k.style.marginRight="6px";u.appendChild(k);var m=document.createElement("span");m.style.width="100px";mxUtils.write(m,mxResources.get("landscape"));u.appendChild(m);var r=document.createElement("div");r.style.marginLeft= -"4px";r.style.width="210px";r.style.height="24px";var x=document.createElement("input");x.setAttribute("size","7");x.style.textAlign="right";r.appendChild(x);mxUtils.write(r," in x ");var B=document.createElement("input");B.setAttribute("size","7");B.style.textAlign="right";r.appendChild(B);mxUtils.write(r," in");u.style.display="none";r.style.display="none";for(var D={},F=PageSetupDialog.getFormats(),J=0;J<F.length;J++){var C=F[J];D[C.key]=C;var O=document.createElement("option");O.setAttribute("value", -C.key);mxUtils.write(O,C.title);n.appendChild(O)}var R=!1;g();a.appendChild(n);mxUtils.br(a);a.appendChild(u);a.appendChild(r);var T=f,Q=function(aa,S){aa=D[n.value];null!=aa.format?(x.value=aa.format.width/100,B.value=aa.format.height/100,r.style.display="none",u.style.display=""):(u.style.display="none",r.style.display="");aa=parseFloat(x.value);if(isNaN(aa)||0>=aa)x.value=f.width/100;aa=parseFloat(B.value);if(isNaN(aa)||0>=aa)B.value=f.height/100;aa=new mxRectangle(0,0,Math.floor(100*parseFloat(x.value)), -Math.floor(100*parseFloat(B.value)));"custom"!=n.value&&k.checked&&(aa=new mxRectangle(0,0,aa.height,aa.width));S&&R||aa.width==T.width&&aa.height==T.height||(T=aa,null!=e&&e(T))};mxEvent.addListener(b,"click",function(aa){d.checked=!0;Q(aa);mxEvent.consume(aa)});mxEvent.addListener(m,"click",function(aa){k.checked=!0;Q(aa);mxEvent.consume(aa)});mxEvent.addListener(x,"blur",Q);mxEvent.addListener(x,"click",Q);mxEvent.addListener(B,"blur",Q);mxEvent.addListener(B,"click",Q);mxEvent.addListener(k,"change", -Q);mxEvent.addListener(d,"change",Q);mxEvent.addListener(n,"change",function(aa){R="custom"==n.value;Q(aa,!0)});Q();return{set:function(aa){f=aa;g(null,null,!0)},get:function(){return T},widthInput:x,heightInput:B}}; +"4px";r.style.width="210px";r.style.height="24px";var x=document.createElement("input");x.setAttribute("size","7");x.style.textAlign="right";r.appendChild(x);mxUtils.write(r," in x ");var B=document.createElement("input");B.setAttribute("size","7");B.style.textAlign="right";r.appendChild(B);mxUtils.write(r," in");u.style.display="none";r.style.display="none";for(var D={},F=PageSetupDialog.getFormats(),I=0;I<F.length;I++){var C=F[I];D[C.key]=C;var N=document.createElement("option");N.setAttribute("value", +C.key);mxUtils.write(N,C.title);n.appendChild(N)}var R=!1;g();a.appendChild(n);mxUtils.br(a);a.appendChild(u);a.appendChild(r);var S=f,Q=function(aa,U){aa=D[n.value];null!=aa.format?(x.value=aa.format.width/100,B.value=aa.format.height/100,r.style.display="none",u.style.display=""):(u.style.display="none",r.style.display="");aa=parseFloat(x.value);if(isNaN(aa)||0>=aa)x.value=f.width/100;aa=parseFloat(B.value);if(isNaN(aa)||0>=aa)B.value=f.height/100;aa=new mxRectangle(0,0,Math.floor(100*parseFloat(x.value)), +Math.floor(100*parseFloat(B.value)));"custom"!=n.value&&k.checked&&(aa=new mxRectangle(0,0,aa.height,aa.width));U&&R||aa.width==S.width&&aa.height==S.height||(S=aa,null!=e&&e(S))};mxEvent.addListener(b,"click",function(aa){d.checked=!0;Q(aa);mxEvent.consume(aa)});mxEvent.addListener(m,"click",function(aa){k.checked=!0;Q(aa);mxEvent.consume(aa)});mxEvent.addListener(x,"blur",Q);mxEvent.addListener(x,"click",Q);mxEvent.addListener(B,"blur",Q);mxEvent.addListener(B,"click",Q);mxEvent.addListener(k,"change", +Q);mxEvent.addListener(d,"change",Q);mxEvent.addListener(n,"change",function(aa){R="custom"==n.value;Q(aa,!0)});Q();return{set:function(aa){f=aa;g(null,null,!0)},get:function(){return S},widthInput:x,heightInput:B}}; PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)", format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)}, {key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]}; -var FilenameDialog=function(a,b,f,e,g,d,k,n,u,m,r,x,B){u=null!=u?u:!0;var D=document.createElement("table"),F=document.createElement("tbody");D.style.position="absolute";D.style.top="30px";D.style.left="20px";var J=document.createElement("tr");var C=document.createElement("td");C.style.textOverflow="ellipsis";C.style.textAlign="right";C.style.maxWidth=(B?B+15:100)+"px";C.style.fontSize="10pt";C.style.width=(B?B:84)+"px";mxUtils.write(C,(g||mxResources.get("filename"))+":");J.appendChild(C);var O= -document.createElement("input");O.setAttribute("value",b||"");O.style.marginLeft="4px";O.style.width=null!=x?x+"px":"180px";var R=mxUtils.button(f,function(){if(null==d||d(O.value))u&&a.hideDialog(),e(O.value)});R.className="geBtn gePrimaryBtn";this.init=function(){if(null!=g||null==k)if(O.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?O.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var T=D.parentNode;if(null!=T){var Q=null;mxEvent.addListener(T,"dragleave", -function(aa){null!=Q&&(Q.style.backgroundColor="",Q=null);aa.stopPropagation();aa.preventDefault()});mxEvent.addListener(T,"dragover",mxUtils.bind(this,function(aa){null==Q&&(!mxClient.IS_IE||10<document.documentMode)&&(Q=O,Q.style.backgroundColor="#ebf2f9");aa.stopPropagation();aa.preventDefault()}));mxEvent.addListener(T,"drop",mxUtils.bind(this,function(aa){null!=Q&&(Q.style.backgroundColor="",Q=null);0<=mxUtils.indexOf(aa.dataTransfer.types,"text/uri-list")&&(O.value=decodeURIComponent(aa.dataTransfer.getData("text/uri-list")), -R.click());aa.stopPropagation();aa.preventDefault()}))}}};C=document.createElement("td");C.style.whiteSpace="nowrap";C.appendChild(O);J.appendChild(C);if(null!=g||null==k)F.appendChild(J),null!=r&&(C.appendChild(FilenameDialog.createTypeHint(a,O,r)),null!=a.editor.diagramFileTypes&&(J=document.createElement("tr"),C=document.createElement("td"),C.style.textOverflow="ellipsis",C.style.textAlign="right",C.style.maxWidth="100px",C.style.fontSize="10pt",C.style.width="84px",mxUtils.write(C,mxResources.get("type")+ -":"),J.appendChild(C),C=document.createElement("td"),C.style.whiteSpace="nowrap",J.appendChild(C),b=FilenameDialog.createFileTypes(a,O,a.editor.diagramFileTypes),b.style.marginLeft="4px",b.style.width="198px",C.appendChild(b),O.style.width=null!=x?x-40+"px":"190px",J.appendChild(C),F.appendChild(J)));null!=k&&(J=document.createElement("tr"),C=document.createElement("td"),C.colSpan=2,C.appendChild(k),J.appendChild(C),F.appendChild(J));J=document.createElement("tr");C=document.createElement("td");C.colSpan= -2;C.style.paddingTop=null!=r?"12px":"20px";C.style.whiteSpace="nowrap";C.setAttribute("align","right");r=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=m&&m()});r.className="geBtn";a.editor.cancelFirst&&C.appendChild(r);null!=n&&(x=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(n)}),x.className="geBtn",C.appendChild(x));mxEvent.addListener(O,"keypress",function(T){13==T.keyCode&&R.click()});C.appendChild(R);a.editor.cancelFirst||C.appendChild(r); -J.appendChild(C);F.appendChild(J);D.appendChild(F);this.container=D};FilenameDialog.filenameHelpLink=null; +var FilenameDialog=function(a,b,f,e,g,d,k,n,u,m,r,x,B){u=null!=u?u:!0;var D=document.createElement("table"),F=document.createElement("tbody");D.style.position="absolute";D.style.top="30px";D.style.left="20px";var I=document.createElement("tr");var C=document.createElement("td");C.style.textOverflow="ellipsis";C.style.textAlign="right";C.style.maxWidth=(B?B+15:100)+"px";C.style.fontSize="10pt";C.style.width=(B?B:84)+"px";mxUtils.write(C,(g||mxResources.get("filename"))+":");I.appendChild(C);var N= +document.createElement("input");N.setAttribute("value",b||"");N.style.marginLeft="4px";N.style.width=null!=x?x+"px":"180px";var R=mxUtils.button(f,function(){if(null==d||d(N.value))u&&a.hideDialog(),e(N.value)});R.className="geBtn gePrimaryBtn";this.init=function(){if(null!=g||null==k)if(N.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?N.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var S=D.parentNode;if(null!=S){var Q=null;mxEvent.addListener(S,"dragleave", +function(aa){null!=Q&&(Q.style.backgroundColor="",Q=null);aa.stopPropagation();aa.preventDefault()});mxEvent.addListener(S,"dragover",mxUtils.bind(this,function(aa){null==Q&&(!mxClient.IS_IE||10<document.documentMode)&&(Q=N,Q.style.backgroundColor="#ebf2f9");aa.stopPropagation();aa.preventDefault()}));mxEvent.addListener(S,"drop",mxUtils.bind(this,function(aa){null!=Q&&(Q.style.backgroundColor="",Q=null);0<=mxUtils.indexOf(aa.dataTransfer.types,"text/uri-list")&&(N.value=decodeURIComponent(aa.dataTransfer.getData("text/uri-list")), +R.click());aa.stopPropagation();aa.preventDefault()}))}}};C=document.createElement("td");C.style.whiteSpace="nowrap";C.appendChild(N);I.appendChild(C);if(null!=g||null==k)F.appendChild(I),null!=r&&(C.appendChild(FilenameDialog.createTypeHint(a,N,r)),null!=a.editor.diagramFileTypes&&(I=document.createElement("tr"),C=document.createElement("td"),C.style.textOverflow="ellipsis",C.style.textAlign="right",C.style.maxWidth="100px",C.style.fontSize="10pt",C.style.width="84px",mxUtils.write(C,mxResources.get("type")+ +":"),I.appendChild(C),C=document.createElement("td"),C.style.whiteSpace="nowrap",I.appendChild(C),b=FilenameDialog.createFileTypes(a,N,a.editor.diagramFileTypes),b.style.marginLeft="4px",b.style.width="198px",C.appendChild(b),N.style.width=null!=x?x-40+"px":"190px",I.appendChild(C),F.appendChild(I)));null!=k&&(I=document.createElement("tr"),C=document.createElement("td"),C.colSpan=2,C.appendChild(k),I.appendChild(C),F.appendChild(I));I=document.createElement("tr");C=document.createElement("td");C.colSpan= +2;C.style.paddingTop=null!=r?"12px":"20px";C.style.whiteSpace="nowrap";C.setAttribute("align","right");r=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=m&&m()});r.className="geBtn";a.editor.cancelFirst&&C.appendChild(r);null!=n&&(x=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(n)}),x.className="geBtn",C.appendChild(x));mxEvent.addListener(N,"keypress",function(S){13==S.keyCode&&R.click()});C.appendChild(R);a.editor.cancelFirst||C.appendChild(r); +I.appendChild(C);F.appendChild(I);D.appendChild(F);this.container=D};FilenameDialog.filenameHelpLink=null; FilenameDialog.createTypeHint=function(a,b,f){var e=document.createElement("img");e.style.backgroundPosition="center bottom";e.style.backgroundRepeat="no-repeat";e.style.margin="2px 0 0 4px";e.style.verticalAlign="top";e.style.cursor="pointer";e.style.height="16px";e.style.width="16px";mxUtils.setOpacity(e,70);var g=function(){e.setAttribute("src",Editor.helpImage);e.setAttribute("title",mxResources.get("help"));for(var d=0;d<f.length;d++)if(0<f[d].ext.length&&b.value.toLowerCase().substring(b.value.length- f[d].ext.length-1)=="."+f[d].ext){e.setAttribute("title",mxResources.get(f[d].title));break}};mxEvent.addListener(b,"keyup",g);mxEvent.addListener(b,"change",g);mxEvent.addListener(e,"click",function(d){var k=e.getAttribute("title");e.getAttribute("src")==Editor.helpImage?a.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=k&&a.showError(null,k,mxResources.get("help"),function(){a.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(d)}); g();return e}; @@ -2103,39 +2101,39 @@ mxGraphView.prototype.validateBackgroundStyles=function(){var k=this.graph,n=nul k.defaultPageBorderColor,k.container.className="geDiagramContainer geDiagramBackdrop",u.style.backgroundImage="none",u.style.backgroundColor=""):(k.container.className="geDiagramContainer",u.style.backgroundPosition=r,u.style.backgroundColor=n,u.style.backgroundImage=m)};mxGraphView.prototype.createSvgGrid=function(k){for(var n=this.graph.gridSize*this.scale;n<this.minGridSize;)n*=2;for(var u=this.gridSteps*n,m=[],r=1;r<this.gridSteps;r++){var x=r*n;m.push("M 0 "+x+" L "+u+" "+x+" M "+x+" 0 L "+x+ " "+u)}return'<svg width="'+u+'" height="'+u+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+u+'" height="'+u+'" patternUnits="userSpaceOnUse"><path d="'+m.join(" ")+'" fill="none" stroke="'+k+'" opacity="0.2" stroke-width="1"/><path d="M '+u+" 0 L 0 0 0 "+u+'" fill="none" stroke="'+k+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(k,n){a.apply(this,arguments); if(null!=this.shiftPreview1){var u=this.view.canvas;null!=u.ownerSVGElement&&(u=u.ownerSVGElement);var m=this.gridSize*this.view.scale*this.view.gridSteps;m=-Math.round(m-mxUtils.mod(this.view.translate.x*this.view.scale+k,m))+"px "+-Math.round(m-mxUtils.mod(this.view.translate.y*this.view.scale+n,m))+"px";u.style.backgroundPosition=m}};mxGraph.prototype.updatePageBreaks=function(k,n,u){var m=this.view.scale,r=this.view.translate,x=this.pageFormat,B=m*this.pageScale,D=this.view.getBackgroundPageBounds(); -n=D.width;u=D.height;var F=new mxRectangle(m*r.x,m*r.y,x.width*B,x.height*B),J=(k=k&&Math.min(F.width,F.height)>this.minPageBreakDist)?Math.ceil(u/F.height)-1:0,C=k?Math.ceil(n/F.width)-1:0,O=D.x+n,R=D.y+u;null==this.horizontalPageBreaks&&0<J&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<C&&(this.verticalPageBreaks=[]);k=mxUtils.bind(this,function(T){if(null!=T){for(var Q=T==this.horizontalPageBreaks?J:C,aa=0;aa<=Q;aa++){var S=T==this.horizontalPageBreaks?[new mxPoint(Math.round(D.x), -Math.round(D.y+(aa+1)*F.height)),new mxPoint(Math.round(O),Math.round(D.y+(aa+1)*F.height))]:[new mxPoint(Math.round(D.x+(aa+1)*F.width),Math.round(D.y)),new mxPoint(Math.round(D.x+(aa+1)*F.width),Math.round(R))];null!=T[aa]?(T[aa].points=S,T[aa].redraw()):(S=new mxPolyline(S,this.pageBreakColor),S.dialect=this.dialect,S.isDashed=this.pageBreakDashed,S.pointerEvents=!1,S.init(this.view.backgroundPane),S.redraw(),T[aa]=S)}for(aa=Q;aa<T.length;aa++)T[aa].destroy();T.splice(Q,T.length-Q)}});k(this.horizontalPageBreaks); +n=D.width;u=D.height;var F=new mxRectangle(m*r.x,m*r.y,x.width*B,x.height*B),I=(k=k&&Math.min(F.width,F.height)>this.minPageBreakDist)?Math.ceil(u/F.height)-1:0,C=k?Math.ceil(n/F.width)-1:0,N=D.x+n,R=D.y+u;null==this.horizontalPageBreaks&&0<I&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<C&&(this.verticalPageBreaks=[]);k=mxUtils.bind(this,function(S){if(null!=S){for(var Q=S==this.horizontalPageBreaks?I:C,aa=0;aa<=Q;aa++){var U=S==this.horizontalPageBreaks?[new mxPoint(Math.round(D.x), +Math.round(D.y+(aa+1)*F.height)),new mxPoint(Math.round(N),Math.round(D.y+(aa+1)*F.height))]:[new mxPoint(Math.round(D.x+(aa+1)*F.width),Math.round(D.y)),new mxPoint(Math.round(D.x+(aa+1)*F.width),Math.round(R))];null!=S[aa]?(S[aa].points=U,S[aa].redraw()):(U=new mxPolyline(U,this.pageBreakColor),U.dialect=this.dialect,U.isDashed=this.pageBreakDashed,U.pointerEvents=!1,U.init(this.view.backgroundPane),U.redraw(),S[aa]=U)}for(aa=Q;aa<S.length;aa++)S[aa].destroy();S.splice(Q,S.length-Q)}});k(this.horizontalPageBreaks); k(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(k,n,u){for(var m=0;m<n.length;m++){if(this.graph.isTableCell(n[m])||this.graph.isTableRow(n[m]))return!1;if(this.graph.getModel().isVertex(n[m])){var r=this.graph.getCellGeometry(n[m]);if(null!=r&&r.relative)return!1}}return b.apply(this,arguments)};var f=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var k= f.apply(this,arguments);k.intersects=mxUtils.bind(this,function(n,u){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(k,arguments)});return k};mxGraphView.prototype.createBackgroundPageShape=function(k){return new mxRectangleShape(k,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var k=this.getGraphBounds(),n=0<k.width?k.x/this.scale-this.translate.x:0,u=0<k.height?k.y/this.scale-this.translate.y:0,m=this.graph.pageFormat, r=this.graph.pageScale,x=m.width*r;m=m.height*r;r=Math.floor(Math.min(0,n)/x);var B=Math.floor(Math.min(0,u)/m);return new mxRectangle(this.scale*(this.translate.x+r*x),this.scale*(this.translate.y+B*m),this.scale*(Math.ceil(Math.max(1,n+k.width/this.scale)/x)-r)*x,this.scale*(Math.ceil(Math.max(1,u+k.height/this.scale)/m)-B)*m)};var e=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(k,n){e.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape|| this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=k+"px",this.view.backgroundPageShape.node.style.marginTop=n+"px")};var g=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(k,n,u,m,r,x){var B=g.apply(this,arguments);null==x||x||mxEvent.addListener(B,"mousedown",function(D){mxEvent.consume(D)});return B};var d=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell= function(k,n,u){var m=this.graph.model.getParent(k);if(n){var r=this.graph.model.isEdge(k)?null:this.graph.getCellGeometry(k);r=!this.graph.model.isEdge(m)&&!this.graph.isSiblingSelected(k)&&(null!=r&&r.relative||!this.graph.isContainer(m)||this.graph.isPart(k))}else if(r=d.apply(this,arguments),this.graph.isTableCell(k)||this.graph.isTableRow(k))r=m,this.graph.isTable(r)||(r=this.graph.model.getParent(r)),r=!this.graph.selectionCellsHandler.isHandled(r)||this.graph.isCellSelected(r)&&this.graph.isToggleEvent(u.getEvent())|| -this.graph.isCellSelected(k)&&!this.graph.isToggleEvent(u.getEvent())||this.graph.isTableCell(k)&&this.graph.isCellSelected(m);return r};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(k){k=k.getCell();for(var n=this.graph.getModel(),u=n.getParent(k),m=this.graph.view.getState(u),r=this.graph.isCellSelected(k);null!=m&&(n.isVertex(u)||n.isEdge(u));){var x=this.graph.isCellSelected(u);r=r||x;if(x||!r&&(this.graph.isTableCell(k)||this.graph.isTableRow(k)))k=u;u=n.getParent(u)}return k}})();EditorUi=function(a,b,f){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var e=this.editor.graph;e.lightbox=f;var g=e.getGraphBounds;e.getGraphBounds=function(){var G=g.apply(this,arguments),M=this.backgroundImage;if(null!=M&&null!=M.width&&null!=M.height){var U=this.view.translate,ba=this.view.scale;G=mxRectangle.fromRectangle(G);G.add(new mxRectangle((U.x+M.x)*ba,(U.y+M.y)*ba,M.width*ba,M.height*ba))}return G};e.useCssTransforms&&(this.lazyZoomDelay= -0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(G,M){this.clearSelectionState()});e.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener); -e.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);e.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);e.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);e.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,e.isEnabled=function(){return!1},e.panningHandler.isForcePanningEvent=function(G){return!mxEvent.isPopupTrigger(G.getEvent())});this.actions=new Actions(this);this.menus= +this.graph.isCellSelected(k)&&!this.graph.isToggleEvent(u.getEvent())||this.graph.isTableCell(k)&&this.graph.isCellSelected(m);return r};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(k){k=k.getCell();for(var n=this.graph.getModel(),u=n.getParent(k),m=this.graph.view.getState(u),r=this.graph.isCellSelected(k);null!=m&&(n.isVertex(u)||n.isEdge(u));){var x=this.graph.isCellSelected(u);r=r||x;if(x||!r&&(this.graph.isTableCell(k)||this.graph.isTableRow(k)))k=u;u=n.getParent(u)}return k}})();EditorUi=function(a,b,f){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var e=this.editor.graph;e.lightbox=f;var g=e.getGraphBounds;e.getGraphBounds=function(){var O=g.apply(this,arguments),T=this.backgroundImage;if(null!=T&&null!=T.width&&null!=T.height){var J=this.view.translate,ba=this.view.scale;O=mxRectangle.fromRectangle(O);O.add(new mxRectangle((J.x+T.x)*ba,(J.y+T.y)*ba,T.width*ba,T.height*ba))}return O};e.useCssTransforms&&(this.lazyZoomDelay= +0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(O,T){this.clearSelectionState()});e.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener); +e.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);e.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);e.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);e.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,e.isEnabled=function(){return!1},e.panningHandler.isForcePanningEvent=function(O){return!mxEvent.isPopupTrigger(O.getEvent())});this.actions=new Actions(this);this.menus= this.createMenus();if(!e.standalone){var d="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents strokeColor strokeWidth".split(" "),k="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "), -n="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),u=!1,m=!1;this.setDefaultStyle=function(G){try{e.getModel().isEdge(G)?m=!1:u=!1;var M=e.getCellStyle(G,!1),U=[],ba=[],la;for(la in M)U.push(M[la]),ba.push(la);e.getModel().isEdge(G)?e.currentEdgeStyle={}:e.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ba,"values",U,"cells",[G]));e.getModel().isEdge(G)?m=!0:u=!0}catch(ra){this.handleError(ra)}}; +n="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),u=!1,m=!1;this.setDefaultStyle=function(O){try{e.getModel().isEdge(O)?m=!1:u=!1;var T=e.getCellStyle(O,!1),J=[],ba=[],ha;for(ha in T)J.push(T[ha]),ba.push(ha);e.getModel().isEdge(O)?e.currentEdgeStyle={}:e.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ba,"values",J,"cells",[O]));e.getModel().isEdge(O)?m=!0:u=!0}catch(na){this.handleError(na)}}; this.clearDefaultStyle=function(){e.currentEdgeStyle=mxUtils.clone(e.defaultEdgeStyle);e.currentVertexStyle=mxUtils.clone(e.defaultVertexStyle);u=m=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var r=["fontFamily","fontSource","fontSize","fontColor"];for(b=0;b<r.length;b++)0>mxUtils.indexOf(d,r[b])&&d.push(r[b]);var x="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),B=[["startArrow","startFill","endArrow","endFill"],["startSize", -"endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(b=0;b<B.length;b++)for(f=0;f<B[b].length;f++)d.push(B[b][f]);for(b=0;b<k.length;b++)0>mxUtils.indexOf(d,k[b])&&d.push(k[b]);var D=function(G,M,U,ba,la,ra,Y){ba=null!=ba?ba:e.currentVertexStyle;la=null!=la?la:e.currentEdgeStyle;ra=null!=ra?ra:!0;U=null!=U?U:e.getModel();if(Y){Y=[];for(var da=0;da<G.length;da++)Y=Y.concat(U.getDescendants(G[da]));G=Y}U.beginUpdate(); -try{for(da=0;da<G.length;da++){var pa=G[da];if(M)var wa=["fontSize","fontFamily","fontColor"];else{var Ka=U.getStyle(pa),Ha=null!=Ka?Ka.split(";"):[];wa=d.slice();for(var ua=0;ua<Ha.length;ua++){var Ca=Ha[ua],qa=Ca.indexOf("=");if(0<=qa){var Da=Ca.substring(0,qa),Ua=mxUtils.indexOf(wa,Da);0<=Ua&&wa.splice(Ua,1);for(Y=0;Y<B.length;Y++){var db=B[Y];if(0<=mxUtils.indexOf(db,Da))for(var Ta=0;Ta<db.length;Ta++){var ab=mxUtils.indexOf(wa,db[Ta]);0<=ab&&wa.splice(ab,1)}}}}}var Ya=U.isEdge(pa);Y=Ya?la:ba; -var Va=U.getStyle(pa);for(ua=0;ua<wa.length;ua++){Da=wa[ua];var Za=Y[Da];null!=Za&&"edgeStyle"!=Da&&("shape"!=Da||Ya)&&(!Ya||ra||0>mxUtils.indexOf(n,Da))&&(Va=mxUtils.setStyle(Va,Da,Za))}Editor.simpleLabels&&(Va=mxUtils.setStyle(mxUtils.setStyle(Va,"html",null),"whiteSpace",null));U.setStyle(pa,Va)}}finally{U.endUpdate()}return G};e.addListener("cellsInserted",function(G,M){D(M.getProperty("cells"),null,null,null,null,!0,!0)});e.addListener("textInserted",function(G,M){D(M.getProperty("cells"),!0)}); -this.insertHandler=D;this.createDivs();this.createUi();this.refresh();var F=mxUtils.bind(this,function(G){null==G&&(G=window.event);return e.isEditing()||null!=G&&this.isSelectionAllowed(G)});this.container==document.body&&(this.menubarContainer.onselectstart=F,this.menubarContainer.onmousedown=F,this.toolbarContainer.onselectstart=F,this.toolbarContainer.onmousedown=F,this.diagramContainer.onselectstart=F,this.diagramContainer.onmousedown=F,this.sidebarContainer.onselectstart=F,this.sidebarContainer.onmousedown= -F,this.formatContainer.onselectstart=F,this.formatContainer.onmousedown=F,this.footerContainer.onselectstart=F,this.footerContainer.onmousedown=F,null!=this.tabContainer&&(this.tabContainer.onselectstart=F));!this.editor.chromeless||this.editor.editable?(b=function(G){if(null!=G){var M=mxEvent.getSource(G);if("A"==M.nodeName)for(;null!=M;){if("geHint"==M.className)return!0;M=M.parentNode}}return F(G)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer, -"contextmenu",b):this.diagramContainer.oncontextmenu=b):e.panningHandler.usePopupTrigger=!1;e.init(this.diagramContainer);mxClient.IS_SVG&&null!=e.view.getDrawPane()&&(b=e.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=e.graphHandler){var J=e.graphHandler.start;e.graphHandler.start=function(){null!=fa.hoverIcons&&fa.hoverIcons.reset();J.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this, -function(G){var M=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(G)-M.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(G)-M.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var C=!1,O=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(G,M){return C||O.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(G){32!=G.which||e.isEditing()? -mxEvent.isConsumed(G)||27!=G.keyCode||this.hideDialog(null,!0):(C=!0,this.hoverIcons.reset(),e.container.style.cursor="move",e.isEditing()||mxEvent.getSource(G)!=e.container||mxEvent.consume(G))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(G){e.container.style.cursor="";C=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var R=e.panningHandler.isForcePanningEvent;e.panningHandler.isForcePanningEvent=function(G){return R.apply(this, -arguments)||C||mxEvent.isMouseEvent(G.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(G.getEvent()))&&(!mxEvent.isControlDown(G.getEvent())&&mxEvent.isRightMouseButton(G.getEvent())||mxEvent.isMiddleMouseButton(G.getEvent()))};var T=e.cellEditor.isStopEditingEvent;e.cellEditor.isStopEditingEvent=function(G){return T.apply(this,arguments)||13==G.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(G)||mxClient.IS_MAC&&mxEvent.isMetaDown(G)||mxClient.IS_SF&&mxEvent.isShiftDown(G))};var Q=e.isZoomWheelEvent; -e.isZoomWheelEvent=function(){return C||Q.apply(this,arguments)};var aa=!1,S=null,P=null,X=null,ha=mxUtils.bind(this,function(){if(null!=this.toolbar&&aa!=e.cellEditor.isContentEditing()){for(var G=this.toolbar.container.firstChild,M=[];null!=G;){var U=G.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,G)&&(G.parentNode.removeChild(G),M.push(G));G=U}G=this.toolbar.fontMenu;U=this.toolbar.sizeMenu;if(null==X)this.toolbar.createTextToolbar();else{for(var ba=0;ba<X.length;ba++)this.toolbar.container.appendChild(X[ba]); -this.toolbar.fontMenu=S;this.toolbar.sizeMenu=P}aa=e.cellEditor.isContentEditing();S=G;P=U;X=M}}),fa=this,sa=e.cellEditor.startEditing;e.cellEditor.startEditing=function(){sa.apply(this,arguments);ha();if(e.cellEditor.isContentEditing()){var G=!1,M=function(){G||(G=!0,window.setTimeout(function(){var U=e.getSelectedEditingElement();null!=U&&(U=mxUtils.getCurrentStyle(U),null!=U&&null!=fa.toolbar&&(fa.toolbar.setFontName(Graph.stripQuotes(U.fontFamily)),fa.toolbar.setFontSize(parseInt(U.fontSize)))); -G=!1},0))};mxEvent.addListener(e.cellEditor.textarea,"input",M);mxEvent.addListener(e.cellEditor.textarea,"touchend",M);mxEvent.addListener(e.cellEditor.textarea,"mouseup",M);mxEvent.addListener(e.cellEditor.textarea,"keyup",M);M()}};var K=e.cellEditor.stopEditing;e.cellEditor.stopEditing=function(G,M){try{K.apply(this,arguments),ha()}catch(U){fa.handleError(U)}};e.container.setAttribute("tabindex","0");e.container.style.cursor="default";if(window.self===window.top&&null!=e.container.parentNode)try{e.container.focus()}catch(G){}var V= -e.fireMouseEvent;e.fireMouseEvent=function(G,M,U){G==mxEvent.MOUSE_DOWN&&this.container.focus();V.apply(this,arguments)};e.popupMenuHandler.autoExpand=!0;null!=this.menus&&(e.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(G,M,U){this.menus.createPopupMenu(G,M,U)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(G){e.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};e.connectionHandler.addListener(mxEvent.CONNECT, -function(G,M){var U=[M.getProperty("cell")];M.getProperty("terminalInserted")&&(U.push(M.getProperty("terminal")),window.setTimeout(function(){null!=fa.hoverIcons&&fa.hoverIcons.update(e.view.getState(U[U.length-1]))},0));D(U)});this.addListener("styleChanged",mxUtils.bind(this,function(G,M){var U=M.getProperty("cells"),ba=G=!1;if(0<U.length)for(var la=0;la<U.length&&(G=e.getModel().isVertex(U[la])||G,!(ba=e.getModel().isEdge(U[la])||ba)||!G);la++);else ba=G=!0;G=G&&!u;ba=ba&&!m;U=M.getProperty("keys"); -M=M.getProperty("values");for(la=0;la<U.length;la++){var ra=0<=mxUtils.indexOf(r,U[la]);if("strokeColor"!=U[la]||null!=M[la]&&"none"!=M[la])if(0<=mxUtils.indexOf(k,U[la]))ba||0<=mxUtils.indexOf(x,U[la])?null==M[la]?delete e.currentEdgeStyle[U[la]]:e.currentEdgeStyle[U[la]]=M[la]:G&&0<=mxUtils.indexOf(d,U[la])&&(null==M[la]?delete e.currentVertexStyle[U[la]]:e.currentVertexStyle[U[la]]=M[la]);else if(0<=mxUtils.indexOf(d,U[la])){if(G||ra)null==M[la]?delete e.currentVertexStyle[U[la]]:e.currentVertexStyle[U[la]]= -M[la];if(ba||ra||0<=mxUtils.indexOf(x,U[la]))null==M[la]?delete e.currentEdgeStyle[U[la]]:e.currentEdgeStyle[U[la]]=M[la]}}null!=this.toolbar&&(this.toolbar.setFontName(e.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(e.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==e.currentEdgeStyle.edgeStyle&&"1"==e.currentEdgeStyle.curved? +"endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(b=0;b<B.length;b++)for(f=0;f<B[b].length;f++)d.push(B[b][f]);for(b=0;b<k.length;b++)0>mxUtils.indexOf(d,k[b])&&d.push(k[b]);var D=function(O,T,J,ba,ha,na,W){ba=null!=ba?ba:e.currentVertexStyle;ha=null!=ha?ha:e.currentEdgeStyle;na=null!=na?na:!0;J=null!=J?J:e.getModel();if(W){W=[];for(var da=0;da<O.length;da++)W=W.concat(J.getDescendants(O[da]));O=W}J.beginUpdate(); +try{for(da=0;da<O.length;da++){var sa=O[da];if(T)var ta=["fontSize","fontFamily","fontColor"];else{var Ja=J.getStyle(sa),Ha=null!=Ja?Ja.split(";"):[];ta=d.slice();for(var ua=0;ua<Ha.length;ua++){var Aa=Ha[ua],qa=Aa.indexOf("=");if(0<=qa){var Da=Aa.substring(0,qa),Ua=mxUtils.indexOf(ta,Da);0<=Ua&&ta.splice(Ua,1);for(W=0;W<B.length;W++){var db=B[W];if(0<=mxUtils.indexOf(db,Da))for(var Ta=0;Ta<db.length;Ta++){var ab=mxUtils.indexOf(ta,db[Ta]);0<=ab&&ta.splice(ab,1)}}}}}var Ya=J.isEdge(sa);W=Ya?ha:ba; +var Va=J.getStyle(sa);for(ua=0;ua<ta.length;ua++){Da=ta[ua];var Za=W[Da];null!=Za&&"edgeStyle"!=Da&&("shape"!=Da||Ya)&&(!Ya||na||0>mxUtils.indexOf(n,Da))&&(Va=mxUtils.setStyle(Va,Da,Za))}Editor.simpleLabels&&(Va=mxUtils.setStyle(mxUtils.setStyle(Va,"html",null),"whiteSpace",null));J.setStyle(sa,Va)}}finally{J.endUpdate()}return O};e.addListener("cellsInserted",function(O,T){D(T.getProperty("cells"),null,null,null,null,!0,!0)});e.addListener("textInserted",function(O,T){D(T.getProperty("cells"),!0)}); +this.insertHandler=D;this.createDivs();this.createUi();this.refresh();var F=mxUtils.bind(this,function(O){null==O&&(O=window.event);return e.isEditing()||null!=O&&this.isSelectionAllowed(O)});this.container==document.body&&(this.menubarContainer.onselectstart=F,this.menubarContainer.onmousedown=F,this.toolbarContainer.onselectstart=F,this.toolbarContainer.onmousedown=F,this.diagramContainer.onselectstart=F,this.diagramContainer.onmousedown=F,this.sidebarContainer.onselectstart=F,this.sidebarContainer.onmousedown= +F,this.formatContainer.onselectstart=F,this.formatContainer.onmousedown=F,this.footerContainer.onselectstart=F,this.footerContainer.onmousedown=F,null!=this.tabContainer&&(this.tabContainer.onselectstart=F));!this.editor.chromeless||this.editor.editable?(b=function(O){if(null!=O){var T=mxEvent.getSource(O);if("A"==T.nodeName)for(;null!=T;){if("geHint"==T.className)return!0;T=T.parentNode}}return F(O)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer, +"contextmenu",b):this.diagramContainer.oncontextmenu=b):e.panningHandler.usePopupTrigger=!1;e.init(this.diagramContainer);mxClient.IS_SVG&&null!=e.view.getDrawPane()&&(b=e.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=e.graphHandler){var I=e.graphHandler.start;e.graphHandler.start=function(){null!=fa.hoverIcons&&fa.hoverIcons.reset();I.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this, +function(O){var T=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(O)-T.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(O)-T.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var C=!1,N=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(O,T){return C||N.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(O){32!=O.which||e.isEditing()? +mxEvent.isConsumed(O)||27!=O.keyCode||this.hideDialog(null,!0):(C=!0,this.hoverIcons.reset(),e.container.style.cursor="move",e.isEditing()||mxEvent.getSource(O)!=e.container||mxEvent.consume(O))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(O){e.container.style.cursor="";C=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var R=e.panningHandler.isForcePanningEvent;e.panningHandler.isForcePanningEvent=function(O){return R.apply(this, +arguments)||C||mxEvent.isMouseEvent(O.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(O.getEvent()))&&(!mxEvent.isControlDown(O.getEvent())&&mxEvent.isRightMouseButton(O.getEvent())||mxEvent.isMiddleMouseButton(O.getEvent()))};var S=e.cellEditor.isStopEditingEvent;e.cellEditor.isStopEditingEvent=function(O){return S.apply(this,arguments)||13==O.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(O)||mxClient.IS_MAC&&mxEvent.isMetaDown(O)||mxClient.IS_SF&&mxEvent.isShiftDown(O))};var Q=e.isZoomWheelEvent; +e.isZoomWheelEvent=function(){return C||Q.apply(this,arguments)};var aa=!1,U=null,P=null,Y=null,ja=mxUtils.bind(this,function(){if(null!=this.toolbar&&aa!=e.cellEditor.isContentEditing()){for(var O=this.toolbar.container.firstChild,T=[];null!=O;){var J=O.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,O)&&(O.parentNode.removeChild(O),T.push(O));O=J}O=this.toolbar.fontMenu;J=this.toolbar.sizeMenu;if(null==Y)this.toolbar.createTextToolbar();else{for(var ba=0;ba<Y.length;ba++)this.toolbar.container.appendChild(Y[ba]); +this.toolbar.fontMenu=U;this.toolbar.sizeMenu=P}aa=e.cellEditor.isContentEditing();U=O;P=J;Y=T}}),fa=this,ra=e.cellEditor.startEditing;e.cellEditor.startEditing=function(){ra.apply(this,arguments);ja();if(e.cellEditor.isContentEditing()){var O=!1,T=function(){O||(O=!0,window.setTimeout(function(){var J=e.getSelectedEditingElement();null!=J&&(J=mxUtils.getCurrentStyle(J),null!=J&&null!=fa.toolbar&&(fa.toolbar.setFontName(Graph.stripQuotes(J.fontFamily)),fa.toolbar.setFontSize(parseInt(J.fontSize)))); +O=!1},0))};mxEvent.addListener(e.cellEditor.textarea,"input",T);mxEvent.addListener(e.cellEditor.textarea,"touchend",T);mxEvent.addListener(e.cellEditor.textarea,"mouseup",T);mxEvent.addListener(e.cellEditor.textarea,"keyup",T);T()}};var K=e.cellEditor.stopEditing;e.cellEditor.stopEditing=function(O,T){try{K.apply(this,arguments),ja()}catch(J){fa.handleError(J)}};e.container.setAttribute("tabindex","0");e.container.style.cursor="default";if(window.self===window.top&&null!=e.container.parentNode)try{e.container.focus()}catch(O){}var V= +e.fireMouseEvent;e.fireMouseEvent=function(O,T,J){O==mxEvent.MOUSE_DOWN&&this.container.focus();V.apply(this,arguments)};e.popupMenuHandler.autoExpand=!0;null!=this.menus&&(e.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(O,T,J){this.menus.createPopupMenu(O,T,J)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(O){e.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};e.connectionHandler.addListener(mxEvent.CONNECT, +function(O,T){var J=[T.getProperty("cell")];T.getProperty("terminalInserted")&&(J.push(T.getProperty("terminal")),window.setTimeout(function(){null!=fa.hoverIcons&&fa.hoverIcons.update(e.view.getState(J[J.length-1]))},0));D(J)});this.addListener("styleChanged",mxUtils.bind(this,function(O,T){var J=T.getProperty("cells"),ba=O=!1;if(0<J.length)for(var ha=0;ha<J.length&&(O=e.getModel().isVertex(J[ha])||O,!(ba=e.getModel().isEdge(J[ha])||ba)||!O);ha++);else ba=O=!0;O=O&&!u;ba=ba&&!m;J=T.getProperty("keys"); +T=T.getProperty("values");for(ha=0;ha<J.length;ha++){var na=0<=mxUtils.indexOf(r,J[ha]);if("strokeColor"!=J[ha]||null!=T[ha]&&"none"!=T[ha])if(0<=mxUtils.indexOf(k,J[ha]))ba||0<=mxUtils.indexOf(x,J[ha])?null==T[ha]?delete e.currentEdgeStyle[J[ha]]:e.currentEdgeStyle[J[ha]]=T[ha]:O&&0<=mxUtils.indexOf(d,J[ha])&&(null==T[ha]?delete e.currentVertexStyle[J[ha]]:e.currentVertexStyle[J[ha]]=T[ha]);else if(0<=mxUtils.indexOf(d,J[ha])){if(O||na)null==T[ha]?delete e.currentVertexStyle[J[ha]]:e.currentVertexStyle[J[ha]]= +T[ha];if(ba||na||0<=mxUtils.indexOf(x,J[ha]))null==T[ha]?delete e.currentEdgeStyle[J[ha]]:e.currentEdgeStyle[J[ha]]=T[ha]}}null!=this.toolbar&&(this.toolbar.setFontName(e.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(e.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==e.currentEdgeStyle.edgeStyle&&"1"==e.currentEdgeStyle.curved? "geSprite geSprite-curved":"straight"==e.currentEdgeStyle.edgeStyle||"none"==e.currentEdgeStyle.edgeStyle||null==e.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==e.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==e.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==e.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==e.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==e.currentEdgeStyle.elbow? -"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==e.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==e.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==e.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var G=e.currentVertexStyle.fontFamily||"Helvetica", -M=String(e.currentVertexStyle.fontSize||"12"),U=e.getView().getState(e.getSelectionCell());null!=U&&(G=U.style[mxConstants.STYLE_FONTFAMILY]||G,M=U.style[mxConstants.STYLE_FONTSIZE]||M,10<G.length&&(G=G.substring(0,8)+"..."));this.toolbar.setFontName(G);this.toolbar.setFontSize(M)}),e.getSelectionModel().addListener(mxEvent.CHANGE,a),e.getModel().addListener(mxEvent.CHANGE,a));e.addListener(mxEvent.CELLS_ADDED,function(G,M){G=M.getProperty("cells");M=M.getProperty("parent");null!=M&&e.getModel().isLayer(M)&& -!e.isCellVisible(M)&&null!=G&&0<G.length&&e.getModel().setVisible(M,!0)});this.gestureHandler=mxUtils.bind(this,function(G){null!=this.currentMenu&&mxEvent.getSource(G)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler= +"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==e.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==e.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==e.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var O=e.currentVertexStyle.fontFamily||"Helvetica", +T=String(e.currentVertexStyle.fontSize||"12"),J=e.getView().getState(e.getSelectionCell());null!=J&&(O=J.style[mxConstants.STYLE_FONTFAMILY]||O,T=J.style[mxConstants.STYLE_FONTSIZE]||T,10<O.length&&(O=O.substring(0,8)+"..."));this.toolbar.setFontName(O);this.toolbar.setFontSize(T)}),e.getSelectionModel().addListener(mxEvent.CHANGE,a),e.getModel().addListener(mxEvent.CHANGE,a));e.addListener(mxEvent.CELLS_ADDED,function(O,T){O=T.getProperty("cells");T=T.getProperty("parent");null!=T&&e.getModel().isLayer(T)&& +!e.isCellVisible(T)&&null!=O&&0<O.length&&e.getModel().setVisible(T,!0)});this.gestureHandler=mxUtils.bind(this,function(O){null!=this.currentMenu&&mxEvent.getSource(O)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler= mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){e.view.validateBackground()})); this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){e.view.validateBackground()}));e.addListener("gridSizeChanged",mxUtils.bind(this,function(){e.isGridEnabled()&&e.view.validateBackground()}));this.editor.resetGraph()}this.init();e.standalone||this.open()};EditorUi.compactUi=!0; EditorUi.parsePng=function(a,b,f){function e(n,u){var m=d;d+=u;return n.substring(m,d)}function g(n){n=e(n,4);return n.charCodeAt(3)+(n.charCodeAt(2)<<8)+(n.charCodeAt(1)<<16)+(n.charCodeAt(0)<<24)}var d=0;if(e(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=f&&f();else if(e(a,4),"IHDR"!=e(a,4))null!=f&&f();else{e(a,17);do{f=g(a);var k=e(a,4);if(null!=b&&b(d-8,k,f))break;value=e(a,f);e(a,4);if("IEND"==k)break}while(f)}};mxUtils.extend(EditorUi,mxEventSource); @@ -2153,9 +2151,9 @@ a.vertices.push(b);var g=f.getCellGeometry(b);if(null!=g&&(0<g.width?null==a.wid !1);b=f.view.getState(b);null!=b&&(a.autoSize=a.autoSize||f.isAutoSizeState(b),a.glass=a.glass&&f.isGlassState(b),a.rounded=a.rounded&&f.isRoundedState(b),a.lineJumps=a.lineJumps&&f.isLineJumpState(b),a.image=a.image&&f.isImageState(b),a.shadow=a.shadow&&f.isShadowState(b),a.fill=a.fill&&f.isFillState(b),a.stroke=a.stroke&&f.isStrokeState(b),d=mxUtils.getValue(b.style,mxConstants.STYLE_SHAPE,null),a.containsImage=a.containsImage||"image"==d,f.mergeStyle(b.style,a.style,e))}; EditorUi.prototype.installShapePicker=function(){var a=this.editor.graph,b=this;a.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(u,m){"mouseDown"==m.getProperty("eventName")&&b.hideShapePicker()}));var f=mxUtils.bind(this,function(){b.hideShapePicker(!0)});a.addListener("wheel",f);a.addListener(mxEvent.ESCAPE,f);a.view.addListener(mxEvent.SCALE,f);a.view.addListener(mxEvent.SCALE_AND_TRANSLATE,f);a.getSelectionModel().addListener(mxEvent.CHANGE,f);var e=a.popupMenuHandler.isMenuShowing; a.popupMenuHandler.isMenuShowing=function(){return e.apply(this,arguments)||null!=b.shapePicker};var g=a.dblClick;a.dblClick=function(u,m){if(this.isEnabled())if(null!=m||null==b.sidebar||mxEvent.isShiftDown(u)||a.isCellLocked(a.getDefaultParent()))g.apply(this,arguments);else{var r=mxUtils.convertPoint(this.container,mxEvent.getClientX(u),mxEvent.getClientY(u));mxEvent.consume(u);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(r.x,r.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset", -f);var d=this.hoverIcons.drag;this.hoverIcons.drag=function(){b.hideShapePicker();d.apply(this,arguments)};var k=this.hoverIcons.execute;this.hoverIcons.execute=function(u,m,r){var x=r.getEvent();this.graph.isCloneEvent(x)||mxEvent.isShiftDown(x)?k.apply(this,arguments):this.graph.connectVertex(u.cell,m,this.graph.defaultEdgeLength,x,null,null,mxUtils.bind(this,function(B,D,F){var J=a.getCompositeParent(u.cell);B=a.getCellGeometry(J);for(r.consume();null!=J&&a.model.isVertex(J)&&null!=B&&B.relative;)cell= -J,J=a.model.getParent(cell),B=a.getCellGeometry(J);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(r.getGraphX(),r.getGraphY(),J,mxUtils.bind(this,function(C){F(C);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(C))}),m)}),30)}),mxUtils.bind(this,function(B){this.graph.selectCellsForConnectVertex(B,x,this)}))};var n=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(u,m){null!=n&&window.clearTimeout(n);n=window.setTimeout(mxUtils.bind(this,function(){var r= -m.getProperty("arrow"),x=m.getProperty("direction"),B=m.getProperty("event");r=r.getBoundingClientRect();var D=mxUtils.getOffset(a.container),F=a.container.scrollLeft+r.x-D.x;D=a.container.scrollTop+r.y-D.y;var J=a.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),C=b.showShapePicker(F,D,J,mxUtils.bind(this,function(O){null!=O&&a.connectVertex(J,x,a.defaultEdgeLength,B,!0,!0,function(R,T,Q){Q(O);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(O))}, +f);var d=this.hoverIcons.drag;this.hoverIcons.drag=function(){b.hideShapePicker();d.apply(this,arguments)};var k=this.hoverIcons.execute;this.hoverIcons.execute=function(u,m,r){var x=r.getEvent();this.graph.isCloneEvent(x)||mxEvent.isShiftDown(x)?k.apply(this,arguments):this.graph.connectVertex(u.cell,m,this.graph.defaultEdgeLength,x,null,null,mxUtils.bind(this,function(B,D,F){var I=a.getCompositeParent(u.cell);B=a.getCellGeometry(I);for(r.consume();null!=I&&a.model.isVertex(I)&&null!=B&&B.relative;)cell= +I,I=a.model.getParent(cell),B=a.getCellGeometry(I);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(r.getGraphX(),r.getGraphY(),I,mxUtils.bind(this,function(C){F(C);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(C))}),m)}),30)}),mxUtils.bind(this,function(B){this.graph.selectCellsForConnectVertex(B,x,this)}))};var n=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(u,m){null!=n&&window.clearTimeout(n);n=window.setTimeout(mxUtils.bind(this,function(){var r= +m.getProperty("arrow"),x=m.getProperty("direction"),B=m.getProperty("event");r=r.getBoundingClientRect();var D=mxUtils.getOffset(a.container),F=a.container.scrollLeft+r.x-D.x;D=a.container.scrollTop+r.y-D.y;var I=a.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),C=b.showShapePicker(F,D,I,mxUtils.bind(this,function(N){null!=N&&a.connectVertex(I,x,a.defaultEdgeLength,B,!0,!0,function(R,S,Q){Q(N);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(N))}, function(R){a.selectCellsForConnectVertex(R)},B,this.hoverIcons)}),x,!0);this.centerShapePicker(C,r,F,D,x);mxUtils.setOpacity(C,30);mxEvent.addListener(C,"mouseenter",function(){mxUtils.setOpacity(C,100)});mxEvent.addListener(C,"mouseleave",function(){b.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(u,m){null!=n&&window.clearTimeout(n)}))}}; EditorUi.prototype.centerShapePicker=function(a,b,f,e,g){if(g==mxConstants.DIRECTION_EAST||g==mxConstants.DIRECTION_WEST)a.style.width="40px";var d=a.getBoundingClientRect();g==mxConstants.DIRECTION_NORTH?(f-=d.width/2-10,e-=d.height+6):g==mxConstants.DIRECTION_SOUTH?(f-=d.width/2-10,e+=b.height+6):g==mxConstants.DIRECTION_WEST?(f-=d.width+6,e-=d.height/2-10):g==mxConstants.DIRECTION_EAST&&(f+=b.width+6,e-=d.height/2-10);a.style.left=f+"px";a.style.top=e+"px"}; EditorUi.prototype.showShapePicker=function(a,b,f,e,g,d){a=this.createShapePicker(a,b,f,e,g,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(f,d),d);null!=a&&(null==this.hoverIcons||d||this.hoverIcons.reset(),d=this.editor.graph,d.popupMenuHandler.hideMenu(),d.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=e,this.shapePicker=a);return a}; @@ -2181,41 +2179,41 @@ EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipb 0),B=0;B<m.length;B++){r.add(x,m[B]);var D=d.view.getState(k[B]);if(null!=D){var F=d.getCellGeometry(m[B]);null!=F&&F.relative&&!r.isEdge(k[B])&&null==u[mxObjectIdentity.get(r.getParent(k[B]))]&&(F.offset=null,F.relative=!1,F.x=D.x/D.view.scale-D.view.translate.x,F.y=D.y/D.view.scale-D.view.translate.y)}}d.updateCustomLinks(d.createCellMapping(n,u),m);mxClipboard.insertCount=1;mxClipboard.setCells(m)}a.updatePasteActionStates();return k};var f=mxClipboard.paste;mxClipboard.paste=function(d){var k= null;d.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):k=f.apply(this,arguments);a.updatePasteActionStates();return k};var e=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){e.apply(this,arguments);a.updatePasteActionStates()};var g=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(d,k){g.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()}; EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600; -EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var G=this.graph.getPageLayout(),M=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+G.x*M.width),this.scale*(this.translate.y+G.y*M.height),this.scale*G.width*M.width, -this.scale*G.height*M.height)};a.getPreferredPageSize=function(G,M,U){G=this.getPageLayout();M=this.getPageSize();return new mxRectangle(0,0,G.width*M.width,G.height*M.height)};var b=null,f=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(G,M,U,ba){if(null!=a.container&&!a.isViewer()){U=null!=U?U:0;ba=null!=ba?ba:0;var la=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),ra=mxUtils.hasScrollbars(a.container),Y=a.view.translate,da=a.view.scale, -pa=mxRectangle.fromRectangle(la);pa.x=pa.x/da-Y.x;pa.y=pa.y/da-Y.y;pa.width/=da;pa.height/=da;Y=a.container.scrollTop;var wa=a.container.scrollLeft,Ka=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Ka+=3;var Ha=a.container.offsetWidth-Ka;Ka=a.container.offsetHeight-Ka;G=G?Math.max(.3,Math.min(M||1,Ha/pa.width)):da;M=(Ha-G*pa.width)/2/G;var ua=0==this.lightboxVerticalDivider?0:(Ka-G*pa.height)/this.lightboxVerticalDivider/G;ra&&(M=Math.max(M,0),ua=Math.max(ua, -0));if(ra||la.width<Ha||la.height<Ka)a.view.scaleAndTranslate(G,Math.floor(M-pa.x),Math.floor(ua-pa.y)),a.container.scrollTop=Y*G/da,a.container.scrollLeft=wa*G/da;else if(0!=U||0!=ba)la=a.view.translate,a.view.setTranslate(Math.floor(la.x+U/da),Math.floor(la.y+ba/da))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var e=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",e);this.destroyFunctions.push(function(){mxEvent.removeListener(window, -"resize",e)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(G){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(G){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var g=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position= +EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var J=this.graph.getPageLayout(),ba=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+J.x*ba.width),this.scale*(this.translate.y+J.y*ba.height),this.scale*J.width*ba.width, +this.scale*J.height*ba.height)};a.getPreferredPageSize=function(J,ba,ha){J=this.getPageLayout();ba=this.getPageSize();return new mxRectangle(0,0,J.width*ba.width,J.height*ba.height)};var b=null,f=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(J,ba,ha,na){if(null!=a.container&&!a.isViewer()){ha=null!=ha?ha:0;na=null!=na?na:0;var W=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),da=mxUtils.hasScrollbars(a.container),sa=a.view.translate,ta= +a.view.scale,Ja=mxRectangle.fromRectangle(W);Ja.x=Ja.x/ta-sa.x;Ja.y=Ja.y/ta-sa.y;Ja.width/=ta;Ja.height/=ta;sa=a.container.scrollTop;var Ha=a.container.scrollLeft,ua=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)ua+=3;var Aa=a.container.offsetWidth-ua;ua=a.container.offsetHeight-ua;J=J?Math.max(.3,Math.min(ba||1,Aa/Ja.width)):ta;ba=(Aa-J*Ja.width)/2/J;var qa=0==this.lightboxVerticalDivider?0:(ua-J*Ja.height)/this.lightboxVerticalDivider/J;da&&(ba=Math.max(ba, +0),qa=Math.max(qa,0));if(da||W.width<Aa||W.height<ua)a.view.scaleAndTranslate(J,Math.floor(ba-Ja.x),Math.floor(qa-Ja.y)),a.container.scrollTop=sa*J/ta,a.container.scrollLeft=Ha*J/ta;else if(0!=ha||0!=na)W=a.view.translate,a.view.setTranslate(Math.floor(W.x+ha/ta),Math.floor(W.y+na/ta))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var e=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",e);this.destroyFunctions.push(function(){mxEvent.removeListener(window, +"resize",e)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(J){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(J){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var g=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position= "fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=a.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style, -"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var d=mxUtils.bind(this,function(){var G=mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=G?parseInt(G["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",d);d();var k=0;d=mxUtils.bind(this,function(G,M,U){k++; -var ba=document.createElement("span");ba.style.paddingLeft="8px";ba.style.paddingRight="8px";ba.style.cursor="pointer";mxEvent.addListener(ba,"click",G);null!=U&&ba.setAttribute("title",U);G=document.createElement("img");G.setAttribute("border","0");G.setAttribute("src",M);G.style.width="36px";G.style.filter="invert(100%)";ba.appendChild(G);this.chromelessToolbar.appendChild(ba);return ba});null!=g.backBtn&&d(mxUtils.bind(this,function(G){window.location.href=g.backBtn.url;mxEvent.consume(G)}),Editor.backImage, -mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var n=d(mxUtils.bind(this,function(G){this.actions.get("previousPage").funct();mxEvent.consume(G)}),Editor.previousImage,mxResources.get("previousPage")),u=document.createElement("div");u.style.fontFamily=Editor.defaultHtmlFont;u.style.display="inline-block";u.style.verticalAlign="top";u.style.fontWeight="bold";u.style.marginTop="8px";u.style.fontSize="14px";u.style.color=mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(u); -var m=d(mxUtils.bind(this,function(G){this.actions.get("nextPage").funct();mxEvent.consume(G)}),Editor.nextImage,mxResources.get("nextPage")),r=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(u.innerText="",mxUtils.write(u,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});n.style.paddingLeft="0px";n.style.paddingRight="4px";m.style.paddingLeft="4px";m.style.paddingRight="0px";var x=mxUtils.bind(this,function(){null!=this.pages&& -1<this.pages.length&&null!=this.currentPage?(m.style.display="",n.style.display="",u.style.display="inline-block"):(m.style.display="none",n.style.display="none",u.style.display="none");r()});this.editor.addListener("resetGraphView",x);this.editor.addListener("pageSelected",r)}d(mxUtils.bind(this,function(G){this.actions.get("zoomOut").funct();mxEvent.consume(G)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(G){this.actions.get("zoomIn").funct(); -mxEvent.consume(G)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(G){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(G)}),Editor.zoomFitImage,mxResources.get("fit"));var B=null,D=null,F=mxUtils.bind(this,function(G){null!=B&&(window.clearTimeout(B),B=null);null!=D&&(window.clearTimeout(D),D=null);B=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar, -0);B=null;D=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";D=null}),600)}),G||200)}),J=mxUtils.bind(this,function(G){null!=B&&(window.clearTimeout(B),B=null);null!=D&&(window.clearTimeout(D),D=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,G||30)});if("1"==urlParams.layers){this.layersDialog=null;var C=d(mxUtils.bind(this,function(G){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog), -this.layersDialog=null;else{this.layersDialog=a.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var M=C.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding= -"4px 2px 4px 2px";this.layersDialog.style.left=M.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));M=mxUtils.getCurrentStyle(this.editor.graph.container); -this.layersDialog.style.zIndex=M.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(G)}),Editor.layersImage,mxResources.get("layers")),O=a.getModel();O.addListener(mxEvent.CHANGE,function(){C.style.display=1<O.getChildCount(O.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(d);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||d(mxUtils.bind(this,function(G){null!= -this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(G)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(x=0;x<this.lightboxToolbarActions.length;x++){var R=this.lightboxToolbarActions[x];R.elem=d(R.fn,R.icon,R.tooltip)}null!=g.refreshBtn&&d(mxUtils.bind(this,function(G){g.refreshBtn.url?window.location.href=g.refreshBtn.url: -window.location.reload();mxEvent.consume(G)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=g.fullscreenBtn&&window.self!==window.top&&d(mxUtils.bind(this,function(G){g.fullscreenBtn.url?a.openLink(g.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(G)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(g.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&d(mxUtils.bind(this, -function(G){"1"==urlParams.close||g.closeBtn?window.close():(this.destroy(),mxEvent.consume(G))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(G){mxEvent.isTouchEvent(G)||(mxEvent.isShiftDown(G)|| -J(30),F())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(G){mxEvent.consume(G)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(G){a.tooltipHandler.resetTimer();a.tooltipHandler.hideTooltip();mxEvent.isShiftDown(G)?F():J(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(G){mxEvent.isShiftDown(G)?F():J(100);mxEvent.consume(G)}));mxEvent.addListener(this.chromelessToolbar, -"mouseleave",mxUtils.bind(this,function(G){mxEvent.isTouchEvent(G)||J(30)}));var T=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(G,M){this.startX=M.getGraphX();this.startY=M.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(G,M){},mouseUp:function(G,M){mxEvent.isTouchEvent(M.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<T&&Math.abs(this.scrollTop-a.container.scrollTop)<T&& -Math.abs(this.startX-M.getGraphX())<T&&Math.abs(this.startY-M.getGraphY())<T&&(0<parseFloat(f.chromelessToolbar.style.opacity||0)?F():J(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var Q=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var G=this.graph.getPagePadding(),M=this.graph.getPageSize();this.translate.x=G.x-(this.x0||0)*M.width;this.translate.y=G.y-(this.y0||0)*M.height}Q.apply(this, -arguments)};if(!a.isViewer()){var aa=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var G=this.getPageLayout(),M=this.getPagePadding(),U=this.getPageSize(),ba=Math.ceil(2*M.x+G.width*U.width),la=Math.ceil(2*M.y+G.height*U.height),ra=a.minimumGraphSize;if(null==ra||ra.width!=ba||ra.height!=la)a.minimumGraphSize=new mxRectangle(0,0,ba,la);ba=M.x-G.x*U.width;M=M.y-G.y*U.height;this.autoTranslate||this.view.translate.x==ba&&this.view.translate.y== -M?aa.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=G.x,this.view.y0=G.y,G=a.view.translate.x,U=a.view.translate.y,a.view.setTranslate(ba,M),a.container.scrollLeft+=Math.round((ba-G)*a.view.scale),a.container.scrollTop+=Math.round((M-U)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var S=a.view.getBackgroundPane(),P=a.view.getDrawPane();a.cumulativeZoomFactor=1;var X=null,ha=null,fa=null,sa=null,K=null,V=function(G){null!= -X&&window.clearTimeout(X);0<=G&&window.setTimeout(function(){if(!a.isMouseDown||sa)X=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),P.style.transformOrigin="",S.style.transformOrigin="",mxClient.IS_SF?(P.style.transform="scale(1)",S.style.transform= -"scale(1)",window.setTimeout(function(){P.style.transform="";S.style.transform=""},0)):(P.style.transform="",S.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var M=new mxPoint(a.container.scrollLeft,a.container.scrollTop),U=mxUtils.getOffset(a.container),ba=a.view.scale,la=0,ra=0;null!=ha&&(la=a.container.offsetWidth/2-ha.x+U.x,ra=a.container.offsetHeight/2-ha.y+U.y);a.zoom(a.cumulativeZoomFactor,null,a.isFastZoomEnabled()?20:null);a.view.scale!= -ba&&(null!=fa&&(la+=M.x-fa.x,ra+=M.y-fa.y),null!=b&&f.chromelessResize(!1,null,la*(a.cumulativeZoomFactor-1),ra*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==la&&0==ra||(a.container.scrollLeft-=la*(a.cumulativeZoomFactor-1),a.container.scrollTop-=ra*(a.cumulativeZoomFactor-1)));null!=K&&P.setAttribute("filter",K);a.cumulativeZoomFactor=1;K=sa=ha=fa=X=null}),null!=G?G:a.isFastZoomEnabled()?f.wheelZoomDelay:f.lazyZoomDelay)},0)};a.lazyZoom=function(G,M,U,ba){ba=null!=ba?ba:this.zoomFactor; -(M=M||!a.scrollbars)&&(ha=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));G?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=ba,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/= -ba,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;a.isFastZoomEnabled()&&(null==K&&""!=P.getAttribute("filter")&&(K=P.getAttribute("filter"),P.removeAttribute("filter")),fa=new mxPoint(a.container.scrollLeft,a.container.scrollTop),G=M||null==ha?a.container.scrollLeft+a.container.clientWidth/2:ha.x+a.container.scrollLeft-a.container.offsetLeft, -ba=M||null==ha?a.container.scrollTop+a.container.clientHeight/2:ha.y+a.container.scrollTop-a.container.offsetTop,P.style.transformOrigin=G+"px "+ba+"px",P.style.transform="scale("+this.cumulativeZoomFactor+")",S.style.transformOrigin=G+"px "+ba+"px",S.style.transform="scale("+this.cumulativeZoomFactor+")",null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(G=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(G.style,"transform-origin",(M||null==ha?a.container.clientWidth/ -2+a.container.scrollLeft-G.offsetLeft+"px":ha.x+a.container.scrollLeft-G.offsetLeft-a.container.offsetLeft+"px")+" "+(M||null==ha?a.container.clientHeight/2+a.container.scrollTop-G.offsetTop+"px":ha.y+a.container.scrollTop-G.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(G.style,"transform","scale("+this.cumulativeZoomFactor+")")),a.view.getDecoratorPane().style.opacity="0",a.view.getOverlayPane().style.opacity="0",null!=f.hoverIcons&&f.hoverIcons.reset());V(a.isFastZoomEnabled()? -U:0)};mxEvent.addGestureListeners(a.container,function(G){null!=X&&window.clearTimeout(X)},null,function(G){1!=a.cumulativeZoomFactor&&V(0)});mxEvent.addListener(a.container,"scroll",function(G){null==X||a.isMouseDown||1==a.cumulativeZoomFactor||V(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(G,M,U,ba,la){a.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&!U&&a.isScrollWheelEvent(G))U=a.view.getTranslate(),ba=40/a.view.scale,mxEvent.isShiftDown(G)? -a.view.setTranslate(U.x+(M?-ba:ba),U.y):a.view.setTranslate(U.x,U.y+(M?ba:-ba));else if(U||a.isZoomWheelEvent(G))for(var ra=mxEvent.getSource(G);null!=ra;){if(ra==a.container)return a.tooltipHandler.hideTooltip(),ha=null!=ba&&null!=la?new mxPoint(ba,la):new mxPoint(mxEvent.getClientX(G),mxEvent.getClientY(G)),sa=U,U=a.zoomFactor,ba=null,G.ctrlKey&&null!=G.deltaY&&40>Math.abs(G.deltaY)&&Math.round(G.deltaY)!=G.deltaY?U=1+Math.abs(G.deltaY)/20*(U-1):null!=G.movementY&&"pointermove"==G.type&&(U=1+Math.max(1, -Math.abs(G.movementY))/20*(U-1),ba=-1),a.lazyZoom(M,null,ba,U),mxEvent.consume(G),!1;ra=ra.parentNode}}),a.container);a.panningHandler.zoomGraph=function(G){a.cumulativeZoomFactor=G.scale;a.lazyZoom(0<G.scale,!0);mxEvent.consume(G)}};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(b){this.actions.get("print").funct();mxEvent.consume(b)}),Editor.printImage,mxResources.get("print"))}; -EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(a){return Graph.createOffscreenGraph(a)};EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)}; +"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var d=mxUtils.bind(this,function(){var J=mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=J?parseInt(J["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",d);d();var k=0;d=mxUtils.bind(this,function(J,ba,ha){k++; +var na=document.createElement("span");na.style.paddingLeft="8px";na.style.paddingRight="8px";na.style.cursor="pointer";mxEvent.addListener(na,"click",J);null!=ha&&na.setAttribute("title",ha);J=document.createElement("img");J.setAttribute("border","0");J.setAttribute("src",ba);J.style.width="36px";J.style.filter="invert(100%)";na.appendChild(J);this.chromelessToolbar.appendChild(na);return na});if(null!=g.backBtn){var n=Graph.sanitizeLink(g.backBtn.url);null!=n&&d(mxUtils.bind(this,function(J){window.location.href= +n;mxEvent.consume(J)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var u=d(mxUtils.bind(this,function(J){this.actions.get("previousPage").funct();mxEvent.consume(J)}),Editor.previousImage,mxResources.get("previousPage")),m=document.createElement("div");m.style.fontFamily=Editor.defaultHtmlFont;m.style.display="inline-block";m.style.verticalAlign="top";m.style.fontWeight="bold";m.style.marginTop="8px";m.style.fontSize="14px";m.style.color=mxClient.IS_IE||mxClient.IS_IE11? +"#000000":"#ffffff";this.chromelessToolbar.appendChild(m);var r=d(mxUtils.bind(this,function(J){this.actions.get("nextPage").funct();mxEvent.consume(J)}),Editor.nextImage,mxResources.get("nextPage")),x=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(m.innerText="",mxUtils.write(m,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});u.style.paddingLeft="0px";u.style.paddingRight="4px";r.style.paddingLeft="4px";r.style.paddingRight= +"0px";var B=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(r.style.display="",u.style.display="",m.style.display="inline-block"):(r.style.display="none",u.style.display="none",m.style.display="none");x()});this.editor.addListener("resetGraphView",B);this.editor.addListener("pageSelected",x)}d(mxUtils.bind(this,function(J){this.actions.get("zoomOut").funct();mxEvent.consume(J)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");d(mxUtils.bind(this, +function(J){this.actions.get("zoomIn").funct();mxEvent.consume(J)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(J){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(J)}),Editor.zoomFitImage,mxResources.get("fit"));var D=null,F=null,I=mxUtils.bind(this,function(J){null!=D&&(window.clearTimeout(D),D=null);null!=F&&(window.clearTimeout(F),F=null);D=window.setTimeout(mxUtils.bind(this, +function(){mxUtils.setOpacity(this.chromelessToolbar,0);D=null;F=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";F=null}),600)}),J||200)}),C=mxUtils.bind(this,function(J){null!=D&&(window.clearTimeout(D),D=null);null!=F&&(window.clearTimeout(F),F=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,J||30)});if("1"==urlParams.layers){this.layersDialog=null;var N=d(mxUtils.bind(this,function(J){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog), +this.layersDialog=null;else{this.layersDialog=a.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var ba=N.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding= +"4px 2px 4px 2px";this.layersDialog.style.left=ba.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));ba=mxUtils.getCurrentStyle(this.editor.graph.container); +this.layersDialog.style.zIndex=ba.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(J)}),Editor.layersImage,mxResources.get("layers")),R=a.getModel();R.addListener(mxEvent.CHANGE,function(){N.style.display=1<R.getChildCount(R.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(d);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||d(mxUtils.bind(this,function(J){null!= +this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(J)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(B=0;B<this.lightboxToolbarActions.length;B++){var S=this.lightboxToolbarActions[B];S.elem=d(S.fn,S.icon,S.tooltip)}if(null!=g.refreshBtn){var Q=null==g.refreshBtn.url?null:Graph.sanitizeLink(g.refreshBtn.url); +d(mxUtils.bind(this,function(J){null!=Q?window.location.href=Q:window.location.reload();mxEvent.consume(J)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=g.fullscreenBtn&&window.self!==window.top&&d(mxUtils.bind(this,function(J){g.fullscreenBtn.url?a.openLink(g.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(J)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(g.closeBtn&&window.self===window.top||a.lightbox&&("1"== +urlParams.close||this.container!=document.body))&&d(mxUtils.bind(this,function(J){"1"==urlParams.close||g.closeBtn?window.close():(this.destroy(),mxEvent.consume(J))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this, +function(J){mxEvent.isTouchEvent(J)||(mxEvent.isShiftDown(J)||C(30),I())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(J){mxEvent.consume(J)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(J){a.tooltipHandler.resetTimer();a.tooltipHandler.hideTooltip();mxEvent.isShiftDown(J)?I():C(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(J){mxEvent.isShiftDown(J)?I():C(100); +mxEvent.consume(J)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(J){mxEvent.isTouchEvent(J)||C(30)}));var aa=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(J,ba){this.startX=ba.getGraphX();this.startY=ba.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(J,ba){},mouseUp:function(J,ba){mxEvent.isTouchEvent(ba.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)< +aa&&Math.abs(this.scrollTop-a.container.scrollTop)<aa&&Math.abs(this.startX-ba.getGraphX())<aa&&Math.abs(this.startY-ba.getGraphY())<aa&&(0<parseFloat(f.chromelessToolbar.style.opacity||0)?I():C(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var U=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var J=this.graph.getPagePadding(),ba=this.graph.getPageSize();this.translate.x=J.x-(this.x0|| +0)*ba.width;this.translate.y=J.y-(this.y0||0)*ba.height}U.apply(this,arguments)};if(!a.isViewer()){var P=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var J=this.getPageLayout(),ba=this.getPagePadding(),ha=this.getPageSize(),na=Math.ceil(2*ba.x+J.width*ha.width),W=Math.ceil(2*ba.y+J.height*ha.height),da=a.minimumGraphSize;if(null==da||da.width!=na||da.height!=W)a.minimumGraphSize=new mxRectangle(0,0,na,W);na=ba.x-J.x*ha.width;ba=ba.y-J.y* +ha.height;this.autoTranslate||this.view.translate.x==na&&this.view.translate.y==ba?P.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=J.x,this.view.y0=J.y,J=a.view.translate.x,ha=a.view.translate.y,a.view.setTranslate(na,ba),a.container.scrollLeft+=Math.round((na-J)*a.view.scale),a.container.scrollTop+=Math.round((ba-ha)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var Y=a.view.getBackgroundPane(),ja=a.view.getDrawPane(); +a.cumulativeZoomFactor=1;var fa=null,ra=null,K=null,V=null,O=null,T=function(J){null!=fa&&window.clearTimeout(fa);0<=J&&window.setTimeout(function(){if(!a.isMouseDown||V)fa=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),ja.style.transformOrigin= +"",Y.style.transformOrigin="",mxClient.IS_SF?(ja.style.transform="scale(1)",Y.style.transform="scale(1)",window.setTimeout(function(){ja.style.transform="";Y.style.transform=""},0)):(ja.style.transform="",Y.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var ba=new mxPoint(a.container.scrollLeft,a.container.scrollTop),ha=mxUtils.getOffset(a.container),na=a.view.scale,W=0,da=0;null!=ra&&(W=a.container.offsetWidth/2-ra.x+ha.x,da=a.container.offsetHeight/ +2-ra.y+ha.y);a.zoom(a.cumulativeZoomFactor,null,a.isFastZoomEnabled()?20:null);a.view.scale!=na&&(null!=K&&(W+=ba.x-K.x,da+=ba.y-K.y),null!=b&&f.chromelessResize(!1,null,W*(a.cumulativeZoomFactor-1),da*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==W&&0==da||(a.container.scrollLeft-=W*(a.cumulativeZoomFactor-1),a.container.scrollTop-=da*(a.cumulativeZoomFactor-1)));null!=O&&ja.setAttribute("filter",O);a.cumulativeZoomFactor=1;O=V=ra=K=fa=null}),null!=J?J:a.isFastZoomEnabled()? +f.wheelZoomDelay:f.lazyZoomDelay)},0)};a.lazyZoom=function(J,ba,ha,na){na=null!=na?na:this.zoomFactor;(ba=ba||!a.scrollbars)&&(ra=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));J?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=na,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale* +this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=na,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;a.isFastZoomEnabled()&&(null==O&&""!=ja.getAttribute("filter")&&(O=ja.getAttribute("filter"),ja.removeAttribute("filter")),K=new mxPoint(a.container.scrollLeft,a.container.scrollTop), +J=ba||null==ra?a.container.scrollLeft+a.container.clientWidth/2:ra.x+a.container.scrollLeft-a.container.offsetLeft,na=ba||null==ra?a.container.scrollTop+a.container.clientHeight/2:ra.y+a.container.scrollTop-a.container.offsetTop,ja.style.transformOrigin=J+"px "+na+"px",ja.style.transform="scale("+this.cumulativeZoomFactor+")",Y.style.transformOrigin=J+"px "+na+"px",Y.style.transform="scale("+this.cumulativeZoomFactor+")",null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(J= +a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(J.style,"transform-origin",(ba||null==ra?a.container.clientWidth/2+a.container.scrollLeft-J.offsetLeft+"px":ra.x+a.container.scrollLeft-J.offsetLeft-a.container.offsetLeft+"px")+" "+(ba||null==ra?a.container.clientHeight/2+a.container.scrollTop-J.offsetTop+"px":ra.y+a.container.scrollTop-J.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(J.style,"transform","scale("+this.cumulativeZoomFactor+")")),a.view.getDecoratorPane().style.opacity= +"0",a.view.getOverlayPane().style.opacity="0",null!=f.hoverIcons&&f.hoverIcons.reset());T(a.isFastZoomEnabled()?ha:0)};mxEvent.addGestureListeners(a.container,function(J){null!=fa&&window.clearTimeout(fa)},null,function(J){1!=a.cumulativeZoomFactor&&T(0)});mxEvent.addListener(a.container,"scroll",function(J){null==fa||a.isMouseDown||1==a.cumulativeZoomFactor||T(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(J,ba,ha,na,W){a.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs|| +0==this.dialogs.length)if(!a.scrollbars&&!ha&&a.isScrollWheelEvent(J))ha=a.view.getTranslate(),na=40/a.view.scale,mxEvent.isShiftDown(J)?a.view.setTranslate(ha.x+(ba?-na:na),ha.y):a.view.setTranslate(ha.x,ha.y+(ba?na:-na));else if(ha||a.isZoomWheelEvent(J))for(var da=mxEvent.getSource(J);null!=da;){if(da==a.container)return a.tooltipHandler.hideTooltip(),ra=null!=na&&null!=W?new mxPoint(na,W):new mxPoint(mxEvent.getClientX(J),mxEvent.getClientY(J)),V=ha,ha=a.zoomFactor,na=null,J.ctrlKey&&null!=J.deltaY&& +40>Math.abs(J.deltaY)&&Math.round(J.deltaY)!=J.deltaY?ha=1+Math.abs(J.deltaY)/20*(ha-1):null!=J.movementY&&"pointermove"==J.type&&(ha=1+Math.max(1,Math.abs(J.movementY))/20*(ha-1),na=-1),a.lazyZoom(ba,null,na,ha),mxEvent.consume(J),!1;da=da.parentNode}}),a.container);a.panningHandler.zoomGraph=function(J){a.cumulativeZoomFactor=J.scale;a.lazyZoom(0<J.scale,!0);mxEvent.consume(J)}}; +EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(b){this.actions.get("print").funct();mxEvent.consume(b)}),Editor.printImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(a){return Graph.createOffscreenGraph(a)};EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)}; EditorUi.prototype.toggleFormatPanel=function(a){a=null!=a?a:0==this.formatWidth;null!=this.format&&(this.formatWidth=a?240:0,this.formatContainer.style.display=a?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))}; EditorUi.prototype.lightboxFit=function(a){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var b=urlParams.border,f=60;null!=b&&(f=parseInt(b));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(f,null,null,null,null,null,a);this.editor.graph.maxFitScale=null}};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.isSelectionAllowed=function(a){return"SELECT"==mxEvent.getSource(a).nodeName||"INPUT"==mxEvent.getSource(a).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(a))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")}; @@ -2292,13 +2290,13 @@ EditorUi.prototype.showDataDialog=function(a){null!=a&&(a=new EditDataDialog(thi EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bind(this,function(e){e=new ChangePageSetup(this,null,e);e.ignoreColor=!0;this.editor.graph.model.execute(e)});var f=mxUtils.prompt(mxResources.get("backgroundImage"),null!=b?b.src:"");null!=f&&0<f.length?(b=new Image,b.onload=function(){a(new mxImage(f,b.width,b.height),!1)},b.onerror=function(){a(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},b.src=f):a(null)}; EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroundImage(a);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(a,b,f){mxUtils.confirm(a)?null!=b&&b():null!=f&&f()};EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){b.update(!1)});return b}; EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize",66:"copyData",69:"pasteData"}; -EditorUi.prototype.createKeyHandler=function(a){function b(x,B,D){if(!e.isSelectionEmpty()&&e.isEnabled()){B=null!=B?B:1;var F=e.getCompositeParents(e.getSelectionCells()),J=0<F.length?F[0]:null;if(null!=J)if(D){e.getModel().beginUpdate();try{for(J=0;J<F.length;J++)if(e.getModel().isVertex(F[J])&&e.isCellResizable(F[J])){var C=e.getCellGeometry(F[J]);null!=C&&(C=C.clone(),37==x?C.width=Math.max(0,C.width-B):38==x?C.height=Math.max(0,C.height-B):39==x?C.width+=B:40==x&&(C.height+=B),e.getModel().setGeometry(F[J], -C))}}finally{e.getModel().endUpdate()}}else{C=e.model.getParent(J);var O=e.getView().scale;D=null;1==e.getSelectionCount()&&e.model.isVertex(J)&&null!=e.layoutManager&&!e.isCellLocked(J)&&(D=e.layoutManager.getLayout(C));if(null!=D&&D.constructor==mxStackLayout)B=C.getIndex(J),37==x||38==x?e.model.add(C,J,Math.max(0,B-1)):(39==x||40==x)&&e.model.add(C,J,Math.min(e.model.getChildCount(C),B+1));else{var R=e.graphHandler;null!=R&&(null==R.first&&R.start(J,0,0,F),null!=R.first&&(J=F=0,37==x?F=-B:38== -x?J=-B:39==x?F=B:40==x&&(J=B),R.currentDx+=F*O,R.currentDy+=J*O,R.checkPreview(),R.updatePreview()),null!=k&&window.clearTimeout(k),k=window.setTimeout(function(){if(null!=R.first){var T=R.roundLength(R.currentDx/O),Q=R.roundLength(R.currentDy/O);R.moveCells(R.cells,T,Q);R.reset()}},400))}}}}var f=this,e=this.editor.graph,g=new mxKeyHandler(e),d=g.isEventIgnored;g.isEventIgnored=function(x){return!(mxEvent.isShiftDown(x)&&9==x.keyCode)&&(!this.isControlDown(x)||mxEvent.isShiftDown(x)||90!=x.keyCode&& +EditorUi.prototype.createKeyHandler=function(a){function b(x,B,D){if(!e.isSelectionEmpty()&&e.isEnabled()){B=null!=B?B:1;var F=e.getCompositeParents(e.getSelectionCells()),I=0<F.length?F[0]:null;if(null!=I)if(D){e.getModel().beginUpdate();try{for(I=0;I<F.length;I++)if(e.getModel().isVertex(F[I])&&e.isCellResizable(F[I])){var C=e.getCellGeometry(F[I]);null!=C&&(C=C.clone(),37==x?C.width=Math.max(0,C.width-B):38==x?C.height=Math.max(0,C.height-B):39==x?C.width+=B:40==x&&(C.height+=B),e.getModel().setGeometry(F[I], +C))}}finally{e.getModel().endUpdate()}}else{C=e.model.getParent(I);var N=e.getView().scale;D=null;1==e.getSelectionCount()&&e.model.isVertex(I)&&null!=e.layoutManager&&!e.isCellLocked(I)&&(D=e.layoutManager.getLayout(C));if(null!=D&&D.constructor==mxStackLayout)B=C.getIndex(I),37==x||38==x?e.model.add(C,I,Math.max(0,B-1)):(39==x||40==x)&&e.model.add(C,I,Math.min(e.model.getChildCount(C),B+1));else{var R=e.graphHandler;null!=R&&(null==R.first&&R.start(I,0,0,F),null!=R.first&&(I=F=0,37==x?F=-B:38== +x?I=-B:39==x?F=B:40==x&&(I=B),R.currentDx+=F*N,R.currentDy+=I*N,R.checkPreview(),R.updatePreview()),null!=k&&window.clearTimeout(k),k=window.setTimeout(function(){if(null!=R.first){var S=R.roundLength(R.currentDx/N),Q=R.roundLength(R.currentDy/N);R.moveCells(R.cells,S,Q);R.reset()}},400))}}}}var f=this,e=this.editor.graph,g=new mxKeyHandler(e),d=g.isEventIgnored;g.isEventIgnored=function(x){return!(mxEvent.isShiftDown(x)&&9==x.keyCode)&&(!this.isControlDown(x)||mxEvent.isShiftDown(x)||90!=x.keyCode&& 89!=x.keyCode&&188!=x.keyCode&&190!=x.keyCode&&85!=x.keyCode)&&(66!=x.keyCode&&73!=x.keyCode||!this.isControlDown(x)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&d.apply(this,arguments)};g.isEnabledForEvent=function(x){return!mxEvent.isConsumed(x)&&this.isGraphEvent(x)&&this.isEnabled()&&(null==f.dialogs||0==f.dialogs.length)};g.isControlDown=function(x){return mxEvent.isControlDown(x)||mxClient.IS_MAC&&x.metaKey};var k=null,n={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH, 39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},u=g.getFunction;mxKeyHandler.prototype.getFunction=function(x){if(e.isEnabled()){if(mxEvent.isShiftDown(x)&&mxEvent.isAltDown(x)){var B=f.actions.get(f.altShiftActions[x.keyCode]);if(null!=B)return B.funct}if(null!=n[x.keyCode]&&!e.isSelectionEmpty())if(!this.isControlDown(x)&&mxEvent.isShiftDown(x)&&mxEvent.isAltDown(x)){if(e.model.isVertex(e.getSelectionCell()))return function(){var D=e.connectVertex(e.getSelectionCell(),n[x.keyCode], e.defaultEdgeLength,x,!0);null!=D&&0<D.length&&(1==D.length&&e.model.isEdge(D[0])?e.setSelectionCell(e.model.getTerminal(D[0],!1)):e.setSelectionCell(D[D.length-1]),e.scrollCellToVisible(e.getSelectionCell()),null!=f.hoverIcons&&f.hoverIcons.update(e.view.getState(e.getSelectionCell())))}}else return this.isControlDown(x)?function(){b(x.keyCode,mxEvent.isShiftDown(x)?e.gridSize:null,!0)}:function(){b(x.keyCode,mxEvent.isShiftDown(x)?e.gridSize:null)}}return u.apply(this,arguments)};g.bindAction=mxUtils.bind(this, -function(x,B,D,F){var J=this.actions.get(D);null!=J&&(D=function(){J.isEnabled()&&J.funct.apply(this,arguments)},B?F?g.bindControlShiftKey(x,D):g.bindControlKey(x,D):F?g.bindShiftKey(x,D):g.bindKey(x,D))});var m=this,r=g.escape;g.escape=function(x){r.apply(this,arguments)};g.enter=function(){};g.bindControlShiftKey(36,function(){e.exitGroup()});g.bindControlShiftKey(35,function(){e.enterGroup()});g.bindShiftKey(36,function(){e.home()});g.bindKey(35,function(){e.refresh()});g.bindAction(107,!0,"zoomIn"); +function(x,B,D,F){var I=this.actions.get(D);null!=I&&(D=function(){I.isEnabled()&&I.funct.apply(this,arguments)},B?F?g.bindControlShiftKey(x,D):g.bindControlKey(x,D):F?g.bindShiftKey(x,D):g.bindKey(x,D))});var m=this,r=g.escape;g.escape=function(x){r.apply(this,arguments)};g.enter=function(){};g.bindControlShiftKey(36,function(){e.exitGroup()});g.bindControlShiftKey(35,function(){e.enterGroup()});g.bindShiftKey(36,function(){e.home()});g.bindKey(35,function(){e.refresh()});g.bindAction(107,!0,"zoomIn"); g.bindAction(109,!0,"zoomOut");g.bindAction(80,!0,"print");g.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)g.bindControlKey(36,function(){e.isEnabled()&&e.foldCells(!0)}),g.bindControlKey(35,function(){e.isEnabled()&&e.foldCells(!1)}),g.bindControlKey(13,function(){m.ctrlEnter()}),g.bindAction(8,!1,"delete"),g.bindAction(8,!0,"deleteAll"),g.bindAction(8,!1,"deleteLabels",!0),g.bindAction(46,!1,"delete"),g.bindAction(46,!0,"deleteAll"),g.bindAction(46,!1,"deleteLabels", !0),g.bindAction(36,!1,"resetView"),g.bindAction(72,!0,"fitWindow",!0),g.bindAction(74,!0,"fitPage"),g.bindAction(74,!0,"fitTwoPages",!0),g.bindAction(48,!0,"customZoom"),g.bindAction(82,!0,"turn"),g.bindAction(82,!0,"clearDefaultStyle",!0),g.bindAction(83,!0,"save"),g.bindAction(83,!0,"saveAs",!0),g.bindAction(65,!0,"selectAll"),g.bindAction(65,!0,"selectNone",!0),g.bindAction(73,!0,"selectVertices",!0),g.bindAction(69,!0,"selectEdges",!0),g.bindAction(69,!0,"editStyle"),g.bindAction(66,!0,"bold"), g.bindAction(66,!0,"toBack",!0),g.bindAction(70,!0,"toFront",!0),g.bindAction(68,!0,"duplicate"),g.bindAction(68,!0,"setAsDefaultStyle",!0),g.bindAction(90,!0,"undo"),g.bindAction(89,!0,"autosize",!0),g.bindAction(88,!0,"cut"),g.bindAction(67,!0,"copy"),g.bindAction(86,!0,"paste"),g.bindAction(71,!0,"group"),g.bindAction(77,!0,"editData"),g.bindAction(71,!0,"grid",!0),g.bindAction(73,!0,"italic"),g.bindAction(76,!0,"lockUnlock"),g.bindAction(76,!0,"layers",!0),g.bindAction(80,!0,"formatPanel",!0), @@ -2341,11 +2339,11 @@ Sidebar.prototype.searchEntries=function(a,b,f,e,g){if(null!=this.taglist&&null! null,d)};Sidebar.prototype.filterTags=function(a){if(null!=a){a=a.split(" ");for(var b=[],f={},e=0;e<a.length;e++)null==f[a[e]]&&(f[a[e]]="1",b.push(a[e]));return b.join(" ")}return null};Sidebar.prototype.cloneCell=function(a,b){a=a.clone();null!=b&&(a.value=b);return a};Sidebar.prototype.showPopupMenuForEntry=function(a,b,f){}; Sidebar.prototype.addSearchPalette=function(a){var b=document.createElement("div");b.style.visibility="hidden";this.container.appendChild(b);var f=document.createElement("div");f.className="geSidebar";f.style.boxSizing="border-box";f.style.overflow="hidden";f.style.width="100%";f.style.padding="8px";f.style.paddingTop="14px";f.style.paddingBottom="0px";a||(f.style.display="none");var e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.paddingBottom="8px"; e.style.cursor="default";var g=document.createElement("input");g.setAttribute("placeholder",mxResources.get("searchShapes"));g.setAttribute("type","text");g.style.fontSize="12px";g.style.overflow="hidden";g.style.boxSizing="border-box";g.style.border="solid 1px #d5d5d5";g.style.borderRadius="4px";g.style.width="100%";g.style.outline="none";g.style.padding="6px";g.style.paddingRight="20px";e.appendChild(g);var d=document.createElement("img");d.setAttribute("src",Sidebar.prototype.searchImage);d.setAttribute("title", -mxResources.get("search"));d.style.position="relative";d.style.left="-18px";d.style.top="1px";d.style.background="url('"+this.editorUi.editor.transparentImage+"')";e.appendChild(d);f.appendChild(e);var k=document.createElement("center"),n=mxUtils.button(mxResources.get("moreResults"),function(){J()});n.style.display="none";n.style.lineHeight="normal";n.style.fontSize="12px";n.style.padding="6px 12px 6px 12px";n.style.marginTop="4px";n.style.marginBottom="8px";k.style.paddingTop="4px";k.style.paddingBottom= -"4px";k.appendChild(n);f.appendChild(k);var u="",m=!1,r=!1,x=0,B={},D=12,F=mxUtils.bind(this,function(){m=!1;this.currentSearch=null;for(var C=f.firstChild;null!=C;){var O=C.nextSibling;C!=e&&C!=k&&C.parentNode.removeChild(C);C=O}});mxEvent.addListener(d,"click",function(){d.getAttribute("src")==Dialog.prototype.closeImage&&(d.setAttribute("src",Sidebar.prototype.searchImage),d.setAttribute("title",mxResources.get("search")),n.style.display="none",u=g.value="",F());g.focus()});var J=mxUtils.bind(this, -function(){D=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=g.value){if(null!=k.parentNode&&(u!=g.value&&(F(),u=g.value,B={},r=!1,x=0),!m&&!r)){n.setAttribute("disabled","true");n.style.display="";n.style.cursor="wait";n.innerHTML=mxResources.get("loading")+"...";m=!0;var C={};this.currentSearch=C;this.searchEntries(u,D,x,mxUtils.bind(this,function(O,R,T,Q){if(this.currentSearch==C){O=null!=O?O:[];m=!1;x++;this.insertSearchHint(f,u,D,x,O,R,T,Q); -0==O.length&&1==x&&(u="");null!=k.parentNode&&k.parentNode.removeChild(k);for(R=0;R<O.length;R++)mxUtils.bind(this,function(aa){try{var S=aa();null==B[S.innerHTML]?(B[S.innerHTML]=null!=aa.parentLibraries?aa.parentLibraries.slice():[],f.appendChild(S)):null!=aa.parentLibraries&&(B[S.innerHTML]=B[S.innerHTML].concat(aa.parentLibraries));mxEvent.addGestureListeners(S,null,null,mxUtils.bind(this,function(P){var X=B[S.innerHTML];mxEvent.isPopupTrigger(P)&&this.showPopupMenuForEntry(S,X,P)}));mxEvent.disableContextMenu(S)}catch(P){}})(O[R]); -T?(n.removeAttribute("disabled"),n.innerHTML=mxResources.get("moreResults")):(n.innerHTML=mxResources.get("reset"),n.style.display="none",r=!0);n.style.cursor="";f.appendChild(k)}}),mxUtils.bind(this,function(){n.style.cursor=""}))}}else F(),u=g.value="",B={},n.style.display="none",r=!1,g.focus()});this.searchShapes=function(C){g.value=C;J()};mxEvent.addListener(g,"keydown",mxUtils.bind(this,function(C){13==C.keyCode&&(J(),mxEvent.consume(C))}));mxEvent.addListener(g,"keyup",mxUtils.bind(this,function(C){""== +mxResources.get("search"));d.style.position="relative";d.style.left="-18px";d.style.top="1px";d.style.background="url('"+this.editorUi.editor.transparentImage+"')";e.appendChild(d);f.appendChild(e);var k=document.createElement("center"),n=mxUtils.button(mxResources.get("moreResults"),function(){I()});n.style.display="none";n.style.lineHeight="normal";n.style.fontSize="12px";n.style.padding="6px 12px 6px 12px";n.style.marginTop="4px";n.style.marginBottom="8px";k.style.paddingTop="4px";k.style.paddingBottom= +"4px";k.appendChild(n);f.appendChild(k);var u="",m=!1,r=!1,x=0,B={},D=12,F=mxUtils.bind(this,function(){m=!1;this.currentSearch=null;for(var C=f.firstChild;null!=C;){var N=C.nextSibling;C!=e&&C!=k&&C.parentNode.removeChild(C);C=N}});mxEvent.addListener(d,"click",function(){d.getAttribute("src")==Dialog.prototype.closeImage&&(d.setAttribute("src",Sidebar.prototype.searchImage),d.setAttribute("title",mxResources.get("search")),n.style.display="none",u=g.value="",F());g.focus()});var I=mxUtils.bind(this, +function(){D=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=g.value){if(null!=k.parentNode&&(u!=g.value&&(F(),u=g.value,B={},r=!1,x=0),!m&&!r)){n.setAttribute("disabled","true");n.style.display="";n.style.cursor="wait";n.innerHTML=mxResources.get("loading")+"...";m=!0;var C={};this.currentSearch=C;this.searchEntries(u,D,x,mxUtils.bind(this,function(N,R,S,Q){if(this.currentSearch==C){N=null!=N?N:[];m=!1;x++;this.insertSearchHint(f,u,D,x,N,R,S,Q); +0==N.length&&1==x&&(u="");null!=k.parentNode&&k.parentNode.removeChild(k);for(R=0;R<N.length;R++)mxUtils.bind(this,function(aa){try{var U=aa();null==B[U.innerHTML]?(B[U.innerHTML]=null!=aa.parentLibraries?aa.parentLibraries.slice():[],f.appendChild(U)):null!=aa.parentLibraries&&(B[U.innerHTML]=B[U.innerHTML].concat(aa.parentLibraries));mxEvent.addGestureListeners(U,null,null,mxUtils.bind(this,function(P){var Y=B[U.innerHTML];mxEvent.isPopupTrigger(P)&&this.showPopupMenuForEntry(U,Y,P)}));mxEvent.disableContextMenu(U)}catch(P){}})(N[R]); +S?(n.removeAttribute("disabled"),n.innerHTML=mxResources.get("moreResults")):(n.innerHTML=mxResources.get("reset"),n.style.display="none",r=!0);n.style.cursor="";f.appendChild(k)}}),mxUtils.bind(this,function(){n.style.cursor=""}))}}else F(),u=g.value="",B={},n.style.display="none",r=!1,g.focus()});this.searchShapes=function(C){g.value=C;I()};mxEvent.addListener(g,"keydown",mxUtils.bind(this,function(C){13==C.keyCode&&(I(),mxEvent.consume(C))}));mxEvent.addListener(g,"keyup",mxUtils.bind(this,function(C){""== g.value?(d.setAttribute("src",Sidebar.prototype.searchImage),d.setAttribute("title",mxResources.get("search"))):(d.setAttribute("src",Dialog.prototype.closeImage),d.setAttribute("title",mxResources.get("reset")));""==g.value?(r=!0,n.style.display="none"):g.value!=u?(n.style.display="none",r=!1):m||(n.style.display=r?"none":"")}));mxEvent.addListener(g,"mousedown",function(C){C.stopPropagation&&C.stopPropagation();C.cancelBubble=!0});mxEvent.addListener(g,"selectstart",function(C){C.stopPropagation&& C.stopPropagation();C.cancelBubble=!0});a=document.createElement("div");a.appendChild(f);this.container.appendChild(a);this.palettes.search=[b,a]}; Sidebar.prototype.insertSearchHint=function(a,b,f,e,g,d,k,n){0==g.length&&1==e&&(f=document.createElement("div"),f.className="geTitle",f.style.cssText="background-color:transparent;border-color:transparent;color:gray;padding:6px 0px 0px 0px !important;margin:4px 8px 4px 8px;text-align:center;cursor:default !important",mxUtils.write(f,mxResources.get("noResultsFor",[b])),a.appendChild(f))}; @@ -2468,12 +2466,12 @@ Sidebar.prototype.updateShapes=function(a,b){var f=this.editorUi.editor.graph,e= 0;n<b.length;n++){var u=b[n];if(f.getModel().isVertex(u)==f.getModel().isVertex(a)||f.getModel().isEdge(u)==f.getModel().isEdge(a)){var m=f.getCellStyle(b[n],!1);f.getModel().setStyle(u,d);if("1"==mxUtils.getValue(m,"composite","0"))for(var r=f.model.getChildCount(u);0<=r;r--)f.model.remove(f.model.getChildAt(u,r));"umlLifeline"==m[mxConstants.STYLE_SHAPE]&&"umlLifeline"!=e[mxConstants.STYLE_SHAPE]&&(f.setCellStyles(mxConstants.STYLE_SHAPE,"umlLifeline",[u]),f.setCellStyles("participant",e[mxConstants.STYLE_SHAPE], [u]));for(r=0;r<k.length;r++){var x=m[k[r]];null!=x&&f.setCellStyles(k[r],x,[u])}g.push(u)}}}finally{f.model.endUpdate()}return g}; Sidebar.prototype.createDropHandler=function(a,b,f,e){f=null!=f?f:!0;return mxUtils.bind(this,function(g,d,k,n,u,m){for(m=m?null:mxEvent.isTouchEvent(d)||mxEvent.isPenEvent(d)?document.elementFromPoint(mxEvent.getClientX(d),mxEvent.getClientY(d)):mxEvent.getSource(d);null!=m&&m!=this.container;)m=m.parentNode;if(null==m&&g.isEnabled()){a=g.getImportableCells(a);if(0<a.length){g.stopEditing();m=null==k||mxEvent.isAltDown(d)?!1:g.isValidDropTarget(k,a,d);var r=null;null==k||m||(k=null);if(!g.isCellLocked(k|| -g.getDefaultParent())){g.model.beginUpdate();try{n=Math.round(n);u=Math.round(u);if(b&&g.isSplitTarget(k,a,d)){var x=g.view.scale,B=g.view.translate,D=(n+B.x)*x,F=(u+B.y)*x,J=g.cloneCells(a);g.splitEdge(k,J,null,n-e.width/2,u-e.height/2,D,F);r=J}else 0<a.length&&(r=g.importCells(a,n,u,k));if(null!=g.layoutManager){var C=g.layoutManager.getLayout(k);if(null!=C)for(x=g.view.scale,B=g.view.translate,D=(n+B.x)*x,F=(u+B.y)*x,k=0;k<r.length;k++)C.moveCell(r[k],D,F)}!f||null!=d&&mxEvent.isShiftDown(d)|| -g.fireEvent(new mxEventObject("cellsInserted","cells",r))}catch(O){this.editorUi.handleError(O)}finally{g.model.endUpdate()}null!=r&&0<r.length&&(g.scrollCellToVisible(r[0]),g.setSelectionCells(r));g.editAfterInsert&&null!=d&&mxEvent.isMouseEvent(d)&&null!=r&&1==r.length&&window.setTimeout(function(){g.startEditing(r[0])},0)}}mxEvent.consume(d)}})}; +g.getDefaultParent())){g.model.beginUpdate();try{n=Math.round(n);u=Math.round(u);if(b&&g.isSplitTarget(k,a,d)){var x=g.view.scale,B=g.view.translate,D=(n+B.x)*x,F=(u+B.y)*x,I=g.cloneCells(a);g.splitEdge(k,I,null,n-e.width/2,u-e.height/2,D,F);r=I}else 0<a.length&&(r=g.importCells(a,n,u,k));if(null!=g.layoutManager){var C=g.layoutManager.getLayout(k);if(null!=C)for(x=g.view.scale,B=g.view.translate,D=(n+B.x)*x,F=(u+B.y)*x,k=0;k<r.length;k++)C.moveCell(r[k],D,F)}!f||null!=d&&mxEvent.isShiftDown(d)|| +g.fireEvent(new mxEventObject("cellsInserted","cells",r))}catch(N){this.editorUi.handleError(N)}finally{g.model.endUpdate()}null!=r&&0<r.length&&(g.scrollCellToVisible(r[0]),g.setSelectionCells(r));g.editAfterInsert&&null!=d&&mxEvent.isMouseEvent(d)&&null!=r&&1==r.length&&window.setTimeout(function(){g.startEditing(r[0])},0)}}mxEvent.consume(d)}})}; Sidebar.prototype.createDragPreview=function(a,b){var f=document.createElement("div");f.className="geDragPreview";f.style.width=a+"px";f.style.height=b+"px";return f}; -Sidebar.prototype.dropAndConnect=function(a,b,f,e,g){var d=this.getDropAndConnectGeometry(a,b[e],f,b),k=[];if(null!=d){var n=this.editorUi.editor.graph,u=null;n.model.beginUpdate();try{var m=n.getCellGeometry(a),r=n.getCellGeometry(b[e]),x=n.model.getParent(a),B=!0;if(null!=n.layoutManager){var D=n.layoutManager.getLayout(x);null!=D&&D.constructor==mxStackLayout&&(B=!1)}k=n.model.isEdge(a)?null:n.view.getState(x);var F=D=0;if(null!=k){var J=k.origin;D=J.x;F=J.y;var C=d.getTerminalPoint(!1);null!= -C&&(C.x+=J.x,C.y+=J.y)}var O=!n.isTableRow(a)&&!n.isTableCell(a)&&(n.model.isEdge(a)||null!=m&&!m.relative&&B),R=n.getCellAt((d.x+D+n.view.translate.x)*n.view.scale,(d.y+F+n.view.translate.y)*n.view.scale,null,null,null,function(aa,S,P){return!n.isContainer(aa.cell)});if(null!=R&&R!=x)k=n.view.getState(R),null!=k&&(J=k.origin,x=R,O=!0,n.model.isEdge(a)||(d.x-=J.x-D,d.y-=J.y-F));else if(!B||n.isTableRow(a)||n.isTableCell(a))d.x+=D,d.y+=F;D=r.x;F=r.y;n.model.isEdge(b[e])&&(F=D=0);k=b=n.importCells(b, -d.x-(O?D:0),d.y-(O?F:0),O?x:null);if(n.model.isEdge(a))n.model.setTerminal(a,b[e],f==mxConstants.DIRECTION_NORTH);else if(n.model.isEdge(b[e])){n.model.setTerminal(b[e],a,!0);var T=n.getCellGeometry(b[e]);T.points=null;if(null!=T.getTerminalPoint(!1))T.setTerminalPoint(d.getTerminalPoint(!1),!1);else if(O&&n.model.isVertex(x)){var Q=n.view.getState(x);J=Q.cell!=n.view.currentRoot?Q.origin:new mxPoint(0,0);n.cellsMoved(b,J.x,J.y,null,null,!0)}}else r=n.getCellGeometry(b[e]),D=d.x-Math.round(r.x),F= +Sidebar.prototype.dropAndConnect=function(a,b,f,e,g){var d=this.getDropAndConnectGeometry(a,b[e],f,b),k=[];if(null!=d){var n=this.editorUi.editor.graph,u=null;n.model.beginUpdate();try{var m=n.getCellGeometry(a),r=n.getCellGeometry(b[e]),x=n.model.getParent(a),B=!0;if(null!=n.layoutManager){var D=n.layoutManager.getLayout(x);null!=D&&D.constructor==mxStackLayout&&(B=!1)}k=n.model.isEdge(a)?null:n.view.getState(x);var F=D=0;if(null!=k){var I=k.origin;D=I.x;F=I.y;var C=d.getTerminalPoint(!1);null!= +C&&(C.x+=I.x,C.y+=I.y)}var N=!n.isTableRow(a)&&!n.isTableCell(a)&&(n.model.isEdge(a)||null!=m&&!m.relative&&B),R=n.getCellAt((d.x+D+n.view.translate.x)*n.view.scale,(d.y+F+n.view.translate.y)*n.view.scale,null,null,null,function(aa,U,P){return!n.isContainer(aa.cell)});if(null!=R&&R!=x)k=n.view.getState(R),null!=k&&(I=k.origin,x=R,N=!0,n.model.isEdge(a)||(d.x-=I.x-D,d.y-=I.y-F));else if(!B||n.isTableRow(a)||n.isTableCell(a))d.x+=D,d.y+=F;D=r.x;F=r.y;n.model.isEdge(b[e])&&(F=D=0);k=b=n.importCells(b, +d.x-(N?D:0),d.y-(N?F:0),N?x:null);if(n.model.isEdge(a))n.model.setTerminal(a,b[e],f==mxConstants.DIRECTION_NORTH);else if(n.model.isEdge(b[e])){n.model.setTerminal(b[e],a,!0);var S=n.getCellGeometry(b[e]);S.points=null;if(null!=S.getTerminalPoint(!1))S.setTerminalPoint(d.getTerminalPoint(!1),!1);else if(N&&n.model.isVertex(x)){var Q=n.view.getState(x);I=Q.cell!=n.view.currentRoot?Q.origin:new mxPoint(0,0);n.cellsMoved(b,I.x,I.y,null,null,!0)}}else r=n.getCellGeometry(b[e]),D=d.x-Math.round(r.x),F= d.y-Math.round(r.y),d.x=Math.round(r.x),d.y=Math.round(r.y),n.model.setGeometry(b[e],d),n.cellsMoved(b,D,F,null,null,!0),k=b.slice(),u=1==k.length?k[0]:null,b.push(n.insertEdge(null,null,"",a,b[e],n.createCurrentEdgeStyle()));null!=g&&mxEvent.isShiftDown(g)||n.fireEvent(new mxEventObject("cellsInserted","cells",b))}catch(aa){this.editorUi.handleError(aa)}finally{n.model.endUpdate()}n.editAfterInsert&&null!=g&&mxEvent.isMouseEvent(g)&&null!=u&&window.setTimeout(function(){n.startEditing(u)},0)}return k}; Sidebar.prototype.getDropAndConnectGeometry=function(a,b,f,e){var g=this.editorUi.editor.graph,d=g.view,k=1<e.length,n=g.getCellGeometry(a);e=g.getCellGeometry(b);null!=n&&null!=e&&(e=e.clone(),g.model.isEdge(a)?(a=g.view.getState(a),n=a.absolutePoints,b=n[0],g=n[n.length-1],f==mxConstants.DIRECTION_NORTH?(e.x=b.x/d.scale-d.translate.x-e.width/2,e.y=b.y/d.scale-d.translate.y-e.height/2):(e.x=g.x/d.scale-d.translate.x-e.width/2,e.y=g.y/d.scale-d.translate.y-e.height/2)):(n.relative&&(a=g.view.getState(a), n=n.clone(),n.x=(a.x-d.translate.x)/d.scale,n.y=(a.y-d.translate.y)/d.scale),d=g.defaultEdgeLength,g.model.isEdge(b)&&null!=e.getTerminalPoint(!0)&&null!=e.getTerminalPoint(!1)?(b=e.getTerminalPoint(!0),g=e.getTerminalPoint(!1),d=g.x-b.x,b=g.y-b.y,d=Math.sqrt(d*d+b*b),e.x=n.getCenterX(),e.y=n.getCenterY(),e.width=1,e.height=1,f==mxConstants.DIRECTION_NORTH?(e.height=d,e.y=n.y-d,e.setTerminalPoint(new mxPoint(e.x,e.y),!1)):f==mxConstants.DIRECTION_EAST?(e.width=d,e.x=n.x+n.width,e.setTerminalPoint(new mxPoint(e.x+ @@ -2481,29 +2479,29 @@ e.width,e.y),!1)):f==mxConstants.DIRECTION_SOUTH?(e.height=d,e.y=n.y+n.height,e. e.width/2+d:f==mxConstants.DIRECTION_SOUTH?e.y=e.y+n.height/2+e.height/2+d:f==mxConstants.DIRECTION_WEST&&(e.x=e.x-n.width/2-e.width/2-d),g.model.isEdge(b)&&null!=e.getTerminalPoint(!0)&&null!=b.getTerminal(!1)&&(n=g.getCellGeometry(b.getTerminal(!1)),null!=n&&(f==mxConstants.DIRECTION_NORTH?(e.x-=n.getCenterX(),e.y-=n.getCenterY()+n.height/2):f==mxConstants.DIRECTION_EAST?(e.x-=n.getCenterX()-n.width/2,e.y-=n.getCenterY()):f==mxConstants.DIRECTION_SOUTH?(e.x-=n.getCenterX(),e.y-=n.getCenterY()-n.height/ 2):f==mxConstants.DIRECTION_WEST&&(e.x-=n.getCenterX()+n.width/2,e.y-=n.getCenterY()))))));return e};Sidebar.prototype.isDropStyleEnabled=function(a,b){var f=!0;null!=b&&1==a.length&&(a=this.graph.getCellStyle(a[b]),null!=a&&(f=mxUtils.getValue(a,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(a,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE));return f}; Sidebar.prototype.isDropStyleTargetIgnored=function(a){return this.graph.isSwimlane(a.cell)||this.graph.isTableCell(a.cell)||this.graph.isTableRow(a.cell)||this.graph.isTable(a.cell)}; -Sidebar.prototype.createDragSource=function(a,b,f,e,g){function d(da,pa){var wa=mxUtils.createImage(da.src);wa.style.width=da.width+"px";wa.style.height=da.height+"px";null!=pa&&wa.setAttribute("title",pa);mxUtils.setOpacity(wa,da==this.refreshTarget?30:20);wa.style.position="absolute";wa.style.cursor="crosshair";return wa}function k(da,pa,wa,Ka){null!=Ka.parentNode&&(mxUtils.contains(wa,da,pa)?(mxUtils.setOpacity(Ka,100),V=Ka):mxUtils.setOpacity(Ka,Ka==X?30:20));return wa}for(var n=this.editorUi, -u=n.editor.graph,m=null,r=null,x=this,B=0;B<e.length&&(null==r&&u.model.isVertex(e[B])?r=B:null==m&&u.model.isEdge(e[B])&&null==u.model.getTerminal(e[B],!0)&&(m=B),null==r||null==m);B++);var D=this.isDropStyleEnabled(e,r),F=mxUtils.makeDraggable(a,u,mxUtils.bind(this,function(da,pa,wa,Ka,Ha){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=e&&null!=R&&V==X){var ua=da.isCellSelected(R.cell)?da.getSelectionCells():[R.cell];ua=this.updateShapes(da.model.isEdge(R.cell)?e[0]:e[r], -ua);da.setSelectionCells(ua)}else null!=e&&null!=V&&null!=C&&V!=X?(ua=da.model.isEdge(C.cell)||null==m?r:m,da.setSelectionCells(this.dropAndConnect(C.cell,e,K,ua,pa))):b.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(da.view.getState(da.getSelectionCell()))}),f,0,0,u.autoscroll,!0,!0);u.addListener(mxEvent.ESCAPE,function(da,pa){F.isActive()&&F.reset()});var J=F.mouseDown;F.mouseDown=function(da){mxEvent.isPopupTrigger(da)||mxEvent.isMultiTouchEvent(da)||u.isCellLocked(u.getDefaultParent())|| -(u.stopEditing(),J.apply(this,arguments))};var C=null,O=null,R=null,T=!1,Q=d(this.triangleUp,mxResources.get("connect")),aa=d(this.triangleRight,mxResources.get("connect")),S=d(this.triangleDown,mxResources.get("connect")),P=d(this.triangleLeft,mxResources.get("connect")),X=d(this.refreshTarget,mxResources.get("replace")),ha=null,fa=d(this.roundDrop),sa=d(this.roundDrop),K=mxConstants.DIRECTION_NORTH,V=null,G=F.createPreviewElement;F.createPreviewElement=function(da){var pa=G.apply(this,arguments); -mxClient.IS_SVG&&(pa.style.pointerEvents="none");this.previewElementWidth=pa.style.width;this.previewElementHeight=pa.style.height;return pa};var M=F.dragEnter;F.dragEnter=function(da,pa){null!=n.hoverIcons&&n.hoverIcons.setDisplay("none");M.apply(this,arguments)};var U=F.dragExit;F.dragExit=function(da,pa){null!=n.hoverIcons&&n.hoverIcons.setDisplay("");U.apply(this,arguments)};F.dragOver=function(da,pa){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=V&&this.currentGuide.hide(); -if(null!=this.previewElement){var wa=da.view;if(null!=R&&V==X)this.previewElement.style.display=da.model.isEdge(R.cell)?"none":"",this.previewElement.style.left=R.x+"px",this.previewElement.style.top=R.y+"px",this.previewElement.style.width=R.width+"px",this.previewElement.style.height=R.height+"px";else if(null!=C&&null!=V){null!=F.currentHighlight&&null!=F.currentHighlight.state&&F.currentHighlight.hide();var Ka=da.model.isEdge(C.cell)||null==m?r:m,Ha=x.getDropAndConnectGeometry(C.cell,e[Ka],K, -e),ua=da.model.isEdge(C.cell)?null:da.getCellGeometry(C.cell),Ca=da.getCellGeometry(e[Ka]),qa=da.model.getParent(C.cell),Da=wa.translate.x*wa.scale,Ua=wa.translate.y*wa.scale;null!=ua&&!ua.relative&&da.model.isVertex(qa)&&qa!=wa.currentRoot&&(Ua=wa.getState(qa),Da=Ua.x,Ua=Ua.y);ua=Ca.x;Ca=Ca.y;da.model.isEdge(e[Ka])&&(Ca=ua=0);this.previewElement.style.left=(Ha.x-ua)*wa.scale+Da+"px";this.previewElement.style.top=(Ha.y-Ca)*wa.scale+Ua+"px";1==e.length&&(this.previewElement.style.width=Ha.width*wa.scale+ -"px",this.previewElement.style.height=Ha.height*wa.scale+"px");this.previewElement.style.display=""}else null!=F.currentHighlight.state&&da.model.isEdge(F.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-g.width*wa.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-g.height*wa.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight, -this.previewElement.style.display="")}};var ba=(new Date).getTime(),la=0,ra=null,Y=this.editorUi.editor.graph.getCellStyle(e[0]);F.getDropTarget=mxUtils.bind(this,function(da,pa,wa,Ka){var Ha=mxEvent.isAltDown(Ka)||null==e?null:da.getCellAt(pa,wa,null,null,null,function(Ua,db,Ta){return da.isContainer(Ua.cell)});if(null!=Ha&&!this.graph.isCellConnectable(Ha)&&!this.graph.model.isEdge(Ha)){var ua=this.graph.getModel().getParent(Ha);this.graph.getModel().isVertex(ua)&&this.graph.isCellConnectable(ua)&& -(Ha=ua)}da.isCellLocked(Ha)&&(Ha=null);var Ca=da.view.getState(Ha);ua=V=null;ra!=Ca?(ba=(new Date).getTime(),la=0,ra=Ca,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=Ca&&(this.updateThread=window.setTimeout(function(){null==V&&(ra=Ca,F.getDropTarget(da,pa,wa,Ka))},this.dropTargetDelay+10))):la=(new Date).getTime()-ba;if(D&&2500>la&&null!=Ca&&!mxEvent.isShiftDown(Ka)&&(mxUtils.getValue(Ca.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(Y,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(Ca.style, -mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ca.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ca.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(Y,mxConstants.STYLE_SHAPE)||1500<la||da.model.isEdge(Ca.cell))&&la>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(Ca)&&(da.model.isVertex(Ca.cell)&&null!=r||da.model.isEdge(Ca.cell)&&da.model.isEdge(e[0]))){if(da.isCellEditable(Ca.cell)){R= -Ca;var qa=da.model.isEdge(Ca.cell)?da.view.getPoint(Ca):new mxPoint(Ca.getCenterX(),Ca.getCenterY());qa=new mxRectangle(qa.x-this.refreshTarget.width/2,qa.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);X.style.left=Math.floor(qa.x)+"px";X.style.top=Math.floor(qa.y)+"px";null==ha&&(da.container.appendChild(X),ha=X.parentNode);k(pa,wa,qa,X)}}else null==R||!mxUtils.contains(R,pa,wa)||1500<la&&!mxEvent.isShiftDown(Ka)?(R=null,null!=ha&&(X.parentNode.removeChild(X),ha= -null)):null!=R&&null!=ha&&(qa=da.model.isEdge(R.cell)?da.view.getPoint(R):new mxPoint(R.getCenterX(),R.getCenterY()),qa=new mxRectangle(qa.x-this.refreshTarget.width/2,qa.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),k(pa,wa,qa,X));if(T&&null!=C&&!mxEvent.isAltDown(Ka)&&null==V){ua=mxRectangle.fromRectangle(C);if(da.model.isEdge(C.cell)){var Da=C.absolutePoints;null!=fa.parentNode&&(qa=Da[0],ua.add(k(pa,wa,new mxRectangle(qa.x-this.roundDrop.width/2,qa.y-this.roundDrop.height/ -2,this.roundDrop.width,this.roundDrop.height),fa)));null!=sa.parentNode&&(Da=Da[Da.length-1],ua.add(k(pa,wa,new mxRectangle(Da.x-this.roundDrop.width/2,Da.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),sa)))}else qa=mxRectangle.fromRectangle(C),null!=C.shape&&null!=C.shape.boundingBox&&(qa=mxRectangle.fromRectangle(C.shape.boundingBox)),qa.grow(this.graph.tolerance),qa.grow(HoverIcons.prototype.arrowSpacing),Da=this.graph.selectionCellsHandler.getHandler(C.cell),null!=Da&&(qa.x-= -Da.horizontalOffset/2,qa.y-=Da.verticalOffset/2,qa.width+=Da.horizontalOffset,qa.height+=Da.verticalOffset,null!=Da.rotationShape&&null!=Da.rotationShape.node&&"hidden"!=Da.rotationShape.node.style.visibility&&"none"!=Da.rotationShape.node.style.display&&null!=Da.rotationShape.boundingBox&&qa.add(Da.rotationShape.boundingBox)),ua.add(k(pa,wa,new mxRectangle(C.getCenterX()-this.triangleUp.width/2,qa.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),Q)),ua.add(k(pa,wa,new mxRectangle(qa.x+ -qa.width,C.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),aa)),ua.add(k(pa,wa,new mxRectangle(C.getCenterX()-this.triangleDown.width/2,qa.y+qa.height,this.triangleDown.width,this.triangleDown.height),S)),ua.add(k(pa,wa,new mxRectangle(qa.x-this.triangleLeft.width,C.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),P));null!=ua&&ua.grow(10)}K=mxConstants.DIRECTION_NORTH;V==aa?K=mxConstants.DIRECTION_EAST:V==S||V== -sa?K=mxConstants.DIRECTION_SOUTH:V==P&&(K=mxConstants.DIRECTION_WEST);null!=R&&V==X&&(Ca=R);qa=(null==r||da.isCellConnectable(e[r]))&&(da.model.isEdge(Ha)&&null!=r||da.model.isVertex(Ha)&&da.isCellConnectable(Ha));if(null!=C&&5E3<=la||C!=Ca&&(null==ua||!mxUtils.contains(ua,pa,wa)||500<la&&null==V&&qa))if(T=!1,C=5E3>la&&la>this.dropTargetDelay||da.model.isEdge(Ha)?Ca:null,null!=C&&qa){ua=[fa,sa,Q,aa,S,P];for(qa=0;qa<ua.length;qa++)null!=ua[qa].parentNode&&ua[qa].parentNode.removeChild(ua[qa]);da.model.isEdge(Ha)? -(Da=Ca.absolutePoints,null!=Da&&(qa=Da[0],Da=Da[Da.length-1],ua=da.tolerance,new mxRectangle(pa-ua,wa-ua,2*ua,2*ua),fa.style.left=Math.floor(qa.x-this.roundDrop.width/2)+"px",fa.style.top=Math.floor(qa.y-this.roundDrop.height/2)+"px",sa.style.left=Math.floor(Da.x-this.roundDrop.width/2)+"px",sa.style.top=Math.floor(Da.y-this.roundDrop.height/2)+"px",null==da.model.getTerminal(Ha,!0)&&da.container.appendChild(fa),null==da.model.getTerminal(Ha,!1)&&da.container.appendChild(sa))):(qa=mxRectangle.fromRectangle(Ca), -null!=Ca.shape&&null!=Ca.shape.boundingBox&&(qa=mxRectangle.fromRectangle(Ca.shape.boundingBox)),qa.grow(this.graph.tolerance),qa.grow(HoverIcons.prototype.arrowSpacing),Da=this.graph.selectionCellsHandler.getHandler(Ca.cell),null!=Da&&(qa.x-=Da.horizontalOffset/2,qa.y-=Da.verticalOffset/2,qa.width+=Da.horizontalOffset,qa.height+=Da.verticalOffset,null!=Da.rotationShape&&null!=Da.rotationShape.node&&"hidden"!=Da.rotationShape.node.style.visibility&&"none"!=Da.rotationShape.node.style.display&&null!= -Da.rotationShape.boundingBox&&qa.add(Da.rotationShape.boundingBox)),Q.style.left=Math.floor(Ca.getCenterX()-this.triangleUp.width/2)+"px",Q.style.top=Math.floor(qa.y-this.triangleUp.height)+"px",aa.style.left=Math.floor(qa.x+qa.width)+"px",aa.style.top=Math.floor(Ca.getCenterY()-this.triangleRight.height/2)+"px",S.style.left=Q.style.left,S.style.top=Math.floor(qa.y+qa.height)+"px",P.style.left=Math.floor(qa.x-this.triangleLeft.width)+"px",P.style.top=aa.style.top,"eastwest"!=Ca.style.portConstraint&& -(da.container.appendChild(Q),da.container.appendChild(S)),da.container.appendChild(aa),da.container.appendChild(P));null!=Ca&&(O=da.selectionCellsHandler.getHandler(Ca.cell),null!=O&&null!=O.setHandlesVisible&&O.setHandlesVisible(!1));T=!0}else for(ua=[fa,sa,Q,aa,S,P],qa=0;qa<ua.length;qa++)null!=ua[qa].parentNode&&ua[qa].parentNode.removeChild(ua[qa]);T||null==O||O.setHandlesVisible(!0);Ha=mxEvent.isAltDown(Ka)&&!mxEvent.isShiftDown(Ka)||null!=R&&V==X?null:mxDragSource.prototype.getDropTarget.apply(this, -arguments);ua=da.getModel();if(null!=Ha&&(null!=V||!da.isSplitTarget(Ha,e,Ka))){for(;null!=Ha&&!da.isValidDropTarget(Ha,e,Ka)&&ua.isVertex(ua.getParent(Ha));)Ha=ua.getParent(Ha);null!=Ha&&(da.view.currentRoot==Ha||!da.isValidRoot(Ha)&&0==da.getModel().getChildCount(Ha)||da.isCellLocked(Ha)||ua.isEdge(Ha)||!da.isValidDropTarget(Ha,e,Ka))&&(Ha=null)}da.isCellLocked(Ha)&&(Ha=null);return Ha});F.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var da=[fa,sa,X,Q,aa,S,P],pa= -0;pa<da.length;pa++)null!=da[pa].parentNode&&da[pa].parentNode.removeChild(da[pa]);null!=C&&null!=O&&O.reset();V=ha=R=C=O=null};return F}; +Sidebar.prototype.createDragSource=function(a,b,f,e,g){function d(da,sa){var ta=mxUtils.createImage(da.src);ta.style.width=da.width+"px";ta.style.height=da.height+"px";null!=sa&&ta.setAttribute("title",sa);mxUtils.setOpacity(ta,da==this.refreshTarget?30:20);ta.style.position="absolute";ta.style.cursor="crosshair";return ta}function k(da,sa,ta,Ja){null!=Ja.parentNode&&(mxUtils.contains(ta,da,sa)?(mxUtils.setOpacity(Ja,100),V=Ja):mxUtils.setOpacity(Ja,Ja==Y?30:20));return ta}for(var n=this.editorUi, +u=n.editor.graph,m=null,r=null,x=this,B=0;B<e.length&&(null==r&&u.model.isVertex(e[B])?r=B:null==m&&u.model.isEdge(e[B])&&null==u.model.getTerminal(e[B],!0)&&(m=B),null==r||null==m);B++);var D=this.isDropStyleEnabled(e,r),F=mxUtils.makeDraggable(a,u,mxUtils.bind(this,function(da,sa,ta,Ja,Ha){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=e&&null!=R&&V==Y){var ua=da.isCellSelected(R.cell)?da.getSelectionCells():[R.cell];ua=this.updateShapes(da.model.isEdge(R.cell)?e[0]:e[r], +ua);da.setSelectionCells(ua)}else null!=e&&null!=V&&null!=C&&V!=Y?(ua=da.model.isEdge(C.cell)||null==m?r:m,da.setSelectionCells(this.dropAndConnect(C.cell,e,K,ua,sa))):b.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(da.view.getState(da.getSelectionCell()))}),f,0,0,u.autoscroll,!0,!0);u.addListener(mxEvent.ESCAPE,function(da,sa){F.isActive()&&F.reset()});var I=F.mouseDown;F.mouseDown=function(da){mxEvent.isPopupTrigger(da)||mxEvent.isMultiTouchEvent(da)||u.isCellLocked(u.getDefaultParent())|| +(u.stopEditing(),I.apply(this,arguments))};var C=null,N=null,R=null,S=!1,Q=d(this.triangleUp,mxResources.get("connect")),aa=d(this.triangleRight,mxResources.get("connect")),U=d(this.triangleDown,mxResources.get("connect")),P=d(this.triangleLeft,mxResources.get("connect")),Y=d(this.refreshTarget,mxResources.get("replace")),ja=null,fa=d(this.roundDrop),ra=d(this.roundDrop),K=mxConstants.DIRECTION_NORTH,V=null,O=F.createPreviewElement;F.createPreviewElement=function(da){var sa=O.apply(this,arguments); +mxClient.IS_SVG&&(sa.style.pointerEvents="none");this.previewElementWidth=sa.style.width;this.previewElementHeight=sa.style.height;return sa};var T=F.dragEnter;F.dragEnter=function(da,sa){null!=n.hoverIcons&&n.hoverIcons.setDisplay("none");T.apply(this,arguments)};var J=F.dragExit;F.dragExit=function(da,sa){null!=n.hoverIcons&&n.hoverIcons.setDisplay("");J.apply(this,arguments)};F.dragOver=function(da,sa){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=V&&this.currentGuide.hide(); +if(null!=this.previewElement){var ta=da.view;if(null!=R&&V==Y)this.previewElement.style.display=da.model.isEdge(R.cell)?"none":"",this.previewElement.style.left=R.x+"px",this.previewElement.style.top=R.y+"px",this.previewElement.style.width=R.width+"px",this.previewElement.style.height=R.height+"px";else if(null!=C&&null!=V){null!=F.currentHighlight&&null!=F.currentHighlight.state&&F.currentHighlight.hide();var Ja=da.model.isEdge(C.cell)||null==m?r:m,Ha=x.getDropAndConnectGeometry(C.cell,e[Ja],K, +e),ua=da.model.isEdge(C.cell)?null:da.getCellGeometry(C.cell),Aa=da.getCellGeometry(e[Ja]),qa=da.model.getParent(C.cell),Da=ta.translate.x*ta.scale,Ua=ta.translate.y*ta.scale;null!=ua&&!ua.relative&&da.model.isVertex(qa)&&qa!=ta.currentRoot&&(Ua=ta.getState(qa),Da=Ua.x,Ua=Ua.y);ua=Aa.x;Aa=Aa.y;da.model.isEdge(e[Ja])&&(Aa=ua=0);this.previewElement.style.left=(Ha.x-ua)*ta.scale+Da+"px";this.previewElement.style.top=(Ha.y-Aa)*ta.scale+Ua+"px";1==e.length&&(this.previewElement.style.width=Ha.width*ta.scale+ +"px",this.previewElement.style.height=Ha.height*ta.scale+"px");this.previewElement.style.display=""}else null!=F.currentHighlight.state&&da.model.isEdge(F.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-g.width*ta.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-g.height*ta.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight, +this.previewElement.style.display="")}};var ba=(new Date).getTime(),ha=0,na=null,W=this.editorUi.editor.graph.getCellStyle(e[0]);F.getDropTarget=mxUtils.bind(this,function(da,sa,ta,Ja){var Ha=mxEvent.isAltDown(Ja)||null==e?null:da.getCellAt(sa,ta,null,null,null,function(Ua,db,Ta){return da.isContainer(Ua.cell)});if(null!=Ha&&!this.graph.isCellConnectable(Ha)&&!this.graph.model.isEdge(Ha)){var ua=this.graph.getModel().getParent(Ha);this.graph.getModel().isVertex(ua)&&this.graph.isCellConnectable(ua)&& +(Ha=ua)}da.isCellLocked(Ha)&&(Ha=null);var Aa=da.view.getState(Ha);ua=V=null;na!=Aa?(ba=(new Date).getTime(),ha=0,na=Aa,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=Aa&&(this.updateThread=window.setTimeout(function(){null==V&&(na=Aa,F.getDropTarget(da,sa,ta,Ja))},this.dropTargetDelay+10))):ha=(new Date).getTime()-ba;if(D&&2500>ha&&null!=Aa&&!mxEvent.isShiftDown(Ja)&&(mxUtils.getValue(Aa.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(W,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(Aa.style, +mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Aa.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Aa.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(W,mxConstants.STYLE_SHAPE)||1500<ha||da.model.isEdge(Aa.cell))&&ha>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(Aa)&&(da.model.isVertex(Aa.cell)&&null!=r||da.model.isEdge(Aa.cell)&&da.model.isEdge(e[0]))){if(da.isCellEditable(Aa.cell)){R= +Aa;var qa=da.model.isEdge(Aa.cell)?da.view.getPoint(Aa):new mxPoint(Aa.getCenterX(),Aa.getCenterY());qa=new mxRectangle(qa.x-this.refreshTarget.width/2,qa.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);Y.style.left=Math.floor(qa.x)+"px";Y.style.top=Math.floor(qa.y)+"px";null==ja&&(da.container.appendChild(Y),ja=Y.parentNode);k(sa,ta,qa,Y)}}else null==R||!mxUtils.contains(R,sa,ta)||1500<ha&&!mxEvent.isShiftDown(Ja)?(R=null,null!=ja&&(Y.parentNode.removeChild(Y),ja= +null)):null!=R&&null!=ja&&(qa=da.model.isEdge(R.cell)?da.view.getPoint(R):new mxPoint(R.getCenterX(),R.getCenterY()),qa=new mxRectangle(qa.x-this.refreshTarget.width/2,qa.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),k(sa,ta,qa,Y));if(S&&null!=C&&!mxEvent.isAltDown(Ja)&&null==V){ua=mxRectangle.fromRectangle(C);if(da.model.isEdge(C.cell)){var Da=C.absolutePoints;null!=fa.parentNode&&(qa=Da[0],ua.add(k(sa,ta,new mxRectangle(qa.x-this.roundDrop.width/2,qa.y-this.roundDrop.height/ +2,this.roundDrop.width,this.roundDrop.height),fa)));null!=ra.parentNode&&(Da=Da[Da.length-1],ua.add(k(sa,ta,new mxRectangle(Da.x-this.roundDrop.width/2,Da.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),ra)))}else qa=mxRectangle.fromRectangle(C),null!=C.shape&&null!=C.shape.boundingBox&&(qa=mxRectangle.fromRectangle(C.shape.boundingBox)),qa.grow(this.graph.tolerance),qa.grow(HoverIcons.prototype.arrowSpacing),Da=this.graph.selectionCellsHandler.getHandler(C.cell),null!=Da&&(qa.x-= +Da.horizontalOffset/2,qa.y-=Da.verticalOffset/2,qa.width+=Da.horizontalOffset,qa.height+=Da.verticalOffset,null!=Da.rotationShape&&null!=Da.rotationShape.node&&"hidden"!=Da.rotationShape.node.style.visibility&&"none"!=Da.rotationShape.node.style.display&&null!=Da.rotationShape.boundingBox&&qa.add(Da.rotationShape.boundingBox)),ua.add(k(sa,ta,new mxRectangle(C.getCenterX()-this.triangleUp.width/2,qa.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),Q)),ua.add(k(sa,ta,new mxRectangle(qa.x+ +qa.width,C.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),aa)),ua.add(k(sa,ta,new mxRectangle(C.getCenterX()-this.triangleDown.width/2,qa.y+qa.height,this.triangleDown.width,this.triangleDown.height),U)),ua.add(k(sa,ta,new mxRectangle(qa.x-this.triangleLeft.width,C.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),P));null!=ua&&ua.grow(10)}K=mxConstants.DIRECTION_NORTH;V==aa?K=mxConstants.DIRECTION_EAST:V==U||V== +ra?K=mxConstants.DIRECTION_SOUTH:V==P&&(K=mxConstants.DIRECTION_WEST);null!=R&&V==Y&&(Aa=R);qa=(null==r||da.isCellConnectable(e[r]))&&(da.model.isEdge(Ha)&&null!=r||da.model.isVertex(Ha)&&da.isCellConnectable(Ha));if(null!=C&&5E3<=ha||C!=Aa&&(null==ua||!mxUtils.contains(ua,sa,ta)||500<ha&&null==V&&qa))if(S=!1,C=5E3>ha&&ha>this.dropTargetDelay||da.model.isEdge(Ha)?Aa:null,null!=C&&qa){ua=[fa,ra,Q,aa,U,P];for(qa=0;qa<ua.length;qa++)null!=ua[qa].parentNode&&ua[qa].parentNode.removeChild(ua[qa]);da.model.isEdge(Ha)? +(Da=Aa.absolutePoints,null!=Da&&(qa=Da[0],Da=Da[Da.length-1],ua=da.tolerance,new mxRectangle(sa-ua,ta-ua,2*ua,2*ua),fa.style.left=Math.floor(qa.x-this.roundDrop.width/2)+"px",fa.style.top=Math.floor(qa.y-this.roundDrop.height/2)+"px",ra.style.left=Math.floor(Da.x-this.roundDrop.width/2)+"px",ra.style.top=Math.floor(Da.y-this.roundDrop.height/2)+"px",null==da.model.getTerminal(Ha,!0)&&da.container.appendChild(fa),null==da.model.getTerminal(Ha,!1)&&da.container.appendChild(ra))):(qa=mxRectangle.fromRectangle(Aa), +null!=Aa.shape&&null!=Aa.shape.boundingBox&&(qa=mxRectangle.fromRectangle(Aa.shape.boundingBox)),qa.grow(this.graph.tolerance),qa.grow(HoverIcons.prototype.arrowSpacing),Da=this.graph.selectionCellsHandler.getHandler(Aa.cell),null!=Da&&(qa.x-=Da.horizontalOffset/2,qa.y-=Da.verticalOffset/2,qa.width+=Da.horizontalOffset,qa.height+=Da.verticalOffset,null!=Da.rotationShape&&null!=Da.rotationShape.node&&"hidden"!=Da.rotationShape.node.style.visibility&&"none"!=Da.rotationShape.node.style.display&&null!= +Da.rotationShape.boundingBox&&qa.add(Da.rotationShape.boundingBox)),Q.style.left=Math.floor(Aa.getCenterX()-this.triangleUp.width/2)+"px",Q.style.top=Math.floor(qa.y-this.triangleUp.height)+"px",aa.style.left=Math.floor(qa.x+qa.width)+"px",aa.style.top=Math.floor(Aa.getCenterY()-this.triangleRight.height/2)+"px",U.style.left=Q.style.left,U.style.top=Math.floor(qa.y+qa.height)+"px",P.style.left=Math.floor(qa.x-this.triangleLeft.width)+"px",P.style.top=aa.style.top,"eastwest"!=Aa.style.portConstraint&& +(da.container.appendChild(Q),da.container.appendChild(U)),da.container.appendChild(aa),da.container.appendChild(P));null!=Aa&&(N=da.selectionCellsHandler.getHandler(Aa.cell),null!=N&&null!=N.setHandlesVisible&&N.setHandlesVisible(!1));S=!0}else for(ua=[fa,ra,Q,aa,U,P],qa=0;qa<ua.length;qa++)null!=ua[qa].parentNode&&ua[qa].parentNode.removeChild(ua[qa]);S||null==N||N.setHandlesVisible(!0);Ha=mxEvent.isAltDown(Ja)&&!mxEvent.isShiftDown(Ja)||null!=R&&V==Y?null:mxDragSource.prototype.getDropTarget.apply(this, +arguments);ua=da.getModel();if(null!=Ha&&(null!=V||!da.isSplitTarget(Ha,e,Ja))){for(;null!=Ha&&!da.isValidDropTarget(Ha,e,Ja)&&ua.isVertex(ua.getParent(Ha));)Ha=ua.getParent(Ha);null!=Ha&&(da.view.currentRoot==Ha||!da.isValidRoot(Ha)&&0==da.getModel().getChildCount(Ha)||da.isCellLocked(Ha)||ua.isEdge(Ha)||!da.isValidDropTarget(Ha,e,Ja))&&(Ha=null)}da.isCellLocked(Ha)&&(Ha=null);return Ha});F.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var da=[fa,ra,Y,Q,aa,U,P],sa= +0;sa<da.length;sa++)null!=da[sa].parentNode&&da[sa].parentNode.removeChild(da[sa]);null!=C&&null!=N&&N.reset();V=ja=R=C=N=null};return F}; Sidebar.prototype.itemClicked=function(a,b,f,e){e=this.editorUi.editor.graph;e.container.focus();if(mxEvent.isAltDown(f)&&1==e.getSelectionCount()&&e.model.isVertex(e.getSelectionCell())){b=null;for(var g=0;g<a.length&&null==b;g++)e.model.isVertex(a[g])&&(b=g);null!=b&&(e.setSelectionCells(this.dropAndConnect(e.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,b,f)),e.scrollCellToVisible(e.getSelectionCell()))}else mxEvent.isShiftDown(f)&&!e.isSelectionEmpty()?(f=e.getEditableCells(e.getSelectionCells()),this.updateShapes(a[0],f),e.scrollCellToVisible(f)):(a=mxEvent.isAltDown(f)?e.getFreeInsertPoint():e.getCenterInsertPoint(e.getBoundingBoxFromGeometry(a,!0)),b.drop(e,f,null,a.x,a.y,!0))}; Sidebar.prototype.addClickHandler=function(a,b,f){var e=b.mouseDown,g=b.mouseMove,d=b.mouseUp,k=this.editorUi.editor.graph.tolerance,n=null,u=this;b.mouseDown=function(m){e.apply(this,arguments);n=new mxPoint(mxEvent.getClientX(m),mxEvent.getClientY(m));null!=this.dragElement&&(this.dragElement.style.display="none",mxUtils.setOpacity(a,50))};b.mouseMove=function(m){null!=this.dragElement&&"none"==this.dragElement.style.display&&null!=n&&(Math.abs(n.x-mxEvent.getClientX(m))>k||Math.abs(n.y-mxEvent.getClientY(m))> @@ -2519,8 +2517,8 @@ Sidebar.prototype.addFoldingHandler=function(a,b,f){var e=!1;if(!mxClient.IS_IE| Sidebar.prototype.removePalette=function(a){var b=this.palettes[a];if(null!=b){this.palettes[a]=null;for(a=0;a<b.length;a++)this.container.removeChild(b[a]);return!0}return!1}; Sidebar.prototype.addImagePalette=function(a,b,f,e,g,d,k){for(var n=[],u=0;u<g.length;u++)mxUtils.bind(this,function(m,r,x){if(null==x){x=m.lastIndexOf("/");var B=m.lastIndexOf(".");x=m.substring(0<=x?x+1:0,0<=B?B:m.length).replace(/[-_]/g," ")}n.push(this.createVertexTemplateEntry("image;html=1;image="+f+m+e,this.defaultImageWidth,this.defaultImageHeight,"",r,null!=r,null,this.filterTags(x)))})(g[u],null!=d?d[u]:null,null!=k?k[g[u]]:null);this.addPaletteFunctions(a,b,!1,n)}; Sidebar.prototype.getTagsForStencil=function(a,b,f){a=a.split(".");for(var e=1;e<a.length;e++)a[e]=a[e].replace(/_/g," ");a.push(b.replace(/_/g," "));null!=f&&a.push(f);return a.slice(1,a.length)}; -Sidebar.prototype.addStencilPalette=function(a,b,f,e,g,d,k,n,u,m){k=null!=k?k:1;if(this.addStencilsToIndex){var r=[];if(null!=u)for(m=0;m<u.length;m++)r.push(u[m]);mxStencilRegistry.loadStencilSet(f,mxUtils.bind(this,function(x,B,D,F,J){if(null==g||0>mxUtils.indexOf(g,B)){D=this.getTagsForStencil(x,B);var C=null!=n?n[B]:null;null!=C&&D.push(C);r.push(this.createVertexTemplateEntry("shape="+x+B.toLowerCase()+e,Math.round(F*k),Math.round(J*k),"",B.replace(/_/g," "),null,null,this.filterTags(D.join(" "))))}}), -!0,!0);this.addPaletteFunctions(a,b,!1,r)}else this.addPalette(a,b,!1,mxUtils.bind(this,function(x){null==e&&(e="");null!=d&&d.call(this,x);if(null!=u)for(var B=0;B<u.length;B++)u[B](x);mxStencilRegistry.loadStencilSet(f,mxUtils.bind(this,function(D,F,J,C,O){(null==g||0>mxUtils.indexOf(g,F))&&x.appendChild(this.createVertexTemplate("shape="+D+F.toLowerCase()+e,Math.round(C*k),Math.round(O*k),"",F.replace(/_/g," "),!0))}),!0)}))}; +Sidebar.prototype.addStencilPalette=function(a,b,f,e,g,d,k,n,u,m){k=null!=k?k:1;if(this.addStencilsToIndex){var r=[];if(null!=u)for(m=0;m<u.length;m++)r.push(u[m]);mxStencilRegistry.loadStencilSet(f,mxUtils.bind(this,function(x,B,D,F,I){if(null==g||0>mxUtils.indexOf(g,B)){D=this.getTagsForStencil(x,B);var C=null!=n?n[B]:null;null!=C&&D.push(C);r.push(this.createVertexTemplateEntry("shape="+x+B.toLowerCase()+e,Math.round(F*k),Math.round(I*k),"",B.replace(/_/g," "),null,null,this.filterTags(D.join(" "))))}}), +!0,!0);this.addPaletteFunctions(a,b,!1,r)}else this.addPalette(a,b,!1,mxUtils.bind(this,function(x){null==e&&(e="");null!=d&&d.call(this,x);if(null!=u)for(var B=0;B<u.length;B++)u[B](x);mxStencilRegistry.loadStencilSet(f,mxUtils.bind(this,function(D,F,I,C,N){(null==g||0>mxUtils.indexOf(g,F))&&x.appendChild(this.createVertexTemplate("shape="+D+F.toLowerCase()+e,Math.round(C*k),Math.round(N*k),"",F.replace(/_/g," "),!0))}),!0)}))}; Sidebar.prototype.destroy=function(){null!=this.graph&&(null!=this.graph.container&&null!=this.graph.container.parentNode&&this.graph.container.parentNode.removeChild(this.graph.container),this.graph.destroy(),this.graph=null);null!=this.pointerUpHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerup":"mouseup",this.pointerUpHandler),this.pointerUpHandler=null);null!=this.pointerDownHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerdown":"mousedown",this.pointerDownHandler), this.pointerDownHandler=null);null!=this.pointerMoveHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.pointerMoveHandler),this.pointerMoveHandler=null);null!=this.pointerOutHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerout":"mouseout",this.pointerOutHandler),this.pointerOutHandler=null)};(function(){var a=[["nbsp","160"],["shy","173"]],b=mxUtils.parseXml;mxUtils.parseXml=function(f){for(var e=0;e<a.length;e++)f=f.replace(new RegExp("&"+a[e][0]+";","g"),"&#"+a[e][1]+";");return b(f)}})(); Date.prototype.toISOString||function(){function a(b){b=String(b);1===b.length&&(b="0"+b);return b}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()}); @@ -2532,34 +2530,34 @@ mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhC mxGraphView.prototype.setUnit=function(a){this.unit!=a&&(this.unit=a,this.fireEvent(new mxEventObject("unitChanged","unit",a)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(a,b,f){return null}; mxImageShape.prototype.getImageDataUri=function(){var a=this.image;if("data:image/svg+xml;base64,"==a.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=a)this.clippedSvg=Graph.clipSvgDataUri(a,!0),this.clippedImage=a;a=this.clippedSvg}return a}; Graph=function(a,b,f,e,g,d){mxGraph.call(this,a,b,f,e);this.themes=g||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=d?d:!1;a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(K){K=this.getCurrentCellStyle(K); -return null!=K?"1"==K.html||"wrap"==K[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var k=null,n=null,u=null,m=null,r=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(K,V){if("mouseDown"==V.getProperty("eventName")&&this.isEnabled()){K=V.getProperty("event");var G=K.getState();V=this.view.scale;if(!mxEvent.isAltDown(K.getEvent())&&null!=G)if(this.model.isEdge(G.cell))if(k=new mxPoint(K.getGraphX(),K.getGraphY()),r=this.isCellSelected(G.cell),u=G,n=K,null!=G.text&&null!= -G.text.boundingBox&&mxUtils.contains(G.text.boundingBox,K.getGraphX(),K.getGraphY()))m=mxEvent.LABEL_HANDLE;else{var M=this.selectionCellsHandler.getHandler(G.cell);null!=M&&null!=M.bends&&0<M.bends.length&&(m=M.getHandleForEvent(K))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(K.getEvent())&&(M=this.selectionCellsHandler.getHandler(G.cell),null==M||null==M.getHandleForEvent(K))){var U=new mxRectangle(K.getGraphX()-1,K.getGraphY()-1),ba=mxEvent.isTouchEvent(K.getEvent())?mxShape.prototype.svgStrokeTolerance- -1:(mxShape.prototype.svgStrokeTolerance+2)/2;M=ba+2;U.grow(ba);if(this.isTableCell(G.cell)&&!this.isCellSelected(G.cell)&&!(mxUtils.contains(G,K.getGraphX()-M,K.getGraphY()-M)&&mxUtils.contains(G,K.getGraphX()-M,K.getGraphY()+M)&&mxUtils.contains(G,K.getGraphX()+M,K.getGraphY()+M)&&mxUtils.contains(G,K.getGraphX()+M,K.getGraphY()-M))){var la=this.model.getParent(G.cell);M=this.model.getParent(la);if(!this.isCellSelected(M)){ba*=V;var ra=2*ba;if(this.model.getChildAt(M,0)!=la&&mxUtils.intersects(U, -new mxRectangle(G.x,G.y-ba,G.width,ra))||this.model.getChildAt(la,0)!=G.cell&&mxUtils.intersects(U,new mxRectangle(G.x-ba,G.y,ra,G.height))||mxUtils.intersects(U,new mxRectangle(G.x,G.y+G.height-ba,G.width,ra))||mxUtils.intersects(U,new mxRectangle(G.x+G.width-ba,G.y,ra,G.height)))la=this.selectionCellsHandler.isHandled(M),this.selectCellForEvent(M,K.getEvent()),M=this.selectionCellsHandler.getHandler(M),null!=M&&(ba=M.getHandleForEvent(K),null!=ba&&(M.start(K.getGraphX(),K.getGraphY(),ba),M.blockDelayedSelection= -!la,K.consume()))}}for(;!K.isConsumed()&&null!=G&&(this.isTableCell(G.cell)||this.isTableRow(G.cell)||this.isTable(G.cell));)this.isSwimlane(G.cell)&&(M=this.getActualStartSize(G.cell),(0<M.x||0<M.width)&&mxUtils.intersects(U,new mxRectangle(G.x+(M.x-M.width-1)*V+(0==M.x?G.width:0),G.y,1,G.height))||(0<M.y||0<M.height)&&mxUtils.intersects(U,new mxRectangle(G.x,G.y+(M.y-M.height-1)*V+(0==M.y?G.height:0),G.width,1)))&&(this.selectCellForEvent(G.cell,K.getEvent()),M=this.selectionCellsHandler.getHandler(G.cell), -null!=M&&(ba=mxEvent.CUSTOM_HANDLE-M.customHandles.length+1,M.start(K.getGraphX(),K.getGraphY(),ba),K.consume())),G=this.view.getState(this.model.getParent(G.cell))}}}));this.addMouseListener({mouseDown:function(K,V){},mouseMove:mxUtils.bind(this,function(K,V){K=this.selectionCellsHandler.handlers.map;for(var G in K)if(null!=K[G].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(V.getEvent())){var M=this.tolerance;if(null!=k&&null!=u&&null!=n){if(G=u,Math.abs(k.x- -V.getGraphX())>M||Math.abs(k.y-V.getGraphY())>M){var U=this.selectionCellsHandler.getHandler(G.cell);null==U&&this.model.isEdge(G.cell)&&(U=this.createHandler(G));if(null!=U&&null!=U.bends&&0<U.bends.length){K=U.getHandleForEvent(n);var ba=this.view.getEdgeStyle(G);M=ba==mxEdgeStyle.EntityRelation;r||m!=mxEvent.LABEL_HANDLE||(K=m);if(M&&0!=K&&K!=U.bends.length-1&&K!=mxEvent.LABEL_HANDLE)!M||null==G.visibleSourceState&&null==G.visibleTargetState||(this.graphHandler.reset(),V.consume());else if(K== -mxEvent.LABEL_HANDLE||0==K||null!=G.visibleSourceState||K==U.bends.length-1||null!=G.visibleTargetState)M||K==mxEvent.LABEL_HANDLE||(M=G.absolutePoints,null!=M&&(null==ba&&null==K||ba==mxEdgeStyle.OrthConnector)&&(K=m,null==K&&(K=new mxRectangle(k.x,k.y),K.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(K,M[0].x,M[0].y)?K=0:mxUtils.contains(K,M[M.length-1].x,M[M.length-1].y)?K=U.bends.length-1:null!=ba&&(2==M.length||3==M.length&&(0==Math.round(M[0].x-M[1].x)&&0==Math.round(M[1].x- -M[2].x)||0==Math.round(M[0].y-M[1].y)&&0==Math.round(M[1].y-M[2].y)))?K=2:(K=mxUtils.findNearestSegment(G,k.x,k.y),K=null==ba?mxEvent.VIRTUAL_HANDLE-K:K+1))),null==K&&(K=mxEvent.VIRTUAL_HANDLE)),U.start(V.getGraphX(),V.getGraphX(),K),V.consume(),this.graphHandler.reset()}null!=U&&(this.selectionCellsHandler.isHandlerActive(U)?this.isCellSelected(G.cell)||(this.selectionCellsHandler.handlers.put(G.cell,U),this.selectCellForEvent(G.cell,V.getEvent())):this.isCellSelected(G.cell)||U.destroy());r=!1; -k=n=u=m=null}}else if(G=V.getState(),null!=G&&this.isCellEditable(G.cell)){U=null;if(this.model.isEdge(G.cell)){if(K=new mxRectangle(V.getGraphX(),V.getGraphY()),K.grow(mxEdgeHandler.prototype.handleImage.width/2),M=G.absolutePoints,null!=M)if(null!=G.text&&null!=G.text.boundingBox&&mxUtils.contains(G.text.boundingBox,V.getGraphX(),V.getGraphY()))U="move";else if(mxUtils.contains(K,M[0].x,M[0].y)||mxUtils.contains(K,M[M.length-1].x,M[M.length-1].y))U="pointer";else if(null!=G.visibleSourceState|| -null!=G.visibleTargetState)K=this.view.getEdgeStyle(G),U="crosshair",K!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(G)&&(V=mxUtils.findNearestSegment(G,V.getGraphX(),V.getGraphY()),V<M.length-1&&0<=V&&(U=0==Math.round(M[V].x-M[V+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(V.getEvent())){M=mxShape.prototype.svgStrokeTolerance/2;K=new mxRectangle(V.getGraphX(),V.getGraphY());K.grow(M);if(this.isTableCell(G.cell)&&(V=this.model.getParent(G.cell),M=this.model.getParent(V),!this.isCellSelected(M)))if(mxUtils.intersects(K, -new mxRectangle(G.x,G.y-2,G.width,4))&&this.model.getChildAt(M,0)!=V||mxUtils.intersects(K,new mxRectangle(G.x,G.y+G.height-2,G.width,4)))U="row-resize";else if(mxUtils.intersects(K,new mxRectangle(G.x-2,G.y,4,G.height))&&this.model.getChildAt(V,0)!=G.cell||mxUtils.intersects(K,new mxRectangle(G.x+G.width-2,G.y,4,G.height)))U="col-resize";for(V=G;null==U&&null!=V&&(this.isTableCell(V.cell)||this.isTableRow(V.cell)||this.isTable(V.cell));)this.isSwimlane(V.cell)&&(M=this.getActualStartSize(V.cell), -ba=this.view.scale,(0<M.x||0<M.width)&&mxUtils.intersects(K,new mxRectangle(V.x+(M.x-M.width-1)*ba+(0==M.x?V.width*ba:0),V.y,1,V.height))?U="col-resize":(0<M.y||0<M.height)&&mxUtils.intersects(K,new mxRectangle(V.x,V.y+(M.y-M.height-1)*ba+(0==M.y?V.height:0),V.width,1))&&(U="row-resize")),V=this.view.getState(this.model.getParent(V.cell))}null!=U&&G.setCursor(U)}}}),mouseUp:mxUtils.bind(this,function(K,V){m=k=n=u=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(K){var V= +return null!=K?"1"==K.html||"wrap"==K[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var k=null,n=null,u=null,m=null,r=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(K,V){if("mouseDown"==V.getProperty("eventName")&&this.isEnabled()){K=V.getProperty("event");var O=K.getState();V=this.view.scale;if(!mxEvent.isAltDown(K.getEvent())&&null!=O)if(this.model.isEdge(O.cell))if(k=new mxPoint(K.getGraphX(),K.getGraphY()),r=this.isCellSelected(O.cell),u=O,n=K,null!=O.text&&null!= +O.text.boundingBox&&mxUtils.contains(O.text.boundingBox,K.getGraphX(),K.getGraphY()))m=mxEvent.LABEL_HANDLE;else{var T=this.selectionCellsHandler.getHandler(O.cell);null!=T&&null!=T.bends&&0<T.bends.length&&(m=T.getHandleForEvent(K))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(K.getEvent())&&(T=this.selectionCellsHandler.getHandler(O.cell),null==T||null==T.getHandleForEvent(K))){var J=new mxRectangle(K.getGraphX()-1,K.getGraphY()-1),ba=mxEvent.isTouchEvent(K.getEvent())?mxShape.prototype.svgStrokeTolerance- +1:(mxShape.prototype.svgStrokeTolerance+2)/2;T=ba+2;J.grow(ba);if(this.isTableCell(O.cell)&&!this.isCellSelected(O.cell)&&!(mxUtils.contains(O,K.getGraphX()-T,K.getGraphY()-T)&&mxUtils.contains(O,K.getGraphX()-T,K.getGraphY()+T)&&mxUtils.contains(O,K.getGraphX()+T,K.getGraphY()+T)&&mxUtils.contains(O,K.getGraphX()+T,K.getGraphY()-T))){var ha=this.model.getParent(O.cell);T=this.model.getParent(ha);if(!this.isCellSelected(T)){ba*=V;var na=2*ba;if(this.model.getChildAt(T,0)!=ha&&mxUtils.intersects(J, +new mxRectangle(O.x,O.y-ba,O.width,na))||this.model.getChildAt(ha,0)!=O.cell&&mxUtils.intersects(J,new mxRectangle(O.x-ba,O.y,na,O.height))||mxUtils.intersects(J,new mxRectangle(O.x,O.y+O.height-ba,O.width,na))||mxUtils.intersects(J,new mxRectangle(O.x+O.width-ba,O.y,na,O.height)))ha=this.selectionCellsHandler.isHandled(T),this.selectCellForEvent(T,K.getEvent()),T=this.selectionCellsHandler.getHandler(T),null!=T&&(ba=T.getHandleForEvent(K),null!=ba&&(T.start(K.getGraphX(),K.getGraphY(),ba),T.blockDelayedSelection= +!ha,K.consume()))}}for(;!K.isConsumed()&&null!=O&&(this.isTableCell(O.cell)||this.isTableRow(O.cell)||this.isTable(O.cell));)this.isSwimlane(O.cell)&&(T=this.getActualStartSize(O.cell),(0<T.x||0<T.width)&&mxUtils.intersects(J,new mxRectangle(O.x+(T.x-T.width-1)*V+(0==T.x?O.width:0),O.y,1,O.height))||(0<T.y||0<T.height)&&mxUtils.intersects(J,new mxRectangle(O.x,O.y+(T.y-T.height-1)*V+(0==T.y?O.height:0),O.width,1)))&&(this.selectCellForEvent(O.cell,K.getEvent()),T=this.selectionCellsHandler.getHandler(O.cell), +null!=T&&(ba=mxEvent.CUSTOM_HANDLE-T.customHandles.length+1,T.start(K.getGraphX(),K.getGraphY(),ba),K.consume())),O=this.view.getState(this.model.getParent(O.cell))}}}));this.addMouseListener({mouseDown:function(K,V){},mouseMove:mxUtils.bind(this,function(K,V){K=this.selectionCellsHandler.handlers.map;for(var O in K)if(null!=K[O].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(V.getEvent())){var T=this.tolerance;if(null!=k&&null!=u&&null!=n){if(O=u,Math.abs(k.x- +V.getGraphX())>T||Math.abs(k.y-V.getGraphY())>T){var J=this.selectionCellsHandler.getHandler(O.cell);null==J&&this.model.isEdge(O.cell)&&(J=this.createHandler(O));if(null!=J&&null!=J.bends&&0<J.bends.length){K=J.getHandleForEvent(n);var ba=this.view.getEdgeStyle(O);T=ba==mxEdgeStyle.EntityRelation;r||m!=mxEvent.LABEL_HANDLE||(K=m);if(T&&0!=K&&K!=J.bends.length-1&&K!=mxEvent.LABEL_HANDLE)!T||null==O.visibleSourceState&&null==O.visibleTargetState||(this.graphHandler.reset(),V.consume());else if(K== +mxEvent.LABEL_HANDLE||0==K||null!=O.visibleSourceState||K==J.bends.length-1||null!=O.visibleTargetState)T||K==mxEvent.LABEL_HANDLE||(T=O.absolutePoints,null!=T&&(null==ba&&null==K||ba==mxEdgeStyle.OrthConnector)&&(K=m,null==K&&(K=new mxRectangle(k.x,k.y),K.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(K,T[0].x,T[0].y)?K=0:mxUtils.contains(K,T[T.length-1].x,T[T.length-1].y)?K=J.bends.length-1:null!=ba&&(2==T.length||3==T.length&&(0==Math.round(T[0].x-T[1].x)&&0==Math.round(T[1].x- +T[2].x)||0==Math.round(T[0].y-T[1].y)&&0==Math.round(T[1].y-T[2].y)))?K=2:(K=mxUtils.findNearestSegment(O,k.x,k.y),K=null==ba?mxEvent.VIRTUAL_HANDLE-K:K+1))),null==K&&(K=mxEvent.VIRTUAL_HANDLE)),J.start(V.getGraphX(),V.getGraphX(),K),V.consume(),this.graphHandler.reset()}null!=J&&(this.selectionCellsHandler.isHandlerActive(J)?this.isCellSelected(O.cell)||(this.selectionCellsHandler.handlers.put(O.cell,J),this.selectCellForEvent(O.cell,V.getEvent())):this.isCellSelected(O.cell)||J.destroy());r=!1; +k=n=u=m=null}}else if(O=V.getState(),null!=O&&this.isCellEditable(O.cell)){J=null;if(this.model.isEdge(O.cell)){if(K=new mxRectangle(V.getGraphX(),V.getGraphY()),K.grow(mxEdgeHandler.prototype.handleImage.width/2),T=O.absolutePoints,null!=T)if(null!=O.text&&null!=O.text.boundingBox&&mxUtils.contains(O.text.boundingBox,V.getGraphX(),V.getGraphY()))J="move";else if(mxUtils.contains(K,T[0].x,T[0].y)||mxUtils.contains(K,T[T.length-1].x,T[T.length-1].y))J="pointer";else if(null!=O.visibleSourceState|| +null!=O.visibleTargetState)K=this.view.getEdgeStyle(O),J="crosshair",K!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(O)&&(V=mxUtils.findNearestSegment(O,V.getGraphX(),V.getGraphY()),V<T.length-1&&0<=V&&(J=0==Math.round(T[V].x-T[V+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(V.getEvent())){T=mxShape.prototype.svgStrokeTolerance/2;K=new mxRectangle(V.getGraphX(),V.getGraphY());K.grow(T);if(this.isTableCell(O.cell)&&(V=this.model.getParent(O.cell),T=this.model.getParent(V),!this.isCellSelected(T)))if(mxUtils.intersects(K, +new mxRectangle(O.x,O.y-2,O.width,4))&&this.model.getChildAt(T,0)!=V||mxUtils.intersects(K,new mxRectangle(O.x,O.y+O.height-2,O.width,4)))J="row-resize";else if(mxUtils.intersects(K,new mxRectangle(O.x-2,O.y,4,O.height))&&this.model.getChildAt(V,0)!=O.cell||mxUtils.intersects(K,new mxRectangle(O.x+O.width-2,O.y,4,O.height)))J="col-resize";for(V=O;null==J&&null!=V&&(this.isTableCell(V.cell)||this.isTableRow(V.cell)||this.isTable(V.cell));)this.isSwimlane(V.cell)&&(T=this.getActualStartSize(V.cell), +ba=this.view.scale,(0<T.x||0<T.width)&&mxUtils.intersects(K,new mxRectangle(V.x+(T.x-T.width-1)*ba+(0==T.x?V.width*ba:0),V.y,1,V.height))?J="col-resize":(0<T.y||0<T.height)&&mxUtils.intersects(K,new mxRectangle(V.x,V.y+(T.y-T.height-1)*ba+(0==T.y?V.height:0),V.width,1))&&(J="row-resize")),V=this.view.getState(this.model.getParent(V.cell))}null!=J&&O.setCursor(J)}}}),mouseUp:mxUtils.bind(this,function(K,V){m=k=n=u=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(K){var V= mxCellRenderer.prototype.getLabelValue.apply(this,arguments);K.view.graph.isHtmlLabel(K.cell)&&(V=1!=K.style.html?mxUtils.htmlEntities(V,!1):K.view.graph.sanitizeHtml(V));return V};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid= -!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(K,V){return!1};this.alternateEdgeStyle="vertical";null==e&&this.loadStylesheet();var x=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var K=x.apply(this,arguments);if(this.graph.pageVisible){var V=[],G=this.graph.pageFormat,M=this.graph.pageScale,U=G.width*M;G=G.height*M;M=this.graph.view.translate;for(var ba=this.graph.view.scale,la= -this.graph.getPageLayout(),ra=0;ra<la.width;ra++)V.push(new mxRectangle(((la.x+ra)*U+M.x)*ba,(la.y*G+M.y)*ba,U*ba,G*ba));for(ra=1;ra<la.height;ra++)V.push(new mxRectangle((la.x*U+M.x)*ba,((la.y+ra)*G+M.y)*ba,U*ba,G*ba));K=V.concat(K)}return K};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(K,V){return null==K.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(K){this.previewColor="#000000"==this.graph.background? -"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var B=this.graphHandler.getCells;this.graphHandler.getCells=function(K){for(var V=B.apply(this,arguments),G=new mxDictionary,M=[],U=0;U<V.length;U++){var ba=this.graph.isTableCell(K)&&this.graph.isTableCell(V[U])&&this.graph.isCellSelected(V[U])?this.graph.model.getParent(V[U]):this.graph.isTableRow(K)&&this.graph.isTableRow(V[U])&&this.graph.isCellSelected(V[U])?V[U]:this.graph.getCompositeParent(V[U]); -null==ba||G.get(ba)||(G.put(ba,!0),M.push(ba))}return M};var D=this.graphHandler.start;this.graphHandler.start=function(K,V,G,M){var U=!1;this.graph.isTableCell(K)&&(this.graph.isCellSelected(K)?U=!0:K=this.graph.model.getParent(K));U||this.graph.isTableRow(K)&&this.graph.isCellSelected(K)||(K=this.graph.getCompositeParent(K));D.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(K,V){V=this.graph.getCompositeParent(V);return mxConnectionHandler.prototype.createTargetVertex.apply(this, -arguments)};var F=new mxRubberband(this);this.getRubberband=function(){return F};var J=(new Date).getTime(),C=0,O=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var K=this.currentState;O.apply(this,arguments);K!=this.currentState?(J=(new Date).getTime(),C=0):C=(new Date).getTime()-J};var R=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(K){return mxEvent.isShiftDown(K.getEvent())&&mxEvent.isAltDown(K.getEvent())?!1:null!= -this.currentState&&K.getState()==this.currentState&&2E3<C||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&R.apply(this,arguments)};var T=this.isToggleEvent;this.isToggleEvent=function(K){return T.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(K)};var Q=F.isForceRubberbandEvent;F.isForceRubberbandEvent=function(K){return Q.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(K.getEvent())||mxUtils.hasScrollbars(this.graph.container)&& +!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(K,V){return!1};this.alternateEdgeStyle="vertical";null==e&&this.loadStylesheet();var x=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var K=x.apply(this,arguments);if(this.graph.pageVisible){var V=[],O=this.graph.pageFormat,T=this.graph.pageScale,J=O.width*T;O=O.height*T;T=this.graph.view.translate;for(var ba=this.graph.view.scale,ha= +this.graph.getPageLayout(),na=0;na<ha.width;na++)V.push(new mxRectangle(((ha.x+na)*J+T.x)*ba,(ha.y*O+T.y)*ba,J*ba,O*ba));for(na=1;na<ha.height;na++)V.push(new mxRectangle((ha.x*J+T.x)*ba,((ha.y+na)*O+T.y)*ba,J*ba,O*ba));K=V.concat(K)}return K};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(K,V){return null==K.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(K){this.previewColor="#000000"==this.graph.background? +"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var B=this.graphHandler.getCells;this.graphHandler.getCells=function(K){for(var V=B.apply(this,arguments),O=new mxDictionary,T=[],J=0;J<V.length;J++){var ba=this.graph.isTableCell(K)&&this.graph.isTableCell(V[J])&&this.graph.isCellSelected(V[J])?this.graph.model.getParent(V[J]):this.graph.isTableRow(K)&&this.graph.isTableRow(V[J])&&this.graph.isCellSelected(V[J])?V[J]:this.graph.getCompositeParent(V[J]); +null==ba||O.get(ba)||(O.put(ba,!0),T.push(ba))}return T};var D=this.graphHandler.start;this.graphHandler.start=function(K,V,O,T){var J=!1;this.graph.isTableCell(K)&&(this.graph.isCellSelected(K)?J=!0:K=this.graph.model.getParent(K));J||this.graph.isTableRow(K)&&this.graph.isCellSelected(K)||(K=this.graph.getCompositeParent(K));D.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(K,V){V=this.graph.getCompositeParent(V);return mxConnectionHandler.prototype.createTargetVertex.apply(this, +arguments)};var F=new mxRubberband(this);this.getRubberband=function(){return F};var I=(new Date).getTime(),C=0,N=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var K=this.currentState;N.apply(this,arguments);K!=this.currentState?(I=(new Date).getTime(),C=0):C=(new Date).getTime()-I};var R=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(K){return mxEvent.isShiftDown(K.getEvent())&&mxEvent.isAltDown(K.getEvent())?!1:null!= +this.currentState&&K.getState()==this.currentState&&2E3<C||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&R.apply(this,arguments)};var S=this.isToggleEvent;this.isToggleEvent=function(K){return S.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(K)};var Q=F.isForceRubberbandEvent;F.isForceRubberbandEvent=function(K){return Q.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(K.getEvent())||mxUtils.hasScrollbars(this.graph.container)&& mxClient.IS_FF&&mxClient.IS_WIN&&null==K.getState()&&mxEvent.isTouchEvent(K.getEvent())};var aa=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(aa=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=aa)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(K){return mxEvent.isMouseEvent(K.getEvent())}; -var S=this.click;this.click=function(K){var V=null==K.state&&null!=K.sourceState&&this.isCellLocked(K.sourceState.cell);if(this.isEnabled()&&!V||K.isConsumed())return S.apply(this,arguments);var G=V?K.sourceState.cell:K.getCell();null!=G&&(G=this.getClickableLinkForCell(G),null!=G&&(this.isCustomLink(G)?this.customLinkClicked(G):this.openLink(G)));this.isEnabled()&&V&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(K){return K.sourceState};var P=this.tooltipHandler.show;this.tooltipHandler.show= -function(){P.apply(this,arguments);if(null!=this.div)for(var K=this.div.getElementsByTagName("a"),V=0;V<K.length;V++)null!=K[V].getAttribute("href")&&null==K[V].getAttribute("target")&&K[V].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(K){return K.sourceState};this.getCursorForMouseEvent=function(K){var V=null==K.state&&null!=K.sourceState&&this.isCellLocked(K.sourceState.cell);return this.getCursorForCell(V?K.sourceState.cell:K.getCell())};var X=this.getCursorForCell; -this.getCursorForCell=function(K){if(!this.isEnabled()||this.isCellLocked(K)){if(null!=this.getClickableLinkForCell(K))return"pointer";if(this.isCellLocked(K))return"default"}return X.apply(this,arguments)};this.selectRegion=function(K,V){var G=mxEvent.isAltDown(V)?K:null;K=this.getCells(K.x,K.y,K.width,K.height,null,null,G,function(M){return"1"==mxUtils.getValue(M.style,"locked","0")},!0);if(this.isToggleEvent(V))for(G=0;G<K.length;G++)this.selectCellForEvent(K[G],V);else this.selectCellsForEvent(K, -V);return K};var ha=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(K,V,G){return this.graph.isCellSelected(K)?!1:ha.apply(this,arguments)};this.isCellLocked=function(K){for(;null!=K;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(K),"locked","0"))return!0;K=this.model.getParent(K)}return!1};var fa=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(K,V){"mouseDown"==V.getProperty("eventName")&&(K=V.getProperty("event").getState(), -fa=null==K||this.isSelectionEmpty()||this.isCellSelected(K.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(K,V){if(!mxEvent.isMultiTouchEvent(V)){K=V.getProperty("event");var G=V.getProperty("cell");null==G?(K=mxUtils.convertPoint(this.container,mxEvent.getClientX(K),mxEvent.getClientY(K)),F.start(K.x,K.y)):null!=fa?this.addSelectionCells(fa):1<this.getSelectionCount()&&this.isCellSelected(G)&&this.removeSelectionCell(G);fa=null;V.consume()}})); -this.connectionHandler.selectCells=function(K,V){this.graph.setSelectionCell(V||K)};this.connectionHandler.constraintHandler.isStateIgnored=function(K,V){var G=K.view.graph;return V&&(G.isCellSelected(K.cell)||G.isTableRow(K.cell)&&G.selectionCellsHandler.isHandled(G.model.getParent(K.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var K=this.connectionHandler.constraintHandler;null!=K.currentFocus&&K.isStateIgnored(K.currentFocus,!0)&&(K.currentFocus=null,K.constraints= -null,K.destroyIcons());K.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var sa=this.updateMouseEvent;this.updateMouseEvent=function(K){K=sa.apply(this,arguments);null!=K.state&&this.isCellLocked(K.getCell())&&(K.state=null);return K}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch; +var U=this.click;this.click=function(K){var V=null==K.state&&null!=K.sourceState&&this.isCellLocked(K.sourceState.cell);if(this.isEnabled()&&!V||K.isConsumed())return U.apply(this,arguments);var O=V?K.sourceState.cell:K.getCell();null!=O&&(O=this.getClickableLinkForCell(O),null!=O&&(this.isCustomLink(O)?this.customLinkClicked(O):this.openLink(O)));this.isEnabled()&&V&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(K){return K.sourceState};var P=this.tooltipHandler.show;this.tooltipHandler.show= +function(){P.apply(this,arguments);if(null!=this.div)for(var K=this.div.getElementsByTagName("a"),V=0;V<K.length;V++)null!=K[V].getAttribute("href")&&null==K[V].getAttribute("target")&&K[V].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(K){return K.sourceState};this.getCursorForMouseEvent=function(K){var V=null==K.state&&null!=K.sourceState&&this.isCellLocked(K.sourceState.cell);return this.getCursorForCell(V?K.sourceState.cell:K.getCell())};var Y=this.getCursorForCell; +this.getCursorForCell=function(K){if(!this.isEnabled()||this.isCellLocked(K)){if(null!=this.getClickableLinkForCell(K))return"pointer";if(this.isCellLocked(K))return"default"}return Y.apply(this,arguments)};this.selectRegion=function(K,V){var O=mxEvent.isAltDown(V)?K:null;K=this.getCells(K.x,K.y,K.width,K.height,null,null,O,function(T){return"1"==mxUtils.getValue(T.style,"locked","0")},!0);if(this.isToggleEvent(V))for(O=0;O<K.length;O++)this.selectCellForEvent(K[O],V);else this.selectCellsForEvent(K, +V);return K};var ja=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(K,V,O){return this.graph.isCellSelected(K)?!1:ja.apply(this,arguments)};this.isCellLocked=function(K){for(;null!=K;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(K),"locked","0"))return!0;K=this.model.getParent(K)}return!1};var fa=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(K,V){"mouseDown"==V.getProperty("eventName")&&(K=V.getProperty("event").getState(), +fa=null==K||this.isSelectionEmpty()||this.isCellSelected(K.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(K,V){if(!mxEvent.isMultiTouchEvent(V)){K=V.getProperty("event");var O=V.getProperty("cell");null==O?(K=mxUtils.convertPoint(this.container,mxEvent.getClientX(K),mxEvent.getClientY(K)),F.start(K.x,K.y)):null!=fa?this.addSelectionCells(fa):1<this.getSelectionCount()&&this.isCellSelected(O)&&this.removeSelectionCell(O);fa=null;V.consume()}})); +this.connectionHandler.selectCells=function(K,V){this.graph.setSelectionCell(V||K)};this.connectionHandler.constraintHandler.isStateIgnored=function(K,V){var O=K.view.graph;return V&&(O.isCellSelected(K.cell)||O.isTableRow(K.cell)&&O.selectionCellsHandler.isHandled(O.model.getParent(K.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var K=this.connectionHandler.constraintHandler;null!=K.currentFocus&&K.isStateIgnored(K.currentFocus,!0)&&(K.currentFocus=null,K.constraints= +null,K.destroyIcons());K.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var ra=this.updateMouseEvent;this.updateMouseEvent=function(K){K=ra.apply(this,arguments);null!=K.state&&this.isCellLocked(K.getCell())&&(K.state=null);return K}}this.currentTranslate=new mxPoint(0,0)};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);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display"; Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than diagrams.net --\x3e";Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSource fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" "); Graph.layoutNames="mxHierarchicalLayout mxCircleLayout mxCompactTreeLayout mxEdgeLabelLayout mxFastOrganicLayout mxParallelEdgeLayout mxPartitionLayout mxRadialTreeLayout mxStackLayout".split(" "); @@ -2574,7 +2572,7 @@ Graph.arrayBufferIndexOfString=function(a,b,f){var e=b.charCodeAt(0),g=1,d=-1;fo Graph.decompress=function(a,b,f){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=Graph.stringToArrayBuffer(atob(a));b=decodeURIComponent(b?pako.inflate(a,{to:"string"}):pako.inflateRaw(a,{to:"string"}));return f?b:Graph.zapGremlins(b)}; Graph.fadeNodes=function(a,b,f,e,g){g=null!=g?g:1E3;Graph.setTransitionForNodes(a,null);Graph.setOpacityForNodes(a,b);window.setTimeout(function(){Graph.setTransitionForNodes(a,"all "+g+"ms ease-in-out");Graph.setOpacityForNodes(a,f);window.setTimeout(function(){Graph.setTransitionForNodes(a,null);null!=e&&e()},g)},0)};Graph.removeKeys=function(a,b){for(var f in a)b(f)&&delete a[f]}; Graph.setTransitionForNodes=function(a,b){for(var f=0;f<a.length;f++)mxUtils.setPrefixedStyle(a[f].style,"transition",b)};Graph.setOpacityForNodes=function(a,b){for(var f=0;f<a.length;f++)a[f].style.opacity=b};Graph.removePasteFormatting=function(a){for(;null!=a;)null!=a.firstChild&&Graph.removePasteFormatting(a.firstChild),a.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=a.style&&(a.style.whiteSpace="","#000000"==a.style.color&&(a.style.color="")),a=a.nextSibling}; -Graph.sanitizeHtml=function(a,b){return Graph.domPurify(a,!1)};Graph.sanitizeLink=function(a){var b=document.createElement("a");b.setAttribute("href",a);Graph.sanitizeNode(b);return b.getAttribute("href")};Graph.sanitizeNode=function(a){return Graph.domPurify(a,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(a){"use"==a.nodeName&&a.hasAttribute("xlink:href")&&!a.getAttribute("xlink:href").match(/^#/)&&a.remove()}); +Graph.sanitizeHtml=function(a,b){return Graph.domPurify(a,!1)};Graph.sanitizeLink=function(a){var b=document.createElement("a");b.setAttribute("href",a);Graph.sanitizeNode(b);return b.getAttribute("href")};Graph.sanitizeNode=function(a){return Graph.domPurify(a,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(a){"use"==a.nodeName&&(null!=a.getAttribute("xlink:href")&&!a.getAttribute("xlink:href").startsWith("#")||null!=a.getAttribute("href")&&!a.getAttribute("href").startsWith("#"))&&a.remove()}); Graph.domPurify=function(a,b){window.DOM_PURIFY_CONFIG.IN_PLACE=b;return DOMPurify.sanitize(a,window.DOM_PURIFY_CONFIG)}; Graph.clipSvgDataUri=function(a,b){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=a&&"data:image/svg+xml;base64,"==a.substring(0,26))try{var f=document.createElement("div");f.style.position="absolute";f.style.visibility="hidden";var e=decodeURIComponent(escape(atob(a.substring(26)))),g=e.indexOf("<svg");if(0<=g){f.innerHTML=Graph.sanitizeHtml(e.substring(g));var d=f.getElementsByTagName("svg");if(0<d.length){if(b||null!=d[0].getAttribute("preserveAspectRatio")){document.body.appendChild(f);try{e=b= 1;var k=d[0].getAttribute("width"),n=d[0].getAttribute("height");k=null!=k&&"%"!=k.charAt(k.length-1)?parseFloat(k):NaN;n=null!=n&&"%"!=n.charAt(n.length-1)?parseFloat(n):NaN;var u=d[0].getAttribute("viewBox");if(null!=u&&!isNaN(k)&&!isNaN(n)){var m=u.split(" ");4<=u.length&&(b=parseFloat(m[2])/k,e=parseFloat(m[3])/n)}var r=d[0].getBBox();0<r.width&&0<r.height&&(f.getElementsByTagName("svg")[0].setAttribute("viewBox",r.x+" "+r.y+" "+r.width+" "+r.height),f.getElementsByTagName("svg")[0].setAttribute("width", @@ -2630,10 +2628,10 @@ Graph.prototype.getLabel=function(a){var b=mxGraph.prototype.getLabel.apply(this Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(a){this.defaultParent=a;this.fireEvent(new mxEventObject("defaultParentChanged"))};Graph.prototype.getClickableLinkForCell=function(a){do{var b=this.getLinkForCell(a);if(null!=b)return b;a=this.model.getParent(a)}while(null!=a);return null}; Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b}; Graph.prototype.formatDate=function(a,b,f){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy", -shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var e=this.dateFormatCache,g=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,d=/[^-+\dA-Z]/g,k=function(O,R){O=String(O);for(R=R||2;O.length<R;)O="0"+O;return O};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)|| -/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(e.masks[b]||b||e.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),f=!0);var n=f?"getUTC":"get",u=a[n+"Date"](),m=a[n+"Day"](),r=a[n+"Month"](),x=a[n+"FullYear"](),B=a[n+"Hours"](),D=a[n+"Minutes"](),F=a[n+"Seconds"]();n=a[n+"Milliseconds"]();var J=f?0:a.getTimezoneOffset(),C={d:u,dd:k(u),ddd:e.i18n.dayNames[m],dddd:e.i18n.dayNames[m+7],m:r+1,mm:k(r+1),mmm:e.i18n.monthNames[r],mmmm:e.i18n.monthNames[r+ -12],yy:String(x).slice(2),yyyy:x,h:B%12||12,hh:k(B%12||12),H:B,HH:k(B),M:D,MM:k(D),s:F,ss:k(F),l:k(n,3),L:k(99<n?Math.round(n/10):n),t:12>B?"a":"p",tt:12>B?"am":"pm",T:12>B?"A":"P",TT:12>B?"AM":"PM",Z:f?"UTC":(String(a).match(g)||[""]).pop().replace(d,""),o:(0<J?"-":"+")+k(100*Math.floor(Math.abs(J)/60)+Math.abs(J)%60,4),S:["th","st","nd","rd"][3<u%10?0:(10!=u%100-u%10)*u%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(O){return O in C?C[O]:O.slice(1, -O.length-1)})};Graph.prototype.getLayerForCells=function(a){var b=null;if(0<a.length){for(b=a[0];!this.model.isLayer(b);)b=this.model.getParent(b);for(var f=1;f<a.length;f++)if(!this.model.isAncestor(b,a[f])){b=null;break}}return b}; +shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var e=this.dateFormatCache,g=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,d=/[^-+\dA-Z]/g,k=function(N,R){N=String(N);for(R=R||2;N.length<R;)N="0"+N;return N};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)|| +/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(e.masks[b]||b||e.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),f=!0);var n=f?"getUTC":"get",u=a[n+"Date"](),m=a[n+"Day"](),r=a[n+"Month"](),x=a[n+"FullYear"](),B=a[n+"Hours"](),D=a[n+"Minutes"](),F=a[n+"Seconds"]();n=a[n+"Milliseconds"]();var I=f?0:a.getTimezoneOffset(),C={d:u,dd:k(u),ddd:e.i18n.dayNames[m],dddd:e.i18n.dayNames[m+7],m:r+1,mm:k(r+1),mmm:e.i18n.monthNames[r],mmmm:e.i18n.monthNames[r+ +12],yy:String(x).slice(2),yyyy:x,h:B%12||12,hh:k(B%12||12),H:B,HH:k(B),M:D,MM:k(D),s:F,ss:k(F),l:k(n,3),L:k(99<n?Math.round(n/10):n),t:12>B?"a":"p",tt:12>B?"am":"pm",T:12>B?"A":"P",TT:12>B?"AM":"PM",Z:f?"UTC":(String(a).match(g)||[""]).pop().replace(d,""),o:(0<I?"-":"+")+k(100*Math.floor(Math.abs(I)/60)+Math.abs(I)%60,4),S:["th","st","nd","rd"][3<u%10?0:(10!=u%100-u%10)*u%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(N){return N in C?C[N]:N.slice(1, +N.length-1)})};Graph.prototype.getLayerForCells=function(a){var b=null;if(0<a.length){for(b=a[0];!this.model.isLayer(b);)b=this.model.getParent(b);for(var f=1;f<a.length;f++)if(!this.model.isAncestor(b,a[f])){b=null;break}}return b}; Graph.prototype.createLayersDialog=function(a,b){var f=document.createElement("div");f.style.position="absolute";for(var e=this.getModel(),g=e.getChildCount(e.root),d=0;d<g;d++)mxUtils.bind(this,function(k){function n(){e.isVisible(k)?(r.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(m,75)):(r.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(m,25))}var u=this.convertValueToString(k)||mxResources.get("background")||"Background",m=document.createElement("div");m.style.overflow= "hidden";m.style.textOverflow="ellipsis";m.style.padding="2px";m.style.whiteSpace="nowrap";m.style.cursor="pointer";m.setAttribute("title",mxResources.get(e.isVisible(k)?"hideIt":"show",[u]));var r=document.createElement("img");r.setAttribute("draggable","false");r.setAttribute("align","absmiddle");r.setAttribute("border","0");r.style.position="relative";r.style.width="16px";r.style.padding="0px 6px 0 4px";b&&(r.style.filter="invert(100%)",r.style.top="-2px");m.appendChild(r);mxUtils.write(m,u);f.appendChild(m); mxEvent.addListener(m,"click",function(){e.setVisible(k,!e.isVisible(k));n();null!=a&&a(k)});n()})(e.getChildAt(e.root,d));return f}; @@ -2647,11 +2645,11 @@ g)}}}finally{this.getModel().endUpdate()}};Graph.prototype.selectCellsForConnect Graph.prototype.isCloneConnectSource=function(a){var b=null;null!=this.layoutManager&&(b=this.layoutManager.getLayout(this.model.getParent(a)));return this.isTableRow(a)||this.isTableCell(a)||null!=b&&b.constructor==mxStackLayout}; Graph.prototype.connectVertex=function(a,b,f,e,g,d,k,n){d=d?d:!1;if(a.geometry.relative&&this.model.isEdge(a.parent))return[];for(;a.geometry.relative&&this.model.isVertex(a.parent);)a=a.parent;var u=this.isCloneConnectSource(a),m=u?a:this.getCompositeParent(a),r=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(m.geometry.x,m.geometry.y);b==mxConstants.DIRECTION_NORTH?(r.x+=m.geometry.width/2,r.y-=f):b== mxConstants.DIRECTION_SOUTH?(r.x+=m.geometry.width/2,r.y+=m.geometry.height+f):(r.x=b==mxConstants.DIRECTION_WEST?r.x-f:r.x+(m.geometry.width+f),r.y+=m.geometry.height/2);var x=this.view.getState(this.model.getParent(a));f=this.view.scale;var B=this.view.translate;m=B.x*f;B=B.y*f;null!=x&&this.model.isVertex(x.cell)&&(m=x.x,B=x.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(r.x+=a.parent.geometry.x,r.y+=a.parent.geometry.y);d=d?null:(new mxRectangle(m+r.x*f,B+r.y*f)).grow(40*f);d=null!=d? -this.getCells(0,0,0,0,null,null,d,null,!0):null;x=this.view.getState(a);var D=null,F=null;if(null!=d){d=d.reverse();for(var J=0;J<d.length;J++)if(!this.isCellLocked(d[J])&&!this.model.isEdge(d[J])&&d[J]!=a)if(!this.model.isAncestor(a,d[J])&&this.isContainer(d[J])&&(null==D||d[J]==this.model.getParent(a)))D=d[J];else if(null==F&&this.isCellConnectable(d[J])&&!this.model.isAncestor(d[J],a)&&!this.isSwimlane(d[J])){var C=this.view.getState(d[J]);null==x||null==C||mxUtils.intersects(x,C)||(F=d[J])}}var O= -!mxEvent.isShiftDown(e)||mxEvent.isControlDown(e)||g;O&&("1"!=urlParams.sketch||g)&&(b==mxConstants.DIRECTION_NORTH?r.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?r.y+=a.geometry.height/2:r.x=b==mxConstants.DIRECTION_WEST?r.x-a.geometry.width/2:r.x+a.geometry.width/2);var R=[],T=F;F=D;g=mxUtils.bind(this,function(Q){if(null==k||null!=Q||null==F&&u){this.model.beginUpdate();try{if(null==T&&O){var aa=this.getAbsoluteParent(null!=Q?Q:a);aa=u?a:this.getCompositeParent(aa);T=null!=Q?Q:this.duplicateCells([aa], -!1)[0];null!=Q&&this.addCells([T],this.model.getParent(a),null,null,null,!0);var S=this.getCellGeometry(T);null!=S&&(null!=Q&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?r.y-=S.height/2:b==mxConstants.DIRECTION_SOUTH?r.y+=S.height/2:r.x=b==mxConstants.DIRECTION_WEST?r.x-S.width/2:r.x+S.width/2),S.x=r.x-S.width/2,S.y=r.y-S.height/2);null!=D?(this.addCells([T],D,null,null,null,!0),F=null):O&&!u&&this.addCells([T],this.getDefaultParent(),null,null,null,!0)}var P=mxEvent.isControlDown(e)&& -mxEvent.isShiftDown(e)&&O||null==F&&u?null:this.insertEdge(this.model.getParent(a),null,"",a,T,this.createCurrentEdgeStyle());if(null!=P&&this.connectionHandler.insertBeforeSource){var X=null;for(Q=a;null!=Q.parent&&null!=Q.geometry&&Q.geometry.relative&&Q.parent!=P.parent;)Q=this.model.getParent(Q);null!=Q&&null!=Q.parent&&Q.parent==P.parent&&(X=Q.parent.getIndex(Q),this.model.add(Q.parent,P,X))}null==F&&null!=T&&null!=a.parent&&u&&b==mxConstants.DIRECTION_WEST&&(X=a.parent.getIndex(a),this.model.add(a.parent, -T,X));null!=P&&R.push(P);null==F&&null!=T&&R.push(T);null==T&&null!=P&&P.geometry.setTerminalPoint(r,!1);null!=P&&this.fireEvent(new mxEventObject("cellsInserted","cells",[P]))}finally{this.model.endUpdate()}}if(null!=n)n(R);else return R});if(null==k||null!=T||!O||null==F&&u)return g(T);k(m+r.x*f,B+r.y*f,g)}; +this.getCells(0,0,0,0,null,null,d,null,!0):null;x=this.view.getState(a);var D=null,F=null;if(null!=d){d=d.reverse();for(var I=0;I<d.length;I++)if(!this.isCellLocked(d[I])&&!this.model.isEdge(d[I])&&d[I]!=a)if(!this.model.isAncestor(a,d[I])&&this.isContainer(d[I])&&(null==D||d[I]==this.model.getParent(a)))D=d[I];else if(null==F&&this.isCellConnectable(d[I])&&!this.model.isAncestor(d[I],a)&&!this.isSwimlane(d[I])){var C=this.view.getState(d[I]);null==x||null==C||mxUtils.intersects(x,C)||(F=d[I])}}var N= +!mxEvent.isShiftDown(e)||mxEvent.isControlDown(e)||g;N&&("1"!=urlParams.sketch||g)&&(b==mxConstants.DIRECTION_NORTH?r.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?r.y+=a.geometry.height/2:r.x=b==mxConstants.DIRECTION_WEST?r.x-a.geometry.width/2:r.x+a.geometry.width/2);var R=[],S=F;F=D;g=mxUtils.bind(this,function(Q){if(null==k||null!=Q||null==F&&u){this.model.beginUpdate();try{if(null==S&&N){var aa=this.getAbsoluteParent(null!=Q?Q:a);aa=u?a:this.getCompositeParent(aa);S=null!=Q?Q:this.duplicateCells([aa], +!1)[0];null!=Q&&this.addCells([S],this.model.getParent(a),null,null,null,!0);var U=this.getCellGeometry(S);null!=U&&(null!=Q&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?r.y-=U.height/2:b==mxConstants.DIRECTION_SOUTH?r.y+=U.height/2:r.x=b==mxConstants.DIRECTION_WEST?r.x-U.width/2:r.x+U.width/2),U.x=r.x-U.width/2,U.y=r.y-U.height/2);null!=D?(this.addCells([S],D,null,null,null,!0),F=null):N&&!u&&this.addCells([S],this.getDefaultParent(),null,null,null,!0)}var P=mxEvent.isControlDown(e)&& +mxEvent.isShiftDown(e)&&N||null==F&&u?null:this.insertEdge(this.model.getParent(a),null,"",a,S,this.createCurrentEdgeStyle());if(null!=P&&this.connectionHandler.insertBeforeSource){var Y=null;for(Q=a;null!=Q.parent&&null!=Q.geometry&&Q.geometry.relative&&Q.parent!=P.parent;)Q=this.model.getParent(Q);null!=Q&&null!=Q.parent&&Q.parent==P.parent&&(Y=Q.parent.getIndex(Q),this.model.add(Q.parent,P,Y))}null==F&&null!=S&&null!=a.parent&&u&&b==mxConstants.DIRECTION_WEST&&(Y=a.parent.getIndex(a),this.model.add(a.parent, +S,Y));null!=P&&R.push(P);null==F&&null!=S&&R.push(S);null==S&&null!=P&&P.geometry.setTerminalPoint(r,!1);null!=P&&this.fireEvent(new mxEventObject("cellsInserted","cells",[P]))}finally{this.model.endUpdate()}}if(null!=n)n(R);else return R});if(null==k||null!=S||!N||null==F&&u)return g(S);k(m+r.x*f,B+r.y*f,g)}; Graph.prototype.getIndexableText=function(a){a=null!=a?a:this.model.getDescendants(this.model.root);for(var b=document.createElement("div"),f=[],e,g=0;g<a.length;g++)if(e=a[g],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(b.innerHTML=this.sanitizeHtml(this.getLabel(e)),e=mxUtils.extractTextWithWhitespace([b])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&f.push(e);return f.join(" ")}; Graph.prototype.convertValueToString=function(a){var b=this.model.getValue(a);if(null!=b&&"object"==typeof b){var f=null;if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){b=a.getAttribute("placeholder");for(var e=a;null==f&&null!=e;)null!=e.value&&"object"==typeof e.value&&(f=e.hasAttribute(b)?null!=e.getAttribute(b)?e.getAttribute(b):"":null),e=this.model.getParent(e)}else f=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(f=b.getAttribute("label_"+Graph.diagramLanguage)), null==f&&(f=b.getAttribute("label")||"");return f||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null}; @@ -2705,9 +2703,9 @@ this.currentState.cell)||this.graph.isSwimlane(n)||!(null==m||null==d||m.height< this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}}; HoverIcons.prototype.computeBoundingBox=function(){var a=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(b){null!=b.parentNode&&(b=new mxRectangle(b.offsetLeft,b.offsetTop,b.offsetWidth,b.offsetHeight),null==a?a=b:a.add(b))});return a}; HoverIcons.prototype.getState=function(a){if(null!=a)if(a=a.cell,this.graph.getModel().contains(a)){if(this.graph.getModel().isVertex(a)&&!this.graph.isCellConnectable(a)){var b=this.graph.getModel().getParent(a);this.graph.getModel().isVertex(b)&&this.graph.isCellConnectable(b)&&(a=b)}if(this.graph.isCellLocked(a)||this.graph.model.isEdge(a))a=null;a=this.graph.view.getState(a);null!=a&&null==a.style&&(a=null)}else a=null;return a}; -HoverIcons.prototype.update=function(a,b,f){if(!this.graph.connectionArrowsEnabled||null!=a&&"0"==mxUtils.getValue(a.style,"allowArrows","1"))this.reset();else{null!=a&&null!=a.cell.geometry&&a.cell.geometry.relative&&this.graph.model.isEdge(a.cell.parent)&&(a=null);var e=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,e=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()|| -this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,b,f))}),this.updateDelay+10))):null!=this.startTime&&(e=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=a&&e<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,b,f)?this.reset(!1):(null!=this.currentState||e>this.activationDelay)&&this.currentState!=a&&(e>this.updateDelay&&null!=a||null==this.bbox||null==b||null==f||!mxUtils.contains(this.bbox, -b,f))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}}; +HoverIcons.prototype.update=function(a,b,f){if(!this.graph.connectionArrowsEnabled||null!=this.graph.freehand&&this.graph.freehand.isDrawing()||null!=a&&"0"==mxUtils.getValue(a.style,"allowArrows","1"))this.reset();else{null!=a&&null!=a.cell.geometry&&a.cell.geometry.relative&&this.graph.model.isEdge(a.cell.parent)&&(a=null);var e=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,e=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread= +window.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,b,f))}),this.updateDelay+10))):null!=this.startTime&&(e=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=a&&e<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,b,f)?this.reset(!1):(null!=this.currentState||e>this.activationDelay)&&this.currentState!=a&&(e>this.updateDelay&&null!= +a||null==this.bbox||null==b||null==f||!mxUtils.contains(this.bbox,b,f))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}}; HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};Graph.prototype.createParent=function(a,b,f,e,g){a=this.cloneCell(a);for(var d=0;d<f;d++){var k=this.cloneCell(b),n=this.getCellGeometry(k);null!=n&&(n.x+=d*e,n.y+=d*g);a.insert(k)}return a}; Graph.prototype.createTable=function(a,b,f,e,g,d,k,n,u){f=null!=f?f:60;e=null!=e?e:40;d=null!=d?d:30;n=null!=n?n:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";u=null!=u?u:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null, null,null!=g?g:"",0,0,b*f,a*e+(null!=g?d:0),null!=k?k:"shape=table;startSize="+(null!=g?d:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,b*f,e,n),this.createVertex(null,null,"",0,0,f,e,u),b,f,0),a,0,e)}; @@ -2728,22 +2726,22 @@ TableLayout.prototype.getRowLayout=function(a,b){var f=this.graph.model.getChild TableLayout.prototype.layoutRow=function(a,b,f,e){var g=this.graph.getModel(),d=g.getChildCells(a,!0);a=this.graph.getActualStartSize(a,!0);var k=a.x,n=0;null!=b&&(b=b.slice(),b.splice(0,0,a.x));for(var u=0;u<d.length;u++){var m=this.graph.getCellGeometry(d[u]);null!=m&&(m=m.clone(),m.y=a.y,m.height=f-a.y-a.height,null!=b?(m.x=b[u],m.width=b[u+1]-m.x,u==d.length-1&&u<b.length-2&&(m.width=e-m.x-a.x-a.width)):(m.x=k,k+=m.width,u==d.length-1?m.width=e-a.x-a.width-n:n+=m.width),m.alternateBounds=new mxRectangle(0, 0,m.width,m.height),g.setGeometry(d[u],m))}return n}; TableLayout.prototype.execute=function(a){if(null!=a){var b=this.graph.getActualStartSize(a,!0),f=this.graph.getCellGeometry(a),e=this.graph.getCellStyle(a),g="1"==mxUtils.getValue(e,"resizeLastRow","0"),d="1"==mxUtils.getValue(e,"resizeLast","0");e="1"==mxUtils.getValue(e,"fixedRows","0");var k=this.graph.getModel(),n=0;k.beginUpdate();try{for(var u=f.height-b.y-b.height,m=f.width-b.x-b.width,r=k.getChildCells(a,!0),x=0;x<r.length;x++)k.setVisible(r[x],!0);var B=this.getSize(r,!1);if(0<u&&0<m&&0< -r.length&&0<B){if(g){var D=this.graph.getCellGeometry(r[r.length-1]);null!=D&&(D=D.clone(),D.height=u-B+D.height,k.setGeometry(r[r.length-1],D))}var F=d?null:this.getRowLayout(r[0],m),J=[],C=b.y;for(x=0;x<r.length;x++)D=this.graph.getCellGeometry(r[x]),null!=D&&(D=D.clone(),D.x=b.x,D.width=m,D.y=Math.round(C),C=g||e?C+D.height:C+D.height/B*u,D.height=Math.round(C)-D.y,k.setGeometry(r[x],D)),n=Math.max(n,this.layoutRow(r[x],F,D.height,m,J));e&&u<B&&(f=f.clone(),f.height=C+b.height,k.setGeometry(a, -f));d&&m<n+Graph.minTableColumnWidth&&(f=f.clone(),f.width=n+b.width+b.x+Graph.minTableColumnWidth,k.setGeometry(a,f));this.graph.visitTableCells(a,mxUtils.bind(this,function(O){k.setVisible(O.cell,O.actual.cell==O.cell);if(O.actual.cell!=O.cell){if(O.actual.row==O.row){var R=null!=O.geo.alternateBounds?O.geo.alternateBounds:O.geo;O.actual.geo.width+=R.width}O.actual.col==O.col&&(R=null!=O.geo.alternateBounds?O.geo.alternateBounds:O.geo,O.actual.geo.height+=R.height)}}))}else for(x=0;x<r.length;x++)k.setVisible(r[x], +r.length&&0<B){if(g){var D=this.graph.getCellGeometry(r[r.length-1]);null!=D&&(D=D.clone(),D.height=u-B+D.height,k.setGeometry(r[r.length-1],D))}var F=d?null:this.getRowLayout(r[0],m),I=[],C=b.y;for(x=0;x<r.length;x++)D=this.graph.getCellGeometry(r[x]),null!=D&&(D=D.clone(),D.x=b.x,D.width=m,D.y=Math.round(C),C=g||e?C+D.height:C+D.height/B*u,D.height=Math.round(C)-D.y,k.setGeometry(r[x],D)),n=Math.max(n,this.layoutRow(r[x],F,D.height,m,I));e&&u<B&&(f=f.clone(),f.height=C+b.height,k.setGeometry(a, +f));d&&m<n+Graph.minTableColumnWidth&&(f=f.clone(),f.width=n+b.width+b.x+Graph.minTableColumnWidth,k.setGeometry(a,f));this.graph.visitTableCells(a,mxUtils.bind(this,function(N){k.setVisible(N.cell,N.actual.cell==N.cell);if(N.actual.cell!=N.cell){if(N.actual.row==N.row){var R=null!=N.geo.alternateBounds?N.geo.alternateBounds:N.geo;N.actual.geo.width+=R.width}N.actual.col==N.col&&(R=null!=N.geo.alternateBounds?N.geo.alternateBounds:N.geo,N.actual.geo.height+=R.height)}}))}else for(x=0;x<r.length;x++)k.setVisible(r[x], !1)}finally{k.endUpdate()}}}; (function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(r,x){x=null!=x?x:!0;var B=this.getState(r);null!=B&&x&&this.graph.model.isEdge(B.cell)&&null!=B.style&&1!=B.style[mxConstants.STYLE_CURVED]&&!B.invalid&&this.updateLineJumps(B)&&this.graph.cellRenderer.redraw(B,!1,this.isRendering());B=b.apply(this, arguments);null!=B&&x&&this.graph.model.isEdge(B.cell)&&null!=B.style&&1!=B.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(B);return B};var f=mxShape.prototype.paint;mxShape.prototype.paint=function(){f.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var r=this.node.getElementsByTagName("path");if(1<r.length){"1"!=mxUtils.getValue(this.state.style, mxConstants.STYLE_DASHED,"0")&&r[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var x=this.state.view.graph.getFlowAnimationStyle();null!=x&&r[1].setAttribute("class",x.getAttribute("id"))}}};var e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(r,x){return e.apply(this,arguments)||null!=r.routedPoints&&null!=x.routedPoints&&!mxUtils.equalPoints(x.routedPoints,r.routedPoints)};var g=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState= -function(r){g.apply(this,arguments);this.graph.model.isEdge(r.cell)&&1!=r.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(r)};mxGraphView.prototype.updateLineJumps=function(r){var x=r.absolutePoints;if(Graph.lineJumpsEnabled){var B=null!=r.routedPoints,D=null;if(null!=x&&null!=this.validEdges&&"none"!==mxUtils.getValue(r.style,"jumpStyle","none")){var F=function(fa,sa,K){var V=new mxPoint(sa,K);V.type=fa;D.push(V);V=null!=r.routedPoints?r.routedPoints[D.length-1]:null;return null==V||V.type!= -fa||V.x!=sa||V.y!=K},J=.5*this.scale;B=!1;D=[];for(var C=0;C<x.length-1;C++){for(var O=x[C+1],R=x[C],T=[],Q=x[C+2];C<x.length-2&&mxUtils.ptSegDistSq(R.x,R.y,Q.x,Q.y,O.x,O.y)<1*this.scale*this.scale;)O=Q,C++,Q=x[C+2];B=F(0,R.x,R.y)||B;for(var aa=0;aa<this.validEdges.length;aa++){var S=this.validEdges[aa],P=S.absolutePoints;if(null!=P&&mxUtils.intersects(r,S)&&"1"!=S.style.noJump)for(S=0;S<P.length-1;S++){var X=P[S+1],ha=P[S];for(Q=P[S+2];S<P.length-2&&mxUtils.ptSegDistSq(ha.x,ha.y,Q.x,Q.y,X.x,X.y)< -1*this.scale*this.scale;)X=Q,S++,Q=P[S+2];Q=mxUtils.intersection(R.x,R.y,O.x,O.y,ha.x,ha.y,X.x,X.y);if(null!=Q&&(Math.abs(Q.x-R.x)>J||Math.abs(Q.y-R.y)>J)&&(Math.abs(Q.x-O.x)>J||Math.abs(Q.y-O.y)>J)&&(Math.abs(Q.x-ha.x)>J||Math.abs(Q.y-ha.y)>J)&&(Math.abs(Q.x-X.x)>J||Math.abs(Q.y-X.y)>J)){X=Q.x-R.x;ha=Q.y-R.y;Q={distSq:X*X+ha*ha,x:Q.x,y:Q.y};for(X=0;X<T.length;X++)if(T[X].distSq>Q.distSq){T.splice(X,0,Q);Q=null;break}null==Q||0!=T.length&&T[T.length-1].x===Q.x&&T[T.length-1].y===Q.y||T.push(Q)}}}for(S= -0;S<T.length;S++)B=F(1,T[S].x,T[S].y)||B}Q=x[x.length-1];B=F(0,Q.x,Q.y)||B}r.routedPoints=D;return B}return!1};var d=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(r,x,B){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)d.apply(this,arguments);else{var D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,F=(parseInt(mxUtils.getValue(this.style, -"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,J=mxUtils.getValue(this.style,"jumpStyle","none"),C=!0,O=null,R=null,T=[],Q=null;r.begin();for(var aa=0;aa<this.state.routedPoints.length;aa++){var S=this.state.routedPoints[aa],P=new mxPoint(S.x/this.scale,S.y/this.scale);0==aa?P=x[0]:aa==this.state.routedPoints.length-1&&(P=x[x.length-1]);var X=!1;if(null!=O&&1==S.type){var ha=this.state.routedPoints[aa+1];S=ha.x/this.scale-P.x;ha=ha.y/this.scale-P.y;S=S*S+ha*ha;null==Q&&(Q=new mxPoint(P.x- -O.x,P.y-O.y),R=Math.sqrt(Q.x*Q.x+Q.y*Q.y),0<R?(Q.x=Q.x*F/R,Q.y=Q.y*F/R):Q=null);S>F*F&&0<R&&(S=O.x-P.x,ha=O.y-P.y,S=S*S+ha*ha,S>F*F&&(X=new mxPoint(P.x-Q.x,P.y-Q.y),S=new mxPoint(P.x+Q.x,P.y+Q.y),T.push(X),this.addPoints(r,T,B,D,!1,null,C),T=0>Math.round(Q.x)||0==Math.round(Q.x)&&0>=Math.round(Q.y)?1:-1,C=!1,"sharp"==J?(r.lineTo(X.x-Q.y*T,X.y+Q.x*T),r.lineTo(S.x-Q.y*T,S.y+Q.x*T),r.lineTo(S.x,S.y)):"line"==J?(r.moveTo(X.x+Q.y*T,X.y-Q.x*T),r.lineTo(X.x-Q.y*T,X.y+Q.x*T),r.moveTo(S.x-Q.y*T,S.y+Q.x*T), -r.lineTo(S.x+Q.y*T,S.y-Q.x*T),r.moveTo(S.x,S.y)):"arc"==J?(T*=1.3,r.curveTo(X.x-Q.y*T,X.y+Q.x*T,S.x-Q.y*T,S.y+Q.x*T,S.x,S.y)):(r.moveTo(S.x,S.y),C=!0),T=[S],X=!0))}else Q=null;X||(T.push(P),O=P)}this.addPoints(r,T,B,D,!1,null,C);r.stroke()}};var k=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(r,x,B,D){return null!=x&&"centerPerimeter"==x.style[mxConstants.STYLE_PERIMETER]?new mxPoint(x.getCenterX(),x.getCenterY()):k.apply(this,arguments)};var n=mxGraphView.prototype.updateFloatingTerminalPoint; -mxGraphView.prototype.updateFloatingTerminalPoint=function(r,x,B,D){if(null==x||null==r||"1"!=x.style.snapToPoint&&"1"!=r.style.snapToPoint)n.apply(this,arguments);else{x=this.getTerminalPort(r,x,D);var F=this.getNextPoint(r,B,D),J=this.graph.isOrthogonal(r),C=mxUtils.toRadians(Number(x.style[mxConstants.STYLE_ROTATION]||"0")),O=new mxPoint(x.getCenterX(),x.getCenterY());if(0!=C){var R=Math.cos(-C),T=Math.sin(-C);F=mxUtils.getRotatedPoint(F,R,T,O)}R=parseFloat(r.style[mxConstants.STYLE_PERIMETER_SPACING]|| -0);R+=parseFloat(r.style[D?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);F=this.getPerimeterPoint(x,F,0==C&&J,R);0!=C&&(R=Math.cos(C),T=Math.sin(C),F=mxUtils.getRotatedPoint(F,R,T,O));r.setAbsoluteTerminalPoint(this.snapToAnchorPoint(r,x,B,D,F),D)}};mxGraphView.prototype.snapToAnchorPoint=function(r,x,B,D,F){if(null!=x&&null!=r){r=this.graph.getAllConnectionConstraints(x);D=B=null;if(null!=r)for(var J=0;J<r.length;J++){var C=this.graph.getConnectionPoint(x, -r[J]);if(null!=C){var O=(C.x-F.x)*(C.x-F.x)+(C.y-F.y)*(C.y-F.y);if(null==D||O<D)B=C,D=O}}null!=B&&(F=B)}return F};var u=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(r,x,B){var D=u.apply(this,arguments);"1"==r.getAttribute("placeholders")&&null!=B.state&&(D=B.state.view.graph.replacePlaceholders(B.state.cell,D));return D};var m=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(r){if(null!=r.style&&"undefined"!==typeof pako){var x= +function(r){g.apply(this,arguments);this.graph.model.isEdge(r.cell)&&1!=r.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(r)};mxGraphView.prototype.updateLineJumps=function(r){var x=r.absolutePoints;if(Graph.lineJumpsEnabled){var B=null!=r.routedPoints,D=null;if(null!=x&&null!=this.validEdges&&"none"!==mxUtils.getValue(r.style,"jumpStyle","none")){var F=function(fa,ra,K){var V=new mxPoint(ra,K);V.type=fa;D.push(V);V=null!=r.routedPoints?r.routedPoints[D.length-1]:null;return null==V||V.type!= +fa||V.x!=ra||V.y!=K},I=.5*this.scale;B=!1;D=[];for(var C=0;C<x.length-1;C++){for(var N=x[C+1],R=x[C],S=[],Q=x[C+2];C<x.length-2&&mxUtils.ptSegDistSq(R.x,R.y,Q.x,Q.y,N.x,N.y)<1*this.scale*this.scale;)N=Q,C++,Q=x[C+2];B=F(0,R.x,R.y)||B;for(var aa=0;aa<this.validEdges.length;aa++){var U=this.validEdges[aa],P=U.absolutePoints;if(null!=P&&mxUtils.intersects(r,U)&&"1"!=U.style.noJump)for(U=0;U<P.length-1;U++){var Y=P[U+1],ja=P[U];for(Q=P[U+2];U<P.length-2&&mxUtils.ptSegDistSq(ja.x,ja.y,Q.x,Q.y,Y.x,Y.y)< +1*this.scale*this.scale;)Y=Q,U++,Q=P[U+2];Q=mxUtils.intersection(R.x,R.y,N.x,N.y,ja.x,ja.y,Y.x,Y.y);if(null!=Q&&(Math.abs(Q.x-R.x)>I||Math.abs(Q.y-R.y)>I)&&(Math.abs(Q.x-N.x)>I||Math.abs(Q.y-N.y)>I)&&(Math.abs(Q.x-ja.x)>I||Math.abs(Q.y-ja.y)>I)&&(Math.abs(Q.x-Y.x)>I||Math.abs(Q.y-Y.y)>I)){Y=Q.x-R.x;ja=Q.y-R.y;Q={distSq:Y*Y+ja*ja,x:Q.x,y:Q.y};for(Y=0;Y<S.length;Y++)if(S[Y].distSq>Q.distSq){S.splice(Y,0,Q);Q=null;break}null==Q||0!=S.length&&S[S.length-1].x===Q.x&&S[S.length-1].y===Q.y||S.push(Q)}}}for(U= +0;U<S.length;U++)B=F(1,S[U].x,S[U].y)||B}Q=x[x.length-1];B=F(0,Q.x,Q.y)||B}r.routedPoints=D;return B}return!1};var d=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(r,x,B){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)d.apply(this,arguments);else{var D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,F=(parseInt(mxUtils.getValue(this.style, +"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,I=mxUtils.getValue(this.style,"jumpStyle","none"),C=!0,N=null,R=null,S=[],Q=null;r.begin();for(var aa=0;aa<this.state.routedPoints.length;aa++){var U=this.state.routedPoints[aa],P=new mxPoint(U.x/this.scale,U.y/this.scale);0==aa?P=x[0]:aa==this.state.routedPoints.length-1&&(P=x[x.length-1]);var Y=!1;if(null!=N&&1==U.type){var ja=this.state.routedPoints[aa+1];U=ja.x/this.scale-P.x;ja=ja.y/this.scale-P.y;U=U*U+ja*ja;null==Q&&(Q=new mxPoint(P.x- +N.x,P.y-N.y),R=Math.sqrt(Q.x*Q.x+Q.y*Q.y),0<R?(Q.x=Q.x*F/R,Q.y=Q.y*F/R):Q=null);U>F*F&&0<R&&(U=N.x-P.x,ja=N.y-P.y,U=U*U+ja*ja,U>F*F&&(Y=new mxPoint(P.x-Q.x,P.y-Q.y),U=new mxPoint(P.x+Q.x,P.y+Q.y),S.push(Y),this.addPoints(r,S,B,D,!1,null,C),S=0>Math.round(Q.x)||0==Math.round(Q.x)&&0>=Math.round(Q.y)?1:-1,C=!1,"sharp"==I?(r.lineTo(Y.x-Q.y*S,Y.y+Q.x*S),r.lineTo(U.x-Q.y*S,U.y+Q.x*S),r.lineTo(U.x,U.y)):"line"==I?(r.moveTo(Y.x+Q.y*S,Y.y-Q.x*S),r.lineTo(Y.x-Q.y*S,Y.y+Q.x*S),r.moveTo(U.x-Q.y*S,U.y+Q.x*S), +r.lineTo(U.x+Q.y*S,U.y-Q.x*S),r.moveTo(U.x,U.y)):"arc"==I?(S*=1.3,r.curveTo(Y.x-Q.y*S,Y.y+Q.x*S,U.x-Q.y*S,U.y+Q.x*S,U.x,U.y)):(r.moveTo(U.x,U.y),C=!0),S=[U],Y=!0))}else Q=null;Y||(S.push(P),N=P)}this.addPoints(r,S,B,D,!1,null,C);r.stroke()}};var k=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(r,x,B,D){return null!=x&&"centerPerimeter"==x.style[mxConstants.STYLE_PERIMETER]?new mxPoint(x.getCenterX(),x.getCenterY()):k.apply(this,arguments)};var n=mxGraphView.prototype.updateFloatingTerminalPoint; +mxGraphView.prototype.updateFloatingTerminalPoint=function(r,x,B,D){if(null==x||null==r||"1"!=x.style.snapToPoint&&"1"!=r.style.snapToPoint)n.apply(this,arguments);else{x=this.getTerminalPort(r,x,D);var F=this.getNextPoint(r,B,D),I=this.graph.isOrthogonal(r),C=mxUtils.toRadians(Number(x.style[mxConstants.STYLE_ROTATION]||"0")),N=new mxPoint(x.getCenterX(),x.getCenterY());if(0!=C){var R=Math.cos(-C),S=Math.sin(-C);F=mxUtils.getRotatedPoint(F,R,S,N)}R=parseFloat(r.style[mxConstants.STYLE_PERIMETER_SPACING]|| +0);R+=parseFloat(r.style[D?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);F=this.getPerimeterPoint(x,F,0==C&&I,R);0!=C&&(R=Math.cos(C),S=Math.sin(C),F=mxUtils.getRotatedPoint(F,R,S,N));r.setAbsoluteTerminalPoint(this.snapToAnchorPoint(r,x,B,D,F),D)}};mxGraphView.prototype.snapToAnchorPoint=function(r,x,B,D,F){if(null!=x&&null!=r){r=this.graph.getAllConnectionConstraints(x);D=B=null;if(null!=r)for(var I=0;I<r.length;I++){var C=this.graph.getConnectionPoint(x, +r[I]);if(null!=C){var N=(C.x-F.x)*(C.x-F.x)+(C.y-F.y)*(C.y-F.y);if(null==D||N<D)B=C,D=N}}null!=B&&(F=B)}return F};var u=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(r,x,B){var D=u.apply(this,arguments);"1"==r.getAttribute("placeholders")&&null!=B.state&&(D=B.state.view.graph.replacePlaceholders(B.state.cell,D));return D};var m=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(r){if(null!=r.style&&"undefined"!==typeof pako){var x= mxUtils.getValue(r.style,mxConstants.STYLE_SHAPE,null);if(null!=x&&"string"===typeof x&&"stencil("==x.substring(0,8))try{var B=x.substring(8,x.length-1),D=mxUtils.parseXml(Graph.decompress(B));return new mxShape(new mxStencil(D.documentElement))}catch(F){null!=window.console&&console.log("Error in shape: "+F)}}return m.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[]; mxStencilRegistry.filesLoaded={}; mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var f=mxStencilRegistry.getBasenameForStencil(a);if(null!=f){b=mxStencilRegistry.libraries[f];if(null!=b){if(null==mxStencilRegistry.packages[f]){for(var e=0;e<b.length;e++){var g=b[e];if(!mxStencilRegistry.filesLoaded[g])if(mxStencilRegistry.filesLoaded[g]=!0,".xml"==g.toLowerCase().substring(g.length-4,g.length))mxStencilRegistry.loadStencilSet(g, @@ -2761,100 +2759,100 @@ function(t){t=this.graph.createCurrentEdgeStyle();t=this.graph.createEdge(null,n return t};mxConnectionHandler.prototype.updatePreview=function(t){};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var t=k.apply(this,arguments),z=t.getCell;t.getCell=mxUtils.bind(this,function(A){var E=z.apply(this,arguments);this.error=null;return E});return t};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle= function(){for(var t="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",z="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),A=0;A<z.length;A++)null!=this.currentEdgeStyle[z[A]]&&(t+=z[A]+"="+this.currentEdgeStyle[z[A]]+";");null!=this.currentEdgeStyle.orthogonalLoop?t+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&& (t+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?t+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(t+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(t+="elbow="+this.currentEdgeStyle.elbow+";");return t=null!=this.currentEdgeStyle.html?t+("html="+this.currentEdgeStyle.html+";"):t+"html=1;"}; -Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var t=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=t&&(new mxCodec(t.ownerDocument)).decode(t,this.getStylesheet())};Graph.prototype.createCellLookup=function(t,z){z=null!=z?z:{};for(var A=0;A<t.length;A++){var E=t[A];z[mxObjectIdentity.get(E)]=E.getId();for(var H=this.model.getChildCount(E), -L=0;L<H;L++)this.createCellLookup([this.model.getChildAt(E,L)],z)}return z};Graph.prototype.createCellMapping=function(t,z,A){A=null!=A?A:{};for(var E in t){var H=z[E];null==A[H]&&(A[H]=t[E].getId()||"")}return A};Graph.prototype.importGraphModel=function(t,z,A,E){z=null!=z?z:0;A=null!=A?A:0;var H=new mxCodec(t.ownerDocument),L=new mxGraphModel;H.decode(t,L);t=[];H={};var W={},ia=L.getChildren(this.cloneCell(L.root,this.isCloneInvalidEdges(),H));if(null!=ia){var ea=this.createCellLookup([L.root]); -ia=ia.slice();this.model.beginUpdate();try{if(1!=ia.length||this.isCellLocked(this.getDefaultParent()))for(L=0;L<ia.length;L++)ja=this.model.getChildren(this.moveCells([ia[L]],z,A,!1,this.model.getRoot())[0]),null!=ja&&(t=t.concat(ja));else{var ja=L.getChildren(ia[0]);null!=ja&&(t=this.moveCells(ja,z,A,!1,this.getDefaultParent()),W[L.getChildAt(L.root,0).getId()]=this.getDefaultParent().getId())}if(null!=t&&(this.createCellMapping(H,ea,W),this.updateCustomLinks(W,t),E)){this.isGridEnabled()&&(z=this.snap(z), -A=this.snap(A));var ta=this.getBoundingBoxFromGeometry(t,!0);null!=ta&&this.moveCells(t,z-ta.x,A-ta.y)}}finally{this.model.endUpdate()}}return t};Graph.prototype.encodeCells=function(t){for(var z={},A=this.cloneCells(t,null,z),E=new mxDictionary,H=0;H<t.length;H++)E.put(t[H],!0);var L=new mxCodec,W=new mxGraphModel,ia=W.getChildAt(W.getRoot(),0);for(H=0;H<A.length;H++){W.add(ia,A[H]);var ea=this.view.getState(t[H]);if(null!=ea){var ja=this.getCellGeometry(A[H]);null!=ja&&ja.relative&&!this.model.isEdge(t[H])&& -null==E.get(this.model.getParent(t[H]))&&(ja.offset=null,ja.relative=!1,ja.x=ea.x/ea.view.scale-ea.view.translate.x,ja.y=ea.y/ea.view.scale-ea.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(z,this.createCellLookup(t)),A);return L.encode(W)};Graph.prototype.isSwimlane=function(t,z){var A=null;null==t||this.model.isEdge(t)||this.model.getParent(t)==this.model.getRoot()||(A=this.getCurrentCellStyle(t,z)[mxConstants.STYLE_SHAPE]);return A==mxConstants.SHAPE_SWIMLANE||"table"==A||"tableRow"== -A};var n=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(t){var z=this.model.getParent(t);if(null!=z){var A=this.getCurrentCellStyle(z);if(null!=A.expand)return"0"!=A.expand}return n.apply(this,arguments)&&(null==z||!this.isTable(z))};var u=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(t,z,A,E,H,L,W,ia){null==ia&&(ia=this.model.getParent(t),this.isTable(ia)||this.isTableRow(ia))&&(ia=this.getCellAt(L,W,null,!0,!1));A=null;this.model.beginUpdate();try{A=u.apply(this, -[t,z,A,E,H,L,W,ia]);this.model.setValue(A,"");var ea=this.getChildCells(A,!0);for(z=0;z<ea.length;z++){var ja=this.getCellGeometry(ea[z]);null!=ja&&ja.relative&&0<ja.x&&this.model.remove(ea[z])}var ta=this.getChildCells(t,!0);for(z=0;z<ta.length;z++)ja=this.getCellGeometry(ta[z]),null!=ja&&ja.relative&&0>=ja.x&&this.model.remove(ta[z]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[A]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[A]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING, -null,[t]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[t]);var Aa=this.model.getTerminal(A,!1);if(null!=Aa){var Ea=this.getCurrentCellStyle(Aa);null!=Ea&&"1"==Ea.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[t]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[t]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[A]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[A]))}}finally{this.model.endUpdate()}return A};var m=Graph.prototype.selectCell;Graph.prototype.selectCell= -function(t,z,A){if(z||A)m.apply(this,arguments);else{var E=this.getSelectionCell(),H=null,L=[],W=mxUtils.bind(this,function(ia){if(null!=this.view.getState(ia)&&(this.model.isVertex(ia)||this.model.isEdge(ia)))if(L.push(ia),ia==E)H=L.length-1;else if(t&&null==E&&0<L.length||null!=H&&t&&L.length>H||!t&&0<H)return;for(var ea=0;ea<this.model.getChildCount(ia);ea++)W(this.model.getChildAt(ia,ea))});W(this.model.root);0<L.length&&(H=null!=H?mxUtils.mod(H+(t?1:-1),L.length):0,this.setSelectionCell(L[H]))}}; -Graph.prototype.swapShapes=function(t,z,A,E,H,L,W){z=!1;if(!E&&null!=H&&1==t.length&&(E=this.view.getState(H),A=this.view.getState(t[0]),null!=E&&null!=A&&(null!=L&&mxEvent.isShiftDown(L)||"umlLifeline"==E.style.shape&&"umlLifeline"==A.style.shape)&&(E=this.getCellGeometry(H),L=this.getCellGeometry(t[0]),null!=E&&null!=L))){z=E.clone();E=L.clone();E.x=z.x;E.y=z.y;z.x=L.x;z.y=L.y;this.model.beginUpdate();try{this.model.setGeometry(H,z),this.model.setGeometry(t[0],E)}finally{this.model.endUpdate()}z= -!0}return z};var r=Graph.prototype.moveCells;Graph.prototype.moveCells=function(t,z,A,E,H,L,W){if(this.swapShapes(t,z,A,E,H,L,W))return t;W=null!=W?W:{};if(this.isTable(H)){for(var ia=[],ea=0;ea<t.length;ea++)this.isTable(t[ea])?ia=ia.concat(this.model.getChildCells(t[ea],!0).reverse()):ia.push(t[ea]);t=ia}this.model.beginUpdate();try{ia=[];for(ea=0;ea<t.length;ea++)if(null!=H&&this.isTableRow(t[ea])){var ja=this.model.getParent(t[ea]),ta=this.getCellGeometry(t[ea]);this.isTable(ja)&&ia.push(ja); -if(null!=ja&&null!=ta&&this.isTable(ja)&&this.isTable(H)&&(E||ja!=H)){if(!E){var Aa=this.getCellGeometry(ja);null!=Aa&&(Aa=Aa.clone(),Aa.height-=ta.height,this.model.setGeometry(ja,Aa))}Aa=this.getCellGeometry(H);null!=Aa&&(Aa=Aa.clone(),Aa.height+=ta.height,this.model.setGeometry(H,Aa));var Ea=this.model.getChildCells(H,!0);if(0<Ea.length){t[ea]=E?this.cloneCell(t[ea]):t[ea];var Ma=this.model.getChildCells(t[ea],!0),La=this.model.getChildCells(Ea[0],!0),Ia=La.length-Ma.length;if(0<Ia)for(var Fa= +Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var t=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=t&&(new mxCodec(t.ownerDocument)).decode(t,this.getStylesheet())};Graph.prototype.createCellLookup=function(t,z){z=null!=z?z:{};for(var A=0;A<t.length;A++){var E=t[A];z[mxObjectIdentity.get(E)]=E.getId();for(var G=this.model.getChildCount(E), +L=0;L<G;L++)this.createCellLookup([this.model.getChildAt(E,L)],z)}return z};Graph.prototype.createCellMapping=function(t,z,A){A=null!=A?A:{};for(var E in t){var G=z[E];null==A[G]&&(A[G]=t[E].getId()||"")}return A};Graph.prototype.importGraphModel=function(t,z,A,E){z=null!=z?z:0;A=null!=A?A:0;var G=new mxCodec(t.ownerDocument),L=new mxGraphModel;G.decode(t,L);t=[];G={};var X={},ia=L.getChildren(this.cloneCell(L.root,this.isCloneInvalidEdges(),G));if(null!=ia){var ea=this.createCellLookup([L.root]); +ia=ia.slice();this.model.beginUpdate();try{if(1!=ia.length||this.isCellLocked(this.getDefaultParent()))for(L=0;L<ia.length;L++)ka=this.model.getChildren(this.moveCells([ia[L]],z,A,!1,this.model.getRoot())[0]),null!=ka&&(t=t.concat(ka));else{var ka=L.getChildren(ia[0]);null!=ka&&(t=this.moveCells(ka,z,A,!1,this.getDefaultParent()),X[L.getChildAt(L.root,0).getId()]=this.getDefaultParent().getId())}if(null!=t&&(this.createCellMapping(G,ea,X),this.updateCustomLinks(X,t),E)){this.isGridEnabled()&&(z=this.snap(z), +A=this.snap(A));var va=this.getBoundingBoxFromGeometry(t,!0);null!=va&&this.moveCells(t,z-va.x,A-va.y)}}finally{this.model.endUpdate()}}return t};Graph.prototype.encodeCells=function(t){for(var z={},A=this.cloneCells(t,null,z),E=new mxDictionary,G=0;G<t.length;G++)E.put(t[G],!0);var L=new mxCodec,X=new mxGraphModel,ia=X.getChildAt(X.getRoot(),0);for(G=0;G<A.length;G++){X.add(ia,A[G]);var ea=this.view.getState(t[G]);if(null!=ea){var ka=this.getCellGeometry(A[G]);null!=ka&&ka.relative&&!this.model.isEdge(t[G])&& +null==E.get(this.model.getParent(t[G]))&&(ka.offset=null,ka.relative=!1,ka.x=ea.x/ea.view.scale-ea.view.translate.x,ka.y=ea.y/ea.view.scale-ea.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(z,this.createCellLookup(t)),A);return L.encode(X)};Graph.prototype.isSwimlane=function(t,z){var A=null;null==t||this.model.isEdge(t)||this.model.getParent(t)==this.model.getRoot()||(A=this.getCurrentCellStyle(t,z)[mxConstants.STYLE_SHAPE]);return A==mxConstants.SHAPE_SWIMLANE||"table"==A||"tableRow"== +A};var n=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(t){var z=this.model.getParent(t);if(null!=z){var A=this.getCurrentCellStyle(z);if(null!=A.expand)return"0"!=A.expand}return n.apply(this,arguments)&&(null==z||!this.isTable(z))};var u=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(t,z,A,E,G,L,X,ia){null==ia&&(ia=this.model.getParent(t),this.isTable(ia)||this.isTableRow(ia))&&(ia=this.getCellAt(L,X,null,!0,!1));A=null;this.model.beginUpdate();try{A=u.apply(this, +[t,z,A,E,G,L,X,ia]);this.model.setValue(A,"");var ea=this.getChildCells(A,!0);for(z=0;z<ea.length;z++){var ka=this.getCellGeometry(ea[z]);null!=ka&&ka.relative&&0<ka.x&&this.model.remove(ea[z])}var va=this.getChildCells(t,!0);for(z=0;z<va.length;z++)ka=this.getCellGeometry(va[z]),null!=ka&&ka.relative&&0>=ka.x&&this.model.remove(va[z]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[A]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[A]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING, +null,[t]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[t]);var Ba=this.model.getTerminal(A,!1);if(null!=Ba){var Ea=this.getCurrentCellStyle(Ba);null!=Ea&&"1"==Ea.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[t]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[t]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[A]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[A]))}}finally{this.model.endUpdate()}return A};var m=Graph.prototype.selectCell;Graph.prototype.selectCell= +function(t,z,A){if(z||A)m.apply(this,arguments);else{var E=this.getSelectionCell(),G=null,L=[],X=mxUtils.bind(this,function(ia){if(null!=this.view.getState(ia)&&(this.model.isVertex(ia)||this.model.isEdge(ia)))if(L.push(ia),ia==E)G=L.length-1;else if(t&&null==E&&0<L.length||null!=G&&t&&L.length>G||!t&&0<G)return;for(var ea=0;ea<this.model.getChildCount(ia);ea++)X(this.model.getChildAt(ia,ea))});X(this.model.root);0<L.length&&(G=null!=G?mxUtils.mod(G+(t?1:-1),L.length):0,this.setSelectionCell(L[G]))}}; +Graph.prototype.swapShapes=function(t,z,A,E,G,L,X){z=!1;if(!E&&null!=G&&1==t.length&&(E=this.view.getState(G),A=this.view.getState(t[0]),null!=E&&null!=A&&(null!=L&&mxEvent.isShiftDown(L)||"umlLifeline"==E.style.shape&&"umlLifeline"==A.style.shape)&&(E=this.getCellGeometry(G),L=this.getCellGeometry(t[0]),null!=E&&null!=L))){z=E.clone();E=L.clone();E.x=z.x;E.y=z.y;z.x=L.x;z.y=L.y;this.model.beginUpdate();try{this.model.setGeometry(G,z),this.model.setGeometry(t[0],E)}finally{this.model.endUpdate()}z= +!0}return z};var r=Graph.prototype.moveCells;Graph.prototype.moveCells=function(t,z,A,E,G,L,X){if(this.swapShapes(t,z,A,E,G,L,X))return t;X=null!=X?X:{};if(this.isTable(G)){for(var ia=[],ea=0;ea<t.length;ea++)this.isTable(t[ea])?ia=ia.concat(this.model.getChildCells(t[ea],!0).reverse()):ia.push(t[ea]);t=ia}this.model.beginUpdate();try{ia=[];for(ea=0;ea<t.length;ea++)if(null!=G&&this.isTableRow(t[ea])){var ka=this.model.getParent(t[ea]),va=this.getCellGeometry(t[ea]);this.isTable(ka)&&ia.push(ka); +if(null!=ka&&null!=va&&this.isTable(ka)&&this.isTable(G)&&(E||ka!=G)){if(!E){var Ba=this.getCellGeometry(ka);null!=Ba&&(Ba=Ba.clone(),Ba.height-=va.height,this.model.setGeometry(ka,Ba))}Ba=this.getCellGeometry(G);null!=Ba&&(Ba=Ba.clone(),Ba.height+=va.height,this.model.setGeometry(G,Ba));var Ea=this.model.getChildCells(G,!0);if(0<Ea.length){t[ea]=E?this.cloneCell(t[ea]):t[ea];var Ma=this.model.getChildCells(t[ea],!0),La=this.model.getChildCells(Ea[0],!0),Ia=La.length-Ma.length;if(0<Ia)for(var Fa= 0;Fa<Ia;Fa++){var Ga=this.cloneCell(Ma[Ma.length-1]);null!=Ga&&(Ga.value="",this.model.add(t[ea],Ga))}else if(0>Ia)for(Fa=0;Fa>Ia;Fa--)this.model.remove(Ma[Ma.length+Fa-1]);Ma=this.model.getChildCells(t[ea],!0);for(Fa=0;Fa<La.length;Fa++){var Oa=this.getCellGeometry(La[Fa]),Pa=this.getCellGeometry(Ma[Fa]);null!=Oa&&null!=Pa&&(Pa=Pa.clone(),Pa.width=Oa.width,this.model.setGeometry(Ma[Fa],Pa))}}}}var Na=r.apply(this,arguments);for(ea=0;ea<ia.length;ea++)!E&&this.model.contains(ia[ea])&&0==this.model.getChildCount(ia[ea])&& -this.model.remove(ia[ea]);E&&this.updateCustomLinks(this.createCellMapping(W,this.createCellLookup(t)),Na)}finally{this.model.endUpdate()}return Na};var x=Graph.prototype.removeCells;Graph.prototype.removeCells=function(t,z){var A=[];this.model.beginUpdate();try{for(var E=0;E<t.length;E++)if(this.isTableCell(t[E])){var H=this.model.getParent(t[E]),L=this.model.getParent(H);1==this.model.getChildCount(H)&&1==this.model.getChildCount(L)?0>mxUtils.indexOf(t,L)&&0>mxUtils.indexOf(A,L)&&A.push(L):this.labelChanged(t[E], -"")}else{if(this.isTableRow(t[E])&&(L=this.model.getParent(t[E]),0>mxUtils.indexOf(t,L)&&0>mxUtils.indexOf(A,L))){for(var W=this.model.getChildCells(L,!0),ia=0,ea=0;ea<W.length;ea++)0<=mxUtils.indexOf(t,W[ea])&&ia++;ia==W.length&&A.push(L)}A.push(t[E])}A=x.apply(this,[A,z])}finally{this.model.endUpdate()}return A};Graph.prototype.updateCustomLinks=function(t,z,A){A=null!=A?A:new Graph;for(var E=0;E<z.length;E++)null!=z[E]&&A.updateCustomLinksForCell(t,z[E],A)};Graph.prototype.updateCustomLinksForCell= +this.model.remove(ia[ea]);E&&this.updateCustomLinks(this.createCellMapping(X,this.createCellLookup(t)),Na)}finally{this.model.endUpdate()}return Na};var x=Graph.prototype.removeCells;Graph.prototype.removeCells=function(t,z){var A=[];this.model.beginUpdate();try{for(var E=0;E<t.length;E++)if(this.isTableCell(t[E])){var G=this.model.getParent(t[E]),L=this.model.getParent(G);1==this.model.getChildCount(G)&&1==this.model.getChildCount(L)?0>mxUtils.indexOf(t,L)&&0>mxUtils.indexOf(A,L)&&A.push(L):this.labelChanged(t[E], +"")}else{if(this.isTableRow(t[E])&&(L=this.model.getParent(t[E]),0>mxUtils.indexOf(t,L)&&0>mxUtils.indexOf(A,L))){for(var X=this.model.getChildCells(L,!0),ia=0,ea=0;ea<X.length;ea++)0<=mxUtils.indexOf(t,X[ea])&&ia++;ia==X.length&&A.push(L)}A.push(t[E])}A=x.apply(this,[A,z])}finally{this.model.endUpdate()}return A};Graph.prototype.updateCustomLinks=function(t,z,A){A=null!=A?A:new Graph;for(var E=0;E<z.length;E++)null!=z[E]&&A.updateCustomLinksForCell(t,z[E],A)};Graph.prototype.updateCustomLinksForCell= function(t,z){this.doUpdateCustomLinksForCell(t,z);for(var A=this.model.getChildCount(z),E=0;E<A;E++)this.updateCustomLinksForCell(t,this.model.getChildAt(z,E))};Graph.prototype.doUpdateCustomLinksForCell=function(t,z){};Graph.prototype.getAllConnectionConstraints=function(t,z){if(null!=t){z=mxUtils.getValue(t.style,"points",null);if(null!=z){t=[];try{var A=JSON.parse(z);for(z=0;z<A.length;z++){var E=A[z];t.push(new mxConnectionConstraint(new mxPoint(E[0],E[1]),2<E.length?"0"!=E[2]:!0,null,3<E.length? -E[3]:0,4<E.length?E[4]:0))}}catch(L){}return t}if(null!=t.shape&&null!=t.shape.bounds){E=t.shape.direction;z=t.shape.bounds;var H=t.shape.scale;A=z.width/H;z=z.height/H;if(E==mxConstants.DIRECTION_NORTH||E==mxConstants.DIRECTION_SOUTH)E=A,A=z,z=E;z=t.shape.getConstraints(t.style,A,z);if(null!=z)return z;if(null!=t.shape.stencil&&null!=t.shape.stencil.constraints)return t.shape.stencil.constraints;if(null!=t.shape.constraints)return t.shape.constraints}}return null};Graph.prototype.flipEdge=function(t){if(null!= -t){var z=this.getCurrentCellStyle(t);z=mxUtils.getValue(z,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,z,[t])}};Graph.prototype.isValidRoot=function(t){for(var z=this.model.getChildCount(t),A=0,E=0;E<z;E++){var H=this.model.getChildAt(t,E);this.model.isVertex(H)&&(H=this.getCellGeometry(H),null==H||H.relative||A++)}return 0<A||this.isContainer(t)};Graph.prototype.isValidDropTarget= -function(t,z,A){for(var E=this.getCurrentCellStyle(t),H=!0,L=!0,W=0;W<z.length&&L;W++)H=H&&this.isTable(z[W]),L=L&&this.isTableRow(z[W]);return(1==z.length&&null!=A&&mxEvent.isShiftDown(A)&&!mxEvent.isControlDown(A)&&!mxEvent.isAltDown(A)||("1"!=mxUtils.getValue(E,"part","0")||this.isContainer(t))&&"0"!=mxUtils.getValue(E,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(t))&&!this.isTableRow(t)&&(!this.isTable(t)||L||H))&&!this.isCellLocked(t)};Graph.prototype.createGroupCell= +E[3]:0,4<E.length?E[4]:0))}}catch(L){}return t}if(null!=t.shape&&null!=t.shape.bounds){E=t.shape.direction;z=t.shape.bounds;var G=t.shape.scale;A=z.width/G;z=z.height/G;if(E==mxConstants.DIRECTION_NORTH||E==mxConstants.DIRECTION_SOUTH)E=A,A=z,z=E;z=t.shape.getConstraints(t.style,A,z);if(null!=z)return z;if(null!=t.shape.stencil&&null!=t.shape.stencil.constraints)return t.shape.stencil.constraints;if(null!=t.shape.constraints)return t.shape.constraints}}return null};Graph.prototype.flipEdge=function(t){if(null!= +t){var z=this.getCurrentCellStyle(t);z=mxUtils.getValue(z,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,z,[t])}};Graph.prototype.isValidRoot=function(t){for(var z=this.model.getChildCount(t),A=0,E=0;E<z;E++){var G=this.model.getChildAt(t,E);this.model.isVertex(G)&&(G=this.getCellGeometry(G),null==G||G.relative||A++)}return 0<A||this.isContainer(t)};Graph.prototype.isValidDropTarget= +function(t,z,A){for(var E=this.getCurrentCellStyle(t),G=!0,L=!0,X=0;X<z.length&&L;X++)G=G&&this.isTable(z[X]),L=L&&this.isTableRow(z[X]);return(1==z.length&&null!=A&&mxEvent.isShiftDown(A)&&!mxEvent.isControlDown(A)&&!mxEvent.isAltDown(A)||("1"!=mxUtils.getValue(E,"part","0")||this.isContainer(t))&&"0"!=mxUtils.getValue(E,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(t))&&!this.isTableRow(t)&&(!this.isTable(t)||L||G))&&!this.isCellLocked(t)};Graph.prototype.createGroupCell= function(){var t=mxGraph.prototype.createGroupCell.apply(this,arguments);t.setStyle("group");return t};Graph.prototype.isExtendParentsOnAdd=function(t){var z=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(z&&null!=t&&null!=this.layoutManager){var A=this.model.getParent(t);null!=A&&(A=this.layoutManager.getLayout(A),null!=A&&A.constructor==mxStackLayout&&(z=!1))}return z};Graph.prototype.getPreferredSizeForCell=function(t){var z=mxGraph.prototype.getPreferredSizeForCell.apply(this, -arguments);null!=z&&(z.width+=10,z.height+=4,this.gridEnabled&&(z.width=this.snap(z.width),z.height=this.snap(z.height)));return z};Graph.prototype.turnShapes=function(t,z){var A=this.getModel(),E=[];A.beginUpdate();try{for(var H=0;H<t.length;H++){var L=t[H];if(A.isEdge(L)){var W=A.getTerminal(L,!0),ia=A.getTerminal(L,!1);A.setTerminal(L,ia,!0);A.setTerminal(L,W,!1);var ea=A.getGeometry(L);if(null!=ea){ea=ea.clone();null!=ea.points&&ea.points.reverse();var ja=ea.getTerminalPoint(!0),ta=ea.getTerminalPoint(!1); -ea.setTerminalPoint(ja,!1);ea.setTerminalPoint(ta,!0);A.setGeometry(L,ea);var Aa=this.view.getState(L),Ea=this.view.getState(W),Ma=this.view.getState(ia);if(null!=Aa){var La=null!=Ea?this.getConnectionConstraint(Aa,Ea,!0):null,Ia=null!=Ma?this.getConnectionConstraint(Aa,Ma,!1):null;this.setConnectionConstraint(L,W,!0,Ia);this.setConnectionConstraint(L,ia,!1,La);var Fa=mxUtils.getValue(Aa.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING, -mxUtils.getValue(Aa.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[L]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Fa,[L])}E.push(L)}}else if(A.isVertex(L)&&(ea=this.getCellGeometry(L),null!=ea)){if(!(this.isTable(L)||this.isTableRow(L)||this.isTableCell(L)||this.isSwimlane(L))){ea=ea.clone();ea.x+=ea.width/2-ea.height/2;ea.y+=ea.height/2-ea.width/2;var Ga=ea.width;ea.width=ea.height;ea.height=Ga;A.setGeometry(L,ea)}var Oa=this.view.getState(L);if(null!=Oa){var Pa=[mxConstants.DIRECTION_EAST, +arguments);null!=z&&(z.width+=10,z.height+=4,this.gridEnabled&&(z.width=this.snap(z.width),z.height=this.snap(z.height)));return z};Graph.prototype.turnShapes=function(t,z){var A=this.getModel(),E=[];A.beginUpdate();try{for(var G=0;G<t.length;G++){var L=t[G];if(A.isEdge(L)){var X=A.getTerminal(L,!0),ia=A.getTerminal(L,!1);A.setTerminal(L,ia,!0);A.setTerminal(L,X,!1);var ea=A.getGeometry(L);if(null!=ea){ea=ea.clone();null!=ea.points&&ea.points.reverse();var ka=ea.getTerminalPoint(!0),va=ea.getTerminalPoint(!1); +ea.setTerminalPoint(ka,!1);ea.setTerminalPoint(va,!0);A.setGeometry(L,ea);var Ba=this.view.getState(L),Ea=this.view.getState(X),Ma=this.view.getState(ia);if(null!=Ba){var La=null!=Ea?this.getConnectionConstraint(Ba,Ea,!0):null,Ia=null!=Ma?this.getConnectionConstraint(Ba,Ma,!1):null;this.setConnectionConstraint(L,X,!0,Ia);this.setConnectionConstraint(L,ia,!1,La);var Fa=mxUtils.getValue(Ba.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING, +mxUtils.getValue(Ba.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[L]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Fa,[L])}E.push(L)}}else if(A.isVertex(L)&&(ea=this.getCellGeometry(L),null!=ea)){if(!(this.isTable(L)||this.isTableRow(L)||this.isTableCell(L)||this.isSwimlane(L))){ea=ea.clone();ea.x+=ea.width/2-ea.height/2;ea.y+=ea.height/2-ea.width/2;var Ga=ea.width;ea.width=ea.height;ea.height=Ga;A.setGeometry(L,ea)}var Oa=this.view.getState(L);if(null!=Oa){var Pa=[mxConstants.DIRECTION_EAST, mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Na=mxUtils.getValue(Oa.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Pa[mxUtils.mod(mxUtils.indexOf(Pa,Na)+(z?-1:1),Pa.length)],[L])}E.push(L)}}}finally{A.endUpdate()}return E};Graph.prototype.stencilHasPlaceholders=function(t){if(null!=t&&null!=t.fgNode)for(t=t.fgNode.firstChild;null!=t;){if("text"==t.nodeName&&"1"==t.getAttribute("placeholders"))return!0; t=t.nextSibling}return!1};var B=Graph.prototype.processChange;Graph.prototype.processChange=function(t){if(t instanceof mxGeometryChange&&(this.isTableCell(t.cell)||this.isTableRow(t.cell))&&(null==t.previous&&null!=t.geometry||null!=t.previous&&!t.previous.equals(t.geometry))){var z=t.cell;this.isTableCell(z)&&(z=this.model.getParent(z));this.isTableRow(z)&&(z=this.model.getParent(z));var A=this.view.getState(z);null!=A&&null!=A.shape&&(this.view.invalidate(z),A.shape.bounds=null)}B.apply(this,arguments); t instanceof mxValueChange&&null!=t.cell&&null!=t.cell.value&&"object"==typeof t.cell.value&&this.invalidateDescendantsWithPlaceholders(t.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(t){t=this.model.getDescendants(t);if(0<t.length)for(var z=0;z<t.length;z++){var A=this.view.getState(t[z]);null!=A&&null!=A.shape&&null!=A.shape.stencil&&this.stencilHasPlaceholders(A.shape.stencil)?this.removeStateForCell(t[z]):this.isReplacePlaceholders(t[z])&&this.view.invalidate(t[z],!1,!1)}}; Graph.prototype.replaceElement=function(t,z){z=t.ownerDocument.createElement(null!=z?z:"span");for(var A=Array.prototype.slice.call(t.attributes);attr=A.pop();)z.setAttribute(attr.nodeName,attr.nodeValue);z.innerHTML=t.innerHTML;t.parentNode.replaceChild(z,t)};Graph.prototype.processElements=function(t,z){if(null!=t){t=t.getElementsByTagName("*");for(var A=0;A<t.length;A++)z(t[A])}};Graph.prototype.updateLabelElements=function(t,z,A){t=null!=t?t:this.getSelectionCells();for(var E=document.createElement("div"), -H=0;H<t.length;H++)if(this.isHtmlLabel(t[H])){var L=this.convertValueToString(t[H]);if(null!=L&&0<L.length){E.innerHTML=L;for(var W=E.getElementsByTagName(null!=A?A:"*"),ia=0;ia<W.length;ia++)z(W[ia]);E.innerHTML!=L&&this.cellLabelChanged(t[H],E.innerHTML)}}};Graph.prototype.cellLabelChanged=function(t,z,A){z=Graph.zapGremlins(z);this.model.beginUpdate();try{if(null!=t.value&&"object"==typeof t.value){if(this.isReplacePlaceholders(t)&&null!=t.getAttribute("placeholder"))for(var E=t.getAttribute("placeholder"), -H=t;null!=H;){if(H==this.model.getRoot()||null!=H.value&&"object"==typeof H.value&&H.hasAttribute(E)){this.setAttributeForCell(H,E,z);break}H=this.model.getParent(H)}var L=t.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&L.hasAttribute("label_"+Graph.diagramLanguage)?L.setAttribute("label_"+Graph.diagramLanguage,z):L.setAttribute("label",z);z=L}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(t){if(null!= -t){for(var z=new mxDictionary,A=0;A<t.length;A++)z.put(t[A],!0);var E=[];for(A=0;A<t.length;A++){var H=this.model.getParent(t[A]);null==H||z.get(H)||(z.put(H,!0),E.push(H))}for(A=0;A<E.length;A++)if(H=this.view.getState(E[A]),null!=H&&(this.model.isEdge(H.cell)||this.model.isVertex(H.cell))&&this.isCellDeletable(H.cell)&&this.isTransparentState(H)){for(var L=!0,W=0;W<this.model.getChildCount(H.cell)&&L;W++)z.get(this.model.getChildAt(H.cell,W))||(L=!1);L&&t.push(H.cell)}}mxGraph.prototype.cellsRemoved.apply(this, +G=0;G<t.length;G++)if(this.isHtmlLabel(t[G])){var L=this.convertValueToString(t[G]);if(null!=L&&0<L.length){E.innerHTML=L;for(var X=E.getElementsByTagName(null!=A?A:"*"),ia=0;ia<X.length;ia++)z(X[ia]);E.innerHTML!=L&&this.cellLabelChanged(t[G],E.innerHTML)}}};Graph.prototype.cellLabelChanged=function(t,z,A){z=Graph.zapGremlins(z);this.model.beginUpdate();try{if(null!=t.value&&"object"==typeof t.value){if(this.isReplacePlaceholders(t)&&null!=t.getAttribute("placeholder"))for(var E=t.getAttribute("placeholder"), +G=t;null!=G;){if(G==this.model.getRoot()||null!=G.value&&"object"==typeof G.value&&G.hasAttribute(E)){this.setAttributeForCell(G,E,z);break}G=this.model.getParent(G)}var L=t.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&L.hasAttribute("label_"+Graph.diagramLanguage)?L.setAttribute("label_"+Graph.diagramLanguage,z):L.setAttribute("label",z);z=L}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(t){if(null!= +t){for(var z=new mxDictionary,A=0;A<t.length;A++)z.put(t[A],!0);var E=[];for(A=0;A<t.length;A++){var G=this.model.getParent(t[A]);null==G||z.get(G)||(z.put(G,!0),E.push(G))}for(A=0;A<E.length;A++)if(G=this.view.getState(E[A]),null!=G&&(this.model.isEdge(G.cell)||this.model.isVertex(G.cell))&&this.isCellDeletable(G.cell)&&this.isTransparentState(G)){for(var L=!0,X=0;X<this.model.getChildCount(G.cell)&&L;X++)z.get(this.model.getChildAt(G.cell,X))||(L=!1);L&&t.push(G.cell)}}mxGraph.prototype.cellsRemoved.apply(this, arguments)};Graph.prototype.removeCellsAfterUngroup=function(t){for(var z=[],A=0;A<t.length;A++)this.isCellDeletable(t[A])&&this.isTransparentState(this.view.getState(t[A]))&&z.push(t[A]);t=z;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(t,z){this.setAttributeForCell(t,"link",z)};Graph.prototype.setTooltipForCell=function(t,z){var A="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(t.value)&&t.value.hasAttribute("tooltip_"+ Graph.diagramLanguage)&&(A="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(t,A,z)};Graph.prototype.getAttributeForCell=function(t,z,A){t=null!=t.value&&"object"===typeof t.value?t.value.getAttribute(z):null;return null!=t?t:A};Graph.prototype.setAttributeForCell=function(t,z,A){if(null!=t.value&&"object"==typeof t.value)var E=t.value.cloneNode(!0);else E=mxUtils.createXmlDocument().createElement("UserObject"),E.setAttribute("label",t.value||"");null!=A?E.setAttribute(z,A):E.removeAttribute(z); -this.model.setValue(t,E)};var D=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(t,z,A,E){this.getModel();if(mxEvent.isAltDown(z))return null;for(var H=0;H<t.length;H++){var L=this.model.getParent(t[H]);if(this.model.isEdge(L)&&0>mxUtils.indexOf(t,L))return null}L=D.apply(this,arguments);var W=!0;for(H=0;H<t.length&&W;H++)W=W&&this.isTableRow(t[H]);W&&(this.isTableCell(L)&&(L=this.model.getParent(L)),this.isTableRow(L)&&(L=this.model.getParent(L)),this.isTable(L)||(L=null));return L}; +this.model.setValue(t,E)};var D=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(t,z,A,E){this.getModel();if(mxEvent.isAltDown(z))return null;for(var G=0;G<t.length;G++){var L=this.model.getParent(t[G]);if(this.model.isEdge(L)&&0>mxUtils.indexOf(t,L))return null}L=D.apply(this,arguments);var X=!0;for(G=0;G<t.length&&X;G++)X=X&&this.isTableRow(t[G]);X&&(this.isTableCell(L)&&(L=this.model.getParent(L)),this.isTableRow(L)&&(L=this.model.getParent(L)),this.isTable(L)||(L=null));return L}; Graph.prototype.click=function(t){mxGraph.prototype.click.call(this,t);this.firstClickState=t.getState();this.firstClickSource=t.getSource()};Graph.prototype.dblClick=function(t,z){this.isEnabled()&&(z=this.insertTextForEvent(t,z),mxGraph.prototype.dblClick.call(this,t,z))};Graph.prototype.insertTextForEvent=function(t,z){var A=mxUtils.convertPoint(this.container,mxEvent.getClientX(t),mxEvent.getClientY(t));if(null!=t&&!this.model.isVertex(z)){var E=this.model.isEdge(z)?this.view.getState(z):null, -H=mxEvent.getSource(t);this.firstClickState!=E||this.firstClickSource!=H||null!=E&&null!=E.text&&null!=E.text.node&&null!=E.text.boundingBox&&(mxUtils.contains(E.text.boundingBox,A.x,A.y)||mxUtils.isAncestorNode(E.text.node,mxEvent.getSource(t)))||(null!=E||this.isCellLocked(this.getDefaultParent()))&&(null==E||this.isCellLocked(E.cell))||!(null!=E||mxClient.IS_SVG&&H==this.view.getCanvas().ownerSVGElement)||(null==E&&(E=this.view.getState(this.getCellAt(A.x,A.y))),z=this.addText(A.x,A.y,E))}return z}; -Graph.prototype.getInsertPoint=function(){var t=this.getGridSize(),z=this.container.scrollLeft/this.view.scale-this.view.translate.x,A=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var E=this.getPageLayout(),H=this.getPageSize();z=Math.max(z,E.x*H.width);A=Math.max(A,E.y*H.height)}return new mxPoint(this.snap(z+t),this.snap(A+t))};Graph.prototype.getFreeInsertPoint=function(){var t=this.view,z=this.getGraphBounds(),A=this.getInsertPoint(),E=this.snap(Math.round(Math.max(A.x, +G=mxEvent.getSource(t);this.firstClickState!=E||this.firstClickSource!=G||null!=E&&null!=E.text&&null!=E.text.node&&null!=E.text.boundingBox&&(mxUtils.contains(E.text.boundingBox,A.x,A.y)||mxUtils.isAncestorNode(E.text.node,mxEvent.getSource(t)))||(null!=E||this.isCellLocked(this.getDefaultParent()))&&(null==E||this.isCellLocked(E.cell))||!(null!=E||mxClient.IS_SVG&&G==this.view.getCanvas().ownerSVGElement)||(null==E&&(E=this.view.getState(this.getCellAt(A.x,A.y))),z=this.addText(A.x,A.y,E))}return z}; +Graph.prototype.getInsertPoint=function(){var t=this.getGridSize(),z=this.container.scrollLeft/this.view.scale-this.view.translate.x,A=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var E=this.getPageLayout(),G=this.getPageSize();z=Math.max(z,E.x*G.width);A=Math.max(A,E.y*G.height)}return new mxPoint(this.snap(z+t),this.snap(A+t))};Graph.prototype.getFreeInsertPoint=function(){var t=this.view,z=this.getGraphBounds(),A=this.getInsertPoint(),E=this.snap(Math.round(Math.max(A.x, z.x/t.scale-t.translate.x+(0==z.width?2*this.gridSize:0))));t=this.snap(Math.round(Math.max(A.y,(z.y+z.height)/t.scale-t.translate.y+2*this.gridSize)));return new mxPoint(E,t)};Graph.prototype.getCenterInsertPoint=function(t){t=null!=t?t:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-t.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/ 2)/this.view.scale-this.view.translate.y-t.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-t.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-t.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(t,z,A){var E=new mxCell;E.value="Text";E.geometry=new mxGeometry(0,0,0,0);E.vertex=!0;if(null!=A&&this.model.isEdge(A.cell)){E.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];"; -E.geometry.relative=!0;E.connectable=!1;var H=this.view.getRelativePoint(A,t,z);E.geometry.x=Math.round(1E4*H.x)/1E4;E.geometry.y=Math.round(H.y);E.geometry.offset=new mxPoint(0,0);H=this.view.getPoint(A,E.geometry);var L=this.view.scale;E.geometry.offset=new mxPoint(Math.round((t-H.x)/L),Math.round((z-H.y)/L))}else H=this.view.translate,E.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",E.geometry.width=40,E.geometry.height=20,E.geometry.x=Math.round(t/this.view.scale)- -H.x-(null!=A?A.origin.x:0),E.geometry.y=Math.round(z/this.view.scale)-H.y-(null!=A?A.origin.y:0),E.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([E],null!=A?A.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[E])),this.autoSizeCell(E)}finally{this.getModel().endUpdate()}return E};Graph.prototype.addClickHandler=function(t,z,A){var E=mxUtils.bind(this,function(){var ea=this.container.getElementsByTagName("a");if(null!=ea)for(var ja=0;ja<ea.length;ja++){var ta= -this.getAbsoluteUrl(ea[ja].getAttribute("href"));null!=ta&&(ea[ja].setAttribute("rel",this.linkRelation),ea[ja].setAttribute("href",ta),null!=z&&mxEvent.addGestureListeners(ea[ja],null,null,z))}});this.model.addListener(mxEvent.CHANGE,E);E();var H=this.container.style.cursor,L=this.getTolerance(),W=this,ia={currentState:null,currentLink:null,currentTarget:null,highlight:null!=t&&""!=t&&t!=mxConstants.NONE?new mxCellHighlight(W,t,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ea){var ja= -ea.sourceState;if(null==ja||null==W.getLinkForCell(ja.cell))ea=W.getCellAt(ea.getGraphX(),ea.getGraphY(),null,null,null,function(ta,Aa,Ea){return null==W.getLinkForCell(ta.cell)}),ja=null==ja||W.model.isAncestor(ea,ja.cell)?W.view.getState(ea):null;ja!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ja,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(ea,ja){this.startX=ja.getGraphX();this.startY=ja.getGraphY();this.scrollLeft=W.container.scrollLeft; -this.scrollTop=W.container.scrollTop;null==this.currentLink&&"auto"==W.container.style.overflow&&(W.container.style.cursor="move");this.updateCurrentState(ja)},mouseMove:function(ea,ja){if(W.isMouseDown)null!=this.currentLink&&(ea=Math.abs(this.startX-ja.getGraphX()),ja=Math.abs(this.startY-ja.getGraphY()),(ea>L||ja>L)&&this.clear());else{for(ea=ja.getSource();null!=ea&&"a"!=ea.nodeName.toLowerCase();)ea=ea.parentNode;null!=ea?this.clear():(null!=W.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&& -W.tooltipHandler.reset(ja,!0,this.currentState),(null==this.currentState||ja.getState()!=this.currentState&&null!=ja.sourceState||!W.intersects(this.currentState,ja.getGraphX(),ja.getGraphY()))&&this.updateCurrentState(ja))}},mouseUp:function(ea,ja){var ta=ja.getSource();for(ea=ja.getEvent();null!=ta&&"a"!=ta.nodeName.toLowerCase();)ta=ta.parentNode;null==ta&&Math.abs(this.scrollLeft-W.container.scrollLeft)<L&&Math.abs(this.scrollTop-W.container.scrollTop)<L&&(null==ja.sourceState||!ja.isSource(ja.sourceState.control))&& -((mxEvent.isLeftMouseButton(ea)||mxEvent.isMiddleMouseButton(ea))&&!mxEvent.isPopupTrigger(ea)||mxEvent.isTouchEvent(ea))&&(null!=this.currentLink?(ta=W.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&ta||null==z||z(ea,this.currentLink),mxEvent.isConsumed(ea)||(ea=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ea)?"_blank":ta?W.linkTarget:"_top",W.openLink(this.currentLink,ea),ja.consume())):null!=A&&!ja.isConsumed()&&Math.abs(this.scrollLeft-W.container.scrollLeft)< -L&&Math.abs(this.scrollTop-W.container.scrollTop)<L&&Math.abs(this.startX-ja.getGraphX())<L&&Math.abs(this.startY-ja.getGraphY())<L&&A(ja.getEvent()));this.clear()},activate:function(ea){this.currentLink=W.getAbsoluteUrl(W.getLinkForCell(ea.cell));null!=this.currentLink&&(this.currentTarget=W.getLinkTargetForCell(ea.cell),W.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ea))},clear:function(){null!=W.container&&(W.container.style.cursor=H);this.currentLink=this.currentState= -this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=W.tooltipHandler&&W.tooltipHandler.hide()}};W.click=function(ea){};W.addMouseListener(ia);mxEvent.addListener(document,"mouseleave",function(ea){ia.clear()})};Graph.prototype.duplicateCells=function(t,z){t=null!=t?t:this.getSelectionCells();z=null!=z?z:!0;for(var A=0;A<t.length;A++)this.isTableCell(t[A])&&(t[A]=this.model.getParent(t[A]));t=this.model.getTopmostCells(t);var E=this.getModel(),H=this.gridSize,L=[];E.beginUpdate(); -try{var W={},ia=this.createCellLookup(t),ea=this.cloneCells(t,!1,W,!0);for(A=0;A<t.length;A++){var ja=E.getParent(t[A]);if(null!=ja){var ta=this.moveCells([ea[A]],H,H,!1)[0];L.push(ta);if(z)E.add(ja,ea[A]);else{var Aa=ja.getIndex(t[A]);E.add(ja,ea[A],Aa+1)}if(this.isTable(ja)){var Ea=this.getCellGeometry(ea[A]),Ma=this.getCellGeometry(ja);null!=Ea&&null!=Ma&&(Ma=Ma.clone(),Ma.height+=Ea.height,E.setGeometry(ja,Ma))}}else L.push(ea[A])}this.updateCustomLinks(this.createCellMapping(W,ia),ea,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED, -"cells",ea))}finally{E.endUpdate()}return L};Graph.prototype.insertImage=function(t,z,A){if(null!=t&&null!=this.cellEditor.textarea){for(var E=this.cellEditor.textarea.getElementsByTagName("img"),H=[],L=0;L<E.length;L++)H.push(E[L]);document.execCommand("insertimage",!1,t);t=this.cellEditor.textarea.getElementsByTagName("img");if(t.length==H.length+1)for(L=t.length-1;0<=L;L--)if(0==L||t[L]!=H[L-1]){t[L].setAttribute("width",z);t[L].setAttribute("height",A);break}}};Graph.prototype.insertLink=function(t){if(null!= +E.geometry.relative=!0;E.connectable=!1;var G=this.view.getRelativePoint(A,t,z);E.geometry.x=Math.round(1E4*G.x)/1E4;E.geometry.y=Math.round(G.y);E.geometry.offset=new mxPoint(0,0);G=this.view.getPoint(A,E.geometry);var L=this.view.scale;E.geometry.offset=new mxPoint(Math.round((t-G.x)/L),Math.round((z-G.y)/L))}else G=this.view.translate,E.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",E.geometry.width=40,E.geometry.height=20,E.geometry.x=Math.round(t/this.view.scale)- +G.x-(null!=A?A.origin.x:0),E.geometry.y=Math.round(z/this.view.scale)-G.y-(null!=A?A.origin.y:0),E.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([E],null!=A?A.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[E])),this.autoSizeCell(E)}finally{this.getModel().endUpdate()}return E};Graph.prototype.addClickHandler=function(t,z,A){var E=mxUtils.bind(this,function(){var ea=this.container.getElementsByTagName("a");if(null!=ea)for(var ka=0;ka<ea.length;ka++){var va= +this.getAbsoluteUrl(ea[ka].getAttribute("href"));null!=va&&(ea[ka].setAttribute("rel",this.linkRelation),ea[ka].setAttribute("href",va),null!=z&&mxEvent.addGestureListeners(ea[ka],null,null,z))}});this.model.addListener(mxEvent.CHANGE,E);E();var G=this.container.style.cursor,L=this.getTolerance(),X=this,ia={currentState:null,currentLink:null,currentTarget:null,highlight:null!=t&&""!=t&&t!=mxConstants.NONE?new mxCellHighlight(X,t,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ea){var ka= +ea.sourceState;if(null==ka||null==X.getLinkForCell(ka.cell))ea=X.getCellAt(ea.getGraphX(),ea.getGraphY(),null,null,null,function(va,Ba,Ea){return null==X.getLinkForCell(va.cell)}),ka=null==ka||X.model.isAncestor(ea,ka.cell)?X.view.getState(ea):null;ka!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ka,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(ea,ka){this.startX=ka.getGraphX();this.startY=ka.getGraphY();this.scrollLeft=X.container.scrollLeft; +this.scrollTop=X.container.scrollTop;null==this.currentLink&&"auto"==X.container.style.overflow&&(X.container.style.cursor="move");this.updateCurrentState(ka)},mouseMove:function(ea,ka){if(X.isMouseDown)null!=this.currentLink&&(ea=Math.abs(this.startX-ka.getGraphX()),ka=Math.abs(this.startY-ka.getGraphY()),(ea>L||ka>L)&&this.clear());else{for(ea=ka.getSource();null!=ea&&"a"!=ea.nodeName.toLowerCase();)ea=ea.parentNode;null!=ea?this.clear():(null!=X.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&& +X.tooltipHandler.reset(ka,!0,this.currentState),(null==this.currentState||ka.getState()!=this.currentState&&null!=ka.sourceState||!X.intersects(this.currentState,ka.getGraphX(),ka.getGraphY()))&&this.updateCurrentState(ka))}},mouseUp:function(ea,ka){var va=ka.getSource();for(ea=ka.getEvent();null!=va&&"a"!=va.nodeName.toLowerCase();)va=va.parentNode;null==va&&Math.abs(this.scrollLeft-X.container.scrollLeft)<L&&Math.abs(this.scrollTop-X.container.scrollTop)<L&&(null==ka.sourceState||!ka.isSource(ka.sourceState.control))&& +((mxEvent.isLeftMouseButton(ea)||mxEvent.isMiddleMouseButton(ea))&&!mxEvent.isPopupTrigger(ea)||mxEvent.isTouchEvent(ea))&&(null!=this.currentLink?(va=X.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&va||null==z||z(ea,this.currentLink),mxEvent.isConsumed(ea)||(ea=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ea)?"_blank":va?X.linkTarget:"_top",X.openLink(this.currentLink,ea),ka.consume())):null!=A&&!ka.isConsumed()&&Math.abs(this.scrollLeft-X.container.scrollLeft)< +L&&Math.abs(this.scrollTop-X.container.scrollTop)<L&&Math.abs(this.startX-ka.getGraphX())<L&&Math.abs(this.startY-ka.getGraphY())<L&&A(ka.getEvent()));this.clear()},activate:function(ea){this.currentLink=X.getAbsoluteUrl(X.getLinkForCell(ea.cell));null!=this.currentLink&&(this.currentTarget=X.getLinkTargetForCell(ea.cell),X.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ea))},clear:function(){null!=X.container&&(X.container.style.cursor=G);this.currentLink=this.currentState= +this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=X.tooltipHandler&&X.tooltipHandler.hide()}};X.click=function(ea){};X.addMouseListener(ia);mxEvent.addListener(document,"mouseleave",function(ea){ia.clear()})};Graph.prototype.duplicateCells=function(t,z){t=null!=t?t:this.getSelectionCells();z=null!=z?z:!0;for(var A=0;A<t.length;A++)this.isTableCell(t[A])&&(t[A]=this.model.getParent(t[A]));t=this.model.getTopmostCells(t);var E=this.getModel(),G=this.gridSize,L=[];E.beginUpdate(); +try{var X={},ia=this.createCellLookup(t),ea=this.cloneCells(t,!1,X,!0);for(A=0;A<t.length;A++){var ka=E.getParent(t[A]);if(null!=ka){var va=this.moveCells([ea[A]],G,G,!1)[0];L.push(va);if(z)E.add(ka,ea[A]);else{var Ba=ka.getIndex(t[A]);E.add(ka,ea[A],Ba+1)}if(this.isTable(ka)){var Ea=this.getCellGeometry(ea[A]),Ma=this.getCellGeometry(ka);null!=Ea&&null!=Ma&&(Ma=Ma.clone(),Ma.height+=Ea.height,E.setGeometry(ka,Ma))}}else L.push(ea[A])}this.updateCustomLinks(this.createCellMapping(X,ia),ea,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED, +"cells",ea))}finally{E.endUpdate()}return L};Graph.prototype.insertImage=function(t,z,A){if(null!=t&&null!=this.cellEditor.textarea){for(var E=this.cellEditor.textarea.getElementsByTagName("img"),G=[],L=0;L<E.length;L++)G.push(E[L]);document.execCommand("insertimage",!1,t);t=this.cellEditor.textarea.getElementsByTagName("img");if(t.length==G.length+1)for(L=t.length-1;0<=L;L--)if(0==L||t[L]!=G[L-1]){t[L].setAttribute("width",z);t[L].setAttribute("height",A);break}}};Graph.prototype.insertLink=function(t){if(null!= this.cellEditor.textarea)if(0==t.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var z=this.cellEditor.textarea.getElementsByTagName("a"),A=[],E=0;E<z.length;E++)A.push(z[E]);document.execCommand("createlink",!1,mxUtils.trim(t));z=this.cellEditor.textarea.getElementsByTagName("a");if(z.length==A.length+1)for(E=z.length-1;0<=E;E--)if(z[E]!=A[E-1]){for(z=z[E].getElementsByTagName("a");0<z.length;){for(A=z[0].parentNode;null!=z[0].firstChild;)A.insertBefore(z[0].firstChild,z[0]); A.removeChild(z[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(t))};Graph.prototype.isCellResizable=function(t){var z=mxGraph.prototype.isCellResizable.apply(this,arguments),A=this.getCurrentCellStyle(t);return!this.isTableCell(t)&&!this.isTableRow(t)&&(z||"0"!=mxUtils.getValue(A,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==A[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(t,z){null==z&&(z=this.getSelectionCells());if(null!=z&&1<z.length){for(var A=[],E=null, -H=null,L=0;L<z.length;L++)if(this.getModel().isVertex(z[L])){var W=this.view.getState(z[L]);if(null!=W){var ia=t?W.getCenterX():W.getCenterY();E=null!=E?Math.max(E,ia):ia;H=null!=H?Math.min(H,ia):ia;A.push(W)}}if(2<A.length){A.sort(function(Aa,Ea){return t?Aa.x-Ea.x:Aa.y-Ea.y});W=this.view.translate;ia=this.view.scale;H=H/ia-(t?W.x:W.y);E=E/ia-(t?W.x:W.y);this.getModel().beginUpdate();try{var ea=(E-H)/(A.length-1);E=H;for(L=1;L<A.length-1;L++){var ja=this.view.getState(this.model.getParent(A[L].cell)), -ta=this.getCellGeometry(A[L].cell);E+=ea;null!=ta&&null!=ja&&(ta=ta.clone(),t?ta.x=Math.round(E-ta.width/2)-ja.origin.x:ta.y=Math.round(E-ta.height/2)-ja.origin.y,this.getModel().setGeometry(A[L].cell,ta))}}finally{this.getModel().endUpdate()}}}return z};Graph.prototype.isCloneEvent=function(t){return mxClient.IS_MAC&&mxEvent.isMetaDown(t)||mxEvent.isControlDown(t)};Graph.prototype.createSvgImageExport=function(){var t=new mxImageExport;t.getLinkForCellState=mxUtils.bind(this,function(z,A){return this.getLinkForCell(z.cell)}); -return t};Graph.prototype.parseBackgroundImage=function(t){var z=null;null!=t&&0<t.length&&(t=JSON.parse(t),z=new mxImage(t.src,t.width,t.height));return z};Graph.prototype.getBackgroundImageObject=function(t){return t};Graph.prototype.getSvg=function(t,z,A,E,H,L,W,ia,ea,ja,ta,Aa,Ea,Ma){var La=null;if(null!=Ma)for(La=new mxDictionary,ta=0;ta<Ma.length;ta++)La.put(Ma[ta],!0);if(Ma=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{z=null!=z?z:1;A=null!=A? -A:0;H=null!=H?H:!0;L=null!=L?L:!0;W=null!=W?W:!0;ja=null!=ja?ja:!1;var Ia="page"==Ea?this.view.getBackgroundPageBounds():L&&null==La||E||"diagram"==Ea?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Fa=this.view.scale;"diagram"==Ea&&null!=this.backgroundImage&&(Ia=mxRectangle.fromRectangle(Ia),Ia.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*Fa,(this.view.translate.y+this.backgroundImage.y)*Fa,this.backgroundImage.width*Fa,this.backgroundImage.height*Fa))); -if(null==Ia)throw Error(mxResources.get("drawingEmpty"));E=z/Fa;Ea=H?-.5:0;var Ga=Graph.createSvgNode(Ea,Ea,Math.max(1,Math.ceil(Ia.width*E)+2*A)+(ja&&0==A?5:0),Math.max(1,Math.ceil(Ia.height*E)+2*A)+(ja&&0==A?5:0),t),Oa=Ga.ownerDocument,Pa=null!=Oa.createElementNS?Oa.createElementNS(mxConstants.NS_SVG,"g"):Oa.createElement("g");Ga.appendChild(Pa);var Na=this.createSvgCanvas(Pa);Na.foOffset=H?-.5:0;Na.textOffset=H?-.5:0;Na.imageOffset=H?-.5:0;Na.translate(Math.floor(A/z-Ia.x/Fa),Math.floor(A/z-Ia.y/ +G=null,L=0;L<z.length;L++)if(this.getModel().isVertex(z[L])){var X=this.view.getState(z[L]);if(null!=X){var ia=t?X.getCenterX():X.getCenterY();E=null!=E?Math.max(E,ia):ia;G=null!=G?Math.min(G,ia):ia;A.push(X)}}if(2<A.length){A.sort(function(Ba,Ea){return t?Ba.x-Ea.x:Ba.y-Ea.y});X=this.view.translate;ia=this.view.scale;G=G/ia-(t?X.x:X.y);E=E/ia-(t?X.x:X.y);this.getModel().beginUpdate();try{var ea=(E-G)/(A.length-1);E=G;for(L=1;L<A.length-1;L++){var ka=this.view.getState(this.model.getParent(A[L].cell)), +va=this.getCellGeometry(A[L].cell);E+=ea;null!=va&&null!=ka&&(va=va.clone(),t?va.x=Math.round(E-va.width/2)-ka.origin.x:va.y=Math.round(E-va.height/2)-ka.origin.y,this.getModel().setGeometry(A[L].cell,va))}}finally{this.getModel().endUpdate()}}}return z};Graph.prototype.isCloneEvent=function(t){return mxClient.IS_MAC&&mxEvent.isMetaDown(t)||mxEvent.isControlDown(t)};Graph.prototype.createSvgImageExport=function(){var t=new mxImageExport;t.getLinkForCellState=mxUtils.bind(this,function(z,A){return this.getLinkForCell(z.cell)}); +return t};Graph.prototype.parseBackgroundImage=function(t){var z=null;null!=t&&0<t.length&&(t=JSON.parse(t),z=new mxImage(t.src,t.width,t.height));return z};Graph.prototype.getBackgroundImageObject=function(t){return t};Graph.prototype.getSvg=function(t,z,A,E,G,L,X,ia,ea,ka,va,Ba,Ea,Ma){var La=null;if(null!=Ma)for(La=new mxDictionary,va=0;va<Ma.length;va++)La.put(Ma[va],!0);if(Ma=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{z=null!=z?z:1;A=null!=A? +A:0;G=null!=G?G:!0;L=null!=L?L:!0;X=null!=X?X:!0;ka=null!=ka?ka:!1;var Ia="page"==Ea?this.view.getBackgroundPageBounds():L&&null==La||E||"diagram"==Ea?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Fa=this.view.scale;"diagram"==Ea&&null!=this.backgroundImage&&(Ia=mxRectangle.fromRectangle(Ia),Ia.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*Fa,(this.view.translate.y+this.backgroundImage.y)*Fa,this.backgroundImage.width*Fa,this.backgroundImage.height*Fa))); +if(null==Ia)throw Error(mxResources.get("drawingEmpty"));E=z/Fa;Ea=G?-.5:0;var Ga=Graph.createSvgNode(Ea,Ea,Math.max(1,Math.ceil(Ia.width*E)+2*A)+(ka&&0==A?5:0),Math.max(1,Math.ceil(Ia.height*E)+2*A)+(ka&&0==A?5:0),t),Oa=Ga.ownerDocument,Pa=null!=Oa.createElementNS?Oa.createElementNS(mxConstants.NS_SVG,"g"):Oa.createElement("g");Ga.appendChild(Pa);var Na=this.createSvgCanvas(Pa);Na.foOffset=G?-.5:0;Na.textOffset=G?-.5:0;Na.imageOffset=G?-.5:0;Na.translate(Math.floor(A/z-Ia.x/Fa),Math.floor(A/z-Ia.y/ Fa));var Sa=document.createElement("div"),eb=Na.getAlternateText;Na.getAlternateText=function($a,lb,Wa,gb,hb,Xa,sb,qb,ub,nb,fb,Ra,rb){if(null!=Xa&&0<this.state.fontSize)try{mxUtils.isNode(Xa)?Xa=Xa.innerText:(Sa.innerHTML=Xa,Xa=mxUtils.extractTextWithWhitespace(Sa.childNodes));for(var tb=Math.ceil(2*gb/this.state.fontSize),ib=[],jb=0,mb=0;(0==tb||jb<tb)&&mb<Xa.length;){var ob=Xa.charCodeAt(mb);if(10==ob||13==ob){if(0<jb)break}else ib.push(Xa.charAt(mb)),255>ob&&jb++;mb++}ib.length<Xa.length&&1<Xa.length- -ib.length&&(Xa=mxUtils.trim(ib.join(""))+"...");return Xa}catch(yb){return eb.apply(this,arguments)}else return eb.apply(this,arguments)};var bb=this.backgroundImage;if(null!=bb){t=Fa/z;var pb=this.view.translate;Ea=new mxRectangle((bb.x+pb.x)*t,(bb.y+pb.y)*t,bb.width*t,bb.height*t);mxUtils.intersects(Ia,Ea)&&Na.image(bb.x+pb.x,bb.y+pb.y,bb.width,bb.height,bb.src,!0)}Na.scale(E);Na.textEnabled=W;ia=null!=ia?ia:this.createSvgImageExport();var vb=ia.drawCellState,wb=ia.getLinkForCellState;ia.getLinkForCellState= +ib.length&&(Xa=mxUtils.trim(ib.join(""))+"...");return Xa}catch(yb){return eb.apply(this,arguments)}else return eb.apply(this,arguments)};var bb=this.backgroundImage;if(null!=bb){t=Fa/z;var pb=this.view.translate;Ea=new mxRectangle((bb.x+pb.x)*t,(bb.y+pb.y)*t,bb.width*t,bb.height*t);mxUtils.intersects(Ia,Ea)&&Na.image(bb.x+pb.x,bb.y+pb.y,bb.width,bb.height,bb.src,!0)}Na.scale(E);Na.textEnabled=X;ia=null!=ia?ia:this.createSvgImageExport();var vb=ia.drawCellState,wb=ia.getLinkForCellState;ia.getLinkForCellState= function($a,lb){var Wa=wb.apply(this,arguments);return null==Wa||$a.view.graph.isCustomLink(Wa)?null:Wa};ia.getLinkTargetForCellState=function($a,lb){return $a.view.graph.getLinkTargetForCell($a.cell)};ia.drawCellState=function($a,lb){for(var Wa=$a.view.graph,gb=null!=La?La.get($a.cell):Wa.isCellSelected($a.cell),hb=Wa.model.getParent($a.cell);!(L&&null==La||gb)&&null!=hb;)gb=null!=La?La.get(hb):Wa.isCellSelected(hb),hb=Wa.model.getParent(hb);if(L&&null==La||gb)Wa.view.redrawEnumerationState($a), vb.apply(this,arguments),this.doDrawShape($a.secondLabel,lb)};ia.drawState(this.getView().getState(this.model.root),Na);this.updateSvgLinks(Ga,ea,!0);this.addForeignObjectWarning(Na,Ga);return Ga}finally{Ma&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(t,z){if("0"!=urlParams["svg-warning"]&&0<z.getElementsByTagName("foreignObject").length){var A=t.createElement("switch"),E=t.createElement("g");E.setAttribute("requiredFeatures", -"http://www.w3.org/TR/SVG11/feature#Extensibility");var H=t.createElement("a");H.setAttribute("transform","translate(0,-5)");null==H.setAttributeNS||z.ownerDocument!=document&&null==document.documentMode?(H.setAttribute("xlink:href",Graph.foreignObjectWarningLink),H.setAttribute("target","_blank")):(H.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),H.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));t=t.createElement("text");t.setAttribute("text-anchor","middle"); -t.setAttribute("font-size","10px");t.setAttribute("x","50%");t.setAttribute("y","100%");mxUtils.write(t,Graph.foreignObjectWarningText);A.appendChild(E);H.appendChild(t);A.appendChild(H);z.appendChild(A)}};Graph.prototype.updateSvgLinks=function(t,z,A){t=t.getElementsByTagName("a");for(var E=0;E<t.length;E++)if(null==t[E].getAttribute("target")){var H=t[E].getAttribute("href");null==H&&(H=t[E].getAttribute("xlink:href"));null!=H&&(null!=z&&/^https?:\/\//.test(H)?t[E].setAttribute("target",z):A&&this.isCustomLink(H)&& +"http://www.w3.org/TR/SVG11/feature#Extensibility");var G=t.createElement("a");G.setAttribute("transform","translate(0,-5)");null==G.setAttributeNS||z.ownerDocument!=document&&null==document.documentMode?(G.setAttribute("xlink:href",Graph.foreignObjectWarningLink),G.setAttribute("target","_blank")):(G.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),G.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));t=t.createElement("text");t.setAttribute("text-anchor","middle"); +t.setAttribute("font-size","10px");t.setAttribute("x","50%");t.setAttribute("y","100%");mxUtils.write(t,Graph.foreignObjectWarningText);A.appendChild(E);G.appendChild(t);A.appendChild(G);z.appendChild(A)}};Graph.prototype.updateSvgLinks=function(t,z,A){t=t.getElementsByTagName("a");for(var E=0;E<t.length;E++)if(null==t[E].getAttribute("target")){var G=t[E].getAttribute("href");null==G&&(G=t[E].getAttribute("xlink:href"));null!=G&&(null!=z&&/^https?:\/\//.test(G)?t[E].setAttribute("target",z):A&&this.isCustomLink(G)&& t[E].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(t){t=new mxSvgCanvas2D(t);t.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;t.pointerEvents=!0;return t};Graph.prototype.getSelectedElement=function(){var t=null;if(window.getSelection){var z=window.getSelection();z.getRangeAt&&z.rangeCount&&(t=z.getRangeAt(0).commonAncestorContainer)}else document.selection&&(t=document.selection.createRange().parentElement());return t};Graph.prototype.getSelectedEditingElement= function(){for(var t=this.getSelectedElement();null!=t&&t.nodeType!=mxConstants.NODETYPE_ELEMENT;)t=t.parentNode;null!=t&&t==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(t=this.cellEditor.textarea.firstChild);return t};Graph.prototype.getParentByName=function(t,z,A){for(;null!=t&&t.nodeName!=z;){if(t==A)return null;t=t.parentNode}return t};Graph.prototype.getParentByNames=function(t,z,A){for(;null!= t&&!(0<=mxUtils.indexOf(z,t.nodeName));){if(t==A)return null;t=t.parentNode}return t};Graph.prototype.selectNode=function(t){var z=null;if(window.getSelection){if(z=window.getSelection(),z.getRangeAt&&z.rangeCount){var A=document.createRange();A.selectNode(t);z.removeAllRanges();z.addRange(A)}}else(z=document.selection)&&"Control"!=z.type&&(t=z.createRange(),t.collapse(!0),A=z.createRange(),A.setEndPoint("StartToStart",t),A.select())};Graph.prototype.flipEdgePoints=function(t,z,A){var E=this.getCellGeometry(t); -if(null!=E){E=E.clone();if(null!=E.points)for(var H=0;H<E.points.length;H++)z?E.points[H].x=A+(A-E.points[H].x):E.points[H].y=A+(A-E.points[H].y);H=function(L){null!=L&&(z?L.x=A+(A-L.x):L.y=A+(A-L.y))};H(E.getTerminalPoint(!0));H(E.getTerminalPoint(!1));this.model.setGeometry(t,E)}};Graph.prototype.flipChildren=function(t,z,A){this.model.beginUpdate();try{for(var E=this.model.getChildCount(t),H=0;H<E;H++){var L=this.model.getChildAt(t,H);if(this.model.isEdge(L))this.flipEdgePoints(L,z,A);else{var W= -this.getCellGeometry(L);null!=W&&(W=W.clone(),z?W.x=A+(A-W.x-W.width):W.y=A+(A-W.y-W.height),this.model.setGeometry(L,W))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(t,z){this.model.beginUpdate();try{t=this.model.getTopmostCells(t);for(var A=[],E=0;E<t.length;E++)if(this.model.isEdge(t[E])){var H=this.view.getState(t[E]);null!=H&&this.flipEdgePoints(t[E],z,(z?H.getCenterX():H.getCenterY())/this.view.scale-(z?H.origin.x:H.origin.y)-(z?this.view.translate.x:this.view.translate.y))}else{var L= -this.getCellGeometry(t[E]);null!=L&&this.flipChildren(t[E],z,z?L.getCenterX()-L.x:L.getCenterY()-L.y);A.push(t[E])}this.toggleCellStyles(z?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,A)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(t,z){var A=null;if(null!=t&&0<t.length){this.model.beginUpdate();try{for(var E=0;E<t.length;E++){var H=this.model.getParent(t[E]);if(this.isTable(H)){var L=this.getCellGeometry(t[E]),W=this.getCellGeometry(H);null!=L&&null!=W&&(W=W.clone(), -W.height-=L.height,this.model.setGeometry(H,W))}}var ia=this.selectParentAfterDelete?this.model.getParents(t):null;this.removeCells(t,z)}finally{this.model.endUpdate()}if(null!=ia)for(A=[],E=0;E<ia.length;E++)this.model.contains(ia[E])&&(this.model.isVertex(ia[E])||this.model.isEdge(ia[E]))&&A.push(ia[E])}return A};Graph.prototype.insertTableColumn=function(t,z){var A=this.getModel();A.beginUpdate();try{var E=t,H=0;if(this.isTableCell(t)){var L=A.getParent(t);E=A.getParent(L);H=mxUtils.indexOf(A.getChildCells(L, -!0),t)}else this.isTableRow(t)?E=A.getParent(t):t=A.getChildCells(E,!0)[0],z||(H=A.getChildCells(t,!0).length-1);var W=A.getChildCells(E,!0),ia=Graph.minTableColumnWidth;for(t=0;t<W.length;t++){var ea=A.getChildCells(W[t],!0)[H],ja=A.cloneCell(ea,!1),ta=this.getCellGeometry(ja);ja.value=null;ja.style=mxUtils.setStyle(mxUtils.setStyle(ja.style,"rowspan",null),"colspan",null);if(null!=ta){null!=ta.alternateBounds&&(ta.width=ta.alternateBounds.width,ta.height=ta.alternateBounds.height,ta.alternateBounds= -null);ia=ta.width;var Aa=this.getCellGeometry(W[t]);null!=Aa&&(ta.height=Aa.height)}A.add(W[t],ja,H+(z?0:1))}var Ea=this.getCellGeometry(E);null!=Ea&&(Ea=Ea.clone(),Ea.width+=ia,A.setGeometry(E,Ea))}finally{A.endUpdate()}};Graph.prototype.deleteLane=function(t){var z=this.getModel();z.beginUpdate();try{var A=null;A="stackLayout"==this.getCurrentCellStyle(t).childLayout?t:z.getParent(t);var E=z.getChildCells(A,!0);0==E.length?z.remove(A):(A==t&&(t=E[E.length-1]),z.remove(t))}finally{z.endUpdate()}}; -Graph.prototype.insertLane=function(t,z){var A=this.getModel();A.beginUpdate();try{var E=null;if("stackLayout"==this.getCurrentCellStyle(t).childLayout){E=t;var H=A.getChildCells(E,!0);t=H[z?0:H.length-1]}else E=A.getParent(t);var L=E.getIndex(t);t=A.cloneCell(t,!1);t.value=null;A.add(E,t,L+(z?0:1))}finally{A.endUpdate()}};Graph.prototype.insertTableRow=function(t,z){var A=this.getModel();A.beginUpdate();try{var E=t,H=t;if(this.isTableCell(t))H=A.getParent(t),E=A.getParent(H);else if(this.isTableRow(t))E= -A.getParent(t);else{var L=A.getChildCells(E,!0);H=L[z?0:L.length-1]}var W=A.getChildCells(H,!0),ia=E.getIndex(H);H=A.cloneCell(H,!1);H.value=null;var ea=this.getCellGeometry(H);if(null!=ea){for(L=0;L<W.length;L++){t=A.cloneCell(W[L],!1);t.value=null;t.style=mxUtils.setStyle(mxUtils.setStyle(t.style,"rowspan",null),"colspan",null);var ja=this.getCellGeometry(t);null!=ja&&(null!=ja.alternateBounds&&(ja.width=ja.alternateBounds.width,ja.height=ja.alternateBounds.height,ja.alternateBounds=null),ja.height= -ea.height);H.insert(t)}A.add(E,H,ia+(z?0:1));var ta=this.getCellGeometry(E);null!=ta&&(ta=ta.clone(),ta.height+=ea.height,A.setGeometry(E,ta))}}finally{A.endUpdate()}};Graph.prototype.deleteTableColumn=function(t){var z=this.getModel();z.beginUpdate();try{var A=t,E=t;this.isTableCell(t)&&(E=z.getParent(t));this.isTableRow(E)&&(A=z.getParent(E));var H=z.getChildCells(A,!0);if(0==H.length)z.remove(A);else{this.isTableRow(E)||(E=H[0]);var L=z.getChildCells(E,!0);if(1>=L.length)z.remove(A);else{var W= -L.length-1;this.isTableCell(t)&&(W=mxUtils.indexOf(L,t));for(E=t=0;E<H.length;E++){var ia=z.getChildCells(H[E],!0)[W];z.remove(ia);var ea=this.getCellGeometry(ia);null!=ea&&(t=Math.max(t,ea.width))}var ja=this.getCellGeometry(A);null!=ja&&(ja=ja.clone(),ja.width-=t,z.setGeometry(A,ja))}}}finally{z.endUpdate()}};Graph.prototype.deleteTableRow=function(t){var z=this.getModel();z.beginUpdate();try{var A=t,E=t;this.isTableCell(t)&&(t=E=z.getParent(t));this.isTableRow(t)&&(A=z.getParent(E));var H=z.getChildCells(A, -!0);if(1>=H.length)z.remove(A);else{this.isTableRow(E)||(E=H[H.length-1]);z.remove(E);t=0;var L=this.getCellGeometry(E);null!=L&&(t=L.height);var W=this.getCellGeometry(A);null!=W&&(W=W.clone(),W.height-=t,z.setGeometry(A,W))}}finally{z.endUpdate()}};Graph.prototype.insertRow=function(t,z){for(var A=t.tBodies[0],E=A.rows[0].cells,H=t=0;H<E.length;H++){var L=E[H].getAttribute("colspan");t+=null!=L?parseInt(L):1}z=A.insertRow(z);for(H=0;H<t;H++)mxUtils.br(z.insertCell(-1));return z.cells[0]};Graph.prototype.deleteRow= -function(t,z){t.tBodies[0].deleteRow(z)};Graph.prototype.insertColumn=function(t,z){var A=t.tHead;if(null!=A)for(var E=0;E<A.rows.length;E++){var H=document.createElement("th");A.rows[E].appendChild(H);mxUtils.br(H)}t=t.tBodies[0];for(A=0;A<t.rows.length;A++)E=t.rows[A].insertCell(z),mxUtils.br(E);return t.rows[0].cells[0<=z?z:t.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(t,z){if(0<=z){t=t.tBodies[0].rows;for(var A=0;A<t.length;A++)t[A].cells.length>z&&t[A].deleteCell(z)}};Graph.prototype.pasteHtmlAtCaret= -function(t){if(window.getSelection){var z=window.getSelection();if(z.getRangeAt&&z.rangeCount){z=z.getRangeAt(0);z.deleteContents();var A=document.createElement("div");A.innerHTML=t;t=document.createDocumentFragment();for(var E;E=A.firstChild;)lastNode=t.appendChild(E);z.insertNode(t)}}else(z=document.selection)&&"Control"!=z.type&&z.createRange().pasteHTML(t)};Graph.prototype.createLinkForHint=function(t,z){function A(H,L){H.length>L&&(H=H.substring(0,Math.round(L/2))+"..."+H.substring(H.length- -Math.round(L/4)));return H}t=null!=t?t:"javascript:void(0);";if(null==z||0==z.length)z=this.isCustomLink(t)?this.getLinkTitle(t):t;var E=document.createElement("a");E.setAttribute("rel",this.linkRelation);E.setAttribute("href",this.getAbsoluteUrl(t));E.setAttribute("title",A(this.isCustomLink(t)?this.getLinkTitle(t):t,80));null!=this.linkTarget&&E.setAttribute("target",this.linkTarget);mxUtils.write(E,A(z,40));this.isCustomLink(t)&&mxEvent.addListener(E,"click",mxUtils.bind(this,function(H){this.customLinkClicked(t); -mxEvent.consume(H)}));return E};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(L,W){this.popupMenuHandler.hideMenu()});var t=this.updateMouseEvent;this.updateMouseEvent=function(L){L=t.apply(this,arguments);if(mxEvent.isTouchEvent(L.getEvent())&&null==L.getState()){var W=this.getCellAt(L.graphX,L.graphY);null!=W&&this.isSwimlane(W)&&this.hitsSwimlaneContent(W,L.graphX, -L.graphY)||(L.state=this.view.getState(W),null!=L.state&&null!=L.state.shape&&(this.container.style.cursor=L.state.shape.node.style.cursor))}null==L.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return L};var z=!1,A=!1,E=!1,H=this.fireMouseEvent;this.fireMouseEvent=function(L,W,ia){L==mxEvent.MOUSE_DOWN&&(W=this.updateMouseEvent(W),z=this.isCellSelected(W.getCell()),A=this.isSelectionEmpty(),E=this.popupMenuHandler.isMenuShowing());H.apply(this,arguments)};this.popupMenuHandler.mouseUp= -mxUtils.bind(this,function(L,W){var ia=mxEvent.isMouseEvent(W.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==W.getState()||!W.isSource(W.getState().control))&&(this.popupMenuHandler.popupTrigger||!E&&!ia&&(A&&null==W.getCell()&&this.isSelectionEmpty()||z&&this.isCellSelected(W.getCell())));ia=!z||ia?null:mxUtils.bind(this,function(ea){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ja=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(W.getX()+ -ja.x+1,W.getY()+ja.y+1,ea,W.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[L,W,ia])})};mxCellEditor.prototype.isContentEditing=function(){var t=this.graph.view.getState(this.editingCell);return null!=t&&1==t.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var t="";window.getSelection?t=window.getSelection(): +if(null!=E){E=E.clone();if(null!=E.points)for(var G=0;G<E.points.length;G++)z?E.points[G].x=A+(A-E.points[G].x):E.points[G].y=A+(A-E.points[G].y);G=function(L){null!=L&&(z?L.x=A+(A-L.x):L.y=A+(A-L.y))};G(E.getTerminalPoint(!0));G(E.getTerminalPoint(!1));this.model.setGeometry(t,E)}};Graph.prototype.flipChildren=function(t,z,A){this.model.beginUpdate();try{for(var E=this.model.getChildCount(t),G=0;G<E;G++){var L=this.model.getChildAt(t,G);if(this.model.isEdge(L))this.flipEdgePoints(L,z,A);else{var X= +this.getCellGeometry(L);null!=X&&(X=X.clone(),z?X.x=A+(A-X.x-X.width):X.y=A+(A-X.y-X.height),this.model.setGeometry(L,X))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(t,z){this.model.beginUpdate();try{t=this.model.getTopmostCells(t);for(var A=[],E=0;E<t.length;E++)if(this.model.isEdge(t[E])){var G=this.view.getState(t[E]);null!=G&&this.flipEdgePoints(t[E],z,(z?G.getCenterX():G.getCenterY())/this.view.scale-(z?G.origin.x:G.origin.y)-(z?this.view.translate.x:this.view.translate.y))}else{var L= +this.getCellGeometry(t[E]);null!=L&&this.flipChildren(t[E],z,z?L.getCenterX()-L.x:L.getCenterY()-L.y);A.push(t[E])}this.toggleCellStyles(z?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,A)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(t,z){var A=null;if(null!=t&&0<t.length){this.model.beginUpdate();try{for(var E=0;E<t.length;E++){var G=this.model.getParent(t[E]);if(this.isTable(G)){var L=this.getCellGeometry(t[E]),X=this.getCellGeometry(G);null!=L&&null!=X&&(X=X.clone(), +X.height-=L.height,this.model.setGeometry(G,X))}}var ia=this.selectParentAfterDelete?this.model.getParents(t):null;this.removeCells(t,z)}finally{this.model.endUpdate()}if(null!=ia)for(A=[],E=0;E<ia.length;E++)this.model.contains(ia[E])&&(this.model.isVertex(ia[E])||this.model.isEdge(ia[E]))&&A.push(ia[E])}return A};Graph.prototype.insertTableColumn=function(t,z){var A=this.getModel();A.beginUpdate();try{var E=t,G=0;if(this.isTableCell(t)){var L=A.getParent(t);E=A.getParent(L);G=mxUtils.indexOf(A.getChildCells(L, +!0),t)}else this.isTableRow(t)?E=A.getParent(t):t=A.getChildCells(E,!0)[0],z||(G=A.getChildCells(t,!0).length-1);var X=A.getChildCells(E,!0),ia=Graph.minTableColumnWidth;for(t=0;t<X.length;t++){var ea=A.getChildCells(X[t],!0)[G],ka=A.cloneCell(ea,!1),va=this.getCellGeometry(ka);ka.value=null;ka.style=mxUtils.setStyle(mxUtils.setStyle(ka.style,"rowspan",null),"colspan",null);if(null!=va){null!=va.alternateBounds&&(va.width=va.alternateBounds.width,va.height=va.alternateBounds.height,va.alternateBounds= +null);ia=va.width;var Ba=this.getCellGeometry(X[t]);null!=Ba&&(va.height=Ba.height)}A.add(X[t],ka,G+(z?0:1))}var Ea=this.getCellGeometry(E);null!=Ea&&(Ea=Ea.clone(),Ea.width+=ia,A.setGeometry(E,Ea))}finally{A.endUpdate()}};Graph.prototype.deleteLane=function(t){var z=this.getModel();z.beginUpdate();try{var A=null;A="stackLayout"==this.getCurrentCellStyle(t).childLayout?t:z.getParent(t);var E=z.getChildCells(A,!0);0==E.length?z.remove(A):(A==t&&(t=E[E.length-1]),z.remove(t))}finally{z.endUpdate()}}; +Graph.prototype.insertLane=function(t,z){var A=this.getModel();A.beginUpdate();try{var E=null;if("stackLayout"==this.getCurrentCellStyle(t).childLayout){E=t;var G=A.getChildCells(E,!0);t=G[z?0:G.length-1]}else E=A.getParent(t);var L=E.getIndex(t);t=A.cloneCell(t,!1);t.value=null;A.add(E,t,L+(z?0:1))}finally{A.endUpdate()}};Graph.prototype.insertTableRow=function(t,z){var A=this.getModel();A.beginUpdate();try{var E=t,G=t;if(this.isTableCell(t))G=A.getParent(t),E=A.getParent(G);else if(this.isTableRow(t))E= +A.getParent(t);else{var L=A.getChildCells(E,!0);G=L[z?0:L.length-1]}var X=A.getChildCells(G,!0),ia=E.getIndex(G);G=A.cloneCell(G,!1);G.value=null;var ea=this.getCellGeometry(G);if(null!=ea){for(L=0;L<X.length;L++){t=A.cloneCell(X[L],!1);t.value=null;t.style=mxUtils.setStyle(mxUtils.setStyle(t.style,"rowspan",null),"colspan",null);var ka=this.getCellGeometry(t);null!=ka&&(null!=ka.alternateBounds&&(ka.width=ka.alternateBounds.width,ka.height=ka.alternateBounds.height,ka.alternateBounds=null),ka.height= +ea.height);G.insert(t)}A.add(E,G,ia+(z?0:1));var va=this.getCellGeometry(E);null!=va&&(va=va.clone(),va.height+=ea.height,A.setGeometry(E,va))}}finally{A.endUpdate()}};Graph.prototype.deleteTableColumn=function(t){var z=this.getModel();z.beginUpdate();try{var A=t,E=t;this.isTableCell(t)&&(E=z.getParent(t));this.isTableRow(E)&&(A=z.getParent(E));var G=z.getChildCells(A,!0);if(0==G.length)z.remove(A);else{this.isTableRow(E)||(E=G[0]);var L=z.getChildCells(E,!0);if(1>=L.length)z.remove(A);else{var X= +L.length-1;this.isTableCell(t)&&(X=mxUtils.indexOf(L,t));for(E=t=0;E<G.length;E++){var ia=z.getChildCells(G[E],!0)[X];z.remove(ia);var ea=this.getCellGeometry(ia);null!=ea&&(t=Math.max(t,ea.width))}var ka=this.getCellGeometry(A);null!=ka&&(ka=ka.clone(),ka.width-=t,z.setGeometry(A,ka))}}}finally{z.endUpdate()}};Graph.prototype.deleteTableRow=function(t){var z=this.getModel();z.beginUpdate();try{var A=t,E=t;this.isTableCell(t)&&(t=E=z.getParent(t));this.isTableRow(t)&&(A=z.getParent(E));var G=z.getChildCells(A, +!0);if(1>=G.length)z.remove(A);else{this.isTableRow(E)||(E=G[G.length-1]);z.remove(E);t=0;var L=this.getCellGeometry(E);null!=L&&(t=L.height);var X=this.getCellGeometry(A);null!=X&&(X=X.clone(),X.height-=t,z.setGeometry(A,X))}}finally{z.endUpdate()}};Graph.prototype.insertRow=function(t,z){for(var A=t.tBodies[0],E=A.rows[0].cells,G=t=0;G<E.length;G++){var L=E[G].getAttribute("colspan");t+=null!=L?parseInt(L):1}z=A.insertRow(z);for(G=0;G<t;G++)mxUtils.br(z.insertCell(-1));return z.cells[0]};Graph.prototype.deleteRow= +function(t,z){t.tBodies[0].deleteRow(z)};Graph.prototype.insertColumn=function(t,z){var A=t.tHead;if(null!=A)for(var E=0;E<A.rows.length;E++){var G=document.createElement("th");A.rows[E].appendChild(G);mxUtils.br(G)}t=t.tBodies[0];for(A=0;A<t.rows.length;A++)E=t.rows[A].insertCell(z),mxUtils.br(E);return t.rows[0].cells[0<=z?z:t.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(t,z){if(0<=z){t=t.tBodies[0].rows;for(var A=0;A<t.length;A++)t[A].cells.length>z&&t[A].deleteCell(z)}};Graph.prototype.pasteHtmlAtCaret= +function(t){if(window.getSelection){var z=window.getSelection();if(z.getRangeAt&&z.rangeCount){z=z.getRangeAt(0);z.deleteContents();var A=document.createElement("div");A.innerHTML=t;t=document.createDocumentFragment();for(var E;E=A.firstChild;)lastNode=t.appendChild(E);z.insertNode(t)}}else(z=document.selection)&&"Control"!=z.type&&z.createRange().pasteHTML(t)};Graph.prototype.createLinkForHint=function(t,z){function A(G,L){G.length>L&&(G=G.substring(0,Math.round(L/2))+"..."+G.substring(G.length- +Math.round(L/4)));return G}t=null!=t?t:"javascript:void(0);";if(null==z||0==z.length)z=this.isCustomLink(t)?this.getLinkTitle(t):t;var E=document.createElement("a");E.setAttribute("rel",this.linkRelation);E.setAttribute("href",this.getAbsoluteUrl(t));E.setAttribute("title",A(this.isCustomLink(t)?this.getLinkTitle(t):t,80));null!=this.linkTarget&&E.setAttribute("target",this.linkTarget);mxUtils.write(E,A(z,40));this.isCustomLink(t)&&mxEvent.addListener(E,"click",mxUtils.bind(this,function(G){this.customLinkClicked(t); +mxEvent.consume(G)}));return E};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(L,X){this.popupMenuHandler.hideMenu()});var t=this.updateMouseEvent;this.updateMouseEvent=function(L){L=t.apply(this,arguments);if(mxEvent.isTouchEvent(L.getEvent())&&null==L.getState()){var X=this.getCellAt(L.graphX,L.graphY);null!=X&&this.isSwimlane(X)&&this.hitsSwimlaneContent(X,L.graphX, +L.graphY)||(L.state=this.view.getState(X),null!=L.state&&null!=L.state.shape&&(this.container.style.cursor=L.state.shape.node.style.cursor))}null==L.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return L};var z=!1,A=!1,E=!1,G=this.fireMouseEvent;this.fireMouseEvent=function(L,X,ia){L==mxEvent.MOUSE_DOWN&&(X=this.updateMouseEvent(X),z=this.isCellSelected(X.getCell()),A=this.isSelectionEmpty(),E=this.popupMenuHandler.isMenuShowing());G.apply(this,arguments)};this.popupMenuHandler.mouseUp= +mxUtils.bind(this,function(L,X){var ia=mxEvent.isMouseEvent(X.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==X.getState()||!X.isSource(X.getState().control))&&(this.popupMenuHandler.popupTrigger||!E&&!ia&&(A&&null==X.getCell()&&this.isSelectionEmpty()||z&&this.isCellSelected(X.getCell())));ia=!z||ia?null:mxUtils.bind(this,function(ea){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ka=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(X.getX()+ +ka.x+1,X.getY()+ka.y+1,ea,X.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[L,X,ia])})};mxCellEditor.prototype.isContentEditing=function(){var t=this.graph.view.getState(this.editingCell);return null!=t&&1==t.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var t="";window.getSelection?t=window.getSelection(): document.getSelection?t=document.getSelection():document.selection&&(t=document.selection.createRange().text);return""!=t};mxCellEditor.prototype.insertTab=function(t){var z=this.textarea.ownerDocument.defaultView.getSelection(),A=z.getRangeAt(0),E="\t";if(null!=t)for(E="";0<t;)E+=" ",t--;t=document.createElement("span");t.style.whiteSpace="pre";t.appendChild(document.createTextNode(E));A.insertNode(t);A.setStartAfter(t);A.setEndAfter(t);z.removeAllRanges();z.addRange(A)};mxCellEditor.prototype.alignText= -function(t,z){var A=null!=z&&mxEvent.isShiftDown(z);if(A||null!=window.getSelection&&null!=window.getSelection().containsNode){var E=!0;this.graph.processElements(this.textarea,function(H){A||window.getSelection().containsNode(H,!0)?(H.removeAttribute("align"),H.style.textAlign=null):E=!1});E&&this.graph.cellEditor.setAlign(t)}document.execCommand("justify"+t.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var t=window.getSelection();if(t.getRangeAt&& +function(t,z){var A=null!=z&&mxEvent.isShiftDown(z);if(A||null!=window.getSelection&&null!=window.getSelection().containsNode){var E=!0;this.graph.processElements(this.textarea,function(G){A||window.getSelection().containsNode(G,!0)?(G.removeAttribute("align"),G.style.textAlign=null):E=!1});E&&this.graph.cellEditor.setAlign(t)}document.execCommand("justify"+t.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var t=window.getSelection();if(t.getRangeAt&& t.rangeCount){for(var z=[],A=0,E=t.rangeCount;A<E;++A)z.push(t.getRangeAt(A));return z}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(t){try{if(t)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var z=0,A=t.length;z<A;++z)sel.addRange(t[z])}else document.selection&&t.select&&t.select()}catch(E){}};var F=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel= -function(t){null!=t.text&&(t.text.replaceLinefeeds="0"!=mxUtils.getValue(t.style,"nl2Br","1"));F.apply(this,arguments)};var J=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(t,z){this.isKeepFocusEvent(t)||!mxEvent.isAltDown(t.getEvent())?J.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(t){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var C=mxCellEditor.prototype.startEditing; +function(t){null!=t.text&&(t.text.replaceLinefeeds="0"!=mxUtils.getValue(t.style,"nl2Br","1"));F.apply(this,arguments)};var I=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(t,z){this.isKeepFocusEvent(t)||!mxEvent.isAltDown(t.getEvent())?I.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(t){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var C=mxCellEditor.prototype.startEditing; mxCellEditor.prototype.startEditing=function(t,z){t=this.graph.getStartEditingCell(t,z);C.apply(this,arguments);var A=this.graph.view.getState(t);this.textarea.className=null!=A&&1==A.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(t);A=this.graph.getModel().getParent(t);var E=this.graph.getCellGeometry(t);if(this.graph.getModel().isEdge(A)&&null!=E&&E.relative||this.graph.getModel().isEdge(t))this.textarea.style.outline= -mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var O=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(t){function z(H,L){L.originalNode=H;H=H.firstChild;for(var W=L.firstChild;null!=H&&null!=W;)z(H,W),H=H.nextSibling,W=W.nextSibling;return L}function A(H,L){if(null!=H)if(L.originalNode!=H)E(H);else for(H=H.firstChild,L=L.firstChild;null!=H;){var W=H.nextSibling;null==L?E(H):(A(H,L),L=L.nextSibling);H=W}}function E(H){for(var L= -H.firstChild;null!=L;){var W=L.nextSibling;E(L);L=W}1==H.nodeType&&("BR"===H.nodeName||null!=H.firstChild)||3==H.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(H)).length?(3==H.nodeType&&mxUtils.setTextContent(H,mxUtils.getTextContent(H).replace(/\n|\r/g,"")),1==H.nodeType&&(H.removeAttribute("style"),H.removeAttribute("class"),H.removeAttribute("width"),H.removeAttribute("cellpadding"),H.removeAttribute("cellspacing"),H.removeAttribute("border"))):H.parentNode.removeChild(H)}O.apply(this,arguments); -7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(H){var L=z(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?A(this.textarea,L):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var t=this.graph.view.getState(this.editingCell); +mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var N=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(t){function z(G,L){L.originalNode=G;G=G.firstChild;for(var X=L.firstChild;null!=G&&null!=X;)z(G,X),G=G.nextSibling,X=X.nextSibling;return L}function A(G,L){if(null!=G)if(L.originalNode!=G)E(G);else for(G=G.firstChild,L=L.firstChild;null!=G;){var X=G.nextSibling;null==L?E(G):(A(G,L),L=L.nextSibling);G=X}}function E(G){for(var L= +G.firstChild;null!=L;){var X=L.nextSibling;E(L);L=X}1==G.nodeType&&("BR"===G.nodeName||null!=G.firstChild)||3==G.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(G)).length?(3==G.nodeType&&mxUtils.setTextContent(G,mxUtils.getTextContent(G).replace(/\n|\r/g,"")),1==G.nodeType&&(G.removeAttribute("style"),G.removeAttribute("class"),G.removeAttribute("width"),G.removeAttribute("cellpadding"),G.removeAttribute("cellspacing"),G.removeAttribute("border"))):G.parentNode.removeChild(G)}N.apply(this,arguments); +7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(G){var L=z(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?A(this.textarea,L):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var t=this.graph.view.getState(this.editingCell); if(null!=t){var z=null!=t&&"0"!=mxUtils.getValue(t.style,"nl2Br","1"),A=this.saveSelection();if(this.codeViewMode){ia=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ia.length&&"\n"==ia.charAt(ia.length-1)&&(ia=ia.substring(0,ia.length-1));ia=this.graph.sanitizeHtml(z?ia.replace(/\n/g,"<br/>"):ia,!0);this.textarea.className="mxCellEditor geContentEditable";ea=mxUtils.getValue(t.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);z=mxUtils.getValue(t.style,mxConstants.STYLE_FONTFAMILY, -mxConstants.DEFAULT_FONTFAMILY);var E=mxUtils.getValue(t.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),H=(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,L=(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,W=[];(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&W.push("underline");(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE, -0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&W.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ea*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ea)+"px";this.textarea.style.textDecoration=W.join(" ");this.textarea.style.fontWeight=H?"bold":"normal";this.textarea.style.fontStyle=L?"italic":"";this.textarea.style.fontFamily=z;this.textarea.style.textAlign=E;this.textarea.style.padding= +mxConstants.DEFAULT_FONTFAMILY);var E=mxUtils.getValue(t.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),G=(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,L=(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,X=[];(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&X.push("underline");(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE, +0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&X.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ea*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ea)+"px";this.textarea.style.textDecoration=X.join(" ");this.textarea.style.fontWeight=G?"bold":"normal";this.textarea.style.fontStyle=L?"italic":"";this.textarea.style.fontFamily=z;this.textarea.style.textAlign=E;this.textarea.style.padding= "0px";this.textarea.innerHTML!=ia&&(this.textarea.innerHTML=ia,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");var ia=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(ia=mxUtils.replaceTrailingNewlines(ia,"<div><br></div>"));ia=this.graph.sanitizeHtml(z? ia.replace(/\n/g,"").replace(/<br\s*.?>/g,"<br>"):ia,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ea=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ea*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ea)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY; this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=ia&&(this.textarea.innerHTML=ia);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=A;this.resize()}};var R=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(t,z){if(null!=this.textarea)if(t=this.graph.getView().getState(this.editingCell),this.codeViewMode&& @@ -2862,36 +2860,36 @@ null!=t){var A=t.view.scale;this.bounds=mxRectangle.fromRectangle(t);if(0==this. Math.round((this.bounds.width-4)/A)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/A)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/A)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*A);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/A)+(this.textarea.offsetWidth- this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*A);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+A+","+A+")")}else this.textarea.style.height="",this.textarea.style.overflow="",R.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(t,z){if("0"==mxUtils.getValue(t.style, "html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var A=this.graph.getEditingValue(t.cell,z);"1"==mxUtils.getValue(t.style,"nl2Br","1")&&(A=A.replace(/\n/g,"<br/>"));return A=this.graph.sanitizeHtml(A,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(t){if("0"==mxUtils.getValue(t.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var z=this.graph.sanitizeHtml(this.textarea.innerHTML,!0); -return z="1"==mxUtils.getValue(t.style,"nl2Br","1")?z.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):z.replace(/\r\n/g,"").replace(/\n/g,"")};var T=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(t){this.codeViewMode&&this.toggleViewMode();T.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(t){}};var Q=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(t,z){this.graph.getModel().beginUpdate(); +return z="1"==mxUtils.getValue(t.style,"nl2Br","1")?z.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):z.replace(/\r\n/g,"").replace(/\n/g,"")};var S=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(t){this.codeViewMode&&this.toggleViewMode();S.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(t){}};var Q=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(t,z){this.graph.getModel().beginUpdate(); try{Q.apply(this,arguments),""==z&&this.graph.isCellDeletable(t.cell)&&0==this.graph.model.getChildCount(t.cell)&&this.graph.isTransparentState(t)&&this.graph.removeCells([t.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(t){var z=mxUtils.getValue(t.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=z&&z!=mxConstants.NONE||!(null!=t.cell.geometry&&0<t.cell.geometry.width)||0==mxUtils.getValue(t.style,mxConstants.STYLE_ROTATION,0)&&0!= mxUtils.getValue(t.style,mxConstants.STYLE_HORIZONTAL,1)||(z=mxUtils.getValue(t.style,mxConstants.STYLE_FILLCOLOR,null));z==mxConstants.NONE&&(z=null);return z};mxCellEditor.prototype.getBorderColor=function(t){var z=mxUtils.getValue(t.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);null!=z&&z!=mxConstants.NONE||!(null!=t.cell.geometry&&0<t.cell.geometry.width)||0==mxUtils.getValue(t.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(t.style,mxConstants.STYLE_HORIZONTAL,1)||(z=mxUtils.getValue(t.style, mxConstants.STYLE_STROKECOLOR,null));z==mxConstants.NONE&&(z=null);return z};mxCellEditor.prototype.getMinimumSize=function(t){var z=this.graph.getView().scale;return new mxRectangle(0,0,null==t.text?30:t.text.size*z+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(t,z){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(z.getEvent)};mxGraphView.prototype.formatUnitText=function(t){return t? b(t,this.unit):t};mxGraphHandler.prototype.updateHint=function(t){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var z=this.graph.view.translate,A=this.graph.view.scale;t=this.roundLength((this.bounds.x+this.currentDx)/A-z.x);z=this.roundLength((this.bounds.y+this.currentDy)/A-z.y);A=this.graph.view.unit;this.hint.innerHTML=b(t,A)+", "+b(z,A);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width- -this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var aa=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(t,z){aa.apply(this,arguments);var A=this.graph.getCellStyle(t);if(null==A.childLayout){var E=this.graph.model.getParent(t),H=null!=E?this.graph.getCellGeometry(E): -null;if(null!=H&&(A=this.graph.getCellStyle(E),"stackLayout"==A.childLayout)){var L=parseFloat(mxUtils.getValue(A,"stackBorder",mxStackLayout.prototype.border));A="1"==mxUtils.getValue(A,"horizontalStack","1");var W=this.graph.getActualStartSize(E);H=H.clone();A?H.height=z.height+W.y+W.height+2*L:H.width=z.width+W.x+W.width+2*L;this.graph.model.setGeometry(E,H)}}};var S=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function t(ia){A.get(ia)|| -(A.put(ia,!0),H.push(ia))}for(var z=S.apply(this,arguments),A=new mxDictionary,E=this.graph.model,H=[],L=0;L<z.length;L++){var W=z[L];this.graph.isTableCell(W)?t(E.getParent(E.getParent(W))):this.graph.isTableRow(W)&&t(E.getParent(W));t(W)}return H};var P=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(t){var z=P.apply(this,arguments);z.stroke="#C0C0C0";z.strokewidth=1;return z};var X=mxEdgeHandler.prototype.createParentHighlightShape; -mxEdgeHandler.prototype.createParentHighlightShape=function(t){var z=X.apply(this,arguments);z.stroke="#C0C0C0";z.strokewidth=1;return z};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var t=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+t.x/2,this.bounds.y+this.rotationHandleVSpacing-t.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(t,z){return this.graph.isRecursiveVertexResize(t)&& -!mxEvent.isAltDown(z.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(t,z){return mxEvent.isControlDown(z.getEvent())||mxEvent.isMetaDown(z.getEvent())};var ha=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ha.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)? -this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var fa=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return fa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var sa=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(t){return t.tableHandle||sa.apply(this,arguments)&& -(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var t=0;this.graph.isTableRow(this.state.cell)?t=1:this.graph.isTableCell(this.state.cell)&&(t=2);return t};var K=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return K.apply(this,arguments).grow(-this.getSelectionBorderInset())};var V=null,G=mxVertexHandler.prototype.createCustomHandles; -mxVertexHandler.prototype.createCustomHandles=function(){null==V&&(V=mxCellRenderer.defaultShapes.tableLine);var t=G.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var z=function(La,Ia,Fa){for(var Ga=[],Oa=0;Oa<La.length;Oa++){var Pa=La[Oa];Ga.push(null==Pa?null:new mxPoint((ea+Pa.x+Ia)*L,(ja+Pa.y+Fa)*L))}return Ga},A=this,E=this.graph,H=E.model,L=E.view.scale,W=this.state,ia=this.selectionBorder,ea=this.state.origin.x+E.view.translate.x,ja=this.state.origin.y+E.view.translate.y;null== -t&&(t=[]);var ta=E.view.getCellStates(H.getChildCells(this.state.cell,!0));if(0<ta.length){var Aa=H.getChildCells(ta[0].cell,!0),Ea=E.getTableLines(this.state.cell,!1,!0),Ma=E.getTableLines(this.state.cell,!0,!1);for(H=0;H<ta.length;H++)mxUtils.bind(this,function(La){var Ia=ta[La],Fa=La<ta.length-1?ta[La+1]:null;Fa=null!=Fa?E.getCellGeometry(Fa.cell):null;var Ga=null!=Fa&&null!=Fa.alternateBounds?Fa.alternateBounds:Fa;Fa=null!=Ma[La]?new V(Ma[La],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE, -1,!1);Fa.isDashed=ia.isDashed;Fa.svgStrokeTolerance++;Ia=new mxHandle(Ia,"row-resize",null,Fa);Ia.tableHandle=!0;var Oa=0;Ia.shape.node.parentNode.insertBefore(Ia.shape.node,Ia.shape.node.parentNode.firstChild);Ia.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Oa?mxConstants.NONE:ia.stroke;if(this.shape.constructor==V)this.shape.line=z(Ma[La],0,Oa),this.shape.updateBoundsFromLine();else{var Na=E.getActualStartSize(W.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+ -this.state.height+Oa*L;this.shape.bounds.x=W.x+(La==ta.length-1?0:Na.x*L);this.shape.bounds.width=W.width-(La==ta.length-1?0:Na.width+Na.x+L)}this.shape.redraw()}};var Pa=!1;Ia.setPosition=function(Na,Sa,eb){Oa=Math.max(Graph.minTableRowHeight-Na.height,Sa.y-Na.y-Na.height);Pa=mxEvent.isShiftDown(eb.getEvent());null!=Ga&&Pa&&(Oa=Math.min(Oa,Ga.height-Graph.minTableRowHeight))};Ia.execute=function(Na){if(0!=Oa)E.setTableRowHeight(this.state.cell,Oa,!Pa);else if(!A.blockDelayedSelection){var Sa=E.getCellAt(Na.getGraphX(), -Na.getGraphY())||W.cell;E.graphHandler.selectCellForEvent(Sa,Na)}Oa=0};Ia.reset=function(){Oa=0};t.push(Ia)})(H);for(H=0;H<Aa.length;H++)mxUtils.bind(this,function(La){var Ia=E.view.getState(Aa[La]),Fa=E.getCellGeometry(Aa[La]),Ga=null!=Fa.alternateBounds?Fa.alternateBounds:Fa;null==Ia&&(Ia=new mxCellState(E.view,Aa[La],E.getCellStyle(Aa[La])),Ia.x=W.x+Fa.x*L,Ia.y=W.y+Fa.y*L,Ia.width=Ga.width*L,Ia.height=Ga.height*L,Ia.updateCachedBounds());Fa=La<Aa.length-1?Aa[La+1]:null;Fa=null!=Fa?E.getCellGeometry(Fa): +this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var aa=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(t,z){aa.apply(this,arguments);var A=this.graph.getCellStyle(t);if(null==A.childLayout){var E=this.graph.model.getParent(t),G=null!=E?this.graph.getCellGeometry(E): +null;if(null!=G&&(A=this.graph.getCellStyle(E),"stackLayout"==A.childLayout)){var L=parseFloat(mxUtils.getValue(A,"stackBorder",mxStackLayout.prototype.border));A="1"==mxUtils.getValue(A,"horizontalStack","1");var X=this.graph.getActualStartSize(E);G=G.clone();A?G.height=z.height+X.y+X.height+2*L:G.width=z.width+X.x+X.width+2*L;this.graph.model.setGeometry(E,G)}}};var U=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function t(ia){A.get(ia)|| +(A.put(ia,!0),G.push(ia))}for(var z=U.apply(this,arguments),A=new mxDictionary,E=this.graph.model,G=[],L=0;L<z.length;L++){var X=z[L];this.graph.isTableCell(X)?t(E.getParent(E.getParent(X))):this.graph.isTableRow(X)&&t(E.getParent(X));t(X)}return G};var P=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(t){var z=P.apply(this,arguments);z.stroke="#C0C0C0";z.strokewidth=1;return z};var Y=mxEdgeHandler.prototype.createParentHighlightShape; +mxEdgeHandler.prototype.createParentHighlightShape=function(t){var z=Y.apply(this,arguments);z.stroke="#C0C0C0";z.strokewidth=1;return z};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var t=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+t.x/2,this.bounds.y+this.rotationHandleVSpacing-t.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(t,z){return this.graph.isRecursiveVertexResize(t)&& +!mxEvent.isAltDown(z.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(t,z){return mxEvent.isControlDown(z.getEvent())||mxEvent.isMetaDown(z.getEvent())};var ja=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ja.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)? +this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var fa=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return fa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var ra=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(t){return t.tableHandle||ra.apply(this,arguments)&& +(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var t=0;this.graph.isTableRow(this.state.cell)?t=1:this.graph.isTableCell(this.state.cell)&&(t=2);return t};var K=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return K.apply(this,arguments).grow(-this.getSelectionBorderInset())};var V=null,O=mxVertexHandler.prototype.createCustomHandles; +mxVertexHandler.prototype.createCustomHandles=function(){null==V&&(V=mxCellRenderer.defaultShapes.tableLine);var t=O.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var z=function(La,Ia,Fa){for(var Ga=[],Oa=0;Oa<La.length;Oa++){var Pa=La[Oa];Ga.push(null==Pa?null:new mxPoint((ea+Pa.x+Ia)*L,(ka+Pa.y+Fa)*L))}return Ga},A=this,E=this.graph,G=E.model,L=E.view.scale,X=this.state,ia=this.selectionBorder,ea=this.state.origin.x+E.view.translate.x,ka=this.state.origin.y+E.view.translate.y;null== +t&&(t=[]);var va=E.view.getCellStates(G.getChildCells(this.state.cell,!0));if(0<va.length){var Ba=G.getChildCells(va[0].cell,!0),Ea=E.getTableLines(this.state.cell,!1,!0),Ma=E.getTableLines(this.state.cell,!0,!1);for(G=0;G<va.length;G++)mxUtils.bind(this,function(La){var Ia=va[La],Fa=La<va.length-1?va[La+1]:null;Fa=null!=Fa?E.getCellGeometry(Fa.cell):null;var Ga=null!=Fa&&null!=Fa.alternateBounds?Fa.alternateBounds:Fa;Fa=null!=Ma[La]?new V(Ma[La],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE, +1,!1);Fa.isDashed=ia.isDashed;Fa.svgStrokeTolerance++;Ia=new mxHandle(Ia,"row-resize",null,Fa);Ia.tableHandle=!0;var Oa=0;Ia.shape.node.parentNode.insertBefore(Ia.shape.node,Ia.shape.node.parentNode.firstChild);Ia.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Oa?mxConstants.NONE:ia.stroke;if(this.shape.constructor==V)this.shape.line=z(Ma[La],0,Oa),this.shape.updateBoundsFromLine();else{var Na=E.getActualStartSize(X.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+ +this.state.height+Oa*L;this.shape.bounds.x=X.x+(La==va.length-1?0:Na.x*L);this.shape.bounds.width=X.width-(La==va.length-1?0:Na.width+Na.x+L)}this.shape.redraw()}};var Pa=!1;Ia.setPosition=function(Na,Sa,eb){Oa=Math.max(Graph.minTableRowHeight-Na.height,Sa.y-Na.y-Na.height);Pa=mxEvent.isShiftDown(eb.getEvent());null!=Ga&&Pa&&(Oa=Math.min(Oa,Ga.height-Graph.minTableRowHeight))};Ia.execute=function(Na){if(0!=Oa)E.setTableRowHeight(this.state.cell,Oa,!Pa);else if(!A.blockDelayedSelection){var Sa=E.getCellAt(Na.getGraphX(), +Na.getGraphY())||X.cell;E.graphHandler.selectCellForEvent(Sa,Na)}Oa=0};Ia.reset=function(){Oa=0};t.push(Ia)})(G);for(G=0;G<Ba.length;G++)mxUtils.bind(this,function(La){var Ia=E.view.getState(Ba[La]),Fa=E.getCellGeometry(Ba[La]),Ga=null!=Fa.alternateBounds?Fa.alternateBounds:Fa;null==Ia&&(Ia=new mxCellState(E.view,Ba[La],E.getCellStyle(Ba[La])),Ia.x=X.x+Fa.x*L,Ia.y=X.y+Fa.y*L,Ia.width=Ga.width*L,Ia.height=Ga.height*L,Ia.updateCachedBounds());Fa=La<Ba.length-1?Ba[La+1]:null;Fa=null!=Fa?E.getCellGeometry(Fa): null;var Oa=null!=Fa&&null!=Fa.alternateBounds?Fa.alternateBounds:Fa;Fa=null!=Ea[La]?new V(Ea[La],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Fa.isDashed=ia.isDashed;Fa.svgStrokeTolerance++;Ia=new mxHandle(Ia,"col-resize",null,Fa);Ia.tableHandle=!0;var Pa=0;Ia.shape.node.parentNode.insertBefore(Ia.shape.node,Ia.shape.node.parentNode.firstChild);Ia.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Pa?mxConstants.NONE:ia.stroke;if(this.shape.constructor==V)this.shape.line= -z(Ea[La],Pa,0),this.shape.updateBoundsFromLine();else{var Sa=E.getActualStartSize(W.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Ga.width+Pa)*L;this.shape.bounds.y=W.y+(La==Aa.length-1?0:Sa.y*L);this.shape.bounds.height=W.height-(La==Aa.length-1?0:(Sa.height+Sa.y)*L)}this.shape.redraw()}};var Na=!1;Ia.setPosition=function(Sa,eb,bb){Pa=Math.max(Graph.minTableColumnWidth-Ga.width,eb.x-Sa.x-Ga.width);Na=mxEvent.isShiftDown(bb.getEvent());null==Oa||Na||(Pa=Math.min(Pa,Oa.width- -Graph.minTableColumnWidth))};Ia.execute=function(Sa){if(0!=Pa)E.setTableColumnWidth(this.state.cell,Pa,Na);else if(!A.blockDelayedSelection){var eb=E.getCellAt(Sa.getGraphX(),Sa.getGraphY())||W.cell;E.graphHandler.selectCellForEvent(eb,Sa)}Pa=0};Ia.positionChanged=function(){};Ia.reset=function(){Pa=0};t.push(Ia)})(H)}}return null!=t?t.reverse():null};var M=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(t){M.apply(this,arguments);if(null!=this.moveHandles)for(var z= +z(Ea[La],Pa,0),this.shape.updateBoundsFromLine();else{var Sa=E.getActualStartSize(X.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Ga.width+Pa)*L;this.shape.bounds.y=X.y+(La==Ba.length-1?0:Sa.y*L);this.shape.bounds.height=X.height-(La==Ba.length-1?0:(Sa.height+Sa.y)*L)}this.shape.redraw()}};var Na=!1;Ia.setPosition=function(Sa,eb,bb){Pa=Math.max(Graph.minTableColumnWidth-Ga.width,eb.x-Sa.x-Ga.width);Na=mxEvent.isShiftDown(bb.getEvent());null==Oa||Na||(Pa=Math.min(Pa,Oa.width- +Graph.minTableColumnWidth))};Ia.execute=function(Sa){if(0!=Pa)E.setTableColumnWidth(this.state.cell,Pa,Na);else if(!A.blockDelayedSelection){var eb=E.getCellAt(Sa.getGraphX(),Sa.getGraphY())||X.cell;E.graphHandler.selectCellForEvent(eb,Sa)}Pa=0};Ia.positionChanged=function(){};Ia.reset=function(){Pa=0};t.push(Ia)})(G)}}return null!=t?t.reverse():null};var T=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(t){T.apply(this,arguments);if(null!=this.moveHandles)for(var z= 0;z<this.moveHandles.length;z++)this.moveHandles[z].style.visibility=t?"":"hidden";if(null!=this.cornerHandles)for(z=0;z<this.cornerHandles.length;z++)this.cornerHandles[z].node.style.visibility=t?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var t=this.graph.model;if(null!=this.moveHandles){for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].parentNode.removeChild(this.moveHandles[z]);this.moveHandles=null}this.moveHandles=[];for(z=0;z<t.getChildCount(this.state.cell);z++)mxUtils.bind(this, -function(A){if(null!=A&&t.isVertex(A.cell)){var E=mxUtils.createImage(Editor.rowMoveImage);E.style.position="absolute";E.style.cursor="pointer";E.style.width="7px";E.style.height="4px";E.style.padding="4px 2px 4px 2px";E.rowState=A;mxEvent.addGestureListeners(E,mxUtils.bind(this,function(H){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(H)&&this.graph.isCellSelected(A.cell)||this.graph.selectCellForEvent(A.cell,H);mxEvent.isPopupTrigger(H)||(this.graph.graphHandler.start(this.state.cell, -mxEvent.getClientX(H),mxEvent.getClientY(H),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(H),this.graph.isMouseDown=!0);mxEvent.consume(H)}),null,mxUtils.bind(this,function(H){mxEvent.isPopupTrigger(H)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(H),mxEvent.getClientY(H),A.cell,H),mxEvent.consume(H))}));this.moveHandles.push(E);this.graph.container.appendChild(E)}})(this.graph.view.getState(t.getChildAt(this.state.cell, -z)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var t=0;t<this.customHandles.length;t++)this.customHandles[t].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var U=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var t=new mxPoint(0,0),z=this.tolerance,A=this.state.style.shape;null==mxCellRenderer.defaultShapes[A]&&mxStencilRegistry.getStencil(A); -A=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!A&&null!=this.customHandles)for(var E=0;E<this.customHandles.length;E++)if(null!=this.customHandles[E].shape&&null!=this.customHandles[E].shape.bounds){var H=this.customHandles[E].shape.bounds,L=H.getCenterX(),W=H.getCenterY();if(Math.abs(this.state.x-L)<H.width/2||Math.abs(this.state.y-W)<H.height/2||Math.abs(this.state.x+this.state.width-L)<H.width/2||Math.abs(this.state.y+this.state.height-W)<H.height/ -2){A=!0;break}}A&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(z/=2,this.graph.isTable(this.state.cell)&&(z+=7),t.x=this.sizers[0].bounds.width+z,t.y=this.sizers[0].bounds.height+z):t=U.apply(this,arguments);return t};mxVertexHandler.prototype.updateHint=function(t){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"°";else{t= +function(A){if(null!=A&&t.isVertex(A.cell)){var E=mxUtils.createImage(Editor.rowMoveImage);E.style.position="absolute";E.style.cursor="pointer";E.style.width="7px";E.style.height="4px";E.style.padding="4px 2px 4px 2px";E.rowState=A;mxEvent.addGestureListeners(E,mxUtils.bind(this,function(G){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(G)&&this.graph.isCellSelected(A.cell)||this.graph.selectCellForEvent(A.cell,G);mxEvent.isPopupTrigger(G)||(this.graph.graphHandler.start(this.state.cell, +mxEvent.getClientX(G),mxEvent.getClientY(G),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(G),this.graph.isMouseDown=!0);mxEvent.consume(G)}),null,mxUtils.bind(this,function(G){mxEvent.isPopupTrigger(G)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(G),mxEvent.getClientY(G),A.cell,G),mxEvent.consume(G))}));this.moveHandles.push(E);this.graph.container.appendChild(E)}})(this.graph.view.getState(t.getChildAt(this.state.cell, +z)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var t=0;t<this.customHandles.length;t++)this.customHandles[t].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var J=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var t=new mxPoint(0,0),z=this.tolerance,A=this.state.style.shape;null==mxCellRenderer.defaultShapes[A]&&mxStencilRegistry.getStencil(A); +A=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!A&&null!=this.customHandles)for(var E=0;E<this.customHandles.length;E++)if(null!=this.customHandles[E].shape&&null!=this.customHandles[E].shape.bounds){var G=this.customHandles[E].shape.bounds,L=G.getCenterX(),X=G.getCenterY();if(Math.abs(this.state.x-L)<G.width/2||Math.abs(this.state.y-X)<G.height/2||Math.abs(this.state.x+this.state.width-L)<G.width/2||Math.abs(this.state.y+this.state.height-X)<G.height/ +2){A=!0;break}}A&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(z/=2,this.graph.isTable(this.state.cell)&&(z+=7),t.x=this.sizers[0].bounds.width+z,t.y=this.sizers[0].bounds.height+z):t=J.apply(this,arguments);return t};mxVertexHandler.prototype.updateHint=function(t){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"°";else{t= this.state.view.scale;var z=this.state.view.unit;this.hint.innerHTML=b(this.roundLength(this.bounds.width/t),z)+" x "+b(this.roundLength(this.bounds.height/t),z)}t=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==t&&(t=this.bounds);this.hint.style.left=t.x+Math.round((t.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=t.y+t.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}}; -mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var ba=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(t,z){ba.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var la=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp= -function(t,z){la.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(t,z){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var A=this.graph.view.translate,E=this.graph.view.scale,H=this.roundLength(z.x/E-A.x);A=this.roundLength(z.y/E-A.y);E=this.graph.view.unit;this.hint.innerHTML=b(H,E)+", "+b(A,E);this.hint.style.visibility="visible";if(this.isSource|| -this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(H=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*H.x)+"%, "+Math.round(100*H.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(t.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(t.getGraphY(),z.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}; +mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var ba=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(t,z){ba.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var ha=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp= +function(t,z){ha.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(t,z){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var A=this.graph.view.translate,E=this.graph.view.scale,G=this.roundLength(z.x/E-A.x);A=this.roundLength(z.y/E-A.y);E=this.graph.view.unit;this.hint.innerHTML=b(G,E)+", "+b(A,E);this.hint.style.visibility="visible";if(this.isSource|| +this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(G=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*G.x)+"%, "+Math.round(100*G.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(t.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(t.getGraphY(),z.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}; Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 4.5 2 L 4.5 7 M 2 4.5 L 7 4.5 z" stroke="#000"/>'); mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.endMainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.secondaryHandle=Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'); HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');HoverIcons.prototype.endFixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');HoverIcons.prototype.terminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+ @@ -2901,32 +2899,32 @@ mxEdgeHandler.prototype.endHandleImage=HoverIcons.prototype.endMainHandle;mxEdge HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers= !0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled= !0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(t){return!mxEvent.isShiftDown(t.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(t){return!mxEvent.isShiftDown(t.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance= -12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(t){return mxEvent.isMouseEvent(t.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(t){var z=t.getEvent();return null==t.getState()&&!mxEvent.isMouseEvent(z)||mxEvent.isPopupTrigger(z)&&(null==t.getState()||mxEvent.isControlDown(z)||mxEvent.isShiftDown(z))};var ra=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown= -function(t,z){ra.apply(this,arguments);mxEvent.isTouchEvent(z.getEvent())&&this.graph.isCellSelected(z.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(t){var z=t.getEvent();return mxEvent.isLeftMouseButton(z)&&(this.useLeftButtonForPanning&&null==t.getState()||mxEvent.isControlDown(z)&&!mxEvent.isShiftDown(z))||this.usePopupTrigger&&mxEvent.isPopupTrigger(z)};mxRubberband.prototype.isSpaceEvent=function(t){return this.graph.isEnabled()&& -!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(t.getEvent())||mxEvent.isMetaDown(t.getEvent()))&&mxEvent.isShiftDown(t.getEvent())&&mxEvent.isAltDown(t.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(t,z){if(this.cancelled)this.cancelled=!1,z.consume();else{var A=null!=this.div&&"none"!=this.div.style.display,E=null,H=null,L=t=null;null!= -this.first&&null!=this.currentX&&null!=this.currentY&&(E=this.first.x,H=this.first.y,t=(this.currentX-E)/this.graph.view.scale,L=(this.currentY-H)/this.graph.view.scale,mxEvent.isAltDown(z.getEvent())||(t=this.graph.snap(t),L=this.graph.snap(L),this.graph.isGridEnabled()||(Math.abs(t)<this.graph.tolerance&&(t=0),Math.abs(L)<this.graph.tolerance&&(L=0))));this.reset();if(A){if(this.isSpaceEvent(z)){this.graph.model.beginUpdate();try{var W=this.graph.getCellsBeyond(E,H,this.graph.getDefaultParent(), -!0,!0);for(A=0;A<W.length;A++)if(this.graph.isCellMovable(W[A])){var ia=this.graph.view.getState(W[A]),ea=this.graph.getCellGeometry(W[A]);null!=ia&&null!=ea&&(ea=ea.clone(),ea.translate(t,L),this.graph.model.setGeometry(W[A],ea))}}finally{this.graph.model.endUpdate()}}else W=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(W,z.getEvent());z.consume()}}};mxRubberband.prototype.mouseMove=function(t,z){if(!z.isConsumed()&&null!=this.first){var A=mxUtils.getScrollOrigin(this.graph.container); -t=mxUtils.getOffset(this.graph.container);A.x-=t.x;A.y-=t.y;t=z.getX()+A.x;A=z.getY()+A.y;var E=this.first.x-t,H=this.first.y-A,L=this.graph.tolerance;if(null!=this.div||Math.abs(E)>L||Math.abs(H)>L)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(t,A),this.isSpaceEvent(z)?(t=this.x+this.width,A=this.y+this.height,E=this.graph.view.scale,mxEvent.isAltDown(z.getEvent())||(this.width=this.graph.snap(this.width/E)*E,this.height=this.graph.snap(this.height/E)*E,this.graph.isGridEnabled()|| +12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(t){return mxEvent.isMouseEvent(t.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(t){var z=t.getEvent();return null==t.getState()&&!mxEvent.isMouseEvent(z)||mxEvent.isPopupTrigger(z)&&(null==t.getState()||mxEvent.isControlDown(z)||mxEvent.isShiftDown(z))};var na=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown= +function(t,z){na.apply(this,arguments);mxEvent.isTouchEvent(z.getEvent())&&this.graph.isCellSelected(z.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(t){var z=t.getEvent();return mxEvent.isLeftMouseButton(z)&&(this.useLeftButtonForPanning&&null==t.getState()||mxEvent.isControlDown(z)&&!mxEvent.isShiftDown(z))||this.usePopupTrigger&&mxEvent.isPopupTrigger(z)};mxRubberband.prototype.isSpaceEvent=function(t){return this.graph.isEnabled()&& +!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(t.getEvent())||mxEvent.isMetaDown(t.getEvent()))&&mxEvent.isShiftDown(t.getEvent())&&mxEvent.isAltDown(t.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(t,z){if(this.cancelled)this.cancelled=!1,z.consume();else{var A=null!=this.div&&"none"!=this.div.style.display,E=null,G=null,L=t=null;null!= +this.first&&null!=this.currentX&&null!=this.currentY&&(E=this.first.x,G=this.first.y,t=(this.currentX-E)/this.graph.view.scale,L=(this.currentY-G)/this.graph.view.scale,mxEvent.isAltDown(z.getEvent())||(t=this.graph.snap(t),L=this.graph.snap(L),this.graph.isGridEnabled()||(Math.abs(t)<this.graph.tolerance&&(t=0),Math.abs(L)<this.graph.tolerance&&(L=0))));this.reset();if(A){if(this.isSpaceEvent(z)){this.graph.model.beginUpdate();try{var X=this.graph.getCellsBeyond(E,G,this.graph.getDefaultParent(), +!0,!0);for(A=0;A<X.length;A++)if(this.graph.isCellMovable(X[A])){var ia=this.graph.view.getState(X[A]),ea=this.graph.getCellGeometry(X[A]);null!=ia&&null!=ea&&(ea=ea.clone(),ea.translate(t,L),this.graph.model.setGeometry(X[A],ea))}}finally{this.graph.model.endUpdate()}}else X=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(X,z.getEvent());z.consume()}}};mxRubberband.prototype.mouseMove=function(t,z){if(!z.isConsumed()&&null!=this.first){var A=mxUtils.getScrollOrigin(this.graph.container); +t=mxUtils.getOffset(this.graph.container);A.x-=t.x;A.y-=t.y;t=z.getX()+A.x;A=z.getY()+A.y;var E=this.first.x-t,G=this.first.y-A,L=this.graph.tolerance;if(null!=this.div||Math.abs(E)>L||Math.abs(G)>L)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(t,A),this.isSpaceEvent(z)?(t=this.x+this.width,A=this.y+this.height,E=this.graph.view.scale,mxEvent.isAltDown(z.getEvent())||(this.width=this.graph.snap(this.width/E)*E,this.height=this.graph.snap(this.height/E)*E,this.graph.isGridEnabled()|| (this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=t-this.width),this.y<this.first.y&&(this.y=A-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px", null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&& -(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),z.consume()}};var Y=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);Y.apply(this,arguments)};var da=(new Date).getTime(),pa=0,wa=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(t,z,A,E){wa.apply(this,arguments);A!=this.currentTerminalState?(da=(new Date).getTime(), -pa=0):pa=(new Date).getTime()-da;this.currentTerminalState=A};var Ka=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(t){return mxEvent.isShiftDown(t.getEvent())&&mxEvent.isAltDown(t.getEvent())?!1:null!=this.currentTerminalState&&t.getState()==this.currentTerminalState&&2E3<pa||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&Ka.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape= +(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),z.consume()}};var W=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);W.apply(this,arguments)};var da=(new Date).getTime(),sa=0,ta=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(t,z,A,E){ta.apply(this,arguments);A!=this.currentTerminalState?(da=(new Date).getTime(), +sa=0):sa=(new Date).getTime()-da;this.currentTerminalState=A};var Ja=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(t){return mxEvent.isShiftDown(t.getEvent())&&mxEvent.isAltDown(t.getEvent())?!1:null!=this.currentTerminalState&&t.getState()==this.currentTerminalState&&2E3<sa||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&Ja.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape= function(t,z,A){z=null!=t&&0==t;var E=this.state.getVisibleTerminalState(z);t=null!=t&&(0==t||t>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==t)?this.graph.getConnectionConstraint(this.state,E,z):null;A=null!=(null!=t?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(z),t):null)?A?this.endFixedHandleImage:this.fixedHandleImage:null!=t&&null!=E?A?this.endTerminalHandleImage:this.terminalHandleImage:A?this.endHandleImage:this.handleImage;if(null!=A)return A= new mxImageShape(new mxRectangle(0,0,A.width,A.height),A.src),A.preserveImageAspect=!1,A;A=mxConstants.HANDLE_SIZE;this.preferHtml&&--A;return new mxRectangleShape(new mxRectangle(0,0,A,A),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var Ha=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(t,z,A){this.handleImage=z==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:z==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage; -return Ha.apply(this,arguments)};var ua=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(t){if(null!=t&&1==t.length){var z=this.graph.getModel(),A=z.getParent(t[0]),E=this.graph.getCellGeometry(t[0]);if(z.isEdge(A)&&null!=E&&E.relative&&(z=this.graph.view.getState(t[0]),null!=z&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox))return mxRectangle.fromRectangle(z.text.boundingBox)}return ua.apply(this,arguments)};var Ca=mxGraphHandler.prototype.getGuideStates; -mxGraphHandler.prototype.getGuideStates=function(){for(var t=Ca.apply(this,arguments),z=[],A=0;A<t.length;A++)"1"!=mxUtils.getValue(t[A].style,"part","0")&&z.push(t[A]);return z};var qa=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(t){var z=this.graph.getModel(),A=z.getParent(t.cell),E=this.graph.getCellGeometry(t.cell);return z.isEdge(A)&&null!=E&&E.relative&&2>t.width&&2>t.height&&null!=t.text&&null!=t.text.boundingBox?(z=t.text.unrotatedBoundingBox|| -t.text.boundingBox,new mxRectangle(Math.round(z.x),Math.round(z.y),Math.round(z.width),Math.round(z.height))):qa.apply(this,arguments)};var Da=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(t,z){var A=this.graph.getModel(),E=A.getParent(this.state.cell),H=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(z)==mxEvent.ROTATION_HANDLE||!A.isEdge(E)||null==H||!H.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Da.apply(this,arguments)}; +return Ha.apply(this,arguments)};var ua=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(t){if(null!=t&&1==t.length){var z=this.graph.getModel(),A=z.getParent(t[0]),E=this.graph.getCellGeometry(t[0]);if(z.isEdge(A)&&null!=E&&E.relative&&(z=this.graph.view.getState(t[0]),null!=z&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox))return mxRectangle.fromRectangle(z.text.boundingBox)}return ua.apply(this,arguments)};var Aa=mxGraphHandler.prototype.getGuideStates; +mxGraphHandler.prototype.getGuideStates=function(){for(var t=Aa.apply(this,arguments),z=[],A=0;A<t.length;A++)"1"!=mxUtils.getValue(t[A].style,"part","0")&&z.push(t[A]);return z};var qa=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(t){var z=this.graph.getModel(),A=z.getParent(t.cell),E=this.graph.getCellGeometry(t.cell);return z.isEdge(A)&&null!=E&&E.relative&&2>t.width&&2>t.height&&null!=t.text&&null!=t.text.boundingBox?(z=t.text.unrotatedBoundingBox|| +t.text.boundingBox,new mxRectangle(Math.round(z.x),Math.round(z.y),Math.round(z.width),Math.round(z.height))):qa.apply(this,arguments)};var Da=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(t,z){var A=this.graph.getModel(),E=A.getParent(this.state.cell),G=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(z)==mxEvent.ROTATION_HANDLE||!A.isEdge(E)||null==G||!G.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Da.apply(this,arguments)}; mxVertexHandler.prototype.rotateClick=function(){var t=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),z=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&t==mxConstants.NONE&&z==mxConstants.NONE?(t=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,t,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])}; var Ua=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(t,z){Ua.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var db=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(t,z){db.apply(this,arguments);null!=this.rotationShape&&null!= this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var Ta=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){Ta.apply(this,arguments);var t=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles(); else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var z=0;4>z;z++){var A=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);A.dialect=mxConstants.DIALECT_SVG;A.init(this.graph.view.getOverlayPane());this.cornerHandles.push(A)}}var E=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()< -this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(H,L){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));E()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(H,L){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler); +this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(G,L){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));E()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(G,L){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler); z=this.graph.getLinkForCell(this.state.cell);A=this.graph.getLinksForState(this.state);this.updateLinkHint(z,A);if(null!=z||null!=A&&0<A.length)t=!0;t&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(t,z){try{if(null==t&&(null==z||0==z.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=t||null!=z&&0<z.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding= "6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=t&&(this.linkHint.appendChild(this.graph.createLinkForHint(t)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var A=document.createElement("img");A.className="geAdaptiveAsset";A.setAttribute("src",Editor.editImage); A.setAttribute("title",mxResources.get("editLink"));A.setAttribute("width","11");A.setAttribute("height","11");A.style.marginLeft="10px";A.style.marginBottom="-1px";A.style.cursor="pointer";this.linkHint.appendChild(A);mxEvent.addListener(A,"click",mxUtils.bind(this,function(L){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(L)}));var E=A.cloneNode(!0);E.setAttribute("src",Editor.trashImage);E.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")])); -E.style.marginLeft="4px";this.linkHint.appendChild(E);mxEvent.addListener(E,"click",mxUtils.bind(this,function(L){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(L)}))}if(null!=z)for(A=0;A<z.length;A++){var H=document.createElement("div");H.style.marginTop=null!=t||0<A?"6px":"0px";H.appendChild(this.graph.createLinkForHint(z[A].getAttribute("href"),mxUtils.getTextContent(z[A])));this.linkHint.appendChild(H)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(L){}};mxEdgeHandler.prototype.updateLinkHint= +E.style.marginLeft="4px";this.linkHint.appendChild(E);mxEvent.addListener(E,"click",mxUtils.bind(this,function(L){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(L)}))}if(null!=z)for(A=0;A<z.length;A++){var G=document.createElement("div");G.style.marginTop=null!=t||0<A?"6px":"0px";G.appendChild(this.graph.createLinkForHint(z[A].getAttribute("href"),mxUtils.getTextContent(z[A])));this.linkHint.appendChild(G)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(L){}};mxEdgeHandler.prototype.updateLinkHint= mxVertexHandler.prototype.updateLinkHint;var ab=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){ab.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var t=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()< -this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(E,H){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));t();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var z=this.graph.getLinkForCell(this.state.cell),A=this.graph.getLinksForState(this.state);if(null!=z||null!=A&&0<A.length)this.updateLinkHint(z, +this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(E,G){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));t();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var z=this.graph.getLinkForCell(this.state.cell),A=this.graph.getLinksForState(this.state);if(null!=z||null!=A&&0<A.length)this.updateLinkHint(z, A),this.redrawHandles()};var Ya=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Ya.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Va=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var t=0;t<this.moveHandles.length;t++)this.moveHandles[t].style.left=this.moveHandles[t].rowState.x+this.moveHandles[t].rowState.width- 5+"px",this.moveHandles[t].style.top=this.moveHandles[t].rowState.y+this.moveHandles[t].rowState.height/2-6+"px";if(null!=this.cornerHandles){t=this.getSelectionBorderInset();var z=this.cornerHandles,A=z[0].bounds.height/2;z[0].bounds.x=this.state.x-z[0].bounds.width/2+t;z[0].bounds.y=this.state.y-A+t;z[0].redraw();z[1].bounds.x=z[0].bounds.x+this.state.width-2*t;z[1].bounds.y=z[0].bounds.y;z[1].redraw();z[2].bounds.x=z[0].bounds.x;z[2].bounds.y=this.state.y+this.state.height-2*t;z[2].redraw();z[3].bounds.x= z[1].bounds.x;z[3].bounds.y=z[2].bounds.y;z[3].redraw();for(t=0;t<this.cornerHandles.length;t++)this.cornerHandles[t].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Va.apply(this);null!=this.state&&null!=this.linkHint&&(t=new mxPoint(this.state.getCenterX(),this.state.getCenterY()), @@ -2957,8 +2955,8 @@ Format.prototype.diagramIndex=0;Format.prototype.currentIndex=0;Format.prototype Format.prototype.init=function(){var a=this.editorUi,b=a.editor,f=b.graph;this.update=mxUtils.bind(this,function(e,g){this.refresh()});f.getSelectionModel().addListener(mxEvent.CHANGE,this.update);f.getModel().addListener(mxEvent.CHANGE,this.update);f.addListener(mxEvent.EDITING_STARTED,this.update);f.addListener(mxEvent.EDITING_STOPPED,this.update);f.getView().addListener("unitChanged",this.update);b.addListener("autosaveChanged",this.update);f.addListener(mxEvent.ROOT,this.update);a.addListener("styleChanged", this.update);a.addListener("darkModeChanged",this.update);this.refresh()};Format.prototype.clear=function(){this.container.innerText="";if(null!=this.panels)for(var a=0;a<this.panels.length;a++)this.panels[a].destroy();this.panels=[]};Format.prototype.refresh=function(){null!=this.pendingRefresh&&(window.clearTimeout(this.pendingRefresh),this.pendingRefresh=null);this.pendingRefresh=window.setTimeout(mxUtils.bind(this,function(){this.immediateRefresh()}))}; Format.prototype.immediateRefresh=function(){if("0px"!=this.container.style.width){this.clear();var a=this.editorUi,b=a.editor.graph,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.color="rgb(112, 112, 112)";f.style.textAlign="left";f.style.cursor="default";var e=document.createElement("div");e.className="geFormatSection";e.style.textAlign="center";e.style.fontWeight="bold";e.style.paddingTop="8px";e.style.fontSize="13px";e.style.borderWidth="0px 0px 1px 1px";e.style.borderStyle= -"solid";e.style.display="inline-block";e.style.height="25px";e.style.overflow="hidden";e.style.width="100%";this.container.appendChild(f);mxEvent.addListener(e,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(D){D.preventDefault()}));var g=a.getSelectionState(),d=g.containsLabel,k=null,n=null,u=mxUtils.bind(this,function(D,F,J,C){var O=mxUtils.bind(this,function(R){k!=D&&(d?this.labelIndex=J:b.isSelectionEmpty()?this.diagramIndex=J:this.currentIndex=J,null!=k&&(k.style.backgroundColor= -Format.inactiveTabBackgroundColor,k.style.borderBottomWidth="1px"),k=D,k.style.backgroundColor="",k.style.borderBottomWidth="0px",n!=F&&(null!=n&&(n.style.display="none"),n=F,n.style.display=""))});mxEvent.addListener(D,"click",O);mxEvent.addListener(D,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(R){R.preventDefault()}));(C&&null==k||J==(d?this.labelIndex:b.isSelectionEmpty()?this.diagramIndex:this.currentIndex))&&O()}),m=0;if(b.isSelectionEmpty()){mxUtils.write(e,mxResources.get("diagram")); +"solid";e.style.display="inline-block";e.style.height="25px";e.style.overflow="hidden";e.style.width="100%";this.container.appendChild(f);mxEvent.addListener(e,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(D){D.preventDefault()}));var g=a.getSelectionState(),d=g.containsLabel,k=null,n=null,u=mxUtils.bind(this,function(D,F,I,C){var N=mxUtils.bind(this,function(R){k!=D&&(d?this.labelIndex=I:b.isSelectionEmpty()?this.diagramIndex=I:this.currentIndex=I,null!=k&&(k.style.backgroundColor= +Format.inactiveTabBackgroundColor,k.style.borderBottomWidth="1px"),k=D,k.style.backgroundColor="",k.style.borderBottomWidth="0px",n!=F&&(null!=n&&(n.style.display="none"),n=F,n.style.display=""))});mxEvent.addListener(D,"click",N);mxEvent.addListener(D,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(R){R.preventDefault()}));(C&&null==k||I==(d?this.labelIndex:b.isSelectionEmpty()?this.diagramIndex:this.currentIndex))&&N()}),m=0;if(b.isSelectionEmpty()){mxUtils.write(e,mxResources.get("diagram")); e.style.borderLeftWidth="0px";f.appendChild(e);g=f.cloneNode(!1);this.panels.push(new DiagramFormatPanel(this,a,g));this.container.appendChild(g);if(null!=Editor.styles){g.style.display="none";e.style.width=this.showCloseButton?"106px":"50%";e.style.cursor="pointer";e.style.backgroundColor=Format.inactiveTabBackgroundColor;var r=e.cloneNode(!1);r.style.borderLeftWidth="1px";r.style.borderRightWidth="1px";r.style.backgroundColor=Format.inactiveTabBackgroundColor;u(e,g,m++);var x=f.cloneNode(!1);x.style.display= "none";mxUtils.write(r,mxResources.get("style"));f.appendChild(r);this.panels.push(new DiagramStylePanel(this,a,x));this.container.appendChild(x);u(r,x,m++)}this.showCloseButton&&(r=e.cloneNode(!1),r.style.borderLeftWidth="1px",r.style.borderRightWidth="1px",r.style.borderBottomWidth="1px",r.style.backgroundColor=Format.inactiveTabBackgroundColor,r.style.position="absolute",r.style.right="0px",r.style.top="0px",r.style.width="25px",u=document.createElement("img"),u.setAttribute("border","0"),u.setAttribute("src", Dialog.prototype.closeImage),u.setAttribute("title",mxResources.get("hide")),u.style.position="absolute",u.style.display="block",u.style.right="0px",u.style.top="8px",u.style.cursor="pointer",u.style.marginTop="1px",u.style.marginRight="6px",u.style.border="1px solid transparent",u.style.padding="1px",u.style.opacity=.5,r.appendChild(u),mxEvent.addListener(u,"click",function(){a.actions.get("formatPanel").funct()}),f.appendChild(r))}else if(b.isEditing())mxUtils.write(e,mxResources.get("text")),f.appendChild(e), @@ -2966,7 +2964,7 @@ this.panels.push(new TextFormatPanel(this,a,f));else{e.style.backgroundColor=For x.style.display="none",this.panels.push(new StyleFormatPanel(this,a,x)),this.container.appendChild(x),u(e,x,m++));mxUtils.write(r,mxResources.get("text"));f.appendChild(r);e=f.cloneNode(!1);e.style.display="none";this.panels.push(new TextFormatPanel(this,a,e));this.container.appendChild(e);mxUtils.write(B,mxResources.get("arrange"));f.appendChild(B);f=f.cloneNode(!1);f.style.display="none";this.panels.push(new ArrangePanel(this,a,f));this.container.appendChild(f);0<g.cells.length?u(r,e,m++):r.style.display= "none";u(B,f,m++,!0)}}};BaseFormatPanel=function(a,b,f){this.format=a;this.editorUi=b;this.container=f;this.listeners=[]};BaseFormatPanel.prototype.buttonBackgroundColor="white"; BaseFormatPanel.prototype.installInputHandler=function(a,b,f,e,g,d,k,n){d=null!=d?d:"";n=null!=n?n:!1;var u=this.editorUi,m=u.editor.graph;e=null!=e?e:1;g=null!=g?g:999;var r=null,x=!1,B=mxUtils.bind(this,function(D){var F=n?parseFloat(a.value):parseInt(a.value);isNaN(F)||b!=mxConstants.STYLE_ROTATION||(F=mxUtils.mod(Math.round(100*F),36E3)/100);F=Math.min(g,Math.max(e,isNaN(F)?f:F));if(m.cellEditor.isContentEditing()&&k)x||(x=!0,null!=r&&(m.cellEditor.restoreSelection(r),r=null),k(F),a.value=F+d, -x=!1);else if(F!=mxUtils.getValue(u.getSelectionState().style,b,f)){m.isEditing()&&m.stopEditing(!0);m.getModel().beginUpdate();try{var J=u.getSelectionState().cells;m.setCellStyles(b,F,J);b==mxConstants.STYLE_FONTSIZE&&m.updateLabelElements(J,function(O){O.style.fontSize=F+"px";O.removeAttribute("size")});for(var C=0;C<J.length;C++)0==m.model.getChildCount(J[C])&&m.autoSizeCell(J[C],!1);u.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[F],"cells",J))}finally{m.getModel().endUpdate()}}a.value= +x=!1);else if(F!=mxUtils.getValue(u.getSelectionState().style,b,f)){m.isEditing()&&m.stopEditing(!0);m.getModel().beginUpdate();try{var I=u.getSelectionState().cells;m.setCellStyles(b,F,I);b==mxConstants.STYLE_FONTSIZE&&m.updateLabelElements(I,function(N){N.style.fontSize=F+"px";N.removeAttribute("size")});for(var C=0;C<I.length;C++)0==m.model.getChildCount(I[C])&&m.autoSizeCell(I[C],!1);u.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[F],"cells",I))}finally{m.getModel().endUpdate()}}a.value= F+d;mxEvent.consume(D)});k&&m.cellEditor.isContentEditing()&&(mxEvent.addListener(a,"mousedown",function(){document.activeElement==m.cellEditor.textarea&&(r=m.cellEditor.saveSelection())}),mxEvent.addListener(a,"touchstart",function(){document.activeElement==m.cellEditor.textarea&&(r=m.cellEditor.saveSelection())}));mxEvent.addListener(a,"change",B);mxEvent.addListener(a,"blur",B);return B}; BaseFormatPanel.prototype.createPanel=function(){var a=document.createElement("div");a.className="geFormatSection";a.style.padding="12px 0px 12px 14px";return a};BaseFormatPanel.prototype.createTitle=function(a){var b=document.createElement("div");b.style.padding="0px 0px 6px 0px";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.width="200px";b.style.fontWeight="bold";mxUtils.write(b,a);return b}; BaseFormatPanel.prototype.addAction=function(a,b){var f=this.editorUi.actions.get(b);b=null;null!=f&&f.isEnabled()&&(b=mxUtils.button(f.label,function(e){f.funct(e,e)}),b.setAttribute("title",f.label+(null!=f.shortcut?" ("+f.shortcut+")":"")),b.style.marginBottom="2px",b.style.width="210px",a.appendChild(b),result=!0);return b}; @@ -2979,9 +2977,9 @@ a);d.appendChild(n);var u=!1,m=b(),r=function(x,B){u||(u=!0,x?(k.setAttribute("c BaseFormatPanel.prototype.createCellOption=function(a,b,f,e,g,d,k,n,u){var m=this.editorUi,r=m.editor.graph;e=null!=e?"null"==e?null:e:1;g=null!=g?"null"==g?null:g:0;var x=null!=u?r.getCommonStyle(u):m.getSelectionState().style;return this.createOption(a,function(){return mxUtils.getValue(x,b,f)!=g},function(B){n&&r.stopEditing();if(null!=k)k.funct();else{r.getModel().beginUpdate();try{var D=null!=u?u:m.getSelectionState().cells;B=B?e:g;r.setCellStyles(b,B,D);null!=d&&d(D,B);m.fireEvent(new mxEventObject("styleChanged", "keys",[b],"values",[B],"cells",D))}finally{r.getModel().endUpdate()}}},{install:function(B){this.listener=function(){B(mxUtils.getValue(x,b,f)!=g)};r.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){r.getModel().removeListener(this.listener)}})}; BaseFormatPanel.prototype.createColorOption=function(a,b,f,e,g,d,k,n){var u=document.createElement("div");u.style.padding="3px 0px 3px 0px";u.style.whiteSpace="nowrap";u.style.overflow="hidden";u.style.width="200px";u.style.height="18px";var m=document.createElement("input");m.setAttribute("type","checkbox");m.style.margin="1px 6px 0px 0px";m.style.verticalAlign="top";k||u.appendChild(m);var r=document.createElement("span");r.style.verticalAlign="top";mxUtils.write(r,a);u.appendChild(r);var x=b(), -B=!1,D=null,F=function(C,O,R){if(!B){var T="null"==e?null:e;B=!0;C=/(^#?[a-zA-Z0-9]*$)/.test(C)?C:T;T=null!=C&&C!=mxConstants.NONE?C:T;var Q=document.createElement("div");Q.style.width="36px";Q.style.height="12px";Q.style.margin="3px";Q.style.border="1px solid black";Q.style.backgroundColor="default"==T?n:T;D.innerText="";D.appendChild(Q);null!=C&&C!=mxConstants.NONE&&1<C.length&&"string"===typeof C&&(T="#"==C.charAt(0)?C.substring(1).toUpperCase():C,T=ColorDialog.prototype.colorNames[T],D.setAttribute("title", -null!=T?T+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper"));null!=C&&C!=mxConstants.NONE?(m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0):(m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1);D.style.display=m.checked||k?"":"none";null!=d&&d("null"==C?null:C);x=C;O||(R||k||b()!=x)&&f("null"==x?null:x,x);B=!1}},J=document.createElement("input");J.setAttribute("type","color");J.style.visibility="hidden";J.style.width="0px";J.style.height="0px";J.style.border= -"none";u.appendChild(J);D=mxUtils.button("",mxUtils.bind(this,function(C){var O=x;"default"==O&&(O=n);!mxEvent.isShiftDown(C)||mxClient.IS_IE||mxClient.IS_IE11?this.editorUi.pickColor(O,function(R){F(R,null,!0)},n):(J.value=O,J.click(),mxEvent.addListener(J,"input",function(){F(J.value,null,!0)}));mxEvent.consume(C)}));D.style.position="absolute";D.style.marginTop="-3px";D.style.left="178px";D.style.height="22px";D.className="geColorBtn";D.style.display=m.checked||k?"":"none";u.appendChild(D);a=null!= +B=!1,D=null,F=function(C,N,R){if(!B){var S="null"==e?null:e;B=!0;C=/(^#?[a-zA-Z0-9]*$)/.test(C)?C:S;S=null!=C&&C!=mxConstants.NONE?C:S;var Q=document.createElement("div");Q.style.width="36px";Q.style.height="12px";Q.style.margin="3px";Q.style.border="1px solid black";Q.style.backgroundColor="default"==S?n:S;D.innerText="";D.appendChild(Q);null!=C&&C!=mxConstants.NONE&&1<C.length&&"string"===typeof C&&(S="#"==C.charAt(0)?C.substring(1).toUpperCase():C,S=ColorDialog.prototype.colorNames[S],D.setAttribute("title", +null!=S?S+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper"));null!=C&&C!=mxConstants.NONE?(m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0):(m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1);D.style.display=m.checked||k?"":"none";null!=d&&d("null"==C?null:C);x=C;N||(R||k||b()!=x)&&f("null"==x?null:x,x);B=!1}},I=document.createElement("input");I.setAttribute("type","color");I.style.visibility="hidden";I.style.width="0px";I.style.height="0px";I.style.border= +"none";u.appendChild(I);D=mxUtils.button("",mxUtils.bind(this,function(C){var N=x;"default"==N&&(N=n);!mxEvent.isShiftDown(C)||mxClient.IS_IE||mxClient.IS_IE11?this.editorUi.pickColor(N,function(R){F(R,null,!0)},n):(I.value=N,I.click(),mxEvent.addListener(I,"input",function(){F(I.value,null,!0)}));mxEvent.consume(C)}));D.style.position="absolute";D.style.marginTop="-3px";D.style.left="178px";D.style.height="22px";D.className="geColorBtn";D.style.display=m.checked||k?"":"none";u.appendChild(D);a=null!= x&&"string"===typeof x&&"#"==x.charAt(0)?x.substring(1).toUpperCase():x;a=ColorDialog.prototype.colorNames[a];D.setAttribute("title",null!=a?a+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper");mxEvent.addListener(u,"click",function(C){C=mxEvent.getSource(C);if(C==m||"INPUT"!=C.nodeName)C!=m&&(m.checked=!m.checked),m.checked||null==x||x==mxConstants.NONE||e==mxConstants.NONE||(e=x),F(m.checked?e:mxConstants.NONE)});F(x,!0);null!=g&&(g.install(F),this.listeners.push(g));return u}; BaseFormatPanel.prototype.createCellColorOption=function(a,b,f,e,g,d){var k=this.editorUi,n=k.editor.graph;return this.createColorOption(a,function(){var u=n.view.getState(k.getSelectionState().cells[0]);return null!=u?mxUtils.getValue(u.style,b,null):null},function(u,m){n.getModel().beginUpdate();try{var r=k.getSelectionState().cells;n.setCellStyles(b,u,r);null!=g&&g(u);k.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[u],"cells",r))}finally{n.getModel().endUpdate()}},f||mxConstants.NONE, {install:function(u){this.listener=function(){var m=n.view.getState(k.getSelectionState().cells[0]);null!=m&&u(mxUtils.getValue(m.style,b,null),!0)};n.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){n.getModel().removeListener(this.listener)}},e,null,d)}; @@ -3023,78 +3021,78 @@ BaseFormatPanel.prototype.getUnitStep=function(){switch(this.editorUi.editor.gra ArrangePanel.prototype.addGeometry=function(a){var b=this,f=this.editorUi,e=f.editor.graph,g=e.getModel(),d=f.getSelectionState(),k=this.createPanel();k.style.paddingBottom="8px";var n=document.createElement("div");n.style.position="absolute";n.style.width="50px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("size"));k.appendChild(n);var u=this.addUnitInput(k,this.getUnit(),87,52,function(){D.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()), m=this.addUnitInput(k,this.getUnit(),16,52,function(){F.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),r=document.createElement("div");r.className="geSprite geSprite-fit";r.setAttribute("title",mxResources.get("autosize")+" ("+this.editorUi.actions.get("autosize").shortcut+")");r.style.position="relative";r.style.cursor="pointer";r.style.marginTop="-3px";r.style.border="0px";r.style.left="42px";mxUtils.setOpacity(r,50);mxEvent.addListener(r,"mouseenter",function(){mxUtils.setOpacity(r, 100)});mxEvent.addListener(r,"mouseleave",function(){mxUtils.setOpacity(r,50)});mxEvent.addListener(r,"click",function(){f.actions.get("autosize").funct()});k.appendChild(r);d.row?(u.style.visibility="hidden",u.nextSibling.style.visibility="hidden"):this.addLabel(k,mxResources.get("width"),87);this.addLabel(k,mxResources.get("height"),16);mxUtils.br(k);n=document.createElement("div");n.style.paddingTop="8px";n.style.paddingRight="20px";n.style.whiteSpace="nowrap";n.style.textAlign="right";var x=this.createCellOption(mxResources.get("constrainProportions"), -mxConstants.STYLE_ASPECT,null,"fixed","null");x.style.width="210px";n.appendChild(x);d.cell||d.row?r.style.visibility="hidden":k.appendChild(n);var B=x.getElementsByTagName("input")[0];this.addKeyHandler(u,R);this.addKeyHandler(m,R);var D=this.addGeometryHandler(u,function(S,P,X){if(e.isTableCell(X))return e.setTableColumnWidth(X,P-S.width,!0),!0;0<S.width&&(P=Math.max(1,b.fromUnit(P)),B.checked&&(S.height=Math.round(S.height*P*100/S.width)/100),S.width=P)});var F=this.addGeometryHandler(m,function(S, -P,X){e.isTableCell(X)&&(X=e.model.getParent(X));if(e.isTableRow(X))return e.setTableRowHeight(X,P-S.height),!0;0<S.height&&(P=Math.max(1,b.fromUnit(P)),B.checked&&(S.width=Math.round(S.width*P*100/S.height)/100),S.height=P)});(d.resizable||d.row||d.cell)&&a.appendChild(k);var J=this.createPanel();J.style.paddingBottom="30px";n=document.createElement("div");n.style.position="absolute";n.style.width="70px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("position")); -J.appendChild(n);var C=this.addUnitInput(J,this.getUnit(),87,52,function(){T.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),O=this.addUnitInput(J,this.getUnit(),16,52,function(){Q.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(J);this.addLabel(J,mxResources.get("left"),87);this.addLabel(J,mxResources.get("top"),16);var R=mxUtils.bind(this,function(S,P,X){d=f.getSelectionState();if(d.containsLabel||d.vertices.length!=e.getSelectionCount()|| -null==d.width||null==d.height)k.style.display="none";else{k.style.display="";if(X||document.activeElement!=u)u.value=this.inUnit(d.width)+(""==d.width?"":" "+this.getUnit());if(X||document.activeElement!=m)m.value=this.inUnit(d.height)+(""==d.height?"":" "+this.getUnit())}if(d.vertices.length==e.getSelectionCount()&&null!=d.x&&null!=d.y){J.style.display="";if(X||document.activeElement!=C)C.value=this.inUnit(d.x)+(""==d.x?"":" "+this.getUnit());if(X||document.activeElement!=O)O.value=this.inUnit(d.y)+ -(""==d.y?"":" "+this.getUnit())}else J.style.display="none"});this.addKeyHandler(C,R);this.addKeyHandler(O,R);g.addListener(mxEvent.CHANGE,R);this.listeners.push({destroy:function(){g.removeListener(R)}});R();var T=this.addGeometryHandler(C,function(S,P){P=b.fromUnit(P);S.relative?S.offset.x=P:S.x=P});var Q=this.addGeometryHandler(O,function(S,P){P=b.fromUnit(P);S.relative?S.offset.y=P:S.y=P});if(d.movable){if(0==d.edges.length&&1==d.vertices.length&&g.isEdge(g.getParent(d.vertices[0]))){var aa=e.getCellGeometry(d.vertices[0]); -null!=aa&&aa.relative&&(n=mxUtils.button(mxResources.get("center"),mxUtils.bind(this,function(S){g.beginUpdate();try{aa=aa.clone(),aa.x=0,aa.y=0,aa.offset=new mxPoint,g.setGeometry(d.vertices[0],aa)}finally{g.endUpdate()}})),n.setAttribute("title",mxResources.get("center")),n.style.width="210px",n.style.position="absolute",mxUtils.br(J),mxUtils.br(J),J.appendChild(n))}a.appendChild(J)}}; +mxConstants.STYLE_ASPECT,null,"fixed","null");x.style.width="210px";n.appendChild(x);d.cell||d.row?r.style.visibility="hidden":k.appendChild(n);var B=x.getElementsByTagName("input")[0];this.addKeyHandler(u,R);this.addKeyHandler(m,R);var D=this.addGeometryHandler(u,function(U,P,Y){if(e.isTableCell(Y))return e.setTableColumnWidth(Y,P-U.width,!0),!0;0<U.width&&(P=Math.max(1,b.fromUnit(P)),B.checked&&(U.height=Math.round(U.height*P*100/U.width)/100),U.width=P)});var F=this.addGeometryHandler(m,function(U, +P,Y){e.isTableCell(Y)&&(Y=e.model.getParent(Y));if(e.isTableRow(Y))return e.setTableRowHeight(Y,P-U.height),!0;0<U.height&&(P=Math.max(1,b.fromUnit(P)),B.checked&&(U.width=Math.round(U.width*P*100/U.height)/100),U.height=P)});(d.resizable||d.row||d.cell)&&a.appendChild(k);var I=this.createPanel();I.style.paddingBottom="30px";n=document.createElement("div");n.style.position="absolute";n.style.width="70px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("position")); +I.appendChild(n);var C=this.addUnitInput(I,this.getUnit(),87,52,function(){S.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),N=this.addUnitInput(I,this.getUnit(),16,52,function(){Q.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(I);this.addLabel(I,mxResources.get("left"),87);this.addLabel(I,mxResources.get("top"),16);var R=mxUtils.bind(this,function(U,P,Y){d=f.getSelectionState();if(d.containsLabel||d.vertices.length!=e.getSelectionCount()|| +null==d.width||null==d.height)k.style.display="none";else{k.style.display="";if(Y||document.activeElement!=u)u.value=this.inUnit(d.width)+(""==d.width?"":" "+this.getUnit());if(Y||document.activeElement!=m)m.value=this.inUnit(d.height)+(""==d.height?"":" "+this.getUnit())}if(d.vertices.length==e.getSelectionCount()&&null!=d.x&&null!=d.y){I.style.display="";if(Y||document.activeElement!=C)C.value=this.inUnit(d.x)+(""==d.x?"":" "+this.getUnit());if(Y||document.activeElement!=N)N.value=this.inUnit(d.y)+ +(""==d.y?"":" "+this.getUnit())}else I.style.display="none"});this.addKeyHandler(C,R);this.addKeyHandler(N,R);g.addListener(mxEvent.CHANGE,R);this.listeners.push({destroy:function(){g.removeListener(R)}});R();var S=this.addGeometryHandler(C,function(U,P){P=b.fromUnit(P);U.relative?U.offset.x=P:U.x=P});var Q=this.addGeometryHandler(N,function(U,P){P=b.fromUnit(P);U.relative?U.offset.y=P:U.y=P});if(d.movable){if(0==d.edges.length&&1==d.vertices.length&&g.isEdge(g.getParent(d.vertices[0]))){var aa=e.getCellGeometry(d.vertices[0]); +null!=aa&&aa.relative&&(n=mxUtils.button(mxResources.get("center"),mxUtils.bind(this,function(U){g.beginUpdate();try{aa=aa.clone(),aa.x=0,aa.y=0,aa.offset=new mxPoint,g.setGeometry(d.vertices[0],aa)}finally{g.endUpdate()}})),n.setAttribute("title",mxResources.get("center")),n.style.width="210px",n.style.position="absolute",mxUtils.br(I),mxUtils.br(I),I.appendChild(n))}a.appendChild(I)}}; ArrangePanel.prototype.addGeometryHandler=function(a,b){function f(n){if(""!=a.value){var u=parseFloat(a.value);if(isNaN(u))a.value=d+" "+k.getUnit();else if(u!=d){g.getModel().beginUpdate();try{for(var m=e.getSelectionState().cells,r=0;r<m.length;r++)if(g.getModel().isVertex(m[r])){var x=g.getCellGeometry(m[r]);if(null!=x&&(x=x.clone(),!b(x,u,m[r]))){var B=g.view.getState(m[r]);null!=B&&g.isRecursiveVertexResize(B)&&g.resizeChildCells(m[r],x);g.getModel().setGeometry(m[r],x);g.constrainChildCells(m[r])}}}finally{g.getModel().endUpdate()}d= u;a.value=u+" "+k.getUnit()}}mxEvent.consume(n)}var e=this.editorUi,g=e.editor.graph,d=null,k=this;mxEvent.addListener(a,"blur",f);mxEvent.addListener(a,"change",f);mxEvent.addListener(a,"focus",function(){d=a.value});return f}; ArrangePanel.prototype.addEdgeGeometryHandler=function(a,b){function f(k){if(""!=a.value){var n=parseFloat(a.value);if(isNaN(n))a.value=d+" pt";else if(n!=d){g.getModel().beginUpdate();try{for(var u=e.getSelectionState().cells,m=0;m<u.length;m++)if(g.getModel().isEdge(u[m])){var r=g.getCellGeometry(u[m]);null!=r&&(r=r.clone(),b(r,n),g.getModel().setGeometry(u[m],r))}}finally{g.getModel().endUpdate()}d=n;a.value=n+" pt"}}mxEvent.consume(k)}var e=this.editorUi,g=e.editor.graph,d=null;mxEvent.addListener(a, "blur",f);mxEvent.addListener(a,"change",f);mxEvent.addListener(a,"focus",function(){d=a.value});return f}; -ArrangePanel.prototype.addEdgeGeometry=function(a){var b=this.editorUi,f=b.editor.graph,e=b.getSelectionState(),g=this.createPanel(),d=document.createElement("div");d.style.position="absolute";d.style.width="70px";d.style.marginTop="0px";d.style.fontWeight="bold";mxUtils.write(d,mxResources.get("width"));g.appendChild(d);var k=this.addUnitInput(g,"pt",12,44,function(){n.apply(this,arguments)});mxUtils.br(g);this.addKeyHandler(k,F);var n=mxUtils.bind(this,function(T){var Q=parseInt(k.value);Q=Math.min(999, -Math.max(1,isNaN(Q)?1:Q));if(Q!=mxUtils.getValue(e.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)){var aa=b.getSelectionState().cells;f.setCellStyles("width",Q,aa);b.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[Q],"cells",aa))}k.value=Q+" pt";mxEvent.consume(T)});mxEvent.addListener(k,"blur",n);mxEvent.addListener(k,"change",n);a.appendChild(g);var u=this.createPanel();u.style.paddingBottom="30px";d=document.createElement("div");d.style.position= -"absolute";d.style.width="70px";d.style.marginTop="0px";mxUtils.write(d,mxResources.get("linestart"));u.appendChild(d);var m=this.addUnitInput(u,"pt",87,52,function(){J.apply(this,arguments)}),r=this.addUnitInput(u,"pt",16,52,function(){C.apply(this,arguments)});mxUtils.br(u);this.addLabel(u,mxResources.get("left"),87);this.addLabel(u,mxResources.get("top"),16);a.appendChild(u);this.addKeyHandler(m,F);this.addKeyHandler(r,F);var x=this.createPanel();x.style.paddingBottom="30px";d=document.createElement("div"); -d.style.position="absolute";d.style.width="70px";d.style.marginTop="0px";mxUtils.write(d,mxResources.get("lineend"));x.appendChild(d);var B=this.addUnitInput(x,"pt",87,52,function(){O.apply(this,arguments)}),D=this.addUnitInput(x,"pt",16,52,function(){R.apply(this,arguments)});mxUtils.br(x);this.addLabel(x,mxResources.get("left"),87);this.addLabel(x,mxResources.get("top"),16);a.appendChild(x);this.addKeyHandler(B,F);this.addKeyHandler(D,F);var F=mxUtils.bind(this,function(T,Q,aa){e=b.getSelectionState(); -T=e.cells[0];if("link"==e.style.shape||"flexArrow"==e.style.shape){if(g.style.display="",aa||document.activeElement!=k)aa=mxUtils.getValue(e.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),k.value=aa+" pt"}else g.style.display="none";1==e.cells.length&&f.model.isEdge(T)?(aa=f.model.getGeometry(T),null!=aa.sourcePoint&&null==f.model.getTerminal(T,!0)?(m.value=aa.sourcePoint.x,r.value=aa.sourcePoint.y):u.style.display="none",null!=aa.targetPoint&&null==f.model.getTerminal(T, -!1)?(B.value=aa.targetPoint.x,D.value=aa.targetPoint.y):x.style.display="none"):(u.style.display="none",x.style.display="none")});var J=this.addEdgeGeometryHandler(m,function(T,Q){T.sourcePoint.x=Q});var C=this.addEdgeGeometryHandler(r,function(T,Q){T.sourcePoint.y=Q});var O=this.addEdgeGeometryHandler(B,function(T,Q){T.targetPoint.x=Q});var R=this.addEdgeGeometryHandler(D,function(T,Q){T.targetPoint.y=Q});f.getModel().addListener(mxEvent.CHANGE,F);this.listeners.push({destroy:function(){f.getModel().removeListener(F)}}); +ArrangePanel.prototype.addEdgeGeometry=function(a){var b=this.editorUi,f=b.editor.graph,e=b.getSelectionState(),g=this.createPanel(),d=document.createElement("div");d.style.position="absolute";d.style.width="70px";d.style.marginTop="0px";d.style.fontWeight="bold";mxUtils.write(d,mxResources.get("width"));g.appendChild(d);var k=this.addUnitInput(g,"pt",12,44,function(){n.apply(this,arguments)});mxUtils.br(g);this.addKeyHandler(k,F);var n=mxUtils.bind(this,function(S){var Q=parseInt(k.value);Q=Math.min(999, +Math.max(1,isNaN(Q)?1:Q));if(Q!=mxUtils.getValue(e.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)){var aa=b.getSelectionState().cells;f.setCellStyles("width",Q,aa);b.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[Q],"cells",aa))}k.value=Q+" pt";mxEvent.consume(S)});mxEvent.addListener(k,"blur",n);mxEvent.addListener(k,"change",n);a.appendChild(g);var u=this.createPanel();u.style.paddingBottom="30px";d=document.createElement("div");d.style.position= +"absolute";d.style.width="70px";d.style.marginTop="0px";mxUtils.write(d,mxResources.get("linestart"));u.appendChild(d);var m=this.addUnitInput(u,"pt",87,52,function(){I.apply(this,arguments)}),r=this.addUnitInput(u,"pt",16,52,function(){C.apply(this,arguments)});mxUtils.br(u);this.addLabel(u,mxResources.get("left"),87);this.addLabel(u,mxResources.get("top"),16);a.appendChild(u);this.addKeyHandler(m,F);this.addKeyHandler(r,F);var x=this.createPanel();x.style.paddingBottom="30px";d=document.createElement("div"); +d.style.position="absolute";d.style.width="70px";d.style.marginTop="0px";mxUtils.write(d,mxResources.get("lineend"));x.appendChild(d);var B=this.addUnitInput(x,"pt",87,52,function(){N.apply(this,arguments)}),D=this.addUnitInput(x,"pt",16,52,function(){R.apply(this,arguments)});mxUtils.br(x);this.addLabel(x,mxResources.get("left"),87);this.addLabel(x,mxResources.get("top"),16);a.appendChild(x);this.addKeyHandler(B,F);this.addKeyHandler(D,F);var F=mxUtils.bind(this,function(S,Q,aa){e=b.getSelectionState(); +S=e.cells[0];if("link"==e.style.shape||"flexArrow"==e.style.shape){if(g.style.display="",aa||document.activeElement!=k)aa=mxUtils.getValue(e.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),k.value=aa+" pt"}else g.style.display="none";1==e.cells.length&&f.model.isEdge(S)?(aa=f.model.getGeometry(S),null!=aa.sourcePoint&&null==f.model.getTerminal(S,!0)?(m.value=aa.sourcePoint.x,r.value=aa.sourcePoint.y):u.style.display="none",null!=aa.targetPoint&&null==f.model.getTerminal(S, +!1)?(B.value=aa.targetPoint.x,D.value=aa.targetPoint.y):x.style.display="none"):(u.style.display="none",x.style.display="none")});var I=this.addEdgeGeometryHandler(m,function(S,Q){S.sourcePoint.x=Q});var C=this.addEdgeGeometryHandler(r,function(S,Q){S.sourcePoint.y=Q});var N=this.addEdgeGeometryHandler(B,function(S,Q){S.targetPoint.x=Q});var R=this.addEdgeGeometryHandler(D,function(S,Q){S.targetPoint.y=Q});f.getModel().addListener(mxEvent.CHANGE,F);this.listeners.push({destroy:function(){f.getModel().removeListener(F)}}); F()};TextFormatPanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};mxUtils.extend(TextFormatPanel,BaseFormatPanel);TextFormatPanel.prototype.init=function(){this.container.style.borderBottom="none";this.addFont(this.container)}; TextFormatPanel.prototype.addFont=function(a){function b(ca,t){ca.style.backgroundImage=t?Editor.isDarkMode()?"linear-gradient(rgb(0 161 241) 0px, rgb(0, 97, 146) 100%)":"linear-gradient(#c5ecff 0px,#87d4fb 100%)":""}var f=this.editorUi,e=f.editor.graph,g=f.getSelectionState(),d=this.createTitle(mxResources.get("font"));d.style.paddingLeft="14px";d.style.paddingTop="10px";d.style.paddingBottom="6px";a.appendChild(d);d=this.createPanel();d.style.paddingTop="2px";d.style.paddingBottom="2px";d.style.position= "relative";d.style.marginLeft="-2px";d.style.borderWidth="0px";d.className="geToolbarContainer";if(e.cellEditor.isContentEditing()){var k=d.cloneNode(),n=this.editorUi.toolbar.addMenu(mxResources.get("style"),mxResources.get("style"),!0,"formatBlock",k,null,!0);n.style.color="rgb(112, 112, 112)";n.style.whiteSpace="nowrap";n.style.overflow="hidden";n.style.margin="0px";this.addArrow(n);n.style.width="200px";n.style.height="15px";n=n.getElementsByTagName("div")[0];n.style.cssFloat="right";a.appendChild(k)}a.appendChild(d); k=this.createPanel();k.style.marginTop="8px";k.style.borderTop="1px solid #c0c0c0";k.style.paddingTop="6px";k.style.paddingBottom="6px";var u=this.editorUi.toolbar.addMenu("Helvetica",mxResources.get("fontFamily"),!0,"fontFamily",d,null,!0);u.style.color="rgb(112, 112, 112)";u.style.whiteSpace="nowrap";u.style.overflow="hidden";u.style.margin="0px";this.addArrow(u);u.style.width="200px";u.style.height="15px";n=d.cloneNode(!1);n.style.marginLeft="-3px";var m=this.editorUi.toolbar.addItems(["bold", "italic","underline"],n,!0);m[0].setAttribute("title",mxResources.get("bold")+" ("+this.editorUi.actions.get("bold").shortcut+")");m[1].setAttribute("title",mxResources.get("italic")+" ("+this.editorUi.actions.get("italic").shortcut+")");m[2].setAttribute("title",mxResources.get("underline")+" ("+this.editorUi.actions.get("underline").shortcut+")");var r=this.editorUi.toolbar.addItems(["vertical"],n,!0)[0];a.appendChild(n);this.styleButtons(m);this.styleButtons([r]);var x=d.cloneNode(!1);x.style.marginLeft= "-3px";x.style.paddingBottom="0px";var B=function(ca){return function(){return ca()}},D=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),e.cellEditor.isContentEditing()?function(ca){e.cellEditor.alignText(mxConstants.ALIGN_LEFT,ca);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_LEFT],"cells",g.cells))}:B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT])),x),F=this.editorUi.toolbar.addButton("geSprite-center", -mxResources.get("center"),e.cellEditor.isContentEditing()?function(ca){e.cellEditor.alignText(mxConstants.ALIGN_CENTER,ca);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_CENTER],"cells",g.cells))}:B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),x),J=this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),e.cellEditor.isContentEditing()?function(ca){e.cellEditor.alignText(mxConstants.ALIGN_RIGHT, -ca);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",g.cells))}:B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),x);this.styleButtons([D,F,J]);if(e.cellEditor.isContentEditing()){var C=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},n);this.styleButtons([C]);C.firstChild.style.background= +mxResources.get("center"),e.cellEditor.isContentEditing()?function(ca){e.cellEditor.alignText(mxConstants.ALIGN_CENTER,ca);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_CENTER],"cells",g.cells))}:B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),x),I=this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),e.cellEditor.isContentEditing()?function(ca){e.cellEditor.alignText(mxConstants.ALIGN_RIGHT, +ca);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",g.cells))}:B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),x);this.styleButtons([D,F,I]);if(e.cellEditor.isContentEditing()){var C=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},n);this.styleButtons([C]);C.firstChild.style.background= "url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjR2MjRIMFYweiIvPjwvZGVmcz48Y2xpcFBhdGggaWQ9ImIiPjx1c2UgeGxpbms6aHJlZj0iI2EiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9jbGlwUGF0aD48cGF0aCBjbGlwLXBhdGg9InVybCgjYikiIGZpbGw9IiMwMTAxMDEiIGQ9Ik03LjI0IDguNzVjLS4yNi0uNDgtLjM5LTEuMDMtLjM5LTEuNjcgMC0uNjEuMTMtMS4xNi40LTEuNjcuMjYtLjUuNjMtLjkzIDEuMTEtMS4yOS40OC0uMzUgMS4wNS0uNjMgMS43LS44My42Ni0uMTkgMS4zOS0uMjkgMi4xOC0uMjkuODEgMCAxLjU0LjExIDIuMjEuMzQuNjYuMjIgMS4yMy41NCAxLjY5Ljk0LjQ3LjQuODMuODggMS4wOCAxLjQzLjI1LjU1LjM4IDEuMTUuMzggMS44MWgtMy4wMWMwLS4zMS0uMDUtLjU5LS4xNS0uODUtLjA5LS4yNy0uMjQtLjQ5LS40NC0uNjgtLjItLjE5LS40NS0uMzMtLjc1LS40NC0uMy0uMS0uNjYtLjE2LTEuMDYtLjE2LS4zOSAwLS43NC4wNC0xLjAzLjEzLS4yOS4wOS0uNTMuMjEtLjcyLjM2LS4xOS4xNi0uMzQuMzQtLjQ0LjU1LS4xLjIxLS4xNS40My0uMTUuNjYgMCAuNDguMjUuODguNzQgMS4yMS4zOC4yNS43Ny40OCAxLjQxLjdINy4zOWMtLjA1LS4wOC0uMTEtLjE3LS4xNS0uMjV6TTIxIDEydi0ySDN2Mmg5LjYyYy4xOC4wNy40LjE0LjU1LjIuMzcuMTcuNjYuMzQuODcuNTEuMjEuMTcuMzUuMzYuNDMuNTcuMDcuMi4xMS40My4xMS42OSAwIC4yMy0uMDUuNDUtLjE0LjY2LS4wOS4yLS4yMy4zOC0uNDIuNTMtLjE5LjE1LS40Mi4yNi0uNzEuMzUtLjI5LjA4LS42My4xMy0xLjAxLjEzLS40MyAwLS44My0uMDQtMS4xOC0uMTNzLS42Ni0uMjMtLjkxLS40MmMtLjI1LS4xOS0uNDUtLjQ0LS41OS0uNzUtLjE0LS4zMS0uMjUtLjc2LS4yNS0xLjIxSDYuNGMwIC41NS4wOCAxLjEzLjI0IDEuNTguMTYuNDUuMzcuODUuNjUgMS4yMS4yOC4zNS42LjY2Ljk4LjkyLjM3LjI2Ljc4LjQ4IDEuMjIuNjUuNDQuMTcuOS4zIDEuMzguMzkuNDguMDguOTYuMTMgMS40NC4xMy44IDAgMS41My0uMDkgMi4xOC0uMjhzMS4yMS0uNDUgMS42Ny0uNzljLjQ2LS4zNC44Mi0uNzcgMS4wNy0xLjI3cy4zOC0xLjA3LjM4LTEuNzFjMC0uNi0uMS0xLjE0LS4zMS0xLjYxLS4wNS0uMTEtLjExLS4yMy0uMTctLjMzSDIxeiIvPjwvc3ZnPg==)"; -C.firstChild.style.backgroundPosition="2px 2px";C.firstChild.style.backgroundSize="18px 18px";this.styleButtons([C])}var O=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),x),R=this.editorUi.toolbar.addButton("geSprite-middle",mxResources.get("middle"),B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),x),T=this.editorUi.toolbar.addButton("geSprite-bottom", -mxResources.get("bottom"),B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),x);this.styleButtons([O,R,T]);a.appendChild(x);var Q,aa,S,P,X;if(e.cellEditor.isContentEditing()){O.style.display="none";R.style.display="none";T.style.display="none";r.style.display="none";var ha=this.editorUi.toolbar.addButton("geSprite-justifyfull",mxResources.get("block"),function(){1==ha.style.opacity&&document.execCommand("justifyfull",!1,null)},x);ha.style.marginRight= -"9px";ha.style.opacity=1;this.styleButtons([ha,Q=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},x),aa=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},x)]);Q.style.marginLeft="10px";B=x.cloneNode(!1);B.style.paddingTop="4px";x=[this.editorUi.toolbar.addButton("geSprite-orderedlist", +C.firstChild.style.backgroundPosition="2px 2px";C.firstChild.style.backgroundSize="18px 18px";this.styleButtons([C])}var N=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),x),R=this.editorUi.toolbar.addButton("geSprite-middle",mxResources.get("middle"),B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),x),S=this.editorUi.toolbar.addButton("geSprite-bottom", +mxResources.get("bottom"),B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),x);this.styleButtons([N,R,S]);a.appendChild(x);var Q,aa,U,P,Y;if(e.cellEditor.isContentEditing()){N.style.display="none";R.style.display="none";S.style.display="none";r.style.display="none";var ja=this.editorUi.toolbar.addButton("geSprite-justifyfull",mxResources.get("block"),function(){1==ja.style.opacity&&document.execCommand("justifyfull",!1,null)},x);ja.style.marginRight= +"9px";ja.style.opacity=1;this.styleButtons([ja,Q=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},x),aa=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},x)]);Q.style.marginLeft="10px";B=x.cloneNode(!1);B.style.paddingTop="4px";x=[this.editorUi.toolbar.addButton("geSprite-orderedlist", mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},B),this.editorUi.toolbar.addButton("geSprite-unorderedlist",mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},B),this.editorUi.toolbar.addButton("geSprite-outdent",mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},B),this.editorUi.toolbar.addButton("geSprite-indent",mxResources.get("increaseIndent"),function(){document.execCommand("indent", -!1,null)},B),this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},B),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){e.cellEditor.toggleViewMode()},B)];this.styleButtons(x);x[x.length-2].style.marginLeft="10px";a.appendChild(B)}else m[2].style.marginRight="12px",J.style.marginRight="12px";x=d.cloneNode(!1);x.style.marginLeft="0px";x.style.paddingTop="8px";x.style.paddingBottom= -"4px";x.style.fontWeight="normal";mxUtils.write(x,mxResources.get("position"));var fa=document.createElement("select");fa.style.position="absolute";fa.style.left="126px";fa.style.width="98px";fa.style.border="1px solid rgb(160, 160, 160)";fa.style.borderRadius="4px";fa.style.marginTop="-2px";C="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" ");var sa={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER, +!1,null)},B),this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},B),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){e.cellEditor.toggleViewMode()},B)];this.styleButtons(x);x[x.length-2].style.marginLeft="10px";a.appendChild(B)}else m[2].style.marginRight="12px",I.style.marginRight="12px";x=d.cloneNode(!1);x.style.marginLeft="0px";x.style.paddingTop="8px";x.style.paddingBottom= +"4px";x.style.fontWeight="normal";mxUtils.write(x,mxResources.get("position"));var fa=document.createElement("select");fa.style.position="absolute";fa.style.left="126px";fa.style.width="98px";fa.style.border="1px solid rgb(160, 160, 160)";fa.style.borderRadius="4px";fa.style.marginTop="-2px";C="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" ");var ra={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER, mxConstants.ALIGN_TOP,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],left:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE],center:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT, mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]};for(B=0;B<C.length;B++){var K=document.createElement("option");K.setAttribute("value",C[B]);mxUtils.write(K,mxResources.get(C[B]));fa.appendChild(K)}x.appendChild(fa);C=d.cloneNode(!1);C.style.marginLeft="0px";C.style.paddingTop= -"4px";C.style.paddingBottom="4px";C.style.fontWeight="normal";mxUtils.write(C,mxResources.get("writingDirection"));var V=document.createElement("select");V.style.position="absolute";V.style.border="1px solid rgb(160, 160, 160)";V.style.left="126px";V.style.width="98px";V.style.borderRadius="4px";V.style.marginTop="-2px";K=["automatic","leftToRight","rightToLeft"];var G={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL};for(B=0;B<K.length;B++){var M= -document.createElement("option");M.setAttribute("value",K[B]);mxUtils.write(M,mxResources.get(K[B]));V.appendChild(M)}C.appendChild(V);e.isEditing()||(a.appendChild(x),mxEvent.addListener(fa,"change",function(ca){e.getModel().beginUpdate();try{var t=sa[fa.value];null!=t&&(e.setCellStyles(mxConstants.STYLE_LABEL_POSITION,t[0],g.cells),e.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,t[1],g.cells),e.setCellStyles(mxConstants.STYLE_ALIGN,t[2],g.cells),e.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN, -t[3],g.cells))}finally{e.getModel().endUpdate()}mxEvent.consume(ca)}),a.appendChild(C),mxEvent.addListener(V,"change",function(ca){e.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,G[V.value],g.cells);mxEvent.consume(ca)}));var U=document.createElement("input");U.style.position="absolute";U.style.border="1px solid rgb(160, 160, 160)";U.style.textAlign="right";U.style.marginTop="4px";U.style.left="161px";U.style.width="53px";U.style.borderRadius="4px";U.style.height="23px";U.style.boxSizing="border-box"; -n.appendChild(U);var ba=null;x=this.installInputHandler(U,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,1,999," pt",function(ca){if(window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11){var t=function(H,L){null!=e.cellEditor.textarea&&H!=e.cellEditor.textarea&&e.cellEditor.textarea.contains(H)&&(L||z.containsNode(H,!0))&&("FONT"==H.nodeName?(H.removeAttribute("size"),H.style.fontSize=ca+"px"):mxUtils.getCurrentStyle(H).fontSize!=ca+"px"&&(mxUtils.getCurrentStyle(H.parentNode).fontSize!= -ca+"px"?H.style.fontSize=ca+"px":H.style.fontSize=""));f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTSIZE],"values",[ca],"cells",g.cells))},z=window.getSelection(),A=0<z.rangeCount?z.getRangeAt(0).commonAncestorContainer:e.cellEditor.textarea;A!=e.cellEditor.textarea&&A.nodeType==mxConstants.NODETYPE_ELEMENT||document.execCommand("fontSize",!1,"1");A!=e.cellEditor.textarea&&(A=A.parentNode);if(null!=A&&A.nodeType==mxConstants.NODETYPE_ELEMENT){var E=A.getElementsByTagName("*"); -t(A);for(A=0;A<E.length;A++)t(E[A])}U.value=ca+" pt"}else if(window.getSelection||document.selection)if(t=function(H,L){for(;null!=L;){if(L===H)return!0;L=L.parentNode}return!1},E=null,document.selection?E=document.selection.createRange().parentElement():(z=window.getSelection(),0<z.rangeCount&&(E=z.getRangeAt(0).commonAncestorContainer)),null!=E&&t(e.cellEditor.textarea,E))for(ba=ca,document.execCommand("fontSize",!1,"4"),E=e.cellEditor.textarea.getElementsByTagName("font"),A=0;A<E.length;A++)if("4"== -E[A].getAttribute("size")){E[A].removeAttribute("size");E[A].style.fontSize=ba+"px";window.setTimeout(function(){U.value=ba+" pt";ba=null},0);break}},!0);x=this.createStepper(U,x,1,10,!0,Menus.prototype.defaultFontSize);x.style.display=U.style.display;x.style.marginTop="4px";x.style.left="214px";n.appendChild(x);n=u.getElementsByTagName("div")[0];n.style.cssFloat="right";var la=null,ra=e.shapeBackgroundColor,Y=null,da=e.shapeForegroundColor,pa=e.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"), -function(){return ra},function(ca){document.execCommand("backcolor",!1,ca!=mxConstants.NONE?ca:"transparent");f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],"values",[ca],"cells",g.cells))},e.shapeBackgroundColor,{install:function(ca){la=ca},destroy:function(){la=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"default",null,function(ca){e.updateLabelElements(g.cells,function(t){t.style.backgroundColor= -null})},e.shapeBackgroundColor);pa.style.fontWeight="bold";var wa=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"default",null,null,e.shapeForegroundColor);wa.style.fontWeight="bold";n=1<=g.vertices.length?e.stylesheet.getDefaultVertexStyle():e.stylesheet.getDefaultEdgeStyle();n=e.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return da},function(ca){if(mxClient.IS_FF){for(var t=e.cellEditor.textarea.getElementsByTagName("font"), +"4px";C.style.paddingBottom="4px";C.style.fontWeight="normal";mxUtils.write(C,mxResources.get("writingDirection"));var V=document.createElement("select");V.style.position="absolute";V.style.border="1px solid rgb(160, 160, 160)";V.style.left="126px";V.style.width="98px";V.style.borderRadius="4px";V.style.marginTop="-2px";K=["automatic","leftToRight","rightToLeft"];var O={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL};for(B=0;B<K.length;B++){var T= +document.createElement("option");T.setAttribute("value",K[B]);mxUtils.write(T,mxResources.get(K[B]));V.appendChild(T)}C.appendChild(V);e.isEditing()||(a.appendChild(x),mxEvent.addListener(fa,"change",function(ca){e.getModel().beginUpdate();try{var t=ra[fa.value];null!=t&&(e.setCellStyles(mxConstants.STYLE_LABEL_POSITION,t[0],g.cells),e.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,t[1],g.cells),e.setCellStyles(mxConstants.STYLE_ALIGN,t[2],g.cells),e.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN, +t[3],g.cells))}finally{e.getModel().endUpdate()}mxEvent.consume(ca)}),a.appendChild(C),mxEvent.addListener(V,"change",function(ca){e.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,O[V.value],g.cells);mxEvent.consume(ca)}));var J=document.createElement("input");J.style.position="absolute";J.style.border="1px solid rgb(160, 160, 160)";J.style.textAlign="right";J.style.marginTop="4px";J.style.left="161px";J.style.width="53px";J.style.borderRadius="4px";J.style.height="23px";J.style.boxSizing="border-box"; +n.appendChild(J);var ba=null;x=this.installInputHandler(J,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,1,999," pt",function(ca){if(window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11){var t=function(G,L){null!=e.cellEditor.textarea&&G!=e.cellEditor.textarea&&e.cellEditor.textarea.contains(G)&&(L||z.containsNode(G,!0))&&("FONT"==G.nodeName?(G.removeAttribute("size"),G.style.fontSize=ca+"px"):mxUtils.getCurrentStyle(G).fontSize!=ca+"px"&&(mxUtils.getCurrentStyle(G.parentNode).fontSize!= +ca+"px"?G.style.fontSize=ca+"px":G.style.fontSize=""));f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTSIZE],"values",[ca],"cells",g.cells))},z=window.getSelection(),A=0<z.rangeCount?z.getRangeAt(0).commonAncestorContainer:e.cellEditor.textarea;A!=e.cellEditor.textarea&&A.nodeType==mxConstants.NODETYPE_ELEMENT||document.execCommand("fontSize",!1,"1");A!=e.cellEditor.textarea&&(A=A.parentNode);if(null!=A&&A.nodeType==mxConstants.NODETYPE_ELEMENT){var E=A.getElementsByTagName("*"); +t(A);for(A=0;A<E.length;A++)t(E[A])}J.value=ca+" pt"}else if(window.getSelection||document.selection)if(t=function(G,L){for(;null!=L;){if(L===G)return!0;L=L.parentNode}return!1},E=null,document.selection?E=document.selection.createRange().parentElement():(z=window.getSelection(),0<z.rangeCount&&(E=z.getRangeAt(0).commonAncestorContainer)),null!=E&&t(e.cellEditor.textarea,E))for(ba=ca,document.execCommand("fontSize",!1,"4"),E=e.cellEditor.textarea.getElementsByTagName("font"),A=0;A<E.length;A++)if("4"== +E[A].getAttribute("size")){E[A].removeAttribute("size");E[A].style.fontSize=ba+"px";window.setTimeout(function(){J.value=ba+" pt";ba=null},0);break}},!0);x=this.createStepper(J,x,1,10,!0,Menus.prototype.defaultFontSize);x.style.display=J.style.display;x.style.marginTop="4px";x.style.left="214px";n.appendChild(x);n=u.getElementsByTagName("div")[0];n.style.cssFloat="right";var ha=null,na=e.shapeBackgroundColor,W=null,da=e.shapeForegroundColor,sa=e.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"), +function(){return na},function(ca){document.execCommand("backcolor",!1,ca!=mxConstants.NONE?ca:"transparent");f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],"values",[ca],"cells",g.cells))},e.shapeBackgroundColor,{install:function(ca){ha=ca},destroy:function(){ha=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"default",null,function(ca){e.updateLabelElements(g.cells,function(t){t.style.backgroundColor= +null})},e.shapeBackgroundColor);sa.style.fontWeight="bold";var ta=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"default",null,null,e.shapeForegroundColor);ta.style.fontWeight="bold";n=1<=g.vertices.length?e.stylesheet.getDefaultVertexStyle():e.stylesheet.getDefaultEdgeStyle();n=e.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return da},function(ca){if(mxClient.IS_FF){for(var t=e.cellEditor.textarea.getElementsByTagName("font"), z=[],A=0;A<t.length;A++)z.push({node:t[A],color:t[A].getAttribute("color")});document.execCommand("forecolor",!1,ca!=mxConstants.NONE?ca:"transparent");f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[ca],"cells",g.cells));ca=e.cellEditor.textarea.getElementsByTagName("font");for(A=0;A<ca.length;A++)if(A>=z.length||ca[A]!=z[A].node||ca[A]==z[A].node&&ca[A].getAttribute("color")!=z[A].color){z=ca[A].firstChild;if(null!=z&&"A"==z.nodeName&&null==z.nextSibling&& -null!=z.firstChild){ca[A].parentNode.insertBefore(z,ca[A]);for(t=z.firstChild;null!=t;){var E=t.nextSibling;ca[A].appendChild(t);t=E}z.appendChild(ca[A])}break}}else document.execCommand("forecolor",!1,ca!=mxConstants.NONE?ca:"transparent"),f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[ca],"cells",g.cells))},null!=n[mxConstants.STYLE_FONTCOLOR]?n[mxConstants.STYLE_FONTCOLOR]:e.shapeForegroundColor,{install:function(ca){Y=ca},destroy:function(){Y=null}}, -null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"default",function(ca){pa.style.display=ca==mxConstants.NONE?"none":"";wa.style.display=pa.style.display},function(ca){ca==mxConstants.NONE?e.setCellStyles(mxConstants.STYLE_NOLABEL,"1",g.cells):e.setCellStyles(mxConstants.STYLE_NOLABEL,null,g.cells);e.setCellStyles(mxConstants.STYLE_FONTCOLOR,ca,g.cells);e.updateLabelElements(g.cells,function(t){t.removeAttribute("color");t.style.color=null})},e.shapeForegroundColor); -n.style.fontWeight="bold";k.appendChild(n);k.appendChild(pa);e.cellEditor.isContentEditing()||k.appendChild(wa);a.appendChild(k);k=this.createPanel();k.style.paddingTop="2px";k.style.paddingBottom="4px";n=e.filterSelectionCells(mxUtils.bind(this,function(ca){var t=e.view.getState(ca);return null==t||e.isAutoSizeState(t)||e.getModel().isEdge(ca)||!e.isTableRow(ca)&&!e.isTableCell(ca)&&!e.isCellResizable(ca)}));x=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap", +null!=z.firstChild){ca[A].parentNode.insertBefore(z,ca[A]);for(t=z.firstChild;null!=t;){var E=t.nextSibling;ca[A].appendChild(t);t=E}z.appendChild(ca[A])}break}}else document.execCommand("forecolor",!1,ca!=mxConstants.NONE?ca:"transparent"),f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[ca],"cells",g.cells))},null!=n[mxConstants.STYLE_FONTCOLOR]?n[mxConstants.STYLE_FONTCOLOR]:e.shapeForegroundColor,{install:function(ca){W=ca},destroy:function(){W=null}}, +null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"default",function(ca){sa.style.display=ca==mxConstants.NONE?"none":"";ta.style.display=sa.style.display},function(ca){ca==mxConstants.NONE?e.setCellStyles(mxConstants.STYLE_NOLABEL,"1",g.cells):e.setCellStyles(mxConstants.STYLE_NOLABEL,null,g.cells);e.setCellStyles(mxConstants.STYLE_FONTCOLOR,ca,g.cells);e.updateLabelElements(g.cells,function(t){t.removeAttribute("color");t.style.color=null})},e.shapeForegroundColor); +n.style.fontWeight="bold";k.appendChild(n);k.appendChild(sa);e.cellEditor.isContentEditing()||k.appendChild(ta);a.appendChild(k);k=this.createPanel();k.style.paddingTop="2px";k.style.paddingBottom="4px";n=e.filterSelectionCells(mxUtils.bind(this,function(ca){var t=e.view.getState(ca);return null==t||e.isAutoSizeState(t)||e.getModel().isEdge(ca)||!e.isTableRow(ca)&&!e.isTableCell(ca)&&!e.isCellResizable(ca)}));x=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap", "null",null,null,!0,n);x.style.fontWeight="bold";0<n.length&&k.appendChild(x);n=this.createCellOption(mxResources.get("formattedText"),"html",0,null,null,null,f.actions.get("formattedText"));n.style.fontWeight="bold";k.appendChild(n);n=this.createPanel();n.style.paddingTop="10px";n.style.paddingBottom="28px";n.style.fontWeight="normal";x=document.createElement("div");x.style.position="absolute";x.style.width="70px";x.style.marginTop="0px";x.style.fontWeight="bold";mxUtils.write(x,mxResources.get("spacing")); -n.appendChild(x);var Ka=this.addUnitInput(n,"pt",87,52,function(){Ya.apply(this,arguments)}),Ha=this.addUnitInput(n,"pt",16,52,function(){ab.apply(this,arguments)});mxUtils.br(n);this.addLabel(n,mxResources.get("top"),87);this.addLabel(n,mxResources.get("global"),16);mxUtils.br(n);mxUtils.br(n);var ua=this.addUnitInput(n,"pt",158,52,function(){kb.apply(this,arguments)}),Ca=this.addUnitInput(n,"pt",87,52,function(){Za.apply(this,arguments)}),qa=this.addUnitInput(n,"pt",16,52,function(){Va.apply(this, +n.appendChild(x);var Ja=this.addUnitInput(n,"pt",87,52,function(){Ya.apply(this,arguments)}),Ha=this.addUnitInput(n,"pt",16,52,function(){ab.apply(this,arguments)});mxUtils.br(n);this.addLabel(n,mxResources.get("top"),87);this.addLabel(n,mxResources.get("global"),16);mxUtils.br(n);mxUtils.br(n);var ua=this.addUnitInput(n,"pt",158,52,function(){kb.apply(this,arguments)}),Aa=this.addUnitInput(n,"pt",87,52,function(){Za.apply(this,arguments)}),qa=this.addUnitInput(n,"pt",16,52,function(){Va.apply(this, arguments)});mxUtils.br(n);this.addLabel(n,mxResources.get("left"),158);this.addLabel(n,mxResources.get("bottom"),87);this.addLabel(n,mxResources.get("right"),16);if(e.cellEditor.isContentEditing()){var Da=null,Ua=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(ca){var t=""==ca.value?120:parseInt(ca.value);t=Math.max(0,isNaN(t)?120:t);null!=Da&&(e.cellEditor.restoreSelection(Da),Da=null);for(var z=e.getSelectedElement();null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z= z.parentNode;null!=z&&z==e.cellEditor.textarea&&null!=e.cellEditor.textarea.firstChild&&("P"!=e.cellEditor.textarea.firstChild.nodeName&&(e.cellEditor.textarea.innerHTML="<p>"+e.cellEditor.textarea.innerHTML+"</p>"),z=e.cellEditor.textarea.firstChild);null!=z&&null!=e.cellEditor.textarea&&z!=e.cellEditor.textarea&&e.cellEditor.textarea.contains(z)&&(z.style.lineHeight=t/100);ca.value=t+" %"},function(ca){Ua=ca;mxEvent.addListener(ca,"mousedown",function(){document.activeElement==e.cellEditor.textarea&& (Da=e.cellEditor.saveSelection())});mxEvent.addListener(ca,"touchstart",function(){document.activeElement==e.cellEditor.textarea&&(Da=e.cellEditor.saveSelection())});ca.value="120 %"}));k=d.cloneNode(!1);k.style.paddingLeft="0px";n=this.editorUi.toolbar.addItems(["link","image"],k,!0);x=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},k),this.editorUi.toolbar.addMenuFunctionInContainer(k, "geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(ca){this.editorUi.menus.addInsertTableItem(ca,null,null,!1)}))];this.styleButtons(n);this.styleButtons(x);n=this.createPanel();n.style.paddingTop="10px";n.style.paddingBottom="10px";n.appendChild(this.createTitle(mxResources.get("insert")));n.appendChild(k);a.appendChild(n);n=d.cloneNode(!1);n.style.paddingLeft="0px";x=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this, -function(){try{null!=S&&e.insertColumn(S,null!=P?P.cellIndex:0)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=S&&e.insertColumn(S,null!=P?P.cellIndex+1:-1)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=S&&null!=P&&e.deleteColumn(S,P.cellIndex)}catch(ca){this.editorUi.handleError(ca)}}), -n),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=S&&null!=X&&e.insertRow(S,X.sectionRowIndex)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=S&&null!=X&&e.insertRow(S,X.sectionRowIndex+1)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-deleterow", -mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=S&&null!=X&&e.deleteRow(S,X.sectionRowIndex)}catch(ca){this.editorUi.handleError(ca)}}),n)];this.styleButtons(x);x[2].style.marginRight="10px";k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="10px";k.appendChild(this.createTitle(mxResources.get("table")));k.appendChild(n);d=d.cloneNode(!1);d.style.paddingLeft="0px";x=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),mxUtils.bind(this, -function(ca){if(null!=S){var t=S.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(z,A,E,H){return"#"+("0"+Number(A).toString(16)).substr(-2)+("0"+Number(E).toString(16)).substr(-2)+("0"+Number(H).toString(16)).substr(-2)});this.editorUi.pickColor(t,function(z){var A=null==P||null!=ca&&mxEvent.isShiftDown(ca)?S:P;e.processElements(A,function(E){E.style.border=null});null==z||z==mxConstants.NONE?(A.removeAttribute("border"),A.style.border="",A.style.borderCollapse= -""):(A.setAttribute("border","1"),A.style.border="1px solid "+z,A.style.borderCollapse="collapse")})}}),d),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(ca){if(null!=S){var t=S.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(z,A,E,H){return"#"+("0"+Number(A).toString(16)).substr(-2)+("0"+Number(E).toString(16)).substr(-2)+("0"+Number(H).toString(16)).substr(-2)});this.editorUi.pickColor(t, -function(z){var A=null==P||null!=ca&&mxEvent.isShiftDown(ca)?S:P;e.processElements(A,function(E){E.style.backgroundColor=null});A.style.backgroundColor=null==z||z==mxConstants.NONE?"":z})}}),d),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=S){var ca=S.getAttribute("cellPadding")||0;ca=new FilenameDialog(f,ca,mxResources.get("apply"),mxUtils.bind(this,function(t){null!=t&&0<t.length?S.setAttribute("cellPadding",t):S.removeAttribute("cellPadding")}),mxResources.get("spacing")); -f.showDialog(ca.container,300,80,!0,!0);ca.init()}},d),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=S&&S.setAttribute("align","left")},d),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=S&&S.setAttribute("align","center")},d),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=S&&S.setAttribute("align","right")},d)];this.styleButtons(x);x[2].style.marginRight="10px";k.appendChild(d); +function(){try{null!=U&&e.insertColumn(U,null!=P?P.cellIndex:0)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=U&&e.insertColumn(U,null!=P?P.cellIndex+1:-1)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=U&&null!=P&&e.deleteColumn(U,P.cellIndex)}catch(ca){this.editorUi.handleError(ca)}}), +n),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=U&&null!=Y&&e.insertRow(U,Y.sectionRowIndex)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=U&&null!=Y&&e.insertRow(U,Y.sectionRowIndex+1)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-deleterow", +mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=U&&null!=Y&&e.deleteRow(U,Y.sectionRowIndex)}catch(ca){this.editorUi.handleError(ca)}}),n)];this.styleButtons(x);x[2].style.marginRight="10px";k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="10px";k.appendChild(this.createTitle(mxResources.get("table")));k.appendChild(n);d=d.cloneNode(!1);d.style.paddingLeft="0px";x=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),mxUtils.bind(this, +function(ca){if(null!=U){var t=U.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(z,A,E,G){return"#"+("0"+Number(A).toString(16)).substr(-2)+("0"+Number(E).toString(16)).substr(-2)+("0"+Number(G).toString(16)).substr(-2)});this.editorUi.pickColor(t,function(z){var A=null==P||null!=ca&&mxEvent.isShiftDown(ca)?U:P;e.processElements(A,function(E){E.style.border=null});null==z||z==mxConstants.NONE?(A.removeAttribute("border"),A.style.border="",A.style.borderCollapse= +""):(A.setAttribute("border","1"),A.style.border="1px solid "+z,A.style.borderCollapse="collapse")})}}),d),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(ca){if(null!=U){var t=U.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(z,A,E,G){return"#"+("0"+Number(A).toString(16)).substr(-2)+("0"+Number(E).toString(16)).substr(-2)+("0"+Number(G).toString(16)).substr(-2)});this.editorUi.pickColor(t, +function(z){var A=null==P||null!=ca&&mxEvent.isShiftDown(ca)?U:P;e.processElements(A,function(E){E.style.backgroundColor=null});A.style.backgroundColor=null==z||z==mxConstants.NONE?"":z})}}),d),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=U){var ca=U.getAttribute("cellPadding")||0;ca=new FilenameDialog(f,ca,mxResources.get("apply"),mxUtils.bind(this,function(t){null!=t&&0<t.length?U.setAttribute("cellPadding",t):U.removeAttribute("cellPadding")}),mxResources.get("spacing")); +f.showDialog(ca.container,300,80,!0,!0);ca.init()}},d),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=U&&U.setAttribute("align","left")},d),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=U&&U.setAttribute("align","center")},d),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=U&&U.setAttribute("align","right")},d)];this.styleButtons(x);x[2].style.marginRight="10px";k.appendChild(d); a.appendChild(k);var db=k}else a.appendChild(k),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(n);for(B=0;3>B;B++)(function(ca){mxEvent.addListener(m[ca],"click",function(){b(m[ca],""==m[ca].style.backgroundImage)})})(B);var Ta=mxUtils.bind(this,function(ca,t,z){g=f.getSelectionState();ca=mxUtils.getValue(g.style,mxConstants.STYLE_FONTSTYLE,0);b(m[0],(ca&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);b(m[1],(ca&mxConstants.FONT_ITALIC)== -mxConstants.FONT_ITALIC);b(m[2],(ca&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);u.firstChild.nodeValue=mxUtils.getValue(g.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);b(r,"0"==mxUtils.getValue(g.style,mxConstants.STYLE_HORIZONTAL,"1"));if(z||document.activeElement!=U)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),U.value=isNaN(ca)?"":ca+" pt";ca=mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER); -b(D,ca==mxConstants.ALIGN_LEFT);b(F,ca==mxConstants.ALIGN_CENTER);b(J,ca==mxConstants.ALIGN_RIGHT);ca=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);b(O,ca==mxConstants.ALIGN_TOP);b(R,ca==mxConstants.ALIGN_MIDDLE);b(T,ca==mxConstants.ALIGN_BOTTOM);ca=mxUtils.getValue(g.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);t=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);fa.value=ca==mxConstants.ALIGN_LEFT&& +mxConstants.FONT_ITALIC);b(m[2],(ca&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);u.firstChild.nodeValue=mxUtils.getValue(g.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);b(r,"0"==mxUtils.getValue(g.style,mxConstants.STYLE_HORIZONTAL,"1"));if(z||document.activeElement!=J)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),J.value=isNaN(ca)?"":ca+" pt";ca=mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER); +b(D,ca==mxConstants.ALIGN_LEFT);b(F,ca==mxConstants.ALIGN_CENTER);b(I,ca==mxConstants.ALIGN_RIGHT);ca=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);b(N,ca==mxConstants.ALIGN_TOP);b(R,ca==mxConstants.ALIGN_MIDDLE);b(S,ca==mxConstants.ALIGN_BOTTOM);ca=mxUtils.getValue(g.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);t=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);fa.value=ca==mxConstants.ALIGN_LEFT&& t==mxConstants.ALIGN_TOP?"topLeft":ca==mxConstants.ALIGN_CENTER&&t==mxConstants.ALIGN_TOP?"top":ca==mxConstants.ALIGN_RIGHT&&t==mxConstants.ALIGN_TOP?"topRight":ca==mxConstants.ALIGN_LEFT&&t==mxConstants.ALIGN_BOTTOM?"bottomLeft":ca==mxConstants.ALIGN_CENTER&&t==mxConstants.ALIGN_BOTTOM?"bottom":ca==mxConstants.ALIGN_RIGHT&&t==mxConstants.ALIGN_BOTTOM?"bottomRight":ca==mxConstants.ALIGN_LEFT?"left":ca==mxConstants.ALIGN_RIGHT?"right":"center";ca=mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_DIRECTION, -mxConstants.DEFAULT_TEXT_DIRECTION);ca==mxConstants.TEXT_DIRECTION_RTL?V.value="rightToLeft":ca==mxConstants.TEXT_DIRECTION_LTR?V.value="leftToRight":ca==mxConstants.TEXT_DIRECTION_AUTO&&(V.value="automatic");if(z||document.activeElement!=Ha)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING,2)),Ha.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=Ka)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_TOP,0)),Ka.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!= -qa)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_RIGHT,0)),qa.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=Ca)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Ca.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=ua)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_LEFT,0)),ua.value=isNaN(ca)?"":ca+" pt"});var ab=this.installInputHandler(Ha,mxConstants.STYLE_SPACING,2,-999,999," pt");var Ya=this.installInputHandler(Ka, -mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");var Va=this.installInputHandler(qa,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");var Za=this.installInputHandler(Ca,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");var kb=this.installInputHandler(ua,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(U,Ta);this.addKeyHandler(Ha,Ta);this.addKeyHandler(Ka,Ta);this.addKeyHandler(qa,Ta);this.addKeyHandler(Ca,Ta);this.addKeyHandler(ua,Ta);e.getModel().addListener(mxEvent.CHANGE,Ta); -this.listeners.push({destroy:function(){e.getModel().removeListener(Ta)}});Ta();if(e.cellEditor.isContentEditing()){var cb=!1;d=function(){cb||(cb=!0,window.setTimeout(function(){var ca=e.getSelectedEditingElement();if(null!=ca){var t=function(Aa,Ea){if(null!=Aa&&null!=Ea){if(Aa==Ea)return!0;if(Aa.length>Ea.length+1)return Aa.substring(Aa.length-Ea.length-1,Aa.length)=="-"+Ea}return!1},z=function(Aa){if(null!=e.getParentByName(ca,Aa,e.cellEditor.textarea))return!0;for(var Ea=ca;null!=Ea&&1==Ea.childNodes.length;)if(Ea= -Ea.childNodes[0],Ea.nodeName==Aa)return!0;return!1},A=function(Aa){Aa=null!=Aa?Aa.fontSize:null;return null!=Aa&&"px"==Aa.substring(Aa.length-2)?parseFloat(Aa):mxConstants.DEFAULT_FONTSIZE},E=function(Aa,Ea,Ma){return null!=Ma.style&&null!=Ea?(Ea=Ea.lineHeight,null!=Ma.style.lineHeight&&"%"==Ma.style.lineHeight.substring(Ma.style.lineHeight.length-1)?parseInt(Ma.style.lineHeight)/100:"px"==Ea.substring(Ea.length-2)?parseFloat(Ea)/Aa:parseInt(Ea)):""},H=mxUtils.getCurrentStyle(ca),L=A(H),W=E(L,H,ca), -ia=ca.getElementsByTagName("*");if(0<ia.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var ea=window.getSelection(),ja=0;ja<ia.length;ja++)if(ea.containsNode(ia[ja],!0)){temp=mxUtils.getCurrentStyle(ia[ja]);L=Math.max(A(temp),L);var ta=E(L,temp,ia[ja]);if(ta!=W||isNaN(ta))W=""}null!=H&&(b(m[0],"bold"==H.fontWeight||400<H.fontWeight||z("B")||z("STRONG")),b(m[1],"italic"==H.fontStyle||z("I")||z("EM")),b(m[2],z("U")),b(aa,z("SUP")),b(Q,z("SUB")),e.cellEditor.isTableSelected()?(b(ha, -t(H.textAlign,"justify")),b(D,t(H.textAlign,"left")),b(F,t(H.textAlign,"center")),b(J,t(H.textAlign,"right"))):(z=e.cellEditor.align||mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),t(H.textAlign,"justify")?(b(ha,t(H.textAlign,"justify")),b(D,!1),b(F,!1),b(J,!1)):(b(ha,!1),b(D,z==mxConstants.ALIGN_LEFT),b(F,z==mxConstants.ALIGN_CENTER),b(J,z==mxConstants.ALIGN_RIGHT))),S=e.getParentByName(ca,"TABLE",e.cellEditor.textarea),X=null==S?null:e.getParentByName(ca,"TR",S),P=null== -S?null:e.getParentByNames(ca,["TD","TH"],S),db.style.display=null!=S?"":"none",document.activeElement!=U&&("FONT"==ca.nodeName&&"4"==ca.getAttribute("size")&&null!=ba?(ca.removeAttribute("size"),ca.style.fontSize=ba+" pt",ba=null):U.value=isNaN(L)?"":L+" pt",ta=parseFloat(W),isNaN(ta)?Ua.value="100 %":Ua.value=Math.round(100*ta)+" %"),null!=Y&&(da="rgba(0, 0, 0, 0)"==H.color||"transparent"==H.color?mxConstants.NONE:mxUtils.rgba2hex(H.color),Y(da,!0)),null!=la&&(ra="rgba(0, 0, 0, 0)"==H.backgroundColor|| -"transparent"==H.backgroundColor?mxConstants.NONE:mxUtils.rgba2hex(H.backgroundColor),la(ra,!0)),null!=u.firstChild&&(u.firstChild.nodeValue=Graph.stripQuotes(H.fontFamily)))}cb=!1},0))};(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(e.cellEditor.textarea,"DOMSubtreeModified",d);mxEvent.addListener(e.cellEditor.textarea,"input",d);mxEvent.addListener(e.cellEditor.textarea,"touchend",d);mxEvent.addListener(e.cellEditor.textarea,"mouseup",d);mxEvent.addListener(e.cellEditor.textarea, +mxConstants.DEFAULT_TEXT_DIRECTION);ca==mxConstants.TEXT_DIRECTION_RTL?V.value="rightToLeft":ca==mxConstants.TEXT_DIRECTION_LTR?V.value="leftToRight":ca==mxConstants.TEXT_DIRECTION_AUTO&&(V.value="automatic");if(z||document.activeElement!=Ha)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING,2)),Ha.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=Ja)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_TOP,0)),Ja.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!= +qa)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_RIGHT,0)),qa.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=Aa)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Aa.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=ua)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_LEFT,0)),ua.value=isNaN(ca)?"":ca+" pt"});var ab=this.installInputHandler(Ha,mxConstants.STYLE_SPACING,2,-999,999," pt");var Ya=this.installInputHandler(Ja, +mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");var Va=this.installInputHandler(qa,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");var Za=this.installInputHandler(Aa,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");var kb=this.installInputHandler(ua,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(J,Ta);this.addKeyHandler(Ha,Ta);this.addKeyHandler(Ja,Ta);this.addKeyHandler(qa,Ta);this.addKeyHandler(Aa,Ta);this.addKeyHandler(ua,Ta);e.getModel().addListener(mxEvent.CHANGE,Ta); +this.listeners.push({destroy:function(){e.getModel().removeListener(Ta)}});Ta();if(e.cellEditor.isContentEditing()){var cb=!1;d=function(){cb||(cb=!0,window.setTimeout(function(){var ca=e.getSelectedEditingElement();if(null!=ca){var t=function(Ba,Ea){if(null!=Ba&&null!=Ea){if(Ba==Ea)return!0;if(Ba.length>Ea.length+1)return Ba.substring(Ba.length-Ea.length-1,Ba.length)=="-"+Ea}return!1},z=function(Ba){if(null!=e.getParentByName(ca,Ba,e.cellEditor.textarea))return!0;for(var Ea=ca;null!=Ea&&1==Ea.childNodes.length;)if(Ea= +Ea.childNodes[0],Ea.nodeName==Ba)return!0;return!1},A=function(Ba){Ba=null!=Ba?Ba.fontSize:null;return null!=Ba&&"px"==Ba.substring(Ba.length-2)?parseFloat(Ba):mxConstants.DEFAULT_FONTSIZE},E=function(Ba,Ea,Ma){return null!=Ma.style&&null!=Ea?(Ea=Ea.lineHeight,null!=Ma.style.lineHeight&&"%"==Ma.style.lineHeight.substring(Ma.style.lineHeight.length-1)?parseInt(Ma.style.lineHeight)/100:"px"==Ea.substring(Ea.length-2)?parseFloat(Ea)/Ba:parseInt(Ea)):""},G=mxUtils.getCurrentStyle(ca),L=A(G),X=E(L,G,ca), +ia=ca.getElementsByTagName("*");if(0<ia.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var ea=window.getSelection(),ka=0;ka<ia.length;ka++)if(ea.containsNode(ia[ka],!0)){temp=mxUtils.getCurrentStyle(ia[ka]);L=Math.max(A(temp),L);var va=E(L,temp,ia[ka]);if(va!=X||isNaN(va))X=""}null!=G&&(b(m[0],"bold"==G.fontWeight||400<G.fontWeight||z("B")||z("STRONG")),b(m[1],"italic"==G.fontStyle||z("I")||z("EM")),b(m[2],z("U")),b(aa,z("SUP")),b(Q,z("SUB")),e.cellEditor.isTableSelected()?(b(ja, +t(G.textAlign,"justify")),b(D,t(G.textAlign,"left")),b(F,t(G.textAlign,"center")),b(I,t(G.textAlign,"right"))):(z=e.cellEditor.align||mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),t(G.textAlign,"justify")?(b(ja,t(G.textAlign,"justify")),b(D,!1),b(F,!1),b(I,!1)):(b(ja,!1),b(D,z==mxConstants.ALIGN_LEFT),b(F,z==mxConstants.ALIGN_CENTER),b(I,z==mxConstants.ALIGN_RIGHT))),U=e.getParentByName(ca,"TABLE",e.cellEditor.textarea),Y=null==U?null:e.getParentByName(ca,"TR",U),P=null== +U?null:e.getParentByNames(ca,["TD","TH"],U),db.style.display=null!=U?"":"none",document.activeElement!=J&&("FONT"==ca.nodeName&&"4"==ca.getAttribute("size")&&null!=ba?(ca.removeAttribute("size"),ca.style.fontSize=ba+" pt",ba=null):J.value=isNaN(L)?"":L+" pt",va=parseFloat(X),isNaN(va)?Ua.value="100 %":Ua.value=Math.round(100*va)+" %"),null!=W&&(da="rgba(0, 0, 0, 0)"==G.color||"transparent"==G.color?mxConstants.NONE:mxUtils.rgba2hex(G.color),W(da,!0)),null!=ha&&(na="rgba(0, 0, 0, 0)"==G.backgroundColor|| +"transparent"==G.backgroundColor?mxConstants.NONE:mxUtils.rgba2hex(G.backgroundColor),ha(na,!0)),null!=u.firstChild&&(u.firstChild.nodeValue=Graph.stripQuotes(G.fontFamily)))}cb=!1},0))};(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(e.cellEditor.textarea,"DOMSubtreeModified",d);mxEvent.addListener(e.cellEditor.textarea,"input",d);mxEvent.addListener(e.cellEditor.textarea,"touchend",d);mxEvent.addListener(e.cellEditor.textarea,"mouseup",d);mxEvent.addListener(e.cellEditor.textarea, "keyup",d);this.listeners.push({destroy:function(){}});d()}return a};StyleFormatPanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);StyleFormatPanel.prototype.defaultStrokeColor="black"; StyleFormatPanel.prototype.init=function(){var a=this.editorUi.getSelectionState();!a.containsLabel&&0<a.cells.length&&(a.containsImage&&1==a.vertices.length&&"image"==a.style.shape&&null!=a.style.image&&"data:image/svg+xml;"==a.style.image.substring(0,19)&&this.container.appendChild(this.addSvgStyles(this.createPanel())),a.fill&&this.container.appendChild(this.addFill(this.createPanel())),this.container.appendChild(this.addStroke(this.createPanel())),this.container.appendChild(this.addLineJumps(this.createPanel())), a=this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_OPACITY),a.style.paddingTop="8px",a.style.paddingBottom="8px",this.container.appendChild(a),this.container.appendChild(this.addEffects(this.createPanel())));a=this.addEditOps(this.createPanel());null!=a.firstChild&&mxUtils.br(a);this.container.appendChild(this.addStyleOps(a))}; @@ -3106,97 +3104,97 @@ StyleFormatPanel.prototype.addSvgRule=function(a,b,f,e,g,d,k){var n=this.editorU mxResources.get("gradient")))}; StyleFormatPanel.prototype.addEditOps=function(a){var b=this.editorUi.getSelectionState(),f=null;1==b.cells.length&&(f=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(e){this.editorUi.actions.get("editStyle").funct()})),f.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),f.style.width="210px",f.style.marginBottom="2px",a.appendChild(f));b.image&&0<b.cells.length&&(b=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this, function(e){this.editorUi.actions.get("image").funct()})),b.setAttribute("title",mxResources.get("editImage")),b.style.marginBottom="2px",null==f?b.style.width="210px":(f.style.width="104px",b.style.width="104px",b.style.marginLeft="2px"),a.appendChild(b));return a}; -StyleFormatPanel.prototype.addFill=function(a){function b(){k.innerHTML="";D=1;for(var J=0;J<Editor.fillStyles.length;J++){var C=document.createElement("option");C.setAttribute("value",Editor.fillStyles[J].val);mxUtils.write(C,Editor.fillStyles[J].dispName);k.appendChild(C)}}var f=this.editorUi,e=f.editor.graph,g=f.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";var d=document.createElement("select");d.style.position="absolute";d.style.left="104px";d.style.width="70px";d.style.height= -"22px";d.style.padding="0px";d.style.marginTop="-3px";d.style.borderRadius="4px";d.style.border="1px solid rgb(160, 160, 160)";d.style.boxSizing="border-box";var k=d.cloneNode(!1);mxEvent.addListener(d,"click",function(J){mxEvent.consume(J)});mxEvent.addListener(k,"click",function(J){mxEvent.consume(J)});var n=this.createCellColorOption(mxResources.get("gradient"),mxConstants.STYLE_GRADIENTCOLOR,"default",function(J){d.style.display=null==J||J==mxConstants.NONE?"none":""},function(J){e.updateCellStyles({gradientColor:J}, -e.getSelectionCells())},e.getDefaultColor(g.style,mxConstants.STYLE_GRADIENTCOLOR,e.shapeForegroundColor,e.shapeBackgroundColor)),u="image"==g.style.shape?mxConstants.STYLE_IMAGE_BACKGROUND:mxConstants.STYLE_FILLCOLOR,m=this.createCellColorOption(mxResources.get("fill"),u,"default",null,mxUtils.bind(this,function(J){e.setCellStyles(u,J,g.cells)}),e.getDefaultColor(g.style,u,e.shapeBackgroundColor,e.shapeForegroundColor));m.style.fontWeight="bold";var r=mxUtils.getValue(g.style,u,null);n.style.display= -null!=r&&r!=mxConstants.NONE&&g.fill&&"image"!=g.style.shape?"":"none";var x=[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_RADIAL];for(r=0;r<x.length;r++){var B=document.createElement("option");B.setAttribute("value",x[r]);mxUtils.write(B,mxResources.get(x[r]));d.appendChild(B)}n.appendChild(d);var D;b();m.appendChild(k);var F=mxUtils.bind(this,function(){g=f.getSelectionState();var J=mxUtils.getValue(g.style,mxConstants.STYLE_GRADIENT_DIRECTION, -mxConstants.DIRECTION_SOUTH),C=mxUtils.getValue(g.style,"fillStyle","auto");""==J&&(J=mxConstants.DIRECTION_SOUTH);d.value=J;a.style.display=g.fill?"":"none";J=mxUtils.getValue(g.style,u,null);if(g.fill&&null!=J&&J!=mxConstants.NONE&&"filledEdge"!=g.style.shape){if("1"==g.style.sketch){if(2!=D){k.innerHTML="";D=2;for(J=0;J<Editor.roughFillStyles.length;J++){var O=document.createElement("option");O.setAttribute("value",Editor.roughFillStyles[J].val);mxUtils.write(O,Editor.roughFillStyles[J].dispName); -k.appendChild(O)}k.value="auto"}}else 1!=D&&b();k.value=C;k.value||(C="auto",k.value=C);k.style.display="1"==g.style.sketch||"none"==d.style.display?"":"none";n.style.display=g.containsImage||"1"==g.style.sketch&&"solid"!=C&&"auto"!=C?"none":""}else k.style.display="none",n.style.display="none"});e.getModel().addListener(mxEvent.CHANGE,F);this.listeners.push({destroy:function(){e.getModel().removeListener(F)}});F();mxEvent.addListener(d,"change",function(J){e.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION, -d.value,g.cells);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_GRADIENT_DIRECTION],"values",[d.value],"cells",g.cells));mxEvent.consume(J)});mxEvent.addListener(k,"change",function(J){e.setCellStyles("fillStyle",k.value,g.cells);f.fireEvent(new mxEventObject("styleChanged","keys",["fillStyle"],"values",[k.value],"cells",g.cells));mxEvent.consume(J)});a.appendChild(m);a.appendChild(n);m=this.getCustomColors();for(r=0;r<m.length;r++)a.appendChild(this.createCellColorOption(m[r].title, +StyleFormatPanel.prototype.addFill=function(a){function b(){k.innerHTML="";D=1;for(var I=0;I<Editor.fillStyles.length;I++){var C=document.createElement("option");C.setAttribute("value",Editor.fillStyles[I].val);mxUtils.write(C,Editor.fillStyles[I].dispName);k.appendChild(C)}}var f=this.editorUi,e=f.editor.graph,g=f.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";var d=document.createElement("select");d.style.position="absolute";d.style.left="104px";d.style.width="70px";d.style.height= +"22px";d.style.padding="0px";d.style.marginTop="-3px";d.style.borderRadius="4px";d.style.border="1px solid rgb(160, 160, 160)";d.style.boxSizing="border-box";var k=d.cloneNode(!1);mxEvent.addListener(d,"click",function(I){mxEvent.consume(I)});mxEvent.addListener(k,"click",function(I){mxEvent.consume(I)});var n=this.createCellColorOption(mxResources.get("gradient"),mxConstants.STYLE_GRADIENTCOLOR,"default",function(I){d.style.display=null==I||I==mxConstants.NONE?"none":""},function(I){e.updateCellStyles({gradientColor:I}, +e.getSelectionCells())},e.getDefaultColor(g.style,mxConstants.STYLE_GRADIENTCOLOR,e.shapeForegroundColor,e.shapeBackgroundColor)),u="image"==g.style.shape?mxConstants.STYLE_IMAGE_BACKGROUND:mxConstants.STYLE_FILLCOLOR,m=this.createCellColorOption(mxResources.get("fill"),u,"default",null,mxUtils.bind(this,function(I){e.setCellStyles(u,I,g.cells)}),e.getDefaultColor(g.style,u,e.shapeBackgroundColor,e.shapeForegroundColor));m.style.fontWeight="bold";var r=mxUtils.getValue(g.style,u,null);n.style.display= +null!=r&&r!=mxConstants.NONE&&g.fill&&"image"!=g.style.shape?"":"none";var x=[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_RADIAL];for(r=0;r<x.length;r++){var B=document.createElement("option");B.setAttribute("value",x[r]);mxUtils.write(B,mxResources.get(x[r]));d.appendChild(B)}n.appendChild(d);var D;b();m.appendChild(k);var F=mxUtils.bind(this,function(){g=f.getSelectionState();var I=mxUtils.getValue(g.style,mxConstants.STYLE_GRADIENT_DIRECTION, +mxConstants.DIRECTION_SOUTH),C=mxUtils.getValue(g.style,"fillStyle","auto");""==I&&(I=mxConstants.DIRECTION_SOUTH);d.value=I;a.style.display=g.fill?"":"none";I=mxUtils.getValue(g.style,u,null);if(g.fill&&null!=I&&I!=mxConstants.NONE&&"filledEdge"!=g.style.shape){if("1"==g.style.sketch){if(2!=D){k.innerHTML="";D=2;for(I=0;I<Editor.roughFillStyles.length;I++){var N=document.createElement("option");N.setAttribute("value",Editor.roughFillStyles[I].val);mxUtils.write(N,Editor.roughFillStyles[I].dispName); +k.appendChild(N)}k.value="auto"}}else 1!=D&&b();k.value=C;k.value||(C="auto",k.value=C);k.style.display="1"==g.style.sketch||"none"==d.style.display?"":"none";n.style.display=g.containsImage||"1"==g.style.sketch&&"solid"!=C&&"auto"!=C?"none":""}else k.style.display="none",n.style.display="none"});e.getModel().addListener(mxEvent.CHANGE,F);this.listeners.push({destroy:function(){e.getModel().removeListener(F)}});F();mxEvent.addListener(d,"change",function(I){e.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION, +d.value,g.cells);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_GRADIENT_DIRECTION],"values",[d.value],"cells",g.cells));mxEvent.consume(I)});mxEvent.addListener(k,"change",function(I){e.setCellStyles("fillStyle",k.value,g.cells);f.fireEvent(new mxEventObject("styleChanged","keys",["fillStyle"],"values",[k.value],"cells",g.cells));mxEvent.consume(I)});a.appendChild(m);a.appendChild(n);m=this.getCustomColors();for(r=0;r<m.length;r++)a.appendChild(this.createCellColorOption(m[r].title, m[r].key,m[r].defaultValue));return a};StyleFormatPanel.prototype.getCustomColors=function(){var a=[];this.editorUi.getSelectionState().swimlane&&a.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return a}; -StyleFormatPanel.prototype.addStroke=function(a){function b(Y){var da=parseFloat(C.value);da=Math.min(999,Math.max(0,isNaN(da)?1:da));da!=mxUtils.getValue(d.style,mxConstants.STYLE_STROKEWIDTH,1)&&(g.setCellStyles(mxConstants.STYLE_STROKEWIDTH,da,d.cells),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[da],"cells",d.cells)));C.value=da+" pt";mxEvent.consume(Y)}function f(Y){var da=parseFloat(O.value);da=Math.min(999,Math.max(0,isNaN(da)?1:da));da!=mxUtils.getValue(d.style, -mxConstants.STYLE_STROKEWIDTH,1)&&(g.setCellStyles(mxConstants.STYLE_STROKEWIDTH,da,d.cells),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[da],"cells",d.cells)));O.value=da+" pt";mxEvent.consume(Y)}var e=this.editorUi,g=e.editor.graph,d=e.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var k=document.createElement("div");k.style.fontWeight="bold";d.stroke||(k.style.display="none");var n=document.createElement("select"); -n.style.position="absolute";n.style.height="22px";n.style.padding="0px";n.style.marginTop="-3px";n.style.boxSizing="border-box";n.style.left="94px";n.style.width="80px";n.style.border="1px solid rgb(160, 160, 160)";n.style.borderRadius="4px";for(var u=["sharp","rounded","curved"],m=0;m<u.length;m++){var r=document.createElement("option");r.setAttribute("value",u[m]);mxUtils.write(r,mxResources.get(u[m]));n.appendChild(r)}mxEvent.addListener(n,"change",function(Y){g.getModel().beginUpdate();try{var da= -[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],pa=["0",null];"rounded"==n.value?pa=["1",null]:"curved"==n.value&&(pa=[null,"1"]);for(var wa=0;wa<da.length;wa++)g.setCellStyles(da[wa],pa[wa],d.cells);e.fireEvent(new mxEventObject("styleChanged","keys",da,"values",pa,"cells",d.cells))}finally{g.getModel().endUpdate()}mxEvent.consume(Y)});mxEvent.addListener(n,"click",function(Y){mxEvent.consume(Y)});var x="image"==d.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR;u="image"== -d.style.shape?mxResources.get("border"):mxResources.get("line");u=this.createCellColorOption(u,x,"default",null,mxUtils.bind(this,function(Y){g.setCellStyles(x,Y,d.cells)}),g.shapeForegroundColor);u.appendChild(n);k.appendChild(u);var B=k.cloneNode(!1);B.style.fontWeight="normal";B.style.whiteSpace="nowrap";B.style.position="relative";B.style.paddingLeft="0px";B.style.marginBottom="2px";B.style.overflow="hidden";B.style.marginTop="2px";B.style.width="220px";B.className="geToolbarContainer";var D= -mxUtils.bind(this,function(Y,da,pa,wa,Ka){Y=this.editorUi.menus.styleChange(Y,"",wa,Ka,"geIcon",null);wa=document.createElement("div");wa.style.width=da+"px";wa.style.height="1px";wa.style.borderBottom="1px "+pa+" "+this.defaultStrokeColor;wa.style.paddingTop="6px";Y.firstChild.firstChild.style.padding="0px 4px 0px 4px";Y.firstChild.firstChild.style.width=da+"px";Y.firstChild.firstChild.appendChild(wa);return Y});m=this.editorUi.toolbar.addMenuFunctionInContainer(B,"geSprite-orthogonal",mxResources.get("pattern"), -!1,mxUtils.bind(this,function(Y){D(Y,75,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));D(Y,75,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));D(Y,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");D(Y,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN], -["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");D(Y,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")}));var F=B.cloneNode(!1),J=this.editorUi.toolbar.addMenuFunctionInContainer(F,"geSprite-connection",mxResources.get("connection"),!1,mxUtils.bind(this,function(Y){this.editorUi.menus.styleChange(Y,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null, -null,null,null],"geIcon geSprite geSprite-connection",null,!0).setAttribute("title",mxResources.get("line"));this.editorUi.menus.styleChange(Y,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["link",null,null,null],"geIcon geSprite geSprite-linkedge",null,!0).setAttribute("title",mxResources.get("link"));this.editorUi.menus.styleChange(Y,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null], -"geIcon geSprite geSprite-arrow",null,!0).setAttribute("title",mxResources.get("arrow"));this.editorUi.menus.styleChange(Y,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,null],"geIcon geSprite geSprite-simplearrow",null,!0).setAttribute("title",mxResources.get("simpleArrow"))}));r=this.editorUi.toolbar.addMenuFunctionInContainer(F,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(Y){D(Y,33,"solid",[mxConstants.STYLE_DASHED, -mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));D(Y,33,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));D(Y,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");D(Y,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+ -" (2)");D(Y,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")}));u=B.cloneNode(!1);var C=document.createElement("input");C.style.position="absolute";C.style.textAlign="right";C.style.marginTop="2px";C.style.width="52px";C.style.height="21px";C.style.left="146px";C.style.border="1px solid rgb(160, 160, 160)";C.style.borderRadius="4px";C.style.boxSizing="border-box";C.setAttribute("title",mxResources.get("linewidth")); -B.appendChild(C);var O=C.cloneNode(!0);F.appendChild(O);var R=this.createStepper(C,b,1,9);R.style.display=C.style.display;R.style.marginTop="2px";R.style.left="198px";B.appendChild(R);R=this.createStepper(O,f,1,9);R.style.display=O.style.display;R.style.marginTop="2px";O.style.position="absolute";R.style.left="198px";F.appendChild(R);mxEvent.addListener(C,"blur",b);mxEvent.addListener(C,"change",b);mxEvent.addListener(O,"blur",f);mxEvent.addListener(O,"change",f);var T=this.editorUi.toolbar.addMenuFunctionInContainer(u, -"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(Y){"arrow"!=d.style.shape&&(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",null,!0).setAttribute("title",mxResources.get("straight")),this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal", -null,!0).setAttribute("title",mxResources.get("orthogonal")),this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle", -"vertical",null,null],"geIcon geSprite geSprite-verticalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED, -mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),"connector"==d.style.shape&&this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",null,!0).setAttribute("title",mxResources.get("curved")),this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_EDGE, -mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",null,!0).setAttribute("title",mxResources.get("entityRelation")))})),Q=this.editorUi.toolbar.addMenuFunctionInContainer(u,"geSprite-startclassic",mxResources.get("linestart"),!1,mxUtils.bind(this,function(Y){if("connector"==d.style.shape||"flexArrow"==d.style.shape||"filledEdge"==d.style.shape){var da=this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW, -"startFill"],[mxConstants.NONE,0],"geIcon",null,!1);da.setAttribute("title",mxResources.get("none"));var pa=document.createElement("font");pa.style.fontSize="10px";mxUtils.write(pa,mxResources.get("none"));da.firstChild.firstChild.appendChild(pa);"connector"==d.style.shape||"filledEdge"==d.style.shape?(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC,1],null,null,!1,Format.classicFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y, -"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,1],null,null,!1,Format.classicThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN,0],null,null,!1,Format.openFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN_THIN,0],null,null,!1,Format.openThinFilledMarkerImage.src)), -Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],["openAsync",0],null,null,!1,Format.openAsyncFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK,1],null,null,!1,Format.blockFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK_THIN,1],null, -null,!1,Format.blockThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],["async",1],null,null,!1,Format.asyncFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OVAL,1],null,null,!1,Format.ovalFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"], -[mxConstants.ARROW_DIAMOND,1],null,null,!1,Format.diamondFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND_THIN,1],null,null,!1,Format.diamondThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC,0],null,null,!1,Format.classicMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y, -"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,0],null,null,!1,Format.classicThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK,0],null,null,!1,Format.blockMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK_THIN,0],null,null,!1,Format.blockThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y, -"",[mxConstants.STYLE_STARTARROW,"startFill"],["async",0],null,null,!1,Format.asyncMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OVAL,0],null,null,!1,Format.ovalMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND,0],null,null,!1,Format.diamondMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y, -"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND_THIN,0],null,null,!1,Format.diamondThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],["box",0],null,null,!1,Format.boxMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],["halfCircle",0],null,null,!1,Format.halfCircleMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y, -"",[mxConstants.STYLE_STARTARROW,"startFill"],["dash",0],null,null,!1,Format.dashMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],["cross",0],null,null,!1,Format.crossMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],["circlePlus",0],null,null,!1,Format.circlePlusMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW, -"startFill"],["circle",1],null,null,!1,Format.circleMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],["baseDash",0],null,null,!1,Format.baseDashMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERone",0],null,null,!1,Format.EROneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"], -["ERmandOne",0],null,null,!1,Format.ERmandOneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmany",0],null,null,!1,Format.ERmanyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERoneToMany",0],null,null,!1,Format.ERoneToManyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"], -["ERzeroToOne",0],null,null,!1,Format.ERzeroToOneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToMany",0],null,null,!1,Format.ERzeroToManyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],["doubleBlock",0],null,null,!1,Format.doubleBlockMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW, -"startFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src))):this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-startblocktrans",null,!1).setAttribute("title",mxResources.get("block"));Y.div.style.width="40px";window.setTimeout(mxUtils.bind(this,function(){null!=Y.div&&mxUtils.fit(Y.div)}),0)}})),aa=this.editorUi.toolbar.addMenuFunctionInContainer(u,"geSprite-endclassic",mxResources.get("lineend"),!1, -mxUtils.bind(this,function(Y){if("connector"==d.style.shape||"flexArrow"==d.style.shape||"filledEdge"==d.style.shape){var da=this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.NONE,0],"geIcon",null,!1);da.setAttribute("title",mxResources.get("none"));var pa=document.createElement("font");pa.style.fontSize="10px";mxUtils.write(pa,mxResources.get("none"));da.firstChild.firstChild.appendChild(pa);"connector"==d.style.shape||"filledEdge"==d.style.shape?(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y, -"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,1],null,null,!1,Format.classicFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC_THIN,1],null,null,!1,Format.classicThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN,0],null,null,!1,Format.openFilledMarkerImage.src), -"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN_THIN,0],null,null,!1,Format.openThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],["openAsync",0],null,null,!1,Format.openAsyncFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"], -[mxConstants.ARROW_BLOCK,1],null,null,!1,Format.blockFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK_THIN,1],null,null,!1,Format.blockThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],["async",1],null,null,!1,Format.asyncFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y, -"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OVAL,1],null,null,!1,Format.ovalFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND,1],null,null,!1,Format.diamondFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,1],null,null,!1,Format.diamondThinFilledMarkerImage.src), -"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,0],null,null,!1,Format.classicMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC_THIN,0],null,null,!1,Format.classicThinMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"], -[mxConstants.ARROW_BLOCK,0],null,null,!1,Format.blockMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK_THIN,0],null,null,!1,Format.blockThinMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],["async",0],null,null,!1,Format.asyncMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y, -"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OVAL,0],null,null,!1,Format.ovalMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND,0],null,null,!1,Format.diamondMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,0],null,null,!1,Format.diamondThinMarkerImage.src), -"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],["box",0],null,null,!1,Format.boxMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],["halfCircle",0],null,null,!1,Format.halfCircleMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],["dash",0],null,null,!1,Format.dashMarkerImage.src), -"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],["cross",0],null,null,!1,Format.crossMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circlePlus",0],null,null,!1,Format.circlePlusMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circle",0],null,null,!1,Format.circleMarkerImage.src), -"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],["baseDash",0],null,null,!1,Format.baseDashMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERone",0],null,null,!1,Format.EROneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmandOne",0],null,null,!1,Format.ERmandOneMarkerImage.src), -"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmany",0],null,null,!1,Format.ERmanyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERoneToMany",0],null,null,!1,Format.ERoneToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToOne",0],null,null, -!1,Format.ERzeroToOneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",0],null,null,!1,Format.ERzeroToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],["doubleBlock",0],null,null,!1,Format.doubleBlockMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW, -"endFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src),"scaleX(-1)")):this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block"));Y.div.style.width="40px";window.setTimeout(mxUtils.bind(this,function(){null!=Y.div&&mxUtils.fit(Y.div)}),0)}}));R=this.addArrow(J,8);R.nextSibling.style.position="relative";R.nextSibling.style.top="-2px";R=this.addArrow(T, -10);R.nextSibling.style.position="relative";R.nextSibling.style.top="-3px";T.getElementsByTagName("img")[0].style.top="-1px";this.addArrow(Q,null,!0);this.addArrow(aa,null,!0);R=this.addArrow(m,9);R.className="geIcon";R.style.width="auto";var S=this.addArrow(r,9);S.className="geIcon";S.style.width="22px";var P=document.createElement("div");P.style.width="84px";P.style.height="1px";P.style.borderBottom="1px solid "+this.defaultStrokeColor;P.style.marginBottom="7px";R.appendChild(P);var X=document.createElement("div"); -X.style.width="23px";X.style.height="1px";X.style.borderBottom="1px solid "+this.defaultStrokeColor;X.style.marginBottom="7px";S.appendChild(X);m.style.height="15px";m.style.marginLeft="16px";r.style.height="15px";r.style.marginLeft="3px";J.style.marginLeft="10px";J.style.height="15px";T.style.marginLeft="10px";T.style.height="17px";Q.style.marginLeft="3px";Q.style.height="17px";aa.style.marginLeft="3px";aa.style.height="17px";a.appendChild(k);a.appendChild(F);a.appendChild(B);m=B.cloneNode(!1);m.style.padding= -"5px 4px 6px 0px";m.style.fontWeight="normal";r=document.createElement("div");r.style.position="absolute";r.style.marginLeft="0px";r.style.marginBottom="12px";r.style.marginTop="2px";r.style.fontWeight="normal";r.style.width="76px";mxUtils.write(r,mxResources.get("lineend"));m.appendChild(r);var ha=this.addUnitInput(m,"pt",98,52,function(){la.apply(this,arguments)}),fa=this.addUnitInput(m,"pt",30,52,function(){ba.apply(this,arguments)});mxUtils.br(m);R=document.createElement("div");R.style.height= -"8px";m.appendChild(R);r=r.cloneNode(!1);mxUtils.write(r,mxResources.get("linestart"));m.appendChild(r);var sa=this.addUnitInput(m,"pt",98,52,function(){U.apply(this,arguments)}),K=this.addUnitInput(m,"pt",30,52,function(){M.apply(this,arguments)});mxUtils.br(m);this.addLabel(m,mxResources.get("spacing"),98,52);this.addLabel(m,mxResources.get("size"),30,52);mxUtils.br(m);k=k.cloneNode(!1);k.style.fontWeight="normal";k.style.position="relative";k.style.paddingLeft="16px";k.style.marginBottom="2px"; -k.style.marginTop="6px";k.style.borderWidth="0px";k.style.paddingBottom="18px";r=document.createElement("div");r.style.position="absolute";r.style.marginLeft="3px";r.style.marginBottom="12px";r.style.marginTop="1px";r.style.fontWeight="normal";r.style.width="120px";mxUtils.write(r,mxResources.get("perimeter"));k.appendChild(r);var V=this.addUnitInput(k,"pt",30,52,function(){ra.apply(this,arguments)});d.edges.length==d.cells.length?(a.appendChild(u),a.appendChild(m)):d.vertices.length==d.cells.length&& -a.appendChild(k);var G=mxUtils.bind(this,function(Y,da,pa){function wa(Ka,Ha,ua,Ca){ua=ua.getElementsByTagName("div")[0];null!=ua&&e.updateCssForMarker(ua,Ca,d.style.shape,Ka,Ha);return ua}d=e.getSelectionState();if(pa||document.activeElement!=C)Y=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STROKEWIDTH,1)),C.value=isNaN(Y)?"":Y+" pt";if(pa||document.activeElement!=O)Y=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STROKEWIDTH,1)),O.value=isNaN(Y)?"":Y+" pt";n.style.visibility="connector"== +StyleFormatPanel.prototype.addStroke=function(a){function b(W){var da=parseFloat(C.value);da=Math.min(999,Math.max(0,isNaN(da)?1:da));da!=mxUtils.getValue(d.style,mxConstants.STYLE_STROKEWIDTH,1)&&(g.setCellStyles(mxConstants.STYLE_STROKEWIDTH,da,d.cells),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[da],"cells",d.cells)));C.value=da+" pt";mxEvent.consume(W)}function f(W){var da=parseFloat(N.value);da=Math.min(999,Math.max(0,isNaN(da)?1:da));da!=mxUtils.getValue(d.style, +mxConstants.STYLE_STROKEWIDTH,1)&&(g.setCellStyles(mxConstants.STYLE_STROKEWIDTH,da,d.cells),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[da],"cells",d.cells)));N.value=da+" pt";mxEvent.consume(W)}var e=this.editorUi,g=e.editor.graph,d=e.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var k=document.createElement("div");k.style.fontWeight="bold";d.stroke||(k.style.display="none");var n=document.createElement("select"); +n.style.position="absolute";n.style.height="22px";n.style.padding="0px";n.style.marginTop="-3px";n.style.boxSizing="border-box";n.style.left="94px";n.style.width="80px";n.style.border="1px solid rgb(160, 160, 160)";n.style.borderRadius="4px";for(var u=["sharp","rounded","curved"],m=0;m<u.length;m++){var r=document.createElement("option");r.setAttribute("value",u[m]);mxUtils.write(r,mxResources.get(u[m]));n.appendChild(r)}mxEvent.addListener(n,"change",function(W){g.getModel().beginUpdate();try{var da= +[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],sa=["0",null];"rounded"==n.value?sa=["1",null]:"curved"==n.value&&(sa=[null,"1"]);for(var ta=0;ta<da.length;ta++)g.setCellStyles(da[ta],sa[ta],d.cells);e.fireEvent(new mxEventObject("styleChanged","keys",da,"values",sa,"cells",d.cells))}finally{g.getModel().endUpdate()}mxEvent.consume(W)});mxEvent.addListener(n,"click",function(W){mxEvent.consume(W)});var x="image"==d.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR;u="image"== +d.style.shape?mxResources.get("border"):mxResources.get("line");u=this.createCellColorOption(u,x,"default",null,mxUtils.bind(this,function(W){g.setCellStyles(x,W,d.cells)}),g.shapeForegroundColor);u.appendChild(n);k.appendChild(u);var B=k.cloneNode(!1);B.style.fontWeight="normal";B.style.whiteSpace="nowrap";B.style.position="relative";B.style.paddingLeft="0px";B.style.marginBottom="2px";B.style.overflow="hidden";B.style.marginTop="2px";B.style.width="220px";B.className="geToolbarContainer";var D= +mxUtils.bind(this,function(W,da,sa,ta,Ja){W=this.editorUi.menus.styleChange(W,"",ta,Ja,"geIcon",null);ta=document.createElement("div");ta.style.width=da+"px";ta.style.height="1px";ta.style.borderBottom="1px "+sa+" "+this.defaultStrokeColor;ta.style.paddingTop="6px";W.firstChild.firstChild.style.padding="0px 4px 0px 4px";W.firstChild.firstChild.style.width=da+"px";W.firstChild.firstChild.appendChild(ta);return W});m=this.editorUi.toolbar.addMenuFunctionInContainer(B,"geSprite-orthogonal",mxResources.get("pattern"), +!1,mxUtils.bind(this,function(W){D(W,75,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));D(W,75,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));D(W,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");D(W,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN], +["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");D(W,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")}));var F=B.cloneNode(!1),I=this.editorUi.toolbar.addMenuFunctionInContainer(F,"geSprite-connection",mxResources.get("connection"),!1,mxUtils.bind(this,function(W){this.editorUi.menus.styleChange(W,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null, +null,null,null],"geIcon geSprite geSprite-connection",null,!0).setAttribute("title",mxResources.get("line"));this.editorUi.menus.styleChange(W,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["link",null,null,null],"geIcon geSprite geSprite-linkedge",null,!0).setAttribute("title",mxResources.get("link"));this.editorUi.menus.styleChange(W,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null], +"geIcon geSprite geSprite-arrow",null,!0).setAttribute("title",mxResources.get("arrow"));this.editorUi.menus.styleChange(W,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,null],"geIcon geSprite geSprite-simplearrow",null,!0).setAttribute("title",mxResources.get("simpleArrow"))}));r=this.editorUi.toolbar.addMenuFunctionInContainer(F,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(W){D(W,33,"solid",[mxConstants.STYLE_DASHED, +mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));D(W,33,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));D(W,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");D(W,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+ +" (2)");D(W,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")}));u=B.cloneNode(!1);var C=document.createElement("input");C.style.position="absolute";C.style.textAlign="right";C.style.marginTop="2px";C.style.width="52px";C.style.height="21px";C.style.left="146px";C.style.border="1px solid rgb(160, 160, 160)";C.style.borderRadius="4px";C.style.boxSizing="border-box";C.setAttribute("title",mxResources.get("linewidth")); +B.appendChild(C);var N=C.cloneNode(!0);F.appendChild(N);var R=this.createStepper(C,b,1,9);R.style.display=C.style.display;R.style.marginTop="2px";R.style.left="198px";B.appendChild(R);R=this.createStepper(N,f,1,9);R.style.display=N.style.display;R.style.marginTop="2px";N.style.position="absolute";R.style.left="198px";F.appendChild(R);mxEvent.addListener(C,"blur",b);mxEvent.addListener(C,"change",b);mxEvent.addListener(N,"blur",f);mxEvent.addListener(N,"change",f);var S=this.editorUi.toolbar.addMenuFunctionInContainer(u, +"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(W){"arrow"!=d.style.shape&&(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",null,!0).setAttribute("title",mxResources.get("straight")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal", +null,!0).setAttribute("title",mxResources.get("orthogonal")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle", +"vertical",null,null],"geIcon geSprite geSprite-verticalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED, +mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),"connector"==d.style.shape&&this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",null,!0).setAttribute("title",mxResources.get("curved")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE, +mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",null,!0).setAttribute("title",mxResources.get("entityRelation")))})),Q=this.editorUi.toolbar.addMenuFunctionInContainer(u,"geSprite-startclassic",mxResources.get("linestart"),!1,mxUtils.bind(this,function(W){if("connector"==d.style.shape||"flexArrow"==d.style.shape||"filledEdge"==d.style.shape){var da=this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW, +"startFill"],[mxConstants.NONE,0],"geIcon",null,!1);da.setAttribute("title",mxResources.get("none"));var sa=document.createElement("font");sa.style.fontSize="10px";mxUtils.write(sa,mxResources.get("none"));da.firstChild.firstChild.appendChild(sa);"connector"==d.style.shape||"filledEdge"==d.style.shape?(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC,1],null,null,!1,Format.classicFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W, +"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,1],null,null,!1,Format.classicThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN,0],null,null,!1,Format.openFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN_THIN,0],null,null,!1,Format.openThinFilledMarkerImage.src)), +Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["openAsync",0],null,null,!1,Format.openAsyncFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK,1],null,null,!1,Format.blockFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK_THIN,1],null, +null,!1,Format.blockThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["async",1],null,null,!1,Format.asyncFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OVAL,1],null,null,!1,Format.ovalFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"], +[mxConstants.ARROW_DIAMOND,1],null,null,!1,Format.diamondFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND_THIN,1],null,null,!1,Format.diamondThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC,0],null,null,!1,Format.classicMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W, +"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,0],null,null,!1,Format.classicThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK,0],null,null,!1,Format.blockMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK_THIN,0],null,null,!1,Format.blockThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W, +"",[mxConstants.STYLE_STARTARROW,"startFill"],["async",0],null,null,!1,Format.asyncMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OVAL,0],null,null,!1,Format.ovalMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND,0],null,null,!1,Format.diamondMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W, +"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND_THIN,0],null,null,!1,Format.diamondThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["box",0],null,null,!1,Format.boxMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["halfCircle",0],null,null,!1,Format.halfCircleMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W, +"",[mxConstants.STYLE_STARTARROW,"startFill"],["dash",0],null,null,!1,Format.dashMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["cross",0],null,null,!1,Format.crossMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["circlePlus",0],null,null,!1,Format.circlePlusMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW, +"startFill"],["circle",1],null,null,!1,Format.circleMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["baseDash",0],null,null,!1,Format.baseDashMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERone",0],null,null,!1,Format.EROneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"], +["ERmandOne",0],null,null,!1,Format.ERmandOneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmany",0],null,null,!1,Format.ERmanyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERoneToMany",0],null,null,!1,Format.ERoneToManyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"], +["ERzeroToOne",0],null,null,!1,Format.ERzeroToOneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToMany",0],null,null,!1,Format.ERzeroToManyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["doubleBlock",0],null,null,!1,Format.doubleBlockMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW, +"startFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src))):this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-startblocktrans",null,!1).setAttribute("title",mxResources.get("block"));W.div.style.width="40px";window.setTimeout(mxUtils.bind(this,function(){null!=W.div&&mxUtils.fit(W.div)}),0)}})),aa=this.editorUi.toolbar.addMenuFunctionInContainer(u,"geSprite-endclassic",mxResources.get("lineend"),!1, +mxUtils.bind(this,function(W){if("connector"==d.style.shape||"flexArrow"==d.style.shape||"filledEdge"==d.style.shape){var da=this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.NONE,0],"geIcon",null,!1);da.setAttribute("title",mxResources.get("none"));var sa=document.createElement("font");sa.style.fontSize="10px";mxUtils.write(sa,mxResources.get("none"));da.firstChild.firstChild.appendChild(sa);"connector"==d.style.shape||"filledEdge"==d.style.shape?(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W, +"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,1],null,null,!1,Format.classicFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC_THIN,1],null,null,!1,Format.classicThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN,0],null,null,!1,Format.openFilledMarkerImage.src), +"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN_THIN,0],null,null,!1,Format.openThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["openAsync",0],null,null,!1,Format.openAsyncFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"], +[mxConstants.ARROW_BLOCK,1],null,null,!1,Format.blockFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK_THIN,1],null,null,!1,Format.blockThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["async",1],null,null,!1,Format.asyncFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W, +"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OVAL,1],null,null,!1,Format.ovalFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND,1],null,null,!1,Format.diamondFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,1],null,null,!1,Format.diamondThinFilledMarkerImage.src), +"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,0],null,null,!1,Format.classicMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC_THIN,0],null,null,!1,Format.classicThinMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"], +[mxConstants.ARROW_BLOCK,0],null,null,!1,Format.blockMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK_THIN,0],null,null,!1,Format.blockThinMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["async",0],null,null,!1,Format.asyncMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W, +"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OVAL,0],null,null,!1,Format.ovalMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND,0],null,null,!1,Format.diamondMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,0],null,null,!1,Format.diamondThinMarkerImage.src), +"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["box",0],null,null,!1,Format.boxMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["halfCircle",0],null,null,!1,Format.halfCircleMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["dash",0],null,null,!1,Format.dashMarkerImage.src), +"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["cross",0],null,null,!1,Format.crossMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circlePlus",0],null,null,!1,Format.circlePlusMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circle",0],null,null,!1,Format.circleMarkerImage.src), +"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["baseDash",0],null,null,!1,Format.baseDashMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERone",0],null,null,!1,Format.EROneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmandOne",0],null,null,!1,Format.ERmandOneMarkerImage.src), +"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmany",0],null,null,!1,Format.ERmanyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERoneToMany",0],null,null,!1,Format.ERoneToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToOne",0],null,null, +!1,Format.ERzeroToOneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",0],null,null,!1,Format.ERzeroToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["doubleBlock",0],null,null,!1,Format.doubleBlockMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW, +"endFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src),"scaleX(-1)")):this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block"));W.div.style.width="40px";window.setTimeout(mxUtils.bind(this,function(){null!=W.div&&mxUtils.fit(W.div)}),0)}}));R=this.addArrow(I,8);R.nextSibling.style.position="relative";R.nextSibling.style.top="-2px";R=this.addArrow(S, +10);R.nextSibling.style.position="relative";R.nextSibling.style.top="-3px";S.getElementsByTagName("img")[0].style.top="-1px";this.addArrow(Q,null,!0);this.addArrow(aa,null,!0);R=this.addArrow(m,9);R.className="geIcon";R.style.width="auto";var U=this.addArrow(r,9);U.className="geIcon";U.style.width="22px";var P=document.createElement("div");P.style.width="84px";P.style.height="1px";P.style.borderBottom="1px solid "+this.defaultStrokeColor;P.style.marginBottom="7px";R.appendChild(P);var Y=document.createElement("div"); +Y.style.width="23px";Y.style.height="1px";Y.style.borderBottom="1px solid "+this.defaultStrokeColor;Y.style.marginBottom="7px";U.appendChild(Y);m.style.height="15px";m.style.marginLeft="16px";r.style.height="15px";r.style.marginLeft="3px";I.style.marginLeft="10px";I.style.height="15px";S.style.marginLeft="10px";S.style.height="17px";Q.style.marginLeft="3px";Q.style.height="17px";aa.style.marginLeft="3px";aa.style.height="17px";a.appendChild(k);a.appendChild(F);a.appendChild(B);m=B.cloneNode(!1);m.style.padding= +"5px 4px 6px 0px";m.style.fontWeight="normal";r=document.createElement("div");r.style.position="absolute";r.style.marginLeft="0px";r.style.marginBottom="12px";r.style.marginTop="2px";r.style.fontWeight="normal";r.style.width="76px";mxUtils.write(r,mxResources.get("lineend"));m.appendChild(r);var ja=this.addUnitInput(m,"pt",98,52,function(){ha.apply(this,arguments)}),fa=this.addUnitInput(m,"pt",30,52,function(){ba.apply(this,arguments)});mxUtils.br(m);R=document.createElement("div");R.style.height= +"8px";m.appendChild(R);r=r.cloneNode(!1);mxUtils.write(r,mxResources.get("linestart"));m.appendChild(r);var ra=this.addUnitInput(m,"pt",98,52,function(){J.apply(this,arguments)}),K=this.addUnitInput(m,"pt",30,52,function(){T.apply(this,arguments)});mxUtils.br(m);this.addLabel(m,mxResources.get("spacing"),98,52);this.addLabel(m,mxResources.get("size"),30,52);mxUtils.br(m);k=k.cloneNode(!1);k.style.fontWeight="normal";k.style.position="relative";k.style.paddingLeft="16px";k.style.marginBottom="2px"; +k.style.marginTop="6px";k.style.borderWidth="0px";k.style.paddingBottom="18px";r=document.createElement("div");r.style.position="absolute";r.style.marginLeft="3px";r.style.marginBottom="12px";r.style.marginTop="1px";r.style.fontWeight="normal";r.style.width="120px";mxUtils.write(r,mxResources.get("perimeter"));k.appendChild(r);var V=this.addUnitInput(k,"pt",30,52,function(){na.apply(this,arguments)});d.edges.length==d.cells.length?(a.appendChild(u),a.appendChild(m)):d.vertices.length==d.cells.length&& +a.appendChild(k);var O=mxUtils.bind(this,function(W,da,sa){function ta(Ja,Ha,ua,Aa){ua=ua.getElementsByTagName("div")[0];null!=ua&&e.updateCssForMarker(ua,Aa,d.style.shape,Ja,Ha);return ua}d=e.getSelectionState();if(sa||document.activeElement!=C)W=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STROKEWIDTH,1)),C.value=isNaN(W)?"":W+" pt";if(sa||document.activeElement!=N)W=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STROKEWIDTH,1)),N.value=isNaN(W)?"":W+" pt";n.style.visibility="connector"== d.style.shape||"filledEdge"==d.style.shape?"":"hidden";"1"==mxUtils.getValue(d.style,mxConstants.STYLE_CURVED,null)?n.value="curved":"1"==mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,null)&&(n.value="rounded");"1"==mxUtils.getValue(d.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(d.style,mxConstants.STYLE_DASH_PATTERN,null)?P.style.borderBottom="1px dashed "+this.defaultStrokeColor:P.style.borderBottom="1px dotted "+this.defaultStrokeColor:P.style.borderBottom="1px solid "+this.defaultStrokeColor; -X.style.borderBottom=P.style.borderBottom;Y=T.getElementsByTagName("div")[0];null!=Y&&(da=mxUtils.getValue(d.style,mxConstants.STYLE_EDGE,null),"1"==mxUtils.getValue(d.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(da=null),"orthogonalEdgeStyle"==da&&"1"==mxUtils.getValue(d.style,mxConstants.STYLE_CURVED,null)?Y.className="geSprite geSprite-curved":Y.className="straight"==da||"none"==da||null==da?"geSprite geSprite-straight":"entityRelationEdgeStyle"==da?"geSprite geSprite-entity":"elbowEdgeStyle"== -da?"geSprite "+("vertical"==mxUtils.getValue(d.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==da?"geSprite "+("vertical"==mxUtils.getValue(d.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal");Y=J.getElementsByTagName("div")[0];null!=Y&&(Y.className="link"==d.style.shape?"geSprite geSprite-linkedge":"flexArrow"==d.style.shape?"geSprite geSprite-arrow":"arrow"== -d.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection");d.edges.length==d.cells.length?(F.style.display="",B.style.display="none"):(F.style.display="none",B.style.display="");Graph.lineJumpsEnabled&&0<d.edges.length&&0==d.vertices.length&&d.lineJumps&&(a.style.borderBottomStyle="none");Y=wa(mxUtils.getValue(d.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(d.style,"startFill","1"),Q,"start");da=wa(mxUtils.getValue(d.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(d.style, -"endFill","1"),aa,"end");null!=Y&&null!=da&&("arrow"==d.style.shape?(Y.className="geSprite geSprite-noarrow",da.className="geSprite geSprite-endblocktrans"):"link"==d.style.shape&&(Y.className="geSprite geSprite-noarrow",da.className="geSprite geSprite-noarrow"));mxUtils.setOpacity(T,"arrow"==d.style.shape?30:100);"connector"!=d.style.shape&&"flexArrow"!=d.style.shape&&"filledEdge"!=d.style.shape?(mxUtils.setOpacity(Q,30),mxUtils.setOpacity(aa,30)):(mxUtils.setOpacity(Q,100),mxUtils.setOpacity(aa, -100));if(pa||document.activeElement!=K)Y=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),K.value=isNaN(Y)?"":Y+" pt";if(pa||document.activeElement!=sa)Y=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),sa.value=isNaN(Y)?"":Y+" pt";if(pa||document.activeElement!=fa)Y=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),fa.value=isNaN(Y)?"":Y+" pt";if(pa||document.activeElement!=sa)Y= -parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),ha.value=isNaN(Y)?"":Y+" pt";if(pa||document.activeElement!=V)Y=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_PERIMETER_SPACING,0)),V.value=isNaN(Y)?"":Y+" pt"});var M=this.installInputHandler(K,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");var U=this.installInputHandler(sa,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");var ba=this.installInputHandler(fa,mxConstants.STYLE_ENDSIZE, -mxConstants.DEFAULT_MARKERSIZE,0,999," pt");var la=this.installInputHandler(ha,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");var ra=this.installInputHandler(V,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(C,G);this.addKeyHandler(K,G);this.addKeyHandler(sa,G);this.addKeyHandler(fa,G);this.addKeyHandler(ha,G);this.addKeyHandler(V,G);g.getModel().addListener(mxEvent.CHANGE,G);this.listeners.push({destroy:function(){g.getModel().removeListener(G)}});G();return a}; +Y.style.borderBottom=P.style.borderBottom;W=S.getElementsByTagName("div")[0];null!=W&&(da=mxUtils.getValue(d.style,mxConstants.STYLE_EDGE,null),"1"==mxUtils.getValue(d.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(da=null),"orthogonalEdgeStyle"==da&&"1"==mxUtils.getValue(d.style,mxConstants.STYLE_CURVED,null)?W.className="geSprite geSprite-curved":W.className="straight"==da||"none"==da||null==da?"geSprite geSprite-straight":"entityRelationEdgeStyle"==da?"geSprite geSprite-entity":"elbowEdgeStyle"== +da?"geSprite "+("vertical"==mxUtils.getValue(d.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==da?"geSprite "+("vertical"==mxUtils.getValue(d.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal");W=I.getElementsByTagName("div")[0];null!=W&&(W.className="link"==d.style.shape?"geSprite geSprite-linkedge":"flexArrow"==d.style.shape?"geSprite geSprite-arrow":"arrow"== +d.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection");d.edges.length==d.cells.length?(F.style.display="",B.style.display="none"):(F.style.display="none",B.style.display="");Graph.lineJumpsEnabled&&0<d.edges.length&&0==d.vertices.length&&d.lineJumps&&(a.style.borderBottomStyle="none");W=ta(mxUtils.getValue(d.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(d.style,"startFill","1"),Q,"start");da=ta(mxUtils.getValue(d.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(d.style, +"endFill","1"),aa,"end");null!=W&&null!=da&&("arrow"==d.style.shape?(W.className="geSprite geSprite-noarrow",da.className="geSprite geSprite-endblocktrans"):"link"==d.style.shape&&(W.className="geSprite geSprite-noarrow",da.className="geSprite geSprite-noarrow"));mxUtils.setOpacity(S,"arrow"==d.style.shape?30:100);"connector"!=d.style.shape&&"flexArrow"!=d.style.shape&&"filledEdge"!=d.style.shape?(mxUtils.setOpacity(Q,30),mxUtils.setOpacity(aa,30)):(mxUtils.setOpacity(Q,100),mxUtils.setOpacity(aa, +100));if(sa||document.activeElement!=K)W=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),K.value=isNaN(W)?"":W+" pt";if(sa||document.activeElement!=ra)W=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),ra.value=isNaN(W)?"":W+" pt";if(sa||document.activeElement!=fa)W=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),fa.value=isNaN(W)?"":W+" pt";if(sa||document.activeElement!=ra)W= +parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),ja.value=isNaN(W)?"":W+" pt";if(sa||document.activeElement!=V)W=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_PERIMETER_SPACING,0)),V.value=isNaN(W)?"":W+" pt"});var T=this.installInputHandler(K,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");var J=this.installInputHandler(ra,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");var ba=this.installInputHandler(fa,mxConstants.STYLE_ENDSIZE, +mxConstants.DEFAULT_MARKERSIZE,0,999," pt");var ha=this.installInputHandler(ja,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");var na=this.installInputHandler(V,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(C,O);this.addKeyHandler(K,O);this.addKeyHandler(ra,O);this.addKeyHandler(fa,O);this.addKeyHandler(ja,O);this.addKeyHandler(V,O);g.getModel().addListener(mxEvent.CHANGE,O);this.listeners.push({destroy:function(){g.getModel().removeListener(O)}});O();return a}; StyleFormatPanel.prototype.addLineJumps=function(a){var b=this.editorUi,f=b.editor.graph,e=b.getSelectionState();if(Graph.lineJumpsEnabled&&0<e.edges.length&&0==e.vertices.length&&e.lineJumps){a.style.padding="2px 0px 24px 14px";var g=document.createElement("div");g.style.position="absolute";g.style.maxWidth="82px";g.style.overflow="hidden";g.style.textOverflow="ellipsis";mxUtils.write(g,mxResources.get("lineJumps"));a.appendChild(g);var d=document.createElement("select");d.style.position="absolute"; d.style.height="21px";d.style.padding="0px";d.style.marginTop="-2px";d.style.boxSizing="border-box";d.style.right="76px";d.style.width="54px";d.style.border="1px solid rgb(160, 160, 160)";d.style.borderRadius="4px";g=["none","arc","gap","sharp","line"];for(var k=0;k<g.length;k++){var n=document.createElement("option");n.setAttribute("value",g[k]);mxUtils.write(n,mxResources.get(g[k]));d.appendChild(n)}mxEvent.addListener(d,"change",function(x){f.getModel().beginUpdate();try{f.setCellStyles("jumpStyle", d.value,e.cells),b.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[d.value],"cells",e.cells))}finally{f.getModel().endUpdate()}mxEvent.consume(x)});mxEvent.addListener(d,"click",function(x){mxEvent.consume(x)});a.appendChild(d);var u=this.addUnitInput(a,"pt",16,42,function(){m.apply(this,arguments)});var m=this.installInputHandler(u,"jumpSize",Graph.defaultJumpSize,0,999," pt");var r=mxUtils.bind(this,function(x,B,D){e=b.getSelectionState();d.value=mxUtils.getValue(e.style, "jumpStyle","none");if(D||document.activeElement!=u)x=parseInt(mxUtils.getValue(e.style,"jumpSize",Graph.defaultJumpSize)),u.value=isNaN(x)?"":x+" pt"});this.addKeyHandler(u,r);f.getModel().addListener(mxEvent.CHANGE,r);this.listeners.push({destroy:function(){f.getModel().removeListener(r)}});r()}else a.style.display="none";return a}; StyleFormatPanel.prototype.addEffects=function(a){var b=this.editorUi,f=b.editor.graph,e=b.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="0px";var g=document.createElement("table");g.style.width="210px";g.style.fontWeight="bold";g.style.tableLayout="fixed";var d=document.createElement("tbody"),k=document.createElement("tr");k.style.padding="0px";var n=document.createElement("td");n.style.padding="0px";n.style.width="50%";n.setAttribute("valign","top");var u=n.cloneNode(!0);u.style.paddingLeft= -"8px";k.appendChild(n);k.appendChild(u);d.appendChild(k);g.appendChild(d);a.appendChild(g);var m=n,r=0,x=mxUtils.bind(this,function(D,F,J){D=this.createCellOption(D,F,J);D.style.width="100%";m.appendChild(D);m=m==n?u:n;r++}),B=mxUtils.bind(this,function(D,F,J){e=b.getSelectionState();n.innerText="";u.innerText="";m=n;e.rounded&&x(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);e.swimlane&&x(mxResources.get("divider"),"swimlaneLine",1);e.containsImage||x(mxResources.get("shadow"),mxConstants.STYLE_SHADOW, +"8px";k.appendChild(n);k.appendChild(u);d.appendChild(k);g.appendChild(d);a.appendChild(g);var m=n,r=0,x=mxUtils.bind(this,function(D,F,I){D=this.createCellOption(D,F,I);D.style.width="100%";m.appendChild(D);m=m==n?u:n;r++}),B=mxUtils.bind(this,function(D,F,I){e=b.getSelectionState();n.innerText="";u.innerText="";m=n;e.rounded&&x(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);e.swimlane&&x(mxResources.get("divider"),"swimlaneLine",1);e.containsImage||x(mxResources.get("shadow"),mxConstants.STYLE_SHADOW, 0);e.glass&&x(mxResources.get("glass"),mxConstants.STYLE_GLASS,0);x(mxResources.get("sketch"),"sketch",0)});f.getModel().addListener(mxEvent.CHANGE,B);this.listeners.push({destroy:function(){f.getModel().removeListener(B)}});B();return a};StyleFormatPanel.prototype.addStyleOps=function(a){a.style.paddingTop="10px";a.style.paddingBottom="10px";this.addActions(a,["setAsDefaultStyle"]);return a};DiagramStylePanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()}; mxUtils.extend(DiagramStylePanel,BaseFormatPanel);DiagramStylePanel.prototype.init=function(){var a=this.editorUi;this.darkModeChangedListener=mxUtils.bind(this,function(){this.format.cachedStyleEntries=[]});a.addListener("darkModeChanged",this.darkModeChangedListener);this.container.appendChild(this.addView(this.createPanel()))}; DiagramStylePanel.prototype.addView=function(a){var b=this.editorUi,f=b.editor.graph,e=f.getModel(),g=f.view.gridColor;a.style.whiteSpace="normal";var d=document.createElement("div");d.style.marginRight="16px";a.style.paddingTop="8px";var k=document.createElement("table");k.style.width="210px";k.style.fontWeight="bold";var n=document.createElement("tbody"),u=document.createElement("tr");u.style.padding="0px";var m=document.createElement("td");m.style.padding="0px";m.style.width="50%";m.setAttribute("valign", "middle");var r=m.cloneNode(!0);r.style.paddingLeft="8px";d.style.paddingBottom="12px";u.appendChild(m);m.appendChild(this.createOption(mxResources.get("sketch"),function(){return Editor.sketchMode},function(P){f.updateCellStyles({sketch:P?"1":null},f.getVerticesAndEdges());b.setSketchMode(!Editor.sketchMode)},null,function(P){P.style.width="auto"}));u.appendChild(r);n.appendChild(u);k.appendChild(n);r.appendChild(this.createOption(mxResources.get("rounded"),mxUtils.bind(this,function(){return this.format.rounded}), mxUtils.bind(this,function(P){this.format.rounded=P;f.updateCellStyles({rounded:P?"1":"0"},f.getVerticesAndEdges());P?(f.currentEdgeStyle.rounded="1",f.currentVertexStyle.rounded="1"):(delete f.currentEdgeStyle.rounded,delete f.currentVertexStyle.rounded)}),null,function(P){P.style.width="auto"}));m=m.cloneNode(!1);r=r.cloneNode(!1);u=u.cloneNode(!1);u.appendChild(m);u.appendChild(r);n.appendChild(u);m.appendChild(this.createOption(mxResources.get("curved"),mxUtils.bind(this,function(){return this.format.curved}), -mxUtils.bind(this,function(P){this.format.curved=P;f.updateCellStyles({curved:P?"1":null},f.getVerticesAndEdges(!1,!0));P?f.currentEdgeStyle.curved="1":delete f.currentEdgeStyle.curved}),null,function(P){P.style.width="auto"}));d.appendChild(k);a.appendChild(d);var x=["fillColor","strokeColor","fontColor","gradientColor"],B=mxUtils.bind(this,function(P,X){var ha=f.getVerticesAndEdges();e.beginUpdate();try{for(var fa=0;fa<ha.length;fa++){var sa=f.getCellStyle(ha[fa]);null!=sa.labelBackgroundColor&& -f.updateCellStyles({labelBackgroundColor:null!=X?X.background:null},[ha[fa]]);for(var K=e.isEdge(ha[fa]),V=e.getStyle(ha[fa]),G=K?f.currentEdgeStyle:f.currentVertexStyle,M=0;M<P.length;M++)if(null!=sa[P[M]]&&sa[P[M]]!=mxConstants.NONE||P[M]!=mxConstants.STYLE_FILLCOLOR&&P[M]!=mxConstants.STYLE_STROKECOLOR)V=mxUtils.setStyle(V,P[M],G[P[M]]);e.setStyle(ha[fa],V)}}finally{e.endUpdate()}}),D=mxUtils.bind(this,function(P,X,ha){if(null!=P)for(var fa=0;fa<X.length;fa++)if(null!=P[X[fa]]&&P[X[fa]]!=mxConstants.NONE|| -X[fa]!=mxConstants.STYLE_FILLCOLOR&&X[fa]!=mxConstants.STYLE_STROKECOLOR)P[X[fa]]=ha[X[fa]]}),F=mxUtils.bind(this,function(P,X,ha,fa,sa){if(null!=P){null!=ha&&null!=X.labelBackgroundColor&&(fa=null!=fa?fa.background:null,sa=null!=sa?sa:f,null==fa&&(fa=sa.background),null==fa&&(fa=sa.defaultPageBackgroundColor),X.labelBackgroundColor=fa);for(var K in P)if(null==ha||null!=X[K]&&X[K]!=mxConstants.NONE||K!=mxConstants.STYLE_FILLCOLOR&&K!=mxConstants.STYLE_STROKECOLOR)X[K]=P[K]}});m=mxUtils.button(mxResources.get("reset"), -mxUtils.bind(this,function(P){P=f.getVerticesAndEdges(!0,!0);this.format.rounded=!1;this.format.curved=!1;if(0<P.length){e.beginUpdate();try{f.updateCellStyles({sketch:null,rounded:null},P),f.updateCellStyles({curved:null,rounded:"0"},f.getVerticesAndEdges(!1,!0))}finally{e.endUpdate()}}b.clearDefaultStyle();b.setSketchMode(!1)}));m.setAttribute("title",mxResources.get("reset"));m.style.textOverflow="ellipsis";m.style.maxWidth="90px";r.appendChild(m);var J=mxUtils.bind(this,function(P,X,ha,fa,sa){var K= -document.createElement("div");K.style.position="absolute";K.style.display="inline-block";K.style.overflow="hidden";K.style.pointerEvents="none";K.style.width="100%";K.style.height="100%";sa.appendChild(K);var V=new Graph(K,null,null,f.getStylesheet());V.resetViewOnRootChange=!1;V.foldingEnabled=!1;V.gridEnabled=!1;V.autoScroll=!1;V.setTooltips(!1);V.setConnectable(!1);V.setPanning(!1);V.setEnabled(!1);V.getCellStyle=function(U,ba){ba=null!=ba?ba:!0;var la=mxUtils.clone(f.getCellStyle.apply(this,arguments)), -ra=f.stylesheet.getDefaultVertexStyle(),Y=X;e.isEdge(U)&&(ra=f.stylesheet.getDefaultEdgeStyle(),Y=ha);D(la,x,ra);F(P,la,U,fa,V);F(Y,la,U,fa,V);ba&&(la=f.postProcessCellStyle(U,la));return la};V.model.beginUpdate();try{var G=V.insertVertex(V.getDefaultParent(),null,"Shape",14,8,70,40,"strokeWidth=2;"),M=V.insertEdge(V.getDefaultParent(),null,"Connector",G,G,"edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;endSize=5;strokeWidth=2;");M.geometry.points=[new mxPoint(32,70)];M.geometry.offset= -new mxPoint(0,8)}finally{V.model.endUpdate()}}),C=document.createElement("div");C.style.position="relative";a.appendChild(C);null==this.format.cachedStyleEntries&&(this.format.cachedStyleEntries=[]);var O=mxUtils.bind(this,function(P,X,ha,fa,sa){var K=this.format.cachedStyleEntries[sa];null==K&&(K=document.createElement("div"),K.style.display="inline-block",K.style.position="relative",K.style.width="96px",K.style.height="90px",K.style.cursor="pointer",K.style.border="1px solid gray",K.style.borderRadius= -"8px",K.style.margin="2px",K.style.overflow="hidden",null!=fa&&null!=fa.background&&(K.style.backgroundColor=fa.background),J(P,X,ha,fa,K),mxEvent.addGestureListeners(K,mxUtils.bind(this,function(V){K.style.opacity=.5}),null,mxUtils.bind(this,function(V){K.style.opacity=1;f.currentVertexStyle=mxUtils.clone(f.defaultVertexStyle);f.currentEdgeStyle=mxUtils.clone(f.defaultEdgeStyle);F(P,f.currentVertexStyle);F(P,f.currentEdgeStyle);F(X,f.currentVertexStyle);F(ha,f.currentEdgeStyle);e.beginUpdate();try{var G= -x.slice(),M;for(M in P)G.push(M);B(G,fa);var U=new ChangePageSetup(b,null!=fa?fa.background:null);U.ignoreImage=!0;e.execute(U);e.execute(new ChangeGridColor(b,null!=fa&&null!=fa.gridColor?fa.gridColor:g))}finally{e.endUpdate()}})),mxEvent.addListener(K,"mouseenter",mxUtils.bind(this,function(V){var G=f.getCellStyle;V=f.background;var M=f.view.gridColor;f.background=null!=fa?fa.background:null;f.view.gridColor=null!=fa&&null!=fa.gridColor?fa.gridColor:g;f.getCellStyle=function(U,ba){ba=null!=ba?ba: -!0;var la=mxUtils.clone(G.apply(this,arguments)),ra=f.stylesheet.getDefaultVertexStyle(),Y=X;e.isEdge(U)&&(ra=f.stylesheet.getDefaultEdgeStyle(),Y=ha);D(la,x,ra);F(P,la,U,fa);F(Y,la,U,fa);ba&&(la=this.postProcessCellStyle(U,la));return la};f.refresh();f.getCellStyle=G;f.background=V;f.view.gridColor=M})),mxEvent.addListener(K,"mouseleave",mxUtils.bind(this,function(V){f.refresh()})),mxClient.IS_IE||mxClient.IS_IE11||(this.format.cachedStyleEntries[sa]=K));C.appendChild(K)}),R=Math.ceil(Editor.styles.length/ -10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var T=[],Q=mxUtils.bind(this,function(){0<T.length&&(T[this.format.currentStylePage].style.background="#84d7ff");for(var P=10*this.format.currentStylePage;P<Math.min(10*(this.format.currentStylePage+1),Editor.styles.length);P++){var X=Editor.styles[P];O(X.commonStyle,X.vertexStyle,X.edgeStyle,X.graph,P)}}),aa=mxUtils.bind(this,function(P){0<=P&&P<R&&(T[this.format.currentStylePage].style.background= -"transparent",C.innerText="",this.format.currentStylePage=P,Q())});if(1<R){d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.position="relative";d.style.textAlign="center";d.style.paddingTop="4px";d.style.width="210px";a.style.paddingBottom="8px";for(r=0;r<R;r++){var S=document.createElement("div");S.style.display="inline-block";S.style.width="6px";S.style.height="6px";S.style.marginLeft="4px";S.style.marginRight="3px";S.style.borderRadius="3px";S.style.cursor="pointer";S.style.background= -"transparent";S.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(P,X){mxEvent.addListener(S,"click",mxUtils.bind(this,function(){aa(P)}))})(r,S);d.appendChild(S);T.push(S)}a.appendChild(d);Q();15>R&&(k=function(P){mxEvent.addListener(P,"mouseenter",function(){P.style.opacity="1"});mxEvent.addListener(P,"mouseleave",function(){P.style.opacity="0.5"})},m=document.createElement("div"),m.style.className="geAdaptiveAsset",m.style.position="absolute",m.style.left="0px",m.style.top="0px",m.style.bottom= +mxUtils.bind(this,function(P){this.format.curved=P;f.updateCellStyles({curved:P?"1":null},f.getVerticesAndEdges(!1,!0));P?f.currentEdgeStyle.curved="1":delete f.currentEdgeStyle.curved}),null,function(P){P.style.width="auto"}));d.appendChild(k);a.appendChild(d);var x=["fillColor","strokeColor","fontColor","gradientColor"],B=mxUtils.bind(this,function(P,Y){var ja=f.getVerticesAndEdges();e.beginUpdate();try{for(var fa=0;fa<ja.length;fa++){var ra=f.getCellStyle(ja[fa]);null!=ra.labelBackgroundColor&& +f.updateCellStyles({labelBackgroundColor:null!=Y?Y.background:null},[ja[fa]]);for(var K=e.isEdge(ja[fa]),V=e.getStyle(ja[fa]),O=K?f.currentEdgeStyle:f.currentVertexStyle,T=0;T<P.length;T++)if(null!=ra[P[T]]&&ra[P[T]]!=mxConstants.NONE||P[T]!=mxConstants.STYLE_FILLCOLOR&&P[T]!=mxConstants.STYLE_STROKECOLOR)V=mxUtils.setStyle(V,P[T],O[P[T]]);e.setStyle(ja[fa],V)}}finally{e.endUpdate()}}),D=mxUtils.bind(this,function(P,Y,ja){if(null!=P)for(var fa=0;fa<Y.length;fa++)if(null!=P[Y[fa]]&&P[Y[fa]]!=mxConstants.NONE|| +Y[fa]!=mxConstants.STYLE_FILLCOLOR&&Y[fa]!=mxConstants.STYLE_STROKECOLOR)P[Y[fa]]=ja[Y[fa]]}),F=mxUtils.bind(this,function(P,Y,ja,fa,ra){if(null!=P){null!=ja&&null!=Y.labelBackgroundColor&&(fa=null!=fa?fa.background:null,ra=null!=ra?ra:f,null==fa&&(fa=ra.background),null==fa&&(fa=ra.defaultPageBackgroundColor),Y.labelBackgroundColor=fa);for(var K in P)if(null==ja||null!=Y[K]&&Y[K]!=mxConstants.NONE||K!=mxConstants.STYLE_FILLCOLOR&&K!=mxConstants.STYLE_STROKECOLOR)Y[K]=P[K]}});m=mxUtils.button(mxResources.get("reset"), +mxUtils.bind(this,function(P){P=f.getVerticesAndEdges(!0,!0);this.format.rounded=!1;this.format.curved=!1;if(0<P.length){e.beginUpdate();try{f.updateCellStyles({sketch:null,rounded:null},P),f.updateCellStyles({curved:null,rounded:"0"},f.getVerticesAndEdges(!1,!0))}finally{e.endUpdate()}}b.clearDefaultStyle();b.setSketchMode(!1)}));m.setAttribute("title",mxResources.get("reset"));m.style.textOverflow="ellipsis";m.style.maxWidth="90px";r.appendChild(m);var I=mxUtils.bind(this,function(P,Y,ja,fa,ra){var K= +document.createElement("div");K.style.position="absolute";K.style.display="inline-block";K.style.overflow="hidden";K.style.pointerEvents="none";K.style.width="100%";K.style.height="100%";ra.appendChild(K);var V=new Graph(K,null,null,f.getStylesheet());V.resetViewOnRootChange=!1;V.foldingEnabled=!1;V.gridEnabled=!1;V.autoScroll=!1;V.setTooltips(!1);V.setConnectable(!1);V.setPanning(!1);V.setEnabled(!1);V.getCellStyle=function(J,ba){ba=null!=ba?ba:!0;var ha=mxUtils.clone(f.getCellStyle.apply(this,arguments)), +na=f.stylesheet.getDefaultVertexStyle(),W=Y;e.isEdge(J)&&(na=f.stylesheet.getDefaultEdgeStyle(),W=ja);D(ha,x,na);F(P,ha,J,fa,V);F(W,ha,J,fa,V);ba&&(ha=f.postProcessCellStyle(J,ha));return ha};V.model.beginUpdate();try{var O=V.insertVertex(V.getDefaultParent(),null,"Shape",14,8,70,40,"strokeWidth=2;"),T=V.insertEdge(V.getDefaultParent(),null,"Connector",O,O,"edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;endSize=5;strokeWidth=2;");T.geometry.points=[new mxPoint(32,70)];T.geometry.offset= +new mxPoint(0,8)}finally{V.model.endUpdate()}}),C=document.createElement("div");C.style.position="relative";a.appendChild(C);null==this.format.cachedStyleEntries&&(this.format.cachedStyleEntries=[]);var N=mxUtils.bind(this,function(P,Y,ja,fa,ra){var K=this.format.cachedStyleEntries[ra];null==K&&(K=document.createElement("div"),K.style.display="inline-block",K.style.position="relative",K.style.width="96px",K.style.height="90px",K.style.cursor="pointer",K.style.border="1px solid gray",K.style.borderRadius= +"8px",K.style.margin="2px",K.style.overflow="hidden",null!=fa&&null!=fa.background&&(K.style.backgroundColor=fa.background),I(P,Y,ja,fa,K),mxEvent.addGestureListeners(K,mxUtils.bind(this,function(V){K.style.opacity=.5}),null,mxUtils.bind(this,function(V){K.style.opacity=1;f.currentVertexStyle=mxUtils.clone(f.defaultVertexStyle);f.currentEdgeStyle=mxUtils.clone(f.defaultEdgeStyle);F(P,f.currentVertexStyle);F(P,f.currentEdgeStyle);F(Y,f.currentVertexStyle);F(ja,f.currentEdgeStyle);e.beginUpdate();try{var O= +x.slice(),T;for(T in P)O.push(T);B(O,fa);var J=new ChangePageSetup(b,null!=fa?fa.background:null);J.ignoreImage=!0;e.execute(J);e.execute(new ChangeGridColor(b,null!=fa&&null!=fa.gridColor?fa.gridColor:g))}finally{e.endUpdate()}})),mxEvent.addListener(K,"mouseenter",mxUtils.bind(this,function(V){var O=f.getCellStyle;V=f.background;var T=f.view.gridColor;f.background=null!=fa?fa.background:null;f.view.gridColor=null!=fa&&null!=fa.gridColor?fa.gridColor:g;f.getCellStyle=function(J,ba){ba=null!=ba?ba: +!0;var ha=mxUtils.clone(O.apply(this,arguments)),na=f.stylesheet.getDefaultVertexStyle(),W=Y;e.isEdge(J)&&(na=f.stylesheet.getDefaultEdgeStyle(),W=ja);D(ha,x,na);F(P,ha,J,fa);F(W,ha,J,fa);ba&&(ha=this.postProcessCellStyle(J,ha));return ha};f.refresh();f.getCellStyle=O;f.background=V;f.view.gridColor=T})),mxEvent.addListener(K,"mouseleave",mxUtils.bind(this,function(V){f.refresh()})),mxClient.IS_IE||mxClient.IS_IE11||(this.format.cachedStyleEntries[ra]=K));C.appendChild(K)}),R=Math.ceil(Editor.styles.length/ +10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var S=[],Q=mxUtils.bind(this,function(){0<S.length&&(S[this.format.currentStylePage].style.background="#84d7ff");for(var P=10*this.format.currentStylePage;P<Math.min(10*(this.format.currentStylePage+1),Editor.styles.length);P++){var Y=Editor.styles[P];N(Y.commonStyle,Y.vertexStyle,Y.edgeStyle,Y.graph,P)}}),aa=mxUtils.bind(this,function(P){0<=P&&P<R&&(S[this.format.currentStylePage].style.background= +"transparent",C.innerText="",this.format.currentStylePage=P,Q())});if(1<R){d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.position="relative";d.style.textAlign="center";d.style.paddingTop="4px";d.style.width="210px";a.style.paddingBottom="8px";for(r=0;r<R;r++){var U=document.createElement("div");U.style.display="inline-block";U.style.width="6px";U.style.height="6px";U.style.marginLeft="4px";U.style.marginRight="3px";U.style.borderRadius="3px";U.style.cursor="pointer";U.style.background= +"transparent";U.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(P,Y){mxEvent.addListener(U,"click",mxUtils.bind(this,function(){aa(P)}))})(r,U);d.appendChild(U);S.push(U)}a.appendChild(d);Q();15>R&&(k=function(P){mxEvent.addListener(P,"mouseenter",function(){P.style.opacity="1"});mxEvent.addListener(P,"mouseleave",function(){P.style.opacity="0.5"})},m=document.createElement("div"),m.style.className="geAdaptiveAsset",m.style.position="absolute",m.style.left="0px",m.style.top="0px",m.style.bottom= "0px",m.style.width="24px",m.style.height="24px",m.style.margin="0px",m.style.cursor="pointer",m.style.opacity="0.5",m.style.backgroundRepeat="no-repeat",m.style.backgroundPosition="center center",m.style.backgroundSize="24px 24px",m.style.backgroundImage="url("+Editor.previousImage+")",r=m.cloneNode(!1),r.style.backgroundImage="url("+Editor.nextImage+")",r.style.left="",r.style.right="2px",d.appendChild(m),d.appendChild(r),mxEvent.addListener(m,"click",mxUtils.bind(this,function(){aa(mxUtils.mod(this.format.currentStylePage- 1,R))})),mxEvent.addListener(r,"click",mxUtils.bind(this,function(){aa(mxUtils.mod(this.format.currentStylePage+1,R))})),k(m),k(r))}else Q();return a};DiagramStylePanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.darkModeChangedListener&&(this.editorUi.removeListener(this.darkModeChangedListener),this.darkModeChangedListener=null)};DiagramFormatPanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};mxUtils.extend(DiagramFormatPanel,BaseFormatPanel); DiagramFormatPanel.showPageView=!0;DiagramFormatPanel.prototype.showBackgroundImageOption=!0;DiagramFormatPanel.prototype.init=function(){var a=this.editorUi.editor.graph;this.container.appendChild(this.addView(this.createPanel()));a.isEnabled()&&(this.container.appendChild(this.addOptions(this.createPanel())),this.container.appendChild(this.addPaperSize(this.createPanel())),this.container.appendChild(this.addStyleOps(this.createPanel())))}; @@ -3214,19 +3212,19 @@ DiagramFormatPanel.prototype.addDocumentProperties=function(a){a.appendChild(thi DiagramFormatPanel.prototype.addPaperSize=function(a){var b=this.editorUi,f=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("paperSize")));var e=PageSetupDialog.addPageFormatPanel(a,"formatpanel",f.pageFormat,function(d){if(null==f.pageFormat||f.pageFormat.width!=d.width||f.pageFormat.height!=d.height)d=new ChangePageSetup(b,null,null,d),d.ignoreColor=!0,d.ignoreImage=!0,f.model.execute(d)});this.addKeyHandler(e.widthInput,function(){e.set(f.pageFormat)});this.addKeyHandler(e.heightInput, function(){e.set(f.pageFormat)});var g=function(){e.set(f.pageFormat)};b.addListener("pageFormatChanged",g);this.listeners.push({destroy:function(){b.removeListener(g)}});f.getModel().addListener(mxEvent.CHANGE,g);this.listeners.push({destroy:function(){f.getModel().removeListener(g)}});return a};DiagramFormatPanel.prototype.addStyleOps=function(a){this.addActions(a,["editData"]);this.addActions(a,["clearDefaultStyle"]);return a}; DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(c,h,q){mxShape.call(this);this.line=c;this.stroke=h;this.strokewidth=null!=q?q:1;this.updateBoundsFromLine()}function b(){mxSwimlane.call(this)}function f(){mxSwimlane.call(this)}function e(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function d(){mxActor.call(this)}function k(){mxCylinder.call(this)}function n(){mxCylinder.call(this)}function u(){mxCylinder.call(this)}function m(){mxCylinder.call(this)}function r(){mxShape.call(this)}function x(){mxShape.call(this)} -function B(c,h,q,l){mxShape.call(this);this.bounds=c;this.fill=h;this.stroke=q;this.strokewidth=null!=l?l:1}function D(){mxActor.call(this)}function F(){mxCylinder.call(this)}function J(){mxCylinder.call(this)}function C(){mxActor.call(this)}function O(){mxActor.call(this)}function R(){mxActor.call(this)}function T(){mxActor.call(this)}function Q(){mxActor.call(this)}function aa(){mxActor.call(this)}function S(){mxActor.call(this)}function P(c,h){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round"); +function B(c,h,q,l){mxShape.call(this);this.bounds=c;this.fill=h;this.stroke=q;this.strokewidth=null!=l?l:1}function D(){mxActor.call(this)}function F(){mxCylinder.call(this)}function I(){mxCylinder.call(this)}function C(){mxActor.call(this)}function N(){mxActor.call(this)}function R(){mxActor.call(this)}function S(){mxActor.call(this)}function Q(){mxActor.call(this)}function aa(){mxActor.call(this)}function U(){mxActor.call(this)}function P(c,h){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round"); this.defaultVariation=h;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,P.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,P.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,P.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,P.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,P.prototype.curveTo); -this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,P.prototype.arcTo)}function X(){mxRectangleShape.call(this)}function ha(){mxRectangleShape.call(this)}function fa(){mxActor.call(this)}function sa(){mxActor.call(this)}function K(){mxActor.call(this)}function V(){mxRectangleShape.call(this)}function G(){mxRectangleShape.call(this)}function M(){mxCylinder.call(this)}function U(){mxShape.call(this)}function ba(){mxShape.call(this)}function la(){mxEllipse.call(this)}function ra(){mxShape.call(this)} -function Y(){mxShape.call(this)}function da(){mxRectangleShape.call(this)}function pa(){mxShape.call(this)}function wa(){mxShape.call(this)}function Ka(){mxShape.call(this)}function Ha(){mxShape.call(this)}function ua(){mxShape.call(this)}function Ca(){mxCylinder.call(this)}function qa(){mxCylinder.call(this)}function Da(){mxRectangleShape.call(this)}function Ua(){mxDoubleEllipse.call(this)}function db(){mxDoubleEllipse.call(this)}function Ta(){mxArrowConnector.call(this);this.spacing=0}function ab(){mxArrowConnector.call(this); -this.spacing=0}function Ya(){mxActor.call(this)}function Va(){mxRectangleShape.call(this)}function Za(){mxActor.call(this)}function kb(){mxActor.call(this)}function cb(){mxActor.call(this)}function ca(){mxActor.call(this)}function t(){mxActor.call(this)}function z(){mxActor.call(this)}function A(){mxActor.call(this)}function E(){mxActor.call(this)}function H(){mxActor.call(this)}function L(){mxActor.call(this)}function W(){mxEllipse.call(this)}function ia(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)} -function ja(){mxRhombus.call(this)}function ta(){mxEllipse.call(this)}function Aa(){mxEllipse.call(this)}function Ea(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function La(){mxActor.call(this)}function Ia(){mxActor.call(this)}function Fa(){mxActor.call(this)}function Ga(c,h,q,l){mxShape.call(this);this.bounds=c;this.fill=h;this.stroke=q;this.strokewidth=null!=l?l:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Oa(){mxConnector.call(this)} -function Pa(c,h,q,l,p,v,w,I,y,Z){w+=y;var N=l.clone();l.x-=p*(2*w+y);l.y-=v*(2*w+y);p*=w+y;v*=w+y;return function(){c.ellipse(N.x-p-w,N.y-v-w,2*w,2*w);Z?c.fillAndStroke():c.stroke()}}mxUtils.extend(a,mxShape);a.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var h=0;h<this.line.length;h++){var q=this.line[h];null!=q&&(q=new mxRectangle(q.x,q.y,this.strokewidth,this.strokewidth),null==c?c=q:c.add(q))}this.bounds=null!=c?c:new mxRectangle};a.prototype.paintVertexShape=function(c, +this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,P.prototype.arcTo)}function Y(){mxRectangleShape.call(this)}function ja(){mxRectangleShape.call(this)}function fa(){mxActor.call(this)}function ra(){mxActor.call(this)}function K(){mxActor.call(this)}function V(){mxRectangleShape.call(this)}function O(){mxRectangleShape.call(this)}function T(){mxCylinder.call(this)}function J(){mxShape.call(this)}function ba(){mxShape.call(this)}function ha(){mxEllipse.call(this)}function na(){mxShape.call(this)} +function W(){mxShape.call(this)}function da(){mxRectangleShape.call(this)}function sa(){mxShape.call(this)}function ta(){mxShape.call(this)}function Ja(){mxShape.call(this)}function Ha(){mxShape.call(this)}function ua(){mxShape.call(this)}function Aa(){mxCylinder.call(this)}function qa(){mxCylinder.call(this)}function Da(){mxRectangleShape.call(this)}function Ua(){mxDoubleEllipse.call(this)}function db(){mxDoubleEllipse.call(this)}function Ta(){mxArrowConnector.call(this);this.spacing=0}function ab(){mxArrowConnector.call(this); +this.spacing=0}function Ya(){mxActor.call(this)}function Va(){mxRectangleShape.call(this)}function Za(){mxActor.call(this)}function kb(){mxActor.call(this)}function cb(){mxActor.call(this)}function ca(){mxActor.call(this)}function t(){mxActor.call(this)}function z(){mxActor.call(this)}function A(){mxActor.call(this)}function E(){mxActor.call(this)}function G(){mxActor.call(this)}function L(){mxActor.call(this)}function X(){mxEllipse.call(this)}function ia(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)} +function ka(){mxRhombus.call(this)}function va(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function Ea(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function La(){mxActor.call(this)}function Ia(){mxActor.call(this)}function Fa(){mxActor.call(this)}function Ga(c,h,q,l){mxShape.call(this);this.bounds=c;this.fill=h;this.stroke=q;this.strokewidth=null!=l?l:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Oa(){mxConnector.call(this)} +function Pa(c,h,q,l,p,v,w,H,y,Z){w+=y;var M=l.clone();l.x-=p*(2*w+y);l.y-=v*(2*w+y);p*=w+y;v*=w+y;return function(){c.ellipse(M.x-p-w,M.y-v-w,2*w,2*w);Z?c.fillAndStroke():c.stroke()}}mxUtils.extend(a,mxShape);a.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var h=0;h<this.line.length;h++){var q=this.line[h];null!=q&&(q=new mxRectangle(q.x,q.y,this.strokewidth,this.strokewidth),null==c?c=q:c.add(q))}this.bounds=null!=c?c:new mxRectangle};a.prototype.paintVertexShape=function(c, h,q,l,p){this.paintTableLine(c,this.line,0,0)};a.prototype.paintTableLine=function(c,h,q,l){if(null!=h){var p=null;c.begin();for(var v=0;v<h.length;v++){var w=h[v];null!=w&&(null==p?c.moveTo(w.x+q,w.y+l):null!=p&&c.lineTo(w.x+q,w.y+l));p=w}c.end();c.stroke()}};a.prototype.intersectsRectangle=function(c){var h=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var q=null,l=0;l<this.line.length&&!h;l++){var p=this.line[l];null!=p&&null!=q&&(h=mxUtils.rectangleIntersectsSegment(c, -q,p));q=p}return h};mxCellRenderer.registerShape("tableLine",a);mxUtils.extend(b,mxSwimlane);b.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};b.prototype.paintVertexShape=function(c,h,q,l,p){var v=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,w=this.isHorizontal(),I=this.getTitleSize();0==I||this.outline?Ea.prototype.paintVertexShape.apply(this, -arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-h,-q));v||this.outline||!(w&&I<p||!w&&I<l)||this.paintForeground(c,h,q,l,p)};b.prototype.paintForeground=function(c,h,q,l,p){if(null!=this.state){var v=this.flipH,w=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var I=v;v=w;w=I}c.rotate(-this.getShapeRotation(),v,w,h+l/2,q+p/2);s=this.scale;h=this.bounds.x/s;q=this.bounds.y/s;l=this.bounds.width/s;p=this.bounds.height/ +q,p));q=p}return h};mxCellRenderer.registerShape("tableLine",a);mxUtils.extend(b,mxSwimlane);b.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};b.prototype.paintVertexShape=function(c,h,q,l,p){var v=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,w=this.isHorizontal(),H=this.getTitleSize();0==H||this.outline?Ea.prototype.paintVertexShape.apply(this, +arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-h,-q));v||this.outline||!(w&&H<p||!w&&H<l)||this.paintForeground(c,h,q,l,p)};b.prototype.paintForeground=function(c,h,q,l,p){if(null!=this.state){var v=this.flipH,w=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var H=v;v=w;w=H}c.rotate(-this.getShapeRotation(),v,w,h+l/2,q+p/2);s=this.scale;h=this.bounds.x/s;q=this.bounds.y/s;l=this.bounds.width/s;p=this.bounds.height/ s;this.paintTableForeground(c,h,q,l,p)}};b.prototype.paintTableForeground=function(c,h,q,l,p){l=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(p=0;p<l.length;p++)a.prototype.paintTableLine(c,l[p],h,q)};b.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table", -b);mxUtils.extend(f,b);f.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",f);mxUtils.extend(e,mxCylinder);e.prototype.size=20;e.prototype.darkOpacity=0;e.prototype.darkOpacity2=0;e.prototype.paintVertexShape=function(c,h,q,l,p){var v=Math.max(0,Math.min(l,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),w=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),I=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style, -"darkOpacity2",this.darkOpacity2))));c.translate(h,q);c.begin();c.moveTo(0,0);c.lineTo(l-v,0);c.lineTo(l,v);c.lineTo(l,p);c.lineTo(v,p);c.lineTo(0,p-v);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=w&&(c.setFillAlpha(Math.abs(w)),c.setFillColor(0>w?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(l-v,0),c.lineTo(l,v),c.lineTo(v,v),c.close(),c.fill()),0!=I&&(c.setFillAlpha(Math.abs(I)),c.setFillColor(0>I?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(v, +b);mxUtils.extend(f,b);f.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",f);mxUtils.extend(e,mxCylinder);e.prototype.size=20;e.prototype.darkOpacity=0;e.prototype.darkOpacity2=0;e.prototype.paintVertexShape=function(c,h,q,l,p){var v=Math.max(0,Math.min(l,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),w=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),H=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style, +"darkOpacity2",this.darkOpacity2))));c.translate(h,q);c.begin();c.moveTo(0,0);c.lineTo(l-v,0);c.lineTo(l,v);c.lineTo(l,p);c.lineTo(v,p);c.lineTo(0,p-v);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=w&&(c.setFillAlpha(Math.abs(w)),c.setFillColor(0>w?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(l-v,0),c.lineTo(l,v),c.lineTo(v,v),c.close(),c.fill()),0!=H&&(c.setFillAlpha(Math.abs(H)),c.setFillColor(0>H?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(v, v),c.lineTo(v,p),c.lineTo(0,p-v),c.close(),c.fill()),c.begin(),c.moveTo(v,p),c.lineTo(v,v),c.lineTo(0,0),c.moveTo(v,v),c.lineTo(l,v),c.end(),c.stroke())};e.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",e);var Na=Math.tan(mxUtils.toRadians(30)),Sa=(.5-Na)/2;mxCellRenderer.registerShape("isoRectangle",d);mxUtils.extend(g, mxCylinder);g.prototype.size=6;g.prototype.paintVertexShape=function(c,h,q,l,p){c.setFillColor(this.stroke);var v=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(h+.5*(l-v),q+.5*(p-v),v,v);c.fill();c.setFillColor(mxConstants.NONE);c.rect(h,q,l,p);c.fill()};mxCellRenderer.registerShape("waypoint",g);mxUtils.extend(d,mxActor);d.prototype.size=20;d.prototype.redrawPath=function(c,h,q,l,p){h=Math.min(l,p/Na);c.translate((l-h)/2,(p-h)/2+h/4);c.moveTo(0, .25*h);c.lineTo(.5*h,h*Sa);c.lineTo(h,.25*h);c.lineTo(.5*h,(.5-Sa)*h);c.lineTo(0,.25*h);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",d);mxUtils.extend(k,mxCylinder);k.prototype.size=20;k.prototype.redrawPath=function(c,h,q,l,p,v){h=Math.min(l,p/(.5+Na));v?(c.moveTo(0,.25*h),c.lineTo(.5*h,(.5-Sa)*h),c.lineTo(h,.25*h),c.moveTo(.5*h,(.5-Sa)*h),c.lineTo(.5*h,(1-Sa)*h)):(c.translate((l-h)/2,(p-h)/2),c.moveTo(0,.25*h),c.lineTo(.5*h,h*Sa),c.lineTo(h,.25*h),c.lineTo(h,.75*h),c.lineTo(.5* @@ -3238,72 +3236,72 @@ c.end(),c.stroke())};mxCellRenderer.registerShape("note",u);mxUtils.extend(m,u); p,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(h,q);0==v?(c.rect(0,0,l,p),c.fillAndStroke()):(c.begin(),c.moveTo(0,v),c.arcTo(.5*l,v,0,0,1,.5*l,0),c.arcTo(.5*l,v,0,0,1,l,v),c.lineTo(l,p-v),c.arcTo(.5*l,v,0,0,1,.5*l,p),c.arcTo(.5*l,v,0,0,1,0,p-v),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(l,v),c.arcTo(.5*l,v,0,0,1,.5*l,2*v),c.arcTo(.5*l,v,0,0,1,0,v),c.stroke())};mxCellRenderer.registerShape("cylinder2",x);mxUtils.extend(B,mxCylinder);B.prototype.size= 15;B.prototype.paintVertexShape=function(c,h,q,l,p){var v=Math.max(0,Math.min(.5*p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),w=mxUtils.getValue(this.style,"lid",!0);c.translate(h,q);0==v?(c.rect(0,0,l,p),c.fillAndStroke()):(c.begin(),w?(c.moveTo(0,v),c.arcTo(.5*l,v,0,0,1,.5*l,0),c.arcTo(.5*l,v,0,0,1,l,v)):(c.moveTo(0,0),c.arcTo(.5*l,v,0,0,0,.5*l,v),c.arcTo(.5*l,v,0,0,0,l,0)),c.lineTo(l,p-v),c.arcTo(.5*l,v,0,0,1,.5*l,p),c.arcTo(.5*l,v,0,0,1,0,p-v),c.close(),c.fillAndStroke(),c.setShadow(!1), w&&(c.begin(),c.moveTo(l,v),c.arcTo(.5*l,v,0,0,1,.5*l,2*v),c.arcTo(.5*l,v,0,0,1,0,v),c.stroke()))};mxCellRenderer.registerShape("cylinder3",B);mxUtils.extend(D,mxActor);D.prototype.redrawPath=function(c,h,q,l,p){c.moveTo(0,0);c.quadTo(l/2,.5*p,l,0);c.quadTo(.5*l,p/2,l,p);c.quadTo(l/2,.5*p,0,p);c.quadTo(.5*l,p/2,0,0);c.end()};mxCellRenderer.registerShape("switch",D);mxUtils.extend(F,mxCylinder);F.prototype.tabWidth=60;F.prototype.tabHeight=20;F.prototype.tabPosition="right";F.prototype.arcSize=.1; -F.prototype.paintVertexShape=function(c,h,q,l,p){c.translate(h,q);h=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));q=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var v=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),w=mxUtils.getValue(this.style,"rounded",!1),I=mxUtils.getValue(this.style,"absoluteArcSize",!1),y=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));I||(y*=Math.min(l,p)); +F.prototype.paintVertexShape=function(c,h,q,l,p){c.translate(h,q);h=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));q=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var v=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),w=mxUtils.getValue(this.style,"rounded",!1),H=mxUtils.getValue(this.style,"absoluteArcSize",!1),y=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));H||(y*=Math.min(l,p)); y=Math.min(y,.5*l,.5*(p-q));h=Math.max(h,y);h=Math.min(l-y,h);w||(y=0);c.begin();"left"==v?(c.moveTo(Math.max(y,0),q),c.lineTo(Math.max(y,0),0),c.lineTo(h,0),c.lineTo(h,q)):(c.moveTo(l-h,q),c.lineTo(l-h,0),c.lineTo(l-Math.max(y,0),0),c.lineTo(l-Math.max(y,0),q));w?(c.moveTo(0,y+q),c.arcTo(y,y,0,0,1,y,q),c.lineTo(l-y,q),c.arcTo(y,y,0,0,1,l,y+q),c.lineTo(l,p-y),c.arcTo(y,y,0,0,1,l-y,p),c.lineTo(y,p),c.arcTo(y,y,0,0,1,0,p-y)):(c.moveTo(0,q),c.lineTo(l,q),c.lineTo(l,p),c.lineTo(0,p));c.close();c.fillAndStroke(); c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(l-30,q+20),c.lineTo(l-20,q+10),c.lineTo(l-10,q+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",F);F.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var q=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;h=mxUtils.getValue(this.style, "tabHeight",15)*this.scale;var l=mxUtils.getValue(this.style,"rounded",!1),p=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));p||(v*=Math.min(c.width,c.height));v=Math.min(v,.5*c.width,.5*(c.height-h));l||(v=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(v,0,Math.min(c.width,c.width-q),Math.min(c.height,c.height-h)):new mxRectangle(Math.min(c.width,c.width-q),0,v,Math.min(c.height,c.height- -h))}return new mxRectangle(0,Math.min(c.height,h),0,0)}return null};mxUtils.extend(J,mxCylinder);J.prototype.arcSize=.1;J.prototype.paintVertexShape=function(c,h,q,l,p){c.translate(h,q);var v=mxUtils.getValue(this.style,"rounded",!1),w=mxUtils.getValue(this.style,"absoluteArcSize",!1);h=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));q=mxUtils.getValue(this.style,"umlStateConnection",null);w||(h*=Math.min(l,p));h=Math.min(h,.5*l,.5*p);v||(h=0);v=0;null!=q&&(v=10);c.begin();c.moveTo(v, +h))}return new mxRectangle(0,Math.min(c.height,h),0,0)}return null};mxUtils.extend(I,mxCylinder);I.prototype.arcSize=.1;I.prototype.paintVertexShape=function(c,h,q,l,p){c.translate(h,q);var v=mxUtils.getValue(this.style,"rounded",!1),w=mxUtils.getValue(this.style,"absoluteArcSize",!1);h=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));q=mxUtils.getValue(this.style,"umlStateConnection",null);w||(h*=Math.min(l,p));h=Math.min(h,.5*l,.5*p);v||(h=0);v=0;null!=q&&(v=10);c.begin();c.moveTo(v, h);c.arcTo(h,h,0,0,1,v+h,0);c.lineTo(l-h,0);c.arcTo(h,h,0,0,1,l,h);c.lineTo(l,p-h);c.arcTo(h,h,0,0,1,l-h,p);c.lineTo(v+h,p);c.arcTo(h,h,0,0,1,v,p-h);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(l-40,p-20,10,10,3,3),c.stroke(),c.roundrect(l-20,p-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(l-30,p-15),c.lineTo(l-20,p-15),c.stroke());"connPointRefEntry"==q?(c.ellipse(0,.5*p-10,20,20),c.fillAndStroke()):"connPointRefExit"== -q&&(c.ellipse(0,.5*p-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*p-5),c.lineTo(15,.5*p+5),c.moveTo(15,.5*p-5),c.lineTo(5,.5*p+5),c.stroke())};J.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",J);mxUtils.extend(C,mxActor);C.prototype.size=30;C.prototype.isRoundable=function(){return!0};C.prototype.redrawPath= -function(c,h,q,l,p){h=Math.max(0,Math.min(l,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(h,0),new mxPoint(l,0),new mxPoint(l,p),new mxPoint(0,p),new mxPoint(0,h)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("card",C);mxUtils.extend(O,mxActor);O.prototype.size=.4;O.prototype.redrawPath=function(c,h,q,l,p){h=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style, -"size",this.size))));c.moveTo(0,h/2);c.quadTo(l/4,1.4*h,l/2,h/2);c.quadTo(3*l/4,h*(1-1.4),l,h/2);c.lineTo(l,p-h/2);c.quadTo(3*l/4,p-1.4*h,l/2,p-h/2);c.quadTo(l/4,p-h*(1-1.4),0,p-h/2);c.lineTo(0,h/2);c.close();c.end()};O.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"size",this.size),q=c.width,l=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return h*= -l,new mxRectangle(c.x,c.y+h,q,l-2*h);h*=q;return new mxRectangle(c.x+h,c.y,q-2*h,l)}return c};mxCellRenderer.registerShape("tape",O);mxUtils.extend(R,mxActor);R.prototype.size=.3;R.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};R.prototype.redrawPath=function(c,h,q,l,p){h=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0, +q&&(c.ellipse(0,.5*p-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*p-5),c.lineTo(15,.5*p+5),c.moveTo(15,.5*p-5),c.lineTo(5,.5*p+5),c.stroke())};I.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",I);mxUtils.extend(C,mxActor);C.prototype.size=30;C.prototype.isRoundable=function(){return!0};C.prototype.redrawPath= +function(c,h,q,l,p){h=Math.max(0,Math.min(l,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(h,0),new mxPoint(l,0),new mxPoint(l,p),new mxPoint(0,p),new mxPoint(0,h)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("card",C);mxUtils.extend(N,mxActor);N.prototype.size=.4;N.prototype.redrawPath=function(c,h,q,l,p){h=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style, +"size",this.size))));c.moveTo(0,h/2);c.quadTo(l/4,1.4*h,l/2,h/2);c.quadTo(3*l/4,h*(1-1.4),l,h/2);c.lineTo(l,p-h/2);c.quadTo(3*l/4,p-1.4*h,l/2,p-h/2);c.quadTo(l/4,p-h*(1-1.4),0,p-h/2);c.lineTo(0,h/2);c.close();c.end()};N.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"size",this.size),q=c.width,l=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return h*= +l,new mxRectangle(c.x,c.y+h,q,l-2*h);h*=q;return new mxRectangle(c.x+h,c.y,q-2*h,l)}return c};mxCellRenderer.registerShape("tape",N);mxUtils.extend(R,mxActor);R.prototype.size=.3;R.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};R.prototype.redrawPath=function(c,h,q,l,p){h=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0, 0);c.lineTo(l,0);c.lineTo(l,p-h/2);c.quadTo(3*l/4,p-1.4*h,l/2,p-h/2);c.quadTo(l/4,p-h*(1-1.4),0,p-h/2);c.lineTo(0,h/2);c.close();c.end()};mxCellRenderer.registerShape("document",R);var eb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,h,q,l){var p=mxUtils.getValue(this.style,"size");return null!=p?l*Math.max(0,Math.min(1,p)):eb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=2*mxUtils.getValue(this.style, "size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*h),0,0)}return null};B.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(h/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*h*this.scale),0,Math.max(0,.3*h*this.scale))}return null};F.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style, "tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var q=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;h=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var l=mxUtils.getValue(this.style,"rounded",!1),p=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));p||(v*=Math.min(c.width,c.height));v=Math.min(v,.5*c.width,.5*(c.height-h));l||(v=0);return"left"==mxUtils.getValue(this.style,"tabPosition", -this.tabPosition)?new mxRectangle(v,0,Math.min(c.width,c.width-q),Math.min(c.height,c.height-h)):new mxRectangle(Math.min(c.width,c.width-q),0,v,Math.min(c.height,c.height-h))}return new mxRectangle(0,Math.min(c.height,h),0,0)}return null};J.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};m.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style, -"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,h*this.scale),0,Math.max(0,h*this.scale))}return null};mxUtils.extend(T,mxActor);T.prototype.size=.2;T.prototype.fixedSize=20;T.prototype.isRoundable=function(){return!0};T.prototype.redrawPath=function(c,h,q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style, -"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,p),new mxPoint(h,0),new mxPoint(l,0),new mxPoint(l-h,p)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("parallelogram",T);mxUtils.extend(Q,mxActor);Q.prototype.size=.2;Q.prototype.fixedSize=20;Q.prototype.isRoundable=function(){return!0};Q.prototype.redrawPath=function(c,h,q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5* +this.tabPosition)?new mxRectangle(v,0,Math.min(c.width,c.width-q),Math.min(c.height,c.height-h)):new mxRectangle(Math.min(c.width,c.width-q),0,v,Math.min(c.height,c.height-h))}return new mxRectangle(0,Math.min(c.height,h),0,0)}return null};I.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};m.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style, +"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,h*this.scale),0,Math.max(0,h*this.scale))}return null};mxUtils.extend(S,mxActor);S.prototype.size=.2;S.prototype.fixedSize=20;S.prototype.isRoundable=function(){return!0};S.prototype.redrawPath=function(c,h,q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style, +"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,p),new mxPoint(h,0),new mxPoint(l,0),new mxPoint(l-h,p)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("parallelogram",S);mxUtils.extend(Q,mxActor);Q.prototype.size=.2;Q.prototype.fixedSize=20;Q.prototype.isRoundable=function(){return!0};Q.prototype.redrawPath=function(c,h,q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5* l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,p),new mxPoint(h,0),new mxPoint(l-h,0),new mxPoint(l,p)],this.isRounded,q,!0)};mxCellRenderer.registerShape("trapezoid",Q);mxUtils.extend(aa,mxActor);aa.prototype.size=.5;aa.prototype.redrawPath=function(c,h,q,l,p){c.setFillColor(null); -h=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(h,0),new mxPoint(h,p/2),new mxPoint(0,p/2),new mxPoint(h,p/2),new mxPoint(h,p),new mxPoint(l,p)],this.isRounded,q,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",aa);mxUtils.extend(S,mxActor);S.prototype.redrawPath=function(c,h,q,l,p){c.setStrokeWidth(1);c.setFillColor(this.stroke); -h=l/5;c.rect(0,0,h,p);c.fillAndStroke();c.rect(2*h,0,h,p);c.fillAndStroke();c.rect(4*h,0,h,p);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",S);P.prototype.moveTo=function(c,h){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=h;this.firstX=c;this.firstY=h};P.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)}; -P.prototype.quadTo=function(c,h,q,l){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=q;this.lastY=l};P.prototype.curveTo=function(c,h,q,l,p,v){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=p;this.lastY=v};P.prototype.arcTo=function(c,h,q,l,p,v,w){this.originalArcTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=w};P.prototype.lineTo=function(c,h){if(null!=this.lastX&&null!=this.lastY){var q=function(N){return"number"===typeof N?N?0>N?-1:1:N===N?0:NaN:NaN},l=Math.abs(c- -this.lastX),p=Math.abs(h-this.lastY),v=Math.sqrt(l*l+p*p);if(2>v){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=h;return}var w=Math.round(v/10),I=this.defaultVariation;5>w&&(w=5,I/=3);var y=q(c-this.lastX)*l/w;q=q(h-this.lastY)*p/w;l/=v;p/=v;for(v=0;v<w;v++){var Z=(Math.random()-.5)*I;this.originalLineTo.call(this.canvas,y*v+this.lastX-Z*p,q*v+this.lastY-Z*l)}this.originalLineTo.call(this.canvas,c,h)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY= +h=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(h,0),new mxPoint(h,p/2),new mxPoint(0,p/2),new mxPoint(h,p/2),new mxPoint(h,p),new mxPoint(l,p)],this.isRounded,q,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",aa);mxUtils.extend(U,mxActor);U.prototype.redrawPath=function(c,h,q,l,p){c.setStrokeWidth(1);c.setFillColor(this.stroke); +h=l/5;c.rect(0,0,h,p);c.fillAndStroke();c.rect(2*h,0,h,p);c.fillAndStroke();c.rect(4*h,0,h,p);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",U);P.prototype.moveTo=function(c,h){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=h;this.firstX=c;this.firstY=h};P.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)}; +P.prototype.quadTo=function(c,h,q,l){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=q;this.lastY=l};P.prototype.curveTo=function(c,h,q,l,p,v){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=p;this.lastY=v};P.prototype.arcTo=function(c,h,q,l,p,v,w){this.originalArcTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=w};P.prototype.lineTo=function(c,h){if(null!=this.lastX&&null!=this.lastY){var q=function(M){return"number"===typeof M?M?0>M?-1:1:M===M?0:NaN:NaN},l=Math.abs(c- +this.lastX),p=Math.abs(h-this.lastY),v=Math.sqrt(l*l+p*p);if(2>v){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=h;return}var w=Math.round(v/10),H=this.defaultVariation;5>w&&(w=5,H/=3);var y=q(c-this.lastX)*l/w;q=q(h-this.lastY)*p/w;l/=v;p/=v;for(v=0;v<w;v++){var Z=(Math.random()-.5)*H;this.originalLineTo.call(this.canvas,y*v+this.lastX-Z*p,q*v+this.lastY-Z*l)}this.originalLineTo.call(this.canvas,c,h)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY= h};P.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var bb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){bb.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};var pb=mxShape.prototype.afterPaint; mxShape.prototype.afterPaint=function(c){pb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new P(c,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};mxRhombus.prototype.defaultJiggle=2;var vb=mxRectangleShape.prototype.isHtmlAllowed; mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&vb.apply(this,arguments)};var wb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,h,q,l,p){if(null==c.handJiggle||c.handJiggle.constructor!=P)wb.apply(this,arguments);else{var v=!0;null!=this.style&&(v="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS, "1"));if(v||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)v||null!=this.fill&&this.fill!=mxConstants.NONE||(c.pointerEvents=!1),c.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?v=Math.min(l/2,Math.min(p/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,v=Math.min(l* -v,p*v)),c.moveTo(h+v,q),c.lineTo(h+l-v,q),c.quadTo(h+l,q,h+l,q+v),c.lineTo(h+l,q+p-v),c.quadTo(h+l,q+p,h+l-v,q+p),c.lineTo(h+v,q+p),c.quadTo(h,q+p,h,q+p-v),c.lineTo(h,q+v),c.quadTo(h,q,h+v,q)):(c.moveTo(h,q),c.lineTo(h+l,q),c.lineTo(h+l,q+p),c.lineTo(h,q+p),c.lineTo(h,q)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(X,mxRectangleShape);X.prototype.size=.1;X.prototype.fixedSize=!1;X.prototype.isHtmlAllowed=function(){return!1};X.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style, +v,p*v)),c.moveTo(h+v,q),c.lineTo(h+l-v,q),c.quadTo(h+l,q,h+l,q+v),c.lineTo(h+l,q+p-v),c.quadTo(h+l,q+p,h+l-v,q+p),c.lineTo(h+v,q+p),c.quadTo(h,q+p,h,q+p-v),c.lineTo(h,q+v),c.quadTo(h,q,h+v,q)):(c.moveTo(h,q),c.lineTo(h+l,q),c.lineTo(h+l,q+p),c.lineTo(h,q+p),c.lineTo(h,q)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(Y,mxRectangleShape);Y.prototype.size=.1;Y.prototype.fixedSize=!1;Y.prototype.isHtmlAllowed=function(){return!1};Y.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style, mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var h=c.width,q=c.height;c=new mxRectangle(c.x,c.y,h,q);var l=h*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var p=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;l=Math.max(l,Math.min(h*p,q*p))}c.x+=Math.round(l);c.width-=Math.round(2*l);return c}return c}; -X.prototype.paintForeground=function(c,h,q,l,p){var v=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),w=parseFloat(mxUtils.getValue(this.style,"size",this.size));w=v?Math.max(0,Math.min(l,w)):l*Math.max(0,Math.min(1,w));this.isRounded&&(v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,w=Math.max(w,Math.min(l*v,p*v)));w=Math.round(w);c.begin();c.moveTo(h+w,q);c.lineTo(h+w,q+p);c.moveTo(h+l-w,q);c.lineTo(h+l-w,q+p);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this, -arguments)};mxCellRenderer.registerShape("process",X);mxCellRenderer.registerShape("process2",X);mxUtils.extend(ha,mxRectangleShape);ha.prototype.paintBackground=function(c,h,q,l,p){c.setFillColor(mxConstants.NONE);c.rect(h,q,l,p);c.fill()};ha.prototype.paintForeground=function(c,h,q,l,p){};mxCellRenderer.registerShape("transparent",ha);mxUtils.extend(fa,mxHexagon);fa.prototype.size=30;fa.prototype.position=.5;fa.prototype.position2=.5;fa.prototype.base=20;fa.prototype.getLabelMargins=function(){return new mxRectangle(0, +Y.prototype.paintForeground=function(c,h,q,l,p){var v=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),w=parseFloat(mxUtils.getValue(this.style,"size",this.size));w=v?Math.max(0,Math.min(l,w)):l*Math.max(0,Math.min(1,w));this.isRounded&&(v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,w=Math.max(w,Math.min(l*v,p*v)));w=Math.round(w);c.begin();c.moveTo(h+w,q);c.lineTo(h+w,q+p);c.moveTo(h+l-w,q);c.lineTo(h+l-w,q+p);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this, +arguments)};mxCellRenderer.registerShape("process",Y);mxCellRenderer.registerShape("process2",Y);mxUtils.extend(ja,mxRectangleShape);ja.prototype.paintBackground=function(c,h,q,l,p){c.setFillColor(mxConstants.NONE);c.rect(h,q,l,p);c.fill()};ja.prototype.paintForeground=function(c,h,q,l,p){};mxCellRenderer.registerShape("transparent",ja);mxUtils.extend(fa,mxHexagon);fa.prototype.size=30;fa.prototype.position=.5;fa.prototype.position2=.5;fa.prototype.base=20;fa.prototype.getLabelMargins=function(){return new mxRectangle(0, 0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};fa.prototype.isRoundable=function(){return!0};fa.prototype.redrawPath=function(c,h,q,l,p){h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;q=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var v=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),w=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2", -this.position2)))),I=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(l,0),new mxPoint(l,p-q),new mxPoint(Math.min(l,v+I),p-q),new mxPoint(w,p),new mxPoint(Math.max(0,v),p-q),new mxPoint(0,p-q)],this.isRounded,h,!0,[4])};mxCellRenderer.registerShape("callout",fa);mxUtils.extend(sa,mxActor);sa.prototype.size=.2;sa.prototype.fixedSize=20;sa.prototype.isRoundable=function(){return!0};sa.prototype.redrawPath=function(c,h, +this.position2)))),H=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(l,0),new mxPoint(l,p-q),new mxPoint(Math.min(l,v+H),p-q),new mxPoint(w,p),new mxPoint(Math.max(0,v),p-q),new mxPoint(0,p-q)],this.isRounded,h,!0,[4])};mxCellRenderer.registerShape("callout",fa);mxUtils.extend(ra,mxActor);ra.prototype.size=.2;ra.prototype.fixedSize=20;ra.prototype.isRoundable=function(){return!0};ra.prototype.redrawPath=function(c,h, q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(l-h,0),new mxPoint(l,p/2),new mxPoint(l-h,p),new mxPoint(0,p),new mxPoint(h,p/2)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("step", -sa);mxUtils.extend(K,mxHexagon);K.prototype.size=.25;K.prototype.fixedSize=20;K.prototype.isRoundable=function(){return!0};K.prototype.redrawPath=function(c,h,q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(h, +ra);mxUtils.extend(K,mxHexagon);K.prototype.size=.25;K.prototype.fixedSize=20;K.prototype.isRoundable=function(){return!0};K.prototype.redrawPath=function(c,h,q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(h, 0),new mxPoint(l-h,0),new mxPoint(l,.5*p),new mxPoint(l-h,p),new mxPoint(h,p),new mxPoint(0,.5*p)],this.isRounded,q,!0)};mxCellRenderer.registerShape("hexagon",K);mxUtils.extend(V,mxRectangleShape);V.prototype.isHtmlAllowed=function(){return!1};V.prototype.paintForeground=function(c,h,q,l,p){var v=Math.min(l/5,p/5)+1;c.begin();c.moveTo(h+l/2,q+v);c.lineTo(h+l/2,q+p-v);c.moveTo(h+v,q+p/2);c.lineTo(h+l-v,q+p/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus", V);var $a=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var h=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+h,c.y+h,c.width-2*h,c.height-2*h)}return c};mxRhombus.prototype.paintVertexShape=function(c,h,q,l,p){$a.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var v=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]|| -0);h+=v;q+=v;l-=2*v;p-=2*v;0<l&&0<p&&(c.setShadow(!1),$a.apply(this,[c,h,q,l,p]))}};mxUtils.extend(G,mxRectangleShape);G.prototype.isHtmlAllowed=function(){return!1};G.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var h=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+h,c.y+h,c.width-2*h,c.height-2*h)}return c};G.prototype.paintForeground=function(c,h,q,l,p){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var v= -Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);h+=v;q+=v;l-=2*v;p-=2*v;0<l&&0<p&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);v=0;do{var w=mxCellRenderer.defaultShapes[this.style["symbol"+v]];if(null!=w){var I=this.style["symbol"+v+"Align"],y=this.style["symbol"+v+"VerticalAlign"],Z=this.style["symbol"+v+"Width"],N=this.style["symbol"+v+"Height"],Ba=this.style["symbol"+v+"Spacing"]||0,Qa=this.style["symbol"+v+"VSpacing"]||Ba, -Ja=this.style["symbol"+v+"ArcSpacing"];null!=Ja&&(Ja*=this.getArcSize(l+this.strokewidth,p+this.strokewidth),Ba+=Ja,Qa+=Ja);Ja=h;var ka=q;Ja=I==mxConstants.ALIGN_CENTER?Ja+(l-Z)/2:I==mxConstants.ALIGN_RIGHT?Ja+(l-Z-Ba):Ja+Ba;ka=y==mxConstants.ALIGN_MIDDLE?ka+(p-N)/2:y==mxConstants.ALIGN_BOTTOM?ka+(p-N-Qa):ka+Qa;c.save();I=new w;I.style=this.style;w.prototype.paintVertexShape.call(I,c,Ja,ka,Z,N);c.restore()}v++}while(null!=w)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext", -G);mxUtils.extend(M,mxCylinder);M.prototype.redrawPath=function(c,h,q,l,p,v){v?(c.moveTo(0,0),c.lineTo(l/2,p/2),c.lineTo(l,0),c.end()):(c.moveTo(0,0),c.lineTo(l,0),c.lineTo(l,p),c.lineTo(0,p),c.close())};mxCellRenderer.registerShape("message",M);mxUtils.extend(U,mxShape);U.prototype.paintBackground=function(c,h,q,l,p){c.translate(h,q);c.ellipse(l/4,0,l/2,p/4);c.fillAndStroke();c.begin();c.moveTo(l/2,p/4);c.lineTo(l/2,2*p/3);c.moveTo(l/2,p/3);c.lineTo(0,p/3);c.moveTo(l/2,p/3);c.lineTo(l,p/3);c.moveTo(l/ -2,2*p/3);c.lineTo(0,p);c.moveTo(l/2,2*p/3);c.lineTo(l,p);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",U);mxUtils.extend(ba,mxShape);ba.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};ba.prototype.paintBackground=function(c,h,q,l,p){c.translate(h,q);c.begin();c.moveTo(0,p/4);c.lineTo(0,3*p/4);c.end();c.stroke();c.begin();c.moveTo(0,p/2);c.lineTo(l/6,p/2);c.end();c.stroke();c.ellipse(l/6,0,5*l/6,p);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary", -ba);mxUtils.extend(la,mxEllipse);la.prototype.paintVertexShape=function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(h+l/8,q+p);c.lineTo(h+7*l/8,q+p);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",la);mxUtils.extend(ra,mxShape);ra.prototype.paintVertexShape=function(c,h,q,l,p){c.translate(h,q);c.begin();c.moveTo(l,0);c.lineTo(0,p);c.moveTo(0,0);c.lineTo(l,p);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",ra);mxUtils.extend(Y, -mxShape);Y.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};Y.prototype.paintBackground=function(c,h,q,l,p){c.translate(h,q);c.begin();c.moveTo(3*l/8,p/8*1.1);c.lineTo(5*l/8,0);c.end();c.stroke();c.ellipse(0,p/8,l,7*p/8);c.fillAndStroke()};Y.prototype.paintForeground=function(c,h,q,l,p){c.begin();c.moveTo(3*l/8,p/8*1.1);c.lineTo(5*l/8,p/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",Y);mxUtils.extend(da,mxRectangleShape);da.prototype.size= +0);h+=v;q+=v;l-=2*v;p-=2*v;0<l&&0<p&&(c.setShadow(!1),$a.apply(this,[c,h,q,l,p]))}};mxUtils.extend(O,mxRectangleShape);O.prototype.isHtmlAllowed=function(){return!1};O.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var h=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+h,c.y+h,c.width-2*h,c.height-2*h)}return c};O.prototype.paintForeground=function(c,h,q,l,p){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var v= +Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);h+=v;q+=v;l-=2*v;p-=2*v;0<l&&0<p&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);v=0;do{var w=mxCellRenderer.defaultShapes[this.style["symbol"+v]];if(null!=w){var H=this.style["symbol"+v+"Align"],y=this.style["symbol"+v+"VerticalAlign"],Z=this.style["symbol"+v+"Width"],M=this.style["symbol"+v+"Height"],Ca=this.style["symbol"+v+"Spacing"]||0,Qa=this.style["symbol"+v+"VSpacing"]||Ca, +Ka=this.style["symbol"+v+"ArcSpacing"];null!=Ka&&(Ka*=this.getArcSize(l+this.strokewidth,p+this.strokewidth),Ca+=Ka,Qa+=Ka);Ka=h;var la=q;Ka=H==mxConstants.ALIGN_CENTER?Ka+(l-Z)/2:H==mxConstants.ALIGN_RIGHT?Ka+(l-Z-Ca):Ka+Ca;la=y==mxConstants.ALIGN_MIDDLE?la+(p-M)/2:y==mxConstants.ALIGN_BOTTOM?la+(p-M-Qa):la+Qa;c.save();H=new w;H.style=this.style;w.prototype.paintVertexShape.call(H,c,Ka,la,Z,M);c.restore()}v++}while(null!=w)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext", +O);mxUtils.extend(T,mxCylinder);T.prototype.redrawPath=function(c,h,q,l,p,v){v?(c.moveTo(0,0),c.lineTo(l/2,p/2),c.lineTo(l,0),c.end()):(c.moveTo(0,0),c.lineTo(l,0),c.lineTo(l,p),c.lineTo(0,p),c.close())};mxCellRenderer.registerShape("message",T);mxUtils.extend(J,mxShape);J.prototype.paintBackground=function(c,h,q,l,p){c.translate(h,q);c.ellipse(l/4,0,l/2,p/4);c.fillAndStroke();c.begin();c.moveTo(l/2,p/4);c.lineTo(l/2,2*p/3);c.moveTo(l/2,p/3);c.lineTo(0,p/3);c.moveTo(l/2,p/3);c.lineTo(l,p/3);c.moveTo(l/ +2,2*p/3);c.lineTo(0,p);c.moveTo(l/2,2*p/3);c.lineTo(l,p);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",J);mxUtils.extend(ba,mxShape);ba.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};ba.prototype.paintBackground=function(c,h,q,l,p){c.translate(h,q);c.begin();c.moveTo(0,p/4);c.lineTo(0,3*p/4);c.end();c.stroke();c.begin();c.moveTo(0,p/2);c.lineTo(l/6,p/2);c.end();c.stroke();c.ellipse(l/6,0,5*l/6,p);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary", +ba);mxUtils.extend(ha,mxEllipse);ha.prototype.paintVertexShape=function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(h+l/8,q+p);c.lineTo(h+7*l/8,q+p);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",ha);mxUtils.extend(na,mxShape);na.prototype.paintVertexShape=function(c,h,q,l,p){c.translate(h,q);c.begin();c.moveTo(l,0);c.lineTo(0,p);c.moveTo(0,0);c.lineTo(l,p);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",na);mxUtils.extend(W, +mxShape);W.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};W.prototype.paintBackground=function(c,h,q,l,p){c.translate(h,q);c.begin();c.moveTo(3*l/8,p/8*1.1);c.lineTo(5*l/8,0);c.end();c.stroke();c.ellipse(0,p/8,l,7*p/8);c.fillAndStroke()};W.prototype.paintForeground=function(c,h,q,l,p){c.begin();c.moveTo(3*l/8,p/8*1.1);c.lineTo(5*l/8,p/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",W);mxUtils.extend(da,mxRectangleShape);da.prototype.size= 40;da.prototype.isHtmlAllowed=function(){return!1};da.prototype.getLabelBounds=function(c){var h=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,h)};da.prototype.paintBackground=function(c,h,q,l,p){var v=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),w=mxUtils.getValue(this.style,"participant");null==w||null==this.state?mxRectangleShape.prototype.paintBackground.call(this, c,h,q,l,v):(w=this.state.view.graph.cellRenderer.getShape(w),null!=w&&w!=da&&(w=new w,w.apply(this.state),c.save(),w.paintVertexShape(c,h,q,l,v),c.restore()));v<p&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(h+l/2,q+v),c.lineTo(h+l/2,q+p),c.end(),c.stroke())};da.prototype.paintForeground=function(c,h,q,l,p){var v=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,h,q,l, -Math.min(p,v))};mxCellRenderer.registerShape("umlLifeline",da);mxUtils.extend(pa,mxShape);pa.prototype.width=60;pa.prototype.height=30;pa.prototype.corner=10;pa.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};pa.prototype.paintBackground=function(c,h,q,l,p){var v=this.corner,w=Math.min(l,Math.max(v,parseFloat(mxUtils.getValue(this.style, -"width",this.width)))),I=Math.min(p,Math.max(1.5*v,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),y=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);y!=mxConstants.NONE&&(c.setFillColor(y),c.rect(h,q,l,p),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,h,q,l,p),c.setGradient(this.fill,this.gradient,h,q,l,p,this.gradientDirection)):c.setFillColor(this.fill);c.begin(); -c.moveTo(h,q);c.lineTo(h+w,q);c.lineTo(h+w,q+Math.max(0,I-1.5*v));c.lineTo(h+Math.max(0,w-v),q+I);c.lineTo(h,q+I);c.close();c.fillAndStroke();c.begin();c.moveTo(h+w,q);c.lineTo(h+l,q);c.lineTo(h+l,q+p);c.lineTo(h,q+p);c.lineTo(h,q+I);c.stroke()};mxCellRenderer.registerShape("umlFrame",pa);mxPerimeter.CenterPerimeter=function(c,h,q,l){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,h, +Math.min(p,v))};mxCellRenderer.registerShape("umlLifeline",da);mxUtils.extend(sa,mxShape);sa.prototype.width=60;sa.prototype.height=30;sa.prototype.corner=10;sa.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};sa.prototype.paintBackground=function(c,h,q,l,p){var v=this.corner,w=Math.min(l,Math.max(v,parseFloat(mxUtils.getValue(this.style, +"width",this.width)))),H=Math.min(p,Math.max(1.5*v,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),y=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);y!=mxConstants.NONE&&(c.setFillColor(y),c.rect(h,q,l,p),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,h,q,l,p),c.setGradient(this.fill,this.gradient,h,q,l,p,this.gradientDirection)):c.setFillColor(this.fill);c.begin(); +c.moveTo(h,q);c.lineTo(h+w,q);c.lineTo(h+w,q+Math.max(0,H-1.5*v));c.lineTo(h+Math.max(0,w-v),q+H);c.lineTo(h,q+H);c.close();c.fillAndStroke();c.begin();c.moveTo(h+w,q);c.lineTo(h+l,q);c.lineTo(h+l,q+p);c.lineTo(h,q+p);c.lineTo(h,q+H);c.stroke()};mxCellRenderer.registerShape("umlFrame",sa);mxPerimeter.CenterPerimeter=function(c,h,q,l){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,h, q,l){l=da.prototype.size;null!=h&&(l=mxUtils.getValue(h.style,"size",l)*h.view.scale);h=parseFloat(h.style[mxConstants.STYLE_STROKEWIDTH]||1)*h.view.scale/2-1;q.x<c.getCenterX()&&(h=-1*(h+1));return new mxPoint(c.getCenterX()+h,Math.min(c.y+c.height,Math.max(c.y+l,q.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,h,q,l){l=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter", mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(c,h,q,l){l=parseFloat(h.style[mxConstants.STYLE_STROKEWIDTH]||1)*h.view.scale/2-1;null!=h.style.backboneSize&&(l+=parseFloat(h.style.backboneSize)*h.view.scale/2-1);if("south"==h.style[mxConstants.STYLE_DIRECTION]||"north"==h.style[mxConstants.STYLE_DIRECTION])return q.x<c.getCenterX()&&(l=-1*(l+1)),new mxPoint(c.getCenterX()+l,Math.min(c.y+c.height,Math.max(c.y,q.y)));q.y<c.getCenterY()&&(l=-1*(l+1));return new mxPoint(Math.min(c.x+ c.width,Math.max(c.x,q.x)),c.getCenterY()+l)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,h,q,l){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(h.style,"size",fa.prototype.size))*h.view.scale))),h.style),h,q,l)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c, -h,q,l){var p="0"!=mxUtils.getValue(h.style,"fixedSize","0"),v=p?T.prototype.fixedSize:T.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=c.x,I=c.y,y=c.width,Z=c.height;h=null!=h?mxUtils.getValue(h.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;h==mxConstants.DIRECTION_NORTH||h==mxConstants.DIRECTION_SOUTH?(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),I=[new mxPoint(w,I),new mxPoint(w+y,I+p),new mxPoint(w+ -y,I+Z),new mxPoint(w,I+Z-p),new mxPoint(w,I)]):(p=p?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),I=[new mxPoint(w+p,I),new mxPoint(w+y,I),new mxPoint(w+y-p,I+Z),new mxPoint(w,I+Z),new mxPoint(w+p,I)]);Z=c.getCenterX();c=c.getCenterY();c=new mxPoint(Z,c);l&&(q.x<w||q.x>w+y?c.y=q.y:c.x=q.x);return mxUtils.getPerimeterPoint(I,c,q)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,h,q,l){var p="0"!=mxUtils.getValue(h.style, -"fixedSize","0"),v=p?Q.prototype.fixedSize:Q.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=c.x,I=c.y,y=c.width,Z=c.height;h=null!=h?mxUtils.getValue(h.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;h==mxConstants.DIRECTION_EAST?(p=p?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),I=[new mxPoint(w+p,I),new mxPoint(w+y-p,I),new mxPoint(w+y,I+Z),new mxPoint(w,I+Z),new mxPoint(w+p,I)]):h==mxConstants.DIRECTION_WEST? -(p=p?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),I=[new mxPoint(w,I),new mxPoint(w+y,I),new mxPoint(w+y-p,I+Z),new mxPoint(w+p,I+Z),new mxPoint(w,I)]):h==mxConstants.DIRECTION_NORTH?(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),I=[new mxPoint(w,I+p),new mxPoint(w+y,I),new mxPoint(w+y,I+Z),new mxPoint(w,I+Z-p),new mxPoint(w,I+p)]):(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),I=[new mxPoint(w,I),new mxPoint(w+y,I+p),new mxPoint(w+y,I+Z-p),new mxPoint(w,I+Z),new mxPoint(w, -I)]);Z=c.getCenterX();c=c.getCenterY();c=new mxPoint(Z,c);l&&(q.x<w||q.x>w+y?c.y=q.y:c.x=q.x);return mxUtils.getPerimeterPoint(I,c,q)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,h,q,l){var p="0"!=mxUtils.getValue(h.style,"fixedSize","0"),v=p?sa.prototype.fixedSize:sa.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=c.x,I=c.y,y=c.width,Z=c.height,N=c.getCenterX();c=c.getCenterY();h=null!= -h?mxUtils.getValue(h.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;h==mxConstants.DIRECTION_EAST?(p=p?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),I=[new mxPoint(w,I),new mxPoint(w+y-p,I),new mxPoint(w+y,c),new mxPoint(w+y-p,I+Z),new mxPoint(w,I+Z),new mxPoint(w+p,c),new mxPoint(w,I)]):h==mxConstants.DIRECTION_WEST?(p=p?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),I=[new mxPoint(w+p,I),new mxPoint(w+y,I),new mxPoint(w+y-p,c),new mxPoint(w+ -y,I+Z),new mxPoint(w+p,I+Z),new mxPoint(w,c),new mxPoint(w+p,I)]):h==mxConstants.DIRECTION_NORTH?(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),I=[new mxPoint(w,I+p),new mxPoint(N,I),new mxPoint(w+y,I+p),new mxPoint(w+y,I+Z),new mxPoint(N,I+Z-p),new mxPoint(w,I+Z),new mxPoint(w,I+p)]):(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),I=[new mxPoint(w,I),new mxPoint(N,I+p),new mxPoint(w+y,I),new mxPoint(w+y,I+Z-p),new mxPoint(N,I+Z),new mxPoint(w,I+Z-p),new mxPoint(w,I)]);N=new mxPoint(N, -c);l&&(q.x<w||q.x>w+y?N.y=q.y:N.x=q.x);return mxUtils.getPerimeterPoint(I,N,q)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,h,q,l){var p="0"!=mxUtils.getValue(h.style,"fixedSize","0"),v=p?K.prototype.fixedSize:K.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=c.x,I=c.y,y=c.width,Z=c.height,N=c.getCenterX();c=c.getCenterY();h=null!=h?mxUtils.getValue(h.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST): -mxConstants.DIRECTION_EAST;h==mxConstants.DIRECTION_NORTH||h==mxConstants.DIRECTION_SOUTH?(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),I=[new mxPoint(N,I),new mxPoint(w+y,I+p),new mxPoint(w+y,I+Z-p),new mxPoint(N,I+Z),new mxPoint(w,I+Z-p),new mxPoint(w,I+p),new mxPoint(N,I)]):(p=p?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),I=[new mxPoint(w+p,I),new mxPoint(w+y-p,I),new mxPoint(w+y,c),new mxPoint(w+y-p,I+Z),new mxPoint(w+p,I+Z),new mxPoint(w,c),new mxPoint(w+p,I)]);N=new mxPoint(N, -c);l&&(q.x<w||q.x>w+y?N.y=q.y:N.x=q.x);return mxUtils.getPerimeterPoint(I,N,q)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(wa,mxShape);wa.prototype.size=10;wa.prototype.paintBackground=function(c,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size));c.translate(h,q);c.ellipse((l-v)/2,0,v,v);c.fillAndStroke();c.begin();c.moveTo(l/2,v);c.lineTo(l/2,p);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",wa);mxUtils.extend(Ka, -mxShape);Ka.prototype.size=10;Ka.prototype.inset=2;Ka.prototype.paintBackground=function(c,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size)),w=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(h,q);c.begin();c.moveTo(l/2,v+w);c.lineTo(l/2,p);c.end();c.stroke();c.begin();c.moveTo((l-v)/2-w,v/2);c.quadTo((l-v)/2-w,v+w,l/2,v+w);c.quadTo((l+v)/2+w,v+w,(l+v)/2+w,v/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",Ka);mxUtils.extend(Ha, +h,q,l){var p="0"!=mxUtils.getValue(h.style,"fixedSize","0"),v=p?S.prototype.fixedSize:S.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=c.x,H=c.y,y=c.width,Z=c.height;h=null!=h?mxUtils.getValue(h.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;h==mxConstants.DIRECTION_NORTH||h==mxConstants.DIRECTION_SOUTH?(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H),new mxPoint(w+y,H+p),new mxPoint(w+ +y,H+Z),new mxPoint(w,H+Z-p),new mxPoint(w,H)]):(p=p?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w+p,H),new mxPoint(w+y,H),new mxPoint(w+y-p,H+Z),new mxPoint(w,H+Z),new mxPoint(w+p,H)]);Z=c.getCenterX();c=c.getCenterY();c=new mxPoint(Z,c);l&&(q.x<w||q.x>w+y?c.y=q.y:c.x=q.x);return mxUtils.getPerimeterPoint(H,c,q)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,h,q,l){var p="0"!=mxUtils.getValue(h.style, +"fixedSize","0"),v=p?Q.prototype.fixedSize:Q.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=c.x,H=c.y,y=c.width,Z=c.height;h=null!=h?mxUtils.getValue(h.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;h==mxConstants.DIRECTION_EAST?(p=p?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w+p,H),new mxPoint(w+y-p,H),new mxPoint(w+y,H+Z),new mxPoint(w,H+Z),new mxPoint(w+p,H)]):h==mxConstants.DIRECTION_WEST? +(p=p?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H),new mxPoint(w+y,H),new mxPoint(w+y-p,H+Z),new mxPoint(w+p,H+Z),new mxPoint(w,H)]):h==mxConstants.DIRECTION_NORTH?(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H+p),new mxPoint(w+y,H),new mxPoint(w+y,H+Z),new mxPoint(w,H+Z-p),new mxPoint(w,H+p)]):(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H),new mxPoint(w+y,H+p),new mxPoint(w+y,H+Z-p),new mxPoint(w,H+Z),new mxPoint(w, +H)]);Z=c.getCenterX();c=c.getCenterY();c=new mxPoint(Z,c);l&&(q.x<w||q.x>w+y?c.y=q.y:c.x=q.x);return mxUtils.getPerimeterPoint(H,c,q)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,h,q,l){var p="0"!=mxUtils.getValue(h.style,"fixedSize","0"),v=p?ra.prototype.fixedSize:ra.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=c.x,H=c.y,y=c.width,Z=c.height,M=c.getCenterX();c=c.getCenterY();h=null!= +h?mxUtils.getValue(h.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;h==mxConstants.DIRECTION_EAST?(p=p?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H),new mxPoint(w+y-p,H),new mxPoint(w+y,c),new mxPoint(w+y-p,H+Z),new mxPoint(w,H+Z),new mxPoint(w+p,c),new mxPoint(w,H)]):h==mxConstants.DIRECTION_WEST?(p=p?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w+p,H),new mxPoint(w+y,H),new mxPoint(w+y-p,c),new mxPoint(w+ +y,H+Z),new mxPoint(w+p,H+Z),new mxPoint(w,c),new mxPoint(w+p,H)]):h==mxConstants.DIRECTION_NORTH?(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H+p),new mxPoint(M,H),new mxPoint(w+y,H+p),new mxPoint(w+y,H+Z),new mxPoint(M,H+Z-p),new mxPoint(w,H+Z),new mxPoint(w,H+p)]):(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H),new mxPoint(M,H+p),new mxPoint(w+y,H),new mxPoint(w+y,H+Z-p),new mxPoint(M,H+Z),new mxPoint(w,H+Z-p),new mxPoint(w,H)]);M=new mxPoint(M, +c);l&&(q.x<w||q.x>w+y?M.y=q.y:M.x=q.x);return mxUtils.getPerimeterPoint(H,M,q)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,h,q,l){var p="0"!=mxUtils.getValue(h.style,"fixedSize","0"),v=p?K.prototype.fixedSize:K.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=c.x,H=c.y,y=c.width,Z=c.height,M=c.getCenterX();c=c.getCenterY();h=null!=h?mxUtils.getValue(h.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST): +mxConstants.DIRECTION_EAST;h==mxConstants.DIRECTION_NORTH||h==mxConstants.DIRECTION_SOUTH?(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),H=[new mxPoint(M,H),new mxPoint(w+y,H+p),new mxPoint(w+y,H+Z-p),new mxPoint(M,H+Z),new mxPoint(w,H+Z-p),new mxPoint(w,H+p),new mxPoint(M,H)]):(p=p?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w+p,H),new mxPoint(w+y-p,H),new mxPoint(w+y,c),new mxPoint(w+y-p,H+Z),new mxPoint(w+p,H+Z),new mxPoint(w,c),new mxPoint(w+p,H)]);M=new mxPoint(M, +c);l&&(q.x<w||q.x>w+y?M.y=q.y:M.x=q.x);return mxUtils.getPerimeterPoint(H,M,q)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ta,mxShape);ta.prototype.size=10;ta.prototype.paintBackground=function(c,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size));c.translate(h,q);c.ellipse((l-v)/2,0,v,v);c.fillAndStroke();c.begin();c.moveTo(l/2,v);c.lineTo(l/2,p);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",ta);mxUtils.extend(Ja, +mxShape);Ja.prototype.size=10;Ja.prototype.inset=2;Ja.prototype.paintBackground=function(c,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size)),w=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(h,q);c.begin();c.moveTo(l/2,v+w);c.lineTo(l/2,p);c.end();c.stroke();c.begin();c.moveTo((l-v)/2-w,v/2);c.quadTo((l-v)/2-w,v+w,l/2,v+w);c.quadTo((l+v)/2+w,v+w,(l+v)/2+w,v/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",Ja);mxUtils.extend(Ha, mxShape);Ha.prototype.paintBackground=function(c,h,q,l,p){c.translate(h,q);c.begin();c.moveTo(0,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,0,p);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",Ha);mxUtils.extend(ua,mxShape);ua.prototype.inset=2;ua.prototype.paintBackground=function(c,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(h,q);c.ellipse(0,v,l-2*v,p-2*v);c.fillAndStroke();c.begin();c.moveTo(l/2,0);c.quadTo(l,0,l,p/2);c.quadTo(l, -p,l/2,p);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",ua);mxUtils.extend(Ca,mxCylinder);Ca.prototype.jettyWidth=20;Ca.prototype.jettyHeight=10;Ca.prototype.redrawPath=function(c,h,q,l,p,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));h=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));q=w/2;w=q+w/2;var I=Math.min(h,p-h),y=Math.min(I+2*h,p-h);v?(c.moveTo(q,I),c.lineTo(w,I),c.lineTo(w,I+h),c.lineTo(q,I+h),c.moveTo(q, -y),c.lineTo(w,y),c.lineTo(w,y+h),c.lineTo(q,y+h)):(c.moveTo(q,0),c.lineTo(l,0),c.lineTo(l,p),c.lineTo(q,p),c.lineTo(q,y+h),c.lineTo(0,y+h),c.lineTo(0,y),c.lineTo(q,y),c.lineTo(q,I+h),c.lineTo(0,I+h),c.lineTo(0,I),c.lineTo(q,I),c.close());c.end()};mxCellRenderer.registerShape("module",Ca);mxUtils.extend(qa,mxCylinder);qa.prototype.jettyWidth=32;qa.prototype.jettyHeight=12;qa.prototype.redrawPath=function(c,h,q,l,p,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));h=parseFloat(mxUtils.getValue(this.style, -"jettyHeight",this.jettyHeight));q=w/2;w=q+w/2;var I=.3*p-h/2,y=.7*p-h/2;v?(c.moveTo(q,I),c.lineTo(w,I),c.lineTo(w,I+h),c.lineTo(q,I+h),c.moveTo(q,y),c.lineTo(w,y),c.lineTo(w,y+h),c.lineTo(q,y+h)):(c.moveTo(q,0),c.lineTo(l,0),c.lineTo(l,p),c.lineTo(q,p),c.lineTo(q,y+h),c.lineTo(0,y+h),c.lineTo(0,y),c.lineTo(q,y),c.lineTo(q,I+h),c.lineTo(0,I+h),c.lineTo(0,I),c.lineTo(q,I),c.close());c.end()};mxCellRenderer.registerShape("component",qa);mxUtils.extend(Da,mxRectangleShape);Da.prototype.paintForeground= -function(c,h,q,l,p){var v=l/2,w=p/2,I=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(h+v,q),new mxPoint(h+l,q+w),new mxPoint(h+v,q+p),new mxPoint(h,q+w)],this.isRounded,I,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Da);mxUtils.extend(Ua,mxDoubleEllipse);Ua.prototype.outerStroke=!0;Ua.prototype.paintVertexShape=function(c,h,q,l,p){var v=Math.min(4, +p,l/2,p);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",ua);mxUtils.extend(Aa,mxCylinder);Aa.prototype.jettyWidth=20;Aa.prototype.jettyHeight=10;Aa.prototype.redrawPath=function(c,h,q,l,p,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));h=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));q=w/2;w=q+w/2;var H=Math.min(h,p-h),y=Math.min(H+2*h,p-h);v?(c.moveTo(q,H),c.lineTo(w,H),c.lineTo(w,H+h),c.lineTo(q,H+h),c.moveTo(q, +y),c.lineTo(w,y),c.lineTo(w,y+h),c.lineTo(q,y+h)):(c.moveTo(q,0),c.lineTo(l,0),c.lineTo(l,p),c.lineTo(q,p),c.lineTo(q,y+h),c.lineTo(0,y+h),c.lineTo(0,y),c.lineTo(q,y),c.lineTo(q,H+h),c.lineTo(0,H+h),c.lineTo(0,H),c.lineTo(q,H),c.close());c.end()};mxCellRenderer.registerShape("module",Aa);mxUtils.extend(qa,mxCylinder);qa.prototype.jettyWidth=32;qa.prototype.jettyHeight=12;qa.prototype.redrawPath=function(c,h,q,l,p,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));h=parseFloat(mxUtils.getValue(this.style, +"jettyHeight",this.jettyHeight));q=w/2;w=q+w/2;var H=.3*p-h/2,y=.7*p-h/2;v?(c.moveTo(q,H),c.lineTo(w,H),c.lineTo(w,H+h),c.lineTo(q,H+h),c.moveTo(q,y),c.lineTo(w,y),c.lineTo(w,y+h),c.lineTo(q,y+h)):(c.moveTo(q,0),c.lineTo(l,0),c.lineTo(l,p),c.lineTo(q,p),c.lineTo(q,y+h),c.lineTo(0,y+h),c.lineTo(0,y),c.lineTo(q,y),c.lineTo(q,H+h),c.lineTo(0,H+h),c.lineTo(0,H),c.lineTo(q,H),c.close());c.end()};mxCellRenderer.registerShape("component",qa);mxUtils.extend(Da,mxRectangleShape);Da.prototype.paintForeground= +function(c,h,q,l,p){var v=l/2,w=p/2,H=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(h+v,q),new mxPoint(h+l,q+w),new mxPoint(h+v,q+p),new mxPoint(h,q+w)],this.isRounded,H,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Da);mxUtils.extend(Ua,mxDoubleEllipse);Ua.prototype.outerStroke=!0;Ua.prototype.paintVertexShape=function(c,h,q,l,p){var v=Math.min(4, Math.min(l/5,p/5));0<l&&0<p&&(c.ellipse(h+v,q+v,l-2*v,p-2*v),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(h,q,l,p),c.stroke())};mxCellRenderer.registerShape("endState",Ua);mxUtils.extend(db,Ua);db.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",db);mxUtils.extend(Ta,mxArrowConnector);Ta.prototype.defaultWidth=4;Ta.prototype.isOpenEnded=function(){return!0};Ta.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0, this.strokewidth-1)};Ta.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",Ta);mxUtils.extend(ab,mxArrowConnector);ab.prototype.defaultWidth=10;ab.prototype.defaultArrowWidth=20;ab.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};ab.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};ab.prototype.getEdgeWidth= function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",ab);mxUtils.extend(Ya,mxActor);Ya.prototype.size=30;Ya.prototype.isRoundable=function(){return!0};Ya.prototype.redrawPath=function(c,h,q,l,p){h=Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,p),new mxPoint(0,h),new mxPoint(l, @@ -3315,15 +3313,15 @@ mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPo this.arrowWidth))));h=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));q=(p-v)/2;v=q+v;var w=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,q),new mxPoint(l-h,q),new mxPoint(l-h,0),new mxPoint(l,p/2),new mxPoint(l-h,p),new mxPoint(l-h,v),new mxPoint(0,v)],this.isRounded,w,!0);c.end()};mxCellRenderer.registerShape("singleArrow",ca);mxUtils.extend(t,mxActor);t.prototype.redrawPath=function(c, h,q,l,p){var v=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",ca.prototype.arrowWidth))));h=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ca.prototype.arrowSize))));q=(p-v)/2;v=q+v;var w=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,p/2),new mxPoint(h,0),new mxPoint(h,q),new mxPoint(l-h,q),new mxPoint(l-h,0),new mxPoint(l,p/2),new mxPoint(l-h,p),new mxPoint(l-h,v),new mxPoint(h, v),new mxPoint(h,p)],this.isRounded,w,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",t);mxUtils.extend(z,mxActor);z.prototype.size=.1;z.prototype.fixedSize=20;z.prototype.redrawPath=function(c,h,q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(h,0);c.lineTo(l,0);c.quadTo(l-2*h,p/2,l,p);c.lineTo(h,p);c.quadTo(h- -2*h,p/2,h,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",z);mxUtils.extend(A,mxActor);A.prototype.redrawPath=function(c,h,q,l,p){c.moveTo(0,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,0,p);c.close();c.end()};mxCellRenderer.registerShape("or",A);mxUtils.extend(E,mxActor);E.prototype.redrawPath=function(c,h,q,l,p){c.moveTo(0,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,0,p);c.quadTo(l/2,p/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",E);mxUtils.extend(H,mxActor);H.prototype.size=20; -H.prototype.isRoundable=function(){return!0};H.prototype.redrawPath=function(c,h,q,l,p){h=Math.min(l/2,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(h,0),new mxPoint(l-h,0),new mxPoint(l,.8*h),new mxPoint(l,p),new mxPoint(0,p),new mxPoint(0,.8*h)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("loopLimit",H);mxUtils.extend(L,mxActor);L.prototype.size= -.375;L.prototype.isRoundable=function(){return!0};L.prototype.redrawPath=function(c,h,q,l,p){h=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(l,0),new mxPoint(l,p-h),new mxPoint(l/2,p),new mxPoint(0,p-h)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",L);mxUtils.extend(W,mxEllipse);W.prototype.paintVertexShape= -function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(h+l/2,q+p);c.lineTo(h+l,q+p);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",W);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(h,q+p/2);c.lineTo(h+l,q+p/2);c.end();c.stroke();c.begin();c.moveTo(h+l/2,q);c.lineTo(h+l/2,q+p);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse", -ia);mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(h+.145*l,q+.145*p);c.lineTo(h+.855*l,q+.855*p);c.end();c.stroke();c.begin();c.moveTo(h+.855*l,q+.145*p);c.lineTo(h+.145*l,q+.855*p);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",ea);mxUtils.extend(ja,mxRhombus);ja.prototype.paintVertexShape=function(c,h,q,l,p){mxRhombus.prototype.paintVertexShape.apply(this, -arguments);c.setShadow(!1);c.begin();c.moveTo(h,q+p/2);c.lineTo(h+l,q+p/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ja);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(c,h,q,l,p){c.begin();c.moveTo(h,q);c.lineTo(h+l,q);c.lineTo(h+l/2,q+p/2);c.close();c.fillAndStroke();c.begin();c.moveTo(h,q+p);c.lineTo(h+l,q+p);c.lineTo(h+l/2,q+p/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",ta);mxUtils.extend(Aa,mxEllipse);Aa.prototype.paintVertexShape= -function(c,h,q,l,p){var v=c.state.strokeWidth/2,w=10+2*v,I=q+p-w/2;c.begin();c.moveTo(h,q);c.lineTo(h,q+p);c.moveTo(h+v,I);c.lineTo(h+v+w,I-w/2);c.moveTo(h+v,I);c.lineTo(h+v+w,I+w/2);c.moveTo(h+v,I);c.lineTo(h+l-v,I);c.moveTo(h+l,q);c.lineTo(h+l,q+p);c.moveTo(h+l-v,I);c.lineTo(h+l-w-v,I-w/2);c.moveTo(h+l-v,I);c.lineTo(h+l-w-v,I+w/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Aa);mxUtils.extend(Ea,mxEllipse);Ea.prototype.drawHidden=!0;Ea.prototype.paintVertexShape=function(c,h,q, -l,p){this.outline||c.setStrokeColor(null);if(null!=this.style){var v=c.pointerEvents,w=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||w||(c.pointerEvents=!1);var I="1"==mxUtils.getValue(this.style,"top","1"),y="1"==mxUtils.getValue(this.style,"left","1"),Z="1"==mxUtils.getValue(this.style,"right","1"),N="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||w||this.outline||I||Z||N||y?(c.rect(h,q,l,p),c.fill(),c.pointerEvents= -v,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(h,q),this.outline||I?c.lineTo(h+l,q):c.moveTo(h+l,q),this.outline||Z?c.lineTo(h+l,q+p):c.moveTo(h+l,q+p),this.outline||N?c.lineTo(h,q+p):c.moveTo(h,q+p),(this.outline||y)&&c.lineTo(h,q),c.end(),c.stroke(),c.setLineCap("flat")):c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Ea);mxUtils.extend(Ma,mxEllipse);Ma.prototype.paintVertexShape=function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this, +2*h,p/2,h,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",z);mxUtils.extend(A,mxActor);A.prototype.redrawPath=function(c,h,q,l,p){c.moveTo(0,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,0,p);c.close();c.end()};mxCellRenderer.registerShape("or",A);mxUtils.extend(E,mxActor);E.prototype.redrawPath=function(c,h,q,l,p){c.moveTo(0,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,0,p);c.quadTo(l/2,p/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",E);mxUtils.extend(G,mxActor);G.prototype.size=20; +G.prototype.isRoundable=function(){return!0};G.prototype.redrawPath=function(c,h,q,l,p){h=Math.min(l/2,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(h,0),new mxPoint(l-h,0),new mxPoint(l,.8*h),new mxPoint(l,p),new mxPoint(0,p),new mxPoint(0,.8*h)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("loopLimit",G);mxUtils.extend(L,mxActor);L.prototype.size= +.375;L.prototype.isRoundable=function(){return!0};L.prototype.redrawPath=function(c,h,q,l,p){h=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(l,0),new mxPoint(l,p-h),new mxPoint(l/2,p),new mxPoint(0,p-h)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",L);mxUtils.extend(X,mxEllipse);X.prototype.paintVertexShape= +function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(h+l/2,q+p);c.lineTo(h+l,q+p);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",X);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(h,q+p/2);c.lineTo(h+l,q+p/2);c.end();c.stroke();c.begin();c.moveTo(h+l/2,q);c.lineTo(h+l/2,q+p);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse", +ia);mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(h+.145*l,q+.145*p);c.lineTo(h+.855*l,q+.855*p);c.end();c.stroke();c.begin();c.moveTo(h+.855*l,q+.145*p);c.lineTo(h+.145*l,q+.855*p);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",ea);mxUtils.extend(ka,mxRhombus);ka.prototype.paintVertexShape=function(c,h,q,l,p){mxRhombus.prototype.paintVertexShape.apply(this, +arguments);c.setShadow(!1);c.begin();c.moveTo(h,q+p/2);c.lineTo(h+l,q+p/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ka);mxUtils.extend(va,mxEllipse);va.prototype.paintVertexShape=function(c,h,q,l,p){c.begin();c.moveTo(h,q);c.lineTo(h+l,q);c.lineTo(h+l/2,q+p/2);c.close();c.fillAndStroke();c.begin();c.moveTo(h,q+p);c.lineTo(h+l,q+p);c.lineTo(h+l/2,q+p/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",va);mxUtils.extend(Ba,mxEllipse);Ba.prototype.paintVertexShape= +function(c,h,q,l,p){var v=c.state.strokeWidth/2,w=10+2*v,H=q+p-w/2;c.begin();c.moveTo(h,q);c.lineTo(h,q+p);c.moveTo(h+v,H);c.lineTo(h+v+w,H-w/2);c.moveTo(h+v,H);c.lineTo(h+v+w,H+w/2);c.moveTo(h+v,H);c.lineTo(h+l-v,H);c.moveTo(h+l,q);c.lineTo(h+l,q+p);c.moveTo(h+l-v,H);c.lineTo(h+l-w-v,H-w/2);c.moveTo(h+l-v,H);c.lineTo(h+l-w-v,H+w/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Ba);mxUtils.extend(Ea,mxEllipse);Ea.prototype.drawHidden=!0;Ea.prototype.paintVertexShape=function(c,h,q, +l,p){this.outline||c.setStrokeColor(null);if(null!=this.style){var v=c.pointerEvents,w=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||w||(c.pointerEvents=!1);var H="1"==mxUtils.getValue(this.style,"top","1"),y="1"==mxUtils.getValue(this.style,"left","1"),Z="1"==mxUtils.getValue(this.style,"right","1"),M="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||w||this.outline||H||Z||M||y?(c.rect(h,q,l,p),c.fill(),c.pointerEvents= +v,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(h,q),this.outline||H?c.lineTo(h+l,q):c.moveTo(h+l,q),this.outline||Z?c.lineTo(h+l,q+p):c.moveTo(h+l,q+p),this.outline||M?c.lineTo(h,q+p):c.moveTo(h,q+p),(this.outline||y)&&c.lineTo(h,q),c.end(),c.stroke(),c.setLineCap("flat")):c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Ea);mxUtils.extend(Ma,mxEllipse);Ma.prototype.paintVertexShape=function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this, arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(h+l/2,q),c.lineTo(h+l/2,q+p)):(c.moveTo(h,q+p/2),c.lineTo(h+l,q+p/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Ma);mxUtils.extend(La,mxActor);La.prototype.redrawPath=function(c,h,q,l,p){h=Math.min(l,p/2);c.moveTo(0,0);c.lineTo(l-h,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,l-h,p);c.lineTo(0,p);c.close();c.end()};mxCellRenderer.registerShape("delay",La);mxUtils.extend(Ia,mxActor);Ia.prototype.size= .2;Ia.prototype.redrawPath=function(c,h,q,l,p){h=Math.min(p,l);var v=Math.max(0,Math.min(h,h*parseFloat(mxUtils.getValue(this.style,"size",this.size))));h=(p-v)/2;q=h+v;var w=(l-v)/2;v=w+v;c.moveTo(0,h);c.lineTo(w,h);c.lineTo(w,0);c.lineTo(v,0);c.lineTo(v,h);c.lineTo(l,h);c.lineTo(l,q);c.lineTo(v,q);c.lineTo(v,p);c.lineTo(w,p);c.lineTo(w,q);c.lineTo(0,q);c.close();c.end()};mxCellRenderer.registerShape("cross",Ia);mxUtils.extend(Fa,mxActor);Fa.prototype.size=.25;Fa.prototype.redrawPath=function(c, h,q,l,p){h=Math.min(l,p/2);q=Math.min(l-h,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.moveTo(0,p/2);c.lineTo(q,0);c.lineTo(l-h,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,l-h,p);c.lineTo(q,p);c.close();c.end()};mxCellRenderer.registerShape("display",Fa);mxUtils.extend(Ga,mxActor);Ga.prototype.cst={RECT2:"mxgraph.basic.rect"};Ga.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded", @@ -3331,81 +3329,81 @@ dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Ro dispName:"Inside Fill Color",type:"color",defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line", type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"}, {val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default", -enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Ga.prototype.paintVertexShape=function(c,h,q,l,p){c.translate(h,q);this.strictDrawShape(c,0,0,l,p)};Ga.prototype.strictDrawShape=function(c,h,q,l,p,v){var w=v&&v.rectStyle?v.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),I=v&&v.absoluteCornerSize?v.absoluteCornerSize:mxUtils.getValue(this.style, -"absoluteCornerSize",this.absoluteCornerSize),y=v&&v.size?v.size:Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),Z=v&&v.rectOutline?v.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),N=v&&v.indent?v.indent:Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Ba=v&&v.dashed?v.dashed:mxUtils.getValue(this.style,"dashed",!1),Qa=v&&v.dashPattern?v.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),Ja=v&& -v.relIndent?v.relIndent:Math.max(0,Math.min(50,N)),ka=v&&v.top?v.top:mxUtils.getValue(this.style,"top",!0),oa=v&&v.right?v.right:mxUtils.getValue(this.style,"right",!0),na=v&&v.bottom?v.bottom:mxUtils.getValue(this.style,"bottom",!0),ma=v&&v.left?v.left:mxUtils.getValue(this.style,"left",!0),va=v&&v.topLeftStyle?v.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),xa=v&&v.topRightStyle?v.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),ya=v&&v.bottomRightStyle? +enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Ga.prototype.paintVertexShape=function(c,h,q,l,p){c.translate(h,q);this.strictDrawShape(c,0,0,l,p)};Ga.prototype.strictDrawShape=function(c,h,q,l,p,v){var w=v&&v.rectStyle?v.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),H=v&&v.absoluteCornerSize?v.absoluteCornerSize:mxUtils.getValue(this.style, +"absoluteCornerSize",this.absoluteCornerSize),y=v&&v.size?v.size:Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),Z=v&&v.rectOutline?v.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),M=v&&v.indent?v.indent:Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Ca=v&&v.dashed?v.dashed:mxUtils.getValue(this.style,"dashed",!1),Qa=v&&v.dashPattern?v.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),Ka=v&& +v.relIndent?v.relIndent:Math.max(0,Math.min(50,M)),la=v&&v.top?v.top:mxUtils.getValue(this.style,"top",!0),pa=v&&v.right?v.right:mxUtils.getValue(this.style,"right",!0),oa=v&&v.bottom?v.bottom:mxUtils.getValue(this.style,"bottom",!0),ma=v&&v.left?v.left:mxUtils.getValue(this.style,"left",!0),wa=v&&v.topLeftStyle?v.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),xa=v&&v.topRightStyle?v.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),ya=v&&v.bottomRightStyle? v.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),za=v&&v.bottomLeftStyle?v.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Ab=v&&v.fillColor?v.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");v&&v.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Bb=v&&v.strokeWidth?v.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),xb=v&&v.fillColor2?v.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),zb=v&&v.gradientColor2? -v.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Cb=v&&v.gradientDirection2?v.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Db=v&&v.opacity?v.opacity:mxUtils.getValue(this.style,"opacity","100"),Eb=Math.max(0,Math.min(50,y));v=Ga.prototype;c.setDashed(Ba);Qa&&""!=Qa&&c.setDashPattern(Qa);c.setStrokeWidth(Bb);y=Math.min(.5*p,.5*l,y);I||(y=Eb*Math.min(l,p)/100);y=Math.min(y,.5*Math.min(l,p));I||(N=Math.min(Ja*Math.min(l,p)/100));N=Math.min(N,.5*Math.min(l, -p)-y);(ka||oa||na||ma)&&"frame"!=Z&&(c.begin(),ka?v.moveNW(c,h,q,l,p,w,va,y,ma):c.moveTo(0,0),ka&&v.paintNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,oa),oa&&v.paintNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),na&&v.paintSE(c,h,q,l,p,w,ya,y,oa),v.paintBottom(c,h,q,l,p,w,za,y,ma),ma&&v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,ka),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(xb),Ba=I=Db,"none"==xb&&(I=0),"none"==zb&&(Ba=0),c.setGradient(xb,zb,0,0,l,p,Cb,I,Ba), -c.begin(),ka?v.moveNWInner(c,h,q,l,p,w,va,y,N,ka,ma):c.moveTo(N,0),v.paintLeftInner(c,h,q,l,p,w,za,y,N,na,ma),ma&&na&&v.paintSWInner(c,h,q,l,p,w,za,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,oa,na),na&&oa&&v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,ka,oa),oa&&ka&&v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,va,y,N,ma,ka),ka&&ma&&v.paintNWInner(c,h,q,l,p,w,va,y,N),c.fill(),"none"==Ab&&(c.begin(),v.paintFolds(c,h,q,l,p,w,va,xa,ya,za,y,ka,oa,na,ma),c.stroke())); -ka||oa||na||!ma?ka||oa||!na||ma?!ka&&!oa&&na&&ma?"frame"!=Z?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,oa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,ka),"double"==Z&&(v.moveNWInner(c,h,q,l,p,w,va,y,N,ka,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,N,na,ma),v.paintSWInner(c,h,q,l,p,w,za,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,oa,na)),c.stroke()):(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,oa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c, -h,q,l,p,w,va,y,ka),v.lineNWInner(c,h,q,l,p,w,va,y,N,ka,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,N,na,ma),v.paintSWInner(c,h,q,l,p,w,za,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,oa,na),c.close(),c.fillAndStroke()):ka||!oa||na||ma?!ka&&oa&&!na&&ma?"frame"!=Z?(c.begin(),v.moveSW(c,h,q,l,p,w,va,y,na),v.paintLeft(c,h,q,l,p,w,va,y,ka),"double"==Z&&(v.moveNWInner(c,h,q,l,p,w,va,y,N,ka,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,N,na,ma)),c.stroke(),c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l, -p,w,ya,y,na),"double"==Z&&(v.moveSEInner(c,h,q,l,p,w,ya,y,N,na),v.paintRightInner(c,h,q,l,p,w,xa,y,N,ka,oa)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,va,y,na),v.paintLeft(c,h,q,l,p,w,va,y,ka),v.lineNWInner(c,h,q,l,p,w,va,y,N,ka,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,N,na,ma),c.close(),c.fillAndStroke(),c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.lineSEInner(c,h,q,l,p,w,ya,y,N,na),v.paintRightInner(c,h,q,l,p,w,xa,y,N,ka,oa),c.close(),c.fillAndStroke()):!ka&&oa&&na&& -!ma?"frame"!=Z?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,oa),v.paintBottom(c,h,q,l,p,w,za,y,ma),"double"==Z&&(v.moveSWInner(c,h,q,l,p,w,za,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,oa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,ka,oa)),c.stroke()):(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,oa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.lineSWInner(c, -h,q,l,p,w,za,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,oa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,ka,oa),c.close(),c.fillAndStroke()):!ka&&oa&&na&&ma?"frame"!=Z?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,oa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,ka),"double"==Z&&(v.moveNWInner(c,h,q,l,p,w,va,y,N,ka,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,N,na,ma), -v.paintSWInner(c,h,q,l,p,w,za,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,oa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,ka,oa)),c.stroke()):(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,oa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,ka),v.lineNWInner(c,h,q,l,p,w,va,y,N,ka,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,N,na,ma),v.paintSWInner(c,h,q,l,p,w,za,y,N,na), -v.paintBottomInner(c,h,q,l,p,w,ya,y,N,oa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,ka,oa),c.close(),c.fillAndStroke()):!ka||oa||na||ma?ka&&!oa&&!na&&ma?"frame"!=Z?(c.begin(),v.moveSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,ka),v.paintNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,oa),"double"==Z&&(v.moveNEInner(c,h,q,l,p,w,xa,y,N,oa),v.paintTopInner(c,h,q,l,p,w,va,y,N,ma,ka),v.paintNWInner(c,h,q,l,p,w,va,y,N),v.paintLeftInner(c,h,q,l,p,w,za,y,N,na, -ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,ka),v.paintNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,oa),v.lineNEInner(c,h,q,l,p,w,xa,y,N,oa),v.paintTopInner(c,h,q,l,p,w,va,y,N,ma,ka),v.paintNWInner(c,h,q,l,p,w,va,y,N),v.paintLeftInner(c,h,q,l,p,w,za,y,N,na,ma),c.close(),c.fillAndStroke()):ka&&!oa&&na&&!ma?"frame"!=Z?(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,oa),"double"==Z&&(v.moveNEInner(c,h,q,l,p,w,xa,y,N,oa),v.paintTopInner(c, -h,q,l,p,w,va,y,N,ma,ka)),c.stroke(),c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,oa),v.paintBottom(c,h,q,l,p,w,za,y,ma),"double"==Z&&(v.moveSWInner(c,h,q,l,p,w,za,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,oa,na)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,oa),v.lineNEInner(c,h,q,l,p,w,xa,y,N,oa),v.paintTopInner(c,h,q,l,p,w,va,y,N,ma,ka),c.close(),c.fillAndStroke(),c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,oa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.lineSWInner(c,h,q,l,p,w, -za,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,oa,na),c.close(),c.fillAndStroke()):ka&&!oa&&na&&ma?"frame"!=Z?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,oa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,ka),v.paintNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,oa),"double"==Z&&(v.moveNEInner(c,h,q,l,p,w,xa,y,N,oa),v.paintTopInner(c,h,q,l,p,w,va,y,N,ma,ka),v.paintNWInner(c,h,q,l,p,w,va,y,N),v.paintLeftInner(c,h,q,l,p,w,za,y,N,na,ma),v.paintSWInner(c, -h,q,l,p,w,za,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,oa,na)),c.stroke()):(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,oa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,ka),v.paintNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,oa),v.lineNEInner(c,h,q,l,p,w,xa,y,N,oa),v.paintTopInner(c,h,q,l,p,w,va,y,N,ma,ka),v.paintNWInner(c,h,q,l,p,w,va,y,N),v.paintLeftInner(c,h,q,l,p,w,za,y,N,na,ma),v.paintSWInner(c,h,q,l,p,w,za,y,N,na),v.paintBottomInner(c,h,q, -l,p,w,ya,y,N,oa,na),c.close(),c.fillAndStroke()):ka&&oa&&!na&&!ma?"frame"!=Z?(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,oa),v.paintNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),"double"==Z&&(v.moveSEInner(c,h,q,l,p,w,ya,y,N,na),v.paintRightInner(c,h,q,l,p,w,xa,y,N,ka,oa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,va,y,N,ma,ka)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,oa),v.paintNE(c,h,q,l,p,w,xa,y,ka), -v.paintRight(c,h,q,l,p,w,ya,y,na),v.lineSEInner(c,h,q,l,p,w,ya,y,N,na),v.paintRightInner(c,h,q,l,p,w,xa,y,N,ka,oa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,va,y,N,ma,ka),c.close(),c.fillAndStroke()):ka&&oa&&!na&&ma?"frame"!=Z?(c.begin(),v.moveSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,ka),v.paintNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,oa),v.paintNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),"double"==Z&&(v.moveSEInner(c,h,q,l,p,w,ya,y,N,na), -v.paintRightInner(c,h,q,l,p,w,xa,y,N,ka,oa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,va,y,N,ma,ka),v.paintNWInner(c,h,q,l,p,w,va,y,N),v.paintLeftInner(c,h,q,l,p,w,za,y,N,na,ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,ka),v.paintNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,oa),v.paintNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.lineSEInner(c,h,q,l,p,w,ya,y,N,na),v.paintRightInner(c,h,q,l,p,w,xa,y,N,ka,oa),v.paintNEInner(c, -h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,va,y,N,ma,ka),v.paintNWInner(c,h,q,l,p,w,va,y,N),v.paintLeftInner(c,h,q,l,p,w,za,y,N,na,ma),c.close(),c.fillAndStroke()):ka&&oa&&na&&!ma?"frame"!=Z?(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,oa),v.paintNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,oa),v.paintBottom(c,h,q,l,p,w,za,y,ma),"double"==Z&&(v.moveSWInner(c,h,q,l,p,w,za,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,oa,na),v.paintSEInner(c, -h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,ka,oa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,va,y,N,ma,ka)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,oa),v.paintNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,oa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.lineSWInner(c,h,q,l,p,w,za,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,oa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p, -w,xa,y,N,ka,oa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,va,y,N,ma,ka),c.close(),c.fillAndStroke()):ka&&oa&&na&&ma&&("frame"!=Z?(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,oa),v.paintNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,oa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,ka),c.close(),"double"==Z&&(v.moveSWInner(c,h,q,l,p,w,za, -y,N,ma),v.paintSWInner(c,h,q,l,p,w,za,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,oa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,ka,oa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,va,y,N,ma,ka),v.paintNWInner(c,h,q,l,p,w,va,y,N),v.paintLeftInner(c,h,q,l,p,w,za,y,N,na,ma),c.close()),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,oa),v.paintNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q, -l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,oa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,ka),c.close(),v.moveSWInner(c,h,q,l,p,w,za,y,N,ma),v.paintSWInner(c,h,q,l,p,w,za,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,oa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,ka,oa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,va,y,N,ma,ka),v.paintNWInner(c,h,q,l,p,w,va,y,N),v.paintLeftInner(c,h,q,l,p,w,za,y,N, -na,ma),c.close(),c.fillAndStroke())):"frame"!=Z?(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,oa),"double"==Z&&(v.moveNEInner(c,h,q,l,p,w,xa,y,N,oa),v.paintTopInner(c,h,q,l,p,w,va,y,N,ma,ka)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,oa),v.lineNEInner(c,h,q,l,p,w,xa,y,N,oa),v.paintTopInner(c,h,q,l,p,w,va,y,N,ma,ka),c.close(),c.fillAndStroke()):"frame"!=Z?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),"double"== -Z&&(v.moveSEInner(c,h,q,l,p,w,ya,y,N,na),v.paintRightInner(c,h,q,l,p,w,xa,y,N,ka,oa)),c.stroke()):(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.lineSEInner(c,h,q,l,p,w,ya,y,N,na),v.paintRightInner(c,h,q,l,p,w,xa,y,N,ka,oa),c.close(),c.fillAndStroke()):"frame"!=Z?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,oa),v.paintBottom(c,h,q,l,p,w,za,y,ma),"double"==Z&&(v.moveSWInner(c,h,q,l,p,w,za,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,oa,na)),c.stroke()):(c.begin(),v.moveSE(c, -h,q,l,p,w,ya,y,oa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.lineSWInner(c,h,q,l,p,w,za,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,oa,na),c.close(),c.fillAndStroke()):"frame"!=Z?(c.begin(),v.moveSW(c,h,q,l,p,w,va,y,na),v.paintLeft(c,h,q,l,p,w,va,y,ka),"double"==Z&&(v.moveNWInner(c,h,q,l,p,w,va,y,N,ka,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,N,na,ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,va,y,na),v.paintLeft(c,h,q,l,p,w,va,y,ka),v.lineNWInner(c,h,q,l,p,w,va,y,N,ka,ma),v.paintLeftInner(c,h,q,l,p, -w,za,y,N,na,ma),c.close(),c.fillAndStroke());c.begin();v.paintFolds(c,h,q,l,p,w,va,xa,ya,za,y,ka,oa,na,ma);c.stroke()};Ga.prototype.moveNW=function(c,h,q,l,p,v,w,I,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(0,0):c.moveTo(0,I)};Ga.prototype.moveNE=function(c,h,q,l,p,v,w,I,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(l,0):c.moveTo(l-I,0)};Ga.prototype.moveSE=function(c,h,q,l,p,v,w,I,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(l,p):c.moveTo(l,p-I)};Ga.prototype.moveSW= -function(c,h,q,l,p,v,w,I,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(0,p):c.moveTo(I,p)};Ga.prototype.paintNW=function(c,h,q,l,p,v,w,I,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;c.arcTo(I,I,0,0,h,I,0)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(I,0);else c.lineTo(0,0)};Ga.prototype.paintTop=function(c,h,q,l,p,v,w,I,y){"square"==w||"default"== -w&&"square"==v||!y?c.lineTo(l,0):c.lineTo(l-I,0)};Ga.prototype.paintNE=function(c,h,q,l,p,v,w,I,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;c.arcTo(I,I,0,0,h,l,I)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(l,I);else c.lineTo(l,0)};Ga.prototype.paintRight=function(c,h,q,l,p,v,w,I,y){"square"==w||"default"==w&&"square"==v||!y?c.lineTo(l,p):c.lineTo(l,p- -I)};Ga.prototype.paintLeft=function(c,h,q,l,p,v,w,I,y){"square"==w||"default"==w&&"square"==v||!y?c.lineTo(0,0):c.lineTo(0,I)};Ga.prototype.paintSE=function(c,h,q,l,p,v,w,I,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;c.arcTo(I,I,0,0,h,l-I,p)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(l-I,p);else c.lineTo(l,p)};Ga.prototype.paintBottom=function(c,h,q, -l,p,v,w,I,y){"square"==w||"default"==w&&"square"==v||!y?c.lineTo(0,p):c.lineTo(I,p)};Ga.prototype.paintSW=function(c,h,q,l,p,v,w,I,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;c.arcTo(I,I,0,0,h,0,p-I)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(0,p-I);else c.lineTo(0,p)};Ga.prototype.paintNWInner=function(c,h,q,l,p,v,w,I,y){if("rounded"==w||"default"== -w&&"rounded"==v)c.arcTo(I-.5*y,I-.5*y,0,0,0,y,.5*y+I);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(I+y,I+y,0,0,1,y,y+I);else if("snip"==w||"default"==w&&"snip"==v)c.lineTo(y,.5*y+I);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(y+I,y+I),c.lineTo(y,y+I)};Ga.prototype.paintTopInner=function(c,h,q,l,p,v,w,I,y,Z,N){Z||N?!Z&&N?c.lineTo(0,y):Z&&!N?c.lineTo(y,0):Z?"square"==w||"default"==w&&"square"==v?c.lineTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"== -v?c.lineTo(I+.5*y,y):c.lineTo(I+y,y):c.lineTo(0,y):c.lineTo(0,0)};Ga.prototype.paintNEInner=function(c,h,q,l,p,v,w,I,y){if("rounded"==w||"default"==w&&"rounded"==v)c.arcTo(I-.5*y,I-.5*y,0,0,0,l-I-.5*y,y);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(I+y,I+y,0,0,1,l-I-y,y);else if("snip"==w||"default"==w&&"snip"==v)c.lineTo(l-I-.5*y,y);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(l-I-y,I+y),c.lineTo(l-I-y,y)};Ga.prototype.paintRightInner=function(c,h,q,l,p,v,w,I,y,Z,N){Z||N?!Z&& -N?c.lineTo(l-y,0):Z&&!N?c.lineTo(l,y):Z?"square"==w||"default"==w&&"square"==v?c.lineTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(l-y,I+.5*y):c.lineTo(l-y,I+y):c.lineTo(l-y,0):c.lineTo(l,0)};Ga.prototype.paintLeftInner=function(c,h,q,l,p,v,w,I,y,Z,N){Z||N?!Z&&N?c.lineTo(y,p):Z&&!N?c.lineTo(0,p-y):Z?"square"==w||"default"==w&&"square"==v?c.lineTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(y,p-I-.5* -y):c.lineTo(y,p-I-y):c.lineTo(y,p):c.lineTo(0,p)};Ga.prototype.paintSEInner=function(c,h,q,l,p,v,w,I,y){if("rounded"==w||"default"==w&&"rounded"==v)c.arcTo(I-.5*y,I-.5*y,0,0,0,l-y,p-I-.5*y);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(I+y,I+y,0,0,1,l-y,p-I-y);else if("snip"==w||"default"==w&&"snip"==v)c.lineTo(l-y,p-I-.5*y);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(l-I-y,p-I-y),c.lineTo(l-y,p-I-y)};Ga.prototype.paintBottomInner=function(c,h,q,l,p,v,w,I,y,Z,N){Z||N?!Z&&N?c.lineTo(l, -p-y):Z&&!N?c.lineTo(l-y,p):"square"==w||"default"==w&&"square"==v||!Z?c.lineTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(l-I-.5*y,p-y):c.lineTo(l-I-y,p-y):c.lineTo(l,p)};Ga.prototype.paintSWInner=function(c,h,q,l,p,v,w,I,y,Z){if(!Z)c.lineTo(y,p);else if("square"==w||"default"==w&&"square"==v)c.lineTo(y,p-y);else if("rounded"==w||"default"==w&&"rounded"==v)c.arcTo(I-.5*y,I-.5*y,0,0,0,I+.5*y,p-y);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(I+ -y,I+y,0,0,1,I+y,p-y);else if("snip"==w||"default"==w&&"snip"==v)c.lineTo(I+.5*y,p-y);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(y+I,p-I-y),c.lineTo(y+I,p-y)};Ga.prototype.moveSWInner=function(c,h,q,l,p,v,w,I,y,Z){Z?"square"==w||"default"==w&&"square"==v?c.moveTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.moveTo(y,p-I-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(y,p-I-y):c.moveTo(0,p-y)};Ga.prototype.lineSWInner= -function(c,h,q,l,p,v,w,I,y,Z){Z?"square"==w||"default"==w&&"square"==v?c.lineTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(y,p-I-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(y,p-I-y):c.lineTo(0,p-y)};Ga.prototype.moveSEInner=function(c,h,q,l,p,v,w,I,y,Z){Z?"square"==w||"default"==w&&"square"==v?c.moveTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.moveTo(l- -y,p-I-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(l-y,p-I-y):c.moveTo(l-y,p)};Ga.prototype.lineSEInner=function(c,h,q,l,p,v,w,I,y,Z){Z?"square"==w||"default"==w&&"square"==v?c.lineTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(l-y,p-I-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(l-y,p-I-y):c.lineTo(l-y,p)};Ga.prototype.moveNEInner=function(c,h, -q,l,p,v,w,I,y,Z){Z?"square"==w||"default"==w&&"square"==v||Z?c.moveTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.moveTo(l-y,I+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(l-y,I+y):c.moveTo(l,y)};Ga.prototype.lineNEInner=function(c,h,q,l,p,v,w,I,y,Z){Z?"square"==w||"default"==w&&"square"==v||Z?c.lineTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(l-y,I+.5*y): -("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(l-y,I+y):c.lineTo(l,y)};Ga.prototype.moveNWInner=function(c,h,q,l,p,v,w,I,y,Z,N){Z||N?!Z&&N?c.moveTo(y,0):Z&&!N?c.moveTo(0,y):"square"==w||"default"==w&&"square"==v?c.moveTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.moveTo(y,I+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(y,I+y):c.moveTo(0,0)};Ga.prototype.lineNWInner= -function(c,h,q,l,p,v,w,I,y,Z,N){Z||N?!Z&&N?c.lineTo(y,0):Z&&!N?c.lineTo(0,y):"square"==w||"default"==w&&"square"==v?c.lineTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(y,I+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(y,I+y):c.lineTo(0,0)};Ga.prototype.paintFolds=function(c,h,q,l,p,v,w,I,y,Z,N,Ba,Qa,Ja,ka){if("fold"==v||"fold"==w||"fold"==I||"fold"==y||"fold"==Z)("fold"==w||"default"==w&&"fold"==v)&& -Ba&&ka&&(c.moveTo(0,N),c.lineTo(N,N),c.lineTo(N,0)),("fold"==I||"default"==I&&"fold"==v)&&Ba&&Qa&&(c.moveTo(l-N,0),c.lineTo(l-N,N),c.lineTo(l,N)),("fold"==y||"default"==y&&"fold"==v)&&Ja&&Qa&&(c.moveTo(l-N,p),c.lineTo(l-N,p-N),c.lineTo(l,p-N)),("fold"==Z||"default"==Z&&"fold"==v)&&Ja&&ka&&(c.moveTo(0,p-N),c.lineTo(N,p-N),c.lineTo(N,p))};mxCellRenderer.registerShape(Ga.prototype.cst.RECT2,Ga);Ga.prototype.constraints=null;mxUtils.extend(Oa,mxConnector);Oa.prototype.origPaintEdgeShape=Oa.prototype.paintEdgeShape; +v.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Cb=v&&v.gradientDirection2?v.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Db=v&&v.opacity?v.opacity:mxUtils.getValue(this.style,"opacity","100"),Eb=Math.max(0,Math.min(50,y));v=Ga.prototype;c.setDashed(Ca);Qa&&""!=Qa&&c.setDashPattern(Qa);c.setStrokeWidth(Bb);y=Math.min(.5*p,.5*l,y);H||(y=Eb*Math.min(l,p)/100);y=Math.min(y,.5*Math.min(l,p));H||(M=Math.min(Ka*Math.min(l,p)/100));M=Math.min(M,.5*Math.min(l, +p)-y);(la||pa||oa||ma)&&"frame"!=Z&&(c.begin(),la?v.moveNW(c,h,q,l,p,w,wa,y,ma):c.moveTo(0,0),la&&v.paintNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),pa&&v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,oa),oa&&v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),ma&&v.paintSW(c,h,q,l,p,w,za,y,oa),v.paintLeft(c,h,q,l,p,w,wa,y,la),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(xb),Ca=H=Db,"none"==xb&&(H=0),"none"==zb&&(Ca=0),c.setGradient(xb,zb,0,0,l,p,Cb,H,Ca), +c.begin(),la?v.moveNWInner(c,h,q,l,p,w,wa,y,M,la,ma):c.moveTo(M,0),v.paintLeftInner(c,h,q,l,p,w,za,y,M,oa,ma),ma&&oa&&v.paintSWInner(c,h,q,l,p,w,za,y,M,oa),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),oa&&pa&&v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),pa&&la&&v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,la),la&&ma&&v.paintNWInner(c,h,q,l,p,w,wa,y,M),c.fill(),"none"==Ab&&(c.begin(),v.paintFolds(c,h,q,l,p,w,wa,xa,ya,za,y,la,pa,oa,ma),c.stroke())); +la||pa||oa||!ma?la||pa||!oa||ma?!la&&!pa&&oa&&ma?"frame"!=Z?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,oa),v.paintLeft(c,h,q,l,p,w,wa,y,la),"double"==Z&&(v.moveNWInner(c,h,q,l,p,w,wa,y,M,la,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,oa,ma),v.paintSWInner(c,h,q,l,p,w,za,y,M,oa),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa)),c.stroke()):(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,oa),v.paintLeft(c, +h,q,l,p,w,wa,y,la),v.lineNWInner(c,h,q,l,p,w,wa,y,M,la,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,oa,ma),v.paintSWInner(c,h,q,l,p,w,za,y,M,oa),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),c.close(),c.fillAndStroke()):la||!pa||oa||ma?!la&&pa&&!oa&&ma?"frame"!=Z?(c.begin(),v.moveSW(c,h,q,l,p,w,wa,y,oa),v.paintLeft(c,h,q,l,p,w,wa,y,la),"double"==Z&&(v.moveNWInner(c,h,q,l,p,w,wa,y,M,la,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,oa,ma)),c.stroke(),c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l, +p,w,ya,y,oa),"double"==Z&&(v.moveSEInner(c,h,q,l,p,w,ya,y,M,oa),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,wa,y,oa),v.paintLeft(c,h,q,l,p,w,wa,y,la),v.lineNWInner(c,h,q,l,p,w,wa,y,M,la,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,oa,ma),c.close(),c.fillAndStroke(),c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,oa),v.lineSEInner(c,h,q,l,p,w,ya,y,M,oa),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),c.close(),c.fillAndStroke()):!la&&pa&&oa&& +!ma?"frame"!=Z?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,oa),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),"double"==Z&&(v.moveSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa)),c.stroke()):(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,oa),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.lineSWInner(c, +h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),c.close(),c.fillAndStroke()):!la&&pa&&oa&&ma?"frame"!=Z?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,oa),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,oa),v.paintLeft(c,h,q,l,p,w,wa,y,la),"double"==Z&&(v.moveNWInner(c,h,q,l,p,w,wa,y,M,la,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,oa,ma), +v.paintSWInner(c,h,q,l,p,w,za,y,M,oa),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa)),c.stroke()):(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,oa),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,oa),v.paintLeft(c,h,q,l,p,w,wa,y,la),v.lineNWInner(c,h,q,l,p,w,wa,y,M,la,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,oa,ma),v.paintSWInner(c,h,q,l,p,w,za,y,M,oa), +v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),c.close(),c.fillAndStroke()):!la||pa||oa||ma?la&&!pa&&!oa&&ma?"frame"!=Z?(c.begin(),v.moveSW(c,h,q,l,p,w,za,y,oa),v.paintLeft(c,h,q,l,p,w,wa,y,la),v.paintNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Z&&(v.moveNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,la),v.paintNWInner(c,h,q,l,p,w,wa,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,oa, +ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,za,y,oa),v.paintLeft(c,h,q,l,p,w,wa,y,la),v.paintNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,la),v.paintNWInner(c,h,q,l,p,w,wa,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,oa,ma),c.close(),c.fillAndStroke()):la&&!pa&&oa&&!ma?"frame"!=Z?(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Z&&(v.moveNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c, +h,q,l,p,w,wa,y,M,ma,la)),c.stroke(),c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),"double"==Z&&(v.moveSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,la),c.close(),c.fillAndStroke(),c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.lineSWInner(c,h,q,l,p,w, +za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),c.close(),c.fillAndStroke()):la&&!pa&&oa&&ma?"frame"!=Z?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,oa),v.paintLeft(c,h,q,l,p,w,wa,y,la),v.paintNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Z&&(v.moveNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,la),v.paintNWInner(c,h,q,l,p,w,wa,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,oa,ma),v.paintSWInner(c, +h,q,l,p,w,za,y,M,oa),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa)),c.stroke()):(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,oa),v.paintLeft(c,h,q,l,p,w,wa,y,la),v.paintNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,la),v.paintNWInner(c,h,q,l,p,w,wa,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,oa,ma),v.paintSWInner(c,h,q,l,p,w,za,y,M,oa),v.paintBottomInner(c,h,q, +l,p,w,ya,y,M,pa,oa),c.close(),c.fillAndStroke()):la&&pa&&!oa&&!ma?"frame"!=Z?(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,oa),"double"==Z&&(v.moveSEInner(c,h,q,l,p,w,ya,y,M,oa),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,la)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la), +v.paintRight(c,h,q,l,p,w,ya,y,oa),v.lineSEInner(c,h,q,l,p,w,ya,y,M,oa),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,la),c.close(),c.fillAndStroke()):la&&pa&&!oa&&ma?"frame"!=Z?(c.begin(),v.moveSW(c,h,q,l,p,w,za,y,oa),v.paintLeft(c,h,q,l,p,w,wa,y,la),v.paintNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,oa),"double"==Z&&(v.moveSEInner(c,h,q,l,p,w,ya,y,M,oa), +v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,la),v.paintNWInner(c,h,q,l,p,w,wa,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,oa,ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,za,y,oa),v.paintLeft(c,h,q,l,p,w,wa,y,la),v.paintNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,oa),v.lineSEInner(c,h,q,l,p,w,ya,y,M,oa),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c, +h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,la),v.paintNWInner(c,h,q,l,p,w,wa,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,oa,ma),c.close(),c.fillAndStroke()):la&&pa&&oa&&!ma?"frame"!=Z?(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,oa),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),"double"==Z&&(v.moveSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),v.paintSEInner(c, +h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,la)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,oa),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.lineSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p, +w,xa,y,M,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,la),c.close(),c.fillAndStroke()):la&&pa&&oa&&ma&&("frame"!=Z?(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,oa),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,oa),v.paintLeft(c,h,q,l,p,w,wa,y,la),c.close(),"double"==Z&&(v.moveSWInner(c,h,q,l,p,w,za, +y,M,ma),v.paintSWInner(c,h,q,l,p,w,za,y,M,oa),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,la),v.paintNWInner(c,h,q,l,p,w,wa,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,oa,ma),c.close()),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q, +l,p,w,ya,y,oa),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,oa),v.paintLeft(c,h,q,l,p,w,wa,y,la),c.close(),v.moveSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintSWInner(c,h,q,l,p,w,za,y,M,oa),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,la),v.paintNWInner(c,h,q,l,p,w,wa,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M, +oa,ma),c.close(),c.fillAndStroke())):"frame"!=Z?(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Z&&(v.moveNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,la)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,la),c.close(),c.fillAndStroke()):"frame"!=Z?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,oa),"double"== +Z&&(v.moveSEInner(c,h,q,l,p,w,ya,y,M,oa),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa)),c.stroke()):(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,oa),v.lineSEInner(c,h,q,l,p,w,ya,y,M,oa),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),c.close(),c.fillAndStroke()):"frame"!=Z?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),"double"==Z&&(v.moveSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa)),c.stroke()):(c.begin(),v.moveSE(c, +h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.lineSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),c.close(),c.fillAndStroke()):"frame"!=Z?(c.begin(),v.moveSW(c,h,q,l,p,w,wa,y,oa),v.paintLeft(c,h,q,l,p,w,wa,y,la),"double"==Z&&(v.moveNWInner(c,h,q,l,p,w,wa,y,M,la,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,oa,ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,wa,y,oa),v.paintLeft(c,h,q,l,p,w,wa,y,la),v.lineNWInner(c,h,q,l,p,w,wa,y,M,la,ma),v.paintLeftInner(c,h,q,l,p, +w,za,y,M,oa,ma),c.close(),c.fillAndStroke());c.begin();v.paintFolds(c,h,q,l,p,w,wa,xa,ya,za,y,la,pa,oa,ma);c.stroke()};Ga.prototype.moveNW=function(c,h,q,l,p,v,w,H,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(0,0):c.moveTo(0,H)};Ga.prototype.moveNE=function(c,h,q,l,p,v,w,H,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(l,0):c.moveTo(l-H,0)};Ga.prototype.moveSE=function(c,h,q,l,p,v,w,H,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(l,p):c.moveTo(l,p-H)};Ga.prototype.moveSW= +function(c,h,q,l,p,v,w,H,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(0,p):c.moveTo(H,p)};Ga.prototype.paintNW=function(c,h,q,l,p,v,w,H,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;c.arcTo(H,H,0,0,h,H,0)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(H,0);else c.lineTo(0,0)};Ga.prototype.paintTop=function(c,h,q,l,p,v,w,H,y){"square"==w||"default"== +w&&"square"==v||!y?c.lineTo(l,0):c.lineTo(l-H,0)};Ga.prototype.paintNE=function(c,h,q,l,p,v,w,H,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;c.arcTo(H,H,0,0,h,l,H)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(l,H);else c.lineTo(l,0)};Ga.prototype.paintRight=function(c,h,q,l,p,v,w,H,y){"square"==w||"default"==w&&"square"==v||!y?c.lineTo(l,p):c.lineTo(l,p- +H)};Ga.prototype.paintLeft=function(c,h,q,l,p,v,w,H,y){"square"==w||"default"==w&&"square"==v||!y?c.lineTo(0,0):c.lineTo(0,H)};Ga.prototype.paintSE=function(c,h,q,l,p,v,w,H,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;c.arcTo(H,H,0,0,h,l-H,p)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(l-H,p);else c.lineTo(l,p)};Ga.prototype.paintBottom=function(c,h,q, +l,p,v,w,H,y){"square"==w||"default"==w&&"square"==v||!y?c.lineTo(0,p):c.lineTo(H,p)};Ga.prototype.paintSW=function(c,h,q,l,p,v,w,H,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;c.arcTo(H,H,0,0,h,0,p-H)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(0,p-H);else c.lineTo(0,p)};Ga.prototype.paintNWInner=function(c,h,q,l,p,v,w,H,y){if("rounded"==w||"default"== +w&&"rounded"==v)c.arcTo(H-.5*y,H-.5*y,0,0,0,y,.5*y+H);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(H+y,H+y,0,0,1,y,y+H);else if("snip"==w||"default"==w&&"snip"==v)c.lineTo(y,.5*y+H);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(y+H,y+H),c.lineTo(y,y+H)};Ga.prototype.paintTopInner=function(c,h,q,l,p,v,w,H,y,Z,M){Z||M?!Z&&M?c.lineTo(0,y):Z&&!M?c.lineTo(y,0):Z?"square"==w||"default"==w&&"square"==v?c.lineTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"== +v?c.lineTo(H+.5*y,y):c.lineTo(H+y,y):c.lineTo(0,y):c.lineTo(0,0)};Ga.prototype.paintNEInner=function(c,h,q,l,p,v,w,H,y){if("rounded"==w||"default"==w&&"rounded"==v)c.arcTo(H-.5*y,H-.5*y,0,0,0,l-H-.5*y,y);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(H+y,H+y,0,0,1,l-H-y,y);else if("snip"==w||"default"==w&&"snip"==v)c.lineTo(l-H-.5*y,y);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(l-H-y,H+y),c.lineTo(l-H-y,y)};Ga.prototype.paintRightInner=function(c,h,q,l,p,v,w,H,y,Z,M){Z||M?!Z&& +M?c.lineTo(l-y,0):Z&&!M?c.lineTo(l,y):Z?"square"==w||"default"==w&&"square"==v?c.lineTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(l-y,H+.5*y):c.lineTo(l-y,H+y):c.lineTo(l-y,0):c.lineTo(l,0)};Ga.prototype.paintLeftInner=function(c,h,q,l,p,v,w,H,y,Z,M){Z||M?!Z&&M?c.lineTo(y,p):Z&&!M?c.lineTo(0,p-y):Z?"square"==w||"default"==w&&"square"==v?c.lineTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(y,p-H-.5* +y):c.lineTo(y,p-H-y):c.lineTo(y,p):c.lineTo(0,p)};Ga.prototype.paintSEInner=function(c,h,q,l,p,v,w,H,y){if("rounded"==w||"default"==w&&"rounded"==v)c.arcTo(H-.5*y,H-.5*y,0,0,0,l-y,p-H-.5*y);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(H+y,H+y,0,0,1,l-y,p-H-y);else if("snip"==w||"default"==w&&"snip"==v)c.lineTo(l-y,p-H-.5*y);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(l-H-y,p-H-y),c.lineTo(l-y,p-H-y)};Ga.prototype.paintBottomInner=function(c,h,q,l,p,v,w,H,y,Z,M){Z||M?!Z&&M?c.lineTo(l, +p-y):Z&&!M?c.lineTo(l-y,p):"square"==w||"default"==w&&"square"==v||!Z?c.lineTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(l-H-.5*y,p-y):c.lineTo(l-H-y,p-y):c.lineTo(l,p)};Ga.prototype.paintSWInner=function(c,h,q,l,p,v,w,H,y,Z){if(!Z)c.lineTo(y,p);else if("square"==w||"default"==w&&"square"==v)c.lineTo(y,p-y);else if("rounded"==w||"default"==w&&"rounded"==v)c.arcTo(H-.5*y,H-.5*y,0,0,0,H+.5*y,p-y);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(H+ +y,H+y,0,0,1,H+y,p-y);else if("snip"==w||"default"==w&&"snip"==v)c.lineTo(H+.5*y,p-y);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(y+H,p-H-y),c.lineTo(y+H,p-y)};Ga.prototype.moveSWInner=function(c,h,q,l,p,v,w,H,y,Z){Z?"square"==w||"default"==w&&"square"==v?c.moveTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.moveTo(y,p-H-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(y,p-H-y):c.moveTo(0,p-y)};Ga.prototype.lineSWInner= +function(c,h,q,l,p,v,w,H,y,Z){Z?"square"==w||"default"==w&&"square"==v?c.lineTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(y,p-H-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(y,p-H-y):c.lineTo(0,p-y)};Ga.prototype.moveSEInner=function(c,h,q,l,p,v,w,H,y,Z){Z?"square"==w||"default"==w&&"square"==v?c.moveTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.moveTo(l- +y,p-H-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(l-y,p-H-y):c.moveTo(l-y,p)};Ga.prototype.lineSEInner=function(c,h,q,l,p,v,w,H,y,Z){Z?"square"==w||"default"==w&&"square"==v?c.lineTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(l-y,p-H-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(l-y,p-H-y):c.lineTo(l-y,p)};Ga.prototype.moveNEInner=function(c,h, +q,l,p,v,w,H,y,Z){Z?"square"==w||"default"==w&&"square"==v||Z?c.moveTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.moveTo(l-y,H+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(l-y,H+y):c.moveTo(l,y)};Ga.prototype.lineNEInner=function(c,h,q,l,p,v,w,H,y,Z){Z?"square"==w||"default"==w&&"square"==v||Z?c.lineTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(l-y,H+.5*y): +("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(l-y,H+y):c.lineTo(l,y)};Ga.prototype.moveNWInner=function(c,h,q,l,p,v,w,H,y,Z,M){Z||M?!Z&&M?c.moveTo(y,0):Z&&!M?c.moveTo(0,y):"square"==w||"default"==w&&"square"==v?c.moveTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.moveTo(y,H+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(y,H+y):c.moveTo(0,0)};Ga.prototype.lineNWInner= +function(c,h,q,l,p,v,w,H,y,Z,M){Z||M?!Z&&M?c.lineTo(y,0):Z&&!M?c.lineTo(0,y):"square"==w||"default"==w&&"square"==v?c.lineTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(y,H+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(y,H+y):c.lineTo(0,0)};Ga.prototype.paintFolds=function(c,h,q,l,p,v,w,H,y,Z,M,Ca,Qa,Ka,la){if("fold"==v||"fold"==w||"fold"==H||"fold"==y||"fold"==Z)("fold"==w||"default"==w&&"fold"==v)&& +Ca&&la&&(c.moveTo(0,M),c.lineTo(M,M),c.lineTo(M,0)),("fold"==H||"default"==H&&"fold"==v)&&Ca&&Qa&&(c.moveTo(l-M,0),c.lineTo(l-M,M),c.lineTo(l,M)),("fold"==y||"default"==y&&"fold"==v)&&Ka&&Qa&&(c.moveTo(l-M,p),c.lineTo(l-M,p-M),c.lineTo(l,p-M)),("fold"==Z||"default"==Z&&"fold"==v)&&Ka&&la&&(c.moveTo(0,p-M),c.lineTo(M,p-M),c.lineTo(M,p))};mxCellRenderer.registerShape(Ga.prototype.cst.RECT2,Ga);Ga.prototype.constraints=null;mxUtils.extend(Oa,mxConnector);Oa.prototype.origPaintEdgeShape=Oa.prototype.paintEdgeShape; Oa.prototype.paintEdgeShape=function(c,h,q){for(var l=[],p=0;p<h.length;p++)l.push(mxUtils.clone(h[p]));p=c.state.dashed;var v=c.state.fixDash;Oa.prototype.origPaintEdgeShape.apply(this,[c,l,q]);3<=c.state.strokeWidth&&(l=mxUtils.getValue(this.style,"fillColor",null),null!=l&&(c.setStrokeColor(l),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(p,v),Oa.prototype.origPaintEdgeShape.apply(this,[c,h,q])))};mxCellRenderer.registerShape("filledEdge",Oa);"undefined"!==typeof StyleFormatPanel&&function(){var c= -StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var h=this.editorUi.getSelectionState(),q=c.apply(this,arguments);"umlFrame"==h.style.shape&&q.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return q}}();mxMarker.addMarker("dash",function(c,h,q,l,p,v,w,I,y,Z){var N=p*(w+y+1),Ba=v*(w+y+1);return function(){c.begin();c.moveTo(l.x-N/2-Ba/2,l.y-Ba/2+N/2);c.lineTo(l.x+Ba/2-3*N/2,l.y-3*Ba/2-N/2);c.stroke()}});mxMarker.addMarker("box", -function(c,h,q,l,p,v,w,I,y,Z){var N=p*(w+y+1),Ba=v*(w+y+1),Qa=l.x+N/2,Ja=l.y+Ba/2;l.x-=N;l.y-=Ba;return function(){c.begin();c.moveTo(Qa-N/2-Ba/2,Ja-Ba/2+N/2);c.lineTo(Qa-N/2+Ba/2,Ja-Ba/2-N/2);c.lineTo(Qa+Ba/2-3*N/2,Ja-3*Ba/2-N/2);c.lineTo(Qa-Ba/2-3*N/2,Ja-3*Ba/2+N/2);c.close();Z?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,h,q,l,p,v,w,I,y,Z){var N=p*(w+y+1),Ba=v*(w+y+1);return function(){c.begin();c.moveTo(l.x-N/2-Ba/2,l.y-Ba/2+N/2);c.lineTo(l.x+Ba/2-3*N/2,l.y-3*Ba/2-N/2); -c.moveTo(l.x-N/2+Ba/2,l.y-Ba/2-N/2);c.lineTo(l.x-Ba/2-3*N/2,l.y-3*Ba/2+N/2);c.stroke()}});mxMarker.addMarker("circle",Pa);mxMarker.addMarker("circlePlus",function(c,h,q,l,p,v,w,I,y,Z){var N=l.clone(),Ba=Pa.apply(this,arguments),Qa=p*(w+2*y),Ja=v*(w+2*y);return function(){Ba.apply(this,arguments);c.begin();c.moveTo(N.x-p*y,N.y-v*y);c.lineTo(N.x-2*Qa+p*y,N.y-2*Ja+v*y);c.moveTo(N.x-Qa-Ja+v*y,N.y-Ja+Qa-p*y);c.lineTo(N.x+Ja-Qa-v*y,N.y-Ja-Qa+p*y);c.stroke()}});mxMarker.addMarker("halfCircle",function(c, -h,q,l,p,v,w,I,y,Z){var N=p*(w+y+1),Ba=v*(w+y+1),Qa=l.clone();l.x-=N;l.y-=Ba;return function(){c.begin();c.moveTo(Qa.x-Ba,Qa.y+N);c.quadTo(l.x-Ba,l.y+N,l.x,l.y);c.quadTo(l.x+Ba,l.y-N,Qa.x+Ba,Qa.y-N);c.stroke()}});mxMarker.addMarker("async",function(c,h,q,l,p,v,w,I,y,Z){h=p*y*1.118;q=v*y*1.118;p*=w+y;v*=w+y;var N=l.clone();N.x-=h;N.y-=q;l.x+=-p-h;l.y+=-v-q;return function(){c.begin();c.moveTo(N.x,N.y);I?c.lineTo(N.x-p-v/2,N.y-v+p/2):c.lineTo(N.x+v/2-p,N.y-v-p/2);c.lineTo(N.x-p,N.y-v);c.close();Z?c.fillAndStroke(): -c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(h,q,l,p,v,w,I,y,Z,N){v*=I+Z;w*=I+Z;var Ba=p.clone();return function(){h.begin();h.moveTo(Ba.x,Ba.y);y?h.lineTo(Ba.x-v-w/c,Ba.y-w+v/c):h.lineTo(Ba.x+w/c-v,Ba.y-w-v/c);h.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var lb=function(c,h,q){return Wa(c,["width"],h,function(l,p,v,w,I){I=c.shape.getEdgeWidth()*c.view.scale+q;return new mxPoint(w.x+p*l/4+v*I/2,w.y+v*l/4-p*I/2)},function(l,p,v,w,I,y){l=Math.sqrt(mxUtils.ptSegDistSq(w.x, -w.y,I.x,I.y,y.x,y.y));c.style.width=Math.round(2*l)/c.view.scale-q})},Wa=function(c,h,q,l,p){return Ra(c,h,function(v){var w=c.absolutePoints,I=w.length-1;v=c.view.translate;var y=c.view.scale,Z=q?w[0]:w[I];w=q?w[1]:w[I-1];I=w.x-Z.x;var N=w.y-Z.y,Ba=Math.sqrt(I*I+N*N);Z=l.call(this,Ba,I/Ba,N/Ba,Z,w);return new mxPoint(Z.x/y-v.x,Z.y/y-v.y)},function(v,w,I){var y=c.absolutePoints,Z=y.length-1;v=c.view.translate;var N=c.view.scale,Ba=q?y[0]:y[Z];y=q?y[1]:y[Z-1];Z=y.x-Ba.x;var Qa=y.y-Ba.y,Ja=Math.sqrt(Z* -Z+Qa*Qa);w.x=(w.x+v.x)*N;w.y=(w.y+v.y)*N;p.call(this,Ja,Z/Ja,Qa/Ja,Ba,y,w,I)})},gb=function(c,h){return function(q){return[Wa(q,["startWidth"],!0,function(l,p,v,w,I){I=mxUtils.getNumber(q.style,"startWidth",c)*q.view.scale+h;return new mxPoint(w.x+p*l/4+v*I/2,w.y+v*l/4-p*I/2)},function(l,p,v,w,I,y){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,I.x,I.y,y.x,y.y));q.style.startWidth=Math.round(2*l)/q.view.scale-h})]}},hb=function(c){return function(h){return[Ra(h,["arrowWidth","arrowSize"],function(q){var l= +StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var h=this.editorUi.getSelectionState(),q=c.apply(this,arguments);"umlFrame"==h.style.shape&&q.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return q}}();mxMarker.addMarker("dash",function(c,h,q,l,p,v,w,H,y,Z){var M=p*(w+y+1),Ca=v*(w+y+1);return function(){c.begin();c.moveTo(l.x-M/2-Ca/2,l.y-Ca/2+M/2);c.lineTo(l.x+Ca/2-3*M/2,l.y-3*Ca/2-M/2);c.stroke()}});mxMarker.addMarker("box", +function(c,h,q,l,p,v,w,H,y,Z){var M=p*(w+y+1),Ca=v*(w+y+1),Qa=l.x+M/2,Ka=l.y+Ca/2;l.x-=M;l.y-=Ca;return function(){c.begin();c.moveTo(Qa-M/2-Ca/2,Ka-Ca/2+M/2);c.lineTo(Qa-M/2+Ca/2,Ka-Ca/2-M/2);c.lineTo(Qa+Ca/2-3*M/2,Ka-3*Ca/2-M/2);c.lineTo(Qa-Ca/2-3*M/2,Ka-3*Ca/2+M/2);c.close();Z?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,h,q,l,p,v,w,H,y,Z){var M=p*(w+y+1),Ca=v*(w+y+1);return function(){c.begin();c.moveTo(l.x-M/2-Ca/2,l.y-Ca/2+M/2);c.lineTo(l.x+Ca/2-3*M/2,l.y-3*Ca/2-M/2); +c.moveTo(l.x-M/2+Ca/2,l.y-Ca/2-M/2);c.lineTo(l.x-Ca/2-3*M/2,l.y-3*Ca/2+M/2);c.stroke()}});mxMarker.addMarker("circle",Pa);mxMarker.addMarker("circlePlus",function(c,h,q,l,p,v,w,H,y,Z){var M=l.clone(),Ca=Pa.apply(this,arguments),Qa=p*(w+2*y),Ka=v*(w+2*y);return function(){Ca.apply(this,arguments);c.begin();c.moveTo(M.x-p*y,M.y-v*y);c.lineTo(M.x-2*Qa+p*y,M.y-2*Ka+v*y);c.moveTo(M.x-Qa-Ka+v*y,M.y-Ka+Qa-p*y);c.lineTo(M.x+Ka-Qa-v*y,M.y-Ka-Qa+p*y);c.stroke()}});mxMarker.addMarker("halfCircle",function(c, +h,q,l,p,v,w,H,y,Z){var M=p*(w+y+1),Ca=v*(w+y+1),Qa=l.clone();l.x-=M;l.y-=Ca;return function(){c.begin();c.moveTo(Qa.x-Ca,Qa.y+M);c.quadTo(l.x-Ca,l.y+M,l.x,l.y);c.quadTo(l.x+Ca,l.y-M,Qa.x+Ca,Qa.y-M);c.stroke()}});mxMarker.addMarker("async",function(c,h,q,l,p,v,w,H,y,Z){h=p*y*1.118;q=v*y*1.118;p*=w+y;v*=w+y;var M=l.clone();M.x-=h;M.y-=q;l.x+=-p-h;l.y+=-v-q;return function(){c.begin();c.moveTo(M.x,M.y);H?c.lineTo(M.x-p-v/2,M.y-v+p/2):c.lineTo(M.x+v/2-p,M.y-v-p/2);c.lineTo(M.x-p,M.y-v);c.close();Z?c.fillAndStroke(): +c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(h,q,l,p,v,w,H,y,Z,M){v*=H+Z;w*=H+Z;var Ca=p.clone();return function(){h.begin();h.moveTo(Ca.x,Ca.y);y?h.lineTo(Ca.x-v-w/c,Ca.y-w+v/c):h.lineTo(Ca.x+w/c-v,Ca.y-w-v/c);h.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var lb=function(c,h,q){return Wa(c,["width"],h,function(l,p,v,w,H){H=c.shape.getEdgeWidth()*c.view.scale+q;return new mxPoint(w.x+p*l/4+v*H/2,w.y+v*l/4-p*H/2)},function(l,p,v,w,H,y){l=Math.sqrt(mxUtils.ptSegDistSq(w.x, +w.y,H.x,H.y,y.x,y.y));c.style.width=Math.round(2*l)/c.view.scale-q})},Wa=function(c,h,q,l,p){return Ra(c,h,function(v){var w=c.absolutePoints,H=w.length-1;v=c.view.translate;var y=c.view.scale,Z=q?w[0]:w[H];w=q?w[1]:w[H-1];H=w.x-Z.x;var M=w.y-Z.y,Ca=Math.sqrt(H*H+M*M);Z=l.call(this,Ca,H/Ca,M/Ca,Z,w);return new mxPoint(Z.x/y-v.x,Z.y/y-v.y)},function(v,w,H){var y=c.absolutePoints,Z=y.length-1;v=c.view.translate;var M=c.view.scale,Ca=q?y[0]:y[Z];y=q?y[1]:y[Z-1];Z=y.x-Ca.x;var Qa=y.y-Ca.y,Ka=Math.sqrt(Z* +Z+Qa*Qa);w.x=(w.x+v.x)*M;w.y=(w.y+v.y)*M;p.call(this,Ka,Z/Ka,Qa/Ka,Ca,y,w,H)})},gb=function(c,h){return function(q){return[Wa(q,["startWidth"],!0,function(l,p,v,w,H){H=mxUtils.getNumber(q.style,"startWidth",c)*q.view.scale+h;return new mxPoint(w.x+p*l/4+v*H/2,w.y+v*l/4-p*H/2)},function(l,p,v,w,H,y){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,H.x,H.y,y.x,y.y));q.style.startWidth=Math.round(2*l)/q.view.scale-h})]}},hb=function(c){return function(h){return[Ra(h,["arrowWidth","arrowSize"],function(q){var l= Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",ca.prototype.arrowWidth))),p=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",ca.prototype.arrowSize)));return new mxPoint(q.x+(1-p)*q.width,q.y+(1-l)*q.height/2)},function(q,l){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(q.y+q.height/2-l.y)/q.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(q.x+q.width-l.x)/q.width))})]}},Xa=function(c){return function(h){return[Ra(h,["size"],function(q){var l= Math.max(0,Math.min(.5*q.height,parseFloat(mxUtils.getValue(this.state.style,"size",c))));return new mxPoint(q.x,q.y+l)},function(q,l){this.state.style.size=Math.max(0,l.y-q.y)},!0)]}},sb=function(c,h,q){return function(l){var p=[Ra(l,["size"],function(v){var w=Math.max(0,Math.min(v.width,Math.min(v.height,parseFloat(mxUtils.getValue(this.state.style,"size",h)))))*c;return new mxPoint(v.x+w,v.y+w)},function(v,w){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(v.width,w.x-v.x),Math.min(v.height, -w.y-v.y)))/c)},!1)];q&&mxUtils.getValue(l.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(fb(l));return p}},qb=function(c,h,q,l,p){q=null!=q?q:.5;return function(v){var w=[Ra(v,["size"],function(I){var y=null!=p?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,Z=parseFloat(mxUtils.getValue(this.state.style,"size",y?p:c));return new mxPoint(I.x+Math.max(0,Math.min(.5*I.width,Z*(y?1:I.width))),I.getCenterY())},function(I,y,Z){I=null!=p&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")? -y.x-I.x:Math.max(0,Math.min(q,(y.x-I.x)/I.width));this.state.style.size=I},!1,l)];h&&mxUtils.getValue(v.style,mxConstants.STYLE_ROUNDED,!1)&&w.push(fb(v));return w}},ub=function(c,h,q){c=null!=c?c:.5;return function(l){var p=[Ra(l,["size"],function(v){var w=null!=q?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,I=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",w?q:h)));return new mxPoint(v.x+Math.min(.75*v.width*c,I*(w?.75:.75*v.width)),v.y+v.height/4)},function(v,w){v= +w.y-v.y)))/c)},!1)];q&&mxUtils.getValue(l.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(fb(l));return p}},qb=function(c,h,q,l,p){q=null!=q?q:.5;return function(v){var w=[Ra(v,["size"],function(H){var y=null!=p?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,Z=parseFloat(mxUtils.getValue(this.state.style,"size",y?p:c));return new mxPoint(H.x+Math.max(0,Math.min(.5*H.width,Z*(y?1:H.width))),H.getCenterY())},function(H,y,Z){H=null!=p&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")? +y.x-H.x:Math.max(0,Math.min(q,(y.x-H.x)/H.width));this.state.style.size=H},!1,l)];h&&mxUtils.getValue(v.style,mxConstants.STYLE_ROUNDED,!1)&&w.push(fb(v));return w}},ub=function(c,h,q){c=null!=c?c:.5;return function(l){var p=[Ra(l,["size"],function(v){var w=null!=q?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,H=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",w?q:h)));return new mxPoint(v.x+Math.min(.75*v.width*c,H*(w?.75:.75*v.width)),v.y+v.height/4)},function(v,w){v= null!=q&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?w.x-v.x:Math.max(0,Math.min(c,(w.x-v.x)/v.width*.75));this.state.style.size=v},!1,!0)];mxUtils.getValue(l.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(fb(l));return p}},nb=function(){return function(c){var h=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(fb(c));return h}},fb=function(c,h){return Ra(c,[mxConstants.STYLE_ARCSIZE],function(q){var l=null!=h?h:q.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE, 0)){var p=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(q.x+q.width-Math.min(q.width/2,p),q.y+l)}p=Math.max(0,parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(q.x+q.width-Math.min(Math.max(q.width/2,q.height/2),Math.min(q.width,q.height)*p),q.y+l)},function(q,l,p){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]= -Math.round(Math.max(0,Math.min(q.width,2*(q.x+q.width-l.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(q.width-l.x+q.x)/Math.min(q.width,q.height))))})},Ra=function(c,h,q,l,p,v,w){var I=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);I.execute=function(Z){for(var N=0;N<h.length;N++)this.copyStyle(h[N]);w&&w(Z)};I.getPosition=q;I.setPosition=l;I.ignoreGrid=null!=p?p:!0;if(v){var y=I.positionChanged;I.positionChanged=function(){y.apply(this, -arguments);c.view.invalidate(this.state.cell);c.view.validate()}}return I},rb={link:function(c){return[lb(c,!0,10),lb(c,!1,10)]},flexArrow:function(c){var h=c.view.graph.gridSize/c.view.scale,q=[];mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(q.push(Wa(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(l,p,v,w,I){l=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;I=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE, -mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(w.x+p*(I+c.shape.strokewidth*c.view.scale)+v*l/2,w.y+v*(I+c.shape.strokewidth*c.view.scale)-p*l/2)},function(l,p,v,w,I,y,Z){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,I.x,I.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(p-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*l)/c.view.scale;if(mxEvent.isShiftDown(Z.getEvent())||mxEvent.isControlDown(Z.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]= -c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(Z.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<h/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),q.push(Wa(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(l,p,v,w,I){l=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;I=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/ -5)*c.view.scale;return new mxPoint(w.x+p*(I+c.shape.strokewidth*c.view.scale)+v*l/2,w.y+v*(I+c.shape.strokewidth*c.view.scale)-p*l/2)},function(l,p,v,w,I,y,Z){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,I.x,I.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(p-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*l)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(Z.getEvent())||mxEvent.isControlDown(Z.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]= +Math.round(Math.max(0,Math.min(q.width,2*(q.x+q.width-l.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(q.width-l.x+q.x)/Math.min(q.width,q.height))))})},Ra=function(c,h,q,l,p,v,w){var H=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);H.execute=function(Z){for(var M=0;M<h.length;M++)this.copyStyle(h[M]);w&&w(Z)};H.getPosition=q;H.setPosition=l;H.ignoreGrid=null!=p?p:!0;if(v){var y=H.positionChanged;H.positionChanged=function(){y.apply(this, +arguments);c.view.invalidate(this.state.cell);c.view.validate()}}return H},rb={link:function(c){return[lb(c,!0,10),lb(c,!1,10)]},flexArrow:function(c){var h=c.view.graph.gridSize/c.view.scale,q=[];mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(q.push(Wa(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(l,p,v,w,H){l=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;H=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE, +mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(w.x+p*(H+c.shape.strokewidth*c.view.scale)+v*l/2,w.y+v*(H+c.shape.strokewidth*c.view.scale)-p*l/2)},function(l,p,v,w,H,y,Z){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,H.x,H.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(p-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*l)/c.view.scale;if(mxEvent.isShiftDown(Z.getEvent())||mxEvent.isControlDown(Z.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]= +c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(Z.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<h/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),q.push(Wa(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(l,p,v,w,H){l=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;H=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/ +5)*c.view.scale;return new mxPoint(w.x+p*(H+c.shape.strokewidth*c.view.scale)+v*l/2,w.y+v*(H+c.shape.strokewidth*c.view.scale)-p*l/2)},function(l,p,v,w,H,y,Z){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,H.x,H.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(p-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*l)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(Z.getEvent())||mxEvent.isControlDown(Z.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]= c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(Z.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<h/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<h&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(q.push(Wa(c, -["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(l,p,v,w,I){l=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;I=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(w.x+p*(I+c.shape.strokewidth*c.view.scale)-v*l/2,w.y+v*(I+c.shape.strokewidth*c.view.scale)+p*l/2)},function(l,p,v,w,I,y,Z){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,I.x,I.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);c.style[mxConstants.STYLE_ENDSIZE]= +["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(l,p,v,w,H){l=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;H=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(w.x+p*(H+c.shape.strokewidth*c.view.scale)-v*l/2,w.y+v*(H+c.shape.strokewidth*c.view.scale)+p*l/2)},function(l,p,v,w,H,y,Z){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,H.x,H.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);c.style[mxConstants.STYLE_ENDSIZE]= Math.round(100*(p-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*l)/c.view.scale;if(mxEvent.isShiftDown(Z.getEvent())||mxEvent.isControlDown(Z.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(Z.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<h/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),q.push(Wa(c,["startWidth","endWidth", -mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(l,p,v,w,I){l=(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;I=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(w.x+p*(I+c.shape.strokewidth*c.view.scale)-v*l/2,w.y+v*(I+c.shape.strokewidth*c.view.scale)+p*l/2)},function(l,p,v,w,I,y,Z){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,I.x,I.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);c.style[mxConstants.STYLE_ENDSIZE]= +mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(l,p,v,w,H){l=(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;H=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(w.x+p*(H+c.shape.strokewidth*c.view.scale)-v*l/2,w.y+v*(H+c.shape.strokewidth*c.view.scale)+p*l/2)},function(l,p,v,w,H,y,Z){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,H.x,H.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);c.style[mxConstants.STYLE_ENDSIZE]= Math.round(100*(p-c.shape.strokewidth)/3)/100/c.view.scale;c.style.endWidth=Math.max(0,Math.round(2*l)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(Z.getEvent())||mxEvent.isControlDown(Z.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(Z.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<h/6&&(c.style[mxConstants.STYLE_ENDSIZE]= c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-parseFloat(c.style.startWidth))<h&&(c.style.endWidth=c.style.startWidth))})));return q},swimlane:function(c){var h=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var q=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));h.push(fb(c,q/2))}h.push(Ra(c,[mxConstants.STYLE_STARTSIZE],function(l){var p=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE)); return 1==mxUtils.getValue(c.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(l.getCenterX(),l.y+Math.max(0,Math.min(l.height,p))):new mxPoint(l.x+Math.max(0,Math.min(l.width,p)),l.getCenterY())},function(l,p){c.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(l.height,p.y-l.y))):Math.round(Math.max(0,Math.min(l.width,p.x-l.x)))},!1,null,function(l){var p=c.view.graph;if(!mxEvent.isShiftDown(l.getEvent())&&!mxEvent.isControlDown(l.getEvent())&& -(p.isTableRow(c.cell)||p.isTableCell(c.cell))){l=p.getSwimlaneDirection(c.style);var v=p.model.getParent(c.cell);v=p.model.getChildCells(v,!0);for(var w=[],I=0;I<v.length;I++)v[I]!=c.cell&&p.isSwimlane(v[I])&&p.getSwimlaneDirection(p.getCurrentCellStyle(v[I]))==l&&w.push(v[I]);p.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],w)}}));return h},label:nb(),ext:nb(),rectangle:nb(),triangle:nb(),rhombus:nb(),umlLifeline:function(c){return[Ra(c,["size"],function(h){var q= -Math.max(0,Math.min(h.height,parseFloat(mxUtils.getValue(this.state.style,"size",da.prototype.size))));return new mxPoint(h.getCenterX(),h.y+q)},function(h,q){this.state.style.size=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},umlFrame:function(c){return[Ra(c,["width","height"],function(h){var q=Math.max(pa.prototype.corner,Math.min(h.width,mxUtils.getValue(this.state.style,"width",pa.prototype.width))),l=Math.max(1.5*pa.prototype.corner,Math.min(h.height,mxUtils.getValue(this.state.style, -"height",pa.prototype.height)));return new mxPoint(h.x+q,h.y+l)},function(h,q){this.state.style.width=Math.round(Math.max(pa.prototype.corner,Math.min(h.width,q.x-h.x)));this.state.style.height=Math.round(Math.max(1.5*pa.prototype.corner,Math.min(h.height,q.y-h.y)))},!1)]},process:function(c){var h=[Ra(c,["size"],function(q){var l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),p=parseFloat(mxUtils.getValue(this.state.style,"size",X.prototype.size));return l?new mxPoint(q.x+p,q.y+q.height/ +(p.isTableRow(c.cell)||p.isTableCell(c.cell))){l=p.getSwimlaneDirection(c.style);var v=p.model.getParent(c.cell);v=p.model.getChildCells(v,!0);for(var w=[],H=0;H<v.length;H++)v[H]!=c.cell&&p.isSwimlane(v[H])&&p.getSwimlaneDirection(p.getCurrentCellStyle(v[H]))==l&&w.push(v[H]);p.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],w)}}));return h},label:nb(),ext:nb(),rectangle:nb(),triangle:nb(),rhombus:nb(),umlLifeline:function(c){return[Ra(c,["size"],function(h){var q= +Math.max(0,Math.min(h.height,parseFloat(mxUtils.getValue(this.state.style,"size",da.prototype.size))));return new mxPoint(h.getCenterX(),h.y+q)},function(h,q){this.state.style.size=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},umlFrame:function(c){return[Ra(c,["width","height"],function(h){var q=Math.max(sa.prototype.corner,Math.min(h.width,mxUtils.getValue(this.state.style,"width",sa.prototype.width))),l=Math.max(1.5*sa.prototype.corner,Math.min(h.height,mxUtils.getValue(this.state.style, +"height",sa.prototype.height)));return new mxPoint(h.x+q,h.y+l)},function(h,q){this.state.style.width=Math.round(Math.max(sa.prototype.corner,Math.min(h.width,q.x-h.x)));this.state.style.height=Math.round(Math.max(1.5*sa.prototype.corner,Math.min(h.height,q.y-h.y)))},!1)]},process:function(c){var h=[Ra(c,["size"],function(q){var l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),p=parseFloat(mxUtils.getValue(this.state.style,"size",Y.prototype.size));return l?new mxPoint(q.x+p,q.y+q.height/ 4):new mxPoint(q.x+q.width*p,q.y+q.height/4)},function(q,l){q="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*q.width,l.x-q.x)):Math.max(0,Math.min(.5,(l.x-q.x)/q.width));this.state.style.size=q},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(fb(c));return h},cross:function(c){return[Ra(c,["size"],function(h){var q=Math.min(h.width,h.height);q=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Ia.prototype.size)))*q/2;return new mxPoint(h.getCenterX()- q,h.getCenterY()-q)},function(h,q){var l=Math.min(h.width,h.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,h.getCenterY()-q.y)/l*2,Math.max(0,h.getCenterX()-q.x)/l*2)))})]},note:function(c){return[Ra(c,["size"],function(h){var q=Math.max(0,Math.min(h.width,Math.min(h.height,parseFloat(mxUtils.getValue(this.state.style,"size",u.prototype.size)))));return new mxPoint(h.x+h.width-q,h.y+q)},function(h,q){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(h.width,h.x+ h.width-q.x),Math.min(h.height,q.y-h.y))))})]},note2:function(c){return[Ra(c,["size"],function(h){var q=Math.max(0,Math.min(h.width,Math.min(h.height,parseFloat(mxUtils.getValue(this.state.style,"size",m.prototype.size)))));return new mxPoint(h.x+h.width-q,h.y+q)},function(h,q){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(h.width,h.x+h.width-q.x),Math.min(h.height,q.y-h.y))))})]},manualInput:function(c){var h=[Ra(c,["size"],function(q){var l=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style, @@ -3414,20 +3412,20 @@ h.width-q.x),Math.min(h.height,q.y-h.y))))})]},note2:function(c){return[Ra(c,["s "base",fa.prototype.base);return new mxPoint(q.x+p*q.width,q.y+q.height-l)},function(q,l){mxUtils.getValue(this.state.style,"base",fa.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(q.height,q.y+q.height-l.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(l.x-q.x)/q.width)))/100},!1),Ra(c,["position2"],function(q){var l=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",fa.prototype.position2)));return new mxPoint(q.x+l*q.width,q.y+q.height)}, function(q,l){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(l.x-q.x)/q.width)))/100},!1),Ra(c,["base"],function(q){var l=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"size",fa.prototype.size))),p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",fa.prototype.position))),v=Math.max(0,Math.min(q.width,mxUtils.getValue(this.state.style,"base",fa.prototype.base)));return new mxPoint(q.x+Math.min(q.width,p*q.width+v),q.y+q.height-l)},function(q,l){var p= Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",fa.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(q.width,l.x-q.x-p*q.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(fb(c));return h},internalStorage:function(c){var h=[Ra(c,["dx","dy"],function(q){var l=Math.max(0,Math.min(q.width,mxUtils.getValue(this.state.style,"dx",Va.prototype.dx))),p=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"dy",Va.prototype.dy))); -return new mxPoint(q.x+l,q.y+p)},function(q,l){this.state.style.dx=Math.round(Math.max(0,Math.min(q.width,l.x-q.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(q.height,l.y-q.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(fb(c));return h},module:function(c){return[Ra(c,["jettyWidth","jettyHeight"],function(h){var q=Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"jettyWidth",Ca.prototype.jettyWidth))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style, -"jettyHeight",Ca.prototype.jettyHeight)));return new mxPoint(h.x+q/2,h.y+2*l)},function(h,q){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(h.width,q.x-h.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(h.height,q.y-h.y))/2)})]},corner:function(c){return[Ra(c,["dx","dy"],function(h){var q=Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"dx",Za.prototype.dx))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"dy",Za.prototype.dy)));return new mxPoint(h.x+ +return new mxPoint(q.x+l,q.y+p)},function(q,l){this.state.style.dx=Math.round(Math.max(0,Math.min(q.width,l.x-q.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(q.height,l.y-q.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(fb(c));return h},module:function(c){return[Ra(c,["jettyWidth","jettyHeight"],function(h){var q=Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"jettyWidth",Aa.prototype.jettyWidth))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style, +"jettyHeight",Aa.prototype.jettyHeight)));return new mxPoint(h.x+q/2,h.y+2*l)},function(h,q){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(h.width,q.x-h.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(h.height,q.y-h.y))/2)})]},corner:function(c){return[Ra(c,["dx","dy"],function(h){var q=Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"dx",Za.prototype.dx))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"dy",Za.prototype.dy)));return new mxPoint(h.x+ q,h.y+l)},function(h,q){this.state.style.dx=Math.round(Math.max(0,Math.min(h.width,q.x-h.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},tee:function(c){return[Ra(c,["dx","dy"],function(h){var q=Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"dx",cb.prototype.dx))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"dy",cb.prototype.dy)));return new mxPoint(h.x+(h.width+q)/2,h.y+l)},function(h,q){this.state.style.dx=Math.round(Math.max(0, 2*Math.min(h.width/2,q.x-h.x-h.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},singleArrow:hb(1),doubleArrow:hb(.5),"mxgraph.arrows2.wedgeArrow":gb(20,20),"mxgraph.arrows2.wedgeArrowDashed":gb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":gb(20,20),folder:function(c){return[Ra(c,["tabWidth","tabHeight"],function(h){var q=Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"tabWidth",F.prototype.tabWidth))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style, "tabHeight",F.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",F.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(q=h.width-q);return new mxPoint(h.x+q,h.y+l)},function(h,q){var l=Math.max(0,Math.min(h.width,q.x-h.x));mxUtils.getValue(this.state.style,"tabPosition",F.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(l=h.width-l);this.state.style.tabWidth=Math.round(l);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},document:function(c){return[Ra(c, -["size"],function(h){var q=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",R.prototype.size))));return new mxPoint(h.x+3*h.width/4,h.y+(1-q)*h.height)},function(h,q){this.state.style.size=Math.max(0,Math.min(1,(h.y+h.height-q.y)/h.height))},!1)]},tape:function(c){return[Ra(c,["size"],function(h){var q=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",O.prototype.size))));return new mxPoint(h.getCenterX(),h.y+q*h.height/2)},function(h,q){this.state.style.size= +["size"],function(h){var q=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",R.prototype.size))));return new mxPoint(h.x+3*h.width/4,h.y+(1-q)*h.height)},function(h,q){this.state.style.size=Math.max(0,Math.min(1,(h.y+h.height-q.y)/h.height))},!1)]},tape:function(c){return[Ra(c,["size"],function(h){var q=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(h.getCenterX(),h.y+q*h.height/2)},function(h,q){this.state.style.size= Math.max(0,Math.min(1,(q.y-h.y)/h.height*2))},!1)]},isoCube2:function(c){return[Ra(c,["isoAngle"],function(h){var q=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",r.isoAngle))))*Math.PI/200;return new mxPoint(h.x,h.y+Math.min(h.width*Math.tan(q),.5*h.height))},function(h,q){this.state.style.isoAngle=Math.max(0,50*(q.y-h.y)/h.height)},!0)]},cylinder2:Xa(x.prototype.size),cylinder3:Xa(B.prototype.size),offPageConnector:function(c){return[Ra(c,["size"],function(h){var q= Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",L.prototype.size))));return new mxPoint(h.getCenterX(),h.y+(1-q)*h.height)},function(h,q){this.state.style.size=Math.max(0,Math.min(1,(h.y+h.height-q.y)/h.height))},!1)]},"mxgraph.basic.rect":function(c){var h=[Graph.createHandle(c,["size"],function(q){var l=Math.max(0,Math.min(q.width/2,q.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(q.x+l,q.y+l)},function(q,l){this.state.style.size= -Math.round(100*Math.max(0,Math.min(q.height/2,q.width/2,l.x-q.x)))/100})];c=Graph.createHandle(c,["indent"],function(q){var l=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(q.x+.75*q.width,q.y+l*q.height/200)},function(q,l){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(l.y-q.y)/q.height)))/100});h.push(c);return h},step:qb(sa.prototype.size,!0,null,!0,sa.prototype.fixedSize),hexagon:qb(K.prototype.size,!0,.5,!0,K.prototype.fixedSize), -curlyBracket:qb(aa.prototype.size,!1),display:qb(Fa.prototype.size,!1),cube:sb(1,e.prototype.size,!1),card:sb(.5,C.prototype.size,!0),loopLimit:sb(.5,H.prototype.size,!0),trapezoid:ub(.5,Q.prototype.size,Q.prototype.fixedSize),parallelogram:ub(1,T.prototype.size,T.prototype.fixedSize)};Graph.createHandle=Ra;Graph.handleFactory=rb;var tb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=tb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var h= +Math.round(100*Math.max(0,Math.min(q.height/2,q.width/2,l.x-q.x)))/100})];c=Graph.createHandle(c,["indent"],function(q){var l=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(q.x+.75*q.width,q.y+l*q.height/200)},function(q,l){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(l.y-q.y)/q.height)))/100});h.push(c);return h},step:qb(ra.prototype.size,!0,null,!0,ra.prototype.fixedSize),hexagon:qb(K.prototype.size,!0,.5,!0,K.prototype.fixedSize), +curlyBracket:qb(aa.prototype.size,!1),display:qb(Fa.prototype.size,!1),cube:sb(1,e.prototype.size,!1),card:sb(.5,C.prototype.size,!0),loopLimit:sb(.5,G.prototype.size,!0),trapezoid:ub(.5,Q.prototype.size,Q.prototype.fixedSize),parallelogram:ub(1,S.prototype.size,S.prototype.fixedSize)};Graph.createHandle=Ra;Graph.handleFactory=rb;var tb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=tb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var h= this.state.style.shape;null==mxCellRenderer.defaultShapes[h]&&null==mxStencilRegistry.getStencil(h)?h=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(h=mxConstants.SHAPE_SWIMLANE);h=rb[h];null==h&&null!=this.state.shape&&this.state.shape.isRoundable()&&(h=rb[mxConstants.SHAPE_RECTANGLE]);null!=h&&(h=h(this.state),null!=h&&(c=null==c?h:c.concat(h)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&& null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);c=rb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var ib=new mxPoint(1,0),jb=new mxPoint(1,0),mb=mxUtils.toRadians(-30);ib=mxUtils.getRotatedPoint(ib,Math.cos(mb),Math.sin(mb));var ob=mxUtils.toRadians(-150);jb=mxUtils.getRotatedPoint(jb,Math.cos(ob),Math.sin(ob));mxEdgeStyle.IsometricConnector=function(c,h,q,l,p){var v=c.view;l=null!=l&&0<l.length?l[0]:null;var w=c.absolutePoints, -I=w[0];w=w[w.length-1];null!=l&&(l=v.transformControlPoint(c,l));null==I&&null!=h&&(I=new mxPoint(h.getCenterX(),h.getCenterY()));null==w&&null!=q&&(w=new mxPoint(q.getCenterX(),q.getCenterY()));var y=ib.x,Z=ib.y,N=jb.x,Ba=jb.y,Qa="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=w&&null!=I){c=function(ka,oa,na){ka-=Ja.x;var ma=oa-Ja.y;oa=(Ba*ka-N*ma)/(y*Ba-Z*N);ka=(Z*ka-y*ma)/(Z*N-y*Ba);Qa?(na&&(Ja=new mxPoint(Ja.x+y*oa,Ja.y+Z*oa),p.push(Ja)),Ja=new mxPoint(Ja.x+N*ka,Ja.y+Ba* -ka)):(na&&(Ja=new mxPoint(Ja.x+N*ka,Ja.y+Ba*ka),p.push(Ja)),Ja=new mxPoint(Ja.x+y*oa,Ja.y+Z*oa));p.push(Ja)};var Ja=I;null==l&&(l=new mxPoint(I.x+(w.x-I.x)/2,I.y+(w.y-I.y)/2));c(l.x,l.y,!0);c(w.x,w.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var yb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,h){if(h==mxEdgeStyle.IsometricConnector){var q=new mxElbowEdgeHandler(c);q.snapToTerminals=!1;return q}return yb.apply(this,arguments)}; +H=w[0];w=w[w.length-1];null!=l&&(l=v.transformControlPoint(c,l));null==H&&null!=h&&(H=new mxPoint(h.getCenterX(),h.getCenterY()));null==w&&null!=q&&(w=new mxPoint(q.getCenterX(),q.getCenterY()));var y=ib.x,Z=ib.y,M=jb.x,Ca=jb.y,Qa="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=w&&null!=H){c=function(la,pa,oa){la-=Ka.x;var ma=pa-Ka.y;pa=(Ca*la-M*ma)/(y*Ca-Z*M);la=(Z*la-y*ma)/(Z*M-y*Ca);Qa?(oa&&(Ka=new mxPoint(Ka.x+y*pa,Ka.y+Z*pa),p.push(Ka)),Ka=new mxPoint(Ka.x+M*la,Ka.y+Ca* +la)):(oa&&(Ka=new mxPoint(Ka.x+M*la,Ka.y+Ca*la),p.push(Ka)),Ka=new mxPoint(Ka.x+y*pa,Ka.y+Z*pa));p.push(Ka)};var Ka=H;null==l&&(l=new mxPoint(H.x+(w.x-H.x)/2,H.y+(w.y-H.y)/2));c(l.x,l.y,!0);c(w.x,w.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var yb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,h){if(h==mxEdgeStyle.IsometricConnector){var q=new mxElbowEdgeHandler(c);q.snapToTerminals=!1;return q}return yb.apply(this,arguments)}; d.prototype.constraints=[];k.prototype.getConstraints=function(c,h,q){c=[];var l=Math.tan(mxUtils.toRadians(30)),p=(.5-l)/2;l=Math.min(h,q/(.5+l));h=(h-l)/2;q=(q-l)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q+.25*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h+.5*l,q+l*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h+l,q+.25*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h+l,q+.75*l));c.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,h+.5*l,q+(1-p)*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q+.75*l));return c};r.prototype.getConstraints=function(c,h,q){c=[];var l=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;l=Math.min(h*Math.tan(l),.5*q);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,l));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,h,q-l));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q-l));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));return c};fa.prototype.getConstraints=function(c,h,q){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var l=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style, @@ -3447,22 +3445,22 @@ parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnect 0),!1,null,.5*l,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,p)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),p))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-.5*l,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,p)),c.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,.5*(h-l),p)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.25*(q-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*(q-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.75*(q-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null, 0,.25*(q-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(q-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(q-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Va.prototype.constraints=mxRectangleShape.prototype.constraints;z.prototype.constraints= -mxRectangleShape.prototype.constraints;W.prototype.constraints=mxEllipse.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;ea.prototype.constraints=mxEllipse.prototype.constraints;Ma.prototype.constraints=mxEllipse.prototype.constraints;Ya.prototype.constraints=mxRectangleShape.prototype.constraints;La.prototype.constraints=mxRectangleShape.prototype.constraints;Fa.prototype.getConstraints=function(c,h,q){c=[];var l=Math.min(h,q/2),p=Math.min(h-l,Math.max(0,parseFloat(mxUtils.getValue(this.style, +mxRectangleShape.prototype.constraints;X.prototype.constraints=mxEllipse.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;ea.prototype.constraints=mxEllipse.prototype.constraints;Ma.prototype.constraints=mxEllipse.prototype.constraints;Ya.prototype.constraints=mxRectangleShape.prototype.constraints;La.prototype.constraints=mxRectangleShape.prototype.constraints;Fa.prototype.getConstraints=function(c,h,q){c=[];var l=Math.min(h,q/2),p=Math.min(h-l,Math.max(0,parseFloat(mxUtils.getValue(this.style, "size",this.size)))*h);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+h-l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+h-l),q));c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,p,q));return c};Ca.prototype.getConstraints=function(c,h,q){h=parseFloat(mxUtils.getValue(c,"jettyWidth",Ca.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",Ca.prototype.jettyHeight));var l=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,h),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1, +0),!1,null,p,q));return c};Aa.prototype.getConstraints=function(c,h,q){h=parseFloat(mxUtils.getValue(c,"jettyWidth",Aa.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",Aa.prototype.jettyHeight));var l=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,h),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1, .25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,h),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(q-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(q- -.5*c,3.5*c))];q>5*c&&l.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,h));q>8*c&&l.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,h));q>15*c&&l.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,h));return l};H.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0), -new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];U.prototype.constraints= +.5*c,3.5*c))];q>5*c&&l.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,h));q>8*c&&l.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,h));q>15*c&&l.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,h));return l};G.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0), +new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];J.prototype.constraints= [new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];qa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5, 0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5, 0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];D.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0, -0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];O.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0, -.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];sa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5, +0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0, +.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];ra.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5, 1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75, -.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];wa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5, +.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ta.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5, 0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1, .5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13, -.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];T.prototype.constraints=mxRectangleShape.prototype.constraints;Q.prototype.constraints=mxRectangleShape.prototype.constraints;R.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25, +.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];S.prototype.constraints=mxRectangleShape.prototype.constraints;Q.prototype.constraints=mxRectangleShape.prototype.constraints;R.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25, 0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;cb.prototype.getConstraints=function(c,h,q){c=[];var l=Math.max(0, Math.min(h,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),p=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1, null,.75*h+.25*l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),.5*(q+p)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),q));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),.5*(q+p)));c.push(new mxConnectionConstraint(new mxPoint(0,0), @@ -3485,10 +3483,10 @@ window.openFile.setConsumer(mxUtils.bind(this,function(m,r){try{var x=mxUtils.pa null,Editor.ctrlKey+"+Shift+S").isEnabled=k;this.addAction("export...",function(){e.showDialog((new ExportDialog(e)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var m=new EditDiagramDialog(e);e.showDialog(m.container,620,420,!0,!1);m.init()});this.addAction("pageSetup...",function(){e.showDialog((new PageSetupDialog(e)).container,320,240,!0,!0)}).isEnabled=k;this.addAction("print...",function(){e.showDialog((new PrintDialog(e)).container,300,180,!0,!0)},null,"sprite-print", Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){e.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){e.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var m=null;try{m=e.copyXml(),null!=m&&d.removeCells(m,!1)}catch(r){}null==m&&mxClipboard.cut(d)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{e.copyXml()}catch(m){}try{mxClipboard.copy(d)}catch(m){e.handleError(m)}}, null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var m=!1;try{Editor.enableNativeCipboard&&(e.readGraphModelFromClipboard(function(r){if(null!=r){d.getModel().beginUpdate();try{e.pasteXml(r,!0)}finally{d.getModel().endUpdate()}}else mxClipboard.paste(d)}),m=!0)}catch(r){}m||mxClipboard.paste(d)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(m){function r(B){if(null!=B){for(var D=!0,F=0;F< -B.length&&D;F++)D=D&&d.model.isEdge(B[F]);var J=d.view.translate;F=d.view.scale;var C=J.x,O=J.y;J=null;if(1==B.length&&D){var R=d.getCellGeometry(B[0]);null!=R&&(J=R.getTerminalPoint(!0))}J=null!=J?J:d.getBoundingBoxFromGeometry(B,D);null!=J&&(D=Math.round(d.snap(d.popupMenuHandler.triggerX/F-C)),F=Math.round(d.snap(d.popupMenuHandler.triggerY/F-O)),d.cellsMoved(B,D-J.x,F-J.y))}}function x(){d.getModel().beginUpdate();try{r(mxClipboard.paste(d))}finally{d.getModel().endUpdate()}}if(d.isEnabled()&& +B.length&&D;F++)D=D&&d.model.isEdge(B[F]);var I=d.view.translate;F=d.view.scale;var C=I.x,N=I.y;I=null;if(1==B.length&&D){var R=d.getCellGeometry(B[0]);null!=R&&(I=R.getTerminalPoint(!0))}I=null!=I?I:d.getBoundingBoxFromGeometry(B,D);null!=I&&(D=Math.round(d.snap(d.popupMenuHandler.triggerX/F-C)),F=Math.round(d.snap(d.popupMenuHandler.triggerY/F-N)),d.cellsMoved(B,D-I.x,F-I.y))}}function x(){d.getModel().beginUpdate();try{r(mxClipboard.paste(d))}finally{d.getModel().endUpdate()}}if(d.isEnabled()&& !d.isCellLocked(d.getDefaultParent())){m=!1;try{Editor.enableNativeCipboard&&(e.readGraphModelFromClipboard(function(B){if(null!=B){d.getModel().beginUpdate();try{r(e.pasteXml(B,!0))}finally{d.getModel().endUpdate()}}else x()}),m=!0)}catch(B){}m||x()}});this.addAction("copySize",function(){var m=d.getSelectionCell();d.isEnabled()&&null!=m&&d.getModel().isVertex(m)&&(m=d.getCellGeometry(m),null!=m&&(e.copiedSize=new mxRectangle(m.x,m.y,m.width,m.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize", function(){if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=e.copiedSize){d.getModel().beginUpdate();try{for(var m=d.getResizableCells(d.getSelectionCells()),r=0;r<m.length;r++)if(d.getModel().isVertex(m[r])){var x=d.getCellGeometry(m[r]);null!=x&&(x=x.clone(),x.width=e.copiedSize.width,x.height=e.copiedSize.height,d.getModel().setGeometry(m[r],x))}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var m=d.getSelectionCell()||d.getModel().getRoot();d.isEnabled()&& -null!=m&&(m=m.cloneValue(),null==m||isNaN(m.nodeType)||(e.copiedValue=m))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(m,r){function x(F,J){var C=B.getValue(F);J=F.cloneValue(J);J.removeAttribute("placeholders");null==C||isNaN(C.nodeType)||J.setAttribute("placeholders",C.getAttribute("placeholders"));null!=m&&mxEvent.isShiftDown(m)||J.setAttribute("label",d.convertValueToString(F));B.setValue(F,J)}m=null!=r?r:m;var B=d.getModel();if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=e.copiedValue){B.beginUpdate(); +null!=m&&(m=m.cloneValue(),null==m||isNaN(m.nodeType)||(e.copiedValue=m))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(m,r){function x(F,I){var C=B.getValue(F);I=F.cloneValue(I);I.removeAttribute("placeholders");null==C||isNaN(C.nodeType)||I.setAttribute("placeholders",C.getAttribute("placeholders"));null!=m&&mxEvent.isShiftDown(m)||I.setAttribute("label",d.convertValueToString(F));B.setValue(F,I)}m=null!=r?r:m;var B=d.getModel();if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=e.copiedValue){B.beginUpdate(); try{var D=d.getEditableCells(d.getSelectionCells());if(0==D.length)x(B.getRoot(),e.copiedValue);else for(r=0;r<D.length;r++)x(D[r],e.copiedValue)}finally{B.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(m,r){m=null!=r?r:m;null!=m&&mxEvent.isShiftDown(m)?b():a(null!=m&&(mxEvent.isControlDown(m)||mxEvent.isMetaDown(m)||mxEvent.isAltDown(m)))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)});this.addAction("deleteLabels",function(){b()},null,null,Editor.ctrlKey+ "+Delete");this.addAction("duplicate",function(){try{d.setSelectionCells(d.duplicateCells()),d.scrollCellToVisible(d.getSelectionCell())}catch(m){e.handleError(m)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var m=e.getSelectionState();if(null!=m.mergeCell){d.getModel().beginUpdate();try{d.setCellStyles("rowspan",m.rowspan,[m.mergeCell]),d.setCellStyles("colspan",m.colspan,[m.mergeCell])}finally{d.getModel().endUpdate()}}}));this.put("unmergeCells", new Action(mxResources.get("unmerge"),function(){var m=e.getSelectionState();if(0<m.cells.length){d.getModel().beginUpdate();try{d.setCellStyles("rowspan",null,m.cells),d.setCellStyles("colspan",null,m.cells)}finally{d.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(m,r){m=null!=r?r:m;d.turnShapes(d.getResizableCells(d.getSelectionCells()),null!=m?mxEvent.isShiftDown(m):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R")); @@ -3503,7 +3501,7 @@ B)});e.showDialog(r.container,320,200,!0,!0);r.init()}},null,null,"Alt+Shift+T") null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),e.actions.get("image").funct())})).isEnabled=k;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&e.showLinkDialog("",mxResources.get("insert"),function(m,r,x){m=mxUtils.trim(m);if(0<m.length){var B=null,D=d.getLinkTitle(m);null!=r&&0<r.length&&(B=r[0].iconUrl, D=r[0].name||r[0].type,D=D.charAt(0).toUpperCase()+D.substring(1),30<D.length&&(D=D.substring(0,30)+"..."));r=new mxCell(D,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=B?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+B:"spacing=10;"));r.vertex=!0;B=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry([r],!0));r.geometry.x=B.x;r.geometry.y=B.y;d.setAttributeForCell(r,"linkTarget",x);d.setLinkForCell(r,m);d.cellSizeUpdated(r, !0);d.getModel().beginUpdate();try{r=d.addCell(r),d.fireEvent(new mxEventObject("cellsInserted","cells",[r]))}finally{d.getModel().endUpdate()}d.setSelectionCell(r);d.scrollCellToVisible(d.getSelectionCell())}},!0)})).isEnabled=k;this.addAction("link...",mxUtils.bind(this,function(){if(d.isEnabled())if(d.cellEditor.isContentEditing()){var m=d.getSelectedElement(),r=d.getParentByName(m,"A",d.cellEditor.textarea),x="";if(null==r&&null!=m&&null!=m.getElementsByTagName)for(var B=m.getElementsByTagName("a"), -D=0;D<B.length&&null==r;D++)B[D].textContent==m.textContent&&(r=B[D]);null!=r&&"A"==r.nodeName&&(x=r.getAttribute("href")||"",d.selectNode(r));var F=d.cellEditor.saveSelection();e.showLinkDialog(x,mxResources.get("apply"),mxUtils.bind(this,function(J){d.cellEditor.restoreSelection(F);null!=J&&d.insertLink(J)}))}else d.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=k;this.addAction("autosize",function(){var m=d.getSelectionCells();if(null!=m){d.getModel().beginUpdate(); +D=0;D<B.length&&null==r;D++)B[D].textContent==m.textContent&&(r=B[D]);null!=r&&"A"==r.nodeName&&(x=r.getAttribute("href")||"",d.selectNode(r));var F=d.cellEditor.saveSelection();e.showLinkDialog(x,mxResources.get("apply"),mxUtils.bind(this,function(I){d.cellEditor.restoreSelection(F);null!=I&&d.insertLink(I)}))}else d.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=k;this.addAction("autosize",function(){var m=d.getSelectionCells();if(null!=m){d.getModel().beginUpdate(); try{for(var r=0;r<m.length;r++){var x=m[r];0<d.getModel().getChildCount(x)?d.updateGroupBounds([x],0,!0):d.updateCellSize(x)}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){d.snapCellsToGrid(d.getSelectionCells(),d.gridSize)});this.addAction("formattedText",function(){d.stopEditing();var m=d.getCommonStyle(d.getSelectionCells());m="1"==mxUtils.getValue(m,"html","0")?null:"1";d.getModel().beginUpdate();try{for(var r=d.getEditableCells(d.getSelectionCells()), x=0;x<r.length;x++)if(state=d.getView().getState(r[x]),null!=state){var B=mxUtils.getValue(state.style,"html","0");if("1"==B&&null==m){var D=d.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(D=D.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var F=document.createElement("div");F.innerHTML=d.sanitizeHtml(D);D=mxUtils.extractTextWithWhitespace(F.childNodes);d.cellLabelChanged(state.cell,D);d.setCellStyles("html",m,[r[x]])}else"0"==B&&"1"==m&&(D=mxUtils.htmlEntities(d.convertValueToString(state.cell), !1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(D=D.replace(/\n/g,"<br/>")),d.cellLabelChanged(state.cell,d.sanitizeHtml(D)),d.setCellStyles("html",m,[r[x]]))}e.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=m?m:"0"],"cells",r))}finally{d.getModel().endUpdate()}});this.addAction("wordWrap",function(){var m=d.getView().getState(d.getSelectionCell()),r="wrap";d.stopEditing();null!=m&&"wrap"==m.style[mxConstants.STYLE_WHITE_SPACE]&&(r=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE, @@ -3520,7 +3518,7 @@ n.isEnabled=k;n=this.addAction("scrollbars",function(){e.setScrollbars(!e.hasScr null,"Alt+Shift+A");n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionArrowsEnabled});n=this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());e.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});n=this.addAction("copyConnect",function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget()); e.fireEvent(new mxEventObject("copyConnectChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});n.isEnabled=k;n=this.addAction("autosave",function(){e.editor.setAutosave(!e.editor.autosave)});n.setToggleAction(!0);n.setSelectedCallback(function(){return e.editor.autosave});n.isEnabled=k;n.visible=!1;this.addAction("help",function(){var m="";mxResources.isLanguageSupported(mxClient.language)&&(m="_"+mxClient.language);d.openLink(RESOURCES_PATH+ "/help"+m+".html")});var u=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){u||(e.showDialog((new AboutDialog(e)).container,320,280,!0,!0,function(){u=!1}),u=!0)}));n=mxUtils.bind(this,function(m,r,x,B){return this.addAction(m,function(){if(null!=x&&d.cellEditor.isContentEditing())x();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var D=d.getEditableCells(d.getSelectionCells());d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,r,D);(r&mxConstants.FONT_BOLD)== -mxConstants.FONT_BOLD?d.updateLabelElements(D,function(J){J.style.fontWeight=null;"B"==J.nodeName&&d.replaceElement(J)}):(r&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?d.updateLabelElements(D,function(J){J.style.fontStyle=null;"I"==J.nodeName&&d.replaceElement(J)}):(r&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(D,function(J){J.style.textDecoration=null;"U"==J.nodeName&&d.replaceElement(J)});for(var F=0;F<D.length;F++)0==d.model.getChildCount(D[F])&&d.autoSizeCell(D[F], +mxConstants.FONT_BOLD?d.updateLabelElements(D,function(I){I.style.fontWeight=null;"B"==I.nodeName&&d.replaceElement(I)}):(r&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?d.updateLabelElements(D,function(I){I.style.fontStyle=null;"I"==I.nodeName&&d.replaceElement(I)}):(r&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(D,function(I){I.style.textDecoration=null;"U"==I.nodeName&&d.replaceElement(I)});for(var F=0;F<D.length;F++)0==d.model.getChildCount(D[F])&&d.autoSizeCell(D[F], !1)}finally{d.getModel().endUpdate()}}},null,null,B)});n("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");n("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");n("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){e.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...", function(){e.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){e.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){e.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){e.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){e.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){e.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL, !0)});this.addAction("shadow",function(){e.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,null),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dashed",function(){d.getModel().beginUpdate(); @@ -3534,10 +3532,10 @@ null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function d.getModel().getParent(m),F=d.getCellGeometry(m);D=Math.round(d.snap(d.popupMenuHandler.triggerX/B-D));B=Math.round(d.snap(d.popupMenuHandler.triggerY/B-x));r.addPointAt(r.state,D,B)}}});this.addAction("removeWaypoint",function(){var m=e.actions.get("removeWaypoint");null!=m.handler&&m.handler.removePoint(m.handler.state,m.index)});this.addAction("clearWaypoints",function(m,r){m=null!=r?r:m;var x=d.getSelectionCells();if(null!=x){x=d.getEditableCells(d.addAllEdges(x));d.getModel().beginUpdate();try{for(var B= 0;B<x.length;B++){var D=x[B];if(d.getModel().isEdge(D)){var F=d.getCellGeometry(D);null!=r&&mxEvent.isShiftDown(m)?(d.setCellStyles(mxConstants.STYLE_EXIT_X,null,[D]),d.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[D]),d.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[D]),d.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[D])):null!=F&&(F=F.clone(),F.points=null,F.x=0,F.y=0,F.offset=null,d.getModel().setGeometry(D,F))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+C");n=this.addAction("subscript", mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");n=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var m=mxResources.get("image")+" ("+mxResources.get("url")+"):",r=d.getView().getState(d.getSelectionCell()), -x="",B=null;null!=r&&(x=r.style[mxConstants.STYLE_IMAGE]||x,B=r.style[mxConstants.STYLE_CLIP_PATH]||B);var D=d.cellEditor.saveSelection();e.showImageDialog(m,x,function(F,J,C,O,R,T){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(D),d.insertImage(F,J,C);else{var Q=d.getSelectionCells();if(null!=F&&(0<F.length||0<Q.length)){var aa=null;d.getModel().beginUpdate();try{if(0==Q.length){Q=[d.insertVertex(d.getDefaultParent(),null,"",0,0,J,C,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")]; -var S=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(Q,!0));Q[0].geometry.x=S.x;Q[0].geometry.y=S.y;null!=O&&f(Q[0],O,R,T,d);aa=Q;d.fireEvent(new mxEventObject("cellsInserted","cells",aa))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<F.length?F:null,Q);var P=d.getCurrentCellStyle(Q[0]);"image"!=P[mxConstants.STYLE_SHAPE]&&"label"!=P[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",Q):0==F.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,Q);null==O&&d.setCellStyles(mxConstants.STYLE_CLIP_PATH, -null,Q);if(null!=J&&null!=C)for(F=0;F<Q.length;F++){var X=Q[F];if("0"!=d.getCurrentCellStyle(X).expand){var ha=d.getModel().getGeometry(X);null!=ha&&(ha=ha.clone(),ha.width=J,ha.height=C,d.getModel().setGeometry(X,ha))}null!=O&&f(X,O,R,T,d)}}finally{d.getModel().endUpdate()}null!=aa&&(d.setSelectionCells(aa),d.scrollCellToVisible(aa[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing(),!0,B)}}).isEnabled=k;this.addAction("crop...",function(){var m=d.getSelectionCell();if(d.isEnabled()&& -!d.isCellLocked(d.getDefaultParent())&&null!=m){var r=d.getCurrentCellStyle(m),x=r[mxConstants.STYLE_IMAGE],B=r[mxConstants.STYLE_SHAPE];x&&"image"==B&&(r=new CropImageDialog(e,x,r[mxConstants.STYLE_CLIP_PATH],function(D,F,J){f(m,D,F,J,d)}),e.showDialog(r.container,300,390,!0,!0))}}).isEnabled=k;n=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(e,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show", +x="",B=null;null!=r&&(x=r.style[mxConstants.STYLE_IMAGE]||x,B=r.style[mxConstants.STYLE_CLIP_PATH]||B);var D=d.cellEditor.saveSelection();e.showImageDialog(m,x,function(F,I,C,N,R,S){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(D),d.insertImage(F,I,C);else{var Q=d.getSelectionCells();if(null!=F&&(0<F.length||0<Q.length)){var aa=null;d.getModel().beginUpdate();try{if(0==Q.length){Q=[d.insertVertex(d.getDefaultParent(),null,"",0,0,I,C,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")]; +var U=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(Q,!0));Q[0].geometry.x=U.x;Q[0].geometry.y=U.y;null!=N&&f(Q[0],N,R,S,d);aa=Q;d.fireEvent(new mxEventObject("cellsInserted","cells",aa))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<F.length?F:null,Q);var P=d.getCurrentCellStyle(Q[0]);"image"!=P[mxConstants.STYLE_SHAPE]&&"label"!=P[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",Q):0==F.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,Q);null==N&&d.setCellStyles(mxConstants.STYLE_CLIP_PATH, +null,Q);if(null!=I&&null!=C)for(F=0;F<Q.length;F++){var Y=Q[F];if("0"!=d.getCurrentCellStyle(Y).expand){var ja=d.getModel().getGeometry(Y);null!=ja&&(ja=ja.clone(),ja.width=I,ja.height=C,d.getModel().setGeometry(Y,ja))}null!=N&&f(Y,N,R,S,d)}}finally{d.getModel().endUpdate()}null!=aa&&(d.setSelectionCells(aa),d.scrollCellToVisible(aa[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing(),!0,B)}}).isEnabled=k;this.addAction("crop...",function(){var m=d.getSelectionCell();if(d.isEnabled()&& +!d.isCellLocked(d.getDefaultParent())&&null!=m){var r=d.getCurrentCellStyle(m),x=r[mxConstants.STYLE_IMAGE],B=r[mxConstants.STYLE_SHAPE];x&&"image"==B&&(r=new CropImageDialog(e,x,r[mxConstants.STYLE_CLIP_PATH],function(D,F,I){f(m,D,F,I,d)}),e.showDialog(r.container,300,390,!0,!0))}}).isEnabled=k;n=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(e,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show", mxUtils.bind(this,function(){e.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){e.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),e.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()})); n=this.addAction("formatPanel",mxUtils.bind(this,function(){e.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return 0<e.formatWidth}));n=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(e,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){e.fireEvent(new mxEventObject("outline"))})), this.outlineWindow.window.addListener("hide",function(){e.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),e.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var m= @@ -3577,13 +3575,13 @@ x&&0<x.length&&(f.scrollCellToVisible(x[0]),f.setSelectionCells(x))}),b):(n&&(b= null,"geIcon geSprite geSprite-insertcolumnafter"),b.setAttribute("title",mxResources.get("insertColumnAfter")),b=a.addItem(mxResources.get("deleteColumn"),null,mxUtils.bind(this,function(){if(null!=e)try{k?f.deleteLane(e):f.deleteTableColumn(e)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-deletecolumn"),b.setAttribute("title",mxResources.get("deleteColumn"))),u&&(b=a.addItem(mxResources.get("insertRowBefore"),null,mxUtils.bind(this,function(){try{k?f.insertLane(e,!0):f.insertTableRow(e, !0)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-insertrowbefore"),b.setAttribute("title",mxResources.get("insertRowBefore")),b=a.addItem(mxResources.get("insertRowAfter"),null,mxUtils.bind(this,function(){try{k?f.insertLane(e,!1):f.insertTableRow(e,!1)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-insertrowafter"),b.setAttribute("title",mxResources.get("insertRowAfter")),b=a.addItem(mxResources.get("deleteRow"),null,mxUtils.bind(this,function(){try{k? f.deleteLane(e):f.deleteTableRow(e)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-deleterow"),b.setAttribute("title",mxResources.get("deleteRow")),u=this.editorUi.getSelectionState(),null!=u.mergeCell?this.addMenuItem(a,"mergeCells"):(1<u.style.colspan||1<u.style.rowspan)&&this.addMenuItem(a,"unmergeCells")))}; -Menus.prototype.addInsertTableItem=function(a,b,f,e){function g(D){n=d.getParentByName(mxEvent.getSource(D),"TD");var F=!1;if(null!=n){k=d.getParentByName(n,"TR");var J=mxEvent.isMouseEvent(D)?2:4,C=x,O=Math.min(20,k.sectionRowIndex+J);J=Math.min(20,n.cellIndex+J);for(var R=C.rows.length;R<O;R++)for(var T=C.insertRow(R),Q=0;Q<C.rows[0].cells.length;Q++)T.insertCell(-1);for(R=0;R<C.rows.length;R++)for(T=C.rows[R],Q=T.cells.length;Q<J;Q++)T.insertCell(-1);B.innerHTML=n.cellIndex+1+"x"+(k.sectionRowIndex+ -1);for(C=0;C<x.rows.length;C++)for(O=x.rows[C],J=0;J<O.cells.length;J++)R=O.cells[J],C==k.sectionRowIndex&&J==n.cellIndex&&(F="blue"==R.style.backgroundColor),R.style.backgroundColor=C<=k.sectionRowIndex&&J<=n.cellIndex?"blue":"transparent"}mxEvent.consume(D);return F}e=null!=e?e:!0;b=null!=b?b:mxUtils.bind(this,function(D,F,J){var C=this.editorUi.editor.graph;if(null!=C.getParentByName(mxEvent.getSource(D),"TD")&&null!=C.cellEditor.textarea){var O=C.cellEditor.textarea.getElementsByTagName("table"); -D=[];for(var R=0;R<O.length;R++)D.push(O[R]);C.container.focus();R=C.pasteHtmlAtCaret;O=["<table>"];for(var T=0;T<F;T++){O.push("<tr>");for(var Q=0;Q<J;Q++)O.push("<td><br></td>");O.push("</tr>")}O.push("</table>");F=O.join("");R.call(C,F);F=C.cellEditor.textarea.getElementsByTagName("table");if(F.length==D.length+1)for(R=F.length-1;0<=R;R--)if(0==R||F[R]!=D[R-1]){C.selectNode(F[R].rows[0].cells[0]);break}}});var d=this.editorUi.editor.graph,k=null,n=null;null==f&&(a.div.className+=" geToolbarMenu", +Menus.prototype.addInsertTableItem=function(a,b,f,e){function g(D){n=d.getParentByName(mxEvent.getSource(D),"TD");var F=!1;if(null!=n){k=d.getParentByName(n,"TR");var I=mxEvent.isMouseEvent(D)?2:4,C=x,N=Math.min(20,k.sectionRowIndex+I);I=Math.min(20,n.cellIndex+I);for(var R=C.rows.length;R<N;R++)for(var S=C.insertRow(R),Q=0;Q<C.rows[0].cells.length;Q++)S.insertCell(-1);for(R=0;R<C.rows.length;R++)for(S=C.rows[R],Q=S.cells.length;Q<I;Q++)S.insertCell(-1);B.innerHTML=n.cellIndex+1+"x"+(k.sectionRowIndex+ +1);for(C=0;C<x.rows.length;C++)for(N=x.rows[C],I=0;I<N.cells.length;I++)R=N.cells[I],C==k.sectionRowIndex&&I==n.cellIndex&&(F="blue"==R.style.backgroundColor),R.style.backgroundColor=C<=k.sectionRowIndex&&I<=n.cellIndex?"blue":"transparent"}mxEvent.consume(D);return F}e=null!=e?e:!0;b=null!=b?b:mxUtils.bind(this,function(D,F,I){var C=this.editorUi.editor.graph;if(null!=C.getParentByName(mxEvent.getSource(D),"TD")&&null!=C.cellEditor.textarea){var N=C.cellEditor.textarea.getElementsByTagName("table"); +D=[];for(var R=0;R<N.length;R++)D.push(N[R]);C.container.focus();R=C.pasteHtmlAtCaret;N=["<table>"];for(var S=0;S<F;S++){N.push("<tr>");for(var Q=0;Q<I;Q++)N.push("<td><br></td>");N.push("</tr>")}N.push("</table>");F=N.join("");R.call(C,F);F=C.cellEditor.textarea.getElementsByTagName("table");if(F.length==D.length+1)for(R=F.length-1;0<=R;R--)if(0==R||F[R]!=D[R-1]){C.selectNode(F[R].rows[0].cells[0]);break}}});var d=this.editorUi.editor.graph,k=null,n=null;null==f&&(a.div.className+=" geToolbarMenu", a.labels=!1);a=a.addItem("",null,null,f,null,null,null,!0);a.firstChild.style.fontSize=Menus.prototype.defaultFontSize+"px";f=a.getElementsByTagName("td");1<f.length&&(f[1].style.display="none",f[2].style.display="none");a.firstChild.innerText="";var u=document.createElement("input");u.setAttribute("id","geTitleOption");u.setAttribute("type","checkbox");f=document.createElement("label");mxUtils.write(f,mxResources.get("title"));f.setAttribute("for","geTitleOption");mxEvent.addGestureListeners(f,null, null,mxUtils.bind(this,function(D){mxEvent.consume(D)}));mxEvent.addGestureListeners(u,null,null,mxUtils.bind(this,function(D){mxEvent.consume(D)}));var m=document.createElement("input");m.setAttribute("id","geContainerOption");m.setAttribute("type","checkbox");var r=document.createElement("label");mxUtils.write(r,mxResources.get("container"));r.setAttribute("for","geContainerOption");mxEvent.addGestureListeners(r,null,null,mxUtils.bind(this,function(D){mxEvent.consume(D)}));mxEvent.addGestureListeners(m, -null,null,mxUtils.bind(this,function(D){mxEvent.consume(D)}));e&&(a.firstChild.appendChild(u),a.firstChild.appendChild(f),mxUtils.br(a.firstChild),a.firstChild.appendChild(m),a.firstChild.appendChild(r),mxUtils.br(a.firstChild),mxUtils.br(a.firstChild));var x=function(D,F){var J=document.createElement("table");J.setAttribute("border","1");J.style.borderCollapse="collapse";J.style.borderStyle="solid";J.setAttribute("cellPadding","8");for(var C=0;C<D;C++)for(var O=J.insertRow(C),R=0;R<F;R++)O.insertCell(-1); -return J}(5,5);a.firstChild.appendChild(x);var B=document.createElement("div");B.style.padding="4px";B.innerHTML="1x1";a.firstChild.appendChild(B);mxEvent.addGestureListeners(x,null,null,mxUtils.bind(this,function(D){var F=g(D);null!=n&&null!=k&&F&&(b(D,k.sectionRowIndex+1,n.cellIndex+1,u.checked,m.checked),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0))}));mxEvent.addListener(x,"mouseover",g)}; +null,null,mxUtils.bind(this,function(D){mxEvent.consume(D)}));e&&(a.firstChild.appendChild(u),a.firstChild.appendChild(f),mxUtils.br(a.firstChild),a.firstChild.appendChild(m),a.firstChild.appendChild(r),mxUtils.br(a.firstChild),mxUtils.br(a.firstChild));var x=function(D,F){var I=document.createElement("table");I.setAttribute("border","1");I.style.borderCollapse="collapse";I.style.borderStyle="solid";I.setAttribute("cellPadding","8");for(var C=0;C<D;C++)for(var N=I.insertRow(C),R=0;R<F;R++)N.insertCell(-1); +return I}(5,5);a.firstChild.appendChild(x);var B=document.createElement("div");B.style.padding="4px";B.innerHTML="1x1";a.firstChild.appendChild(B);mxEvent.addGestureListeners(x,null,null,mxUtils.bind(this,function(D){var F=g(D);null!=n&&null!=k&&F&&(b(D,k.sectionRowIndex+1,n.cellIndex+1,u.checked,m.checked),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0))}));mxEvent.addListener(x,"mouseover",g)}; Menus.prototype.edgeStyleChange=function(a,b,f,e,g,d,k,n){return this.showIconOnly(a.addItem(b,n,mxUtils.bind(this,function(){var u=this.editorUi.editor.graph;u.stopEditing(!1);u.getModel().beginUpdate();try{for(var m=u.getSelectionCells(),r=[],x=0;x<m.length;x++){var B=m[x];if(u.getModel().isEdge(B)){if(k){var D=u.getCellGeometry(B);null!=D&&(D=D.clone(),D.points=null,u.getModel().setGeometry(B,D))}for(var F=0;F<f.length;F++)u.setCellStyles(f[F],e[F],[B]);r.push(B)}}this.editorUi.fireEvent(new mxEventObject("styleChanged", "keys",f,"values",e,"cells",r))}finally{u.getModel().endUpdate()}}),d,g))};Menus.prototype.showIconOnly=function(a){var b=a.getElementsByTagName("td");for(i=0;i<b.length;i++)"mxPopupMenuItem"==b[i].getAttribute("class")&&(b[i].style.display="none");return a}; Menus.prototype.styleChange=function(a,b,f,e,g,d,k,n,u){var m=this.createStyleChangeFunction(f,e);a=a.addItem(b,null,mxUtils.bind(this,function(){var r=this.editorUi.editor.graph;null!=k&&r.cellEditor.isContentEditing()?k():m(n)}),d,g);u&&this.showIconOnly(a);return a}; @@ -3659,86 +3657,86 @@ Toolbar.prototype.addButton=function(a,b,f,e){a=this.createButton(a);e=null!=e?e Toolbar.prototype.addClickHandler=function(a,b){null!=b&&(mxEvent.addListener(a,"click",function(f){a.enabled&&b(f);mxEvent.consume(f)}),mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(f){f.preventDefault()})))};Toolbar.prototype.createButton=function(a){var b=document.createElement("a");b.className="geButton";var f=document.createElement("div");null!=a&&(f.className="geSprite "+a);b.appendChild(f);return b}; Toolbar.prototype.createLabel=function(a,b){b=document.createElement("a");b.className="geLabel";mxUtils.write(b,a);return b}; Toolbar.prototype.addMenuHandler=function(a,b,f,e){if(null!=f){var g=this.editorUi.editor.graph,d=null,k=!0;mxEvent.addListener(a,"click",mxUtils.bind(this,function(n){if(k&&(null==a.enabled||a.enabled)){g.popupMenuHandler.hideMenu();d=new mxPopupMenu(f);d.div.className+=" geToolbarMenu";d.showDisabled=e;d.labels=b;d.autoExpand=!0;!b&&d.div.scrollHeight>d.div.clientHeight&&(d.div.style.width="40px");d.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(d,arguments);this.editorUi.resetCurrentMenu(); -d.destroy()});var u=mxUtils.getOffset(a);d.popup(u.x,u.y+a.offsetHeight,null,n);this.editorUi.setCurrentMenu(d,a)}k=!0;mxEvent.consume(n)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(n){k=null==d||null==d.div||null==d.div.parentNode;n.preventDefault()}))}};Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.style.maxWidth="100%";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorDialog=function(a,b,f,e){function g(){var J=k.value;/(^#?[a-zA-Z0-9]*$)/.test(J)? -("none"!=J&&"#"!=J.charAt(0)&&(J="#"+J),ColorDialog.addRecentColor("none"!=J?J.substring(1):J,12),n(J),a.hideDialog()):a.handleError({message:mxResources.get("invalidInput")})}function d(){var J=r(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);J.style.marginBottom="8px";return J}this.editorUi=a;var k=document.createElement("input");k.style.marginBottom="10px";mxClient.IS_IE&&(k.style.marginTop="10px",document.body.appendChild(k));var n=null!=f?f:this.createApplyFunction(); -this.init=function(){mxClient.IS_TOUCH||k.focus()};var u=new mxJSColor.color(k);u.pickerOnfocus=!1;u.showPicker();f=document.createElement("div");mxJSColor.picker.box.style.position="relative";mxJSColor.picker.box.style.width="230px";mxJSColor.picker.box.style.height="100px";mxJSColor.picker.box.style.paddingBottom="10px";f.appendChild(mxJSColor.picker.box);var m=document.createElement("center"),r=mxUtils.bind(this,function(J,C,O,R){C=null!=C?C:12;var T=document.createElement("table");T.style.borderCollapse= -"collapse";T.setAttribute("cellspacing","0");T.style.marginBottom="20px";T.style.cellSpacing="0px";T.style.marginLeft="1px";var Q=document.createElement("tbody");T.appendChild(Q);for(var aa=J.length/C,S=0;S<aa;S++){for(var P=document.createElement("tr"),X=0;X<C;X++)mxUtils.bind(this,function(ha){var fa=document.createElement("td");fa.style.border="0px solid black";fa.style.padding="0px";fa.style.width="16px";fa.style.height="16px";null==ha&&(ha=O);if(null!=ha){fa.style.borderWidth="1px";"none"==ha? -fa.style.background="url('"+Dialog.prototype.noColorImage+"')":fa.style.backgroundColor="#"+ha;var sa=this.colorNames[ha.toUpperCase()];null!=sa&&fa.setAttribute("title",sa)}P.appendChild(fa);null!=ha&&(fa.style.cursor="pointer",mxEvent.addListener(fa,"click",function(){"none"==ha?(u.fromString("ffffff"),k.value="none"):u.fromString(ha)}),mxEvent.addListener(fa,"dblclick",g))})(J[S*C+X]);Q.appendChild(P)}R&&(J=document.createElement("td"),J.setAttribute("title",mxResources.get("reset")),J.style.border= -"1px solid black",J.style.padding="0px",J.style.width="16px",J.style.height="16px",J.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')",J.style.backgroundPosition="center center",J.style.backgroundRepeat="no-repeat",J.style.cursor="pointer",P.appendChild(J),mxEvent.addListener(J,"click",function(){ColorDialog.resetRecentColors();T.parentNode.replaceChild(d(),T)}));m.appendChild(T);return T});f.appendChild(k);if(mxClient.IS_IE||mxClient.IS_IE11)k.style.width="216px";else{k.style.width= +d.destroy()});var u=mxUtils.getOffset(a);d.popup(u.x,u.y+a.offsetHeight,null,n);this.editorUi.setCurrentMenu(d,a)}k=!0;mxEvent.consume(n)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(n){k=null==d||null==d.div||null==d.div.parentNode;n.preventDefault()}))}};Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.style.maxWidth="100%";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorDialog=function(a,b,f,e){function g(){var I=k.value;/(^#?[a-zA-Z0-9]*$)/.test(I)? +("none"!=I&&"#"!=I.charAt(0)&&(I="#"+I),ColorDialog.addRecentColor("none"!=I?I.substring(1):I,12),n(I),a.hideDialog()):a.handleError({message:mxResources.get("invalidInput")})}function d(){var I=r(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);I.style.marginBottom="8px";return I}this.editorUi=a;var k=document.createElement("input");k.style.marginBottom="10px";mxClient.IS_IE&&(k.style.marginTop="10px",document.body.appendChild(k));var n=null!=f?f:this.createApplyFunction(); +this.init=function(){mxClient.IS_TOUCH||k.focus()};var u=new mxJSColor.color(k);u.pickerOnfocus=!1;u.showPicker();f=document.createElement("div");mxJSColor.picker.box.style.position="relative";mxJSColor.picker.box.style.width="230px";mxJSColor.picker.box.style.height="100px";mxJSColor.picker.box.style.paddingBottom="10px";f.appendChild(mxJSColor.picker.box);var m=document.createElement("center"),r=mxUtils.bind(this,function(I,C,N,R){C=null!=C?C:12;var S=document.createElement("table");S.style.borderCollapse= +"collapse";S.setAttribute("cellspacing","0");S.style.marginBottom="20px";S.style.cellSpacing="0px";S.style.marginLeft="1px";var Q=document.createElement("tbody");S.appendChild(Q);for(var aa=I.length/C,U=0;U<aa;U++){for(var P=document.createElement("tr"),Y=0;Y<C;Y++)mxUtils.bind(this,function(ja){var fa=document.createElement("td");fa.style.border="0px solid black";fa.style.padding="0px";fa.style.width="16px";fa.style.height="16px";null==ja&&(ja=N);if(null!=ja){fa.style.borderWidth="1px";"none"==ja? +fa.style.background="url('"+Dialog.prototype.noColorImage+"')":fa.style.backgroundColor="#"+ja;var ra=this.colorNames[ja.toUpperCase()];null!=ra&&fa.setAttribute("title",ra)}P.appendChild(fa);null!=ja&&(fa.style.cursor="pointer",mxEvent.addListener(fa,"click",function(){"none"==ja?(u.fromString("ffffff"),k.value="none"):u.fromString(ja)}),mxEvent.addListener(fa,"dblclick",g))})(I[U*C+Y]);Q.appendChild(P)}R&&(I=document.createElement("td"),I.setAttribute("title",mxResources.get("reset")),I.style.border= +"1px solid black",I.style.padding="0px",I.style.width="16px",I.style.height="16px",I.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')",I.style.backgroundPosition="center center",I.style.backgroundRepeat="no-repeat",I.style.cursor="pointer",P.appendChild(I),mxEvent.addListener(I,"click",function(){ColorDialog.resetRecentColors();S.parentNode.replaceChild(d(),S)}));m.appendChild(S);return S});f.appendChild(k);if(mxClient.IS_IE||mxClient.IS_IE11)k.style.width="216px";else{k.style.width= "182px";var x=document.createElement("input");x.setAttribute("type","color");x.style.visibility="hidden";x.style.width="0px";x.style.height="0px";x.style.border="none";x.style.marginLeft="2px";f.style.whiteSpace="nowrap";f.appendChild(x);f.appendChild(mxUtils.button("...",function(){document.activeElement==x?k.focus():(x.value="#"+k.value,x.click())}));mxEvent.addListener(x,"input",function(){u.fromString(x.value.substring(1))})}mxUtils.br(f);d();var B=r(this.presetColors);B.style.marginBottom="8px"; B=r(this.defaultColors);B.style.marginBottom="16px";f.appendChild(m);B=document.createElement("div");B.style.textAlign="right";B.style.whiteSpace="nowrap";var D=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=e&&e()});D.className="geBtn";a.editor.cancelFirst&&B.appendChild(D);var F=mxUtils.button(mxResources.get("apply"),g);F.className="geBtn gePrimaryBtn";B.appendChild(F);a.editor.cancelFirst||B.appendChild(D);null!=b&&("none"==b?(u.fromString("ffffff"),k.value="none"):u.fromString(b)); -f.appendChild(B);this.picker=u;this.colorInput=k;mxEvent.addListener(f,"keydown",function(J){27==J.keyCode&&(a.hideDialog(),null!=e&&e(),mxEvent.consume(J))});this.container=f};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" ");ColorDialog.prototype.colorNames={};ColorDialog.prototype.defaultColors="none FFFFFF E6E6E6 CCCCCC B3B3B3 999999 808080 666666 4D4D4D 333333 1A1A1A 000000 FFCCCC FFE6CC FFFFCC E6FFCC CCFFCC CCFFE6 CCFFFF CCE5FF CCCCFF E5CCFF FFCCFF FFCCE6 FF9999 FFCC99 FFFF99 CCFF99 99FF99 99FFCC 99FFFF 99CCFF 9999FF CC99FF FF99FF FF99CC FF6666 FFB366 FFFF66 B3FF66 66FF66 66FFB3 66FFFF 66B2FF 6666FF B266FF FF66FF FF66B3 FF3333 FF9933 FFFF33 99FF33 33FF33 33FF99 33FFFF 3399FF 3333FF 9933FF FF33FF FF3399 FF0000 FF8000 FFFF00 80FF00 00FF00 00FF80 00FFFF 007FFF 0000FF 7F00FF FF00FF FF0080 CC0000 CC6600 CCCC00 66CC00 00CC00 00CC66 00CCCC 0066CC 0000CC 6600CC CC00CC CC0066 990000 994C00 999900 4D9900 009900 00994D 009999 004C99 000099 4C0099 990099 99004D 660000 663300 666600 336600 006600 006633 006666 003366 000066 330066 660066 660033 330000 331A00 333300 1A3300 003300 00331A 003333 001933 000033 190033 330033 33001A".split(" "); +f.appendChild(B);this.picker=u;this.colorInput=k;mxEvent.addListener(f,"keydown",function(I){27==I.keyCode&&(a.hideDialog(),null!=e&&e(),mxEvent.consume(I))});this.container=f};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" ");ColorDialog.prototype.colorNames={};ColorDialog.prototype.defaultColors="none FFFFFF E6E6E6 CCCCCC B3B3B3 999999 808080 666666 4D4D4D 333333 1A1A1A 000000 FFCCCC FFE6CC FFFFCC E6FFCC CCFFCC CCFFE6 CCFFFF CCE5FF CCCCFF E5CCFF FFCCFF FFCCE6 FF9999 FFCC99 FFFF99 CCFF99 99FF99 99FFCC 99FFFF 99CCFF 9999FF CC99FF FF99FF FF99CC FF6666 FFB366 FFFF66 B3FF66 66FF66 66FFB3 66FFFF 66B2FF 6666FF B266FF FF66FF FF66B3 FF3333 FF9933 FFFF33 99FF33 33FF33 33FF99 33FFFF 3399FF 3333FF 9933FF FF33FF FF3399 FF0000 FF8000 FFFF00 80FF00 00FF00 00FF80 00FFFF 007FFF 0000FF 7F00FF FF00FF FF0080 CC0000 CC6600 CCCC00 66CC00 00CC00 00CC66 00CCCC 0066CC 0000CC 6600CC CC00CC CC0066 990000 994C00 999900 4D9900 009900 00994D 009999 004C99 000099 4C0099 990099 99004D 660000 663300 666600 336600 006600 006633 006666 003366 000066 330066 660066 660033 330000 331A00 333300 1A3300 003300 00331A 003333 001933 000033 190033 330033 33001A".split(" "); ColorDialog.prototype.createApplyFunction=function(){return mxUtils.bind(this,function(a){var b=this.editorUi.editor.graph;b.getModel().beginUpdate();try{b.setCellStyles(this.currentColorKey,a),this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[this.currentColorKey],"values",[a],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}})};ColorDialog.recentColors=[]; ColorDialog.addRecentColor=function(a,b){null!=a&&(mxUtils.remove(a,ColorDialog.recentColors),ColorDialog.recentColors.splice(0,0,a),ColorDialog.recentColors.length>=b&&ColorDialog.recentColors.pop())};ColorDialog.resetRecentColors=function(){ColorDialog.recentColors=[]}; var AboutDialog=function(a){var b=document.createElement("div");b.setAttribute("align","center");var f=document.createElement("h3");mxUtils.write(f,mxResources.get("about")+" GraphEditor");b.appendChild(f);f=document.createElement("img");f.style.border="0px";f.setAttribute("width","176");f.setAttribute("width","151");f.setAttribute("src",IMAGE_PATH+"/logo.png");b.appendChild(f);mxUtils.br(b);mxUtils.write(b,"Powered by mxGraph "+mxClient.VERSION);mxUtils.br(b);f=document.createElement("a");f.setAttribute("href", "http://www.jgraph.com/");f.setAttribute("target","_blank");mxUtils.write(f,"www.jgraph.com");b.appendChild(f);mxUtils.br(b);mxUtils.br(b);f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn gePrimaryBtn";b.appendChild(f);this.container=b},TextareaDialog=function(a,b,f,e,g,d,k,n,u,m,r,x,B,D,F){m=null!=m?m:!1;k=document.createElement("div");k.style.position="absolute";k.style.top="20px";k.style.bottom="20px";k.style.left="20px";k.style.right="20px";n=document.createElement("div"); -n.style.position="absolute";n.style.left="0px";n.style.right="0px";var J=n.cloneNode(!1),C=n.cloneNode(!1);n.style.top="0px";n.style.height="20px";J.style.top="20px";J.style.bottom="64px";C.style.bottom="0px";C.style.height="60px";C.style.textAlign="center";mxUtils.write(n,b);k.appendChild(n);k.appendChild(J);k.appendChild(C);null!=F&&n.appendChild(F);var O=document.createElement("textarea");r&&O.setAttribute("wrap","off");O.setAttribute("spellcheck","false");O.setAttribute("autocorrect","off");O.setAttribute("autocomplete", -"off");O.setAttribute("autocapitalize","off");mxUtils.write(O,f||"");O.style.resize="none";O.style.outline="none";O.style.position="absolute";O.style.boxSizing="border-box";O.style.top="0px";O.style.left="0px";O.style.height="100%";O.style.width="100%";this.textarea=O;this.init=function(){O.focus();O.scrollTop=0};J.appendChild(O);null!=B&&(b=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(B)}),b.className="geBtn",C.appendChild(b));if(null!=D)for(b=0;b<D.length;b++)(function(T, -Q,aa){T=mxUtils.button(T,function(S){Q(S,O)});null!=aa&&T.setAttribute("title",aa);T.className="geBtn";C.appendChild(T)})(D[b][0],D[b][1],D[b][2]);d=mxUtils.button(d||mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});d.setAttribute("title","Escape");d.className="geBtn";a.editor.cancelFirst&&C.appendChild(d);null!=u&&u(C,O);if(null!=e){var R=mxUtils.button(x||mxResources.get("apply"),function(){m||a.hideDialog();e(O.value)});R.setAttribute("title","Ctrl+Enter");R.className="geBtn gePrimaryBtn"; -C.appendChild(R);mxEvent.addListener(O,"keypress",function(T){13==T.keyCode&&mxEvent.isControlDown(T)&&R.click()})}a.editor.cancelFirst||C.appendChild(d);this.container=k},EditDiagramDialog=function(a){var b=document.createElement("div");b.style.textAlign="right";var f=document.createElement("textarea");f.setAttribute("wrap","off");f.setAttribute("spellcheck","false");f.setAttribute("autocorrect","off");f.setAttribute("autocomplete","off");f.setAttribute("autocapitalize","off");f.style.overflow="auto"; +n.style.position="absolute";n.style.left="0px";n.style.right="0px";var I=n.cloneNode(!1),C=n.cloneNode(!1);n.style.top="0px";n.style.height="20px";I.style.top="20px";I.style.bottom="64px";C.style.bottom="0px";C.style.height="60px";C.style.textAlign="center";mxUtils.write(n,b);k.appendChild(n);k.appendChild(I);k.appendChild(C);null!=F&&n.appendChild(F);var N=document.createElement("textarea");r&&N.setAttribute("wrap","off");N.setAttribute("spellcheck","false");N.setAttribute("autocorrect","off");N.setAttribute("autocomplete", +"off");N.setAttribute("autocapitalize","off");mxUtils.write(N,f||"");N.style.resize="none";N.style.outline="none";N.style.position="absolute";N.style.boxSizing="border-box";N.style.top="0px";N.style.left="0px";N.style.height="100%";N.style.width="100%";this.textarea=N;this.init=function(){N.focus();N.scrollTop=0};I.appendChild(N);null!=B&&(b=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(B)}),b.className="geBtn",C.appendChild(b));if(null!=D)for(b=0;b<D.length;b++)(function(S, +Q,aa){S=mxUtils.button(S,function(U){Q(U,N)});null!=aa&&S.setAttribute("title",aa);S.className="geBtn";C.appendChild(S)})(D[b][0],D[b][1],D[b][2]);d=mxUtils.button(d||mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});d.setAttribute("title","Escape");d.className="geBtn";a.editor.cancelFirst&&C.appendChild(d);null!=u&&u(C,N);if(null!=e){var R=mxUtils.button(x||mxResources.get("apply"),function(){m||a.hideDialog();e(N.value)});R.setAttribute("title","Ctrl+Enter");R.className="geBtn gePrimaryBtn"; +C.appendChild(R);mxEvent.addListener(N,"keypress",function(S){13==S.keyCode&&mxEvent.isControlDown(S)&&R.click()})}a.editor.cancelFirst||C.appendChild(d);this.container=k},EditDiagramDialog=function(a){var b=document.createElement("div");b.style.textAlign="right";var f=document.createElement("textarea");f.setAttribute("wrap","off");f.setAttribute("spellcheck","false");f.setAttribute("autocorrect","off");f.setAttribute("autocomplete","off");f.setAttribute("autocapitalize","off");f.style.overflow="auto"; f.style.resize="none";f.style.width="600px";f.style.height="360px";f.style.marginBottom="16px";f.value=mxUtils.getPrettyXml(a.editor.getGraphXml());b.appendChild(f);this.init=function(){f.focus()};Graph.fileSupport&&(f.addEventListener("dragover",function(k){k.stopPropagation();k.preventDefault()},!1),f.addEventListener("drop",function(k){k.stopPropagation();k.preventDefault();if(0<k.dataTransfer.files.length){k=k.dataTransfer.files[0];var n=new FileReader;n.onload=function(u){f.value=u.target.result}; n.readAsText(k)}else f.value=a.extractGraphModelFromEvent(k)},!1));var e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&b.appendChild(e);var g=document.createElement("select");g.style.width="180px";g.className="geBtn";if(a.editor.graph.isEnabled()){var d=document.createElement("option");d.setAttribute("value","replace");mxUtils.write(d,mxResources.get("replaceExistingDrawing"));g.appendChild(d)}d=document.createElement("option");d.setAttribute("value", "new");mxUtils.write(d,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&g.appendChild(d);a.editor.graph.isEnabled()&&(d=document.createElement("option"),d.setAttribute("value","import"),mxUtils.write(d,mxResources.get("addToExistingDrawing")),g.appendChild(d));b.appendChild(g);d=mxUtils.button(mxResources.get("ok"),function(){var k=Graph.zapGremlins(mxUtils.trim(f.value)),n=null;if("new"==g.value)a.hideDialog(),a.editor.editAsNew(k);else if("replace"==g.value){a.editor.graph.model.beginUpdate(); try{a.editor.setGraphXml(mxUtils.parseXml(k).documentElement),a.hideDialog()}catch(x){n=x}finally{a.editor.graph.model.endUpdate()}}else if("import"==g.value){a.editor.graph.model.beginUpdate();try{var u=mxUtils.parseXml(k),m=new mxGraphModel;(new mxCodec(u)).decode(u.documentElement,m);var r=m.getChildren(m.getChildAt(m.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(r));a.hideDialog()}catch(x){n=x}finally{a.editor.graph.model.endUpdate()}}null!=n&&mxUtils.alert(n.message)}); d.className="geBtn gePrimaryBtn";b.appendChild(d);a.editor.cancelFirst||b.appendChild(e);this.container=b};EditDiagramDialog.showNewWindowOption=!0; -var ExportDialog=function(a){function b(){var P=r.value,X=P.lastIndexOf(".");r.value=0<X?P.substring(0,X+1)+x.value:P+"."+x.value;"xml"===x.value?(B.setAttribute("disabled","true"),D.setAttribute("disabled","true"),F.setAttribute("disabled","true"),Q.setAttribute("disabled","true")):(B.removeAttribute("disabled"),D.removeAttribute("disabled"),F.removeAttribute("disabled"),Q.removeAttribute("disabled"));"png"===x.value||"svg"===x.value||"pdf"===x.value?R.removeAttribute("disabled"):R.setAttribute("disabled", -"disabled");"png"===x.value||"jpg"===x.value||"pdf"===x.value?T.removeAttribute("disabled"):T.setAttribute("disabled","disabled");"png"===x.value?(J.removeAttribute("disabled"),C.removeAttribute("disabled")):(J.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"))}function f(){D.style.backgroundColor=D.value*F.value>MAX_AREA||0>=D.value?"red":"";F.style.backgroundColor=D.value*F.value>MAX_AREA||0>=F.value?"red":""}var e=a.editor.graph,g=e.getGraphBounds(),d=e.view.scale,k=Math.ceil(g.width/ +var ExportDialog=function(a){function b(){var P=r.value,Y=P.lastIndexOf(".");r.value=0<Y?P.substring(0,Y+1)+x.value:P+"."+x.value;"xml"===x.value?(B.setAttribute("disabled","true"),D.setAttribute("disabled","true"),F.setAttribute("disabled","true"),Q.setAttribute("disabled","true")):(B.removeAttribute("disabled"),D.removeAttribute("disabled"),F.removeAttribute("disabled"),Q.removeAttribute("disabled"));"png"===x.value||"svg"===x.value||"pdf"===x.value?R.removeAttribute("disabled"):R.setAttribute("disabled", +"disabled");"png"===x.value||"jpg"===x.value||"pdf"===x.value?S.removeAttribute("disabled"):S.setAttribute("disabled","disabled");"png"===x.value?(I.removeAttribute("disabled"),C.removeAttribute("disabled")):(I.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"))}function f(){D.style.backgroundColor=D.value*F.value>MAX_AREA||0>=D.value?"red":"";F.style.backgroundColor=D.value*F.value>MAX_AREA||0>=F.value?"red":""}var e=a.editor.graph,g=e.getGraphBounds(),d=e.view.scale,k=Math.ceil(g.width/ d),n=Math.ceil(g.height/d);d=document.createElement("table");var u=document.createElement("tbody");d.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");g=document.createElement("tr");var m=document.createElement("td");m.style.fontSize="10pt";m.style.width="100px";mxUtils.write(m,mxResources.get("filename")+":");g.appendChild(m);var r=document.createElement("input");r.setAttribute("value",a.editor.getOrCreateFilename());r.style.width="180px";m=document.createElement("td");m.appendChild(r);g.appendChild(m); u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("format")+":");g.appendChild(m);var x=document.createElement("select");x.style.width="180px";m=document.createElement("option");m.setAttribute("value","png");mxUtils.write(m,mxResources.get("formatPng"));x.appendChild(m);m=document.createElement("option");ExportDialog.showGifOption&&(m.setAttribute("value","gif"),mxUtils.write(m,mxResources.get("formatGif")),x.appendChild(m)); m=document.createElement("option");m.setAttribute("value","jpg");mxUtils.write(m,mxResources.get("formatJpg"));x.appendChild(m);a.printPdfExport||(m=document.createElement("option"),m.setAttribute("value","pdf"),mxUtils.write(m,mxResources.get("formatPdf")),x.appendChild(m));m=document.createElement("option");m.setAttribute("value","svg");mxUtils.write(m,mxResources.get("formatSvg"));x.appendChild(m);ExportDialog.showXmlOption&&(m=document.createElement("option"),m.setAttribute("value","xml"),mxUtils.write(m, mxResources.get("formatXml")),x.appendChild(m));m=document.createElement("td");m.appendChild(x);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("zoom")+" (%):");g.appendChild(m);var B=document.createElement("input");B.setAttribute("type","number");B.setAttribute("value","100");B.style.width="180px";m=document.createElement("td");m.appendChild(B);g.appendChild(m);u.appendChild(g);g=document.createElement("tr"); m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("width")+":");g.appendChild(m);var D=document.createElement("input");D.setAttribute("value",k);D.style.width="180px";m=document.createElement("td");m.appendChild(D);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("height")+":");g.appendChild(m);var F=document.createElement("input");F.setAttribute("value",n);F.style.width= -"180px";m=document.createElement("td");m.appendChild(F);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("dpi")+":");g.appendChild(m);var J=document.createElement("select");J.style.width="180px";m=document.createElement("option");m.setAttribute("value","100");mxUtils.write(m,"100dpi");J.appendChild(m);m=document.createElement("option");m.setAttribute("value","200");mxUtils.write(m,"200dpi");J.appendChild(m); -m=document.createElement("option");m.setAttribute("value","300");mxUtils.write(m,"300dpi");J.appendChild(m);m=document.createElement("option");m.setAttribute("value","400");mxUtils.write(m,"400dpi");J.appendChild(m);m=document.createElement("option");m.setAttribute("value","custom");mxUtils.write(m,mxResources.get("custom"));J.appendChild(m);var C=document.createElement("input");C.style.width="180px";C.style.display="none";C.setAttribute("value","100");C.setAttribute("type","number");C.setAttribute("min", -"50");C.setAttribute("step","50");var O=!1;mxEvent.addListener(J,"change",function(){"custom"==this.value?(this.style.display="none",C.style.display="",C.focus()):(C.value=this.value,O||(B.value=this.value))});mxEvent.addListener(C,"change",function(){var P=parseInt(C.value);isNaN(P)||0>=P?C.style.backgroundColor="red":(C.style.backgroundColor="",O||(B.value=P))});m=document.createElement("td");m.appendChild(J);m.appendChild(C);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td"); +"180px";m=document.createElement("td");m.appendChild(F);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("dpi")+":");g.appendChild(m);var I=document.createElement("select");I.style.width="180px";m=document.createElement("option");m.setAttribute("value","100");mxUtils.write(m,"100dpi");I.appendChild(m);m=document.createElement("option");m.setAttribute("value","200");mxUtils.write(m,"200dpi");I.appendChild(m); +m=document.createElement("option");m.setAttribute("value","300");mxUtils.write(m,"300dpi");I.appendChild(m);m=document.createElement("option");m.setAttribute("value","400");mxUtils.write(m,"400dpi");I.appendChild(m);m=document.createElement("option");m.setAttribute("value","custom");mxUtils.write(m,mxResources.get("custom"));I.appendChild(m);var C=document.createElement("input");C.style.width="180px";C.style.display="none";C.setAttribute("value","100");C.setAttribute("type","number");C.setAttribute("min", +"50");C.setAttribute("step","50");var N=!1;mxEvent.addListener(I,"change",function(){"custom"==this.value?(this.style.display="none",C.style.display="",C.focus()):(C.value=this.value,N||(B.value=this.value))});mxEvent.addListener(C,"change",function(){var P=parseInt(C.value);isNaN(P)||0>=P?C.style.backgroundColor="red":(C.style.backgroundColor="",N||(B.value=P))});m=document.createElement("td");m.appendChild(I);m.appendChild(C);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td"); m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("background")+":");g.appendChild(m);var R=document.createElement("input");R.setAttribute("type","checkbox");R.checked=null==e.background||e.background==mxConstants.NONE;m=document.createElement("td");m.appendChild(R);mxUtils.write(m,mxResources.get("transparent"));g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("grid")+":");g.appendChild(m); -var T=document.createElement("input");T.setAttribute("type","checkbox");T.checked=!1;m=document.createElement("td");m.appendChild(T);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("borderWidth")+":");g.appendChild(m);var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("value",ExportDialog.lastBorderValue);Q.style.width="180px";m=document.createElement("td");m.appendChild(Q); -g.appendChild(m);u.appendChild(g);d.appendChild(u);mxEvent.addListener(x,"change",b);b();mxEvent.addListener(B,"change",function(){O=!0;var P=Math.max(0,parseFloat(B.value)||100)/100;B.value=parseFloat((100*P).toFixed(2));0<k?(D.value=Math.floor(k*P),F.value=Math.floor(n*P)):(B.value="100",D.value=k,F.value=n);f()});mxEvent.addListener(D,"change",function(){var P=parseInt(D.value)/k;0<P?(B.value=parseFloat((100*P).toFixed(2)),F.value=Math.floor(n*P)):(B.value="100",D.value=k,F.value=n);f()});mxEvent.addListener(F, -"change",function(){var P=parseInt(F.value)/n;0<P?(B.value=parseFloat((100*P).toFixed(2)),D.value=Math.floor(k*P)):(B.value="100",D.value=k,F.value=n);f()});g=document.createElement("tr");m=document.createElement("td");m.setAttribute("align","right");m.style.paddingTop="22px";m.colSpan=2;var aa=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(B.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var P=r.value,X=x.value,ha=Math.max(0,parseFloat(B.value)|| -100)/100,fa=Math.max(0,parseInt(Q.value)),sa=e.background,K=Math.max(1,parseInt(C.value));if(("svg"==X||"png"==X||"pdf"==X)&&R.checked)sa=null;else if(null==sa||sa==mxConstants.NONE)sa="#ffffff";ExportDialog.lastBorderValue=fa;ExportDialog.exportFile(a,P,X,sa,ha,fa,K,T.checked)}}));aa.className="geBtn gePrimaryBtn";var S=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});S.className="geBtn";a.editor.cancelFirst?(m.appendChild(S),m.appendChild(aa)):(m.appendChild(aa),m.appendChild(S)); +var S=document.createElement("input");S.setAttribute("type","checkbox");S.checked=!1;m=document.createElement("td");m.appendChild(S);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("borderWidth")+":");g.appendChild(m);var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("value",ExportDialog.lastBorderValue);Q.style.width="180px";m=document.createElement("td");m.appendChild(Q); +g.appendChild(m);u.appendChild(g);d.appendChild(u);mxEvent.addListener(x,"change",b);b();mxEvent.addListener(B,"change",function(){N=!0;var P=Math.max(0,parseFloat(B.value)||100)/100;B.value=parseFloat((100*P).toFixed(2));0<k?(D.value=Math.floor(k*P),F.value=Math.floor(n*P)):(B.value="100",D.value=k,F.value=n);f()});mxEvent.addListener(D,"change",function(){var P=parseInt(D.value)/k;0<P?(B.value=parseFloat((100*P).toFixed(2)),F.value=Math.floor(n*P)):(B.value="100",D.value=k,F.value=n);f()});mxEvent.addListener(F, +"change",function(){var P=parseInt(F.value)/n;0<P?(B.value=parseFloat((100*P).toFixed(2)),D.value=Math.floor(k*P)):(B.value="100",D.value=k,F.value=n);f()});g=document.createElement("tr");m=document.createElement("td");m.setAttribute("align","right");m.style.paddingTop="22px";m.colSpan=2;var aa=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(B.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var P=r.value,Y=x.value,ja=Math.max(0,parseFloat(B.value)|| +100)/100,fa=Math.max(0,parseInt(Q.value)),ra=e.background,K=Math.max(1,parseInt(C.value));if(("svg"==Y||"png"==Y||"pdf"==Y)&&R.checked)ra=null;else if(null==ra||ra==mxConstants.NONE)ra="#ffffff";ExportDialog.lastBorderValue=fa;ExportDialog.exportFile(a,P,Y,ra,ja,fa,K,S.checked)}}));aa.className="geBtn gePrimaryBtn";var U=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});U.className="geBtn";a.editor.cancelFirst?(m.appendChild(U),m.appendChild(aa)):(m.appendChild(aa),m.appendChild(U)); g.appendChild(m);u.appendChild(g);d.appendChild(u);this.container=d};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0; ExportDialog.exportFile=function(a,b,f,e,g,d,k,n){n=a.editor.graph;if("xml"==f)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),b,f);else if("svg"==f)ExportDialog.saveLocalFile(a,mxUtils.getXml(n.getSvg(e,g,d)),b,f);else{var u=n.getGraphBounds(),m=mxUtils.createXmlDocument(),r=m.createElement("output");m.appendChild(r);m=new mxXmlCanvas2D(r);m.translate(Math.floor((d/g-u.x)/n.view.scale),Math.floor((d/g-u.y)/n.view.scale));m.scale(g/n.view.scale);(new mxImageExport).drawState(n.getView().getState(n.model.root), m);r="xml="+encodeURIComponent(mxUtils.getXml(r));m=Math.ceil(u.width*g/n.view.scale+2*d);g=Math.ceil(u.height*g/n.view.scale+2*d);r.length<=MAX_REQUEST_SIZE&&m*g<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+f+"&filename="+encodeURIComponent(b)+"&bg="+(null!=e?e:"none")+"&w="+m+"&h="+g+"&"+r+"&dpi="+k)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}}; ExportDialog.saveLocalFile=function(a,b,f,e){b.length<MAX_REQUEST_SIZE?(a.hideDialog(),(new mxXmlRequest(SAVE_URL,"xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(f)+"&format="+e)).simulate(document,"_blank")):(mxUtils.alert(mxResources.get("drawingTooLarge")),mxUtils.popup(xml))}; -var EditDataDialog=function(a,b){function f(){0<T.value.length?Q.removeAttribute("disabled"):Q.setAttribute("disabled","disabled")}var e=document.createElement("div"),g=a.editor.graph,d=g.getModel().getValue(b);if(!mxUtils.isNode(d)){var k=mxUtils.createXmlDocument().createElement("object");k.setAttribute("label",d||"");d=k}var n={};try{var u=mxUtils.getValue(a.editor.graph.getCurrentCellStyle(b),"metaData",null);null!=u&&(n=JSON.parse(u))}catch(S){}var m=new mxForm("properties");m.table.style.width= -"100%";var r=d.attributes,x=[],B=[],D=0,F=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,J=function(S,P){var X=document.createElement("div");X.style.position="relative";X.style.paddingRight="20px";X.style.boxSizing="border-box";X.style.width="100%";var ha=document.createElement("a"),fa=mxUtils.createImage(Dialog.prototype.closeImage);fa.style.height="9px";fa.style.fontSize="9px";fa.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";ha.className="geButton";ha.setAttribute("title", -mxResources.get("delete"));ha.style.position="absolute";ha.style.top="4px";ha.style.right="0px";ha.style.margin="0px";ha.style.width="9px";ha.style.height="9px";ha.style.cursor="pointer";ha.appendChild(fa);P=function(sa){return function(){for(var K=0,V=0;V<x.length;V++){if(x[V]==sa){B[V]=null;m.table.deleteRow(K+(null!=F?1:0));break}null!=B[V]&&K++}}}(P);mxEvent.addListener(ha,"click",P);P=S.parentNode;X.appendChild(S);X.appendChild(ha);P.appendChild(X)};k=function(S,P,X){x[S]=P;B[S]=m.addTextarea(x[D]+ -":",X,2);B[S].style.width="100%";0<X.indexOf("\n")&&B[S].setAttribute("rows","2");J(B[S],P);null!=n[P]&&0==n[P].editable&&B[S].setAttribute("disabled","disabled")};u=[];for(var C=g.getModel().getParent(b)==g.getModel().getRoot(),O=0;O<r.length;O++)("label"!=r[O].nodeName||Graph.translateDiagram||C)&&"placeholders"!=r[O].nodeName&&u.push({name:r[O].nodeName,value:r[O].nodeValue});u.sort(function(S,P){return S.name<P.name?-1:S.name>P.name?1:0});if(null!=F){r=document.createElement("div");r.style.width= -"100%";r.style.fontSize="11px";r.style.textAlign="center";mxUtils.write(r,F);var R=m.addField(mxResources.get("id")+":",r);mxEvent.addListener(r,"dblclick",function(S){mxEvent.isShiftDown(S)&&(S=new FilenameDialog(a,F,mxResources.get("apply"),mxUtils.bind(this,function(P){null!=P&&0<P.length&&P!=F&&(null==g.getModel().getCell(P)?(g.getModel().cellRemoved(b),b.setId(P),F=P,R.innerHTML=mxUtils.htmlEntities(P),g.getModel().cellAdded(b)):a.handleError({message:mxResources.get("alreadyExst",[P])}))}), -mxResources.get("id")),a.showDialog(S.container,300,80,!0,!0),S.init())});r.setAttribute("title","Shift+Double Click to Edit ID")}for(O=0;O<u.length;O++)k(D,u[O].name,u[O].value),D++;u=document.createElement("div");u.style.position="absolute";u.style.top="30px";u.style.left="30px";u.style.right="30px";u.style.bottom="80px";u.style.overflowY="auto";u.appendChild(m.table);k=document.createElement("div");k.style.boxSizing="border-box";k.style.paddingRight="160px";k.style.whiteSpace="nowrap";k.style.marginTop= -"6px";k.style.width="100%";var T=document.createElement("input");T.setAttribute("placeholder",mxResources.get("enterPropertyName"));T.setAttribute("type","text");T.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");T.style.boxSizing="border-box";T.style.marginLeft="2px";T.style.width="100%";k.appendChild(T);u.appendChild(k);e.appendChild(u);var Q=mxUtils.button(mxResources.get("addProperty"),function(){var S=T.value;if(0<S.length&&"label"!=S&&"placeholders"!=S&&0>S.indexOf(":"))try{var P= -mxUtils.indexOf(x,S);if(0<=P&&null!=B[P])B[P].focus();else{d.cloneNode(!1).setAttribute(S,"");0<=P&&(x.splice(P,1),B.splice(P,1));x.push(S);var X=m.addTextarea(S+":","",2);X.style.width="100%";B.push(X);J(X,S);X.focus()}Q.setAttribute("disabled","disabled");T.value=""}catch(ha){mxUtils.alert(ha)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(T,"keypress",function(S){13==S.keyCode&&Q.click()});this.init=function(){0<B.length?B[0].focus():T.focus()};Q.setAttribute("title", -mxResources.get("addProperty"));Q.setAttribute("disabled","disabled");Q.style.textOverflow="ellipsis";Q.style.position="absolute";Q.style.overflow="hidden";Q.style.width="144px";Q.style.right="0px";Q.className="geBtn";k.appendChild(Q);u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});u.setAttribute("title","Escape");u.className="geBtn";var aa=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);d=d.cloneNode(!0);for(var S=!1, -P=0;P<x.length;P++)null==B[P]?d.removeAttribute(x[P]):(d.setAttribute(x[P],B[P].value),S=S||"placeholder"==x[P]&&"1"==d.getAttribute("placeholders"));S&&d.removeAttribute("label");g.getModel().setValue(b,d)}catch(X){mxUtils.alert(X)}});aa.setAttribute("title","Ctrl+Enter");aa.className="geBtn gePrimaryBtn";mxEvent.addListener(e,"keypress",function(S){13==S.keyCode&&mxEvent.isControlDown(S)&&aa.click()});mxEvent.addListener(T,"keyup",f);mxEvent.addListener(T,"change",f);k=document.createElement("div"); +var EditDataDialog=function(a,b){function f(){0<S.value.length?Q.removeAttribute("disabled"):Q.setAttribute("disabled","disabled")}var e=document.createElement("div"),g=a.editor.graph,d=g.getModel().getValue(b);if(!mxUtils.isNode(d)){var k=mxUtils.createXmlDocument().createElement("object");k.setAttribute("label",d||"");d=k}var n={};try{var u=mxUtils.getValue(a.editor.graph.getCurrentCellStyle(b),"metaData",null);null!=u&&(n=JSON.parse(u))}catch(U){}var m=new mxForm("properties");m.table.style.width= +"100%";var r=d.attributes,x=[],B=[],D=0,F=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,I=function(U,P){var Y=document.createElement("div");Y.style.position="relative";Y.style.paddingRight="20px";Y.style.boxSizing="border-box";Y.style.width="100%";var ja=document.createElement("a"),fa=mxUtils.createImage(Dialog.prototype.closeImage);fa.style.height="9px";fa.style.fontSize="9px";fa.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";ja.className="geButton";ja.setAttribute("title", +mxResources.get("delete"));ja.style.position="absolute";ja.style.top="4px";ja.style.right="0px";ja.style.margin="0px";ja.style.width="9px";ja.style.height="9px";ja.style.cursor="pointer";ja.appendChild(fa);P=function(ra){return function(){for(var K=0,V=0;V<x.length;V++){if(x[V]==ra){B[V]=null;m.table.deleteRow(K+(null!=F?1:0));break}null!=B[V]&&K++}}}(P);mxEvent.addListener(ja,"click",P);P=U.parentNode;Y.appendChild(U);Y.appendChild(ja);P.appendChild(Y)};k=function(U,P,Y){x[U]=P;B[U]=m.addTextarea(x[D]+ +":",Y,2);B[U].style.width="100%";0<Y.indexOf("\n")&&B[U].setAttribute("rows","2");I(B[U],P);null!=n[P]&&0==n[P].editable&&B[U].setAttribute("disabled","disabled")};u=[];for(var C=g.getModel().getParent(b)==g.getModel().getRoot(),N=0;N<r.length;N++)("label"!=r[N].nodeName||Graph.translateDiagram||C)&&"placeholders"!=r[N].nodeName&&u.push({name:r[N].nodeName,value:r[N].nodeValue});u.sort(function(U,P){return U.name<P.name?-1:U.name>P.name?1:0});if(null!=F){r=document.createElement("div");r.style.width= +"100%";r.style.fontSize="11px";r.style.textAlign="center";mxUtils.write(r,F);var R=m.addField(mxResources.get("id")+":",r);mxEvent.addListener(r,"dblclick",function(U){mxEvent.isShiftDown(U)&&(U=new FilenameDialog(a,F,mxResources.get("apply"),mxUtils.bind(this,function(P){null!=P&&0<P.length&&P!=F&&(null==g.getModel().getCell(P)?(g.getModel().cellRemoved(b),b.setId(P),F=P,R.innerHTML=mxUtils.htmlEntities(P),g.getModel().cellAdded(b)):a.handleError({message:mxResources.get("alreadyExst",[P])}))}), +mxResources.get("id")),a.showDialog(U.container,300,80,!0,!0),U.init())});r.setAttribute("title","Shift+Double Click to Edit ID")}for(N=0;N<u.length;N++)k(D,u[N].name,u[N].value),D++;u=document.createElement("div");u.style.position="absolute";u.style.top="30px";u.style.left="30px";u.style.right="30px";u.style.bottom="80px";u.style.overflowY="auto";u.appendChild(m.table);k=document.createElement("div");k.style.boxSizing="border-box";k.style.paddingRight="160px";k.style.whiteSpace="nowrap";k.style.marginTop= +"6px";k.style.width="100%";var S=document.createElement("input");S.setAttribute("placeholder",mxResources.get("enterPropertyName"));S.setAttribute("type","text");S.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");S.style.boxSizing="border-box";S.style.marginLeft="2px";S.style.width="100%";k.appendChild(S);u.appendChild(k);e.appendChild(u);var Q=mxUtils.button(mxResources.get("addProperty"),function(){var U=S.value;if(0<U.length&&"label"!=U&&"placeholders"!=U&&0>U.indexOf(":"))try{var P= +mxUtils.indexOf(x,U);if(0<=P&&null!=B[P])B[P].focus();else{d.cloneNode(!1).setAttribute(U,"");0<=P&&(x.splice(P,1),B.splice(P,1));x.push(U);var Y=m.addTextarea(U+":","",2);Y.style.width="100%";B.push(Y);I(Y,U);Y.focus()}Q.setAttribute("disabled","disabled");S.value=""}catch(ja){mxUtils.alert(ja)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(S,"keypress",function(U){13==U.keyCode&&Q.click()});this.init=function(){0<B.length?B[0].focus():S.focus()};Q.setAttribute("title", +mxResources.get("addProperty"));Q.setAttribute("disabled","disabled");Q.style.textOverflow="ellipsis";Q.style.position="absolute";Q.style.overflow="hidden";Q.style.width="144px";Q.style.right="0px";Q.className="geBtn";k.appendChild(Q);u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});u.setAttribute("title","Escape");u.className="geBtn";var aa=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);d=d.cloneNode(!0);for(var U=!1, +P=0;P<x.length;P++)null==B[P]?d.removeAttribute(x[P]):(d.setAttribute(x[P],B[P].value),U=U||"placeholder"==x[P]&&"1"==d.getAttribute("placeholders"));U&&d.removeAttribute("label");g.getModel().setValue(b,d)}catch(Y){mxUtils.alert(Y)}});aa.setAttribute("title","Ctrl+Enter");aa.className="geBtn gePrimaryBtn";mxEvent.addListener(e,"keypress",function(U){13==U.keyCode&&mxEvent.isControlDown(U)&&aa.click()});mxEvent.addListener(S,"keyup",f);mxEvent.addListener(S,"change",f);k=document.createElement("div"); k.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(b)||a.editor.graph.getModel().isEdge(b))r=document.createElement("span"),r.style.marginRight="10px",C=document.createElement("input"),C.setAttribute("type","checkbox"),C.style.marginRight="6px","1"==d.getAttribute("placeholders")&&(C.setAttribute("checked","checked"),C.defaultChecked=!0),mxEvent.addListener(C,"click",function(){"1"==d.getAttribute("placeholders")? -d.removeAttribute("placeholders"):d.setAttribute("placeholders","1")}),r.appendChild(C),mxUtils.write(r,mxResources.get("placeholders")),null!=EditDataDialog.placeholderHelpLink&&(C=document.createElement("a"),C.setAttribute("href",EditDataDialog.placeholderHelpLink),C.setAttribute("title",mxResources.get("help")),C.setAttribute("target","_blank"),C.style.marginLeft="8px",C.style.cursor="help",O=document.createElement("img"),mxUtils.setOpacity(O,50),O.style.height="16px",O.style.width="16px",O.setAttribute("border", -"0"),O.setAttribute("valign","middle"),O.style.marginTop=mxClient.IS_IE11?"0px":"-4px",O.setAttribute("src",Editor.helpImage),C.appendChild(O),r.appendChild(C)),k.appendChild(r);a.editor.cancelFirst?(k.appendChild(u),k.appendChild(aa)):(k.appendChild(aa),k.appendChild(u));e.appendChild(k);this.container=e};EditDataDialog.getDisplayIdForCell=function(a,b){var f=null;null!=a.editor.graph.getModel().getParent(b)&&(f=b.getId());return f};EditDataDialog.placeholderHelpLink=null; +d.removeAttribute("placeholders"):d.setAttribute("placeholders","1")}),r.appendChild(C),mxUtils.write(r,mxResources.get("placeholders")),null!=EditDataDialog.placeholderHelpLink&&(C=document.createElement("a"),C.setAttribute("href",EditDataDialog.placeholderHelpLink),C.setAttribute("title",mxResources.get("help")),C.setAttribute("target","_blank"),C.style.marginLeft="8px",C.style.cursor="help",N=document.createElement("img"),mxUtils.setOpacity(N,50),N.style.height="16px",N.style.width="16px",N.setAttribute("border", +"0"),N.setAttribute("valign","middle"),N.style.marginTop=mxClient.IS_IE11?"0px":"-4px",N.setAttribute("src",Editor.helpImage),C.appendChild(N),r.appendChild(C)),k.appendChild(r);a.editor.cancelFirst?(k.appendChild(u),k.appendChild(aa)):(k.appendChild(aa),k.appendChild(u));e.appendChild(k);this.container=e};EditDataDialog.getDisplayIdForCell=function(a,b){var f=null;null!=a.editor.graph.getModel().getParent(b)&&(f=b.getId());return f};EditDataDialog.placeholderHelpLink=null; var LinkDialog=function(a,b,f,e){var g=document.createElement("div");mxUtils.write(g,mxResources.get("editLink")+":");var d=document.createElement("div");d.className="geTitle";d.style.backgroundColor="transparent";d.style.borderColor="transparent";d.style.whiteSpace="nowrap";d.style.textOverflow="clip";d.style.cursor="default";d.style.paddingRight="20px";var k=document.createElement("input");k.setAttribute("value",b);k.setAttribute("placeholder","http://www.example.com/");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";b=document.createElement("div");b.setAttribute("title",mxResources.get("reset"));b.style.position="relative";b.style.left="-16px";b.style.width="12px";b.style.height="14px";b.style.cursor="pointer";b.style.display="inline-block";b.style.top="3px";b.style.background="url("+IMAGE_PATH+"/transparent.gif)"; mxEvent.addListener(b,"click",function(){k.value="";k.focus()});d.appendChild(k);d.appendChild(b);g.appendChild(d);this.init=function(){k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)};d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="right";mxEvent.addListener(k,"keypress",function(n){13==n.keyCode&&(a.hideDialog(),e(k.value))});b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}); b.className="geBtn";a.editor.cancelFirst&&d.appendChild(b);f=mxUtils.button(f,function(){a.hideDialog();e(k.value)});f.className="geBtn gePrimaryBtn";d.appendChild(f);a.editor.cancelFirst||d.appendChild(b);g.appendChild(d);this.container=g},OutlineWindow=function(a,b,f,e,g){var d=a.editor.graph,k=document.createElement("div");k.style.position="absolute";k.style.width="100%";k.style.height="100%";k.style.overflow="hidden";this.window=new mxWindow(mxResources.get("outline"),k,b,f,e,g,!0,!0);this.window.minimumSize= new mxRectangle(0,0,80,80);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);var n=a.createOutline(this.window);a.installResizeHandler(this,!0,function(){n.destroy()});this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit();n.setSuspended(!1)}));this.window.addListener(mxEvent.HIDE,mxUtils.bind(this,function(){n.setSuspended(!0)}));this.window.addListener(mxEvent.NORMALIZE,mxUtils.bind(this, -function(){n.setSuspended(!1)}));this.window.addListener(mxEvent.MINIMIZE,mxUtils.bind(this,function(){n.setSuspended(!0)}));n.init(k);mxEvent.addMouseWheelListener(function(u,m){for(var r=!1,x=mxEvent.getSource(u);null!=x;){if(x==n.svg){r=!0;break}x=x.parentNode}r&&(r=d.zoomFactor,null!=u.deltaY&&Math.round(u.deltaY)!=u.deltaY&&(r=1+Math.abs(u.deltaY)/20*(r-1)),d.lazyZoom(m,null,null,r),mxEvent.consume(u))})},LayersWindow=function(a,b,f,e,g){function d(X){if(u.isEnabled()&&null!=X){var ha=u.convertValueToString(X); -ha=new FilenameDialog(a,ha||mxResources.get("background"),mxResources.get("rename"),mxUtils.bind(this,function(fa){null!=fa&&u.cellLabelChanged(X,fa)}),mxResources.get("enterName"));a.showDialog(ha.container,300,100,!0,!0);ha.init()}}function k(){var X=S.get(u.getLayerForCells(u.getSelectionCells()));null!=X?X.appendChild(P):null!=P.parentNode&&P.parentNode.removeChild(P)}function n(){function X(sa,K,V,G){var M=document.createElement("div");M.className="geToolbarContainer";S.put(V,M);M.style.overflow= -"hidden";M.style.position="relative";M.style.padding="4px";M.style.height="22px";M.style.display="block";M.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";M.style.borderWidth="0px 0px 1px 0px";M.style.borderColor="#c3c3c3";M.style.borderStyle="solid";M.style.whiteSpace="nowrap";M.setAttribute("title",K);var U=document.createElement("div");U.style.display="inline-block";U.style.width="100%";U.style.textOverflow="ellipsis";U.style.overflow="hidden";mxEvent.addListener(M, -"dragover",function(ra){ra.dataTransfer.dropEffect="move";D=sa;ra.stopPropagation();ra.preventDefault()});mxEvent.addListener(M,"dragstart",function(ra){B=M;mxClient.IS_FF&&ra.dataTransfer.setData("Text","<layer/>")});mxEvent.addListener(M,"dragend",function(ra){null!=B&&null!=D&&u.addCell(V,u.model.root,D);D=B=null;ra.stopPropagation();ra.preventDefault()});var ba=document.createElement("img");ba.setAttribute("draggable","false");ba.setAttribute("align","top");ba.setAttribute("border","0");ba.style.width= -"16px";ba.style.padding="0px 6px 0 4px";ba.style.marginTop="2px";ba.style.cursor="pointer";ba.setAttribute("title",mxResources.get(u.model.isVisible(V)?"hide":"show"));u.model.isVisible(V)?(ba.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(M,75)):(ba.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(M,25));Editor.isDarkMode()&&(ba.style.filter="invert(100%)");U.appendChild(ba);mxEvent.addListener(ba,"click",function(ra){u.model.setVisible(V,!u.model.isVisible(V));mxEvent.consume(ra)}); -ba=document.createElement("img");ba.setAttribute("draggable","false");ba.setAttribute("align","top");ba.setAttribute("border","0");ba.style.width="16px";ba.style.padding="0px 6px 0 0";ba.style.marginTop="2px";ba.setAttribute("title",mxResources.get("lockUnlock"));var la=u.getCurrentCellStyle(V);"1"==mxUtils.getValue(la,"locked","0")?(ba.setAttribute("src",Editor.lockedImage),mxUtils.setOpacity(ba,75)):(ba.setAttribute("src",Editor.unlockedImage),mxUtils.setOpacity(ba,25));Editor.isDarkMode()&&(ba.style.filter= -"invert(100%)");u.isEnabled()&&(ba.style.cursor="pointer");mxEvent.addListener(ba,"click",function(ra){if(u.isEnabled()){var Y=null;u.getModel().beginUpdate();try{Y="1"==mxUtils.getValue(la,"locked","0")?null:"1",u.setCellStyles("locked",Y,[V])}finally{u.getModel().endUpdate()}"1"==Y&&u.removeSelectionCells(u.getModel().getDescendants(V));mxEvent.consume(ra)}});U.appendChild(ba);ba=document.createElement("span");mxUtils.write(ba,K);ba.style.display="block";ba.style.whiteSpace="nowrap";ba.style.overflow= -"hidden";ba.style.textOverflow="ellipsis";ba.style.position="absolute";ba.style.left="52px";ba.style.right="8px";ba.style.top="8px";U.appendChild(ba);M.appendChild(U);if(u.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)K=document.createElement("div"),K.style.display="block",K.style.textAlign="right",K.style.whiteSpace="nowrap",K.style.position="absolute",K.style.right="16px",K.style.top="6px",0<sa&&(U=document.createElement("a"),U.setAttribute("title", -mxResources.get("toBack")),U.className="geButton",U.style.cssFloat="none",U.innerHTML="▼",U.style.width="14px",U.style.height="14px",U.style.fontSize="14px",U.style.margin="0px",U.style.marginTop="-1px",K.appendChild(U),mxEvent.addListener(U,"click",function(ra){u.isEnabled()&&u.addCell(V,u.model.root,sa-1);mxEvent.consume(ra)})),0<=sa&&sa<F-1&&(U=document.createElement("a"),U.setAttribute("title",mxResources.get("toFront")),U.className="geButton",U.style.cssFloat="none",U.innerHTML="▲", -U.style.width="14px",U.style.height="14px",U.style.fontSize="14px",U.style.margin="0px",U.style.marginTop="-1px",K.appendChild(U),mxEvent.addListener(U,"click",function(ra){u.isEnabled()&&u.addCell(V,u.model.root,sa+1);mxEvent.consume(ra)})),M.appendChild(K);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&(M.setAttribute("draggable","true"),M.style.cursor="move")}mxEvent.addListener(M,"dblclick",function(ra){var Y=mxEvent.getSource(ra).nodeName;"INPUT"!=Y&&"IMG"!=Y&&(d(V),mxEvent.consume(ra))}); -u.getDefaultParent()==V&&(M.style.background=Editor.isDarkMode()?"#505759":"#e6eff8",M.style.fontWeight=u.isEnabled()?"bold":"",J=V);mxEvent.addListener(M,"click",function(ra){u.isEnabled()&&(u.setDefaultParent(G),u.view.setCurrentRoot(null),mxEvent.isShiftDown(ra)&&u.setSelectionCells(V.children),mxEvent.consume(ra))});x.appendChild(M)}F=u.model.getChildCount(u.model.root);x.innerText="";S.clear();for(var ha=F-1;0<=ha;ha--)mxUtils.bind(this,function(sa){X(ha,u.convertValueToString(sa)||mxResources.get("background"), -sa,sa)})(u.model.getChildAt(u.model.root,ha));var fa=u.convertValueToString(J)||mxResources.get("background");R.setAttribute("title",mxResources.get("removeIt",[fa]));aa.setAttribute("title",mxResources.get("duplicateIt",[fa]));u.isSelectionEmpty()&&(T.className="geButton mxDisabled");k()}var u=a.editor.graph,m=document.createElement("div");m.style.userSelect="none";m.style.background=Editor.isDarkMode()?Dialog.backdropColor:"#fff";m.style.border="1px solid whiteSmoke";m.style.height="100%";m.style.marginBottom= -"10px";m.style.overflow="auto";var r=EditorUi.compactUi?"26px":"30px",x=document.createElement("div");x.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"#fff";x.style.position="absolute";x.style.overflow="auto";x.style.left="0px";x.style.right="0px";x.style.top="0px";x.style.bottom=parseInt(r)+7+"px";m.appendChild(x);var B=null,D=null;mxEvent.addListener(m,"dragover",function(X){X.dataTransfer.dropEffect="move";D=0;X.stopPropagation();X.preventDefault()});mxEvent.addListener(m,"drop", -function(X){X.stopPropagation();X.preventDefault()});var F=null,J=null,C=document.createElement("div");C.className="geToolbarContainer";C.style.position="absolute";C.style.bottom="0px";C.style.left="0px";C.style.right="0px";C.style.height=r;C.style.overflow="hidden";C.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";C.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";C.style.borderWidth="1px 0px 0px 0px";C.style.borderColor="#c3c3c3";C.style.borderStyle="solid";C.style.display= -"block";C.style.whiteSpace="nowrap";var O=document.createElement("a");O.className="geButton";var R=O.cloneNode(!1);r=document.createElement("img");r.setAttribute("border","0");r.setAttribute("width","22");r.setAttribute("src",Editor.trashImage);r.style.opacity="0.9";Editor.isDarkMode()&&(r.style.filter="invert(100%)");R.appendChild(r);mxEvent.addListener(R,"click",function(X){if(u.isEnabled()){u.model.beginUpdate();try{var ha=u.model.root.getIndex(J);u.removeCells([J],!1);0==u.model.getChildCount(u.model.root)? -(u.model.add(u.model.root,new mxCell),u.setDefaultParent(null)):0<ha&&ha<=u.model.getChildCount(u.model.root)?u.setDefaultParent(u.model.getChildAt(u.model.root,ha-1)):u.setDefaultParent(null)}finally{u.model.endUpdate()}}mxEvent.consume(X)});u.isEnabled()||(R.className="geButton mxDisabled");C.appendChild(R);var T=O.cloneNode();T.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));r=r.cloneNode(!1);r.setAttribute("src",Editor.verticalDotsImage);T.appendChild(r);mxEvent.addListener(T, -"click",function(X){if(u.isEnabled()&&!u.isSelectionEmpty()){var ha=mxUtils.getOffset(T);a.showPopupMenu(mxUtils.bind(this,function(fa,sa){for(var K=F-1;0<=K;K--)mxUtils.bind(this,function(V){var G=fa.addItem(u.convertValueToString(V)||mxResources.get("background"),null,mxUtils.bind(this,function(){u.moveCells(u.getSelectionCells(),0,0,!1,V)}),sa);1==u.getSelectionCount()&&u.model.isAncestor(V,u.getSelectionCell())&&fa.addCheckmark(G,Editor.checkmarkImage)})(u.model.getChildAt(u.model.root,K))}), -ha.x,ha.y+T.offsetHeight,X)}});C.appendChild(T);var Q=O.cloneNode(!1);Q.setAttribute("title",mxResources.get("editData"));r=r.cloneNode(!1);r.setAttribute("src",Editor.editImage);Q.appendChild(r);mxEvent.addListener(Q,"click",function(X){u.isEnabled()&&a.showDataDialog(J);mxEvent.consume(X)});u.isEnabled()||(Q.className="geButton mxDisabled");C.appendChild(Q);var aa=O.cloneNode(!1);aa.setAttribute("title",mxResources.get("duplicate"));r=r.cloneNode(!1);r.setAttribute("src",Editor.duplicateImage); -aa.appendChild(r);mxEvent.addListener(aa,"click",function(X){if(u.isEnabled()){X=null;u.model.beginUpdate();try{X=u.cloneCell(J),u.cellLabelChanged(X,mxResources.get("untitledLayer")),X.setVisible(!0),X=u.addCell(X,u.model.root),u.setDefaultParent(X)}finally{u.model.endUpdate()}null==X||u.isCellLocked(X)||u.selectAll(X)}});u.isEnabled()||(aa.className="geButton mxDisabled");C.appendChild(aa);O=O.cloneNode(!1);O.setAttribute("title",mxResources.get("addLayer"));r=r.cloneNode(!1);r.setAttribute("src", -Editor.addImage);O.appendChild(r);mxEvent.addListener(O,"click",function(X){if(u.isEnabled()){u.model.beginUpdate();try{var ha=u.addCell(new mxCell(mxResources.get("untitledLayer")),u.model.root);u.setDefaultParent(ha)}finally{u.model.endUpdate()}}mxEvent.consume(X)});u.isEnabled()||(O.className="geButton mxDisabled");C.appendChild(O);m.appendChild(C);var S=new mxDictionary,P=document.createElement("span");P.setAttribute("title",mxResources.get("selectionOnly"));P.innerHTML="•";P.style.position= -"absolute";P.style.fontWeight="bold";P.style.fontSize="16pt";P.style.right="2px";P.style.top="2px";n();u.model.addListener(mxEvent.CHANGE,n);u.addListener("defaultParentChanged",n);u.selectionModel.addListener(mxEvent.CHANGE,function(){u.isSelectionEmpty()?T.className="geButton mxDisabled":T.className="geButton";k()});this.window=new mxWindow(mxResources.get("layers"),m,b,f,e,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,150,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1); +function(){n.setSuspended(!1)}));this.window.addListener(mxEvent.MINIMIZE,mxUtils.bind(this,function(){n.setSuspended(!0)}));n.init(k);mxEvent.addMouseWheelListener(function(u,m){for(var r=!1,x=mxEvent.getSource(u);null!=x;){if(x==n.svg){r=!0;break}x=x.parentNode}r&&(r=d.zoomFactor,null!=u.deltaY&&Math.round(u.deltaY)!=u.deltaY&&(r=1+Math.abs(u.deltaY)/20*(r-1)),d.lazyZoom(m,null,null,r),mxEvent.consume(u))})},LayersWindow=function(a,b,f,e,g){function d(Y){if(u.isEnabled()&&null!=Y){var ja=u.convertValueToString(Y); +ja=new FilenameDialog(a,ja||mxResources.get("background"),mxResources.get("rename"),mxUtils.bind(this,function(fa){null!=fa&&u.cellLabelChanged(Y,fa)}),mxResources.get("enterName"));a.showDialog(ja.container,300,100,!0,!0);ja.init()}}function k(){var Y=U.get(u.getLayerForCells(u.getSelectionCells()));null!=Y?Y.appendChild(P):null!=P.parentNode&&P.parentNode.removeChild(P)}function n(){function Y(ra,K,V,O){var T=document.createElement("div");T.className="geToolbarContainer";U.put(V,T);T.style.overflow= +"hidden";T.style.position="relative";T.style.padding="4px";T.style.height="22px";T.style.display="block";T.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";T.style.borderWidth="0px 0px 1px 0px";T.style.borderColor="#c3c3c3";T.style.borderStyle="solid";T.style.whiteSpace="nowrap";T.setAttribute("title",K);var J=document.createElement("div");J.style.display="inline-block";J.style.width="100%";J.style.textOverflow="ellipsis";J.style.overflow="hidden";mxEvent.addListener(T, +"dragover",function(na){na.dataTransfer.dropEffect="move";D=ra;na.stopPropagation();na.preventDefault()});mxEvent.addListener(T,"dragstart",function(na){B=T;mxClient.IS_FF&&na.dataTransfer.setData("Text","<layer/>")});mxEvent.addListener(T,"dragend",function(na){null!=B&&null!=D&&u.addCell(V,u.model.root,D);D=B=null;na.stopPropagation();na.preventDefault()});var ba=document.createElement("img");ba.setAttribute("draggable","false");ba.setAttribute("align","top");ba.setAttribute("border","0");ba.style.width= +"16px";ba.style.padding="0px 6px 0 4px";ba.style.marginTop="2px";ba.style.cursor="pointer";ba.setAttribute("title",mxResources.get(u.model.isVisible(V)?"hide":"show"));u.model.isVisible(V)?(ba.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(T,75)):(ba.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(T,25));Editor.isDarkMode()&&(ba.style.filter="invert(100%)");J.appendChild(ba);mxEvent.addListener(ba,"click",function(na){u.model.setVisible(V,!u.model.isVisible(V));mxEvent.consume(na)}); +ba=document.createElement("img");ba.setAttribute("draggable","false");ba.setAttribute("align","top");ba.setAttribute("border","0");ba.style.width="16px";ba.style.padding="0px 6px 0 0";ba.style.marginTop="2px";ba.setAttribute("title",mxResources.get("lockUnlock"));var ha=u.getCurrentCellStyle(V);"1"==mxUtils.getValue(ha,"locked","0")?(ba.setAttribute("src",Editor.lockedImage),mxUtils.setOpacity(ba,75)):(ba.setAttribute("src",Editor.unlockedImage),mxUtils.setOpacity(ba,25));Editor.isDarkMode()&&(ba.style.filter= +"invert(100%)");u.isEnabled()&&(ba.style.cursor="pointer");mxEvent.addListener(ba,"click",function(na){if(u.isEnabled()){var W=null;u.getModel().beginUpdate();try{W="1"==mxUtils.getValue(ha,"locked","0")?null:"1",u.setCellStyles("locked",W,[V])}finally{u.getModel().endUpdate()}"1"==W&&u.removeSelectionCells(u.getModel().getDescendants(V));mxEvent.consume(na)}});J.appendChild(ba);ba=document.createElement("span");mxUtils.write(ba,K);ba.style.display="block";ba.style.whiteSpace="nowrap";ba.style.overflow= +"hidden";ba.style.textOverflow="ellipsis";ba.style.position="absolute";ba.style.left="52px";ba.style.right="8px";ba.style.top="8px";J.appendChild(ba);T.appendChild(J);if(u.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)K=document.createElement("div"),K.style.display="block",K.style.textAlign="right",K.style.whiteSpace="nowrap",K.style.position="absolute",K.style.right="16px",K.style.top="6px",0<ra&&(J=document.createElement("a"),J.setAttribute("title", +mxResources.get("toBack")),J.className="geButton",J.style.cssFloat="none",J.innerHTML="▼",J.style.width="14px",J.style.height="14px",J.style.fontSize="14px",J.style.margin="0px",J.style.marginTop="-1px",K.appendChild(J),mxEvent.addListener(J,"click",function(na){u.isEnabled()&&u.addCell(V,u.model.root,ra-1);mxEvent.consume(na)})),0<=ra&&ra<F-1&&(J=document.createElement("a"),J.setAttribute("title",mxResources.get("toFront")),J.className="geButton",J.style.cssFloat="none",J.innerHTML="▲", +J.style.width="14px",J.style.height="14px",J.style.fontSize="14px",J.style.margin="0px",J.style.marginTop="-1px",K.appendChild(J),mxEvent.addListener(J,"click",function(na){u.isEnabled()&&u.addCell(V,u.model.root,ra+1);mxEvent.consume(na)})),T.appendChild(K);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&(T.setAttribute("draggable","true"),T.style.cursor="move")}mxEvent.addListener(T,"dblclick",function(na){var W=mxEvent.getSource(na).nodeName;"INPUT"!=W&&"IMG"!=W&&(d(V),mxEvent.consume(na))}); +u.getDefaultParent()==V&&(T.style.background=Editor.isDarkMode()?"#505759":"#e6eff8",T.style.fontWeight=u.isEnabled()?"bold":"",I=V);mxEvent.addListener(T,"click",function(na){u.isEnabled()&&(u.setDefaultParent(O),u.view.setCurrentRoot(null),mxEvent.isShiftDown(na)&&u.setSelectionCells(V.children),mxEvent.consume(na))});x.appendChild(T)}F=u.model.getChildCount(u.model.root);x.innerText="";U.clear();for(var ja=F-1;0<=ja;ja--)mxUtils.bind(this,function(ra){Y(ja,u.convertValueToString(ra)||mxResources.get("background"), +ra,ra)})(u.model.getChildAt(u.model.root,ja));var fa=u.convertValueToString(I)||mxResources.get("background");R.setAttribute("title",mxResources.get("removeIt",[fa]));aa.setAttribute("title",mxResources.get("duplicateIt",[fa]));u.isSelectionEmpty()&&(S.className="geButton mxDisabled");k()}var u=a.editor.graph,m=document.createElement("div");m.style.userSelect="none";m.style.background=Editor.isDarkMode()?Dialog.backdropColor:"#fff";m.style.border="1px solid whiteSmoke";m.style.height="100%";m.style.marginBottom= +"10px";m.style.overflow="auto";var r=EditorUi.compactUi?"26px":"30px",x=document.createElement("div");x.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"#fff";x.style.position="absolute";x.style.overflow="auto";x.style.left="0px";x.style.right="0px";x.style.top="0px";x.style.bottom=parseInt(r)+7+"px";m.appendChild(x);var B=null,D=null;mxEvent.addListener(m,"dragover",function(Y){Y.dataTransfer.dropEffect="move";D=0;Y.stopPropagation();Y.preventDefault()});mxEvent.addListener(m,"drop", +function(Y){Y.stopPropagation();Y.preventDefault()});var F=null,I=null,C=document.createElement("div");C.className="geToolbarContainer";C.style.position="absolute";C.style.bottom="0px";C.style.left="0px";C.style.right="0px";C.style.height=r;C.style.overflow="hidden";C.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";C.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";C.style.borderWidth="1px 0px 0px 0px";C.style.borderColor="#c3c3c3";C.style.borderStyle="solid";C.style.display= +"block";C.style.whiteSpace="nowrap";var N=document.createElement("a");N.className="geButton";var R=N.cloneNode(!1);r=document.createElement("img");r.setAttribute("border","0");r.setAttribute("width","22");r.setAttribute("src",Editor.trashImage);r.style.opacity="0.9";Editor.isDarkMode()&&(r.style.filter="invert(100%)");R.appendChild(r);mxEvent.addListener(R,"click",function(Y){if(u.isEnabled()){u.model.beginUpdate();try{var ja=u.model.root.getIndex(I);u.removeCells([I],!1);0==u.model.getChildCount(u.model.root)? +(u.model.add(u.model.root,new mxCell),u.setDefaultParent(null)):0<ja&&ja<=u.model.getChildCount(u.model.root)?u.setDefaultParent(u.model.getChildAt(u.model.root,ja-1)):u.setDefaultParent(null)}finally{u.model.endUpdate()}}mxEvent.consume(Y)});u.isEnabled()||(R.className="geButton mxDisabled");C.appendChild(R);var S=N.cloneNode();S.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));r=r.cloneNode(!1);r.setAttribute("src",Editor.verticalDotsImage);S.appendChild(r);mxEvent.addListener(S, +"click",function(Y){if(u.isEnabled()&&!u.isSelectionEmpty()){var ja=mxUtils.getOffset(S);a.showPopupMenu(mxUtils.bind(this,function(fa,ra){for(var K=F-1;0<=K;K--)mxUtils.bind(this,function(V){var O=fa.addItem(u.convertValueToString(V)||mxResources.get("background"),null,mxUtils.bind(this,function(){u.moveCells(u.getSelectionCells(),0,0,!1,V)}),ra);1==u.getSelectionCount()&&u.model.isAncestor(V,u.getSelectionCell())&&fa.addCheckmark(O,Editor.checkmarkImage)})(u.model.getChildAt(u.model.root,K))}), +ja.x,ja.y+S.offsetHeight,Y)}});C.appendChild(S);var Q=N.cloneNode(!1);Q.setAttribute("title",mxResources.get("editData"));r=r.cloneNode(!1);r.setAttribute("src",Editor.editImage);Q.appendChild(r);mxEvent.addListener(Q,"click",function(Y){u.isEnabled()&&a.showDataDialog(I);mxEvent.consume(Y)});u.isEnabled()||(Q.className="geButton mxDisabled");C.appendChild(Q);var aa=N.cloneNode(!1);aa.setAttribute("title",mxResources.get("duplicate"));r=r.cloneNode(!1);r.setAttribute("src",Editor.duplicateImage); +aa.appendChild(r);mxEvent.addListener(aa,"click",function(Y){if(u.isEnabled()){Y=null;u.model.beginUpdate();try{Y=u.cloneCell(I),u.cellLabelChanged(Y,mxResources.get("untitledLayer")),Y.setVisible(!0),Y=u.addCell(Y,u.model.root),u.setDefaultParent(Y)}finally{u.model.endUpdate()}null==Y||u.isCellLocked(Y)||u.selectAll(Y)}});u.isEnabled()||(aa.className="geButton mxDisabled");C.appendChild(aa);N=N.cloneNode(!1);N.setAttribute("title",mxResources.get("addLayer"));r=r.cloneNode(!1);r.setAttribute("src", +Editor.addImage);N.appendChild(r);mxEvent.addListener(N,"click",function(Y){if(u.isEnabled()){u.model.beginUpdate();try{var ja=u.addCell(new mxCell(mxResources.get("untitledLayer")),u.model.root);u.setDefaultParent(ja)}finally{u.model.endUpdate()}}mxEvent.consume(Y)});u.isEnabled()||(N.className="geButton mxDisabled");C.appendChild(N);m.appendChild(C);var U=new mxDictionary,P=document.createElement("span");P.setAttribute("title",mxResources.get("selectionOnly"));P.innerHTML="•";P.style.position= +"absolute";P.style.fontWeight="bold";P.style.fontSize="16pt";P.style.right="2px";P.style.top="2px";n();u.model.addListener(mxEvent.CHANGE,n);u.addListener("defaultParentChanged",n);u.selectionModel.addListener(mxEvent.CHANGE,function(){u.isSelectionEmpty()?S.className="geButton mxDisabled":S.className="geButton";k()});this.window=new mxWindow(mxResources.get("layers"),m,b,f,e,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,150,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1); this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.init=function(){x.scrollTop=x.scrollHeight-x.clientHeight};this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.refreshLayers=n;a.installResizeHandler(this,!0)}; (function(){Sidebar.prototype.tagIndex="5V1dV+M6sv01rDvngax0oLvveYQEaGaAziE0PW8sxVYSDbblI9uk6V9/VVWS7ST+kB0zL3etbmIn3ltlfZRKUqkU/rpRLN6MmFJym5yM/8QL/Xnw7yLceXQ03fA3JaOTyfjCQCKZehvu66tErCMW6J9E1M4jlJcFTJWIPP1VIKK1ixj/zML4VBRiTMaf9HOKx8G7/lwy71V/ZJEv8Vv8cKea9KW646tU41nk678/4tK7SZVu5FpC9oz/TDPVnkEPJlsn4wVma1lEnVemGByy6q+M+SXkSmaQ6Vv27gJeBDzyOQDMu1ma5FVEEVBEtuokgQhdyZ62Uv/9qWWoYPRltgx4A3U970/hc6BnIuD+kdI+KbGTcelGce6ec4evOBl/k0r8llGKtWBTvulF98xVKjzEvxWXDVS/M8VHF57Hk0TDpzpxJQGScC9TIoX3euXvVV/UcWWpDFkqsCYyfaM/1ly36vGfgVhv0oiasyfh7ypgyaaBaKHl5/nThqb5VeAvZEigXx8k0AolJJUkVjo7jGBOHFOm29Se3FZin6VsyRL42V+2U90z9crTOGAeIEK8Q1UCnMlGxk4CLWb/gsflKt0y/MLnbzyQccgjaIivAjgTT/Gtr4Quf9cXXWRLjRKxyRwvkBko75hHnjisPzUkP/kyESnHtwoAtQ7kkrehL7UyzUAtLrh6E5g7Nnn9iYo2SWW8ZVr1QYsTIW8gE+ll5kHWQlXGdr/Qug1Zl/RDe2O4FL+fWPBaiJSUZGoDT6HRYT3DN9Gdgy4agY3Q59gj+iIOdAOB/MmYYlHKqYp5PMLaFHMVirSSG2XYySnnZrGHNW19JdaZoiYxGV8LbGq+9DKsT0APT3Sk1ldzXaZszQvOpfzlkndUYodytAPDOEuxuocyEqlUmM+Jbm6HevkAq0sAW8+MB9BmQJs+8HQr1Wup3G2zL6uCetJZjXKofV7J+FLnUUWtxZyLTYa20FzpV1GxEgnVdxH4JOgyS0QECr4F3z3nEUHWUQfUjUi/ZUv7tjqTGaCkl0q6Wou0Ef9tdhslUBAn9Xq4GshZkG6gTmx0m8EqvuGoYzb4iwMYdDnVMcpbS2QM3TYB3mM0Sp71/0fuSVPf7lmki1d10DN3LE6x0/CKut+GuddVgGpRyFCtc/sZYS/Cm9FySdUj3sgIPlOZeZvWNAm1o0uTXH81UO3zZEEqQDkwD5q37t+zdAOqNe/RS/aJ6Tdi5purBt73xV930PiLapT8HTTXqz2Kh7JloQ26bIlVOtAl6dIY9uBPMhbeCdgtu/ZLJeEe1XdduTSPrpc6v9+TlIf64jakMpeQ9RumQFVr3YiV3vcb+eZyy9Viw4Ogl1p+nM2xmofSyNSdYgHjnSzA6m26fu+wTKtwYM30S1LXTkxPsYp0qp+nbu8yg271r4xnWM3/hoseBI+8qttygmLlSfLhZtmsS7CZUd1Kds295iT2m4dTh7aH0qLgF2QqGo5qVVdLtHiPvIp2mdDXinvvXtBgGhLRI4/1sJs09z5TqY6sRCNVqlU+2qxPDNuRuxm20MqLmqNOO3CqHRqxEGEclC3jNtATkMOLhFZpOynrH5FAc3UlcKRsbJHvy/9wD8iylUSFJHhrrfmRYBPaZCGDZ2Mu6QXolr3prFf16OdvsxOjqyqUVPXzVEngw+g2Qrur8WehCxWnqu71sE9gv/QWnrSalK00WglxllLFX+VXVaxv1TMae7yFcRrlV2059PNiNr2+wdxh60gmKamJ7trRDvIm4xsecYXqxI7z6sQ5pICWKDHp6jFiEyjpgtLioL1lU6MmSu3VHZm0QtcI1RVNeCPPjIeKHnuZLamxJzHnNIzdyIzsV2+DJm+Y22ZVlPINS35AxuFl1Bo4nQ5IJ7PIfxyW8xzGplLgaG9BGginPqsrUhn55RCZiLoxbRn4v4dAbkYubdBLFkWoRfXYs24CvPz8lGzpNZchT1XDzN8OSEkcF8ZBhnP+1cq2jJgddJORxMmOmMX7w5A96HXzILoS882Mr/IBWqAHTcjxejheKQPvJRo3kWNuP0g0msMlzn6upFoK36/o6A6R34t5fG0RKMGiNdXSwyFVJX4R6mwE9Y+GsodSb1gcv7cCTRUWmCEx1rI2SAbsPvY2+m9QmTl7mCeBdrAdKeMnTGC24X4ylMvU3qWtzY2Yf5/QdB+kwyKPB1i9agqkwEqZJqm+HLULWY27rx0Q72mUWoass8VjGOIQHihN0cRKenQVagMsqEtZ40YXPq4geB2yGWCXNjHdvWUBLwzZJqO0hL+TVEJ2va5urbACZWbCVYXEuLKywZep5bhnERlBRuANDHRa5c1HgwZlFJY2kWnipFFzIUE+znKy+EtINIQLcbvWDo8tdUmlOANNl1A7/85EXGmvHeBG00tYB81LS0AuLBVnVATUY8Ryv9DreSbjX5/Gw7BN6qTSVmRHniapOrKd1UqFa33dmLRcn4eiO68TzJgwXYga5OrAdj+l/P+s/3w5u4BXnkOdFpGwo5wOb+7Cf+7CX/0GtfRfzjCN8YfJX05g2BeQMAv9mxwCtgIWyOwr5L/o7pR+6SJ3Fe/5QLwwr4C6BIv1fKyzpToXHJTbLiG8/GQotrMJyTgA31zp7sYz07uavDfhI0+ET93fNFPKrlqZnmkCBaS85u7Qkeu8E9ciU7jYt/Oin4Cirkdwp8G3qlPh7jTYKupVrjsR5kytjqzkeYIFXRodnI/DcJL3VsvKmexWjgEoQCsdT/N5gLf5grrxeJ6vHTm4gO6UlxdM9fCJr5VdTooZGIdRDXwVSKniAK23gL3Xr/TsPT66RK06s+5MS1xeX2UqEqZDcGRYCDPKrMfWwKV89WhCtCt0umFC9cHJWKCO87lZ93ND0Yx1Ilesax5NH5/A6H4+Kc+ulmZcK+SoYJnx5BWnwRUNUOzoqJMouyS0VN6PSOkRm10jTnAgsGXKVzQTWkNVwXMVcD3cwHzgiccCc+0iwrV+eIB8vYYrzXPHQmiE1ZMQ1dCqZe8YRowhM391K5bkoGWFgTnpJC0cvypov69W1PHZKu61VvUKlrlgOFehv8dRqYiSVFVPrFeh9R+a6FKwUKF/2DYN5EtABZqrc/t6ZBF2b+Aky+I4EDDf0hE76YPlKyXWsFCNdaYrfEHqwDPaoVMBPZl25/OkuXfYh1AuGViPJI2HzBH4syPx50fiP/fFS0ErkVp1KFpUCxjqH1AdWqWlSspDr9t9mp8sRe05lZKcAbbwhWfvXCT5uaMGgh6KpJLW1xfoBw3LaFijA7pLbA/dLBaAHq0vExEoc+vIsCVvS8dsgKfzHs2zF5UcNegfdc9XQw7LtzEBEfnVuw5qsk9o/ZpU+TG0Qy5lmqJsZZKl/bKVR1cmoRI9kMKywhvIGYGrFIq+bi/73BQ0hZ97urenL6JXo5mqakobbtIVV66p/w8gNxay1cYALkHB9QnaBuTxx//OCudewXQalev3OcXoIopkah29PmH7C415oHVru0dODdPkGKapDAJyVt7oUe06YBVuotXIfZ+gJPdtaYfWuto0odAH8LSEDeELJ+eFgmTOYjMjHzutTu3jF0WpG5cTsOdrF/oO4OA7ZEqfB4GIEzsLWN3o6/CT3nipaAhKotcVWg06C0PjypdFnnW8zKDa16wc7zM8ads4WfHympGqW4QkbMBZ9BJqM5HWi99YkIFBog0Hzio7lkrk6FpEIqHNUzdS+rD2lUqc/dJZEPYVaHSDy8bczBP5mZ0nMo6LJDO2Kt7crnZYv2dpIkqO4Lj+UwiaZGA0N9XXHbZnPaKg7UVm+cmsVbpgLwQqTBDlK2QRjYqU9WGg36q1rR4EKSmgVoQS93g0qWbzMLnj/zKeThc2Ny9xdcxvW89tJ4FBZ+TrYS822IEJJ+OfG7MBproKdaU+lm6ha0k6VD5Wkg2Rn63EH5QRvWjn4LGOw95S7TY+lo3TH5bgr0x4r7qHlmhA5xdL8inC2+X+qnIjibHk+hEt7HPJHmiPr5FDKwqa25qJBIaLoGOvda+c0H4n10rRyKPrgymjDoVVMM5x8qynOBbcSwY9gDZTfidm4q9hNigH6Zq7EjwAgaEWn4CdRLdtSHCS1yLr+oE6voukO1CwEDCn2jNsm2CDCNlvtAe2HK3BYr8H2yZ1uJHuZl7so7STbMGZwqkd6+yc2C8a0q/ngU2T1/pvyFPmk83Tn/jK+AeZjy7QxdUCkrSe3NbTqNgL40jzsEOzt6u1D9tkTG81GT/skQ2ayLenp/lHp2H3zgzG+tdOZtsNHX1oJuNi99VAhH9Z9NF0P6/LNDBfboa6fZhgGdkTPhmqg3Eaf+zelGaa70Uruxfjpw7m7dWUBlIMPOJLqqEnlbYw7m/rCMN8W4EIq3yU28lRr/00O6EP07B7pPtJPgO3BzSObqMkNTPyh4nQVpli6C+Kh7umeGXIdYrzyrTE4a54V+7GdziaNakWdy8rutDfP+5Q6uGXHqZnFasiznRQXfSQERvNwMTfZtcLB/4N88lR1Bd6tC6Wmg+3UpO1nNAGReekn+dT/fCb2QYDbrLizeyyPyxWZ8bSBMBkfKP5KJTH8MncwhpdhJEJPjKZR2kWM4anfp4/4AqMtort1M9HJXJkDjXvCa99fDR7j1goZ+Ci5eNlH6zuA1JT24fiScpErMTelfGWWtwxQgHFjjzCtuJuPPlabFdZTK9hY7OU1LD5pjsLmKV+V7LRWsksxq1hcNHhDR5nYFYqnRg0I1Y7DGhmMD12qaM7njEng52y6I//yONAG9BDsy/0hb98H4T2Hv7Q9t5BMyMPDTB4Nn9XzMNV9SGpaZMwKq/cRu6MBdc0PRqMupDoGiLfYQUGNXqIoSzglobh11Ll0aDyYCql7wahxgrlvX5sEk9cZ8huDzRQKtakbzDk+1FCGCwTPmIQ6tuLe/08bRLHSBvMs1uV8of6M2tpff8UM/Pjklg8LY7ij2R0alrmSxLrke4KNjZKlWGvuIKL9jaT+K844epjeCsbzgtnkPNwXuM/X3fC4BwyjB44eY2kUW1gqzKElvowWzyKevTim5hHprYrSXGfbPU290OwgmbZRoHEXmVmBwR7emHQ9K589FG7k96B/hk0nQWuRNKy6Ee92NUl1NrCPFkWodFqXT7dWLX8EYuTjUw/LIFnGWQh/wD6BXjF5f1UsZTtMB/UxgsRVUy8uA9OYDJGlyEbZyNpS1HacBx90z06HU8knhzZ+GJAVIo1Vl/L92CjS6WtHnxx8r5FZ4xmPbZPYWNQQGbmEnRmuZ+BSxs5k2zBqQJpskiklWy1PIuQ4XrcZbGXdyOzpNmGIhLrhZhgucX6peINVyxIRreX0Gvda5tspRgFQCo8FlPjIwyemeTOGHtHJCIiCLF1sTgfj3fTib1jX+DJSDoQaa0feE+++5K/Z4mSnEGL3N11JS8SdE9HeEraqGfFD0fVEJwXKwldJ25PbrDKdG6T+y0F1RlOcDth5Q1LnHvED0S48Kx/2FCEsd33NxRhFplVkqLAB2obiywGV+ucayDaPEbVTg7QOnlfSrsfbDAhf+w3rmPInvWoA13OtB5XbLiyp9hIlxATesgqVVuZanqbKm6MJh1Y9lBCLL9k9Gl8cwW+HVN5dYJRLrKWiYZmurNPX2FH4z9mJNcfpaWJPKJ1YKpu6aZ3cv+m5HAb00cnVoSnzXdi39v8OjrjroXiW7JZiggXhh5ecLu4/2OIdA7Ih+C08S2Hz/Mi1Fqe56VEdMY8L6Zn4/H4j64J+gKCZEl0trLXXWAjGMsGJWQg26I8EcMmW9IrrmlhBZrg+JIlHLZJUsDSTda8UlJHNIXvj2Y5Dm0N7+NY9pee1o2LUIfB7vYSCPXf0b/4OxT2bsD8RsTjfKH/6Z9VXOcwfICpjK3rhMzX9DytZOyWPLfXrWCUPg9NPwImrq4cFDp2bgze3FOyVbYDpm9SprndbD67s+TRiPMDD27nJfk83rKrqZ7X5xQq0q9YDHNhWMhV5/fLowhZv+42gEJbG6qJssvEbZBSVOXSZTsKYuja+uiYEEIglnuoh940Z5eYnsnancUvHRghyGUuRsN2kzpsWYZVmcuVBAd9W77MgSF8cWI9JZs5sAeipm0DrrRhtrqDCGj+YStWogZxgwj9oEfBAkdsCZHMvHQ0uwCj1xdrQQeRMG1SSzqzI4JDRSpiZTWQ8TCDQIm6wsMEi66wv1qClVex6HKgZJe6zcRte5SqGO6zX6dWll1JmiVrIz2g68ZgQnab6IEXIcRmwh3ZYRxAHN5hGCfHMT5dGKlkiVuP1WAvj64TsOvFLGDWJOJAP/lY+rOPooctUXaFcG5CMCa1a0AHPB6LmSeMTZjfdEePpjmWiipzbiI1JJMhSCDb6SkZvNPUfwVnB0LYx541RzxuJ/k8hFT3ptWjI2OJC8b3RVLQnYF/CSf9GYYUlJRr45LCdn5cmnOM+J+nGctEOKfpC22h0DCFPGOcUCZPT0PubViEX01O6XyqRR4tbFvn7ONCdyczP8nnzoqrvnzzLNmUx3kP0PNFsKof4FFvGGqlYWNjR/bvu+xaITXs0W3mplMCaGSq9dDgslfw95VecO/809fRxfT0YkqMuRWRmxYdiWa1RIXZ4s43G5IMY9p07mxL6Mn4UtAY33ZVfdkuC2NpZQ2orngTjbcXfnaxl7EVNqU7WUX1OZLvoBYVfDWmbgulWK24yneHH1cVriJPvce4Kh95HZSwgX8Tx5T8neyLftHFIDycVUHfSFbhqFqHRluMTCF73Rk7urVIY0gLE+jEreOr5DkbiOfzMTy0c16rX25fTSgzM38k16QXl41tRaVVG+mqHQ9Kj2tRjO4N49KlY/vbrXN4V1f3WuAjOGZmozND0lk84L9yZ3zmzFEzTpQwu8YD2B2viUbXWWKDSOkmchQHFhbnzo2qkgRHQ8tEBty9dVYSnR8lzW0QZLBgZ46HuswCmA8R9ltgtcHh8HNJD3RKA4PMUdZbLlFOtrvUhnEyICPSHGYAsR3mR598eOA4RDUx91qTOIbeVNIBkpDJiqcJlB1dnsAJOg2hOSqwoxkt5cC8PixAfV9cX8Gqx8PJzjAM7N5oP9h+T2rYzFYabfWizslupwMJu8s4qIywhoDnZ+gK/DqkqPM94mMlfji1sFJxfTppGJD3YpwMzng2OOP54IyfB2f8cgzjvK6saydCejFOBmc8G5zxfHDGz4MzfunPCEXQt3+YDK4TahiP0Ak1jEfohBrGI3RCDeMROqGG8QidMBlcJ9QwHqETahiP0Ak1jEfohBrGI3RCDWMfnSDjVL6Y+cxIeMnoK67frkNzxEEetjrhb7XHe/VlzX35Z/NSCj73REj+FIdndDml9mfNO0Si1lGgL+nuK5gEjn+Du6vZ3iiMhyK1J7EeLjJ0IJ0MTApUp8xL0fUFY+1PIThD4lH4kcAc0ZZ7fsEUO87W7k3yOaX2XX9x6sksJg8y+L2461euSImrmyKhGTR4ZOeLfsTzjUylzdYYbqqzuZbvRY8OMSAUjkF3l2M7rL3GgfcSMN/nCg7P1gX0PUvjzEbVbDt124lo0ptoAFl6SwF7LF4S3QbMsrY0LjilL47hGt08fS+aQ3tDMPNvaYbHaMjVCm4278rUQudkb2+mtp+2Z3RgWoYf/YJS812Jv/v7mYQmH57QA7rd3d5cFu+VZMFuaksRSzpcr7Lp9ktr8l9M6+y/mNb5x6Y1f5j/18prJ60PLq+dtD64vHbS+uDyAhVlI6M799fdE5h8YAK31gsPt6BVaZt6RsUp69DTk3fr9ROx1h3yS5LHHaarfvARrtguLAODtUQzBeyZU8d6kM5KpOZkDlwuH5J18iGsZwOxPmOw7TcZpG2xuxs4cH33aI5Jd5J0A/u0wKZ8oZC56GjUdHaNAwVZp8aD2xqnlQ7dlXy5uknqlI8rfmfa4p+V00n/cZ2kaqGdDEA7r5a267C7hbLPjMiWvXFYo0Y/ZnPdiBUy+ToCJYpL0l6tk/j+06MLbE6e4m3OCmUMBlbBmIwYySAVIUXwCUXkNy1blzguKWaN4jE6VDljtma3rNJVX2ak5eHgFEcCGB0nG3TrWcrDQ+wrQdSQmIkm0+0tpXzFpGTTidwVMBCtiEwAsXob3RfLWCX4ypxyl0oZVL1mDXTKAh75Jk66e3WYbjBMgC8SL0vqzqOpBO7WH5vDDkAZ6haFYTV80TxG3EGhkULjQpwqMUeO68F4KirOKKgkwXBn/2FvzDVZc9pEc2C+SiA3Pgq6yskW3VGGFYeCeDJ2blwWhh1SQRGzpMmTZIdgizN+NtQNGoLctdpe2WPnJ+N/XIVx+o67L/O4wYoztyZe5jFhh4EpiyoZ6kje0SLH+OEmmkWxpN90tkyJ4zpgyWbHhcM19WsZkH6Ras0i8du55AloXNdaztzYgSmjVSMTb53tH+BUg7xhGZYONOBme6EMCujYxrX+rN3BeYD6xunkoQ3XlnTdTqBDlETN0hSK5ABzV3IzOXRyoYOyyjWjlS7C4Gzl2KFuctjgTfkpR62bf3bRrzgai5lv1GzlwbDVWPlKbkk35kykmnDxNfh7Eyk+b73cNsoi+HsbRY71qHcpDnlyBic7MhgeB3Q5TsmbJMsckqeTLbVSk+tI5EHclWjjK84IzRcv3ASRtGEiPyEv+h/61AUTSdPlpplatvIkMKP6LPiW06Ed6OhY1wfKmLYftpG+gY7Fc4RyhcXwxBznF3yQ2LXoERXmbJgl6LsIFIGoOEPugOC7tnWi/CywOxNXSxuzuPakZB7BoTLnqxhxGxNtsOAVRmUdSnF0fvb2MtDBzKimE2/MA2mNB7qTEI8873ZXiid0El/MsdYrniqHt38sni8oclZHCnqsvxCLcqZV5+t+fnro/r7m5ryWStYNhRnMYvM+Tnm60EOFmFThlPqfZeZcvRe6EzZntaWkS0wsOJ8spTa4HjHk+6Ibt48fQlPMCVXtlFkLkvG2iMbZYpnXMBwMWHzFas7yPYRn2FSxmTraXlU05nQ71NwNh5Uc4uTB2MANp7Sh5+EmdN03vFN026Vw7ud/xJ2r5Q8KdgOHyTIb+oN5bt1bHpGwXf/vNj8HUrMgLTPqDioiQ1eBf7KAoiFR2zLDcwecuIa+t7TluwWGYR+m9rzA4ghBJ5iZsdwJqknTOi4mHXJ0HtARirSFPaHPBXL1KyZjxYJaSwJh5izfLind6Vpr9KPN18QcHuVG8GizwuetHvkllLGJuoi6sGeG/eObVOI3NJkAhoY154U58DxDm/F6suBsH7TdDa8wy2tA3fQ6YlC9NOXTGgF0TuGI+bD1SyTEX3M0aAXOM1NHtJU7n0ZywCkYmwWjBz30PNV21NvJzuSeO0EfLBzLSaFI8HQybXkJbo+4tZ/tLMW0krl0QcGMLniY2CkXc+kC1c9lJPUyS1OcetH6+4SiDIMPmf4dGpT+0lgaIX3TQmvUXIL7tS5MjYlzg7gjwTfSQF3xN9z0aDhTy1PUXKarOmnpnCoJzWDUmgLFgLBZGF0hcDmELWGhtiVWVYyHIcbCnNNabPDKOwolTaRtHq1FxLnabcBlpslwVCMGezrNyo69hvxMhe7NKq2yCuzowiK1zpsqmSSnl5yFGAIM7kBRVJ1H68B2DYvgp5cBwwNf58z3A5yua4hje1NQxjHTqlC3Bed2VIAx6JNYZTRNUNy1A2UYw6GIJmxFftcFSGvDF8JELCgYOq0S75NO7UvgzpwS72R8qv8/ZWop8DTbmR5fknemaluT2kvj5fRFJLLje6ss2UCcubWuqSZOMX53Uj4XDH+0nxTziHBunKMpfIOWCGTtjU0KwgfbJPYIawXWuUKzqHiBn+9NQxjAUFssWiW8m2z0WSihRldm5Q/ElaZpXEz/6FMhmihnSOm+CF/mw3DTbBjZdrj6CLXi3E5041VrkdJWbsdN3SXA6E78nQk8jJVwWuBLIXHTLNl9S9Ec04PI8pHWKvfRbYEEcvuS8CixfoyRS1PbcJa+8F+wBL2m181vTnDqPM0v3FlG1+IX+QKnipndmk/ZksMe4W/ANBlflVJJs2W7StlP4oAHehqJJ3NiUn8MSXwN4xO/eAtQGNcsGjSN/bzqTf4DMn7D4rLAvbO91851AIa6CmB9wgvHx0e30ekd9TiPUo9cwMH+3uBFFLT571cSLcAO8roTkUFVIjoWj5N7XieKjDzA4dPtYd3b+jiPZCB+xaTSDirhaBFZnWFuWhNLdP3Sb/diemM6EMb2ms3QNzgeGsc+dOUKGM1ktsSZMgjAqTjuIn5idqksZYIGnp6A8MItr205EY/N+dkKcxzX0bLo3kLK9I8hiEr5BNFrh+KEfgwopR5JhgOTPkq5+gBK/QFjy4GFftODSX9ILqqJg5X/TGjj1R8yV3cYSdoPqRDXLMCAGUNSBtJGzhgsO/Y4jyg+xbxXE4/UhoiespQF77gOa0e7eWi0s/FkrD9WNG0CW882fBvwlNxvvFfyzRgorU/HptUVBG6zdODOGk83i2jQkJ/09x4uccbM/F6NH7EINuHhNEZktuOlMlO0SkxXYfnHZpoRBlaYybU5t2wpfL9lQyThV1L6NUm34kZThkF9C91FPjq0dLTEeyeea4Zle02yhLzFiaaEfORJyjLFIrtJa9XA0Uow6UZAnjseLcPmbjwh94VHlsZGJvFhyLlaFp2fuFnzDo/N8PQNxE4Sv5tiJNcw3WJ05d/Mzi2K0n03poX0KACac1zyGqKn2QyqF6wS7MV+zr3Ffc5W5pn9sNl7vLq9ZZrziinM8xgi12CwVt16W+ucAf8z04VDZ2xY+BrLXtdGBSPi9wrCaqp7RnE87+gFdANgfrM75R4c7dvjxeDKy9T7IFTkqpPoAXYQiJZlrB3kA4/TjEKfHyvEPMjQ8/9oogUz+xaPZ4rkdhWwV3hy27QQUIXFY31wI1PasqxWgZv0xJ31xJ13xv3QajQbpCI/82OJnMLpHwJG11x3p1i4shPunlAdMbY+mDQ74SadcT/xlUw/yfthJ12wCVtxPGJgw35XmVR1CLBmupkxBU53VCE5e4Jdu6a1N/jU1l1rz5B4AuZARroHljjTAMIHFadYVUBjqegcRrgofTqgIKykRANWm7VhSMLHsnbdtYLhX+yd4fYTuTUr3ZK8TFkk6wIn7BA84rk3y4CZBY38HByV/9CefZZqa1Lfl8YJ/XyCfkewgYfsgze+EV67KWnwCyZouIcpJvqubXp6Dx4JM7UHUTRkQsZPvlpZHKKVgpsUaIrDDQU11B6PcKoPHFdt7I03bXa7mAqW41X3yDo3lSmmJL/vwBFhASlaZ0jsXfm6MfThLpmtsXarWZdaWwJP3MEp9za1p9FUGY8NLHuHwdEZkWHpAMndYxfT4lC6Wk739fkD6OMCDguCJSBoA4IClZL1lcDRBKiPmgie8rc3xdFw+kwjeHIM+OwY8Pkx4M9dwLDLEephqUG/cXOaBJxi241gdIG+4kXW43VXMcosk0FYzgZhOR+E5fMgLF8GYfnan+USwwljIWfLACtK/kQvqslwVGfDUZ0PQTVlefBuPZhz8PpuYJkMwnI2CMv5kSxwXGOqMvSUXAmcQrK3XWhuFO41mYyfKrRZTYG1ki5oNfaSB2hC6bslXXbkMUtOTIXkCwSfOD/vaNHt0ykmoqEaniUbpOlZskEanyYLB3zLcLiXhOpJgh1RuSzNZBias2Fozoeh+TwMzZdhaL52pzEGUM0iQB1kRM61k/HD1QkeK5NuTjntucUb3rj/tprpZ8605QWTue7CtACZEpkVMuFND5kWP3MmIwfedJDpkq3XNBgIMnvlDFVLdMVZ0HaSDRPKa4knt0sAoRsm4wvsLhYye9Oj0RIfhHRISpdp4+kRO8y0lcR7L3nwnGCMOLdFAsNyFfA3490RiFWHF8OdweQFbLdrOSJxvmjOlJkv6jLjZBjmZqunZ7Og8kSzaixkPM4YUa53yfEfsR6TCvKKsRd7//4P"; Sidebar.prototype.searchIndexData="7Z1rU+M40Kh/zVbN+wEq98vHkHDbJUxeHGDrfFEpjkh0cKwc2R6G/fVHchKGKMwuRo7Usr21xQyBzUaPW62+qfuP9tkf3bM/Go0ofg2I+POP5kB+t8Rr8kdztPq54Hi9PMWcs5fodCD/QCP2Ev7RPFvGq0D8Sl389QfhMfVxcINnJJiwiMaUiV8ZzVgcs9W7XxgEdCF/ELO1eDWKOXsmj3QeL8VrjbdXhixgXLzyR6NZS/8RP5EfrTEUX182H7Jb23y73Hzb726+pfO3NWw+89t/F9DZBz/qjuRPsxK4IU+xdQK7JS/3gZghcEcXy5IjuF9bX7+lTXBGwjjdAyglYR2DIgZGMaQboeIgdgNMCL2mGQhDHAQsicXhmMwCAoRF245+2LH43wTPgZCwtDV2JMDsjo4iET1DHJbkB2chEAj9zh6EjiGzYUi5nwSYQ6GwvyU6fTMU/kxW6xO6FQVUt49hXxj6VjA0yoohtSJxOIejIVUQHYMgvCXma3Q+X5A5uiJQD09T+vKWxf5SkPDEOnDwtlns49iXkKYhHJU1tfG1dmIBBMW+MJgKQbzXFEBA2FES4JRD14py8AISzgkHHJUxJhBbEtMXhh7xawVDwhAfmqAppgEcdWHHB/NiTtdwINiJX3vil2gkKIA+Sk2JxJRTqIZVx1B4Zk9XoivG6T8sjHFgn4clkdjj8bBdlnUaavDOkGt6j6YJB2pfmQpgbhnI1DdMEJ2GURCA7Mzdyg07o1sQkPJ/dknAieAZ3hk+jXx2OktoMKfhIjo94zj0l+j70xP1yT6NNaNhTPj5DxLG0fa1OY6EDSa+kWt5okHwfo3NTk8s54PVP6X/fEjqi8jx9jufyI8oXmBJHNBQ/E/DkPjx9gOqsNv1fRO2fQA7xfMh6/QnZztuWszPw3lZgLf2gLcPjQAjwC9JSDj10e7dio69v2971Zu2uDOxqnAlSy7Kgr5eU9zkQ5vPCPrx6L7oqDv7/lbv0N8yQtpb4SAQ8h2JDxxFRYe+82F2Gr1lB/qUBMRnq1UiPjq6YklU+KO0Xts/S3uWFMsheTQZVvDNwL8PqViWWOtr4Yk3m/uK5rA08ojEhYCvpYBHabnHWhiP6yXhOIhOr8/GaIxp+MTxqvA6RynJ/CDk/x/PYLjj+EejJkiKr5NfLPN/LjSkaOC1Uke70A+mtb85PogagHowU/aSrq3Yz2Q/oNU9DGiBeSY3eL1ZaaEfiOIFd+pwH8gY+4I+i5aFfyb9/WeS2X0w+Eyoz9l6ycLCH/O9/0zVgXkoxXc1uj1nbK7JEA3m4igRjuAQ83nRn0xH8QFBbxN0x+SP/BI8F5d2DKfblRX6ifT382xNwKe852OxksI/EeWIz575NPhE1gQ/F/+JtPdd+D7kPZKE6JHx5yjGGyLFfjK99r6PAtiR9xLx3e7HhX8uyo45vPUH5rlM8SwgcdEfiHLMtwEbXlPCVzRUy2KL90g6yiMBfKrcF9+XVzYIZI/xgc4JE278Snxb9MfS2S/R+aAsG8xjeSQzdCaLPIt/vCsFwZBDw2UyhuFlGkNBJAh2z2XF5klAotN67fIcXQzZedGfiBqG/IL2eiP49kzGG4o5Po9mvdtC30YkehaL/R80DJIoDRS//XrRn1N3/5RpfmHnGHlOf8vndBEwxqun9FZTCu0pyf+LLKP2XmjsL9Hmf1D0Z9PraFsEJp7NBeXkRdYAe4T/oD7ZPh2xqV688f8U/SEpcczeFyLLJh7S/rMp/EOpO6HVvFdx2qxKdNqo4RmgttsD5XGCg91p8+t/ir49eEN5mbHwaq2ldFbLXH6c75OaizPGjxn/ZQmchwuxCPRtiP0lQaPtzwv/XNSivsw2wY6U3lPYvcvJMMBRhC7ojBM0XMpccvD2MIr+LNRTJnNCJq9nITjQWRKTeWnQK5FlW9vghon1zEvCXKkzameuJ86HuQw+LjhL1qURdjUGmTkhrwN+mcw2xtECx8LNe5WRxtoZjsgUXSWzoqNXjttWZu9OMPpl/1xuEebyGIby9TI8A+Wec3an4XjPYNdYYfumJXsS3cyn7vGeRLUPbNIfD7yy7IG2YgVlNvqP9xQ2nRhKsBMAn8rbG+o4KM1+0G1xdLxn8TC5LctTUPzhlrWzYSW+ntbbjeLfQe/rHsdj8eWrhDvdWk3m2ygpfMcdpd4je6hHh3O3XathHqFv3Xa9WfjgsnqTzKhID3yfRBGaSKqFB71/xSL7BTEt0MPC14hpZ0n0+HpF56vIb/bmRFp8R+PC89UNtWvx9Qao3S6+AddWenFkDqtrQY6ojyacyTOv+BkMJWjywZzXo8rzHarXSmMv9xTWmR1yLdbTQdH51mu61/70AI9Rs1d85azcUcp+YV8L8kPhLTi7FvLfk6LzVV1po3zPzrzCm8iqGt61HzREmBP8LIeFn7GfRSetNNs0q4rPOJ0vCl+v3tVNomghnnrCPi5BxF5t52tUkIcyNzvGIV6Ursy/aTSOPMTF57sfuWgajVwIvsKN5mmDPRou0OYSS9GRW02NDEeja3QhvhSdsl3felj8wHJ/35bLXr2kxVf+NQ3FFR2zcim0ZdSe22AeFj4Qp10Wrw/5PqTxKzr/ueYlGH2ktgqwwDttPFN0ztr9F7U4y1nSfowG/v9LKC++q6IOrTYap9vBHu4+cqFRd3Qv5euilteGpxyH0RPjq7R71a9bxNPzwld3KaPrDIu6dzIe3BU+raIWxpj1X7zxSeEJq+2/zAbxvHs08go/WbRe2+9FmP2ChRbk+7PCFyiqAxXNVtCNSFyKi9OKx5K9G7AWZBafzFnhS5mb+4yNxkVHk2nR8SpGW/aLPVp8vZtB4UOiSqcjs7W2I9lmaszmxc9wt22q4sfRGF3QoAROttKTKPswKB3OMkWF7mi4KDrlerNjUS1fcJY2QJuXp4BcGS5rVkmnXT6Enh6s1wHFoV94Za342Gavtu56qpRGtq1ejrjC4XxJgsIPSVTqyc2WzFxN0tnsRWes1NeZtfGuULPRLDzhusVj8HpYeF9QCWZkn2Gvx7fwwftuzSZf+UlDEiMv5kQOeio67Xptv07U7CWU6+8e8m7Oig5Z7bxjNFVyXfh7VIor0jV6y+d6Mi38jL6DklujZRmC8APa1WaU5HaE1eYO1xOBe7VKQrGaEmQA1UCd4SNwgkbeTdEZd21eJb6eFv4IVPWF0fjQn2ffR0UH3FAawRi1Mf4ihW9O2doX4LrRSyeCb+ErxpXrw9knw+sAvhncopgh8UfRMasFzEYNtxu6WMYvRH5Fg8KfeXa9khsWLjjBcvTXpPCliOpMNqPKYzwofDFtbz913TAqyeNh4fm2bd7gGZ/X68W/zqrdXVwLMZnTMoQqFCOuZ9QLGRMimzmsA1z86paWzXjFmETLyn47OmSxelQvQQ9b7ZlAWphpSNHD4O+iQ27rjpvRgsxmNCAlylkrCT+jBcxjr/DunnKhxGyR1vi+8MpCyYaYjdaP/y68/Kpd240G4W4Hw/JUgfcUx9qoCXdbDSk5Ll9hIuOwDNUWysUzs/qCxBELS9CQUrkOZdRCFpBfGH/elg+tSPHHRylnoFkb7pb8TKJSdPGzrKAl5oacW3KBZ/JC1PnPmITz4mtsu01AN9zbJRBvCJy7JeCsXNrpGE2wfvdjEhSdsJI6MesTfr/16mUYl6Z2wDaan/q+TteBBivhfD/R4h+Cyn1Vs27LjnbaLHHNeOENaqVRlNl7aZPBCNWLTliZSmc2rC8JNwpPeD/QYbZIYyI8b3Tty9UVm7JSy2zWmJucFT59ojTDMJvQngyRx57iF8wLH9xXSrrMTgkVnB/onLCiQ1ZLa43mAiejwk+A2Pkgu4slNaNW8mRc/MvBjX3Chg1jzmLms60fEpShCFQxL8yOqJv8fVF0vmr3cKNBjDsck1VS+HmhVodZ3pE1wSXo86kIstnpt3L0H0HeC439ZXn69Km6w6xcTzzxb9ERW22N4RH+gwpRLjpk5cKU2eqBLeS05wtnZctMmQ3KeSRGU7Yuw4zyet3meeh5hfcElXiR2aF0nneDpoSvaFgGH1Dtvmw0xOxNC9+xT6lrNtsK2Ct+vyI1hG9WfktyT0oZ5Gy2NtF7KH4eymYQY0oC4ssufeIDlyKrumu5ZSVRImnLAc6kBHd66k1FORutw5iKpRdelq1eUJtOUAlavih5P7ORuE1RHJYrLzblTt+iiTHlif9cdMIH2tjsuZdwTgpf2lnv7NfFmb3GOn0oOt9206II35/d9euFr7y3e1HnfnyJPMJp8RMjljlX6b2j8n3ASVD4085qWOihdONIzHoeD5NbmTeVn5hXiZBjw/YKr46tCvPjoGrwclS+117hx/X19gH3jQkwm5NVhHA4R+slC0l0OsSzgKSD3FdFh66UtDSzlyin9P5o1AQ/8XWSEsznKZAgQOn7Ff0hNLUnNB/tIVzg4lcbNTq6lsnR8F8xFq/LsAXUCujsyv9oz+B6Ug4tpBg4X4iXHO0RbNvmDnxZm45K+kB6oB5IGWyj/T4SjeylZUfjn77VyVMJDudaB+zBUAolBPhgvrsoh4+mzBz6QjX80R6BbLBQDvtUewJGTs9gTdg6IKeDcM7ZgoQsidCE8KgEVYX7BSzZL/tOUnJfRz7GPnpkK1x80vt2T72W2fDRRx2WA7Vq3tTbmQNwuqwnQ9lrufig9+2YeitzlEcX9F0ShjRclIF2bz9x3c9cRqTL2qOxnIBWDiWiXAHuZ44TaNOOhVFTEtFu7Bvj2ceL5wa7FLJtDzeXbTF4dCrMn9K1A85e93m3oaXBeTAdo827VLCNwJ7ixa7rSzm4a7eL0ud+xhme+ziKS4JcbTOeObOtj1z2JhGfGe16lZQSvA0dc0kXeEbjnY7ZqZxS8rch+NeDUTlh2xD26wlKbx4vWfhaTurZm2fnQN0bXpeEtnqdJXszUX3c+2UY5eDeV6azWVDkt8PzksAGoMhvSfwUsJeyAFcG02QOHeoD342n2TVsLAt5ZcpV5usE+uRLAtq+Ttm8A7oO0VlCAxm8LTp0pcHgW2sEC9QfabxEHg2oz8KtL1p0+kpHlex9SvXhV9EW08DXuDS468qFmezzx3LgHTMux2SVg7hSfJX9rr8+8Omoyg8Zg/3AKuVtEPcj/kECEi7isqTiAPidj5QL5qWJY6kJicw1nV8nHhE/4TR+PR3KXhcUXQjyLzgo/LiAltK+JXO+2duC02Iuv0Vv71Rw5KqUZ9YreSAvi3w3lJaSmVVKHrAvcUyeCVkXX4MrI4GzX1PPBXeC+bzwpBWLMHNsNg/S19+98pyUSm+dzLer8gB+w4rfo1bp75m9nXUeoG9J/ML4c2mMkpaiuDOHY/OAPrn+uzTqRPUurUj5Nv1QGuZKNZBZZ4f/SEs9U1/nPqRPlMzRZDsFIs0sF988VGacfMUaTynq8JdTTkKxILnOqJzcs98M1+c+EjrGjxl/LQlyJb/5FU9IF/kFDUhUCtg5RLHygF0S0VZof8VW1KV9xaLCd9ZWr4N/xUTU5Xw9mT6URKpzMMh1aY+pz9kLmZVDaUMA/v2qJNIN4ITcvMOm1q0c+Uxl2FL2+tkcoMtGlJz9LIvZrcSxvpJc00bOnuIXzAk6w5Fw8cvBXenHlD11nwN32XQC8zkqg3EIQZ9vqwvLIeBKCKWXuQJLH/h9SOOy6PG2km2zED7Z1BfKeGE57HEAQcLHx8eSyHdnvx+W0Uj4Rm9vMxFp3Oo8XNDi90fVno6zPfF0mAcsKXxpSr2nNIysZVcl2qRHNHomcVx4oW7rTpDUR30xRLs3KThsJWTVym4E6sOmM+FaDpdYfM4ASSlHXjKLXqO4+E3G9Z2eHPCL43KIZ+KzFt7HVFSLDdx3JEgT9ViIOo7xDEeF1zGKZZj9qo8+9an4IRpwjotf9mZfozySGRoGSVSCeLhdwzC9Vk82fSUvZHvDXfO383gpPKlS3Lrv6Hb08LYUdR9AOZoc6IdUcsA9DHAUoRZqlwS6cg88e6vxXKArHT23DSbr9eL3ae5D0DFv/Msh8rpztfNAvu+ZXuAZp35J+B80PrQi85ckJClz9hSXw5xRskTZ+03mgf1afOIgoJvvkRfj4l/RUrMX2bNzeXD3Rrcl0S9t5bKnFd43+JVw1EB3ZMViUhLyqmb/Qnw9N/TNkjAH4aSOL/9GvVqthsZJENNoz4wv+gPQbgyfywOQ3E92ZuSmdrQc+JVZWXasmhR/kOqdUil81ZWyJ/tbg3JEpOYpOnb1nLWj9Cdnf5dEzFWLMnuWKQ/cnInXVys8C8qiXkBEhMt8mloiTle/ztOScFc0jJWD9FcoDE0uH9H4clh47B0A5+gD5XGCA3RTInkHEYPf1KxXCVYL0MsBHEY87JHx5wVnybqifnzqL9smxKcDmVINcdFhK50V39owfB72rm2zDuxLId7hHE0JX9EQF741lzLCrL77sVnod3hOGZqyl+LX4jW7ipRnbr+QB3APp7nT4l/TUMeBtDIHdXPFLS8OFP7UVHRK9qKMPJA/0pMLKocKF5229rC4fGhv36PgsBXtnf36aJ6w0Rmn8xJc/tpvLZK9L3GuzG/YpoUlGqzXAcVh8VNEfd2O57nyn3IcRmvGC38LTG3TZQf7zeAWyZpezoKg+Mb5gb+fOa71Jegc+8+neO2fDiZD5K0wj9H9xEP1Wq120pS1MA8D1Ljfhx8oPDhdLON3Cw/Ik/w2WmOfhoub9LtRva0+IvFR5uzl4+f19lQOMHX2MTUPwyJySR9Skj8Qy8yDT3uLpg0YzQfGrwk03XZKpg6YTP3QE8ufzEadDeVXVO/X2rKgieIAydph8Wvxtk/Yb2dLuwxsuNNUOsgadSdZZdVIubBq1VPxEngqZJ9C1ujX3BQvC1ux0a+7yeqDiNvxWTmqtqywalesPsmq2W+0K1afZdWqWH2SVbdTa4Ln0jFvHwguLfBcPrgmYIBLBzyXj/L3BsD0wYNp1g8j2McHU4evYRofpFOODabXbNU2ofxNWP/ku3DgQnlgbScRilX/LtQPiZ2FU2vgDVC73Wuf/I0Gc7yO6Q/yNrbRBWQWHN6BdyejunXwW9GCg7tl0wDPxp7cNMRWq+j8jg58U9GCCb1lA99c7B32VjDDxgHDqN4/vCZoAk5fHFVwqVjSNAJKBy6UesvOPurX6jW4VBotS7LSl78OlUqnfVjsfWwqAsD8rStfs9aEJDRK2ap5OEPMhffJ0UT8gMS/Sp1QQ+1eCEmMLOjh34JqA+Zkwaf6LacOZIGyYAoOcYyD1yhGLXG8f3yJExIhK1vujVCjJ8zm/S7OIfm45SckaFb23xu0VgXtS9AqQL8H1GnXmifn8BC1lPmrFrWVQNRyAJGFJOJ7RB0HENU/aIdnklEfPKFGw3yY6B2hutBFgOH0zScX3+AoXm+jhp4YR1cTQLjUe+Dmc9S/o9VspLRGJAjg8vpgJJktXq0afF5Wgisf4qrXHMAFSLzqlfLKQqtZSdeHvK7nJIx3Y7XTutCPZuGW3NG7nnio1RYKyiNhJD8wVDYW4lHb8iw08H15LXh7RxUuIgvic0t+JpHMcNfQrjHg225zoD7LGrGG8B2mu0E65z9jEs5BVwdY49RotKYTdHlesfoEq2ZjMhGbsaL1SVrTcUXrs7Ravcn/VrQ+T6vSWp9j1azVO/DCnnDoVPmpf6PTaVV0fkunXcnO7+m0BZ1Jhef3ePqdKVwuVqIBOy738OXGGp+OvHoEnY61XdWRV0ig07FQS7Gh05XNtuq1Ey9gu6olOXM4imgEl5aNq7bvcfUcw9W1iqvlFi0bF9zf0eq7RatRM1++8/3WQ/V2s9beHyY6TKKYrQjf5Q4mAY6fGF/BhWfhTNyyExp/eIO877fn032IFbR/hTYeIG90BR1Zb39olYXC+w2xVru1kbGTQ2ic/aCRQCMbMcAjeCh05svMNgw7H89MhomtoTTabdTNFwRNlq+RbBz8q2lF6x55MeNY7akOScAsOACHoD5Ua4XqNmsQW5E6OxvE1gKMzcImvR96qC2LGcF7AhasDAmn02j17ie7pJ/sTMj9XTN4qKgsaK0NqjSO6hQqC5pKoho2GmjcRJvJznDpWBIkQadW4fkXPC0X6FjbWi0nhMcank6F51/wtNxQPdbwSOlpgMdjwZJ+HJyftOsNuEwsnFaSSadicsik24LLxIJqkUy6zVbVNe4QSreCsg/l4Rw1+oC3jxWVIqC0KyiHUDoVlEMo3XalaT+iUqnaQyq9SlYUKmT2Qbt65NW7NbicbGia33BqQuYESJ46FafT5fr0aoKEA9m+/NX67n2nBECENHtJXE2+iifl4b1GMVkhPx37ex76AYsSDrgcIWsyLyc8XUfw1FtWxCfqtN3gkzW893U81+ETDekZDufoYnQHXe00zMnNhLMbcVQJfXzTadT8bUR4I05g+RhUy+/5dCo+/8qn14bKp9m1zmd0U+/U0GUPDhRd7yIXKM1GjVRUDqh0KiofUllXVA6o9IDLSlYvMy8qsGXFEpV2ReWAShv4wWwBinfTaNYiUFR61nWtgNKGDcWcpOxaCg43lcHoIiA/T+o18e8IDh0bbhGdrU6vz8aoXq/Vag8DdD/xAAHRnF4uFqZBpF2rnTQa8Klk3UV6VLrtFrph/mYvRSwgaIxDvIBclpdV9+oBuhfKBcdogkPyi9FfNK74pHyaDuiZrPPJtYB0HACSNfKtBWT+U3jOcFkYVbdCKuTBDBhH1pyaLo62TKZdPcAFYlR5CCDddiUeWxo/m8LjQeMCFd9p4mg3KxzvcVTS8R5HR0pHEy4OoyftFgdg6TCNA/hmMY2jD/iUNcyiC3lytXEW7UqJ/sLRE1rj7zZcHEY92Z/NfoXj+ZSJrwE5vSUxx9tC2r+bJ40zePd5NQPw39OFagIaTprysvxgOhzsqo6hYVKs1nrG1qK5YepWmP4T07Rfg01J9YGyTk7OD1OtgvMhnG2RpNTZcNFktXPyIbPG3EfT1kkdvOhY5rM77NGYzZMAUK0tiDP/jVPxepzkwufvljzroaOxssX+7vxCU22ufUKbbXUuWwKuOY0IGrdcOOWz5kxyp9R2gVK9ZQNTddb/G5nqlP8PQvDP96zp67zItMCTyVp9qEsmCbcue8eZ+8OGNbJCaHdXfzdt/fznmsuRKRtlhBqtNarX0OXsHBBCy3ppn+C2Spr+Q+aolZL6DcsK4AHAKqL973hSN+Wth2clR4egRjjGQyLN8O39/5m8/78dmdXsAGKlWbaSA6udWqrXpJLaMuo21hWkDyD97+jufUeJSxyTF/wKr6uEfWK7SHfjBHDhi2kLfY8LoMtkAOxzJzIjFveR4HIDF4zpMIkEs5nYhRrycpmwhgac49eK0DtC/+fCe6PUrTcKVGiWN5wmZDiG00QCzgXlBE3roC/LmFfFKZW/G3VYVBogqLSAUYEhKy3Q94ks6ZW/W52SU1nT+Sle0BiL4yc6HWz/Jv5jcSBRztWg15pRGck4/0HCONq+tiPjp0EO8YKwEWM5PfFGQTljccxW735hsP0vY7ZW+aloejUlkHOIZr35+wEZ8fpuXVEObNC3QegvGf+fiswBmSFnUXRyRvCqonNIZ0QjHyqX5uGxZIyLbKxATjYB5QmezwMClVLLovRcpt0nINOxubeuSCA/PVQ0HziVxtBcr9YkCAjYA8smmwlnsOD0FR+q2bAHZ5rwGQ3BqhtjR9Z6jTmOkwiRgKzkqk/HOFwyNc9pDYz0d/fI1LLtqN36/mjUzrcrzAOSx/xnEktXYtueTawU3bJ//gEDrrnPLePpfixsyXrNeIzOpEdHYiCo6qqIQUJ1QxZAMDXaIHfiltMdDaGAUnVWI5syPzIo75lyODvPvnaXC+T0KVmQ6HT49nep2kfEx2ltyzfP5+QlDRyxgM6RtxR2FRTToX6gvjIx/LXkvNAJh4UulshbEzIHA0kVtGxK/hiQJoQ/MSG9BJo8AUSViM8Lxo0BuOHe9BNYoQLIjKSHh3AGIcUuAe4+YTCsVtX2+zdCAK0Ci3LEVmnhPeMROkE0YqdnAXshaeLtAodQAWUUo1+LFMbntfc9B0y/3lOiesB+kqzQJFmtK2T/jQx9e5NZOKFy4MRGVPwexwswGU3gvM7/L/FjONlx4LQmNIpZWMH6FCwZvqpQfQ4Vk0ktcT7CSd+AJxZj/lrB+hSs1JeuWH2KlcyisorVjhVP41QRWnAazoVCPx1uXgEK6IMSzH/js12dgHO5XV9+hIT1zuCqc1CgrjCoaAxkVNerNfbjCtUnUP2JwZ55oDhtjM8K1X+gSt9qiHZvi8bYF69BqY2BiG1MgyDN4CSBWBH9p7IaMsGqzsWvUauOyM9Qq/T+Zzk90BnHcoUVqh2qOafiHU5H8g+gUDJe/kiXkj0x+B6EvBmT0Hnat+sMcJ2QBTDb+KZwiH+QV8YFngCsgjbM51Xakt/FquUxtv12uMSr2Sa7LDPwT/L1aqNJXlcEx+k432QFF0i2IJ0ekE0cXAhIskIbdSyEZpqsZoEUpEpBbzF5a45fKxw7HGmQ+5e8yGqxX9+N2Q8pOzvNU3ZkT4TMJbOL9M9d5glN8QzO1c56raWjgjZL+zoaeS2PcbkOHKDNm4EBo6WbjwAGfRsTsV5AufGmwqhtH9F2jz1g4dVDwWRZlDYnGKj7eCoRQ4JD41jsnuj0TJg48/TsAsKjpXU8XWzXpQGEE/wcLzlLFksgSJo9rT2jjWQY4NVa+OMXAQ4XRHgOyTqAc6uuradR9OkwASeM0hZCMIgoW6hnHEglH+9wiF2zIrI7JongiAgsKOjbiMTCdpELOxG2DHsqir2SO6jzn+tALK3i9B+cZKu7kzsS0SjGIdwwKSxMaRij2om/RSesn/m7xh5AyDS0HIjcuIyS1epV0PkBJm7Ra9sFkwhBCaCwsOxWXbEIjMetsMjWi0sfxXW4uS4EBIdCw7RgXMul+UupQ2QweBNG//YrLAHl/LEdl/iY03fhem7+eh0ioXB8SCUWtpG9wal4bHhw+kR9giay92jFJGVyR+aJD8Zi6do15e6SdZxwAmnP2A5UeCR4OhGKRBavhQt0RwKCI7JJqgBBdJi3bBlmRAMSwtlEdVWnGJcZ8VWc0BvHCAgUu66QF3NMQzASYjlAvqMB63KbZSgPYm1ASNj2lR8oeZGHzWWAowgIE800db5M0LcbOaEEUPmHrejkUpZykp8bv5DL3Fs4J2EERtP2dJSKrFOVHTzflqeNZ8QS6TtP6JqgtAr27b2B8Orr7LL8eZ0HxI859VNYYCBpGnj5Y7qgP2VjRXmsC7WEpsmMRDDlS9VT2Y62/MldYcrXNATHqf+f8xHNYoK0/YDp9P19Jm1qGmy2IFTjAII0vSd2QcNQ6K+K2ReZ/bFpYAkVnfXj8YBdwDbRNPEDsDf8oAlcGrSvYH0OlremvDDdPg3g2rNcoWKzLWTpDkQ4nKMLLquonDDwMw6oy5/aHZkJgwwMH9Wwb9qlk/YGT2VKbj1FpFAdCLTOvkxla5VgGlqjgpYdWrOC9iG0TSZvImPOINV9H9YRubG7YKJST8Z+pulb+bOaLml4ckGDFTr/gdeMA7pApDfkNn9U9ycf6CwgrIBFCu+RJ39r7lIQ2jSzFf0pUV2HJzc0JGh7T3osX4VCqK/lMaZL0ebixVh8blhc9DxpPS5/hQQDasrQtYhC/NcyfjfBMZQ70o2ODRzrZLWOTof4B41fQU3kaTT3NWwmW0cu5MssyNuwnRQIGB9W2S6drjUiYBzUxh6Rrj0iULxPazIi23iA0h9aZQI6JC5xhLZj4WCg6DYsyYQk8W7yGwwaB2WAxg6WS4I5pC3S7u5HE+qmQFwxTv9hYbxVnkBw1NvKFPi6MSBFuk+pw2FCuLzGH4gPDASFGs3tm0KRzmqCtD1Uy6JjngQYu1N1TsztEC+ZrYSbR9MaYDjCUa/tA+lmur+lB0TIBWAS9Z6xjSK7ucKZRNLfb/mWLQ+mgwHedOF+f19bGDtEHrafFRKMutLspd4ytUHQCZrT8L3vDgWJXkx4i6Q2ur7VAvM2M7nC8h7Lue+nEuOjR8YrNvts0ts1bIUXIYFjtAOBI/39ish7Ilevc46ToBKUfSw39P8ldI7+JFCuDwPhckd8uubMT0vtKzR7aDYZ/80g+grNezRpvKBCskMiB1sLzbIJoHzbqBqo9fFfxPOVidbv8WzQvPMLKj4f8HlzDyo6H9CRxl4F5gMwlcb5LZrNmn6k3crWAfbJihSm0XPOpDhbyCyyhLWpVaowfYBpz2DeGocVqA9ApTZiReY0Imuclu1Hp5d8UwPo7V76Q46dJHEcvB9FCYOYXnX/2wqzx5Hf8dqMl36Hq0KzQ7MvQvQJbOMPu3SEy/HqB4D65wGjowSXK0r/RinaXHWYcGkC0Fj+rAKWEZhUV48EjAUOjNuE8BUOxYLRON2RFaYPMckuoAmnSJiYyUyYTBWmDzGJfVYh+ggRC+icPtG0D1jAIgImdAKNjpyNULF5xyadDLvbU6UHI16TjusK+0sakuj0/GfMk3SqMLC4SF2nYYS3WaZw/8fbheZJClaYBByoCQkC4Zn8I18ENHBCjScBACVjt+A2HlRMd0yIFRijCB6m7Xui7Tuib7/uE1XQPg1tVxtcIdsi+yE2Hwmi0zMMpdZImRyUrd3Pw2Y5OhjQt2vvOxT5sAyDcxLI+NCIJ1BqgJXb7xnTRvkiASUqeo00tMEk4fN2Mk569+IsXQkUNprJRl04AorwKWKCpjh8hoJEkZeuUdUylIZLOllKbKWUivhzKCxlwqEWdnZNi8xvAaFvZ4yBiUSrnLLNFTg2p0oLfRLVDVmA7SBdr9lRTuhbGnpNBwVsKvrSv17iCFC3bcVEzDZ6SBfVdjBTdcAdgJHmIeMI2mAvrbaXulAuGPfJ/GTE8VMsyLC0yGoKqGmQcme5n+nOsjadhIfYh3KTXclhWEHRgMnC8LmdttYSnz6AIhrN/ZZBZoMSksYVC+A09OzaDNFc4eBpMxZx29pz84ZA0BzYcd1MYxt04VyHckY86PNmv12IWRfzT+w/C5tt7ojoZGquo8vmr5D5zycsiSGFPtt1i5oGUjtppZlKr2cYhNwtdwQDal6n5gkydZfRJSJrktBZEjwjTxDBCyh2it7sa10qaV474fQfoWFBq9aGWXN2wtkaDRbb4mMYSKwqFFiapGXTnH27eQUpjmQ1vr2pbxxxCubwtcxjc8Igb70kHMpBYzc+sAvlgz5kzLo2gNSHVX0qOcDOFmbrv50Pj7dsxRmOwFxDVDtEWgJTFW/8O5o7xp6ggulb5pJOqYQmO/sxk7pZH3DHSHxyOFeaDo5mC0fSFok0WyCfTj0LaEZUfkDYisYuFik1jhxVDQukLnAQEWBgFCu4Xm9Y4BKwTYsgyFvLvJ+kgAGvks0CApQsrLf2lXCmiVa5gECPNF6iCfafAbWmtUplM3wCWji72dlnYjTrLltBoG9nBFJTPyXfYR5Hau9WPFIe8k9pzz09CRdAwBlRvCJitWBKatVkqlGV8otPau9uzDh5KHsJf8I+QdfhnMpeh3DuFCvGXc8mr/NwU6N9xtPqFjAy1bHpQf2G0aYnVOpGyeHs4kyHQsvqtcff0NoiOtnVkW3Kp8AQa8AjBulKieqANow6oL8BdAdpywEUIO+ZcjgqHKQITZeyQV0grIIoCUBZBTAEiq3AZPj6+2Xz2UYw5wXkIgmCk2kyIwfn2ZBROG0xGjajYjtWEwrmeAchOx5ZUQdkp25adiLx2aJTHFKhiKPTMznwvP7fMJ5oEAxZIING4n/UrKX/iNejmLNnsvtJyNLZpl8EdQD8QK6UeaWHR1q6uA9ppT8ZbFaty6vhCC81n/zBQOijAxsR4o6A9RQr4LCy1gwvVwRsF2z6fezp+LzYAn0PhfcmtKyj1A5rp45PLfE/UXIIgtZbO4XdCXmYHzg6rgvhxqArHPvCf3l1hJsiZR8Uhxwd218kDD9T4wuRV//wBt/ReY0Ziz5RJQ4Dl2KLWRCvW4aE9o/cBGbDtvDIZ+apg6B1UMRlwdb3AhY7Y1Ps9wLpWbApvBA/O6q9rGzGGM8+0ySj4rXhNSXz+Ss6+9TAdhDMOv/ZnudozJ4Ym8vun46Q0pauC7Her2Ia4jB6uwsQEFfMiW7LJjP29EQc1V2dzEejDqkRp6GsP0SPOHYpEGZTuhRmDUeYdTsWmV3gKEbpG7gBS9mUH1RhHROW+IKm3J0YmELrg2thR6T1V0ifnNH1+0GculFdf0eiGCcch7Ezel5tjmdUZ73j5YqOV8pE6rXMUcIvAlsSHMRLH3NyOgjEZwtxOpV+TObUp6Ez21NxiTIHDa/eMGgyDIXsLUlEsSvklPPSHrkoolEqezeyGXco7TTvVfztE33nQJDs6ZppeZE845iGjkADI35DzOdUrHnhTBpOiW1kNnRzJEeQF+OnJzTgxBm91wWyW4c4XiKxOle47YvdR11ITIGTv+BK2qmrWwCUF7URwU+uMOuDYcZXOHbqcFDQZa7Pyw0dFSuLnQl+q/EQa+bI+aujrpdVZOjRoWK9pmYWLy9uF3hFg1c04dgX63BG7HRTe7nhozyK0YA6GiC3B+6ShEQswNGjwd5+3bwPOp8nm/vvjvKzJnfifbg7gfR6TTknMgeG8+XWcISbKm6Zi7tzw8aiNY1x4IzEwdmoO3KuyFxPN+mVF7nr1SoJ6T/p8eDM+QrF278On4iwhFkSoRGNCHa1ct4mwbUQPfExXQEHJXNzLT5gGMkcmAyqu0IPjtil+evAteR1tw4E4F90HhJXQpxgqN0koTt3hRRo1pzYMV6tmPiZK8l9MEou1W1ppxvxQddyfgN3BaFyk8haoHiH8IbOOHbn2i00CbwjPuNzZzQfHHxhvGk1GDhzCVC7aj83eHfXjiADE3+6JQl3KXUNRtZuk5hTlwLsutcC8wL3PfRdEjgwJ8P3JEYTpwIn7Q4QkZssMV9h3xWRazeBiNxk+RqlxpxsoInXrvBTXQlrcndHFlSs3Kk8LJRgpydeQDc4XCSfmpUNAp7a+K5nLRvrMZ+KfesR/oP67tTXQUnyeAlfuNNy66BpjTVu09HIEWZg/Igpc6fbz8EI58z3XPOidh+IYzViSehMXZ2yRa3ZJI9LQgJ/iSlHA18cDRGdBcSZ6pPdhX2gGBuOYrSm/T7G2HQEo9p6w6w0hjhOZGE75s4cINrBlNt0zV+H9Weypu7kxHq6lwB0cY3xWmzHG3cuhfVsC9gYc2e8LeusCPcTZ7ysXdt/e5uRORNF0j4YdVndknWcOFPipW2O6eKaBEnMHIHV0Y2O68Ly5B+u7ER1pKLxneiF7OUpcKdFr/W96CWhM+64dlI5D1iuON0gYLniWls3TiWsVgXrc7CmURLiFXUFl5IfNo7rnuMwccVN7LQsq60H4hAs3Tt+X4a1JmwdkNMzPHt1xnxQ3MR6rZEV1yRdtSYuVwyIrm7yQ5fWcInDRdp5MXaqpkU316vNjYViwYnvEDM1kGpc1i7ICjszp0S7B7surbE7rNSWFW/fm6Tljovd1I1H5AHLlROyqRt31oaVrFauJDTUJuzGYU3InIgVU+zMoagbTNUl5i3Zi0PjXNR6WPPKawvMFf2lBnKM+0OeWG0QOFMgoVa+Zr81rAvsPqQR+ekILjUCbdzwesRiKcJ/vGNs5YwWU9zuL/S0zhWbK7qsp1vMr08tkOO8HMHVtm2NPbKVQ25RS7vRfD68XNmNLWviFeEnEr+enlG2xP9g7krBfr2m+JKZJ2h46cK/TmyIE4cChtrZbW1cS7JKL6s+Erx2FlvmU1IX2wUOgo1t4T+7kmXTbracBzSWxMhbksCdcnLrW/SC4wV1JlDd1a2+18V1hcN5QNAjjZdOdXzU7SKnzY0uluiBBTFeuHOzrWX7INij5oxZqxuRzZWaM8V1ugVQutT+ImSNRs5c/dC+h6XL69aV4nzrJsYtC0+uWUj/SW1aPKdOFaoo4y4zx2f16aHzMHZmXwKQNuStmENRRuvu5q+cLxpyFkUOodMtstZF55o2eyvn/PJsGl1iXkDX6MqlqGNXO6ytzSxmnKA7YdbG6H7tjPvUte0IKNxccaAsajWfktAnp2JFjGNBzxmrQxvZZuUazMZ4ERJX2oB2dS+Q5MCL+sLY8NnalRia9qUbfWa3iR8Q7E6xmX5QIzdkrip/C1L2SMP5SrBwhJg6qN0ksTXjcXQ6WK2XNCbYobSTbumBl65cAxn3l+5081RFLLse08R1hiMyw85syba2EtPlRUPmJ0GJGj9pE2PCI3/BwbMrwHSvd+UALEY3OAl9Rzv9tTNXsusiG+LV2qGrEor12jWuxba8HDVd21Z4PVF3ijJsWxWS14K71LFZ8SezR6+1iYXMnfoVNXeZvVw2F1yu6C/1FnTLvAJLuy7f0CdX4ojaLfu1iQV0NXMoYamdHdflJRO8aCh0fsxfkfdMZU2Go/rsC8nLY9BzRb2psmfe/H/1A4e2qnJ4Ghe2EeUxOqPOdOlU5csCsB8OiZd2NkmXFnsJl4KEc4eAImbGjVoVnKP637xCO/9JuE+jSp99ktcF5eSFMVec84POItnrpLSBRUuXVNnBkLjsxcU5EXNGhym1eHXj2n9HbELdSfbadtIlMzQMCA4dss/2Ja1jfGtessCVCT/q+Afjtqxk5Y5oabcV0ccVzlmAHcGlPTpaF9cVFvr+MqBzd0RMYdbpGGdGn505H7Wn1+QAyyHRUoKwxg/GK8ZlMZT/jKYcU1dKoqxH/q99grbGa4Xs88i8Zxw7hGzftPjKXSVdZsK0YBx5L3S1coibbRvjTxLLeKKjuIybF3/hV+xMpaJtNXZDnwj6UxyYzlxPOgiMGWc2ZjHjM1ni6UowUREz88Urv5A13ETWNK7GJtQPqe9ayzLbVRhbalMs59I7uj07xp3MPWqO7lDzFYx3OFwQvhuu5I602S4tVrg5I2+6s+K0uTH/GTlW1Kg9aSkfaHJIgkvjvOzv0XSsxCzALgW2bZdN3bEXaeO6gks5P+vGcSWhQ0lftWON+S354Agp1Zw1XkzsYRqgM4d2onaXAm1gIY0xf0UjKl6JcODaxFDbroAnPppwoB4oeUkhOcJNe0CaPrdkhpFbxdmKrBnPcXqERPjFTVpt4wEhjwRP6DJJCzSqpHAmck5HHo0nN2UymMxkpwx3dFnHtnfuPVP0Z7JaO8JrV9Bij1dA5g7Jl3pPzngSRfAia6n5HVNmfdvKbIWDjQvlVhsb+7cmvDANAvG5s8Jm3tAQyFZs5s6kIdUFML89BTGh0hhx5yhQu0GYl7KEO3QPQG1hZh7XtkjPnbTmvq2xa8togVjDFWJKVVDmYdw5EHNnQ+p3+tekNSVhSJ3pWWnbqKhCPRlgybi1I6x2sX1rLvijUylx7flB2rTEB4vSZhgVsk8iW+KApKkkh6DZbuos+9JHbln41uWMsTm6xPGScIeoWSuMiom/PB04VPOvuyWnYsEanBz1gvqZvSAdTkO8Ihy7KlPZ20TlwMpRucoej9BiRYIATZabFbpAq6Vr1mvRYqsVdrXRtVnFLlCtE4cSabqjM7RYceZMYtumTJ3/X+K7UjGnRpkzVxpqgZK2ujuDBNX4stHNlzZIdGjeg26bLB1WY2dDpV2j1vqEvbhz8tUtnnxy9DVzBZRSoZq5RkkLlOe5gslmOGFKArKW3owznnJrP071hXRhPrxc8ZabupWo+eBqOoJLmdH81l7ZNK+WK7zqILRX2xFcVnfjvXfmCKaWbjm4DqYHOicMbYKijvBSbIiW0TPxEW+ac4+xL/50xS/s6jad+CoyjsM0T5heAz1tocclEWrMGe9HCdNkPx731q8PcED5DLuSZFWH3fWz+0T541sH2CH7X20flj1OcSyCrngE9dq+C9XOHmo9FkJXvIS+dlLtWARd8Rv0o2jHIuiKK6HdNetoBDuuENzfxV/x9Y+FsOsIQvVaYCt74UreCFezRCD0XfFDtFtU5g4w9JeMu2MP6tYtHomfK9ag9pyqI/FzxhTUrTY+Ej9nDEHtQqKc+Z1R/9V3KCADzQzc8nPnANFtqncsgM6cINp5/iMBdPQIaWfPoR0JoDNniAIQjA50JpawfwhnbyaXO8AkcvUAAXACC3iOHh4N+4eHgOfowdHM3JPpGPBcOTR6+xHorxSS5UxviB0KuyidmqwrPQnPFaWnRk3tb1xJz1WtB0L0XNF62o0jjwHvhvnOzBVU6l+slx/IFt9zMkdXdLF8wa+OYFSb1lnfwxeEc1fgKTLYsR4vkFfCYp64s4mVE8R63veC8eeAPjlz/1A5RKwXEF1id8IFHe3a5iPAc8Vy1q/aPQI8ZwxnaFVrEp4rhjM8yeMsCedIeVs3YKoWjPWc2xXmM7lwF+llb2KfOz0SUJ+t3eleogZgOtYDMG65bx1oRRt/ErJ2xgJUs23WhS+l54oJqN/8JGd6N2LrxkuWRA7VvEDbv+8YuiKHbWgG4ZitydxVEbR/CWmDzxXpA1exMWYx42nVi5sEO9YzIRMs1oGD4BV5yWxF+EKI4yMn7kRVldSIdaCyWRIWUonSXuluUuxb39iez5hD+JRqXvv4CI7RGQlcie33oF3MFADRRF6KcwQguAtd3pK66xtbjwym9JyxCqGVok5x6Ir5osYE29bDqlP8kzoCD5zVMmUvaOBOQFXhZ78iQbyfH7t0DVhpX2vd+dgBdPTosF/YJufMhc7IXxua2bzB54r0dXSnsh4HnzOVHdDusG7weS4XJYCQwZUzClB13CBYMCtn9J96gxXABk78Z3eErw9O+CQ+R6WvBUDzSXzOnL5K9137zm+Kz5XKSnC3WDf4nLm7r9ygtp5I3+BzpQlgF1zINMXnSgNA9eiwfvLeh0RAQncMOzp20H7C6IEsqexe4tSdOAWilfjfDxKcDjinP2Q7/ItA1rRFjvA7mHvyFQ9ErF8LHHtB5zhyJVOu3oL7it2SA7Hbc1d45XDS5sFL7PGlI8h2MmUb2aMjvPKoa86Bl+fMlgTCiyXVlsyIrNqSmXg9EnfsCqW1knG74gwvFnjhTL2dYoYZN1zP3KlxUkXrK16SJis+Ixx5S3cGuO/r+6+1idNjRnASvyIPB+6kUjvWoTH2jAbhXNoWAg91S+aUM9O4SpNNue7Ep8OuTC9XujN8bZSLJrJoSV29JvGlWgc9XAzHaLh053aTWh78pcmHesgSzknov6Lzn/4Sh+4YaIqsGbdnh0kkFuBKJFa10b6STdbCNWIvYRRjyl0lZlzARpyGz2nMnyXi0KSumGk7X8neqTnaJkumLHHm6GxYPjrPA/JDXmt1hFdHNc2M+wLnkfjUDhFTL1J/paIjH2BIngWuUFNOAfP78o3avTOOpmKamd+aCWeOsOopVxSMB7LPf1JnQthKAMO4RXYlzFc/cQVXu2f7iLxiMXEl1qOW+tiBha7DJ8ZXTl1wUZquGz8hr1crKl6ukGVA9kvK3LmNYTvl+x5awxFobdvVUXIIhzPx624Od/U0aUVxml+SIR9HK437X7njrUVtnEQkWblCK4eeFlq0bhmaYC4Di64Qs51V2uJy5qTs5jAGJxdgrpyS1k2LiSSDvj8J8198QmeLyixsTYfOyTzam+vBEpIlPpwjuLq2I2OytMeZZKUiW8ZtMM+p1K7tOzZTKryiGI2xv6TOtKDsWY8nbrFNEu4vceQKN+t7c5qEoTNxWOsJkfu1W2Uqii7Tk6726P8D"; @@ -10679,26 +10677,26 @@ DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};DrawioFile.prototype.synchronizeFile=function(b,e){this.savingFile?null!=e&&e({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,function(f){this.sync.cleanup(b,e,f)}),e):this.updateFile(b,e)}; DrawioFile.prototype.updateFile=function(b,e,f,c){null!=f&&f()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(l){try{null!=f&&f()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[l]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=l?this.mergeFile(l,b,e,c):this.reloadFile(b, e))}catch(m){null!=e&&e(m)}}),e))}; -DrawioFile.prototype.mergeFile=function(b,e,f,c){var l=!0;try{this.stats.fileMerged++;var m=this.getShadowPages(),x=b.getShadowPages();if(null!=x&&0<x.length){var z=[this.ui.diffPages(null!=c?c:m,x)],C=this.ignorePatches(z);this.setShadowPages(x);if(C)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",C);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(m,this.ui.pages):null;c={};C={};var d=this.ui.patchPages(m,z[0]),g=this.ui.getHashValueForPages(d, -c),k=this.ui.getHashValueForPages(x,C);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",m,"pages",this.ui.pages,"patches",z,"backup",this.backupPatch,"checksum",g,"current",k,"valid",g==k,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=g&&g!=k){var n=this.compressReportData(this.getAnonymizedXmlForPages(x)),t=this.compressReportData(this.getAnonymizedXmlForPages(d)),p=this.ui.hashValue(b.getCurrentEtag()),A=this.ui.hashValue(this.getCurrentEtag()); -this.checksumError(f,z,"Shadow Details: "+JSON.stringify(c)+"\nChecksum: "+g+"\nCurrent: "+k+"\nCurrent Details: "+JSON.stringify(C)+"\nFrom: "+p+"\nTo: "+A+"\n\nFile Data:\n"+n+"\nPatched Shadow:\n"+t,null,"mergeFile",g,k,b.getCurrentRevisionId());return}if(null!=this.sync){var E=this.sync.patchRealtime(z,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==E||mxUtils.isEmptyObject(E)||z.push(E)}this.patch(z,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw l=!1,Error(mxResources.get("notADiagramFile")); -this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(J){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=f&&f(J);try{if(l)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,J);else{var y=this.getCurrentUser(),B=null!=y?y.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),B,J)}}catch(N){}}}; +DrawioFile.prototype.mergeFile=function(b,e,f,c){var l=!0;try{this.stats.fileMerged++;var m=this.getShadowPages(),x=b.getShadowPages();if(null!=x&&0<x.length){var y=[this.ui.diffPages(null!=c?c:m,x)],D=this.ignorePatches(y);this.setShadowPages(x);if(D)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",D);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(m,this.ui.pages):null;c={};D={};var d=this.ui.patchPages(m,y[0]),g=this.ui.getHashValueForPages(d, +c),k=this.ui.getHashValueForPages(x,D);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",m,"pages",this.ui.pages,"patches",y,"backup",this.backupPatch,"checksum",g,"current",k,"valid",g==k,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=g&&g!=k){var n=this.compressReportData(this.getAnonymizedXmlForPages(x)),q=this.compressReportData(this.getAnonymizedXmlForPages(d)),p=this.ui.hashValue(b.getCurrentEtag()),A=this.ui.hashValue(this.getCurrentEtag()); +this.checksumError(f,y,"Shadow Details: "+JSON.stringify(c)+"\nChecksum: "+g+"\nCurrent: "+k+"\nCurrent Details: "+JSON.stringify(D)+"\nFrom: "+p+"\nTo: "+A+"\n\nFile Data:\n"+n+"\nPatched Shadow:\n"+q,null,"mergeFile",g,k,b.getCurrentRevisionId());return}if(null!=this.sync){var E=this.sync.patchRealtime(y,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==E||mxUtils.isEmptyObject(E)||y.push(E)}this.patch(y,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw l=!1,Error(mxResources.get("notADiagramFile")); +this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(J){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=f&&f(J);try{if(l)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,J);else{var z=this.getCurrentUser(),B=null!=z?z.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),B,J)}}catch(M){}}}; DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),f=e.document.createElement("mxfile");if(null!=b)for(var c=0;c<b.length;c++){var l=e.encode(new mxGraphModel(b[c].root));"1"!=urlParams.dev&&(l=this.ui.anonymizeNode(l,!0));l.setAttribute("id",b[c].getId());b[c].viewState&&this.ui.editor.graph.saveViewState(b[c].viewState,l,!0);f.appendChild(l)}return mxUtils.getPrettyXml(f)}; DrawioFile.prototype.compressReportData=function(b,e,f){e=null!=e?e:1E4;null!=f&&null!=b&&b.length>f?b=b.substring(0,f)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b}; -DrawioFile.prototype.checksumError=function(b,e,f,c,l,m,x,z){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(var C=0;C<e.length;C++)this.ui.anonymizePatch(e[C]);var d=mxUtils.bind(this,function(A){var E=this.compressReportData(JSON.stringify(e,null,2));A=null==A?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(A.data)), -25E3);this.sendErrorReport("Checksum Error in "+l+" "+this.getHash(),(null!=f?f:"")+"\n\nPatches:\n"+E+(null!=A?"\n\nRemote:\n"+A:""),null,7E4)});null==c?d(null):this.getLatestVersion(mxUtils.bind(this,function(A){null!=A&&A.getCurrentEtag()==c?d(A):d(null)}),function(){})}else{var g=this.getCurrentUser(),k=null!=g?g.id:"unknown",n=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",t=JSON.stringify(e).length,p=null;if(null!=e&&this.constructor==DriveFile&&400>t){for(C=0;C<e.length;C++)this.ui.anonymizePatch(e[C]); -p=JSON.stringify(e);p=null!=p&&250>p.length?Graph.compress(p):null}this.getLatestVersion(mxUtils.bind(this,function(A){try{var E=null!=p?"Report":"Error",y=this.ui.getHashValueForPages(A.getShadowPages());EditorUi.logError("Checksum "+E+" in "+l+" "+n,null,this.getMode()+"."+this.getId(),"user_"+k+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+t+"-patches_"+e.length+(null!=p?"-json_"+p:"")+"-size_"+this.getSize()+(null!=m?"-expected_"+m:"")+(null!=x?"-current_"+x:"")+(null!=z? -"-rev_"+this.ui.hashValue(z):"")+(null!=y?"-latest_"+y:"")+(null!=A?"-latestRev_"+this.ui.hashValue(A.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+n,action:l,label:"user_"+k+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+t+"-patches_"+e.length+"-size_"+this.getSize()})}catch(B){}}),b)}}catch(A){}}; -DrawioFile.prototype.sendErrorReport=function(b,e,f,c){try{var l=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),m=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),x=this.getCurrentUser(),z=null!=x?this.ui.hashValue(x.id):"unknown",C=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",d=this.getTitle(),g=d.lastIndexOf(".");x="xml";0<g&&(x=d.substring(g));var k=null!=f?f.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+ -":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+x+")\nUser="+z+C+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e: +DrawioFile.prototype.checksumError=function(b,e,f,c,l,m,x,y){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(var D=0;D<e.length;D++)this.ui.anonymizePatch(e[D]);var d=mxUtils.bind(this,function(A){var E=this.compressReportData(JSON.stringify(e,null,2));A=null==A?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(A.data)), +25E3);this.sendErrorReport("Checksum Error in "+l+" "+this.getHash(),(null!=f?f:"")+"\n\nPatches:\n"+E+(null!=A?"\n\nRemote:\n"+A:""),null,7E4)});null==c?d(null):this.getLatestVersion(mxUtils.bind(this,function(A){null!=A&&A.getCurrentEtag()==c?d(A):d(null)}),function(){})}else{var g=this.getCurrentUser(),k=null!=g?g.id:"unknown",n=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",q=JSON.stringify(e).length,p=null;if(null!=e&&this.constructor==DriveFile&&400>q){for(D=0;D<e.length;D++)this.ui.anonymizePatch(e[D]); +p=JSON.stringify(e);p=null!=p&&250>p.length?Graph.compress(p):null}this.getLatestVersion(mxUtils.bind(this,function(A){try{var E=null!=p?"Report":"Error",z=this.ui.getHashValueForPages(A.getShadowPages());EditorUi.logError("Checksum "+E+" in "+l+" "+n,null,this.getMode()+"."+this.getId(),"user_"+k+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+q+"-patches_"+e.length+(null!=p?"-json_"+p:"")+"-size_"+this.getSize()+(null!=m?"-expected_"+m:"")+(null!=x?"-current_"+x:"")+(null!=y? +"-rev_"+this.ui.hashValue(y):"")+(null!=z?"-latest_"+z:"")+(null!=A?"-latestRev_"+this.ui.hashValue(A.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+n,action:l,label:"user_"+k+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+q+"-patches_"+e.length+"-size_"+this.getSize()})}catch(B){}}),b)}}catch(A){}}; +DrawioFile.prototype.sendErrorReport=function(b,e,f,c){try{var l=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),m=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),x=this.getCurrentUser(),y=null!=x?this.ui.hashValue(x.id):"unknown",D=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",d=this.getTitle(),g=d.lastIndexOf(".");x="xml";0<g&&(x=d.substring(g));var k=null!=f?f.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+ +":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+x+")\nUser="+y+D+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e: "")+(null!=f?"\n\nError: "+f.message:"")+"\n\nStack:\n"+k+"\n\nShadow:\n"+l+"\n\nData:\n"+m,c)}catch(n){}}; DrawioFile.prototype.reloadFile=function(b,e){try{this.ui.spinner.stop();var f=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),e);else{var c=this.ui.editor.graph,l=c.getSelectionCells(),m=c.getViewState(),x= -this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(x,m,l);null!=this.backupPatch&&this.patch([this.backupPatch]);var z=this.ui.getCurrentFile();null!=z&&(z.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),f,mxResources.get("cancel"),mxResources.get("discardChanges")): +this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(x,m,l);null!=this.backupPatch&&this.patch([this.backupPatch]);var y=this.ui.getCurrentFile();null!=y&&(y.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),f,mxResources.get("cancel"),mxResources.get("discardChanges")): f()}catch(c){null!=e&&e(c)}};DrawioFile.prototype.mergeLatestVersion=function(b,e,f){this.getLatestVersion(mxUtils.bind(this,function(c){this.ui.editor.graph.model.beginUpdate();try{this.ui.replaceFileData(c.getData()),null!=b&&this.patch(b)}finally{this.ui.editor.graph.model.endUpdate()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(c.getDescriptor());this.descriptorChanged();null!=e&&e()}),f)}; DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var e=!0;if(null!=b)for(var f=0;f<b.length&&e;f++)e=e&&mxUtils.isEmptyObject(b[f]);return e}; -DrawioFile.prototype.patch=function(b,e,f){if(null!=b){var c=this.ui.editor.undoManager,l=c.history.slice(),m=c.indexOfNextAdd,x=this.ui.editor.graph;x.container.style.visibility="hidden";var z=this.changeListenerEnabled;this.changeListenerEnabled=f;var C=x.foldingEnabled,d=x.mathEnabled,g=x.cellRenderer.redraw;x.cellRenderer.redraw=function(k){k.view.graph.isEditing(k.cell)&&(k.view.graph.scrollCellToVisible(k.cell),k.view.graph.cellEditor.resize());g.apply(this,arguments)};x.model.beginUpdate(); -try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{x.container.style.visibility="";x.model.endUpdate();x.cellRenderer.redraw=g;this.changeListenerEnabled=z;f||(c.history=l,c.indexOfNextAdd=m,c.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)d!=x.mathEnabled? -(this.ui.editor.updateGraphComponents(),x.refresh()):(C!=x.foldingEnabled?x.view.revalidate():x.view.validate(),x.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",f)}return b}; +DrawioFile.prototype.patch=function(b,e,f){if(null!=b){var c=this.ui.editor.undoManager,l=c.history.slice(),m=c.indexOfNextAdd,x=this.ui.editor.graph;x.container.style.visibility="hidden";var y=this.changeListenerEnabled;this.changeListenerEnabled=f;var D=x.foldingEnabled,d=x.mathEnabled,g=x.cellRenderer.redraw;x.cellRenderer.redraw=function(k){k.view.graph.isEditing(k.cell)&&(k.view.graph.scrollCellToVisible(k.cell),k.view.graph.cellEditor.resize());g.apply(this,arguments)};x.model.beginUpdate(); +try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{x.container.style.visibility="";x.model.endUpdate();x.cellRenderer.redraw=g;this.changeListenerEnabled=y;f||(c.history=l,c.indexOfNextAdd=m,c.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)d!=x.mathEnabled? +(this.ui.editor.updateGraphComponents(),x.refresh()):(D!=x.foldingEnabled?x.view.revalidate():x.view.validate(),x.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",f)}return b}; DrawioFile.prototype.save=function(b,e,f,c,l,m){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",c,"overwrite",l,"manual",m,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!l&&this.invalidChecksum)if(null!=f)f({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=f)f({message:mxResources.get("readOnly")}); else throw Error(mxResources.get("readOnly"));}catch(x){if(null!=f)f(x);else throw x;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var e=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=e&&(e.viewState=this.ui.editor.graph.getViewState(),e.needsUpdate=!0)}e=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return e}; DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,e,f){}; @@ -10743,8 +10741,8 @@ this.synchronizeFile(f,c)}),this.getErrorMessage(b))};DrawioFile.prototype.getEr DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(e){this.ui.stopSanityCheck(); null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(e){this.handleFileError(e)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()}; DrawioFile.prototype.createSecret=function(b){var e=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(e):this.sync.createToken(e,mxUtils.bind(this,function(f){b(e,f)}),mxUtils.bind(this,function(){b(e)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()}; -DrawioFile.prototype.fileSaved=function(b,e,f,c,l){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var m=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(m),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=f&&f()):this.sync.fileSaved(m,e,f,c,l)}catch(C){this.invalidChecksum=this.inConflictState= -!0;this.descriptorChanged();null!=c&&c(C);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,C);else{var x=this.getCurrentUser(),z=null!=x?x.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),z,C)}}catch(d){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}; +DrawioFile.prototype.fileSaved=function(b,e,f,c,l){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var m=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(m),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=f&&f()):this.sync.fileSaved(m,e,f,c,l)}catch(D){this.invalidChecksum=this.inConflictState= +!0;this.descriptorChanged();null!=c&&c(D);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,D);else{var x=this.getCurrentUser(),y=null!=x?x.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),y,D)}}catch(d){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}; DrawioFile.prototype.autosave=function(b,e,f,c){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var l=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==l&&(this.autosaveThread=null);EditorUi.debug("DrawioFile.autosave",[this],"thread",l,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile);if(this.isModified()&&this.isAutosaveNow()){var m=this.isAutosaveRevision(); m&&(this.lastAutosaveRevision=(new Date).getTime());this.save(m,mxUtils.bind(this,function(x){this.autosaveCompleted();null!=f&&f(x)}),mxUtils.bind(this,function(x){null!=c&&c(x)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=f&&f(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",l,"delay",b,"saving",this.savingFile);this.autosaveThread=l};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){}; DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))}; @@ -10753,16 +10751,16 @@ DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,e){b([])};DrawioFile.prototype.addComment=function(b,e,f){e(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,e){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,e)};LocalFile=function(b,e,f,c,l,m){DrawioFile.call(this,b,e);this.title=f;this.mode=c?null:App.MODE_DEVICE;this.fileHandle=l;this.desc=m};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title}; LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,e,f){this.saveAs(this.title,e,f)};LocalFile.prototype.saveAs=function(b,e,f){this.saveFile(b,!1,e,f)};LocalFile.prototype.saveAs=function(b,e,f){this.saveFile(b,!1,e,f)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b}; LocalFile.prototype.getLatestVersion=function(b,e){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,e)}; -LocalFile.prototype.saveFile=function(b,e,f,c,l){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;l||this.updateFileData();var m=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var x=this.getData(),z=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=f&&f()}),C=mxUtils.bind(this,function(d){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var g=mxUtils.bind(this, -function(n){this.savingFile=!1;null!=c&&c({error:n})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(n){this.fileHandle.getFile().then(mxUtils.bind(this,function(t){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[t],"conflict",this.desc.lastModified!=t.lastModified);this.desc.lastModified==t.lastModified?n.write(m?this.ui.base64ToBlob(d,"image/png"):d).then(mxUtils.bind(this,function(){n.close().then(mxUtils.bind(this, -function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(p){try{var A=this.desc;this.savingFile=!1;this.desc=p;this.fileSaved(x,A,z,g);this.removeDraft()}catch(E){g(E)}}),g)}),g)}),g):(this.inConflictState=!0,g())}),mxUtils.bind(this,function(t){this.invalidFileHandle=!0;g(t)}))}),g)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(d,b,m?"image/png":"text/xml",m);else if(d.length<MAX_REQUEST_SIZE){var k=b.lastIndexOf(".");k=0<k?b.substring(k+1):"xml"; -(new mxXmlRequest(SAVE_URL,"format="+k+"&xml="+encodeURIComponent(d)+"&filename="+encodeURIComponent(b)+(m?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}));z()}});m?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(d){C(d)}),c,this.ui.getCurrentFile()!=this?x:null,e.scale,e.border)):C(x)}; +LocalFile.prototype.saveFile=function(b,e,f,c,l){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;l||this.updateFileData();var m=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var x=this.getData(),y=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=f&&f()}),D=mxUtils.bind(this,function(d){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var g=mxUtils.bind(this, +function(n){this.savingFile=!1;null!=c&&c({error:n})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(n){this.fileHandle.getFile().then(mxUtils.bind(this,function(q){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[q],"conflict",this.desc.lastModified!=q.lastModified);this.desc.lastModified==q.lastModified?n.write(m?this.ui.base64ToBlob(d,"image/png"):d).then(mxUtils.bind(this,function(){n.close().then(mxUtils.bind(this, +function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(p){try{var A=this.desc;this.savingFile=!1;this.desc=p;this.fileSaved(x,A,y,g);this.removeDraft()}catch(E){g(E)}}),g)}),g)}),g):(this.inConflictState=!0,g())}),mxUtils.bind(this,function(q){this.invalidFileHandle=!0;g(q)}))}),g)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(d,b,m?"image/png":"text/xml",m);else if(d.length<MAX_REQUEST_SIZE){var k=b.lastIndexOf(".");k=0<k?b.substring(k+1):"xml"; +(new mxXmlRequest(SAVE_URL,"format="+k+"&xml="+encodeURIComponent(d)+"&filename="+encodeURIComponent(b)+(m?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}));y()}});m?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(d){D(d)}),c,this.ui.getCurrentFile()!=this?x:null,e.scale,e.border)):D(x)}; LocalFile.prototype.rename=function(b,e,f){this.title=b;this.descriptorChanged();null!=e&&e()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};LocalLibrary=function(b,e,f){LocalFile.call(this,b,e,f)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,e,f){this.saveFile(b,!1,e,f)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,e,f){DrawioFile.call(this,b,e);this.title=f};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.autosaveDelay=2E3;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.type="F";StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};StorageFile.prototype.getTitle=function(){return this.title}; StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.save=function(b,e,f){this.saveAs(this.getTitle(),e,f)};StorageFile.prototype.saveAs=function(b,e,f){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(b,!1,e,f)}; -StorageFile.insertFile=function(b,e,f,c,l){var m=mxUtils.bind(this,function(x){var z=function(){var C=new StorageFile(b,f,e);C.saveFile(e,!1,function(){c(C)},l)};x?b.confirm(mxResources.get("replaceIt",[e]),z,l):z()});StorageFile.getFileContent(b,e,function(x){m(null!=x)},function(){m(!1)})};StorageFile.getFileContent=function(b,e,f,c){b.getDatabaseItem(e,function(l){f(null!=l?l.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(e,f):null!=c&&c()}),"files")}; +StorageFile.insertFile=function(b,e,f,c,l){var m=mxUtils.bind(this,function(x){var y=function(){var D=new StorageFile(b,f,e);D.saveFile(e,!1,function(){c(D)},l)};x?b.confirm(mxResources.get("replaceIt",[e]),y,l):y()});StorageFile.getFileContent(b,e,function(x){m(null!=x)},function(){m(!1)})};StorageFile.getFileContent=function(b,e,f,c){b.getDatabaseItem(e,function(l){f(null!=l?l.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(e,f):null!=c&&c()}),"files")}; StorageFile.getFileInfo=function(b,e,f,c){b.getDatabaseItem(e,function(l){f(l)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(e,function(l){f(null!=l?{title:e}:null)}):null!=c&&c()}),"filesInfo")}; StorageFile.prototype.saveFile=function(b,e,f,c){if(this.isEditable()){var l=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=b);try{var m=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=f&&f()});this.setShadowModified(!1);var x=this.getData();this.ui.setDatabaseItem(null,[{title:this.title,size:x.length,lastModified:Date.now(),type:this.type},{title:this.title,data:x}],m,mxUtils.bind(this,function(){null==this.ui.database?this.ui.setLocalData(this.title, -x,m):null!=c&&c()}),["filesInfo","files"])}catch(z){null!=c&&c(z)}});this.isRenamable()&&"."==b.charAt(0)&&null!=c?c({message:mxResources.get("invalidName")}):StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(m){this.isRenamable()&&this.getTitle()!=b&&null!=m?this.ui.confirm(mxResources.get("replaceIt",[b]),l,c):l()}),c)}else null!=f&&f()}; +x,m):null!=c&&c()}),["filesInfo","files"])}catch(y){null!=c&&c(y)}});this.isRenamable()&&"."==b.charAt(0)&&null!=c?c({message:mxResources.get("invalidName")}):StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(m){this.isRenamable()&&this.getTitle()!=b&&null!=m?this.ui.confirm(mxResources.get("replaceIt",[b]),l,c):l()}),c)}else null!=f&&f()}; StorageFile.prototype.rename=function(b,e,f){var c=this.getTitle();c!=b?StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(l){var m=mxUtils.bind(this,function(){this.title=b;this.hasSameExtension(c,b)||this.setData(this.ui.getFileData());this.saveFile(b,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(c,e)}),f)});null!=l?this.ui.confirm(mxResources.get("replaceIt",[b]),m,f):m()}),f):e()};StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())}; StorageFile.prototype.getLatestVersion=function(b,e){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(f){b(new StorageFile(this.ui,f,this.title))}),e)};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)}; StorageFile.listLocalStorageFiles=function(b){for(var e=[],f=0;f<localStorage.length;f++){var c=localStorage.key(f),l=localStorage.getItem(c);if(0<c.length&&"."!=c.charAt(0)&&0<l.length){var m=(null==b||"F"==b)&&("<mxfile "===l.substring(0,8)||"<?xml"===l.substring(0,5)||"\x3c!--[if IE]>"===l.substring(0,12)),x=(null==b||"L"==b)&&"<mxlibrary>"===l.substring(0,11);(m||x)&&e.push({title:c,type:m?"F":"L",size:l.length,lastModified:Date.now()})}}return e}; @@ -10771,364 +10769,364 @@ StorageFile.listFiles=function(b,e,f,c){b.getDatabaseItems(function(l){var m=[]; StorageLibrary.prototype.isRenamable=function(b,e,f){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,e,f){DrawioFile.call(this,b,e);this.title=f;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(b,e,f){RemoteFile.call(this,b,e,f.title);this.libObj=f};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(b,e,f){}; RemoteLibrary.prototype.saveAs=function(b,e,f){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,e,f){StorageFile.call(this,b,e,f);b=f;e=b.lastIndexOf("/");0<=e&&(b=b.substring(e+1));this.fname=b};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(b,e,f){return!1};UrlLibrary.prototype.saveAs=function(b,e,f){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,e,f){DrawioFile.call(this,b,e);this.desc=f||{};this.mode=App.MODE_EMBED};mxUtils.extend(EmbedFile,DrawioFile);EmbedFile.prototype.getMode=function(){return this.mode};EmbedFile.prototype.getTitle=function(){return this.desc.title||""};/* mxClient.IS_IOS || */ -var StorageDialog=function(b,e,f){function c(k,n,t,p,A,E){function y(){mxEvent.addListener(B,"click",null!=E?E:function(){t!=App.MODE_GOOGLE||b.isDriveDomain()?t==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(t,!0);e()})):t==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(t,!0);e()}), -function(G){b.spinner.stop();b.handleError(G)}):(b.setMode(t,!0),e()):window.location.hostname=DriveClient.prototype.newAppHostname})}z++;++x>f&&(mxUtils.br(C),x=1);var B=document.createElement("a");B.style.overflow="hidden";B.style.display="inline-block";B.className="geBaseButton";B.style.boxSizing="border-box";B.style.fontSize="11px";B.style.position="relative";B.style.margin="4px";B.style.marginTop="8px";B.style.marginBottom="0px";B.style.padding="8px 10px 8px 10px";B.style.width="88px";B.style.height= -"100px";B.style.whiteSpace="nowrap";B.setAttribute("title",n);var J=document.createElement("div");J.style.textOverflow="ellipsis";J.style.overflow="hidden";J.style.position="absolute";J.style.bottom="8px";J.style.left="0px";J.style.right="0px";mxUtils.write(J,n);B.appendChild(J);if(null!=k){var N=document.createElement("img");N.setAttribute("src",k);N.setAttribute("border","0");N.setAttribute("align","absmiddle");N.style.width="60px";N.style.height="60px";N.style.paddingBottom="6px";B.appendChild(N)}else J.style.paddingTop= -"5px",J.style.whiteSpace="normal",mxClient.IS_IOS?(B.style.padding="0px 10px 20px 10px",B.style.top="6px"):mxClient.IS_FF&&(J.style.paddingTop="0px",J.style.marginTop="-2px");if(null!=A)for(k=0;k<A.length;k++)mxUtils.br(J),mxUtils.write(J,A[k]);if(null!=p&&null==b[p]){N.style.visibility="hidden";mxUtils.setOpacity(J,10);var v=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});v.spin(B); -var u=window.setTimeout(function(){null==b[p]&&(v.stop(),B.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(G,H){null!=b[p]&&H.getProperty("client")==b[p]&&(window.clearTimeout(u),mxUtils.setOpacity(J,100),N.style.visibility="",v.stop(),y(),"drive"==p&&null!=d.parentNode&&d.parentNode.removeChild(d))}))}else y();C.appendChild(B)}f=null!=f?f:2;var l=document.createElement("div");l.style.textAlign="center";l.style.whiteSpace="nowrap";l.style.paddingTop="0px";l.style.paddingBottom= -"20px";var m=document.createElement("div");m.style.border="1px solid #d3d3d3";m.style.borderWidth="1px 0px 1px 0px";m.style.padding="10px 0px 20px 0px";var x=0,z=0,C=document.createElement("div");C.style.paddingTop="2px";m.appendChild(C);var d=document.createElement("p"),g=document.createElement("p");g.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(g,mxResources.get("saveDiagramsTo")+":");l.appendChild(g);l.appendChild(m);x=0;"function"===typeof window.DriveClient&& +var StorageDialog=function(b,e,f){function c(k,n,q,p,A,E){function z(){mxEvent.addListener(B,"click",null!=E?E:function(){q!=App.MODE_GOOGLE||b.isDriveDomain()?q==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(q,!0);e()})):q==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(q,!0);e()}), +function(G){b.spinner.stop();b.handleError(G)}):(b.setMode(q,!0),e()):window.location.hostname=DriveClient.prototype.newAppHostname})}y++;++x>f&&(mxUtils.br(D),x=1);var B=document.createElement("a");B.style.overflow="hidden";B.style.display="inline-block";B.className="geBaseButton";B.style.boxSizing="border-box";B.style.fontSize="11px";B.style.position="relative";B.style.margin="4px";B.style.marginTop="8px";B.style.marginBottom="0px";B.style.padding="8px 10px 8px 10px";B.style.width="88px";B.style.height= +"100px";B.style.whiteSpace="nowrap";B.setAttribute("title",n);var J=document.createElement("div");J.style.textOverflow="ellipsis";J.style.overflow="hidden";J.style.position="absolute";J.style.bottom="8px";J.style.left="0px";J.style.right="0px";mxUtils.write(J,n);B.appendChild(J);if(null!=k){var M=document.createElement("img");M.setAttribute("src",k);M.setAttribute("border","0");M.setAttribute("align","absmiddle");M.style.width="60px";M.style.height="60px";M.style.paddingBottom="6px";B.appendChild(M)}else J.style.paddingTop= +"5px",J.style.whiteSpace="normal",mxClient.IS_IOS?(B.style.padding="0px 10px 20px 10px",B.style.top="6px"):mxClient.IS_FF&&(J.style.paddingTop="0px",J.style.marginTop="-2px");if(null!=A)for(k=0;k<A.length;k++)mxUtils.br(J),mxUtils.write(J,A[k]);if(null!=p&&null==b[p]){M.style.visibility="hidden";mxUtils.setOpacity(J,10);var v=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});v.spin(B); +var u=window.setTimeout(function(){null==b[p]&&(v.stop(),B.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(G,I){null!=b[p]&&I.getProperty("client")==b[p]&&(window.clearTimeout(u),mxUtils.setOpacity(J,100),M.style.visibility="",v.stop(),z(),"drive"==p&&null!=d.parentNode&&d.parentNode.removeChild(d))}))}else z();D.appendChild(B)}f=null!=f?f:2;var l=document.createElement("div");l.style.textAlign="center";l.style.whiteSpace="nowrap";l.style.paddingTop="0px";l.style.paddingBottom= +"20px";var m=document.createElement("div");m.style.border="1px solid #d3d3d3";m.style.borderWidth="1px 0px 1px 0px";m.style.padding="10px 0px 20px 0px";var x=0,y=0,D=document.createElement("div");D.style.paddingTop="2px";m.appendChild(D);var d=document.createElement("p"),g=document.createElement("p");g.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(g,mxResources.get("saveDiagramsTo")+":");l.appendChild(g);l.appendChild(m);x=0;"function"===typeof window.DriveClient&& c(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&c(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");"1"!=urlParams.noDevice&&c(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||c(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);"function"===typeof window.DropboxClient&& c(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox");null!=b.gitHub&&c(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&c(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");m=document.createElement("span");m.style.position="absolute";m.style.cursor="pointer";m.style.bottom="27px";m.style.color="gray";m.style.userSelect="none";m.style.textAlign="center";m.style.left="50%";mxUtils.setPrefixedStyle(m.style, "transform","translate(-50%,0)");mxUtils.write(m,mxResources.get("decideLater"));l.appendChild(m);mxEvent.addListener(m,"click",function(){b.hideDialog();var k=Editor.useLocalStorage;b.createFile(b.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=k});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==b.drive&&(d.style.padding="7px",d.style.fontSize="9pt",d.style.marginTop="-14px", d.innerHTML='<a style="background-color:#dcdcdc;padding:6px;color:black;text-decoration:none;" href="https://desk.draw.io/a/solutions/articles/16000074659" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",l.appendChild(d))},5E3);this.container=l},SplashDialog=function(b){var e=document.createElement("div");e.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var f= -b.addLanguageMenu(e,!0,"28px");null!=f&&(f.style.bottom="19px")}var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.width="32px";c.style.height="32px";c.style.marginRight="8px";c.style.marginTop="-4px";var l=document.createElement("div");l.style.margin="8px 0px 0px 0px";l.style.padding="18px 0px 24px 0px";f="";b.mode==App.MODE_GOOGLE?(c.src=IMAGE_PATH+"/google-drive-logo.svg",f=mxResources.get("googleDrive")):b.mode==App.MODE_DROPBOX?(c.src= +b.addLanguageMenu(e,!1,"28px");null!=f&&(f.style.bottom="24px")}var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.width="32px";c.style.height="32px";c.style.marginRight="8px";c.style.marginTop="-4px";var l=document.createElement("div");l.style.margin="8px 0px 0px 0px";l.style.padding="18px 0px 24px 0px";f="";b.mode==App.MODE_GOOGLE?(c.src=IMAGE_PATH+"/google-drive-logo.svg",f=mxResources.get("googleDrive")):b.mode==App.MODE_DROPBOX?(c.src= IMAGE_PATH+"/dropbox-logo.svg",f=mxResources.get("dropbox")):b.mode==App.MODE_ONEDRIVE?(c.src=IMAGE_PATH+"/onedrive-logo.svg",f=mxResources.get("oneDrive")):b.mode==App.MODE_GITHUB?(c.src=IMAGE_PATH+"/github-logo.svg",f=mxResources.get("github")):b.mode==App.MODE_GITLAB?(c.src=IMAGE_PATH+"/gitlab-logo.svg",f=mxResources.get("gitlab")):b.mode==App.MODE_BROWSER?(c.src=IMAGE_PATH+"/osa_database.png",f=mxResources.get("browser")):b.mode==App.MODE_TRELLO?(c.src=IMAGE_PATH+"/trello-logo.svg",f=mxResources.get("trello")): (c.src=IMAGE_PATH+"/osa_drive-harddisk.png",l.style.paddingBottom="10px",l.style.paddingTop="30px",f=mxResources.get("device"));var m=document.createElement("button");m.className="geBigButton";m.style.marginBottom="8px";m.style.fontSize="18px";m.style.padding="10px";m.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)l.style.padding="42px 0px 10px 0px",m.style.marginBottom="12px";else{l.style.border="1px solid #d3d3d3";l.style.borderWidth="1px 0px 1px 0px";var x=document.createElement("table"), -z=document.createElement("tbody"),C=document.createElement("tr"),d=document.createElement("td"),g=document.createElement("td");x.setAttribute("align","center");d.appendChild(c);c=document.createElement("div");c.style.fontSize="22px";c.style.paddingBottom="6px";c.style.color="gray";mxUtils.write(c,f);g.style.textAlign="left";g.appendChild(c);C.appendChild(d);C.appendChild(g);z.appendChild(C);x.appendChild(z);e.appendChild(x);f=document.createElement("span");f.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;"; +y=document.createElement("tbody"),D=document.createElement("tr"),d=document.createElement("td"),g=document.createElement("td");x.setAttribute("align","center");d.appendChild(c);c=document.createElement("div");c.style.fontSize="22px";c.style.paddingBottom="6px";c.style.color="gray";mxUtils.write(c,f);g.style.textAlign="left";g.appendChild(c);D.appendChild(d);D.appendChild(g);y.appendChild(D);x.appendChild(y);e.appendChild(x);f=document.createElement("span");f.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;"; mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0)");mxUtils.write(f,mxResources.get("changeStorage"));mxEvent.addListener(f,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});e.appendChild(f)}mxUtils.write(m,mxResources.get("createNewDiagram"));mxEvent.addListener(m,"click",function(){b.hideDialog();b.actions.get("new").funct()});l.appendChild(m);mxUtils.br(l);m=document.createElement("button");m.className="geBigButton";m.style.marginBottom="22px";m.style.fontSize= "18px";m.style.padding="10px";m.style.width="340px";mxUtils.write(m,mxResources.get("openExistingDiagram"));mxEvent.addListener(m,"click",function(){b.actions.get("open").funct()});l.appendChild(m);b.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):b.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):b.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):b.mode==App.MODE_GITHUB?mxResources.get("github"):b.mode==App.MODE_GITLAB?mxResources.get("gitlab"):b.mode==App.MODE_TRELLO?mxResources.get("trello"): -b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(f=function(t){m.style.marginBottom="24px";var p=document.createElement("a");p.style.display="inline-block";p.style.color="gray";p.style.cursor="pointer";p.style.marginTop="6px";mxUtils.write(p,mxResources.get("signOut"));m.style.marginBottom="16px";l.style.paddingBottom="18px";mxEvent.addListener(p,"click",function(){b.confirm(mxResources.get("areYouSure"), -function(){t()})});l.appendChild(p)},b.mode==App.MODE_GOOGLE&&null!=b.drive){var k=b.drive.getUsersList();if(0<k.length){c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("changeUser")+":");m.style.marginBottom="16px";l.style.paddingBottom="18px";l.appendChild(c);var n=document.createElement("select");n.style.marginLeft="4px";n.style.width="140px";for(f=0;f<k.length;f++)x=document.createElement("option"),mxUtils.write(x,k[f].displayName),x.value=f,n.appendChild(x), -x=document.createElement("option"),x.innerHTML=" ",mxUtils.write(x,"<"+k[f].email+">"),x.setAttribute("disabled","disabled"),n.appendChild(x);x=document.createElement("option");mxUtils.write(x,mxResources.get("addAccount"));x.value=k.length;n.appendChild(x);mxEvent.addListener(n,"change",function(){var t=n.value,p=k.length!=t;p&&b.drive.setUser(k[t]);b.drive.authorize(p,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(A){b.handleError(A,null,function(){b.hideDialog(); +b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(f=function(q){m.style.marginBottom="24px";var p=document.createElement("a");p.style.display="inline-block";p.style.color="gray";p.style.cursor="pointer";p.style.marginTop="6px";mxUtils.write(p,mxResources.get("signOut"));m.style.marginBottom="16px";l.style.paddingBottom="18px";mxEvent.addListener(p,"click",function(){b.confirm(mxResources.get("areYouSure"), +function(){q()})});l.appendChild(p)},b.mode==App.MODE_GOOGLE&&null!=b.drive){var k=b.drive.getUsersList();if(0<k.length){c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("changeUser")+":");m.style.marginBottom="16px";l.style.paddingBottom="18px";l.appendChild(c);var n=document.createElement("select");n.style.marginLeft="4px";n.style.width="140px";for(f=0;f<k.length;f++)x=document.createElement("option"),mxUtils.write(x,k[f].displayName),x.value=f,n.appendChild(x), +x=document.createElement("option"),x.innerHTML=" ",mxUtils.write(x,"<"+k[f].email+">"),x.setAttribute("disabled","disabled"),n.appendChild(x);x=document.createElement("option");mxUtils.write(x,mxResources.get("addAccount"));x.value=k.length;n.appendChild(x);mxEvent.addListener(n,"change",function(){var q=n.value,p=k.length!=q;p&&b.drive.setUser(k[q]);b.drive.authorize(p,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(A){b.handleError(A,null,function(){b.hideDialog(); b.showSplash()})},!0)});l.appendChild(n)}else f(function(){b.drive.logout()})}else b.mode!=App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?f(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?f(function(){b.gitLab.logout();b.openLink(DRAWIO_GITLAB_URL+"/users/sign_out")}):b.mode==App.MODE_TRELLO&&null!=b.trello?b.trello.isAuthorized()&&f(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&& -null!=b.dropbox&&f(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):f(function(){b.oneDrive.logout()});e.appendChild(l);this.container=e},EmbedDialog=function(b,e,f,c,l,m,x,z,C){x=null!=x?x:"Check out the diagram I made using @drawio";c=document.createElement("div");var d=/^https?:\/\//.test(e)||/^mailto:\/\//.test(e);null!=m?mxUtils.write(c,m):mxUtils.write(c,mxResources.get(5E5>e.length?d?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);m=document.createElement("div"); +null!=b.dropbox&&f(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):f(function(){b.oneDrive.logout()});e.appendChild(l);this.container=e},EmbedDialog=function(b,e,f,c,l,m,x,y,D){x=null!=x?x:"Check out the diagram I made using @drawio";c=document.createElement("div");var d=/^https?:\/\//.test(e)||/^mailto:\/\//.test(e);null!=m?mxUtils.write(c,m):mxUtils.write(c,mxResources.get(5E5>e.length?d?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);m=document.createElement("div"); m.style.position="absolute";m.style.top="30px";m.style.right="30px";m.style.color="gray";mxUtils.write(m,b.formatFileSize(e.length));c.appendChild(m);var g=document.createElement("textarea");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.marginTop="10px";g.style.resize="none";g.style.height="150px";g.style.width="440px";g.style.border= "1px solid gray";g.value=mxResources.get("updatingDocument");c.appendChild(g);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>e.length?(g.value=e,g.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?g.select():document.execCommand("selectAll",!1,null)):(g.setAttribute("readonly","true"),g.value=mxResources.get("tooLargeUseDownload"))},0)};m=document.createElement("div");m.style.position="absolute";m.style.bottom="36px";m.style.right="32px";var k=null;!EmbedDialog.showPreviewOption|| -mxClient.IS_CHROMEAPP&&!d||navigator.standalone||!(d||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(k=mxUtils.button(null!=z?z:mxResources.get(5E5>e.length?"preview":"openInNewWindow"),function(){var t=5E5>e.length?g.value:e;if(null!=l)l(t);else if(d)try{var p=b.openLink(t);null!=p&&(null==f||0<f)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=p&&null!=p.location.href&&p.location.href.substring(0,8)!=t.substring(0,8)&&(p.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(E){}}), -f||500)}catch(E){b.handleError({message:E.message||mxResources.get("drawingTooLarge")})}else{var A=window.open();A=null!=A?A.document:null;null!=A?(A.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+e+"</body></html>"),A.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),k.className="geBtn",m.appendChild(k));if(!d||7500<e.length)z=mxUtils.button(mxResources.get("download"),function(){b.hideDialog(); -b.saveData(null!=C?C:"embed.txt","txt",e,"text/plain")}),z.className="geBtn",m.appendChild(z);if(d&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>e.length){var n=mxUtils.button("",function(){try{var t="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(g.value);b.openLink(t)}catch(p){b.handleError({message:p.message||mxResources.get("drawingTooLarge")})}});z=document.createElement("img");z.setAttribute("src",Editor.facebookImage);z.setAttribute("width","18");z.setAttribute("height", -"18");z.setAttribute("border","0");n.appendChild(z);n.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");n.style.verticalAlign="bottom";n.style.paddingTop="4px";n.style.minWidth="46px";n.className="geBtn";m.appendChild(n)}7168>e.length&&(n=mxUtils.button("",function(){try{var t="https://twitter.com/intent/tweet?text="+encodeURIComponent(x)+"&url="+encodeURIComponent(g.value);b.openLink(t)}catch(p){b.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}), -z=document.createElement("img"),z.setAttribute("src",Editor.tweetImage),z.setAttribute("width","18"),z.setAttribute("height","18"),z.setAttribute("border","0"),z.style.marginBottom="5px",n.appendChild(z),n.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+" max)"),n.style.verticalAlign="bottom",n.style.paddingTop="4px",n.style.minWidth="46px",n.className="geBtn",m.appendChild(n))}!b.isOffline()&&5E5>e.length&&(n=mxUtils.button("",function(){try{var t="mailto:?subject="+encodeURIComponent(C|| -b.defaultFilename)+"&body="+encodeURIComponent(g.value);b.openLink(t)}catch(p){b.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),z=document.createElement("img"),z.className="geAdaptiveAsset",z.setAttribute("src",Editor.mailImage),z.setAttribute("width","18"),z.setAttribute("height","18"),z.setAttribute("border","0"),z.style.marginBottom="5px",n.appendChild(z),n.style.verticalAlign="bottom",n.style.paddingTop="4px",n.style.minWidth="46px",n.className="geBtn",m.appendChild(n)); -z=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});m.appendChild(z);n=mxUtils.button(mxResources.get("copy"),function(){g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?g.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>e.length?mxClient.IS_SF||null!=document.documentMode?z.className="geBtn gePrimaryBtn":(m.appendChild(n),n.className="geBtn gePrimaryBtn",z.className="geBtn"):(m.appendChild(k), -z.className="geBtn",k.className="geBtn gePrimaryBtn");c.appendChild(m);this.container=c};EmbedDialog.showPreviewOption=!0; -var GoogleSitesDialog=function(b,e){function f(){var G=null!=u&&null!=u.getTitle()?u.getTitle():this.defaultFilename;if(N.checked&&""!=n.value){var H="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(n.value));null!=G&&(H+="&title="+encodeURIComponent(G));0<v.length&&(H+="&s="+v);""!=t.value&&"0"!=t.value&&(H+="&border="+t.value);""!=k.value&&(H+="&height="+k.value);H+="&pan="+(p.checked?"1":"0");H+="&zoom="+(A.checked?"1":"0");H+="&fit="+(J.checked?"1":"0"); -H+="&resize="+(B.checked?"1":"0");H+="&x0="+Number(g.value);H+="&y0="+C;l.mathEnabled&&(H+="&math=1");y.checked?H+="&edit=_blank":E.checked&&(H+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));d.value=H}else u.constructor==DriveFile||u.constructor==DropboxFile?(H="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=n.value?H+=encodeURIComponent(mxUtils.htmlEntities(n.value))+"&type=3":(H+=u.getHash().substring(1),H=u.constructor==DropboxFile?H+"&type=2":H+"&type=1"),null!= -G&&(H+="&title="+encodeURIComponent(G)),""!=k.value&&(G=parseInt(k.value)+parseInt(g.value),H+="&height="+G),d.value=H):d.value=""}var c=document.createElement("div"),l=b.editor.graph,m=l.getGraphBounds(),x=l.view.scale,z=Math.floor(m.x/x-l.view.translate.x),C=Math.floor(m.y/x-l.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var d=document.createElement("input");d.setAttribute("type","text");d.style.marginBottom="8px";d.style.marginTop="2px";d.style.width="410px"; -c.appendChild(d);mxUtils.br(c);this.init=function(){d.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?d.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+":");var g=document.createElement("input");g.setAttribute("type","text");g.setAttribute("size","4");g.style.marginRight="16px";g.style.marginLeft="4px";g.value=z;c.appendChild(g);mxUtils.write(c,mxResources.get("height")+":");var k=document.createElement("input");k.setAttribute("type","text"); +mxClient.IS_CHROMEAPP&&!d||navigator.standalone||!(d||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(k=mxUtils.button(null!=y?y:mxResources.get(5E5>e.length?"preview":"openInNewWindow"),function(){var q=5E5>e.length?g.value:e;if(null!=l)l(q);else if(d)try{var p=b.openLink(q);null!=p&&(null==f||0<f)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=p&&null!=p.location.href&&p.location.href.substring(0,8)!=q.substring(0,8)&&(p.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(E){}}), +f||500)}catch(E){b.handleError({message:E.message||mxResources.get("drawingTooLarge")})}else{var A=window.open();A=null!=A?A.document:null;null!=A?(A.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+e+"</body></html>"),A.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),k.className="geBtn",m.appendChild(k));if(!d||7500<e.length)y=mxUtils.button(mxResources.get("download"),function(){b.hideDialog(); +b.saveData(null!=D?D:"embed.txt","txt",e,"text/plain")}),y.className="geBtn",m.appendChild(y);if(d&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>e.length){var n=mxUtils.button("",function(){try{var q="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(g.value);b.openLink(q)}catch(p){b.handleError({message:p.message||mxResources.get("drawingTooLarge")})}});y=document.createElement("img");y.setAttribute("src",Editor.facebookImage);y.setAttribute("width","18");y.setAttribute("height", +"18");y.setAttribute("border","0");n.appendChild(y);n.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");n.style.verticalAlign="bottom";n.style.paddingTop="4px";n.style.minWidth="46px";n.className="geBtn";m.appendChild(n)}7168>e.length&&(n=mxUtils.button("",function(){try{var q="https://twitter.com/intent/tweet?text="+encodeURIComponent(x)+"&url="+encodeURIComponent(g.value);b.openLink(q)}catch(p){b.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}), +y=document.createElement("img"),y.setAttribute("src",Editor.tweetImage),y.setAttribute("width","18"),y.setAttribute("height","18"),y.setAttribute("border","0"),y.style.marginBottom="5px",n.appendChild(y),n.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+" max)"),n.style.verticalAlign="bottom",n.style.paddingTop="4px",n.style.minWidth="46px",n.className="geBtn",m.appendChild(n))}!b.isOffline()&&5E5>e.length&&(n=mxUtils.button("",function(){try{var q="mailto:?subject="+encodeURIComponent(D|| +b.defaultFilename)+"&body="+encodeURIComponent(g.value);b.openLink(q)}catch(p){b.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),y=document.createElement("img"),y.className="geAdaptiveAsset",y.setAttribute("src",Editor.mailImage),y.setAttribute("width","18"),y.setAttribute("height","18"),y.setAttribute("border","0"),y.style.marginBottom="5px",n.appendChild(y),n.style.verticalAlign="bottom",n.style.paddingTop="4px",n.style.minWidth="46px",n.className="geBtn",m.appendChild(n)); +y=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});m.appendChild(y);n=mxUtils.button(mxResources.get("copy"),function(){g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?g.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>e.length?mxClient.IS_SF||null!=document.documentMode?y.className="geBtn gePrimaryBtn":(m.appendChild(n),n.className="geBtn gePrimaryBtn",y.className="geBtn"):(m.appendChild(k), +y.className="geBtn",k.className="geBtn gePrimaryBtn");c.appendChild(m);this.container=c};EmbedDialog.showPreviewOption=!0; +var GoogleSitesDialog=function(b,e){function f(){var G=null!=u&&null!=u.getTitle()?u.getTitle():this.defaultFilename;if(M.checked&&""!=n.value){var I="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(n.value));null!=G&&(I+="&title="+encodeURIComponent(G));0<v.length&&(I+="&s="+v);""!=q.value&&"0"!=q.value&&(I+="&border="+q.value);""!=k.value&&(I+="&height="+k.value);I+="&pan="+(p.checked?"1":"0");I+="&zoom="+(A.checked?"1":"0");I+="&fit="+(J.checked?"1":"0"); +I+="&resize="+(B.checked?"1":"0");I+="&x0="+Number(g.value);I+="&y0="+D;l.mathEnabled&&(I+="&math=1");z.checked?I+="&edit=_blank":E.checked&&(I+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));d.value=I}else u.constructor==DriveFile||u.constructor==DropboxFile?(I="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=n.value?I+=encodeURIComponent(mxUtils.htmlEntities(n.value))+"&type=3":(I+=u.getHash().substring(1),I=u.constructor==DropboxFile?I+"&type=2":I+"&type=1"),null!= +G&&(I+="&title="+encodeURIComponent(G)),""!=k.value&&(G=parseInt(k.value)+parseInt(g.value),I+="&height="+G),d.value=I):d.value=""}var c=document.createElement("div"),l=b.editor.graph,m=l.getGraphBounds(),x=l.view.scale,y=Math.floor(m.x/x-l.view.translate.x),D=Math.floor(m.y/x-l.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var d=document.createElement("input");d.setAttribute("type","text");d.style.marginBottom="8px";d.style.marginTop="2px";d.style.width="410px"; +c.appendChild(d);mxUtils.br(c);this.init=function(){d.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?d.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+":");var g=document.createElement("input");g.setAttribute("type","text");g.setAttribute("size","4");g.style.marginRight="16px";g.style.marginLeft="4px";g.value=y;c.appendChild(g);mxUtils.write(c,mxResources.get("height")+":");var k=document.createElement("input");k.setAttribute("type","text"); k.setAttribute("size","4");k.style.marginLeft="4px";k.value=Math.ceil(m.height/x);c.appendChild(k);mxUtils.br(c);m=document.createElement("hr");m.setAttribute("size","1");m.style.marginBottom="16px";m.style.marginTop="16px";c.appendChild(m);mxUtils.write(c,mxResources.get("publicDiagramUrl")+":");mxUtils.br(c);var n=document.createElement("input");n.setAttribute("type","text");n.setAttribute("size","28");n.style.marginBottom="8px";n.style.marginTop="2px";n.style.width="410px";n.value=e||"";c.appendChild(n); -mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var t=document.createElement("input");t.setAttribute("type","text");t.setAttribute("size","3");t.style.marginBottom="8px";t.style.marginLeft="4px";t.value="0";c.appendChild(t);mxUtils.br(c);var p=document.createElement("input");p.setAttribute("type","checkbox");p.setAttribute("checked","checked");p.defaultChecked=!0;p.style.marginLeft="16px";c.appendChild(p);mxUtils.write(c,mxResources.get("pan")+" ");var A=document.createElement("input"); -A.setAttribute("type","checkbox");A.setAttribute("checked","checked");A.defaultChecked=!0;A.style.marginLeft="8px";c.appendChild(A);mxUtils.write(c,mxResources.get("zoom")+" ");var E=document.createElement("input");E.setAttribute("type","checkbox");E.style.marginLeft="8px";E.setAttribute("title",window.location.href);c.appendChild(E);mxUtils.write(c,mxResources.get("edit")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";c.appendChild(y);mxUtils.write(c, -mxResources.get("asNew")+" ");mxUtils.br(c);var B=document.createElement("input");B.setAttribute("type","checkbox");B.setAttribute("checked","checked");B.defaultChecked=!0;B.style.marginLeft="16px";c.appendChild(B);mxUtils.write(c,mxResources.get("resize")+" ");var J=document.createElement("input");J.setAttribute("type","checkbox");J.style.marginLeft="8px";c.appendChild(J);mxUtils.write(c,mxResources.get("fit")+" ");var N=document.createElement("input");N.setAttribute("type","checkbox");N.style.marginLeft= -"8px";c.appendChild(N);mxUtils.write(c,mxResources.get("embed")+" ");var v=b.getBasenames().join(";"),u=b.getCurrentFile();mxEvent.addListener(p,"change",f);mxEvent.addListener(A,"change",f);mxEvent.addListener(B,"change",f);mxEvent.addListener(J,"change",f);mxEvent.addListener(E,"change",f);mxEvent.addListener(y,"change",f);mxEvent.addListener(N,"change",f);mxEvent.addListener(k,"change",f);mxEvent.addListener(g,"change",f);mxEvent.addListener(t,"change",f);mxEvent.addListener(n,"change",f);f(); +mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var q=document.createElement("input");q.setAttribute("type","text");q.setAttribute("size","3");q.style.marginBottom="8px";q.style.marginLeft="4px";q.value="0";c.appendChild(q);mxUtils.br(c);var p=document.createElement("input");p.setAttribute("type","checkbox");p.setAttribute("checked","checked");p.defaultChecked=!0;p.style.marginLeft="16px";c.appendChild(p);mxUtils.write(c,mxResources.get("pan")+" ");var A=document.createElement("input"); +A.setAttribute("type","checkbox");A.setAttribute("checked","checked");A.defaultChecked=!0;A.style.marginLeft="8px";c.appendChild(A);mxUtils.write(c,mxResources.get("zoom")+" ");var E=document.createElement("input");E.setAttribute("type","checkbox");E.style.marginLeft="8px";E.setAttribute("title",window.location.href);c.appendChild(E);mxUtils.write(c,mxResources.get("edit")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";c.appendChild(z);mxUtils.write(c, +mxResources.get("asNew")+" ");mxUtils.br(c);var B=document.createElement("input");B.setAttribute("type","checkbox");B.setAttribute("checked","checked");B.defaultChecked=!0;B.style.marginLeft="16px";c.appendChild(B);mxUtils.write(c,mxResources.get("resize")+" ");var J=document.createElement("input");J.setAttribute("type","checkbox");J.style.marginLeft="8px";c.appendChild(J);mxUtils.write(c,mxResources.get("fit")+" ");var M=document.createElement("input");M.setAttribute("type","checkbox");M.style.marginLeft= +"8px";c.appendChild(M);mxUtils.write(c,mxResources.get("embed")+" ");var v=b.getBasenames().join(";"),u=b.getCurrentFile();mxEvent.addListener(p,"change",f);mxEvent.addListener(A,"change",f);mxEvent.addListener(B,"change",f);mxEvent.addListener(J,"change",f);mxEvent.addListener(E,"change",f);mxEvent.addListener(z,"change",f);mxEvent.addListener(M,"change",f);mxEvent.addListener(k,"change",f);mxEvent.addListener(g,"change",f);mxEvent.addListener(q,"change",f);mxEvent.addListener(n,"change",f);f(); mxEvent.addListener(d,"click",function(){d.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?d.select():document.execCommand("selectAll",!1,null)});e=document.createElement("div");e.style.paddingTop="12px";e.style.textAlign="right";m=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});m.className="geBtn gePrimaryBtn";e.appendChild(m);c.appendChild(e);this.container=c},CreateGraphDialog=function(b,e,f){var c=document.createElement("div");c.style.textAlign="right";this.init= function(){var l=document.createElement("div");l.style.position="relative";l.style.border="1px solid gray";l.style.width="100%";l.style.height="360px";l.style.overflow="hidden";l.style.marginBottom="16px";mxEvent.disableContextMenu(l);c.appendChild(l);var m=new Graph(l);m.setCellsCloneable(!0);m.setPanning(!0);m.setAllowDanglingEdges(!1);m.connectionHandler.select=!1;m.view.setTranslate(20,20);m.border=20;m.panningHandler.useLeftButtonForPanning=!0;var x="curved=1;";m.cellRenderer.installCellOverlayListeners= -function(A,E,y){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(y.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(B){E.fireEvent(new mxEventObject("pointerdown","event",B,"state",A))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(y.node,"touchstart",function(B){E.fireEvent(new mxEventObject("pointerdown","event",B,"state",A))})};m.getAllConnectionConstraints=function(){return null};m.connectionHandler.marker.highlight.keepOnTop= -!1;m.connectionHandler.createEdgeState=function(A){A=m.createEdge(null,null,null,null,null,x);return new mxCellState(this.graph.view,A,this.graph.getCellStyle(A))};var z=m.getDefaultParent(),C=mxUtils.bind(this,function(A){var E=new mxCellOverlay(this.connectImage,"Add outgoing");E.cursor="hand";E.addListener(mxEvent.CLICK,function(y,B){m.connectionHandler.reset();m.clearSelection();var J=m.getCellGeometry(A),N;k(function(){N=m.insertVertex(z,null,"Entry",J.x,J.y,80,30,"rounded=1;");C(N);m.view.refresh(N); -m.insertEdge(z,null,"",A,N,x)},function(){m.scrollCellToVisible(N)})});E.addListener("pointerdown",function(y,B){y=B.getProperty("event");B=B.getProperty("state");m.popupMenuHandler.hideMenu();m.stopEditing(!1);var J=mxUtils.convertPoint(m.container,mxEvent.getClientX(y),mxEvent.getClientY(y));m.connectionHandler.start(B,J.x,J.y);m.isMouseDown=!0;m.isMouseTrigger=mxEvent.isMouseEvent(y);mxEvent.consume(y)});m.addCellOverlay(A,E)});m.getModel().beginUpdate();try{var d=m.insertVertex(z,null,"Start", -0,0,80,30,"ellipse");C(d)}finally{m.getModel().endUpdate()}if("horizontalTree"==f){var g=new mxCompactTreeLayout(m);g.edgeRouting=!1;g.levelDistance=30;x="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==f?(g=new mxCompactTreeLayout(m,!1),g.edgeRouting=!1,g.levelDistance=30,x="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==f?(g=new mxRadialTreeLayout(m,!1),g.edgeRouting=!1,g.levelDistance=80):"verticalFlow"==f?g=new mxHierarchicalLayout(m,mxConstants.DIRECTION_NORTH):"horizontalFlow"== -f?g=new mxHierarchicalLayout(m,mxConstants.DIRECTION_WEST):"organic"==f?(g=new mxFastOrganicLayout(m,!1),g.forceConstant=80):"circle"==f&&(g=new mxCircleLayout(m));if(null!=g){var k=function(A,E){m.getModel().beginUpdate();try{null!=A&&A(),g.execute(m.getDefaultParent(),d)}catch(y){throw y;}finally{A=new mxMorphing(m),A.addListener(mxEvent.DONE,mxUtils.bind(this,function(){m.getModel().endUpdate();null!=E&&E()})),A.startAnimation()}},n=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect= -function(A,E,y,B,J){n.apply(this,arguments);k()};m.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);k()};m.connectionHandler.addListener(mxEvent.CONNECT,function(){k()})}var t=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=l.parentNode&&(m.destroy(),l.parentNode.removeChild(l));b.hideDialog()})});t.className="geBtn";b.editor.cancelFirst&&c.appendChild(t);var p=mxUtils.button(mxResources.get("insert"),function(A){m.clearCellOverlays(); -var E=m.getModel().getChildren(m.getDefaultParent());A=mxEvent.isAltDown(A)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(m.getBoundingBoxFromGeometry(E,!0));E=b.editor.graph.importCells(E,A.x,A.y);A=b.editor.graph.view;var y=A.getBounds(E);y.x-=A.translate.x;y.y-=A.translate.y;b.editor.graph.scrollRectToVisible(y);b.editor.graph.setSelectionCells(E);null!=l.parentNode&&(m.destroy(),l.parentNode.removeChild(l));b.hideDialog()});c.appendChild(p);p.className="geBtn gePrimaryBtn"; -b.editor.cancelFirst||c.appendChild(t)};this.container=c}; +function(A,E,z){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(z.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(B){E.fireEvent(new mxEventObject("pointerdown","event",B,"state",A))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(z.node,"touchstart",function(B){E.fireEvent(new mxEventObject("pointerdown","event",B,"state",A))})};m.getAllConnectionConstraints=function(){return null};m.connectionHandler.marker.highlight.keepOnTop= +!1;m.connectionHandler.createEdgeState=function(A){A=m.createEdge(null,null,null,null,null,x);return new mxCellState(this.graph.view,A,this.graph.getCellStyle(A))};var y=m.getDefaultParent(),D=mxUtils.bind(this,function(A){var E=new mxCellOverlay(this.connectImage,"Add outgoing");E.cursor="hand";E.addListener(mxEvent.CLICK,function(z,B){m.connectionHandler.reset();m.clearSelection();var J=m.getCellGeometry(A),M;k(function(){M=m.insertVertex(y,null,"Entry",J.x,J.y,80,30,"rounded=1;");D(M);m.view.refresh(M); +m.insertEdge(y,null,"",A,M,x)},function(){m.scrollCellToVisible(M)})});E.addListener("pointerdown",function(z,B){z=B.getProperty("event");B=B.getProperty("state");m.popupMenuHandler.hideMenu();m.stopEditing(!1);var J=mxUtils.convertPoint(m.container,mxEvent.getClientX(z),mxEvent.getClientY(z));m.connectionHandler.start(B,J.x,J.y);m.isMouseDown=!0;m.isMouseTrigger=mxEvent.isMouseEvent(z);mxEvent.consume(z)});m.addCellOverlay(A,E)});m.getModel().beginUpdate();try{var d=m.insertVertex(y,null,"Start", +0,0,80,30,"ellipse");D(d)}finally{m.getModel().endUpdate()}if("horizontalTree"==f){var g=new mxCompactTreeLayout(m);g.edgeRouting=!1;g.levelDistance=30;x="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==f?(g=new mxCompactTreeLayout(m,!1),g.edgeRouting=!1,g.levelDistance=30,x="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==f?(g=new mxRadialTreeLayout(m,!1),g.edgeRouting=!1,g.levelDistance=80):"verticalFlow"==f?g=new mxHierarchicalLayout(m,mxConstants.DIRECTION_NORTH):"horizontalFlow"== +f?g=new mxHierarchicalLayout(m,mxConstants.DIRECTION_WEST):"circle"==f?g=new mxCircleLayout(m):(g=new mxFastOrganicLayout(m,!1),g.forceConstant=80);if(null!=g){var k=function(A,E){m.getModel().beginUpdate();try{null!=A&&A(),g.execute(m.getDefaultParent(),d)}catch(z){throw z;}finally{A=new mxMorphing(m),A.addListener(mxEvent.DONE,mxUtils.bind(this,function(){m.getModel().endUpdate();null!=E&&E()})),A.startAnimation()}},n=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(A,E, +z,B,J){n.apply(this,arguments);k()};m.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);k()};m.connectionHandler.addListener(mxEvent.CONNECT,function(){k()})}var q=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=l.parentNode&&(m.destroy(),l.parentNode.removeChild(l));b.hideDialog()})});q.className="geBtn";b.editor.cancelFirst&&c.appendChild(q);var p=mxUtils.button(mxResources.get("insert"),function(A){m.clearCellOverlays(); +var E=m.getModel().getChildren(m.getDefaultParent());A=mxEvent.isAltDown(A)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(m.getBoundingBoxFromGeometry(E,!0));E=b.editor.graph.importCells(E,A.x,A.y);A=b.editor.graph.view;var z=A.getBounds(E);z.x-=A.translate.x;z.y-=A.translate.y;b.editor.graph.scrollRectToVisible(z);b.editor.graph.setSelectionCells(E);null!=l.parentNode&&(m.destroy(),l.parentNode.removeChild(l));b.hideDialog()});c.appendChild(p);p.className="geBtn gePrimaryBtn"; +b.editor.cancelFirst||c.appendChild(q)};this.container=c}; CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":IMAGE_PATH+ "/handle-connect.png",26,26); -var BackgroundImageDialog=function(b,e,f){var c=document.createElement("div");c.style.whiteSpace="nowrap";var l=document.createElement("h2");mxUtils.write(l,mxResources.get("backgroundImage"));l.style.marginTop="0px";c.appendChild(l);var m=null!=f&&null!=f.originalSrc;l=!1;var x=document.createElement("input");x.style.cssText="margin-right:8px;margin-bottom:8px;";x.setAttribute("value","url");x.setAttribute("type","radio");x.setAttribute("name","geBackgroundImageDialogOption");var z=document.createElement("input"); -z.style.cssText="margin-right:8px;margin-bottom:8px;";z.setAttribute("value","url");z.setAttribute("type","radio");z.setAttribute("name","geBackgroundImageDialogOption");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginBottom="8px";C.style.width="360px";C.value=m||null==f?"":f.src;var d=document.createElement("select");d.style.width="360px";if(null!=b.pages)for(var g=0;g<b.pages.length;g++){var k=document.createElement("option");mxUtils.write(k,b.pages[g].getName()|| -mxResources.get("pageWithNumber",[g+1]));k.setAttribute("value","data:page/id,"+b.pages[g].getId());b.pages[g]==b.currentPage&&k.setAttribute("disabled","disabled");null!=f&&f.originalSrc==k.getAttribute("value")&&(k.setAttribute("selected","selected"),l=!0);d.appendChild(k)}m||null!=b.pages&&1!=b.pages.length||(x.style.display="none",z.style.display="none",d.style.display="none");var n=document.createElement("option"),t=!1,p=!1,A=function(N,v){t||null!=N&&p||(z.checked?null!=v&&v(n.selected?null: -d.value):""==C.value||b.isOffline()?(y.value="",B.value="",null!=v&&v("")):(C.value=mxUtils.trim(C.value),b.loadImage(C.value,function(u){y.value=u.width;B.value=u.height;null!=v&&v(C.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));y.value="";B.value="";null!=v&&v(null)})))},E=mxUtils.bind(this,function(N){b.importFiles(N,0,0,b.maxBackgroundSize,function(v,u,G,H,M,K){C.value=v;A();C.focus()},function(){},function(v){return"image/"==v.type.substring(0, -6)},function(v){for(var u=0;u<v.length;u++)v[u]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){m?d.focus():C.focus();mxEvent.addListener(d,"focus",function(){x.removeAttribute("checked");z.setAttribute("checked","checked");z.checked=!0});mxEvent.addListener(C,"focus",function(){z.removeAttribute("checked");x.setAttribute("checked","checked");x.checked=!0});if(Graph.fileSupport){C.setAttribute("placeholder",mxResources.get("dragImagesHere"));var N=c.parentNode,v=null;mxEvent.addListener(N, -"dragleave",function(u){null!=v&&(v.parentNode.removeChild(v),v=null);u.stopPropagation();u.preventDefault()});mxEvent.addListener(N,"dragover",mxUtils.bind(this,function(u){null==v&&(!mxClient.IS_IE||10<document.documentMode)&&(v=b.highlightElement(N));u.stopPropagation();u.preventDefault()}));mxEvent.addListener(N,"drop",mxUtils.bind(this,function(u){null!=v&&(v.parentNode.removeChild(v),v=null);if(0<u.dataTransfer.files.length)E(u.dataTransfer.files);else if(0<=mxUtils.indexOf(u.dataTransfer.types, -"text/uri-list")){var G=u.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(G)&&(C.value=decodeURIComponent(G),A())}u.stopPropagation();u.preventDefault()}),!1)}};c.appendChild(x);c.appendChild(C);mxUtils.br(c);g=document.createElement("span");g.style.marginLeft="30px";mxUtils.write(g,mxResources.get("width")+":");c.appendChild(g);var y=document.createElement("input");y.setAttribute("type","text");y.style.width="60px";y.style.marginLeft="8px";y.style.marginRight="16px"; -y.value=null==f||m?"":f.width;c.appendChild(y);mxUtils.write(c,mxResources.get("height")+":");var B=document.createElement("input");B.setAttribute("type","text");B.style.width="60px";B.style.marginLeft="8px";B.style.marginRight="16px";B.value=null==f||m?"":f.height;c.appendChild(B);mxUtils.br(c);mxUtils.br(c);mxEvent.addListener(C,"change",A);ImageDialog.filePicked=function(N){N.action==google.picker.Action.PICKED&&null!=N.docs[0].thumbnails&&(N=N.docs[0].thumbnails[N.docs[0].thumbnails.length-1], -null!=N&&(C.value=N.url,A()));C.focus()};c.appendChild(z);c.appendChild(d);mxUtils.br(c);m?(z.setAttribute("checked","checked"),z.checked=!0):(x.setAttribute("checked","checked"),x.checked=!0);!l&&z.checked&&(mxUtils.write(n,mxResources.get("pageNotFound")),n.setAttribute("disabled","disabled"),n.setAttribute("selected","selected"),n.setAttribute("value","pageNotFound"),d.appendChild(n),mxEvent.addListener(d,"change",function(){null==n.parentNode||n.selected||n.parentNode.removeChild(n)}));f=document.createElement("div"); -f.style.marginTop="30px";f.style.textAlign="right";l=mxUtils.button(mxResources.get("cancel"),function(){t=!0;b.hideDialog()});l.className="geBtn";b.editor.cancelFirst&&f.appendChild(l);g=mxUtils.button(mxResources.get("reset"),function(){C.value="";y.value="";B.value="";x.checked=!0;t=!1});mxEvent.addGestureListeners(g,function(){t=!0});g.className="geBtn";g.width="100";f.appendChild(g);if(Graph.fileSupport){var J=document.createElement("input");J.setAttribute("multiple","multiple");J.setAttribute("type", -"file");mxEvent.addListener(J,"change",function(N){null!=J.files&&(E(J.files),J.type="",J.type="file",J.value="")});J.style.display="none";c.appendChild(J);g=mxUtils.button(mxResources.get("open"),function(){J.click()});g.className="geBtn";f.appendChild(g)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();A(null,function(N){e(""!=N&&null!=N?new mxImage(N,y.value,B.value):null,null==N)})});mxEvent.addGestureListeners(applyBtn,function(){p=!0});applyBtn.className="geBtn gePrimaryBtn"; -f.appendChild(applyBtn);b.editor.cancelFirst||f.appendChild(l);c.appendChild(f);this.container=c},ParseDialog=function(b,e,f){function c(t,p,A){var E=t.split("\n");if("plantUmlPng"==p||"plantUmlSvg"==p||"plantUmlTxt"==p){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var y=function(U,T,V,W,q){m=mxEvent.isAltDown(A)?m:B.getCenterInsertPoint(new mxRectangle(0,0,W,q));var D=null;B.getModel().beginUpdate();try{D="txt"==T?b.insertAsPreText(V,m.x,m.y):B.insertVertex(null,null,null,m.x,m.y, -W,q,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(V)+";"),B.setAttributeForCell(D,"plantUmlData",JSON.stringify({data:U,format:T},null,2))}finally{B.getModel().endUpdate()}null!=D&&(B.setSelectionCell(D),B.scrollCellToVisible(D))},B=b.editor.graph,J="plantUmlTxt"==p?"txt":"plantUmlPng"==p?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"== -t&&"svg"==J?window.setTimeout(function(){b.spinner.stop();y(t,J,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=", -295,212)},200):b.generatePlantUmlImage(t,J,function(U,T,V){b.spinner.stop();y(t,J,U,T,V)},function(U){b.handleError(U)})}}else if("mermaid"==p)b.spinner.spin(document.body,mxResources.get("inserting"))&&(B=b.editor.graph,b.generateMermaidImage(t,J,function(U,T,V){m=mxEvent.isAltDown(A)?m:B.getCenterInsertPoint(new mxRectangle(0,0,T,V));b.spinner.stop();var W=null;B.getModel().beginUpdate();try{W=B.insertVertex(null,null,null,m.x,m.y,T,V,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+ -U+";"),B.setAttributeForCell(W,"mermaidData",JSON.stringify({data:t,config:EditorUi.defaultMermaidConfig},null,2))}finally{B.getModel().endUpdate()}null!=W&&(B.setSelectionCell(W),B.scrollCellToVisible(W))},function(U){b.handleError(U)}));else if("table"==p){p=null;for(var N=[],v=0,u={},G=0;G<E.length;G++){var H=mxUtils.trim(E[G]);if("primary key"==H.substring(0,11).toLowerCase()){var M=H.match(/\((.+)\)/);M&&M[1]&&(u[M[1]]=!0);E.splice(G,1)}else 0<H.toLowerCase().indexOf("primary key")&&(u[H.split(" ")[0]]= -!0,E[G]=mxUtils.trim(H.replace(/primary key/i,"")))}for(G=0;G<E.length;G++)if(H=mxUtils.trim(E[G]),"create table"==H.substring(0,12).toLowerCase())H=mxUtils.trim(H.substring(12)),"("==H.charAt(H.length-1)&&(H=mxUtils.trim(H.substring(0,H.length-1))),p=new mxCell(H,new mxGeometry(v,0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),p.vertex=!0,N.push(p),H=b.editor.graph.getPreferredSizeForCell(K),null!= -H&&(p.geometry.width=H.width+10);else if(null!=p&&")"==H.charAt(0))v+=p.geometry.width+40,p=null;else if("("!=H&&null!=p){H=H.substring(0,","==H.charAt(H.length-1)?H.length-1:H.length);M=u[H.split(" ")[0]];var K=new mxCell("",new mxGeometry(0,0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(M?"1":"0")+";");K.vertex=!0;var I=new mxCell(M?"PK":"", -new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(M?"fontStyle=1;":""));I.vertex=!0;K.insert(I);H=new mxCell(H,new mxGeometry(30,0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(M?"fontStyle=5;":""));H.vertex=!0;K.insert(H);H=b.editor.graph.getPreferredSizeForCell(H);null!=H&&p.geometry.width<H.width+30&&(p.geometry.width=Math.min(320, -Math.max(p.geometry.width,H.width+30)));p.insert(K,M?0:null);p.geometry.height+=30}0<N.length&&(B=b.editor.graph,m=mxEvent.isAltDown(A)?m:B.getCenterInsertPoint(B.getBoundingBoxFromGeometry(N,!0)),B.setSelectionCells(B.importCells(N,m.x,m.y)),B.scrollCellToVisible(B.getSelectionCell()))}else if("list"==p){if(0<E.length){B=b.editor.graph;K=null;N=[];for(G=p=0;G<E.length;G++)";"!=E[G].charAt(0)&&(0==E[G].length?K=null:null==K?(K=new mxCell(E[G],new mxGeometry(p,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"), -K.vertex=!0,N.push(K),H=B.getPreferredSizeForCell(K),null!=H&&K.geometry.width<H.width+10&&(K.geometry.width=H.width+10),p+=K.geometry.width+40):"--"==E[G]?(H=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;"),H.vertex=!0,K.geometry.height+=H.geometry.height,K.insert(H)):0<E[G].length&&(v=new mxCell(E[G],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;"), -v.vertex=!0,H=B.getPreferredSizeForCell(v),null!=H&&v.geometry.width<H.width&&(v.geometry.width=H.width),K.geometry.width=Math.max(K.geometry.width,v.geometry.width),K.geometry.height+=v.geometry.height,K.insert(v)));if(0<N.length){m=mxEvent.isAltDown(A)?m:B.getCenterInsertPoint(B.getBoundingBoxFromGeometry(N,!0));B.getModel().beginUpdate();try{N=B.importCells(N,m.x,m.y);H=[];for(G=0;G<N.length;G++)H.push(N[G]),H=H.concat(N[G].children);B.fireEvent(new mxEventObject("cellsInserted","cells",H))}finally{B.getModel().endUpdate()}B.setSelectionCells(N); -B.scrollCellToVisible(B.getSelectionCell())}}}else{K=function(U){var T=F[U];null==T&&(T=new mxCell(U,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),T.vertex=!0,F[U]=T,N.push(T));return T};var F={};N=[];for(G=0;G<E.length;G++)if(";"!=E[G].charAt(0)){var P=E[G].split("->");2<=P.length&&(M=K(P[0]),I=K(P[P.length-1]),P=new mxCell(2<P.length?P[1]:"",new mxGeometry),P.edge=!0,M.insertEdge(P,!0),I.insertEdge(P,!1),N.push(P))}if(0<N.length){E=document.createElement("div");E.style.visibility="hidden"; -document.body.appendChild(E);B=new Graph(E);B.getModel().beginUpdate();try{N=B.importCells(N);for(G=0;G<N.length;G++)B.getModel().isVertex(N[G])&&(H=B.getPreferredSizeForCell(N[G]),N[G].geometry.width=Math.max(N[G].geometry.width,H.width),N[G].geometry.height=Math.max(N[G].geometry.height,H.height));G=!0;"horizontalFlow"==p||"verticalFlow"==p?((new mxHierarchicalLayout(B,"horizontalFlow"==p?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(B.getDefaultParent(),N),G=!1):"circle"==p? -(new mxCircleLayout(B)).execute(B.getDefaultParent()):(v=new mxFastOrganicLayout(B),v.disableEdgeStyle=!1,v.forceConstant=180,v.execute(B.getDefaultParent()));G&&(u=new mxParallelEdgeLayout(B),u.spacing=30,u.execute(B.getDefaultParent()))}finally{B.getModel().endUpdate()}B.clearCellOverlays();H=[];b.editor.graph.getModel().beginUpdate();try{N=B.getModel().getChildren(B.getDefaultParent()),m=mxEvent.isAltDown(A)?m:b.editor.graph.getCenterInsertPoint(B.getBoundingBoxFromGeometry(N,!0)),H=b.editor.graph.importCells(N, -m.x,m.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",H))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(H);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());B.destroy();E.parentNode.removeChild(E)}}}function l(){return"list"==z.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==z.value? -"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==z.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==z.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"==z.value||"plantUmlTxt"==z.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var m=b.editor.graph.getFreeInsertPoint();e=document.createElement("div");e.style.textAlign="right";var x=document.createElement("textarea");x.style.boxSizing="border-box";x.style.resize= -"none";x.style.width="100%";x.style.height="354px";x.style.marginBottom="16px";var z=document.createElement("select");if("formatSql"==f||"mermaid"==f)z.style.display="none";var C=document.createElement("option");C.setAttribute("value","list");mxUtils.write(C,mxResources.get("list"));"plantUml"!=f&&z.appendChild(C);null!=f&&"fromText"!=f||C.setAttribute("selected","selected");C=document.createElement("option");C.setAttribute("value","table");mxUtils.write(C,mxResources.get("formatSql"));"formatSql"== -f&&(z.appendChild(C),C.setAttribute("selected","selected"));C=document.createElement("option");C.setAttribute("value","mermaid");mxUtils.write(C,mxResources.get("formatSql"));"mermaid"==f&&(z.appendChild(C),C.setAttribute("selected","selected"));C=document.createElement("option");C.setAttribute("value","diagram");mxUtils.write(C,mxResources.get("diagram"));var d=document.createElement("option");d.setAttribute("value","circle");mxUtils.write(d,mxResources.get("circle"));var g=document.createElement("option"); -g.setAttribute("value","horizontalFlow");mxUtils.write(g,mxResources.get("horizontalFlow"));var k=document.createElement("option");k.setAttribute("value","verticalFlow");mxUtils.write(k,mxResources.get("verticalFlow"));"plantUml"!=f&&(z.appendChild(C),z.appendChild(d),z.appendChild(g),z.appendChild(k));C=document.createElement("option");C.setAttribute("value","plantUmlSvg");mxUtils.write(C,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==f&&C.setAttribute("selected", -"selected");d=document.createElement("option");d.setAttribute("value","plantUmlPng");mxUtils.write(d,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");g=document.createElement("option");g.setAttribute("value","plantUmlTxt");mxUtils.write(g,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==f&&(z.appendChild(C),z.appendChild(d),z.appendChild(g));var n=l();x.value=n;e.appendChild(x);this.init=function(){x.focus()}; -Graph.fileSupport&&(x.addEventListener("dragover",function(t){t.stopPropagation();t.preventDefault()},!1),x.addEventListener("drop",function(t){t.stopPropagation();t.preventDefault();if(0<t.dataTransfer.files.length){t=t.dataTransfer.files[0];var p=new FileReader;p.onload=function(A){x.value=A.target.result};p.readAsText(t)}},!1));e.appendChild(z);mxEvent.addListener(z,"change",function(){var t=l();if(0==x.value.length||x.value==n)n=t,x.value=n});b.isOffline()||"mermaid"!=f&&"plantUml"!=f||(C=mxUtils.button(mxResources.get("help"), -function(){b.openLink("mermaid"==f?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),C.className="geBtn",e.appendChild(C));C=mxUtils.button(mxResources.get("close"),function(){x.value==n?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});C.className="geBtn";b.editor.cancelFirst&&e.appendChild(C);d=mxUtils.button(mxResources.get("insert"),function(t){b.hideDialog();c(x.value,z.value,t)});e.appendChild(d);d.className="geBtn gePrimaryBtn";b.editor.cancelFirst|| -e.appendChild(C);this.container=e},NewDialog=function(b,e,f,c,l,m,x,z,C,d,g,k,n,t,p,A,E,y){function B(ja){null!=ja&&(Fa=Ga=ja?135:140);ja=!0;if(null!=wa)for(;F<wa.length&&(ja||0!=mxUtils.mod(F,30));){var va=wa[F++];va=v(va.url,va.libs,va.title,va.tooltip?va.tooltip:va.title,va.select,va.imgUrl,va.info,va.onClick,va.preview,va.noImg,va.clibs);ja&&va.click();ja=!1}}function J(){if(aa&&null!=t)f||b.hideDialog(),t(aa,Z,I.value);else if(c)f||b.hideDialog(),c(S,I.value,Y,O);else{var ja=I.value;null!=ja&& -0<ja.length&&b.pickFolder(b.mode,function(va){b.createFile(ja,S,null!=O&&0<O.length?O:null,null,function(){b.hideDialog()},null,va,null,null!=Q&&0<Q.length?Q:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function N(ja,va,ta,da,ca,na,ea){null!=X&&(X.style.backgroundColor="transparent",X.style.border="1px solid transparent");U.removeAttribute("disabled");S=va;O=ta;Q=na;X=ja;aa=da;Y=ea;Z=ca;X.style.backgroundColor=z;X.style.border=C}function v(ja,va,ta,da,ca,na,ea,ia, -oa,ma,xa){function Ea(La,Ta){null==Ja?(Na=La,Na=/^https?:\/\//.test(Na)&&!b.editor.isCorsEnabledForUrl(Na)?PROXY_URL+"?url="+encodeURIComponent(Na):TEMPLATE_PATH+"/"+Na,mxUtils.get(Na,mxUtils.bind(this,function(Va){200<=Va.getStatus()&&299>=Va.getStatus()&&(Ja=Va.getText());Ta(Ja,Na)}))):Ta(Ja,Na)}function Ba(La,Ta,Va){if(null!=La&&mxUtils.isAncestorNode(document.body,sa)){La=mxUtils.parseXml(La);La=Editor.parseDiagramNode(La.documentElement);var Wa=new mxCodec(La.ownerDocument),$a=new mxGraphModel; -Wa.decode(La,$a);La=$a.root.getChildAt(0).children;b.sidebar.createTooltip(sa,La,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=ta?mxResources.get(ta,null,ta):null,!0,new mxPoint(Ta,Va),!0,function(){Ua=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;N(sa,null,null,ja,ea,xa)},!0,!1)}}function ua(La,Ta){null==ja||Ra|| -b.sidebar.currentElt==sa?b.sidebar.hideTooltip():(b.sidebar.hideTooltip(),null!=Ka?(Ta='<mxfile><diagram id="d" name="n">'+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+Ka.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+Ka.naturalWidth+'" height="'+Ka.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>",Ba(Ta,mxEvent.getClientX(La),mxEvent.getClientY(La))):(b.sidebar.currentElt= -sa,Ra=!0,Ea(ja,function(Va){Ra&&b.sidebar.currentElt==sa&&Ba(Va,mxEvent.getClientX(La),mxEvent.getClientY(La));Ra=!1})))}var sa=document.createElement("div");sa.className="geTemplate geAdaptiveAsset";sa.style.position="relative";sa.style.height=Fa+"px";sa.style.width=Ga+"px";var Ja=null,Na=ja;null!=ta?sa.setAttribute("title",mxResources.get(ta,null,ta)):null!=da&&0<da.length&&sa.setAttribute("title",da);var Ra=!1,Ka=null;if(null!=na){sa.style.display="inline-flex";sa.style.justifyContent="center"; -sa.style.alignItems="center";ca=document.createElement("img");ca.setAttribute("src",na);ca.setAttribute("alt",da);ca.style.maxWidth=Fa+"px";ca.style.maxHeight=Ga+"px";Ka=ca;var Pa=na.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");sa.appendChild(ca);ca.onerror=function(){this.src!=Pa?this.src=Pa:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(sa,mxUtils.bind(this,function(La){N(sa,null,null,ja,ea,xa)}),null,null);mxEvent.addListener(sa,"dblclick",function(La){J(); -mxEvent.consume(La)})}else if(!ma&&null!=ja&&0<ja.length){var Qa=function(La){U.setAttribute("disabled","disabled");sa.style.backgroundColor="transparent";sa.style.border="1px solid transparent";P.spin(ba);Ea(ja,function(Ta,Va){P.stop();null!=Ta&&(N(sa,Ta,va,null,null,xa,Va),La&&J())})};ca=oa||TEMPLATE_PATH+"/"+ja.substring(0,ja.length-4)+".png";sa.style.backgroundImage="url("+ca+")";sa.style.backgroundPosition="center center";sa.style.backgroundRepeat="no-repeat";if(null!=ta){da=document.createElement("table"); -da.setAttribute("width","100%");da.setAttribute("height","100%");da.style.background=Editor.isDarkMode()?"transparent":"rgba(255,255,255,0.85)";da.style.lineHeight="1.3em";da.style.border="inherit";na=document.createElement("tbody");oa=document.createElement("tr");ma=document.createElement("td");ma.setAttribute("align","center");ma.setAttribute("valign","middle");var Oa=document.createElement("span");Oa.style.display="inline-block";Oa.style.padding="4px 8px 4px 8px";Oa.style.userSelect="none";Oa.style.borderRadius= -"3px";Oa.style.background="rgba(255,255,255,0.85)";Oa.style.overflow="hidden";Oa.style.textOverflow="ellipsis";Oa.style.maxWidth=Fa-34+"px";mxUtils.write(Oa,mxResources.get(ta,null,ta));ma.appendChild(Oa);oa.appendChild(ma);na.appendChild(oa);da.appendChild(na);sa.appendChild(da)}mxEvent.addGestureListeners(sa,mxUtils.bind(this,function(La){Qa()}),null,null);mxEvent.addListener(sa,"dblclick",function(La){Qa(!0);mxEvent.consume(La)})}else da=document.createElement("table"),da.setAttribute("width", -"100%"),da.setAttribute("height","100%"),da.style.lineHeight="1.3em",na=document.createElement("tbody"),oa=document.createElement("tr"),ma=document.createElement("td"),ma.setAttribute("align","center"),ma.setAttribute("valign","middle"),Oa=document.createElement("span"),Oa.style.display="inline-block",Oa.style.padding="4px 8px 4px 8px",Oa.style.userSelect="none",Oa.style.borderRadius="3px",Oa.style.background="#ffffff",Oa.style.overflow="hidden",Oa.style.textOverflow="ellipsis",Oa.style.maxWidth= -Fa-34+"px",mxUtils.write(Oa,mxResources.get(ta,null,ta)),ma.appendChild(Oa),oa.appendChild(ma),na.appendChild(oa),da.appendChild(na),sa.appendChild(da),ca&&N(sa),mxEvent.addGestureListeners(sa,mxUtils.bind(this,function(La){N(sa,null,null,ja,ea)}),null,null),null!=ia?mxEvent.addListener(sa,"click",ia):(mxEvent.addListener(sa,"click",function(La){N(sa,null,null,ja,ea)}),mxEvent.addListener(sa,"dblclick",function(La){J();mxEvent.consume(La)}));if(null!=ja){var Sa=document.createElement("img");Sa.setAttribute("src", -Sidebar.prototype.searchImage);Sa.setAttribute("title",mxResources.get("preview"));Sa.className="geActiveButton";Sa.style.position="absolute";Sa.style.cursor="default";Sa.style.padding="8px";Sa.style.right="0px";Sa.style.top="0px";sa.appendChild(Sa);var Ua=!1;mxEvent.addGestureListeners(Sa,mxUtils.bind(this,function(La){Ua=b.sidebar.currentElt==sa}),null,null);mxEvent.addListener(Sa,"click",mxUtils.bind(this,function(La){Ua||ua(La,Sa);mxEvent.consume(La)}))}ba.appendChild(sa);return sa}function u(){function ja(ua, -sa){var Ja=mxResources.get(ua);null==Ja&&(Ja=ua.substring(0,1).toUpperCase()+ua.substring(1));18<Ja.length&&(Ja=Ja.substring(0,18)+"…");return Ja+" ("+sa.length+")"}function va(ua,sa,Ja){mxEvent.addListener(sa,"click",function(){pa!=sa&&(pa.style.backgroundColor="",pa=sa,pa.style.backgroundColor=x,ba.scrollTop=0,ba.innerText="",F=0,wa=Ja?Ma[ua][Ja]:Aa[ua],V=null,B(!1))})}Ca&&(Ca=!1,mxEvent.addListener(ba,"scroll",function(ua){ba.scrollTop+ba.clientHeight>=ba.scrollHeight&&(B(),mxEvent.consume(ua))})); -if(0<Da){var ta=document.createElement("div");ta.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ta,mxResources.get("custom"));la.appendChild(ta);for(var da in za){var ca=document.createElement("div"),na=da;ta=za[da];18<na.length&&(na=na.substring(0,18)+"…");ca.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";ca.setAttribute("title", -na+" ("+ta.length+")");mxUtils.write(ca,ca.getAttribute("title"));null!=d&&(ca.style.padding=d);la.appendChild(ca);(function(ua,sa){mxEvent.addListener(ca,"click",function(){pa!=sa&&(pa.style.backgroundColor="",pa=sa,pa.style.backgroundColor=x,ba.scrollTop=0,ba.innerText="",F=0,wa=za[ua],V=null,B(!1))})})(da,ca)}ta=document.createElement("div");ta.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ta,"draw.io");la.appendChild(ta)}for(da in Aa){na= -Ma[da];var ea=ca=document.createElement(na?"ul":"div");ta=Aa[da];var ia=ja(da,ta);if(null!=na){var oa=document.createElement("li"),ma=document.createElement("div");ma.className="geTempTreeCaret";ma.setAttribute("title",ia);mxUtils.write(ma,ia);ea=ma;oa.appendChild(ma);ia=document.createElement("ul");ia.className="geTempTreeNested";ia.style.visibility="hidden";for(var xa in na){var Ea=document.createElement("li"),Ba=ja(xa,na[xa]);Ea.setAttribute("title",Ba);mxUtils.write(Ea,Ba);va(da,Ea,xa);ia.appendChild(Ea)}oa.appendChild(ia); -ca.className="geTempTree";ca.appendChild(oa);(function(ua,sa){mxEvent.addListener(sa,"click",function(){ua.style.visibility="visible";ua.classList.toggle("geTempTreeActive");ua.classList.toggle("geTempTreeNested")&&setTimeout(function(){ua.style.visibility="hidden"},550);sa.classList.toggle("geTempTreeCaret-down")})})(ia,ma)}else ca.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;", -ca.setAttribute("title",ia),mxUtils.write(ca,ia);null!=d&&(ca.style.padding=d);la.appendChild(ca);null==pa&&0<ta.length&&(pa=ca,pa.style.backgroundColor=x,wa=ta);va(da,ea)}B(!1)}var G=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);f=null!=f?f:!0;l=null!=l?l:!1;x=null!=x?x:"#ebf2f9";z=null!=z?z:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";C=null!=C?C:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";g=null!=g?g:EditorUi.templateFile;var H=document.createElement("div"); -H.style.userSelect="none";H.style.height="100%";var M=document.createElement("div");M.style.whiteSpace="nowrap";M.style.height="46px";f&&H.appendChild(M);var K=document.createElement("img");K.setAttribute("border","0");K.setAttribute("align","absmiddle");K.style.width="40px";K.style.height="40px";K.style.marginRight="10px";K.style.paddingBottom="4px";K.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE? -IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";e||G||!f||M.appendChild(K);f&&mxUtils.write(M,(G?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");K=".drawio"; -b.mode==App.MODE_GOOGLE&&null!=b.drive?K=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?K=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?K=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?K=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?K=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(K=b.trello.extension);var I=document.createElement("input");I.setAttribute("value",b.defaultFilename+K);I.style.marginLeft="10px";I.style.width=e|| -G?"144px":"244px";this.init=function(){f&&(I.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?I.select():document.execCommand("selectAll",!1,null));null!=ba.parentNode&&null!=ba.parentNode.parentNode&&mxEvent.addGestureListeners(ba.parentNode.parentNode,mxUtils.bind(this,function(ja){b.sidebar.hideTooltip()}),null,null)};f&&(M.appendChild(I),y?I.style.width=e||G?"350px":"450px":(null!=b.editor.diagramFileTypes&&(y=FilenameDialog.createFileTypes(b,I,b.editor.diagramFileTypes),y.style.marginLeft= -"6px",y.style.width=e||G?"80px":"180px",M.appendChild(y)),null!=b.editor.fileExtensions&&(G=FilenameDialog.createTypeHint(b,I,b.editor.fileExtensions),G.style.marginTop="12px",M.appendChild(G))));M=!1;var F=0,P=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),U=mxUtils.button(A||mxResources.get("create"),function(){U.setAttribute("disabled","disabled");J();U.removeAttribute("disabled")});U.className="geBtn gePrimaryBtn"; -if(k||n){var T=[],V=null,W=null,q=null,D=function(ja){U.setAttribute("disabled","disabled");for(var va=0;va<T.length;va++)T[va].className=va==ja?"geBtn gePrimaryBtn":"geBtn"};M=!0;A=document.createElement("div");A.style.whiteSpace="nowrap";A.style.height="30px";H.appendChild(A);G=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){la.style.display="";fa.style.display="";ba.style.left="160px";D(0);ba.scrollTop=0;ba.innerText="";F=0;V!=wa&&(wa=V,Aa=W,Da=q,la.innerText="",u(),V=null)}); -T.push(G);A.appendChild(G);var L=function(ja){la.style.display="none";fa.style.display="none";ba.style.left="30px";D(ja?-1:1);null==V&&(V=wa);ba.scrollTop=0;ba.innerText="";P.spin(ba);var va=function(ta,da,ca){F=0;P.stop();wa=ta;ca=ca||{};var na=0,ea;for(ea in ca)na+=ca[ea].length;if(da)ba.innerText=da;else if(0==ta.length&&0==na)ba.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(ba.innerText="",0<na){la.style.display="";ba.style.left="160px";la.innerText="";Da=0;Aa={"draw.io":ta}; -for(ea in ca)Aa[ea]=ca[ea];u()}else B(!0)};ja?n(R.value,va):k(va)};k&&(G=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){L()}),A.appendChild(G),T.push(G));if(n){G=document.createElement("span");G.style.marginLeft="10px";G.innerText=mxResources.get("search")+":";A.appendChild(G);var R=document.createElement("input");R.style.marginRight="10px";R.style.marginLeft="10px";R.style.width="220px";mxEvent.addListener(R,"keypress",function(ja){13==ja.keyCode&&L(!0)});A.appendChild(R);G=mxUtils.button(mxResources.get("search"), -function(){L(!0)});G.className="geBtn";A.appendChild(G)}D(0)}var O=null,Q=null,S=null,X=null,aa=null,Y=null,Z=null,ba=document.createElement("div");ba.style.border="1px solid #d3d3d3";ba.style.position="absolute";ba.style.left="160px";ba.style.right="34px";A=(f?72:40)+(M?30:0);ba.style.top=A+"px";ba.style.bottom="68px";ba.style.margin="6px 0 0 -1px";ba.style.padding="6px";ba.style.overflow="auto";var fa=document.createElement("div");fa.style.cssText="position:absolute;left:30px;width:128px;top:"+ -A+"px;height:22px;margin-top: 6px;white-space: nowrap";var ka=document.createElement("input");ka.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";ka.setAttribute("placeholder",mxResources.get("search"));ka.setAttribute("type","text");fa.appendChild(ka);var ha=document.createElement("img"),ra="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";ha.setAttribute("src",ra);ha.setAttribute("title",mxResources.get("search")); -ha.style.position="relative";ha.style.left="-18px";ha.style.top="1px";ha.style.background="url('"+b.editor.transparentImage+"')";fa.appendChild(ha);mxEvent.addListener(ha,"click",function(){ha.getAttribute("src")==Dialog.prototype.closeImage&&(ha.setAttribute("src",ra),ha.setAttribute("title",mxResources.get("search")),ka.value="",null!=qa&&(qa.click(),qa=null));ka.focus()});mxEvent.addListener(ka,"keydown",mxUtils.bind(this,function(ja){if(13==ja.keyCode){var va=ka.value;if(""==va)null!=qa&&(qa.click(), -qa=null);else{if(null==NewDialog.tagsList[g]){var ta={};for(xa in Aa)for(var da=Aa[xa],ca=0;ca<da.length;ca++){var na=da[ca];if(null!=na.tags)for(var ea=na.tags.toLowerCase().split(";"),ia=0;ia<ea.length;ia++)null==ta[ea[ia]]&&(ta[ea[ia]]=[]),ta[ea[ia]].push(na)}NewDialog.tagsList[g]=ta}var oa=va.toLowerCase().split(" ");ta=NewDialog.tagsList[g];if(0<Da&&null==ta.__tagsList__){for(xa in za)for(da=za[xa],ca=0;ca<da.length;ca++)for(na=da[ca],ea=na.title.split(" "),ea.push(xa),ia=0;ia<ea.length;ia++){var ma= -ea[ia].toLowerCase();null==ta[ma]&&(ta[ma]=[]);ta[ma].push(na)}ta.__tagsList__=!0}var xa=[];da={};for(ca=ea=0;ca<oa.length;ca++)if(0<oa[ca].length){ma=ta[oa[ca]];var Ea={};xa=[];if(null!=ma)for(ia=0;ia<ma.length;ia++)na=ma[ia],0==ea==(null==da[na.url])&&(Ea[na.url]=!0,xa.push(na));da=Ea;ea++}ba.scrollTop=0;ba.innerText="";F=0;ta=document.createElement("div");ta.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";mxUtils.write(ta,mxResources.get(0==xa.length?"noResultsFor": -"resultsFor",[va]));ba.appendChild(ta);null!=pa&&null==qa&&(pa.style.backgroundColor="",qa=pa,pa=ta);wa=xa;V=null;B(!1)}mxEvent.consume(ja)}}));mxEvent.addListener(ka,"keyup",mxUtils.bind(this,function(ja){""==ka.value?(ha.setAttribute("src",ra),ha.setAttribute("title",mxResources.get("search"))):(ha.setAttribute("src",Dialog.prototype.closeImage),ha.setAttribute("title",mxResources.get("reset")))}));A+=23;var la=document.createElement("div");la.style.cssText="position:absolute;left:30px;width:128px;top:"+ -A+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(ba,"scroll",function(){b.sidebar.hideTooltip()});var Fa=140,Ga=140,Aa={},Ma={},za={},Da=0,Ca=!0,pa=null,qa=null;Aa.basic=[{title:"blankDiagram",select:!0}];var wa=Aa.basic;if(!e){var Ha=function(){mxUtils.get(Ia,function(ja){if(!ya){ya=!0;ja=ja.getXml().documentElement.firstChild;for(var va={};null!=ja;){if("undefined"!==typeof ja.getAttribute)if("clibs"==ja.nodeName){for(var ta=ja.getAttribute("name"),da= -ja.getElementsByTagName("add"),ca=[],na=0;na<da.length;na++)ca.push(encodeURIComponent(mxUtils.getTextContent(da[na])));null!=ta&&0<ca.length&&(va[ta]=ca.join(";"))}else if(ca=ja.getAttribute("url"),null!=ca){da=ja.getAttribute("section");ta=ja.getAttribute("subsection");if(null==da&&(na=ca.indexOf("/"),da=ca.substring(0,na),null==ta)){var ea=ca.indexOf("/",na+1);-1<ea&&(ta=ca.substring(na+1,ea))}na=Aa[da];null==na&&(na=[],Aa[da]=na);ca=ja.getAttribute("clibs");null!=va[ca]&&(ca=va[ca]);ca={url:ja.getAttribute("url"), -libs:ja.getAttribute("libs"),title:ja.getAttribute("title"),tooltip:ja.getAttribute("name")||ja.getAttribute("url"),preview:ja.getAttribute("preview"),clibs:ca,tags:ja.getAttribute("tags")};na.push(ca);null!=ta&&(na=Ma[da],null==na&&(na={},Ma[da]=na),da=na[ta],null==da&&(da=[],na[ta]=da),da.push(ca))}ja=ja.nextSibling}P.stop();u()}})};H.appendChild(fa);H.appendChild(la);H.appendChild(ba);var ya=!1,Ia=g;/^https?:\/\//.test(Ia)&&!b.editor.isCorsEnabledForUrl(Ia)&&(Ia=PROXY_URL+"?url="+encodeURIComponent(Ia)); -P.spin(ba);null!=E?E(function(ja,va){za=ja;q=Da=va;Ha()},Ha):Ha();W=Aa}mxEvent.addListener(I,"keypress",function(ja){b.dialog.container.firstChild==H&&13==ja.keyCode&&J()});E=document.createElement("div");E.style.marginTop=e?"4px":"16px";E.style.textAlign="right";E.style.position="absolute";E.style.left="40px";E.style.bottom="24px";E.style.right="40px";e||b.isOffline()||!f||null!=c||l||(A=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}), -A.className="geBtn",E.appendChild(A));A=mxUtils.button(mxResources.get("cancel"),function(){null!=m&&m();b.hideDialog(!0)});A.className="geBtn";!b.editor.cancelFirst||l&&null==m||E.appendChild(A);e||"1"==urlParams.embed||l||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var ja=new FilenameDialog(b,"",mxResources.get("create"),function(va){null!=va&&0<va.length&&b.editor.loadUrl(b.editor.getProxiedUrl(va),function(ta){S= -ta;O=null;templateRealURl=va;b.hideDialog();J()},function(ta){b.handleError(ta)})},mxResources.get("url"),null,null,null,!1);b.showDialog(ja.container,300,80,!0,!0);ja.init()}),e.className="geBtn",E.appendChild(e));Graph.fileSupport&&p&&(p=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var ja=document.createElement("input");ja.setAttribute("multiple","multiple");ja.setAttribute("type","file");mxEvent.addListener(ja,"change",function(va){b.openFiles(ja.files,!0); -ja.value=""});ja.style.display="none";document.body.appendChild(ja);b.newDlgFileInputElt=ja}b.newDlgFileInputElt.click()}),p.className="geBtn",E.appendChild(p));E.appendChild(U);b.editor.cancelFirst||null!=c||l&&null==m||E.appendChild(A);H.appendChild(E);this.container=H};NewDialog.tagsList={}; -var CreateDialog=function(b,e,f,c,l,m,x,z,C,d,g,k,n,t,p,A,E){function y(M,K,I,F){function P(){mxEvent.addListener(U,"click",function(){var D=I;if(x){var L=N.value,R=L.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>R){D=null!=D?D:H.value;var O="";D==App.MODE_GOOGLE?O=b.drive.extension:D==App.MODE_GITHUB?O=b.gitHub.extension:D==App.MODE_GITLAB?O=b.gitLab.extension:D==App.MODE_TRELLO?O=b.trello.extension:D==App.MODE_DROPBOX?O=b.dropbox.extension:D==App.MODE_ONEDRIVE?O=b.oneDrive.extension:D==App.MODE_DEVICE&& -(O=".drawio");0<=R&&(L=L.substring(0,R));N.value=L+O}}B(I)})}var U=document.createElement("a");U.style.overflow="hidden";var T=document.createElement("img");T.src=M;T.setAttribute("border","0");T.setAttribute("align","absmiddle");T.style.width="60px";T.style.height="60px";T.style.paddingBottom="6px";U.style.display="inline-block";U.className="geBaseButton";U.style.position="relative";U.style.margin="4px";U.style.padding="8px 8px 10px 8px";U.style.whiteSpace="nowrap";U.appendChild(T);U.style.color= -"gray";U.style.fontSize="11px";var V=document.createElement("div");U.appendChild(V);mxUtils.write(V,K);if(null!=F&&null==b[F]){T.style.visibility="hidden";mxUtils.setOpacity(V,10);var W=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});W.spin(U);var q=window.setTimeout(function(){null==b[F]&&(W.stop(),U.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[F]&&(window.clearTimeout(q), -mxUtils.setOpacity(V,100),T.style.visibility="",W.stop(),P())}))}else P();u.appendChild(U);++G==k&&(mxUtils.br(u),G=0)}function B(M){var K=N.value;if(null==M||null!=K&&0<K.length)E&&b.hideDialog(),f(K,M,N)}g="1"==urlParams.noDevice?!1:g;x=null!=x?x:!0;z=null!=z?z:!0;k=null!=k?k:4;E=null!=E?E:!0;m=document.createElement("div");m.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(m);var J=document.createElement("h2");mxUtils.write(J,l||mxResources.get("create"));J.style.marginTop="0px";J.style.marginBottom= -"24px";m.appendChild(J);mxUtils.write(m,mxResources.get("filename")+":");var N=document.createElement("input");N.setAttribute("value",e);N.style.width="200px";N.style.marginLeft="10px";N.style.marginBottom="20px";N.style.maxWidth="70%";this.init=function(){N.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?N.select():document.execCommand("selectAll",!1,null)};m.appendChild(N);null!=A&&(null!=b.editor.diagramFileTypes&&(l=FilenameDialog.createFileTypes(b,N,b.editor.diagramFileTypes), -l.style.marginLeft="6px",l.style.width="90px",m.appendChild(l)),m.appendChild(FilenameDialog.createTypeHint(b,N,A)));A=null;if("1"!=urlParams.noDevice&&null!=n&&null!=t&&"image/"==t.substring(0,6)&&("image/svg"!=t.substring(0,9)||mxClient.IS_SVG)){N.style.width="160px";l=document.createElement("img");var v=p?n:btoa(unescape(encodeURIComponent(n)));l.setAttribute("src","data:"+t+";base64,"+v);l.style.position="absolute";l.style.top="70px";l.style.right="100px";l.style.maxWidth="120px";l.style.maxHeight= -"80px";mxUtils.setPrefixedStyle(l.style,"transform","translate(50%,-50%)");m.appendChild(l);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=t||(A=mxUtils.button(mxResources.get("copy"),function(M){M=b.base64ToBlob(v,"image/png");M=new ClipboardItem({"image/png":M,"text/html":new Blob(['<img src="data:'+t+";base64,"+v+'">'],{type:"text/html"})});navigator.clipboard.write([M]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(K){b.handleError(K)}))}), -A.style.marginTop="6px",A.className="geBtn");C&&Editor.popupsAllowed&&(l.style.cursor="pointer",mxEvent.addGestureListeners(l,null,null,function(M){mxEvent.isPopupTrigger(M)||B("_blank")}))}mxUtils.br(m);var u=document.createElement("div");u.style.textAlign="center";var G=0;u.style.marginTop="6px";m.appendChild(u);var H=document.createElement("select");H.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(n=document.createElement("option"),n.setAttribute("value", -App.MODE_GOOGLE),mxUtils.write(n,mxResources.get("googleDrive")),H.appendChild(n),y(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(n,mxResources.get("oneDrive")),H.appendChild(n),b.mode==App.MODE_ONEDRIVE&&n.setAttribute("selected","selected"),y(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE, -"oneDrive")),"function"===typeof window.DropboxClient&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(n,mxResources.get("dropbox")),H.appendChild(n),b.mode==App.MODE_DROPBOX&&n.setAttribute("selected","selected"),y(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_GITHUB),mxUtils.write(n,mxResources.get("github")),H.appendChild(n),y(IMAGE_PATH+ -"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_GITLAB),mxUtils.write(n,mxResources.get("gitlab")),H.appendChild(n),y(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_TRELLO),mxUtils.write(n,mxResources.get("trello")),H.appendChild(n),y(IMAGE_PATH+"/trello-logo.svg", -mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)n=document.createElement("option"),n.setAttribute("value",App.MODE_DEVICE),mxUtils.write(n,mxResources.get("device")),H.appendChild(n),b.mode!=App.MODE_DEVICE&&z||n.setAttribute("selected","selected"),g&&y(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);z&&isLocalStorage&&"0"!=urlParams.browser&&(z=document.createElement("option"), -z.setAttribute("value",App.MODE_BROWSER),mxUtils.write(z,mxResources.get("browser")),H.appendChild(z),b.mode==App.MODE_BROWSER&&z.setAttribute("selected","selected"),y(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));z=document.createElement("div");z.style.marginTop="26px";z.style.textAlign="center";null!=d&&(g=mxUtils.button(mxResources.get("help"),function(){b.openLink(d)}),g.className="geBtn",z.appendChild(g));g=mxUtils.button(mxResources.get(null!=c?"close":"cancel"), -function(){null!=c?c():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});g.className="geBtn";b.editor.cancelFirst&&null==c&&z.appendChild(g);null==c&&(n=mxUtils.button(mxResources.get("decideLater"),function(){B(null)}),n.className="geBtn",z.appendChild(n));C&&Editor.popupsAllowed&&(C=mxUtils.button(mxResources.get("openInNewWindow"),function(){B("_blank")}),C.className="geBtn",z.appendChild(C));CreateDialog.showDownloadButton&&(C=mxUtils.button(mxResources.get("download"), -function(){B("download")}),C.className="geBtn",z.appendChild(C),null!=A&&(C.style.marginTop="6px",z.style.marginTop="6px"));null!=A&&(mxUtils.br(z),z.appendChild(A));b.editor.cancelFirst&&null==c||z.appendChild(g);mxEvent.addListener(N,"keypress",function(M){13==M.keyCode?B(App.MODE_DEVICE):27==M.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});m.appendChild(z);this.container=m};CreateDialog.showDownloadButton="1"!=urlParams.noDevice; -var PopupDialog=function(b,e,f,c,l){l=null!=l?l:!0;var m=document.createElement("div");m.style.textAlign="left";m.style.height="100%";mxUtils.write(m,mxResources.get("fileOpenLocation"));mxUtils.br(m);mxUtils.br(m);var x=mxUtils.button(mxResources.get("openInThisWindow"),function(){l&&b.hideDialog();null!=c&&c()});x.className="geBtn";x.style.marginBottom="8px";x.style.width="280px";m.appendChild(x);mxUtils.br(m);var z=mxUtils.button(mxResources.get("openInNewWindow"),function(){l&&b.hideDialog(); -null!=f&&f();b.openLink(e,null,!0)});z.className="geBtn gePrimaryBtn";z.style.width=x.style.width;m.appendChild(z);mxUtils.br(m);mxUtils.br(m);mxUtils.write(m,mxResources.get("allowPopups"));this.container=m},ImageDialog=function(b,e,f,c,l,m,x,z){function C(){0<k.value.length?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled")}m=null!=m?m:!0;var d=b.editor.graph,g=document.createElement("div");mxUtils.write(g,e);e=document.createElement("div");e.className="geTitle";e.style.backgroundColor= +var BackgroundImageDialog=function(b,e,f){var c=document.createElement("div");c.style.whiteSpace="nowrap";var l=document.createElement("h2");mxUtils.write(l,mxResources.get("backgroundImage"));l.style.marginTop="0px";c.appendChild(l);var m=null!=f&&null!=f.originalSrc;l=!1;var x=document.createElement("input");x.style.cssText="margin-right:8px;margin-bottom:8px;";x.setAttribute("value","url");x.setAttribute("type","radio");x.setAttribute("name","geBackgroundImageDialogOption");var y=document.createElement("input"); +y.style.cssText="margin-right:8px;margin-bottom:8px;";y.setAttribute("value","url");y.setAttribute("type","radio");y.setAttribute("name","geBackgroundImageDialogOption");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginBottom="8px";D.style.width="360px";D.value=m||null==f?"":f.src;var d=document.createElement("select");d.style.width="360px";if(null!=b.pages)for(var g=0;g<b.pages.length;g++){var k=document.createElement("option");mxUtils.write(k,b.pages[g].getName()|| +mxResources.get("pageWithNumber",[g+1]));k.setAttribute("value","data:page/id,"+b.pages[g].getId());b.pages[g]==b.currentPage&&k.setAttribute("disabled","disabled");null!=f&&f.originalSrc==k.getAttribute("value")&&(k.setAttribute("selected","selected"),l=!0);d.appendChild(k)}m||null!=b.pages&&1!=b.pages.length||(x.style.display="none",y.style.display="none",d.style.display="none");var n=document.createElement("option"),q=!1,p=!1,A=function(M,v){q||null!=M&&p||(y.checked?null!=v&&v(n.selected?null: +d.value):""==D.value||b.isOffline()?(z.value="",B.value="",null!=v&&v("")):(D.value=mxUtils.trim(D.value),b.loadImage(D.value,function(u){z.value=u.width;B.value=u.height;null!=v&&v(D.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));z.value="";B.value="";null!=v&&v(null)})))},E=mxUtils.bind(this,function(M){b.importFiles(M,0,0,b.maxBackgroundSize,function(v,u,G,I,F,L){D.value=v;A();D.focus()},function(){},function(v){return"image/"==v.type.substring(0, +6)},function(v){for(var u=0;u<v.length;u++)v[u]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){m?d.focus():D.focus();mxEvent.addListener(d,"focus",function(){x.removeAttribute("checked");y.setAttribute("checked","checked");y.checked=!0});mxEvent.addListener(D,"focus",function(){y.removeAttribute("checked");x.setAttribute("checked","checked");x.checked=!0});if(Graph.fileSupport){D.setAttribute("placeholder",mxResources.get("dragImagesHere"));var M=c.parentNode,v=null;mxEvent.addListener(M, +"dragleave",function(u){null!=v&&(v.parentNode.removeChild(v),v=null);u.stopPropagation();u.preventDefault()});mxEvent.addListener(M,"dragover",mxUtils.bind(this,function(u){null==v&&(!mxClient.IS_IE||10<document.documentMode)&&(v=b.highlightElement(M));u.stopPropagation();u.preventDefault()}));mxEvent.addListener(M,"drop",mxUtils.bind(this,function(u){null!=v&&(v.parentNode.removeChild(v),v=null);if(0<u.dataTransfer.files.length)E(u.dataTransfer.files);else if(0<=mxUtils.indexOf(u.dataTransfer.types, +"text/uri-list")){var G=u.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(G)&&(D.value=decodeURIComponent(G),A())}u.stopPropagation();u.preventDefault()}),!1)}};c.appendChild(x);c.appendChild(D);mxUtils.br(c);g=document.createElement("span");g.style.marginLeft="30px";mxUtils.write(g,mxResources.get("width")+":");c.appendChild(g);var z=document.createElement("input");z.setAttribute("type","text");z.style.width="60px";z.style.marginLeft="8px";z.style.marginRight="16px"; +z.value=null==f||m?"":f.width;c.appendChild(z);mxUtils.write(c,mxResources.get("height")+":");var B=document.createElement("input");B.setAttribute("type","text");B.style.width="60px";B.style.marginLeft="8px";B.style.marginRight="16px";B.value=null==f||m?"":f.height;c.appendChild(B);mxUtils.br(c);mxUtils.br(c);mxEvent.addListener(D,"change",A);ImageDialog.filePicked=function(M){M.action==google.picker.Action.PICKED&&null!=M.docs[0].thumbnails&&(M=M.docs[0].thumbnails[M.docs[0].thumbnails.length-1], +null!=M&&(D.value=M.url,A()));D.focus()};c.appendChild(y);c.appendChild(d);mxUtils.br(c);m?(y.setAttribute("checked","checked"),y.checked=!0):(x.setAttribute("checked","checked"),x.checked=!0);!l&&y.checked&&(mxUtils.write(n,mxResources.get("pageNotFound")),n.setAttribute("disabled","disabled"),n.setAttribute("selected","selected"),n.setAttribute("value","pageNotFound"),d.appendChild(n),mxEvent.addListener(d,"change",function(){null==n.parentNode||n.selected||n.parentNode.removeChild(n)}));f=document.createElement("div"); +f.style.marginTop="30px";f.style.textAlign="right";l=mxUtils.button(mxResources.get("cancel"),function(){q=!0;b.hideDialog()});l.className="geBtn";b.editor.cancelFirst&&f.appendChild(l);g=mxUtils.button(mxResources.get("reset"),function(){D.value="";z.value="";B.value="";x.checked=!0;q=!1});mxEvent.addGestureListeners(g,function(){q=!0});g.className="geBtn";g.width="100";f.appendChild(g);if(Graph.fileSupport){var J=document.createElement("input");J.setAttribute("multiple","multiple");J.setAttribute("type", +"file");mxEvent.addListener(J,"change",function(M){null!=J.files&&(E(J.files),J.type="",J.type="file",J.value="")});J.style.display="none";c.appendChild(J);g=mxUtils.button(mxResources.get("open"),function(){J.click()});g.className="geBtn";f.appendChild(g)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();A(null,function(M){e(""!=M&&null!=M?new mxImage(M,z.value,B.value):null,null==M)})});mxEvent.addGestureListeners(applyBtn,function(){p=!0});applyBtn.className="geBtn gePrimaryBtn"; +f.appendChild(applyBtn);b.editor.cancelFirst||f.appendChild(l);c.appendChild(f);this.container=c},ParseDialog=function(b,e,f){function c(q,p,A){var E=q.split("\n");if("plantUmlPng"==p||"plantUmlSvg"==p||"plantUmlTxt"==p){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var z=function(U,T,V,W,t){m=mxEvent.isAltDown(A)?m:B.getCenterInsertPoint(new mxRectangle(0,0,W,t));var C=null;B.getModel().beginUpdate();try{C="txt"==T?b.insertAsPreText(V,m.x,m.y):B.insertVertex(null,null,null,m.x,m.y, +W,t,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(V)+";"),B.setAttributeForCell(C,"plantUmlData",JSON.stringify({data:U,format:T},null,2))}finally{B.getModel().endUpdate()}null!=C&&(B.setSelectionCell(C),B.scrollCellToVisible(C))},B=b.editor.graph,J="plantUmlTxt"==p?"txt":"plantUmlPng"==p?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"== +q&&"svg"==J?window.setTimeout(function(){b.spinner.stop();z(q,J,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=", +295,212)},200):b.generatePlantUmlImage(q,J,function(U,T,V){b.spinner.stop();z(q,J,U,T,V)},function(U){b.handleError(U)})}}else if("mermaid"==p)b.spinner.spin(document.body,mxResources.get("inserting"))&&(B=b.editor.graph,b.generateMermaidImage(q,J,function(U,T,V){m=mxEvent.isAltDown(A)?m:B.getCenterInsertPoint(new mxRectangle(0,0,T,V));b.spinner.stop();var W=null;B.getModel().beginUpdate();try{W=B.insertVertex(null,null,null,m.x,m.y,T,V,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+ +U+";"),B.setAttributeForCell(W,"mermaidData",JSON.stringify({data:q,config:EditorUi.defaultMermaidConfig},null,2))}finally{B.getModel().endUpdate()}null!=W&&(B.setSelectionCell(W),B.scrollCellToVisible(W))},function(U){b.handleError(U)}));else if("table"==p){p=null;for(var M=[],v=0,u={},G=0;G<E.length;G++){var I=mxUtils.trim(E[G]);if("primary key"==I.substring(0,11).toLowerCase()){var F=I.match(/\((.+)\)/);F&&F[1]&&(u[F[1]]=!0);E.splice(G,1)}else 0<I.toLowerCase().indexOf("primary key")&&(u[I.split(" ")[0]]= +!0,E[G]=mxUtils.trim(I.replace(/primary key/i,"")))}for(G=0;G<E.length;G++)if(I=mxUtils.trim(E[G]),"create table"==I.substring(0,12).toLowerCase())I=mxUtils.trim(I.substring(12)),"("==I.charAt(I.length-1)&&(I=mxUtils.trim(I.substring(0,I.length-1))),p=new mxCell(I,new mxGeometry(v,0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),p.vertex=!0,M.push(p),I=b.editor.graph.getPreferredSizeForCell(L),null!= +I&&(p.geometry.width=I.width+10);else if(null!=p&&")"==I.charAt(0))v+=p.geometry.width+40,p=null;else if("("!=I&&null!=p){I=I.substring(0,","==I.charAt(I.length-1)?I.length-1:I.length);F=u[I.split(" ")[0]];var L=new mxCell("",new mxGeometry(0,0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(F?"1":"0")+";");L.vertex=!0;var K=new mxCell(F?"PK":"", +new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(F?"fontStyle=1;":""));K.vertex=!0;L.insert(K);I=new mxCell(I,new mxGeometry(30,0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(F?"fontStyle=5;":""));I.vertex=!0;L.insert(I);I=b.editor.graph.getPreferredSizeForCell(I);null!=I&&p.geometry.width<I.width+30&&(p.geometry.width=Math.min(320, +Math.max(p.geometry.width,I.width+30)));p.insert(L,F?0:null);p.geometry.height+=30}0<M.length&&(B=b.editor.graph,m=mxEvent.isAltDown(A)?m:B.getCenterInsertPoint(B.getBoundingBoxFromGeometry(M,!0)),B.setSelectionCells(B.importCells(M,m.x,m.y)),B.scrollCellToVisible(B.getSelectionCell()))}else if("list"==p){if(0<E.length){B=b.editor.graph;L=null;M=[];for(G=p=0;G<E.length;G++)";"!=E[G].charAt(0)&&(0==E[G].length?L=null:null==L?(L=new mxCell(E[G],new mxGeometry(p,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"), +L.vertex=!0,M.push(L),I=B.getPreferredSizeForCell(L),null!=I&&L.geometry.width<I.width+10&&(L.geometry.width=I.width+10),p+=L.geometry.width+40):"--"==E[G]?(I=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;"),I.vertex=!0,L.geometry.height+=I.geometry.height,L.insert(I)):0<E[G].length&&(v=new mxCell(E[G],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;"), +v.vertex=!0,I=B.getPreferredSizeForCell(v),null!=I&&v.geometry.width<I.width&&(v.geometry.width=I.width),L.geometry.width=Math.max(L.geometry.width,v.geometry.width),L.geometry.height+=v.geometry.height,L.insert(v)));if(0<M.length){m=mxEvent.isAltDown(A)?m:B.getCenterInsertPoint(B.getBoundingBoxFromGeometry(M,!0));B.getModel().beginUpdate();try{M=B.importCells(M,m.x,m.y);I=[];for(G=0;G<M.length;G++)I.push(M[G]),I=I.concat(M[G].children);B.fireEvent(new mxEventObject("cellsInserted","cells",I))}finally{B.getModel().endUpdate()}B.setSelectionCells(M); +B.scrollCellToVisible(B.getSelectionCell())}}}else{L=function(U){var T=H[U];null==T&&(T=new mxCell(U,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),T.vertex=!0,H[U]=T,M.push(T));return T};var H={};M=[];for(G=0;G<E.length;G++)if(";"!=E[G].charAt(0)){var Q=E[G].split("->");2<=Q.length&&(F=L(Q[0]),K=L(Q[Q.length-1]),Q=new mxCell(2<Q.length?Q[1]:"",new mxGeometry),Q.edge=!0,F.insertEdge(Q,!0),K.insertEdge(Q,!1),M.push(Q))}if(0<M.length){E=document.createElement("div");E.style.visibility="hidden"; +document.body.appendChild(E);B=new Graph(E);B.getModel().beginUpdate();try{M=B.importCells(M);for(G=0;G<M.length;G++)B.getModel().isVertex(M[G])&&(I=B.getPreferredSizeForCell(M[G]),M[G].geometry.width=Math.max(M[G].geometry.width,I.width),M[G].geometry.height=Math.max(M[G].geometry.height,I.height));G=!0;"horizontalFlow"==p||"verticalFlow"==p?((new mxHierarchicalLayout(B,"horizontalFlow"==p?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(B.getDefaultParent(),M),G=!1):"circle"==p? +(new mxCircleLayout(B)).execute(B.getDefaultParent()):(v=new mxFastOrganicLayout(B),v.disableEdgeStyle=!1,v.forceConstant=180,v.execute(B.getDefaultParent()));G&&(u=new mxParallelEdgeLayout(B),u.spacing=30,u.execute(B.getDefaultParent()))}finally{B.getModel().endUpdate()}B.clearCellOverlays();I=[];b.editor.graph.getModel().beginUpdate();try{M=B.getModel().getChildren(B.getDefaultParent()),m=mxEvent.isAltDown(A)?m:b.editor.graph.getCenterInsertPoint(B.getBoundingBoxFromGeometry(M,!0)),I=b.editor.graph.importCells(M, +m.x,m.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",I))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(I);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());B.destroy();E.parentNode.removeChild(E)}}}function l(){return"list"==y.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==y.value? +"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==y.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==y.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml": +"plantUmlSvg"==y.value||"plantUmlTxt"==y.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var m=b.editor.graph.getFreeInsertPoint();e=document.createElement("div");e.style.textAlign="right";var x=document.createElement("textarea");x.style.boxSizing="border-box";x.style.resize= +"none";x.style.width="100%";x.style.height="354px";x.style.marginBottom="16px";var y=document.createElement("select");if("formatSql"==f||"mermaid"==f)y.style.display="none";var D=document.createElement("option");D.setAttribute("value","list");mxUtils.write(D,mxResources.get("list"));"plantUml"!=f&&y.appendChild(D);null!=f&&"fromText"!=f||D.setAttribute("selected","selected");D=document.createElement("option");D.setAttribute("value","table");mxUtils.write(D,mxResources.get("formatSql"));"formatSql"== +f&&(y.appendChild(D),D.setAttribute("selected","selected"));D=document.createElement("option");D.setAttribute("value","mermaid");mxUtils.write(D,mxResources.get("formatSql"));"mermaid"==f&&(y.appendChild(D),D.setAttribute("selected","selected"));D=document.createElement("option");D.setAttribute("value","diagram");mxUtils.write(D,mxResources.get("diagram"));var d=document.createElement("option");d.setAttribute("value","circle");mxUtils.write(d,mxResources.get("circle"));var g=document.createElement("option"); +g.setAttribute("value","horizontalFlow");mxUtils.write(g,mxResources.get("horizontalFlow"));var k=document.createElement("option");k.setAttribute("value","verticalFlow");mxUtils.write(k,mxResources.get("verticalFlow"));"plantUml"!=f&&(y.appendChild(D),y.appendChild(d),y.appendChild(g),y.appendChild(k));D=document.createElement("option");D.setAttribute("value","plantUmlSvg");mxUtils.write(D,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==f&&D.setAttribute("selected", +"selected");d=document.createElement("option");d.setAttribute("value","plantUmlPng");mxUtils.write(d,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");g=document.createElement("option");g.setAttribute("value","plantUmlTxt");mxUtils.write(g,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==f&&(y.appendChild(D),y.appendChild(d),y.appendChild(g));var n=l();x.value=n;e.appendChild(x);this.init=function(){x.focus()}; +Graph.fileSupport&&(x.addEventListener("dragover",function(q){q.stopPropagation();q.preventDefault()},!1),x.addEventListener("drop",function(q){q.stopPropagation();q.preventDefault();if(0<q.dataTransfer.files.length){q=q.dataTransfer.files[0];var p=new FileReader;p.onload=function(A){x.value=A.target.result};p.readAsText(q)}},!1));e.appendChild(y);mxEvent.addListener(y,"change",function(){var q=l();if(0==x.value.length||x.value==n)n=q,x.value=n});b.isOffline()||"mermaid"!=f&&"plantUml"!=f||(D=mxUtils.button(mxResources.get("help"), +function(){b.openLink("mermaid"==f?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),D.className="geBtn",e.appendChild(D));D=mxUtils.button(mxResources.get("close"),function(){x.value==n?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});D.className="geBtn";b.editor.cancelFirst&&e.appendChild(D);d=mxUtils.button(mxResources.get("insert"),function(q){b.hideDialog();c(x.value,y.value,q)});e.appendChild(d);d.className="geBtn gePrimaryBtn";b.editor.cancelFirst|| +e.appendChild(D);this.container=e},NewDialog=function(b,e,f,c,l,m,x,y,D,d,g,k,n,q,p,A,E,z){function B(ka){null!=ka&&(Fa=Ga=ka?135:140);ka=!0;if(null!=la)for(;H<la.length&&(ka||0!=mxUtils.mod(H,30));){var ta=la[H++];ta=v(ta.url,ta.libs,ta.title,ta.tooltip?ta.tooltip:ta.title,ta.select,ta.imgUrl,ta.info,ta.onClick,ta.preview,ta.noImg,ta.clibs);ka&&ta.click();ka=!1}}function J(){if(aa&&null!=q)f||b.hideDialog(),q(aa,Z,K.value);else if(c)f||b.hideDialog(),c(S,K.value,Y,O);else{var ka=K.value;null!=ka&& +0<ka.length&&b.pickFolder(b.mode,function(ta){b.createFile(ka,S,null!=O&&0<O.length?O:null,null,function(){b.hideDialog()},null,ta,null,null!=P&&0<P.length?P:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function M(ka,ta,ra,wa,ca,fa,da){null!=X&&(X.style.backgroundColor="transparent",X.style.border="1px solid transparent");U.removeAttribute("disabled");S=ta;O=ra;P=fa;X=ka;aa=wa;Y=da;Z=ca;X.style.backgroundColor=y;X.style.border=D}function v(ka,ta,ra,wa,ca,fa,da,ha, +ja,sa,oa){function Ca(La,Ta){null==Ja?(Na=La,Na=/^https?:\/\//.test(Na)&&!b.editor.isCorsEnabledForUrl(Na)?PROXY_URL+"?url="+encodeURIComponent(Na):TEMPLATE_PATH+"/"+Na,mxUtils.get(Na,mxUtils.bind(this,function(Va){200<=Va.getStatus()&&299>=Va.getStatus()&&(Ja=Va.getText());Ta(Ja,Na)}))):Ta(Ja,Na)}function Aa(La,Ta,Va){if(null!=La&&mxUtils.isAncestorNode(document.body,qa)){La=mxUtils.parseXml(La);La=Editor.parseDiagramNode(La.documentElement);var Wa=new mxCodec(La.ownerDocument),$a=new mxGraphModel; +Wa.decode(La,$a);La=$a.root.getChildAt(0).children;b.sidebar.createTooltip(qa,La,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=ra?mxResources.get(ra,null,ra):null,!0,new mxPoint(Ta,Va),!0,function(){Ua=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;M(qa,null,null,ka,da,oa)},!0,!1)}}function ua(La,Ta){null==ka||Ra|| +b.sidebar.currentElt==qa?b.sidebar.hideTooltip():(b.sidebar.hideTooltip(),null!=Ka?(Ta='<mxfile><diagram id="d" name="n">'+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+Ka.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+Ka.naturalWidth+'" height="'+Ka.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>",Aa(Ta,mxEvent.getClientX(La),mxEvent.getClientY(La))):(b.sidebar.currentElt= +qa,Ra=!0,Ca(ka,function(Va){Ra&&b.sidebar.currentElt==qa&&Aa(Va,mxEvent.getClientX(La),mxEvent.getClientY(La));Ra=!1})))}var qa=document.createElement("div");qa.className="geTemplate geAdaptiveAsset";qa.style.position="relative";qa.style.height=Fa+"px";qa.style.width=Ga+"px";var Ja=null,Na=ka;null!=ra?qa.setAttribute("title",mxResources.get(ra,null,ra)):null!=wa&&0<wa.length&&qa.setAttribute("title",wa);var Ra=!1,Ka=null;if(null!=fa){qa.style.display="inline-flex";qa.style.justifyContent="center"; +qa.style.alignItems="center";ca=document.createElement("img");ca.setAttribute("src",fa);ca.setAttribute("alt",wa);ca.style.maxWidth=Fa+"px";ca.style.maxHeight=Ga+"px";Ka=ca;var Pa=fa.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");qa.appendChild(ca);ca.onerror=function(){this.src!=Pa?this.src=Pa:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(qa,mxUtils.bind(this,function(La){M(qa,null,null,ka,da,oa)}),null,null);mxEvent.addListener(qa,"dblclick",function(La){J(); +mxEvent.consume(La)})}else if(!sa&&null!=ka&&0<ka.length){var Qa=function(La){U.setAttribute("disabled","disabled");qa.style.backgroundColor="transparent";qa.style.border="1px solid transparent";Q.spin(ba);Ca(ka,function(Ta,Va){Q.stop();null!=Ta&&(M(qa,Ta,ta,null,null,oa,Va),La&&J())})};ca=ja||TEMPLATE_PATH+"/"+ka.substring(0,ka.length-4)+".png";qa.style.backgroundImage="url("+ca+")";qa.style.backgroundPosition="center center";qa.style.backgroundRepeat="no-repeat";if(null!=ra){wa=document.createElement("table"); +wa.setAttribute("width","100%");wa.setAttribute("height","100%");wa.style.background=Editor.isDarkMode()?"transparent":"rgba(255,255,255,0.85)";wa.style.lineHeight="1.3em";wa.style.border="inherit";fa=document.createElement("tbody");ja=document.createElement("tr");sa=document.createElement("td");sa.setAttribute("align","center");sa.setAttribute("valign","middle");var Oa=document.createElement("span");Oa.style.display="inline-block";Oa.style.padding="4px 8px 4px 8px";Oa.style.userSelect="none";Oa.style.borderRadius= +"3px";Oa.style.background="rgba(255,255,255,0.85)";Oa.style.overflow="hidden";Oa.style.textOverflow="ellipsis";Oa.style.maxWidth=Fa-34+"px";mxUtils.write(Oa,mxResources.get(ra,null,ra));sa.appendChild(Oa);ja.appendChild(sa);fa.appendChild(ja);wa.appendChild(fa);qa.appendChild(wa)}mxEvent.addGestureListeners(qa,mxUtils.bind(this,function(La){Qa()}),null,null);mxEvent.addListener(qa,"dblclick",function(La){Qa(!0);mxEvent.consume(La)})}else wa=document.createElement("table"),wa.setAttribute("width", +"100%"),wa.setAttribute("height","100%"),wa.style.lineHeight="1.3em",fa=document.createElement("tbody"),ja=document.createElement("tr"),sa=document.createElement("td"),sa.setAttribute("align","center"),sa.setAttribute("valign","middle"),Oa=document.createElement("span"),Oa.style.display="inline-block",Oa.style.padding="4px 8px 4px 8px",Oa.style.userSelect="none",Oa.style.borderRadius="3px",Oa.style.background="#ffffff",Oa.style.overflow="hidden",Oa.style.textOverflow="ellipsis",Oa.style.maxWidth= +Fa-34+"px",mxUtils.write(Oa,mxResources.get(ra,null,ra)),sa.appendChild(Oa),ja.appendChild(sa),fa.appendChild(ja),wa.appendChild(fa),qa.appendChild(wa),ca&&M(qa),mxEvent.addGestureListeners(qa,mxUtils.bind(this,function(La){M(qa,null,null,ka,da)}),null,null),null!=ha?mxEvent.addListener(qa,"click",ha):(mxEvent.addListener(qa,"click",function(La){M(qa,null,null,ka,da)}),mxEvent.addListener(qa,"dblclick",function(La){J();mxEvent.consume(La)}));if(null!=ka){var Sa=document.createElement("img");Sa.setAttribute("src", +Sidebar.prototype.searchImage);Sa.setAttribute("title",mxResources.get("preview"));Sa.className="geActiveButton";Sa.style.position="absolute";Sa.style.cursor="default";Sa.style.padding="8px";Sa.style.right="0px";Sa.style.top="0px";qa.appendChild(Sa);var Ua=!1;mxEvent.addGestureListeners(Sa,mxUtils.bind(this,function(La){Ua=b.sidebar.currentElt==qa}),null,null);mxEvent.addListener(Sa,"click",mxUtils.bind(this,function(La){Ua||ua(La,Sa);mxEvent.consume(La)}))}ba.appendChild(qa);return qa}function u(){function ka(ua, +qa){var Ja=mxResources.get(ua);null==Ja&&(Ja=ua.substring(0,1).toUpperCase()+ua.substring(1));18<Ja.length&&(Ja=Ja.substring(0,18)+"…");return Ja+" ("+qa.length+")"}function ta(ua,qa,Ja){mxEvent.addListener(qa,"click",function(){za!=qa&&(za.style.backgroundColor="",za=qa,za.style.backgroundColor=x,ba.scrollTop=0,ba.innerText="",H=0,la=Ja?Ma[ua][Ja]:xa[ua],V=null,B(!1))})}Ba&&(Ba=!1,mxEvent.addListener(ba,"scroll",function(ua){ba.scrollTop+ba.clientHeight>=ba.scrollHeight&&(B(),mxEvent.consume(ua))})); +if(0<Ea){var ra=document.createElement("div");ra.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ra,mxResources.get("custom"));na.appendChild(ra);for(var wa in va){var ca=document.createElement("div"),fa=wa;ra=va[wa];18<fa.length&&(fa=fa.substring(0,18)+"…");ca.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";ca.setAttribute("title", +fa+" ("+ra.length+")");mxUtils.write(ca,ca.getAttribute("title"));null!=d&&(ca.style.padding=d);na.appendChild(ca);(function(ua,qa){mxEvent.addListener(ca,"click",function(){za!=qa&&(za.style.backgroundColor="",za=qa,za.style.backgroundColor=x,ba.scrollTop=0,ba.innerText="",H=0,la=va[ua],V=null,B(!1))})})(wa,ca)}ra=document.createElement("div");ra.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ra,"draw.io");na.appendChild(ra)}for(wa in xa){fa= +Ma[wa];var da=ca=document.createElement(fa?"ul":"div");ra=xa[wa];var ha=ka(wa,ra);if(null!=fa){var ja=document.createElement("li"),sa=document.createElement("div");sa.className="geTempTreeCaret";sa.setAttribute("title",ha);mxUtils.write(sa,ha);da=sa;ja.appendChild(sa);ha=document.createElement("ul");ha.className="geTempTreeNested";ha.style.visibility="hidden";for(var oa in fa){var Ca=document.createElement("li"),Aa=ka(oa,fa[oa]);Ca.setAttribute("title",Aa);mxUtils.write(Ca,Aa);ta(wa,Ca,oa);ha.appendChild(Ca)}ja.appendChild(ha); +ca.className="geTempTree";ca.appendChild(ja);(function(ua,qa){mxEvent.addListener(qa,"click",function(){ua.style.visibility="visible";ua.classList.toggle("geTempTreeActive");ua.classList.toggle("geTempTreeNested")&&setTimeout(function(){ua.style.visibility="hidden"},550);qa.classList.toggle("geTempTreeCaret-down")})})(ha,sa)}else ca.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;", +ca.setAttribute("title",ha),mxUtils.write(ca,ha);null!=d&&(ca.style.padding=d);na.appendChild(ca);null==za&&0<ra.length&&(za=ca,za.style.backgroundColor=x,la=ra);ta(wa,da)}B(!1)}var G=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);f=null!=f?f:!0;l=null!=l?l:!1;x=null!=x?x:"#ebf2f9";y=null!=y?y:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";D=null!=D?D:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";g=null!=g?g:EditorUi.templateFile;var I=document.createElement("div"); +I.style.userSelect="none";I.style.height="100%";var F=document.createElement("div");F.style.whiteSpace="nowrap";F.style.height="46px";f&&I.appendChild(F);var L=document.createElement("img");L.setAttribute("border","0");L.setAttribute("align","absmiddle");L.style.width="40px";L.style.height="40px";L.style.marginRight="10px";L.style.paddingBottom="4px";L.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE? +IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";e||G||!f||F.appendChild(L);f&&mxUtils.write(F,(G?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");L=".drawio"; +b.mode==App.MODE_GOOGLE&&null!=b.drive?L=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?L=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?L=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?L=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?L=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(L=b.trello.extension);var K=document.createElement("input");K.setAttribute("value",b.defaultFilename+L);K.style.marginLeft="10px";K.style.width=e|| +G?"144px":"244px";this.init=function(){f&&(K.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?K.select():document.execCommand("selectAll",!1,null));null!=ba.parentNode&&null!=ba.parentNode.parentNode&&mxEvent.addGestureListeners(ba.parentNode.parentNode,mxUtils.bind(this,function(ka){b.sidebar.hideTooltip()}),null,null)};f&&(F.appendChild(K),z?K.style.width=e||G?"350px":"450px":(null!=b.editor.diagramFileTypes&&(z=FilenameDialog.createFileTypes(b,K,b.editor.diagramFileTypes),z.style.marginLeft= +"6px",z.style.width=e||G?"80px":"180px",F.appendChild(z)),null!=b.editor.fileExtensions&&(G=FilenameDialog.createTypeHint(b,K,b.editor.fileExtensions),G.style.marginTop="12px",F.appendChild(G))));F=!1;var H=0,Q=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),U=mxUtils.button(A||mxResources.get("create"),function(){U.setAttribute("disabled","disabled");J();U.removeAttribute("disabled")});U.className="geBtn gePrimaryBtn"; +if(k||n){var T=[],V=null,W=null,t=null,C=function(ka){U.setAttribute("disabled","disabled");for(var ta=0;ta<T.length;ta++)T[ta].className=ta==ka?"geBtn gePrimaryBtn":"geBtn"};F=!0;A=document.createElement("div");A.style.whiteSpace="nowrap";A.style.height="30px";I.appendChild(A);G=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){na.style.display="";ea.style.display="";ba.style.left="160px";C(0);ba.scrollTop=0;ba.innerText="";H=0;V!=la&&(la=V,xa=W,Ea=t,na.innerText="",u(),V=null)}); +T.push(G);A.appendChild(G);var N=function(ka){na.style.display="none";ea.style.display="none";ba.style.left="30px";C(ka?-1:1);null==V&&(V=la);ba.scrollTop=0;ba.innerText="";Q.spin(ba);var ta=function(ra,wa,ca){H=0;Q.stop();la=ra;ca=ca||{};var fa=0,da;for(da in ca)fa+=ca[da].length;if(wa)ba.innerText=wa;else if(0==ra.length&&0==fa)ba.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(ba.innerText="",0<fa){na.style.display="";ba.style.left="160px";na.innerText="";Ea=0;xa={"draw.io":ra}; +for(da in ca)xa[da]=ca[da];u()}else B(!0)};ka?n(R.value,ta):k(ta)};k&&(G=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){N()}),A.appendChild(G),T.push(G));if(n){G=document.createElement("span");G.style.marginLeft="10px";G.innerText=mxResources.get("search")+":";A.appendChild(G);var R=document.createElement("input");R.style.marginRight="10px";R.style.marginLeft="10px";R.style.width="220px";mxEvent.addListener(R,"keypress",function(ka){13==ka.keyCode&&N(!0)});A.appendChild(R);G=mxUtils.button(mxResources.get("search"), +function(){N(!0)});G.className="geBtn";A.appendChild(G)}C(0)}var O=null,P=null,S=null,X=null,aa=null,Y=null,Z=null,ba=document.createElement("div");ba.style.border="1px solid #d3d3d3";ba.style.position="absolute";ba.style.left="160px";ba.style.right="34px";A=(f?72:40)+(F?30:0);ba.style.top=A+"px";ba.style.bottom="68px";ba.style.margin="6px 0 0 -1px";ba.style.padding="6px";ba.style.overflow="auto";var ea=document.createElement("div");ea.style.cssText="position:absolute;left:30px;width:128px;top:"+ +A+"px;height:22px;margin-top: 6px;white-space: nowrap";var ma=document.createElement("input");ma.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";ma.setAttribute("placeholder",mxResources.get("search"));ma.setAttribute("type","text");ea.appendChild(ma);var ia=document.createElement("img"),pa="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";ia.setAttribute("src",pa);ia.setAttribute("title",mxResources.get("search")); +ia.style.position="relative";ia.style.left="-18px";ia.style.top="1px";ia.style.background="url('"+b.editor.transparentImage+"')";ea.appendChild(ia);mxEvent.addListener(ia,"click",function(){ia.getAttribute("src")==Dialog.prototype.closeImage&&(ia.setAttribute("src",pa),ia.setAttribute("title",mxResources.get("search")),ma.value="",null!=Da&&(Da.click(),Da=null));ma.focus()});mxEvent.addListener(ma,"keydown",mxUtils.bind(this,function(ka){if(13==ka.keyCode){var ta=ma.value;if(""==ta)null!=Da&&(Da.click(), +Da=null);else{if(null==NewDialog.tagsList[g]){var ra={};for(oa in xa)for(var wa=xa[oa],ca=0;ca<wa.length;ca++){var fa=wa[ca];if(null!=fa.tags)for(var da=fa.tags.toLowerCase().split(";"),ha=0;ha<da.length;ha++)null==ra[da[ha]]&&(ra[da[ha]]=[]),ra[da[ha]].push(fa)}NewDialog.tagsList[g]=ra}var ja=ta.toLowerCase().split(" ");ra=NewDialog.tagsList[g];if(0<Ea&&null==ra.__tagsList__){for(oa in va)for(wa=va[oa],ca=0;ca<wa.length;ca++)for(fa=wa[ca],da=fa.title.split(" "),da.push(oa),ha=0;ha<da.length;ha++){var sa= +da[ha].toLowerCase();null==ra[sa]&&(ra[sa]=[]);ra[sa].push(fa)}ra.__tagsList__=!0}var oa=[];wa={};for(ca=da=0;ca<ja.length;ca++)if(0<ja[ca].length){sa=ra[ja[ca]];var Ca={};oa=[];if(null!=sa)for(ha=0;ha<sa.length;ha++)fa=sa[ha],0==da==(null==wa[fa.url])&&(Ca[fa.url]=!0,oa.push(fa));wa=Ca;da++}ba.scrollTop=0;ba.innerText="";H=0;ra=document.createElement("div");ra.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";mxUtils.write(ra,mxResources.get(0==oa.length?"noResultsFor": +"resultsFor",[ta]));ba.appendChild(ra);null!=za&&null==Da&&(za.style.backgroundColor="",Da=za,za=ra);la=oa;V=null;B(!1)}mxEvent.consume(ka)}}));mxEvent.addListener(ma,"keyup",mxUtils.bind(this,function(ka){""==ma.value?(ia.setAttribute("src",pa),ia.setAttribute("title",mxResources.get("search"))):(ia.setAttribute("src",Dialog.prototype.closeImage),ia.setAttribute("title",mxResources.get("reset")))}));A+=23;var na=document.createElement("div");na.style.cssText="position:absolute;left:30px;width:128px;top:"+ +A+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(ba,"scroll",function(){b.sidebar.hideTooltip()});var Fa=140,Ga=140,xa={},Ma={},va={},Ea=0,Ba=!0,za=null,Da=null;xa.basic=[{title:"blankDiagram",select:!0}];var la=xa.basic;if(!e){var Ha=function(){mxUtils.get(Ia,function(ka){if(!ya){ya=!0;ka=ka.getXml().documentElement.firstChild;for(var ta={};null!=ka;){if("undefined"!==typeof ka.getAttribute)if("clibs"==ka.nodeName){for(var ra=ka.getAttribute("name"),wa= +ka.getElementsByTagName("add"),ca=[],fa=0;fa<wa.length;fa++)ca.push(encodeURIComponent(mxUtils.getTextContent(wa[fa])));null!=ra&&0<ca.length&&(ta[ra]=ca.join(";"))}else if(ca=ka.getAttribute("url"),null!=ca){wa=ka.getAttribute("section");ra=ka.getAttribute("subsection");if(null==wa&&(fa=ca.indexOf("/"),wa=ca.substring(0,fa),null==ra)){var da=ca.indexOf("/",fa+1);-1<da&&(ra=ca.substring(fa+1,da))}fa=xa[wa];null==fa&&(fa=[],xa[wa]=fa);ca=ka.getAttribute("clibs");null!=ta[ca]&&(ca=ta[ca]);ca={url:ka.getAttribute("url"), +libs:ka.getAttribute("libs"),title:ka.getAttribute("title"),tooltip:ka.getAttribute("name")||ka.getAttribute("url"),preview:ka.getAttribute("preview"),clibs:ca,tags:ka.getAttribute("tags")};fa.push(ca);null!=ra&&(fa=Ma[wa],null==fa&&(fa={},Ma[wa]=fa),wa=fa[ra],null==wa&&(wa=[],fa[ra]=wa),wa.push(ca))}ka=ka.nextSibling}Q.stop();u()}})};I.appendChild(ea);I.appendChild(na);I.appendChild(ba);var ya=!1,Ia=g;/^https?:\/\//.test(Ia)&&!b.editor.isCorsEnabledForUrl(Ia)&&(Ia=PROXY_URL+"?url="+encodeURIComponent(Ia)); +Q.spin(ba);null!=E?E(function(ka,ta){va=ka;t=Ea=ta;Ha()},Ha):Ha();W=xa}mxEvent.addListener(K,"keypress",function(ka){b.dialog.container.firstChild==I&&13==ka.keyCode&&J()});E=document.createElement("div");E.style.marginTop=e?"4px":"16px";E.style.textAlign="right";E.style.position="absolute";E.style.left="40px";E.style.bottom="24px";E.style.right="40px";e||b.isOffline()||!f||null!=c||l||(A=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}), +A.className="geBtn",E.appendChild(A));A=mxUtils.button(mxResources.get("cancel"),function(){null!=m&&m();b.hideDialog(!0)});A.className="geBtn";!b.editor.cancelFirst||l&&null==m||E.appendChild(A);e||"1"==urlParams.embed||l||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var ka=new FilenameDialog(b,"",mxResources.get("create"),function(ta){null!=ta&&0<ta.length&&b.editor.loadUrl(b.editor.getProxiedUrl(ta),function(ra){S= +ra;O=null;templateRealURl=ta;b.hideDialog();J()},function(ra){b.handleError(ra)})},mxResources.get("url"),null,null,null,!1);b.showDialog(ka.container,300,80,!0,!0);ka.init()}),e.className="geBtn",E.appendChild(e));Graph.fileSupport&&p&&(p=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var ka=document.createElement("input");ka.setAttribute("multiple","multiple");ka.setAttribute("type","file");mxEvent.addListener(ka,"change",function(ta){b.openFiles(ka.files,!0); +ka.value=""});ka.style.display="none";document.body.appendChild(ka);b.newDlgFileInputElt=ka}b.newDlgFileInputElt.click()}),p.className="geBtn",E.appendChild(p));E.appendChild(U);b.editor.cancelFirst||null!=c||l&&null==m||E.appendChild(A);I.appendChild(E);this.container=I};NewDialog.tagsList={}; +var CreateDialog=function(b,e,f,c,l,m,x,y,D,d,g,k,n,q,p,A,E){function z(F,L,K,H){function Q(){mxEvent.addListener(U,"click",function(){var C=K;if(x){var N=M.value,R=N.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>R){C=null!=C?C:I.value;var O="";C==App.MODE_GOOGLE?O=b.drive.extension:C==App.MODE_GITHUB?O=b.gitHub.extension:C==App.MODE_GITLAB?O=b.gitLab.extension:C==App.MODE_TRELLO?O=b.trello.extension:C==App.MODE_DROPBOX?O=b.dropbox.extension:C==App.MODE_ONEDRIVE?O=b.oneDrive.extension:C==App.MODE_DEVICE&& +(O=".drawio");0<=R&&(N=N.substring(0,R));M.value=N+O}}B(K)})}var U=document.createElement("a");U.style.overflow="hidden";var T=document.createElement("img");T.src=F;T.setAttribute("border","0");T.setAttribute("align","absmiddle");T.style.width="60px";T.style.height="60px";T.style.paddingBottom="6px";U.style.display="inline-block";U.className="geBaseButton";U.style.position="relative";U.style.margin="4px";U.style.padding="8px 8px 10px 8px";U.style.whiteSpace="nowrap";U.appendChild(T);U.style.color= +"gray";U.style.fontSize="11px";var V=document.createElement("div");U.appendChild(V);mxUtils.write(V,L);if(null!=H&&null==b[H]){T.style.visibility="hidden";mxUtils.setOpacity(V,10);var W=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});W.spin(U);var t=window.setTimeout(function(){null==b[H]&&(W.stop(),U.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[H]&&(window.clearTimeout(t), +mxUtils.setOpacity(V,100),T.style.visibility="",W.stop(),Q())}))}else Q();u.appendChild(U);++G==k&&(mxUtils.br(u),G=0)}function B(F){var L=M.value;if(null==F||null!=L&&0<L.length)E&&b.hideDialog(),f(L,F,M)}g="1"==urlParams.noDevice?!1:g;x=null!=x?x:!0;y=null!=y?y:!0;k=null!=k?k:4;E=null!=E?E:!0;m=document.createElement("div");m.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(m);var J=document.createElement("h2");mxUtils.write(J,l||mxResources.get("create"));J.style.marginTop="0px";J.style.marginBottom= +"24px";m.appendChild(J);mxUtils.write(m,mxResources.get("filename")+":");var M=document.createElement("input");M.setAttribute("value",e);M.style.width="200px";M.style.marginLeft="10px";M.style.marginBottom="20px";M.style.maxWidth="70%";this.init=function(){M.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?M.select():document.execCommand("selectAll",!1,null)};m.appendChild(M);null!=A&&(null!=b.editor.diagramFileTypes&&(l=FilenameDialog.createFileTypes(b,M,b.editor.diagramFileTypes), +l.style.marginLeft="6px",l.style.width="90px",m.appendChild(l)),m.appendChild(FilenameDialog.createTypeHint(b,M,A)));A=null;if("1"!=urlParams.noDevice&&null!=n&&null!=q&&"image/"==q.substring(0,6)&&("image/svg"!=q.substring(0,9)||mxClient.IS_SVG)){M.style.width="160px";l=document.createElement("img");var v=p?n:btoa(unescape(encodeURIComponent(n)));l.setAttribute("src","data:"+q+";base64,"+v);l.style.position="absolute";l.style.top="70px";l.style.right="100px";l.style.maxWidth="120px";l.style.maxHeight= +"80px";mxUtils.setPrefixedStyle(l.style,"transform","translate(50%,-50%)");m.appendChild(l);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=q||(A=mxUtils.button(mxResources.get("copy"),function(F){F=b.base64ToBlob(v,"image/png");F=new ClipboardItem({"image/png":F,"text/html":new Blob(['<img src="data:'+q+";base64,"+v+'">'],{type:"text/html"})});navigator.clipboard.write([F]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(L){b.handleError(L)}))}), +A.style.marginTop="6px",A.className="geBtn");D&&Editor.popupsAllowed&&(l.style.cursor="pointer",mxEvent.addGestureListeners(l,null,null,function(F){mxEvent.isPopupTrigger(F)||B("_blank")}))}mxUtils.br(m);var u=document.createElement("div");u.style.textAlign="center";var G=0;u.style.marginTop="6px";m.appendChild(u);var I=document.createElement("select");I.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(n=document.createElement("option"),n.setAttribute("value", +App.MODE_GOOGLE),mxUtils.write(n,mxResources.get("googleDrive")),I.appendChild(n),z(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(n,mxResources.get("oneDrive")),I.appendChild(n),b.mode==App.MODE_ONEDRIVE&&n.setAttribute("selected","selected"),z(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE, +"oneDrive")),"function"===typeof window.DropboxClient&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(n,mxResources.get("dropbox")),I.appendChild(n),b.mode==App.MODE_DROPBOX&&n.setAttribute("selected","selected"),z(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_GITHUB),mxUtils.write(n,mxResources.get("github")),I.appendChild(n),z(IMAGE_PATH+ +"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_GITLAB),mxUtils.write(n,mxResources.get("gitlab")),I.appendChild(n),z(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_TRELLO),mxUtils.write(n,mxResources.get("trello")),I.appendChild(n),z(IMAGE_PATH+"/trello-logo.svg", +mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)n=document.createElement("option"),n.setAttribute("value",App.MODE_DEVICE),mxUtils.write(n,mxResources.get("device")),I.appendChild(n),b.mode!=App.MODE_DEVICE&&y||n.setAttribute("selected","selected"),g&&z(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);y&&isLocalStorage&&"0"!=urlParams.browser&&(y=document.createElement("option"), +y.setAttribute("value",App.MODE_BROWSER),mxUtils.write(y,mxResources.get("browser")),I.appendChild(y),b.mode==App.MODE_BROWSER&&y.setAttribute("selected","selected"),z(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));y=document.createElement("div");y.style.marginTop="26px";y.style.textAlign="center";null!=d&&(g=mxUtils.button(mxResources.get("help"),function(){b.openLink(d)}),g.className="geBtn",y.appendChild(g));g=mxUtils.button(mxResources.get(null!=c?"close":"cancel"), +function(){null!=c?c():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});g.className="geBtn";b.editor.cancelFirst&&null==c&&y.appendChild(g);null==c&&(n=mxUtils.button(mxResources.get("decideLater"),function(){B(null)}),n.className="geBtn",y.appendChild(n));D&&Editor.popupsAllowed&&(D=mxUtils.button(mxResources.get("openInNewWindow"),function(){B("_blank")}),D.className="geBtn",y.appendChild(D));CreateDialog.showDownloadButton&&(D=mxUtils.button(mxResources.get("download"), +function(){B("download")}),D.className="geBtn",y.appendChild(D),null!=A&&(D.style.marginTop="6px",y.style.marginTop="6px"));null!=A&&(mxUtils.br(y),y.appendChild(A));b.editor.cancelFirst&&null==c||y.appendChild(g);mxEvent.addListener(M,"keypress",function(F){13==F.keyCode?B(App.MODE_DEVICE):27==F.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});m.appendChild(y);this.container=m};CreateDialog.showDownloadButton="1"!=urlParams.noDevice; +var PopupDialog=function(b,e,f,c,l){l=null!=l?l:!0;var m=document.createElement("div");m.style.textAlign="left";m.style.height="100%";mxUtils.write(m,mxResources.get("fileOpenLocation"));mxUtils.br(m);mxUtils.br(m);var x=mxUtils.button(mxResources.get("openInThisWindow"),function(){l&&b.hideDialog();null!=c&&c()});x.className="geBtn";x.style.marginBottom="8px";x.style.width="280px";m.appendChild(x);mxUtils.br(m);var y=mxUtils.button(mxResources.get("openInNewWindow"),function(){l&&b.hideDialog(); +null!=f&&f();b.openLink(e,null,!0)});y.className="geBtn gePrimaryBtn";y.style.width=x.style.width;m.appendChild(y);mxUtils.br(m);mxUtils.br(m);mxUtils.write(m,mxResources.get("allowPopups"));this.container=m},ImageDialog=function(b,e,f,c,l,m,x,y){function D(){0<k.value.length?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled")}m=null!=m?m:!0;var d=b.editor.graph,g=document.createElement("div");mxUtils.write(g,e);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";e.style.paddingRight="20px";var k=document.createElement("input");k.setAttribute("value",f);k.setAttribute("type","text");k.setAttribute("spellcheck","false");k.setAttribute("autocorrect","off");k.setAttribute("autocomplete","off");k.setAttribute("autocapitalize","off");k.style.marginTop="6px";k.style.width=(Graph.fileSupport?460:340)-20+"px";k.style.backgroundImage="url('"+ Dialog.prototype.clearImage+"')";k.style.backgroundRepeat="no-repeat";k.style.backgroundPosition="100% 50%";k.style.paddingRight="14px";f=document.createElement("div");f.setAttribute("title",mxResources.get("reset"));f.style.position="relative";f.style.left="-16px";f.style.width="12px";f.style.height="14px";f.style.cursor="pointer";f.style.display="inline-block";f.style.top="3px";f.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(f,"click",function(){k.value="";k.focus()}); -e.appendChild(k);e.appendChild(f);g.appendChild(e);var n=z,t,p,A=function(J,N,v,u){var G="data:"==J.substring(0,5);!b.isOffline()||G&&"undefined"===typeof chrome?0<J.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(J,function(H){b.spinner.stop();b.hideDialog();var M=!1===u?1:null!=N&&null!=v?Math.max(N/H.width,v/H.height):Math.min(1,Math.min(520/H.width,520/H.height));m&&(J=b.convertDataUri(J));c(J,Math.round(Number(H.width)*M),Math.round(Number(H.height)*M),n,t,p)}, -function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),c(J,null,null,n,t,p)):(J=b.convertDataUri(J),N=null==N?120:N,v=null==v?100:v,b.hideDialog(),c(J,N,v,n,t,p))},E=function(J,N){if(null!=J){var v=l?null:d.getModel().getGeometry(d.getSelectionCell());null!=v?A(J,v.width,v.height,N):A(J,null,null,N)}else b.hideDialog(),c(null)};this.init=function(){k.focus();if(Graph.fileSupport){k.setAttribute("placeholder", -mxResources.get("dragImagesHere"));var J=g.parentNode,N=null;mxEvent.addListener(J,"dragleave",function(v){null!=N&&(N.parentNode.removeChild(N),N=null);v.stopPropagation();v.preventDefault()});mxEvent.addListener(J,"dragover",mxUtils.bind(this,function(v){null==N&&(!mxClient.IS_IE||10<document.documentMode)&&(N=b.highlightElement(J));v.stopPropagation();v.preventDefault()}));mxEvent.addListener(J,"drop",mxUtils.bind(this,function(v){null!=N&&(N.parentNode.removeChild(N),N=null);if(0<v.dataTransfer.files.length)b.importFiles(v.dataTransfer.files, -0,0,b.maxImageSize,function(G,H,M,K,I,F,P,U){E(G,U)},function(){},function(G){return"image/"==G.type.substring(0,6)},function(G){for(var H=0;H<G.length;H++)G[H]()},!mxEvent.isControlDown(v),null,null,!0);else if(0<=mxUtils.indexOf(v.dataTransfer.types,"text/uri-list")){var u=v.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(u)&&E(decodeURIComponent(u))}v.stopPropagation();v.preventDefault()}),!1)}};z=document.createElement("div");z.style.marginTop="14px";z.style.textAlign= -"center";f=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&z.appendChild(f);ImageDialog.filePicked=function(J){J.action==google.picker.Action.PICKED&&null!=J.docs[0].thumbnails&&(J=J.docs[0].thumbnails[J.docs[0].thumbnails.length-1],null!=J&&(k.value=J.url));k.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var y=document.createElement("input");y.setAttribute("multiple","multiple");y.setAttribute("type", -"file");mxEvent.addListener(y,"change",function(J){null!=y.files&&(b.importFiles(y.files,0,0,b.maxImageSize,function(N,v,u,G,H,M){E(N)},function(){},function(N){return"image/"==N.type.substring(0,6)},function(N){for(var v=0;v<N.length;v++)N[v]()},!0),y.type="",y.type="file",y.value="")});y.style.display="none";document.body.appendChild(y);b.imgDlgFileInputElt=y}e=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});e.className="geBtn";z.appendChild(e)}mxEvent.addListener(k, -"keypress",function(J){13==J.keyCode&&E(k.value)});var B=mxUtils.button(mxResources.get("crop"),function(){var J=new CropImageDialog(b,k.value,n,function(N,v,u){n=N;t=v;p=u});b.showDialog(J.container,300,390,!0,!0)});x&&(B.className="geBtn",z.appendChild(B));mxEvent.addListener(k,"change",function(J){n=null;C()});C();x=mxUtils.button(mxResources.get("apply"),function(){E(k.value)});x.className="geBtn gePrimaryBtn";z.appendChild(x);b.editor.cancelFirst||z.appendChild(f);Graph.fileSupport&&(z.style.marginTop= -"120px",g.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",g.style.backgroundPosition="center 65%",g.style.backgroundRepeat="no-repeat",x=document.createElement("div"),x.style.position="absolute",x.style.width="420px",x.style.top="58%",x.style.textAlign="center",x.style.fontSize="18px",x.style.color="#a0c3ff",mxUtils.write(x,mxResources.get("dragImagesHere")),g.appendChild(x));g.appendChild(z);this.container=g},LinkDialog=function(b,e,f,c,l,m,x){function z(J,N,v){v=mxUtils.button("",v); -v.className="geBtn";v.setAttribute("title",N);N=document.createElement("img");N.style.height="26px";N.style.width="26px";N.setAttribute("src",J);v.style.minWidth="42px";v.style.verticalAlign="middle";v.appendChild(N);B.appendChild(v)}var C=document.createElement("div");C.style.height="100%";mxUtils.write(C,mxResources.get("editLink")+":");var d=document.createElement("div");d.className="geTitle";d.style.backgroundColor="transparent";d.style.borderColor="transparent";d.style.whiteSpace="nowrap";d.style.textOverflow= +e.appendChild(k);e.appendChild(f);g.appendChild(e);var n=y,q,p,A=function(J,M,v,u){var G="data:"==J.substring(0,5);!b.isOffline()||G&&"undefined"===typeof chrome?0<J.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(J,function(I){b.spinner.stop();b.hideDialog();var F=!1===u?1:null!=M&&null!=v?Math.max(M/I.width,v/I.height):Math.min(1,Math.min(520/I.width,520/I.height));m&&(J=b.convertDataUri(J));c(J,Math.round(Number(I.width)*F),Math.round(Number(I.height)*F),n,q,p)}, +function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),c(J,null,null,n,q,p)):(J=b.convertDataUri(J),M=null==M?120:M,v=null==v?100:v,b.hideDialog(),c(J,M,v,n,q,p))},E=function(J,M){if(null!=J){var v=l?null:d.getModel().getGeometry(d.getSelectionCell());null!=v?A(J,v.width,v.height,M):A(J,null,null,M)}else b.hideDialog(),c(null)};this.init=function(){k.focus();if(Graph.fileSupport){k.setAttribute("placeholder", +mxResources.get("dragImagesHere"));var J=g.parentNode,M=null;mxEvent.addListener(J,"dragleave",function(v){null!=M&&(M.parentNode.removeChild(M),M=null);v.stopPropagation();v.preventDefault()});mxEvent.addListener(J,"dragover",mxUtils.bind(this,function(v){null==M&&(!mxClient.IS_IE||10<document.documentMode)&&(M=b.highlightElement(J));v.stopPropagation();v.preventDefault()}));mxEvent.addListener(J,"drop",mxUtils.bind(this,function(v){null!=M&&(M.parentNode.removeChild(M),M=null);if(0<v.dataTransfer.files.length)b.importFiles(v.dataTransfer.files, +0,0,b.maxImageSize,function(G,I,F,L,K,H,Q,U){E(G,U)},function(){},function(G){return"image/"==G.type.substring(0,6)},function(G){for(var I=0;I<G.length;I++)G[I]()},!mxEvent.isControlDown(v),null,null,!0);else if(0<=mxUtils.indexOf(v.dataTransfer.types,"text/uri-list")){var u=v.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(u)&&E(decodeURIComponent(u))}v.stopPropagation();v.preventDefault()}),!1)}};y=document.createElement("div");y.style.marginTop="14px";y.style.textAlign= +"center";f=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&y.appendChild(f);ImageDialog.filePicked=function(J){J.action==google.picker.Action.PICKED&&null!=J.docs[0].thumbnails&&(J=J.docs[0].thumbnails[J.docs[0].thumbnails.length-1],null!=J&&(k.value=J.url));k.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var z=document.createElement("input");z.setAttribute("multiple","multiple");z.setAttribute("type", +"file");mxEvent.addListener(z,"change",function(J){null!=z.files&&(b.importFiles(z.files,0,0,b.maxImageSize,function(M,v,u,G,I,F){E(M)},function(){},function(M){return"image/"==M.type.substring(0,6)},function(M){for(var v=0;v<M.length;v++)M[v]()},!0),z.type="",z.type="file",z.value="")});z.style.display="none";document.body.appendChild(z);b.imgDlgFileInputElt=z}e=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});e.className="geBtn";y.appendChild(e)}mxEvent.addListener(k, +"keypress",function(J){13==J.keyCode&&E(k.value)});var B=mxUtils.button(mxResources.get("crop"),function(){var J=new CropImageDialog(b,k.value,n,function(M,v,u){n=M;q=v;p=u});b.showDialog(J.container,300,390,!0,!0)});x&&(B.className="geBtn",y.appendChild(B));mxEvent.addListener(k,"change",function(J){n=null;D()});D();x=mxUtils.button(mxResources.get("apply"),function(){E(k.value)});x.className="geBtn gePrimaryBtn";y.appendChild(x);b.editor.cancelFirst||y.appendChild(f);Graph.fileSupport&&(y.style.marginTop= +"120px",g.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",g.style.backgroundPosition="center 65%",g.style.backgroundRepeat="no-repeat",x=document.createElement("div"),x.style.position="absolute",x.style.width="420px",x.style.top="58%",x.style.textAlign="center",x.style.fontSize="18px",x.style.color="#a0c3ff",mxUtils.write(x,mxResources.get("dragImagesHere")),g.appendChild(x));g.appendChild(y);this.container=g},LinkDialog=function(b,e,f,c,l,m,x){function y(J,M,v){v=mxUtils.button("",v); +v.className="geBtn";v.setAttribute("title",M);M=document.createElement("img");M.style.height="26px";M.style.width="26px";M.setAttribute("src",J);v.style.minWidth="42px";v.style.verticalAlign="middle";v.appendChild(M);B.appendChild(v)}var D=document.createElement("div");D.style.height="100%";mxUtils.write(D,mxResources.get("editLink")+":");var d=document.createElement("div");d.className="geTitle";d.style.backgroundColor="transparent";d.style.borderColor="transparent";d.style.whiteSpace="nowrap";d.style.textOverflow= "clip";d.style.cursor="default";d.style.paddingRight="20px";var g=document.createElement("input");g.setAttribute("placeholder",mxResources.get("dragUrlsHere"));g.setAttribute("type","text");g.style.marginTop="6px";g.style.width="97%";g.style.boxSizing="border-box";g.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";g.style.backgroundRepeat="no-repeat";g.style.backgroundPosition="100% 50%";g.style.paddingRight="14px";g.style.marginBottom="4px";var k=document.createElement("div");k.setAttribute("title", mxResources.get("reset"));k.style.position="relative";k.style.left="-16px";k.style.width="12px";k.style.height="14px";k.style.cursor="pointer";k.style.display="inline-block";k.style.top="3px";k.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(k,"click",function(){g.value="";g.focus()});var n=document.createElement("input");n.style.cssText="margin-right:8px;margin-bottom:8px;";n.setAttribute("value","url");n.setAttribute("type","radio");n.setAttribute("name","geLinkDialogOption"); -var t=document.createElement("input");t.style.cssText="margin-right:8px;margin-bottom:8px;";t.setAttribute("value","url");t.setAttribute("type","radio");t.setAttribute("name","geLinkDialogOption");var p=document.createElement("select");p.style.width="520px";var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.margin="0 6p 0 6px";null!=x&&(A.setAttribute("checked","checked"),A.defaultChecked=!0);x=null!=x?x:"_blank";A.setAttribute("title",x);m&&(g.style.width="340px");if(l&& -null!=b.pages){null!=e&&Graph.isPageLink(e)?(t.setAttribute("checked","checked"),t.defaultChecked=!0):(g.setAttribute("value",e),n.setAttribute("checked","checked"),n.defaultChecked=!0);d.appendChild(n);d.appendChild(g);d.appendChild(k);m&&(d.appendChild(A),mxUtils.write(d,mxResources.get("openInNewWindow")));mxUtils.br(d);d.appendChild(t);l=!1;for(m=0;m<b.pages.length;m++)k=document.createElement("option"),mxUtils.write(k,b.pages[m].getName()||mxResources.get("pageWithNumber",[m+1])),k.setAttribute("value", -"data:page/id,"+b.pages[m].getId()),e==k.getAttribute("value")&&(k.setAttribute("selected","selected"),l=!0),p.appendChild(k);if(!l&&t.checked){var E=document.createElement("option");mxUtils.write(E,mxResources.get("pageNotFound"));E.setAttribute("disabled","disabled");E.setAttribute("selected","selected");E.setAttribute("value","pageNotFound");p.appendChild(E);mxEvent.addListener(p,"change",function(){null==E.parentNode||E.selected||E.parentNode.removeChild(E)})}d.appendChild(p)}else g.setAttribute("value", -e),d.appendChild(g),d.appendChild(k);C.appendChild(d);var y=mxUtils.button(f,function(){b.hideDialog();c(t.checked?"pageNotFound"!==p.value?p.value:e:g.value,LinkDialog.selectedDocs,A.checked?x:null)});y.style.verticalAlign="middle";y.className="geBtn gePrimaryBtn";this.init=function(){t.checked?p.focus():(g.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?g.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(p,"focus",function(){n.removeAttribute("checked");t.setAttribute("checked", -"checked");t.checked=!0});mxEvent.addListener(g,"focus",function(){t.removeAttribute("checked");n.setAttribute("checked","checked");n.checked=!0});if(Graph.fileSupport){var J=C.parentNode,N=null;mxEvent.addListener(J,"dragleave",function(v){null!=N&&(N.parentNode.removeChild(N),N=null);v.stopPropagation();v.preventDefault()});mxEvent.addListener(J,"dragover",mxUtils.bind(this,function(v){null==N&&(!mxClient.IS_IE||10<document.documentMode)&&(N=b.highlightElement(J));v.stopPropagation();v.preventDefault()})); -mxEvent.addListener(J,"drop",mxUtils.bind(this,function(v){null!=N&&(N.parentNode.removeChild(N),N=null);0<=mxUtils.indexOf(v.dataTransfer.types,"text/uri-list")&&(g.value=decodeURIComponent(v.dataTransfer.getData("text/uri-list")),n.setAttribute("checked","checked"),n.checked=!0,y.click());v.stopPropagation();v.preventDefault()}),!1)}};var B=document.createElement("div");B.style.marginTop="18px";B.style.textAlign="center";f=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/custom-links")}); -f.style.verticalAlign="middle";f.className="geBtn";B.appendChild(f);b.isOffline()&&!mxClient.IS_CHROMEAPP&&(f.style.display="none");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.style.verticalAlign="middle";f.className="geBtn";b.editor.cancelFirst&&B.appendChild(f);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(J){if(J.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=J.docs;var N=J.docs[0].url;"application/mxe"==J.docs[0].mimeType||null!=J.docs[0].mimeType&& -"application/vnd.jgraph."==J.docs[0].mimeType.substring(0,23)?N="https://www.draw.io/#G"+J.docs[0].id:"application/vnd.google-apps.folder"==J.docs[0].mimeType&&(N="https://drive.google.com/#folders/"+J.docs[0].id);g.value=N;g.focus()}else LinkDialog.selectedDocs=null;g.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&z(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this, -function(){b.spinner.stop();if(null==b.linkPicker){var J=b.drive.createLinkPicker();b.linkPicker=J.setCallback(function(N){LinkDialog.filePicked(N)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&z(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(J){g.value=J[0].link;g.focus()}})});null!=b.oneDrive&&z(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"), -function(){b.oneDrive.pickFile(function(J,N){g.value=N.value[0].webUrl;g.focus()},!0)});null!=b.gitHub&&z(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){b.gitHub.pickFile(function(J){if(null!=J){J=J.split("/");var N=J[0],v=J[1],u=J[2];J=J.slice(3,J.length).join("/");g.value="https://github.com/"+N+"/"+v+"/blob/"+u+"/"+J;g.focus()}})});null!=b.gitLab&&z(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){b.gitLab.pickFile(function(J){if(null!=J){J=J.split("/");var N= -J[0],v=J[1],u=J[2];J=J.slice(3,J.length).join("/");g.value=DRAWIO_GITLAB_URL+"/"+N+"/"+v+"/blob/"+u+"/"+J;g.focus()}})});mxEvent.addListener(g,"keypress",function(J){13==J.keyCode&&(b.hideDialog(),c(t.checked?p.value:g.value,LinkDialog.selectedDocs))});B.appendChild(y);b.editor.cancelFirst||B.appendChild(f);C.appendChild(B);this.container=C},FeedbackDialog=function(b,e,f,c){var l=document.createElement("div"),m=document.createElement("div");mxUtils.write(m,mxResources.get("sendYourFeedback"));m.style.fontSize= -"18px";m.style.marginBottom="18px";l.appendChild(m);m=document.createElement("div");mxUtils.write(m,mxResources.get("yourEmailAddress")+(f?"":" ("+mxResources.get("required")+")"));l.appendChild(m);var x=document.createElement("input");x.setAttribute("type","text");x.style.marginTop="6px";x.style.width="600px";var z=mxUtils.button(mxResources.get("sendMessage"),function(){var k=g.value+(d.checked?"\nDiagram:\n"+(null!=c?c:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+ +var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","url");q.setAttribute("type","radio");q.setAttribute("name","geLinkDialogOption");var p=document.createElement("select");p.style.width="520px";var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.margin="0 6p 0 6px";null!=x&&(A.setAttribute("checked","checked"),A.defaultChecked=!0);x=null!=x?x:"_blank";A.setAttribute("title",x);m&&(g.style.width="340px");if(l&& +null!=b.pages){null!=e&&Graph.isPageLink(e)?(q.setAttribute("checked","checked"),q.defaultChecked=!0):(g.setAttribute("value",e),n.setAttribute("checked","checked"),n.defaultChecked=!0);d.appendChild(n);d.appendChild(g);d.appendChild(k);m&&(d.appendChild(A),mxUtils.write(d,mxResources.get("openInNewWindow")));mxUtils.br(d);d.appendChild(q);l=!1;for(m=0;m<b.pages.length;m++)k=document.createElement("option"),mxUtils.write(k,b.pages[m].getName()||mxResources.get("pageWithNumber",[m+1])),k.setAttribute("value", +"data:page/id,"+b.pages[m].getId()),e==k.getAttribute("value")&&(k.setAttribute("selected","selected"),l=!0),p.appendChild(k);if(!l&&q.checked){var E=document.createElement("option");mxUtils.write(E,mxResources.get("pageNotFound"));E.setAttribute("disabled","disabled");E.setAttribute("selected","selected");E.setAttribute("value","pageNotFound");p.appendChild(E);mxEvent.addListener(p,"change",function(){null==E.parentNode||E.selected||E.parentNode.removeChild(E)})}d.appendChild(p)}else g.setAttribute("value", +e),d.appendChild(g),d.appendChild(k);D.appendChild(d);var z=mxUtils.button(f,function(){b.hideDialog();c(q.checked?"pageNotFound"!==p.value?p.value:e:g.value,LinkDialog.selectedDocs,A.checked?x:null)});z.style.verticalAlign="middle";z.className="geBtn gePrimaryBtn";this.init=function(){q.checked?p.focus():(g.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?g.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(p,"focus",function(){n.removeAttribute("checked");q.setAttribute("checked", +"checked");q.checked=!0});mxEvent.addListener(g,"focus",function(){q.removeAttribute("checked");n.setAttribute("checked","checked");n.checked=!0});if(Graph.fileSupport){var J=D.parentNode,M=null;mxEvent.addListener(J,"dragleave",function(v){null!=M&&(M.parentNode.removeChild(M),M=null);v.stopPropagation();v.preventDefault()});mxEvent.addListener(J,"dragover",mxUtils.bind(this,function(v){null==M&&(!mxClient.IS_IE||10<document.documentMode)&&(M=b.highlightElement(J));v.stopPropagation();v.preventDefault()})); +mxEvent.addListener(J,"drop",mxUtils.bind(this,function(v){null!=M&&(M.parentNode.removeChild(M),M=null);0<=mxUtils.indexOf(v.dataTransfer.types,"text/uri-list")&&(g.value=decodeURIComponent(v.dataTransfer.getData("text/uri-list")),n.setAttribute("checked","checked"),n.checked=!0,z.click());v.stopPropagation();v.preventDefault()}),!1)}};var B=document.createElement("div");B.style.marginTop="18px";B.style.textAlign="center";f=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/custom-links")}); +f.style.verticalAlign="middle";f.className="geBtn";B.appendChild(f);b.isOffline()&&!mxClient.IS_CHROMEAPP&&(f.style.display="none");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.style.verticalAlign="middle";f.className="geBtn";b.editor.cancelFirst&&B.appendChild(f);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(J){if(J.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=J.docs;var M=J.docs[0].url;"application/mxe"==J.docs[0].mimeType||null!=J.docs[0].mimeType&& +"application/vnd.jgraph."==J.docs[0].mimeType.substring(0,23)?M="https://www.draw.io/#G"+J.docs[0].id:"application/vnd.google-apps.folder"==J.docs[0].mimeType&&(M="https://drive.google.com/#folders/"+J.docs[0].id);g.value=M;g.focus()}else LinkDialog.selectedDocs=null;g.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&y(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this, +function(){b.spinner.stop();if(null==b.linkPicker){var J=b.drive.createLinkPicker();b.linkPicker=J.setCallback(function(M){LinkDialog.filePicked(M)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&y(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(J){g.value=J[0].link;g.focus()}})});null!=b.oneDrive&&y(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"), +function(){b.oneDrive.pickFile(function(J,M){g.value=M.value[0].webUrl;g.focus()},!0)});null!=b.gitHub&&y(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){b.gitHub.pickFile(function(J){if(null!=J){J=J.split("/");var M=J[0],v=J[1],u=J[2];J=J.slice(3,J.length).join("/");g.value="https://github.com/"+M+"/"+v+"/blob/"+u+"/"+J;g.focus()}})});null!=b.gitLab&&y(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){b.gitLab.pickFile(function(J){if(null!=J){J=J.split("/");var M= +J[0],v=J[1],u=J[2];J=J.slice(3,J.length).join("/");g.value=DRAWIO_GITLAB_URL+"/"+M+"/"+v+"/blob/"+u+"/"+J;g.focus()}})});mxEvent.addListener(g,"keypress",function(J){13==J.keyCode&&(b.hideDialog(),c(q.checked?p.value:g.value,LinkDialog.selectedDocs))});B.appendChild(z);b.editor.cancelFirst||B.appendChild(f);D.appendChild(B);this.container=D},FeedbackDialog=function(b,e,f,c){var l=document.createElement("div"),m=document.createElement("div");mxUtils.write(m,mxResources.get("sendYourFeedback"));m.style.fontSize= +"18px";m.style.marginBottom="18px";l.appendChild(m);m=document.createElement("div");mxUtils.write(m,mxResources.get("yourEmailAddress")+(f?"":" ("+mxResources.get("required")+")"));l.appendChild(m);var x=document.createElement("input");x.setAttribute("type","text");x.style.marginTop="6px";x.style.width="600px";var y=mxUtils.button(mxResources.get("sendMessage"),function(){var k=g.value+(d.checked?"\nDiagram:\n"+(null!=c?c:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+ "\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;k.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(x.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=e?e:"Feedback")+ -":\n"+k),function(n){b.spinner.stop();200<=n.getStatus()&&299>=n.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});z.className="geBtn gePrimaryBtn";if(!f){z.setAttribute("disabled","disabled");var C=/^(([^<>()[\]\\.,;:\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(x, -"change",function(){0<x.value.length&&0<C.test(x.value)?z.removeAttribute("disabled"):z.setAttribute("disabled","disabled")});mxEvent.addListener(x,"keyup",function(){0<x.value.length&&C.test(x.value)?z.removeAttribute("disabled"):z.setAttribute("disabled","disabled")})}l.appendChild(x);this.init=function(){x.focus()};var d=document.createElement("input");d.setAttribute("type","checkbox");d.setAttribute("checked","checked");d.defaultChecked=!0;f=document.createElement("p");f.style.marginTop="14px"; +":\n"+k),function(n){b.spinner.stop();200<=n.getStatus()&&299>=n.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});y.className="geBtn gePrimaryBtn";if(!f){y.setAttribute("disabled","disabled");var D=/^(([^<>()[\]\\.,;:\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(x, +"change",function(){0<x.value.length&&0<D.test(x.value)?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")});mxEvent.addListener(x,"keyup",function(){0<x.value.length&&D.test(x.value)?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")})}l.appendChild(x);this.init=function(){x.focus()};var d=document.createElement("input");d.setAttribute("type","checkbox");d.setAttribute("checked","checked");d.defaultChecked=!0;f=document.createElement("p");f.style.marginTop="14px"; f.appendChild(d);m=document.createElement("span");mxUtils.write(m," "+mxResources.get("includeCopyOfMyDiagram"));f.appendChild(m);mxEvent.addListener(m,"click",function(k){d.checked=!d.checked;mxEvent.consume(k)});l.appendChild(f);m=document.createElement("div");mxUtils.write(m,mxResources.get("feedback"));l.appendChild(m);var g=document.createElement("textarea");g.style.resize="none";g.style.width="600px";g.style.height="140px";g.style.marginTop="6px";g.setAttribute("placeholder",mxResources.get("comments")); -l.appendChild(g);f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right";m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});m.className="geBtn";b.editor.cancelFirst?(f.appendChild(m),f.appendChild(z)):(f.appendChild(z),f.appendChild(m));l.appendChild(f);this.container=l};FeedbackDialog.maxAttachmentSize=1E6; +l.appendChild(g);f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right";m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});m.className="geBtn";b.editor.cancelFirst?(f.appendChild(m),f.appendChild(y)):(f.appendChild(y),f.appendChild(m));l.appendChild(f);this.container=l};FeedbackDialog.maxAttachmentSize=1E6; var RevisionDialog=function(b,e,f){var c=document.createElement("div"),l=document.createElement("h3");l.style.marginTop="0px";mxUtils.write(l,mxResources.get("revisionHistory"));c.appendChild(l);l=document.createElement("div");l.style.position="absolute";l.style.overflow="auto";l.style.width="170px";l.style.height="378px";c.appendChild(l);var m=document.createElement("div");m.style.position="absolute";m.style.border="1px solid lightGray";m.style.left="199px";m.style.width="470px";m.style.height="376px"; -m.style.overflow="hidden";var x=document.createElement("div");x.style.cssText="position:absolute;left:0;right:0;top:0;bottom:20px;text-align:center;transform:translate(0,50%);pointer-events:none;";m.appendChild(x);mxEvent.disableContextMenu(m);c.appendChild(m);var z=new Graph(m);z.setTooltips(!1);z.setEnabled(!1);z.setPanning(!0);z.panningHandler.ignoreCell=!0;z.panningHandler.useLeftButtonForPanning=!0;z.minFitScale=null;z.maxFitScale=null;z.centerZoom=!0;var C=0,d=null,g=0,k=z.getGlobalVariable; -z.getGlobalVariable=function(X){return"page"==X&&null!=d&&null!=d[g]?d[g].getAttribute("name"):"pagenumber"==X?g+1:"pagecount"==X?null!=d?d.length:1:k.apply(this,arguments)};z.getLinkForCell=function(){return null};Editor.MathJaxRender&&z.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(X,aa){b.editor.graph.mathEnabled&&Editor.MathJaxRender(z.container)}));var n={lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.4,trail:60, -shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"},t=new Spinner(n),p=b.getCurrentFile(),A=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),E={};for(n=0;n<A.length;n++)E[A[n].getAttribute("id")]=A[n];var y=null,B=null,J=null,N=null,v=mxUtils.button("",function(){null!=J&&z.zoomIn()});v.className="geSprite geSprite-zoomin";v.setAttribute("title",mxResources.get("zoomIn"));v.style.outline="none";v.style.border="none";v.style.margin="2px";v.setAttribute("disabled","disabled"); -mxUtils.setOpacity(v,20);var u=mxUtils.button("",function(){null!=J&&z.zoomOut()});u.className="geSprite geSprite-zoomout";u.setAttribute("title",mxResources.get("zoomOut"));u.style.outline="none";u.style.border="none";u.style.margin="2px";u.setAttribute("disabled","disabled");mxUtils.setOpacity(u,20);var G=mxUtils.button("",function(){null!=J&&(z.maxFitScale=8,z.fit(8),z.center())});G.className="geSprite geSprite-fit";G.setAttribute("title",mxResources.get("fit"));G.style.outline="none";G.style.border= -"none";G.style.margin="2px";G.setAttribute("disabled","disabled");mxUtils.setOpacity(G,20);var H=mxUtils.button("",function(){null!=J&&(z.zoomActual(),z.center())});H.className="geSprite geSprite-actualsize";H.setAttribute("title",mxResources.get("actualSize"));H.style.outline="none";H.style.border="none";H.style.margin="2px";H.setAttribute("disabled","disabled");mxUtils.setOpacity(H,20);var M=mxUtils.button("",function(){});M.className="geSprite geSprite-middle";M.setAttribute("title",mxResources.get("compare")); -M.style.outline="none";M.style.border="none";M.style.margin="2px";mxUtils.setOpacity(M,60);var K=m.cloneNode(!1);K.style.pointerEvent="none";m.parentNode.appendChild(K);var I=new Graph(K);I.setTooltips(!1);I.setEnabled(!1);I.setPanning(!0);I.panningHandler.ignoreCell=!0;I.panningHandler.useLeftButtonForPanning=!0;I.minFitScale=null;I.maxFitScale=null;I.centerZoom=!0;mxEvent.addGestureListeners(M,function(X){X=E[d[C].getAttribute("id")];mxUtils.setOpacity(M,20);x.innerText="";null==X?mxUtils.write(x, -mxResources.get("pageNotFound")):(F.style.display="none",m.style.display="none",K.style.display="",K.style.backgroundColor=m.style.backgroundColor,X=Editor.parseDiagramNode(X),(new mxCodec(X.ownerDocument)).decode(X,I.getModel()),I.view.scaleAndTranslate(z.view.scale,z.view.translate.x,z.view.translate.y))},null,function(){mxUtils.setOpacity(M,60);x.innerText="";"none"==m.style.display&&(F.style.display="",m.style.display="",K.style.display="none")});var F=document.createElement("div");F.style.position= -"absolute";F.style.textAlign="right";F.style.color="gray";F.style.marginTop="10px";F.style.backgroundColor="transparent";F.style.top="440px";F.style.right="32px";F.style.maxWidth="380px";F.style.cursor="default";var P=mxUtils.button(mxResources.get("download"),function(){if(null!=J){var X=mxUtils.getXml(J.documentElement),aa=b.getBaseFilename()+".drawio";b.isLocalFileSave()?b.saveLocalFile(X,aa,"text/xml"):(X="undefined"===typeof pako?"&xml="+encodeURIComponent(X):"&data="+encodeURIComponent(Graph.compress(X)), -(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(aa)+"&format=xml"+X)).simulate(document,"_blank"))}});P.className="geBtn";P.setAttribute("disabled","disabled");var U=mxUtils.button(mxResources.get("restore"),function(X){null!=J&&null!=N&&(mxEvent.isShiftDown(X)?null!=J&&(X=b.getPagesForNode(J.documentElement),X=b.diffPages(b.pages,X),X=new TextareaDialog(b,mxResources.get("compare"),JSON.stringify(X,null,2),function(aa){if(0<aa.length)try{b.confirm(mxResources.get("areYouSure"),function(){p.patch([JSON.parse(aa)], -null,!0);b.hideDialog();b.hideDialog()})}catch(Y){b.handleError(Y)}},null,null,null,null,null,!0,null,mxResources.get("merge")),b.showDialog(X.container,620,460,!0,!0),X.init()):b.confirm(mxResources.get("areYouSure"),function(){null!=f?f(N):b.spinner.spin(document.body,mxResources.get("restoring"))&&p.save(!0,function(aa){b.spinner.stop();b.replaceFileData(N);b.hideDialog()},function(aa){b.spinner.stop();b.editor.setStatus("");b.handleError(aa,null!=aa?mxResources.get("errorSavingFile"):null)})}))}); +m.style.overflow="hidden";var x=document.createElement("div");x.style.cssText="position:absolute;left:0;right:0;top:0;bottom:20px;text-align:center;transform:translate(0,50%);pointer-events:none;";m.appendChild(x);mxEvent.disableContextMenu(m);c.appendChild(m);var y=new Graph(m);y.setTooltips(!1);y.setEnabled(!1);y.setPanning(!0);y.panningHandler.ignoreCell=!0;y.panningHandler.useLeftButtonForPanning=!0;y.minFitScale=null;y.maxFitScale=null;y.centerZoom=!0;var D=0,d=null,g=0,k=y.getGlobalVariable; +y.getGlobalVariable=function(X){return"page"==X&&null!=d&&null!=d[g]?d[g].getAttribute("name"):"pagenumber"==X?g+1:"pagecount"==X?null!=d?d.length:1:k.apply(this,arguments)};y.getLinkForCell=function(){return null};Editor.MathJaxRender&&y.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(X,aa){b.editor.graph.mathEnabled&&Editor.MathJaxRender(y.container)}));var n={lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.4,trail:60, +shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"},q=new Spinner(n),p=b.getCurrentFile(),A=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),E={};for(n=0;n<A.length;n++)E[A[n].getAttribute("id")]=A[n];var z=null,B=null,J=null,M=null,v=mxUtils.button("",function(){null!=J&&y.zoomIn()});v.className="geSprite geSprite-zoomin";v.setAttribute("title",mxResources.get("zoomIn"));v.style.outline="none";v.style.border="none";v.style.margin="2px";v.setAttribute("disabled","disabled"); +mxUtils.setOpacity(v,20);var u=mxUtils.button("",function(){null!=J&&y.zoomOut()});u.className="geSprite geSprite-zoomout";u.setAttribute("title",mxResources.get("zoomOut"));u.style.outline="none";u.style.border="none";u.style.margin="2px";u.setAttribute("disabled","disabled");mxUtils.setOpacity(u,20);var G=mxUtils.button("",function(){null!=J&&(y.maxFitScale=8,y.fit(8),y.center())});G.className="geSprite geSprite-fit";G.setAttribute("title",mxResources.get("fit"));G.style.outline="none";G.style.border= +"none";G.style.margin="2px";G.setAttribute("disabled","disabled");mxUtils.setOpacity(G,20);var I=mxUtils.button("",function(){null!=J&&(y.zoomActual(),y.center())});I.className="geSprite geSprite-actualsize";I.setAttribute("title",mxResources.get("actualSize"));I.style.outline="none";I.style.border="none";I.style.margin="2px";I.setAttribute("disabled","disabled");mxUtils.setOpacity(I,20);var F=mxUtils.button("",function(){});F.className="geSprite geSprite-middle";F.setAttribute("title",mxResources.get("compare")); +F.style.outline="none";F.style.border="none";F.style.margin="2px";mxUtils.setOpacity(F,60);var L=m.cloneNode(!1);L.style.pointerEvent="none";m.parentNode.appendChild(L);var K=new Graph(L);K.setTooltips(!1);K.setEnabled(!1);K.setPanning(!0);K.panningHandler.ignoreCell=!0;K.panningHandler.useLeftButtonForPanning=!0;K.minFitScale=null;K.maxFitScale=null;K.centerZoom=!0;mxEvent.addGestureListeners(F,function(X){X=E[d[D].getAttribute("id")];mxUtils.setOpacity(F,20);x.innerText="";null==X?mxUtils.write(x, +mxResources.get("pageNotFound")):(H.style.display="none",m.style.display="none",L.style.display="",L.style.backgroundColor=m.style.backgroundColor,X=Editor.parseDiagramNode(X),(new mxCodec(X.ownerDocument)).decode(X,K.getModel()),K.view.scaleAndTranslate(y.view.scale,y.view.translate.x,y.view.translate.y))},null,function(){mxUtils.setOpacity(F,60);x.innerText="";"none"==m.style.display&&(H.style.display="",m.style.display="",L.style.display="none")});var H=document.createElement("div");H.style.position= +"absolute";H.style.textAlign="right";H.style.color="gray";H.style.marginTop="10px";H.style.backgroundColor="transparent";H.style.top="440px";H.style.right="32px";H.style.maxWidth="380px";H.style.cursor="default";var Q=mxUtils.button(mxResources.get("download"),function(){if(null!=J){var X=mxUtils.getXml(J.documentElement),aa=b.getBaseFilename()+".drawio";b.isLocalFileSave()?b.saveLocalFile(X,aa,"text/xml"):(X="undefined"===typeof pako?"&xml="+encodeURIComponent(X):"&data="+encodeURIComponent(Graph.compress(X)), +(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(aa)+"&format=xml"+X)).simulate(document,"_blank"))}});Q.className="geBtn";Q.setAttribute("disabled","disabled");var U=mxUtils.button(mxResources.get("restore"),function(X){null!=J&&null!=M&&(mxEvent.isShiftDown(X)?null!=J&&(X=b.getPagesForNode(J.documentElement),X=b.diffPages(b.pages,X),X=new TextareaDialog(b,mxResources.get("compare"),JSON.stringify(X,null,2),function(aa){if(0<aa.length)try{b.confirm(mxResources.get("areYouSure"),function(){p.patch([JSON.parse(aa)], +null,!0);b.hideDialog();b.hideDialog()})}catch(Y){b.handleError(Y)}},null,null,null,null,null,!0,null,mxResources.get("merge")),b.showDialog(X.container,620,460,!0,!0),X.init()):b.confirm(mxResources.get("areYouSure"),function(){null!=f?f(M):b.spinner.spin(document.body,mxResources.get("restoring"))&&p.save(!0,function(aa){b.spinner.stop();b.replaceFileData(M);b.hideDialog()},function(aa){b.spinner.stop();b.editor.setStatus("");b.handleError(aa,null!=aa?mxResources.get("errorSavingFile"):null)})}))}); U.className="geBtn";U.setAttribute("disabled","disabled");U.setAttribute("title","Shift+Click for Diff");var T=document.createElement("select");T.setAttribute("disabled","disabled");T.style.maxWidth="80px";T.style.position="relative";T.style.top="-2px";T.style.verticalAlign="bottom";T.style.marginRight="6px";T.style.display="none";var V=null;mxEvent.addListener(T,"change",function(X){null!=V&&(V(X),mxEvent.consume(X))});var W=mxUtils.button(mxResources.get("edit"),function(){null!=J&&(window.openFile= -new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(J.documentElement)),b.openLink(b.getUrl(),null,!0))});W.className="geBtn";W.setAttribute("disabled","disabled");null!=f&&(W.style.display="none");var q=mxUtils.button(mxResources.get("show"),function(){null!=B&&b.openLink(B.getUrl(T.selectedIndex))});q.className="geBtn gePrimaryBtn";q.setAttribute("disabled","disabled");null!=f&&(q.style.display="none",U.className="geBtn gePrimaryBtn");A=document.createElement("div"); -A.style.position="absolute";A.style.top="482px";A.style.width="640px";A.style.textAlign="right";var D=document.createElement("div");D.className="geToolbarContainer";D.style.backgroundColor="transparent";D.style.padding="2px";D.style.border="none";D.style.left="199px";D.style.top="442px";var L=null;if(null!=e&&0<e.length){m.style.cursor="move";var R=document.createElement("table");R.style.border="1px solid lightGray";R.style.borderCollapse="collapse";R.style.borderSpacing="0px";R.style.width="100%"; -var O=document.createElement("tbody"),Q=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(C=mxUtils.indexOf(b.pages,b.currentPage));for(n=e.length-1;0<=n;n--){var S=function(X){var aa=new Date(X.modifiedDate),Y=null;if(0<=aa.getTime()){var Z=function(fa){t.stop();x.innerText="";var ka=mxUtils.parseXml(fa),ha=b.editor.extractGraphModel(ka.documentElement,!0);if(null!=ha){var ra=function(Fa){null!=Fa&&(Fa=la(Editor.parseDiagramNode(Fa)));return Fa},la=function(Fa){var Ga=Fa.getAttribute("background"); -if(null==Ga||""==Ga||Ga==mxConstants.NONE)Ga=z.defaultPageBackgroundColor;m.style.backgroundColor=Ga;(new mxCodec(Fa.ownerDocument)).decode(Fa,z.getModel());z.maxFitScale=1;z.fit(8);z.center();return Fa};T.style.display="none";T.innerText="";J=ka;N=fa;d=parseSelectFunction=null;g=0;if("mxfile"==ha.nodeName){ka=ha.getElementsByTagName("diagram");d=[];for(fa=0;fa<ka.length;fa++)d.push(ka[fa]);g=Math.min(C,d.length-1);0<d.length&&ra(d[g]);if(1<d.length)for(T.removeAttribute("disabled"),T.style.display= -"",fa=0;fa<d.length;fa++)ka=document.createElement("option"),mxUtils.write(ka,d[fa].getAttribute("name")||mxResources.get("pageWithNumber",[fa+1])),ka.setAttribute("value",fa),fa==g&&ka.setAttribute("selected","selected"),T.appendChild(ka);V=function(){try{var Fa=parseInt(T.value);g=C=Fa;ra(d[Fa])}catch(Ga){T.value=C,b.handleError(Ga)}}}else la(ha);fa=X.lastModifyingUserName;null!=fa&&20<fa.length&&(fa=fa.substring(0,20)+"...");F.innerText="";mxUtils.write(F,(null!=fa?fa+" ":"")+aa.toLocaleDateString()+ -" "+aa.toLocaleTimeString());F.setAttribute("title",Y.getAttribute("title"));v.removeAttribute("disabled");u.removeAttribute("disabled");G.removeAttribute("disabled");H.removeAttribute("disabled");M.removeAttribute("disabled");null!=p&&p.isRestricted()||(b.editor.graph.isEnabled()&&U.removeAttribute("disabled"),P.removeAttribute("disabled"),q.removeAttribute("disabled"),W.removeAttribute("disabled"));mxUtils.setOpacity(v,60);mxUtils.setOpacity(u,60);mxUtils.setOpacity(G,60);mxUtils.setOpacity(H,60); -mxUtils.setOpacity(M,60)}else T.style.display="none",T.innerText="",F.innerText="",mxUtils.write(F,mxResources.get("errorLoadingFile")),mxUtils.write(x,mxResources.get("errorLoadingFile"))};Y=document.createElement("tr");Y.style.borderBottom="1px solid lightGray";Y.style.fontSize="12px";Y.style.cursor="pointer";var ba=document.createElement("td");ba.style.padding="6px";ba.style.whiteSpace="nowrap";X==e[e.length-1]?mxUtils.write(ba,mxResources.get("current")):aa.toDateString()===Q?mxUtils.write(ba, -aa.toLocaleTimeString()):mxUtils.write(ba,aa.toLocaleDateString()+" "+aa.toLocaleTimeString());Y.appendChild(ba);Y.setAttribute("title",aa.toLocaleDateString()+" "+aa.toLocaleTimeString()+(null!=X.fileSize?" "+b.formatFileSize(parseInt(X.fileSize)):"")+(null!=X.lastModifyingUserName?" "+X.lastModifyingUserName:""));mxEvent.addListener(Y,"click",function(fa){B!=X&&(t.stop(),null!=y&&(y.style.backgroundColor=""),B=X,y=Y,y.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",N=J=null,F.removeAttribute("title"), -F.innerText=mxResources.get("loading")+"...",m.style.backgroundColor=z.defaultPageBackgroundColor,x.innerText="",z.getModel().clear(),U.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"),W.setAttribute("disabled","disabled"),q.setAttribute("disabled","disabled"),T.setAttribute("disabled", -"disabled"),mxUtils.setOpacity(v,20),mxUtils.setOpacity(u,20),mxUtils.setOpacity(G,20),mxUtils.setOpacity(H,20),mxUtils.setOpacity(M,20),t.spin(m),X.getXml(function(ka){if(B==X)try{Z(ka)}catch(ha){F.innerText=mxResources.get("error")+": "+ha.message}},function(ka){t.stop();T.style.display="none";T.innerText="";F.innerText="";mxUtils.write(F,mxResources.get("errorLoadingFile"));mxUtils.write(x,mxResources.get("errorLoadingFile"))}),mxEvent.consume(fa))});mxEvent.addListener(Y,"dblclick",function(fa){q.click(); -window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(fa)},!1);O.appendChild(Y)}return Y}(e[n]);null!=S&&n==e.length-1&&(L=S)}R.appendChild(O);l.appendChild(R)}else null==p||null==b.drive&&p.constructor==window.DriveFile||null==b.dropbox&&p.constructor==window.DropboxFile?(m.style.display="none",D.style.display="none",mxUtils.write(l,mxResources.get("notAvailable"))):(m.style.display="none",D.style.display="none",mxUtils.write(l, -mxResources.get("noRevisions")));this.init=function(){null!=L&&L.click()};l=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});l.className="geBtn";D.appendChild(T);D.appendChild(v);D.appendChild(u);D.appendChild(H);D.appendChild(G);D.appendChild(M);b.editor.cancelFirst?(A.appendChild(l),A.appendChild(P),A.appendChild(W),A.appendChild(U),A.appendChild(q)):(A.appendChild(P),A.appendChild(W),A.appendChild(U),A.appendChild(q),A.appendChild(l));c.appendChild(A);c.appendChild(D);c.appendChild(F); -this.container=c},DraftDialog=function(b,e,f,c,l,m,x,z,C){var d=document.createElement("div"),g=document.createElement("div");g.style.marginTop="0px";g.style.whiteSpace="nowrap";g.style.overflow="auto";g.style.lineHeight="normal";mxUtils.write(g,e);d.appendChild(g);var k=document.createElement("select"),n=mxUtils.bind(this,function(){B=mxUtils.parseXml(C[k.value].data);J=b.editor.extractGraphModel(B.documentElement,!0);N=0;this.init()});if(null!=C){k.style.marginLeft="4px";for(e=0;e<C.length;e++){var t= -document.createElement("option");t.setAttribute("value",e);var p=new Date(C[e].created),A=new Date(C[e].modified);mxUtils.write(t,p.toLocaleDateString()+" "+p.toLocaleTimeString()+" - "+(p.toDateString(),A.toDateString(),A.toLocaleDateString())+" "+A.toLocaleTimeString());k.appendChild(t)}g.appendChild(k);mxEvent.addListener(k,"change",n)}null==f&&(f=C[0].data);var E=document.createElement("div");E.style.position="absolute";E.style.border="1px solid lightGray";E.style.marginTop="10px";E.style.left= -"40px";E.style.right="40px";E.style.top="46px";E.style.bottom="74px";E.style.overflow="hidden";mxEvent.disableContextMenu(E);d.appendChild(E);var y=new Graph(E);y.setEnabled(!1);y.setPanning(!0);y.panningHandler.ignoreCell=!0;y.panningHandler.useLeftButtonForPanning=!0;y.minFitScale=null;y.maxFitScale=null;y.centerZoom=!0;var B=mxUtils.parseXml(f),J=b.editor.extractGraphModel(B.documentElement,!0),N=0,v=null,u=y.getGlobalVariable;y.getGlobalVariable=function(H){return"page"==H&&null!=v&&null!=v[N]? -v[N].getAttribute("name"):"pagenumber"==H?N+1:"pagecount"==H?null!=v?v.length:1:u.apply(this,arguments)};y.getLinkForCell=function(){return null};f=mxUtils.button("",function(){y.zoomIn()});f.className="geSprite geSprite-zoomin";f.setAttribute("title",mxResources.get("zoomIn"));f.style.outline="none";f.style.border="none";f.style.margin="2px";mxUtils.setOpacity(f,60);g=mxUtils.button("",function(){y.zoomOut()});g.className="geSprite geSprite-zoomout";g.setAttribute("title",mxResources.get("zoomOut")); -g.style.outline="none";g.style.border="none";g.style.margin="2px";mxUtils.setOpacity(g,60);e=mxUtils.button("",function(){y.maxFitScale=8;y.fit(8);y.center()});e.className="geSprite geSprite-fit";e.setAttribute("title",mxResources.get("fit"));e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,60);t=mxUtils.button("",function(){y.zoomActual();y.center()});t.className="geSprite geSprite-actualsize";t.setAttribute("title",mxResources.get("actualSize"));t.style.outline= -"none";t.style.border="none";t.style.margin="2px";mxUtils.setOpacity(t,60);x=mxUtils.button(x||mxResources.get("discard"),function(){l.apply(this,[k.value,mxUtils.bind(this,function(){null!=k.parentNode&&(k.options[k.selectedIndex].parentNode.removeChild(k.options[k.selectedIndex]),0<k.options.length?(k.value=k.options[0].value,n()):b.hideDialog(!0))})])});x.className="geBtn";var G=document.createElement("select");G.style.maxWidth="80px";G.style.position="relative";G.style.top="-2px";G.style.verticalAlign= +new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(J.documentElement)),b.openLink(b.getUrl(),null,!0))});W.className="geBtn";W.setAttribute("disabled","disabled");null!=f&&(W.style.display="none");var t=mxUtils.button(mxResources.get("show"),function(){null!=B&&b.openLink(B.getUrl(T.selectedIndex))});t.className="geBtn gePrimaryBtn";t.setAttribute("disabled","disabled");null!=f&&(t.style.display="none",U.className="geBtn gePrimaryBtn");A=document.createElement("div"); +A.style.position="absolute";A.style.top="482px";A.style.width="640px";A.style.textAlign="right";var C=document.createElement("div");C.className="geToolbarContainer";C.style.backgroundColor="transparent";C.style.padding="2px";C.style.border="none";C.style.left="199px";C.style.top="442px";var N=null;if(null!=e&&0<e.length){m.style.cursor="move";var R=document.createElement("table");R.style.border="1px solid lightGray";R.style.borderCollapse="collapse";R.style.borderSpacing="0px";R.style.width="100%"; +var O=document.createElement("tbody"),P=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(D=mxUtils.indexOf(b.pages,b.currentPage));for(n=e.length-1;0<=n;n--){var S=function(X){var aa=new Date(X.modifiedDate),Y=null;if(0<=aa.getTime()){var Z=function(ea){q.stop();x.innerText="";var ma=mxUtils.parseXml(ea),ia=b.editor.extractGraphModel(ma.documentElement,!0);if(null!=ia){var pa=function(Fa){null!=Fa&&(Fa=na(Editor.parseDiagramNode(Fa)));return Fa},na=function(Fa){var Ga=Fa.getAttribute("background"); +if(null==Ga||""==Ga||Ga==mxConstants.NONE)Ga=y.defaultPageBackgroundColor;m.style.backgroundColor=Ga;(new mxCodec(Fa.ownerDocument)).decode(Fa,y.getModel());y.maxFitScale=1;y.fit(8);y.center();return Fa};T.style.display="none";T.innerText="";J=ma;M=ea;d=parseSelectFunction=null;g=0;if("mxfile"==ia.nodeName){ma=ia.getElementsByTagName("diagram");d=[];for(ea=0;ea<ma.length;ea++)d.push(ma[ea]);g=Math.min(D,d.length-1);0<d.length&&pa(d[g]);if(1<d.length)for(T.removeAttribute("disabled"),T.style.display= +"",ea=0;ea<d.length;ea++)ma=document.createElement("option"),mxUtils.write(ma,d[ea].getAttribute("name")||mxResources.get("pageWithNumber",[ea+1])),ma.setAttribute("value",ea),ea==g&&ma.setAttribute("selected","selected"),T.appendChild(ma);V=function(){try{var Fa=parseInt(T.value);g=D=Fa;pa(d[Fa])}catch(Ga){T.value=D,b.handleError(Ga)}}}else na(ia);ea=X.lastModifyingUserName;null!=ea&&20<ea.length&&(ea=ea.substring(0,20)+"...");H.innerText="";mxUtils.write(H,(null!=ea?ea+" ":"")+aa.toLocaleDateString()+ +" "+aa.toLocaleTimeString());H.setAttribute("title",Y.getAttribute("title"));v.removeAttribute("disabled");u.removeAttribute("disabled");G.removeAttribute("disabled");I.removeAttribute("disabled");F.removeAttribute("disabled");null!=p&&p.isRestricted()||(b.editor.graph.isEnabled()&&U.removeAttribute("disabled"),Q.removeAttribute("disabled"),t.removeAttribute("disabled"),W.removeAttribute("disabled"));mxUtils.setOpacity(v,60);mxUtils.setOpacity(u,60);mxUtils.setOpacity(G,60);mxUtils.setOpacity(I,60); +mxUtils.setOpacity(F,60)}else T.style.display="none",T.innerText="",H.innerText="",mxUtils.write(H,mxResources.get("errorLoadingFile")),mxUtils.write(x,mxResources.get("errorLoadingFile"))};Y=document.createElement("tr");Y.style.borderBottom="1px solid lightGray";Y.style.fontSize="12px";Y.style.cursor="pointer";var ba=document.createElement("td");ba.style.padding="6px";ba.style.whiteSpace="nowrap";X==e[e.length-1]?mxUtils.write(ba,mxResources.get("current")):aa.toDateString()===P?mxUtils.write(ba, +aa.toLocaleTimeString()):mxUtils.write(ba,aa.toLocaleDateString()+" "+aa.toLocaleTimeString());Y.appendChild(ba);Y.setAttribute("title",aa.toLocaleDateString()+" "+aa.toLocaleTimeString()+(null!=X.fileSize?" "+b.formatFileSize(parseInt(X.fileSize)):"")+(null!=X.lastModifyingUserName?" "+X.lastModifyingUserName:""));mxEvent.addListener(Y,"click",function(ea){B!=X&&(q.stop(),null!=z&&(z.style.backgroundColor=""),B=X,z=Y,z.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",M=J=null,H.removeAttribute("title"), +H.innerText=mxResources.get("loading")+"...",m.style.backgroundColor=y.defaultPageBackgroundColor,x.innerText="",y.getModel().clear(),U.setAttribute("disabled","disabled"),Q.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),W.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"),T.setAttribute("disabled", +"disabled"),mxUtils.setOpacity(v,20),mxUtils.setOpacity(u,20),mxUtils.setOpacity(G,20),mxUtils.setOpacity(I,20),mxUtils.setOpacity(F,20),q.spin(m),X.getXml(function(ma){if(B==X)try{Z(ma)}catch(ia){H.innerText=mxResources.get("error")+": "+ia.message}},function(ma){q.stop();T.style.display="none";T.innerText="";H.innerText="";mxUtils.write(H,mxResources.get("errorLoadingFile"));mxUtils.write(x,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ea))});mxEvent.addListener(Y,"dblclick",function(ea){t.click(); +window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ea)},!1);O.appendChild(Y)}return Y}(e[n]);null!=S&&n==e.length-1&&(N=S)}R.appendChild(O);l.appendChild(R)}else null==p||null==b.drive&&p.constructor==window.DriveFile||null==b.dropbox&&p.constructor==window.DropboxFile?(m.style.display="none",C.style.display="none",mxUtils.write(l,mxResources.get("notAvailable"))):(m.style.display="none",C.style.display="none",mxUtils.write(l, +mxResources.get("noRevisions")));this.init=function(){null!=N&&N.click()};l=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});l.className="geBtn";C.appendChild(T);C.appendChild(v);C.appendChild(u);C.appendChild(I);C.appendChild(G);C.appendChild(F);b.editor.cancelFirst?(A.appendChild(l),A.appendChild(Q),A.appendChild(W),A.appendChild(U),A.appendChild(t)):(A.appendChild(Q),A.appendChild(W),A.appendChild(U),A.appendChild(t),A.appendChild(l));c.appendChild(A);c.appendChild(C);c.appendChild(H); +this.container=c},DraftDialog=function(b,e,f,c,l,m,x,y,D){var d=document.createElement("div"),g=document.createElement("div");g.style.marginTop="0px";g.style.whiteSpace="nowrap";g.style.overflow="auto";g.style.lineHeight="normal";mxUtils.write(g,e);d.appendChild(g);var k=document.createElement("select"),n=mxUtils.bind(this,function(){B=mxUtils.parseXml(D[k.value].data);J=b.editor.extractGraphModel(B.documentElement,!0);M=0;this.init()});if(null!=D){k.style.marginLeft="4px";for(e=0;e<D.length;e++){var q= +document.createElement("option");q.setAttribute("value",e);var p=new Date(D[e].created),A=new Date(D[e].modified);mxUtils.write(q,p.toLocaleDateString()+" "+p.toLocaleTimeString()+" - "+(p.toDateString(),A.toDateString(),A.toLocaleDateString())+" "+A.toLocaleTimeString());k.appendChild(q)}g.appendChild(k);mxEvent.addListener(k,"change",n)}null==f&&(f=D[0].data);var E=document.createElement("div");E.style.position="absolute";E.style.border="1px solid lightGray";E.style.marginTop="10px";E.style.left= +"40px";E.style.right="40px";E.style.top="46px";E.style.bottom="74px";E.style.overflow="hidden";mxEvent.disableContextMenu(E);d.appendChild(E);var z=new Graph(E);z.setEnabled(!1);z.setPanning(!0);z.panningHandler.ignoreCell=!0;z.panningHandler.useLeftButtonForPanning=!0;z.minFitScale=null;z.maxFitScale=null;z.centerZoom=!0;var B=mxUtils.parseXml(f),J=b.editor.extractGraphModel(B.documentElement,!0),M=0,v=null,u=z.getGlobalVariable;z.getGlobalVariable=function(I){return"page"==I&&null!=v&&null!=v[M]? +v[M].getAttribute("name"):"pagenumber"==I?M+1:"pagecount"==I?null!=v?v.length:1:u.apply(this,arguments)};z.getLinkForCell=function(){return null};f=mxUtils.button("",function(){z.zoomIn()});f.className="geSprite geSprite-zoomin";f.setAttribute("title",mxResources.get("zoomIn"));f.style.outline="none";f.style.border="none";f.style.margin="2px";mxUtils.setOpacity(f,60);g=mxUtils.button("",function(){z.zoomOut()});g.className="geSprite geSprite-zoomout";g.setAttribute("title",mxResources.get("zoomOut")); +g.style.outline="none";g.style.border="none";g.style.margin="2px";mxUtils.setOpacity(g,60);e=mxUtils.button("",function(){z.maxFitScale=8;z.fit(8);z.center()});e.className="geSprite geSprite-fit";e.setAttribute("title",mxResources.get("fit"));e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,60);q=mxUtils.button("",function(){z.zoomActual();z.center()});q.className="geSprite geSprite-actualsize";q.setAttribute("title",mxResources.get("actualSize"));q.style.outline= +"none";q.style.border="none";q.style.margin="2px";mxUtils.setOpacity(q,60);x=mxUtils.button(x||mxResources.get("discard"),function(){l.apply(this,[k.value,mxUtils.bind(this,function(){null!=k.parentNode&&(k.options[k.selectedIndex].parentNode.removeChild(k.options[k.selectedIndex]),0<k.options.length?(k.value=k.options[0].value,n()):b.hideDialog(!0))})])});x.className="geBtn";var G=document.createElement("select");G.style.maxWidth="80px";G.style.position="relative";G.style.top="-2px";G.style.verticalAlign= "bottom";G.style.marginRight="6px";G.style.display="none";m=mxUtils.button(m||mxResources.get("edit"),function(){c.apply(this,[k.value])});m.className="geBtn gePrimaryBtn";p=document.createElement("div");p.style.position="absolute";p.style.bottom="30px";p.style.right="40px";p.style.textAlign="right";A=document.createElement("div");A.className="geToolbarContainer";A.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init= -function(){function H(F){if(null!=F){var P=F.getAttribute("background");if(null==P||""==P||P==mxConstants.NONE)P=Editor.isDarkMode()?"transparent":"#ffffff";E.style.backgroundColor=P;(new mxCodec(F.ownerDocument)).decode(F,y.getModel());y.maxFitScale=1;y.fit(8);y.center()}return F}function M(F){null!=F&&(F=H(Editor.parseDiagramNode(F)));return F}mxEvent.addListener(G,"change",function(F){N=parseInt(G.value);M(v[N]);mxEvent.consume(F)});if("mxfile"==J.nodeName){var K=J.getElementsByTagName("diagram"); -v=[];for(var I=0;I<K.length;I++)v.push(K[I]);0<v.length&&M(v[N]);G.innerText="";if(1<v.length)for(G.style.display="",I=0;I<v.length;I++)K=document.createElement("option"),mxUtils.write(K,v[I].getAttribute("name")||mxResources.get("pageWithNumber",[I+1])),K.setAttribute("value",I),I==N&&K.setAttribute("selected","selected"),G.appendChild(K);else G.style.display="none"}else H(J)};A.appendChild(G);A.appendChild(f);A.appendChild(g);A.appendChild(t);A.appendChild(e);f=mxUtils.button(mxResources.get("cancel"), -function(){b.hideDialog(!0)});f.className="geBtn";z=null!=z?mxUtils.button(mxResources.get("ignore"),z):null;null!=z&&(z.className="geBtn");b.editor.cancelFirst?(p.appendChild(f),null!=z&&p.appendChild(z),p.appendChild(x),p.appendChild(m)):(p.appendChild(m),p.appendChild(x),null!=z&&p.appendChild(z),p.appendChild(f));d.appendChild(p);d.appendChild(A);this.container=d},FindWindow=function(b,e,f,c,l,m){function x(V,W,q,D){if("object"===typeof W.value&&null!=W.value.attributes){W=W.value.attributes; -for(var L=0;L<W.length;L++)if("label"!=W[L].nodeName){var R=mxUtils.trim(W[L].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==V&&(D&&0<=R.indexOf(q)||!D&&R.substring(0,q.length)===q)||null!=V&&V.test(R))return!0}}return!1}function z(){t&&v.value?(P.removeAttribute("disabled"),U.removeAttribute("disabled")):(P.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"));v.value&&N.value?T.removeAttribute("disabled"):T.setAttribute("disabled","disabled")}function C(V, -W,q){I.innerText="";var D=g.model.getDescendants(g.model.getRoot()),L=N.value.toLowerCase(),R=u.checked?new RegExp(L):null,O=null;A=null;k!=L&&(k=L,n=null,p=!1);var Q=null==n;if(0<L.length){if(p){p=!1;for(var S,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){S=X;break}V=(S+1)%b.pages.length;n=null;do p=!1,D=b.pages[V],g=b.createTemporaryGraph(g.getStylesheet()),b.updatePageRoot(D),g.model.setRoot(D.root),V=(V+1)%b.pages.length;while(!C(!0,W,q)&&V!=S);n&&(n=null,q?b.editor.graph.model.execute(new SelectPage(b, -D)):b.selectPage(D));p=!1;g=b.editor.graph;return C(!0,W,q)}for(X=0;X<D.length;X++){S=g.view.getState(D[X]);W&&null!=R&&(Q=Q||S==n);if(null!=S&&null!=S.cell.value&&(Q||null==O)&&(g.model.isVertex(S.cell)||g.model.isEdge(S.cell))){null!=S.style&&"1"==S.style.html?(H.innerHTML=g.sanitizeHtml(g.getLabel(S.cell)),label=mxUtils.extractTextWithWhitespace([H])):label=g.getLabel(S.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var aa=0;W&&m&&null!=R&&S==n&&(label=label.substr(E), -aa=E);var Y=""==v.value,Z=Y;if(null==R&&(Z&&0<=label.indexOf(L)||!Z&&label.substring(0,L.length)===L||Y&&x(R,S.cell,L,Z))||null!=R&&(R.test(label)||Y&&x(R,S.cell,L,Z)))if(m&&(null!=R?(Y=label.match(R),null!=Y&&0<Y.length&&(A=Y[0].toLowerCase(),E=aa+Y.index+A.length)):(A=L,E=A.length)),Q){O=S;break}else null==O&&(O=S)}Q=Q||S==n}}if(null!=O){if(X==D.length&&G.checked)return n=null,p=!0,C(!0,W,q);n=O;g.scrollCellToVisible(n.cell);g.isEnabled()&&!g.isCellLocked(n.cell)?q||g.getSelectionCell()==n.cell&& -1==g.getSelectionCount()||g.setSelectionCell(n.cell):g.highlightCell(n.cell)}else{if(!V&&G.checked)return p=!0,C(!0,W,q);g.isEnabled()&&!q&&g.clearSelection()}t=null!=O;m&&!V&&z();return 0==L.length||null!=O}var d=b.actions.get("findReplace"),g=b.editor.graph,k=null,n=null,t=!1,p=!1,A=null,E=0,y=1,B=document.createElement("div");B.style.userSelect="none";B.style.overflow="hidden";B.style.padding="10px";B.style.height="100%";var J=m?"260px":"200px",N=document.createElement("input");N.setAttribute("placeholder", -mxResources.get("find"));N.setAttribute("type","text");N.style.marginTop="4px";N.style.marginBottom="6px";N.style.width=J;N.style.fontSize="12px";N.style.borderRadius="4px";N.style.padding="6px";B.appendChild(N);mxUtils.br(B);if(m){var v=document.createElement("input");v.setAttribute("placeholder",mxResources.get("replaceWith"));v.setAttribute("type","text");v.style.marginTop="4px";v.style.marginBottom="6px";v.style.width=J;v.style.fontSize="12px";v.style.borderRadius="4px";v.style.padding="6px"; -B.appendChild(v);mxUtils.br(B);mxEvent.addListener(v,"input",z)}var u=document.createElement("input");u.setAttribute("id","geFindWinRegExChck");u.setAttribute("type","checkbox");u.style.marginRight="4px";B.appendChild(u);J=document.createElement("label");J.setAttribute("for","geFindWinRegExChck");B.appendChild(J);mxUtils.write(J,mxResources.get("regularExpression"));B.appendChild(J);J=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");J.style.position="relative";J.style.marginLeft= -"6px";J.style.top="-1px";B.appendChild(J);mxUtils.br(B);var G=document.createElement("input");G.setAttribute("id","geFindWinAllPagesChck");G.setAttribute("type","checkbox");G.style.marginRight="4px";B.appendChild(G);J=document.createElement("label");J.setAttribute("for","geFindWinAllPagesChck");B.appendChild(J);mxUtils.write(J,mxResources.get("allPages"));B.appendChild(J);var H=document.createElement("div");mxUtils.br(B);J=document.createElement("div");J.style.left="0px";J.style.right="0px";J.style.marginTop= -"6px";J.style.padding="0 6px 0 6px";J.style.textAlign="center";B.appendChild(J);var M=mxUtils.button(mxResources.get("reset"),function(){I.innerText="";N.value="";N.style.backgroundColor="";m&&(v.value="",z());k=n=null;p=!1;N.focus()});M.setAttribute("title",mxResources.get("reset"));M.style.float="none";M.style.width="120px";M.style.marginTop="6px";M.style.marginLeft="8px";M.style.overflow="hidden";M.style.textOverflow="ellipsis";M.className="geBtn";m||J.appendChild(M);var K=mxUtils.button(mxResources.get("find"), -function(){try{N.style.backgroundColor=C()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(V){b.handleError(V)}});K.setAttribute("title",mxResources.get("find")+" (Enter)");K.style.float="none";K.style.width="120px";K.style.marginTop="6px";K.style.marginLeft="8px";K.style.overflow="hidden";K.style.textOverflow="ellipsis";K.className="geBtn gePrimaryBtn";J.appendChild(K);var I=document.createElement("div");I.style.marginTop="10px";if(m){var F=function(V,W,q,D,L){if(null==L||"1"!=L.html)return D=V.toLowerCase().indexOf(W, -D),0>D?V:V.substr(0,D)+q+V.substr(D+W.length);var R=V;W=mxUtils.htmlEntities(W);L=[];var O=-1;for(V=V.replace(/<br>/ig,"\n");-1<(O=V.indexOf("<",O+1));)L.push(O);O=V.match(/<[^>]*>/g);V=V.replace(/<[^>]*>/g,"");D=V.toLowerCase().indexOf(W,D);if(0>D)return R;R=D+W.length;q=mxUtils.htmlEntities(q);V=V.substr(0,D)+q+V.substr(R);for(var Q=0,S=0;S<L.length;S++){if(L[S]-Q<D)V=V.substr(0,L[S])+O[S]+V.substr(L[S]);else{var X=L[S]-Q<R?D+Q:L[S]+(q.length-W.length);V=V.substr(0,X)+O[S]+V.substr(X)}Q+=O[S].length}return V.replace(/\n/g, -"<br>")},P=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=A&&null!=n&&v.value){var V=n.cell,W=g.getLabel(V);g.isCellEditable(V)&&g.model.setValue(V,F(W,A,v.value,E-A.length,g.getCurrentCellStyle(V)));N.style.backgroundColor=C(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(q){b.handleError(q)}});P.setAttribute("title",mxResources.get("replFind"));P.style.float="none";P.style.width="120px";P.style.marginTop="6px";P.style.marginLeft="8px";P.style.overflow="hidden";P.style.textOverflow= -"ellipsis";P.className="geBtn gePrimaryBtn";P.setAttribute("disabled","disabled");J.appendChild(P);mxUtils.br(J);var U=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=A&&null!=n&&v.value){var V=n.cell,W=g.getLabel(V);g.model.setValue(V,F(W,A,v.value,E-A.length,g.getCurrentCellStyle(V)));P.setAttribute("disabled","disabled");U.setAttribute("disabled","disabled")}}catch(q){b.handleError(q)}});U.setAttribute("title",mxResources.get("replace"));U.style.float="none";U.style.width="120px"; -U.style.marginTop="6px";U.style.marginLeft="8px";U.style.overflow="hidden";U.style.textOverflow="ellipsis";U.className="geBtn gePrimaryBtn";U.setAttribute("disabled","disabled");J.appendChild(U);var T=mxUtils.button(mxResources.get("replaceAll"),function(){I.innerText="";if(v.value){k=null;var V=b.currentPage,W=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;g.getModel().beginUpdate();try{for(var q=0,D={};C(!1,!0,!0)&&100>q;){var L=n.cell,R=g.getLabel(L),O=D[L.id];if(O&&O.replAllMrk== -y&&O.replAllPos>=E)break;D[L.id]={replAllMrk:y,replAllPos:E};g.isCellEditable(L)&&(g.model.setValue(L,F(R,A,v.value,E-A.length,g.getCurrentCellStyle(L))),q++)}V!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,V));mxUtils.write(I,mxResources.get("matchesRepl",[q]))}catch(Q){b.handleError(Q)}finally{g.getModel().endUpdate(),b.editor.graph.setSelectionCells(W),b.editor.graph.rendering=!0}y++}});T.setAttribute("title",mxResources.get("replaceAll"));T.style.float="none";T.style.width="120px"; -T.style.marginTop="6px";T.style.marginLeft="8px";T.style.overflow="hidden";T.style.textOverflow="ellipsis";T.className="geBtn gePrimaryBtn";T.setAttribute("disabled","disabled");J.appendChild(T);mxUtils.br(J);J.appendChild(M);M=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));M.setAttribute("title",mxResources.get("close"));M.style.float="none";M.style.width="120px";M.style.marginTop="6px";M.style.marginLeft="8px";M.style.overflow="hidden";M.style.textOverflow= -"ellipsis";M.className="geBtn";J.appendChild(M);mxUtils.br(J);J.appendChild(I)}else M.style.width="90px",K.style.width="90px";mxEvent.addListener(N,"keyup",function(V){if(91==V.keyCode||93==V.keyCode||17==V.keyCode)mxEvent.consume(V);else if(27==V.keyCode)d.funct();else if(k!=N.value.toLowerCase()||13==V.keyCode)try{N.style.backgroundColor=C()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(W){N.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(B,"keydown",function(V){70== -V.keyCode&&b.keyHandler.isControlDown(V)&&!mxEvent.isShiftDown(V)&&(d.funct(),mxEvent.consume(V))});this.window=new mxWindow(mxResources.get("find")+(m?"/"+mxResources.get("replace"):""),B,e,f,c,l,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(N.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?N.select(): -document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?G.removeAttribute("disabled"):(G.checked=!1,G.setAttribute("disabled","disabled"))):g.container.focus()}));b.installResizeHandler(this,!1)},FreehandWindow=function(b,e,f,c,l,m){var x=b.editor.graph,z=document.createElement("div");z.style.textAlign="center";z.style.userSelect="none";z.style.overflow="hidden";z.style.height="100%";if(m){var C=document.createElement("input");C.setAttribute("id","geFreehandBrush");C.setAttribute("type", -"checkbox");C.checked=x.freehand.isPerfectFreehandMode();C.style.margin="10px 5px 0px 10px";C.style.float="left";z.appendChild(C);var d=document.createElement("label");d.setAttribute("for","geFreehandBrush");d.style.float="left";d.style.marginTop="10px";z.appendChild(d);mxUtils.write(d,mxResources.get("brush"));z.appendChild(d);mxUtils.br(z);var g=document.createElement("input");g.setAttribute("type","range");g.setAttribute("min","2");g.setAttribute("max","30");g.setAttribute("value",x.freehand.getBrushSize()); -g.style.width="90%";g.style.visibility="hidden";z.appendChild(g);mxUtils.br(z);d=function(){x.freehand.setPerfectFreehandMode(C.checked);g.style.visibility=C.checked?"visible":"hidden"};mxEvent.addListener(C,"change",d);d();mxEvent.addListener(g,"change",function(){x.freehand.setBrushSize(parseInt(this.value))})}var k=mxUtils.button(mxResources.get("startDrawing"),function(){x.freehand.isDrawing()?x.freehand.stopDrawing():x.freehand.startDrawing()});k.setAttribute("title",mxResources.get("startDrawing")); -k.style.marginTop=m?"5px":"10px";k.style.width="90%";k.style.boxSizing="border-box";k.style.overflow="hidden";k.style.textOverflow="ellipsis";k.style.textAlign="center";k.className="geBtn gePrimaryBtn";z.appendChild(k);this.window=new mxWindow(mxResources.get("freehand"),z,e,f,c,l,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);x.addListener("freehandStateChanged",mxUtils.bind(this,function(){k.innerText="";mxUtils.write(k, +function(){function I(H){if(null!=H){var Q=H.getAttribute("background");if(null==Q||""==Q||Q==mxConstants.NONE)Q=Editor.isDarkMode()?"transparent":"#ffffff";E.style.backgroundColor=Q;(new mxCodec(H.ownerDocument)).decode(H,z.getModel());z.maxFitScale=1;z.fit(8);z.center()}return H}function F(H){null!=H&&(H=I(Editor.parseDiagramNode(H)));return H}mxEvent.addListener(G,"change",function(H){M=parseInt(G.value);F(v[M]);mxEvent.consume(H)});if("mxfile"==J.nodeName){var L=J.getElementsByTagName("diagram"); +v=[];for(var K=0;K<L.length;K++)v.push(L[K]);0<v.length&&F(v[M]);G.innerText="";if(1<v.length)for(G.style.display="",K=0;K<v.length;K++)L=document.createElement("option"),mxUtils.write(L,v[K].getAttribute("name")||mxResources.get("pageWithNumber",[K+1])),L.setAttribute("value",K),K==M&&L.setAttribute("selected","selected"),G.appendChild(L);else G.style.display="none"}else I(J)};A.appendChild(G);A.appendChild(f);A.appendChild(g);A.appendChild(q);A.appendChild(e);f=mxUtils.button(mxResources.get("cancel"), +function(){b.hideDialog(!0)});f.className="geBtn";y=null!=y?mxUtils.button(mxResources.get("ignore"),y):null;null!=y&&(y.className="geBtn");b.editor.cancelFirst?(p.appendChild(f),null!=y&&p.appendChild(y),p.appendChild(x),p.appendChild(m)):(p.appendChild(m),p.appendChild(x),null!=y&&p.appendChild(y),p.appendChild(f));d.appendChild(p);d.appendChild(A);this.container=d},FindWindow=function(b,e,f,c,l,m){function x(V,W,t,C){if("object"===typeof W.value&&null!=W.value.attributes){W=W.value.attributes; +for(var N=0;N<W.length;N++)if("label"!=W[N].nodeName){var R=mxUtils.trim(W[N].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==V&&(C&&0<=R.indexOf(t)||!C&&R.substring(0,t.length)===t)||null!=V&&V.test(R))return!0}}return!1}function y(){q&&v.value?(Q.removeAttribute("disabled"),U.removeAttribute("disabled")):(Q.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"));v.value&&M.value?T.removeAttribute("disabled"):T.setAttribute("disabled","disabled")}function D(V, +W,t){K.innerText="";var C=g.model.getDescendants(g.model.getRoot()),N=M.value.toLowerCase(),R=u.checked?new RegExp(N):null,O=null;A=null;k!=N&&(k=N,n=null,p=!1);var P=null==n;if(0<N.length){if(p){p=!1;for(var S,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){S=X;break}V=(S+1)%b.pages.length;n=null;do p=!1,C=b.pages[V],g=b.createTemporaryGraph(g.getStylesheet()),b.updatePageRoot(C),g.model.setRoot(C.root),V=(V+1)%b.pages.length;while(!D(!0,W,t)&&V!=S);n&&(n=null,t?b.editor.graph.model.execute(new SelectPage(b, +C)):b.selectPage(C));p=!1;g=b.editor.graph;return D(!0,W,t)}for(X=0;X<C.length;X++){S=g.view.getState(C[X]);W&&null!=R&&(P=P||S==n);if(null!=S&&null!=S.cell.value&&(P||null==O)&&(g.model.isVertex(S.cell)||g.model.isEdge(S.cell))){null!=S.style&&"1"==S.style.html?(I.innerHTML=g.sanitizeHtml(g.getLabel(S.cell)),label=mxUtils.extractTextWithWhitespace([I])):label=g.getLabel(S.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var aa=0;W&&m&&null!=R&&S==n&&(label=label.substr(E), +aa=E);var Y=""==v.value,Z=Y;if(null==R&&(Z&&0<=label.indexOf(N)||!Z&&label.substring(0,N.length)===N||Y&&x(R,S.cell,N,Z))||null!=R&&(R.test(label)||Y&&x(R,S.cell,N,Z)))if(m&&(null!=R?(Y=label.match(R),null!=Y&&0<Y.length&&(A=Y[0].toLowerCase(),E=aa+Y.index+A.length)):(A=N,E=A.length)),P){O=S;break}else null==O&&(O=S)}P=P||S==n}}if(null!=O){if(X==C.length&&G.checked)return n=null,p=!0,D(!0,W,t);n=O;g.scrollCellToVisible(n.cell);g.isEnabled()&&!g.isCellLocked(n.cell)?t||g.getSelectionCell()==n.cell&& +1==g.getSelectionCount()||g.setSelectionCell(n.cell):g.highlightCell(n.cell)}else{if(!V&&G.checked)return p=!0,D(!0,W,t);g.isEnabled()&&!t&&g.clearSelection()}q=null!=O;m&&!V&&y();return 0==N.length||null!=O}var d=b.actions.get("findReplace"),g=b.editor.graph,k=null,n=null,q=!1,p=!1,A=null,E=0,z=1,B=document.createElement("div");B.style.userSelect="none";B.style.overflow="hidden";B.style.padding="10px";B.style.height="100%";var J=m?"260px":"200px",M=document.createElement("input");M.setAttribute("placeholder", +mxResources.get("find"));M.setAttribute("type","text");M.style.marginTop="4px";M.style.marginBottom="6px";M.style.width=J;M.style.fontSize="12px";M.style.borderRadius="4px";M.style.padding="6px";B.appendChild(M);mxUtils.br(B);if(m){var v=document.createElement("input");v.setAttribute("placeholder",mxResources.get("replaceWith"));v.setAttribute("type","text");v.style.marginTop="4px";v.style.marginBottom="6px";v.style.width=J;v.style.fontSize="12px";v.style.borderRadius="4px";v.style.padding="6px"; +B.appendChild(v);mxUtils.br(B);mxEvent.addListener(v,"input",y)}var u=document.createElement("input");u.setAttribute("id","geFindWinRegExChck");u.setAttribute("type","checkbox");u.style.marginRight="4px";B.appendChild(u);J=document.createElement("label");J.setAttribute("for","geFindWinRegExChck");B.appendChild(J);mxUtils.write(J,mxResources.get("regularExpression"));B.appendChild(J);J=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");J.style.position="relative";J.style.marginLeft= +"6px";J.style.top="-1px";B.appendChild(J);mxUtils.br(B);var G=document.createElement("input");G.setAttribute("id","geFindWinAllPagesChck");G.setAttribute("type","checkbox");G.style.marginRight="4px";B.appendChild(G);J=document.createElement("label");J.setAttribute("for","geFindWinAllPagesChck");B.appendChild(J);mxUtils.write(J,mxResources.get("allPages"));B.appendChild(J);var I=document.createElement("div");mxUtils.br(B);J=document.createElement("div");J.style.left="0px";J.style.right="0px";J.style.marginTop= +"6px";J.style.padding="0 6px 0 6px";J.style.textAlign="center";B.appendChild(J);var F=mxUtils.button(mxResources.get("reset"),function(){K.innerText="";M.value="";M.style.backgroundColor="";m&&(v.value="",y());k=n=null;p=!1;M.focus()});F.setAttribute("title",mxResources.get("reset"));F.style.float="none";F.style.width="120px";F.style.marginTop="6px";F.style.marginLeft="8px";F.style.overflow="hidden";F.style.textOverflow="ellipsis";F.className="geBtn";m||J.appendChild(F);var L=mxUtils.button(mxResources.get("find"), +function(){try{M.style.backgroundColor=D()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(V){b.handleError(V)}});L.setAttribute("title",mxResources.get("find")+" (Enter)");L.style.float="none";L.style.width="120px";L.style.marginTop="6px";L.style.marginLeft="8px";L.style.overflow="hidden";L.style.textOverflow="ellipsis";L.className="geBtn gePrimaryBtn";J.appendChild(L);var K=document.createElement("div");K.style.marginTop="10px";if(m){var H=function(V,W,t,C,N){if(null==N||"1"!=N.html)return C=V.toLowerCase().indexOf(W, +C),0>C?V:V.substr(0,C)+t+V.substr(C+W.length);var R=V;W=mxUtils.htmlEntities(W);N=[];var O=-1;for(V=V.replace(/<br>/ig,"\n");-1<(O=V.indexOf("<",O+1));)N.push(O);O=V.match(/<[^>]*>/g);V=V.replace(/<[^>]*>/g,"");C=V.toLowerCase().indexOf(W,C);if(0>C)return R;R=C+W.length;t=mxUtils.htmlEntities(t);V=V.substr(0,C)+t+V.substr(R);for(var P=0,S=0;S<N.length;S++){if(N[S]-P<C)V=V.substr(0,N[S])+O[S]+V.substr(N[S]);else{var X=N[S]-P<R?C+P:N[S]+(t.length-W.length);V=V.substr(0,X)+O[S]+V.substr(X)}P+=O[S].length}return V.replace(/\n/g, +"<br>")},Q=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=A&&null!=n&&v.value){var V=n.cell,W=g.getLabel(V);g.isCellEditable(V)&&g.model.setValue(V,H(W,A,v.value,E-A.length,g.getCurrentCellStyle(V)));M.style.backgroundColor=D(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(t){b.handleError(t)}});Q.setAttribute("title",mxResources.get("replFind"));Q.style.float="none";Q.style.width="120px";Q.style.marginTop="6px";Q.style.marginLeft="8px";Q.style.overflow="hidden";Q.style.textOverflow= +"ellipsis";Q.className="geBtn gePrimaryBtn";Q.setAttribute("disabled","disabled");J.appendChild(Q);mxUtils.br(J);var U=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=A&&null!=n&&v.value){var V=n.cell,W=g.getLabel(V);g.model.setValue(V,H(W,A,v.value,E-A.length,g.getCurrentCellStyle(V)));Q.setAttribute("disabled","disabled");U.setAttribute("disabled","disabled")}}catch(t){b.handleError(t)}});U.setAttribute("title",mxResources.get("replace"));U.style.float="none";U.style.width="120px"; +U.style.marginTop="6px";U.style.marginLeft="8px";U.style.overflow="hidden";U.style.textOverflow="ellipsis";U.className="geBtn gePrimaryBtn";U.setAttribute("disabled","disabled");J.appendChild(U);var T=mxUtils.button(mxResources.get("replaceAll"),function(){K.innerText="";if(v.value){k=null;var V=b.currentPage,W=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;g.getModel().beginUpdate();try{for(var t=0,C={};D(!1,!0,!0)&&100>t;){var N=n.cell,R=g.getLabel(N),O=C[N.id];if(O&&O.replAllMrk== +z&&O.replAllPos>=E)break;C[N.id]={replAllMrk:z,replAllPos:E};g.isCellEditable(N)&&(g.model.setValue(N,H(R,A,v.value,E-A.length,g.getCurrentCellStyle(N))),t++)}V!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,V));mxUtils.write(K,mxResources.get("matchesRepl",[t]))}catch(P){b.handleError(P)}finally{g.getModel().endUpdate(),b.editor.graph.setSelectionCells(W),b.editor.graph.rendering=!0}z++}});T.setAttribute("title",mxResources.get("replaceAll"));T.style.float="none";T.style.width="120px"; +T.style.marginTop="6px";T.style.marginLeft="8px";T.style.overflow="hidden";T.style.textOverflow="ellipsis";T.className="geBtn gePrimaryBtn";T.setAttribute("disabled","disabled");J.appendChild(T);mxUtils.br(J);J.appendChild(F);F=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));F.setAttribute("title",mxResources.get("close"));F.style.float="none";F.style.width="120px";F.style.marginTop="6px";F.style.marginLeft="8px";F.style.overflow="hidden";F.style.textOverflow= +"ellipsis";F.className="geBtn";J.appendChild(F);mxUtils.br(J);J.appendChild(K)}else F.style.width="90px",L.style.width="90px";mxEvent.addListener(M,"keyup",function(V){if(91==V.keyCode||93==V.keyCode||17==V.keyCode)mxEvent.consume(V);else if(27==V.keyCode)d.funct();else if(k!=M.value.toLowerCase()||13==V.keyCode)try{M.style.backgroundColor=D()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(W){M.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(B,"keydown",function(V){70== +V.keyCode&&b.keyHandler.isControlDown(V)&&!mxEvent.isShiftDown(V)&&(d.funct(),mxEvent.consume(V))});this.window=new mxWindow(mxResources.get("find")+(m?"/"+mxResources.get("replace"):""),B,e,f,c,l,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(M.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?M.select(): +document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?G.removeAttribute("disabled"):(G.checked=!1,G.setAttribute("disabled","disabled"))):g.container.focus()}));b.installResizeHandler(this,!1)},FreehandWindow=function(b,e,f,c,l,m){var x=b.editor.graph,y=document.createElement("div");y.style.textAlign="center";y.style.userSelect="none";y.style.overflow="hidden";y.style.height="100%";if(m){var D=document.createElement("input");D.setAttribute("id","geFreehandBrush");D.setAttribute("type", +"checkbox");D.checked=x.freehand.isPerfectFreehandMode();D.style.margin="10px 5px 0px 10px";D.style.float="left";y.appendChild(D);var d=document.createElement("label");d.setAttribute("for","geFreehandBrush");d.style.float="left";d.style.marginTop="10px";y.appendChild(d);mxUtils.write(d,mxResources.get("brush"));y.appendChild(d);mxUtils.br(y);var g=document.createElement("input");g.setAttribute("type","range");g.setAttribute("min","2");g.setAttribute("max","30");g.setAttribute("value",x.freehand.getBrushSize()); +g.style.width="90%";g.style.visibility="hidden";y.appendChild(g);mxUtils.br(y);d=function(){x.freehand.setPerfectFreehandMode(D.checked);g.style.visibility=D.checked?"visible":"hidden"};mxEvent.addListener(D,"change",d);d();mxEvent.addListener(g,"change",function(){x.freehand.setBrushSize(parseInt(this.value))})}var k=mxUtils.button(mxResources.get("startDrawing"),function(){x.freehand.isDrawing()?x.freehand.stopDrawing():x.freehand.startDrawing()});k.setAttribute("title",mxResources.get("startDrawing")); +k.style.marginTop=m?"5px":"10px";k.style.width="90%";k.style.boxSizing="border-box";k.style.overflow="hidden";k.style.textOverflow="ellipsis";k.style.textAlign="center";k.className="geBtn gePrimaryBtn";y.appendChild(k);this.window=new mxWindow(mxResources.get("freehand"),y,e,f,c,l,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);x.addListener("freehandStateChanged",mxUtils.bind(this,function(){k.innerText="";mxUtils.write(k, mxResources.get(x.freehand.isDrawing()?"stopDrawing":"startDrawing"));k.setAttribute("title",mxResources.get(x.freehand.isDrawing()?"stopDrawing":"startDrawing"));k.className="geBtn"+(x.freehand.isDrawing()?"":" gePrimaryBtn")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){x.freehand.isDrawing()&&x.freehand.stopDrawing()}));b.installResizeHandler(this,!1)},TagsWindow=function(b,e,f,c,l){var m=b.editor.graph, -x=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(C,d){if(m.isEnabled()){var g=new FilenameDialog(b,"",mxResources.get("add"),function(k){b.hideDialog();if(null!=k&&0<k.length){k=k.split(" ");for(var n=[],t=0;t<k.length;t++){var p=mxUtils.trim(k[t]);""!=p&&0>mxUtils.indexOf(C,p)&&n.push(p)}0<n.length&&(m.isSelectionEmpty()?d(C.concat(n)):m.addTagsForCells(m.getSelectionCells(),n))}},mxResources.get("enterValue")+" ("+mxResources.get("tags")+ -")");b.showDialog(g.container,300,80,!0,!0);g.init()}}),z=x.div;this.window=new mxWindow(mxResources.get("tags"),z,e,f,c,l,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){x.refresh();this.window.fit()}));b.installResizeHandler(this,!0)},AuthDialog=function(b,e,f,c){var l=document.createElement("div");l.style.textAlign= -"center";var m=document.createElement("p");m.style.fontSize="16pt";m.style.padding="0px";m.style.margin="0px";m.style.color="gray";mxUtils.write(m,mxResources.get("authorizationRequired"));var x="Unknown",z=document.createElement("img");z.setAttribute("border","0");z.setAttribute("align","absmiddle");z.style.marginRight="10px";e==b.drive?(x=mxResources.get("googleDrive"),z.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox?(x=mxResources.get("dropbox"),z.src=IMAGE_PATH+"/dropbox-logo-white.svg"): -e==b.oneDrive?(x=mxResources.get("oneDrive"),z.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(x=mxResources.get("github"),z.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?(x=mxResources.get("gitlab"),z.src=IMAGE_PATH+"/gitlab-logo.svg",z.style.width="32px"):e==b.trello&&(x=mxResources.get("trello"),z.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[x]));var C=document.createElement("input");C.setAttribute("type", -"checkbox");x=mxUtils.button(mxResources.get("authorize"),function(){c(C.checked)});x.insertBefore(z,x.firstChild);x.style.marginTop="6px";x.className="geBigButton";x.style.fontSize="18px";x.style.padding="14px";l.appendChild(m);l.appendChild(b);l.appendChild(x);f&&(f=document.createElement("p"),f.style.marginTop="20px",f.appendChild(C),m=document.createElement("span"),mxUtils.write(m," "+mxResources.get("rememberMe")),f.appendChild(m),l.appendChild(f),C.checked=!0,C.defaultChecked=!0,mxEvent.addListener(m, -"click",function(d){C.checked=!C.checked;mxEvent.consume(d)}));this.container=l},MoreShapesDialog=function(b,e,f){f=null!=f?f:b.sidebar.entries;var c=document.createElement("div"),l=[];if(null!=b.sidebar.customEntries)for(var m=0;m<b.sidebar.customEntries.length;m++){for(var x=b.sidebar.customEntries[m],z={title:b.getResource(x.title),entries:[]},C=0;C<x.entries.length;C++){var d=x.entries[C];z.entries.push({id:d.id,title:b.getResource(d.title),desc:b.getResource(d.desc),image:d.preview})}l.push(z)}for(m= -0;m<f.length;m++)if(null==b.sidebar.enabledLibraries)l.push(f[m]);else{z={title:f[m].title,entries:[]};for(C=0;C<f[m].entries.length;C++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,f[m].entries[C].id)&&z.entries.push(f[m].entries[C]);0<z.entries.length&&l.push(z)}f=l;if(e){m=mxUtils.bind(this,function(u){for(var G=0;G<u.length;G++)(function(H){var M=p.cloneNode(!1);M.style.fontWeight="bold";M.style.backgroundColor=Editor.isDarkMode()?"#505759":"#e5e5e5";M.style.padding="6px 0px 6px 20px";mxUtils.write(M, -H.title);g.appendChild(M);for(var K=0;K<H.entries.length;K++)(function(I){var F=p.cloneNode(!1);F.style.cursor="pointer";F.style.padding="4px 0px 4px 20px";F.style.whiteSpace="nowrap";F.style.overflow="hidden";F.style.textOverflow="ellipsis";F.setAttribute("title",I.title+" ("+I.id+")");var P=document.createElement("input");P.setAttribute("type","checkbox");P.checked=b.sidebar.isEntryVisible(I.id);P.defaultChecked=P.checked;F.appendChild(P);mxUtils.write(F," "+I.title);g.appendChild(F);var U=function(T){if(null== -T||"INPUT"!=mxEvent.getSource(T).nodeName){k.style.textAlign="center";k.style.padding="0px";k.style.color="";k.innerText="";if(null!=I.desc){var V=document.createElement("pre");V.style.boxSizing="border-box";V.style.fontFamily="inherit";V.style.margin="20px";V.style.right="0px";V.style.textAlign="left";mxUtils.write(V,I.desc);k.appendChild(V)}null!=I.imageCallback?I.imageCallback(k):null!=I.image?k.innerHTML+='<img border="0" src="'+I.image+'"/>':null==I.desc&&(k.style.padding="20px",k.style.color= -"rgb(179, 179, 179)",mxUtils.write(k,mxResources.get("noPreview")));null!=n&&(n.style.backgroundColor="");n=F;n.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=T&&mxEvent.consume(T)}};mxEvent.addListener(F,"click",U);mxEvent.addListener(F,"dblclick",function(T){P.checked=!P.checked;mxEvent.consume(T)});t.push(function(){return P.checked?I.id:null});0==G&&0==K&&U()})(H.entries[K])})(u[G])});C=document.createElement("div");C.className="geDialogTitle";mxUtils.write(C,mxResources.get("shapes")); -C.style.position="absolute";C.style.top="0px";C.style.left="0px";C.style.lineHeight="40px";C.style.height="40px";C.style.right="0px";var g=document.createElement("div"),k=document.createElement("div");g.style.position="absolute";g.style.top="40px";g.style.left="0px";g.style.width="202px";g.style.bottom="60px";g.style.overflow="auto";k.style.position="absolute";k.style.left="202px";k.style.right="0px";k.style.top="40px";k.style.bottom="60px";k.style.overflow="auto";k.style.borderLeft="1px solid rgb(211, 211, 211)"; -k.style.textAlign="center";var n=null,t=[],p=document.createElement("div");p.style.position="relative";p.style.left="0px";p.style.right="0px";m(f);c.style.padding="30px";c.appendChild(C);c.appendChild(g);c.appendChild(k);f=document.createElement("div");f.className="geDialogFooter";f.style.position="absolute";f.style.paddingRight="16px";f.style.color="gray";f.style.left="0px";f.style.right="0px";f.style.bottom="0px";f.style.height="60px";f.style.lineHeight="52px";var A=document.createElement("input"); +x=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(D,d){if(m.isEnabled()){var g=new FilenameDialog(b,"",mxResources.get("add"),function(k){b.hideDialog();if(null!=k&&0<k.length){k=k.split(" ");for(var n=[],q=0;q<k.length;q++){var p=mxUtils.trim(k[q]);""!=p&&0>mxUtils.indexOf(D,p)&&n.push(p)}0<n.length&&(m.isSelectionEmpty()?d(D.concat(n)):m.addTagsForCells(m.getSelectionCells(),n))}},mxResources.get("enterValue")+" ("+mxResources.get("tags")+ +")");b.showDialog(g.container,300,80,!0,!0);g.init()}}),y=x.div;this.window=new mxWindow(mxResources.get("tags"),y,e,f,c,l,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){x.refresh();this.window.fit()}));b.installResizeHandler(this,!0)},AuthDialog=function(b,e,f,c){var l=document.createElement("div");l.style.textAlign= +"center";var m=document.createElement("p");m.style.fontSize="16pt";m.style.padding="0px";m.style.margin="0px";m.style.color="gray";mxUtils.write(m,mxResources.get("authorizationRequired"));var x="Unknown",y=document.createElement("img");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.marginRight="10px";e==b.drive?(x=mxResources.get("googleDrive"),y.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox?(x=mxResources.get("dropbox"),y.src=IMAGE_PATH+"/dropbox-logo-white.svg"): +e==b.oneDrive?(x=mxResources.get("oneDrive"),y.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(x=mxResources.get("github"),y.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?(x=mxResources.get("gitlab"),y.src=IMAGE_PATH+"/gitlab-logo.svg",y.style.width="32px"):e==b.trello&&(x=mxResources.get("trello"),y.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[x]));var D=document.createElement("input");D.setAttribute("type", +"checkbox");x=mxUtils.button(mxResources.get("authorize"),function(){c(D.checked)});x.insertBefore(y,x.firstChild);x.style.marginTop="6px";x.className="geBigButton";x.style.fontSize="18px";x.style.padding="14px";l.appendChild(m);l.appendChild(b);l.appendChild(x);f&&(f=document.createElement("p"),f.style.marginTop="20px",f.appendChild(D),m=document.createElement("span"),mxUtils.write(m," "+mxResources.get("rememberMe")),f.appendChild(m),l.appendChild(f),D.checked=!0,D.defaultChecked=!0,mxEvent.addListener(m, +"click",function(d){D.checked=!D.checked;mxEvent.consume(d)}));this.container=l},MoreShapesDialog=function(b,e,f){f=null!=f?f:b.sidebar.entries;var c=document.createElement("div"),l=[];if(null!=b.sidebar.customEntries)for(var m=0;m<b.sidebar.customEntries.length;m++){for(var x=b.sidebar.customEntries[m],y={title:b.getResource(x.title),entries:[]},D=0;D<x.entries.length;D++){var d=x.entries[D];y.entries.push({id:d.id,title:b.getResource(d.title),desc:b.getResource(d.desc),image:d.preview})}l.push(y)}for(m= +0;m<f.length;m++)if(null==b.sidebar.enabledLibraries)l.push(f[m]);else{y={title:f[m].title,entries:[]};for(D=0;D<f[m].entries.length;D++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,f[m].entries[D].id)&&y.entries.push(f[m].entries[D]);0<y.entries.length&&l.push(y)}f=l;if(e){m=mxUtils.bind(this,function(u){for(var G=0;G<u.length;G++)(function(I){var F=p.cloneNode(!1);F.style.fontWeight="bold";F.style.backgroundColor=Editor.isDarkMode()?"#505759":"#e5e5e5";F.style.padding="6px 0px 6px 20px";mxUtils.write(F, +I.title);g.appendChild(F);for(var L=0;L<I.entries.length;L++)(function(K){var H=p.cloneNode(!1);H.style.cursor="pointer";H.style.padding="4px 0px 4px 20px";H.style.whiteSpace="nowrap";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.setAttribute("title",K.title+" ("+K.id+")");var Q=document.createElement("input");Q.setAttribute("type","checkbox");Q.checked=b.sidebar.isEntryVisible(K.id);Q.defaultChecked=Q.checked;H.appendChild(Q);mxUtils.write(H," "+K.title);g.appendChild(H);var U=function(T){if(null== +T||"INPUT"!=mxEvent.getSource(T).nodeName){k.style.textAlign="center";k.style.padding="0px";k.style.color="";k.innerText="";if(null!=K.desc){var V=document.createElement("pre");V.style.boxSizing="border-box";V.style.fontFamily="inherit";V.style.margin="20px";V.style.right="0px";V.style.textAlign="left";mxUtils.write(V,K.desc);k.appendChild(V)}null!=K.imageCallback?K.imageCallback(k):null!=K.image?k.innerHTML+='<img border="0" src="'+K.image+'"/>':null==K.desc&&(k.style.padding="20px",k.style.color= +"rgb(179, 179, 179)",mxUtils.write(k,mxResources.get("noPreview")));null!=n&&(n.style.backgroundColor="");n=H;n.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=T&&mxEvent.consume(T)}};mxEvent.addListener(H,"click",U);mxEvent.addListener(H,"dblclick",function(T){Q.checked=!Q.checked;mxEvent.consume(T)});q.push(function(){return Q.checked?K.id:null});0==G&&0==L&&U()})(I.entries[L])})(u[G])});D=document.createElement("div");D.className="geDialogTitle";mxUtils.write(D,mxResources.get("shapes")); +D.style.position="absolute";D.style.top="0px";D.style.left="0px";D.style.lineHeight="40px";D.style.height="40px";D.style.right="0px";var g=document.createElement("div"),k=document.createElement("div");g.style.position="absolute";g.style.top="40px";g.style.left="0px";g.style.width="202px";g.style.bottom="60px";g.style.overflow="auto";k.style.position="absolute";k.style.left="202px";k.style.right="0px";k.style.top="40px";k.style.bottom="60px";k.style.overflow="auto";k.style.borderLeft="1px solid rgb(211, 211, 211)"; +k.style.textAlign="center";var n=null,q=[],p=document.createElement("div");p.style.position="relative";p.style.left="0px";p.style.right="0px";m(f);c.style.padding="30px";c.appendChild(D);c.appendChild(g);c.appendChild(k);f=document.createElement("div");f.className="geDialogFooter";f.style.position="absolute";f.style.paddingRight="16px";f.style.color="gray";f.style.left="0px";f.style.right="0px";f.style.bottom="0px";f.style.height="60px";f.style.lineHeight="52px";var A=document.createElement("input"); A.setAttribute("type","checkbox");A.style.position="relative";A.style.top="1px";A.checked=b.sidebar.sidebarTitles;A.defaultChecked=A.checked;f.appendChild(A);m=document.createElement("span");mxUtils.write(m," "+mxResources.get("labels"));m.style.paddingRight="20px";f.appendChild(m);mxEvent.addListener(m,"click",function(u){A.checked=!A.checked;mxEvent.consume(u)});var E=document.createElement("input");E.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)m=document.createElement("span"), -m.style.paddingRight="20px",m.appendChild(E),mxUtils.write(m," "+mxResources.get("rememberThisSetting")),E.style.position="relative",E.style.top="1px",E.checked=!0,E.defaultChecked=!0,mxEvent.addListener(m,"click",function(u){mxEvent.getSource(u)!=E&&(E.checked=!E.checked,mxEvent.consume(u))}),f.appendChild(m);m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});m.className="geBtn";C=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var u=[],G=0;G<t.length;G++){var H= -t[G].apply(this,arguments);null!=H&&u.push(H)}"1"==urlParams.sketch&&b.isSettingsEnabled()&&(G=mxUtils.indexOf(u,".scratchpad"),null!=b.scratchpad!=(0<=G&&0<u.splice(G,1).length)&&b.toggleScratchpad(),G=mxUtils.indexOf(u,"search"),mxSettings.settings.search=0<=G&&0<u.splice(G,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),E.checked&&mxSettings.save());b.sidebar.showEntries(u.join(";"),E.checked,!0);b.setSidebarTitles(A.checked,E.checked)});C.className="geBtn gePrimaryBtn"}else{var y= -document.createElement("table");m=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";C=document.createElement("tr");y.style.width="100%";e=document.createElement("td");l=document.createElement("td");x=document.createElement("td");var B=mxUtils.bind(this,function(u,G,H){var M=document.createElement("input");M.type="checkbox";y.appendChild(M);M.checked=b.sidebar.isEntryVisible(H);var K=document.createElement("span");mxUtils.write(K,G);G=document.createElement("div");G.style.display= -"block";G.appendChild(M);G.appendChild(K);mxEvent.addListener(K,"click",function(I){M.checked=!M.checked;mxEvent.consume(I)});u.appendChild(G);return function(){return M.checked?H:null}});C.appendChild(e);C.appendChild(l);C.appendChild(x);m.appendChild(C);y.appendChild(m);t=[];var J=0;for(m=0;m<f.length;m++)for(C=0;C<f[m].entries.length;C++)J++;var N=[e,l,x],v=0;for(m=0;m<f.length;m++)(function(u){for(var G=0;G<u.entries.length;G++){var H=u.entries[G];t.push(B(N[Math.floor(v/(J/3))],H.title,H.id)); -v++}})(f[m]);c.appendChild(y);f=document.createElement("div");f.style.marginTop="18px";f.style.textAlign="center";E=document.createElement("input");isLocalStorage&&(E.setAttribute("type","checkbox"),E.checked=!0,E.defaultChecked=!0,f.appendChild(E),m=document.createElement("span"),mxUtils.write(m," "+mxResources.get("rememberThisSetting")),f.appendChild(m),mxEvent.addListener(m,"click",function(u){E.checked=!E.checked;mxEvent.consume(u)}));c.appendChild(f);m=mxUtils.button(mxResources.get("cancel"), -function(){b.hideDialog()});m.className="geBtn";C=mxUtils.button(mxResources.get("apply"),function(){for(var u=["search"],G=0;G<t.length;G++){var H=t[G].apply(this,arguments);null!=H&&u.push(H)}b.sidebar.showEntries(0<u.length?u.join(";"):"",E.checked);b.hideDialog()});C.className="geBtn gePrimaryBtn";f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right"}b.editor.cancelFirst?(f.appendChild(m),f.appendChild(C)):(f.appendChild(C),f.appendChild(m));c.appendChild(f);this.container= -c},PluginsDialog=function(b,e,f,c){function l(){C=!0;if(0==z.length)x.innerText=mxResources.get("noPlugins");else{x.innerText="";for(var p=0;p<z.length;p++){var A=document.createElement("span");A.style.whiteSpace="nowrap";var E=document.createElement("span");E.className="geSprite geSprite-delete";E.style.position="relative";E.style.cursor="pointer";E.style.top="5px";E.style.marginRight="4px";E.style.display="inline-block";A.appendChild(E);mxUtils.write(A,z[p]);x.appendChild(A);mxUtils.br(x);mxEvent.addListener(E, -"click",function(y){return function(){b.confirm(mxResources.get("delete")+' "'+z[y]+'"?',function(){null!=f&&f(z[y]);z.splice(y,1);l()})}}(p))}}}var m=document.createElement("div"),x=document.createElement("div");x.style.height="180px";x.style.overflow="auto";var z=mxSettings.getPlugins().slice(),C=!1;m.appendChild(x);l();C=!1;var d=mxUtils.button(mxResources.get("add"),null!=e?function(){e(function(p){p&&0>mxUtils.indexOf(z,p)&&z.push(p);l()})}:function(){var p=document.createElement("div"),A=document.createElement("span"); -A.style.marginTop="6px";mxUtils.write(A,mxResources.get("builtinPlugins")+": ");p.appendChild(A);var E=document.createElement("select");E.style.width="150px";for(A=0;A<App.publicPlugin.length;A++){var y=document.createElement("option");mxUtils.write(y,App.publicPlugin[A]);y.value=App.publicPlugin[A];E.appendChild(y)}p.appendChild(E);mxUtils.br(p);mxUtils.br(p);A=mxUtils.button(mxResources.get("custom")+"...",function(){var B=new FilenameDialog(b,"",mxResources.get("add"),function(J){b.hideDialog(); -if(null!=J&&0<J.length){J=J.split(";");for(var N=0;N<J.length;N++){var v=J[N],u=App.pluginRegistry[v];null!=u&&(v=u);0<v.length&&0>mxUtils.indexOf(z,v)&&z.push(v)}l()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(B.container,300,80,!0,!0);B.init()});A.className="geBtn";p=new CustomDialog(b,p,mxUtils.bind(this,function(){var B=App.pluginRegistry[E.value];0>mxUtils.indexOf(z,B)&&(z.push(B),l())}),null,null,null,A);b.showDialog(p.container,300,100,!0,!0)});d.className= -"geBtn";var g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});g.className="geBtn";var k=mxUtils.button(c?mxResources.get("close"):mxResources.get("apply"),function(){C?(mxSettings.setPlugins(z),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});k.className="geBtn gePrimaryBtn";var n=document.createElement("div");n.style.marginTop="14px";n.style.textAlign="right";var t=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/plugins")}); -t.className="geBtn";b.isOffline()&&!mxClient.IS_CHROMEAPP&&(t.style.display="none");n.appendChild(t);b.editor.cancelFirst?(c||n.appendChild(g),n.appendChild(d),n.appendChild(k)):(n.appendChild(d),n.appendChild(k),c||n.appendChild(g));m.appendChild(n);this.container=m},CropImageDialog=function(b,e,f,c){function l(){var u=E.checked,G=y.checked,H=t.geometry,M=C.width,K=C.height,I=(300-M)/2,F=(300-K)/2;H.x<I?(H.width-=I-H.x,H.x=I):H.x+H.width>I+M&&(H.width=I+M-H.x,H.x=Math.min(H.x,I+M));H.y<F?(H.height-= -F-H.y,H.y=F):H.y+H.height>F+K&&(H.height=F+K-H.y,H.y=Math.min(H.y,F+K));var P=(H.x-I)/M*100;M=100-(H.x+H.width-I)/M*100;I=(H.y-F)/K*100;H=100-(H.y+H.height-F)/K*100;return"inset("+mxUtils.format(I)+"% "+mxUtils.format(M)+"% "+mxUtils.format(H)+"% "+mxUtils.format(P)+"%"+(u?" round "+n+"%":G?" round 50%":"")+")"}function m(u){null!=g&&(!0!==u&&(g.model.setGeometry(t,k.clone()),n=5,J.value=n),g.model.setStyle(t,p+l()),g.selectAll(),B.style.visibility=E.checked?"visible":"hidden")}var x=document.createElement("div"), -z=document.createElement("div");z.style.height="300px";z.style.width="300px";z.style.display="inline-flex";z.style.justifyContent="center";z.style.alignItems="center";z.style.position="absolute";var C=document.createElement("img");C.onload=function(){function u(){g.model.setStyle(t,p+l())}g=new Graph(d);g.autoExtend=!1;g.autoScroll=!1;g.setGridEnabled(!1);g.setEnabled(!0);g.setPanning(!1);g.setConnectable(!1);g.getRubberband().setEnabled(!1);g.graphHandler.allowLivePreview=!1;var G=g.createVertexHandler; -g.createVertexHandler=function(){var R=G.apply(this,arguments);R.livePreview=!1;return R};if(null!=f)try{if("inset"==f.substring(0,5)){var H=t.geometry,M=C.width,K=C.height,I=(300-M)/2,F=(300-K)/2,P=f.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),U=parseFloat(P[0]),T=parseFloat(P[1]),V=parseFloat(P[2]),W=parseFloat(P[3]);isFinite(U)&&isFinite(T)&&isFinite(V)&&isFinite(W)?(H.x=W/100*M+I,H.y=U/100*K+F,H.width=(100-T)/100*M+I-H.x,H.height=(100-V)/100*K+F-H.y,"round"==P[4]?"50%"==P[5]?y.setAttribute("checked", -"checked"):(n=parseInt(P[5]),J.value=n,E.setAttribute("checked","checked"),B.style.visibility="visible"):A.setAttribute("checked","checked")):f=null}else f=null}catch(R){}t.style=p+(f?f:l());t.vertex=!0;g.addCell(t,null,null,null,null);g.selectAll();g.addListener(mxEvent.CELLS_MOVED,u);g.addListener(mxEvent.CELLS_RESIZED,u);var q=g.graphHandler.mouseUp,D=g.graphHandler.mouseDown;g.graphHandler.mouseUp=function(){q.apply(this,arguments);d.style.backgroundColor="#fff9"};g.graphHandler.mouseDown=function(){D.apply(this, -arguments);d.style.backgroundColor=""};g.dblClick=function(){};var L=g.getSelectionModel().changeSelection;g.getSelectionModel().changeSelection=function(){L.call(this,[t],[t])}};C.onerror=function(){C.onload=null;C.src=Editor.errorImage};C.setAttribute("src",e);C.style.maxWidth="300px";C.style.maxHeight="300px";z.appendChild(C);x.appendChild(z);var d=document.createElement("div");d.style.width="300px";d.style.height="300px";d.style.overflow="hidden";d.style.backgroundColor="#fff9";x.appendChild(d); -var g=null,k=new mxGeometry(100,100,100,100),n=5,t=new mxCell("",k.clone(),""),p="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+e.replace(";base64","")+";clipPath=",A=document.createElement("input");A.setAttribute("type","radio");A.setAttribute("id","croppingRect");A.setAttribute("name","croppingShape");A.setAttribute("checked","checked");A.style.margin="5px";x.appendChild(A);e=document.createElement("label");e.setAttribute("for","croppingRect");mxUtils.write(e,mxResources.get("rectangle")); -x.appendChild(e);var E=document.createElement("input");E.setAttribute("type","radio");E.setAttribute("id","croppingRounded");E.setAttribute("name","croppingShape");E.style.margin="5px";x.appendChild(E);e=document.createElement("label");e.setAttribute("for","croppingRounded");mxUtils.write(e,mxResources.get("rounded"));x.appendChild(e);var y=document.createElement("input");y.setAttribute("type","radio");y.setAttribute("id","croppingEllipse");y.setAttribute("name","croppingShape");y.style.margin="5px"; -x.appendChild(y);e=document.createElement("label");e.setAttribute("for","croppingEllipse");mxUtils.write(e,mxResources.get("ellipse"));x.appendChild(e);mxEvent.addListener(A,"change",m);mxEvent.addListener(E,"change",m);mxEvent.addListener(y,"change",m);var B=document.createElement("div");B.style.textAlign="center";B.style.visibility="hidden";var J=document.createElement("input");J.setAttribute("type","range");J.setAttribute("min","1");J.setAttribute("max","49");J.setAttribute("value",n);J.setAttribute("title", -mxResources.get("arcSize"));B.appendChild(J);x.appendChild(B);mxEvent.addListener(J,"change",function(){n=this.value;m(!0)});e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});e.className="geBtn";z=mxUtils.button(mxResources.get("apply"),function(){c(l(),t.geometry.width,t.geometry.height);b.hideDialog()});z.className="geBtn gePrimaryBtn";var N=mxUtils.button(mxResources.get("reset"),function(){c(null,C.width,C.height);b.hideDialog()});N.className="geBtn";var v=document.createElement("div"); -v.style.marginTop="10px";v.style.textAlign="right";b.editor.cancelFirst?(v.appendChild(e),v.appendChild(N),v.appendChild(z)):(v.appendChild(N),v.appendChild(z),v.appendChild(e));x.appendChild(v);this.container=x},EditGeometryDialog=function(b,e){var f=b.editor.graph,c=1==e.length?f.getCellGeometry(e[0]):null,l=document.createElement("div"),m=document.createElement("table"),x=document.createElement("tbody"),z=document.createElement("tr"),C=document.createElement("td"),d=document.createElement("td"); -m.style.paddingLeft="6px";mxUtils.write(C,mxResources.get("relative")+":");var g=document.createElement("input");g.setAttribute("type","checkbox");null!=c&&c.relative&&(g.setAttribute("checked","checked"),g.defaultChecked=!0);this.init=function(){g.focus()};d.appendChild(g);z.appendChild(C);z.appendChild(d);x.appendChild(z);z=document.createElement("tr");C=document.createElement("td");d=document.createElement("td");mxUtils.write(C,mxResources.get("left")+":");var k=document.createElement("input"); -k.setAttribute("type","text");k.style.width="100px";k.value=null!=c?c.x:"";d.appendChild(k);z.appendChild(C);z.appendChild(d);x.appendChild(z);z=document.createElement("tr");C=document.createElement("td");d=document.createElement("td");mxUtils.write(C,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=c?c.y:"";d.appendChild(n);z.appendChild(C);z.appendChild(d);x.appendChild(z);z=document.createElement("tr");C=document.createElement("td"); -d=document.createElement("td");mxUtils.write(C,mxResources.get("dx")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=c&&null!=c.offset?c.offset.x:"";d.appendChild(t);z.appendChild(C);z.appendChild(d);x.appendChild(z);z=document.createElement("tr");C=document.createElement("td");d=document.createElement("td");mxUtils.write(C,mxResources.get("dy")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px"; -p.value=null!=c&&null!=c.offset?c.offset.y:"";d.appendChild(p);z.appendChild(C);z.appendChild(d);x.appendChild(z);z=document.createElement("tr");C=document.createElement("td");d=document.createElement("td");mxUtils.write(C,mxResources.get("width")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.width="100px";A.value=null!=c?c.width:"";d.appendChild(A);z.appendChild(C);z.appendChild(d);x.appendChild(z);z=document.createElement("tr");C=document.createElement("td");d= -document.createElement("td");mxUtils.write(C,mxResources.get("height")+":");var E=document.createElement("input");E.setAttribute("type","text");E.style.width="100px";E.value=null!=c?c.height:"";d.appendChild(E);z.appendChild(C);z.appendChild(d);x.appendChild(z);z=document.createElement("tr");C=document.createElement("td");d=document.createElement("td");mxUtils.write(C,mxResources.get("rotation")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.width="100px";y.value= -1==e.length?mxUtils.getValue(f.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";d.appendChild(y);z.appendChild(C);z.appendChild(d);x.appendChild(z);m.appendChild(x);l.appendChild(m);c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var B=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();f.getModel().beginUpdate();try{for(var J=0;J<e.length;J++){var N=f.getCellGeometry(e[J]);null!=N&&(N=N.clone(),f.isCellMovable(e[J])&&(N.relative=g.checked, -0<mxUtils.trim(k.value).length&&(N.x=Number(k.value)),0<mxUtils.trim(n.value).length&&(N.y=Number(n.value)),0<mxUtils.trim(t.value).length&&(null==N.offset&&(N.offset=new mxPoint),N.offset.x=Number(t.value)),0<mxUtils.trim(p.value).length&&(null==N.offset&&(N.offset=new mxPoint),N.offset.y=Number(p.value))),f.isCellResizable(e[J])&&(0<mxUtils.trim(A.value).length&&(N.width=Number(A.value)),0<mxUtils.trim(E.value).length&&(N.height=Number(E.value))),f.getModel().setGeometry(e[J],N));0<mxUtils.trim(y.value).length&& -f.setCellStyles(mxConstants.STYLE_ROTATION,Number(y.value),[e[J]])}}finally{f.getModel().endUpdate()}});B.className="geBtn gePrimaryBtn";mxEvent.addListener(l,"keypress",function(J){13==J.keyCode&&B.click()});m=document.createElement("div");m.style.marginTop="20px";m.style.textAlign="right";b.editor.cancelFirst?(m.appendChild(c),m.appendChild(B)):(m.appendChild(B),m.appendChild(c));l.appendChild(m);this.container=l},LibraryDialog=function(b,e,f,c,l,m){function x(G){for(G=document.elementFromPoint(G.clientX, -G.clientY);null!=G&&G.parentNode!=t;)G=G.parentNode;var H=null;if(null!=G){var M=t.firstChild;for(H=0;null!=M&&M!=G;)M=M.nextSibling,H++}return H}function z(G,H,M,K,I,F,P,U,T){try{if(b.spinner.stop(),null==H||"image/"==H.substring(0,6))if(null==G&&null!=P||null==A[G]){var V=function(){S.innerText="";S.style.cursor="pointer";S.style.whiteSpace="nowrap";S.style.textOverflow="ellipsis";mxUtils.write(S,null!=X.title&&0<X.title.length?X.title:mxResources.get("untitled"));S.style.color=null==X.title||0== -X.title.length?"#d0d0d0":""};t.style.backgroundImage="";p.style.display="none";var W=I,q=F;if(I>b.maxImageSize||F>b.maxImageSize){var D=Math.min(1,Math.min(b.maxImageSize/Math.max(1,I)),b.maxImageSize/Math.max(1,F));I*=D;F*=D}W>q?(q=Math.round(100*q/W),W=100):(W=Math.round(100*W/q),q=100);var L=document.createElement("div");L.setAttribute("draggable","true");L.style.display="inline-block";L.style.position="relative";L.style.padding="0 12px";L.style.cursor="move";mxUtils.setPrefixedStyle(L.style,"transition", -"transform .1s ease-in-out");if(null!=G){var R=document.createElement("img");R.setAttribute("src",J.convert(G));R.style.width=W+"px";R.style.height=q+"px";R.style.margin="10px";R.style.paddingBottom=Math.floor((100-q)/2)+"px";R.style.paddingLeft=Math.floor((100-W)/2)+"px";L.appendChild(R)}else if(null!=P){var O=b.stringToCells(Graph.decompress(P.xml));0<O.length&&(b.sidebar.createThumb(O,100,100,L,null,!0,!1),L.firstChild.style.display="inline-block",L.firstChild.style.cursor="")}var Q=document.createElement("img"); -Q.setAttribute("src",Editor.closeBlackImage);Q.setAttribute("border","0");Q.setAttribute("title",mxResources.get("delete"));Q.setAttribute("align","top");Q.style.paddingTop="4px";Q.style.position="absolute";Q.style.marginLeft="-12px";Q.style.zIndex="1";Q.style.cursor="pointer";mxEvent.addListener(Q,"dragstart",function(ba){mxEvent.consume(ba)});(function(ba,fa,ka){mxEvent.addListener(Q,"click",function(ha){A[fa]=null;for(var ra=0;ra<g.length;ra++)if(null!=g[ra].data&&g[ra].data==fa||null!=g[ra].xml&& -null!=ka&&g[ra].xml==ka.xml){g.splice(ra,1);break}L.parentNode.removeChild(ba);0==g.length&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",p.style.display="");mxEvent.consume(ha)});mxEvent.addListener(Q,"dblclick",function(ha){mxEvent.consume(ha)})})(L,G,P);L.appendChild(Q);L.style.marginBottom="30px";var S=document.createElement("div");S.style.position="absolute";S.style.boxSizing="border-box";S.style.bottom="-18px";S.style.left="10px";S.style.right="10px";S.style.backgroundColor= -Editor.isDarkMode()?Editor.darkColor:"#ffffff";S.style.overflow="hidden";S.style.textAlign="center";var X=null;null!=G?(X={data:G,w:I,h:F,title:T},null!=U&&(X.aspect=U),A[G]=R,g.push(X)):null!=P&&(P.aspect="fixed",g.push(P),X=P);mxEvent.addListener(S,"keydown",function(ba){13==ba.keyCode&&null!=B&&(B(),B=null,mxEvent.consume(ba))});V();L.appendChild(S);mxEvent.addListener(S,"mousedown",function(ba){"true"!=S.getAttribute("contentEditable")&&mxEvent.consume(ba)});O=function(ba){if(mxClient.IS_IOS|| -mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var fa=new FilenameDialog(b,X.title||"",mxResources.get("ok"),function(ka){null!=ka&&(X.title=ka,V())},mxResources.get("enterValue"));b.showDialog(fa.container,300,80,!0,!0);fa.init();mxEvent.consume(ba)}else if("true"!=S.getAttribute("contentEditable")){null!=B&&(B(),B=null);if(null==X.title||0==X.title.length)S.innerText="";S.style.textOverflow="";S.style.whiteSpace="";S.style.cursor="text";S.style.color="";S.setAttribute("contentEditable", -"true");mxUtils.setPrefixedStyle(S.style,"user-select","text");S.focus();document.execCommand("selectAll",!1,null);B=function(){S.removeAttribute("contentEditable");S.style.cursor="pointer";X.title=S.innerHTML;V()};mxEvent.consume(ba)}};mxEvent.addListener(S,"click",O);mxEvent.addListener(L,"dblclick",O);t.appendChild(L);mxEvent.addListener(L,"dragstart",function(ba){null==G&&null!=P&&(Q.style.visibility="hidden",S.style.visibility="hidden");mxClient.IS_FF&&null!=P.xml&&ba.dataTransfer.setData("Text", -P.xml);E=x(ba);mxClient.IS_GC&&(L.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(L.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(L,30);Q.style.visibility="";S.style.visibility=""},0)});mxEvent.addListener(L,"dragend",function(ba){"hidden"==Q.style.visibility&&(Q.style.visibility="",S.style.visibility="");E=null;mxUtils.setOpacity(L,100);mxUtils.setPrefixedStyle(L.style,"transform",null)})}else N||(N=!0,b.handleError({message:mxResources.get("fileExists")}));else{I= -!1;try{if(W=mxUtils.parseXml(G),"mxlibrary"==W.documentElement.nodeName){q=JSON.parse(mxUtils.getTextContent(W.documentElement));if(null!=q&&0<q.length)for(var aa=0;aa<q.length;aa++)null!=q[aa].xml?z(null,null,0,0,0,0,q[aa]):z(q[aa].data,null,0,0,q[aa].w,q[aa].h,null,"fixed",q[aa].title);I=!0}else if("mxfile"==W.documentElement.nodeName){var Y=W.documentElement.getElementsByTagName("diagram");for(aa=0;aa<Y.length;aa++){q=mxUtils.getTextContent(Y[aa]);O=b.stringToCells(Graph.decompress(q));var Z=b.editor.graph.getBoundingBoxFromGeometry(O); -z(null,null,0,0,0,0,{xml:q,w:Z.width,h:Z.height})}I=!0}}catch(ba){}I||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ba){}return null}function C(G){G.dataTransfer.dropEffect=null!=E?"move":"copy";G.stopPropagation();G.preventDefault()}function d(G){G.stopPropagation();G.preventDefault();N=!1;y=x(G);if(null!=E)null!=y&&y<t.children.length?(g.splice(y>E?y-1:y,0,g.splice(E,1)[0]),t.insertBefore(t.children[E],t.children[y])):(g.push(g.splice(E,1)[0]),t.appendChild(t.children[E])); -else if(0<G.dataTransfer.files.length)b.importFiles(G.dataTransfer.files,0,0,b.maxImageSize,v(G));else if(0<=mxUtils.indexOf(G.dataTransfer.types,"text/uri-list")){var H=decodeURIComponent(G.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(H)||/(\.png)($|\?)/i.test(H)||/(\.gif)($|\?)/i.test(H)||/(\.svg)($|\?)/i.test(H))&&b.loadImage(H,function(M){z(H,null,0,0,M.width,M.height);t.scrollTop=t.scrollHeight})}G.stopPropagation();G.preventDefault()}var g=[];f=document.createElement("div"); +m.style.paddingRight="20px",m.appendChild(E),mxUtils.write(m," "+mxResources.get("rememberThisSetting")),E.style.position="relative",E.style.top="1px",E.checked=!0,E.defaultChecked=!0,mxEvent.addListener(m,"click",function(u){mxEvent.getSource(u)!=E&&(E.checked=!E.checked,mxEvent.consume(u))}),f.appendChild(m);m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});m.className="geBtn";D=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var u=[],G=0;G<q.length;G++){var I= +q[G].apply(this,arguments);null!=I&&u.push(I)}"1"==urlParams.sketch&&b.isSettingsEnabled()&&(G=mxUtils.indexOf(u,".scratchpad"),null!=b.scratchpad!=(0<=G&&0<u.splice(G,1).length)&&b.toggleScratchpad(),G=mxUtils.indexOf(u,"search"),mxSettings.settings.search=0<=G&&0<u.splice(G,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),E.checked&&mxSettings.save());b.sidebar.showEntries(u.join(";"),E.checked,!0);b.setSidebarTitles(A.checked,E.checked)});D.className="geBtn gePrimaryBtn"}else{var z= +document.createElement("table");m=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";D=document.createElement("tr");z.style.width="100%";e=document.createElement("td");l=document.createElement("td");x=document.createElement("td");var B=mxUtils.bind(this,function(u,G,I){var F=document.createElement("input");F.type="checkbox";z.appendChild(F);F.checked=b.sidebar.isEntryVisible(I);var L=document.createElement("span");mxUtils.write(L,G);G=document.createElement("div");G.style.display= +"block";G.appendChild(F);G.appendChild(L);mxEvent.addListener(L,"click",function(K){F.checked=!F.checked;mxEvent.consume(K)});u.appendChild(G);return function(){return F.checked?I:null}});D.appendChild(e);D.appendChild(l);D.appendChild(x);m.appendChild(D);z.appendChild(m);q=[];var J=0;for(m=0;m<f.length;m++)for(D=0;D<f[m].entries.length;D++)J++;var M=[e,l,x],v=0;for(m=0;m<f.length;m++)(function(u){for(var G=0;G<u.entries.length;G++){var I=u.entries[G];q.push(B(M[Math.floor(v/(J/3))],I.title,I.id)); +v++}})(f[m]);c.appendChild(z);f=document.createElement("div");f.style.marginTop="18px";f.style.textAlign="center";E=document.createElement("input");isLocalStorage&&(E.setAttribute("type","checkbox"),E.checked=!0,E.defaultChecked=!0,f.appendChild(E),m=document.createElement("span"),mxUtils.write(m," "+mxResources.get("rememberThisSetting")),f.appendChild(m),mxEvent.addListener(m,"click",function(u){E.checked=!E.checked;mxEvent.consume(u)}));c.appendChild(f);m=mxUtils.button(mxResources.get("cancel"), +function(){b.hideDialog()});m.className="geBtn";D=mxUtils.button(mxResources.get("apply"),function(){for(var u=["search"],G=0;G<q.length;G++){var I=q[G].apply(this,arguments);null!=I&&u.push(I)}b.sidebar.showEntries(0<u.length?u.join(";"):"",E.checked);b.hideDialog()});D.className="geBtn gePrimaryBtn";f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right"}b.editor.cancelFirst?(f.appendChild(m),f.appendChild(D)):(f.appendChild(D),f.appendChild(m));c.appendChild(f);this.container= +c},PluginsDialog=function(b,e,f,c){function l(){D=!0;if(0==y.length)x.innerText=mxResources.get("noPlugins");else{x.innerText="";for(var p=0;p<y.length;p++){var A=document.createElement("span");A.style.whiteSpace="nowrap";var E=document.createElement("span");E.className="geSprite geSprite-delete";E.style.position="relative";E.style.cursor="pointer";E.style.top="5px";E.style.marginRight="4px";E.style.display="inline-block";A.appendChild(E);mxUtils.write(A,y[p]);x.appendChild(A);mxUtils.br(x);mxEvent.addListener(E, +"click",function(z){return function(){b.confirm(mxResources.get("delete")+' "'+y[z]+'"?',function(){null!=f&&f(y[z]);y.splice(z,1);l()})}}(p))}}}var m=document.createElement("div"),x=document.createElement("div");x.style.height="180px";x.style.overflow="auto";var y=mxSettings.getPlugins().slice(),D=!1;m.appendChild(x);l();D=!1;var d=mxUtils.button(mxResources.get("add"),null!=e?function(){e(function(p){p&&0>mxUtils.indexOf(y,p)&&y.push(p);l()})}:function(){var p=document.createElement("div"),A=document.createElement("span"); +A.style.marginTop="6px";mxUtils.write(A,mxResources.get("builtinPlugins")+": ");p.appendChild(A);var E=document.createElement("select");E.style.width="150px";for(A=0;A<App.publicPlugin.length;A++){var z=document.createElement("option");mxUtils.write(z,App.publicPlugin[A]);z.value=App.publicPlugin[A];E.appendChild(z)}p.appendChild(E);mxUtils.br(p);mxUtils.br(p);A=mxUtils.button(mxResources.get("custom")+"...",function(){var B=new FilenameDialog(b,"",mxResources.get("add"),function(J){b.hideDialog(); +if(null!=J&&0<J.length){J=J.split(";");for(var M=0;M<J.length;M++){var v=J[M],u=App.pluginRegistry[v];null!=u&&(v=u);0<v.length&&0>mxUtils.indexOf(y,v)&&y.push(v)}l()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(B.container,300,80,!0,!0);B.init()});A.className="geBtn";p=new CustomDialog(b,p,mxUtils.bind(this,function(){var B=App.pluginRegistry[E.value];0>mxUtils.indexOf(y,B)&&(y.push(B),l())}),null,null,null,A);b.showDialog(p.container,360,100,!0,!0)});d.className= +"geBtn";var g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});g.className="geBtn";var k=mxUtils.button(c?mxResources.get("close"):mxResources.get("apply"),function(){D?(mxSettings.setPlugins(y),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});k.className="geBtn gePrimaryBtn";var n=document.createElement("div");n.style.marginTop="14px";n.style.textAlign="right";var q=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/plugins")}); +q.className="geBtn";b.isOffline()&&!mxClient.IS_CHROMEAPP&&(q.style.display="none");n.appendChild(q);b.editor.cancelFirst?(c||n.appendChild(g),n.appendChild(d),n.appendChild(k)):(n.appendChild(d),n.appendChild(k),c||n.appendChild(g));m.appendChild(n);this.container=m},CropImageDialog=function(b,e,f,c){function l(){var u=E.checked,G=z.checked,I=q.geometry,F=D.width,L=D.height,K=(300-F)/2,H=(300-L)/2;I.x<K?(I.width-=K-I.x,I.x=K):I.x+I.width>K+F&&(I.width=K+F-I.x,I.x=Math.min(I.x,K+F));I.y<H?(I.height-= +H-I.y,I.y=H):I.y+I.height>H+L&&(I.height=H+L-I.y,I.y=Math.min(I.y,H+L));var Q=(I.x-K)/F*100;F=100-(I.x+I.width-K)/F*100;K=(I.y-H)/L*100;I=100-(I.y+I.height-H)/L*100;return"inset("+mxUtils.format(K)+"% "+mxUtils.format(F)+"% "+mxUtils.format(I)+"% "+mxUtils.format(Q)+"%"+(u?" round "+n+"%":G?" round 50%":"")+")"}function m(u){null!=g&&(!0!==u&&(g.model.setGeometry(q,k.clone()),n=5,J.value=n),g.model.setStyle(q,p+l()),g.selectAll(),B.style.visibility=E.checked?"visible":"hidden")}var x=document.createElement("div"), +y=document.createElement("div");y.style.height="300px";y.style.width="300px";y.style.display="inline-flex";y.style.justifyContent="center";y.style.alignItems="center";y.style.position="absolute";var D=document.createElement("img");D.onload=function(){function u(){g.model.setStyle(q,p+l())}g=new Graph(d);g.autoExtend=!1;g.autoScroll=!1;g.setGridEnabled(!1);g.setEnabled(!0);g.setPanning(!1);g.setConnectable(!1);g.getRubberband().setEnabled(!1);g.graphHandler.allowLivePreview=!1;var G=g.createVertexHandler; +g.createVertexHandler=function(){var R=G.apply(this,arguments);R.livePreview=!1;return R};if(null!=f)try{if("inset"==f.substring(0,5)){var I=q.geometry,F=D.width,L=D.height,K=(300-F)/2,H=(300-L)/2,Q=f.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),U=parseFloat(Q[0]),T=parseFloat(Q[1]),V=parseFloat(Q[2]),W=parseFloat(Q[3]);isFinite(U)&&isFinite(T)&&isFinite(V)&&isFinite(W)?(I.x=W/100*F+K,I.y=U/100*L+H,I.width=(100-T)/100*F+K-I.x,I.height=(100-V)/100*L+H-I.y,"round"==Q[4]?"50%"==Q[5]?z.setAttribute("checked", +"checked"):(n=parseInt(Q[5]),J.value=n,E.setAttribute("checked","checked"),B.style.visibility="visible"):A.setAttribute("checked","checked")):f=null}else f=null}catch(R){}q.style=p+(f?f:l());q.vertex=!0;g.addCell(q,null,null,null,null);g.selectAll();g.addListener(mxEvent.CELLS_MOVED,u);g.addListener(mxEvent.CELLS_RESIZED,u);var t=g.graphHandler.mouseUp,C=g.graphHandler.mouseDown;g.graphHandler.mouseUp=function(){t.apply(this,arguments);d.style.backgroundColor="#fff9"};g.graphHandler.mouseDown=function(){C.apply(this, +arguments);d.style.backgroundColor=""};g.dblClick=function(){};var N=g.getSelectionModel().changeSelection;g.getSelectionModel().changeSelection=function(){N.call(this,[q],[q])}};D.onerror=function(){D.onload=null;D.src=Editor.errorImage};D.setAttribute("src",e);D.style.maxWidth="300px";D.style.maxHeight="300px";y.appendChild(D);x.appendChild(y);var d=document.createElement("div");d.style.width="300px";d.style.height="300px";d.style.overflow="hidden";d.style.backgroundColor="#fff9";x.appendChild(d); +var g=null,k=new mxGeometry(100,100,100,100),n=5,q=new mxCell("",k.clone(),""),p="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+e.replace(";base64","")+";clipPath=",A=document.createElement("input");A.setAttribute("type","radio");A.setAttribute("id","croppingRect");A.setAttribute("name","croppingShape");A.setAttribute("checked","checked");A.style.margin="5px";x.appendChild(A);e=document.createElement("label");e.setAttribute("for","croppingRect");mxUtils.write(e,mxResources.get("rectangle")); +x.appendChild(e);var E=document.createElement("input");E.setAttribute("type","radio");E.setAttribute("id","croppingRounded");E.setAttribute("name","croppingShape");E.style.margin="5px";x.appendChild(E);e=document.createElement("label");e.setAttribute("for","croppingRounded");mxUtils.write(e,mxResources.get("rounded"));x.appendChild(e);var z=document.createElement("input");z.setAttribute("type","radio");z.setAttribute("id","croppingEllipse");z.setAttribute("name","croppingShape");z.style.margin="5px"; +x.appendChild(z);e=document.createElement("label");e.setAttribute("for","croppingEllipse");mxUtils.write(e,mxResources.get("ellipse"));x.appendChild(e);mxEvent.addListener(A,"change",m);mxEvent.addListener(E,"change",m);mxEvent.addListener(z,"change",m);var B=document.createElement("div");B.style.textAlign="center";B.style.visibility="hidden";var J=document.createElement("input");J.setAttribute("type","range");J.setAttribute("min","1");J.setAttribute("max","49");J.setAttribute("value",n);J.setAttribute("title", +mxResources.get("arcSize"));B.appendChild(J);x.appendChild(B);mxEvent.addListener(J,"change",function(){n=this.value;m(!0)});e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});e.className="geBtn";y=mxUtils.button(mxResources.get("apply"),function(){c(l(),q.geometry.width,q.geometry.height);b.hideDialog()});y.className="geBtn gePrimaryBtn";var M=mxUtils.button(mxResources.get("reset"),function(){c(null,D.width,D.height);b.hideDialog()});M.className="geBtn";var v=document.createElement("div"); +v.style.marginTop="10px";v.style.textAlign="right";b.editor.cancelFirst?(v.appendChild(e),v.appendChild(M),v.appendChild(y)):(v.appendChild(M),v.appendChild(y),v.appendChild(e));x.appendChild(v);this.container=x},EditGeometryDialog=function(b,e){var f=b.editor.graph,c=1==e.length?f.getCellGeometry(e[0]):null,l=document.createElement("div"),m=document.createElement("table"),x=document.createElement("tbody"),y=document.createElement("tr"),D=document.createElement("td"),d=document.createElement("td"); +m.style.paddingLeft="6px";mxUtils.write(D,mxResources.get("relative")+":");var g=document.createElement("input");g.setAttribute("type","checkbox");null!=c&&c.relative&&(g.setAttribute("checked","checked"),g.defaultChecked=!0);this.init=function(){g.focus()};d.appendChild(g);y.appendChild(D);y.appendChild(d);x.appendChild(y);y=document.createElement("tr");D=document.createElement("td");d=document.createElement("td");mxUtils.write(D,mxResources.get("left")+":");var k=document.createElement("input"); +k.setAttribute("type","text");k.style.width="100px";k.value=null!=c?c.x:"";d.appendChild(k);y.appendChild(D);y.appendChild(d);x.appendChild(y);y=document.createElement("tr");D=document.createElement("td");d=document.createElement("td");mxUtils.write(D,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=c?c.y:"";d.appendChild(n);y.appendChild(D);y.appendChild(d);x.appendChild(y);y=document.createElement("tr");D=document.createElement("td"); +d=document.createElement("td");mxUtils.write(D,mxResources.get("dx")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=c&&null!=c.offset?c.offset.x:"";d.appendChild(q);y.appendChild(D);y.appendChild(d);x.appendChild(y);y=document.createElement("tr");D=document.createElement("td");d=document.createElement("td");mxUtils.write(D,mxResources.get("dy")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px"; +p.value=null!=c&&null!=c.offset?c.offset.y:"";d.appendChild(p);y.appendChild(D);y.appendChild(d);x.appendChild(y);y=document.createElement("tr");D=document.createElement("td");d=document.createElement("td");mxUtils.write(D,mxResources.get("width")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.width="100px";A.value=null!=c?c.width:"";d.appendChild(A);y.appendChild(D);y.appendChild(d);x.appendChild(y);y=document.createElement("tr");D=document.createElement("td");d= +document.createElement("td");mxUtils.write(D,mxResources.get("height")+":");var E=document.createElement("input");E.setAttribute("type","text");E.style.width="100px";E.value=null!=c?c.height:"";d.appendChild(E);y.appendChild(D);y.appendChild(d);x.appendChild(y);y=document.createElement("tr");D=document.createElement("td");d=document.createElement("td");mxUtils.write(D,mxResources.get("rotation")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.width="100px";z.value= +1==e.length?mxUtils.getValue(f.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";d.appendChild(z);y.appendChild(D);y.appendChild(d);x.appendChild(y);m.appendChild(x);l.appendChild(m);c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var B=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();f.getModel().beginUpdate();try{for(var J=0;J<e.length;J++){var M=f.getCellGeometry(e[J]);null!=M&&(M=M.clone(),f.isCellMovable(e[J])&&(M.relative=g.checked, +0<mxUtils.trim(k.value).length&&(M.x=Number(k.value)),0<mxUtils.trim(n.value).length&&(M.y=Number(n.value)),0<mxUtils.trim(q.value).length&&(null==M.offset&&(M.offset=new mxPoint),M.offset.x=Number(q.value)),0<mxUtils.trim(p.value).length&&(null==M.offset&&(M.offset=new mxPoint),M.offset.y=Number(p.value))),f.isCellResizable(e[J])&&(0<mxUtils.trim(A.value).length&&(M.width=Number(A.value)),0<mxUtils.trim(E.value).length&&(M.height=Number(E.value))),f.getModel().setGeometry(e[J],M));0<mxUtils.trim(z.value).length&& +f.setCellStyles(mxConstants.STYLE_ROTATION,Number(z.value),[e[J]])}}finally{f.getModel().endUpdate()}});B.className="geBtn gePrimaryBtn";mxEvent.addListener(l,"keypress",function(J){13==J.keyCode&&B.click()});m=document.createElement("div");m.style.marginTop="20px";m.style.textAlign="right";b.editor.cancelFirst?(m.appendChild(c),m.appendChild(B)):(m.appendChild(B),m.appendChild(c));l.appendChild(m);this.container=l},LibraryDialog=function(b,e,f,c,l,m){function x(G){for(G=document.elementFromPoint(G.clientX, +G.clientY);null!=G&&G.parentNode!=q;)G=G.parentNode;var I=null;if(null!=G){var F=q.firstChild;for(I=0;null!=F&&F!=G;)F=F.nextSibling,I++}return I}function y(G,I,F,L,K,H,Q,U,T){try{if(b.spinner.stop(),null==I||"image/"==I.substring(0,6))if(null==G&&null!=Q||null==A[G]){var V=function(){S.innerText="";S.style.cursor="pointer";S.style.whiteSpace="nowrap";S.style.textOverflow="ellipsis";mxUtils.write(S,null!=X.title&&0<X.title.length?X.title:mxResources.get("untitled"));S.style.color=null==X.title||0== +X.title.length?"#d0d0d0":""};q.style.backgroundImage="";p.style.display="none";var W=K,t=H;if(K>b.maxImageSize||H>b.maxImageSize){var C=Math.min(1,Math.min(b.maxImageSize/Math.max(1,K)),b.maxImageSize/Math.max(1,H));K*=C;H*=C}W>t?(t=Math.round(100*t/W),W=100):(W=Math.round(100*W/t),t=100);var N=document.createElement("div");N.setAttribute("draggable","true");N.style.display="inline-block";N.style.position="relative";N.style.padding="0 12px";N.style.cursor="move";mxUtils.setPrefixedStyle(N.style,"transition", +"transform .1s ease-in-out");if(null!=G){var R=document.createElement("img");R.setAttribute("src",J.convert(G));R.style.width=W+"px";R.style.height=t+"px";R.style.margin="10px";R.style.paddingBottom=Math.floor((100-t)/2)+"px";R.style.paddingLeft=Math.floor((100-W)/2)+"px";N.appendChild(R)}else if(null!=Q){var O=b.stringToCells(Graph.decompress(Q.xml));0<O.length&&(b.sidebar.createThumb(O,100,100,N,null,!0,!1),N.firstChild.style.display="inline-block",N.firstChild.style.cursor="")}var P=document.createElement("img"); +P.setAttribute("src",Editor.closeBlackImage);P.setAttribute("border","0");P.setAttribute("title",mxResources.get("delete"));P.setAttribute("align","top");P.style.paddingTop="4px";P.style.position="absolute";P.style.marginLeft="-12px";P.style.zIndex="1";P.style.cursor="pointer";mxEvent.addListener(P,"dragstart",function(ba){mxEvent.consume(ba)});(function(ba,ea,ma){mxEvent.addListener(P,"click",function(ia){A[ea]=null;for(var pa=0;pa<g.length;pa++)if(null!=g[pa].data&&g[pa].data==ea||null!=g[pa].xml&& +null!=ma&&g[pa].xml==ma.xml){g.splice(pa,1);break}N.parentNode.removeChild(ba);0==g.length&&(q.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",p.style.display="");mxEvent.consume(ia)});mxEvent.addListener(P,"dblclick",function(ia){mxEvent.consume(ia)})})(N,G,Q);N.appendChild(P);N.style.marginBottom="30px";var S=document.createElement("div");S.style.position="absolute";S.style.boxSizing="border-box";S.style.bottom="-18px";S.style.left="10px";S.style.right="10px";S.style.backgroundColor= +Editor.isDarkMode()?Editor.darkColor:"#ffffff";S.style.overflow="hidden";S.style.textAlign="center";var X=null;null!=G?(X={data:G,w:K,h:H,title:T},null!=U&&(X.aspect=U),A[G]=R,g.push(X)):null!=Q&&(Q.aspect="fixed",g.push(Q),X=Q);mxEvent.addListener(S,"keydown",function(ba){13==ba.keyCode&&null!=B&&(B(),B=null,mxEvent.consume(ba))});V();N.appendChild(S);mxEvent.addListener(S,"mousedown",function(ba){"true"!=S.getAttribute("contentEditable")&&mxEvent.consume(ba)});O=function(ba){if(mxClient.IS_IOS|| +mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var ea=new FilenameDialog(b,X.title||"",mxResources.get("ok"),function(ma){null!=ma&&(X.title=ma,V())},mxResources.get("enterValue"));b.showDialog(ea.container,300,80,!0,!0);ea.init();mxEvent.consume(ba)}else if("true"!=S.getAttribute("contentEditable")){null!=B&&(B(),B=null);if(null==X.title||0==X.title.length)S.innerText="";S.style.textOverflow="";S.style.whiteSpace="";S.style.cursor="text";S.style.color="";S.setAttribute("contentEditable", +"true");mxUtils.setPrefixedStyle(S.style,"user-select","text");S.focus();document.execCommand("selectAll",!1,null);B=function(){S.removeAttribute("contentEditable");S.style.cursor="pointer";X.title=S.innerHTML;V()};mxEvent.consume(ba)}};mxEvent.addListener(S,"click",O);mxEvent.addListener(N,"dblclick",O);q.appendChild(N);mxEvent.addListener(N,"dragstart",function(ba){null==G&&null!=Q&&(P.style.visibility="hidden",S.style.visibility="hidden");mxClient.IS_FF&&null!=Q.xml&&ba.dataTransfer.setData("Text", +Q.xml);E=x(ba);mxClient.IS_GC&&(N.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(N.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(N,30);P.style.visibility="";S.style.visibility=""},0)});mxEvent.addListener(N,"dragend",function(ba){"hidden"==P.style.visibility&&(P.style.visibility="",S.style.visibility="");E=null;mxUtils.setOpacity(N,100);mxUtils.setPrefixedStyle(N.style,"transform",null)})}else M||(M=!0,b.handleError({message:mxResources.get("fileExists")}));else{K= +!1;try{if(W=mxUtils.parseXml(G),"mxlibrary"==W.documentElement.nodeName){t=JSON.parse(mxUtils.getTextContent(W.documentElement));if(null!=t&&0<t.length)for(var aa=0;aa<t.length;aa++)null!=t[aa].xml?y(null,null,0,0,0,0,t[aa]):y(t[aa].data,null,0,0,t[aa].w,t[aa].h,null,"fixed",t[aa].title);K=!0}else if("mxfile"==W.documentElement.nodeName){var Y=W.documentElement.getElementsByTagName("diagram");for(aa=0;aa<Y.length;aa++){t=mxUtils.getTextContent(Y[aa]);O=b.stringToCells(Graph.decompress(t));var Z=b.editor.graph.getBoundingBoxFromGeometry(O); +y(null,null,0,0,0,0,{xml:t,w:Z.width,h:Z.height})}K=!0}}catch(ba){}K||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ba){}return null}function D(G){G.dataTransfer.dropEffect=null!=E?"move":"copy";G.stopPropagation();G.preventDefault()}function d(G){G.stopPropagation();G.preventDefault();M=!1;z=x(G);if(null!=E)null!=z&&z<q.children.length?(g.splice(z>E?z-1:z,0,g.splice(E,1)[0]),q.insertBefore(q.children[E],q.children[z])):(g.push(g.splice(E,1)[0]),q.appendChild(q.children[E])); +else if(0<G.dataTransfer.files.length)b.importFiles(G.dataTransfer.files,0,0,b.maxImageSize,v(G));else if(0<=mxUtils.indexOf(G.dataTransfer.types,"text/uri-list")){var I=decodeURIComponent(G.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(I)||/(\.png)($|\?)/i.test(I)||/(\.gif)($|\?)/i.test(I)||/(\.svg)($|\?)/i.test(I))&&b.loadImage(I,function(F){y(I,null,0,0,F.width,F.height);q.scrollTop=q.scrollHeight})}G.stopPropagation();G.preventDefault()}var g=[];f=document.createElement("div"); f.style.height="100%";var k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.height="40px";f.appendChild(k);mxUtils.write(k,mxResources.get("filename")+":");null==e&&(e=b.defaultLibraryName+".xml");var n=document.createElement("input");n.setAttribute("value",e);n.style.marginRight="20px";n.style.marginLeft="10px";n.style.width="500px";null==l||l.isRenamable()||n.setAttribute("disabled","true");this.init=function(){if(null==l||l.isRenamable())n.focus(),mxClient.IS_GC||mxClient.IS_FF|| -5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null)};k.appendChild(n);var t=document.createElement("div");t.style.borderWidth="1px 0px 1px 0px";t.style.borderColor="#d3d3d3";t.style.borderStyle="solid";t.style.marginTop="6px";t.style.overflow="auto";t.style.height="340px";t.style.backgroundPosition="center center";t.style.backgroundRepeat="no-repeat";0==g.length&&Graph.fileSupport&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var p=document.createElement("div"); -p.style.position="absolute";p.style.width="640px";p.style.top="260px";p.style.textAlign="center";p.style.fontSize="22px";p.style.color="#a0c3ff";mxUtils.write(p,mxResources.get("dragImagesHere"));f.appendChild(p);var A={},E=null,y=null,B=null;e=function(G){"true"!=mxEvent.getSource(G).getAttribute("contentEditable")&&null!=B&&(B(),B=null,mxEvent.consume(G))};mxEvent.addListener(t,"mousedown",e);mxEvent.addListener(t,"pointerdown",e);mxEvent.addListener(t,"touchstart",e);var J=new mxUrlConverter,N= -!1;if(null!=c)for(e=0;e<c.length;e++)k=c[e],z(k.data,null,0,0,k.w,k.h,k,k.aspect,k.title);mxEvent.addListener(t,"dragleave",function(G){p.style.cursor="";for(var H=mxEvent.getSource(G);null!=H;){if(H==t||H==p){G.stopPropagation();G.preventDefault();break}H=H.parentNode}});var v=function(G){return function(H,M,K,I,F,P,U,T,V){null!=V&&(/(\.v(dx|sdx?))($|\?)/i.test(V.name)||/(\.vs(x|sx?))($|\?)/i.test(V.name))?b.importVisio(V,mxUtils.bind(this,function(W){z(W,M,K,I,F,P,U,"fixed",mxEvent.isAltDown(G)? -null:U.substring(0,U.lastIndexOf(".")).replace(/_/g," "))})):null!=V&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(H,V.name)?b.isExternalDataComms()?b.parseFile(V,mxUtils.bind(this,function(W){4==W.readyState&&(b.spinner.stop(),200<=W.status&&299>=W.status&&(z(W.responseText,M,K,I,F,P,U,"fixed",mxEvent.isAltDown(G)?null:U.substring(0,U.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))): -(z(H,M,K,I,F,P,U,"fixed",mxEvent.isAltDown(G)?null:U.substring(0,U.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight)}};mxEvent.addListener(t,"dragover",C);mxEvent.addListener(t,"drop",d);mxEvent.addListener(p,"dragover",C);mxEvent.addListener(p,"drop",d);f.appendChild(t);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});e.setAttribute("id","btnCancel");e.className="geBtn";b.editor.cancelFirst&& -c.appendChild(e);"draw.io"!=b.getServiceName()||null==l||l.constructor!=DriveLibrary&&l.constructor!=GitHubLibrary||(k=mxUtils.button(mxResources.get("link"),function(){b.spinner.spin(document.body,mxResources.get("loading"))&&l.getPublicUrl(function(G){b.spinner.stop();if(null!=G){var H=b.getSearch("create title mode url drive splash state clibs ui".split(" "));H+=(0==H.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(G);G=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+ -"/"+H,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(G.container,450,240,!0);G.init()}else l.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(l.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),k.className="geBtn",c.appendChild(k));k=mxUtils.button(mxResources.get("export"), -function(){var G=b.createLibraryDataFromImages(g),H=n.value;/(\.xml)$/i.test(H)||(H+=".xml");b.isLocalFileSave()?b.saveLocalFile(G,H,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(H)+"&format=xml&xml="+encodeURIComponent(G))).simulate(document,"_blank")});k.setAttribute("id","btnDownload");k.className="geBtn";c.appendChild(k);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var u=document.createElement("input");u.setAttribute("multiple","multiple"); -u.setAttribute("type","file");mxEvent.addListener(u,"change",function(G){N=!1;b.importFiles(u.files,0,0,b.maxImageSize,function(H,M,K,I,F,P,U,T,V){null!=u.files&&(v(G)(H,M,K,I,F,P,U,T,V),u.type="",u.type="file",u.value="")});t.scrollTop=t.scrollHeight});u.style.display="none";document.body.appendChild(u);b.libDlgFileInputElt=u}k=mxUtils.button(mxResources.get("import"),function(){null!=B&&(B(),B=null);b.libDlgFileInputElt.click()});k.setAttribute("id","btnAddImage");k.className="geBtn";c.appendChild(k)}k= -mxUtils.button(mxResources.get("addImages"),function(){null!=B&&(B(),B=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(G,H,M){N=!1;if(null!=G){if("data:image/"==G.substring(0,11)){var K=G.indexOf(",");0<K&&(G=G.substring(0,K)+";base64,"+G.substring(K+1))}z(G,null,0,0,H,M);t.scrollTop=t.scrollHeight}})});k.setAttribute("id","btnAddImageUrl");k.className="geBtn";c.appendChild(k);this.saveBtnClickHandler=function(G,H,M,K){b.saveLibrary(G,H,M,K)};k=mxUtils.button(mxResources.get("save"), -mxUtils.bind(this,function(){null!=B&&(B(),B=null);this.saveBtnClickHandler(n.value,g,l,m)}));k.setAttribute("id","btnSave");k.className="geBtn gePrimaryBtn";c.appendChild(k);b.editor.cancelFirst||c.appendChild(e);f.appendChild(c);this.container=f},EditShapeDialog=function(b,e,f,c,l){c=null!=c?c:300;l=null!=l?l:120;var m=document.createElement("table"),x=document.createElement("tbody");m.style.cellPadding="4px";var z=document.createElement("tr");var C=document.createElement("td");C.setAttribute("colspan", -"2");C.style.fontSize="10pt";mxUtils.write(C,f);z.appendChild(C);x.appendChild(z);z=document.createElement("tr");C=document.createElement("td");var d=document.createElement("textarea");d.style.outline="none";d.style.resize="none";d.style.width=c-200+"px";d.style.height=l+"px";this.textarea=d;this.init=function(){d.focus();d.scrollTop=0};C.appendChild(d);z.appendChild(C);C=document.createElement("td");f=document.createElement("div");f.style.position="relative";f.style.border="1px solid gray";f.style.top= -"6px";f.style.width="200px";f.style.height=l+4+"px";f.style.overflow="hidden";f.style.marginBottom="16px";mxEvent.disableContextMenu(f);C.appendChild(f);var g=new Graph(f);g.setEnabled(!1);var k=b.editor.graph.cloneCell(e);g.addCells([k]);f=g.view.getState(k);var n="";null!=f.shape&&null!=f.shape.stencil&&(n=mxUtils.getPrettyXml(f.shape.stencil.desc));mxUtils.write(d,n||"");f=g.getGraphBounds();l=Math.min(160/f.width,(l-40)/f.height);g.view.scaleAndTranslate(l,20/l-f.x,20/l-f.y);z.appendChild(C); -x.appendChild(z);z=document.createElement("tr");C=document.createElement("td");C.setAttribute("colspan","2");C.style.paddingTop="2px";C.style.whiteSpace="nowrap";C.setAttribute("align","right");b.isOffline()||(l=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/shape-complex-create-edit")}),l.className="geBtn",C.appendChild(l));l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.className="geBtn";b.editor.cancelFirst&&C.appendChild(l); -var t=function(p,A,E){var y=d.value,B=mxUtils.parseXml(y);y=mxUtils.getPrettyXml(B.documentElement);B=B.documentElement.getElementsByTagName("parsererror");if(null!=B&&0<B.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(E&&b.hideDialog(),B=!p.model.contains(A),!E||B||y!=n){y=Graph.compress(y);p.getModel().beginUpdate();try{if(B){var J=b.editor.graph.getFreeInsertPoint();A.geometry.x=J.x;A.geometry.y=J.y;p.addCell(A)}p.setCellStyles(mxConstants.STYLE_SHAPE, -"stencil("+y+")",[A])}catch(N){throw N;}finally{p.getModel().endUpdate()}B&&(p.setSelectionCell(A),p.scrollCellToVisible(A))}};f=mxUtils.button(mxResources.get("preview"),function(){t(g,k,!1)});f.className="geBtn";C.appendChild(f);f=mxUtils.button(mxResources.get("apply"),function(){t(b.editor.graph,e,!0)});f.className="geBtn gePrimaryBtn";C.appendChild(f);b.editor.cancelFirst||C.appendChild(l);z.appendChild(C);x.appendChild(z);m.appendChild(x);this.container=m},CustomDialog=function(b,e,f,c,l,m, -x,z,C,d,g){var k=document.createElement("div");k.appendChild(e);var n=document.createElement("div");n.style.marginTop="30px";n.style.textAlign="center";null!=x&&n.appendChild(x);b.isOffline()||null==m||(e=mxUtils.button(mxResources.get("help"),function(){b.openLink(m)}),e.className="geBtn",n.appendChild(e));C=mxUtils.button(C||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c()});C.className="geBtn";z&&(C.style.display="none");b.editor.cancelFirst&&n.appendChild(C);l=mxUtils.button(l|| -mxResources.get("ok"),mxUtils.bind(this,function(){d||b.hideDialog(null,null,this.container);if(null!=f){var t=f();if("string"===typeof t){b.showError(mxResources.get("error"),t);return}}d&&b.hideDialog(null,null,this.container)}));n.appendChild(l);l.className="geBtn gePrimaryBtn";b.editor.cancelFirst||n.appendChild(C);if(null!=g)for(z=0;z<g.length;z++)(function(t,p,A){t=mxUtils.button(t,function(E){p(E)});null!=A&&t.setAttribute("title",A);t.className="geBtn";n.appendChild(t)})(g[z][0],g[z][1],g[z][2]); -k.appendChild(n);this.cancelBtn=C;this.okButton=l;this.container=k},TemplatesDialog=function(b,e,f,c,l,m,x,z,C,d,g,k,n,t,p){function A(ea){Ca.innerText=ea;Ca.style.display="block";setTimeout(function(){Ca.style.display="none"},4E3)}function E(){null!=q&&(q.style.fontWeight="normal",q.style.textDecoration="none",D=q,q=null)}function y(ea,ia,oa,ma,xa,Ea,Ba){if(-1<ea.className.indexOf("geTempDlgRadioBtnActive"))return!1;ea.className+=" geTempDlgRadioBtnActive";T.querySelector(".geTempDlgRadioBtn[data-id="+ -ma+"]").className="geTempDlgRadioBtn "+(Ba?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");T.querySelector("."+ia).src="/images/"+oa+"-sel.svg";T.querySelector("."+xa).src="/images/"+Ea+".svg";return!0}function B(ea,ia,oa,ma){function xa(sa,Ja){null==Ba?(sa=/^https?:\/\//.test(sa)&&!b.editor.isCorsEnabledForUrl(sa)?PROXY_URL+"?url="+encodeURIComponent(sa):TEMPLATE_PATH+"/"+sa,mxUtils.get(sa,mxUtils.bind(this,function(Na){200<=Na.getStatus()&&299>=Na.getStatus()&&(Ba=Na.getText());Ja(Ba)}))):Ja(Ba)} -function Ea(sa,Ja,Na){if(null!=sa&&mxUtils.isAncestorNode(document.body,ia)&&(sa=mxUtils.parseXml(sa),sa=Editor.extractGraphModel(sa.documentElement,!0),null!=sa)){"mxfile"==sa.nodeName&&(sa=Editor.parseDiagramNode(sa.getElementsByTagName("diagram")[0]));var Ra=new mxCodec(sa.ownerDocument),Ka=new mxGraphModel;Ra.decode(sa,Ka);sa=Ka.root.getChildAt(0).children||[];b.sidebar.createTooltip(ia,sa,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight|| -document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=ea.title?mxResources.get(ea.title,null,ea.title):null,!0,new mxPoint(Ja,Na),!0,null,!0);var Pa=document.createElement("div");Pa.className="geTempDlgDialogMask";T.appendChild(Pa);var Qa=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Pa&&(T.removeChild(Pa),Pa=null,Qa.apply(this,arguments),b.sidebar.hideTooltip=Qa)};mxEvent.addListener(Pa,"click",function(){b.sidebar.hideTooltip()})}}var Ba=null;if(qa||b.sidebar.currentElt== -ia)b.sidebar.hideTooltip();else{var ua=function(sa){qa&&b.sidebar.currentElt==ia&&Ea(sa,mxEvent.getClientX(ma),mxEvent.getClientY(ma));qa=!1;oa.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=ia;qa=!0;oa.src="/images/aui-wait.gif";ea.isExt?C(ea,ua,function(){A(mxResources.get("cantLoadPrev"));qa=!1;oa.src="/images/icon-search.svg"}):xa(ea.url,ua)}}function J(ea,ia,oa){if(null!=L){for(var ma=L.className.split(" "),xa=0;xa<ma.length;xa++)if(-1<ma[xa].indexOf("Active")){ma.splice(xa, -1);break}L.className=ma.join(" ")}null!=ea?(L=ea,L.className+=" "+ia,R=oa,Ma.className="geTempDlgCreateBtn"):(R=L=null,Ma.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function N(ea,ia){if(null!=R){var oa=function(ua){Ba.isExternal?C(Ba,function(sa){ma(sa,ua)},xa):Ba.url?mxUtils.get(TEMPLATE_PATH+"/"+Ba.url,mxUtils.bind(this,function(sa){200<=sa.getStatus()&&299>=sa.getStatus()?ma(sa.getText(),ua):xa()})):ma(b.emptyDiagramXml,ua)},ma=function(ua,sa){p||b.hideDialog(!0);e(ua,sa,Ba,ia)},xa=function(){A(mxResources.get("cannotLoad")); -Ea()},Ea=function(){R=Ba;Ma.className="geTempDlgCreateBtn";ia&&(za.className="geTempDlgOpenBtn")},Ba=R;R=null;"boolean"!==typeof ia&&(ia=Ba.isExternal&&k);1==ea?d(Ba.url,Ba):ia?(za.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",oa()):(Ma.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ea=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),ea=new FilenameDialog(b,b.defaultFilename+".drawio", -mxResources.get("ok"),oa,ea,function(ua){var sa=null!=ua&&0<ua.length;return sa&&p?(oa(ua),!1):sa},null,null,null,Ea,t?null:[]),b.showDialog(ea.container,350,80,!0,!0),ea.init())}}function v(ea){Ma.innerText=mxResources.get(ba||ea?"create":"copy");ea=ea?"none":"";k&&(za.style.display=ea);for(var ia=T.querySelectorAll(".geTempDlgLinkToDiagram"),oa=0;oa<ia.length;oa++)ia[oa].style.display=ea}function u(ea,ia,oa,ma,xa){xa||(ka.innerText="",J(),X=ea,aa=ma);var Ea=null;if(oa){Ea=document.createElement("table"); -Ea.className="geTempDlgDiagramsListGrid";var Ba=document.createElement("tr"),ua=document.createElement("th");ua.style.width="50%";ua.innerText=mxResources.get("diagram");Ba.appendChild(ua);ua=document.createElement("th");ua.style.width="25%";ua.innerText=mxResources.get("changedBy");Ba.appendChild(ua);ua=document.createElement("th");ua.style.width="25%";ua.innerText=mxResources.get("lastModifiedOn");Ba.appendChild(ua);Ea.appendChild(Ba);ka.appendChild(Ea)}for(Ba=0;Ba<ea.length;Ba++){ea[Ba].isExternal= -!ia;var sa=ea[Ba].url,Ja=(ua=mxUtils.htmlEntities(ia?mxResources.get(ea[Ba].title,null,ea[Ba].title):ea[Ba].title))||ea[Ba].url,Na=ea[Ba].imgUrl,Ra=ea[Ba].changedBy||"",Ka="";ea[Ba].lastModifiedOn&&(Ka=b.timeSince(new Date(ea[Ba].lastModifiedOn)),null==Ka&&(Ka=mxResources.get("lessThanAMinute")),Ka=mxResources.get("timeAgo",[Ka],"{1} ago"));Na||(Na=TEMPLATE_PATH+"/"+sa.substring(0,sa.length-4)+".png");sa=oa?50:15;null!=ua&&ua.length>sa&&(ua=ua.substring(0,sa)+"…");if(oa){var Pa=document.createElement("tr"); -Na=document.createElement("td");var Qa=document.createElement("img");Qa.src="/images/icon-search.svg";Qa.className="geTempDlgDiagramListPreviewBtn";Qa.setAttribute("title",mxResources.get("preview"));xa||Na.appendChild(Qa);Ja=document.createElement("span");Ja.className="geTempDlgDiagramTitle";Ja.innerHTML=ua;Na.appendChild(Ja);Pa.appendChild(Na);Na=document.createElement("td");Na.innerText=Ra;Pa.appendChild(Na);Na=document.createElement("td");Na.innerText=Ka;Pa.appendChild(Na);Ea.appendChild(Pa); -null==L&&(v(ia),J(Pa,"geTempDlgDiagramsListGridActive",ea[Ba]));(function(La,Ta,Va){mxEvent.addListener(Pa,"click",function(){L!=Ta&&(v(ia),J(Ta,"geTempDlgDiagramsListGridActive",La))});mxEvent.addListener(Pa,"dblclick",N);mxEvent.addListener(Qa,"click",function(Wa){B(La,Ta,Va,Wa)})})(ea[Ba],Pa,Qa)}else{var Oa=document.createElement("div");Oa.className="geTempDlgDiagramTile";Oa.setAttribute("title",Ja);null==L&&(v(ia),J(Oa,"geTempDlgDiagramTileActive",ea[Ba]));Ra=document.createElement("div");Ra.className= +5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null)};k.appendChild(n);var q=document.createElement("div");q.style.borderWidth="1px 0px 1px 0px";q.style.borderColor="#d3d3d3";q.style.borderStyle="solid";q.style.marginTop="6px";q.style.overflow="auto";q.style.height="340px";q.style.backgroundPosition="center center";q.style.backgroundRepeat="no-repeat";0==g.length&&Graph.fileSupport&&(q.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var p=document.createElement("div"); +p.style.position="absolute";p.style.width="640px";p.style.top="260px";p.style.textAlign="center";p.style.fontSize="22px";p.style.color="#a0c3ff";mxUtils.write(p,mxResources.get("dragImagesHere"));f.appendChild(p);var A={},E=null,z=null,B=null;e=function(G){"true"!=mxEvent.getSource(G).getAttribute("contentEditable")&&null!=B&&(B(),B=null,mxEvent.consume(G))};mxEvent.addListener(q,"mousedown",e);mxEvent.addListener(q,"pointerdown",e);mxEvent.addListener(q,"touchstart",e);var J=new mxUrlConverter,M= +!1;if(null!=c)for(e=0;e<c.length;e++)k=c[e],y(k.data,null,0,0,k.w,k.h,k,k.aspect,k.title);mxEvent.addListener(q,"dragleave",function(G){p.style.cursor="";for(var I=mxEvent.getSource(G);null!=I;){if(I==q||I==p){G.stopPropagation();G.preventDefault();break}I=I.parentNode}});var v=function(G){return function(I,F,L,K,H,Q,U,T,V){null!=V&&(/(\.v(dx|sdx?))($|\?)/i.test(V.name)||/(\.vs(x|sx?))($|\?)/i.test(V.name))?b.importVisio(V,mxUtils.bind(this,function(W){y(W,F,L,K,H,Q,U,"fixed",mxEvent.isAltDown(G)? +null:U.substring(0,U.lastIndexOf(".")).replace(/_/g," "))})):null!=V&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(I,V.name)?b.isExternalDataComms()?b.parseFile(V,mxUtils.bind(this,function(W){4==W.readyState&&(b.spinner.stop(),200<=W.status&&299>=W.status&&(y(W.responseText,F,L,K,H,Q,U,"fixed",mxEvent.isAltDown(G)?null:U.substring(0,U.lastIndexOf(".")).replace(/_/g," ")),q.scrollTop=q.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))): +(y(I,F,L,K,H,Q,U,"fixed",mxEvent.isAltDown(G)?null:U.substring(0,U.lastIndexOf(".")).replace(/_/g," ")),q.scrollTop=q.scrollHeight)}};mxEvent.addListener(q,"dragover",D);mxEvent.addListener(q,"drop",d);mxEvent.addListener(p,"dragover",D);mxEvent.addListener(p,"drop",d);f.appendChild(q);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});e.setAttribute("id","btnCancel");e.className="geBtn";b.editor.cancelFirst&& +c.appendChild(e);"draw.io"!=b.getServiceName()||null==l||l.constructor!=DriveLibrary&&l.constructor!=GitHubLibrary||(k=mxUtils.button(mxResources.get("link"),function(){b.spinner.spin(document.body,mxResources.get("loading"))&&l.getPublicUrl(function(G){b.spinner.stop();if(null!=G){var I=b.getSearch("create title mode url drive splash state clibs ui".split(" "));I+=(0==I.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(G);G=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+ +"/"+I,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(G.container,450,240,!0);G.init()}else l.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(l.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),k.className="geBtn",c.appendChild(k));k=mxUtils.button(mxResources.get("export"), +function(){var G=b.createLibraryDataFromImages(g),I=n.value;/(\.xml)$/i.test(I)||(I+=".xml");b.isLocalFileSave()?b.saveLocalFile(G,I,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(I)+"&format=xml&xml="+encodeURIComponent(G))).simulate(document,"_blank")});k.setAttribute("id","btnDownload");k.className="geBtn";c.appendChild(k);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var u=document.createElement("input");u.setAttribute("multiple","multiple"); +u.setAttribute("type","file");mxEvent.addListener(u,"change",function(G){M=!1;b.importFiles(u.files,0,0,b.maxImageSize,function(I,F,L,K,H,Q,U,T,V){null!=u.files&&(v(G)(I,F,L,K,H,Q,U,T,V),u.type="",u.type="file",u.value="")});q.scrollTop=q.scrollHeight});u.style.display="none";document.body.appendChild(u);b.libDlgFileInputElt=u}k=mxUtils.button(mxResources.get("import"),function(){null!=B&&(B(),B=null);b.libDlgFileInputElt.click()});k.setAttribute("id","btnAddImage");k.className="geBtn";c.appendChild(k)}k= +mxUtils.button(mxResources.get("addImages"),function(){null!=B&&(B(),B=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(G,I,F){M=!1;if(null!=G){if("data:image/"==G.substring(0,11)){var L=G.indexOf(",");0<L&&(G=G.substring(0,L)+";base64,"+G.substring(L+1))}y(G,null,0,0,I,F);q.scrollTop=q.scrollHeight}})});k.setAttribute("id","btnAddImageUrl");k.className="geBtn";c.appendChild(k);this.saveBtnClickHandler=function(G,I,F,L){b.saveLibrary(G,I,F,L)};k=mxUtils.button(mxResources.get("save"), +mxUtils.bind(this,function(){null!=B&&(B(),B=null);this.saveBtnClickHandler(n.value,g,l,m)}));k.setAttribute("id","btnSave");k.className="geBtn gePrimaryBtn";c.appendChild(k);b.editor.cancelFirst||c.appendChild(e);f.appendChild(c);this.container=f},EditShapeDialog=function(b,e,f,c,l){c=null!=c?c:300;l=null!=l?l:120;var m=document.createElement("table"),x=document.createElement("tbody");m.style.cellPadding="4px";var y=document.createElement("tr");var D=document.createElement("td");D.setAttribute("colspan", +"2");D.style.fontSize="10pt";mxUtils.write(D,f);y.appendChild(D);x.appendChild(y);y=document.createElement("tr");D=document.createElement("td");var d=document.createElement("textarea");d.style.outline="none";d.style.resize="none";d.style.width=c-200+"px";d.style.height=l+"px";this.textarea=d;this.init=function(){d.focus();d.scrollTop=0};D.appendChild(d);y.appendChild(D);D=document.createElement("td");f=document.createElement("div");f.style.position="relative";f.style.border="1px solid gray";f.style.top= +"6px";f.style.width="200px";f.style.height=l+4+"px";f.style.overflow="hidden";f.style.marginBottom="16px";mxEvent.disableContextMenu(f);D.appendChild(f);var g=new Graph(f);g.setEnabled(!1);var k=b.editor.graph.cloneCell(e);g.addCells([k]);f=g.view.getState(k);var n="";null!=f.shape&&null!=f.shape.stencil&&(n=mxUtils.getPrettyXml(f.shape.stencil.desc));mxUtils.write(d,n||"");f=g.getGraphBounds();l=Math.min(160/f.width,(l-40)/f.height);g.view.scaleAndTranslate(l,20/l-f.x,20/l-f.y);y.appendChild(D); +x.appendChild(y);y=document.createElement("tr");D=document.createElement("td");D.setAttribute("colspan","2");D.style.paddingTop="2px";D.style.whiteSpace="nowrap";D.setAttribute("align","right");b.isOffline()||(l=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/shape-complex-create-edit")}),l.className="geBtn",D.appendChild(l));l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.className="geBtn";b.editor.cancelFirst&&D.appendChild(l); +var q=function(p,A,E){var z=d.value,B=mxUtils.parseXml(z);z=mxUtils.getPrettyXml(B.documentElement);B=B.documentElement.getElementsByTagName("parsererror");if(null!=B&&0<B.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(E&&b.hideDialog(),B=!p.model.contains(A),!E||B||z!=n){z=Graph.compress(z);p.getModel().beginUpdate();try{if(B){var J=b.editor.graph.getFreeInsertPoint();A.geometry.x=J.x;A.geometry.y=J.y;p.addCell(A)}p.setCellStyles(mxConstants.STYLE_SHAPE, +"stencil("+z+")",[A])}catch(M){throw M;}finally{p.getModel().endUpdate()}B&&(p.setSelectionCell(A),p.scrollCellToVisible(A))}};f=mxUtils.button(mxResources.get("preview"),function(){q(g,k,!1)});f.className="geBtn";D.appendChild(f);f=mxUtils.button(mxResources.get("apply"),function(){q(b.editor.graph,e,!0)});f.className="geBtn gePrimaryBtn";D.appendChild(f);b.editor.cancelFirst||D.appendChild(l);y.appendChild(D);x.appendChild(y);m.appendChild(x);this.container=m},CustomDialog=function(b,e,f,c,l,m, +x,y,D,d,g){var k=document.createElement("div");k.appendChild(e);var n=document.createElement("div");n.style.marginTop="30px";n.style.textAlign="center";null!=x&&n.appendChild(x);b.isOffline()||null==m||(e=mxUtils.button(mxResources.get("help"),function(){b.openLink(m)}),e.className="geBtn",n.appendChild(e));D=mxUtils.button(D||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c()});D.className="geBtn";y&&(D.style.display="none");b.editor.cancelFirst&&n.appendChild(D);l=mxUtils.button(l|| +mxResources.get("ok"),mxUtils.bind(this,function(){d||b.hideDialog(null,null,this.container);if(null!=f){var q=f();if("string"===typeof q){b.showError(mxResources.get("error"),q);return}}d&&b.hideDialog(null,null,this.container)}));n.appendChild(l);l.className="geBtn gePrimaryBtn";b.editor.cancelFirst||n.appendChild(D);if(null!=g)for(y=0;y<g.length;y++)(function(q,p,A){q=mxUtils.button(q,function(E){p(E)});null!=A&&q.setAttribute("title",A);q.className="geBtn";n.appendChild(q)})(g[y][0],g[y][1],g[y][2]); +k.appendChild(n);this.cancelBtn=D;this.okButton=l;this.container=k},TemplatesDialog=function(b,e,f,c,l,m,x,y,D,d,g,k,n,q,p){function A(da){Ba.innerText=da;Ba.style.display="block";setTimeout(function(){Ba.style.display="none"},4E3)}function E(){null!=t&&(t.style.fontWeight="normal",t.style.textDecoration="none",C=t,t=null)}function z(da,ha,ja,sa,oa,Ca,Aa){if(-1<da.className.indexOf("geTempDlgRadioBtnActive"))return!1;da.className+=" geTempDlgRadioBtnActive";T.querySelector(".geTempDlgRadioBtn[data-id="+ +sa+"]").className="geTempDlgRadioBtn "+(Aa?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");T.querySelector("."+ha).src="/images/"+ja+"-sel.svg";T.querySelector("."+oa).src="/images/"+Ca+".svg";return!0}function B(da,ha,ja,sa){function oa(qa,Ja){null==Aa?(qa=/^https?:\/\//.test(qa)&&!b.editor.isCorsEnabledForUrl(qa)?PROXY_URL+"?url="+encodeURIComponent(qa):TEMPLATE_PATH+"/"+qa,mxUtils.get(qa,mxUtils.bind(this,function(Na){200<=Na.getStatus()&&299>=Na.getStatus()&&(Aa=Na.getText());Ja(Aa)}))):Ja(Aa)} +function Ca(qa,Ja,Na){if(null!=qa&&mxUtils.isAncestorNode(document.body,ha)&&(qa=mxUtils.parseXml(qa),qa=Editor.extractGraphModel(qa.documentElement,!0),null!=qa)){"mxfile"==qa.nodeName&&(qa=Editor.parseDiagramNode(qa.getElementsByTagName("diagram")[0]));var Ra=new mxCodec(qa.ownerDocument),Ka=new mxGraphModel;Ra.decode(qa,Ka);qa=Ka.root.getChildAt(0).children||[];b.sidebar.createTooltip(ha,qa,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight|| +document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=da.title?mxResources.get(da.title,null,da.title):null,!0,new mxPoint(Ja,Na),!0,null,!0);var Pa=document.createElement("div");Pa.className="geTempDlgDialogMask";T.appendChild(Pa);var Qa=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Pa&&(T.removeChild(Pa),Pa=null,Qa.apply(this,arguments),b.sidebar.hideTooltip=Qa)};mxEvent.addListener(Pa,"click",function(){b.sidebar.hideTooltip()})}}var Aa=null;if(Da||b.sidebar.currentElt== +ha)b.sidebar.hideTooltip();else{var ua=function(qa){Da&&b.sidebar.currentElt==ha&&Ca(qa,mxEvent.getClientX(sa),mxEvent.getClientY(sa));Da=!1;ja.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=ha;Da=!0;ja.src="/images/aui-wait.gif";da.isExt?D(da,ua,function(){A(mxResources.get("cantLoadPrev"));Da=!1;ja.src="/images/icon-search.svg"}):oa(da.url,ua)}}function J(da,ha,ja){if(null!=N){for(var sa=N.className.split(" "),oa=0;oa<sa.length;oa++)if(-1<sa[oa].indexOf("Active")){sa.splice(oa, +1);break}N.className=sa.join(" ")}null!=da?(N=da,N.className+=" "+ha,R=ja,Ma.className="geTempDlgCreateBtn"):(R=N=null,Ma.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function M(da,ha){if(null!=R){var ja=function(ua){Aa.isExternal?D(Aa,function(qa){sa(qa,ua)},oa):Aa.url?mxUtils.get(TEMPLATE_PATH+"/"+Aa.url,mxUtils.bind(this,function(qa){200<=qa.getStatus()&&299>=qa.getStatus()?sa(qa.getText(),ua):oa()})):sa(b.emptyDiagramXml,ua)},sa=function(ua,qa){p||b.hideDialog(!0);e(ua,qa,Aa,ha)},oa=function(){A(mxResources.get("cannotLoad")); +Ca()},Ca=function(){R=Aa;Ma.className="geTempDlgCreateBtn";ha&&(va.className="geTempDlgOpenBtn")},Aa=R;R=null;"boolean"!==typeof ha&&(ha=Aa.isExternal&&k);1==da?d(Aa.url,Aa):ha?(va.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ja()):(Ma.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",da=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),da=new FilenameDialog(b,b.defaultFilename+".drawio", +mxResources.get("ok"),ja,da,function(ua){var qa=null!=ua&&0<ua.length;return qa&&p?(ja(ua),!1):qa},null,null,null,Ca,q?null:[]),b.showDialog(da.container,350,80,!0,!0),da.init())}}function v(da){Ma.innerText=mxResources.get(ba||da?"create":"copy");da=da?"none":"";k&&(va.style.display=da);for(var ha=T.querySelectorAll(".geTempDlgLinkToDiagram"),ja=0;ja<ha.length;ja++)ha[ja].style.display=da}function u(da,ha,ja,sa,oa){oa||(ma.innerText="",J(),X=da,aa=sa);var Ca=null;if(ja){Ca=document.createElement("table"); +Ca.className="geTempDlgDiagramsListGrid";var Aa=document.createElement("tr"),ua=document.createElement("th");ua.style.width="50%";ua.innerText=mxResources.get("diagram");Aa.appendChild(ua);ua=document.createElement("th");ua.style.width="25%";ua.innerText=mxResources.get("changedBy");Aa.appendChild(ua);ua=document.createElement("th");ua.style.width="25%";ua.innerText=mxResources.get("lastModifiedOn");Aa.appendChild(ua);Ca.appendChild(Aa);ma.appendChild(Ca)}for(Aa=0;Aa<da.length;Aa++){da[Aa].isExternal= +!ha;var qa=da[Aa].url,Ja=(ua=mxUtils.htmlEntities(ha?mxResources.get(da[Aa].title,null,da[Aa].title):da[Aa].title))||da[Aa].url,Na=da[Aa].imgUrl,Ra=da[Aa].changedBy||"",Ka="";da[Aa].lastModifiedOn&&(Ka=b.timeSince(new Date(da[Aa].lastModifiedOn)),null==Ka&&(Ka=mxResources.get("lessThanAMinute")),Ka=mxResources.get("timeAgo",[Ka],"{1} ago"));Na||(Na=TEMPLATE_PATH+"/"+qa.substring(0,qa.length-4)+".png");qa=ja?50:15;null!=ua&&ua.length>qa&&(ua=ua.substring(0,qa)+"…");if(ja){var Pa=document.createElement("tr"); +Na=document.createElement("td");var Qa=document.createElement("img");Qa.src="/images/icon-search.svg";Qa.className="geTempDlgDiagramListPreviewBtn";Qa.setAttribute("title",mxResources.get("preview"));oa||Na.appendChild(Qa);Ja=document.createElement("span");Ja.className="geTempDlgDiagramTitle";Ja.innerHTML=ua;Na.appendChild(Ja);Pa.appendChild(Na);Na=document.createElement("td");Na.innerText=Ra;Pa.appendChild(Na);Na=document.createElement("td");Na.innerText=Ka;Pa.appendChild(Na);Ca.appendChild(Pa); +null==N&&(v(ha),J(Pa,"geTempDlgDiagramsListGridActive",da[Aa]));(function(La,Ta,Va){mxEvent.addListener(Pa,"click",function(){N!=Ta&&(v(ha),J(Ta,"geTempDlgDiagramsListGridActive",La))});mxEvent.addListener(Pa,"dblclick",M);mxEvent.addListener(Qa,"click",function(Wa){B(La,Ta,Va,Wa)})})(da[Aa],Pa,Qa)}else{var Oa=document.createElement("div");Oa.className="geTempDlgDiagramTile";Oa.setAttribute("title",Ja);null==N&&(v(ha),J(Oa,"geTempDlgDiagramTileActive",da[Aa]));Ra=document.createElement("div");Ra.className= "geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var Sa=document.createElement("img");Sa.style.display="none";(function(La,Ta,Va){Sa.onload=function(){Ta.className="geTempDlgDiagramTileImg";La.style.display=""};Sa.onerror=function(){this.src!=Va?this.src=Va:Ta.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(Sa,Ra,Na?Na.replace(".drawio.xml","").replace(".drawio","").replace(".xml",""):"");Sa.src=Na;Ra.appendChild(Sa);Oa.appendChild(Ra);Ra=document.createElement("div"); -Ra.className="geTempDlgDiagramTileLbl";Ra.innerHTML=null!=ua?ua:"";Oa.appendChild(Ra);Qa=document.createElement("img");Qa.src="/images/icon-search.svg";Qa.className="geTempDlgDiagramPreviewBtn";Qa.setAttribute("title",mxResources.get("preview"));xa||Oa.appendChild(Qa);(function(La,Ta,Va){mxEvent.addListener(Oa,"click",function(){L!=Ta&&(v(ia),J(Ta,"geTempDlgDiagramTileActive",La))});mxEvent.addListener(Oa,"dblclick",N);mxEvent.addListener(Qa,"click",function(Wa){B(La,Ta,Va,Wa)})})(ea[Ba],Oa,Qa);ka.appendChild(Oa)}}for(var Ua in ma)ea= -ma[Ua],0<ea.length&&(xa=document.createElement("div"),xa.className="geTempDlgImportCat",xa.innerText=mxResources.get(Ua,null,Ua),ka.appendChild(xa),u(ea,ia,oa,null,!0))}function G(ea,ia){Aa.innerText="";J();var oa=Math.floor(Aa.offsetWidth/150)-1;ia=!ia&&ea.length>oa?oa:ea.length;for(var ma=0;ma<ia;ma++){var xa=ea[ma];xa.isCategory=!0;var Ea=document.createElement("div"),Ba=mxResources.get(xa.title);null==Ba&&(Ba=xa.title.substring(0,1).toUpperCase()+xa.title.substring(1));Ea.className="geTempDlgNewDiagramCatItem"; -Ea.setAttribute("title",Ba);Ba=mxUtils.htmlEntities(Ba);15<Ba.length&&(Ba=Ba.substring(0,15)+"…");null==L&&(v(!0),J(Ea,"geTempDlgNewDiagramCatItemActive",xa));var ua=document.createElement("div");ua.className="geTempDlgNewDiagramCatItemImg";var sa=document.createElement("img");sa.src=NEW_DIAGRAM_CATS_PATH+"/"+xa.img;ua.appendChild(sa);Ea.appendChild(ua);ua=document.createElement("div");ua.className="geTempDlgNewDiagramCatItemLbl";ua.innerHTML=Ba;Ea.appendChild(ua);Aa.appendChild(Ea);(function(Ja, -Na){mxEvent.addListener(Ea,"click",function(){L!=Na&&(v(!0),J(Na,"geTempDlgNewDiagramCatItemActive",Ja))});mxEvent.addListener(Ea,"dblclick",N)})(xa,Ea)}Ea=document.createElement("div");Ea.className="geTempDlgNewDiagramCatItem";Ba=mxResources.get("showAllTemps");Ea.setAttribute("title",Ba);ua=document.createElement("div");ua.className="geTempDlgNewDiagramCatItemImg";ua.innerText="...";ua.style.fontSize="32px";Ea.appendChild(ua);ua=document.createElement("div");ua.className="geTempDlgNewDiagramCatItemLbl"; -ua.innerText=Ba;Ea.appendChild(ua);Aa.appendChild(Ea);mxEvent.addListener(Ea,"click",function(){function Ja(){var Ra=Na.querySelector(".geTemplateDrawioCatLink");null!=Ra?Ra.click():setTimeout(Ja,200)}ba=!0;var Na=T.querySelector(".geTemplatesList");Na.style.display="block";la.style.width="";Da.style.display="";Da.value="";Y=null;Ja()});fa.style.display=ea.length<=oa?"none":""}function H(ea,ia,oa){function ma(Sa,Ua){var La=mxResources.get(Sa);null==La&&(La=Sa.substring(0,1).toUpperCase()+Sa.substring(1)); -Sa=La+" ("+Ua.length+")";var Ta=La=mxUtils.htmlEntities(La);15<La.length&&(La=La.substring(0,15)+"…");return{lbl:La+" ("+Ua.length+")",fullLbl:Sa,lblOnly:Ta}}function xa(Sa,Ua,La,Ta,Va){mxEvent.addListener(La,"click",function(){q!=La&&(null!=q?(q.style.fontWeight="normal",q.style.textDecoration="none"):(Ga.style.display="none",Fa.style.minHeight="100%"),q=La,q.style.fontWeight="bold",q.style.textDecoration="underline",la.scrollTop=0,V&&(W=!0),ha.innerHTML=Ua,ra.style.display="none",u(Va?ia[Sa]: -Ta?Ia[Sa][Ta]:ea[Sa],Va?!1:!0))})}var Ea=T.querySelector(".geTemplatesList");if(0<oa){oa=document.createElement("div");oa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(oa,mxResources.get("custom"));Ea.appendChild(oa);for(var Ba in ia){oa=document.createElement("div");var ua=ia[Ba];ua=ma(Ba,ua);oa.className="geTemplateCatLink";oa.setAttribute("title",ua.fullLbl);oa.innerHTML=ua.lbl;Ea.appendChild(oa);xa(Ba,ua.lblOnly,oa, -null,!0)}oa=document.createElement("div");oa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(oa,"draw.io");Ea.appendChild(oa)}for(Ba in ea){var sa=Ia[Ba],Ja=oa=document.createElement(sa?"ul":"div");ua=ea[Ba];ua=ma(Ba,ua);if(null!=sa){var Na=document.createElement("li"),Ra=document.createElement("div");Ra.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";Ra.style.padding="0";Ra.setAttribute("title",ua.fullLbl); -Ra.innerHTML=ua.lbl;Ja=Ra;Na.appendChild(Ra);var Ka=document.createElement("ul");Ka.className="geTempTreeNested";Ka.style.visibility="hidden";for(var Pa in sa){var Qa=document.createElement("li"),Oa=ma(Pa,sa[Pa]);Qa.setAttribute("title",Oa.fullLbl);Qa.innerHTML=Oa.lbl;Qa.className="geTemplateCatLink";Qa.style.padding="0";Qa.style.margin="0";xa(Ba,Oa.lblOnly,Qa,Pa);Ka.appendChild(Qa)}Na.appendChild(Ka);oa.className="geTempTree";oa.appendChild(Na);(function(Sa,Ua){mxEvent.addListener(Ua,"click",function(){for(var La= -Sa.querySelectorAll("li"),Ta=0;Ta<La.length;Ta++)La[Ta].style.margin="";Sa.style.visibility="visible";Sa.classList.toggle("geTempTreeActive");Sa.classList.toggle("geTempTreeNested")&&setTimeout(function(){for(var Va=0;Va<La.length;Va++)La[Va].style.margin="0";Sa.style.visibility="hidden"},250);Ua.classList.toggle("geTempTreeCaret-down")})})(Ka,Ra)}else oa.className="geTemplateCatLink geTemplateDrawioCatLink",oa.setAttribute("title",ua.fullLbl),oa.innerHTML=ua.lbl;Ea.appendChild(oa);xa(Ba,ua.lblOnly, -Ja)}}function M(){mxUtils.get(c,function(ea){if(!wa){wa=!0;ea=ea.getXml().documentElement.firstChild;for(var ia={};null!=ea;){if("undefined"!==typeof ea.getAttribute)if("clibs"==ea.nodeName){for(var oa=ea.getAttribute("name"),ma=ea.getElementsByTagName("add"),xa=[],Ea=0;Ea<ma.length;Ea++)xa.push(encodeURIComponent(mxUtils.getTextContent(ma[Ea])));null!=oa&&0<xa.length&&(ia[oa]=xa.join(";"))}else if(xa=ea.getAttribute("url"),null!=xa){ma=ea.getAttribute("section");oa=ea.getAttribute("subsection"); -if(null==ma&&(Ea=xa.indexOf("/"),ma=xa.substring(0,Ea),null==oa)){var Ba=xa.indexOf("/",Ea+1);-1<Ba&&(oa=xa.substring(Ea+1,Ba))}Ea=ya[ma];null==Ea&&(ta++,Ea=[],ya[ma]=Ea);xa=ea.getAttribute("clibs");null!=ia[xa]&&(xa=ia[xa]);xa={url:ea.getAttribute("url"),libs:ea.getAttribute("libs"),title:ea.getAttribute("title")||ea.getAttribute("name"),preview:ea.getAttribute("preview"),clibs:xa,tags:ea.getAttribute("tags")};Ea.push(xa);null!=oa&&(Ea=Ia[ma],null==Ea&&(Ea={},Ia[ma]=Ea),ma=Ea[oa],null==ma&&(ma=[], -Ea[oa]=ma),ma.push(xa))}ea=ea.nextSibling}H(ya,ja,da)}})}function K(ea){x&&(la.scrollTop=0,ka.innerText="",pa.spin(ka),W=!1,V=!0,ha.innerText=mxResources.get("recentDiag"),Y=null,x(ca,function(){A(mxResources.get("cannotLoad"));ca([])},ea?null:m))}function I(ea){if(""==ea)null!=D&&(D.click(),D=null);else{if(null==TemplatesDialog.tagsList[c]){var ia={};for(Ja in ya)for(var oa=ya[Ja],ma=0;ma<oa.length;ma++){var xa=oa[ma];if(null!=xa.tags)for(var Ea=xa.tags.toLowerCase().split(";"),Ba=0;Ba<Ea.length;Ba++)null== -ia[Ea[Ba]]&&(ia[Ea[Ba]]=[]),ia[Ea[Ba]].push(xa)}TemplatesDialog.tagsList[c]=ia}var ua=ea.toLowerCase().split(" ");ia=TemplatesDialog.tagsList[c];if(0<da&&null==ia.__tagsList__){for(Ja in ja)for(oa=ja[Ja],ma=0;ma<oa.length;ma++)for(xa=oa[ma],Ea=xa.title.split(" "),Ea.push(Ja),Ba=0;Ba<Ea.length;Ba++){var sa=Ea[Ba].toLowerCase();null==ia[sa]&&(ia[sa]=[]);ia[sa].push(xa)}ia.__tagsList__=!0}var Ja=[];oa={};for(ma=Ea=0;ma<ua.length;ma++)if(0<ua[ma].length){sa=ia[ua[ma]];var Na={};Ja=[];if(null!=sa)for(Ba= -0;Ba<sa.length;Ba++)xa=sa[Ba],0==Ea==(null==oa[xa.url])&&(Na[xa.url]=!0,Ja.push(xa));oa=Na;Ea++}0==Ja.length?ha.innerText=mxResources.get("noResultsFor",[ea]):u(Ja,!0)}}function F(ea){if(Y!=ea||Q!=Z)E(),la.scrollTop=0,ka.innerText="",ha.innerText=mxResources.get("searchResults")+' "'+ea+'"',na=null,ba?I(ea):z&&(ea?(pa.spin(ka),W=!1,V=!0,z(ea,ca,function(){A(mxResources.get("searchFailed"));ca([])},Q?null:m)):K(Q)),Y=ea,Z=Q}function P(ea){null!=na&&clearTimeout(na);13==ea.keyCode?F(Da.value):na=setTimeout(function(){F(Da.value)}, -1E3)}var U='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(z?"":'style="display: none"')+' placeholder="'+mxResources.get("search")+'"></div><div class="geTemplatesList" style="display: none"><div class="geTempDlgBack">< '+mxResources.get("back")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+mxResources.get("templates")+'</div></div><div class="geTempDlgContent" style="width: 100%"><div class="geTempDlgNewDiagramCat"><div class="geTempDlgNewDiagramCatLbl">'+ +Ra.className="geTempDlgDiagramTileLbl";Ra.innerHTML=null!=ua?ua:"";Oa.appendChild(Ra);Qa=document.createElement("img");Qa.src="/images/icon-search.svg";Qa.className="geTempDlgDiagramPreviewBtn";Qa.setAttribute("title",mxResources.get("preview"));oa||Oa.appendChild(Qa);(function(La,Ta,Va){mxEvent.addListener(Oa,"click",function(){N!=Ta&&(v(ha),J(Ta,"geTempDlgDiagramTileActive",La))});mxEvent.addListener(Oa,"dblclick",M);mxEvent.addListener(Qa,"click",function(Wa){B(La,Ta,Va,Wa)})})(da[Aa],Oa,Qa);ma.appendChild(Oa)}}for(var Ua in sa)da= +sa[Ua],0<da.length&&(oa=document.createElement("div"),oa.className="geTempDlgImportCat",oa.innerText=mxResources.get(Ua,null,Ua),ma.appendChild(oa),u(da,ha,ja,null,!0))}function G(da,ha){xa.innerText="";J();var ja=Math.floor(xa.offsetWidth/150)-1;ha=!ha&&da.length>ja?ja:da.length;for(var sa=0;sa<ha;sa++){var oa=da[sa];oa.isCategory=!0;var Ca=document.createElement("div"),Aa=mxResources.get(oa.title);null==Aa&&(Aa=oa.title.substring(0,1).toUpperCase()+oa.title.substring(1));Ca.className="geTempDlgNewDiagramCatItem"; +Ca.setAttribute("title",Aa);Aa=mxUtils.htmlEntities(Aa);15<Aa.length&&(Aa=Aa.substring(0,15)+"…");null==N&&(v(!0),J(Ca,"geTempDlgNewDiagramCatItemActive",oa));var ua=document.createElement("div");ua.className="geTempDlgNewDiagramCatItemImg";var qa=document.createElement("img");qa.src=NEW_DIAGRAM_CATS_PATH+"/"+oa.img;ua.appendChild(qa);Ca.appendChild(ua);ua=document.createElement("div");ua.className="geTempDlgNewDiagramCatItemLbl";ua.innerHTML=Aa;Ca.appendChild(ua);xa.appendChild(Ca);(function(Ja, +Na){mxEvent.addListener(Ca,"click",function(){N!=Na&&(v(!0),J(Na,"geTempDlgNewDiagramCatItemActive",Ja))});mxEvent.addListener(Ca,"dblclick",M)})(oa,Ca)}Ca=document.createElement("div");Ca.className="geTempDlgNewDiagramCatItem";Aa=mxResources.get("showAllTemps");Ca.setAttribute("title",Aa);ua=document.createElement("div");ua.className="geTempDlgNewDiagramCatItemImg";ua.innerText="...";ua.style.fontSize="32px";Ca.appendChild(ua);ua=document.createElement("div");ua.className="geTempDlgNewDiagramCatItemLbl"; +ua.innerText=Aa;Ca.appendChild(ua);xa.appendChild(Ca);mxEvent.addListener(Ca,"click",function(){function Ja(){var Ra=Na.querySelector(".geTemplateDrawioCatLink");null!=Ra?Ra.click():setTimeout(Ja,200)}ba=!0;var Na=T.querySelector(".geTemplatesList");Na.style.display="block";na.style.width="";Ea.style.display="";Ea.value="";Y=null;Ja()});ea.style.display=da.length<=ja?"none":""}function I(da,ha,ja){function sa(Sa,Ua){var La=mxResources.get(Sa);null==La&&(La=Sa.substring(0,1).toUpperCase()+Sa.substring(1)); +Sa=La+" ("+Ua.length+")";var Ta=La=mxUtils.htmlEntities(La);15<La.length&&(La=La.substring(0,15)+"…");return{lbl:La+" ("+Ua.length+")",fullLbl:Sa,lblOnly:Ta}}function oa(Sa,Ua,La,Ta,Va){mxEvent.addListener(La,"click",function(){t!=La&&(null!=t?(t.style.fontWeight="normal",t.style.textDecoration="none"):(Ga.style.display="none",Fa.style.minHeight="100%"),t=La,t.style.fontWeight="bold",t.style.textDecoration="underline",na.scrollTop=0,V&&(W=!0),ia.innerHTML=Ua,pa.style.display="none",u(Va?ha[Sa]: +Ta?Ia[Sa][Ta]:da[Sa],Va?!1:!0))})}var Ca=T.querySelector(".geTemplatesList");if(0<ja){ja=document.createElement("div");ja.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(ja,mxResources.get("custom"));Ca.appendChild(ja);for(var Aa in ha){ja=document.createElement("div");var ua=ha[Aa];ua=sa(Aa,ua);ja.className="geTemplateCatLink";ja.setAttribute("title",ua.fullLbl);ja.innerHTML=ua.lbl;Ca.appendChild(ja);oa(Aa,ua.lblOnly,ja, +null,!0)}ja=document.createElement("div");ja.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(ja,"draw.io");Ca.appendChild(ja)}for(Aa in da){var qa=Ia[Aa],Ja=ja=document.createElement(qa?"ul":"div");ua=da[Aa];ua=sa(Aa,ua);if(null!=qa){var Na=document.createElement("li"),Ra=document.createElement("div");Ra.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";Ra.style.padding="0";Ra.setAttribute("title",ua.fullLbl); +Ra.innerHTML=ua.lbl;Ja=Ra;Na.appendChild(Ra);var Ka=document.createElement("ul");Ka.className="geTempTreeNested";Ka.style.visibility="hidden";for(var Pa in qa){var Qa=document.createElement("li"),Oa=sa(Pa,qa[Pa]);Qa.setAttribute("title",Oa.fullLbl);Qa.innerHTML=Oa.lbl;Qa.className="geTemplateCatLink";Qa.style.padding="0";Qa.style.margin="0";oa(Aa,Oa.lblOnly,Qa,Pa);Ka.appendChild(Qa)}Na.appendChild(Ka);ja.className="geTempTree";ja.appendChild(Na);(function(Sa,Ua){mxEvent.addListener(Ua,"click",function(){for(var La= +Sa.querySelectorAll("li"),Ta=0;Ta<La.length;Ta++)La[Ta].style.margin="";Sa.style.visibility="visible";Sa.classList.toggle("geTempTreeActive");Sa.classList.toggle("geTempTreeNested")&&setTimeout(function(){for(var Va=0;Va<La.length;Va++)La[Va].style.margin="0";Sa.style.visibility="hidden"},250);Ua.classList.toggle("geTempTreeCaret-down")})})(Ka,Ra)}else ja.className="geTemplateCatLink geTemplateDrawioCatLink",ja.setAttribute("title",ua.fullLbl),ja.innerHTML=ua.lbl;Ca.appendChild(ja);oa(Aa,ua.lblOnly, +Ja)}}function F(){mxUtils.get(c,function(da){if(!la){la=!0;da=da.getXml().documentElement.firstChild;for(var ha={};null!=da;){if("undefined"!==typeof da.getAttribute)if("clibs"==da.nodeName){for(var ja=da.getAttribute("name"),sa=da.getElementsByTagName("add"),oa=[],Ca=0;Ca<sa.length;Ca++)oa.push(encodeURIComponent(mxUtils.getTextContent(sa[Ca])));null!=ja&&0<oa.length&&(ha[ja]=oa.join(";"))}else if(oa=da.getAttribute("url"),null!=oa){sa=da.getAttribute("section");ja=da.getAttribute("subsection"); +if(null==sa&&(Ca=oa.indexOf("/"),sa=oa.substring(0,Ca),null==ja)){var Aa=oa.indexOf("/",Ca+1);-1<Aa&&(ja=oa.substring(Ca+1,Aa))}Ca=ya[sa];null==Ca&&(ra++,Ca=[],ya[sa]=Ca);oa=da.getAttribute("clibs");null!=ha[oa]&&(oa=ha[oa]);oa={url:da.getAttribute("url"),libs:da.getAttribute("libs"),title:da.getAttribute("title")||da.getAttribute("name"),preview:da.getAttribute("preview"),clibs:oa,tags:da.getAttribute("tags")};Ca.push(oa);null!=ja&&(Ca=Ia[sa],null==Ca&&(Ca={},Ia[sa]=Ca),sa=Ca[ja],null==sa&&(sa=[], +Ca[ja]=sa),sa.push(oa))}da=da.nextSibling}I(ya,ka,wa)}})}function L(da){x&&(na.scrollTop=0,ma.innerText="",za.spin(ma),W=!1,V=!0,ia.innerText=mxResources.get("recentDiag"),Y=null,x(ca,function(){A(mxResources.get("cannotLoad"));ca([])},da?null:m))}function K(da){if(""==da)null!=C&&(C.click(),C=null);else{if(null==TemplatesDialog.tagsList[c]){var ha={};for(Ja in ya)for(var ja=ya[Ja],sa=0;sa<ja.length;sa++){var oa=ja[sa];if(null!=oa.tags)for(var Ca=oa.tags.toLowerCase().split(";"),Aa=0;Aa<Ca.length;Aa++)null== +ha[Ca[Aa]]&&(ha[Ca[Aa]]=[]),ha[Ca[Aa]].push(oa)}TemplatesDialog.tagsList[c]=ha}var ua=da.toLowerCase().split(" ");ha=TemplatesDialog.tagsList[c];if(0<wa&&null==ha.__tagsList__){for(Ja in ka)for(ja=ka[Ja],sa=0;sa<ja.length;sa++)for(oa=ja[sa],Ca=oa.title.split(" "),Ca.push(Ja),Aa=0;Aa<Ca.length;Aa++){var qa=Ca[Aa].toLowerCase();null==ha[qa]&&(ha[qa]=[]);ha[qa].push(oa)}ha.__tagsList__=!0}var Ja=[];ja={};for(sa=Ca=0;sa<ua.length;sa++)if(0<ua[sa].length){qa=ha[ua[sa]];var Na={};Ja=[];if(null!=qa)for(Aa= +0;Aa<qa.length;Aa++)oa=qa[Aa],0==Ca==(null==ja[oa.url])&&(Na[oa.url]=!0,Ja.push(oa));ja=Na;Ca++}0==Ja.length?ia.innerText=mxResources.get("noResultsFor",[da]):u(Ja,!0)}}function H(da){if(Y!=da||P!=Z)E(),na.scrollTop=0,ma.innerText="",ia.innerText=mxResources.get("searchResults")+' "'+da+'"',fa=null,ba?K(da):y&&(da?(za.spin(ma),W=!1,V=!0,y(da,ca,function(){A(mxResources.get("searchFailed"));ca([])},P?null:m)):L(P)),Y=da,Z=P}function Q(da){null!=fa&&clearTimeout(fa);13==da.keyCode?H(Ea.value):fa=setTimeout(function(){H(Ea.value)}, +1E3)}var U='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(y?"":'style="display: none"')+' placeholder="'+mxResources.get("search")+'"></div><div class="geTemplatesList" style="display: none"><div class="geTempDlgBack">< '+mxResources.get("back")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+mxResources.get("templates")+'</div></div><div class="geTempDlgContent" style="width: 100%"><div class="geTempDlgNewDiagramCat"><div class="geTempDlgNewDiagramCatLbl">'+ mxResources.get("newDiagram")+'</div><div class="geTempDlgNewDiagramCatList"></div><div class="geTempDlgNewDiagramCatFooter"><div class="geTempDlgShowAllBtn">'+mxResources.get("showMore")+'</div></div></div><div class="geTempDlgDiagramsList"><div class="geTempDlgDiagramsListHeader"><div class="geTempDlgDiagramsListTitle"></div><div class="geTempDlgDiagramsListBtns"><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge" data-id="myDiagramsBtn"><img src="/images/my-diagrams.svg" class="geTempDlgMyDiagramsBtnImg"> <span>'+ mxResources.get("myDiagrams")+'</span></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge geTempDlgRadioBtnActive" data-id="allDiagramsBtn"><img src="/images/all-diagrams-sel.svg" class="geTempDlgAllDiagramsBtnImg"> <span>'+mxResources.get("allDiagrams")+'</span></div><div class="geTempDlgSpacer"> </div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall geTempDlgRadioBtnActive" data-id="tilesBtn"><img src="/images/tiles-sel.svg" class="geTempDlgTilesBtnImg"></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall" data-id="listBtn"><img src="/images/list.svg" class="geTempDlgListBtnImg"></div></div></div><div class="geTempDlgDiagramsTiles"></div></div></div><br style="clear:both;"/><div class="geTempDlgFooter"><div class="geTempDlgErrMsg"></div>'+ (n?'<span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">'+mxResources.get("linkToDiagramHint")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram")+"</button>":"")+(k?'<div class="geTempDlgOpenBtn">'+mxResources.get("open")+"</div>":"")+'<div class="geTempDlgCreateBtn">'+mxResources.get("create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel")+"</div></div>",T=document.createElement("div");T.innerHTML=U;T.className= -"geTemplateDlg";this.container=T;c=null!=c?c:TEMPLATE_PATH+"/index.xml";l=null!=l?l:NEW_DIAGRAM_CATS_PATH+"/index.xml";var V=!1,W=!1,q=null,D=null,L=null,R=null,O=!1,Q=!0,S=!1,X=[],aa=null,Y,Z,ba=!1,fa=T.querySelector(".geTempDlgShowAllBtn"),ka=T.querySelector(".geTempDlgDiagramsTiles"),ha=T.querySelector(".geTempDlgDiagramsListTitle"),ra=T.querySelector(".geTempDlgDiagramsListBtns"),la=T.querySelector(".geTempDlgContent"),Fa=T.querySelector(".geTempDlgDiagramsList"),Ga=T.querySelector(".geTempDlgNewDiagramCat"), -Aa=T.querySelector(".geTempDlgNewDiagramCatList"),Ma=T.querySelector(".geTempDlgCreateBtn"),za=T.querySelector(".geTempDlgOpenBtn"),Da=T.querySelector(".geTempDlgSearchBox"),Ca=T.querySelector(".geTempDlgErrMsg"),pa=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(T.querySelector(".geTempDlgBack"),"click",function(){E();ba=!1;T.querySelector(".geTemplatesList").style.display="none";la.style.width= -"100%";Ga.style.display="";Fa.style.minHeight="calc(100% - 280px)";Da.style.display=z?"":"none";Da.value="";Y=null;K(Q)});mxEvent.addListener(T.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){y(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(Q=!0,null==Y?K(Q):F(Y))});mxEvent.addListener(T.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){y(this,"geTempDlgMyDiagramsBtnImg","my-diagrams", -"allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(Q=!1,null==Y?K(Q):F(Y))});mxEvent.addListener(T.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){y(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(S=!0,u(X,!1,S,aa))});mxEvent.addListener(T.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){y(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(S=!1,u(X,!1,S,aa))});var qa=!1; -mxEvent.addListener(fa,"click",function(){O?(Ga.style.height="280px",Aa.style.height="190px",fa.innerText=mxResources.get("showMore"),G(va)):(Ga.style.height="440px",Aa.style.height="355px",fa.innerText=mxResources.get("showLess"),G(va,!0));O=!O});var wa=!1,Ha=!1,ya={},Ia={},ja={},va=[],ta=1,da=0;null!=g?g(function(ea,ia){ja=ea;da=ia;M()},M):M();mxUtils.get(l,function(ea){if(!Ha){Ha=!0;for(ea=ea.getXml().documentElement.firstChild;null!=ea;)"undefined"!==typeof ea.getAttribute&&null!=ea.getAttribute("title")&& -va.push({img:ea.getAttribute("img"),libs:ea.getAttribute("libs"),clibs:ea.getAttribute("clibs"),title:ea.getAttribute("title")}),ea=ea.nextSibling;G(va)}});var ca=function(ea,ia,oa){ra.style.display="";pa.stop();V=!1;if(W)W=!1;else if(ia)ka.innerText=ia;else{oa=oa||{};ia=0;for(var ma in oa)ia+=oa[ma].length;0==ea.length&&0==ia?ka.innerText=mxResources.get("noDiagrams"):u(ea,!1,S,0==ia?null:oa)}};K(Q);var na=null;mxEvent.addListener(Da,"keyup",P);mxEvent.addListener(Da,"search",P);mxEvent.addListener(Da, -"input",P);mxEvent.addListener(Ma,"click",function(ea){N(!1,!1)});k&&mxEvent.addListener(za,"click",function(ea){N(!1,!0)});n&&mxEvent.addListener(T.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(ea){N(!0)});mxEvent.addListener(T.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=f&&f();p||b.hideDialog(!0)})};TemplatesDialog.tagsList={}; -var BtnDialog=function(b,e,f,c){var l=document.createElement("div");l.style.textAlign="center";var m=document.createElement("p");m.style.fontSize="16pt";m.style.padding="0px";m.style.margin="0px";m.style.color="gray";mxUtils.write(m,mxResources.get("done"));var x="Unknown",z=document.createElement("img");z.setAttribute("border","0");z.setAttribute("align","absmiddle");z.style.marginRight="10px";e==b.drive?(x=mxResources.get("googleDrive"),z.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox? -(x=mxResources.get("dropbox"),z.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(x=mxResources.get("oneDrive"),z.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(x=mxResources.get("github"),z.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?(x=mxResources.get("gitlab"),z.src=IMAGE_PATH+"/gitlab-logo.svg"):e==b.trello&&(x=mxResources.get("trello"),z.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[x],"You are now authorized in {1}")); -f=mxUtils.button(f,c);f.insertBefore(z,f.firstChild);f.style.marginTop="6px";f.className="geBigButton";f.style.fontSize="18px";f.style.padding="14px";l.appendChild(m);l.appendChild(b);l.appendChild(f);this.container=l},FontDialog=function(b,e,f,c,l){function m(J){this.style.border="";13==J.keyCode&&B.click()}var x=document.createElement("table"),z=document.createElement("tbody");x.style.marginTop="8px";var C=document.createElement("tr");var d=document.createElement("td");d.colSpan=2;d.style.whiteSpace= -"nowrap";d.style.fontSize="10pt";d.style.fontWeight="bold";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;";g.setAttribute("value","sysfonts");g.setAttribute("type","radio");g.setAttribute("name","current-fontdialog");g.setAttribute("id","fontdialog-sysfonts");d.appendChild(g);var k=document.createElement("label");k.setAttribute("for","fontdialog-sysfonts");mxUtils.write(k,mxResources.get("sysFonts",null,"System Fonts"));d.appendChild(k);C.appendChild(d); -z.appendChild(C);C=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.width="120px";d.style.paddingLeft="15px";mxUtils.write(d,mxResources.get("fontname",null,"Font Name")+":");C.appendChild(d);var n=document.createElement("input");"s"==c&&n.setAttribute("value",e);n.style.marginLeft="4px";n.style.width="250px";n.className="dlg_fontName_s";d=document.createElement("td");d.appendChild(n);C.appendChild(d);z.appendChild(C);C=document.createElement("tr"); -d=document.createElement("td");d.colSpan=2;d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.fontWeight="bold";var t=document.createElement("input");t.style.cssText="margin-right:8px;margin-bottom:8px;";t.setAttribute("value","googlefonts");t.setAttribute("type","radio");t.setAttribute("name","current-fontdialog");t.setAttribute("id","fontdialog-googlefonts");d.appendChild(t);k=document.createElement("label");k.setAttribute("for","fontdialog-googlefonts");mxUtils.write(k,mxResources.get("googleFonts", -null,"Google Fonts"));d.appendChild(k);mxClient.IS_CHROMEAPP||b.isOffline()&&!EditorUi.isElectronApp||(k=b.menus.createHelpLink("https://fonts.google.com/"),k.getElementsByTagName("img")[0].setAttribute("valign","middle"),d.appendChild(k));C.appendChild(d);z.appendChild(C);C=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.width="120px";d.style.paddingLeft="15px";mxUtils.write(d,mxResources.get("fontname",null,"Font Name")+":"); -C.appendChild(d);var p=document.createElement("input");"g"==c&&p.setAttribute("value",e);p.style.marginLeft="4px";p.style.width="250px";p.className="dlg_fontName_g";d=document.createElement("td");d.appendChild(p);C.appendChild(d);z.appendChild(C);C=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.fontWeight="bold";var A=document.createElement("input");A.style.cssText="margin-right:8px;margin-bottom:8px;";A.setAttribute("value", -"webfonts");A.setAttribute("type","radio");A.setAttribute("name","current-fontdialog");A.setAttribute("id","fontdialog-webfonts");d.appendChild(A);k=document.createElement("label");k.setAttribute("for","fontdialog-webfonts");mxUtils.write(k,mxResources.get("webfonts",null,"Web Fonts"));d.appendChild(k);C.appendChild(d);Editor.enableWebFonts&&z.appendChild(C);C=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.width="120px";d.style.paddingLeft= -"15px";mxUtils.write(d,mxResources.get("fontname",null,"Font Name")+":");C.appendChild(d);var E=document.createElement("input");"w"==c&&(Editor.enableWebFonts?E.setAttribute("value",e):n.setAttribute("value",e));E.style.marginLeft="4px";E.style.width="250px";E.className="dlg_fontName_w";d=document.createElement("td");d.appendChild(E);C.appendChild(d);Editor.enableWebFonts&&z.appendChild(C);C=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt"; -d.style.width="120px";d.style.paddingLeft="15px";mxUtils.write(d,mxResources.get("fontUrl",null,"Font URL")+":");C.appendChild(d);var y=document.createElement("input");y.setAttribute("value",f||"");y.style.marginLeft="4px";y.style.width="250px";y.className="dlg_fontUrl";d=document.createElement("td");d.appendChild(y);C.appendChild(d);Editor.enableWebFonts&&z.appendChild(C);this.init=function(){var J=n;"g"==c?J=p:"w"==c&&Editor.enableWebFonts&&(J=E);J.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode? -J.select():document.execCommand("selectAll",!1,null)};C=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.paddingTop="20px";d.style.whiteSpace="nowrap";d.setAttribute("align","right");b.isOffline()||(e=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/blog/external-fonts")}),e.className="geBtn",d.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();l()});e.className="geBtn";b.editor.cancelFirst&&d.appendChild(e); -var B=mxUtils.button(mxResources.get("apply"),function(){if(g.checked){var J=n.value;var N="s"}else if(t.checked){J=p.value;var v=Editor.GOOGLE_FONTS+encodeURIComponent(J).replace(/%20/g,"+");N="g"}else A.checked&&(J=E.value,v=y.value,N="w");var u=v;var G=N,H=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==J||0==J.length?(x.querySelector(".dlg_fontName_"+G).style.border="1px solid red",u=!1):"w"!=G||H.test(u)?u=!0:(x.querySelector(".dlg_fontUrl").style.border= -"1px solid red",u=!1);u&&(l(J,v,N),b.hideDialog())});B.className="geBtn gePrimaryBtn";mxEvent.addListener(n,"keypress",m);mxEvent.addListener(p,"keypress",m);mxEvent.addListener(E,"keypress",m);mxEvent.addListener(y,"keypress",m);mxEvent.addListener(n,"focus",function(){g.setAttribute("checked","checked");g.checked=!0});mxEvent.addListener(p,"focus",function(){t.setAttribute("checked","checked");t.checked=!0});mxEvent.addListener(E,"focus",function(){A.setAttribute("checked","checked");A.checked= -!0});mxEvent.addListener(y,"focus",function(){A.setAttribute("checked","checked");A.checked=!0});d.appendChild(B);b.editor.cancelFirst||d.appendChild(e);C.appendChild(d);z.appendChild(C);x.appendChild(z);this.container=x}; +"geTemplateDlg";this.container=T;c=null!=c?c:TEMPLATE_PATH+"/index.xml";l=null!=l?l:NEW_DIAGRAM_CATS_PATH+"/index.xml";var V=!1,W=!1,t=null,C=null,N=null,R=null,O=!1,P=!0,S=!1,X=[],aa=null,Y,Z,ba=!1,ea=T.querySelector(".geTempDlgShowAllBtn"),ma=T.querySelector(".geTempDlgDiagramsTiles"),ia=T.querySelector(".geTempDlgDiagramsListTitle"),pa=T.querySelector(".geTempDlgDiagramsListBtns"),na=T.querySelector(".geTempDlgContent"),Fa=T.querySelector(".geTempDlgDiagramsList"),Ga=T.querySelector(".geTempDlgNewDiagramCat"), +xa=T.querySelector(".geTempDlgNewDiagramCatList"),Ma=T.querySelector(".geTempDlgCreateBtn"),va=T.querySelector(".geTempDlgOpenBtn"),Ea=T.querySelector(".geTempDlgSearchBox"),Ba=T.querySelector(".geTempDlgErrMsg"),za=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(T.querySelector(".geTempDlgBack"),"click",function(){E();ba=!1;T.querySelector(".geTemplatesList").style.display="none";na.style.width= +"100%";Ga.style.display="";Fa.style.minHeight="calc(100% - 280px)";Ea.style.display=y?"":"none";Ea.value="";Y=null;L(P)});mxEvent.addListener(T.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){z(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(P=!0,null==Y?L(P):H(Y))});mxEvent.addListener(T.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){z(this,"geTempDlgMyDiagramsBtnImg","my-diagrams", +"allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(P=!1,null==Y?L(P):H(Y))});mxEvent.addListener(T.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){z(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(S=!0,u(X,!1,S,aa))});mxEvent.addListener(T.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){z(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(S=!1,u(X,!1,S,aa))});var Da=!1; +mxEvent.addListener(ea,"click",function(){O?(Ga.style.height="280px",xa.style.height="190px",ea.innerText=mxResources.get("showMore"),G(ta)):(Ga.style.height="440px",xa.style.height="355px",ea.innerText=mxResources.get("showLess"),G(ta,!0));O=!O});var la=!1,Ha=!1,ya={},Ia={},ka={},ta=[],ra=1,wa=0;null!=g?g(function(da,ha){ka=da;wa=ha;F()},F):F();mxUtils.get(l,function(da){if(!Ha){Ha=!0;for(da=da.getXml().documentElement.firstChild;null!=da;)"undefined"!==typeof da.getAttribute&&null!=da.getAttribute("title")&& +ta.push({img:da.getAttribute("img"),libs:da.getAttribute("libs"),clibs:da.getAttribute("clibs"),title:da.getAttribute("title")}),da=da.nextSibling;G(ta)}});var ca=function(da,ha,ja){pa.style.display="";za.stop();V=!1;if(W)W=!1;else if(ha)ma.innerText=ha;else{ja=ja||{};ha=0;for(var sa in ja)ha+=ja[sa].length;0==da.length&&0==ha?ma.innerText=mxResources.get("noDiagrams"):u(da,!1,S,0==ha?null:ja)}};L(P);var fa=null;mxEvent.addListener(Ea,"keyup",Q);mxEvent.addListener(Ea,"search",Q);mxEvent.addListener(Ea, +"input",Q);mxEvent.addListener(Ma,"click",function(da){M(!1,!1)});k&&mxEvent.addListener(va,"click",function(da){M(!1,!0)});n&&mxEvent.addListener(T.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(da){M(!0)});mxEvent.addListener(T.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=f&&f();p||b.hideDialog(!0)})};TemplatesDialog.tagsList={}; +var BtnDialog=function(b,e,f,c){var l=document.createElement("div");l.style.textAlign="center";var m=document.createElement("p");m.style.fontSize="16pt";m.style.padding="0px";m.style.margin="0px";m.style.color="gray";mxUtils.write(m,mxResources.get("done"));var x="Unknown",y=document.createElement("img");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.marginRight="10px";e==b.drive?(x=mxResources.get("googleDrive"),y.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox? +(x=mxResources.get("dropbox"),y.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(x=mxResources.get("oneDrive"),y.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(x=mxResources.get("github"),y.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?(x=mxResources.get("gitlab"),y.src=IMAGE_PATH+"/gitlab-logo.svg"):e==b.trello&&(x=mxResources.get("trello"),y.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[x],"You are now authorized in {1}")); +f=mxUtils.button(f,c);f.insertBefore(y,f.firstChild);f.style.marginTop="6px";f.className="geBigButton";f.style.fontSize="18px";f.style.padding="14px";l.appendChild(m);l.appendChild(b);l.appendChild(f);this.container=l},FontDialog=function(b,e,f,c,l){function m(J){this.style.border="";13==J.keyCode&&B.click()}var x=document.createElement("table"),y=document.createElement("tbody");x.style.marginTop="8px";var D=document.createElement("tr");var d=document.createElement("td");d.colSpan=2;d.style.whiteSpace= +"nowrap";d.style.fontSize="10pt";d.style.fontWeight="bold";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;";g.setAttribute("value","sysfonts");g.setAttribute("type","radio");g.setAttribute("name","current-fontdialog");g.setAttribute("id","fontdialog-sysfonts");d.appendChild(g);var k=document.createElement("label");k.setAttribute("for","fontdialog-sysfonts");mxUtils.write(k,mxResources.get("sysFonts",null,"System Fonts"));d.appendChild(k);D.appendChild(d); +y.appendChild(D);D=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.width="120px";d.style.paddingLeft="15px";mxUtils.write(d,mxResources.get("fontname",null,"Font Name")+":");D.appendChild(d);var n=document.createElement("input");"s"==c&&n.setAttribute("value",e);n.style.marginLeft="4px";n.style.width="250px";n.className="dlg_fontName_s";d=document.createElement("td");d.appendChild(n);D.appendChild(d);y.appendChild(D);D=document.createElement("tr"); +d=document.createElement("td");d.colSpan=2;d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.fontWeight="bold";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","googlefonts");q.setAttribute("type","radio");q.setAttribute("name","current-fontdialog");q.setAttribute("id","fontdialog-googlefonts");d.appendChild(q);k=document.createElement("label");k.setAttribute("for","fontdialog-googlefonts");mxUtils.write(k,mxResources.get("googleFonts", +null,"Google Fonts"));d.appendChild(k);mxClient.IS_CHROMEAPP||b.isOffline()&&!EditorUi.isElectronApp||(k=b.menus.createHelpLink("https://fonts.google.com/"),k.getElementsByTagName("img")[0].setAttribute("valign","middle"),d.appendChild(k));D.appendChild(d);y.appendChild(D);D=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.width="120px";d.style.paddingLeft="15px";mxUtils.write(d,mxResources.get("fontname",null,"Font Name")+":"); +D.appendChild(d);var p=document.createElement("input");"g"==c&&p.setAttribute("value",e);p.style.marginLeft="4px";p.style.width="250px";p.className="dlg_fontName_g";d=document.createElement("td");d.appendChild(p);D.appendChild(d);y.appendChild(D);D=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.fontWeight="bold";var A=document.createElement("input");A.style.cssText="margin-right:8px;margin-bottom:8px;";A.setAttribute("value", +"webfonts");A.setAttribute("type","radio");A.setAttribute("name","current-fontdialog");A.setAttribute("id","fontdialog-webfonts");d.appendChild(A);k=document.createElement("label");k.setAttribute("for","fontdialog-webfonts");mxUtils.write(k,mxResources.get("webfonts",null,"Web Fonts"));d.appendChild(k);D.appendChild(d);Editor.enableWebFonts&&y.appendChild(D);D=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.width="120px";d.style.paddingLeft= +"15px";mxUtils.write(d,mxResources.get("fontname",null,"Font Name")+":");D.appendChild(d);var E=document.createElement("input");"w"==c&&(Editor.enableWebFonts?E.setAttribute("value",e):n.setAttribute("value",e));E.style.marginLeft="4px";E.style.width="250px";E.className="dlg_fontName_w";d=document.createElement("td");d.appendChild(E);D.appendChild(d);Editor.enableWebFonts&&y.appendChild(D);D=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt"; +d.style.width="120px";d.style.paddingLeft="15px";mxUtils.write(d,mxResources.get("fontUrl",null,"Font URL")+":");D.appendChild(d);var z=document.createElement("input");z.setAttribute("value",f||"");z.style.marginLeft="4px";z.style.width="250px";z.className="dlg_fontUrl";d=document.createElement("td");d.appendChild(z);D.appendChild(d);Editor.enableWebFonts&&y.appendChild(D);this.init=function(){var J=n;"g"==c?J=p:"w"==c&&Editor.enableWebFonts&&(J=E);J.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode? +J.select():document.execCommand("selectAll",!1,null)};D=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.paddingTop="20px";d.style.whiteSpace="nowrap";d.setAttribute("align","right");b.isOffline()||(e=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/blog/external-fonts")}),e.className="geBtn",d.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();l()});e.className="geBtn";b.editor.cancelFirst&&d.appendChild(e); +var B=mxUtils.button(mxResources.get("apply"),function(){if(g.checked){var J=n.value;var M="s"}else if(q.checked){J=p.value;var v=Editor.GOOGLE_FONTS+encodeURIComponent(J).replace(/%20/g,"+");M="g"}else A.checked&&(J=E.value,v=z.value,M="w");var u=v;var G=M,I=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==J||0==J.length?(x.querySelector(".dlg_fontName_"+G).style.border="1px solid red",u=!1):"w"!=G||I.test(u)?u=!0:(x.querySelector(".dlg_fontUrl").style.border= +"1px solid red",u=!1);u&&(l(J,v,M),b.hideDialog())});B.className="geBtn gePrimaryBtn";mxEvent.addListener(n,"keypress",m);mxEvent.addListener(p,"keypress",m);mxEvent.addListener(E,"keypress",m);mxEvent.addListener(z,"keypress",m);mxEvent.addListener(n,"focus",function(){g.setAttribute("checked","checked");g.checked=!0});mxEvent.addListener(p,"focus",function(){q.setAttribute("checked","checked");q.checked=!0});mxEvent.addListener(E,"focus",function(){A.setAttribute("checked","checked");A.checked= +!0});mxEvent.addListener(z,"focus",function(){A.setAttribute("checked","checked");A.checked=!0});d.appendChild(B);b.editor.cancelFirst||d.appendChild(e);D.appendChild(d);y.appendChild(D);x.appendChild(y);this.container=x}; function AspectDialog(b,e,f,c,l){this.aspect={pageId:e||(b.pages?b.pages[0].getId():null),layerIds:f||[]};e=document.createElement("div");var m=document.createElement("h5");m.style.margin="0 0 10px";mxUtils.write(m,mxResources.get("pages"));e.appendChild(m);f=document.createElement("div");f.className="geAspectDlgList";e.appendChild(f);m=document.createElement("h5");m.style.margin="0 0 10px";mxUtils.write(m,mxResources.get("layers"));e.appendChild(m);m=document.createElement("div");m.className="geAspectDlgList"; e.appendChild(m);this.pagesContainer=f;this.layersContainer=m;this.ui=b;f=document.createElement("div");f.style.marginTop="16px";f.style.textAlign="center";m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l()});m.className="geBtn";b.editor.cancelFirst&&f.appendChild(m);var x=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();c({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));f.appendChild(x);x.className="geBtn gePrimaryBtn"; b.editor.cancelFirst||f.appendChild(m);x.setAttribute("disabled","disabled");this.okBtn=x;e.appendChild(f);this.container=e}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var e=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(e.getId(),e.getName(),e.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)}; @@ -11138,30 +11136,30 @@ AspectDialog.prototype.createPageItem=function(b,e,f){var c=document.createEleme this.selectedPage=b;c.className+=" geAspectDlgListItemSelected";this.layersContainer.innerText="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var m=l.model;m=m.getChildCells(m.getRoot());for(var x=0;x<m.length;x++)this.createLayerItem(m[x],b,l,f)});mxEvent.addListener(c,"click",e);this.aspect.pageId==b&&e()}; AspectDialog.prototype.createLayerItem=function(b,e,f,c){e=f.convertValueToString(b)||mxResources.get("background")||"Background";var l=document.createElement("div");l.setAttribute("data-layer-id",b.id);l.className="geAspectDlgListItem";l.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(e)+"</div>";this.layersContainer.appendChild(l);this.createViewer(l.childNodes[0],c,b.id);c=mxUtils.bind(this,function(){0<=l.className.indexOf("geAspectDlgListItemSelected")? (l.className="geAspectDlgListItem",delete this.selectedLayers[b.id],mxUtils.isEmptyObject(this.selectedLayers)&&this.okBtn.setAttribute("disabled","disabled")):(l.className+=" geAspectDlgListItemSelected",this.selectedLayers[b.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(l,"click",c);-1!=this.aspect.layerIds.indexOf(b.id)&&c()}; -var FilePropertiesDialog=function(b){var e=document.createElement("table"),f=document.createElement("tbody");e.style.width="100%";e.style.marginTop="8px";var c=b.getCurrentFile();var l=null!=c&&null!=c.getTitle()?c.getTitle():b.defaultFilename;var m=function(){};if(/(\.png)$/i.test(l)){m=1;var x=0;l=b.fileNode;null!=l&&(l.hasAttribute("scale")&&(m=parseFloat(l.getAttribute("scale"))),l.hasAttribute("border")&&(x=parseInt(l.getAttribute("border"))));l=document.createElement("tr");var z=document.createElement("td"); -z.style.whiteSpace="nowrap";z.style.fontSize="10pt";z.style.width="120px";mxUtils.write(z,mxResources.get("zoom")+":");l.appendChild(z);var C=document.createElement("input");C.setAttribute("value",100*m+"%");C.style.marginLeft="4px";C.style.width="180px";z=document.createElement("td");z.style.whiteSpace="nowrap";z.appendChild(C);l.appendChild(z);f.appendChild(l);l=document.createElement("tr");z=document.createElement("td");z.style.whiteSpace="nowrap";z.style.fontSize="10pt";z.style.width="120px"; -mxUtils.write(z,mxResources.get("borderWidth")+":");l.appendChild(z);var d=document.createElement("input");d.setAttribute("value",x);d.style.marginLeft="4px";d.style.width="180px";z=document.createElement("td");z.style.whiteSpace="nowrap";z.appendChild(d);l.appendChild(z);f.appendChild(l);this.init=function(){C.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?C.select():document.execCommand("selectAll",!1,null)};m=function(){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0, -parseInt(C.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(d.value))),null!=c&&c.fileChanged());b.hideDialog()}}else if(!/(\.html)$/i.test(l)&&!/(\.svg)$/i.test(l)){var g=null!=c?c.isCompressed():Editor.compressXml;l=document.createElement("tr");z=document.createElement("td");z.style.whiteSpace="nowrap";z.style.fontSize="10pt";z.style.width="120px";mxUtils.write(z,mxResources.get("compressed")+":");l.appendChild(z);var k=document.createElement("input");k.setAttribute("type","checkbox"); -g&&(k.setAttribute("checked","checked"),k.defaultChecked=!0);z=document.createElement("td");z.style.whiteSpace="nowrap";z.appendChild(k);l.appendChild(z);f.appendChild(l);this.init=function(){k.focus()};m=function(){null!=b.fileNode&&g!=k.checked&&(b.fileNode.setAttribute("compressed",k.checked?"true":"false"),null!=c&&c.fileChanged());b.hideDialog()}}if(null!=c&&c.isRealtimeOptional()){l=document.createElement("tr");z=document.createElement("td");z.style.whiteSpace="nowrap";z.style.fontSize="10pt"; -z.style.width="120px";mxUtils.write(z,mxResources.get("realtimeCollaboration")+":");l.appendChild(z);var n=document.createElement("input");n.setAttribute("type","checkbox");var t=c.isRealtimeEnabled();if(t="disabled"!=b.drive.getCustomProperty(c.desc,"collaboration"))n.setAttribute("checked","checked"),n.defaultChecked=!0;prevApply=m;m=function(){prevApply();b.hideDialog();n.checked!=t&&b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&c.setRealtimeEnabled(n.checked,mxUtils.bind(this, -function(p){b.spinner.stop()}),mxUtils.bind(this,function(p){b.spinner.stop();b.showError(mxResources.get("error"),null!=p&&null!=p.error?p.error.message:mxResources.get("unknownError"),mxResources.get("ok"))}))};this.init=null!=this.init?this.init:function(){n.focus()};z=document.createElement("td");z.style.whiteSpace="nowrap";z.appendChild(n);z.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));l.appendChild(z);f.appendChild(l)}this.init=null!=this.init?this.init: -function(){};m=mxUtils.button(mxResources.get("apply"),m);m.className="geBtn gePrimaryBtn";l=document.createElement("tr");z=document.createElement("td");z.colSpan=2;z.style.paddingTop="20px";z.style.whiteSpace="nowrap";z.setAttribute("align","center");x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";b.editor.cancelFirst&&z.appendChild(x);z.appendChild(m);b.editor.cancelFirst||z.appendChild(x);l.appendChild(z);f.appendChild(l);e.appendChild(f);this.container= -e},ConnectionPointsDialog=function(b,e){function f(){null!=l&&l.destroy()}var c=document.createElement("div");c.style.userSelect="none";var l=null;this.init=function(){function m(I,F){I=new mxCell("",new mxGeometry(I,F,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");I.vertex=!0;I.cp=!0;return k.addCell(I)}function x(I){I=k.getSelectionCells();k.deleteCells(I)}function z(){var I=parseInt(G.value)||0;I=0>I?0:100<I?100:I; -G.value=I;var F=parseInt(M.value)||0;F=0>F?0:100<F?100:F;M.value=F;var P=parseInt(H.value)||0,U=parseInt(K.value)||0;I=k.getConnectionPoint(p,new mxConnectionConstraint(new mxPoint(I/100,F/100),!1,null,P,U));F=k.getSelectionCell();if(null!=F){P=F.geometry.clone();U=k.view.scale;var T=k.view.translate;P.x=(I.x-3*U)/U-T.x;P.y=(I.y-3*U)/U-T.y;k.model.setGeometry(F,P)}}function C(I){var F=0,P=0,U=n.geometry,T=mxUtils.format((I.geometry.x+3-U.x)/U.width);I=mxUtils.format((I.geometry.y+3-U.y)/U.height); -0>T?(F=T*U.width,T=0):1<T&&(F=(T-1)*U.width,T=1);0>I?(P=I*U.height,I=0):1<I&&(P=(I-1)*U.height,I=1);return{x:T,y:I,dx:parseInt(F),dy:parseInt(P)}}function d(){if(1==k.getSelectionCount()){var I=k.getSelectionCell();I=C(I);G.value=100*I.x;M.value=100*I.y;H.value=I.dx;K.value=I.dy;u.style.visibility=""}else u.style.visibility="hidden"}var g=document.createElement("div");g.style.width="350px";g.style.height="350px";g.style.overflow="hidden";g.style.border="1px solid lightGray";g.style.boxSizing="border-box"; -mxEvent.disableContextMenu(g);c.appendChild(g);var k=new Graph(g);k.autoExtend=!1;k.autoScroll=!1;k.setGridEnabled(!1);k.setEnabled(!0);k.setPanning(!0);k.setConnectable(!1);k.setTooltips(!1);k.minFitScale=null;k.maxFitScale=null;k.centerZoom=!0;k.maxFitScale=2;g=e.geometry;var n=new mxCell(e.value,new mxGeometry(0,0,g.width,g.height),e.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;");n.vertex=!0;k.addCell(n);k.dblClick=function(I,F){if(null!=F&&F!=n)k.setSelectionCell(F);else{F= -mxUtils.convertPoint(k.container,mxEvent.getClientX(I),mxEvent.getClientY(I));mxEvent.consume(I);I=k.view.scale;var P=k.view.translate;k.setSelectionCell(m((F.x-3*I)/I-P.x,(F.y-3*I)/I-P.y))}};l=new mxKeyHandler(k);l.bindKey(46,x);l.bindKey(8,x);k.getRubberband().isForceRubberbandEvent=function(I){return 0==I.evt.button&&(null==I.getCell()||I.getCell()==n)};k.panningHandler.isForcePanningEvent=function(I){return 2==I.evt.button};var t=k.isCellSelectable;k.isCellSelectable=function(I){return I==n?!1: -t.apply(this,arguments)};k.getLinkForCell=function(){return null};var p=k.view.getState(n);g=k.getAllConnectionConstraints(p);for(var A=0;null!=g&&A<g.length;A++){var E=k.getConnectionPoint(p,g[A]);m(E.x-3,E.y-3)}k.fit(8);k.center();A=mxUtils.button("",function(){k.zoomIn()});A.className="geSprite geSprite-zoomin";A.setAttribute("title",mxResources.get("zoomIn"));A.style.position="relative";A.style.outline="none";A.style.border="none";A.style.margin="2px";A.style.cursor="pointer";A.style.top=mxClient.IS_FF? -"-6px":"0px";mxUtils.setOpacity(A,60);E=mxUtils.button("",function(){k.zoomOut()});E.className="geSprite geSprite-zoomout";E.setAttribute("title",mxResources.get("zoomOut"));E.style.position="relative";E.style.outline="none";E.style.border="none";E.style.margin="2px";E.style.cursor="pointer";E.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(E,60);var y=mxUtils.button("",function(){k.fit(8);k.center()});y.className="geSprite geSprite-fit";y.setAttribute("title",mxResources.get("fit"));y.style.position= -"relative";y.style.outline="none";y.style.border="none";y.style.margin="2px";y.style.cursor="pointer";y.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(y,60);var B=mxUtils.button("",function(){k.zoomActual();k.center()});B.className="geSprite geSprite-actualsize";B.setAttribute("title",mxResources.get("actualSize"));B.style.position="relative";B.style.outline="none";B.style.border="none";B.style.margin="2px";B.style.cursor="pointer";B.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(B, -60);var J=mxUtils.button("",x);J.className="geSprite geSprite-delete";J.setAttribute("title",mxResources.get("delete"));J.style.position="relative";J.style.outline="none";J.style.border="none";J.style.margin="2px";J.style.float="right";J.style.cursor="pointer";mxUtils.setOpacity(J,10);g=document.createElement("div");g.appendChild(A);g.appendChild(E);g.appendChild(B);g.appendChild(y);g.appendChild(J);c.appendChild(g);var N=document.createElement("input");N.setAttribute("type","number");N.setAttribute("min", -"1");N.setAttribute("value","1");N.style.width="45px";N.style.position="relative";N.style.top=mxClient.IS_FF?"0px":"-4px";N.style.margin="0 4px 0 4px";g.appendChild(N);var v=document.createElement("select");v.style.position="relative";v.style.top=mxClient.IS_FF?"0px":"-4px";E=["left","right","top","bottom"];for(A=0;A<E.length;A++)y=E[A],B=document.createElement("option"),mxUtils.write(B,mxResources.get(y)),B.value=y,v.appendChild(B);g.appendChild(v);A=mxUtils.button(mxResources.get("add"),function(){var I= -parseInt(N.value);I=1>I?1:100<I?100:I;N.value=I;for(var F=v.value,P=n.geometry,U=[],T=0;T<I;T++){switch(F){case "left":var V=P.x;var W=P.y+(T+1)*P.height/(I+1);break;case "right":V=P.x+P.width;W=P.y+(T+1)*P.height/(I+1);break;case "top":V=P.x+(T+1)*P.width/(I+1);W=P.y;break;case "bottom":V=P.x+(T+1)*P.width/(I+1),W=P.y+P.height}U.push(m(V-3,W-3))}k.setSelectionCells(U)});A.style.position="relative";A.style.marginLeft="8px";A.style.top=mxClient.IS_FF?"0px":"-4px";g.appendChild(A);var u=document.createElement("div"); -u.style.margin="4px 0px 8px 0px";u.style.whiteSpace="nowrap";u.style.height="24px";g=document.createElement("span");mxUtils.write(g,mxResources.get("dx"));u.appendChild(g);var G=document.createElement("input");G.setAttribute("type","number");G.setAttribute("min","0");G.setAttribute("max","100");G.style.width="45px";G.style.margin="0 4px 0 4px";u.appendChild(G);mxUtils.write(u,"%");var H=document.createElement("input");H.setAttribute("type","number");H.style.width="45px";H.style.margin="0 4px 0 4px"; -u.appendChild(H);mxUtils.write(u,"pt");g=document.createElement("span");mxUtils.write(g,mxResources.get("dy"));g.style.marginLeft="12px";u.appendChild(g);var M=document.createElement("input");M.setAttribute("type","number");M.setAttribute("min","0");M.setAttribute("max","100");M.style.width="45px";M.style.margin="0 4px 0 4px";u.appendChild(M);mxUtils.write(u,"%");var K=document.createElement("input");K.setAttribute("type","number");K.style.width="45px";K.style.margin="0 4px 0 4px";u.appendChild(K); -mxUtils.write(u,"pt");c.appendChild(u);d();k.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<k.getSelectionCount()?mxUtils.setOpacity(J,60):mxUtils.setOpacity(J,10);d()});k.addListener(mxEvent.CELLS_MOVED,d);mxEvent.addListener(G,"change",z);mxEvent.addListener(M,"change",z);mxEvent.addListener(H,"change",z);mxEvent.addListener(K,"change",z);g=mxUtils.button(mxResources.get("cancel"),function(){f();b.hideDialog()});g.className="geBtn";A=mxUtils.button(mxResources.get("apply"),function(){var I= -k.model.cells,F=[],P=[],U;for(U in I){var T=I[U];T.cp&&P.push(C(T))}P.sort(function(V,W){return V.x!=W.x?V.x-W.x:V.y!=W.y?V.y-W.y:V.dx!=W.dx?V.dx-W.dx:V.dy-W.dy});for(I=0;I<P.length;I++)0<I&&P[I].x==P[I-1].x&&P[I].y==P[I-1].y&&P[I].dx==P[I-1].dx&&P[I].dy==P[I-1].dy||F.push("["+P[I].x+","+P[I].y+",0,"+P[I].dx+","+P[I].dy+"]");b.editor.graph.setCellStyles("points","["+F.join(",")+"]",[e]);f();b.hideDialog()});A.className="geBtn gePrimaryBtn";E=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points", -null,[e]);f();b.hideDialog()});E.className="geBtn";y=document.createElement("div");y.style.marginTop="10px";y.style.textAlign="right";b.editor.cancelFirst?(y.appendChild(g),y.appendChild(E),y.appendChild(A)):(y.appendChild(E),y.appendChild(A),y.appendChild(g));c.appendChild(y)};this.destroy=f;this.container=c};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"}, +var FilePropertiesDialog=function(b){var e=document.createElement("table"),f=document.createElement("tbody");e.style.width="100%";e.style.marginTop="8px";var c=b.getCurrentFile();var l=null!=c&&null!=c.getTitle()?c.getTitle():b.defaultFilename;var m=function(){};if(/(\.png)$/i.test(l)){m=1;var x=0;l=b.fileNode;null!=l&&(l.hasAttribute("scale")&&(m=parseFloat(l.getAttribute("scale"))),l.hasAttribute("border")&&(x=parseInt(l.getAttribute("border"))));l=document.createElement("tr");var y=document.createElement("td"); +y.style.whiteSpace="nowrap";y.style.fontSize="10pt";y.style.width="120px";mxUtils.write(y,mxResources.get("zoom")+":");l.appendChild(y);var D=document.createElement("input");D.setAttribute("value",100*m+"%");D.style.marginLeft="4px";D.style.width="180px";y=document.createElement("td");y.style.whiteSpace="nowrap";y.appendChild(D);l.appendChild(y);f.appendChild(l);l=document.createElement("tr");y=document.createElement("td");y.style.whiteSpace="nowrap";y.style.fontSize="10pt";y.style.width="120px"; +mxUtils.write(y,mxResources.get("borderWidth")+":");l.appendChild(y);var d=document.createElement("input");d.setAttribute("value",x);d.style.marginLeft="4px";d.style.width="180px";y=document.createElement("td");y.style.whiteSpace="nowrap";y.appendChild(d);l.appendChild(y);f.appendChild(l);this.init=function(){D.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null)};m=function(){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0, +parseInt(D.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(d.value))),null!=c&&c.fileChanged());b.hideDialog()}}else if(!/(\.html)$/i.test(l)&&!/(\.svg)$/i.test(l)){var g=null!=c?c.isCompressed():Editor.compressXml;l=document.createElement("tr");y=document.createElement("td");y.style.whiteSpace="nowrap";y.style.fontSize="10pt";y.style.width="120px";mxUtils.write(y,mxResources.get("compressed")+":");l.appendChild(y);var k=document.createElement("input");k.setAttribute("type","checkbox"); +g&&(k.setAttribute("checked","checked"),k.defaultChecked=!0);y=document.createElement("td");y.style.whiteSpace="nowrap";y.appendChild(k);l.appendChild(y);f.appendChild(l);this.init=function(){k.focus()};m=function(){null!=b.fileNode&&g!=k.checked&&(b.fileNode.setAttribute("compressed",k.checked?"true":"false"),null!=c&&c.fileChanged());b.hideDialog()}}if(null!=c&&c.isRealtimeOptional()){l=document.createElement("tr");y=document.createElement("td");y.style.whiteSpace="nowrap";y.style.fontSize="10pt"; +y.style.width="120px";mxUtils.write(y,mxResources.get("realtimeCollaboration")+":");l.appendChild(y);var n=document.createElement("input");n.setAttribute("type","checkbox");var q=c.isRealtimeEnabled();if(q="disabled"!=b.drive.getCustomProperty(c.desc,"collaboration"))n.setAttribute("checked","checked"),n.defaultChecked=!0;prevApply=m;m=function(){prevApply();b.hideDialog();n.checked!=q&&b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&c.setRealtimeEnabled(n.checked,mxUtils.bind(this, +function(p){b.spinner.stop()}),mxUtils.bind(this,function(p){b.spinner.stop();b.showError(mxResources.get("error"),null!=p&&null!=p.error?p.error.message:mxResources.get("unknownError"),mxResources.get("ok"))}))};this.init=null!=this.init?this.init:function(){n.focus()};y=document.createElement("td");y.style.whiteSpace="nowrap";y.appendChild(n);y.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));l.appendChild(y);f.appendChild(l)}this.init=null!=this.init?this.init: +function(){};m=mxUtils.button(mxResources.get("apply"),m);m.className="geBtn gePrimaryBtn";l=document.createElement("tr");y=document.createElement("td");y.colSpan=2;y.style.paddingTop="20px";y.style.whiteSpace="nowrap";y.setAttribute("align","center");x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";b.editor.cancelFirst&&y.appendChild(x);y.appendChild(m);b.editor.cancelFirst||y.appendChild(x);l.appendChild(y);f.appendChild(l);e.appendChild(f);this.container= +e},ConnectionPointsDialog=function(b,e){function f(){null!=l&&l.destroy()}var c=document.createElement("div");c.style.userSelect="none";var l=null;this.init=function(){function m(K,H){K=new mxCell("",new mxGeometry(K,H,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");K.vertex=!0;K.cp=!0;return k.addCell(K)}function x(K){K=k.getSelectionCells();k.deleteCells(K)}function y(){var K=parseInt(G.value)||0;K=0>K?0:100<K?100:K; +G.value=K;var H=parseInt(F.value)||0;H=0>H?0:100<H?100:H;F.value=H;var Q=parseInt(I.value)||0,U=parseInt(L.value)||0;K=k.getConnectionPoint(p,new mxConnectionConstraint(new mxPoint(K/100,H/100),!1,null,Q,U));H=k.getSelectionCell();if(null!=H){Q=H.geometry.clone();U=k.view.scale;var T=k.view.translate;Q.x=(K.x-3*U)/U-T.x;Q.y=(K.y-3*U)/U-T.y;k.model.setGeometry(H,Q)}}function D(K){var H=0,Q=0,U=n.geometry,T=mxUtils.format((K.geometry.x+3-U.x)/U.width);K=mxUtils.format((K.geometry.y+3-U.y)/U.height); +0>T?(H=T*U.width,T=0):1<T&&(H=(T-1)*U.width,T=1);0>K?(Q=K*U.height,K=0):1<K&&(Q=(K-1)*U.height,K=1);return{x:T,y:K,dx:parseInt(H),dy:parseInt(Q)}}function d(){if(1==k.getSelectionCount()){var K=k.getSelectionCell();K=D(K);G.value=100*K.x;F.value=100*K.y;I.value=K.dx;L.value=K.dy;u.style.visibility=""}else u.style.visibility="hidden"}var g=document.createElement("div");g.style.width="350px";g.style.height="350px";g.style.overflow="hidden";g.style.border="1px solid lightGray";g.style.boxSizing="border-box"; +mxEvent.disableContextMenu(g);c.appendChild(g);var k=new Graph(g);k.autoExtend=!1;k.autoScroll=!1;k.setGridEnabled(!1);k.setEnabled(!0);k.setPanning(!0);k.setConnectable(!1);k.setTooltips(!1);k.minFitScale=null;k.maxFitScale=null;k.centerZoom=!0;k.maxFitScale=2;g=e.geometry;var n=new mxCell(e.value,new mxGeometry(0,0,g.width,g.height),e.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;");n.vertex=!0;k.addCell(n);k.dblClick=function(K,H){if(null!=H&&H!=n)k.setSelectionCell(H);else{H= +mxUtils.convertPoint(k.container,mxEvent.getClientX(K),mxEvent.getClientY(K));mxEvent.consume(K);K=k.view.scale;var Q=k.view.translate;k.setSelectionCell(m((H.x-3*K)/K-Q.x,(H.y-3*K)/K-Q.y))}};l=new mxKeyHandler(k);l.bindKey(46,x);l.bindKey(8,x);k.getRubberband().isForceRubberbandEvent=function(K){return 0==K.evt.button&&(null==K.getCell()||K.getCell()==n)};k.panningHandler.isForcePanningEvent=function(K){return 2==K.evt.button};var q=k.isCellSelectable;k.isCellSelectable=function(K){return K==n?!1: +q.apply(this,arguments)};k.getLinkForCell=function(){return null};var p=k.view.getState(n);g=k.getAllConnectionConstraints(p);for(var A=0;null!=g&&A<g.length;A++){var E=k.getConnectionPoint(p,g[A]);m(E.x-3,E.y-3)}k.fit(8);k.center();A=mxUtils.button("",function(){k.zoomIn()});A.className="geSprite geSprite-zoomin";A.setAttribute("title",mxResources.get("zoomIn"));A.style.position="relative";A.style.outline="none";A.style.border="none";A.style.margin="2px";A.style.cursor="pointer";A.style.top=mxClient.IS_FF? +"-6px":"0px";mxUtils.setOpacity(A,60);E=mxUtils.button("",function(){k.zoomOut()});E.className="geSprite geSprite-zoomout";E.setAttribute("title",mxResources.get("zoomOut"));E.style.position="relative";E.style.outline="none";E.style.border="none";E.style.margin="2px";E.style.cursor="pointer";E.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(E,60);var z=mxUtils.button("",function(){k.fit(8);k.center()});z.className="geSprite geSprite-fit";z.setAttribute("title",mxResources.get("fit"));z.style.position= +"relative";z.style.outline="none";z.style.border="none";z.style.margin="2px";z.style.cursor="pointer";z.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(z,60);var B=mxUtils.button("",function(){k.zoomActual();k.center()});B.className="geSprite geSprite-actualsize";B.setAttribute("title",mxResources.get("actualSize"));B.style.position="relative";B.style.outline="none";B.style.border="none";B.style.margin="2px";B.style.cursor="pointer";B.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(B, +60);var J=mxUtils.button("",x);J.className="geSprite geSprite-delete";J.setAttribute("title",mxResources.get("delete"));J.style.position="relative";J.style.outline="none";J.style.border="none";J.style.margin="2px";J.style.float="right";J.style.cursor="pointer";mxUtils.setOpacity(J,10);g=document.createElement("div");g.appendChild(A);g.appendChild(E);g.appendChild(B);g.appendChild(z);g.appendChild(J);c.appendChild(g);var M=document.createElement("input");M.setAttribute("type","number");M.setAttribute("min", +"1");M.setAttribute("value","1");M.style.width="45px";M.style.position="relative";M.style.top=mxClient.IS_FF?"0px":"-4px";M.style.margin="0 4px 0 4px";g.appendChild(M);var v=document.createElement("select");v.style.position="relative";v.style.top=mxClient.IS_FF?"0px":"-4px";E=["left","right","top","bottom"];for(A=0;A<E.length;A++)z=E[A],B=document.createElement("option"),mxUtils.write(B,mxResources.get(z)),B.value=z,v.appendChild(B);g.appendChild(v);A=mxUtils.button(mxResources.get("add"),function(){var K= +parseInt(M.value);K=1>K?1:100<K?100:K;M.value=K;for(var H=v.value,Q=n.geometry,U=[],T=0;T<K;T++){switch(H){case "left":var V=Q.x;var W=Q.y+(T+1)*Q.height/(K+1);break;case "right":V=Q.x+Q.width;W=Q.y+(T+1)*Q.height/(K+1);break;case "top":V=Q.x+(T+1)*Q.width/(K+1);W=Q.y;break;case "bottom":V=Q.x+(T+1)*Q.width/(K+1),W=Q.y+Q.height}U.push(m(V-3,W-3))}k.setSelectionCells(U)});A.style.position="relative";A.style.marginLeft="8px";A.style.top=mxClient.IS_FF?"0px":"-4px";g.appendChild(A);var u=document.createElement("div"); +u.style.margin="4px 0px 8px 0px";u.style.whiteSpace="nowrap";u.style.height="24px";g=document.createElement("span");mxUtils.write(g,mxResources.get("dx"));u.appendChild(g);var G=document.createElement("input");G.setAttribute("type","number");G.setAttribute("min","0");G.setAttribute("max","100");G.style.width="45px";G.style.margin="0 4px 0 4px";u.appendChild(G);mxUtils.write(u,"%");var I=document.createElement("input");I.setAttribute("type","number");I.style.width="45px";I.style.margin="0 4px 0 4px"; +u.appendChild(I);mxUtils.write(u,"pt");g=document.createElement("span");mxUtils.write(g,mxResources.get("dy"));g.style.marginLeft="12px";u.appendChild(g);var F=document.createElement("input");F.setAttribute("type","number");F.setAttribute("min","0");F.setAttribute("max","100");F.style.width="45px";F.style.margin="0 4px 0 4px";u.appendChild(F);mxUtils.write(u,"%");var L=document.createElement("input");L.setAttribute("type","number");L.style.width="45px";L.style.margin="0 4px 0 4px";u.appendChild(L); +mxUtils.write(u,"pt");c.appendChild(u);d();k.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<k.getSelectionCount()?mxUtils.setOpacity(J,60):mxUtils.setOpacity(J,10);d()});k.addListener(mxEvent.CELLS_MOVED,d);mxEvent.addListener(G,"change",y);mxEvent.addListener(F,"change",y);mxEvent.addListener(I,"change",y);mxEvent.addListener(L,"change",y);g=mxUtils.button(mxResources.get("cancel"),function(){f();b.hideDialog()});g.className="geBtn";A=mxUtils.button(mxResources.get("apply"),function(){var K= +k.model.cells,H=[],Q=[],U;for(U in K){var T=K[U];T.cp&&Q.push(D(T))}Q.sort(function(V,W){return V.x!=W.x?V.x-W.x:V.y!=W.y?V.y-W.y:V.dx!=W.dx?V.dx-W.dx:V.dy-W.dy});for(K=0;K<Q.length;K++)0<K&&Q[K].x==Q[K-1].x&&Q[K].y==Q[K-1].y&&Q[K].dx==Q[K-1].dx&&Q[K].dy==Q[K-1].dy||H.push("["+Q[K].x+","+Q[K].y+",0,"+Q[K].dx+","+Q[K].dy+"]");b.editor.graph.setCellStyles("points","["+H.join(",")+"]",[e]);f();b.hideDialog()});A.className="geBtn gePrimaryBtn";E=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points", +null,[e]);f();b.hideDialog()});E.className="geBtn";z=document.createElement("div");z.style.marginTop="10px";z.style.textAlign="right";b.editor.cancelFirst?(z.appendChild(g),z.appendChild(E),z.appendChild(A)):(z.appendChild(E),z.appendChild(A),z.appendChild(g));c.appendChild(z)};this.destroy=f;this.container=c};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"}, {description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}}, {commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"}, graph:{background:"#DAD2D8",gridColor:"#ABA4A9"}},{commonStyle:{fontColor:"#FEFAE0",strokeColor:"#DDA15E",fillColor:"#BC6C25"},graph:{background:"#283618",gridColor:"#48632C"}},{commonStyle:{fontColor:"#E4FDE1",strokeColor:"#028090",fillColor:"#F45B69"},graph:{background:"#114B5F",gridColor:"#0B3240"}},{},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#FAD9D5"},edgeStyle:{strokeColor:"#09555B"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#09555B",fontColor:"#EEEEEE"}, @@ -11173,7 +11171,6 @@ Editor.commentImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53M Editor.shareImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTggMTYuMDhjLS43NiAwLTEuNDQuMy0xLjk2Ljc3TDguOTEgMTIuN2MuMDUtLjIzLjA5LS40Ni4wOS0uN3MtLjA0LS40Ny0uMDktLjdsNy4wNS00LjExYy41NC41IDEuMjUuODEgMi4wNC44MSAxLjY2IDAgMy0xLjM0IDMtM3MtMS4zNC0zLTMtMy0zIDEuMzQtMyAzYzAgLjI0LjA0LjQ3LjA5LjdMOC4wNCA5LjgxQzcuNSA5LjMxIDYuNzkgOSA2IDljLTEuNjYgMC0zIDEuMzQtMyAzczEuMzQgMyAzIDNjLjc5IDAgMS41LS4zMSAyLjA0LS44MWw3LjEyIDQuMTZjLS4wNS4yMS0uMDguNDMtLjA4LjY1IDAgMS42MSAxLjMxIDIuOTIgMi45MiAyLjkyIDEuNjEgMCAyLjkyLTEuMzEgMi45Mi0yLjkycy0xLjMxLTIuOTItMi45Mi0yLjkyeiIvPjwvc3ZnPg=="; Editor.syncImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgNFYxTDggNWw0IDRWNmMzLjMxIDAgNiAyLjY5IDYgNiAwIDEuMDEtLjI1IDEuOTctLjcgMi44bDEuNDYgMS40NkMxOS41NCAxNS4wMyAyMCAxMy41NyAyMCAxMmMwLTQuNDItMy41OC04LTgtOHptMCAxNGMtMy4zMSAwLTYtMi42OS02LTYgMC0xLjAxLjI1LTEuOTcuNy0yLjhMNS4yNCA3Ljc0QzQuNDYgOC45NyA0IDEwLjQzIDQgMTJjMCA0LjQyIDMuNTggOCA4IDh2M2w0LTQtNC00djN6Ii8+PC9zdmc+";Editor.cloudImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEyIDZjMi42MiAwIDQuODggMS44NiA1LjM5IDQuNDNsLjMgMS41IDEuNTMuMTFjMS41Ni4xIDIuNzggMS40MSAyLjc4IDIuOTYgMCAxLjY1LTEuMzUgMy0zIDNINmMtMi4yMSAwLTQtMS43OS00LTQgMC0yLjA1IDEuNTMtMy43NiAzLjU2LTMuOTdsMS4wNy0uMTEuNS0uOTVDOC4wOCA3LjE0IDkuOTQgNiAxMiA2bTAtMkM5LjExIDQgNi42IDUuNjQgNS4zNSA4LjA0IDIuMzQgOC4zNiAwIDEwLjkxIDAgMTRjMCAzLjMxIDIuNjkgNiA2IDZoMTNjMi43NiAwIDUtMi4yNCA1LTUgMC0yLjY0LTIuMDUtNC43OC00LjY1LTQuOTZDMTguNjcgNi41OSAxNS42NCA0IDEyIDR6Ii8+PC9zdmc+"; Editor.cloudOffImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTI0IDE1YzAtMi42NC0yLjA1LTQuNzgtNC42NS00Ljk2QzE4LjY3IDYuNTkgMTUuNjQgNCAxMiA0Yy0xLjMzIDAtMi41Ny4zNi0zLjY1Ljk3bDEuNDkgMS40OUMxMC41MSA2LjE3IDExLjIzIDYgMTIgNmMzLjA0IDAgNS41IDIuNDYgNS41IDUuNXYuNUgxOWMxLjY2IDAgMyAxLjM0IDMgMyAwIC45OS0uNDggMS44NS0xLjIxIDIuNGwxLjQxIDEuNDFjMS4wOS0uOTIgMS44LTIuMjcgMS44LTMuODF6TTQuNDEgMy44NkwzIDUuMjdsMi43NyAyLjc3aC0uNDJDMi4zNCA4LjM2IDAgMTAuOTEgMCAxNGMwIDMuMzEgMi42OSA2IDYgNmgxMS43M2wyIDIgMS40MS0xLjQxTDQuNDEgMy44NnpNNiAxOGMtMi4yMSAwLTQtMS43OS00LTRzMS43OS00IDQtNGgxLjczbDggOEg2eiIvPjwvc3ZnPg=="; -Editor.syncDisabledImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTAgNi4zNVY0LjI2Yy0uOC4yMS0xLjU1LjU0LTIuMjMuOTZsMS40NiAxLjQ2Yy4yNS0uMTIuNS0uMjQuNzctLjMzem0tNy4xNC0uOTRsMi4zNiAyLjM2QzQuNDUgOC45OSA0IDEwLjQ0IDQgMTJjMCAyLjIxLjkxIDQuMiAyLjM2IDUuNjRMNCAyMGg2di02bC0yLjI0IDIuMjRDNi42OCAxNS4xNSA2IDEzLjY2IDYgMTJjMC0xIC4yNS0xLjk0LjY4LTIuNzdsOC4wOCA4LjA4Yy0uMjUuMTMtLjUuMjUtLjc3LjM0djIuMDljLjgtLjIxIDEuNTUtLjU0IDIuMjMtLjk2bDIuMzYgMi4zNiAxLjI3LTEuMjdMNC4xNCA0LjE0IDIuODYgNS40MXpNMjAgNGgtNnY2bDIuMjQtMi4yNEMxNy4zMiA4Ljg1IDE4IDEwLjM0IDE4IDEyYzAgMS0uMjUgMS45NC0uNjggMi43N2wxLjQ2IDEuNDZDMTkuNTUgMTUuMDEgMjAgMTMuNTYgMjAgMTJjMC0yLjIxLS45MS00LjItMi4zNi01LjY0TDIwIDR6Ii8+PC9zdmc+"; Editor.calendarImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48cGF0aCBkPSJNMjAsNEg0QzIuOSw0LDIsNC45LDIsNnYxMmMwLDEuMSwwLjksMiwyLDJoMTZjMS4xLDAsMi0wLjksMi0yVjZDMjIsNC45LDIxLjEsNCwyMCw0eiBNOCwxMUg0VjZoNFYxMXogTTE0LDExaC00VjZoNFYxMXogTTIwLDExaC00VjZoNFYxMXogTTgsMThINHYtNWg0VjE4eiBNMTQsMThoLTR2LTVoNFYxOHogTTIwLDE4aC00di01aDRWMTh6Ii8+PC9nPjwvc3ZnPg=="; Editor.syncProblemImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyAxMmMwIDIuMjEuOTEgNC4yIDIuMzYgNS42NEwzIDIwaDZ2LTZsLTIuMjQgMi4yNEM1LjY4IDE1LjE1IDUgMTMuNjYgNSAxMmMwLTIuNjEgMS42Ny00LjgzIDQtNS42NVY0LjI2QzUuNTUgNS4xNSAzIDguMjcgMyAxMnptOCA1aDJ2LTJoLTJ2MnpNMjEgNGgtNnY2bDIuMjQtMi4yNEMxOC4zMiA4Ljg1IDE5IDEwLjM0IDE5IDEyYzAgMi42MS0xLjY3IDQuODMtNCA1LjY1djIuMDljMy40NS0uODkgNi00LjAxIDYtNy43NCAwLTIuMjEtLjkxLTQuMi0yLjM2LTUuNjRMMjEgNHptLTEwIDloMlY3aC0ydjZ6Ii8+PC9zdmc+"; Editor.tailSpin="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9Ii0yIC0yIDQ0IDQ0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogICAgPGRlZnM+CiAgICAgICAgPGxpbmVhckdyYWRpZW50IHgxPSI4LjA0MiUiIHkxPSIwJSIgeDI9IjY1LjY4MiUiIHkyPSIyMy44NjUlIiBpZD0iYSI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiM4MDgwODAiIHN0b3Atb3BhY2l0eT0iMCIgb2Zmc2V0PSIwJSIvPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjODA4MDgwIiBzdG9wLW9wYWNpdHk9Ii42MzEiIG9mZnNldD0iNjMuMTQ2JSIvPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjODA4MDgwIiBvZmZzZXQ9IjEwMCUiLz4KICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPC9kZWZzPgogICAgPGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxIDEpIj4KICAgICAgICAgICAgPHBhdGggZD0iTTM2IDE4YzAtOS45NC04LjA2LTE4LTE4LTE4IiBzdHJva2U9InVybCgjYSkiIHN0cm9rZS13aWR0aD0iNiI+CiAgICAgICAgICAgICAgICA8YW5pbWF0ZVRyYW5zZm9ybQogICAgICAgICAgICAgICAgICAgIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIKICAgICAgICAgICAgICAgICAgICB0eXBlPSJyb3RhdGUiCiAgICAgICAgICAgICAgICAgICAgZnJvbT0iMCAxOCAxOCIKICAgICAgICAgICAgICAgICAgICB0bz0iMzYwIDE4IDE4IgogICAgICAgICAgICAgICAgICAgIGR1cj0iMC45cyIKICAgICAgICAgICAgICAgICAgICByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgLz4KICAgICAgICAgICAgPC9wYXRoPgogICAgICAgICAgICA8Y2lyY2xlIGZpbGw9IiM4MDgwODAiIGN4PSIzNiIgY3k9IjE4IiByPSIxIj4KICAgICAgICAgICAgICAgIDxhbmltYXRlVHJhbnNmb3JtCiAgICAgICAgICAgICAgICAgICAgYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIgogICAgICAgICAgICAgICAgICAgIHR5cGU9InJvdGF0ZSIKICAgICAgICAgICAgICAgICAgICBmcm9tPSIwIDE4IDE4IgogICAgICAgICAgICAgICAgICAgIHRvPSIzNjAgMTggMTgiCiAgICAgICAgICAgICAgICAgICAgZHVyPSIwLjlzIgogICAgICAgICAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPgogICAgICAgICAgICA8L2NpcmNsZT4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPgo="; @@ -11188,109 +11185,109 @@ Editor.hiResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAAC Editor.loResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg=="; Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker= "0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.enableWebFonts="1"!=urlParams["safe-style-src"];Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion= -null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(q){q.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(q,D){return"1"==mxUtils.getValue(q.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(q,D){return"1"!=mxUtils.getValue(q.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(q, -D){return"1"==mxUtils.getValue(q.style,"comic","0")||"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(q,D){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(q,D){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureAngle", -dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(q,D){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(q,D){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(q,D){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough? -"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(q,D){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(q,D){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(q,D){return"1"== -mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(q,D){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(q,D){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum", -defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(q,D){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"}, -{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(q){return"orthogonalEdgeStyle"==mxUtils.getValue(q.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity", +null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(t){t.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(t,C){return"1"==mxUtils.getValue(t.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(t,C){return"1"!=mxUtils.getValue(t.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(t, +C){return"1"==mxUtils.getValue(t.style,"comic","0")||"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(t,C){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(t,C){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"hachureAngle", +dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(t,C){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(t,C){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(t,C){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough? +"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(t,C){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(t,C){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(t,C){return"1"== +mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(t,C){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(t,C){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum", +defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(t,C){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"}, +{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(t){return"orthogonalEdgeStyle"==mxUtils.getValue(t.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity", dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash", dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"noJump", -dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(q,D){D=D.editorUi.editor.graph;return 1==q.vertices.length&& -0==q.edges.length&&D.isTableCell(q.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(q,D){D=D.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&D.isTableCell(q.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(q,D){q=D.editorUi.editor.graph.getCellStyle(1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null);return"1"==mxUtils.getValue(q,"resizeLastRow","0")}, -isVisible:function(q,D){D=D.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&D.isTable(q.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(q,D){q=D.editorUi.editor.graph.getCellStyle(1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null);return"1"==mxUtils.getValue(q,"resizeLast","0")},isVisible:function(q,D){D=D.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&D.isTable(q.vertices[0])}},{name:"fillOpacity", +dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(t,C){C=C.editorUi.editor.graph;return 1==t.vertices.length&& +0==t.edges.length&&C.isTableCell(t.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(t,C){C=C.editorUi.editor.graph;return 1==t.vertices.length&&0==t.edges.length&&C.isTableCell(t.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(t,C){t=C.editorUi.editor.graph.getCellStyle(1==t.vertices.length&&0==t.edges.length?t.vertices[0]:null);return"1"==mxUtils.getValue(t,"resizeLastRow","0")}, +isVisible:function(t,C){C=C.editorUi.editor.graph;return 1==t.vertices.length&&0==t.edges.length&&C.isTable(t.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(t,C){t=C.editorUi.editor.graph.getCellStyle(1==t.vertices.length&&0==t.edges.length?t.vertices[0]:null);return"1"==mxUtils.getValue(t,"resizeLast","0")},isVisible:function(t,C){C=C.editorUi.editor.graph;return 1==t.vertices.length&&0==t.edges.length&&C.isTable(t.vertices[0])}},{name:"fillOpacity", dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float", defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool", -defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(q,D){return D.editorUi.editor.graph.isCellConnectable(0<q.vertices.length&&0==q.edges.length?q.vertices[0]:null)},isVisible:function(q,D){return 0<q.vertices.length&&0==q.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"}, +defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(t,C){return C.editorUi.editor.graph.isCellConnectable(0<t.vertices.length&&0==t.edges.length?t.vertices[0]:null)},isVisible:function(t,C){return 0<t.vertices.length&&0==t.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"}, {val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"}, -{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(q,D){return 1==q.vertices.length&&0==q.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(q,D){q=1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null;D=D.editorUi.editor.graph;return null!=q&&(D.isSwimlane(q)||0<D.model.getChildCount(q))}, -isVisible:function(q,D){return 1==q.vertices.length&&0==q.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(q,D){var L=1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null;D=D.editorUi.editor.graph;return null!=L&&(D.isContainer(L)&&"0"!=q.style.collapsible||!D.isContainer(L)&&"1"==q.style.collapsible)},isVisible:function(q,D){return 1==q.vertices.length&&0==q.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0, -isVisible:function(q,D){return 1==q.vertices.length&&0==q.edges.length&&!D.editorUi.editor.graph.isSwimlane(q.vertices[0])&&null==mxUtils.getValue(q.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(q,D){D=D.editorUi.editor.graph.model;return 0<q.vertices.length?D.isVertex(D.getParent(q.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog", -type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(q,D){q=0<q.vertices.length?D.editorUi.editor.graph.getCellGeometry(q.vertices[0]):null;return null!=q&&!q.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable", +{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(t,C){return 1==t.vertices.length&&0==t.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(t,C){t=1==t.vertices.length&&0==t.edges.length?t.vertices[0]:null;C=C.editorUi.editor.graph;return null!=t&&(C.isSwimlane(t)||0<C.model.getChildCount(t))}, +isVisible:function(t,C){return 1==t.vertices.length&&0==t.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(t,C){var N=1==t.vertices.length&&0==t.edges.length?t.vertices[0]:null;C=C.editorUi.editor.graph;return null!=N&&(C.isContainer(N)&&"0"!=t.style.collapsible||!C.isContainer(N)&&"1"==t.style.collapsible)},isVisible:function(t,C){return 1==t.vertices.length&&0==t.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0, +isVisible:function(t,C){return 1==t.vertices.length&&0==t.edges.length&&!C.editorUi.editor.graph.isSwimlane(t.vertices[0])&&null==mxUtils.getValue(t.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(t,C){C=C.editorUi.editor.graph.model;return 0<t.vertices.length?C.isVertex(C.getParent(t.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog", +type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(t,C){t=0<t.vertices.length?C.editorUi.editor.graph.getCellGeometry(t.vertices[0]):null;return null!=t&&!t.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable", dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents", -dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(q,D){var L=mxUtils.getValue(q.style,mxConstants.STYLE_FILLCOLOR,null);return D.editorUi.editor.graph.isSwimlane(q.vertices[0])||null==L||L==mxConstants.NONE||0==mxUtils.getValue(q.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(q.style,mxConstants.STYLE_OPACITY,100)||null!=q.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(q,D){return 0<q.vertices.length&& -D.editorUi.editor.graph.isContainer(q.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n'; -Editor.createRoughCanvas=function(q){var D=rough.canvas({getContext:function(){return q}});D.draw=function(L){var R=L.sets||[];L=L.options||this.getDefaultOptions();for(var O=0;O<R.length;O++){var Q=R[O];switch(Q.type){case "path":null!=L.stroke&&this._drawToContext(q,Q,L);break;case "fillPath":this._drawToContext(q,Q,L);break;case "fillSketch":this.fillSketch(q,Q,L)}}};D.fillSketch=function(L,R,O){var Q=q.state.strokeColor,S=q.state.strokeWidth,X=q.state.strokeAlpha,aa=q.state.dashed,Y=O.fillWeight; -0>Y&&(Y=O.strokeWidth/2);q.setStrokeAlpha(q.state.fillAlpha);q.setStrokeColor(O.fill||"");q.setStrokeWidth(Y);q.setDashed(!1);this._drawToContext(L,R,O);q.setDashed(aa);q.setStrokeWidth(S);q.setStrokeColor(Q);q.setStrokeAlpha(X)};D._drawToContext=function(L,R,O){L.begin();for(var Q=0;Q<R.ops.length;Q++){var S=R.ops[Q],X=S.data;switch(S.op){case "move":L.moveTo(X[0],X[1]);break;case "bcurveTo":L.curveTo(X[0],X[1],X[2],X[3],X[4],X[5]);break;case "lineTo":L.lineTo(X[0],X[1])}}L.end();"fillPath"===R.type&& -O.filled?L.fill():L.stroke()};return D};(function(){function q(Q,S,X){this.canvas=Q;this.rc=S;this.shape=X;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,q.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,q.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,q.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect= -mxUtils.bind(this,q.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,q.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,q.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,q.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,q.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this, -q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,q.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,q.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,q.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,q.prototype.fillAndStroke); -this.path=[];this.passThrough=!1}q.prototype.moveOp="M";q.prototype.lineOp="L";q.prototype.quadOp="Q";q.prototype.curveOp="C";q.prototype.closeOp="Z";q.prototype.getStyle=function(Q,S){var X=1;if(null!=this.shape.state){var aa=this.shape.state.cell.id;if(null!=aa)for(var Y=0;Y<aa.length;Y++)X=(X<<5)-X+aa.charCodeAt(Y)<<0}X={strokeWidth:this.canvas.state.strokeWidth,seed:X,preserveVertices:!0};aa=this.rc.getDefaultOptions();X.stroke=Q?this.canvas.state.strokeColor===mxConstants.NONE?"transparent": -this.canvas.state.strokeColor:mxConstants.NONE;Q=null;(X.filled=S)?(X.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,Q=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):X.fill="";X.bowing=mxUtils.getValue(this.shape.style,"bowing",aa.bowing);X.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",aa.hachureAngle);X.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",aa.curveFitting);X.roughness=mxUtils.getValue(this.shape.style, +dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(t,C){var N=mxUtils.getValue(t.style,mxConstants.STYLE_FILLCOLOR,null);return C.editorUi.editor.graph.isSwimlane(t.vertices[0])||null==N||N==mxConstants.NONE||0==mxUtils.getValue(t.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(t.style,mxConstants.STYLE_OPACITY,100)||null!=t.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(t,C){return 0<t.vertices.length&& +C.editorUi.editor.graph.isContainer(t.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n'; +Editor.createRoughCanvas=function(t){var C=rough.canvas({getContext:function(){return t}});C.draw=function(N){var R=N.sets||[];N=N.options||this.getDefaultOptions();for(var O=0;O<R.length;O++){var P=R[O];switch(P.type){case "path":null!=N.stroke&&this._drawToContext(t,P,N);break;case "fillPath":this._drawToContext(t,P,N);break;case "fillSketch":this.fillSketch(t,P,N)}}};C.fillSketch=function(N,R,O){var P=t.state.strokeColor,S=t.state.strokeWidth,X=t.state.strokeAlpha,aa=t.state.dashed,Y=O.fillWeight; +0>Y&&(Y=O.strokeWidth/2);t.setStrokeAlpha(t.state.fillAlpha);t.setStrokeColor(O.fill||"");t.setStrokeWidth(Y);t.setDashed(!1);this._drawToContext(N,R,O);t.setDashed(aa);t.setStrokeWidth(S);t.setStrokeColor(P);t.setStrokeAlpha(X)};C._drawToContext=function(N,R,O){N.begin();for(var P=0;P<R.ops.length;P++){var S=R.ops[P],X=S.data;switch(S.op){case "move":N.moveTo(X[0],X[1]);break;case "bcurveTo":N.curveTo(X[0],X[1],X[2],X[3],X[4],X[5]);break;case "lineTo":N.lineTo(X[0],X[1])}}N.end();"fillPath"===R.type&& +O.filled?N.fill():N.stroke()};return C};(function(){function t(P,S,X){this.canvas=P;this.rc=S;this.shape=X;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,t.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,t.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,t.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect= +mxUtils.bind(this,t.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,t.prototype.ellipse);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.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);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,t.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,t.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,t.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,t.prototype.fillAndStroke); +this.path=[];this.passThrough=!1}t.prototype.moveOp="M";t.prototype.lineOp="L";t.prototype.quadOp="Q";t.prototype.curveOp="C";t.prototype.closeOp="Z";t.prototype.getStyle=function(P,S){var X=1;if(null!=this.shape.state){var aa=this.shape.state.cell.id;if(null!=aa)for(var Y=0;Y<aa.length;Y++)X=(X<<5)-X+aa.charCodeAt(Y)<<0}X={strokeWidth:this.canvas.state.strokeWidth,seed:X,preserveVertices:!0};aa=this.rc.getDefaultOptions();X.stroke=P?this.canvas.state.strokeColor===mxConstants.NONE?"transparent": +this.canvas.state.strokeColor:mxConstants.NONE;P=null;(X.filled=S)?(X.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,P=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):X.fill="";X.bowing=mxUtils.getValue(this.shape.style,"bowing",aa.bowing);X.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",aa.hachureAngle);X.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",aa.curveFitting);X.roughness=mxUtils.getValue(this.shape.style, "jiggle",aa.roughness);X.simplification=mxUtils.getValue(this.shape.style,"simplification",aa.simplification);X.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",aa.disableMultiStroke);X.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",aa.disableMultiStrokeFill);S=mxUtils.getValue(this.shape.style,"hachureGap",-1);X.hachureGap="auto"==S?-1:S;X.dashGap=mxUtils.getValue(this.shape.style,"dashGap",S);X.dashOffset=mxUtils.getValue(this.shape.style, -"dashOffset",S);X.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",S);S=mxUtils.getValue(this.shape.style,"fillWeight",-1);X.fillWeight="auto"==S?-1:S;S=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==S&&(S=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),S=null!=X.fill&&(null!=Q||null!=S&&X.fill==S)?"solid":aa.fillStyle);X.fillStyle=S;return X};q.prototype.begin=function(){this.passThrough? -this.originalBegin.apply(this.canvas,arguments):this.path=[]};q.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};q.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var Q=2;Q<arguments.length;Q+=2)this.lastX=arguments[Q-1],this.lastY=arguments[Q],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};q.prototype.lineTo=function(Q,S){this.passThrough?this.originalLineTo.apply(this.canvas, -arguments):(this.addOp(this.lineOp,Q,S),this.lastX=Q,this.lastY=S)};q.prototype.moveTo=function(Q,S){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,Q,S),this.lastX=Q,this.lastY=S,this.firstX=Q,this.firstY=S)};q.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};q.prototype.quadTo=function(Q,S,X,aa){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,Q, -S,X,aa),this.lastX=X,this.lastY=aa)};q.prototype.curveTo=function(Q,S,X,aa,Y,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,Q,S,X,aa,Y,Z),this.lastX=Y,this.lastY=Z)};q.prototype.arcTo=function(Q,S,X,aa,Y,Z,ba){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var fa=mxUtils.arcToCurves(this.lastX,this.lastY,Q,S,X,aa,Y,Z,ba);if(null!=fa)for(var ka=0;ka<fa.length;ka+=6)this.curveTo(fa[ka],fa[ka+1],fa[ka+2],fa[ka+3],fa[ka+4],fa[ka+ -5]);this.lastX=Z;this.lastY=ba}};q.prototype.rect=function(Q,S,X,aa){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(Q,S,X,aa,this.getStyle(!0,!0)))};q.prototype.ellipse=function(Q,S,X,aa){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(Q+X/2,S+aa/2,X,aa,this.getStyle(!0,!0)))};q.prototype.roundrect=function(Q,S,X,aa,Y,Z){this.passThrough?this.originalRoundrect.apply(this.canvas, -arguments):(this.begin(),this.moveTo(Q+Y,S),this.lineTo(Q+X-Y,S),this.quadTo(Q+X,S,Q+X,S+Z),this.lineTo(Q+X,S+aa-Z),this.quadTo(Q+X,S+aa,Q+X-Y,S+aa),this.lineTo(Q+Y,S+aa),this.quadTo(Q,S+aa,Q,S+aa-Z),this.lineTo(Q,S+Z),this.quadTo(Q,S,Q+Y,S))};q.prototype.drawPath=function(Q){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),Q)}catch(X){}this.passThrough=!1}else if(null!=this.nextShape){for(var S in Q)this.nextShape.options[S]=Q[S];Q.stroke!=mxConstants.NONE&&null!=Q.stroke|| -delete this.nextShape.options.stroke;Q.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};q.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};q.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};q.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas, -arguments):this.drawPath(this.getStyle(!0,!0))};q.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin; -this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(Q){return new q(Q,Editor.createRoughCanvas(Q),this)};var D=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(Q){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?D.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle", -"rough")?this.createComicCanvas(Q):this.createRoughCanvas(Q)};var L=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(Q,S,X,aa,Y){null!=Q.handJiggle&&Q.handJiggle.passThrough||L.apply(this,arguments)};var R=mxShape.prototype.paint;mxShape.prototype.paint=function(Q){var S=Q.addTolerance,X=!0;null!=this.style&&(X="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=Q.handJiggle&&Q.handJiggle.constructor==q&&!this.outline){Q.save(); -var aa=this.fill,Y=this.stroke;this.stroke=this.fill=null;var Z=this.configurePointerEvents,ba=Q.setStrokeColor;Q.setStrokeColor=function(){};var fa=Q.setFillColor;Q.setFillColor=function(){};X||null==aa||(this.configurePointerEvents=function(){});Q.handJiggle.passThrough=!0;R.apply(this,arguments);Q.handJiggle.passThrough=!1;Q.setFillColor=fa;Q.setStrokeColor=ba;this.configurePointerEvents=Z;this.stroke=Y;this.fill=aa;Q.restore();X&&null!=aa&&(Q.addTolerance=function(){})}R.apply(this,arguments); -Q.addTolerance=S};var O=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(Q,S,X,aa,Y,Z){null!=Q.handJiggle&&Q.handJiggle.constructor==q?(Q.handJiggle.passThrough=!0,O.apply(this,arguments),Q.handJiggle.passThrough=!1):O.apply(this,arguments)}})();Editor.fastCompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?q:Graph.arrayBufferToString(pako.deflateRaw(q))};Editor.fastDecompress=function(q){return null==q||0==q.length||"undefined"===typeof pako? -q:pako.inflateRaw(Graph.stringToArrayBuffer(atob(q)),{to:"string"})};Editor.extractGraphModel=function(q,D,L){if(null!=q&&"undefined"!==typeof pako){var R=q.ownerDocument.getElementsByTagName("div"),O=[];if(null!=R&&0<R.length)for(var Q=0;Q<R.length;Q++)if("mxgraph"==R[Q].getAttribute("class")){O.push(R[Q]);break}0<O.length&&(R=O[0].getAttribute("data-mxgraph"),null!=R?(O=JSON.parse(R),null!=O&&null!=O.xml&&(q=mxUtils.parseXml(O.xml),q=q.documentElement)):(O=O[0].getElementsByTagName("div"),0<O.length&& -(R=mxUtils.getTextContent(O[0]),R=Graph.decompress(R,null,L),0<R.length&&(q=mxUtils.parseXml(R),q=q.documentElement))))}if(null!=q&&"svg"==q.nodeName)if(R=q.getAttribute("content"),null!=R&&"<"!=R.charAt(0)&&"%"!=R.charAt(0)&&(R=unescape(window.atob?atob(R):Base64.decode(cont,R))),null!=R&&"%"==R.charAt(0)&&(R=decodeURIComponent(R)),null!=R&&0<R.length)q=mxUtils.parseXml(R).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==q||D||(O=null,"diagram"==q.nodeName?O=q:"mxfile"== -q.nodeName&&(R=q.getElementsByTagName("diagram"),0<R.length&&(O=R[Math.max(0,Math.min(R.length-1,urlParams.page||0))])),null!=O&&(q=Editor.parseDiagramNode(O,L)));null==q||"mxGraphModel"==q.nodeName||D&&"mxfile"==q.nodeName||(q=null);return q};Editor.parseDiagramNode=function(q,D){var L=mxUtils.trim(mxUtils.getTextContent(q)),R=null;0<L.length?(q=Graph.decompress(L,null,D),null!=q&&0<q.length&&(R=mxUtils.parseXml(q).documentElement)):(q=mxUtils.getChildNodes(q),0<q.length&&(R=mxUtils.createXmlDocument(), -R.appendChild(R.importNode(q[0],!0)),R=R.documentElement));return R};Editor.getDiagramNodeXml=function(q){var D=mxUtils.getTextContent(q),L=null;0<D.length?L=Graph.decompress(D):null!=q.firstChild&&(L=mxUtils.getXml(q.firstChild));return L};Editor.extractGraphModelFromPdf=function(q){q=q.substring(q.indexOf(",")+1);q=window.atob&&!mxClient.IS_SF?atob(q):Base64.decode(q,!0);if("%PDF-1.7"==q.substring(0,8)){var D=q.indexOf("EmbeddedFile");if(-1<D){var L=q.indexOf("stream",D)+9;if(0<q.substring(D,L).indexOf("application#2Fvnd.jgraph.mxfile"))return D= -q.indexOf("endstream",L-1),pako.inflateRaw(Graph.stringToArrayBuffer(q.substring(L,D)),{to:"string"})}return null}L=null;D="";for(var R=0,O=0,Q=[],S=null;O<q.length;){var X=q.charCodeAt(O);O+=1;10!=X&&(D+=String.fromCharCode(X));X=="/Subject (%3Cmxfile".charCodeAt(R)?R++:R=0;if(19==R){var aa=q.indexOf("%3C%2Fmxfile%3E)",O)+15;O-=9;if(aa>O){L=q.substring(O,aa);break}}10==X&&("endobj"==D?S=null:"obj"==D.substring(D.length-3,D.length)||"xref"==D||"trailer"==D?(S=[],Q[D.split(" ")[0]]=S):null!=S&&S.push(D), -D="")}null==L&&(L=Editor.extractGraphModelFromXref(Q));null!=L&&(L=decodeURIComponent(L.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return L};Editor.extractGraphModelFromXref=function(q){var D=q.trailer,L=null;null!=D&&(D=/.* \/Info (\d+) (\d+) R/g.exec(D.join("\n")),null!=D&&0<D.length&&(D=q[D[1]],null!=D&&(D=/.* \/Subject (\d+) (\d+) R/g.exec(D.join("\n")),null!=D&&0<D.length&&(q=q[D[1]],null!=q&&(q=q.join("\n"),L=q.substring(1,q.length-1))))));return L};Editor.extractParserError=function(q,D){var L= -null;q=null!=q?q.getElementsByTagName("parsererror"):null;null!=q&&0<q.length&&(L=D||mxResources.get("invalidChars"),D=q[0].getElementsByTagName("div"),0<D.length&&(L=mxUtils.getTextContent(D[0])));return null!=L?mxUtils.trim(L):L};Editor.addRetryToError=function(q,D){null!=q&&(q=null!=q.error?q.error:q,null==q.retry&&(q.retry=D))};Editor.configure=function(q,D){if(null!=q){Editor.config=q;Editor.configVersion=q.version;Menus.prototype.defaultFonts=q.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors= -q.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=q.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=q.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=q.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=q.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=q.autosaveDelay||DrawioFile.prototype.autosaveDelay; -q.debug&&(urlParams.test="1");null!=q.templateFile&&(EditorUi.templateFile=q.templateFile);null!=q.styles&&(Array.isArray(q.styles)?Editor.styles=q.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=q.globalVars&&(Editor.globalVars=q.globalVars);null!=q.compressXml&&(Editor.compressXml=q.compressXml);null!=q.includeDiagram&&(Editor.defaultIncludeDiagram=q.includeDiagram);null!=q.simpleLabels&&(Editor.simpleLabels=q.simpleLabels);null!=q.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker= -q.oneDriveInlinePicker);null!=q.darkColor&&(Editor.darkColor=q.darkColor);null!=q.lightColor&&(Editor.lightColor=q.lightColor);null!=q.settingsName&&(Editor.configurationKey="."+q.settingsName+"-configuration",Editor.settingsKey="."+q.settingsName+"-config",mxSettings.key=Editor.settingsKey);q.customFonts&&(Menus.prototype.defaultFonts=q.customFonts.concat(Menus.prototype.defaultFonts));q.customPresetColors&&(ColorDialog.prototype.presetColors=q.customPresetColors.concat(ColorDialog.prototype.presetColors)); -null!=q.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=q.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=q.css){var L=document.createElement("style");L.setAttribute("type","text/css");L.appendChild(document.createTextNode(q.css));var R=document.getElementsByTagName("script")[0];R.parentNode.insertBefore(L,R)}null!=q.libraries&&(Sidebar.prototype.customEntries=q.libraries);null!=q.enabledLibraries&&(Array.isArray(q.enabledLibraries)?Sidebar.prototype.enabledLibraries= -q.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=q.defaultLibraries&&(Sidebar.prototype.defaultEntries=q.defaultLibraries);null!=q.defaultCustomLibraries&&(Editor.defaultCustomLibraries=q.defaultCustomLibraries);null!=q.enableCustomLibraries&&(Editor.enableCustomLibraries=q.enableCustomLibraries);null!=q.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=q.defaultVertexStyle);null!=q.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=q.defaultEdgeStyle); -null!=q.defaultPageVisible&&(Graph.prototype.defaultPageVisible=q.defaultPageVisible);null!=q.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=q.defaultGridEnabled);null!=q.zoomWheel&&(Graph.zoomWheel=q.zoomWheel);null!=q.zoomFactor&&(L=parseFloat(q.zoomFactor),!isNaN(L)&&1<L?Graph.prototype.zoomFactor=L:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=q.gridSteps&&(L=parseInt(q.gridSteps),!isNaN(L)&&0<L?mxGraphView.prototype.gridSteps=L:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps")); -null!=q.pageFormat&&(L=parseInt(q.pageFormat.width),R=parseInt(q.pageFormat.height),!isNaN(L)&&0<L&&!isNaN(R)&&0<R?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,L,R),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));q.thumbWidth&&(Sidebar.prototype.thumbWidth=q.thumbWidth);q.thumbHeight&&(Sidebar.prototype.thumbHeight=q.thumbHeight);q.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml= -q.emptyLibraryXml);q.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=q.emptyDiagramXml);q.sidebarWidth&&(EditorUi.prototype.hsplitPosition=q.sidebarWidth);q.sidebarTitles&&(Sidebar.prototype.sidebarTitles=q.sidebarTitles);q.sidebarTitleSize&&(L=parseInt(q.sidebarTitleSize),!isNaN(L)&&0<L?Sidebar.prototype.sidebarTitleSize=L:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));q.fontCss&&("string"===typeof q.fontCss?Editor.configureFontCss(q.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss")); -null!=q.autosaveDelay&&(L=parseInt(q.autosaveDelay),!isNaN(L)&&0<L?DrawioFile.prototype.autosaveDelay=L:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));if(null!=q.plugins&&!D)for(App.initPluginCallback(),D=0;D<q.plugins.length;D++)mxscript(q.plugins[D]);null!=q.maxImageBytes&&(EditorUi.prototype.maxImageBytes=q.maxImageBytes);null!=q.maxImageSize&&(EditorUi.prototype.maxImageSize=q.maxImageSize);null!=q.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=q.shareCursorPosition); -null!=q.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=q.showRemoteCursors)}};Editor.configureFontCss=function(q){if(null!=q){Editor.prototype.fontCss=q;var D=document.getElementsByTagName("script")[0];if(null!=D&&null!=D.parentNode){var L=document.createElement("style");L.setAttribute("type","text/css");L.appendChild(document.createTextNode(q));D.parentNode.insertBefore(L,D);q=q.split("url(");for(L=1;L<q.length;L++){var R=q[L].indexOf(")");R=Editor.trimCssUrl(q[L].substring(0,R));var O= -document.createElement("link");O.setAttribute("rel","preload");O.setAttribute("href",R);O.setAttribute("as","font");O.setAttribute("crossorigin","");D.parentNode.insertBefore(O,D)}}}};Editor.trimCssUrl=function(q){return q.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(q){q=null!= -q?q:Editor.GUID_LENGTH;for(var D=[],L=0;L<q;L++)D.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return D.join("")};Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(q){q=null!=q&&"mxlibrary"!=q.nodeName?this.extractGraphModel(q):null;if(null!=q){var D=Editor.extractParserError(q, -mxResources.get("invalidOrMissingFile"));if(D)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[q],"cause",[D]),Error(mxResources.get("notADiagramFile")+" ("+D+")");if("mxGraphModel"==q.nodeName){D=q.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=D&&""!=D)D!=this.graph.currentStyle&&(L=null!=this.graph.themes?this.graph.themes[D]:mxUtils.load(STYLE_PATH+"/"+D+".xml").getDocumentElement(),null!=L&&(R=new mxCodec(L.ownerDocument),R.decode(L,this.graph.getStylesheet()))); -else{var L=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=L){var R=new mxCodec(L.ownerDocument);R.decode(L,this.graph.getStylesheet())}}this.graph.currentStyle=D;this.graph.mathEnabled="1"==urlParams.math||"1"==q.getAttribute("math");D=q.getAttribute("backgroundImage");null!=D?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(D)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&& -this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==q.getAttribute("shadow"),!1);if(D=q.getAttribute("extFonts"))try{for(D=D.split("|").map(function(O){O=O.split("^");return{name:O[0],url:O[1]}}),L=0;L<D.length;L++)this.graph.addExtFont(D[L].name,D[L].url)}catch(O){console.log("ExtFonts format error: "+O.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")|| -"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(q,D){q=null!=q?q:!0;var L=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&L.setAttribute("style",this.graph.currentStyle);var R=this.graph.getBackgroundImageObject(this.graph.backgroundImage,D);null!=R&&L.setAttribute("backgroundImage",JSON.stringify(R));L.setAttribute("math",this.graph.mathEnabled?"1":"0");L.setAttribute("shadow", -this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(R=this.graph.extFonts.map(function(O){return O.name+"^"+O.url}),L.setAttribute("extFonts",R.join("|")));return L};Editor.prototype.isDataSvg=function(q){try{var D=mxUtils.parseXml(q).documentElement.getAttribute("content");if(null!=D&&(null!=D&&"<"!=D.charAt(0)&&"%"!=D.charAt(0)&&(D=unescape(window.atob?atob(D):Base64.decode(cont,D))),null!=D&&"%"==D.charAt(0)&&(D=decodeURIComponent(D)),null!=D&&0<D.length)){var L= -mxUtils.parseXml(D).documentElement;return"mxfile"==L.nodeName||"mxGraphModel"==L.nodeName}}catch(R){}return!1};Editor.prototype.extractGraphModel=function(q,D,L){return Editor.extractGraphModel.apply(this,arguments)};var f=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform(); -f.apply(this,arguments)};var c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){c.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(q,D){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){q=null!=q?q:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(O){try{MathJax.typesetClear([O]), -MathJax.typeset([O]),Editor.onMathJaxDone()}catch(Q){MathJax.typesetClear([O]),null!=Q.retry?Q.retry.then(function(){MathJax.typesetPromise([O]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+Q.toString())}};window.MathJax=null!=D?D:{options:{skipHtmlTags:{"[+]":["text"]}},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath"]},startup:{pageReady:function(){for(var O=0;O<Editor.mathJaxQueue.length;O++)Editor.doMathJaxRender(Editor.mathJaxQueue[O])}}}; -Editor.MathJaxRender=function(O){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(O):Editor.mathJaxQueue.push(O)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var L=Editor.prototype.init;Editor.prototype.init=function(){L.apply(this,arguments);var O=mxUtils.bind(this,function(Q,S){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE, -O);this.graph.addListener(mxEvent.REFRESH,O)};D=document.getElementsByTagName("script");if(null!=D&&0<D.length){var R=document.createElement("script");R.setAttribute("type","text/javascript");R.setAttribute("src",q);D[0].parentNode.appendChild(R)}}};Editor.prototype.csvToArray=function(q){if(0<q.length){var D="",L=[""],R=0,O=!0,Q;q=$jscomp.makeIterator(q);for(Q=q.next();!Q.done;Q=q.next())Q=Q.value,'"'===Q?(O&&Q===D&&(L[R]+=Q),O=!O):","===Q&&O?Q=L[++R]="":L[R]+=Q,D=Q;return L}return[]};Editor.prototype.getProxiedUrl= -function(q){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(q)){var D=/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q);D=/\.png$/i.test(q)||/\.pdf$/i.test(q)||D;var L="t="+(new Date).getTime();q=PROXY_URL+"?url="+encodeURIComponent(q)+"&"+L+(D?"&base64=1":"")}return q};Editor.prototype.isCorsEnabledForUrl=function(q){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||q.substring(0,window.location.origin.length)== -window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(q)||"https://raw.githubusercontent.com/"===q.substring(0,34)||"https://fonts.googleapis.com/"===q.substring(0,29)||"https://fonts.gstatic.com/"===q.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var q=new mxUrlConverter;q.updateBaseUrl();var D=q.convert,L=this;q.convert=function(R){if(null!= -R){var O="http://"==R.substring(0,7)||"https://"==R.substring(0,8);O&&!navigator.onLine?R=Editor.svgBrokenImage.src:!O||R.substring(0,q.baseUrl.length)==q.baseUrl||L.crossOriginImages&&L.isCorsEnabledForUrl(R)?"chrome-extension://"==R.substring(0,19)||mxClient.IS_CHROMEAPP||(R=D.apply(this,arguments)):R=PROXY_URL+"?url="+encodeURIComponent(R)}return R};return q};Editor.createSvgDataUri=function(q){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(q)))};Editor.prototype.convertImageToDataUri= -function(q,D){try{var L=!0,R=window.setTimeout(mxUtils.bind(this,function(){L=!1;D(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(q))mxUtils.get(q,mxUtils.bind(this,function(Q){window.clearTimeout(R);L&&D(Editor.createSvgDataUri(Q.getText()))}),function(){window.clearTimeout(R);L&&D(Editor.svgBrokenImage.src)});else{var O=new Image;this.crossOriginImages&&(O.crossOrigin="anonymous");O.onload=function(){window.clearTimeout(R);if(L)try{var Q=document.createElement("canvas"),S=Q.getContext("2d"); -Q.height=O.height;Q.width=O.width;S.drawImage(O,0,0);D(Q.toDataURL())}catch(X){D(Editor.svgBrokenImage.src)}};O.onerror=function(){window.clearTimeout(R);L&&D(Editor.svgBrokenImage.src)};O.src=q}}catch(Q){D(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(q,D,L,R){null==R&&(R=this.createImageUrlConverter());var O=0,Q=L||{};L=mxUtils.bind(this,function(S,X){S=q.getElementsByTagName(S);for(var aa=0;aa<S.length;aa++)mxUtils.bind(this,function(Y){try{if(null!=Y){var Z=R.convert(Y.getAttribute(X)); -if(null!=Z&&"data:"!=Z.substring(0,5)){var ba=Q[Z];null==ba?(O++,this.convertImageToDataUri(Z,function(fa){null!=fa&&(Q[Z]=fa,Y.setAttribute(X,fa));O--;0==O&&D(q)})):Y.setAttribute(X,ba)}else null!=Z&&Y.setAttribute(X,Z)}}catch(fa){}})(S[aa])});L("image","xlink:href");L("img","src");0==O&&D(q)};Editor.base64Encode=function(q){for(var D="",L=0,R=q.length,O,Q,S;L<R;){O=q.charCodeAt(L++)&255;if(L==R){D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O& -3)<<4);D+="==";break}Q=q.charCodeAt(L++);if(L==R){D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4|(Q&240)>>4);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2);D+="=";break}S=q.charCodeAt(L++);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O& -3)<<4|(Q&240)>>4);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2|(S&192)>>6);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return D};Editor.prototype.loadUrl=function(q,D,L,R,O,Q,S,X){try{var aa=!S&&(R||/(\.png)($|\?)/i.test(q)||/(\.jpe?g)($|\?)/i.test(q)||/(\.gif)($|\?)/i.test(q)||/(\.pdf)($|\?)/i.test(q));O=null!=O?O:!0;var Y=mxUtils.bind(this,function(){mxUtils.get(q,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&& -299>=Z.getStatus()){if(null!=D){var ba=Z.getText();if(aa){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();ba=Array(Z.length);for(var fa=0;fa<Z.length;fa++)ba[fa]=String.fromCharCode(Z[fa]);ba=ba.join("")}Q=null!=Q?Q:"data:image/png;base64,";ba=Q+Editor.base64Encode(ba)}D(ba)}}else null!=L&&(0==Z.getStatus()?L({message:mxResources.get("accessDenied")},Z):404==Z.getStatus()?L({code:Z.getStatus()}, -Z):L({message:mxResources.get("error")+" "+Z.getStatus()},Z))}),function(Z){null!=L&&L({message:mxResources.get("error")+" "+Z.getStatus()})},aa,this.timeout,function(){O&&null!=L&&L({code:App.ERROR_TIMEOUT,retry:Y})},X)});Y()}catch(Z){null!=L&&L(Z)}};Editor.prototype.absoluteCssFonts=function(q){var D=null;if(null!=q){var L=q.split("url(");if(0<L.length){D=[L[0]];q=window.location.pathname;var R=null!=q?q.lastIndexOf("/"):-1;0<=R&&(q=q.substring(0,R+1));R=document.getElementsByTagName("base");var O= -null;null!=R&&0<R.length&&(O=R[0].getAttribute("href"));for(var Q=1;Q<L.length;Q++)if(R=L[Q].indexOf(")"),0<R){var S=Editor.trimCssUrl(L[Q].substring(0,R));this.graph.isRelativeUrl(S)&&(S=null!=O?O+S:window.location.protocol+"//"+window.location.hostname+("/"==S.charAt(0)?"":q)+S);D.push('url("'+S+'"'+L[Q].substring(R))}else D.push(L[Q])}else D=[q]}return null!=D?D.join(""):null};Editor.prototype.mapFontUrl=function(q,D,L){/^https?:\/\//.test(D)&&!this.isCorsEnabledForUrl(D)&&(D=PROXY_URL+"?url="+ -encodeURIComponent(D));L(q,D)};Editor.prototype.embedCssFonts=function(q,D){var L=q.split("url("),R=0;null==this.cachedFonts&&(this.cachedFonts={});var O=mxUtils.bind(this,function(){if(0==R){for(var aa=[L[0]],Y=1;Y<L.length;Y++){var Z=L[Y].indexOf(")");aa.push('url("');aa.push(this.cachedFonts[Editor.trimCssUrl(L[Y].substring(0,Z))]);aa.push('"'+L[Y].substring(Z))}D(aa.join(""))}});if(0<L.length){for(q=1;q<L.length;q++){var Q=L[q].indexOf(")"),S=null,X=L[q].indexOf("format(",Q);0<X&&(S=Editor.trimCssUrl(L[q].substring(X+ -7,L[q].indexOf(")",X))));mxUtils.bind(this,function(aa){if(null==this.cachedFonts[aa]){this.cachedFonts[aa]=aa;R++;var Y="application/x-font-ttf";if("svg"==S||/(\.svg)($|\?)/i.test(aa))Y="image/svg+xml";else if("otf"==S||"embedded-opentype"==S||/(\.otf)($|\?)/i.test(aa))Y="application/x-font-opentype";else if("woff"==S||/(\.woff)($|\?)/i.test(aa))Y="application/font-woff";else if("woff2"==S||/(\.woff2)($|\?)/i.test(aa))Y="application/font-woff2";else if("eot"==S||/(\.eot)($|\?)/i.test(aa))Y="application/vnd.ms-fontobject"; -else if("sfnt"==S||/(\.sfnt)($|\?)/i.test(aa))Y="application/font-sfnt";this.mapFontUrl(Y,aa,mxUtils.bind(this,function(Z,ba){this.loadUrl(ba,mxUtils.bind(this,function(fa){this.cachedFonts[aa]=fa;R--;O()}),mxUtils.bind(this,function(fa){R--;O()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(L[q].substring(0,Q)),S)}O()}else D(q)};Editor.prototype.loadFonts=function(q){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(D){this.resolvedFontCss= -D;null!=q&&q()})):null!=q&&q()};Editor.prototype.createGoogleFontCache=function(){var q={},D;for(D in Graph.fontMapping)Graph.isCssFontUrl(D)&&(q[D]=Graph.fontMapping[D]);return q};Editor.prototype.embedExtFonts=function(q){var D=this.graph.getCustomFonts();if(0<D.length){var L=[],R=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var O=mxUtils.bind(this,function(){0==R&&this.embedCssFonts(L.join(""),q)}),Q=0;Q<D.length;Q++)mxUtils.bind(this,function(S,X){Graph.isCssFontUrl(X)? -null==this.cachedGoogleFonts[X]?(R++,this.loadUrl(X,mxUtils.bind(this,function(aa){this.cachedGoogleFonts[X]=aa;L.push(aa+"\n");R--;O()}),mxUtils.bind(this,function(aa){R--;L.push("@import url("+X+");\n");O()}))):L.push(this.cachedGoogleFonts[X]+"\n"):L.push('@font-face {font-family: "'+S+'";src: url("'+X+'")}\n')})(D[Q].name,D[Q].url);O()}else q()};Editor.prototype.addMathCss=function(q){q=q.getElementsByTagName("defs");if(null!=q&&0<q.length)for(var D=document.getElementsByTagName("style"),L=0;L< -D.length;L++){var R=mxUtils.getTextContent(D[L]);0>R.indexOf("mxPageSelector")&&0<R.indexOf("MathJax")&&q[0].appendChild(D[L].cloneNode(!0))}};Editor.prototype.addFontCss=function(q,D){D=null!=D?D:this.absoluteCssFonts(this.fontCss);if(null!=D){var L=q.getElementsByTagName("defs"),R=q.ownerDocument;0==L.length?(L=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"defs"):R.createElement("defs"),null!=q.firstChild?q.insertBefore(L,q.firstChild):q.appendChild(L)):L=L[0];q=null!=R.createElementNS? -R.createElementNS(mxConstants.NS_SVG,"style"):R.createElement("style");q.setAttribute("type","text/css");mxUtils.setTextContent(q,D);L.appendChild(q)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(q,D,L){var R=mxClient.IS_FF?8192:16384;return Math.min(L,Math.min(R/q,R/D))};Editor.prototype.exportToCanvas=function(q,D,L,R,O,Q,S,X,aa,Y,Z,ba,fa,ka,ha,ra,la,Fa){try{Q=null!=Q?Q:!0;S=null!=S?S:!0;ba=null!= -ba?ba:this.graph;fa=null!=fa?fa:0;var Ga=aa?null:ba.background;Ga==mxConstants.NONE&&(Ga=null);null==Ga&&(Ga=R);null==Ga&&0==aa&&(Ga=ra?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(ba.getSvg(null,null,fa,ka,null,S,null,null,null,Y,null,ra,la,Fa),mxUtils.bind(this,function(Aa){try{var Ma=new Image;Ma.onload=mxUtils.bind(this,function(){try{var Da=function(){mxClient.IS_SF?window.setTimeout(function(){wa.drawImage(Ma,0,0);q(Ca,Aa)},0):(wa.drawImage(Ma,0,0),q(Ca,Aa))},Ca=document.createElement("canvas"), -pa=parseInt(Aa.getAttribute("width")),qa=parseInt(Aa.getAttribute("height"));X=null!=X?X:1;null!=D&&(X=Q?Math.min(1,Math.min(3*D/(4*qa),D/pa)):D/pa);X=this.getMaxCanvasScale(pa,qa,X);pa=Math.ceil(X*pa);qa=Math.ceil(X*qa);Ca.setAttribute("width",pa);Ca.setAttribute("height",qa);var wa=Ca.getContext("2d");null!=Ga&&(wa.beginPath(),wa.rect(0,0,pa,qa),wa.fillStyle=Ga,wa.fill());1!=X&&wa.scale(X,X);if(ha){var Ha=ba.view,ya=Ha.scale;Ha.scale=1;var Ia=btoa(unescape(encodeURIComponent(Ha.createSvgGrid(Ha.gridColor)))); -Ha.scale=ya;Ia="data:image/svg+xml;base64,"+Ia;var ja=ba.gridSize*Ha.gridSteps*X,va=ba.getGraphBounds(),ta=Ha.translate.x*ya,da=Ha.translate.y*ya,ca=ta+(va.x-ta)/ya-fa,na=da+(va.y-da)/ya-fa,ea=new Image;ea.onload=function(){try{for(var ia=-Math.round(ja-mxUtils.mod((ta-ca)*X,ja)),oa=-Math.round(ja-mxUtils.mod((da-na)*X,ja));ia<pa;ia+=ja)for(var ma=oa;ma<qa;ma+=ja)wa.drawImage(ea,ia/X,ma/X);Da()}catch(xa){null!=O&&O(xa)}};ea.onerror=function(ia){null!=O&&O(ia)};ea.src=Ia}else Da()}catch(ia){null!= -O&&O(ia)}});Ma.onerror=function(Da){null!=O&&O(Da)};Y&&this.graph.addSvgShadow(Aa);this.graph.mathEnabled&&this.addMathCss(Aa);var za=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Aa,this.resolvedFontCss),Ma.src=Editor.createSvgDataUri(mxUtils.getXml(Aa))}catch(Da){null!=O&&O(Da)}});this.embedExtFonts(mxUtils.bind(this,function(Da){try{null!=Da&&this.addFontCss(Aa,Da),this.loadFonts(za)}catch(Ca){null!=O&&O(Ca)}}))}catch(Da){null!=O&&O(Da)}}),L,Z)}catch(Aa){null!=O&& -O(Aa)}};Editor.crcTable=[];for(var l=0;256>l;l++)for(var m=l,x=0;8>x;x++)m=1==(m&1)?3988292384^m>>>1:m>>>1,Editor.crcTable[l]=m;Editor.updateCRC=function(q,D,L,R){for(var O=0;O<R;O++)q=Editor.crcTable[(q^D.charCodeAt(L+O))&255]^q>>>8;return q};Editor.crc32=function(q){for(var D=-1,L=0;L<q.length;L++)D=D>>>8^Editor.crcTable[(D^q.charCodeAt(L))&255];return(D^-1)>>>0};Editor.writeGraphModelToPng=function(q,D,L,R,O){function Q(Z,ba){var fa=aa;aa+=ba;return Z.substring(fa,aa)}function S(Z){Z=Q(Z,4);return Z.charCodeAt(3)+ -(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function X(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}q=q.substring(q.indexOf(",")+1);q=window.atob?atob(q):Base64.decode(q,!0);var aa=0;if(Q(q,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=O&&O();else if(Q(q,4),"IHDR"!=Q(q,4))null!=O&&O();else{Q(q,17);O=q.substring(0,aa);do{var Y=S(q);if("IDAT"==Q(q,4)){O=q.substring(0,aa-8);"pHYs"==D&&"dpi"==L?(L=Math.round(R/.0254),L=X(L)+X(L)+String.fromCharCode(1)): -L=L+String.fromCharCode(0)+("zTXt"==D?String.fromCharCode(0):"")+R;R=4294967295;R=Editor.updateCRC(R,D,0,4);R=Editor.updateCRC(R,L,0,L.length);O+=X(L.length)+D+L+X(R^4294967295);O+=q.substring(aa-8,q.length);break}O+=q.substring(aa-8,aa-4+Y);Q(q,Y);Q(q,4)}while(Y);return"data:image/png;base64,"+(window.btoa?btoa(O):Base64.encode(O,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var z=ColorDialog.addRecentColor;ColorDialog.addRecentColor= -function(q,D){z.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var C=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){C.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(q,D){var L=null;null!=q.editor.graph.getModel().getParent(D)?L=D.getId():null!=q.currentPage&&(L=q.currentPage.getId());return L});if(null!=window.StyleFormatPanel){var d= -Format.prototype.init;Format.prototype.init=function(){d.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var g=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?g.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var q=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=q&&q.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible= -function(q){return!1};var k=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(q){q=k.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var D=this.editorUi,L=D.editor.graph,R=this.createOption(mxResources.get("shadow"),function(){return L.shadowVisible},function(O){var Q=new ChangePageSetup(D);Q.ignoreColor=!0;Q.ignoreImage=!0;Q.shadowVisible=O;L.model.execute(Q)},{install:function(O){this.listener=function(){O(L.shadowVisible)}; -D.addListener("shadowVisibleChanged",this.listener)},destroy:function(){D.removeListener(this.listener)}});Editor.enableShadowOption||(R.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(R,60));q.appendChild(R)}return q};var n=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(q){q=n.apply(this,arguments);var D=this.editorUi,L=D.editor.graph;if(L.isEnabled()){var R=D.getCurrentFile();if(null!=R&&R.isAutosaveOptional()){var O= -this.createOption(mxResources.get("autosave"),function(){return D.editor.autosave},function(S){D.editor.setAutosave(S);D.editor.autosave&&R.isModified()&&R.fileChanged()},{install:function(S){this.listener=function(){S(D.editor.autosave)};D.editor.addListener("autosaveChanged",this.listener)},destroy:function(){D.editor.removeListener(this.listener)}});q.appendChild(O)}}if(this.isMathOptionVisible()&&L.isEnabled()&&"undefined"!==typeof MathJax){O=this.createOption(mxResources.get("mathematicalTypesetting"), -function(){return L.mathEnabled},function(S){D.actions.get("mathematicalTypesetting").funct()},{install:function(S){this.listener=function(){S(L.mathEnabled)};D.addListener("mathEnabledChanged",this.listener)},destroy:function(){D.removeListener(this.listener)}});O.style.paddingTop="5px";q.appendChild(O);var Q=D.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");Q.style.position="relative";Q.style.marginLeft="6px";Q.style.top="2px";O.appendChild(Q)}return q};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties= +"dashOffset",S);X.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",S);S=mxUtils.getValue(this.shape.style,"fillWeight",-1);X.fillWeight="auto"==S?-1:S;S=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==S&&(S=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),S=null!=X.fill&&(null!=P||null!=S&&X.fill==S)?"solid":aa.fillStyle);X.fillStyle=S;return X};t.prototype.begin=function(){this.passThrough? +this.originalBegin.apply(this.canvas,arguments):this.path=[]};t.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};t.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var P=2;P<arguments.length;P+=2)this.lastX=arguments[P-1],this.lastY=arguments[P],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};t.prototype.lineTo=function(P,S){this.passThrough?this.originalLineTo.apply(this.canvas, +arguments):(this.addOp(this.lineOp,P,S),this.lastX=P,this.lastY=S)};t.prototype.moveTo=function(P,S){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,P,S),this.lastX=P,this.lastY=S,this.firstX=P,this.firstY=S)};t.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};t.prototype.quadTo=function(P,S,X,aa){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,P, +S,X,aa),this.lastX=X,this.lastY=aa)};t.prototype.curveTo=function(P,S,X,aa,Y,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,P,S,X,aa,Y,Z),this.lastX=Y,this.lastY=Z)};t.prototype.arcTo=function(P,S,X,aa,Y,Z,ba){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var ea=mxUtils.arcToCurves(this.lastX,this.lastY,P,S,X,aa,Y,Z,ba);if(null!=ea)for(var ma=0;ma<ea.length;ma+=6)this.curveTo(ea[ma],ea[ma+1],ea[ma+2],ea[ma+3],ea[ma+4],ea[ma+ +5]);this.lastX=Z;this.lastY=ba}};t.prototype.rect=function(P,S,X,aa){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(P,S,X,aa,this.getStyle(!0,!0)))};t.prototype.ellipse=function(P,S,X,aa){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(P+X/2,S+aa/2,X,aa,this.getStyle(!0,!0)))};t.prototype.roundrect=function(P,S,X,aa,Y,Z){this.passThrough?this.originalRoundrect.apply(this.canvas, +arguments):(this.begin(),this.moveTo(P+Y,S),this.lineTo(P+X-Y,S),this.quadTo(P+X,S,P+X,S+Z),this.lineTo(P+X,S+aa-Z),this.quadTo(P+X,S+aa,P+X-Y,S+aa),this.lineTo(P+Y,S+aa),this.quadTo(P,S+aa,P,S+aa-Z),this.lineTo(P,S+Z),this.quadTo(P,S,P+Y,S))};t.prototype.drawPath=function(P){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),P)}catch(X){}this.passThrough=!1}else if(null!=this.nextShape){for(var S in P)this.nextShape.options[S]=P[S];P.stroke!=mxConstants.NONE&&null!=P.stroke|| +delete this.nextShape.options.stroke;P.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};t.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};t.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};t.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas, +arguments):this.drawPath(this.getStyle(!0,!0))};t.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin; +this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(P){return new t(P,Editor.createRoughCanvas(P),this)};var C=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(P){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?C.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle", +"rough")?this.createComicCanvas(P):this.createRoughCanvas(P)};var N=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(P,S,X,aa,Y){null!=P.handJiggle&&P.handJiggle.passThrough||N.apply(this,arguments)};var R=mxShape.prototype.paint;mxShape.prototype.paint=function(P){var S=P.addTolerance,X=!0;null!=this.style&&(X="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=P.handJiggle&&P.handJiggle.constructor==t&&!this.outline){P.save(); +var aa=this.fill,Y=this.stroke;this.stroke=this.fill=null;var Z=this.configurePointerEvents,ba=P.setStrokeColor;P.setStrokeColor=function(){};var ea=P.setFillColor;P.setFillColor=function(){};X||null==aa||(this.configurePointerEvents=function(){});P.handJiggle.passThrough=!0;R.apply(this,arguments);P.handJiggle.passThrough=!1;P.setFillColor=ea;P.setStrokeColor=ba;this.configurePointerEvents=Z;this.stroke=Y;this.fill=aa;P.restore();X&&null!=aa&&(P.addTolerance=function(){})}R.apply(this,arguments); +P.addTolerance=S};var O=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(P,S,X,aa,Y,Z){null!=P.handJiggle&&P.handJiggle.constructor==t?(P.handJiggle.passThrough=!0,O.apply(this,arguments),P.handJiggle.passThrough=!1):O.apply(this,arguments)}})();Editor.fastCompress=function(t){return null==t||0==t.length||"undefined"===typeof pako?t:Graph.arrayBufferToString(pako.deflateRaw(t))};Editor.fastDecompress=function(t){return null==t||0==t.length||"undefined"===typeof pako? +t:pako.inflateRaw(Graph.stringToArrayBuffer(atob(t)),{to:"string"})};Editor.extractGraphModel=function(t,C,N){if(null!=t&&"undefined"!==typeof pako){var R=t.ownerDocument.getElementsByTagName("div"),O=[];if(null!=R&&0<R.length)for(var P=0;P<R.length;P++)if("mxgraph"==R[P].getAttribute("class")){O.push(R[P]);break}0<O.length&&(R=O[0].getAttribute("data-mxgraph"),null!=R?(O=JSON.parse(R),null!=O&&null!=O.xml&&(t=mxUtils.parseXml(O.xml),t=t.documentElement)):(O=O[0].getElementsByTagName("div"),0<O.length&& +(R=mxUtils.getTextContent(O[0]),R=Graph.decompress(R,null,N),0<R.length&&(t=mxUtils.parseXml(R),t=t.documentElement))))}if(null!=t&&"svg"==t.nodeName)if(R=t.getAttribute("content"),null!=R&&"<"!=R.charAt(0)&&"%"!=R.charAt(0)&&(R=unescape(window.atob?atob(R):Base64.decode(cont,R))),null!=R&&"%"==R.charAt(0)&&(R=decodeURIComponent(R)),null!=R&&0<R.length)t=mxUtils.parseXml(R).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==t||C||(O=null,"diagram"==t.nodeName?O=t:"mxfile"== +t.nodeName&&(R=t.getElementsByTagName("diagram"),0<R.length&&(O=R[Math.max(0,Math.min(R.length-1,urlParams.page||0))])),null!=O&&(t=Editor.parseDiagramNode(O,N)));null==t||"mxGraphModel"==t.nodeName||C&&"mxfile"==t.nodeName||(t=null);return t};Editor.parseDiagramNode=function(t,C){var N=mxUtils.trim(mxUtils.getTextContent(t)),R=null;0<N.length?(t=Graph.decompress(N,null,C),null!=t&&0<t.length&&(R=mxUtils.parseXml(t).documentElement)):(t=mxUtils.getChildNodes(t),0<t.length&&(R=mxUtils.createXmlDocument(), +R.appendChild(R.importNode(t[0],!0)),R=R.documentElement));return R};Editor.getDiagramNodeXml=function(t){var C=mxUtils.getTextContent(t),N=null;0<C.length?N=Graph.decompress(C):null!=t.firstChild&&(N=mxUtils.getXml(t.firstChild));return N};Editor.extractGraphModelFromPdf=function(t){t=t.substring(t.indexOf(",")+1);t=window.atob&&!mxClient.IS_SF?atob(t):Base64.decode(t,!0);if("%PDF-1.7"==t.substring(0,8)){var C=t.indexOf("EmbeddedFile");if(-1<C){var N=t.indexOf("stream",C)+9;if(0<t.substring(C,N).indexOf("application#2Fvnd.jgraph.mxfile"))return C= +t.indexOf("endstream",N-1),pako.inflateRaw(Graph.stringToArrayBuffer(t.substring(N,C)),{to:"string"})}return null}N=null;C="";for(var R=0,O=0,P=[],S=null;O<t.length;){var X=t.charCodeAt(O);O+=1;10!=X&&(C+=String.fromCharCode(X));X=="/Subject (%3Cmxfile".charCodeAt(R)?R++:R=0;if(19==R){var aa=t.indexOf("%3C%2Fmxfile%3E)",O)+15;O-=9;if(aa>O){N=t.substring(O,aa);break}}10==X&&("endobj"==C?S=null:"obj"==C.substring(C.length-3,C.length)||"xref"==C||"trailer"==C?(S=[],P[C.split(" ")[0]]=S):null!=S&&S.push(C), +C="")}null==N&&(N=Editor.extractGraphModelFromXref(P));null!=N&&(N=decodeURIComponent(N.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return N};Editor.extractGraphModelFromXref=function(t){var C=t.trailer,N=null;null!=C&&(C=/.* \/Info (\d+) (\d+) R/g.exec(C.join("\n")),null!=C&&0<C.length&&(C=t[C[1]],null!=C&&(C=/.* \/Subject (\d+) (\d+) R/g.exec(C.join("\n")),null!=C&&0<C.length&&(t=t[C[1]],null!=t&&(t=t.join("\n"),N=t.substring(1,t.length-1))))));return N};Editor.extractParserError=function(t,C){var N= +null;t=null!=t?t.getElementsByTagName("parsererror"):null;null!=t&&0<t.length&&(N=C||mxResources.get("invalidChars"),C=t[0].getElementsByTagName("div"),0<C.length&&(N=mxUtils.getTextContent(C[0])));return null!=N?mxUtils.trim(N):N};Editor.addRetryToError=function(t,C){null!=t&&(t=null!=t.error?t.error:t,null==t.retry&&(t.retry=C))};Editor.configure=function(t){if(null!=t){Editor.config=t;Editor.configVersion=t.version;Menus.prototype.defaultFonts=t.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors= +t.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=t.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=t.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=t.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=t.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=t.autosaveDelay||DrawioFile.prototype.autosaveDelay; +t.debug&&(urlParams.test="1");null!=t.templateFile&&(EditorUi.templateFile=t.templateFile);null!=t.styles&&(Array.isArray(t.styles)?Editor.styles=t.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=t.globalVars&&(Editor.globalVars=t.globalVars);null!=t.compressXml&&(Editor.compressXml=t.compressXml);null!=t.includeDiagram&&(Editor.defaultIncludeDiagram=t.includeDiagram);null!=t.simpleLabels&&(Editor.simpleLabels=t.simpleLabels);null!=t.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker= +t.oneDriveInlinePicker);null!=t.darkColor&&(Editor.darkColor=t.darkColor);null!=t.lightColor&&(Editor.lightColor=t.lightColor);null!=t.settingsName&&(Editor.configurationKey="."+t.settingsName+"-configuration",Editor.settingsKey="."+t.settingsName+"-config",mxSettings.key=Editor.settingsKey);t.customFonts&&(Menus.prototype.defaultFonts=t.customFonts.concat(Menus.prototype.defaultFonts));t.customPresetColors&&(ColorDialog.prototype.presetColors=t.customPresetColors.concat(ColorDialog.prototype.presetColors)); +null!=t.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=t.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=t.css){var C=document.createElement("style");C.setAttribute("type","text/css");C.appendChild(document.createTextNode(t.css));var N=document.getElementsByTagName("script")[0];N.parentNode.insertBefore(C,N)}null!=t.libraries&&(Sidebar.prototype.customEntries=t.libraries);null!=t.enabledLibraries&&(Array.isArray(t.enabledLibraries)?Sidebar.prototype.enabledLibraries= +t.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=t.defaultLibraries&&(Sidebar.prototype.defaultEntries=t.defaultLibraries);null!=t.defaultCustomLibraries&&(Editor.defaultCustomLibraries=t.defaultCustomLibraries);null!=t.enableCustomLibraries&&(Editor.enableCustomLibraries=t.enableCustomLibraries);null!=t.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=t.defaultVertexStyle);null!=t.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=t.defaultEdgeStyle); +null!=t.defaultPageVisible&&(Graph.prototype.defaultPageVisible=t.defaultPageVisible);null!=t.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=t.defaultGridEnabled);null!=t.zoomWheel&&(Graph.zoomWheel=t.zoomWheel);null!=t.zoomFactor&&(C=parseFloat(t.zoomFactor),!isNaN(C)&&1<C?Graph.prototype.zoomFactor=C:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=t.gridSteps&&(C=parseInt(t.gridSteps),!isNaN(C)&&0<C?mxGraphView.prototype.gridSteps=C:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps")); +null!=t.pageFormat&&(C=parseInt(t.pageFormat.width),N=parseInt(t.pageFormat.height),!isNaN(C)&&0<C&&!isNaN(N)&&0<N?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,C,N),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));t.thumbWidth&&(Sidebar.prototype.thumbWidth=t.thumbWidth);t.thumbHeight&&(Sidebar.prototype.thumbHeight=t.thumbHeight);t.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml= +t.emptyLibraryXml);t.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=t.emptyDiagramXml);t.sidebarWidth&&(EditorUi.prototype.hsplitPosition=t.sidebarWidth);t.sidebarTitles&&(Sidebar.prototype.sidebarTitles=t.sidebarTitles);t.sidebarTitleSize&&(C=parseInt(t.sidebarTitleSize),!isNaN(C)&&0<C?Sidebar.prototype.sidebarTitleSize=C:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));t.fontCss&&("string"===typeof t.fontCss?Editor.configureFontCss(t.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss")); +null!=t.autosaveDelay&&(C=parseInt(t.autosaveDelay),!isNaN(C)&&0<C?DrawioFile.prototype.autosaveDelay=C:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=t.maxImageBytes&&(EditorUi.prototype.maxImageBytes=t.maxImageBytes);null!=t.maxImageSize&&(EditorUi.prototype.maxImageSize=t.maxImageSize);null!=t.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=t.shareCursorPosition);null!=t.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=t.showRemoteCursors)}}; +Editor.configureFontCss=function(t){if(null!=t){Editor.prototype.fontCss=t;var C=document.getElementsByTagName("script")[0];if(null!=C&&null!=C.parentNode){var N=document.createElement("style");N.setAttribute("type","text/css");N.appendChild(document.createTextNode(t));C.parentNode.insertBefore(N,C);t=t.split("url(");for(N=1;N<t.length;N++){var R=t[N].indexOf(")");R=Editor.trimCssUrl(t[N].substring(0,R));var O=document.createElement("link");O.setAttribute("rel","preload");O.setAttribute("href",R); +O.setAttribute("as","font");O.setAttribute("crossorigin","");C.parentNode.insertBefore(O,C)}}}};Editor.trimCssUrl=function(t){return t.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(t){t=null!=t?t:Editor.GUID_LENGTH;for(var C=[],N=0;N<t;N++)C.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()* +Editor.GUID_ALPHABET.length)));return C.join("")};Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(t){t=null!=t&&"mxlibrary"!=t.nodeName?this.extractGraphModel(t):null;if(null!=t){var C=Editor.extractParserError(t,mxResources.get("invalidOrMissingFile"));if(C)throw EditorUi.debug("Editor.setGraphXml ParserError", +[this],"node",[t],"cause",[C]),Error(mxResources.get("notADiagramFile")+" ("+C+")");if("mxGraphModel"==t.nodeName){C=t.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=C&&""!=C)C!=this.graph.currentStyle&&(N=null!=this.graph.themes?this.graph.themes[C]:mxUtils.load(STYLE_PATH+"/"+C+".xml").getDocumentElement(),null!=N&&(R=new mxCodec(N.ownerDocument),R.decode(N,this.graph.getStylesheet())));else{var N=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+ +"/default-old.xml").getDocumentElement();if(null!=N){var R=new mxCodec(N.ownerDocument);R.decode(N,this.graph.getStylesheet())}}this.graph.currentStyle=C;this.graph.mathEnabled="1"==urlParams.math||"1"==t.getAttribute("math");C=t.getAttribute("backgroundImage");null!=C?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(C)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform(); +this.graph.setShadowVisible("1"==t.getAttribute("shadow"),!1);if(C=t.getAttribute("extFonts"))try{for(C=C.split("|").map(function(O){O=O.split("^");return{name:O[0],url:O[1]}}),N=0;N<C.length;N++)this.graph.addExtFont(C[N].name,C[N].url)}catch(O){console.log("ExtFonts format error: "+O.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}}; +};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(t,C){t=null!=t?t:!0;var N=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&N.setAttribute("style",this.graph.currentStyle);var R=this.graph.getBackgroundImageObject(this.graph.backgroundImage,C);null!=R&&N.setAttribute("backgroundImage",JSON.stringify(R));N.setAttribute("math",this.graph.mathEnabled?"1":"0");N.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&& +0<this.graph.extFonts.length&&(R=this.graph.extFonts.map(function(O){return O.name+"^"+O.url}),N.setAttribute("extFonts",R.join("|")));return N};Editor.prototype.isDataSvg=function(t){try{var C=mxUtils.parseXml(t).documentElement.getAttribute("content");if(null!=C&&(null!=C&&"<"!=C.charAt(0)&&"%"!=C.charAt(0)&&(C=unescape(window.atob?atob(C):Base64.decode(cont,C))),null!=C&&"%"==C.charAt(0)&&(C=decodeURIComponent(C)),null!=C&&0<C.length)){var N=mxUtils.parseXml(C).documentElement;return"mxfile"== +N.nodeName||"mxGraphModel"==N.nodeName}}catch(R){}return!1};Editor.prototype.extractGraphModel=function(t,C,N){return Editor.extractGraphModel.apply(this,arguments)};var f=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();f.apply(this,arguments)};var c= +Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){c.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(t,C){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){t=null!=t?t:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(O){try{MathJax.typesetClear([O]),MathJax.typeset([O]), +Editor.onMathJaxDone()}catch(P){MathJax.typesetClear([O]),null!=P.retry?P.retry.then(function(){MathJax.typesetPromise([O]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+P.toString())}};window.MathJax=null!=C?C:{options:{skipHtmlTags:{"[+]":["text"]}},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath"]},startup:{pageReady:function(){for(var O=0;O<Editor.mathJaxQueue.length;O++)Editor.doMathJaxRender(Editor.mathJaxQueue[O])}}}; +Editor.MathJaxRender=function(O){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(O):Editor.mathJaxQueue.push(O)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var N=Editor.prototype.init;Editor.prototype.init=function(){N.apply(this,arguments);var O=mxUtils.bind(this,function(P,S){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE, +O);this.graph.addListener(mxEvent.REFRESH,O)};C=document.getElementsByTagName("script");if(null!=C&&0<C.length){var R=document.createElement("script");R.setAttribute("type","text/javascript");R.setAttribute("src",t);C[0].parentNode.appendChild(R)}}};Editor.prototype.csvToArray=function(t){if(0<t.length){var C="",N=[""],R=0,O=!0,P;t=$jscomp.makeIterator(t);for(P=t.next();!P.done;P=t.next())P=P.value,'"'===P?(O&&P===C&&(N[R]+=P),O=!O):","===P&&O?P=N[++R]="":N[R]+=P,C=P;return N}return[]};Editor.prototype.getProxiedUrl= +function(t){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(t)){var C=/(\.v(dx|sdx?))($|\?)/i.test(t)||/(\.vs(x|sx?))($|\?)/i.test(t);C=/\.png$/i.test(t)||/\.pdf$/i.test(t)||C;var N="t="+(new Date).getTime();t=PROXY_URL+"?url="+encodeURIComponent(t)+"&"+N+(C?"&base64=1":"")}return t};Editor.prototype.isCorsEnabledForUrl=function(t){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||t.substring(0,window.location.origin.length)== +window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(t)||"https://raw.githubusercontent.com/"===t.substring(0,34)||"https://fonts.googleapis.com/"===t.substring(0,29)||"https://fonts.gstatic.com/"===t.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var t=new mxUrlConverter;t.updateBaseUrl();var C=t.convert,N=this;t.convert=function(R){if(null!= +R){var O="http://"==R.substring(0,7)||"https://"==R.substring(0,8);O&&!navigator.onLine?R=Editor.svgBrokenImage.src:!O||R.substring(0,t.baseUrl.length)==t.baseUrl||N.crossOriginImages&&N.isCorsEnabledForUrl(R)?"chrome-extension://"==R.substring(0,19)||mxClient.IS_CHROMEAPP||(R=C.apply(this,arguments)):R=PROXY_URL+"?url="+encodeURIComponent(R)}return R};return t};Editor.createSvgDataUri=function(t){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(t)))};Editor.prototype.convertImageToDataUri= +function(t,C){try{var N=!0,R=window.setTimeout(mxUtils.bind(this,function(){N=!1;C(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(t))mxUtils.get(t,mxUtils.bind(this,function(P){window.clearTimeout(R);N&&C(Editor.createSvgDataUri(P.getText()))}),function(){window.clearTimeout(R);N&&C(Editor.svgBrokenImage.src)});else{var O=new Image;this.crossOriginImages&&(O.crossOrigin="anonymous");O.onload=function(){window.clearTimeout(R);if(N)try{var P=document.createElement("canvas"),S=P.getContext("2d"); +P.height=O.height;P.width=O.width;S.drawImage(O,0,0);C(P.toDataURL())}catch(X){C(Editor.svgBrokenImage.src)}};O.onerror=function(){window.clearTimeout(R);N&&C(Editor.svgBrokenImage.src)};O.src=t}}catch(P){C(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(t,C,N,R){null==R&&(R=this.createImageUrlConverter());var O=0,P=N||{};N=mxUtils.bind(this,function(S,X){S=t.getElementsByTagName(S);for(var aa=0;aa<S.length;aa++)mxUtils.bind(this,function(Y){try{if(null!=Y){var Z=R.convert(Y.getAttribute(X)); +if(null!=Z&&"data:"!=Z.substring(0,5)){var ba=P[Z];null==ba?(O++,this.convertImageToDataUri(Z,function(ea){null!=ea&&(P[Z]=ea,Y.setAttribute(X,ea));O--;0==O&&C(t)})):Y.setAttribute(X,ba)}else null!=Z&&Y.setAttribute(X,Z)}}catch(ea){}})(S[aa])});N("image","xlink:href");N("img","src");0==O&&C(t)};Editor.base64Encode=function(t){for(var C="",N=0,R=t.length,O,P,S;N<R;){O=t.charCodeAt(N++)&255;if(N==R){C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O& +3)<<4);C+="==";break}P=t.charCodeAt(N++);if(N==R){C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4|(P&240)>>4);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&15)<<2);C+="=";break}S=t.charCodeAt(N++);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O& +3)<<4|(P&240)>>4);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&15)<<2|(S&192)>>6);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return C};Editor.prototype.loadUrl=function(t,C,N,R,O,P,S,X){try{var aa=!S&&(R||/(\.png)($|\?)/i.test(t)||/(\.jpe?g)($|\?)/i.test(t)||/(\.gif)($|\?)/i.test(t)||/(\.pdf)($|\?)/i.test(t));O=null!=O?O:!0;var Y=mxUtils.bind(this,function(){mxUtils.get(t,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&& +299>=Z.getStatus()){if(null!=C){var ba=Z.getText();if(aa){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();ba=Array(Z.length);for(var ea=0;ea<Z.length;ea++)ba[ea]=String.fromCharCode(Z[ea]);ba=ba.join("")}P=null!=P?P:"data:image/png;base64,";ba=P+Editor.base64Encode(ba)}C(ba)}}else null!=N&&(0==Z.getStatus()?N({message:mxResources.get("accessDenied")},Z):404==Z.getStatus()?N({code:Z.getStatus()}, +Z):N({message:mxResources.get("error")+" "+Z.getStatus()},Z))}),function(Z){null!=N&&N({message:mxResources.get("error")+" "+Z.getStatus()})},aa,this.timeout,function(){O&&null!=N&&N({code:App.ERROR_TIMEOUT,retry:Y})},X)});Y()}catch(Z){null!=N&&N(Z)}};Editor.prototype.absoluteCssFonts=function(t){var C=null;if(null!=t){var N=t.split("url(");if(0<N.length){C=[N[0]];t=window.location.pathname;var R=null!=t?t.lastIndexOf("/"):-1;0<=R&&(t=t.substring(0,R+1));R=document.getElementsByTagName("base");var O= +null;null!=R&&0<R.length&&(O=R[0].getAttribute("href"));for(var P=1;P<N.length;P++)if(R=N[P].indexOf(")"),0<R){var S=Editor.trimCssUrl(N[P].substring(0,R));this.graph.isRelativeUrl(S)&&(S=null!=O?O+S:window.location.protocol+"//"+window.location.hostname+("/"==S.charAt(0)?"":t)+S);C.push('url("'+S+'"'+N[P].substring(R))}else C.push(N[P])}else C=[t]}return null!=C?C.join(""):null};Editor.prototype.mapFontUrl=function(t,C,N){/^https?:\/\//.test(C)&&!this.isCorsEnabledForUrl(C)&&(C=PROXY_URL+"?url="+ +encodeURIComponent(C));N(t,C)};Editor.prototype.embedCssFonts=function(t,C){var N=t.split("url("),R=0;null==this.cachedFonts&&(this.cachedFonts={});var O=mxUtils.bind(this,function(){if(0==R){for(var aa=[N[0]],Y=1;Y<N.length;Y++){var Z=N[Y].indexOf(")");aa.push('url("');aa.push(this.cachedFonts[Editor.trimCssUrl(N[Y].substring(0,Z))]);aa.push('"'+N[Y].substring(Z))}C(aa.join(""))}});if(0<N.length){for(t=1;t<N.length;t++){var P=N[t].indexOf(")"),S=null,X=N[t].indexOf("format(",P);0<X&&(S=Editor.trimCssUrl(N[t].substring(X+ +7,N[t].indexOf(")",X))));mxUtils.bind(this,function(aa){if(null==this.cachedFonts[aa]){this.cachedFonts[aa]=aa;R++;var Y="application/x-font-ttf";if("svg"==S||/(\.svg)($|\?)/i.test(aa))Y="image/svg+xml";else if("otf"==S||"embedded-opentype"==S||/(\.otf)($|\?)/i.test(aa))Y="application/x-font-opentype";else if("woff"==S||/(\.woff)($|\?)/i.test(aa))Y="application/font-woff";else if("woff2"==S||/(\.woff2)($|\?)/i.test(aa))Y="application/font-woff2";else if("eot"==S||/(\.eot)($|\?)/i.test(aa))Y="application/vnd.ms-fontobject"; +else if("sfnt"==S||/(\.sfnt)($|\?)/i.test(aa))Y="application/font-sfnt";this.mapFontUrl(Y,aa,mxUtils.bind(this,function(Z,ba){this.loadUrl(ba,mxUtils.bind(this,function(ea){this.cachedFonts[aa]=ea;R--;O()}),mxUtils.bind(this,function(ea){R--;O()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(N[t].substring(0,P)),S)}O()}else C(t)};Editor.prototype.loadFonts=function(t){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(C){this.resolvedFontCss= +C;null!=t&&t()})):null!=t&&t()};Editor.prototype.createGoogleFontCache=function(){var t={},C;for(C in Graph.fontMapping)Graph.isCssFontUrl(C)&&(t[C]=Graph.fontMapping[C]);return t};Editor.prototype.embedExtFonts=function(t){var C=this.graph.getCustomFonts();if(0<C.length){var N=[],R=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var O=mxUtils.bind(this,function(){0==R&&this.embedCssFonts(N.join(""),t)}),P=0;P<C.length;P++)mxUtils.bind(this,function(S,X){Graph.isCssFontUrl(X)? +null==this.cachedGoogleFonts[X]?(R++,this.loadUrl(X,mxUtils.bind(this,function(aa){this.cachedGoogleFonts[X]=aa;N.push(aa+"\n");R--;O()}),mxUtils.bind(this,function(aa){R--;N.push("@import url("+X+");\n");O()}))):N.push(this.cachedGoogleFonts[X]+"\n"):N.push('@font-face {font-family: "'+S+'";src: url("'+X+'")}\n')})(C[P].name,C[P].url);O()}else t()};Editor.prototype.addMathCss=function(t){t=t.getElementsByTagName("defs");if(null!=t&&0<t.length)for(var C=document.getElementsByTagName("style"),N=0;N< +C.length;N++){var R=mxUtils.getTextContent(C[N]);0>R.indexOf("mxPageSelector")&&0<R.indexOf("MathJax")&&t[0].appendChild(C[N].cloneNode(!0))}};Editor.prototype.addFontCss=function(t,C){C=null!=C?C:this.absoluteCssFonts(this.fontCss);if(null!=C){var N=t.getElementsByTagName("defs"),R=t.ownerDocument;0==N.length?(N=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"defs"):R.createElement("defs"),null!=t.firstChild?t.insertBefore(N,t.firstChild):t.appendChild(N)):N=N[0];t=null!=R.createElementNS? +R.createElementNS(mxConstants.NS_SVG,"style"):R.createElement("style");t.setAttribute("type","text/css");mxUtils.setTextContent(t,C);N.appendChild(t)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(t,C,N){var R=mxClient.IS_FF?8192:16384;return Math.min(N,Math.min(R/t,R/C))};Editor.prototype.exportToCanvas=function(t,C,N,R,O,P,S,X,aa,Y,Z,ba,ea,ma,ia,pa,na,Fa){try{P=null!=P?P:!0;S=null!=S?S:!0;ba=null!= +ba?ba:this.graph;ea=null!=ea?ea:0;var Ga=aa?null:ba.background;Ga==mxConstants.NONE&&(Ga=null);null==Ga&&(Ga=R);null==Ga&&0==aa&&(Ga=pa?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(ba.getSvg(null,null,ea,ma,null,S,null,null,null,Y,null,pa,na,Fa),mxUtils.bind(this,function(xa){try{var Ma=new Image;Ma.onload=mxUtils.bind(this,function(){try{var Ea=function(){mxClient.IS_SF?window.setTimeout(function(){la.drawImage(Ma,0,0);t(Ba,xa)},0):(la.drawImage(Ma,0,0),t(Ba,xa))},Ba=document.createElement("canvas"), +za=parseInt(xa.getAttribute("width")),Da=parseInt(xa.getAttribute("height"));X=null!=X?X:1;null!=C&&(X=P?Math.min(1,Math.min(3*C/(4*Da),C/za)):C/za);X=this.getMaxCanvasScale(za,Da,X);za=Math.ceil(X*za);Da=Math.ceil(X*Da);Ba.setAttribute("width",za);Ba.setAttribute("height",Da);var la=Ba.getContext("2d");null!=Ga&&(la.beginPath(),la.rect(0,0,za,Da),la.fillStyle=Ga,la.fill());1!=X&&la.scale(X,X);if(ia){var Ha=ba.view,ya=Ha.scale;Ha.scale=1;var Ia=btoa(unescape(encodeURIComponent(Ha.createSvgGrid(Ha.gridColor)))); +Ha.scale=ya;Ia="data:image/svg+xml;base64,"+Ia;var ka=ba.gridSize*Ha.gridSteps*X,ta=ba.getGraphBounds(),ra=Ha.translate.x*ya,wa=Ha.translate.y*ya,ca=ra+(ta.x-ra)/ya-ea,fa=wa+(ta.y-wa)/ya-ea,da=new Image;da.onload=function(){try{for(var ha=-Math.round(ka-mxUtils.mod((ra-ca)*X,ka)),ja=-Math.round(ka-mxUtils.mod((wa-fa)*X,ka));ha<za;ha+=ka)for(var sa=ja;sa<Da;sa+=ka)la.drawImage(da,ha/X,sa/X);Ea()}catch(oa){null!=O&&O(oa)}};da.onerror=function(ha){null!=O&&O(ha)};da.src=Ia}else Ea()}catch(ha){null!= +O&&O(ha)}});Ma.onerror=function(Ea){null!=O&&O(Ea)};Y&&this.graph.addSvgShadow(xa);this.graph.mathEnabled&&this.addMathCss(xa);var va=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(xa,this.resolvedFontCss),Ma.src=Editor.createSvgDataUri(mxUtils.getXml(xa))}catch(Ea){null!=O&&O(Ea)}});this.embedExtFonts(mxUtils.bind(this,function(Ea){try{null!=Ea&&this.addFontCss(xa,Ea),this.loadFonts(va)}catch(Ba){null!=O&&O(Ba)}}))}catch(Ea){null!=O&&O(Ea)}}),N,Z)}catch(xa){null!=O&& +O(xa)}};Editor.crcTable=[];for(var l=0;256>l;l++)for(var m=l,x=0;8>x;x++)m=1==(m&1)?3988292384^m>>>1:m>>>1,Editor.crcTable[l]=m;Editor.updateCRC=function(t,C,N,R){for(var O=0;O<R;O++)t=Editor.crcTable[(t^C.charCodeAt(N+O))&255]^t>>>8;return t};Editor.crc32=function(t){for(var C=-1,N=0;N<t.length;N++)C=C>>>8^Editor.crcTable[(C^t.charCodeAt(N))&255];return(C^-1)>>>0};Editor.writeGraphModelToPng=function(t,C,N,R,O){function P(Z,ba){var ea=aa;aa+=ba;return Z.substring(ea,aa)}function S(Z){Z=P(Z,4);return Z.charCodeAt(3)+ +(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function X(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}t=t.substring(t.indexOf(",")+1);t=window.atob?atob(t):Base64.decode(t,!0);var aa=0;if(P(t,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=O&&O();else if(P(t,4),"IHDR"!=P(t,4))null!=O&&O();else{P(t,17);O=t.substring(0,aa);do{var Y=S(t);if("IDAT"==P(t,4)){O=t.substring(0,aa-8);"pHYs"==C&&"dpi"==N?(N=Math.round(R/.0254),N=X(N)+X(N)+String.fromCharCode(1)): +N=N+String.fromCharCode(0)+("zTXt"==C?String.fromCharCode(0):"")+R;R=4294967295;R=Editor.updateCRC(R,C,0,4);R=Editor.updateCRC(R,N,0,N.length);O+=X(N.length)+C+N+X(R^4294967295);O+=t.substring(aa-8,t.length);break}O+=t.substring(aa-8,aa-4+Y);P(t,Y);P(t,4)}while(Y);return"data:image/png;base64,"+(window.btoa?btoa(O):Base64.encode(O,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var y=ColorDialog.addRecentColor;ColorDialog.addRecentColor= +function(t,C){y.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var D=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){D.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(t,C){var N=null;null!=t.editor.graph.getModel().getParent(C)?N=C.getId():null!=t.currentPage&&(N=t.currentPage.getId());return N});if(null!=window.StyleFormatPanel){var d= +Format.prototype.init;Format.prototype.init=function(){d.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var g=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?g.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var t=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=t&&t.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible= +function(t){return!1};var k=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(t){t=k.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var C=this.editorUi,N=C.editor.graph,R=this.createOption(mxResources.get("shadow"),function(){return N.shadowVisible},function(O){var P=new ChangePageSetup(C);P.ignoreColor=!0;P.ignoreImage=!0;P.shadowVisible=O;N.model.execute(P)},{install:function(O){this.listener=function(){O(N.shadowVisible)}; +C.addListener("shadowVisibleChanged",this.listener)},destroy:function(){C.removeListener(this.listener)}});Editor.enableShadowOption||(R.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(R,60));t.appendChild(R)}return t};var n=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(t){t=n.apply(this,arguments);var C=this.editorUi,N=C.editor.graph;if(N.isEnabled()){var R=C.getCurrentFile();if(null!=R&&R.isAutosaveOptional()){var O= +this.createOption(mxResources.get("autosave"),function(){return C.editor.autosave},function(S){C.editor.setAutosave(S);C.editor.autosave&&R.isModified()&&R.fileChanged()},{install:function(S){this.listener=function(){S(C.editor.autosave)};C.editor.addListener("autosaveChanged",this.listener)},destroy:function(){C.editor.removeListener(this.listener)}});t.appendChild(O)}}if(this.isMathOptionVisible()&&N.isEnabled()&&"undefined"!==typeof MathJax){O=this.createOption(mxResources.get("mathematicalTypesetting"), +function(){return N.mathEnabled},function(S){C.actions.get("mathematicalTypesetting").funct()},{install:function(S){this.listener=function(){S(N.mathEnabled)};C.addListener("mathEnabledChanged",this.listener)},destroy:function(){C.removeListener(this.listener)}});O.style.paddingTop="5px";t.appendChild(O);var P=C.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");P.style.position="relative";P.style.marginLeft="6px";P.style.top="2px";O.appendChild(P)}return t};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties= [{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth", dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line", type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize", @@ -11313,92 +11310,92 @@ defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00", font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"}, {fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties= -function(q,D,L){if(null!=D){var R=function(Q){if(null!=Q)if(L)for(var S=0;S<Q.length;S++)D[Q[S].name]=Q[S];else for(var X in D){var aa=!1;for(S=0;S<Q.length;S++)if(Q[S].name==X&&Q[S].type==D[X].type){aa=!0;break}aa||delete D[X]}},O=this.editorUi.editor.graph.view.getState(q);null!=O&&null!=O.shape&&(O.shape.commonCustomPropAdded||(O.shape.commonCustomPropAdded=!0,O.shape.customProperties=O.shape.customProperties||[],O.cell.vertex?Array.prototype.push.apply(O.shape.customProperties,Editor.commonVertexProperties): -Array.prototype.push.apply(O.shape.customProperties,Editor.commonEdgeProperties)),R(O.shape.customProperties));q=q.getAttribute("customProperties");if(null!=q)try{R(JSON.parse(q))}catch(Q){}}};var t=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var q=this.editorUi.getSelectionState();"image"!=q.style.shape&&!q.containsLabel&&0<q.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));t.apply(this,arguments);if(Editor.enableCustomProperties){for(var D= -{},L=q.vertices,R=q.edges,O=0;O<L.length;O++)this.findCommonProperties(L[O],D,0==O);for(O=0;O<R.length;O++)this.findCommonProperties(R[O],D,0==L.length&&0==O);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(D).length&&this.container.appendChild(this.addProperties(this.createPanel(),D,q))}};var p=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(q){this.addActions(q,["copyStyle","pasteStyle"]);return p.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed= -!0;StyleFormatPanel.prototype.addProperties=function(q,D,L){function R(wa,Ha,ya,Ia){ba.getModel().beginUpdate();try{var ja=[],va=[];if(null!=ya.index){for(var ta=[],da=ya.parentRow.nextSibling;da&&da.getAttribute("data-pName")==wa;)ta.push(da.getAttribute("data-pValue")),da=da.nextSibling;ya.index<ta.length?null!=Ia?ta.splice(Ia,1):ta[ya.index]=Ha:ta.push(Ha);null!=ya.size&&ta.length>ya.size&&(ta=ta.slice(0,ya.size));Ha=ta.join(",");null!=ya.countProperty&&(ba.setCellStyles(ya.countProperty,ta.length, -ba.getSelectionCells()),ja.push(ya.countProperty),va.push(ta.length))}ba.setCellStyles(wa,Ha,ba.getSelectionCells());ja.push(wa);va.push(Ha);if(null!=ya.dependentProps)for(wa=0;wa<ya.dependentProps.length;wa++){var ca=ya.dependentPropsDefVal[wa],na=ya.dependentPropsVals[wa];if(na.length>Ha)na=na.slice(0,Ha);else for(var ea=na.length;ea<Ha;ea++)na.push(ca);na=na.join(",");ba.setCellStyles(ya.dependentProps[wa],na,ba.getSelectionCells());ja.push(ya.dependentProps[wa]);va.push(na)}if("function"==typeof ya.onChange)ya.onChange(ba, -Ha);Z.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ja,"values",va,"cells",ba.getSelectionCells()))}finally{ba.getModel().endUpdate()}}function O(wa,Ha,ya){var Ia=mxUtils.getOffset(q,!0),ja=mxUtils.getOffset(wa,!0);Ha.style.position="absolute";Ha.style.left=ja.x-Ia.x+"px";Ha.style.top=ja.y-Ia.y+"px";Ha.style.width=wa.offsetWidth+"px";Ha.style.height=wa.offsetHeight-(ya?4:0)+"px";Ha.style.zIndex=5}function Q(wa,Ha,ya){var Ia=document.createElement("div");Ia.style.width="32px";Ia.style.height= -"4px";Ia.style.margin="2px";Ia.style.border="1px solid black";Ia.style.background=Ha&&"none"!=Ha?Ha:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(Z,function(ja){this.editorUi.pickColor(Ha,function(va){Ia.style.background="none"==va?"url('"+Dialog.prototype.noColorImage+"')":va;R(wa,va,ya)});mxEvent.consume(ja)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(Ia);return btn}function S(wa,Ha,ya,Ia,ja,va,ta){null!=Ha&&(Ha=Ha.split(","), -fa.push({name:wa,values:Ha,type:ya,defVal:Ia,countProperty:ja,parentRow:va,isDeletable:!0,flipBkg:ta}));btn=mxUtils.button("+",mxUtils.bind(Z,function(da){for(var ca=va,na=0;null!=ca.nextSibling;)if(ca.nextSibling.getAttribute("data-pName")==wa)ca=ca.nextSibling,na++;else break;var ea={type:ya,parentRow:va,index:na,isDeletable:!0,defVal:Ia,countProperty:ja};na=Y(wa,"",ea,0==na%2,ta);R(wa,Ia,ea);ca.parentNode.insertBefore(na,ca.nextSibling);mxEvent.consume(da)}));btn.style.height="16px";btn.style.width= -"25px";btn.className="geColorBtn";return btn}function X(wa,Ha,ya,Ia,ja,va,ta){if(0<ja){var da=Array(ja);Ha=null!=Ha?Ha.split(","):[];for(var ca=0;ca<ja;ca++)da[ca]=null!=Ha[ca]?Ha[ca]:null!=Ia?Ia:"";fa.push({name:wa,values:da,type:ya,defVal:Ia,parentRow:va,flipBkg:ta,size:ja})}return document.createElement("div")}function aa(wa,Ha,ya){var Ia=document.createElement("input");Ia.type="checkbox";Ia.checked="1"==Ha;mxEvent.addListener(Ia,"change",function(){R(wa,Ia.checked?"1":"0",ya)});return Ia}function Y(wa, -Ha,ya,Ia,ja){var va=ya.dispName,ta=ya.type,da=document.createElement("tr");da.className="gePropRow"+(ja?"Dark":"")+(Ia?"Alt":"")+" gePropNonHeaderRow";da.setAttribute("data-pName",wa);da.setAttribute("data-pValue",Ha);Ia=!1;null!=ya.index&&(da.setAttribute("data-index",ya.index),va=(null!=va?va:"")+"["+ya.index+"]",Ia=!0);var ca=document.createElement("td");ca.className="gePropRowCell";va=mxResources.get(va,null,va);mxUtils.write(ca,va);ca.setAttribute("title",va);Ia&&(ca.style.textAlign="right"); -da.appendChild(ca);ca=document.createElement("td");ca.className="gePropRowCell";if("color"==ta)ca.appendChild(Q(wa,Ha,ya));else if("bool"==ta||"boolean"==ta)ca.appendChild(aa(wa,Ha,ya));else if("enum"==ta){var na=ya.enumList;for(ja=0;ja<na.length;ja++)if(va=na[ja],va.val==Ha){mxUtils.write(ca,mxResources.get(va.dispName,null,va.dispName));break}mxEvent.addListener(ca,"click",mxUtils.bind(Z,function(){var ea=document.createElement("select");O(ca,ea);for(var ia=0;ia<na.length;ia++){var oa=na[ia],ma= -document.createElement("option");ma.value=mxUtils.htmlEntities(oa.val);mxUtils.write(ma,mxResources.get(oa.dispName,null,oa.dispName));ea.appendChild(ma)}ea.value=Ha;q.appendChild(ea);mxEvent.addListener(ea,"change",function(){var xa=mxUtils.htmlEntities(ea.value);R(wa,xa,ya)});ea.focus();mxEvent.addListener(ea,"blur",function(){q.removeChild(ea)})}))}else"dynamicArr"==ta?ca.appendChild(S(wa,Ha,ya.subType,ya.subDefVal,ya.countProperty,da,ja)):"staticArr"==ta?ca.appendChild(X(wa,Ha,ya.subType,ya.subDefVal, -ya.size,da,ja)):"readOnly"==ta?(ja=document.createElement("input"),ja.setAttribute("readonly",""),ja.value=Ha,ja.style.width="96px",ja.style.borderWidth="0px",ca.appendChild(ja)):(ca.innerHTML=mxUtils.htmlEntities(decodeURIComponent(Ha)),mxEvent.addListener(ca,"click",mxUtils.bind(Z,function(){function ea(){var oa=ia.value;oa=0==oa.length&&"string"!=ta?0:oa;ya.allowAuto&&(null!=oa.trim&&"auto"==oa.trim().toLowerCase()?(oa="auto",ta="string"):(oa=parseFloat(oa),oa=isNaN(oa)?0:oa));null!=ya.min&&oa< -ya.min?oa=ya.min:null!=ya.max&&oa>ya.max&&(oa=ya.max);oa=encodeURIComponent(("int"==ta?parseInt(oa):oa)+"");R(wa,oa,ya)}var ia=document.createElement("input");O(ca,ia,!0);ia.value=decodeURIComponent(Ha);ia.className="gePropEditor";"int"!=ta&&"float"!=ta||ya.allowAuto||(ia.type="number",ia.step="int"==ta?"1":"any",null!=ya.min&&(ia.min=parseFloat(ya.min)),null!=ya.max&&(ia.max=parseFloat(ya.max)));q.appendChild(ia);mxEvent.addListener(ia,"keypress",function(oa){13==oa.keyCode&&ea()});ia.focus();mxEvent.addListener(ia, -"blur",function(){ea()})})));ya.isDeletable&&(ja=mxUtils.button("-",mxUtils.bind(Z,function(ea){R(wa,"",ya,ya.index);mxEvent.consume(ea)})),ja.style.height="16px",ja.style.width="25px",ja.style.float="right",ja.className="geColorBtn",ca.appendChild(ja));da.appendChild(ca);return da}var Z=this,ba=this.editorUi.editor.graph,fa=[];q.style.position="relative";q.style.padding="0";var ka=document.createElement("table");ka.className="geProperties";ka.style.whiteSpace="nowrap";ka.style.width="100%";var ha= -document.createElement("tr");ha.className="gePropHeader";var ra=document.createElement("th");ra.className="gePropHeaderCell";var la=document.createElement("img");la.src=Sidebar.prototype.expandedImage;la.style.verticalAlign="middle";ra.appendChild(la);mxUtils.write(ra,mxResources.get("property"));ha.style.cursor="pointer";var Fa=function(){var wa=ka.querySelectorAll(".gePropNonHeaderRow");if(Z.editorUi.propertiesCollapsed){la.src=Sidebar.prototype.collapsedImage;var Ha="none";for(var ya=q.childNodes.length- -1;0<=ya;ya--)try{var Ia=q.childNodes[ya],ja=Ia.nodeName.toUpperCase();"INPUT"!=ja&&"SELECT"!=ja||q.removeChild(Ia)}catch(va){}}else la.src=Sidebar.prototype.expandedImage,Ha="";for(ya=0;ya<wa.length;ya++)wa[ya].style.display=Ha};mxEvent.addListener(ha,"click",function(){Z.editorUi.propertiesCollapsed=!Z.editorUi.propertiesCollapsed;Fa()});ha.appendChild(ra);ra=document.createElement("th");ra.className="gePropHeaderCell";ra.innerHTML=mxResources.get("value");ha.appendChild(ra);ka.appendChild(ha);var Ga= -!1,Aa=!1;ha=null;1==L.vertices.length&&0==L.edges.length?ha=L.vertices[0].id:0==L.vertices.length&&1==L.edges.length&&(ha=L.edges[0].id);null!=ha&&ka.appendChild(Y("id",mxUtils.htmlEntities(ha),{dispName:"ID",type:"readOnly"},!0,!1));for(var Ma in D)if(ha=D[Ma],"function"!=typeof ha.isVisible||ha.isVisible(L,this)){var za=null!=L.style[Ma]?mxUtils.htmlEntities(L.style[Ma]+""):null!=ha.getDefaultValue?ha.getDefaultValue(L,this):ha.defVal;if("separator"==ha.type)Aa=!Aa;else{if("staticArr"==ha.type)ha.size= -parseInt(L.style[ha.sizeProperty]||D[ha.sizeProperty].defVal)||0;else if(null!=ha.dependentProps){var Da=ha.dependentProps,Ca=[],pa=[];for(ra=0;ra<Da.length;ra++){var qa=L.style[Da[ra]];pa.push(D[Da[ra]].subDefVal);Ca.push(null!=qa?qa.split(","):[])}ha.dependentPropsDefVal=pa;ha.dependentPropsVals=Ca}ka.appendChild(Y(Ma,za,ha,Ga,Aa));Ga=!Ga}}for(ra=0;ra<fa.length;ra++)for(ha=fa[ra],D=ha.parentRow,L=0;L<ha.values.length;L++)Ma=Y(ha.name,ha.values[L],{type:ha.type,parentRow:ha.parentRow,isDeletable:ha.isDeletable, -index:L,defVal:ha.defVal,countProperty:ha.countProperty,size:ha.size},0==L%2,ha.flipBkg),D.parentNode.insertBefore(Ma,D.nextSibling),D=Ma;q.appendChild(ka);Fa();return q};StyleFormatPanel.prototype.addStyles=function(q){function D(ha){mxEvent.addListener(ha,"mouseenter",function(){ha.style.opacity="1"});mxEvent.addListener(ha,"mouseleave",function(){ha.style.opacity="0.5"})}var L=this.editorUi,R=L.editor.graph,O=document.createElement("div");O.style.whiteSpace="nowrap";O.style.paddingLeft="24px"; -O.style.paddingRight="20px";q.style.paddingLeft="16px";q.style.paddingBottom="6px";q.style.position="relative";q.appendChild(O);var Q="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),S=document.createElement("div");S.style.whiteSpace="nowrap";S.style.position="relative";S.style.textAlign="center";S.style.width="210px";for(var X=[],aa=0;aa<this.defaultColorSchemes.length;aa++){var Y= -document.createElement("div");Y.style.display="inline-block";Y.style.width="6px";Y.style.height="6px";Y.style.marginLeft="4px";Y.style.marginRight="3px";Y.style.borderRadius="3px";Y.style.cursor="pointer";Y.style.background="transparent";Y.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ha){mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){Z(ha)}))})(aa);X.push(Y);S.appendChild(Y)}var Z=mxUtils.bind(this,function(ha){null!=X[ha]&&(null!=this.format.currentScheme&&null!=X[this.format.currentScheme]&& -(X[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ha,ba(this.defaultColorSchemes[this.format.currentScheme]),X[this.format.currentScheme].style.background="#84d7ff")}),ba=mxUtils.bind(this,function(ha){var ra=mxUtils.bind(this,function(Fa){var Ga=mxUtils.button("",mxUtils.bind(this,function(za){R.getModel().beginUpdate();try{for(var Da=L.getSelectionState().cells,Ca=0;Ca<Da.length;Ca++){for(var pa=R.getModel().getStyle(Da[Ca]),qa=0;qa<Q.length;qa++)pa=mxUtils.removeStylename(pa, -Q[qa]);var wa=R.getModel().isVertex(Da[Ca])?R.defaultVertexStyle:R.defaultEdgeStyle;null!=Fa?(mxEvent.isShiftDown(za)||(pa=""==Fa.fill?mxUtils.setStyle(pa,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(pa,mxConstants.STYLE_FILLCOLOR,Fa.fill||mxUtils.getValue(wa,mxConstants.STYLE_FILLCOLOR,null)),pa=mxUtils.setStyle(pa,mxConstants.STYLE_GRADIENTCOLOR,Fa.gradient||mxUtils.getValue(wa,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(za)||mxClient.IS_MAC&&mxEvent.isMetaDown(za)||!R.getModel().isVertex(Da[Ca])|| -(pa=mxUtils.setStyle(pa,mxConstants.STYLE_FONTCOLOR,Fa.font||mxUtils.getValue(wa,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(za)||(pa=""==Fa.stroke?mxUtils.setStyle(pa,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(pa,mxConstants.STYLE_STROKECOLOR,Fa.stroke||mxUtils.getValue(wa,mxConstants.STYLE_STROKECOLOR,null)))):(pa=mxUtils.setStyle(pa,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(wa,mxConstants.STYLE_FILLCOLOR,"#ffffff")),pa=mxUtils.setStyle(pa,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(wa, -mxConstants.STYLE_STROKECOLOR,"#000000")),pa=mxUtils.setStyle(pa,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(wa,mxConstants.STYLE_GRADIENTCOLOR,null)),R.getModel().isVertex(Da[Ca])&&(pa=mxUtils.setStyle(pa,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(wa,mxConstants.STYLE_FONTCOLOR,null))));R.getModel().setStyle(Da[Ca],pa)}}finally{R.getModel().endUpdate()}}));Ga.className="geStyleButton";Ga.style.width="36px";Ga.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ga.style.margin="0px 6px 6px 0px"; -if(null!=Fa){var Aa="1"==urlParams.sketch?"2px solid":"1px solid";null!=Fa.border&&(Aa=Fa.border);null!=Fa.gradient?mxClient.IS_IE&&10>document.documentMode?Ga.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Fa.fill+"', EndColorStr='"+Fa.gradient+"', GradientType=0)":Ga.style.backgroundImage="linear-gradient("+Fa.fill+" 0px,"+Fa.gradient+" 100%)":Fa.fill==mxConstants.NONE?Ga.style.background="url('"+Dialog.prototype.noColorImage+"')":Ga.style.backgroundColor=""==Fa.fill? -mxUtils.getValue(R.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Fa.fill||mxUtils.getValue(R.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Ga.style.border=Fa.stroke==mxConstants.NONE?Aa+" transparent":""==Fa.stroke?Aa+" "+mxUtils.getValue(R.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Aa+" "+(Fa.stroke||mxUtils.getValue(R.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR, -Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Fa.title&&Ga.setAttribute("title",Fa.title)}else{Aa=mxUtils.getValue(R.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Ma=mxUtils.getValue(R.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Ga.style.backgroundColor=Aa;Ga.style.border="1px solid "+Ma}Ga.style.borderRadius="0";O.appendChild(Ga)});O.innerText="";for(var la=0;la<ha.length;la++)0<la&&0==mxUtils.mod(la,4)&&mxUtils.br(O),ra(ha[la])});null==this.format.currentScheme? -Z(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):Z(this.format.currentScheme);aa=10>=this.defaultColorSchemes.length?28:8;var fa=document.createElement("div");fa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+aa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);"; -mxEvent.addListener(fa,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var ka=document.createElement("div");ka.style.cssText="position:absolute;left:202px;top:8px;bottom:"+aa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);"; -1<this.defaultColorSchemes.length&&(q.appendChild(fa),q.appendChild(ka));mxEvent.addListener(ka,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));D(fa);D(ka);ba(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&q.appendChild(S);return q};StyleFormatPanel.prototype.addEditOps=function(q){var D=this.editorUi.getSelectionState(),L=this.editorUi.editor.graph,R=null;1==D.cells.length&&(R=mxUtils.button(mxResources.get("editStyle"), -mxUtils.bind(this,function(O){this.editorUi.actions.get("editStyle").funct()})),R.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),R.style.width="210px",R.style.marginBottom="2px",q.appendChild(R));L=1==D.cells.length?L.view.getState(D.cells[0]):null;null!=L&&null!=L.shape&&null!=L.shape.stencil?(D=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(O){this.editorUi.actions.get("editShape").funct()})),D.setAttribute("title", -mxResources.get("editShape")),D.style.marginBottom="2px",null==R?D.style.width="210px":(R.style.width="104px",D.style.width="104px",D.style.marginLeft="2px"),q.appendChild(D)):D.image&&0<D.cells.length&&(D=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(O){this.editorUi.actions.get("image").funct()})),D.setAttribute("title",mxResources.get("editImage")),D.style.marginBottom="2px",null==R?D.style.width="210px":(R.style.width="104px",D.style.width="104px",D.style.marginLeft="2px"), -q.appendChild(D));return q}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(q){return q.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(q){return Graph.isGoogleFontUrl(q)};Graph.createFontElement=function(q, -D){var L=Graph.fontMapping[D];null==L&&Graph.isCssFontUrl(D)?(q=document.createElement("link"),q.setAttribute("rel","stylesheet"),q.setAttribute("type","text/css"),q.setAttribute("charset","UTF-8"),q.setAttribute("href",D)):(null==L&&(L='@font-face {\nfont-family: "'+q+'";\nsrc: url("'+D+'");\n}'),q=document.createElement("style"),mxUtils.write(q,L));return q};Graph.addFont=function(q,D,L){if(null!=q&&0<q.length&&null!=D&&0<D.length){var R=q.toLowerCase();if("helvetica"!=R&&"arial"!=q&&"sans-serif"!= -R){var O=Graph.customFontElements[R];null!=O&&O.url!=D&&(O.elt.parentNode.removeChild(O.elt),O=null);null==O?(O=D,"http:"==D.substring(0,5)&&(O=PROXY_URL+"?url="+encodeURIComponent(D)),O={name:q,url:D,elt:Graph.createFontElement(q,O)},Graph.customFontElements[R]=O,Graph.recentCustomFonts[R]=O,D=document.getElementsByTagName("head")[0],null!=L&&("link"==O.elt.nodeName.toLowerCase()?(O.elt.onload=L,O.elt.onerror=L):L()),null!=D&&D.appendChild(O.elt)):null!=L&&L()}else null!=L&&L()}else null!=L&&L(); -return q};Graph.getFontUrl=function(q,D){q=Graph.customFontElements[q.toLowerCase()];null!=q&&(D=q.url);return D};Graph.processFontAttributes=function(q){q=q.getElementsByTagName("*");for(var D=0;D<q.length;D++){var L=q[D].getAttribute("data-font-src");if(null!=L){var R="FONT"==q[D].nodeName?q[D].getAttribute("face"):q[D].style.fontFamily;null!=R&&Graph.addFont(R,L)}}};Graph.processFontStyle=function(q){if(null!=q){var D=mxUtils.getValue(q,"fontSource",null);if(null!=D){var L=mxUtils.getValue(q,mxConstants.STYLE_FONTFAMILY, -null);null!=L&&Graph.addFont(L,decodeURIComponent(D))}}return q};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!= -urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var A=Graph.prototype.init;Graph.prototype.init=function(){function q(O){D=O}A.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var D=null;mxEvent.addListener(this.container,"mouseenter",q);mxEvent.addListener(this.container,"mousemove",q);mxEvent.addListener(this.container,"mouseleave",function(O){D=null});this.isMouseInsertPoint=function(){return null!=D};var L=this.getInsertPoint; -this.getInsertPoint=function(){return null!=D?this.getPointForEvent(D):L.apply(this,arguments)};var R=this.layoutManager.getLayout;this.layoutManager.getLayout=function(O){var Q=this.graph.getCellStyle(O);if(null!=Q&&"rack"==Q.childLayout){var S=new mxStackLayout(this.graph,!1);S.gridSize=null!=Q.rackUnitSize?parseFloat(Q.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;S.marginLeft=Q.marginLeft||0;S.marginRight=Q.marginRight||0;S.marginTop=Q.marginTop||0;S.marginBottom= -Q.marginBottom||0;S.allowGaps=Q.allowGaps||0;S.horizontal="1"==mxUtils.getValue(Q,"horizontalRack","0");S.resizeParent=!1;S.fill=!0;return S}return R.apply(this,arguments)};this.updateGlobalUrlVariables()};var E=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(q,D){return Graph.processFontStyle(E.apply(this,arguments))};var y=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(q,D,L,R,O,Q,S,X,aa,Y,Z){y.apply(this,arguments);Graph.processFontAttributes(Z)}; -var B=mxText.prototype.redraw;mxText.prototype.redraw=function(){B.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(q,D,L){function R(){for(var ha=S.getSelectionCells(),ra=[],la=0;la<ha.length;la++)S.isCellVisible(ha[la])&&ra.push(ha[la]);S.setSelectionCells(ra)}function O(ha){S.setHiddenTags(ha?[]:X.slice());R();S.refresh()}function Q(ha,ra){Y.innerText="";if(0<ha.length){var la=document.createElement("table"); -la.setAttribute("cellpadding","2");la.style.boxSizing="border-box";la.style.tableLayout="fixed";la.style.width="100%";var Fa=document.createElement("tbody");if(null!=ha&&0<ha.length)for(var Ga=0;Ga<ha.length;Ga++)(function(Aa){var Ma=0>mxUtils.indexOf(S.hiddenTags,Aa),za=document.createElement("tr"),Da=document.createElement("td");Da.style.align="center";Da.style.width="16px";var Ca=document.createElement("img");Ca.setAttribute("src",Ma?Editor.visibleImage:Editor.hiddenImage);Ca.setAttribute("title", -mxResources.get(Ma?"hideIt":"show",[Aa]));mxUtils.setOpacity(Ca,Ma?75:25);Ca.style.verticalAlign="middle";Ca.style.cursor="pointer";Ca.style.width="16px";if(D||Editor.isDarkMode())Ca.style.filter="invert(100%)";Da.appendChild(Ca);mxEvent.addListener(Ca,"click",function(qa){mxEvent.isShiftDown(qa)?O(0<=mxUtils.indexOf(S.hiddenTags,Aa)):(S.toggleHiddenTag(Aa),R(),S.refresh());mxEvent.consume(qa)});za.appendChild(Da);Da=document.createElement("td");Da.style.overflow="hidden";Da.style.whiteSpace="nowrap"; -Da.style.textOverflow="ellipsis";Da.style.verticalAlign="middle";Da.style.cursor="pointer";Da.setAttribute("title",Aa);a=document.createElement("a");mxUtils.write(a,Aa);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Ma?100:40);Da.appendChild(a);mxEvent.addListener(Da,"click",function(qa){if(mxEvent.isShiftDown(qa)){O(!0);var wa=S.getCellsForTags([Aa],null,null,!0);S.isEnabled()?S.setSelectionCells(wa):S.highlightCells(wa)}else if(Ma&&0<S.hiddenTags.length)O(!0);else{wa= -X.slice();var Ha=mxUtils.indexOf(wa,Aa);wa.splice(Ha,1);S.setHiddenTags(wa);R();S.refresh()}mxEvent.consume(qa)});za.appendChild(Da);if(S.isEnabled()){Da=document.createElement("td");Da.style.verticalAlign="middle";Da.style.textAlign="center";Da.style.width="18px";if(null==ra){Da.style.align="center";Da.style.width="16px";Ca=document.createElement("img");Ca.setAttribute("src",Editor.crossImage);Ca.setAttribute("title",mxResources.get("removeIt",[Aa]));mxUtils.setOpacity(Ca,Ma?75:25);Ca.style.verticalAlign= -"middle";Ca.style.cursor="pointer";Ca.style.width="16px";if(D||Editor.isDarkMode())Ca.style.filter="invert(100%)";mxEvent.addListener(Ca,"click",function(qa){var wa=mxUtils.indexOf(X,Aa);0<=wa&&X.splice(wa,1);S.removeTagsForCells(S.model.getDescendants(S.model.getRoot()),[Aa]);S.refresh();mxEvent.consume(qa)});Da.appendChild(Ca)}else{var pa=document.createElement("input");pa.setAttribute("type","checkbox");pa.style.margin="0px";pa.defaultChecked=null!=ra&&0<=mxUtils.indexOf(ra,Aa);pa.checked=pa.defaultChecked; -pa.style.background="transparent";pa.setAttribute("title",mxResources.get(pa.defaultChecked?"removeIt":"add",[Aa]));mxEvent.addListener(pa,"change",function(qa){pa.checked?S.addTagsForCells(S.getSelectionCells(),[Aa]):S.removeTagsForCells(S.getSelectionCells(),[Aa]);mxEvent.consume(qa)});Da.appendChild(pa)}za.appendChild(Da)}Fa.appendChild(za)})(ha[Ga]);la.appendChild(Fa);Y.appendChild(la)}}var S=this,X=S.hiddenTags.slice(),aa=document.createElement("div");aa.style.userSelect="none";aa.style.overflow= -"hidden";aa.style.padding="10px";aa.style.height="100%";var Y=document.createElement("div");Y.style.boxSizing="border-box";Y.style.borderRadius="4px";Y.style.userSelect="none";Y.style.overflow="auto";Y.style.position="absolute";Y.style.left="10px";Y.style.right="10px";Y.style.top="10px";Y.style.border=S.isEnabled()?"1px solid #808080":"none";Y.style.bottom=S.isEnabled()?"48px":"10px";aa.appendChild(Y);var Z=mxUtils.button(mxResources.get("reset"),function(ha){S.setHiddenTags([]);mxEvent.isShiftDown(ha)|| -(X=S.hiddenTags.slice());R();S.refresh()});Z.setAttribute("title",mxResources.get("reset"));Z.className="geBtn";Z.style.margin="0 4px 0 0";var ba=mxUtils.button(mxResources.get("add"),function(){null!=L&&L(X,function(ha){X=ha;fa()})});ba.setAttribute("title",mxResources.get("add"));ba.className="geBtn";ba.style.margin="0";S.addListener(mxEvent.ROOT,function(){X=S.hiddenTags.slice()});var fa=mxUtils.bind(this,function(ha,ra){if(q()){ha=S.getAllTags();for(ra=0;ra<ha.length;ra++)0>mxUtils.indexOf(X, -ha[ra])&&X.push(ha[ra]);X.sort();S.isSelectionEmpty()?Q(X):Q(X,S.getCommonTagsForCells(S.getSelectionCells()))}});S.selectionModel.addListener(mxEvent.CHANGE,fa);S.model.addListener(mxEvent.CHANGE,fa);S.addListener(mxEvent.REFRESH,fa);var ka=document.createElement("div");ka.style.boxSizing="border-box";ka.style.whiteSpace="nowrap";ka.style.position="absolute";ka.style.overflow="hidden";ka.style.bottom="0px";ka.style.height="42px";ka.style.right="10px";ka.style.left="10px";S.isEnabled()&&(ka.appendChild(Z), -ka.appendChild(ba),aa.appendChild(ka));return{div:aa,refresh:fa}};Graph.prototype.getCustomFonts=function(){var q=this.extFonts;q=null!=q?q.slice():[];for(var D in Graph.customFontElements){var L=Graph.customFontElements[D];q.push({name:L.name,url:L.url})}return q};Graph.prototype.setFont=function(q,D){Graph.addFont(q,D);document.execCommand("fontname",!1,q);if(null!=D){var L=this.cellEditor.textarea.getElementsByTagName("font");D=Graph.getFontUrl(q,D);for(var R=0;R<L.length;R++)L[R].getAttribute("face")== -q&&L[R].getAttribute("data-font-src")!=D&&L[R].setAttribute("data-font-src",D)}};var J=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return J.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var q=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=q)for(var D in q)this.globalVars[D]= -q[D]}catch(L){null!=window.console&&console.log("Error in vars URL parameter: "+L)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var N=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(q){var D=N.apply(this,arguments);null==D&&null!=this.globalVars&&(D=this.globalVars[q]);return D};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var q=this.themes["default-style2"];this.defaultStylesheet= -(new mxCodec(q.ownerDocument)).decode(q)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var v=Graph.prototype.getSvg;Graph.prototype.getSvg=function(q,D,L,R,O,Q,S,X,aa,Y,Z,ba,fa,ka){var ha=null,ra=null,la=null;ba||null==this.themes||"darkTheme"!=this.defaultThemeName||(ha=this.stylesheet,ra=this.shapeForegroundColor,la=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor= -"darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Fa=v.apply(this,arguments),Ga=this.getCustomFonts();if(Z&&0<Ga.length){var Aa=Fa.ownerDocument,Ma=null!=Aa.createElementNS?Aa.createElementNS(mxConstants.NS_SVG,"style"):Aa.createElement("style");null!=Aa.setAttributeNS?Ma.setAttributeNS("type","text/css"):Ma.setAttribute("type","text/css");for(var za="",Da="",Ca=0;Ca<Ga.length;Ca++){var pa=Ga[Ca].name,qa=Ga[Ca].url;Graph.isCssFontUrl(qa)? -za+="@import url("+qa+");\n":Da+='@font-face {\nfont-family: "'+pa+'";\nsrc: url("'+qa+'");\n}\n'}Ma.appendChild(Aa.createTextNode(za+Da));Fa.getElementsByTagName("defs")[0].appendChild(Ma)}this.mathEnabled&&(document.body.appendChild(Fa),Editor.MathJaxRender(Fa),Fa.parentNode.removeChild(Fa));null!=ha&&(this.shapeBackgroundColor=la,this.shapeForegroundColor=ra,this.stylesheet=ha,this.refresh());return Fa};var u=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(q){u.apply(this, -arguments);null!=q.secondLabel&&(q.secondLabel.destroy(),q.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(q){return[q.shape,q.text,q.secondLabel,q.control]};var G=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){G.apply(this,arguments);this.enumerationState=0};var H=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(q){null!=q.shape&&this.redrawEnumerationState(q);return H.apply(this,arguments)}; -mxGraphView.prototype.createEnumerationValue=function(q){q=decodeURIComponent(mxUtils.getValue(q.style,"enumerateValue",""));""==q&&(q=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(q)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(q){var D="1"==mxUtils.getValue(q.style,"enumerate",0);D&&null==q.secondLabel?(q.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM), -q.secondLabel.size=12,q.secondLabel.state=q,q.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(q,q.secondLabel)):D||null==q.secondLabel||(q.secondLabel.destroy(),q.secondLabel=null);D=q.secondLabel;if(null!=D){var L=q.view.scale,R=this.createEnumerationValue(q);q=this.graph.model.isVertex(q.cell)?new mxRectangle(q.x+q.width-4*L,q.y+4*L,0,0):mxRectangle.fromPoint(q.view.getPoint(q));D.bounds.equals(q)&&D.value==R&&D.scale==L||(D.bounds=q,D.value=R,D.scale= -L,D.redraw())}};var M=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){M.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var q=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName|| -this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",q.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,q.ownerSVGElement))}};var K=Graph.prototype.refresh;Graph.prototype.refresh=function(){K.apply(this, -arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var I=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){I.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(q){"data:action/json,"==q.substring(0,17)&&(q=JSON.parse(q.substring(17)),null!= -q.actions&&this.executeCustomActions(q.actions))};Graph.prototype.executeCustomActions=function(q,D){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var L=!1,R=0,O=0,Q=mxUtils.bind(this,function(){L||(L=!0,this.model.beginUpdate())}),S=mxUtils.bind(this, -function(){L&&(L=!1,this.model.endUpdate())}),X=mxUtils.bind(this,function(){0<R&&R--;0==R&&aa()}),aa=mxUtils.bind(this,function(){if(O<q.length){var Y=this.stoppingCustomActions,Z=q[O++],ba=[];if(null!=Z.open)if(S(),this.isCustomLink(Z.open)){if(!this.customLinkClicked(Z.open))return}else this.openLink(Z.open);null==Z.wait||Y||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;X()}),R++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction, +function(t,C,N){if(null!=C){var R=function(P){if(null!=P)if(N)for(var S=0;S<P.length;S++)C[P[S].name]=P[S];else for(var X in C){var aa=!1;for(S=0;S<P.length;S++)if(P[S].name==X&&P[S].type==C[X].type){aa=!0;break}aa||delete C[X]}},O=this.editorUi.editor.graph.view.getState(t);null!=O&&null!=O.shape&&(O.shape.commonCustomPropAdded||(O.shape.commonCustomPropAdded=!0,O.shape.customProperties=O.shape.customProperties||[],O.cell.vertex?Array.prototype.push.apply(O.shape.customProperties,Editor.commonVertexProperties): +Array.prototype.push.apply(O.shape.customProperties,Editor.commonEdgeProperties)),R(O.shape.customProperties));t=t.getAttribute("customProperties");if(null!=t)try{R(JSON.parse(t))}catch(P){}}};var q=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var t=this.editorUi.getSelectionState();"image"!=t.style.shape&&!t.containsLabel&&0<t.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));q.apply(this,arguments);if(Editor.enableCustomProperties){for(var C= +{},N=t.vertices,R=t.edges,O=0;O<N.length;O++)this.findCommonProperties(N[O],C,0==O);for(O=0;O<R.length;O++)this.findCommonProperties(R[O],C,0==N.length&&0==O);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(C).length&&this.container.appendChild(this.addProperties(this.createPanel(),C,t))}};var p=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(t){this.addActions(t,["copyStyle","pasteStyle"]);return p.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed= +!0;StyleFormatPanel.prototype.addProperties=function(t,C,N){function R(la,Ha,ya,Ia){ba.getModel().beginUpdate();try{var ka=[],ta=[];if(null!=ya.index){for(var ra=[],wa=ya.parentRow.nextSibling;wa&&wa.getAttribute("data-pName")==la;)ra.push(wa.getAttribute("data-pValue")),wa=wa.nextSibling;ya.index<ra.length?null!=Ia?ra.splice(Ia,1):ra[ya.index]=Ha:ra.push(Ha);null!=ya.size&&ra.length>ya.size&&(ra=ra.slice(0,ya.size));Ha=ra.join(",");null!=ya.countProperty&&(ba.setCellStyles(ya.countProperty,ra.length, +ba.getSelectionCells()),ka.push(ya.countProperty),ta.push(ra.length))}ba.setCellStyles(la,Ha,ba.getSelectionCells());ka.push(la);ta.push(Ha);if(null!=ya.dependentProps)for(la=0;la<ya.dependentProps.length;la++){var ca=ya.dependentPropsDefVal[la],fa=ya.dependentPropsVals[la];if(fa.length>Ha)fa=fa.slice(0,Ha);else for(var da=fa.length;da<Ha;da++)fa.push(ca);fa=fa.join(",");ba.setCellStyles(ya.dependentProps[la],fa,ba.getSelectionCells());ka.push(ya.dependentProps[la]);ta.push(fa)}if("function"==typeof ya.onChange)ya.onChange(ba, +Ha);Z.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ka,"values",ta,"cells",ba.getSelectionCells()))}finally{ba.getModel().endUpdate()}}function O(la,Ha,ya){var Ia=mxUtils.getOffset(t,!0),ka=mxUtils.getOffset(la,!0);Ha.style.position="absolute";Ha.style.left=ka.x-Ia.x+"px";Ha.style.top=ka.y-Ia.y+"px";Ha.style.width=la.offsetWidth+"px";Ha.style.height=la.offsetHeight-(ya?4:0)+"px";Ha.style.zIndex=5}function P(la,Ha,ya){var Ia=document.createElement("div");Ia.style.width="32px";Ia.style.height= +"4px";Ia.style.margin="2px";Ia.style.border="1px solid black";Ia.style.background=Ha&&"none"!=Ha?Ha:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(Z,function(ka){this.editorUi.pickColor(Ha,function(ta){Ia.style.background="none"==ta?"url('"+Dialog.prototype.noColorImage+"')":ta;R(la,ta,ya)});mxEvent.consume(ka)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(Ia);return btn}function S(la,Ha,ya,Ia,ka,ta,ra){null!=Ha&&(Ha=Ha.split(","), +ea.push({name:la,values:Ha,type:ya,defVal:Ia,countProperty:ka,parentRow:ta,isDeletable:!0,flipBkg:ra}));btn=mxUtils.button("+",mxUtils.bind(Z,function(wa){for(var ca=ta,fa=0;null!=ca.nextSibling;)if(ca.nextSibling.getAttribute("data-pName")==la)ca=ca.nextSibling,fa++;else break;var da={type:ya,parentRow:ta,index:fa,isDeletable:!0,defVal:Ia,countProperty:ka};fa=Y(la,"",da,0==fa%2,ra);R(la,Ia,da);ca.parentNode.insertBefore(fa,ca.nextSibling);mxEvent.consume(wa)}));btn.style.height="16px";btn.style.width= +"25px";btn.className="geColorBtn";return btn}function X(la,Ha,ya,Ia,ka,ta,ra){if(0<ka){var wa=Array(ka);Ha=null!=Ha?Ha.split(","):[];for(var ca=0;ca<ka;ca++)wa[ca]=null!=Ha[ca]?Ha[ca]:null!=Ia?Ia:"";ea.push({name:la,values:wa,type:ya,defVal:Ia,parentRow:ta,flipBkg:ra,size:ka})}return document.createElement("div")}function aa(la,Ha,ya){var Ia=document.createElement("input");Ia.type="checkbox";Ia.checked="1"==Ha;mxEvent.addListener(Ia,"change",function(){R(la,Ia.checked?"1":"0",ya)});return Ia}function Y(la, +Ha,ya,Ia,ka){var ta=ya.dispName,ra=ya.type,wa=document.createElement("tr");wa.className="gePropRow"+(ka?"Dark":"")+(Ia?"Alt":"")+" gePropNonHeaderRow";wa.setAttribute("data-pName",la);wa.setAttribute("data-pValue",Ha);Ia=!1;null!=ya.index&&(wa.setAttribute("data-index",ya.index),ta=(null!=ta?ta:"")+"["+ya.index+"]",Ia=!0);var ca=document.createElement("td");ca.className="gePropRowCell";ta=mxResources.get(ta,null,ta);mxUtils.write(ca,ta);ca.setAttribute("title",ta);Ia&&(ca.style.textAlign="right"); +wa.appendChild(ca);ca=document.createElement("td");ca.className="gePropRowCell";if("color"==ra)ca.appendChild(P(la,Ha,ya));else if("bool"==ra||"boolean"==ra)ca.appendChild(aa(la,Ha,ya));else if("enum"==ra){var fa=ya.enumList;for(ka=0;ka<fa.length;ka++)if(ta=fa[ka],ta.val==Ha){mxUtils.write(ca,mxResources.get(ta.dispName,null,ta.dispName));break}mxEvent.addListener(ca,"click",mxUtils.bind(Z,function(){var da=document.createElement("select");O(ca,da);for(var ha=0;ha<fa.length;ha++){var ja=fa[ha],sa= +document.createElement("option");sa.value=mxUtils.htmlEntities(ja.val);mxUtils.write(sa,mxResources.get(ja.dispName,null,ja.dispName));da.appendChild(sa)}da.value=Ha;t.appendChild(da);mxEvent.addListener(da,"change",function(){var oa=mxUtils.htmlEntities(da.value);R(la,oa,ya)});da.focus();mxEvent.addListener(da,"blur",function(){t.removeChild(da)})}))}else"dynamicArr"==ra?ca.appendChild(S(la,Ha,ya.subType,ya.subDefVal,ya.countProperty,wa,ka)):"staticArr"==ra?ca.appendChild(X(la,Ha,ya.subType,ya.subDefVal, +ya.size,wa,ka)):"readOnly"==ra?(ka=document.createElement("input"),ka.setAttribute("readonly",""),ka.value=Ha,ka.style.width="96px",ka.style.borderWidth="0px",ca.appendChild(ka)):(ca.innerHTML=mxUtils.htmlEntities(decodeURIComponent(Ha)),mxEvent.addListener(ca,"click",mxUtils.bind(Z,function(){function da(){var ja=ha.value;ja=0==ja.length&&"string"!=ra?0:ja;ya.allowAuto&&(null!=ja.trim&&"auto"==ja.trim().toLowerCase()?(ja="auto",ra="string"):(ja=parseFloat(ja),ja=isNaN(ja)?0:ja));null!=ya.min&&ja< +ya.min?ja=ya.min:null!=ya.max&&ja>ya.max&&(ja=ya.max);ja=encodeURIComponent(("int"==ra?parseInt(ja):ja)+"");R(la,ja,ya)}var ha=document.createElement("input");O(ca,ha,!0);ha.value=decodeURIComponent(Ha);ha.className="gePropEditor";"int"!=ra&&"float"!=ra||ya.allowAuto||(ha.type="number",ha.step="int"==ra?"1":"any",null!=ya.min&&(ha.min=parseFloat(ya.min)),null!=ya.max&&(ha.max=parseFloat(ya.max)));t.appendChild(ha);mxEvent.addListener(ha,"keypress",function(ja){13==ja.keyCode&&da()});ha.focus();mxEvent.addListener(ha, +"blur",function(){da()})})));ya.isDeletable&&(ka=mxUtils.button("-",mxUtils.bind(Z,function(da){R(la,"",ya,ya.index);mxEvent.consume(da)})),ka.style.height="16px",ka.style.width="25px",ka.style.float="right",ka.className="geColorBtn",ca.appendChild(ka));wa.appendChild(ca);return wa}var Z=this,ba=this.editorUi.editor.graph,ea=[];t.style.position="relative";t.style.padding="0";var ma=document.createElement("table");ma.className="geProperties";ma.style.whiteSpace="nowrap";ma.style.width="100%";var ia= +document.createElement("tr");ia.className="gePropHeader";var pa=document.createElement("th");pa.className="gePropHeaderCell";var na=document.createElement("img");na.src=Sidebar.prototype.expandedImage;na.style.verticalAlign="middle";pa.appendChild(na);mxUtils.write(pa,mxResources.get("property"));ia.style.cursor="pointer";var Fa=function(){var la=ma.querySelectorAll(".gePropNonHeaderRow");if(Z.editorUi.propertiesCollapsed){na.src=Sidebar.prototype.collapsedImage;var Ha="none";for(var ya=t.childNodes.length- +1;0<=ya;ya--)try{var Ia=t.childNodes[ya],ka=Ia.nodeName.toUpperCase();"INPUT"!=ka&&"SELECT"!=ka||t.removeChild(Ia)}catch(ta){}}else na.src=Sidebar.prototype.expandedImage,Ha="";for(ya=0;ya<la.length;ya++)la[ya].style.display=Ha};mxEvent.addListener(ia,"click",function(){Z.editorUi.propertiesCollapsed=!Z.editorUi.propertiesCollapsed;Fa()});ia.appendChild(pa);pa=document.createElement("th");pa.className="gePropHeaderCell";pa.innerHTML=mxResources.get("value");ia.appendChild(pa);ma.appendChild(ia);var Ga= +!1,xa=!1;ia=null;1==N.vertices.length&&0==N.edges.length?ia=N.vertices[0].id:0==N.vertices.length&&1==N.edges.length&&(ia=N.edges[0].id);null!=ia&&ma.appendChild(Y("id",mxUtils.htmlEntities(ia),{dispName:"ID",type:"readOnly"},!0,!1));for(var Ma in C)if(ia=C[Ma],"function"!=typeof ia.isVisible||ia.isVisible(N,this)){var va=null!=N.style[Ma]?mxUtils.htmlEntities(N.style[Ma]+""):null!=ia.getDefaultValue?ia.getDefaultValue(N,this):ia.defVal;if("separator"==ia.type)xa=!xa;else{if("staticArr"==ia.type)ia.size= +parseInt(N.style[ia.sizeProperty]||C[ia.sizeProperty].defVal)||0;else if(null!=ia.dependentProps){var Ea=ia.dependentProps,Ba=[],za=[];for(pa=0;pa<Ea.length;pa++){var Da=N.style[Ea[pa]];za.push(C[Ea[pa]].subDefVal);Ba.push(null!=Da?Da.split(","):[])}ia.dependentPropsDefVal=za;ia.dependentPropsVals=Ba}ma.appendChild(Y(Ma,va,ia,Ga,xa));Ga=!Ga}}for(pa=0;pa<ea.length;pa++)for(ia=ea[pa],C=ia.parentRow,N=0;N<ia.values.length;N++)Ma=Y(ia.name,ia.values[N],{type:ia.type,parentRow:ia.parentRow,isDeletable:ia.isDeletable, +index:N,defVal:ia.defVal,countProperty:ia.countProperty,size:ia.size},0==N%2,ia.flipBkg),C.parentNode.insertBefore(Ma,C.nextSibling),C=Ma;t.appendChild(ma);Fa();return t};StyleFormatPanel.prototype.addStyles=function(t){function C(ia){mxEvent.addListener(ia,"mouseenter",function(){ia.style.opacity="1"});mxEvent.addListener(ia,"mouseleave",function(){ia.style.opacity="0.5"})}var N=this.editorUi,R=N.editor.graph,O=document.createElement("div");O.style.whiteSpace="nowrap";O.style.paddingLeft="24px"; +O.style.paddingRight="20px";t.style.paddingLeft="16px";t.style.paddingBottom="6px";t.style.position="relative";t.appendChild(O);var P="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),S=document.createElement("div");S.style.whiteSpace="nowrap";S.style.position="relative";S.style.textAlign="center";S.style.width="210px";for(var X=[],aa=0;aa<this.defaultColorSchemes.length;aa++){var Y= +document.createElement("div");Y.style.display="inline-block";Y.style.width="6px";Y.style.height="6px";Y.style.marginLeft="4px";Y.style.marginRight="3px";Y.style.borderRadius="3px";Y.style.cursor="pointer";Y.style.background="transparent";Y.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ia){mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){Z(ia)}))})(aa);X.push(Y);S.appendChild(Y)}var Z=mxUtils.bind(this,function(ia){null!=X[ia]&&(null!=this.format.currentScheme&&null!=X[this.format.currentScheme]&& +(X[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ia,ba(this.defaultColorSchemes[this.format.currentScheme]),X[this.format.currentScheme].style.background="#84d7ff")}),ba=mxUtils.bind(this,function(ia){var pa=mxUtils.bind(this,function(Fa){var Ga=mxUtils.button("",mxUtils.bind(this,function(va){R.getModel().beginUpdate();try{for(var Ea=N.getSelectionState().cells,Ba=0;Ba<Ea.length;Ba++){for(var za=R.getModel().getStyle(Ea[Ba]),Da=0;Da<P.length;Da++)za=mxUtils.removeStylename(za, +P[Da]);var la=R.getModel().isVertex(Ea[Ba])?R.defaultVertexStyle:R.defaultEdgeStyle;null!=Fa?(mxEvent.isShiftDown(va)||(za=""==Fa.fill?mxUtils.setStyle(za,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(za,mxConstants.STYLE_FILLCOLOR,Fa.fill||mxUtils.getValue(la,mxConstants.STYLE_FILLCOLOR,null)),za=mxUtils.setStyle(za,mxConstants.STYLE_GRADIENTCOLOR,Fa.gradient||mxUtils.getValue(la,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(va)||mxClient.IS_MAC&&mxEvent.isMetaDown(va)||!R.getModel().isVertex(Ea[Ba])|| +(za=mxUtils.setStyle(za,mxConstants.STYLE_FONTCOLOR,Fa.font||mxUtils.getValue(la,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(va)||(za=""==Fa.stroke?mxUtils.setStyle(za,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(za,mxConstants.STYLE_STROKECOLOR,Fa.stroke||mxUtils.getValue(la,mxConstants.STYLE_STROKECOLOR,null)))):(za=mxUtils.setStyle(za,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(la,mxConstants.STYLE_FILLCOLOR,"#ffffff")),za=mxUtils.setStyle(za,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(la, +mxConstants.STYLE_STROKECOLOR,"#000000")),za=mxUtils.setStyle(za,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(la,mxConstants.STYLE_GRADIENTCOLOR,null)),R.getModel().isVertex(Ea[Ba])&&(za=mxUtils.setStyle(za,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(la,mxConstants.STYLE_FONTCOLOR,null))));R.getModel().setStyle(Ea[Ba],za)}}finally{R.getModel().endUpdate()}}));Ga.className="geStyleButton";Ga.style.width="36px";Ga.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ga.style.margin="0px 6px 6px 0px"; +if(null!=Fa){var xa="1"==urlParams.sketch?"2px solid":"1px solid";null!=Fa.border&&(xa=Fa.border);null!=Fa.gradient?mxClient.IS_IE&&10>document.documentMode?Ga.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Fa.fill+"', EndColorStr='"+Fa.gradient+"', GradientType=0)":Ga.style.backgroundImage="linear-gradient("+Fa.fill+" 0px,"+Fa.gradient+" 100%)":Fa.fill==mxConstants.NONE?Ga.style.background="url('"+Dialog.prototype.noColorImage+"')":Ga.style.backgroundColor=""==Fa.fill? +mxUtils.getValue(R.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Fa.fill||mxUtils.getValue(R.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Ga.style.border=Fa.stroke==mxConstants.NONE?xa+" transparent":""==Fa.stroke?xa+" "+mxUtils.getValue(R.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):xa+" "+(Fa.stroke||mxUtils.getValue(R.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR, +Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Fa.title&&Ga.setAttribute("title",Fa.title)}else{xa=mxUtils.getValue(R.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Ma=mxUtils.getValue(R.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Ga.style.backgroundColor=xa;Ga.style.border="1px solid "+Ma}Ga.style.borderRadius="0";O.appendChild(Ga)});O.innerText="";for(var na=0;na<ia.length;na++)0<na&&0==mxUtils.mod(na,4)&&mxUtils.br(O),pa(ia[na])});null==this.format.currentScheme? +Z(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):Z(this.format.currentScheme);aa=10>=this.defaultColorSchemes.length?28:8;var ea=document.createElement("div");ea.style.cssText="position:absolute;left:10px;top:8px;bottom:"+aa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);"; +mxEvent.addListener(ea,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var ma=document.createElement("div");ma.style.cssText="position:absolute;left:202px;top:8px;bottom:"+aa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);"; +1<this.defaultColorSchemes.length&&(t.appendChild(ea),t.appendChild(ma));mxEvent.addListener(ma,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));C(ea);C(ma);ba(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&t.appendChild(S);return t};StyleFormatPanel.prototype.addEditOps=function(t){var C=this.editorUi.getSelectionState(),N=this.editorUi.editor.graph,R=null;1==C.cells.length&&(R=mxUtils.button(mxResources.get("editStyle"), +mxUtils.bind(this,function(O){this.editorUi.actions.get("editStyle").funct()})),R.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),R.style.width="210px",R.style.marginBottom="2px",t.appendChild(R));N=1==C.cells.length?N.view.getState(C.cells[0]):null;null!=N&&null!=N.shape&&null!=N.shape.stencil?(C=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(O){this.editorUi.actions.get("editShape").funct()})),C.setAttribute("title", +mxResources.get("editShape")),C.style.marginBottom="2px",null==R?C.style.width="210px":(R.style.width="104px",C.style.width="104px",C.style.marginLeft="2px"),t.appendChild(C)):C.image&&0<C.cells.length&&(C=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(O){this.editorUi.actions.get("image").funct()})),C.setAttribute("title",mxResources.get("editImage")),C.style.marginBottom="2px",null==R?C.style.width="210px":(R.style.width="104px",C.style.width="104px",C.style.marginLeft="2px"), +t.appendChild(C));return t}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(t){return t.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(t){return Graph.isGoogleFontUrl(t)};Graph.createFontElement=function(t, +C){var N=Graph.fontMapping[C];null==N&&Graph.isCssFontUrl(C)?(t=document.createElement("link"),t.setAttribute("rel","stylesheet"),t.setAttribute("type","text/css"),t.setAttribute("charset","UTF-8"),t.setAttribute("href",C)):(null==N&&(N='@font-face {\nfont-family: "'+t+'";\nsrc: url("'+C+'");\n}'),t=document.createElement("style"),mxUtils.write(t,N));return t};Graph.addFont=function(t,C,N){if(null!=t&&0<t.length&&null!=C&&0<C.length){var R=t.toLowerCase();if("helvetica"!=R&&"arial"!=t&&"sans-serif"!= +R){var O=Graph.customFontElements[R];null!=O&&O.url!=C&&(O.elt.parentNode.removeChild(O.elt),O=null);null==O?(O=C,"http:"==C.substring(0,5)&&(O=PROXY_URL+"?url="+encodeURIComponent(C)),O={name:t,url:C,elt:Graph.createFontElement(t,O)},Graph.customFontElements[R]=O,Graph.recentCustomFonts[R]=O,C=document.getElementsByTagName("head")[0],null!=N&&("link"==O.elt.nodeName.toLowerCase()?(O.elt.onload=N,O.elt.onerror=N):N()),null!=C&&C.appendChild(O.elt)):null!=N&&N()}else null!=N&&N()}else null!=N&&N(); +return t};Graph.getFontUrl=function(t,C){t=Graph.customFontElements[t.toLowerCase()];null!=t&&(C=t.url);return C};Graph.processFontAttributes=function(t){t=t.getElementsByTagName("*");for(var C=0;C<t.length;C++){var N=t[C].getAttribute("data-font-src");if(null!=N){var R="FONT"==t[C].nodeName?t[C].getAttribute("face"):t[C].style.fontFamily;null!=R&&Graph.addFont(R,N)}}};Graph.processFontStyle=function(t){if(null!=t){var C=mxUtils.getValue(t,"fontSource",null);if(null!=C){var N=mxUtils.getValue(t,mxConstants.STYLE_FONTFAMILY, +null);null!=N&&Graph.addFont(N,decodeURIComponent(C))}}return t};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!= +urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var A=Graph.prototype.init;Graph.prototype.init=function(){function t(O){C=O}A.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var C=null;mxEvent.addListener(this.container,"mouseenter",t);mxEvent.addListener(this.container,"mousemove",t);mxEvent.addListener(this.container,"mouseleave",function(O){C=null});this.isMouseInsertPoint=function(){return null!=C};var N=this.getInsertPoint; +this.getInsertPoint=function(){return null!=C?this.getPointForEvent(C):N.apply(this,arguments)};var R=this.layoutManager.getLayout;this.layoutManager.getLayout=function(O){var P=this.graph.getCellStyle(O);if(null!=P&&"rack"==P.childLayout){var S=new mxStackLayout(this.graph,!1);S.gridSize=null!=P.rackUnitSize?parseFloat(P.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;S.marginLeft=P.marginLeft||0;S.marginRight=P.marginRight||0;S.marginTop=P.marginTop||0;S.marginBottom= +P.marginBottom||0;S.allowGaps=P.allowGaps||0;S.horizontal="1"==mxUtils.getValue(P,"horizontalRack","0");S.resizeParent=!1;S.fill=!0;return S}return R.apply(this,arguments)};this.updateGlobalUrlVariables()};var E=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(t,C){return Graph.processFontStyle(E.apply(this,arguments))};var z=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(t,C,N,R,O,P,S,X,aa,Y,Z){z.apply(this,arguments);Graph.processFontAttributes(Z)}; +var B=mxText.prototype.redraw;mxText.prototype.redraw=function(){B.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(t,C,N){function R(){for(var ia=S.getSelectionCells(),pa=[],na=0;na<ia.length;na++)S.isCellVisible(ia[na])&&pa.push(ia[na]);S.setSelectionCells(pa)}function O(ia){S.setHiddenTags(ia?[]:X.slice());R();S.refresh()}function P(ia,pa){Y.innerText="";if(0<ia.length){var na=document.createElement("table"); +na.setAttribute("cellpadding","2");na.style.boxSizing="border-box";na.style.tableLayout="fixed";na.style.width="100%";var Fa=document.createElement("tbody");if(null!=ia&&0<ia.length)for(var Ga=0;Ga<ia.length;Ga++)(function(xa){var Ma=0>mxUtils.indexOf(S.hiddenTags,xa),va=document.createElement("tr"),Ea=document.createElement("td");Ea.style.align="center";Ea.style.width="16px";var Ba=document.createElement("img");Ba.setAttribute("src",Ma?Editor.visibleImage:Editor.hiddenImage);Ba.setAttribute("title", +mxResources.get(Ma?"hideIt":"show",[xa]));mxUtils.setOpacity(Ba,Ma?75:25);Ba.style.verticalAlign="middle";Ba.style.cursor="pointer";Ba.style.width="16px";if(C||Editor.isDarkMode())Ba.style.filter="invert(100%)";Ea.appendChild(Ba);mxEvent.addListener(Ba,"click",function(Da){mxEvent.isShiftDown(Da)?O(0<=mxUtils.indexOf(S.hiddenTags,xa)):(S.toggleHiddenTag(xa),R(),S.refresh());mxEvent.consume(Da)});va.appendChild(Ea);Ea=document.createElement("td");Ea.style.overflow="hidden";Ea.style.whiteSpace="nowrap"; +Ea.style.textOverflow="ellipsis";Ea.style.verticalAlign="middle";Ea.style.cursor="pointer";Ea.setAttribute("title",xa);a=document.createElement("a");mxUtils.write(a,xa);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Ma?100:40);Ea.appendChild(a);mxEvent.addListener(Ea,"click",function(Da){if(mxEvent.isShiftDown(Da)){O(!0);var la=S.getCellsForTags([xa],null,null,!0);S.isEnabled()?S.setSelectionCells(la):S.highlightCells(la)}else if(Ma&&0<S.hiddenTags.length)O(!0);else{la= +X.slice();var Ha=mxUtils.indexOf(la,xa);la.splice(Ha,1);S.setHiddenTags(la);R();S.refresh()}mxEvent.consume(Da)});va.appendChild(Ea);if(S.isEnabled()){Ea=document.createElement("td");Ea.style.verticalAlign="middle";Ea.style.textAlign="center";Ea.style.width="18px";if(null==pa){Ea.style.align="center";Ea.style.width="16px";Ba=document.createElement("img");Ba.setAttribute("src",Editor.crossImage);Ba.setAttribute("title",mxResources.get("removeIt",[xa]));mxUtils.setOpacity(Ba,Ma?75:25);Ba.style.verticalAlign= +"middle";Ba.style.cursor="pointer";Ba.style.width="16px";if(C||Editor.isDarkMode())Ba.style.filter="invert(100%)";mxEvent.addListener(Ba,"click",function(Da){var la=mxUtils.indexOf(X,xa);0<=la&&X.splice(la,1);S.removeTagsForCells(S.model.getDescendants(S.model.getRoot()),[xa]);S.refresh();mxEvent.consume(Da)});Ea.appendChild(Ba)}else{var za=document.createElement("input");za.setAttribute("type","checkbox");za.style.margin="0px";za.defaultChecked=null!=pa&&0<=mxUtils.indexOf(pa,xa);za.checked=za.defaultChecked; +za.style.background="transparent";za.setAttribute("title",mxResources.get(za.defaultChecked?"removeIt":"add",[xa]));mxEvent.addListener(za,"change",function(Da){za.checked?S.addTagsForCells(S.getSelectionCells(),[xa]):S.removeTagsForCells(S.getSelectionCells(),[xa]);mxEvent.consume(Da)});Ea.appendChild(za)}va.appendChild(Ea)}Fa.appendChild(va)})(ia[Ga]);na.appendChild(Fa);Y.appendChild(na)}}var S=this,X=S.hiddenTags.slice(),aa=document.createElement("div");aa.style.userSelect="none";aa.style.overflow= +"hidden";aa.style.padding="10px";aa.style.height="100%";var Y=document.createElement("div");Y.style.boxSizing="border-box";Y.style.borderRadius="4px";Y.style.userSelect="none";Y.style.overflow="auto";Y.style.position="absolute";Y.style.left="10px";Y.style.right="10px";Y.style.top="10px";Y.style.border=S.isEnabled()?"1px solid #808080":"none";Y.style.bottom=S.isEnabled()?"48px":"10px";aa.appendChild(Y);var Z=mxUtils.button(mxResources.get("reset"),function(ia){S.setHiddenTags([]);mxEvent.isShiftDown(ia)|| +(X=S.hiddenTags.slice());R();S.refresh()});Z.setAttribute("title",mxResources.get("reset"));Z.className="geBtn";Z.style.margin="0 4px 0 0";var ba=mxUtils.button(mxResources.get("add"),function(){null!=N&&N(X,function(ia){X=ia;ea()})});ba.setAttribute("title",mxResources.get("add"));ba.className="geBtn";ba.style.margin="0";S.addListener(mxEvent.ROOT,function(){X=S.hiddenTags.slice()});var ea=mxUtils.bind(this,function(ia,pa){if(t()){ia=S.getAllTags();for(pa=0;pa<ia.length;pa++)0>mxUtils.indexOf(X, +ia[pa])&&X.push(ia[pa]);X.sort();S.isSelectionEmpty()?P(X):P(X,S.getCommonTagsForCells(S.getSelectionCells()))}});S.selectionModel.addListener(mxEvent.CHANGE,ea);S.model.addListener(mxEvent.CHANGE,ea);S.addListener(mxEvent.REFRESH,ea);var ma=document.createElement("div");ma.style.boxSizing="border-box";ma.style.whiteSpace="nowrap";ma.style.position="absolute";ma.style.overflow="hidden";ma.style.bottom="0px";ma.style.height="42px";ma.style.right="10px";ma.style.left="10px";S.isEnabled()&&(ma.appendChild(Z), +ma.appendChild(ba),aa.appendChild(ma));return{div:aa,refresh:ea}};Graph.prototype.getCustomFonts=function(){var t=this.extFonts;t=null!=t?t.slice():[];for(var C in Graph.customFontElements){var N=Graph.customFontElements[C];t.push({name:N.name,url:N.url})}return t};Graph.prototype.setFont=function(t,C){Graph.addFont(t,C);document.execCommand("fontname",!1,t);if(null!=C){var N=this.cellEditor.textarea.getElementsByTagName("font");C=Graph.getFontUrl(t,C);for(var R=0;R<N.length;R++)N[R].getAttribute("face")== +t&&N[R].getAttribute("data-font-src")!=C&&N[R].setAttribute("data-font-src",C)}};var J=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return J.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var t=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=t)for(var C in t)this.globalVars[C]= +t[C]}catch(N){null!=window.console&&console.log("Error in vars URL parameter: "+N)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var M=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(t){var C=M.apply(this,arguments);null==C&&null!=this.globalVars&&(C=this.globalVars[t]);return C};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var t=this.themes["default-style2"];this.defaultStylesheet= +(new mxCodec(t.ownerDocument)).decode(t)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var v=Graph.prototype.getSvg;Graph.prototype.getSvg=function(t,C,N,R,O,P,S,X,aa,Y,Z,ba,ea,ma){var ia=null,pa=null,na=null;ba||null==this.themes||"darkTheme"!=this.defaultThemeName||(ia=this.stylesheet,pa=this.shapeForegroundColor,na=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor= +"darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Fa=v.apply(this,arguments),Ga=this.getCustomFonts();if(Z&&0<Ga.length){var xa=Fa.ownerDocument,Ma=null!=xa.createElementNS?xa.createElementNS(mxConstants.NS_SVG,"style"):xa.createElement("style");null!=xa.setAttributeNS?Ma.setAttributeNS("type","text/css"):Ma.setAttribute("type","text/css");for(var va="",Ea="",Ba=0;Ba<Ga.length;Ba++){var za=Ga[Ba].name,Da=Ga[Ba].url;Graph.isCssFontUrl(Da)? +va+="@import url("+Da+");\n":Ea+='@font-face {\nfont-family: "'+za+'";\nsrc: url("'+Da+'");\n}\n'}Ma.appendChild(xa.createTextNode(va+Ea));Fa.getElementsByTagName("defs")[0].appendChild(Ma)}this.mathEnabled&&(document.body.appendChild(Fa),Editor.MathJaxRender(Fa),Fa.parentNode.removeChild(Fa));null!=ia&&(this.shapeBackgroundColor=na,this.shapeForegroundColor=pa,this.stylesheet=ia,this.refresh());return Fa};var u=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(t){u.apply(this, +arguments);null!=t.secondLabel&&(t.secondLabel.destroy(),t.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(t){return[t.shape,t.text,t.secondLabel,t.control]};var G=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){G.apply(this,arguments);this.enumerationState=0};var I=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(t){null!=t.shape&&this.redrawEnumerationState(t);return I.apply(this,arguments)}; +mxGraphView.prototype.createEnumerationValue=function(t){t=decodeURIComponent(mxUtils.getValue(t.style,"enumerateValue",""));""==t&&(t=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(t)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(t){var C="1"==mxUtils.getValue(t.style,"enumerate",0);C&&null==t.secondLabel?(t.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM), +t.secondLabel.size=12,t.secondLabel.state=t,t.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(t,t.secondLabel)):C||null==t.secondLabel||(t.secondLabel.destroy(),t.secondLabel=null);C=t.secondLabel;if(null!=C){var N=t.view.scale,R=this.createEnumerationValue(t);t=this.graph.model.isVertex(t.cell)?new mxRectangle(t.x+t.width-4*N,t.y+4*N,0,0):mxRectangle.fromPoint(t.view.getPoint(t));C.bounds.equals(t)&&C.value==R&&C.scale==N||(C.bounds=t,C.value=R,C.scale= +N,C.redraw())}};var F=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){F.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var t=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName|| +this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",t.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,t.ownerSVGElement))}};var L=Graph.prototype.refresh;Graph.prototype.refresh=function(){L.apply(this, +arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var K=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){K.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(t){"data:action/json,"==t.substring(0,17)&&(t=JSON.parse(t.substring(17)),null!= +t.actions&&this.executeCustomActions(t.actions))};Graph.prototype.executeCustomActions=function(t,C){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var N=!1,R=0,O=0,P=mxUtils.bind(this,function(){N||(N=!0,this.model.beginUpdate())}),S=mxUtils.bind(this, +function(){N&&(N=!1,this.model.endUpdate())}),X=mxUtils.bind(this,function(){0<R&&R--;0==R&&aa()}),aa=mxUtils.bind(this,function(){if(O<t.length){var Y=this.stoppingCustomActions,Z=t[O++],ba=[];if(null!=Z.open)if(S(),this.isCustomLink(Z.open)){if(!this.customLinkClicked(Z.open))return}else this.openLink(Z.open);null==Z.wait||Y||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;X()}),R++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction, ""!=Z.wait?parseInt(Z.wait):1E3),S());null!=Z.opacity&&null!=Z.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Z.opacity,!0)),Z.opacity.value);null!=Z.fadeIn&&(R++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeIn,!0)),0,1,X,Y?0:Z.fadeIn.delay));null!=Z.fadeOut&&(R++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeOut,!0)),1,0,X,Y?0:Z.fadeOut.delay));null!=Z.wipeIn&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeIn, -!0),!0)));null!=Z.wipeOut&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeOut,!0),!1)));null!=Z.toggle&&(Q(),this.toggleCells(this.getCellsForAction(Z.toggle,!0)));if(null!=Z.show){Q();var fa=this.getCellsForAction(Z.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(fa),1);this.setCellsVisible(fa,!0)}null!=Z.hide&&(Q(),fa=this.getCellsForAction(Z.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(fa),0),this.setCellsVisible(fa,!1));null!=Z.toggleStyle&&null!=Z.toggleStyle.key&& -(Q(),this.toggleCellStyles(Z.toggleStyle.key,null!=Z.toggleStyle.defaultValue?Z.toggleStyle.defaultValue:"0",this.getCellsForAction(Z.toggleStyle,!0)));null!=Z.style&&null!=Z.style.key&&(Q(),this.setCellStyles(Z.style.key,Z.style.value,this.getCellsForAction(Z.style,!0)));fa=[];null!=Z.select&&this.isEnabled()&&(fa=this.getCellsForAction(Z.select),this.setSelectionCells(fa));null!=Z.highlight&&(fa=this.getCellsForAction(Z.highlight),this.highlightCells(fa,Z.highlight.color,Z.highlight.duration,Z.highlight.opacity)); -null!=Z.scroll&&(fa=this.getCellsForAction(Z.scroll));null!=Z.viewbox&&this.fitWindow(Z.viewbox,Z.viewbox.border);0<fa.length&&this.scrollCellToVisible(fa[0]);if(null!=Z.tags){fa=[];null!=Z.tags.hidden&&(fa=fa.concat(Z.tags.hidden));if(null!=Z.tags.visible)for(var ka=this.getAllTags(),ha=0;ha<ka.length;ha++)0>mxUtils.indexOf(Z.tags.visible,ka[ha])&&0>mxUtils.indexOf(fa,ka[ha])&&fa.push(ka[ha]);this.setHiddenTags(fa);this.refresh()}0<ba.length&&(R++,this.executeAnimations(ba,X,Y?1:Z.steps,Y?0:Z.delay)); -0==R?aa():S()}else this.stoppingCustomActions=this.executingCustomActions=!1,S(),null!=D&&D()});aa()}};Graph.prototype.doUpdateCustomLinksForCell=function(q,D){var L=this.getLinkForCell(D);null!=L&&"data:action/json,"==L.substring(0,17)&&this.setLinkForCell(D,this.updateCustomLink(q,L));if(this.isHtmlLabel(D)){var R=document.createElement("div");R.innerHTML=this.sanitizeHtml(this.getLabel(D));for(var O=R.getElementsByTagName("a"),Q=!1,S=0;S<O.length;S++)L=O[S].getAttribute("href"),null!=L&&"data:action/json,"== -L.substring(0,17)&&(O[S].setAttribute("href",this.updateCustomLink(q,L)),Q=!0);Q&&this.labelChanged(D,R.innerHTML)}};Graph.prototype.updateCustomLink=function(q,D){if("data:action/json,"==D.substring(0,17))try{var L=JSON.parse(D.substring(17));null!=L.actions&&(this.updateCustomLinkActions(q,L.actions),D="data:action/json,"+JSON.stringify(L))}catch(R){}return D};Graph.prototype.updateCustomLinkActions=function(q,D){for(var L=0;L<D.length;L++){var R=D[L],O;for(O in R)this.updateCustomLinkAction(q, -R[O],"cells"),this.updateCustomLinkAction(q,R[O],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(q,D,L){if(null!=D&&null!=D[L]){for(var R=[],O=0;O<D[L].length;O++)if("*"==D[L][O])R.push(D[L][O]);else{var Q=q[D[L][O]];null!=Q?""!=Q&&R.push(Q):R.push(D[L][O])}D[L]=R}};Graph.prototype.getCellsForAction=function(q,D){D=this.getCellsById(q.cells).concat(this.getCellsForTags(q.tags,null,D));if(null!=q.excludeCells){for(var L=[],R=0;R<D.length;R++)0>q.excludeCells.indexOf(D[R].id)&&L.push(D[R]); -D=L}return D};Graph.prototype.getCellsById=function(q){var D=[];if(null!=q)for(var L=0;L<q.length;L++)if("*"==q[L]){var R=this.model.getRoot();D=D.concat(this.model.filterDescendants(function(Q){return Q!=R},R))}else{var O=this.model.getCell(q[L]);null!=O&&D.push(O)}return D};var F=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(q){return F.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(q))};Graph.prototype.setHiddenTags=function(q){this.hiddenTags=q;this.fireEvent(new mxEventObject("hiddenTagsChanged"))}; -Graph.prototype.toggleHiddenTag=function(q){var D=mxUtils.indexOf(this.hiddenTags,q);0>D?this.hiddenTags.push(q):0<=D&&this.hiddenTags.splice(D,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(q){if(null==q||0==q.length||0==this.hiddenTags.length)return!1;q=q.split(" ");if(q.length>this.hiddenTags.length)return!1;for(var D=0;D<q.length;D++)if(0>mxUtils.indexOf(this.hiddenTags,q[D]))return!1;return!0};Graph.prototype.getCellsForTags=function(q,D,L, -R){var O=[];if(null!=q){D=null!=D?D:this.model.getDescendants(this.model.getRoot());for(var Q=0,S={},X=0;X<q.length;X++)0<q[X].length&&(S[q[X]]=!0,Q++);for(X=0;X<D.length;X++)if(L&&this.model.getParent(D[X])==this.model.root||this.model.isVertex(D[X])||this.model.isEdge(D[X])){var aa=this.getTagsForCell(D[X]),Y=!1;if(0<aa.length&&(aa=aa.split(" "),aa.length>=q.length)){for(var Z=Y=0;Z<aa.length&&Y<Q;Z++)null!=S[aa[Z]]&&Y++;Y=Y==Q}Y&&(1!=R||this.isCellVisible(D[X]))&&O.push(D[X])}}return O};Graph.prototype.getAllTags= -function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(q){for(var D=null,L=[],R=0;R<q.length;R++){var O=this.getTagsForCell(q[R]);L=[];if(0<O.length){O=O.split(" ");for(var Q={},S=0;S<O.length;S++)if(null==D||null!=D[O[S]])Q[O[S]]=!0,L.push(O[S]);D=Q}else return[]}return L};Graph.prototype.getTagsForCells=function(q){for(var D=[],L={},R=0;R<q.length;R++){var O=this.getTagsForCell(q[R]);if(0<O.length){O=O.split(" ");for(var Q= -0;Q<O.length;Q++)null==L[O[Q]]&&(L[O[Q]]=!0,D.push(O[Q]))}}return D};Graph.prototype.getTagsForCell=function(q){return this.getAttributeForCell(q,"tags","")};Graph.prototype.addTagsForCells=function(q,D){if(0<q.length&&0<D.length){this.model.beginUpdate();try{for(var L=0;L<q.length;L++){for(var R=this.getTagsForCell(q[L]),O=R.split(" "),Q=!1,S=0;S<D.length;S++){var X=mxUtils.trim(D[S]);""!=X&&0>mxUtils.indexOf(O,X)&&(R=0<R.length?R+" "+X:X,Q=!0)}Q&&this.setAttributeForCell(q[L],"tags",R)}}finally{this.model.endUpdate()}}}; -Graph.prototype.removeTagsForCells=function(q,D){if(0<q.length&&0<D.length){this.model.beginUpdate();try{for(var L=0;L<q.length;L++){var R=this.getTagsForCell(q[L]);if(0<R.length){for(var O=R.split(" "),Q=!1,S=0;S<D.length;S++){var X=mxUtils.indexOf(O,D[S]);0<=X&&(O.splice(X,1),Q=!0)}Q&&this.setAttributeForCell(q[L],"tags",O.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(q){this.model.beginUpdate();try{for(var D=0;D<q.length;D++)this.model.setVisible(q[D],!this.model.isVisible(q[D]))}finally{this.model.endUpdate()}}; -Graph.prototype.setCellsVisible=function(q,D){this.model.beginUpdate();try{for(var L=0;L<q.length;L++)this.model.setVisible(q[L],D)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(q,D,L,R){for(var O=0;O<q.length;O++)this.highlightCell(q[O],D,L,R)};Graph.prototype.highlightCell=function(q,D,L,R,O){D=null!=D?D:mxConstants.DEFAULT_VALID_COLOR;L=null!=L?L:1E3;q=this.view.getState(q);var Q=null;null!=q&&(O=null!=O?O:4,O=Math.max(O+1,mxUtils.getValue(q.style,mxConstants.STYLE_STROKEWIDTH, -1)+O),Q=new mxCellHighlight(this,D,O,!1),null!=R&&(Q.opacity=R),Q.highlight(q),window.setTimeout(function(){null!=Q.shape&&(mxUtils.setPrefixedStyle(Q.shape.node.style,"transition","all 1200ms ease-in-out"),Q.shape.node.style.opacity=0);window.setTimeout(function(){Q.destroy()},1200)},L));return Q};Graph.prototype.addSvgShadow=function(q,D,L,R){L=null!=L?L:!1;R=null!=R?R:!0;var O=q.ownerDocument,Q=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"filter"):O.createElement("filter");Q.setAttribute("id", -this.shadowId);var S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):O.createElement("feGaussianBlur");S.setAttribute("in","SourceAlpha");S.setAttribute("stdDeviation",this.svgShadowBlur);S.setAttribute("result","blur");Q.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feOffset"):O.createElement("feOffset");S.setAttribute("in","blur");S.setAttribute("dx",this.svgShadowSize);S.setAttribute("dy",this.svgShadowSize);S.setAttribute("result", -"offsetBlur");Q.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feFlood"):O.createElement("feFlood");S.setAttribute("flood-color",this.svgShadowColor);S.setAttribute("flood-opacity",this.svgShadowOpacity);S.setAttribute("result","offsetColor");Q.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feComposite"):O.createElement("feComposite");S.setAttribute("in","offsetColor");S.setAttribute("in2","offsetBlur");S.setAttribute("operator","in"); -S.setAttribute("result","offsetBlur");Q.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feBlend"):O.createElement("feBlend");S.setAttribute("in","SourceGraphic");S.setAttribute("in2","offsetBlur");Q.appendChild(S);S=q.getElementsByTagName("defs");0==S.length?(O=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"defs"):O.createElement("defs"),null!=q.firstChild?q.insertBefore(O,q.firstChild):q.appendChild(O)):O=S[0];O.appendChild(Q);L||(D=null!=D?D:q.getElementsByTagName("g")[0], -null!=D&&(D.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(q.getAttribute("width")))&&R&&(q.setAttribute("width",parseInt(q.getAttribute("width"))+6),q.setAttribute("height",parseInt(q.getAttribute("height"))+6),D=q.getAttribute("viewBox"),null!=D&&0<D.length&&(D=D.split(" "),3<D.length&&(w=parseFloat(D[2])+6,h=parseFloat(D[3])+6,q.setAttribute("viewBox",D[0]+" "+D[1]+" "+w+" "+h))))));return Q};Graph.prototype.setShadowVisible=function(q,D){mxClient.IS_SVG&&!mxClient.IS_SF&&(D= -null!=D?D:!0,(this.shadowVisible=q)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),D&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var q=this.model.getChildCount(this.model.root),D=0;do var L=this.model.getChildAt(this.model.root,D);while(D++<q&&"1"==mxUtils.getValue(this.getCellStyle(L),"locked","0"));null!=L&&this.setDefaultParent(L)}}; +!0),!0)));null!=Z.wipeOut&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeOut,!0),!1)));null!=Z.toggle&&(P(),this.toggleCells(this.getCellsForAction(Z.toggle,!0)));if(null!=Z.show){P();var ea=this.getCellsForAction(Z.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(ea),1);this.setCellsVisible(ea,!0)}null!=Z.hide&&(P(),ea=this.getCellsForAction(Z.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(ea),0),this.setCellsVisible(ea,!1));null!=Z.toggleStyle&&null!=Z.toggleStyle.key&& +(P(),this.toggleCellStyles(Z.toggleStyle.key,null!=Z.toggleStyle.defaultValue?Z.toggleStyle.defaultValue:"0",this.getCellsForAction(Z.toggleStyle,!0)));null!=Z.style&&null!=Z.style.key&&(P(),this.setCellStyles(Z.style.key,Z.style.value,this.getCellsForAction(Z.style,!0)));ea=[];null!=Z.select&&this.isEnabled()&&(ea=this.getCellsForAction(Z.select),this.setSelectionCells(ea));null!=Z.highlight&&(ea=this.getCellsForAction(Z.highlight),this.highlightCells(ea,Z.highlight.color,Z.highlight.duration,Z.highlight.opacity)); +null!=Z.scroll&&(ea=this.getCellsForAction(Z.scroll));null!=Z.viewbox&&this.fitWindow(Z.viewbox,Z.viewbox.border);0<ea.length&&this.scrollCellToVisible(ea[0]);if(null!=Z.tags){ea=[];null!=Z.tags.hidden&&(ea=ea.concat(Z.tags.hidden));if(null!=Z.tags.visible)for(var ma=this.getAllTags(),ia=0;ia<ma.length;ia++)0>mxUtils.indexOf(Z.tags.visible,ma[ia])&&0>mxUtils.indexOf(ea,ma[ia])&&ea.push(ma[ia]);this.setHiddenTags(ea);this.refresh()}0<ba.length&&(R++,this.executeAnimations(ba,X,Y?1:Z.steps,Y?0:Z.delay)); +0==R?aa():S()}else this.stoppingCustomActions=this.executingCustomActions=!1,S(),null!=C&&C()});aa()}};Graph.prototype.doUpdateCustomLinksForCell=function(t,C){var N=this.getLinkForCell(C);null!=N&&"data:action/json,"==N.substring(0,17)&&this.setLinkForCell(C,this.updateCustomLink(t,N));if(this.isHtmlLabel(C)){var R=document.createElement("div");R.innerHTML=this.sanitizeHtml(this.getLabel(C));for(var O=R.getElementsByTagName("a"),P=!1,S=0;S<O.length;S++)N=O[S].getAttribute("href"),null!=N&&"data:action/json,"== +N.substring(0,17)&&(O[S].setAttribute("href",this.updateCustomLink(t,N)),P=!0);P&&this.labelChanged(C,R.innerHTML)}};Graph.prototype.updateCustomLink=function(t,C){if("data:action/json,"==C.substring(0,17))try{var N=JSON.parse(C.substring(17));null!=N.actions&&(this.updateCustomLinkActions(t,N.actions),C="data:action/json,"+JSON.stringify(N))}catch(R){}return C};Graph.prototype.updateCustomLinkActions=function(t,C){for(var N=0;N<C.length;N++){var R=C[N],O;for(O in R)this.updateCustomLinkAction(t, +R[O],"cells"),this.updateCustomLinkAction(t,R[O],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(t,C,N){if(null!=C&&null!=C[N]){for(var R=[],O=0;O<C[N].length;O++)if("*"==C[N][O])R.push(C[N][O]);else{var P=t[C[N][O]];null!=P?""!=P&&R.push(P):R.push(C[N][O])}C[N]=R}};Graph.prototype.getCellsForAction=function(t,C){C=this.getCellsById(t.cells).concat(this.getCellsForTags(t.tags,null,C));if(null!=t.excludeCells){for(var N=[],R=0;R<C.length;R++)0>t.excludeCells.indexOf(C[R].id)&&N.push(C[R]); +C=N}return C};Graph.prototype.getCellsById=function(t){var C=[];if(null!=t)for(var N=0;N<t.length;N++)if("*"==t[N]){var R=this.model.getRoot();C=C.concat(this.model.filterDescendants(function(P){return P!=R},R))}else{var O=this.model.getCell(t[N]);null!=O&&C.push(O)}return C};var H=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(t){return H.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(t))};Graph.prototype.setHiddenTags=function(t){this.hiddenTags=t;this.fireEvent(new mxEventObject("hiddenTagsChanged"))}; +Graph.prototype.toggleHiddenTag=function(t){var C=mxUtils.indexOf(this.hiddenTags,t);0>C?this.hiddenTags.push(t):0<=C&&this.hiddenTags.splice(C,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(t){if(null==t||0==t.length||0==this.hiddenTags.length)return!1;t=t.split(" ");if(t.length>this.hiddenTags.length)return!1;for(var C=0;C<t.length;C++)if(0>mxUtils.indexOf(this.hiddenTags,t[C]))return!1;return!0};Graph.prototype.getCellsForTags=function(t,C,N, +R){var O=[];if(null!=t){C=null!=C?C:this.model.getDescendants(this.model.getRoot());for(var P=0,S={},X=0;X<t.length;X++)0<t[X].length&&(S[t[X]]=!0,P++);for(X=0;X<C.length;X++)if(N&&this.model.getParent(C[X])==this.model.root||this.model.isVertex(C[X])||this.model.isEdge(C[X])){var aa=this.getTagsForCell(C[X]),Y=!1;if(0<aa.length&&(aa=aa.split(" "),aa.length>=t.length)){for(var Z=Y=0;Z<aa.length&&Y<P;Z++)null!=S[aa[Z]]&&Y++;Y=Y==P}Y&&(1!=R||this.isCellVisible(C[X]))&&O.push(C[X])}}return O};Graph.prototype.getAllTags= +function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(t){for(var C=null,N=[],R=0;R<t.length;R++){var O=this.getTagsForCell(t[R]);N=[];if(0<O.length){O=O.split(" ");for(var P={},S=0;S<O.length;S++)if(null==C||null!=C[O[S]])P[O[S]]=!0,N.push(O[S]);C=P}else return[]}return N};Graph.prototype.getTagsForCells=function(t){for(var C=[],N={},R=0;R<t.length;R++){var O=this.getTagsForCell(t[R]);if(0<O.length){O=O.split(" ");for(var P= +0;P<O.length;P++)null==N[O[P]]&&(N[O[P]]=!0,C.push(O[P]))}}return C};Graph.prototype.getTagsForCell=function(t){return this.getAttributeForCell(t,"tags","")};Graph.prototype.addTagsForCells=function(t,C){if(0<t.length&&0<C.length){this.model.beginUpdate();try{for(var N=0;N<t.length;N++){for(var R=this.getTagsForCell(t[N]),O=R.split(" "),P=!1,S=0;S<C.length;S++){var X=mxUtils.trim(C[S]);""!=X&&0>mxUtils.indexOf(O,X)&&(R=0<R.length?R+" "+X:X,P=!0)}P&&this.setAttributeForCell(t[N],"tags",R)}}finally{this.model.endUpdate()}}}; +Graph.prototype.removeTagsForCells=function(t,C){if(0<t.length&&0<C.length){this.model.beginUpdate();try{for(var N=0;N<t.length;N++){var R=this.getTagsForCell(t[N]);if(0<R.length){for(var O=R.split(" "),P=!1,S=0;S<C.length;S++){var X=mxUtils.indexOf(O,C[S]);0<=X&&(O.splice(X,1),P=!0)}P&&this.setAttributeForCell(t[N],"tags",O.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(t){this.model.beginUpdate();try{for(var C=0;C<t.length;C++)this.model.setVisible(t[C],!this.model.isVisible(t[C]))}finally{this.model.endUpdate()}}; +Graph.prototype.setCellsVisible=function(t,C){this.model.beginUpdate();try{for(var N=0;N<t.length;N++)this.model.setVisible(t[N],C)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(t,C,N,R){for(var O=0;O<t.length;O++)this.highlightCell(t[O],C,N,R)};Graph.prototype.highlightCell=function(t,C,N,R,O){C=null!=C?C:mxConstants.DEFAULT_VALID_COLOR;N=null!=N?N:1E3;t=this.view.getState(t);var P=null;null!=t&&(O=null!=O?O:4,O=Math.max(O+1,mxUtils.getValue(t.style,mxConstants.STYLE_STROKEWIDTH, +1)+O),P=new mxCellHighlight(this,C,O,!1),null!=R&&(P.opacity=R),P.highlight(t),window.setTimeout(function(){null!=P.shape&&(mxUtils.setPrefixedStyle(P.shape.node.style,"transition","all 1200ms ease-in-out"),P.shape.node.style.opacity=0);window.setTimeout(function(){P.destroy()},1200)},N));return P};Graph.prototype.addSvgShadow=function(t,C,N,R){N=null!=N?N:!1;R=null!=R?R:!0;var O=t.ownerDocument,P=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"filter"):O.createElement("filter");P.setAttribute("id", +this.shadowId);var S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):O.createElement("feGaussianBlur");S.setAttribute("in","SourceAlpha");S.setAttribute("stdDeviation",this.svgShadowBlur);S.setAttribute("result","blur");P.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feOffset"):O.createElement("feOffset");S.setAttribute("in","blur");S.setAttribute("dx",this.svgShadowSize);S.setAttribute("dy",this.svgShadowSize);S.setAttribute("result", +"offsetBlur");P.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feFlood"):O.createElement("feFlood");S.setAttribute("flood-color",this.svgShadowColor);S.setAttribute("flood-opacity",this.svgShadowOpacity);S.setAttribute("result","offsetColor");P.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feComposite"):O.createElement("feComposite");S.setAttribute("in","offsetColor");S.setAttribute("in2","offsetBlur");S.setAttribute("operator","in"); +S.setAttribute("result","offsetBlur");P.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feBlend"):O.createElement("feBlend");S.setAttribute("in","SourceGraphic");S.setAttribute("in2","offsetBlur");P.appendChild(S);S=t.getElementsByTagName("defs");0==S.length?(O=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"defs"):O.createElement("defs"),null!=t.firstChild?t.insertBefore(O,t.firstChild):t.appendChild(O)):O=S[0];O.appendChild(P);N||(C=null!=C?C:t.getElementsByTagName("g")[0], +null!=C&&(C.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(t.getAttribute("width")))&&R&&(t.setAttribute("width",parseInt(t.getAttribute("width"))+6),t.setAttribute("height",parseInt(t.getAttribute("height"))+6),C=t.getAttribute("viewBox"),null!=C&&0<C.length&&(C=C.split(" "),3<C.length&&(w=parseFloat(C[2])+6,h=parseFloat(C[3])+6,t.setAttribute("viewBox",C[0]+" "+C[1]+" "+w+" "+h))))));return P};Graph.prototype.setShadowVisible=function(t,C){mxClient.IS_SVG&&!mxClient.IS_SF&&(C= +null!=C?C:!0,(this.shadowVisible=t)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),C&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var t=this.model.getChildCount(this.model.root),C=0;do var N=this.model.getChildAt(this.model.root,C);while(C++<t&&"1"==mxUtils.getValue(this.getCellStyle(N),"locked","0"));null!=N&&this.setDefaultParent(N)}}; mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4= [SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml", STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=[SHAPES_PATH+"/mxKubernetes.js",STENCIL_PATH+"/kubernetes.xml"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral= @@ -11410,319 +11407,328 @@ mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupN "/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.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.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam= [STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors= -[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(q){var D=null;null!=q&&0<q.length&&("ER"==q.substring(0,2)?D="mxgraph.er":"sysML"==q.substring(0,5)&&(D="mxgraph.sysml"));return D};var P=mxMarker.createMarker;mxMarker.createMarker=function(q,D,L,R,O,Q,S,X,aa,Y){if(null!=L&&null==mxMarker.markers[L]){var Z=this.getPackageForType(L);null!=Z&&mxStencilRegistry.getStencil(Z)}return P.apply(this,arguments)};var U=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(q, -D,L,R,O,Q){"1"==mxUtils.getValue(D.style,"lineShape",null)&&q.setFillColor(mxUtils.getValue(D.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return U.apply(this,arguments)};PrintDialog.prototype.create=function(q,D){function L(){fa.value=Math.max(1,Math.min(X,Math.max(parseInt(fa.value),parseInt(ba.value))));ba.value=Math.max(1,Math.min(X,Math.min(parseInt(fa.value),parseInt(ba.value))))}function R(va){function ta(Ka,Pa,Qa){var Oa=Ka.useCssTransforms,Sa=Ka.currentTranslate,Ua=Ka.currentScale,La= -Ka.view.translate,Ta=Ka.view.scale;Ka.useCssTransforms&&(Ka.useCssTransforms=!1,Ka.currentTranslate=new mxPoint(0,0),Ka.currentScale=1,Ka.view.translate=new mxPoint(0,0),Ka.view.scale=1);var Va=Ka.getGraphBounds(),Wa=0,$a=0,Xa=Ia.get(),ab=1/Ka.pageScale,Za=Fa.checked;if(Za){ab=parseInt(Ha.value);var gb=parseInt(ya.value);ab=Math.min(Xa.height*gb/(Va.height/Ka.view.scale),Xa.width*ab/(Va.width/Ka.view.scale))}else ab=parseInt(la.value)/(100*Ka.pageScale),isNaN(ab)&&(da=1/Ka.pageScale,la.value="100 %"); -Xa=mxRectangle.fromRectangle(Xa);Xa.width=Math.ceil(Xa.width*da);Xa.height=Math.ceil(Xa.height*da);ab*=da;!Za&&Ka.pageVisible?(Va=Ka.getPageLayout(),Wa-=Va.x*Xa.width,$a-=Va.y*Xa.height):Za=!0;if(null==Pa){Pa=PrintDialog.createPrintPreview(Ka,ab,Xa,0,Wa,$a,Za);Pa.pageSelector=!1;Pa.mathEnabled=!1;ka.checked&&(Pa.isCellVisible=function(Ya){return Ka.isCellSelected(Ya)});Wa=q.getCurrentFile();null!=Wa&&(Pa.title=Wa.getTitle());var hb=Pa.writeHead;Pa.writeHead=function(Ya){hb.apply(this,arguments);mxClient.IS_GC&& -(Ya.writeln('<style type="text/css">'),Ya.writeln("@media print {"),Ya.writeln(".MathJax svg { shape-rendering: crispEdges; }"),Ya.writeln("}"),Ya.writeln("</style>"));null!=q.editor.fontCss&&(Ya.writeln('<style type="text/css">'),Ya.writeln(q.editor.fontCss),Ya.writeln("</style>"));for(var cb=Ka.getCustomFonts(),bb=0;bb<cb.length;bb++){var eb=cb[bb].name,db=cb[bb].url;Graph.isCssFontUrl(db)?Ya.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(db)+'" charset="UTF-8" type="text/css">'): +[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(t){var C=null;null!=t&&0<t.length&&("ER"==t.substring(0,2)?C="mxgraph.er":"sysML"==t.substring(0,5)&&(C="mxgraph.sysml"));return C};var Q=mxMarker.createMarker;mxMarker.createMarker=function(t,C,N,R,O,P,S,X,aa,Y){if(null!=N&&null==mxMarker.markers[N]){var Z=this.getPackageForType(N);null!=Z&&mxStencilRegistry.getStencil(Z)}return Q.apply(this,arguments)};var U=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(t, +C,N,R,O,P){"1"==mxUtils.getValue(C.style,"lineShape",null)&&t.setFillColor(mxUtils.getValue(C.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return U.apply(this,arguments)};PrintDialog.prototype.create=function(t,C){function N(){ea.value=Math.max(1,Math.min(X,Math.max(parseInt(ea.value),parseInt(ba.value))));ba.value=Math.max(1,Math.min(X,Math.min(parseInt(ea.value),parseInt(ba.value))))}function R(ta){function ra(Ka,Pa,Qa){var Oa=Ka.useCssTransforms,Sa=Ka.currentTranslate,Ua=Ka.currentScale,La= +Ka.view.translate,Ta=Ka.view.scale;Ka.useCssTransforms&&(Ka.useCssTransforms=!1,Ka.currentTranslate=new mxPoint(0,0),Ka.currentScale=1,Ka.view.translate=new mxPoint(0,0),Ka.view.scale=1);var Va=Ka.getGraphBounds(),Wa=0,$a=0,Xa=Ia.get(),ab=1/Ka.pageScale,Za=Fa.checked;if(Za){ab=parseInt(Ha.value);var gb=parseInt(ya.value);ab=Math.min(Xa.height*gb/(Va.height/Ka.view.scale),Xa.width*ab/(Va.width/Ka.view.scale))}else ab=parseInt(na.value)/(100*Ka.pageScale),isNaN(ab)&&(wa=1/Ka.pageScale,na.value="100 %"); +Xa=mxRectangle.fromRectangle(Xa);Xa.width=Math.ceil(Xa.width*wa);Xa.height=Math.ceil(Xa.height*wa);ab*=wa;!Za&&Ka.pageVisible?(Va=Ka.getPageLayout(),Wa-=Va.x*Xa.width,$a-=Va.y*Xa.height):Za=!0;if(null==Pa){Pa=PrintDialog.createPrintPreview(Ka,ab,Xa,0,Wa,$a,Za);Pa.pageSelector=!1;Pa.mathEnabled=!1;ma.checked&&(Pa.isCellVisible=function(Ya){return Ka.isCellSelected(Ya)});Wa=t.getCurrentFile();null!=Wa&&(Pa.title=Wa.getTitle());var hb=Pa.writeHead;Pa.writeHead=function(Ya){hb.apply(this,arguments);mxClient.IS_GC&& +(Ya.writeln('<style type="text/css">'),Ya.writeln("@media print {"),Ya.writeln(".MathJax svg { shape-rendering: crispEdges; }"),Ya.writeln("}"),Ya.writeln("</style>"));null!=t.editor.fontCss&&(Ya.writeln('<style type="text/css">'),Ya.writeln(t.editor.fontCss),Ya.writeln("</style>"));for(var cb=Ka.getCustomFonts(),bb=0;bb<cb.length;bb++){var eb=cb[bb].name,db=cb[bb].url;Graph.isCssFontUrl(db)?Ya.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(db)+'" charset="UTF-8" type="text/css">'): (Ya.writeln('<style type="text/css">'),Ya.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(eb)+'";\nsrc: url("'+mxUtils.htmlEntities(db)+'");\n}'),Ya.writeln("</style>"))}};if("undefined"!==typeof MathJax){var ib=Pa.renderPage;Pa.renderPage=function(Ya,cb,bb,eb,db,kb){var jb=mxClient.NO_FO,fb=ib.apply(this,arguments);mxClient.NO_FO=jb;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:fb.className="geDisableMathJax";return fb}}Wa=null;$a=O.shapeForegroundColor;Za=O.shapeBackgroundColor; Xa=O.enableFlowAnimation;O.enableFlowAnimation=!1;null!=O.themes&&"darkTheme"==O.defaultThemeName&&(Wa=O.stylesheet,O.stylesheet=O.getDefaultStylesheet(),O.shapeForegroundColor="#000000",O.shapeBackgroundColor="#ffffff",O.refresh());Pa.open(null,null,Qa,!0);O.enableFlowAnimation=Xa;null!=Wa&&(O.shapeForegroundColor=$a,O.shapeBackgroundColor=Za,O.stylesheet=Wa,O.refresh())}else{Xa=Ka.background;if(null==Xa||""==Xa||Xa==mxConstants.NONE)Xa="#ffffff";Pa.backgroundColor=Xa;Pa.autoOrigin=Za;Pa.appendGraph(Ka, ab,Wa,$a,Qa,!0);Qa=Ka.getCustomFonts();if(null!=Pa.wnd)for(Wa=0;Wa<Qa.length;Wa++)$a=Qa[Wa].name,Za=Qa[Wa].url,Graph.isCssFontUrl(Za)?Pa.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Za)+'" charset="UTF-8" type="text/css">'):(Pa.wnd.document.writeln('<style type="text/css">'),Pa.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities($a)+'";\nsrc: url("'+mxUtils.htmlEntities(Za)+'");\n}'),Pa.wnd.document.writeln("</style>"))}Oa&&(Ka.useCssTransforms=Oa, -Ka.currentTranslate=Sa,Ka.currentScale=Ua,Ka.view.translate=La,Ka.view.scale=Ta);return Pa}var da=parseInt(ja.value)/100;isNaN(da)&&(da=1,ja.value="100 %");da*=.75;var ca=null,na=O.shapeForegroundColor,ea=O.shapeBackgroundColor;null!=O.themes&&"darkTheme"==O.defaultThemeName&&(ca=O.stylesheet,O.stylesheet=O.getDefaultStylesheet(),O.shapeForegroundColor="#000000",O.shapeBackgroundColor="#ffffff",O.refresh());var ia=ba.value,oa=fa.value,ma=!Y.checked,xa=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(q, -Y.checked,ia,oa,Fa.checked,Ha.value,ya.value,parseInt(la.value)/100,parseInt(ja.value)/100,Ia.get());else{ma&&(ma=ka.checked||ia==aa&&oa==aa);if(!ma&&null!=q.pages&&q.pages.length){var Ea=0;ma=q.pages.length-1;Y.checked||(Ea=parseInt(ia)-1,ma=parseInt(oa)-1);for(var Ba=Ea;Ba<=ma;Ba++){var ua=q.pages[Ba];ia=ua==q.currentPage?O:null;if(null==ia){ia=q.createTemporaryGraph(O.stylesheet);ia.shapeForegroundColor=O.shapeForegroundColor;ia.shapeBackgroundColor=O.shapeBackgroundColor;oa=!0;Ea=!1;var sa=null, -Ja=null;null==ua.viewState&&null==ua.root&&q.updatePageRoot(ua);null!=ua.viewState&&(oa=ua.viewState.pageVisible,Ea=ua.viewState.mathEnabled,sa=ua.viewState.background,Ja=ua.viewState.backgroundImage,ia.extFonts=ua.viewState.extFonts);null!=Ja&&null!=Ja.originalSrc&&(Ja=q.createImageForPageLink(Ja.originalSrc,ua));ia.background=sa;ia.backgroundImage=null!=Ja?new mxImage(Ja.src,Ja.width,Ja.height,Ja.x,Ja.y):null;ia.pageVisible=oa;ia.mathEnabled=Ea;var Na=ia.getGraphBounds;ia.getGraphBounds=function(){var Ka= -Na.apply(this,arguments),Pa=this.backgroundImage;if(null!=Pa&&null!=Pa.width&&null!=Pa.height){var Qa=this.view.translate,Oa=this.view.scale;Ka=mxRectangle.fromRectangle(Ka);Ka.add(new mxRectangle((Qa.x+Pa.x)*Oa,(Qa.y+Pa.y)*Oa,Pa.width*Oa,Pa.height*Oa))}return Ka};var Ra=ia.getGlobalVariable;ia.getGlobalVariable=function(Ka){return"page"==Ka?ua.getName():"pagenumber"==Ka?Ba+1:"pagecount"==Ka?null!=q.pages?q.pages.length:1:Ra.apply(this,arguments)};document.body.appendChild(ia.container);q.updatePageRoot(ua); -ia.model.setRoot(ua.root)}xa=ta(ia,xa,Ba!=ma);ia!=O&&ia.container.parentNode.removeChild(ia.container)}}else xa=ta(O);null==xa?q.handleError({message:mxResources.get("errorUpdatingPreview")}):(xa.mathEnabled&&(ma=xa.wnd.document,va&&(xa.wnd.IMMEDIATE_PRINT=!0),ma.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),xa.closeDocument(),!xa.mathEnabled&&va&&PrintDialog.printPreview(xa));null!=ca&&(O.shapeForegroundColor=na,O.shapeBackgroundColor=ea,O.stylesheet= -ca,O.refresh())}}var O=q.editor.graph,Q=document.createElement("div"),S=document.createElement("h3");S.style.width="100%";S.style.textAlign="center";S.style.marginTop="0px";mxUtils.write(S,D||mxResources.get("print"));Q.appendChild(S);var X=1,aa=1;S=document.createElement("div");S.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var Y=document.createElement("input");Y.style.cssText="margin-right:8px;margin-bottom:8px;";Y.setAttribute("value","all");Y.setAttribute("type", -"radio");Y.setAttribute("name","pages-printdialog");S.appendChild(Y);D=document.createElement("span");mxUtils.write(D,mxResources.get("printAllPages"));S.appendChild(D);mxUtils.br(S);var Z=Y.cloneNode(!0);Y.setAttribute("checked","checked");Z.setAttribute("value","range");S.appendChild(Z);D=document.createElement("span");mxUtils.write(D,mxResources.get("pages")+":");S.appendChild(D);var ba=document.createElement("input");ba.style.cssText="margin:0 8px 0 8px;";ba.setAttribute("value","1");ba.setAttribute("type", -"number");ba.setAttribute("min","1");ba.style.width="50px";S.appendChild(ba);D=document.createElement("span");mxUtils.write(D,mxResources.get("to"));S.appendChild(D);var fa=ba.cloneNode(!0);S.appendChild(fa);mxEvent.addListener(ba,"focus",function(){Z.checked=!0});mxEvent.addListener(fa,"focus",function(){Z.checked=!0});mxEvent.addListener(ba,"change",L);mxEvent.addListener(fa,"change",L);if(null!=q.pages&&(X=q.pages.length,null!=q.currentPage))for(D=0;D<q.pages.length;D++)if(q.currentPage==q.pages[D]){aa= -D+1;ba.value=aa;fa.value=aa;break}ba.setAttribute("max",X);fa.setAttribute("max",X);q.isPagesEnabled()?1<X&&(Q.appendChild(S),Z.checked=!0):Z.checked=!0;mxUtils.br(S);var ka=document.createElement("input");ka.setAttribute("value","all");ka.setAttribute("type","radio");ka.style.marginRight="8px";O.isSelectionEmpty()&&ka.setAttribute("disabled","disabled");var ha=document.createElement("div");ha.style.marginBottom="10px";1==X?(ka.setAttribute("type","checkbox"),ka.style.marginBottom="12px",ha.appendChild(ka)): -(ka.setAttribute("name","pages-printdialog"),ka.style.marginBottom="8px",S.appendChild(ka));D=document.createElement("span");mxUtils.write(D,mxResources.get("selectionOnly"));ka.parentNode.appendChild(D);1==X&&mxUtils.br(ka.parentNode);var ra=document.createElement("input");ra.style.marginRight="8px";ra.setAttribute("value","adjust");ra.setAttribute("type","radio");ra.setAttribute("name","printZoom");ha.appendChild(ra);D=document.createElement("span");mxUtils.write(D,mxResources.get("adjustTo")); -ha.appendChild(D);var la=document.createElement("input");la.style.cssText="margin:0 8px 0 8px;";la.setAttribute("value","100 %");la.style.width="50px";ha.appendChild(la);mxEvent.addListener(la,"focus",function(){ra.checked=!0});Q.appendChild(ha);S=S.cloneNode(!1);var Fa=ra.cloneNode(!0);Fa.setAttribute("value","fit");ra.setAttribute("checked","checked");D=document.createElement("div");D.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";D.appendChild(Fa);S.appendChild(D);ha= -document.createElement("table");ha.style.display="inline-block";var Ga=document.createElement("tbody"),Aa=document.createElement("tr"),Ma=Aa.cloneNode(!0),za=document.createElement("td"),Da=za.cloneNode(!0),Ca=za.cloneNode(!0),pa=za.cloneNode(!0),qa=za.cloneNode(!0),wa=za.cloneNode(!0);za.style.textAlign="right";pa.style.textAlign="right";mxUtils.write(za,mxResources.get("fitTo"));var Ha=document.createElement("input");Ha.style.cssText="margin:0 8px 0 8px;";Ha.setAttribute("value","1");Ha.setAttribute("min", -"1");Ha.setAttribute("type","number");Ha.style.width="40px";Da.appendChild(Ha);D=document.createElement("span");mxUtils.write(D,mxResources.get("fitToSheetsAcross"));Ca.appendChild(D);mxUtils.write(pa,mxResources.get("fitToBy"));var ya=Ha.cloneNode(!0);qa.appendChild(ya);mxEvent.addListener(Ha,"focus",function(){Fa.checked=!0});mxEvent.addListener(ya,"focus",function(){Fa.checked=!0});D=document.createElement("span");mxUtils.write(D,mxResources.get("fitToSheetsDown"));wa.appendChild(D);Aa.appendChild(za); -Aa.appendChild(Da);Aa.appendChild(Ca);Ma.appendChild(pa);Ma.appendChild(qa);Ma.appendChild(wa);Ga.appendChild(Aa);Ga.appendChild(Ma);ha.appendChild(Ga);S.appendChild(ha);Q.appendChild(S);S=document.createElement("div");D=document.createElement("div");D.style.fontWeight="bold";D.style.marginBottom="12px";mxUtils.write(D,mxResources.get("paperSize"));S.appendChild(D);D=document.createElement("div");D.style.marginBottom="12px";var Ia=PageSetupDialog.addPageFormatPanel(D,"printdialog",q.editor.graph.pageFormat|| -mxConstants.PAGE_FORMAT_A4_PORTRAIT);S.appendChild(D);D=document.createElement("span");mxUtils.write(D,mxResources.get("pageScale"));S.appendChild(D);var ja=document.createElement("input");ja.style.cssText="margin:0 8px 0 8px;";ja.setAttribute("value","100 %");ja.style.width="60px";S.appendChild(ja);Q.appendChild(S);D=document.createElement("div");D.style.cssText="text-align:right;margin:48px 0 0 0;";S=mxUtils.button(mxResources.get("cancel"),function(){q.hideDialog()});S.className="geBtn";q.editor.cancelFirst&& -D.appendChild(S);q.isOffline()||(ha=mxUtils.button(mxResources.get("help"),function(){O.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),ha.className="geBtn",D.appendChild(ha));PrintDialog.previewEnabled&&(ha=mxUtils.button(mxResources.get("preview"),function(){q.hideDialog();R(!1)}),ha.className="geBtn",D.appendChild(ha));ha=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){q.hideDialog();R(!0)});ha.className="geBtn gePrimaryBtn";D.appendChild(ha);q.editor.cancelFirst|| -D.appendChild(S);Q.appendChild(D);this.container=Q};var T=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var q=this.image;null!=q&&null!=q.src&&Graph.isPageLink(q.src)&&(q={originalSrc:q.src});this.page.viewState.backgroundImage=q}null!=this.format&&(this.page.viewState.pageFormat= +Ka.currentTranslate=Sa,Ka.currentScale=Ua,Ka.view.translate=La,Ka.view.scale=Ta);return Pa}var wa=parseInt(ka.value)/100;isNaN(wa)&&(wa=1,ka.value="100 %");wa*=.75;var ca=null,fa=O.shapeForegroundColor,da=O.shapeBackgroundColor;null!=O.themes&&"darkTheme"==O.defaultThemeName&&(ca=O.stylesheet,O.stylesheet=O.getDefaultStylesheet(),O.shapeForegroundColor="#000000",O.shapeBackgroundColor="#ffffff",O.refresh());var ha=ba.value,ja=ea.value,sa=!Y.checked,oa=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(t, +Y.checked,ha,ja,Fa.checked,Ha.value,ya.value,parseInt(na.value)/100,parseInt(ka.value)/100,Ia.get());else{sa&&(sa=ma.checked||ha==aa&&ja==aa);if(!sa&&null!=t.pages&&t.pages.length){var Ca=0;sa=t.pages.length-1;Y.checked||(Ca=parseInt(ha)-1,sa=parseInt(ja)-1);for(var Aa=Ca;Aa<=sa;Aa++){var ua=t.pages[Aa];ha=ua==t.currentPage?O:null;if(null==ha){ha=t.createTemporaryGraph(O.stylesheet);ha.shapeForegroundColor=O.shapeForegroundColor;ha.shapeBackgroundColor=O.shapeBackgroundColor;ja=!0;Ca=!1;var qa=null, +Ja=null;null==ua.viewState&&null==ua.root&&t.updatePageRoot(ua);null!=ua.viewState&&(ja=ua.viewState.pageVisible,Ca=ua.viewState.mathEnabled,qa=ua.viewState.background,Ja=ua.viewState.backgroundImage,ha.extFonts=ua.viewState.extFonts);null!=Ja&&null!=Ja.originalSrc&&(Ja=t.createImageForPageLink(Ja.originalSrc,ua));ha.background=qa;ha.backgroundImage=null!=Ja?new mxImage(Ja.src,Ja.width,Ja.height,Ja.x,Ja.y):null;ha.pageVisible=ja;ha.mathEnabled=Ca;var Na=ha.getGraphBounds;ha.getGraphBounds=function(){var Ka= +Na.apply(this,arguments),Pa=this.backgroundImage;if(null!=Pa&&null!=Pa.width&&null!=Pa.height){var Qa=this.view.translate,Oa=this.view.scale;Ka=mxRectangle.fromRectangle(Ka);Ka.add(new mxRectangle((Qa.x+Pa.x)*Oa,(Qa.y+Pa.y)*Oa,Pa.width*Oa,Pa.height*Oa))}return Ka};var Ra=ha.getGlobalVariable;ha.getGlobalVariable=function(Ka){return"page"==Ka?ua.getName():"pagenumber"==Ka?Aa+1:"pagecount"==Ka?null!=t.pages?t.pages.length:1:Ra.apply(this,arguments)};document.body.appendChild(ha.container);t.updatePageRoot(ua); +ha.model.setRoot(ua.root)}oa=ra(ha,oa,Aa!=sa);ha!=O&&ha.container.parentNode.removeChild(ha.container)}}else oa=ra(O);null==oa?t.handleError({message:mxResources.get("errorUpdatingPreview")}):(oa.mathEnabled&&(sa=oa.wnd.document,ta&&(oa.wnd.IMMEDIATE_PRINT=!0),sa.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),oa.closeDocument(),!oa.mathEnabled&&ta&&PrintDialog.printPreview(oa));null!=ca&&(O.shapeForegroundColor=fa,O.shapeBackgroundColor=da,O.stylesheet= +ca,O.refresh())}}var O=t.editor.graph,P=document.createElement("div"),S=document.createElement("h3");S.style.width="100%";S.style.textAlign="center";S.style.marginTop="0px";mxUtils.write(S,C||mxResources.get("print"));P.appendChild(S);var X=1,aa=1;S=document.createElement("div");S.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var Y=document.createElement("input");Y.style.cssText="margin-right:8px;margin-bottom:8px;";Y.setAttribute("value","all");Y.setAttribute("type", +"radio");Y.setAttribute("name","pages-printdialog");S.appendChild(Y);C=document.createElement("span");mxUtils.write(C,mxResources.get("printAllPages"));S.appendChild(C);mxUtils.br(S);var Z=Y.cloneNode(!0);Y.setAttribute("checked","checked");Z.setAttribute("value","range");S.appendChild(Z);C=document.createElement("span");mxUtils.write(C,mxResources.get("pages")+":");S.appendChild(C);var ba=document.createElement("input");ba.style.cssText="margin:0 8px 0 8px;";ba.setAttribute("value","1");ba.setAttribute("type", +"number");ba.setAttribute("min","1");ba.style.width="50px";S.appendChild(ba);C=document.createElement("span");mxUtils.write(C,mxResources.get("to"));S.appendChild(C);var ea=ba.cloneNode(!0);S.appendChild(ea);mxEvent.addListener(ba,"focus",function(){Z.checked=!0});mxEvent.addListener(ea,"focus",function(){Z.checked=!0});mxEvent.addListener(ba,"change",N);mxEvent.addListener(ea,"change",N);if(null!=t.pages&&(X=t.pages.length,null!=t.currentPage))for(C=0;C<t.pages.length;C++)if(t.currentPage==t.pages[C]){aa= +C+1;ba.value=aa;ea.value=aa;break}ba.setAttribute("max",X);ea.setAttribute("max",X);t.isPagesEnabled()?1<X&&(P.appendChild(S),Z.checked=!0):Z.checked=!0;mxUtils.br(S);var ma=document.createElement("input");ma.setAttribute("value","all");ma.setAttribute("type","radio");ma.style.marginRight="8px";O.isSelectionEmpty()&&ma.setAttribute("disabled","disabled");var ia=document.createElement("div");ia.style.marginBottom="10px";1==X?(ma.setAttribute("type","checkbox"),ma.style.marginBottom="12px",ia.appendChild(ma)): +(ma.setAttribute("name","pages-printdialog"),ma.style.marginBottom="8px",S.appendChild(ma));C=document.createElement("span");mxUtils.write(C,mxResources.get("selectionOnly"));ma.parentNode.appendChild(C);1==X&&mxUtils.br(ma.parentNode);var pa=document.createElement("input");pa.style.marginRight="8px";pa.setAttribute("value","adjust");pa.setAttribute("type","radio");pa.setAttribute("name","printZoom");ia.appendChild(pa);C=document.createElement("span");mxUtils.write(C,mxResources.get("adjustTo")); +ia.appendChild(C);var na=document.createElement("input");na.style.cssText="margin:0 8px 0 8px;";na.setAttribute("value","100 %");na.style.width="50px";ia.appendChild(na);mxEvent.addListener(na,"focus",function(){pa.checked=!0});P.appendChild(ia);S=S.cloneNode(!1);var Fa=pa.cloneNode(!0);Fa.setAttribute("value","fit");pa.setAttribute("checked","checked");C=document.createElement("div");C.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";C.appendChild(Fa);S.appendChild(C);ia= +document.createElement("table");ia.style.display="inline-block";var Ga=document.createElement("tbody"),xa=document.createElement("tr"),Ma=xa.cloneNode(!0),va=document.createElement("td"),Ea=va.cloneNode(!0),Ba=va.cloneNode(!0),za=va.cloneNode(!0),Da=va.cloneNode(!0),la=va.cloneNode(!0);va.style.textAlign="right";za.style.textAlign="right";mxUtils.write(va,mxResources.get("fitTo"));var Ha=document.createElement("input");Ha.style.cssText="margin:0 8px 0 8px;";Ha.setAttribute("value","1");Ha.setAttribute("min", +"1");Ha.setAttribute("type","number");Ha.style.width="40px";Ea.appendChild(Ha);C=document.createElement("span");mxUtils.write(C,mxResources.get("fitToSheetsAcross"));Ba.appendChild(C);mxUtils.write(za,mxResources.get("fitToBy"));var ya=Ha.cloneNode(!0);Da.appendChild(ya);mxEvent.addListener(Ha,"focus",function(){Fa.checked=!0});mxEvent.addListener(ya,"focus",function(){Fa.checked=!0});C=document.createElement("span");mxUtils.write(C,mxResources.get("fitToSheetsDown"));la.appendChild(C);xa.appendChild(va); +xa.appendChild(Ea);xa.appendChild(Ba);Ma.appendChild(za);Ma.appendChild(Da);Ma.appendChild(la);Ga.appendChild(xa);Ga.appendChild(Ma);ia.appendChild(Ga);S.appendChild(ia);P.appendChild(S);S=document.createElement("div");C=document.createElement("div");C.style.fontWeight="bold";C.style.marginBottom="12px";mxUtils.write(C,mxResources.get("paperSize"));S.appendChild(C);C=document.createElement("div");C.style.marginBottom="12px";var Ia=PageSetupDialog.addPageFormatPanel(C,"printdialog",t.editor.graph.pageFormat|| +mxConstants.PAGE_FORMAT_A4_PORTRAIT);S.appendChild(C);C=document.createElement("span");mxUtils.write(C,mxResources.get("pageScale"));S.appendChild(C);var ka=document.createElement("input");ka.style.cssText="margin:0 8px 0 8px;";ka.setAttribute("value","100 %");ka.style.width="60px";S.appendChild(ka);P.appendChild(S);C=document.createElement("div");C.style.cssText="text-align:right;margin:48px 0 0 0;";S=mxUtils.button(mxResources.get("cancel"),function(){t.hideDialog()});S.className="geBtn";t.editor.cancelFirst&& +C.appendChild(S);t.isOffline()||(ia=mxUtils.button(mxResources.get("help"),function(){O.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),ia.className="geBtn",C.appendChild(ia));PrintDialog.previewEnabled&&(ia=mxUtils.button(mxResources.get("preview"),function(){t.hideDialog();R(!1)}),ia.className="geBtn",C.appendChild(ia));ia=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){t.hideDialog();R(!0)});ia.className="geBtn gePrimaryBtn";C.appendChild(ia);t.editor.cancelFirst|| +C.appendChild(S);P.appendChild(C);this.container=P};var T=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var t=this.image;null!=t&&null!=t.src&&Graph.isPageLink(t.src)&&(t={originalSrc:t.src});this.page.viewState.backgroundImage=t}null!=this.format&&(this.page.viewState.pageFormat= this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else T.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible= -!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var V=document.createElement("canvas"),W=new Image;W.onload=function(){try{V.getContext("2d").drawImage(W,0,0);var q=V.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=q&&6<q.length}catch(D){}};W.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(q){}Editor.prototype.useCanvasForExport= +!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var V=document.createElement("canvas"),W=new Image;W.onload=function(){try{V.getContext("2d").drawImage(W,0,0);var t=V.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=t&&6<t.length}catch(C){}};W.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(t){}Editor.prototype.useCanvasForExport= !1})();(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};b.afterDecode=function(e,f,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(b)})(); -(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.2.8";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage= +(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.3.0";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage= null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&& "1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35, -mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(d,g,k,n,t,p,A){p=null!=p?p:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&& -"1"!=urlParams.dev)try{if(d!=EditorUi.lastErrorMessage&&(null==d||null==g||-1==d.indexOf("Script error")&&-1==d.indexOf("extension"))&&null!=d&&0>d.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=d;var E=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";t=null!=t?t:Error(d);(new Image).src=E+"/log?severity="+p+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(k)+(null!=n?":colno:"+ -encodeURIComponent(n):"")+(null!=t&&null!=t.stack?"&stack="+encodeURIComponent(t.stack):"")}}catch(y){}try{A||null==window.console||console.error(p,d,g,k,n,t)}catch(y){}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var g=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=g+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(k){}};EditorUi.sendReport= +mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(d,g,k,n,q,p,A){p=null!=p?p:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&& +"1"!=urlParams.dev)try{if(d!=EditorUi.lastErrorMessage&&(null==d||null==g||-1==d.indexOf("Script error")&&-1==d.indexOf("extension"))&&null!=d&&0>d.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=d;var E=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";q=null!=q?q:Error(d);(new Image).src=E+"/log?severity="+p+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(k)+(null!=n?":colno:"+ +encodeURIComponent(n):"")+(null!=q&&null!=q.stack?"&stack="+encodeURIComponent(q.stack):"")}}catch(z){}try{A||null==window.console||console.error(p,d,g,k,n,q)}catch(z){}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var g=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=g+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(k){}};EditorUi.sendReport= function(d,g){if("1"==urlParams.dev)EditorUi.debug("sendReport",d);else if(EditorUi.enableLogging)try{g=null!=g?g:5E4,d.length>g&&(d=d.substring(0,g)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(d))}catch(k){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var d=[(new Date).toISOString()],g=0;g<arguments.length;g++)d.push(arguments[g]);console.log.apply(console, d)}}catch(k){}};EditorUi.removeChildNodes=function(d){for(;null!=d.firstChild;)d.removeChild(d.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;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.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad= -!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var d=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!d.getContext||!d.getContext("2d"))}catch(t){}try{var g=document.createElement("canvas"),k=new Image;k.onload=function(){try{g.getContext("2d").drawImage(k,0,0);var t= -g.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=t&&6<t.length}catch(p){}};k.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(t){}try{g=document.createElement("canvas");g.width=g.height=1;var n=g.toDataURL("image/jpeg"); -EditorUi.prototype.jpgSupported=null!==n.match("image/jpeg")}catch(t){}})();EditorUi.prototype.openLink=function(d,g,k){return this.editor.graph.openLink(d,g,k)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalData=function(d,g){g(localStorage.getItem(d))};EditorUi.prototype.setLocalData=function(d,g,k){localStorage.setItem(d,g);null!=k&&k()};EditorUi.prototype.removeLocalData=function(d,g){localStorage.removeItem(d);g()};EditorUi.prototype.setShareCursorPosition=function(d){this.shareCursorPosition= +!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var d=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!d.getContext||!d.getContext("2d"))}catch(q){}try{var g=document.createElement("canvas"),k=new Image;k.onload=function(){try{g.getContext("2d").drawImage(k,0,0);var q= +g.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=q&&6<q.length}catch(p){}};k.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(q){}try{g=document.createElement("canvas");g.width=g.height=1;var n=g.toDataURL("image/jpeg"); +EditorUi.prototype.jpgSupported=null!==n.match("image/jpeg")}catch(q){}})();EditorUi.prototype.openLink=function(d,g,k){return this.editor.graph.openLink(d,g,k)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalData=function(d,g){g(localStorage.getItem(d))};EditorUi.prototype.setLocalData=function(d,g,k){localStorage.setItem(d,g);null!=k&&k()};EditorUi.prototype.removeLocalData=function(d,g){localStorage.removeItem(d);g()};EditorUi.prototype.setShareCursorPosition=function(d){this.shareCursorPosition= d;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(d){this.showRemoteCursors=d;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(d){this.editor.graph.mathEnabled=d;this.editor.updateGraphComponents();this.editor.graph.refresh(); this.editor.graph.defaultMathEnabled=d;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(d){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(d){return this.isOfflineApp()||!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()}; -EditorUi.prototype.createSpinner=function(d,g,k){var n=null==d||null==g;k=null!=k?k:24;var t=new Spinner({lines:12,length:k,width:Math.round(k/3),radius:Math.round(k/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),p=t.spin;t.spin=function(E,y){var B=!1;this.active||(p.call(this,E),this.active=!0,null!=y&&(n&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),B=document.createElement("div"), +EditorUi.prototype.createSpinner=function(d,g,k){var n=null==d||null==g;k=null!=k?k:24;var q=new Spinner({lines:12,length:k,width:Math.round(k/3),radius:Math.round(k/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),p=q.spin;q.spin=function(E,z){var B=!1;this.active||(p.call(this,E),this.active=!0,null!=z&&(n&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),B=document.createElement("div"), B.style.position="absolute",B.style.whiteSpace="nowrap",B.style.background="#4B4243",B.style.color="white",B.style.fontFamily=Editor.defaultHtmlFont,B.style.fontSize="9pt",B.style.padding="6px",B.style.paddingLeft="10px",B.style.paddingRight="10px",B.style.zIndex=2E9,B.style.left=Math.max(0,d)+"px",B.style.top=Math.max(0,g+70)+"px",mxUtils.setPrefixedStyle(B.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(B.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(B.style, -"boxShadow","2px 2px 3px 0px #ddd"),"..."!=y.substring(y.length-3,y.length)&&"!"!=y.charAt(y.length-1)&&(y+="..."),B.innerHTML=y,E.appendChild(B),t.status=B),this.pause=mxUtils.bind(this,function(){var J=function(){};this.active&&(J=mxUtils.bind(this,function(){this.spin(E,y)}));this.stop();return J}),B=!0);return B};var A=t.stop;t.stop=function(){A.call(this);this.active=!1;null!=t.status&&null!=t.status.parentNode&&t.status.parentNode.removeChild(t.status);t.status=null};t.pause=function(){return function(){}}; -return t};EditorUi.prototype.isCompatibleString=function(d){try{var g=mxUtils.parseXml(d),k=this.editor.extractGraphModel(g.documentElement,!0);return null!=k&&0==k.getElementsByTagName("parsererror").length}catch(n){}return!1};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&& +"boxShadow","2px 2px 3px 0px #ddd"),"..."!=z.substring(z.length-3,z.length)&&"!"!=z.charAt(z.length-1)&&(z+="..."),B.innerHTML=z,E.appendChild(B),q.status=B),this.pause=mxUtils.bind(this,function(){var J=function(){};this.active&&(J=mxUtils.bind(this,function(){this.spin(E,z)}));this.stop();return J}),B=!0);return B};var A=q.stop;q.stop=function(){A.call(this);this.active=!1;null!=q.status&&null!=q.status.parentNode&&q.status.parentNode.removeChild(q.status);q.status=null};q.pause=function(){return function(){}}; +return q};EditorUi.prototype.isCompatibleString=function(d){try{var g=mxUtils.parseXml(d),k=this.editor.extractGraphModel(g.documentElement,!0);return null!=k&&0==k.getElementsByTagName("parsererror").length}catch(n){}return!1};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&& 3==d.charCodeAt(2)&&4==d.charCodeAt(3)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&6==d.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||60==d.charCodeAt(0)&&63==d.charCodeAt(1)&&120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler; -EditorUi.prototype.createKeyHandler=function(d){var g=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var k=g.getFunction,n=this.editor.graph,t=this;g.getFunction=function(p){if(n.isSelectionEmpty()&&null!=t.pages&&0<t.pages.length){var A=t.getSelectedPageIndex();if(mxEvent.isShiftDown(p)){if(37==p.keyCode)return function(){0<A&&t.movePage(A,A-1)};if(38==p.keyCode)return function(){0<A&&t.movePage(A,0)};if(39==p.keyCode)return function(){A<t.pages.length-1&&t.movePage(A, -A+1)};if(40==p.keyCode)return function(){A<t.pages.length-1&&t.movePage(A,t.pages.length-1)}}else if(mxEvent.isControlDown(p)||mxClient.IS_MAC&&mxEvent.isMetaDown(p)){if(37==p.keyCode)return function(){0<A&&t.selectNextPage(!1)};if(38==p.keyCode)return function(){0<A&&t.selectPage(t.pages[0])};if(39==p.keyCode)return function(){A<t.pages.length-1&&t.selectNextPage(!0)};if(40==p.keyCode)return function(){A<t.pages.length-1&&t.selectPage(t.pages[t.pages.length-1])}}}return!(65<=p.keyCode&&90>=p.keyCode)|| +EditorUi.prototype.createKeyHandler=function(d){var g=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var k=g.getFunction,n=this.editor.graph,q=this;g.getFunction=function(p){if(n.isSelectionEmpty()&&null!=q.pages&&0<q.pages.length){var A=q.getSelectedPageIndex();if(mxEvent.isShiftDown(p)){if(37==p.keyCode)return function(){0<A&&q.movePage(A,A-1)};if(38==p.keyCode)return function(){0<A&&q.movePage(A,0)};if(39==p.keyCode)return function(){A<q.pages.length-1&&q.movePage(A, +A+1)};if(40==p.keyCode)return function(){A<q.pages.length-1&&q.movePage(A,q.pages.length-1)}}else if(mxEvent.isControlDown(p)||mxClient.IS_MAC&&mxEvent.isMetaDown(p)){if(37==p.keyCode)return function(){0<A&&q.selectNextPage(!1)};if(38==p.keyCode)return function(){0<A&&q.selectPage(q.pages[0])};if(39==p.keyCode)return function(){A<q.pages.length-1&&q.selectNextPage(!0)};if(40==p.keyCode)return function(){A<q.pages.length-1&&q.selectPage(q.pages[q.pages.length-1])}}}return!(65<=p.keyCode&&90>=p.keyCode)|| n.isSelectionEmpty()||mxEvent.isAltDown(p)||mxEvent.isShiftDown(p)||mxEvent.isControlDown(p)||mxClient.IS_MAC&&mxEvent.isMetaDown(p)?k.apply(this,arguments):null}}return g};var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var g=e.apply(this,arguments);if(null==g)try{var k=d.indexOf("<mxfile ");if(0<=k){var n=d.lastIndexOf("</mxfile>");n>k&&(g=d.substring(k,n+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g, -""))}else{var t=mxUtils.parseXml(d),p=this.editor.extractGraphModel(t.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);g=null!=p?mxUtils.getXml(p):""}}catch(A){}return g};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var g=d.indexOf('<meta charset="utf-8">');0<=g&&(d=d.slice(0,g)+'<meta charset="utf-8"/>'+d.slice(g+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d){d=this.validateFileData(d); -d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var g=null!=d?this.editor.extractGraphModel(d,!0):null;null!=g&&(d=g);if(null!=d){g=this.editor.graph;g.model.beginUpdate();try{var k=null!=this.pages?this.pages.slice():null,n=d.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<n.length||1==n.length&&n[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var t=n.length-1;0<=t;t--){var p=this.updatePageRoot(new DiagramPage(n[t]));null==p.getName()&& -p.setName(mxResources.get("pageWithNumber",[t+1]));g.model.execute(new ChangePage(this,p,0==t?p:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),g.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root); -if(null!=k)for(t=0;t<k.length;t++)g.model.execute(new ChangePage(this,k[t],null))}finally{g.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,g,k,n,t,p,A,E,y,B,J){g=null!=g?g:this.editor.graph;t=null!=t?t:!1;y=null!=y?y:!0;var N=null;if(null==k||k.getMode()==App.MODE_DEVICE||k.getMode()==App.MODE_BROWSER)var v="_blank";else N=v=n;if(null==d)return"";var u=d;if("mxfile"!=u.nodeName.toLowerCase()){if(J){var G=d.ownerDocument.createElement("diagram");G.setAttribute("id",Editor.guid()); +""))}else{var q=mxUtils.parseXml(d),p=this.editor.extractGraphModel(q.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);g=null!=p?mxUtils.getXml(p):""}}catch(A){}return g};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var g=d.indexOf('<meta charset="utf-8">');0<=g&&(d=d.slice(0,g)+'<meta charset="utf-8"/>'+d.slice(g+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d){d=this.validateFileData(d); +d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var g=null!=d?this.editor.extractGraphModel(d,!0):null;null!=g&&(d=g);if(null!=d){g=this.editor.graph;g.model.beginUpdate();try{var k=null!=this.pages?this.pages.slice():null,n=d.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<n.length||1==n.length&&n[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var q=n.length-1;0<=q;q--){var p=this.updatePageRoot(new DiagramPage(n[q]));null==p.getName()&& +p.setName(mxResources.get("pageWithNumber",[q+1]));g.model.execute(new ChangePage(this,p,0==q?p:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),g.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root); +if(null!=k)for(q=0;q<k.length;q++)g.model.execute(new ChangePage(this,k[q],null))}finally{g.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,g,k,n,q,p,A,E,z,B,J){g=null!=g?g:this.editor.graph;q=null!=q?q:!1;z=null!=z?z:!0;var M=null;if(null==k||k.getMode()==App.MODE_DEVICE||k.getMode()==App.MODE_BROWSER)var v="_blank";else M=v=n;if(null==d)return"";var u=d;if("mxfile"!=u.nodeName.toLowerCase()){if(J){var G=d.ownerDocument.createElement("diagram");G.setAttribute("id",Editor.guid()); G.appendChild(d)}else{G=Graph.zapGremlins(mxUtils.getXml(d));u=Graph.compress(G);if(Graph.decompress(u)!=G)return G;G=d.ownerDocument.createElement("diagram");G.setAttribute("id",Editor.guid());mxUtils.setTextContent(G,u)}u=d.ownerDocument.createElement("mxfile");u.appendChild(G)}B?(u=u.cloneNode(!0),u.removeAttribute("modified"),u.removeAttribute("host"),u.removeAttribute("agent"),u.removeAttribute("etag"),u.removeAttribute("userAgent"),u.removeAttribute("version"),u.removeAttribute("editor"),u.removeAttribute("type")): (u.removeAttribute("userAgent"),u.removeAttribute("version"),u.removeAttribute("editor"),u.removeAttribute("pages"),u.removeAttribute("type"),mxClient.IS_CHROMEAPP?u.setAttribute("host","Chrome"):EditorUi.isElectronApp?u.setAttribute("host","Electron"):u.setAttribute("host",window.location.hostname),u.setAttribute("modified",(new Date).toISOString()),u.setAttribute("agent",navigator.appVersion),u.setAttribute("version",EditorUi.VERSION),u.setAttribute("etag",Editor.guid()),d=null!=k?k.getMode():this.mode, -null!=d&&u.setAttribute("type",d),1<u.getElementsByTagName("diagram").length&&null!=this.pages&&u.setAttribute("pages",this.pages.length));J=J?mxUtils.getPrettyXml(u):mxUtils.getXml(u);if(!p&&!t&&(A||null!=k&&/(\.html)$/i.test(k.getTitle())))J=this.getHtml2(mxUtils.getXml(u),g,null!=k?k.getTitle():null,v,N);else if(p||!t&&null!=k&&/(\.svg)$/i.test(k.getTitle()))null==k||k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER||(n=null),J=this.getEmbeddedSvg(J,g,n,null,E,y,N);return J};EditorUi.prototype.getXmlFileData= -function(d,g,k,n){d=null!=d?d:!0;g=null!=g?g:!1;k=null!=k?k:!Editor.compressXml;var t=this.editor.getGraphXml(d,n);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(y){var B=y.getElementsByTagName("mxGraphModel");B=0<B.length?B[0]:null;null==B&&k?(B=mxUtils.trim(mxUtils.getTextContent(y)),y=y.cloneNode(!1),0<B.length&&(B=Graph.decompress(B),null!=B&&0<B.length&&y.appendChild(mxUtils.parseXml(B).documentElement))):null==B||k?y=y.cloneNode(!0):(y=y.cloneNode(!1),mxUtils.setTextContent(y, -Graph.compressNode(B)));t.appendChild(y)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(t)),t=this.fileNode.cloneNode(!1),g)d(this.currentPage.node);else for(g=0;g<this.pages.length;g++){var p=this.pages[g],A=p.node;if(p!=this.currentPage)if(p.needsUpdate){var E=new mxCodec(mxUtils.createXmlDocument());E=E.encode(new mxGraphModel(p.root));this.editor.graph.saveViewState(p.viewState,E,null,n);EditorUi.removeChildNodes(A);mxUtils.setTextContent(A, +null!=d&&u.setAttribute("type",d),1<u.getElementsByTagName("diagram").length&&null!=this.pages&&u.setAttribute("pages",this.pages.length));J=J?mxUtils.getPrettyXml(u):mxUtils.getXml(u);if(!p&&!q&&(A||null!=k&&/(\.html)$/i.test(k.getTitle())))J=this.getHtml2(mxUtils.getXml(u),g,null!=k?k.getTitle():null,v,M);else if(p||!q&&null!=k&&/(\.svg)$/i.test(k.getTitle()))null==k||k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER||(n=null),J=this.getEmbeddedSvg(J,g,n,null,E,z,M);return J};EditorUi.prototype.getXmlFileData= +function(d,g,k,n){d=null!=d?d:!0;g=null!=g?g:!1;k=null!=k?k:!Editor.compressXml;var q=this.editor.getGraphXml(d,n);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(z){var B=z.getElementsByTagName("mxGraphModel");B=0<B.length?B[0]:null;null==B&&k?(B=mxUtils.trim(mxUtils.getTextContent(z)),z=z.cloneNode(!1),0<B.length&&(B=Graph.decompress(B),null!=B&&0<B.length&&z.appendChild(mxUtils.parseXml(B).documentElement))):null==B||k?z=z.cloneNode(!0):(z=z.cloneNode(!1),mxUtils.setTextContent(z, +Graph.compressNode(B)));q.appendChild(z)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(q)),q=this.fileNode.cloneNode(!1),g)d(this.currentPage.node);else for(g=0;g<this.pages.length;g++){var p=this.pages[g],A=p.node;if(p!=this.currentPage)if(p.needsUpdate){var E=new mxCodec(mxUtils.createXmlDocument());E=E.encode(new mxGraphModel(p.root));this.editor.graph.saveViewState(p.viewState,E,null,n);EditorUi.removeChildNodes(A);mxUtils.setTextContent(A, Graph.compressNode(E));delete p.needsUpdate}else n&&(this.updatePageRoot(p),null!=p.viewState.backgroundImage&&(null!=p.viewState.backgroundImage.originalSrc?p.viewState.backgroundImage=this.createImageForPageLink(p.viewState.backgroundImage.originalSrc,p):Graph.isPageLink(p.viewState.backgroundImage.src)&&(p.viewState.backgroundImage=this.createImageForPageLink(p.viewState.backgroundImage.src,p))),null!=p.viewState.backgroundImage&&null!=p.viewState.backgroundImage.originalSrc&&(E=new mxCodec(mxUtils.createXmlDocument()), -E=E.encode(new mxGraphModel(p.root)),this.editor.graph.saveViewState(p.viewState,E,null,n),A=A.cloneNode(!1),mxUtils.setTextContent(A,Graph.compressNode(E))));d(A)}return t};EditorUi.prototype.anonymizeString=function(d,g){for(var k=[],n=0;n<d.length;n++){var t=d.charAt(n);0<=EditorUi.ignoredAnonymizedChars.indexOf(t)?k.push(t):isNaN(parseInt(t))?t.toLowerCase()!=t?k.push(String.fromCharCode(65+Math.round(25*Math.random()))):t.toUpperCase()!=t?k.push(String.fromCharCode(97+Math.round(25*Math.random()))): -/\s/.test(t)?k.push(" "):k.push("?"):k.push(g?"0":Math.round(9*Math.random()))}return k.join("")};EditorUi.prototype.anonymizePatch=function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var g=0;g<d[EditorUi.DIFF_INSERT].length;g++)try{var k=mxUtils.parseXml(d[EditorUi.DIFF_INSERT][g].data).documentElement.cloneNode(!1);null!=k.getAttribute("name")&&k.setAttribute("name",this.anonymizeString(k.getAttribute("name")));d[EditorUi.DIFF_INSERT][g].data=mxUtils.getXml(k)}catch(p){d[EditorUi.DIFF_INSERT][g].data= -p.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var n in d[EditorUi.DIFF_UPDATE]){var t=d[EditorUi.DIFF_UPDATE][n];null!=t.name&&(t.name=this.anonymizeString(t.name));null!=t.cells&&(g=mxUtils.bind(this,function(p){var A=t.cells[p];if(null!=A){for(var E in A)null!=A[E].value&&(A[E].value="["+A[E].value.length+"]"),null!=A[E].xmlValue&&(A[E].xmlValue="["+A[E].xmlValue.length+"]"),null!=A[E].style&&(A[E].style="["+A[E].style.length+"]"),mxUtils.isEmptyObject(A[E])&&delete A[E];mxUtils.isEmptyObject(A)&& -delete t.cells[p]}}),g(EditorUi.DIFF_INSERT),g(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(t.cells)&&delete t.cells);mxUtils.isEmptyObject(t)&&delete d[EditorUi.DIFF_UPDATE][n]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,g){if(null!=d.attributes)for(var k=0;k<d.attributes.length;k++)"as"!=d.attributes[k].name&&d.setAttribute(d.attributes[k].name,this.anonymizeString(d.attributes[k].value,g));if(null!=d.childNodes)for(k= +E=E.encode(new mxGraphModel(p.root)),this.editor.graph.saveViewState(p.viewState,E,null,n),A=A.cloneNode(!1),mxUtils.setTextContent(A,Graph.compressNode(E))));d(A)}return q};EditorUi.prototype.anonymizeString=function(d,g){for(var k=[],n=0;n<d.length;n++){var q=d.charAt(n);0<=EditorUi.ignoredAnonymizedChars.indexOf(q)?k.push(q):isNaN(parseInt(q))?q.toLowerCase()!=q?k.push(String.fromCharCode(65+Math.round(25*Math.random()))):q.toUpperCase()!=q?k.push(String.fromCharCode(97+Math.round(25*Math.random()))): +/\s/.test(q)?k.push(" "):k.push("?"):k.push(g?"0":Math.round(9*Math.random()))}return k.join("")};EditorUi.prototype.anonymizePatch=function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var g=0;g<d[EditorUi.DIFF_INSERT].length;g++)try{var k=mxUtils.parseXml(d[EditorUi.DIFF_INSERT][g].data).documentElement.cloneNode(!1);null!=k.getAttribute("name")&&k.setAttribute("name",this.anonymizeString(k.getAttribute("name")));d[EditorUi.DIFF_INSERT][g].data=mxUtils.getXml(k)}catch(p){d[EditorUi.DIFF_INSERT][g].data= +p.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var n in d[EditorUi.DIFF_UPDATE]){var q=d[EditorUi.DIFF_UPDATE][n];null!=q.name&&(q.name=this.anonymizeString(q.name));null!=q.cells&&(g=mxUtils.bind(this,function(p){var A=q.cells[p];if(null!=A){for(var E in A)null!=A[E].value&&(A[E].value="["+A[E].value.length+"]"),null!=A[E].xmlValue&&(A[E].xmlValue="["+A[E].xmlValue.length+"]"),null!=A[E].style&&(A[E].style="["+A[E].style.length+"]"),mxUtils.isEmptyObject(A[E])&&delete A[E];mxUtils.isEmptyObject(A)&& +delete q.cells[p]}}),g(EditorUi.DIFF_INSERT),g(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(q.cells)&&delete q.cells);mxUtils.isEmptyObject(q)&&delete d[EditorUi.DIFF_UPDATE][n]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,g){if(null!=d.attributes)for(var k=0;k<d.attributes.length;k++)"as"!=d.attributes[k].name&&d.setAttribute(d.attributes[k].name,this.anonymizeString(d.attributes[k].value,g));if(null!=d.childNodes)for(k= 0;k<d.childNodes.length;k++)this.anonymizeAttributes(d.childNodes[k],g)};EditorUi.prototype.anonymizeNode=function(d,g){g=d.getElementsByTagName("mxCell");for(var k=0;k<g.length;k++)null!=g[k].getAttribute("value")&&g[k].setAttribute("value","["+g[k].getAttribute("value").length+"]"),null!=g[k].getAttribute("xmlValue")&&g[k].setAttribute("xmlValue","["+g[k].getAttribute("xmlValue").length+"]"),null!=g[k].getAttribute("style")&&g[k].setAttribute("style","["+g[k].getAttribute("style").length+"]"),null!= g[k].parentNode&&"root"!=g[k].parentNode.nodeName&&null!=g[k].parentNode.parentNode&&(g[k].setAttribute("id",g[k].parentNode.getAttribute("id")),g[k].parentNode.parentNode.replaceChild(g[k],g[k].parentNode));return d};EditorUi.prototype.synchronizeCurrentFile=function(d){var g=this.getCurrentFile();null!=g&&(g.savingFile?this.handleError({message:mxResources.get("busy")}):!d&&g.invalidChecksum?g.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(g.clearAutosave(), -this.editor.setStatus(""),d?g.reloadFile(mxUtils.bind(this,function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){g.handleFileError(k,!0)})):g.synchronizeFile(mxUtils.bind(this,function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){g.handleFileError(k,!0)}))))};EditorUi.prototype.getFileData=function(d,g,k,n,t,p,A,E,y,B,J){t=null!=t?t:!0;p=null!=p?p:!1;var N=this.editor.graph;if(g||!d&&null!=y&&/(\.svg)$/i.test(y.getTitle())){var v= -null!=N.themes&&"darkTheme"==N.defaultThemeName;B=!1;if(v||null!=this.pages&&this.currentPage!=this.pages[0]){var u=N.getGlobalVariable;N=this.createTemporaryGraph(v?N.getDefaultStylesheet():N.getStylesheet());N.setBackgroundImage=this.editor.graph.setBackgroundImage;N.background=this.editor.graph.background;var G=this.pages[0];this.currentPage==G?N.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&N.setBackgroundImage(G.viewState.backgroundImage);N.getGlobalVariable= -function(H){return"page"==H?G.getName():"pagenumber"==H?1:u.apply(this,arguments)};document.body.appendChild(N.container);N.model.setRoot(G.root)}}A=null!=A?A:this.getXmlFileData(t,p,B,J);y=null!=y?y:this.getCurrentFile();d=this.createFileData(A,N,y,window.location.href,d,g,k,n,t,E,B);N!=this.editor.graph&&N.container.parentNode.removeChild(N.container);return d};EditorUi.prototype.getHtml=function(d,g,k,n,t,p){p=null!=p?p:!0;var A=null,E=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=g){A= -p?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells());var y=g.view.scale;p=Math.floor(A.x/y-g.view.translate.x);y=Math.floor(A.y/y-g.view.translate.y);A=g.background;null==t&&(g=this.getBasenames().join(";"),0<g.length&&(E=EditorUi.drawHost+"/embed.js?s="+g));d.setAttribute("x0",p);d.setAttribute("y0",y)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize","0"),d.setAttribute("fit","0"),d.setAttribute("border","20"),d.setAttribute("links","1"),null!=n&&d.setAttribute("edit", -n));null!=t&&(t=t.replace(/&/g,"&"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";n=Graph.compress(d);Graph.decompress(n)!=d&&(n=encodeURIComponent(d));return(null==t?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=t?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==t?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=t?'<meta http-equiv="refresh" content="0;URL=\''+ -t+"'\"/>\n":"")+"</head>\n<body"+(null==t&&null!=A&&A!=mxConstants.NONE?' style="background-color:'+A+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+n+"</div>\n</div>\n"+(null==t?'<script type="text/javascript" src="'+E+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+t+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+ -"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,g,k,n,t){g=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=t&&(t=t.replace(/&/g,"&"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(d),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==t?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n': -"")+"<!DOCTYPE html>\n<html"+(null!=t?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==t?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=t?'<meta http-equiv="refresh" content="0;URL=\''+t+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>\n'+(null==t?'<script type="text/javascript" src="'+ -g+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+t+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPage=null;var g=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null,k=Editor.extractParserError(g,mxResources.get("invalidOrMissingFile"));if(k)throw EditorUi.debug("EditorUi.setFileData ParserError", +this.editor.setStatus(""),d?g.reloadFile(mxUtils.bind(this,function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){g.handleFileError(k,!0)})):g.synchronizeFile(mxUtils.bind(this,function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){g.handleFileError(k,!0)}))))};EditorUi.prototype.getFileData=function(d,g,k,n,q,p,A,E,z,B,J){q=null!=q?q:!0;p=null!=p?p:!1;var M=this.editor.graph;if(g||!d&&null!=z&&/(\.svg)$/i.test(z.getTitle())){var v= +null!=M.themes&&"darkTheme"==M.defaultThemeName;B=!1;if(v||null!=this.pages&&this.currentPage!=this.pages[0]){var u=M.getGlobalVariable;M=this.createTemporaryGraph(v?M.getDefaultStylesheet():M.getStylesheet());M.setBackgroundImage=this.editor.graph.setBackgroundImage;M.background=this.editor.graph.background;var G=this.pages[0];this.currentPage==G?M.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&M.setBackgroundImage(G.viewState.backgroundImage);M.getGlobalVariable= +function(I){return"page"==I?G.getName():"pagenumber"==I?1:u.apply(this,arguments)};document.body.appendChild(M.container);M.model.setRoot(G.root)}}A=null!=A?A:this.getXmlFileData(q,p,B,J);z=null!=z?z:this.getCurrentFile();d=this.createFileData(A,M,z,window.location.href,d,g,k,n,q,E,B);M!=this.editor.graph&&M.container.parentNode.removeChild(M.container);return d};EditorUi.prototype.getHtml=function(d,g,k,n,q,p){p=null!=p?p:!0;var A=null,E=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=g){A= +p?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells());var z=g.view.scale;p=Math.floor(A.x/z-g.view.translate.x);z=Math.floor(A.y/z-g.view.translate.y);A=g.background;null==q&&(g=this.getBasenames().join(";"),0<g.length&&(E=EditorUi.drawHost+"/embed.js?s="+g));d.setAttribute("x0",p);d.setAttribute("y0",z)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize","0"),d.setAttribute("fit","0"),d.setAttribute("border","20"),d.setAttribute("links","1"),null!=n&&d.setAttribute("edit", +n));null!=q&&(q=q.replace(/&/g,"&"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";n=Graph.compress(d);Graph.decompress(n)!=d&&(n=encodeURIComponent(d));return(null==q?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=q?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==q?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=q?'<meta http-equiv="refresh" content="0;URL=\''+ +q+"'\"/>\n":"")+"</head>\n<body"+(null==q&&null!=A&&A!=mxConstants.NONE?' style="background-color:'+A+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+n+"</div>\n</div>\n"+(null==q?'<script type="text/javascript" src="'+E+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+q+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+ +"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,g,k,n,q){g=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=q&&(q=q.replace(/&/g,"&"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(d),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==q?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n': +"")+"<!DOCTYPE html>\n<html"+(null!=q?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==q?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=q?'<meta http-equiv="refresh" content="0;URL=\''+q+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>\n'+(null==q?'<script type="text/javascript" src="'+ +g+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+q+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPage=null;var g=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null,k=Editor.extractParserError(g,mxResources.get("invalidOrMissingFile"));if(k)throw EditorUi.debug("EditorUi.setFileData ParserError", [this],"data",[d],"node",[g],"cause",[k]),Error(mxResources.get("notADiagramFile")+" ("+k+")");d=null!=g?this.editor.extractGraphModel(g,!0):null;null!=d&&(g=d);if(null!=g&&"mxfile"==g.nodeName&&(d=g.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){k=null;this.fileNode=g;this.pages=[];for(var n=0;n<d.length;n++)null==d[n].getAttribute("id")&&d[n].setAttribute("id",n),g=new DiagramPage(d[n]),null==g.getName()&&g.setName(mxResources.get("pageWithNumber", [n+1])),this.pages.push(g),null!=urlParams["page-id"]&&g.getId()==urlParams["page-id"]&&(k=g);this.currentPage=null!=k?k:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];g=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=g&&(this.fileNode=g.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(g.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(g); -null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var t=urlParams["layer-ids"].split(" ");g={};for(n=0;n<t.length;n++)g[t[n]]=!0;var p=this.editor.graph.getModel(),A=p.getChildren(p.root);for(n=0;n<A.length;n++){var E=A[n];p.setVisible(E,g[E.id]||!1)}}catch(y){}};EditorUi.prototype.getBaseFilename=function(d){var g=this.getCurrentFile();g=null!=g&&null!=g.getTitle()?g.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(g)||/(\.html)$/i.test(g)|| -/(\.svg)$/i.test(g)||/(\.png)$/i.test(g))g=g.substring(0,g.lastIndexOf("."));/(\.drawio)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(g=g+"-"+this.currentPage.getName());return g};EditorUi.prototype.downloadFile=function(d,g,k,n,t,p,A,E,y,B,J,N){try{n=null!=n?n:this.editor.graph.isSelectionEmpty();var v=this.getBaseFilename("remoteSvg"==d? -!1:!t),u=v+("xml"==d||"pdf"==d&&J?".drawio":"")+"."+d;if("xml"==d){var G=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,n,t,null,null,null,g);this.saveData(u,d,G,"text/xml")}else if("html"==d)G=this.getHtml2(this.getFileData(!0),this.editor.graph,v),this.saveData(u,d,G,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==d)u=v+".png";else if("jpeg"==d)u=v+".jpg";else if("remoteSvg"==d){u=v+".svg";d="svg";var H=parseInt(y); -"string"===typeof E&&0<E.indexOf("%")&&(E=parseInt(E)/100);if(0<H){var M=this.editor.graph,K=M.getGraphBounds();var I=Math.ceil(K.width*E/M.view.scale+2*H);var F=Math.ceil(K.height*E/M.view.scale+2*H)}}this.saveRequest(u,d,mxUtils.bind(this,function(W,q){try{var D=this.editor.graph.pageVisible;0==p&&(this.editor.graph.pageVisible=p);var L=this.createDownloadRequest(W,d,n,q,A,t,E,y,B,J,N,I,F);this.editor.graph.pageVisible=D;return L}catch(R){this.handleError(R)}}))}else{var P=null,U=mxUtils.bind(this, -function(W){W.length<=MAX_REQUEST_SIZE?this.saveData(u,"svg",W,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(P)}))});if("svg"==d){var T=this.editor.graph.background;if(A||T==mxConstants.NONE)T=null;var V=this.editor.graph.getSvg(T,null,null,null,null,n);k&&this.editor.graph.addSvgShadow(V);this.editor.convertImages(V,mxUtils.bind(this,mxUtils.bind(this,function(W){this.spinner.stop();U(Graph.xmlDeclaration+ -"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(W))})))}else u=v+".svg",P=this.getFileData(!1,!0,null,mxUtils.bind(this,function(W){this.spinner.stop();U(W)}),n)}}catch(W){this.handleError(W)}};EditorUi.prototype.createDownloadRequest=function(d,g,k,n,t,p,A,E,y,B,J,N,v){var u=this.editor.graph,G=u.getGraphBounds();k=this.getFileData(!0,null,null,null,k,0==p?!1:"xmlpng"!=g,null,null,null,!1,"pdf"==g);var H="",M="";if(G.width*G.height>MAX_AREA||k.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")}; -B=B?"1":"0";"pdf"==g&&(null!=J?M="&from="+J.from+"&to="+J.to:0==p&&(M="&allPages=1"));"xmlpng"==g&&(B="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(p=0;p<this.pages.length;p++)if(this.pages[p]==this.currentPage){H="&from="+p;break}p=u.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!t?t||null!=p&&p!=mxConstants.NONE||(p="#ffffff"):p=mxConstants.NONE;t={globalVars:u.getExportVariables()};y&&(t.grid={size:u.gridSize,steps:u.view.gridSteps,color:u.view.gridColor});Graph.translateDiagram&& -(t.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+g+H+M+"&bg="+(null!=p?p:mxConstants.NONE)+"&base64="+n+"&embedXml="+B+"&xml="+encodeURIComponent(k)+(null!=d?"&filename="+encodeURIComponent(d):"")+"&extras="+encodeURIComponent(JSON.stringify(t))+(null!=A?"&scale="+A:"")+(null!=E?"&border="+E:"")+(N&&isFinite(N)?"&w="+N:"")+(v&&isFinite(v)?"&h="+v:""))};EditorUi.prototype.setMode=function(d,g){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,g,k){var n= -window.location.hash,t=mxUtils.bind(this,function(A){var E=null!=d.data?d.data:"";null!=A&&0<A.length&&(0<E.length&&(E+="\n"),E+=A);A=new LocalFile(this,"csv"!=d.format&&0<E.length?E:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);A.getHash=function(){return n};this.fileLoaded(A);"csv"==d.format&&this.importCsv(E,mxUtils.bind(this,function(v){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var y= -null!=d.interval?parseInt(d.interval):6E4,B=null,J=mxUtils.bind(this,function(){var v=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(u){v===this.currentPage&&(200<=u.getStatus()&&300>=u.getStatus()?(this.updateDiagram(u.getText()),N()):this.handleError({message:mxResources.get("error")+" "+u.getStatus()}))}),mxUtils.bind(this,function(u){this.handleError(u)}))}),N=mxUtils.bind(this,function(){window.clearTimeout(B); -B=window.setTimeout(J,y)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){N();J()}));N();J()}null!=g&&g()});if(null!=d.url&&0<d.url.length){var p=this.editor.getProxiedUrl(d.url);this.editor.loadUrl(p,mxUtils.bind(this,function(A){t(A)}),mxUtils.bind(this,function(A){null!=k&&k(A)}))}else t("")};EditorUi.prototype.updateDiagram=function(d){function g(F){var P=new mxCellOverlay(F.image||t.warningImage,F.tooltip,F.align,F.valign,F.offset);P.addListener(mxEvent.CLICK,function(U, -T){n.alert(F.tooltip)});return P}var k=null,n=this;if(null!=d&&0<d.length&&(k=mxUtils.parseXml(d),d=null!=k?k.documentElement:null,null!=d&&"updates"==d.nodeName)){var t=this.editor.graph,p=t.getModel();p.beginUpdate();var A=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var E=p.getCell(d.getAttribute("id"));if(null!=E){try{var y=d.getAttribute("value");if(null!=y){var B=mxUtils.parseXml(y).documentElement;if(null!=B)if("1"==B.getAttribute("replace-value"))p.setValue(E,B);else for(var J= -B.attributes,N=0;N<J.length;N++)t.setAttributeForCell(E,J[N].nodeName,0<J[N].nodeValue.length?J[N].nodeValue:null)}}catch(F){null!=window.console&&console.log("Error in value for "+E.id+": "+F)}try{var v=d.getAttribute("style");null!=v&&t.model.setStyle(E,v)}catch(F){null!=window.console&&console.log("Error in style for "+E.id+": "+F)}try{var u=d.getAttribute("icon");if(null!=u){var G=0<u.length?JSON.parse(u):null;null!=G&&G.append||t.removeCellOverlays(E);null!=G&&t.addCellOverlay(E,g(G))}}catch(F){null!= -window.console&&console.log("Error in icon for "+E.id+": "+F)}try{var H=d.getAttribute("geometry");if(null!=H){H=JSON.parse(H);var M=t.getCellGeometry(E);if(null!=M){M=M.clone();for(key in H){var K=parseFloat(H[key]);"dx"==key?M.x+=K:"dy"==key?M.y+=K:"dw"==key?M.width+=K:"dh"==key?M.height+=K:M[key]=parseFloat(H[key])}t.model.setGeometry(E,M)}}}catch(F){null!=window.console&&console.log("Error in icon for "+E.id+": "+F)}}}else if("model"==d.nodeName){for(var I=d.firstChild;null!=I&&I.nodeType!=mxConstants.NODETYPE_ELEMENT;)I= -I.nextSibling;null!=I&&(new mxCodec(d.firstChild)).decode(I,p)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(t.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))t.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(A=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{p.endUpdate()}null!=A&&this.chromelessResize&&this.chromelessResize(!0, -A)}return k};EditorUi.prototype.getCopyFilename=function(d,g){var k=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var n=k.lastIndexOf(".");0<=n&&(d=k.substring(n),k=k.substring(0,n));if(g){g=k;var t=new Date;k=t.getFullYear();n=t.getMonth()+1;var p=t.getDate(),A=t.getHours(),E=t.getMinutes();t=t.getSeconds();k=g+(" "+(k+"-"+n+"-"+p+"-"+A+"-"+E+"-"+t))}return k=mxResources.get("copyOf",[k])+d};EditorUi.prototype.fileLoaded=function(d,g){var k=this.getCurrentFile();this.fileEditable= -this.fileLoadedError=null;this.setCurrentFile(null);var n=!1;this.hideDialog();null!=k&&(EditorUi.debug("File.closed",[k]),k.removeListener(this.descriptorChangedListener),k.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var t=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=k&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!g&&null!=window.location.hash&&0<window.location.hash.length&& +null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var q=urlParams["layer-ids"].split(" ");g={};for(n=0;n<q.length;n++)g[q[n]]=!0;var p=this.editor.graph.getModel(),A=p.getChildren(p.root);for(n=0;n<A.length;n++){var E=A[n];p.setVisible(E,g[E.id]||!1)}}catch(z){}};EditorUi.prototype.getBaseFilename=function(d){var g=this.getCurrentFile();g=null!=g&&null!=g.getTitle()?g.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(g)||/(\.html)$/i.test(g)|| +/(\.svg)$/i.test(g)||/(\.png)$/i.test(g))g=g.substring(0,g.lastIndexOf("."));/(\.drawio)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(g=g+"-"+this.currentPage.getName());return g};EditorUi.prototype.downloadFile=function(d,g,k,n,q,p,A,E,z,B,J,M){try{n=null!=n?n:this.editor.graph.isSelectionEmpty();var v=this.getBaseFilename("remoteSvg"==d? +!1:!q),u=v+("xml"==d||"pdf"==d&&J?".drawio":"")+"."+d;if("xml"==d){var G=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,n,q,null,null,null,g);this.saveData(u,d,G,"text/xml")}else if("html"==d)G=this.getHtml2(this.getFileData(!0),this.editor.graph,v),this.saveData(u,d,G,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==d)u=v+".png";else if("jpeg"==d)u=v+".jpg";else if("remoteSvg"==d){u=v+".svg";d="svg";var I=parseInt(z); +"string"===typeof E&&0<E.indexOf("%")&&(E=parseInt(E)/100);if(0<I){var F=this.editor.graph,L=F.getGraphBounds();var K=Math.ceil(L.width*E/F.view.scale+2*I);var H=Math.ceil(L.height*E/F.view.scale+2*I)}}this.saveRequest(u,d,mxUtils.bind(this,function(W,t){try{var C=this.editor.graph.pageVisible;0==p&&(this.editor.graph.pageVisible=p);var N=this.createDownloadRequest(W,d,n,t,A,q,E,z,B,J,M,K,H);this.editor.graph.pageVisible=C;return N}catch(R){this.handleError(R)}}))}else{var Q=null,U=mxUtils.bind(this, +function(W){W.length<=MAX_REQUEST_SIZE?this.saveData(u,"svg",W,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(Q)}))});if("svg"==d){var T=this.editor.graph.background;if(A||T==mxConstants.NONE)T=null;var V=this.editor.graph.getSvg(T,null,null,null,null,n);k&&this.editor.graph.addSvgShadow(V);this.editor.convertImages(V,mxUtils.bind(this,mxUtils.bind(this,function(W){this.spinner.stop();U(Graph.xmlDeclaration+ +"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(W))})))}else u=v+".svg",Q=this.getFileData(!1,!0,null,mxUtils.bind(this,function(W){this.spinner.stop();U(W)}),n)}}catch(W){this.handleError(W)}};EditorUi.prototype.createDownloadRequest=function(d,g,k,n,q,p,A,E,z,B,J,M,v){var u=this.editor.graph,G=u.getGraphBounds();k=this.getFileData(!0,null,null,null,k,0==p?!1:"xmlpng"!=g,null,null,null,!1,"pdf"==g);var I="",F="";if(G.width*G.height>MAX_AREA||k.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")}; +B=B?"1":"0";"pdf"==g&&(null!=J?F="&from="+J.from+"&to="+J.to:0==p&&(F="&allPages=1"));"xmlpng"==g&&(B="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(p=0;p<this.pages.length;p++)if(this.pages[p]==this.currentPage){I="&from="+p;break}p=u.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!q?q||null!=p&&p!=mxConstants.NONE||(p="#ffffff"):p=mxConstants.NONE;q={globalVars:u.getExportVariables()};z&&(q.grid={size:u.gridSize,steps:u.view.gridSteps,color:u.view.gridColor});Graph.translateDiagram&& +(q.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+g+I+F+"&bg="+(null!=p?p:mxConstants.NONE)+"&base64="+n+"&embedXml="+B+"&xml="+encodeURIComponent(k)+(null!=d?"&filename="+encodeURIComponent(d):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(null!=A?"&scale="+A:"")+(null!=E?"&border="+E:"")+(M&&isFinite(M)?"&w="+M:"")+(v&&isFinite(v)?"&h="+v:""))};EditorUi.prototype.setMode=function(d,g){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,g,k){var n= +window.location.hash,q=mxUtils.bind(this,function(A){var E=null!=d.data?d.data:"";null!=A&&0<A.length&&(0<E.length&&(E+="\n"),E+=A);A=new LocalFile(this,"csv"!=d.format&&0<E.length?E:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);A.getHash=function(){return n};this.fileLoaded(A);"csv"==d.format&&this.importCsv(E,mxUtils.bind(this,function(v){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var z= +null!=d.interval?parseInt(d.interval):6E4,B=null,J=mxUtils.bind(this,function(){var v=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(u){v===this.currentPage&&(200<=u.getStatus()&&300>=u.getStatus()?(this.updateDiagram(u.getText()),M()):this.handleError({message:mxResources.get("error")+" "+u.getStatus()}))}),mxUtils.bind(this,function(u){this.handleError(u)}))}),M=mxUtils.bind(this,function(){window.clearTimeout(B); +B=window.setTimeout(J,z)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){M();J()}));M();J()}null!=g&&g()});if(null!=d.url&&0<d.url.length){var p=this.editor.getProxiedUrl(d.url);this.editor.loadUrl(p,mxUtils.bind(this,function(A){q(A)}),mxUtils.bind(this,function(A){null!=k&&k(A)}))}else q("")};EditorUi.prototype.updateDiagram=function(d){function g(H){var Q=new mxCellOverlay(H.image||q.warningImage,H.tooltip,H.align,H.valign,H.offset);Q.addListener(mxEvent.CLICK,function(U, +T){n.alert(H.tooltip)});return Q}var k=null,n=this;if(null!=d&&0<d.length&&(k=mxUtils.parseXml(d),d=null!=k?k.documentElement:null,null!=d&&"updates"==d.nodeName)){var q=this.editor.graph,p=q.getModel();p.beginUpdate();var A=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var E=p.getCell(d.getAttribute("id"));if(null!=E){try{var z=d.getAttribute("value");if(null!=z){var B=mxUtils.parseXml(z).documentElement;if(null!=B)if("1"==B.getAttribute("replace-value"))p.setValue(E,B);else for(var J= +B.attributes,M=0;M<J.length;M++)q.setAttributeForCell(E,J[M].nodeName,0<J[M].nodeValue.length?J[M].nodeValue:null)}}catch(H){null!=window.console&&console.log("Error in value for "+E.id+": "+H)}try{var v=d.getAttribute("style");null!=v&&q.model.setStyle(E,v)}catch(H){null!=window.console&&console.log("Error in style for "+E.id+": "+H)}try{var u=d.getAttribute("icon");if(null!=u){var G=0<u.length?JSON.parse(u):null;null!=G&&G.append||q.removeCellOverlays(E);null!=G&&q.addCellOverlay(E,g(G))}}catch(H){null!= +window.console&&console.log("Error in icon for "+E.id+": "+H)}try{var I=d.getAttribute("geometry");if(null!=I){I=JSON.parse(I);var F=q.getCellGeometry(E);if(null!=F){F=F.clone();for(key in I){var L=parseFloat(I[key]);"dx"==key?F.x+=L:"dy"==key?F.y+=L:"dw"==key?F.width+=L:"dh"==key?F.height+=L:F[key]=parseFloat(I[key])}q.model.setGeometry(E,F)}}}catch(H){null!=window.console&&console.log("Error in icon for "+E.id+": "+H)}}}else if("model"==d.nodeName){for(var K=d.firstChild;null!=K&&K.nodeType!=mxConstants.NODETYPE_ELEMENT;)K= +K.nextSibling;null!=K&&(new mxCodec(d.firstChild)).decode(K,p)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(q.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))q.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(A=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{p.endUpdate()}null!=A&&this.chromelessResize&&this.chromelessResize(!0, +A)}return k};EditorUi.prototype.getCopyFilename=function(d,g){var k=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var n=k.lastIndexOf(".");0<=n&&(d=k.substring(n),k=k.substring(0,n));if(g){g=k;var q=new Date;k=q.getFullYear();n=q.getMonth()+1;var p=q.getDate(),A=q.getHours(),E=q.getMinutes();q=q.getSeconds();k=g+(" "+(k+"-"+n+"-"+p+"-"+A+"-"+E+"-"+q))}return k=mxResources.get("copyOf",[k])+d};EditorUi.prototype.fileLoaded=function(d,g){var k=this.getCurrentFile();this.fileEditable= +this.fileLoadedError=null;this.setCurrentFile(null);var n=!1;this.hideDialog();null!=k&&(EditorUi.debug("File.closed",[k]),k.removeListener(this.descriptorChangedListener),k.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var q=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=k&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!g&&null!=window.location.hash&&0<window.location.hash.length&& (window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();g||this.showSplash()});if(null!=d)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(d);d.addListener("descriptorChanged",this.descriptorChangedListener);d.addListener("contentChanged",this.descriptorChangedListener);d.open(); delete this.openingFile;this.setGraphEnabled(!0);this.setMode(d.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();d.isEditable()?d.isModified()?(d.addUnsavedStatus(),null!=d.backupPatch&&d.patch([d.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(), this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));n=!0;if(!this.isOffline()&&null!=d.getMode()){var p="1"==urlParams.sketch?"sketch":uiTheme;if(null==p)p="default";else if("sketch"==p||"min"==p)p+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:d.getMode().toUpperCase()+"-OPEN-FILE-"+d.getHash(), action:"size_"+d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+p})}EditorUi.debug("File.opened",[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=d.getMode())try{this.addRecent({id:d.getHash(),title:d.getTitle(),mode:d.getMode()})}catch(A){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(A){}}catch(A){this.fileLoadedError= -A;if(null!=d)try{d.close()}catch(E){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+A.message,label:"stack_"+A.stack})}catch(E){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=k?this.fileLoaded(k)||t():t()});g?d():this.handleError(A,mxResources.get("errorLoadingFile"),d,!0,null,null, -!0)}else t();return n};EditorUi.prototype.getHashValueForPages=function(d,g){var k=0,n=new mxGraphModel,t=new mxCodec;null!=g&&(g.byteCount=0,g.attrCount=0,g.eltCount=0,g.nodeCount=0);for(var p=0;p<d.length;p++){this.updatePageRoot(d[p]);var A=d[p].node.cloneNode(!1);A.removeAttribute("name");n.root=d[p].root;var E=t.encode(n);this.editor.graph.saveViewState(d[p].viewState,E,!0);E.removeAttribute("pageWidth");E.removeAttribute("pageHeight");A.appendChild(E);null!=g&&(g.eltCount+=A.getElementsByTagName("*").length, -g.nodeCount+=A.getElementsByTagName("mxCell").length);k=(k<<5)-k+this.hashValue(A,function(y,B,J,N){return!N||"mxGeometry"!=y.nodeName&&"mxPoint"!=y.nodeName||"x"!=B&&"y"!=B&&"width"!=B&&"height"!=B?N&&"mxCell"==y.nodeName&&"previous"==B?null:J:Math.round(J)},g)<<0}return k};EditorUi.prototype.hashValue=function(d,g,k){var n=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(n^=this.hashValue(d.nodeName, -g,k));if(null!=d.attributes){null!=k&&(k.attrCount+=d.attributes.length);for(var t=0;t<d.attributes.length;t++){var p=d.attributes[t].name,A=null!=g?g(d,p,d.attributes[t].value,!0):d.attributes[t].value;null!=A&&(n^=this.hashValue(p,g,k)+this.hashValue(A,g,k))}}if(null!=d.childNodes)for(t=0;t<d.childNodes.length;t++)n=(n<<5)-n+this.hashValue(d.childNodes[t],g,k)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);g=0;null!=k&&(k.byteCount+=d.length);for(t=0;t<d.length;t++)g=(g<<5)-g+d.charCodeAt(t)<< -0;n^=g}return n};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,g,k,n,t,p,A){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(d){null==d&&(d=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this, +A;if(null!=d)try{d.close()}catch(E){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+A.message,label:"stack_"+A.stack})}catch(E){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=k?this.fileLoaded(k)||q():q()});g?d():this.handleError(A,mxResources.get("errorLoadingFile"),d,!0,null,null, +!0)}else q();return n};EditorUi.prototype.getHashValueForPages=function(d,g){var k=0,n=new mxGraphModel,q=new mxCodec;null!=g&&(g.byteCount=0,g.attrCount=0,g.eltCount=0,g.nodeCount=0);for(var p=0;p<d.length;p++){this.updatePageRoot(d[p]);var A=d[p].node.cloneNode(!1);A.removeAttribute("name");n.root=d[p].root;var E=q.encode(n);this.editor.graph.saveViewState(d[p].viewState,E,!0);E.removeAttribute("pageWidth");E.removeAttribute("pageHeight");A.appendChild(E);null!=g&&(g.eltCount+=A.getElementsByTagName("*").length, +g.nodeCount+=A.getElementsByTagName("mxCell").length);k=(k<<5)-k+this.hashValue(A,function(z,B,J,M){return!M||"mxGeometry"!=z.nodeName&&"mxPoint"!=z.nodeName||"x"!=B&&"y"!=B&&"width"!=B&&"height"!=B?M&&"mxCell"==z.nodeName&&"previous"==B?null:J:Math.round(J)},g)<<0}return k};EditorUi.prototype.hashValue=function(d,g,k){var n=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(n^=this.hashValue(d.nodeName, +g,k));if(null!=d.attributes){null!=k&&(k.attrCount+=d.attributes.length);for(var q=0;q<d.attributes.length;q++){var p=d.attributes[q].name,A=null!=g?g(d,p,d.attributes[q].value,!0):d.attributes[q].value;null!=A&&(n^=this.hashValue(p,g,k)+this.hashValue(A,g,k))}}if(null!=d.childNodes)for(q=0;q<d.childNodes.length;q++)n=(n<<5)-n+this.hashValue(d.childNodes[q],g,k)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);g=0;null!=k&&(k.byteCount+=d.length);for(q=0;q<d.length;q++)g=(g<<5)-g+d.charCodeAt(q)<< +0;n^=g}return n};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,g,k,n,q,p,A){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(d){null==d&&(d=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this, d,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(d){var g=mxUtils.createXmlDocument(),k=g.createElement("mxlibrary");mxUtils.setTextContent(k,JSON.stringify(d));g.appendChild(k);return mxUtils.getXml(g)};EditorUi.prototype.closeLibrary=function(d){null!=d&&(this.removeLibrarySidebar(d.getHash()),d.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(d.getHash()),".scratchpad"==d.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar= function(d){var g=this.sidebar.palettes[d];if(null!=g){for(var k=0;k<g.length;k++)g[k].parentNode.removeChild(g[k]);delete this.sidebar.palettes[d]}};EditorUi.prototype.repositionLibrary=function(d){var g=this.sidebar.container;if(null==d){var k=this.sidebar.palettes["L.scratchpad"];null==k&&(k=this.sidebar.palettes.search);null!=k&&(d=k[k.length-1].nextSibling)}d=null!=d?d:g.firstChild.nextSibling.nextSibling;k=g.lastChild;var n=k.previousSibling;g.insertBefore(k,d);g.insertBefore(n,k)};EditorUi.prototype.loadLibrary= function(d,g){var k=mxUtils.parseXml(d.getData());if("mxlibrary"==k.documentElement.nodeName){var n=JSON.parse(mxUtils.getTextContent(k.documentElement));this.libraryLoaded(d,n,k.documentElement.getAttribute("title"),g)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.libraryLoaded=function(d,g,k,n){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&& -(this.scratchpad=d);var t=this.sidebar.palettes[d.getHash()];t=null!=t?t[t.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var p=null,A=mxUtils.bind(this,function(I,F){0==I.length&&d.isEditable()?(null==p&&(p=document.createElement("div"),p.className="geDropTarget",mxUtils.write(p,mxResources.get("dragElementsHere"))),F.appendChild(p)):this.addLibraryEntries(I,F)});null!=this.sidebar&&null!=g&&this.sidebar.addEntries(g);null==k&&(k=d.getTitle(),null!=k&&/(\.xml)$/i.test(k)&&(k=k.substring(0, -k.lastIndexOf("."))));var E=this.sidebar.addPalette(d.getHash(),k,null!=n?n:!0,mxUtils.bind(this,function(I){A(g,I)}));this.repositionLibrary(t);var y=E.parentNode.previousSibling;n=y.getAttribute("title");null!=n&&0<n.length&&".scratchpad"!=d.title&&y.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+n);var B=document.createElement("div");B.style.position="absolute";B.style.right="0px";B.style.top="0px";B.style.padding="8px";B.style.backgroundColor="inherit";y.style.position="relative";var J= -document.createElement("img");J.className="geAdaptiveAsset";J.setAttribute("src",Editor.crossImage);J.setAttribute("title",mxResources.get("close"));J.setAttribute("valign","absmiddle");J.setAttribute("border","0");J.style.position="relative";J.style.top="2px";J.style.width="14px";J.style.cursor="pointer";J.style.margin="0 3px";var N=null;if(".scratchpad"!=d.title||this.closableScratchpad)B.appendChild(J),mxEvent.addListener(J,"click",mxUtils.bind(this,function(I){if(!mxEvent.isConsumed(I)){var F= -mxUtils.bind(this,function(){this.closeLibrary(d)});null!=N?this.confirm(mxResources.get("allChangesLost"),null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):F();mxEvent.consume(I)}}));if(d.isEditable()){var v=this.editor.graph,u=null,G=mxUtils.bind(this,function(I){this.showLibraryDialog(d.getTitle(),E,g,d,d.getMode());mxEvent.consume(I)}),H=mxUtils.bind(this,function(I){d.setModified(!0);d.isAutosave()?(null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u),u=J.cloneNode(!1), -u.setAttribute("src",Editor.spinImage),u.setAttribute("title",mxResources.get("saving")),u.style.cursor="default",u.style.marginRight="2px",u.style.marginTop="-2px",B.insertBefore(u,B.firstChild),y.style.paddingRight=18*B.childNodes.length+"px",this.saveLibrary(d.getTitle(),g,d,d.getMode(),!0,!0,function(){null!=u&&null!=u.parentNode&&(u.parentNode.removeChild(u),y.style.paddingRight=18*B.childNodes.length+"px")})):null==N&&(N=J.cloneNode(!1),N.setAttribute("src",Editor.saveImage),N.setAttribute("title", -mxResources.get("save")),B.insertBefore(N,B.firstChild),mxEvent.addListener(N,"click",mxUtils.bind(this,function(F){this.saveLibrary(d.getTitle(),g,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==N||d.isModified()||(y.style.paddingRight=18*B.childNodes.length+"px",N.parentNode.removeChild(N),N=null)});mxEvent.consume(F)})),y.style.paddingRight=18*B.childNodes.length+"px")}),M=mxUtils.bind(this,function(I,F,P,U){I=v.cloneCells(mxUtils.sortCells(v.model.getTopmostCells(I)));for(var T= -0;T<I.length;T++){var V=v.getCellGeometry(I[T]);null!=V&&V.translate(-F.x,-F.y)}E.appendChild(this.sidebar.createVertexTemplateFromCells(I,F.width,F.height,U||"",!0,null,!1));I={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(I))),w:F.width,h:F.height};null!=U&&(I.title=U);g.push(I);H(P);null!=p&&null!=p.parentNode&&0<g.length&&(p.parentNode.removeChild(p),p=null)}),K=mxUtils.bind(this,function(I){if(v.isSelectionEmpty())v.getRubberband().isActive()?(v.getRubberband().execute(I),v.getRubberband().reset()): -this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var F=v.getSelectionCells(),P=v.view.getBounds(F),U=v.view.scale;P.x/=U;P.y/=U;P.width/=U;P.height/=U;P.x-=v.view.translate.x;P.y-=v.view.translate.y;M(F,P)}mxEvent.consume(I)});mxEvent.addGestureListeners(E,function(){},mxUtils.bind(this,function(I){v.isMouseDown&&null!=v.panningManager&&null!=v.graphHandler.first&&(v.graphHandler.suspend(),null!=v.graphHandler.hint&&(v.graphHandler.hint.style.visibility= -"hidden"),E.style.backgroundColor="#f1f3f4",E.style.cursor="copy",v.panningManager.stop(),v.autoScroll=!1,mxEvent.consume(I))}),mxUtils.bind(this,function(I){v.isMouseDown&&null!=v.panningManager&&null!=v.graphHandler&&(E.style.backgroundColor="",E.style.cursor="default",this.sidebar.showTooltips=!0,v.panningManager.stop(),v.graphHandler.reset(),v.isMouseDown=!1,v.autoScroll=!0,K(I),mxEvent.consume(I))}));mxEvent.addListener(E,"mouseleave",mxUtils.bind(this,function(I){v.isMouseDown&&null!=v.graphHandler.first&& -(v.graphHandler.resume(),null!=v.graphHandler.hint&&(v.graphHandler.hint.style.visibility="visible"),E.style.backgroundColor="",E.style.cursor="",v.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(E,"dragover",mxUtils.bind(this,function(I){E.style.backgroundColor="#f1f3f4";I.dataTransfer.dropEffect="copy";E.style.cursor="copy";this.sidebar.hideTooltip();I.stopPropagation();I.preventDefault()})),mxEvent.addListener(E,"drop",mxUtils.bind(this,function(I){E.style.cursor="";E.style.backgroundColor= -"";0<I.dataTransfer.files.length&&this.importFiles(I.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(F,P,U,T,V,W,q,D,L){if(null!=F&&"image/"==P.substring(0,6))F="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(F),F=[new mxCell("",new mxGeometry(0,0,V,W),F)],F[0].vertex=!0,M(F,new mxRectangle(0,0,V,W),I,mxEvent.isAltDown(I)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),null!=p&&null!=p.parentNode&&0<g.length&& -(p.parentNode.removeChild(p),p=null);else{var R=!1,O=mxUtils.bind(this,function(Q,S){null!=Q&&"application/pdf"==S&&(S=Editor.extractGraphModelFromPdf(Q),null!=S&&0<S.length&&(Q=S));if(null!=Q)if(Q=mxUtils.parseXml(Q),"mxlibrary"==Q.documentElement.nodeName)try{var X=JSON.parse(mxUtils.getTextContent(Q.documentElement));A(X,E);g=g.concat(X);H(I);this.spinner.stop();R=!0}catch(ba){}else if("mxfile"==Q.documentElement.nodeName)try{var aa=Q.documentElement.getElementsByTagName("diagram");for(X=0;X<aa.length;X++){var Y= -this.stringToCells(Editor.getDiagramNodeXml(aa[X])),Z=this.editor.graph.getBoundingBoxFromGeometry(Y);M(Y,new mxRectangle(0,0,Z.width,Z.height),I)}R=!0}catch(ba){null!=window.console&&console.log("error in drop handler:",ba)}R||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=p&&null!=p.parentNode&&0<g.length&&(p.parentNode.removeChild(p),p=null)});null!=L&&null!=q&&(/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q))?this.importVisio(L,function(Q){O(Q, -"text/xml")},null,q):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(F,q)&&null!=L?this.isExternalDataComms()?this.parseFile(L,mxUtils.bind(this,function(Q){4==Q.readyState&&(this.spinner.stop(),200<=Q.status&&299>=Q.status?O(Q.responseText,"text/xml"):this.handleError({message:mxResources.get(413==Q.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):O(F,P)}})); -I.stopPropagation();I.preventDefault()})),mxEvent.addListener(E,"dragleave",function(I){E.style.cursor="";E.style.backgroundColor="";I.stopPropagation();I.preventDefault()}));J=J.cloneNode(!1);J.setAttribute("src",Editor.editImage);J.setAttribute("title",mxResources.get("edit"));B.insertBefore(J,B.firstChild);mxEvent.addListener(J,"click",G);mxEvent.addListener(E,"dblclick",function(I){mxEvent.getSource(I)==E&&G(I)});n=J.cloneNode(!1);n.setAttribute("src",Editor.plusImage);n.setAttribute("title", -mxResources.get("add"));B.insertBefore(n,B.firstChild);mxEvent.addListener(n,"click",K);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(n=document.createElement("span"),n.setAttribute("title",mxResources.get("help")),n.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(n,"?"),mxEvent.addGestureListeners(n,mxUtils.bind(this,function(I){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(I)})),B.insertBefore(n,B.firstChild))}y.appendChild(B); -y.style.paddingRight=18*B.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,g){for(var k=0;k<d.length;k++){var n=d[k],t=n.data;if(null!=t){t=this.convertDataUri(t);var p="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==n.aspect&&(p+="aspect=fixed;");g.appendChild(this.sidebar.createVertexTemplate(p+"image="+t,n.w,n.h,"",n.title||"",!1,null,!0))}else null!=n.xml&&(t=this.stringToCells(Graph.decompress(n.xml)),0<t.length&&g.appendChild(this.sidebar.createVertexTemplateFromCells(t, +(this.scratchpad=d);var q=this.sidebar.palettes[d.getHash()];q=null!=q?q[q.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var p=null,A=mxUtils.bind(this,function(K,H){0==K.length&&d.isEditable()?(null==p&&(p=document.createElement("div"),p.className="geDropTarget",mxUtils.write(p,mxResources.get("dragElementsHere"))),H.appendChild(p)):this.addLibraryEntries(K,H)});null!=this.sidebar&&null!=g&&this.sidebar.addEntries(g);null==k&&(k=d.getTitle(),null!=k&&/(\.xml)$/i.test(k)&&(k=k.substring(0, +k.lastIndexOf("."))));var E=this.sidebar.addPalette(d.getHash(),k,null!=n?n:!0,mxUtils.bind(this,function(K){A(g,K)}));this.repositionLibrary(q);var z=E.parentNode.previousSibling;n=z.getAttribute("title");null!=n&&0<n.length&&".scratchpad"!=d.title&&z.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+n);var B=document.createElement("div");B.style.position="absolute";B.style.right="0px";B.style.top="0px";B.style.padding="8px";B.style.backgroundColor="inherit";z.style.position="relative";var J= +document.createElement("img");J.className="geAdaptiveAsset";J.setAttribute("src",Editor.crossImage);J.setAttribute("title",mxResources.get("close"));J.setAttribute("valign","absmiddle");J.setAttribute("border","0");J.style.position="relative";J.style.top="2px";J.style.width="14px";J.style.cursor="pointer";J.style.margin="0 3px";var M=null;if(".scratchpad"!=d.title||this.closableScratchpad)B.appendChild(J),mxEvent.addListener(J,"click",mxUtils.bind(this,function(K){if(!mxEvent.isConsumed(K)){var H= +mxUtils.bind(this,function(){this.closeLibrary(d)});null!=M?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):H();mxEvent.consume(K)}}));if(d.isEditable()){var v=this.editor.graph,u=null,G=mxUtils.bind(this,function(K){this.showLibraryDialog(d.getTitle(),E,g,d,d.getMode());mxEvent.consume(K)}),I=mxUtils.bind(this,function(K){d.setModified(!0);d.isAutosave()?(null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u),u=J.cloneNode(!1), +u.setAttribute("src",Editor.spinImage),u.setAttribute("title",mxResources.get("saving")),u.style.cursor="default",u.style.marginRight="2px",u.style.marginTop="-2px",B.insertBefore(u,B.firstChild),z.style.paddingRight=18*B.childNodes.length+"px",this.saveLibrary(d.getTitle(),g,d,d.getMode(),!0,!0,function(){null!=u&&null!=u.parentNode&&(u.parentNode.removeChild(u),z.style.paddingRight=18*B.childNodes.length+"px")})):null==M&&(M=J.cloneNode(!1),M.setAttribute("src",Editor.saveImage),M.setAttribute("title", +mxResources.get("save")),B.insertBefore(M,B.firstChild),mxEvent.addListener(M,"click",mxUtils.bind(this,function(H){this.saveLibrary(d.getTitle(),g,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==M||d.isModified()||(z.style.paddingRight=18*B.childNodes.length+"px",M.parentNode.removeChild(M),M=null)});mxEvent.consume(H)})),z.style.paddingRight=18*B.childNodes.length+"px")}),F=mxUtils.bind(this,function(K,H,Q,U){K=v.cloneCells(mxUtils.sortCells(v.model.getTopmostCells(K)));for(var T= +0;T<K.length;T++){var V=v.getCellGeometry(K[T]);null!=V&&V.translate(-H.x,-H.y)}E.appendChild(this.sidebar.createVertexTemplateFromCells(K,H.width,H.height,U||"",!0,null,!1));K={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(K))),w:H.width,h:H.height};null!=U&&(K.title=U);g.push(K);I(Q);null!=p&&null!=p.parentNode&&0<g.length&&(p.parentNode.removeChild(p),p=null)}),L=mxUtils.bind(this,function(K){if(v.isSelectionEmpty())v.getRubberband().isActive()?(v.getRubberband().execute(K),v.getRubberband().reset()): +this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var H=v.getSelectionCells(),Q=v.view.getBounds(H),U=v.view.scale;Q.x/=U;Q.y/=U;Q.width/=U;Q.height/=U;Q.x-=v.view.translate.x;Q.y-=v.view.translate.y;F(H,Q)}mxEvent.consume(K)});mxEvent.addGestureListeners(E,function(){},mxUtils.bind(this,function(K){v.isMouseDown&&null!=v.panningManager&&null!=v.graphHandler.first&&(v.graphHandler.suspend(),null!=v.graphHandler.hint&&(v.graphHandler.hint.style.visibility= +"hidden"),E.style.backgroundColor="#f1f3f4",E.style.cursor="copy",v.panningManager.stop(),v.autoScroll=!1,mxEvent.consume(K))}),mxUtils.bind(this,function(K){v.isMouseDown&&null!=v.panningManager&&null!=v.graphHandler&&(E.style.backgroundColor="",E.style.cursor="default",this.sidebar.showTooltips=!0,v.panningManager.stop(),v.graphHandler.reset(),v.isMouseDown=!1,v.autoScroll=!0,L(K),mxEvent.consume(K))}));mxEvent.addListener(E,"mouseleave",mxUtils.bind(this,function(K){v.isMouseDown&&null!=v.graphHandler.first&& +(v.graphHandler.resume(),null!=v.graphHandler.hint&&(v.graphHandler.hint.style.visibility="visible"),E.style.backgroundColor="",E.style.cursor="",v.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(E,"dragover",mxUtils.bind(this,function(K){E.style.backgroundColor="#f1f3f4";K.dataTransfer.dropEffect="copy";E.style.cursor="copy";this.sidebar.hideTooltip();K.stopPropagation();K.preventDefault()})),mxEvent.addListener(E,"drop",mxUtils.bind(this,function(K){E.style.cursor="";E.style.backgroundColor= +"";0<K.dataTransfer.files.length&&this.importFiles(K.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(H,Q,U,T,V,W,t,C,N){if(null!=H&&"image/"==Q.substring(0,6))H="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(H),H=[new mxCell("",new mxGeometry(0,0,V,W),H)],H[0].vertex=!0,F(H,new mxRectangle(0,0,V,W),K,mxEvent.isAltDown(K)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),null!=p&&null!=p.parentNode&&0<g.length&& +(p.parentNode.removeChild(p),p=null);else{var R=!1,O=mxUtils.bind(this,function(P,S){null!=P&&"application/pdf"==S&&(S=Editor.extractGraphModelFromPdf(P),null!=S&&0<S.length&&(P=S));if(null!=P)if(P=mxUtils.parseXml(P),"mxlibrary"==P.documentElement.nodeName)try{var X=JSON.parse(mxUtils.getTextContent(P.documentElement));A(X,E);g=g.concat(X);I(K);this.spinner.stop();R=!0}catch(ba){}else if("mxfile"==P.documentElement.nodeName)try{var aa=P.documentElement.getElementsByTagName("diagram");for(X=0;X<aa.length;X++){var Y= +this.stringToCells(Editor.getDiagramNodeXml(aa[X])),Z=this.editor.graph.getBoundingBoxFromGeometry(Y);F(Y,new mxRectangle(0,0,Z.width,Z.height),K)}R=!0}catch(ba){null!=window.console&&console.log("error in drop handler:",ba)}R||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=p&&null!=p.parentNode&&0<g.length&&(p.parentNode.removeChild(p),p=null)});null!=N&&null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t)||/(\.vs(x|sx?))($|\?)/i.test(t))?this.importVisio(N,function(P){O(P, +"text/xml")},null,t):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(H,t)&&null!=N?this.isExternalDataComms()?this.parseFile(N,mxUtils.bind(this,function(P){4==P.readyState&&(this.spinner.stop(),200<=P.status&&299>=P.status?O(P.responseText,"text/xml"):this.handleError({message:mxResources.get(413==P.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):O(H,Q)}})); +K.stopPropagation();K.preventDefault()})),mxEvent.addListener(E,"dragleave",function(K){E.style.cursor="";E.style.backgroundColor="";K.stopPropagation();K.preventDefault()}));J=J.cloneNode(!1);J.setAttribute("src",Editor.editImage);J.setAttribute("title",mxResources.get("edit"));B.insertBefore(J,B.firstChild);mxEvent.addListener(J,"click",G);mxEvent.addListener(E,"dblclick",function(K){mxEvent.getSource(K)==E&&G(K)});n=J.cloneNode(!1);n.setAttribute("src",Editor.plusImage);n.setAttribute("title", +mxResources.get("add"));B.insertBefore(n,B.firstChild);mxEvent.addListener(n,"click",L);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(n=document.createElement("span"),n.setAttribute("title",mxResources.get("help")),n.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(n,"?"),mxEvent.addGestureListeners(n,mxUtils.bind(this,function(K){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(K)})),B.insertBefore(n,B.firstChild))}z.appendChild(B); +z.style.paddingRight=18*B.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,g){for(var k=0;k<d.length;k++){var n=d[k],q=n.data;if(null!=q){q=this.convertDataUri(q);var p="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==n.aspect&&(p+="aspect=fixed;");g.appendChild(this.sidebar.createVertexTemplate(p+"image="+q,n.w,n.h,"",n.title||"",!1,null,!0))}else null!=n.xml&&(q=this.stringToCells(Graph.decompress(n.xml)),0<q.length&&g.appendChild(this.sidebar.createVertexTemplateFromCells(q, n.w,n.h,n.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(d){return null!=d?d[mxLanguage]||d.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="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):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor=Editor.darkColor,Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.shapeBackgroundColor=Editor.darkColor,Graph.prototype.shapeForegroundColor=Editor.lightColor,Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultPageBorderColor= "#505759",BaseFormatPanel.prototype.buttonBackgroundColor=Editor.darkColor,mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];"1"==urlParams.sketch&&("undefined"!== typeof Menus&&(Menus.prototype.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts)),Graph.prototype.defaultVertexStyle={hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid, -Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,g,k,n,t,p,A){d=new ImageDialog(this,d,g,k,n,t,p,A);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,g){d=null!=d?d:mxUtils.bind(this,function(k,n){n||(k=new ChangePageSetup(this,null,k), -k.ignoreColor=!0,this.editor.graph.model.execute(k))});d=new BackgroundImageDialog(this,d,g);this.showDialog(d.container,400,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,g,k,n,t){d=new LibraryDialog(this,d,g,k,n,t);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(p){p&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var f=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var g=f.apply(this,arguments); +Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,g,k,n,q,p,A){d=new ImageDialog(this,d,g,k,n,q,p,A);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,g){d=null!=d?d:mxUtils.bind(this,function(k,n){n||(k=new ChangePageSetup(this,null,k), +k.ignoreColor=!0,this.editor.graph.model.execute(k))});d=new BackgroundImageDialog(this,d,g);this.showDialog(d.container,400,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,g,k,n,q){d=new LibraryDialog(this,d,g,k,n,q);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(p){p&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var f=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var g=f.apply(this,arguments); this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(k){this.editor.graph.isSelectionEmpty()&&g.refresh()}));return g};EditorUi.prototype.createSidebarFooterContainer=function(){var d=this.createDiv("geSidebarContainer geSidebarFooter");d.style.position="absolute";d.style.overflow="hidden";var g=document.createElement("a");g.className="geTitle";g.style.color="#DF6C0C";g.style.fontWeight="bold";g.style.height="100%";g.style.paddingTop="9px";g.innerHTML="<span>+</span>";var k= -g.getElementsByTagName("span")[0];k.style.fontSize="18px";k.style.marginRight="5px";mxUtils.write(g,mxResources.get("moreShapes")+"...");mxEvent.addListener(g,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(n){n.preventDefault()}));mxEvent.addListener(g,"click",mxUtils.bind(this,function(n){this.actions.get("shapes").funct();mxEvent.consume(n)}));d.appendChild(g);return d};EditorUi.prototype.handleError=function(d,g,k,n,t,p,A){var E=null!=this.spinner&&null!=this.spinner.pause? -this.spinner.pause():function(){},y=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{A?null!=window.console&&console.error("EditorUi.handleError:",d):EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,d.columnNumber,d,"INFO")}catch(u){}if(null!=y||null!=g){A=mxUtils.htmlEntities(mxResources.get("unknownError"));var B=mxResources.get("ok"),J=null;g=null!=g?g:mxResources.get("error");if(null!=y){null!= -y.retry&&(B=mxResources.get("cancel"),J=function(){E();y.retry()});if(404==y.code||404==y.status||403==y.code){A=403==y.code?null!=y.message?mxUtils.htmlEntities(y.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=t?t:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var N=null!=t?null:null!=p?p:window.location.hash;if(null!=N&&("#G"==N.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"== -N.substring(0,45))&&(null!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&&"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.error.data[0].reason)||404==y.code||404==y.status)){N="#U"==N.substring(0,2)?N.substring(45,N.lastIndexOf("%26ex")):N.substring(2);this.showError(g,A,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+N);this.handleError(d,g,k,n,t)}), -J,mxResources.get("changeUser"),mxUtils.bind(this,function(){function u(){K.innerText="";for(var I=0;I<G.length;I++){var F=document.createElement("option");mxUtils.write(F,G[I].displayName);F.value=I;K.appendChild(F);F=document.createElement("option");F.innerHTML=" ";mxUtils.write(F,"<"+G[I].email+">");F.setAttribute("disabled","disabled");K.appendChild(F)}F=document.createElement("option");mxUtils.write(F,mxResources.get("addAccount"));F.value=G.length;K.appendChild(F)}var G=this.drive.getUsersList(), -H=document.createElement("div"),M=document.createElement("span");M.style.marginTop="6px";mxUtils.write(M,mxResources.get("changeUser")+": ");H.appendChild(M);var K=document.createElement("select");K.style.width="200px";u();mxEvent.addListener(K,"change",mxUtils.bind(this,function(){var I=K.value,F=G.length!=I;F&&this.drive.setUser(G[I]);this.drive.authorize(F,mxUtils.bind(this,function(){F||(G=this.drive.getUsersList(),u())}),mxUtils.bind(this,function(P){this.handleError(P)}),!0)}));H.appendChild(K); -H=new CustomDialog(this,H,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(H.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=k&&k()}),480,150);return}}null!=y.message?A=""==y.message&&null!=y.name?mxUtils.htmlEntities(y.name):mxUtils.htmlEntities(y.message):null!=y.response&&null!=y.response.error?A=mxUtils.htmlEntities(y.response.error):"undefined"!==typeof window.App&&(y.code==App.ERROR_TIMEOUT? -A=mxUtils.htmlEntities(mxResources.get("timeout")):y.code==App.ERROR_BUSY?A=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof y&&0<y.length&&(A=mxUtils.htmlEntities(y)))}var v=p=null;null!=y&&null!=y.helpLink?(p=mxResources.get("help"),v=mxUtils.bind(this,function(){return this.editor.graph.openLink(y.helpLink)})):null!=y&&null!=y.ownerEmail&&(p=mxResources.get("contactOwner"),A+=mxUtils.htmlEntities(" ("+p+": "+y.ownerEmail+")"),v=mxUtils.bind(this,function(){return this.openLink("mailto:"+ -mxUtils.htmlEntities(y.ownerEmail))}));this.showError(g,A,B,k,J,null,null,p,v,null,null,null,n?k:null)}else null!=k&&k()};EditorUi.prototype.alert=function(d,g,k){d=new ErrorDialog(this,null,d,mxResources.get("ok"),g);this.showDialog(d.container,k||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,g,k,n,t,p){var A=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},E=Math.min(200,28*Math.ceil(d.length/50));d=new ConfirmDialog(this,d,function(){A();null!=g&& -g()},function(){A();null!=k&&k()},n,t,null,null,null,null,E);this.showDialog(d.container,340,46+E,!0,p);d.init()};EditorUi.prototype.showBanner=function(d,g,k,n){var t=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){var p=document.createElement("div");p.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+ -mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(p.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(p.style,"transition","all 1s ease");p.className="geBtn gePrimaryBtn";t=document.createElement("img");t.setAttribute("src",IMAGE_PATH+"/logo.png");t.setAttribute("border","0");t.setAttribute("align","absmiddle");t.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";p.appendChild(t); -t=document.createElement("img");t.setAttribute("src",Dialog.prototype.closeImage);t.setAttribute("title",mxResources.get(n?"doNotShowAgain":"close"));t.setAttribute("border","0");t.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";p.appendChild(t);mxUtils.write(p,g);document.body.appendChild(p);this.bannerShowing=!0;g=document.createElement("div");g.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var A=document.createElement("input"); -A.setAttribute("type","checkbox");A.setAttribute("id","geDoNotShowAgainCheckbox");A.style.marginRight="6px";if(!n){g.appendChild(A);var E=document.createElement("label");E.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(E,mxResources.get("doNotShowAgain"));g.appendChild(E);p.style.paddingBottom="30px";p.appendChild(g)}var y=mxUtils.bind(this,function(){null!=p.parentNode&&(p.parentNode.removeChild(p),this.bannerShowing=!1,A.checked||n)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!= -mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});mxEvent.addListener(t,"click",mxUtils.bind(this,function(J){mxEvent.consume(J);y()}));var B=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){y()}),1E3)});mxEvent.addListener(p,"click",mxUtils.bind(this,function(J){var N=mxEvent.getSource(J);N!=A&&N!=E?(null!=k&&k(),y(),mxEvent.consume(J)):B()}));window.setTimeout(mxUtils.bind(this, -function(){mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(B,3E4);t=!0}return t};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,g,k,n){d=d.toDataURL("image/"+k);if(null!=d&&6<d.length)null!=g&&(d=Editor.writeGraphModelToPng(d, -"tEXt","mxfile",encodeURIComponent(g))),0<n&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",n));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,g,k,n,t){var p="jpeg"==k?"jpg":k;n=this.getBaseFilename(n)+(null!=g?".drawio":"")+"."+p;d=this.createImageDataUri(d,g,k,t);this.saveData(n,p,d.substring(d.lastIndexOf(",")+1),"image/"+k,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&& -"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,g){d=new TextareaDialog(this,d,g,null,null,mxResources.get("close"));this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,g,k,n,t,p){"text/xml"!=k||/(\.drawio)$/i.test(g)||/(\.xml)$/i.test(g)||/(\.svg)$/i.test(g)|| +g.getElementsByTagName("span")[0];k.style.fontSize="18px";k.style.marginRight="5px";mxUtils.write(g,mxResources.get("moreShapes")+"...");mxEvent.addListener(g,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(n){n.preventDefault()}));mxEvent.addListener(g,"click",mxUtils.bind(this,function(n){this.actions.get("shapes").funct();mxEvent.consume(n)}));d.appendChild(g);return d};EditorUi.prototype.handleError=function(d,g,k,n,q,p,A){var E=null!=this.spinner&&null!=this.spinner.pause? +this.spinner.pause():function(){},z=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{A?null!=window.console&&console.error("EditorUi.handleError:",d):EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,d.columnNumber,d,"INFO")}catch(u){}if(null!=z||null!=g){A=mxUtils.htmlEntities(mxResources.get("unknownError"));var B=mxResources.get("ok"),J=null;g=null!=g?g:mxResources.get("error");if(null!=z){null!= +z.retry&&(B=mxResources.get("cancel"),J=function(){E();z.retry()});if(404==z.code||404==z.status||403==z.code){A=403==z.code?null!=z.message?mxUtils.htmlEntities(z.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=q?q:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var M=null!=q?null:null!=p?p:window.location.hash;if(null!=M&&("#G"==M.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"== +M.substring(0,45))&&(null!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&&"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.error.data[0].reason)||404==z.code||404==z.status)){M="#U"==M.substring(0,2)?M.substring(45,M.lastIndexOf("%26ex")):M.substring(2);this.showError(g,A,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+M);this.handleError(d,g,k,n,q)}), +J,mxResources.get("changeUser"),mxUtils.bind(this,function(){function u(){L.innerText="";for(var K=0;K<G.length;K++){var H=document.createElement("option");mxUtils.write(H,G[K].displayName);H.value=K;L.appendChild(H);H=document.createElement("option");H.innerHTML=" ";mxUtils.write(H,"<"+G[K].email+">");H.setAttribute("disabled","disabled");L.appendChild(H)}H=document.createElement("option");mxUtils.write(H,mxResources.get("addAccount"));H.value=G.length;L.appendChild(H)}var G=this.drive.getUsersList(), +I=document.createElement("div"),F=document.createElement("span");F.style.marginTop="6px";mxUtils.write(F,mxResources.get("changeUser")+": ");I.appendChild(F);var L=document.createElement("select");L.style.width="200px";u();mxEvent.addListener(L,"change",mxUtils.bind(this,function(){var K=L.value,H=G.length!=K;H&&this.drive.setUser(G[K]);this.drive.authorize(H,mxUtils.bind(this,function(){H||(G=this.drive.getUsersList(),u())}),mxUtils.bind(this,function(Q){this.handleError(Q)}),!0)}));I.appendChild(L); +I=new CustomDialog(this,I,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(I.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=k&&k()}),480,150);return}}null!=z.message?A=""==z.message&&null!=z.name?mxUtils.htmlEntities(z.name):mxUtils.htmlEntities(z.message):null!=z.response&&null!=z.response.error?A=mxUtils.htmlEntities(z.response.error):"undefined"!==typeof window.App&&(z.code==App.ERROR_TIMEOUT? +A=mxUtils.htmlEntities(mxResources.get("timeout")):z.code==App.ERROR_BUSY?A=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof z&&0<z.length&&(A=mxUtils.htmlEntities(z)))}var v=p=null;null!=z&&null!=z.helpLink?(p=mxResources.get("help"),v=mxUtils.bind(this,function(){return this.editor.graph.openLink(z.helpLink)})):null!=z&&null!=z.ownerEmail&&(p=mxResources.get("contactOwner"),A+=mxUtils.htmlEntities(" ("+p+": "+z.ownerEmail+")"),v=mxUtils.bind(this,function(){return this.openLink("mailto:"+ +mxUtils.htmlEntities(z.ownerEmail))}));this.showError(g,A,B,k,J,null,null,p,v,null,null,null,n?k:null)}else null!=k&&k()};EditorUi.prototype.alert=function(d,g,k){d=new ErrorDialog(this,null,d,mxResources.get("ok"),g);this.showDialog(d.container,k||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,g,k,n,q,p){var A=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},E=Math.min(200,28*Math.ceil(d.length/50));d=new ConfirmDialog(this,d,function(){A();null!=g&& +g()},function(){A();null!=k&&k()},n,q,null,null,null,null,E);this.showDialog(d.container,340,46+E,!0,p);d.init()};EditorUi.prototype.showBanner=function(d,g,k,n){var q=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){var p=document.createElement("div");p.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+ +mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(p.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(p.style,"transition","all 1s ease");p.className="geBtn gePrimaryBtn";q=document.createElement("img");q.setAttribute("src",IMAGE_PATH+"/logo.png");q.setAttribute("border","0");q.setAttribute("align","absmiddle");q.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";p.appendChild(q); +q=document.createElement("img");q.setAttribute("src",Dialog.prototype.closeImage);q.setAttribute("title",mxResources.get(n?"doNotShowAgain":"close"));q.setAttribute("border","0");q.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";p.appendChild(q);mxUtils.write(p,g);document.body.appendChild(p);this.bannerShowing=!0;g=document.createElement("div");g.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var A=document.createElement("input"); +A.setAttribute("type","checkbox");A.setAttribute("id","geDoNotShowAgainCheckbox");A.style.marginRight="6px";if(!n){g.appendChild(A);var E=document.createElement("label");E.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(E,mxResources.get("doNotShowAgain"));g.appendChild(E);p.style.paddingBottom="30px";p.appendChild(g)}var z=mxUtils.bind(this,function(){null!=p.parentNode&&(p.parentNode.removeChild(p),this.bannerShowing=!1,A.checked||n)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!= +mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});mxEvent.addListener(q,"click",mxUtils.bind(this,function(J){mxEvent.consume(J);z()}));var B=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){z()}),1E3)});mxEvent.addListener(p,"click",mxUtils.bind(this,function(J){var M=mxEvent.getSource(J);M!=A&&M!=E?(null!=k&&k(),z(),mxEvent.consume(J)):B()}));window.setTimeout(mxUtils.bind(this, +function(){mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(B,3E4);q=!0}return q};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,g,k,n){d=d.toDataURL("image/"+k);if(null!=d&&6<d.length)null!=g&&(d=Editor.writeGraphModelToPng(d, +"tEXt","mxfile",encodeURIComponent(g))),0<n&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",n));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,g,k,n,q){var p="jpeg"==k?"jpg":k;n=this.getBaseFilename(n)+(null!=g?".drawio":"")+"."+p;d=this.createImageDataUri(d,g,k,q);this.saveData(n,p,d.substring(d.lastIndexOf(",")+1),"image/"+k,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&& +"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,g){d=new TextareaDialog(this,d,g,null,null,mxResources.get("close"));this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,g,k,n,q,p){"text/xml"!=k||/(\.drawio)$/i.test(g)||/(\.xml)$/i.test(g)||/(\.svg)$/i.test(g)|| /(\.html)$/i.test(g)||(g=g+"."+(null!=p?p:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=n?this.base64ToBlob(d,k):new Blob([d],{type:k}),navigator.msSaveOrOpenBlob(d,g);else if(mxClient.IS_IE)k=window.open("about:blank","_blank"),null==k?mxUtils.popup(d,!0):(k.document.write(d),k.document.close(),k.document.execCommand("SaveAs",!0,g),k.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==k||"image/"!=k.substring(0,6)?this.showTextDialog(g+":",d):this.openInNewWindow(d, k,n);else{var A=document.createElement("a");p=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof A.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var E=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);p=65==(E?parseInt(E[2],10):!1)?!1:p}if(p||this.isOffline()){A.href=URL.createObjectURL(n?this.base64ToBlob(d,k):new Blob([d],{type:k}));p?A.download=g:A.setAttribute("target","_blank");document.body.appendChild(A);try{window.setTimeout(function(){URL.revokeObjectURL(A.href)}, -2E4),A.click(),A.parentNode.removeChild(A)}catch(y){}}else this.createEchoRequest(d,g,k,n,t).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,g,k,n,t,p){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=k?"&mime="+k:"")+(null!=t?"&format="+t:"")+(null!=p?"&base64="+p:"")+(null!=g?"&filename="+encodeURIComponent(g):"")+(n?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,g){g=g||"";d=atob(d);for(var k=d.length,n=Math.ceil(k/1024),t=Array(n), -p=0;p<n;++p){for(var A=1024*p,E=Math.min(A+1024,k),y=Array(E-A),B=0;A<E;++B,++A)y[B]=d[A].charCodeAt(0);t[p]=new Uint8Array(y)}return new Blob(t,{type:g})};EditorUi.prototype.saveLocalFile=function(d,g,k,n,t,p,A,E){p=null!=p?p:!1;A=null!=A?A:"vsdx"!=t&&(!mxClient.IS_IOS||!navigator.standalone);t=this.getServiceCount(p);isLocalStorage&&t++;var y=4>=t?2:6<t?4:3;g=new CreateDialog(this,g,mxUtils.bind(this,function(B,J){try{if("_blank"==J)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(d, -k,n);else if(null!=k&&"text/html"==k.substring(0,9)){var N=new EmbedDialog(this,d);this.showDialog(N.container,450,240,!0,!0);N.init()}else{var v=window.open("about:blank");null==v?mxUtils.popup(d,!0):(v.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),v.document.close())}else J==App.MODE_DEVICE||"download"==J?this.doSaveLocalFile(d,B,k,n,null,E):null!=B&&0<B.length&&this.pickFolder(J,mxUtils.bind(this,function(u){try{this.exportFile(d,B,k,n,J,u)}catch(G){this.handleError(G)}}))}catch(u){this.handleError(u)}}), -mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,p,A,null,1<t,y,d,k,n);p=this.isServices(t)?t>y?390:280:160;this.showDialog(g.container,420,p,!0,!0);g.init()};EditorUi.prototype.openInNewWindow=function(d,g,k){var n=window.open("about:blank");null==n||null==n.document?mxUtils.popup(d,!0):("image/svg+xml"!=g||mxClient.IS_SVG?"image/svg+xml"!=g||k?(d=k?d:btoa(unescape(encodeURIComponent(d))),n.document.write('<html><img style="max-width:100%;" src="data:'+ +2E4),A.click(),A.parentNode.removeChild(A)}catch(z){}}else this.createEchoRequest(d,g,k,n,q).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,g,k,n,q,p){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=k?"&mime="+k:"")+(null!=q?"&format="+q:"")+(null!=p?"&base64="+p:"")+(null!=g?"&filename="+encodeURIComponent(g):"")+(n?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,g){g=g||"";d=atob(d);for(var k=d.length,n=Math.ceil(k/1024),q=Array(n), +p=0;p<n;++p){for(var A=1024*p,E=Math.min(A+1024,k),z=Array(E-A),B=0;A<E;++B,++A)z[B]=d[A].charCodeAt(0);q[p]=new Uint8Array(z)}return new Blob(q,{type:g})};EditorUi.prototype.saveLocalFile=function(d,g,k,n,q,p,A,E){p=null!=p?p:!1;A=null!=A?A:"vsdx"!=q&&(!mxClient.IS_IOS||!navigator.standalone);q=this.getServiceCount(p);isLocalStorage&&q++;var z=4>=q?2:6<q?4:3;g=new CreateDialog(this,g,mxUtils.bind(this,function(B,J){try{if("_blank"==J)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(d, +k,n);else if(null!=k&&"text/html"==k.substring(0,9)){var M=new EmbedDialog(this,d);this.showDialog(M.container,450,240,!0,!0);M.init()}else{var v=window.open("about:blank");null==v?mxUtils.popup(d,!0):(v.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),v.document.close())}else J==App.MODE_DEVICE||"download"==J?this.doSaveLocalFile(d,B,k,n,null,E):null!=B&&0<B.length&&this.pickFolder(J,mxUtils.bind(this,function(u){try{this.exportFile(d,B,k,n,J,u)}catch(G){this.handleError(G)}}))}catch(u){this.handleError(u)}}), +mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,p,A,null,1<q,z,d,k,n);p=this.isServices(q)?q>z?390:280:160;this.showDialog(g.container,420,p,!0,!0);g.init()};EditorUi.prototype.openInNewWindow=function(d,g,k){var n=window.open("about:blank");null==n||null==n.document?mxUtils.popup(d,!0):("image/svg+xml"!=g||mxClient.IS_SVG?"image/svg+xml"!=g||k?(d=k?d:btoa(unescape(encodeURIComponent(d))),n.document.write('<html><img style="max-width:100%;" src="data:'+ g+";base64,"+d+'"/></html>')):n.document.write("<html>"+d+"</html>"):n.document.write("<html><pre>"+mxUtils.htmlEntities(d,!1)+"</pre></html>"),n.document.close())};var c=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(d){if(null!=urlParams.tags){this.tagsDialog= this.tagsComponent=null;var g=d(mxUtils.bind(this,function(n){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding= "4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor="#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div, -80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var t=g.getBoundingClientRect();this.tagsDialog.style.left=t.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+ -4+"px";t=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=t.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(n)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var n=this.editor.graph.getAllTags();g.style.display=0<n.length?"":"none"}))}c.apply(this,arguments);this.editor.addListener("tagsDialogShown", +80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var q=g.getBoundingClientRect();this.tagsDialog.style.left=q.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+ +4+"px";q=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=q.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(n)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var n=this.editor.graph.getAllTags();g.style.display=0<n.length?"":"none"}))}c.apply(this,arguments);this.editor.addListener("tagsDialogShown", mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&& (this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var k=d(mxUtils.bind(this, -function(n){var t=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",t);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)t.apply(this);else{this.exportDialog=document.createElement("div");var p=k.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center"; +function(n){var q=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",q);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)q.apply(this);else{this.exportDialog=document.createElement("div");var p=k.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center"; this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=p.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";p=mxUtils.getCurrentStyle(this.editor.graph.container); -this.exportDialog.style.zIndex=p.zIndex;var A=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});A.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(E){A.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var y=this.createImageDataUri(E,null,"png");E=document.createElement("img");E.style.maxWidth="140px";E.style.maxHeight= -"140px";E.style.cursor="pointer";E.style.backgroundColor="white";E.setAttribute("title",mxResources.get("openInNewWindow"));E.setAttribute("border","0");E.setAttribute("src",y);this.exportDialog.appendChild(E);mxEvent.addListener(E,"click",mxUtils.bind(this,function(){this.openInNewWindow(y.substring(y.indexOf(",")+1),"image/png",!0);t.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(E){this.spinner.stop();this.handleError(E)}),null,null,null,null,null,null,null, -Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",t);document.body.appendChild(this.exportDialog)}mxEvent.consume(n)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,g,k,n,t){this.isLocalFileSave()?this.saveLocalFile(k,d,n,t,g):this.saveRequest(d,g,mxUtils.bind(this,function(p,A){return this.createEchoRequest(k,p,n,t,g,A)}),k,t,n)};EditorUi.prototype.saveRequest=function(d,g,k,n,t,p,A){A=null!=A?A:!mxClient.IS_IOS||!navigator.standalone; -var E=this.getServiceCount(!1);isLocalStorage&&E++;var y=4>=E?2:6<E?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(B,J){if("_blank"==J||null!=B&&0<B.length){var N=k("_blank"==J?null:B,J==App.MODE_DEVICE||"download"==J||null==J||"_blank"==J?"0":"1");null!=N&&(J==App.MODE_DEVICE||"download"==J||"_blank"==J?N.simulate(document,"_blank"):this.pickFolder(J,mxUtils.bind(this,function(v){p=null!=p?p:"pdf"==g?"application/pdf":"image/"+g;if(null!=n)try{this.exportFile(n,B,p,!0,J,v)}catch(u){this.handleError(u)}else this.spinner.spin(document.body, -mxResources.get("saving"))&&N.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=N.getStatus()&&299>=N.getStatus())try{this.exportFile(N.getText(),B,p,!0,J,v)}catch(u){this.handleError(u)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(u){this.spinner.stop();this.handleError(u)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,A,null,1<E,y,n,p,t);E=this.isServices(E)?4<E?390:280:160;this.showDialog(d.container, -420,E,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,g,k,n,t,p){};EditorUi.prototype.pickFolder=function(d,g,k){g(null)};EditorUi.prototype.exportSvg=function(d,g,k,n,t,p,A,E,y,B,J,N,v,u){if(this.spinner.spin(document.body,mxResources.get("export")))try{var G=this.editor.graph.isSelectionEmpty();k=null!=k?k:G;var H=g?null:this.editor.graph.background;H==mxConstants.NONE&& -(H=null);null==H&&0==g&&(H=J?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var M=this.editor.graph.getSvg(H,d,A,E,null,k,null,null,"blank"==B?"_blank":"self"==B?"_top":null,null,!v,J,N);n&&this.editor.graph.addSvgShadow(M);var K=this.getBaseFilename()+(t?".drawio":"")+".svg";u=null!=u?u:mxUtils.bind(this,function(P){this.isLocalFileSave()||P.length<=MAX_REQUEST_SIZE?this.saveData(K,"svg",P,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"), -mxUtils.bind(this,function(){mxUtils.popup(P)}))});var I=mxUtils.bind(this,function(P){this.spinner.stop();t&&P.setAttribute("content",this.getFileData(!0,null,null,null,k,y,null,null,null,!1));u(Graph.xmlDeclaration+"\n"+(t?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(P))});this.editor.graph.mathEnabled&&this.editor.addMathCss(M);var F=mxUtils.bind(this,function(P){p?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(P,I,this.thumbImageCache)): -I(P)});v?this.embedFonts(M,F):(this.editor.addFontCss(M),F(M))}catch(P){this.handleError(P)}};EditorUi.prototype.addRadiobox=function(d,g,k,n,t,p,A){return this.addCheckbox(d,k,n,t,p,A,!0,g)};EditorUi.prototype.addCheckbox=function(d,g,k,n,t,p,A,E){p=null!=p?p:!0;var y=document.createElement("input");y.style.marginRight="8px";y.style.marginTop="16px";y.setAttribute("type",A?"radio":"checkbox");A="geCheckbox-"+Editor.guid();y.id=A;null!=E&&y.setAttribute("name",E);k&&(y.setAttribute("checked","checked"), -y.defaultChecked=!0);n&&y.setAttribute("disabled","disabled");p&&(d.appendChild(y),k=document.createElement("label"),mxUtils.write(k,g),k.setAttribute("for",A),d.appendChild(k),t||mxUtils.br(d));return y};EditorUi.prototype.addEditButton=function(d,g){var k=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);k.style.marginLeft="24px";var n=this.getCurrentFile(),t="";null!=n&&n.getMode()!=App.MODE_DEVICE&&n.getMode()!=App.MODE_BROWSER&&(t=window.location.href);var p=document.createElement("select"); +this.exportDialog.style.zIndex=p.zIndex;var A=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});A.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(E){A.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var z=this.createImageDataUri(E,null,"png");E=document.createElement("img");E.style.maxWidth="140px";E.style.maxHeight= +"140px";E.style.cursor="pointer";E.style.backgroundColor="white";E.setAttribute("title",mxResources.get("openInNewWindow"));E.setAttribute("border","0");E.setAttribute("src",z);this.exportDialog.appendChild(E);mxEvent.addListener(E,"click",mxUtils.bind(this,function(){this.openInNewWindow(z.substring(z.indexOf(",")+1),"image/png",!0);q.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(E){this.spinner.stop();this.handleError(E)}),null,null,null,null,null,null,null, +Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",q);document.body.appendChild(this.exportDialog)}mxEvent.consume(n)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,g,k,n,q){this.isLocalFileSave()?this.saveLocalFile(k,d,n,q,g):this.saveRequest(d,g,mxUtils.bind(this,function(p,A){return this.createEchoRequest(k,p,n,q,g,A)}),k,q,n)};EditorUi.prototype.saveRequest=function(d,g,k,n,q,p,A){A=null!=A?A:!mxClient.IS_IOS||!navigator.standalone; +var E=this.getServiceCount(!1);isLocalStorage&&E++;var z=4>=E?2:6<E?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(B,J){if("_blank"==J||null!=B&&0<B.length){var M=k("_blank"==J?null:B,J==App.MODE_DEVICE||"download"==J||null==J||"_blank"==J?"0":"1");null!=M&&(J==App.MODE_DEVICE||"download"==J||"_blank"==J?M.simulate(document,"_blank"):this.pickFolder(J,mxUtils.bind(this,function(v){p=null!=p?p:"pdf"==g?"application/pdf":"image/"+g;if(null!=n)try{this.exportFile(n,B,p,!0,J,v)}catch(u){this.handleError(u)}else this.spinner.spin(document.body, +mxResources.get("saving"))&&M.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=M.getStatus()&&299>=M.getStatus())try{this.exportFile(M.getText(),B,p,!0,J,v)}catch(u){this.handleError(u)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(u){this.spinner.stop();this.handleError(u)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,A,null,1<E,z,n,p,q);E=this.isServices(E)?4<E?390:280:160;this.showDialog(d.container, +420,E,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,g,k,n,q,p){};EditorUi.prototype.pickFolder=function(d,g,k){g(null)};EditorUi.prototype.exportSvg=function(d,g,k,n,q,p,A,E,z,B,J,M,v,u){if(this.spinner.spin(document.body,mxResources.get("export")))try{var G=this.editor.graph.isSelectionEmpty();k=null!=k?k:G;var I=g?null:this.editor.graph.background;I==mxConstants.NONE&& +(I=null);null==I&&0==g&&(I=J?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var F=this.editor.graph.getSvg(I,d,A,E,null,k,null,null,"blank"==B?"_blank":"self"==B?"_top":null,null,!v,J,M);n&&this.editor.graph.addSvgShadow(F);var L=this.getBaseFilename()+(q?".drawio":"")+".svg";u=null!=u?u:mxUtils.bind(this,function(Q){this.isLocalFileSave()||Q.length<=MAX_REQUEST_SIZE?this.saveData(L,"svg",Q,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"), +mxUtils.bind(this,function(){mxUtils.popup(Q)}))});var K=mxUtils.bind(this,function(Q){this.spinner.stop();q&&Q.setAttribute("content",this.getFileData(!0,null,null,null,k,z,null,null,null,!1));u(Graph.xmlDeclaration+"\n"+(q?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(Q))});this.editor.graph.mathEnabled&&this.editor.addMathCss(F);var H=mxUtils.bind(this,function(Q){p?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(Q,K,this.thumbImageCache)): +K(Q)});v?this.embedFonts(F,H):(this.editor.addFontCss(F),H(F))}catch(Q){this.handleError(Q)}};EditorUi.prototype.addRadiobox=function(d,g,k,n,q,p,A){return this.addCheckbox(d,k,n,q,p,A,!0,g)};EditorUi.prototype.addCheckbox=function(d,g,k,n,q,p,A,E){p=null!=p?p:!0;var z=document.createElement("input");z.style.marginRight="8px";z.style.marginTop="16px";z.setAttribute("type",A?"radio":"checkbox");A="geCheckbox-"+Editor.guid();z.id=A;null!=E&&z.setAttribute("name",E);k&&(z.setAttribute("checked","checked"), +z.defaultChecked=!0);n&&z.setAttribute("disabled","disabled");p&&(d.appendChild(z),k=document.createElement("label"),mxUtils.write(k,g),k.setAttribute("for",A),d.appendChild(k),q||mxUtils.br(d));return z};EditorUi.prototype.addEditButton=function(d,g){var k=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);k.style.marginLeft="24px";var n=this.getCurrentFile(),q="";null!=n&&n.getMode()!=App.MODE_DEVICE&&n.getMode()!=App.MODE_BROWSER&&(q=window.location.href);var p=document.createElement("select"); p.style.maxWidth="200px";p.style.width="auto";p.style.marginLeft="8px";p.style.marginRight="10px";p.className="geBtn";n=document.createElement("option");n.setAttribute("value","blank");mxUtils.write(n,mxResources.get("makeCopy"));p.appendChild(n);n=document.createElement("option");n.setAttribute("value","custom");mxUtils.write(n,mxResources.get("custom")+"...");p.appendChild(n);d.appendChild(p);mxEvent.addListener(p,"change",mxUtils.bind(this,function(){if("custom"==p.value){var A=new FilenameDialog(this, -t,mxResources.get("ok"),function(E){null!=E?t=E:p.value="blank"},mxResources.get("url"),null,null,null,null,function(){p.value="blank"});this.showDialog(A.container,300,80,!0,!1);A.init()}}));mxEvent.addListener(k,"change",mxUtils.bind(this,function(){k.checked&&(null==g||g.checked)?p.removeAttribute("disabled"):p.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return k.checked?"blank"===p.value?"_blank":t:null},getEditInput:function(){return k},getEditSelect:function(){return p}}}; +q,mxResources.get("ok"),function(E){null!=E?q=E:p.value="blank"},mxResources.get("url"),null,null,null,null,function(){p.value="blank"});this.showDialog(A.container,300,80,!0,!1);A.init()}}));mxEvent.addListener(k,"change",mxUtils.bind(this,function(){k.checked&&(null==g||g.checked)?p.removeAttribute("disabled"):p.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return k.checked?"blank"===p.value?"_blank":q:null},getEditInput:function(){return k},getEditSelect:function(){return p}}}; EditorUi.prototype.addLinkSection=function(d,g){function k(){var E=document.createElement("div");E.style.width="100%";E.style.height="100%";E.style.boxSizing="border-box";null!=p&&p!=mxConstants.NONE?(E.style.border="1px solid black",E.style.backgroundColor=p):(E.style.backgroundPosition="center center",E.style.backgroundRepeat="no-repeat",E.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");A.innerText="";A.appendChild(E)}mxUtils.write(d,mxResources.get("links")+":");var n=document.createElement("select"); -n.style.width="100px";n.style.padding="0px";n.style.marginLeft="8px";n.style.marginRight="10px";n.className="geBtn";var t=document.createElement("option");t.setAttribute("value","auto");mxUtils.write(t,mxResources.get("automatic"));n.appendChild(t);t=document.createElement("option");t.setAttribute("value","blank");mxUtils.write(t,mxResources.get("openInNewWindow"));n.appendChild(t);t=document.createElement("option");t.setAttribute("value","self");mxUtils.write(t,mxResources.get("openInThisWindow")); -n.appendChild(t);g&&(g=document.createElement("option"),g.setAttribute("value","frame"),mxUtils.write(g,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),n.appendChild(g));d.appendChild(n);mxUtils.write(d,mxResources.get("borderColor")+":");var p="#0000ff",A=null;A=mxUtils.button("",mxUtils.bind(this,function(E){this.pickColor(p||"none",function(y){p=y;k()});mxEvent.consume(E)}));k();A.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";A.style.marginLeft="4px";A.style.height= -"22px";A.style.width="22px";A.style.position="relative";A.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";A.className="geColorBtn";d.appendChild(A);mxUtils.br(d);return{getColor:function(){return p},getTarget:function(){return n.value},focus:function(){n.focus()}}};EditorUi.prototype.createUrlParameters=function(d,g,k,n,t,p,A){A=null!=A?A:[];n&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||A.push("lightbox=1"),"auto"!=d&&A.push("target="+d),null!= -g&&g!=mxConstants.NONE&&A.push("highlight="+("#"==g.charAt(0)?g.substring(1):g)),null!=t&&0<t.length&&A.push("edit="+encodeURIComponent(t)),p&&A.push("layers=1"),this.editor.graph.foldingEnabled&&A.push("nav=1"));k&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&A.push("page-id="+this.currentPage.getId());return A};EditorUi.prototype.createLink=function(d,g,k,n,t,p,A,E,y,B){y=this.createUrlParameters(d,g,k,n,t,p,y);d=this.getCurrentFile();g=!0;null!=A?k="#U"+encodeURIComponent(A): -(d=this.getCurrentFile(),E||null==d||d.constructor!=window.DriveFile?k="#R"+encodeURIComponent(k?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(k="#"+d.getHash(),g=!1));g&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&y.push("title="+encodeURIComponent(d.getTitle()));B&&1<k.length&&(y.push("open="+k.substring(1)),k="");return(n&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp|| -!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<y.length?"?"+y.join("&"):"")+k};EditorUi.prototype.createHtml=function(d,g,k,n,t,p,A,E,y,B,J,N){this.getBasenames();var v={};""!=t&&t!=mxConstants.NONE&&(v.highlight=t);"auto"!==n&&(v.target=n);B||(v.lightbox=!1);v.nav=this.editor.graph.foldingEnabled;k=parseInt(k);isNaN(k)||100==k||(v.zoom=k/100);k=[];A&&(k.push("pages"),v.resize=!0,null!=this.pages&&null!=this.currentPage&&(v.page=mxUtils.indexOf(this.pages, -this.currentPage)));g&&(k.push("zoom"),v.resize=!0);E&&k.push("layers");y&&k.push("tags");0<k.length&&(B&&k.push("lightbox"),v.toolbar=k.join(" "));null!=J&&0<J.length&&(v.edit=J);null!=d?v.url=d:v.xml=this.getFileData(!0,null,null,null,null,!A);g='<div class="mxgraph" style="'+(p?"max-width:100%;":"")+(""!=k?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(v))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";N(g,'<script type="text/javascript" src="'+ -(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,g,k,n){var t=document.createElement("div");t.style.whiteSpace="nowrap";var p=document.createElement("h3");mxUtils.write(p,mxResources.get("html"));p.style.cssText= -"width:100%;text-align:center;margin-top:0px;margin-bottom:12px";t.appendChild(p);var A=document.createElement("div");A.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var E=document.createElement("input");E.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";E.setAttribute("value","url");E.setAttribute("type","radio");E.setAttribute("name","type-embedhtmldialog");p=E.cloneNode(!0);p.setAttribute("value","copy");A.appendChild(p);var y=document.createElement("span"); -mxUtils.write(y,mxResources.get("includeCopyOfMyDiagram"));A.appendChild(y);mxUtils.br(A);A.appendChild(E);y=document.createElement("span");mxUtils.write(y,mxResources.get("publicDiagramUrl"));A.appendChild(y);var B=this.getCurrentFile();null==k&&null!=B&&B.constructor==window.DriveFile&&(y=document.createElement("a"),y.style.paddingLeft="12px",y.style.color="gray",y.style.cursor="pointer",mxUtils.write(y,mxResources.get("share")),A.appendChild(y),mxEvent.addListener(y,"click",mxUtils.bind(this,function(){this.hideDialog(); -this.drive.showPermissions(B.getId())})));p.setAttribute("checked","checked");null==k&&E.setAttribute("disabled","disabled");t.appendChild(A);var J=this.addLinkSection(t),N=this.addCheckbox(t,mxResources.get("zoom"),!0,null,!0);mxUtils.write(t,":");var v=document.createElement("input");v.setAttribute("type","text");v.style.marginRight="16px";v.style.width="60px";v.style.marginLeft="4px";v.style.marginRight="12px";v.value="100%";t.appendChild(v);var u=this.addCheckbox(t,mxResources.get("fit"),!0); -A=null!=this.pages&&1<this.pages.length;var G=G=this.addCheckbox(t,mxResources.get("allPages"),A,!A),H=this.addCheckbox(t,mxResources.get("layers"),!0),M=this.addCheckbox(t,mxResources.get("tags"),!0),K=this.addCheckbox(t,mxResources.get("lightbox"),!0),I=null;A=380;if(EditorUi.enableHtmlEditOption){I=this.addEditButton(t,K);var F=I.getEditInput();F.style.marginBottom="16px";A+=50;mxEvent.addListener(K,"change",function(){K.checked?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled"); -F.checked&&K.checked?I.getEditSelect().removeAttribute("disabled"):I.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,t,mxUtils.bind(this,function(){n(E.checked?k:null,N.checked,v.value,J.getTarget(),J.getColor(),u.checked,G.checked,H.checked,M.checked,K.checked,null!=I?I.getLink():null)}),null,d,g);this.showDialog(d.container,340,A,!0,!0);p.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,g,k,n,t,p,A,E){var y=document.createElement("div");y.style.whiteSpace= -"nowrap";var B=document.createElement("h3");mxUtils.write(B,d||mxResources.get("link"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";y.appendChild(B);var J=this.getCurrentFile();d=0;if(null==J||J.constructor!=window.DriveFile||g)A=null!=A?A:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{d=80;A=null!=A?A:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";B=document.createElement("div");B.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"));B.appendChild(N);N=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(J.getId())}));N.style.marginTop="12px";N.className="geBtn";B.appendChild(N);y.appendChild(B);N=document.createElement("a");N.style.paddingLeft="12px";N.style.color="gray";N.style.fontSize="11px";N.style.cursor="pointer";mxUtils.write(N,mxResources.get("check"));B.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(U){this.spinner.stop();U=new ErrorDialog(this,null,mxResources.get(null!=U?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(U.container,300,80,!0,!1);U.init()}))}))}var v=null,u=null;if(null!=k||null!=n)d+=30,mxUtils.write(y,mxResources.get("width")+":"),v=document.createElement("input"), -v.setAttribute("type","text"),v.style.marginRight="16px",v.style.width="50px",v.style.marginLeft="6px",v.style.marginRight="16px",v.style.marginBottom="10px",v.value="100%",y.appendChild(v),mxUtils.write(y,mxResources.get("height")+":"),u=document.createElement("input"),u.setAttribute("type","text"),u.style.width="50px",u.style.marginLeft="6px",u.style.marginBottom="10px",u.value=n+"px",y.appendChild(u),mxUtils.br(y);var G=this.addLinkSection(y,p);k=null!=this.pages&&1<this.pages.length;var H=null; -if(null==J||J.constructor!=window.DriveFile||g)H=this.addCheckbox(y,mxResources.get("allPages"),k,!k);var M=this.addCheckbox(y,mxResources.get("lightbox"),!0,null,null,!p),K=this.addEditButton(y,M),I=K.getEditInput();p&&(I.style.marginLeft=M.style.marginLeft,M.style.display="none",d-=20);var F=this.addCheckbox(y,mxResources.get("layers"),!0);F.style.marginLeft=I.style.marginLeft;F.style.marginTop="8px";var P=this.addCheckbox(y,mxResources.get("tags"),!0);P.style.marginLeft=I.style.marginLeft;P.style.marginBottom= -"16px";P.style.marginTop="16px";mxEvent.addListener(M,"change",function(){M.checked?(F.removeAttribute("disabled"),I.removeAttribute("disabled")):(F.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"));I.checked&&M.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,y,mxUtils.bind(this,function(){t(G.getTarget(),G.getColor(),null==H?!0:H.checked,M.checked,K.getLink(),F.checked,null!=v?v.value:null, -null!=u?u.value:null,P.checked)}),null,mxResources.get("create"),A,E);this.showDialog(g.container,340,300+d,!0,!0);null!=v?(v.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?v.select():document.execCommand("selectAll",!1,null)):G.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,g,k,n,t){var p=document.createElement("div");p.style.whiteSpace="nowrap";var A=document.createElement("h3");mxUtils.write(A,mxResources.get("image"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+ -(t?"10":"4")+"px";p.appendChild(A);if(t){mxUtils.write(p,mxResources.get("zoom")+":");var E=document.createElement("input");E.setAttribute("type","text");E.style.marginRight="16px";E.style.width="60px";E.style.marginLeft="4px";E.style.marginRight="12px";E.value=this.lastExportZoom||"100%";p.appendChild(E);mxUtils.write(p,mxResources.get("borderWidth")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.marginRight="16px";y.style.width="60px";y.style.marginLeft="4px";y.value= -this.lastExportBorder||"0";p.appendChild(y);mxUtils.br(p)}var B=this.addCheckbox(p,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),J=n?null:this.addCheckbox(p,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);A=this.editor.graph;var N=n?null:this.addCheckbox(p,mxResources.get("transparentBackground"),A.background==mxConstants.NONE||null==A.background);null!=N&&(N.style.marginBottom="16px");d=new CustomDialog(this,p,mxUtils.bind(this,function(){var v= -parseInt(E.value)/100||1,u=parseInt(y.value)||0;k(!B.checked,null!=J?J.checked:!1,null!=N?N.checked:!1,v,u)}),null,d,g);this.showDialog(d.container,300,(t?25:0)+(n?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,g,k,n,t,p,A,E,y){A=null!=A?A:Editor.defaultIncludeDiagram;var B=document.createElement("div");B.style.whiteSpace="nowrap";var J=this.editor.graph,N="jpeg"==E?220:300,v=document.createElement("h3");mxUtils.write(v,d);v.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px"; +n.style.width="100px";n.style.padding="0px";n.style.marginLeft="8px";n.style.marginRight="10px";n.className="geBtn";var q=document.createElement("option");q.setAttribute("value","auto");mxUtils.write(q,mxResources.get("automatic"));n.appendChild(q);q=document.createElement("option");q.setAttribute("value","blank");mxUtils.write(q,mxResources.get("openInNewWindow"));n.appendChild(q);q=document.createElement("option");q.setAttribute("value","self");mxUtils.write(q,mxResources.get("openInThisWindow")); +n.appendChild(q);g&&(g=document.createElement("option"),g.setAttribute("value","frame"),mxUtils.write(g,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),n.appendChild(g));d.appendChild(n);mxUtils.write(d,mxResources.get("borderColor")+":");var p="#0000ff",A=null;A=mxUtils.button("",mxUtils.bind(this,function(E){this.pickColor(p||"none",function(z){p=z;k()});mxEvent.consume(E)}));k();A.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";A.style.marginLeft="4px";A.style.height= +"22px";A.style.width="22px";A.style.position="relative";A.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";A.className="geColorBtn";d.appendChild(A);mxUtils.br(d);return{getColor:function(){return p},getTarget:function(){return n.value},focus:function(){n.focus()}}};EditorUi.prototype.createUrlParameters=function(d,g,k,n,q,p,A){A=null!=A?A:[];n&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||A.push("lightbox=1"),"auto"!=d&&A.push("target="+d),null!= +g&&g!=mxConstants.NONE&&A.push("highlight="+("#"==g.charAt(0)?g.substring(1):g)),null!=q&&0<q.length&&A.push("edit="+encodeURIComponent(q)),p&&A.push("layers=1"),this.editor.graph.foldingEnabled&&A.push("nav=1"));k&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&A.push("page-id="+this.currentPage.getId());return A};EditorUi.prototype.createLink=function(d,g,k,n,q,p,A,E,z,B){z=this.createUrlParameters(d,g,k,n,q,p,z);d=this.getCurrentFile();g=!0;null!=A?k="#U"+encodeURIComponent(A): +(d=this.getCurrentFile(),E||null==d||d.constructor!=window.DriveFile?k="#R"+encodeURIComponent(k?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(k="#"+d.getHash(),g=!1));g&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&z.push("title="+encodeURIComponent(d.getTitle()));B&&1<k.length&&(z.push("open="+k.substring(1)),k="");return(n&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp|| +!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<z.length?"?"+z.join("&"):"")+k};EditorUi.prototype.createHtml=function(d,g,k,n,q,p,A,E,z,B,J,M){this.getBasenames();var v={};""!=q&&q!=mxConstants.NONE&&(v.highlight=q);"auto"!==n&&(v.target=n);B||(v.lightbox=!1);v.nav=this.editor.graph.foldingEnabled;k=parseInt(k);isNaN(k)||100==k||(v.zoom=k/100);k=[];A&&(k.push("pages"),v.resize=!0,null!=this.pages&&null!=this.currentPage&&(v.page=mxUtils.indexOf(this.pages, +this.currentPage)));g&&(k.push("zoom"),v.resize=!0);E&&k.push("layers");z&&k.push("tags");0<k.length&&(B&&k.push("lightbox"),v.toolbar=k.join(" "));null!=J&&0<J.length&&(v.edit=J);null!=d?v.url=d:v.xml=this.getFileData(!0,null,null,null,null,!A);g='<div class="mxgraph" style="'+(p?"max-width:100%;":"")+(""!=k?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(v))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";M(g,'<script type="text/javascript" src="'+ +(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,g,k,n){var q=document.createElement("div");q.style.whiteSpace="nowrap";var p=document.createElement("h3");mxUtils.write(p,mxResources.get("html"));p.style.cssText= +"width:100%;text-align:center;margin-top:0px;margin-bottom:12px";q.appendChild(p);var A=document.createElement("div");A.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var E=document.createElement("input");E.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";E.setAttribute("value","url");E.setAttribute("type","radio");E.setAttribute("name","type-embedhtmldialog");p=E.cloneNode(!0);p.setAttribute("value","copy");A.appendChild(p);var z=document.createElement("span"); +mxUtils.write(z,mxResources.get("includeCopyOfMyDiagram"));A.appendChild(z);mxUtils.br(A);A.appendChild(E);z=document.createElement("span");mxUtils.write(z,mxResources.get("publicDiagramUrl"));A.appendChild(z);var B=this.getCurrentFile();null==k&&null!=B&&B.constructor==window.DriveFile&&(z=document.createElement("a"),z.style.paddingLeft="12px",z.style.color="gray",z.style.cursor="pointer",mxUtils.write(z,mxResources.get("share")),A.appendChild(z),mxEvent.addListener(z,"click",mxUtils.bind(this,function(){this.hideDialog(); +this.drive.showPermissions(B.getId())})));p.setAttribute("checked","checked");null==k&&E.setAttribute("disabled","disabled");q.appendChild(A);var J=this.addLinkSection(q),M=this.addCheckbox(q,mxResources.get("zoom"),!0,null,!0);mxUtils.write(q,":");var v=document.createElement("input");v.setAttribute("type","text");v.style.marginRight="16px";v.style.width="60px";v.style.marginLeft="4px";v.style.marginRight="12px";v.value="100%";q.appendChild(v);var u=this.addCheckbox(q,mxResources.get("fit"),!0); +A=null!=this.pages&&1<this.pages.length;var G=G=this.addCheckbox(q,mxResources.get("allPages"),A,!A),I=this.addCheckbox(q,mxResources.get("layers"),!0),F=this.addCheckbox(q,mxResources.get("tags"),!0),L=this.addCheckbox(q,mxResources.get("lightbox"),!0),K=null;A=380;if(EditorUi.enableHtmlEditOption){K=this.addEditButton(q,L);var H=K.getEditInput();H.style.marginBottom="16px";A+=50;mxEvent.addListener(L,"change",function(){L.checked?H.removeAttribute("disabled"):H.setAttribute("disabled","disabled"); +H.checked&&L.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,q,mxUtils.bind(this,function(){n(E.checked?k:null,M.checked,v.value,J.getTarget(),J.getColor(),u.checked,G.checked,I.checked,F.checked,L.checked,null!=K?K.getLink():null)}),null,d,g);this.showDialog(d.container,340,A,!0,!0);p.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,g,k,n,q,p,A,E){var z=document.createElement("div");z.style.whiteSpace= +"nowrap";var B=document.createElement("h3");mxUtils.write(B,d||mxResources.get("link"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";z.appendChild(B);var J=this.getCurrentFile();d=0;if(null==J||J.constructor!=window.DriveFile||g)A=null!=A?A:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{d=80;A=null!=A?A:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";B=document.createElement("div");B.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;"; +var M=document.createElement("div");M.style.whiteSpace="normal";mxUtils.write(M,mxResources.get("linkAccountRequired"));B.appendChild(M);M=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(J.getId())}));M.style.marginTop="12px";M.className="geBtn";B.appendChild(M);z.appendChild(B);M=document.createElement("a");M.style.paddingLeft="12px";M.style.color="gray";M.style.fontSize="11px";M.style.cursor="pointer";mxUtils.write(M,mxResources.get("check"));B.appendChild(M); +mxEvent.addListener(M,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(U){this.spinner.stop();U=new ErrorDialog(this,null,mxResources.get(null!=U?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(U.container,300,80,!0,!1);U.init()}))}))}var v=null,u=null;if(null!=k||null!=n)d+=30,mxUtils.write(z,mxResources.get("width")+":"),v=document.createElement("input"), +v.setAttribute("type","text"),v.style.marginRight="16px",v.style.width="50px",v.style.marginLeft="6px",v.style.marginRight="16px",v.style.marginBottom="10px",v.value="100%",z.appendChild(v),mxUtils.write(z,mxResources.get("height")+":"),u=document.createElement("input"),u.setAttribute("type","text"),u.style.width="50px",u.style.marginLeft="6px",u.style.marginBottom="10px",u.value=n+"px",z.appendChild(u),mxUtils.br(z);var G=this.addLinkSection(z,p);k=null!=this.pages&&1<this.pages.length;var I=null; +if(null==J||J.constructor!=window.DriveFile||g)I=this.addCheckbox(z,mxResources.get("allPages"),k,!k);var F=this.addCheckbox(z,mxResources.get("lightbox"),!0,null,null,!p),L=this.addEditButton(z,F),K=L.getEditInput();p&&(K.style.marginLeft=F.style.marginLeft,F.style.display="none",d-=20);var H=this.addCheckbox(z,mxResources.get("layers"),!0);H.style.marginLeft=K.style.marginLeft;H.style.marginTop="8px";var Q=this.addCheckbox(z,mxResources.get("tags"),!0);Q.style.marginLeft=K.style.marginLeft;Q.style.marginBottom= +"16px";Q.style.marginTop="16px";mxEvent.addListener(F,"change",function(){F.checked?(H.removeAttribute("disabled"),K.removeAttribute("disabled")):(H.setAttribute("disabled","disabled"),K.setAttribute("disabled","disabled"));K.checked&&F.checked?L.getEditSelect().removeAttribute("disabled"):L.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,z,mxUtils.bind(this,function(){q(G.getTarget(),G.getColor(),null==I?!0:I.checked,F.checked,L.getLink(),H.checked,null!=v?v.value:null, +null!=u?u.value:null,Q.checked)}),null,mxResources.get("create"),A,E);this.showDialog(g.container,340,300+d,!0,!0);null!=v?(v.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?v.select():document.execCommand("selectAll",!1,null)):G.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,g,k,n,q){var p=document.createElement("div");p.style.whiteSpace="nowrap";var A=document.createElement("h3");mxUtils.write(A,mxResources.get("image"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+ +(q?"10":"4")+"px";p.appendChild(A);if(q){mxUtils.write(p,mxResources.get("zoom")+":");var E=document.createElement("input");E.setAttribute("type","text");E.style.marginRight="16px";E.style.width="60px";E.style.marginLeft="4px";E.style.marginRight="12px";E.value=this.lastExportZoom||"100%";p.appendChild(E);mxUtils.write(p,mxResources.get("borderWidth")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.marginRight="16px";z.style.width="60px";z.style.marginLeft="4px";z.value= +this.lastExportBorder||"0";p.appendChild(z);mxUtils.br(p)}var B=this.addCheckbox(p,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),J=n?null:this.addCheckbox(p,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);A=this.editor.graph;var M=n?null:this.addCheckbox(p,mxResources.get("transparentBackground"),A.background==mxConstants.NONE||null==A.background);null!=M&&(M.style.marginBottom="16px");d=new CustomDialog(this,p,mxUtils.bind(this,function(){var v= +parseInt(E.value)/100||1,u=parseInt(z.value)||0;k(!B.checked,null!=J?J.checked:!1,null!=M?M.checked:!1,v,u)}),null,d,g);this.showDialog(d.container,300,(q?25:0)+(n?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,g,k,n,q,p,A,E,z){A=null!=A?A:Editor.defaultIncludeDiagram;var B=document.createElement("div");B.style.whiteSpace="nowrap";var J=this.editor.graph,M="jpeg"==E?220:300,v=document.createElement("h3");mxUtils.write(v,d);v.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px"; B.appendChild(v);mxUtils.write(B,mxResources.get("zoom")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.style.marginRight="12px";u.value=this.lastExportZoom||"100%";B.appendChild(u);mxUtils.write(B,mxResources.get("borderWidth")+":");var G=document.createElement("input");G.setAttribute("type","text");G.style.marginRight="16px";G.style.width="60px";G.style.marginLeft="4px";G.value=this.lastExportBorder|| -"0";B.appendChild(G);mxUtils.br(B);var H=this.addCheckbox(B,mxResources.get("selectionOnly"),!1,J.isSelectionEmpty()),M=document.createElement("input");M.style.marginTop="16px";M.style.marginRight="8px";M.style.marginLeft="24px";M.setAttribute("disabled","disabled");M.setAttribute("type","checkbox");var K=document.createElement("select");K.style.marginTop="16px";K.style.marginLeft="8px";d=["selectionOnly","diagram","page"];var I={};for(v=0;v<d.length;v++)if(!J.isSelectionEmpty()||"selectionOnly"!= -d[v]){var F=document.createElement("option");mxUtils.write(F,mxResources.get(d[v]));F.setAttribute("value",d[v]);K.appendChild(F);I[d[v]]=F}y?(mxUtils.write(B,mxResources.get("size")+":"),B.appendChild(K),mxUtils.br(B),N+=26,mxEvent.addListener(K,"change",function(){"selectionOnly"==K.value&&(H.checked=!0)})):p&&(B.appendChild(M),mxUtils.write(B,mxResources.get("crop")),mxUtils.br(B),N+=30,mxEvent.addListener(H,"change",function(){H.checked?M.removeAttribute("disabled"):M.setAttribute("disabled", -"disabled")}));J.isSelectionEmpty()?y&&(H.style.display="none",H.nextSibling.style.display="none",H.nextSibling.nextSibling.style.display="none",N-=30):(K.value="diagram",M.setAttribute("checked","checked"),M.defaultChecked=!0,mxEvent.addListener(H,"change",function(){K.value=H.checked?"selectionOnly":"diagram"}));var P=this.addCheckbox(B,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=E),U=null;Editor.isDarkMode()&&(U=this.addCheckbox(B,mxResources.get("dark"),!0),N+=26);var T=this.addCheckbox(B, -mxResources.get("shadow"),J.shadowVisible),V=null;if("png"==E||"jpeg"==E)V=this.addCheckbox(B,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),N+=30;var W=this.addCheckbox(B,mxResources.get("includeCopyOfMyDiagram"),A,null,null,"jpeg"!=E);W.style.marginBottom="16px";var q=document.createElement("input");q.style.marginBottom="16px";q.style.marginRight="8px";q.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||q.setAttribute("disabled","disabled");var D= -document.createElement("select");D.style.maxWidth="260px";D.style.marginLeft="8px";D.style.marginRight="10px";D.style.marginBottom="16px";D.className="geBtn";p=document.createElement("option");p.setAttribute("value","none");mxUtils.write(p,mxResources.get("noChange"));D.appendChild(p);p=document.createElement("option");p.setAttribute("value","embedFonts");mxUtils.write(p,mxResources.get("embedFonts"));D.appendChild(p);p=document.createElement("option");p.setAttribute("value","lblToSvg");mxUtils.write(p, -mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||D.appendChild(p);mxEvent.addListener(D,"change",mxUtils.bind(this,function(){"lblToSvg"==D.value?(q.checked=!0,q.setAttribute("disabled","disabled"),I.page.style.display="none","page"==K.value&&(K.value="diagram"),T.checked=!1,T.setAttribute("disabled","disabled"),R.style.display="inline-block",L.style.display="none"):"disabled"==q.getAttribute("disabled")&&(q.checked=!1,q.removeAttribute("disabled"),T.removeAttribute("disabled"), -I.page.style.display="",R.style.display="none",L.style.display="")}));g&&(B.appendChild(q),mxUtils.write(B,mxResources.get("embedImages")),mxUtils.br(B),mxUtils.write(B,mxResources.get("txtSettings")+":"),B.appendChild(D),mxUtils.br(B),N+=60);var L=document.createElement("select");L.style.maxWidth="260px";L.style.marginLeft="8px";L.style.marginRight="10px";L.className="geBtn";g=document.createElement("option");g.setAttribute("value","auto");mxUtils.write(g,mxResources.get("automatic"));L.appendChild(g); -g=document.createElement("option");g.setAttribute("value","blank");mxUtils.write(g,mxResources.get("openInNewWindow"));L.appendChild(g);g=document.createElement("option");g.setAttribute("value","self");mxUtils.write(g,mxResources.get("openInThisWindow"));L.appendChild(g);var R=document.createElement("div");mxUtils.write(R,mxResources.get("LinksLost"));R.style.margin="7px";R.style.display="none";"svg"==E&&(mxUtils.write(B,mxResources.get("links")+":"),B.appendChild(L),B.appendChild(R),mxUtils.br(B), -mxUtils.br(B),N+=50);k=new CustomDialog(this,B,mxUtils.bind(this,function(){this.lastExportBorder=G.value;this.lastExportZoom=u.value;t(u.value,P.checked,!H.checked,T.checked,W.checked,q.checked,G.value,M.checked,!1,L.value,null!=V?V.checked:null,null!=U?U.checked:null,K.value,"embedFonts"==D.value,"lblToSvg"==D.value)}),null,k,n);this.showDialog(k.container,340,N,!0,!0,null,null,null,null,!0);u.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?u.select():document.execCommand("selectAll", -!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,g,k,n,t){var p=document.createElement("div");p.style.whiteSpace="nowrap";var A=this.editor.graph;if(null!=g){var E=document.createElement("h3");mxUtils.write(E,g);E.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";p.appendChild(E)}var y=this.addCheckbox(p,mxResources.get("fit"),!0),B=this.addCheckbox(p,mxResources.get("shadow"),A.shadowVisible&&n,!n),J=this.addCheckbox(p,k),N=this.addCheckbox(p,mxResources.get("lightbox"), -!0),v=this.addEditButton(p,N),u=v.getEditInput(),G=1<A.model.getChildCount(A.model.getRoot()),H=this.addCheckbox(p,mxResources.get("layers"),G,!G);H.style.marginLeft=u.style.marginLeft;H.style.marginBottom="12px";H.style.marginTop="8px";mxEvent.addListener(N,"change",function(){N.checked?(G&&H.removeAttribute("disabled"),u.removeAttribute("disabled")):(H.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"));u.checked&&N.checked?v.getEditSelect().removeAttribute("disabled"):v.getEditSelect().setAttribute("disabled", -"disabled")});g=new CustomDialog(this,p,mxUtils.bind(this,function(){d(y.checked,B.checked,J.checked,N.checked,v.getLink(),H.checked)}),null,mxResources.get("embed"),t);this.showDialog(g.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,g,k,n,t,p,A,E){function y(u){var G=" ",H="";n&&(G=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+ -EditorUi.lightboxHost+"/?client=1"+(null!=J?"&page="+J:"")+(t?"&edit=_blank":"")+(p?"&layers=1":"")+"');}})(this);\"",H+="cursor:pointer;");d&&(H+="max-width:100%;");var M="";k&&(M=' width="'+Math.round(B.width)+'" height="'+Math.round(B.height)+'"');A('<img src="'+u+'"'+M+(""!=H?' style="'+H+'"':"")+G+"/>")}var B=this.editor.graph.getGraphBounds(),J=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(u){var G=n?this.getFileData(!0):null;u= -this.createImageDataUri(u,G,"png");y(u)}),null,null,null,mxUtils.bind(this,function(u){E({message:mxResources.get("unknownError")})}),null,!0,k?2:1,null,g,null,null,Editor.defaultBorder);else if(g=this.getFileData(!0),B.width*B.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE){var N="";k&&(N="&w="+Math.round(2*B.width)+"&h="+Math.round(2*B.height));var v=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(n?"1":"0")+N+"&xml="+encodeURIComponent(g));v.send(mxUtils.bind(this,function(){200<=v.getStatus()&& -299>=v.getStatus()?y("data:image/png;base64,"+v.getText()):E({message:mxResources.get("unknownError")})}))}else E({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(d,g,k,n,t,p,A){var E=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!k),y=E.getElementsByTagName("a");if(null!=y)for(var B=0;B<y.length;B++){var J=y[B].getAttribute("href");null!=J&&"#"==J.charAt(0)&&"_blank"==y[B].getAttribute("target")&&y[B].removeAttribute("target")}n&& -E.setAttribute("content",this.getFileData(!0));g&&this.editor.graph.addSvgShadow(E);if(k){var N=" ",v="";n&&(N="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(t?"&edit=_blank":"")+(p?"&layers=1": -"")+"');}})(this);\"",v+="cursor:pointer;");d&&(v+="max-width:100%;");this.editor.convertImages(E,mxUtils.bind(this,function(u){A('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(u))+'"'+(""!=v?' style="'+v+'"':"")+N+"/>")}))}else v="",n&&(g=this.getSelectedPageIndex(),E.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+ -EditorUi.lightboxHost+"/?client=1"+(null!=g?"&page="+g:"")+(t?"&edit=_blank":"")+(p?"&layers=1":"")+"');}}})(this);"),v+="cursor:pointer;"),d&&(d=parseInt(E.getAttribute("width")),t=parseInt(E.getAttribute("height")),E.setAttribute("viewBox","-0.5 -0.5 "+d+" "+t),v+="max-width:100%;max-height:"+t+"px;",E.removeAttribute("height")),""!=v&&E.setAttribute("style",v),this.editor.addFontCss(E),this.editor.graph.mathEnabled&&this.editor.addMathCss(E),A(mxUtils.getXml(E))};EditorUi.prototype.timeSince=function(d){d= +"0";B.appendChild(G);mxUtils.br(B);var I=this.addCheckbox(B,mxResources.get("selectionOnly"),!1,J.isSelectionEmpty()),F=document.createElement("input");F.style.marginTop="16px";F.style.marginRight="8px";F.style.marginLeft="24px";F.setAttribute("disabled","disabled");F.setAttribute("type","checkbox");var L=document.createElement("select");L.style.marginTop="16px";L.style.marginLeft="8px";d=["selectionOnly","diagram","page"];var K={};for(v=0;v<d.length;v++)if(!J.isSelectionEmpty()||"selectionOnly"!= +d[v]){var H=document.createElement("option");mxUtils.write(H,mxResources.get(d[v]));H.setAttribute("value",d[v]);L.appendChild(H);K[d[v]]=H}z?(mxUtils.write(B,mxResources.get("size")+":"),B.appendChild(L),mxUtils.br(B),M+=26,mxEvent.addListener(L,"change",function(){"selectionOnly"==L.value&&(I.checked=!0)})):p&&(B.appendChild(F),mxUtils.write(B,mxResources.get("crop")),mxUtils.br(B),M+=30,mxEvent.addListener(I,"change",function(){I.checked?F.removeAttribute("disabled"):F.setAttribute("disabled", +"disabled")}));J.isSelectionEmpty()?z&&(I.style.display="none",I.nextSibling.style.display="none",I.nextSibling.nextSibling.style.display="none",M-=30):(L.value="diagram",F.setAttribute("checked","checked"),F.defaultChecked=!0,mxEvent.addListener(I,"change",function(){L.value=I.checked?"selectionOnly":"diagram"}));var Q=this.addCheckbox(B,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=E),U=null;Editor.isDarkMode()&&(U=this.addCheckbox(B,mxResources.get("dark"),!0),M+=26);var T=this.addCheckbox(B, +mxResources.get("shadow"),J.shadowVisible),V=null;if("png"==E||"jpeg"==E)V=this.addCheckbox(B,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),M+=30;var W=this.addCheckbox(B,mxResources.get("includeCopyOfMyDiagram"),A,null,null,"jpeg"!=E);W.style.marginBottom="16px";var t=document.createElement("input");t.style.marginBottom="16px";t.style.marginRight="8px";t.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||t.setAttribute("disabled","disabled");var C= +document.createElement("select");C.style.maxWidth="260px";C.style.marginLeft="8px";C.style.marginRight="10px";C.style.marginBottom="16px";C.className="geBtn";p=document.createElement("option");p.setAttribute("value","none");mxUtils.write(p,mxResources.get("noChange"));C.appendChild(p);p=document.createElement("option");p.setAttribute("value","embedFonts");mxUtils.write(p,mxResources.get("embedFonts"));C.appendChild(p);p=document.createElement("option");p.setAttribute("value","lblToSvg");mxUtils.write(p, +mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||C.appendChild(p);mxEvent.addListener(C,"change",mxUtils.bind(this,function(){"lblToSvg"==C.value?(t.checked=!0,t.setAttribute("disabled","disabled"),K.page.style.display="none","page"==L.value&&(L.value="diagram"),T.checked=!1,T.setAttribute("disabled","disabled"),R.style.display="inline-block",N.style.display="none"):"disabled"==t.getAttribute("disabled")&&(t.checked=!1,t.removeAttribute("disabled"),T.removeAttribute("disabled"), +K.page.style.display="",R.style.display="none",N.style.display="")}));g&&(B.appendChild(t),mxUtils.write(B,mxResources.get("embedImages")),mxUtils.br(B),mxUtils.write(B,mxResources.get("txtSettings")+":"),B.appendChild(C),mxUtils.br(B),M+=60);var N=document.createElement("select");N.style.maxWidth="260px";N.style.marginLeft="8px";N.style.marginRight="10px";N.className="geBtn";g=document.createElement("option");g.setAttribute("value","auto");mxUtils.write(g,mxResources.get("automatic"));N.appendChild(g); +g=document.createElement("option");g.setAttribute("value","blank");mxUtils.write(g,mxResources.get("openInNewWindow"));N.appendChild(g);g=document.createElement("option");g.setAttribute("value","self");mxUtils.write(g,mxResources.get("openInThisWindow"));N.appendChild(g);var R=document.createElement("div");mxUtils.write(R,mxResources.get("LinksLost"));R.style.margin="7px";R.style.display="none";"svg"==E&&(mxUtils.write(B,mxResources.get("links")+":"),B.appendChild(N),B.appendChild(R),mxUtils.br(B), +mxUtils.br(B),M+=50);k=new CustomDialog(this,B,mxUtils.bind(this,function(){this.lastExportBorder=G.value;this.lastExportZoom=u.value;q(u.value,Q.checked,!I.checked,T.checked,W.checked,t.checked,G.value,F.checked,!1,N.value,null!=V?V.checked:null,null!=U?U.checked:null,L.value,"embedFonts"==C.value,"lblToSvg"==C.value)}),null,k,n);this.showDialog(k.container,340,M,!0,!0,null,null,null,null,!0);u.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?u.select():document.execCommand("selectAll", +!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,g,k,n,q){var p=document.createElement("div");p.style.whiteSpace="nowrap";var A=this.editor.graph;if(null!=g){var E=document.createElement("h3");mxUtils.write(E,g);E.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";p.appendChild(E)}var z=this.addCheckbox(p,mxResources.get("fit"),!0),B=this.addCheckbox(p,mxResources.get("shadow"),A.shadowVisible&&n,!n),J=this.addCheckbox(p,k),M=this.addCheckbox(p,mxResources.get("lightbox"), +!0),v=this.addEditButton(p,M),u=v.getEditInput(),G=1<A.model.getChildCount(A.model.getRoot()),I=this.addCheckbox(p,mxResources.get("layers"),G,!G);I.style.marginLeft=u.style.marginLeft;I.style.marginBottom="12px";I.style.marginTop="8px";mxEvent.addListener(M,"change",function(){M.checked?(G&&I.removeAttribute("disabled"),u.removeAttribute("disabled")):(I.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"));u.checked&&M.checked?v.getEditSelect().removeAttribute("disabled"):v.getEditSelect().setAttribute("disabled", +"disabled")});g=new CustomDialog(this,p,mxUtils.bind(this,function(){d(z.checked,B.checked,J.checked,M.checked,v.getLink(),I.checked)}),null,mxResources.get("embed"),q);this.showDialog(g.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,g,k,n,q,p,A,E){function z(u){var G=" ",I="";n&&(G=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+ +EditorUi.lightboxHost+"/?client=1"+(null!=J?"&page="+J:"")+(q?"&edit=_blank":"")+(p?"&layers=1":"")+"');}})(this);\"",I+="cursor:pointer;");d&&(I+="max-width:100%;");var F="";k&&(F=' width="'+Math.round(B.width)+'" height="'+Math.round(B.height)+'"');A('<img src="'+u+'"'+F+(""!=I?' style="'+I+'"':"")+G+"/>")}var B=this.editor.graph.getGraphBounds(),J=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(u){var G=n?this.getFileData(!0):null;u= +this.createImageDataUri(u,G,"png");z(u)}),null,null,null,mxUtils.bind(this,function(u){E({message:mxResources.get("unknownError")})}),null,!0,k?2:1,null,g,null,null,Editor.defaultBorder);else if(g=this.getFileData(!0),B.width*B.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE){var M="";k&&(M="&w="+Math.round(2*B.width)+"&h="+Math.round(2*B.height));var v=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(n?"1":"0")+M+"&xml="+encodeURIComponent(g));v.send(mxUtils.bind(this,function(){200<=v.getStatus()&& +299>=v.getStatus()?z("data:image/png;base64,"+v.getText()):E({message:mxResources.get("unknownError")})}))}else E({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(d,g,k,n,q,p,A){var E=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!k),z=E.getElementsByTagName("a");if(null!=z)for(var B=0;B<z.length;B++){var J=z[B].getAttribute("href");null!=J&&"#"==J.charAt(0)&&"_blank"==z[B].getAttribute("target")&&z[B].removeAttribute("target")}n&& +E.setAttribute("content",this.getFileData(!0));g&&this.editor.graph.addSvgShadow(E);if(k){var M=" ",v="";n&&(M="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(q?"&edit=_blank":"")+(p?"&layers=1": +"")+"');}})(this);\"",v+="cursor:pointer;");d&&(v+="max-width:100%;");this.editor.convertImages(E,mxUtils.bind(this,function(u){A('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(u))+'"'+(""!=v?' style="'+v+'"':"")+M+"/>")}))}else v="",n&&(g=this.getSelectedPageIndex(),E.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+ +EditorUi.lightboxHost+"/?client=1"+(null!=g?"&page="+g:"")+(q?"&edit=_blank":"")+(p?"&layers=1":"")+"');}}})(this);"),v+="cursor:pointer;"),d&&(d=parseInt(E.getAttribute("width")),q=parseInt(E.getAttribute("height")),E.setAttribute("viewBox","-0.5 -0.5 "+d+" "+q),v+="max-width:100%;max-height:"+q+"px;",E.removeAttribute("height")),""!=v&&E.setAttribute("style",v),this.editor.addFontCss(E),this.editor.graph.mathEnabled&&this.editor.addMathCss(E),A(mxUtils.getXml(E))};EditorUi.prototype.timeSince=function(d){d= Math.floor((new Date-d)/1E3);var g=Math.floor(d/31536E3);if(1<g)return g+" "+mxResources.get("years");g=Math.floor(d/2592E3);if(1<g)return g+" "+mxResources.get("months");g=Math.floor(d/86400);if(1<g)return g+" "+mxResources.get("days");g=Math.floor(d/3600);if(1<g)return g+" "+mxResources.get("hours");g=Math.floor(d/60);return 1<g?g+" "+mxResources.get("minutes"):1==g?g+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(d,g){if(null!=d){var k=null;if("diagram"==d.nodeName)k= -d;else if("mxfile"==d.nodeName){var n=d.getElementsByTagName("diagram");if(0<n.length){k=n[0];var t=g.getGlobalVariable;g.getGlobalVariable=function(p){return"page"==p?k.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==p?1:t.apply(this,arguments)}}}null!=k&&(d=Editor.parseDiagramNode(k))}n=this.editor.graph;try{this.editor.graph=g,this.editor.setGraphXml(d)}catch(p){}finally{this.editor.graph=n}return d};EditorUi.prototype.getPngFileProperties=function(d){var g=1,k=0;if(null!= -d){if(d.hasAttribute("scale")){var n=parseFloat(d.getAttribute("scale"));!isNaN(n)&&0<n&&(g=n)}d.hasAttribute("border")&&(n=parseInt(d.getAttribute("border")),!isNaN(n)&&0<n&&(k=n))}return{scale:g,border:k}};EditorUi.prototype.getEmbeddedPng=function(d,g,k,n,t){try{var p=this.editor.graph,A=null!=p.themes&&"darkTheme"==p.defaultThemeName,E=null;if(null!=k&&0<k.length)p=this.createTemporaryGraph(A?p.getDefaultStylesheet():p.getStylesheet()),document.body.appendChild(p.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement, -!0),p),E=k;else if(A||null!=this.pages&&this.currentPage!=this.pages[0]){p=this.createTemporaryGraph(A?p.getDefaultStylesheet():p.getStylesheet());var y=p.getGlobalVariable;p.setBackgroundImage=this.editor.graph.setBackgroundImage;var B=this.pages[0];this.currentPage==B?p.setBackgroundImage(this.editor.graph.backgroundImage):null!=B.viewState&&null!=B.viewState&&p.setBackgroundImage(B.viewState.backgroundImage);p.getGlobalVariable=function(J){return"page"==J?B.getName():"pagenumber"==J?1:y.apply(this, -arguments)};document.body.appendChild(p.container);p.model.setRoot(B.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(J){try{null==E&&(E=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var N=J.toDataURL("image/png");N=Editor.writeGraphModelToPng(N,"tEXt","mxfile",encodeURIComponent(E));d(N.substring(N.lastIndexOf(",")+1));p!=this.editor.graph&&p.container.parentNode.removeChild(p.container)}catch(v){null!=g&&g(v)}}),null,null,null,mxUtils.bind(this,function(J){null!=g&& -g(J)}),null,null,n,null,p.shadowVisible,null,p,t,null,null,null,"diagram",null)}catch(J){null!=g&&g(J)}};EditorUi.prototype.getEmbeddedSvg=function(d,g,k,n,t,p,A,E,y,B,J,N,v){E=null!=E?E:!0;J=null!=J?J:0;A=null!=y?y:g.background;A==mxConstants.NONE&&(A=null);p=g.getSvg(A,B,J,null,null,p,null,null,null,g.shadowVisible||N,null,v,"diagram");(g.shadowVisible||N)&&g.addSvgShadow(p,null,null,0==J);null!=d&&p.setAttribute("content",d);null!=k&&p.setAttribute("resource",k);var u=mxUtils.bind(this,function(G){G= -(n?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(G);null!=t&&t(G);return G});g.mathEnabled&&this.editor.addMathCss(p);if(null!=t)this.embedFonts(p,mxUtils.bind(this,function(G){E?this.editor.convertImages(G,mxUtils.bind(this,function(H){u(H)})):u(G)}));else return u(p)};EditorUi.prototype.embedFonts=function(d,g){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss), -this.editor.embedExtFonts(mxUtils.bind(this,function(k){try{null!=k&&this.editor.addFontCss(d,k),g(d)}catch(n){g(d)}}))}catch(k){g(d)}}))};EditorUi.prototype.exportImage=function(d,g,k,n,t,p,A,E,y,B,J,N,v){y=null!=y?y:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var u=this.editor.graph.isSelectionEmpty();k=null!=k?k:u;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(G){this.spinner.stop();try{this.saveCanvas(G, -t?this.getFileData(!0,null,null,null,k,E):null,y,null==this.pages||0==this.pages.length,J)}catch(H){this.handleError(H)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(G){this.spinner.stop();this.handleError(G)}),null,k,d||1,g,n,null,null,p,A,B,N,v)}catch(G){this.spinner.stop(),this.handleError(G)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,g,k,n,t,p,A){g=null!=g?g:0;k=null!=k?k:0;var E=[];try{var y= -this.editor.graph;if(null!=d&&0<d.length){y.model.beginUpdate();try{var B=mxUtils.parseXml(d);d={};var J=this.editor.extractGraphModel(B.documentElement,null!=this.pages);if(null!=J&&"mxfile"==J.nodeName&&null!=this.pages){var N=J.getElementsByTagName("diagram");if(1==N.length&&!p){if(J=Editor.parseDiagramNode(N[0]),null!=this.currentPage&&(d[N[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var v=N[0].getAttribute("name");null!=v&&""!=v&&this.editor.graph.model.execute(new RenamePage(this, -this.currentPage,v))}}else if(0<N.length){p=[];var u=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[N[0].getAttribute("id")]=this.pages[0].getId(),J=Editor.parseDiagramNode(N[0]),n=!1,u=1);for(;u<N.length;u++){var G=N[u].getAttribute("id");N[u].removeAttribute("id");var H=this.updatePageRoot(new DiagramPage(N[u]));d[G]=N[u].getAttribute("id");var M=this.pages.length;null==H.getName()&&H.setName(mxResources.get("pageWithNumber",[M+1]));y.model.execute(new ChangePage(this,H,H,M, -!0));p.push(H)}this.updatePageLinks(d,p)}}if(null!=J&&"mxGraphModel"===J.nodeName){E=y.importGraphModel(J,g,k,n);if(null!=E)for(u=0;u<E.length;u++)this.updatePageLinksForCell(d,E[u]);var K=y.parseBackgroundImage(J.getAttribute("backgroundImage"));if(null!=K&&null!=K.originalSrc){this.updateBackgroundPageLink(d,K);var I=new ChangePageSetup(this,null,K);I.ignoreColor=!0;y.model.execute(I)}}A&&this.insertHandler(E,null,null,y.defaultVertexStyle,y.defaultEdgeStyle,!1,!0)}finally{y.model.endUpdate()}}}catch(F){if(t)throw F; -this.handleError(F)}return E};EditorUi.prototype.updatePageLinks=function(d,g){for(var k=0;k<g.length;k++)this.updatePageLinksForCell(d,g[k].root),null!=g[k].viewState&&this.updateBackgroundPageLink(d,g[k].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,g){try{if(null!=g&&Graph.isPageLink(g.originalSrc)){var k=d[g.originalSrc.substring(g.originalSrc.indexOf(",")+1)];null!=k&&(g.originalSrc="data:page/id,"+k)}}catch(n){}};EditorUi.prototype.updatePageLinksForCell= -function(d,g){var k=document.createElement("div"),n=this.editor.graph,t=n.getLinkForCell(g);null!=t&&n.setLinkForCell(g,this.updatePageLink(d,t));if(n.isHtmlLabel(g)){k.innerHTML=n.sanitizeHtml(n.getLabel(g));for(var p=k.getElementsByTagName("a"),A=!1,E=0;E<p.length;E++)t=p[E].getAttribute("href"),null!=t&&(p[E].setAttribute("href",this.updatePageLink(d,t)),A=!0);A&&n.labelChanged(g,k.innerHTML)}for(E=0;E<n.model.getChildCount(g);E++)this.updatePageLinksForCell(d,n.model.getChildAt(g,E))};EditorUi.prototype.updatePageLink= -function(d,g){if(Graph.isPageLink(g)){var k=d[g.substring(g.indexOf(",")+1)];g=null!=k?"data:page/id,"+k:null}else if("data:action/json,"==g.substring(0,17))try{var n=JSON.parse(g.substring(17));if(null!=n.actions){for(var t=0;t<n.actions.length;t++){var p=n.actions[t];if(null!=p.open&&Graph.isPageLink(p.open)){var A=p.open.substring(p.open.indexOf(",")+1);k=d[A];null!=k?p.open="data:page/id,"+k:null==this.getPageById(A)&&delete p.open}}g="data:action/json,"+JSON.stringify(n)}}catch(E){}return g}; -EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,g,k,n,t){n=null!=n?n:d.name;k=null!=k?k:mxUtils.bind(this,function(A){this.handleError(A)});var p=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var A=this.isRemoteVisioFormat(n);try{var E="UNKNOWN-VISIO",y=n.lastIndexOf(".");if(0<=y&&y<n.length)E=n.substring(y+1).toUpperCase();else{var B=n.lastIndexOf("/");0<= -B&&B<n.length&&(n=n.substring(B+1))}EditorUi.logEvent({category:E+"-MS-IMPORT-FILE",action:"filename_"+n,label:A?"remote":"local"})}catch(N){}if(A)if(null==VSD_CONVERT_URL||this.isOffline())k({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{A=new FormData;A.append("file1",d,n);var J=new XMLHttpRequest;J.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(n)?"?stencil=1":""));J.responseType="blob";this.addRemoteServiceSecurityCheck(J); -null!=t&&J.setRequestHeader("x-convert-custom",t);J.onreadystatechange=mxUtils.bind(this,function(){if(4==J.readyState)if(200<=J.status&&299>=J.status)try{var N=J.response;if("text/xml"==N.type){var v=new FileReader;v.onload=mxUtils.bind(this,function(u){try{g(u.target.result)}catch(G){k({message:mxResources.get("errorLoadingFile")})}});v.readAsText(N)}else this.doImportVisio(N,g,k,n)}catch(u){k(u)}else try{""==J.responseType||"text"==J.responseType?k({message:J.responseText}):(v=new FileReader,v.onload= -function(){k({message:JSON.parse(v.result).Message})},v.readAsText(J.response))}catch(u){k({})}});J.send(A)}else try{this.doImportVisio(d,g,k,n)}catch(N){k(N)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?p():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",p))};EditorUi.prototype.importGraphML=function(d,g,k){k=null!=k?k:mxUtils.bind(this,function(t){this.handleError(t)}); -var n=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(d,g,k)}catch(t){k(t)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?n():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",n))};EditorUi.prototype.exportVisio=function(d){var g=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(d)|| -this.handleError({message:mxResources.get("unknownError")})}catch(k){this.handleError(k)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?g():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",g))};EditorUi.prototype.convertLucidChart=function(d,g,k){var n=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var t= -JSON.parse(d);g(LucidImporter.importState(t));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var p=[(new Date).toISOString(),"convertLucidChart",t];null!=t.state&&p.push(JSON.parse(t.state));if(null!=t.svgThumbs)for(var A=0;A<t.svgThumbs.length;A++)p.push(Editor.createSvgDataUri(t.svgThumbs[A]));null!=t.thumb&&p.push(t.thumb);console.log.apply(console,p)}}catch(E){}}catch(E){null!=window.console&&console.error(E),k(E)}else k({message:mxResources.get("serviceUnavailableOrBlocked")})}); +d;else if("mxfile"==d.nodeName){var n=d.getElementsByTagName("diagram");if(0<n.length){k=n[0];var q=g.getGlobalVariable;g.getGlobalVariable=function(p){return"page"==p?k.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==p?1:q.apply(this,arguments)}}}null!=k&&(d=Editor.parseDiagramNode(k))}n=this.editor.graph;try{this.editor.graph=g,this.editor.setGraphXml(d)}catch(p){}finally{this.editor.graph=n}return d};EditorUi.prototype.getPngFileProperties=function(d){var g=1,k=0;if(null!= +d){if(d.hasAttribute("scale")){var n=parseFloat(d.getAttribute("scale"));!isNaN(n)&&0<n&&(g=n)}d.hasAttribute("border")&&(n=parseInt(d.getAttribute("border")),!isNaN(n)&&0<n&&(k=n))}return{scale:g,border:k}};EditorUi.prototype.getEmbeddedPng=function(d,g,k,n,q){try{var p=this.editor.graph,A=null!=p.themes&&"darkTheme"==p.defaultThemeName,E=null;if(null!=k&&0<k.length)p=this.createTemporaryGraph(A?p.getDefaultStylesheet():p.getStylesheet()),document.body.appendChild(p.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement, +!0),p),E=k;else if(A||null!=this.pages&&this.currentPage!=this.pages[0]){p=this.createTemporaryGraph(A?p.getDefaultStylesheet():p.getStylesheet());var z=p.getGlobalVariable;p.setBackgroundImage=this.editor.graph.setBackgroundImage;var B=this.pages[0];this.currentPage==B?p.setBackgroundImage(this.editor.graph.backgroundImage):null!=B.viewState&&null!=B.viewState&&p.setBackgroundImage(B.viewState.backgroundImage);p.getGlobalVariable=function(J){return"page"==J?B.getName():"pagenumber"==J?1:z.apply(this, +arguments)};document.body.appendChild(p.container);p.model.setRoot(B.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(J){try{null==E&&(E=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var M=J.toDataURL("image/png");M=Editor.writeGraphModelToPng(M,"tEXt","mxfile",encodeURIComponent(E));d(M.substring(M.lastIndexOf(",")+1));p!=this.editor.graph&&p.container.parentNode.removeChild(p.container)}catch(v){null!=g&&g(v)}}),null,null,null,mxUtils.bind(this,function(J){null!=g&& +g(J)}),null,null,n,null,p.shadowVisible,null,p,q,null,null,null,"diagram",null)}catch(J){null!=g&&g(J)}};EditorUi.prototype.getEmbeddedSvg=function(d,g,k,n,q,p,A,E,z,B,J,M,v){E=null!=E?E:!0;J=null!=J?J:0;A=null!=z?z:g.background;A==mxConstants.NONE&&(A=null);p=g.getSvg(A,B,J,null,null,p,null,null,null,g.shadowVisible||M,null,v,"diagram");(g.shadowVisible||M)&&g.addSvgShadow(p,null,null,0==J);null!=d&&p.setAttribute("content",d);null!=k&&p.setAttribute("resource",k);var u=mxUtils.bind(this,function(G){G= +(n?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(G);null!=q&&q(G);return G});g.mathEnabled&&this.editor.addMathCss(p);if(null!=q)this.embedFonts(p,mxUtils.bind(this,function(G){E?this.editor.convertImages(G,mxUtils.bind(this,function(I){u(I)})):u(G)}));else return u(p)};EditorUi.prototype.embedFonts=function(d,g){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss), +this.editor.embedExtFonts(mxUtils.bind(this,function(k){try{null!=k&&this.editor.addFontCss(d,k),g(d)}catch(n){g(d)}}))}catch(k){g(d)}}))};EditorUi.prototype.exportImage=function(d,g,k,n,q,p,A,E,z,B,J,M,v){z=null!=z?z:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var u=this.editor.graph.isSelectionEmpty();k=null!=k?k:u;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(G){this.spinner.stop();try{this.saveCanvas(G, +q?this.getFileData(!0,null,null,null,k,E):null,z,null==this.pages||0==this.pages.length,J)}catch(I){this.handleError(I)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(G){this.spinner.stop();this.handleError(G)}),null,k,d||1,g,n,null,null,p,A,B,M,v)}catch(G){this.spinner.stop(),this.handleError(G)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,g,k,n,q,p,A){g=null!=g?g:0;k=null!=k?k:0;var E=[];try{var z= +this.editor.graph;if(null!=d&&0<d.length){z.model.beginUpdate();try{var B=mxUtils.parseXml(d);d={};var J=this.editor.extractGraphModel(B.documentElement,null!=this.pages);if(null!=J&&"mxfile"==J.nodeName&&null!=this.pages){var M=J.getElementsByTagName("diagram");if(1==M.length&&!p){if(J=Editor.parseDiagramNode(M[0]),null!=this.currentPage&&(d[M[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var v=M[0].getAttribute("name");null!=v&&""!=v&&this.editor.graph.model.execute(new RenamePage(this, +this.currentPage,v))}}else if(0<M.length){p=[];var u=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[M[0].getAttribute("id")]=this.pages[0].getId(),J=Editor.parseDiagramNode(M[0]),n=!1,u=1);for(;u<M.length;u++){var G=M[u].getAttribute("id");M[u].removeAttribute("id");var I=this.updatePageRoot(new DiagramPage(M[u]));d[G]=M[u].getAttribute("id");var F=this.pages.length;null==I.getName()&&I.setName(mxResources.get("pageWithNumber",[F+1]));z.model.execute(new ChangePage(this,I,I,F, +!0));p.push(I)}this.updatePageLinks(d,p)}}if(null!=J&&"mxGraphModel"===J.nodeName){E=z.importGraphModel(J,g,k,n);if(null!=E)for(u=0;u<E.length;u++)this.updatePageLinksForCell(d,E[u]);var L=z.parseBackgroundImage(J.getAttribute("backgroundImage"));if(null!=L&&null!=L.originalSrc){this.updateBackgroundPageLink(d,L);var K=new ChangePageSetup(this,null,L);K.ignoreColor=!0;z.model.execute(K)}}A&&this.insertHandler(E,null,null,z.defaultVertexStyle,z.defaultEdgeStyle,!1,!0)}finally{z.model.endUpdate()}}}catch(H){if(q)throw H; +this.handleError(H)}return E};EditorUi.prototype.updatePageLinks=function(d,g){for(var k=0;k<g.length;k++)this.updatePageLinksForCell(d,g[k].root),null!=g[k].viewState&&this.updateBackgroundPageLink(d,g[k].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,g){try{if(null!=g&&Graph.isPageLink(g.originalSrc)){var k=d[g.originalSrc.substring(g.originalSrc.indexOf(",")+1)];null!=k&&(g.originalSrc="data:page/id,"+k)}}catch(n){}};EditorUi.prototype.updatePageLinksForCell= +function(d,g){var k=document.createElement("div"),n=this.editor.graph,q=n.getLinkForCell(g);null!=q&&n.setLinkForCell(g,this.updatePageLink(d,q));if(n.isHtmlLabel(g)){k.innerHTML=n.sanitizeHtml(n.getLabel(g));for(var p=k.getElementsByTagName("a"),A=!1,E=0;E<p.length;E++)q=p[E].getAttribute("href"),null!=q&&(p[E].setAttribute("href",this.updatePageLink(d,q)),A=!0);A&&n.labelChanged(g,k.innerHTML)}for(E=0;E<n.model.getChildCount(g);E++)this.updatePageLinksForCell(d,n.model.getChildAt(g,E))};EditorUi.prototype.updatePageLink= +function(d,g){if(Graph.isPageLink(g)){var k=d[g.substring(g.indexOf(",")+1)];g=null!=k?"data:page/id,"+k:null}else if("data:action/json,"==g.substring(0,17))try{var n=JSON.parse(g.substring(17));if(null!=n.actions){for(var q=0;q<n.actions.length;q++){var p=n.actions[q];if(null!=p.open&&Graph.isPageLink(p.open)){var A=p.open.substring(p.open.indexOf(",")+1);k=d[A];null!=k?p.open="data:page/id,"+k:null==this.getPageById(A)&&delete p.open}}g="data:action/json,"+JSON.stringify(n)}}catch(E){}return g}; +EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,g,k,n,q){n=null!=n?n:d.name;k=null!=k?k:mxUtils.bind(this,function(A){this.handleError(A)});var p=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var A=this.isRemoteVisioFormat(n);try{var E="UNKNOWN-VISIO",z=n.lastIndexOf(".");if(0<=z&&z<n.length)E=n.substring(z+1).toUpperCase();else{var B=n.lastIndexOf("/");0<= +B&&B<n.length&&(n=n.substring(B+1))}EditorUi.logEvent({category:E+"-MS-IMPORT-FILE",action:"filename_"+n,label:A?"remote":"local"})}catch(M){}if(A)if(null==VSD_CONVERT_URL||this.isOffline())k({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{A=new FormData;A.append("file1",d,n);var J=new XMLHttpRequest;J.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(n)?"?stencil=1":""));J.responseType="blob";this.addRemoteServiceSecurityCheck(J); +null!=q&&J.setRequestHeader("x-convert-custom",q);J.onreadystatechange=mxUtils.bind(this,function(){if(4==J.readyState)if(200<=J.status&&299>=J.status)try{var M=J.response;if("text/xml"==M.type){var v=new FileReader;v.onload=mxUtils.bind(this,function(u){try{g(u.target.result)}catch(G){k({message:mxResources.get("errorLoadingFile")})}});v.readAsText(M)}else this.doImportVisio(M,g,k,n)}catch(u){k(u)}else try{""==J.responseType||"text"==J.responseType?k({message:J.responseText}):(v=new FileReader,v.onload= +function(){k({message:JSON.parse(v.result).Message})},v.readAsText(J.response))}catch(u){k({})}});J.send(A)}else try{this.doImportVisio(d,g,k,n)}catch(M){k(M)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?p():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",p))};EditorUi.prototype.importGraphML=function(d,g,k){k=null!=k?k:mxUtils.bind(this,function(q){this.handleError(q)}); +var n=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(d,g,k)}catch(q){k(q)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?n():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",n))};EditorUi.prototype.exportVisio=function(d){var g=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(d)|| +this.handleError({message:mxResources.get("unknownError")})}catch(k){this.handleError(k)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?g():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",g))};EditorUi.prototype.convertLucidChart=function(d,g,k){var n=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var q= +JSON.parse(d);g(LucidImporter.importState(q));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var p=[(new Date).toISOString(),"convertLucidChart",q];null!=q.state&&p.push(JSON.parse(q.state));if(null!=q.svgThumbs)for(var A=0;A<q.svgThumbs.length;A++)p.push(Editor.createSvgDataUri(q.svgThumbs[A]));null!=q.thumb&&p.push(q.thumb);console.log.apply(console,p)}}catch(E){}}catch(E){null!=window.console&&console.error(E),k(E)}else k({message:mxResources.get("serviceUnavailableOrBlocked")})}); "undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(n,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",n)})})})}):mxscript("js/extensions.min.js",n))};EditorUi.prototype.generateMermaidImage=function(d, -g,k,n){var t=this,p=function(){try{this.loadingMermaid=!1,g=null!=g?g:mxUtils.clone(EditorUi.defaultMermaidConfig),g.securityLevel="strict",g.startOnLoad=!1,Editor.isDarkMode()&&(g.theme="dark"),mermaid.mermaidAPI.initialize(g),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(A){try{if(mxClient.IS_IE||mxClient.IS_IE11)A=A.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var E=mxUtils.parseXml(A).getElementsByTagName("svg"); -if(0<E.length){var y=parseFloat(E[0].getAttribute("width")),B=parseFloat(E[0].getAttribute("height"));if(isNaN(y)||isNaN(B))try{var J=E[0].getAttribute("viewBox").split(/\s+/);y=parseFloat(J[2]);B=parseFloat(J[3])}catch(N){y=y||100,B=B||100}k(t.convertDataUri(Editor.createSvgDataUri(A)),y,B)}else n({message:mxResources.get("invalidInput")})}catch(N){n(N)}})}catch(A){n(A)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?p():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js", -p):mxscript("js/extensions.min.js",p))};EditorUi.prototype.generatePlantUmlImage=function(d,g,k,n){function t(E,y,B){c1=E>>2;c2=(E&3)<<4|y>>4;c3=(y&15)<<2|B>>6;c4=B&63;r="";r+=p(c1&63);r+=p(c2&63);r+=p(c3&63);return r+=p(c4&63)}function p(E){if(10>E)return String.fromCharCode(48+E);E-=10;if(26>E)return String.fromCharCode(65+E);E-=26;if(26>E)return String.fromCharCode(97+E);E-=26;return 0==E?"-":1==E?"_":"?"}var A=new XMLHttpRequest;A.open("GET",("txt"==g?PLANT_URL+"/txt/":"png"==g?PLANT_URL+"/png/": -PLANT_URL+"/svg/")+function(E){r="";for(i=0;i<E.length;i+=3)r=i+2==E.length?r+t(E.charCodeAt(i),E.charCodeAt(i+1),0):i+1==E.length?r+t(E.charCodeAt(i),0,0):r+t(E.charCodeAt(i),E.charCodeAt(i+1),E.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=g&&(A.responseType="blob");A.onload=function(E){if(200<=this.status&&300>this.status)if("txt"==g)k(this.response);else{var y=new FileReader;y.readAsDataURL(this.response);y.onloadend=function(B){var J=new Image;J.onload= -function(){try{var N=J.width,v=J.height;if(0==N&&0==v){var u=y.result,G=u.indexOf(","),H=decodeURIComponent(escape(atob(u.substring(G+1)))),M=mxUtils.parseXml(H).getElementsByTagName("svg");0<M.length&&(N=parseFloat(M[0].getAttribute("width")),v=parseFloat(M[0].getAttribute("height")))}k(y.result,N,v)}catch(K){n(K)}};J.src=y.result};y.onerror=function(B){n(B)}}else n(E)};A.onerror=function(E){n(E)};A.send()};EditorUi.prototype.insertAsPreText=function(d,g,k){var n=this.editor.graph,t=null;n.getModel().beginUpdate(); -try{t=n.insertVertex(null,null,"<pre>"+d+"</pre>",g,k,1,1,"text;html=1;align=left;verticalAlign=top;"),n.updateCellSize(t,!0)}finally{n.getModel().endUpdate()}return t};EditorUi.prototype.insertTextAt=function(d,g,k,n,t,p,A,E){p=null!=p?p:!0;A=null!=A?A:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g," "),mxUtils.bind(this,function(v){4== -v.readyState&&200<=v.status&&299>=v.status&&this.editor.graph.setSelectionCells(this.insertTextAt(v.responseText,g,k,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(t||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var y=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var B=Editor.extractGraphModelFromPdf(d);if(null!=B&&0<B.length)return this.importXml(B,g,k,p,!0,E)}if(Editor.isPngDataUrl(d)&&(B=Editor.extractGraphModelFromPng(d),null!=B&&0<B.length))return this.importXml(B, -g,k,p,!0,E);if("data:image/svg+xml;"==d.substring(0,19))try{B=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(B=d.substring(d.indexOf(",")+1),B=window.atob&&!mxClient.IS_SF?atob(B):Base64.decode(B,!0)):B=decodeURIComponent(d.substring(d.indexOf(",")+1));var J=this.importXml(B,g,k,p,!0,E);if(0<J.length)return J}catch(v){}this.loadImage(d,mxUtils.bind(this,function(v){if("data:"==d.substring(0,5))this.resizeImage(v,d,mxUtils.bind(this,function(H,M,K){y.setSelectionCell(y.insertVertex(null,null, -"",y.snap(g),y.snap(k),M,K,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(H)+";"))}),A,this.maxImageSize);else{var u=Math.min(1,Math.min(this.maxImageSize/v.width,this.maxImageSize/v.height)),G=Math.round(v.width*u);v=Math.round(v.height*u);y.setSelectionCell(y.insertVertex(null,null,"",y.snap(g),y.snap(k),G,v,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+ -d+";"))}}),mxUtils.bind(this,function(){var v=null;y.getModel().beginUpdate();try{v=y.insertVertex(y.getDefaultParent(),null,d,y.snap(g),y.snap(k),1,1,"text;"+(n?"html=1;":"")),y.updateCellSize(v),y.fireEvent(new mxEventObject("textInserted","cells",[v]))}finally{y.getModel().endUpdate()}y.setSelectionCell(v)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,g,k,p,null,E);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this, -function(v){this.editor.graph.setSelectionCells(this.importXml(v,g,k,p,null,E))}),mxUtils.bind(this,function(v){this.handleError(v)}));else{y=this.editor.graph;t=null;y.getModel().beginUpdate();try{t=y.insertVertex(y.getDefaultParent(),null,"",y.snap(g),y.snap(k),1,1,"text;whiteSpace=wrap;"+(n?"html=1;":""));y.fireEvent(new mxEventObject("textInserted","cells",[t]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+ -"...");t.value=d;y.updateCellSize(t);if(0<this.maxTextWidth&&t.geometry.width>this.maxTextWidth){var N=y.getPreferredSizeForCell(t,this.maxTextWidth);t.geometry.width=N.width;t.geometry.height=N.height}Graph.isLink(t.value)&&y.setLinkForCell(t,t.value);t.geometry.width+=y.gridSize;t.geometry.height+=y.gridSize}finally{y.getModel().endUpdate()}return[t]}}return[]};EditorUi.prototype.formatFileSize=function(d){var g=-1;do d/=1024,g++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[g]}; +g,k,n){var q=this,p=function(){try{this.loadingMermaid=!1,g=null!=g?g:mxUtils.clone(EditorUi.defaultMermaidConfig),g.securityLevel="strict",g.startOnLoad=!1,Editor.isDarkMode()&&(g.theme="dark"),mermaid.mermaidAPI.initialize(g),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(A){try{if(mxClient.IS_IE||mxClient.IS_IE11)A=A.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var E=mxUtils.parseXml(A).getElementsByTagName("svg"); +if(0<E.length){var z=parseFloat(E[0].getAttribute("width")),B=parseFloat(E[0].getAttribute("height"));if(isNaN(z)||isNaN(B))try{var J=E[0].getAttribute("viewBox").split(/\s+/);z=parseFloat(J[2]);B=parseFloat(J[3])}catch(M){z=z||100,B=B||100}k(q.convertDataUri(Editor.createSvgDataUri(A)),z,B)}else n({message:mxResources.get("invalidInput")})}catch(M){n(M)}})}catch(A){n(A)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?p():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js", +p):mxscript("js/extensions.min.js",p))};EditorUi.prototype.generatePlantUmlImage=function(d,g,k,n){function q(E,z,B){c1=E>>2;c2=(E&3)<<4|z>>4;c3=(z&15)<<2|B>>6;c4=B&63;r="";r+=p(c1&63);r+=p(c2&63);r+=p(c3&63);return r+=p(c4&63)}function p(E){if(10>E)return String.fromCharCode(48+E);E-=10;if(26>E)return String.fromCharCode(65+E);E-=26;if(26>E)return String.fromCharCode(97+E);E-=26;return 0==E?"-":1==E?"_":"?"}var A=new XMLHttpRequest;A.open("GET",("txt"==g?PLANT_URL+"/txt/":"png"==g?PLANT_URL+"/png/": +PLANT_URL+"/svg/")+function(E){r="";for(i=0;i<E.length;i+=3)r=i+2==E.length?r+q(E.charCodeAt(i),E.charCodeAt(i+1),0):i+1==E.length?r+q(E.charCodeAt(i),0,0):r+q(E.charCodeAt(i),E.charCodeAt(i+1),E.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=g&&(A.responseType="blob");A.onload=function(E){if(200<=this.status&&300>this.status)if("txt"==g)k(this.response);else{var z=new FileReader;z.readAsDataURL(this.response);z.onloadend=function(B){var J=new Image;J.onload= +function(){try{var M=J.width,v=J.height;if(0==M&&0==v){var u=z.result,G=u.indexOf(","),I=decodeURIComponent(escape(atob(u.substring(G+1)))),F=mxUtils.parseXml(I).getElementsByTagName("svg");0<F.length&&(M=parseFloat(F[0].getAttribute("width")),v=parseFloat(F[0].getAttribute("height")))}k(z.result,M,v)}catch(L){n(L)}};J.src=z.result};z.onerror=function(B){n(B)}}else n(E)};A.onerror=function(E){n(E)};A.send()};EditorUi.prototype.insertAsPreText=function(d,g,k){var n=this.editor.graph,q=null;n.getModel().beginUpdate(); +try{q=n.insertVertex(null,null,"<pre>"+d+"</pre>",g,k,1,1,"text;html=1;align=left;verticalAlign=top;"),n.updateCellSize(q,!0)}finally{n.getModel().endUpdate()}return q};EditorUi.prototype.insertTextAt=function(d,g,k,n,q,p,A,E){p=null!=p?p:!0;A=null!=A?A:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g," "),mxUtils.bind(this,function(v){4== +v.readyState&&200<=v.status&&299>=v.status&&this.editor.graph.setSelectionCells(this.insertTextAt(v.responseText,g,k,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(q||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var z=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var B=Editor.extractGraphModelFromPdf(d);if(null!=B&&0<B.length)return this.importXml(B,g,k,p,!0,E)}if(Editor.isPngDataUrl(d)&&(B=Editor.extractGraphModelFromPng(d),null!=B&&0<B.length))return this.importXml(B, +g,k,p,!0,E);if("data:image/svg+xml;"==d.substring(0,19))try{B=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(B=d.substring(d.indexOf(",")+1),B=window.atob&&!mxClient.IS_SF?atob(B):Base64.decode(B,!0)):B=decodeURIComponent(d.substring(d.indexOf(",")+1));var J=this.importXml(B,g,k,p,!0,E);if(0<J.length)return J}catch(v){}this.loadImage(d,mxUtils.bind(this,function(v){if("data:"==d.substring(0,5))this.resizeImage(v,d,mxUtils.bind(this,function(I,F,L){z.setSelectionCell(z.insertVertex(null,null, +"",z.snap(g),z.snap(k),F,L,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(I)+";"))}),A,this.maxImageSize);else{var u=Math.min(1,Math.min(this.maxImageSize/v.width,this.maxImageSize/v.height)),G=Math.round(v.width*u);v=Math.round(v.height*u);z.setSelectionCell(z.insertVertex(null,null,"",z.snap(g),z.snap(k),G,v,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+ +d+";"))}}),mxUtils.bind(this,function(){var v=null;z.getModel().beginUpdate();try{v=z.insertVertex(z.getDefaultParent(),null,d,z.snap(g),z.snap(k),1,1,"text;"+(n?"html=1;":"")),z.updateCellSize(v),z.fireEvent(new mxEventObject("textInserted","cells",[v]))}finally{z.getModel().endUpdate()}z.setSelectionCell(v)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,g,k,p,null,E);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this, +function(v){this.editor.graph.setSelectionCells(this.importXml(v,g,k,p,null,E))}),mxUtils.bind(this,function(v){this.handleError(v)}));else{z=this.editor.graph;q=null;z.getModel().beginUpdate();try{q=z.insertVertex(z.getDefaultParent(),null,"",z.snap(g),z.snap(k),1,1,"text;whiteSpace=wrap;"+(n?"html=1;":""));z.fireEvent(new mxEventObject("textInserted","cells",[q]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+ +"...");q.value=d;z.updateCellSize(q);if(0<this.maxTextWidth&&q.geometry.width>this.maxTextWidth){var M=z.getPreferredSizeForCell(q,this.maxTextWidth);q.geometry.width=M.width;q.geometry.height=M.height}Graph.isLink(q.value)&&z.setLinkForCell(q,q.value);q.geometry.width+=z.gridSize;q.geometry.height+=z.gridSize}finally{z.getModel().endUpdate()}return[q]}}return[]};EditorUi.prototype.formatFileSize=function(d){var g=-1;do d/=1024,g++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[g]}; EditorUi.prototype.convertDataUri=function(d){if("data:"==d.substring(0,5)){var g=d.indexOf(";");0<g&&(d=d.substring(0,g)+d.substring(d.indexOf(",",g+1)))}return d};EditorUi.prototype.isRemoteFileFormat=function(d,g){return/("contentType":\s*"application\/gliffy\+json")/.test(d)};EditorUi.prototype.isLucidChartData=function(d){return null!=d&&('{"state":"{\\"Properties\\":'==d.substring(0,26)||'{"Properties":'==d.substring(0,14))};EditorUi.prototype.importLocalFile=function(d,g){if(d&&Graph.fileSupport){if(null== this.importFileInputElt){var k=document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){null!=k.files&&(this.importFiles(k.files,null,null,this.maxImageSize),k.type="",k.type="file",k.value="")}));k.style.display="none";document.body.appendChild(k);this.importFileInputElt=k}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(A,E){StorageFile.listFiles(this, -"F",A,E)});window.openBrowserFile=mxUtils.bind(this,function(A,E,y){StorageFile.getFileContent(this,A,E,y)});window.deleteBrowserFile=mxUtils.bind(this,function(A,E,y){StorageFile.deleteFile(this,A,E,y)});if(!g){var n=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(A){this.hideDialog(A)}));window.openFile.setConsumer(mxUtils.bind(this,function(A,E){null!=E&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(E)?(A=new Blob([A],{type:"application/octet-stream"}), -this.importVisio(A,mxUtils.bind(this,function(y){this.importXml(y,0,0,!0)}),null,E)):this.editor.graph.setSelectionCells(this.importXml(A,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!g){var t=this.dialog,p=t.close;this.dialog.close=mxUtils.bind(this,function(A){Editor.useLocalStorage=n;p.apply(t,arguments);A&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}}; -EditorUi.prototype.importZipFile=function(d,g,k){var n=this,t=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(p){if(mxUtils.isEmptyObject(p.files))k();else{var A=0,E,y=!1;p.forEach(function(B,J){B=J.name.toLowerCase();"diagram/diagram.xml"==B?(y=!0,J.async("string").then(function(N){0==N.indexOf("<mxfile ")?g(N):k()})):0==B.indexOf("versions/")&&(B=parseInt(B.substr(9)),B>A&&(A=B,E=J))});0<A?E.async("string").then(function(B){(new XMLHttpRequest).upload&& -n.isRemoteFileFormat(B,d.name)?n.isOffline()?n.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k):n.parseFileData(B,mxUtils.bind(this,function(J){4==J.readyState&&(200<=J.status&&299>=J.status?g(J.responseText):k())}),d.name):k()}):y||k()}},function(p){k(p)}):k()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?t():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",t))};EditorUi.prototype.importFile=function(d,g,k,n,t,p,A,E,y,B,J,N){B=null!= -B?B:!0;var v=!1,u=null,G=mxUtils.bind(this,function(H){var M=null;null!=H&&"<mxlibrary"==H.substring(0,10)?this.loadLibrary(new LocalLibrary(this,H,A)):M=this.importXml(H,k,n,B,null,null!=N?mxEvent.isControlDown(N):null);null!=E&&E(M)});"image"==g.substring(0,5)?(y=!1,"image/png"==g.substring(0,9)&&(g=J?null:this.extractGraphModelFromPng(d),null!=g&&0<g.length&&(u=this.importXml(g,k,n,B,null,null!=N?mxEvent.isControlDown(N):null),y=!0)),y||(g=this.editor.graph,y=d.indexOf(";"),0<y&&(d=d.substring(0, -y)+d.substring(d.indexOf(",",y+1))),B&&g.isGridEnabled()&&(k=g.snap(k),n=g.snap(n)),u=[g.insertVertex(null,null,"",k,n,t,p,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";")])):/(\.*<graphml )/.test(d)?(v=!0,this.importGraphML(d,G)):null!=y&&null!=A&&(/(\.v(dx|sdx?))($|\?)/i.test(A)||/(\.vs(x|sx?))($|\?)/i.test(A))?(v=!0,this.importVisio(y,G)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,A)?this.isOffline()? -this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(v=!0,t=mxUtils.bind(this,function(H){4==H.readyState&&(200<=H.status&&299>=H.status?G(H.responseText):null!=E&&E(null))}),null!=d?this.parseFileData(d,t,A):this.parseFile(y,t,A)):0==d.indexOf("PK")&&null!=y?(v=!0,this.importZipFile(y,G,mxUtils.bind(this,function(){u=this.insertTextAt(this.validateFileData(d),k,n,!0,null,B);E(u)}))):/(\.v(sd|dx))($|\?)/i.test(A)||/(\.vs(s|x))($|\?)/i.test(A)||(u=this.insertTextAt(this.validateFileData(d), -k,n,!0,null,B,null,null!=N?mxEvent.isControlDown(N):null));v||null==E||E(u);return u};EditorUi.prototype.importFiles=function(d,g,k,n,t,p,A,E,y,B,J,N,v){n=null!=n?n:this.maxImageSize;B=null!=B?B:this.maxImageBytes;var u=null!=g&&null!=k,G=!0;g=null!=g?g:0;k=null!=k?k:0;var H=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var M=J||this.resampleThreshold,K=0;K<d.length;K++)if("image/svg"!==d[K].type.substring(0,9)&&"image/"===d[K].type.substring(0,6)&&d[K].size>M){H=!0;break}var I=mxUtils.bind(this,function(){var F= -this.editor.graph,P=F.gridSize;t=null!=t?t:mxUtils.bind(this,function(D,L,R,O,Q,S,X,aa,Y){try{return null!=D&&"<mxlibrary"==D.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,D,X)),null):this.isCompatibleString(D)&&1==d.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,D,X,!0)),null):this.importFile(D,L,R,O,Q,S,X,aa,Y,u,N,v)}catch(Z){return this.handleError(Z),null}});p=null!=p?p:mxUtils.bind(this,function(D){F.setSelectionCells(D)}); -if(this.spinner.spin(document.body,mxResources.get("loading")))for(var U=d.length,T=U,V=[],W=mxUtils.bind(this,function(D,L){V[D]=L;if(0==--T){this.spinner.stop();if(null!=E)E(V);else{var R=[];F.getModel().beginUpdate();try{for(D=0;D<V.length;D++){var O=V[D]();null!=O&&(R=R.concat(O))}}finally{F.getModel().endUpdate()}}p(R)}}),q=0;q<U;q++)mxUtils.bind(this,function(D){var L=d[D];if(null!=L){var R=new FileReader;R.onload=mxUtils.bind(this,function(O){if(null==A||A(L))if("image/"==L.type.substring(0, -6))if("image/svg"==L.type.substring(0,9)){var Q=Graph.clipSvgDataUri(O.target.result),S=Q.indexOf(",");S=decodeURIComponent(escape(atob(Q.substring(S+1))));var X=mxUtils.parseXml(S);S=X.getElementsByTagName("svg");if(0<S.length){S=S[0];var aa=N?null:S.getAttribute("content");null!=aa&&"<"!=aa.charAt(0)&&"%"!=aa.charAt(0)&&(aa=unescape(window.atob?atob(aa):Base64.decode(aa,!0)));null!=aa&&"%"==aa.charAt(0)&&(aa=decodeURIComponent(aa));null==aa||"<mxfile "!==aa.substring(0,8)&&"<mxGraphModel "!==aa.substring(0, -14)?W(D,mxUtils.bind(this,function(){try{if(null!=X){var ba=X.getElementsByTagName("svg");if(0<ba.length){var fa=ba[0],ka=fa.getAttribute("width"),ha=fa.getAttribute("height");ka=null!=ka&&"%"!=ka.charAt(ka.length-1)?parseFloat(ka):NaN;ha=null!=ha&&"%"!=ha.charAt(ha.length-1)?parseFloat(ha):NaN;var ra=fa.getAttribute("viewBox");if(null==ra||0==ra.length)fa.setAttribute("viewBox","0 0 "+ka+" "+ha);else if(isNaN(ka)||isNaN(ha)){var la=ra.split(" ");3<la.length&&(ka=parseFloat(la[2]),ha=parseFloat(la[3]))}Q= -Editor.createSvgDataUri(mxUtils.getXml(fa));var Fa=Math.min(1,Math.min(n/Math.max(1,ka)),n/Math.max(1,ha)),Ga=t(Q,L.type,g+D*P,k+D*P,Math.max(1,Math.round(ka*Fa)),Math.max(1,Math.round(ha*Fa)),L.name);if(isNaN(ka)||isNaN(ha)){var Aa=new Image;Aa.onload=mxUtils.bind(this,function(){ka=Math.max(1,Aa.width);ha=Math.max(1,Aa.height);Ga[0].geometry.width=ka;Ga[0].geometry.height=ha;fa.setAttribute("viewBox","0 0 "+ka+" "+ha);Q=Editor.createSvgDataUri(mxUtils.getXml(fa));var Ma=Q.indexOf(";");0<Ma&&(Q= -Q.substring(0,Ma)+Q.substring(Q.indexOf(",",Ma+1)));F.setCellStyles("image",Q,[Ga[0]])});Aa.src=Editor.createSvgDataUri(mxUtils.getXml(fa))}return Ga}}}catch(Ma){}return null})):W(D,mxUtils.bind(this,function(){return t(aa,"text/xml",g+D*P,k+D*P,0,0,L.name)}))}else W(D,mxUtils.bind(this,function(){return null}))}else{S=!1;if("image/png"==L.type){var Y=N?null:this.extractGraphModelFromPng(O.target.result);if(null!=Y&&0<Y.length){var Z=new Image;Z.src=O.target.result;W(D,mxUtils.bind(this,function(){return t(Y, -"text/xml",g+D*P,k+D*P,Z.width,Z.height,L.name)}));S=!0}}S||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(O.target.result,mxUtils.bind(this,function(ba){this.resizeImage(ba,O.target.result,mxUtils.bind(this,function(fa,ka,ha){W(D,mxUtils.bind(this,function(){if(null!= -fa&&fa.length<B){var ra=G&&this.isResampleImageSize(L.size,J)?Math.min(1,Math.min(n/ka,n/ha)):1;return t(fa,L.type,g+D*P,k+D*P,Math.round(ka*ra),Math.round(ha*ra),L.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),G,n,J,L.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Q=O.target.result,t(Q,L.type,g+D*P,k+D*P,240,160,L.name,function(ba){W(D,function(){return ba})},L)});/(\.v(dx|sdx?))($|\?)/i.test(L.name)|| -/(\.vs(x|sx?))($|\?)/i.test(L.name)?t(null,L.type,g+D*P,k+D*P,240,160,L.name,function(O){W(D,function(){return O})},L):"image"==L.type.substring(0,5)||"application/pdf"==L.type?R.readAsDataURL(L):R.readAsText(L)}})(q)});if(H){H=[];for(K=0;K<d.length;K++)H.push(d[K]);d=H;this.confirmImageResize(function(F){G=F;I()},y)}else I()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber", -[1])};EditorUi.prototype.confirmImageResize=function(d,g){g=null!=g?g:!1;var k=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},n=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,t=function(p,A){if(p||g)mxSettings.setResizeImages(p?A:null),mxSettings.save();k();d(A)};null==n||g?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(p){t(p,!0)},function(p){t(p,!1)},mxResources.get("resize"),mxResources.get("actualSize"), -'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):t(!1,n)};EditorUi.prototype.parseFile=function(d,g,k){k=null!=k?k:d.name;var n=new FileReader;n.onload=mxUtils.bind(this,function(){this.parseFileData(n.result,g,k)});n.readAsText(d)};EditorUi.prototype.parseFileData=function(d,g,k){var n=new XMLHttpRequest;n.open("POST", -OPEN_URL);n.setRequestHeader("Content-Type","application/x-www-form-urlencoded");n.onreadystatechange=function(){g(n)};n.send("format=xml&filename="+encodeURIComponent(k)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(t){}};EditorUi.prototype.isResampleImageSize=function(d,g){g=null!=g?g:this.resampleThreshold;return d>g};EditorUi.prototype.resizeImage=function(d,g,k,n,t,p,A){t=null!=t?t:this.maxImageSize;var E=Math.max(1,d.width), -y=Math.max(1,d.height);if(n&&this.isResampleImageSize(null!=A?A:g.length,p))try{var B=Math.max(E/t,y/t);if(1<B){var J=Math.round(E/B),N=Math.round(y/B),v=document.createElement("canvas");v.width=J;v.height=N;v.getContext("2d").drawImage(d,0,0,J,N);var u=v.toDataURL();if(u.length<g.length){var G=document.createElement("canvas");G.width=J;G.height=N;var H=G.toDataURL();u!==H&&(g=u,E=J,y=N)}}}catch(M){}k(g,E,y)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)}; -EditorUi.prototype.loadImage=function(d,g,k){try{var n=new Image;n.onload=function(){n.width=0<n.width?n.width:120;n.height=0<n.height?n.height:120;g(n)};null!=k&&(n.onerror=k);n.src=d}catch(t){if(null!=k)k(t);else throw t;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var l=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&& -!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var d=this,g=this.editor.graph;Graph.touchStyle&&(g.panningHandler.isPanningTrigger=function(M){var K=M.getEvent();return null==M.getState()&& -!mxEvent.isMouseEvent(K)&&!g.freehand.isDrawing()||mxEvent.isPopupTrigger(K)&&(null==M.getState()||mxEvent.isControlDown(K)||mxEvent.isShiftDown(K))});g.cellEditor.editPlantUmlData=function(M,K,I){var F=JSON.parse(I);K=new TextareaDialog(d,mxResources.get("plantUml")+":",F.data,function(P){null!=P&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(P,F.format,function(U,T,V){d.spinner.stop();g.getModel().beginUpdate();try{if("txt"==F.format)g.labelChanged(M,"<pre>"+ -U+"</pre>"),g.updateCellSize(M,!0);else{g.setCellStyles("image",d.convertDataUri(U),[M]);var W=g.model.getGeometry(M);null!=W&&(W=W.clone(),W.width=T,W.height=V,g.cellsResized([M],[W],!1))}g.setAttributeForCell(M,"plantUmlData",JSON.stringify({data:P,format:F.format}))}finally{g.getModel().endUpdate()}},function(U){d.handleError(U)})},null,null,400,220);d.showDialog(K.container,420,300,!0,!0);K.init()};g.cellEditor.editMermaidData=function(M,K,I){var F=JSON.parse(I);K=new TextareaDialog(d,mxResources.get("mermaid")+ -":",F.data,function(P){null!=P&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(P,F.config,function(U,T,V){d.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",U,[M]);var W=g.model.getGeometry(M);null!=W&&(W=W.clone(),W.width=Math.max(W.width,T),W.height=Math.max(W.height,V),g.cellsResized([M],[W],!1));g.setAttributeForCell(M,"mermaidData",JSON.stringify({data:P,config:F.config},null,2))}finally{g.getModel().endUpdate()}},function(U){d.handleError(U)})}, -null,null,400,220);d.showDialog(K.container,420,300,!0,!0);K.init()};var k=g.cellEditor.startEditing;g.cellEditor.startEditing=function(M,K){try{var I=this.graph.getAttributeForCell(M,"plantUmlData");if(null!=I)this.editPlantUmlData(M,K,I);else if(I=this.graph.getAttributeForCell(M,"mermaidData"),null!=I)this.editMermaidData(M,K,I);else{var F=g.getCellStyle(M);"1"==mxUtils.getValue(F,"metaEdit","0")?d.showDataDialog(M):k.apply(this,arguments)}}catch(P){d.handleError(P)}};g.getLinkTitle=function(M){return d.getLinkTitle(M)}; -g.customLinkClicked=function(M){var K=!1;try{d.handleCustomLink(M),K=!0}catch(I){d.handleError(I)}return K};var n=g.parseBackgroundImage;g.parseBackgroundImage=function(M){var K=n.apply(this,arguments);null!=K&&null!=K.src&&Graph.isPageLink(K.src)&&(K={originalSrc:K.src});return K};var t=g.setBackgroundImage;g.setBackgroundImage=function(M){null!=M&&null!=M.originalSrc&&(M=d.createImageForPageLink(M.originalSrc,d.currentPage,this));t.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this, -function(){g.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(M,K){M=null!=g.backgroundImage?g.backgroundImage.originalSrc:null;if(null!=M){var I=M.indexOf(",");if(0<I)for(M=M.substring(I+1),K=K.getProperty("patches"),I=0;I<K.length;I++)if(null!=K[I][EditorUi.DIFF_UPDATE]&&null!=K[I][EditorUi.DIFF_UPDATE][M]||null!=K[I][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(K[I][EditorUi.DIFF_REMOVE], -M)){g.refreshBackgroundImage();break}}}));var p=g.getBackgroundImageObject;g.getBackgroundImageObject=function(M,K){var I=p.apply(this,arguments);if(null!=I&&null!=I.originalSrc)if(!K)I={src:I.originalSrc};else if(K&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var F=this.stylesheet,P=this.shapeForegroundColor,U=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";I=d.createImageForPageLink(I.originalSrc); -this.shapeBackgroundColor=U;this.shapeForegroundColor=P;this.stylesheet=F}return I};var A=this.clearDefaultStyle;this.clearDefaultStyle=function(){A.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var E= -d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(M){M=null!=M?M:"";"1"==urlParams.dev&&(M+=(0<M.length?"&":"?")+"dev=1");return E.apply(this,arguments)};var y=g.addClickHandler;g.addClickHandler=function(M,K,I){var F=K;K=function(P,U){if(null==U){var T=mxEvent.getSource(P);"a"==T.nodeName.toLowerCase()&&(U=T.getAttribute("href"))}null!=U&&g.isCustomLink(U)&&(mxEvent.isTouchEvent(P)||!mxEvent.isPopupTrigger(P))&&g.customLinkClicked(U)&&mxEvent.consume(P);null!=F&&F(P,U)};y.call(this,M, -K,I)};l.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var B=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(M,K,I){d.editor.graph.isSelectionEmpty()?B.apply(this,arguments):d.menus.addMenuItems(M,"delete - cut copy copyAsImage - duplicate".split(" "),null,I)}}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,null!=d.pages&&1<d.pages.length?470:390, -!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var J=g.getExportVariables;g.getExportVariables=function(){var M=J.apply(this,arguments),K=d.getCurrentFile();null!=K&&(M.filename=K.getTitle());M.pagecount=null!=d.pages?d.pages.length:1;M.page=null!=d.currentPage?d.currentPage.getName():"";M.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return M};var N=g.getGlobalVariable;g.getGlobalVariable=function(M){var K=d.getCurrentFile();return"filename"== -M&&null!=K?K.getTitle():"page"==M&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==M?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==M?null!=d.pages?d.pages.length:1:N.apply(this,arguments)};var v=g.labelLinkClicked;g.labelLinkClicked=function(M,K,I){var F=K.getAttribute("href");if(null==F||!g.isCustomLink(F)||!mxEvent.isTouchEvent(I)&&mxEvent.isPopupTrigger(I))v.apply(this,arguments);else{if(!g.isEnabled()||null!=M&&g.isCellLocked(M.cell))g.customLinkClicked(F), -g.getRubberband().reset();mxEvent.consume(I)}};this.editor.getOrCreateFilename=function(){var M=d.defaultFilename,K=d.getCurrentFile();null!=K&&(M=null!=K.getTitle()?K.getTitle():M);return M};var u=this.actions.get("print");u.setEnabled(!mxClient.IS_IOS||!navigator.standalone);u.visible=u.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77, +"F",A,E)});window.openBrowserFile=mxUtils.bind(this,function(A,E,z){StorageFile.getFileContent(this,A,E,z)});window.deleteBrowserFile=mxUtils.bind(this,function(A,E,z){StorageFile.deleteFile(this,A,E,z)});if(!g){var n=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(A){this.hideDialog(A)}));window.openFile.setConsumer(mxUtils.bind(this,function(A,E){null!=E&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(E)?(A=new Blob([A],{type:"application/octet-stream"}), +this.importVisio(A,mxUtils.bind(this,function(z){this.importXml(z,0,0,!0)}),null,E)):this.editor.graph.setSelectionCells(this.importXml(A,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!g){var q=this.dialog,p=q.close;this.dialog.close=mxUtils.bind(this,function(A){Editor.useLocalStorage=n;p.apply(q,arguments);A&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}}; +EditorUi.prototype.importZipFile=function(d,g,k){var n=this,q=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(p){if(mxUtils.isEmptyObject(p.files))k();else{var A=0,E,z=!1;p.forEach(function(B,J){B=J.name.toLowerCase();"diagram/diagram.xml"==B?(z=!0,J.async("string").then(function(M){0==M.indexOf("<mxfile ")?g(M):k()})):0==B.indexOf("versions/")&&(B=parseInt(B.substr(9)),B>A&&(A=B,E=J))});0<A?E.async("string").then(function(B){(new XMLHttpRequest).upload&& +n.isRemoteFileFormat(B,d.name)?n.isOffline()?n.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k):n.parseFileData(B,mxUtils.bind(this,function(J){4==J.readyState&&(200<=J.status&&299>=J.status?g(J.responseText):k())}),d.name):k()}):z||k()}},function(p){k(p)}):k()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",q))};EditorUi.prototype.importFile=function(d,g,k,n,q,p,A,E,z,B,J,M){B=null!= +B?B:!0;var v=!1,u=null,G=mxUtils.bind(this,function(I){var F=null;null!=I&&"<mxlibrary"==I.substring(0,10)?this.loadLibrary(new LocalLibrary(this,I,A)):F=this.importXml(I,k,n,B,null,null!=M?mxEvent.isControlDown(M):null);null!=E&&E(F)});"image"==g.substring(0,5)?(z=!1,"image/png"==g.substring(0,9)&&(g=J?null:this.extractGraphModelFromPng(d),null!=g&&0<g.length&&(u=this.importXml(g,k,n,B,null,null!=M?mxEvent.isControlDown(M):null),z=!0)),z||(g=this.editor.graph,z=d.indexOf(";"),0<z&&(d=d.substring(0, +z)+d.substring(d.indexOf(",",z+1))),B&&g.isGridEnabled()&&(k=g.snap(k),n=g.snap(n)),u=[g.insertVertex(null,null,"",k,n,q,p,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";")])):/(\.*<graphml )/.test(d)?(v=!0,this.importGraphML(d,G)):null!=z&&null!=A&&(/(\.v(dx|sdx?))($|\?)/i.test(A)||/(\.vs(x|sx?))($|\?)/i.test(A))?(v=!0,this.importVisio(z,G)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,A)?this.isOffline()? +this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(v=!0,q=mxUtils.bind(this,function(I){4==I.readyState&&(200<=I.status&&299>=I.status?G(I.responseText):null!=E&&E(null))}),null!=d?this.parseFileData(d,q,A):this.parseFile(z,q,A)):0==d.indexOf("PK")&&null!=z?(v=!0,this.importZipFile(z,G,mxUtils.bind(this,function(){u=this.insertTextAt(this.validateFileData(d),k,n,!0,null,B);E(u)}))):/(\.v(sd|dx))($|\?)/i.test(A)||/(\.vs(s|x))($|\?)/i.test(A)||(u=this.insertTextAt(this.validateFileData(d), +k,n,!0,null,B,null,null!=M?mxEvent.isControlDown(M):null));v||null==E||E(u);return u};EditorUi.prototype.importFiles=function(d,g,k,n,q,p,A,E,z,B,J,M,v){n=null!=n?n:this.maxImageSize;B=null!=B?B:this.maxImageBytes;var u=null!=g&&null!=k,G=!0;g=null!=g?g:0;k=null!=k?k:0;var I=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var F=J||this.resampleThreshold,L=0;L<d.length;L++)if("image/svg"!==d[L].type.substring(0,9)&&"image/"===d[L].type.substring(0,6)&&d[L].size>F){I=!0;break}var K=mxUtils.bind(this,function(){var H= +this.editor.graph,Q=H.gridSize;q=null!=q?q:mxUtils.bind(this,function(C,N,R,O,P,S,X,aa,Y){try{return null!=C&&"<mxlibrary"==C.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,C,X)),null):this.isCompatibleString(C)&&1==d.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,C,X,!0)),null):this.importFile(C,N,R,O,P,S,X,aa,Y,u,M,v)}catch(Z){return this.handleError(Z),null}});p=null!=p?p:mxUtils.bind(this,function(C){H.setSelectionCells(C)}); +if(this.spinner.spin(document.body,mxResources.get("loading")))for(var U=d.length,T=U,V=[],W=mxUtils.bind(this,function(C,N){V[C]=N;if(0==--T){this.spinner.stop();if(null!=E)E(V);else{var R=[];H.getModel().beginUpdate();try{for(C=0;C<V.length;C++){var O=V[C]();null!=O&&(R=R.concat(O))}}finally{H.getModel().endUpdate()}}p(R)}}),t=0;t<U;t++)mxUtils.bind(this,function(C){var N=d[C];if(null!=N){var R=new FileReader;R.onload=mxUtils.bind(this,function(O){if(null==A||A(N))if("image/"==N.type.substring(0, +6))if("image/svg"==N.type.substring(0,9)){var P=Graph.clipSvgDataUri(O.target.result),S=P.indexOf(",");S=decodeURIComponent(escape(atob(P.substring(S+1))));var X=mxUtils.parseXml(S);S=X.getElementsByTagName("svg");if(0<S.length){S=S[0];var aa=M?null:S.getAttribute("content");null!=aa&&"<"!=aa.charAt(0)&&"%"!=aa.charAt(0)&&(aa=unescape(window.atob?atob(aa):Base64.decode(aa,!0)));null!=aa&&"%"==aa.charAt(0)&&(aa=decodeURIComponent(aa));null==aa||"<mxfile "!==aa.substring(0,8)&&"<mxGraphModel "!==aa.substring(0, +14)?W(C,mxUtils.bind(this,function(){try{if(null!=X){var ba=X.getElementsByTagName("svg");if(0<ba.length){var ea=ba[0],ma=ea.getAttribute("width"),ia=ea.getAttribute("height");ma=null!=ma&&"%"!=ma.charAt(ma.length-1)?parseFloat(ma):NaN;ia=null!=ia&&"%"!=ia.charAt(ia.length-1)?parseFloat(ia):NaN;var pa=ea.getAttribute("viewBox");if(null==pa||0==pa.length)ea.setAttribute("viewBox","0 0 "+ma+" "+ia);else if(isNaN(ma)||isNaN(ia)){var na=pa.split(" ");3<na.length&&(ma=parseFloat(na[2]),ia=parseFloat(na[3]))}P= +Editor.createSvgDataUri(mxUtils.getXml(ea));var Fa=Math.min(1,Math.min(n/Math.max(1,ma)),n/Math.max(1,ia)),Ga=q(P,N.type,g+C*Q,k+C*Q,Math.max(1,Math.round(ma*Fa)),Math.max(1,Math.round(ia*Fa)),N.name);if(isNaN(ma)||isNaN(ia)){var xa=new Image;xa.onload=mxUtils.bind(this,function(){ma=Math.max(1,xa.width);ia=Math.max(1,xa.height);Ga[0].geometry.width=ma;Ga[0].geometry.height=ia;ea.setAttribute("viewBox","0 0 "+ma+" "+ia);P=Editor.createSvgDataUri(mxUtils.getXml(ea));var Ma=P.indexOf(";");0<Ma&&(P= +P.substring(0,Ma)+P.substring(P.indexOf(",",Ma+1)));H.setCellStyles("image",P,[Ga[0]])});xa.src=Editor.createSvgDataUri(mxUtils.getXml(ea))}return Ga}}}catch(Ma){}return null})):W(C,mxUtils.bind(this,function(){return q(aa,"text/xml",g+C*Q,k+C*Q,0,0,N.name)}))}else W(C,mxUtils.bind(this,function(){return null}))}else{S=!1;if("image/png"==N.type){var Y=M?null:this.extractGraphModelFromPng(O.target.result);if(null!=Y&&0<Y.length){var Z=new Image;Z.src=O.target.result;W(C,mxUtils.bind(this,function(){return q(Y, +"text/xml",g+C*Q,k+C*Q,Z.width,Z.height,N.name)}));S=!0}}S||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(O.target.result,mxUtils.bind(this,function(ba){this.resizeImage(ba,O.target.result,mxUtils.bind(this,function(ea,ma,ia){W(C,mxUtils.bind(this,function(){if(null!= +ea&&ea.length<B){var pa=G&&this.isResampleImageSize(N.size,J)?Math.min(1,Math.min(n/ma,n/ia)):1;return q(ea,N.type,g+C*Q,k+C*Q,Math.round(ma*pa),Math.round(ia*pa),N.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),G,n,J,N.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else P=O.target.result,q(P,N.type,g+C*Q,k+C*Q,240,160,N.name,function(ba){W(C,function(){return ba})},N)});/(\.v(dx|sdx?))($|\?)/i.test(N.name)|| +/(\.vs(x|sx?))($|\?)/i.test(N.name)?q(null,N.type,g+C*Q,k+C*Q,240,160,N.name,function(O){W(C,function(){return O})},N):"image"==N.type.substring(0,5)||"application/pdf"==N.type?R.readAsDataURL(N):R.readAsText(N)}})(t)});if(I){I=[];for(L=0;L<d.length;L++)I.push(d[L]);d=I;this.confirmImageResize(function(H){G=H;K()},z)}else K()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber", +[1])};EditorUi.prototype.confirmImageResize=function(d,g){g=null!=g?g:!1;var k=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},n=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,q=function(p,A){if(p||g)mxSettings.setResizeImages(p?A:null),mxSettings.save();k();d(A)};null==n||g?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(p){q(p,!0)},function(p){q(p,!1)},mxResources.get("resize"),mxResources.get("actualSize"), +'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):q(!1,n)};EditorUi.prototype.parseFile=function(d,g,k){k=null!=k?k:d.name;var n=new FileReader;n.onload=mxUtils.bind(this,function(){this.parseFileData(n.result,g,k)});n.readAsText(d)};EditorUi.prototype.parseFileData=function(d,g,k){var n=new XMLHttpRequest;n.open("POST", +OPEN_URL);n.setRequestHeader("Content-Type","application/x-www-form-urlencoded");n.onreadystatechange=function(){g(n)};n.send("format=xml&filename="+encodeURIComponent(k)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(q){}};EditorUi.prototype.isResampleImageSize=function(d,g){g=null!=g?g:this.resampleThreshold;return d>g};EditorUi.prototype.resizeImage=function(d,g,k,n,q,p,A){q=null!=q?q:this.maxImageSize;var E=Math.max(1,d.width), +z=Math.max(1,d.height);if(n&&this.isResampleImageSize(null!=A?A:g.length,p))try{var B=Math.max(E/q,z/q);if(1<B){var J=Math.round(E/B),M=Math.round(z/B),v=document.createElement("canvas");v.width=J;v.height=M;v.getContext("2d").drawImage(d,0,0,J,M);var u=v.toDataURL();if(u.length<g.length){var G=document.createElement("canvas");G.width=J;G.height=M;var I=G.toDataURL();u!==I&&(g=u,E=J,z=M)}}}catch(F){}k(g,E,z)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)}; +EditorUi.prototype.loadImage=function(d,g,k){try{var n=new Image;n.onload=function(){n.width=0<n.width?n.width:120;n.height=0<n.height?n.height:120;g(n)};null!=k&&(n.onerror=k);n.src=d}catch(q){if(null!=k)k(q);else throw q;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var l=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&& +!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var d=this,g=this.editor.graph;Graph.touchStyle&&(g.panningHandler.isPanningTrigger=function(F){var L=F.getEvent();return null==F.getState()&& +!mxEvent.isMouseEvent(L)&&!g.freehand.isDrawing()||mxEvent.isPopupTrigger(L)&&(null==F.getState()||mxEvent.isControlDown(L)||mxEvent.isShiftDown(L))});g.cellEditor.editPlantUmlData=function(F,L,K){var H=JSON.parse(K);L=new TextareaDialog(d,mxResources.get("plantUml")+":",H.data,function(Q){null!=Q&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(Q,H.format,function(U,T,V){d.spinner.stop();g.getModel().beginUpdate();try{if("txt"==H.format)g.labelChanged(F,"<pre>"+ +U+"</pre>"),g.updateCellSize(F,!0);else{g.setCellStyles("image",d.convertDataUri(U),[F]);var W=g.model.getGeometry(F);null!=W&&(W=W.clone(),W.width=T,W.height=V,g.cellsResized([F],[W],!1))}g.setAttributeForCell(F,"plantUmlData",JSON.stringify({data:Q,format:H.format}))}finally{g.getModel().endUpdate()}},function(U){d.handleError(U)})},null,null,400,220);d.showDialog(L.container,420,300,!0,!0);L.init()};g.cellEditor.editMermaidData=function(F,L,K){var H=JSON.parse(K);L=new TextareaDialog(d,mxResources.get("mermaid")+ +":",H.data,function(Q){null!=Q&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(Q,H.config,function(U,T,V){d.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",U,[F]);var W=g.model.getGeometry(F);null!=W&&(W=W.clone(),W.width=Math.max(W.width,T),W.height=Math.max(W.height,V),g.cellsResized([F],[W],!1));g.setAttributeForCell(F,"mermaidData",JSON.stringify({data:Q,config:H.config},null,2))}finally{g.getModel().endUpdate()}},function(U){d.handleError(U)})}, +null,null,400,220);d.showDialog(L.container,420,300,!0,!0);L.init()};var k=g.cellEditor.startEditing;g.cellEditor.startEditing=function(F,L){try{var K=this.graph.getAttributeForCell(F,"plantUmlData");if(null!=K)this.editPlantUmlData(F,L,K);else if(K=this.graph.getAttributeForCell(F,"mermaidData"),null!=K)this.editMermaidData(F,L,K);else{var H=g.getCellStyle(F);"1"==mxUtils.getValue(H,"metaEdit","0")?d.showDataDialog(F):k.apply(this,arguments)}}catch(Q){d.handleError(Q)}};g.getLinkTitle=function(F){return d.getLinkTitle(F)}; +g.customLinkClicked=function(F){var L=!1;try{d.handleCustomLink(F),L=!0}catch(K){d.handleError(K)}return L};var n=g.parseBackgroundImage;g.parseBackgroundImage=function(F){var L=n.apply(this,arguments);null!=L&&null!=L.src&&Graph.isPageLink(L.src)&&(L={originalSrc:L.src});return L};var q=g.setBackgroundImage;g.setBackgroundImage=function(F){null!=F&&null!=F.originalSrc&&(F=d.createImageForPageLink(F.originalSrc,d.currentPage,this));q.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this, +function(){g.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(F,L){F=null!=g.backgroundImage?g.backgroundImage.originalSrc:null;if(null!=F){var K=F.indexOf(",");if(0<K)for(F=F.substring(K+1),L=L.getProperty("patches"),K=0;K<L.length;K++)if(null!=L[K][EditorUi.DIFF_UPDATE]&&null!=L[K][EditorUi.DIFF_UPDATE][F]||null!=L[K][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(L[K][EditorUi.DIFF_REMOVE], +F)){g.refreshBackgroundImage();break}}}));var p=g.getBackgroundImageObject;g.getBackgroundImageObject=function(F,L){var K=p.apply(this,arguments);if(null!=K&&null!=K.originalSrc)if(!L)K={src:K.originalSrc};else if(L&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var H=this.stylesheet,Q=this.shapeForegroundColor,U=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";K=d.createImageForPageLink(K.originalSrc); +this.shapeBackgroundColor=U;this.shapeForegroundColor=Q;this.stylesheet=H}return K};var A=this.clearDefaultStyle;this.clearDefaultStyle=function(){A.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var E= +d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(F){F=null!=F?F:"";"1"==urlParams.dev&&(F+=(0<F.length?"&":"?")+"dev=1");return E.apply(this,arguments)};var z=g.addClickHandler;g.addClickHandler=function(F,L,K){var H=L;L=function(Q,U){if(null==U){var T=mxEvent.getSource(Q);"a"==T.nodeName.toLowerCase()&&(U=T.getAttribute("href"))}null!=U&&g.isCustomLink(U)&&(mxEvent.isTouchEvent(Q)||!mxEvent.isPopupTrigger(Q))&&g.customLinkClicked(U)&&mxEvent.consume(Q);null!=H&&H(Q,U)};z.call(this,F, +L,K)};l.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var B=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(F,L,K){d.editor.graph.isSelectionEmpty()?B.apply(this,arguments):d.menus.addMenuItems(F,"delete - cut copy copyAsImage - duplicate".split(" "),null,K)}}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,null!=d.pages&&1<d.pages.length?470:390, +!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var J=g.getExportVariables;g.getExportVariables=function(){var F=J.apply(this,arguments),L=d.getCurrentFile();null!=L&&(F.filename=L.getTitle());F.pagecount=null!=d.pages?d.pages.length:1;F.page=null!=d.currentPage?d.currentPage.getName():"";F.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return F};var M=g.getGlobalVariable;g.getGlobalVariable=function(F){var L=d.getCurrentFile();return"filename"== +F&&null!=L?L.getTitle():"page"==F&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==F?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==F?null!=d.pages?d.pages.length:1:M.apply(this,arguments)};var v=g.labelLinkClicked;g.labelLinkClicked=function(F,L,K){var H=L.getAttribute("href");if(null==H||!g.isCustomLink(H)||!mxEvent.isTouchEvent(K)&&mxEvent.isPopupTrigger(K))v.apply(this,arguments);else{if(!g.isEnabled()||null!=F&&g.isCellLocked(F.cell))g.customLinkClicked(H), +g.getRubberband().reset();mxEvent.consume(K)}};this.editor.getOrCreateFilename=function(){var F=d.defaultFilename,L=d.getCurrentFile();null!=L&&(F=null!=L.getTitle()?L.getTitle():F);return F};var u=this.actions.get("print");u.setEnabled(!mxClient.IS_IOS||!navigator.standalone);u.visible=u.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77, !0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler(); -this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&g.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(M){var K=g.cellEditor.text2,I=null;null!=K&&(mxEvent.addListener(K,"dragleave",function(F){null!=I&&(I.parentNode.removeChild(I),I=null);F.stopPropagation();F.preventDefault()}),mxEvent.addListener(K,"dragover",mxUtils.bind(this,function(F){null==I&&(!mxClient.IS_IE||10<document.documentMode)&& -(I=this.highlightElement(K));F.stopPropagation();F.preventDefault()})),mxEvent.addListener(K,"drop",mxUtils.bind(this,function(F){null!=I&&(I.parentNode.removeChild(I),I=null);if(0<F.dataTransfer.files.length)this.importFiles(F.dataTransfer.files,0,0,this.maxImageSize,function(U,T,V,W,q,D){g.insertImage(U,q,D)},function(){},function(U){return"image/"==U.type.substring(0,6)},function(U){for(var T=0;T<U.length;T++)U[T]()},mxEvent.isControlDown(F));else if(0<=mxUtils.indexOf(F.dataTransfer.types,"text/uri-list")){var P= -F.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(P)?this.loadImage(decodeURIComponent(P),mxUtils.bind(this,function(U){var T=Math.max(1,U.width);U=Math.max(1,U.height);var V=this.maxImageSize;V=Math.min(1,Math.min(V/Math.max(1,T)),V/Math.max(1,U));g.insertImage(decodeURIComponent(P),T*V,U*V)})):document.execCommand("insertHTML",!1,F.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(F.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,F.dataTransfer.getData("text/html")): -0<=mxUtils.indexOf(F.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,F.dataTransfer.getData("text/plain"));F.stopPropagation();F.preventDefault()})))}));this.isSettingsEnabled()&&(u=this.editor.graph.view,u.setUnit(mxSettings.getUnit()),u.addListener("unitChanged",function(M,K){mxSettings.setUnit(K.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&& +this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&g.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(F){var L=g.cellEditor.text2,K=null;null!=L&&(mxEvent.addListener(L,"dragleave",function(H){null!=K&&(K.parentNode.removeChild(K),K=null);H.stopPropagation();H.preventDefault()}),mxEvent.addListener(L,"dragover",mxUtils.bind(this,function(H){null==K&&(!mxClient.IS_IE||10<document.documentMode)&& +(K=this.highlightElement(L));H.stopPropagation();H.preventDefault()})),mxEvent.addListener(L,"drop",mxUtils.bind(this,function(H){null!=K&&(K.parentNode.removeChild(K),K=null);if(0<H.dataTransfer.files.length)this.importFiles(H.dataTransfer.files,0,0,this.maxImageSize,function(U,T,V,W,t,C){g.insertImage(U,t,C)},function(){},function(U){return"image/"==U.type.substring(0,6)},function(U){for(var T=0;T<U.length;T++)U[T]()},mxEvent.isControlDown(H));else if(0<=mxUtils.indexOf(H.dataTransfer.types,"text/uri-list")){var Q= +H.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(Q)?this.loadImage(decodeURIComponent(Q),mxUtils.bind(this,function(U){var T=Math.max(1,U.width);U=Math.max(1,U.height);var V=this.maxImageSize;V=Math.min(1,Math.min(V/Math.max(1,T)),V/Math.max(1,U));g.insertImage(decodeURIComponent(Q),T*V,U*V)})):document.execCommand("insertHTML",!1,H.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(H.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,H.dataTransfer.getData("text/html")): +0<=mxUtils.indexOf(H.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,H.dataTransfer.getData("text/plain"));H.stopPropagation();H.preventDefault()})))}));this.isSettingsEnabled()&&(u=this.editor.graph.view,u.setUnit(mxSettings.getUnit()),u.addListener("unitChanged",function(F,L){mxSettings.setUnit(L.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&& !this.editor.editable?null:new mxDualRuler(this,u.unit),this.refresh());if("1"==urlParams.styledev){u=document.getElementById("geFooter");null!=u&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change", -mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),u.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(M,K){0<this.editor.graph.getSelectionCount()?(M=this.editor.graph.getSelectionCell(),M=this.editor.graph.getModel().getStyle(M),this.styleInput.value=M||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var G= -this.isSelectionAllowed;this.isSelectionAllowed=function(M){return mxEvent.getSource(M)==this.styleInput?!0:G.apply(this,arguments)}}u=document.getElementById("geInfo");null!=u&&u.parentNode.removeChild(u);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var H=null;mxEvent.addListener(g.container,"dragleave",function(M){g.isEnabled()&&(null!=H&&(H.parentNode.removeChild(H),H=null),M.stopPropagation(),M.preventDefault())});mxEvent.addListener(g.container,"dragover",mxUtils.bind(this, -function(M){null==H&&(!mxClient.IS_IE||10<document.documentMode)&&(H=this.highlightElement(g.container));null!=this.sidebar&&this.sidebar.hideTooltip();M.stopPropagation();M.preventDefault()}));mxEvent.addListener(g.container,"drop",mxUtils.bind(this,function(M){null!=H&&(H.parentNode.removeChild(H),H=null);if(g.isEnabled()){var K=mxUtils.convertPoint(g.container,mxEvent.getClientX(M),mxEvent.getClientY(M)),I=M.dataTransfer.files,F=g.view.translate,P=g.view.scale,U=K.x/P-F.x,T=K.y/P-F.y;if(0<I.length)"1"!= -urlParams.embed&&mxEvent.isShiftDown(M)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(I,!0)):(mxEvent.isAltDown(M)&&(T=U=null),this.importFiles(I,U,T,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(M),null,null,mxEvent.isShiftDown(M),M));else{mxEvent.isAltDown(M)&&(T=U=0);var V=0<=mxUtils.indexOf(M.dataTransfer.types,"text/uri-list")?M.dataTransfer.getData("text/uri-list"):null;K=this.extractGraphModelFromEvent(M,null!=this.pages); -if(null!=K)g.setSelectionCells(this.importXml(K,U,T,!0));else if(0<=mxUtils.indexOf(M.dataTransfer.types,"text/html")){var W=M.dataTransfer.getData("text/html");K=document.createElement("div");K.innerHTML=g.sanitizeHtml(W);var q=null;I=K.getElementsByTagName("img");null!=I&&1==I.length?(W=I[0].getAttribute("src"),null==W&&(W=I[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(W)||(q=!0)):(I=K.getElementsByTagName("a"),null!=I&&1==I.length?W=I[0].getAttribute("href"):(K=K.getElementsByTagName("pre"), -null!=K&&1==K.length&&(W=mxUtils.getTextContent(K[0]))));var D=!0,L=mxUtils.bind(this,function(){g.setSelectionCells(this.insertTextAt(W,U,T,!0,q,null,D,mxEvent.isControlDown(M)))});q&&null!=W&&W.length>this.resampleThreshold?this.confirmImageResize(function(R){D=R;L()},mxEvent.isControlDown(M)):L()}else null!=V&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?this.loadImage(decodeURIComponent(V),mxUtils.bind(this,function(R){var O=Math.max(1,R.width);R=Math.max(1,R.height);var Q=this.maxImageSize;Q=Math.min(1, -Math.min(Q/Math.max(1,O)),Q/Math.max(1,R));g.setSelectionCell(g.insertVertex(null,null,"",U,T,O*Q,R*Q,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+V+";"))}),mxUtils.bind(this,function(R){g.setSelectionCells(this.insertTextAt(V,U,T,!0))})):0<=mxUtils.indexOf(M.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(M.dataTransfer.getData("text/plain"),U,T,!0))}}M.stopPropagation();M.preventDefault()}),!1)}g.enableFlowAnimation= +mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),u.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(F,L){0<this.editor.graph.getSelectionCount()?(F=this.editor.graph.getSelectionCell(),F=this.editor.graph.getModel().getStyle(F),this.styleInput.value=F||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var G= +this.isSelectionAllowed;this.isSelectionAllowed=function(F){return mxEvent.getSource(F)==this.styleInput?!0:G.apply(this,arguments)}}u=document.getElementById("geInfo");null!=u&&u.parentNode.removeChild(u);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var I=null;mxEvent.addListener(g.container,"dragleave",function(F){g.isEnabled()&&(null!=I&&(I.parentNode.removeChild(I),I=null),F.stopPropagation(),F.preventDefault())});mxEvent.addListener(g.container,"dragover",mxUtils.bind(this, +function(F){null==I&&(!mxClient.IS_IE||10<document.documentMode)&&(I=this.highlightElement(g.container));null!=this.sidebar&&this.sidebar.hideTooltip();F.stopPropagation();F.preventDefault()}));mxEvent.addListener(g.container,"drop",mxUtils.bind(this,function(F){null!=I&&(I.parentNode.removeChild(I),I=null);if(g.isEnabled()){var L=mxUtils.convertPoint(g.container,mxEvent.getClientX(F),mxEvent.getClientY(F)),K=F.dataTransfer.files,H=g.view.translate,Q=g.view.scale,U=L.x/Q-H.x,T=L.y/Q-H.y;if(0<K.length)"1"!= +urlParams.embed&&mxEvent.isShiftDown(F)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(K,!0)):(mxEvent.isAltDown(F)&&(T=U=null),this.importFiles(K,U,T,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(F),null,null,mxEvent.isShiftDown(F),F));else{mxEvent.isAltDown(F)&&(T=U=0);var V=0<=mxUtils.indexOf(F.dataTransfer.types,"text/uri-list")?F.dataTransfer.getData("text/uri-list"):null;L=this.extractGraphModelFromEvent(F,null!=this.pages); +if(null!=L)g.setSelectionCells(this.importXml(L,U,T,!0));else if(0<=mxUtils.indexOf(F.dataTransfer.types,"text/html")){var W=F.dataTransfer.getData("text/html");L=document.createElement("div");L.innerHTML=g.sanitizeHtml(W);var t=null;K=L.getElementsByTagName("img");null!=K&&1==K.length?(W=K[0].getAttribute("src"),null==W&&(W=K[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(W)||(t=!0)):(K=L.getElementsByTagName("a"),null!=K&&1==K.length?W=K[0].getAttribute("href"):(L=L.getElementsByTagName("pre"), +null!=L&&1==L.length&&(W=mxUtils.getTextContent(L[0]))));var C=!0,N=mxUtils.bind(this,function(){g.setSelectionCells(this.insertTextAt(W,U,T,!0,t,null,C,mxEvent.isControlDown(F)))});t&&null!=W&&W.length>this.resampleThreshold?this.confirmImageResize(function(R){C=R;N()},mxEvent.isControlDown(F)):N()}else null!=V&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?this.loadImage(decodeURIComponent(V),mxUtils.bind(this,function(R){var O=Math.max(1,R.width);R=Math.max(1,R.height);var P=this.maxImageSize;P=Math.min(1, +Math.min(P/Math.max(1,O)),P/Math.max(1,R));g.setSelectionCell(g.insertVertex(null,null,"",U,T,O*P,R*P,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+V+";"))}),mxUtils.bind(this,function(R){g.setSelectionCells(this.insertTextAt(V,U,T,!0))})):0<=mxUtils.indexOf(F.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(F.dataTransfer.getData("text/plain"),U,T,!0))}}F.stopPropagation();F.preventDefault()}),!1)}g.enableFlowAnimation= !0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();u=mxUtils.bind(this,function(){g.refresh();g.view.validateBackground();this.updateTabContainer()});this.addListener("darkModeChanged",u);this.addListener("sketchModeChanged",u);"dark"==uiTheme?(this.doSetDarkMode(!0),this.fireEvent(new mxEventObject("darkModeChanged"))):"min"==uiTheme&&"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode? -mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(g){if(!mxEvent.isConsumed(g))try{for(var k=g.clipboardData||g.originalEvent.clipboardData,n=!1,t=0;t<k.types.length;t++)if("text/"===k.types[t].substring(0,5)){n=!0;break}if(!n){var p=k.items;for(index in p){var A= -p[index];if("file"===A.kind){if(d.isEditing())this.importFiles([A.getAsFile()],0,0,this.maxImageSize,function(y,B,J,N,v,u){d.insertImage(y,v,u)},function(){},function(y){return"image/"==y.type.substring(0,6)},function(y){for(var B=0;B<y.length;B++)y[B]()});else{var E=this.editor.graph.getInsertPoint();this.importFiles([A.getAsFile()],E.x,E.y,this.maxImageSize);mxEvent.consume(g)}break}}}}catch(y){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){k.innerHTML= +mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(g){if(!mxEvent.isConsumed(g))try{for(var k=g.clipboardData||g.originalEvent.clipboardData,n=!1,q=0;q<k.types.length;q++)if("text/"===k.types[q].substring(0,5)){n=!0;break}if(!n){var p=k.items;for(index in p){var A= +p[index];if("file"===A.kind){if(d.isEditing())this.importFiles([A.getAsFile()],0,0,this.maxImageSize,function(z,B,J,M,v,u){d.insertImage(z,v,u)},function(){},function(z){return"image/"==z.type.substring(0,6)},function(z){for(var B=0;B<z.length;B++)z[B]()});else{var E=this.editor.graph.getInsertPoint();this.importFiles([A.getAsFile()],E.x,E.y,this.maxImageSize);mxEvent.consume(g)}break}}}}catch(z){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){k.innerHTML= " ";k.focus();document.execCommand("selectAll",!1,null)},0)}var g=this.editor.graph,k=document.createElement("div");k.setAttribute("autocomplete","off");k.setAttribute("autocorrect","off");k.setAttribute("autocapitalize","off");k.setAttribute("spellcheck","false");k.style.textRendering="optimizeSpeed";k.style.fontFamily="monospace";k.style.wordBreak="break-all";k.style.background="transparent";k.style.color="transparent";k.style.position="absolute";k.style.whiteSpace="nowrap";k.style.overflow= "hidden";k.style.display="block";k.style.fontSize="1";k.style.zIndex="-1";k.style.resize="none";k.style.outline="none";k.style.width="1px";k.style.height="1px";mxUtils.setOpacity(k,0);k.contentEditable=!0;k.innerHTML=" ";var n=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(p){var A=mxEvent.getSource(p);null==g.container||!g.isEnabled()||g.isMouseDown|| g.isEditing()||null!=this.dialog||"INPUT"==A.nodeName||"TEXTAREA"==A.nodeName||224!=p.keyCode&&(mxClient.IS_MAC||17!=p.keyCode)&&(!mxClient.IS_MAC||91!=p.keyCode&&93!=p.keyCode)||n||(k.style.left=g.container.scrollLeft+10+"px",k.style.top=g.container.scrollTop+10+"px",g.container.appendChild(k),n=!0,k.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(p){var A=p.keyCode;window.setTimeout(mxUtils.bind(this,function(){!n||224!=A&&17!= A&&91!=A&&93!=A||(n=!1,g.isEditing()||null!=this.dialog||null==g.container||g.container.focus(),k.parentNode.removeChild(k),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(k,"copy",mxUtils.bind(this,function(p){if(g.isEnabled())try{mxClipboard.copy(g),this.copyCells(k),d()}catch(A){this.handleError(A)}}));mxEvent.addListener(k,"cut",mxUtils.bind(this,function(p){if(g.isEnabled())try{mxClipboard.copy(g),this.copyCells(k,!0),d()}catch(A){this.handleError(A)}}));mxEvent.addListener(k, -"paste",mxUtils.bind(this,function(p){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&(k.innerHTML=" ",k.focus(),null!=p.clipboardData&&this.pasteCells(p,k,!0,!0),mxEvent.isConsumed(p)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(p,k,!1,!0)}),0))}),!0);var t=this.isSelectionAllowed;this.isSelectionAllowed=function(p){return mxEvent.getSource(p)==k?!0:t.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(d,g){mxSettings.setUi(d);this.doSetCurrentTheme(d); -this.fireEvent(new mxEventObject("currentThemeChanged"));g||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.doSetCurrentTheme=function(d){Editor.currentTheme!=d&&(Editor.currentTheme=d)};EditorUi.prototype.setSketchMode=function(d){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}), -0)};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }": +"paste",mxUtils.bind(this,function(p){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&(k.innerHTML=" ",k.focus(),null!=p.clipboardData&&this.pasteCells(p,k,!0,!0),mxEvent.isConsumed(p)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(p,k,!1,!0)}),0))}),!0);var q=this.isSelectionAllowed;this.isSelectionAllowed=function(p){return mxEvent.getSource(p)==k?!0:q.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(d,g){mxSettings.setUi(d);g=g||this.doSetCurrentTheme(d); +this.fireEvent(new mxEventObject("currentThemeChanged"));g||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.doSetCurrentTheme=function(d){var g=Editor.currentTheme,k=!1;if(g!=d){if("1"==urlParams["live-ui"]){var n=function(q){return null==q||""==q||"dark"==q||"kennedy"==q};console.log("doSetCurrentTheme",g,d);d=n(d)?"default":d;g=n(g)?"default":g;"sketch"==g&&"default"==d?(this.sidebarFooterContainer.style.display="block",this.menubarContainer.style.display="block",this.toolbarContainer.style.display= +"block",this.sidebarContainer.style.display="block",this.tabContainer.style.display="block",this.hsplit.style.display="block",this.hsplitPosition=EditorUi.prototype.hsplitPosition,this.menubarHeight=App.prototype.menubarHeight,this.formatWidth=EditorUi.prototype.formatWidth,k=!0):"default"==g&&"sketch"==d&&(this.sidebarFooterContainer.style.display="none",this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.sidebarContainer.style.display="none",this.tabContainer.style.display= +"none",this.hsplit.style.display="none",this.formatWidth=this.menubarHeight=this.hsplitPosition=0,k=!0);this.switchTheme(d)}Editor.currentTheme=d}return k};EditorUi.prototype.switchTheme=function(d){this.createMenubarForTheme(d);this.switchCssForTheme(d);"sketch"==d?(this.refresh(),this.createFormatWindow(),this.formatContainer.style.left="0px",this.formatContainer.style.top="0px",this.formatContainer.style.width=""):"default"==d&&(null!=this.formatContainer&&(this.formatContainer.style.left="",null!= +this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null)),this.refresh())};EditorUi.prototype.switchCssForTheme=function(d){"sketch"==d?null==this.sketchStyleElt&&(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=Editor.createMinimalCss(), +document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),this.sketchStyleElt=null)};EditorUi.prototype.createMenubarForTheme=function(d){"sketch"==d?null==this.sketchMenubarElt&&(this.sketchMenubarElt=document.createElement("div"),this.sketchMenubarElt.className="geToolbarContainer",this.sketchMenubarElt.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;padding:6px;border:1px solid #c0c0c0;overflow:hidden;text-align:right;white-space:nowrap;user-select:none;", +null!=this.switchThemeElt&&(this.switchThemeElt.style.position="relative",this.switchThemeElt.style.width="22px",this.switchThemeElt.style.height="22px",this.switchThemeElt.style.top="0px",this.switchThemeElt.style.right="6px",this.sketchMenubarElt.appendChild(this.switchThemeElt)),this.diagramContainer.parentNode.appendChild(this.sketchMenubarElt)):(null!=this.switchThemeElt&&(this.switchThemeElt.style.position="absolute",this.switchThemeElt.style.width="19px",this.switchThemeElt.style.height="19px", +this.switchThemeElt.style.top="0px",this.switchThemeElt.style.right="17px",document.body.appendChild(this.switchThemeElt)),null!=this.sketchMenubarElt&&(this.sketchMenubarElt.parentNode.removeChild(this.sketchMenubarElt),this.sketchMenubarElt=null))};EditorUi.prototype.addMenuToMenubar=function(d,g,k,n){var q=this.menus.get(g);d=d.addMenu(mxResources.get(g),q.funct);d.className=k;d.style.display="inline-block";d.style.boxSizing="border-box";d.style.top="6px";d.style.marginRight="6px";d.style.height= +"30px";d.style.paddingTop="6px";d.style.paddingBottom="6px";d.style.cursor="pointer";d.setAttribute("title",mxResources.get(g));this.menus.menuCreated(q,d,"geMenuItem");null!=n&&(d.style.backgroundImage="url("+n+")",d.style.backgroundPosition="center center",d.style.backgroundRepeat="no-repeat",d.style.backgroundSize="24px 24px",d.style.width="34px",d.innerText="");return d};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var d="1"==urlParams.sketch?Math.max(10,this.diagramContainer.clientWidth- +241):Math.max(10,this.diagramContainer.clientWidth-248),g="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60,k="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),d,g,240,k,mxUtils.bind(this,function(n){n.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));this.formatWindow.window.minimumSize= +new mxRectangle(0,0,240,80)}};EditorUi.prototype.setSketchMode=function(d){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+ +(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }": "html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body .geSidebarContainer *:not(svg *) { font-size:9pt; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }html body .geMenubarContainer .geStatus { margin-top: 0px !important; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+ (Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; border: none !important; }html body .geToolbarContainer a div { color: "+(Editor.isDarkMode()?"#707070":Editor.darkColor)+" }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: "+(Editor.isDarkMode()? "#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } html body div.geToolbarContainer a.geColorBtn { margin: 2px; } html body .mxWindow td.mxWindowPane input, html body .mxWindow td.mxWindowPane select, html body .mxWindow td.mxWindowPane textarea, html body .mxWindow td.mxWindowPane radio { padding: 0px; box-sizing: border-box; }.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); "+ @@ -11737,8 +11743,8 @@ m.setAttribute("charset","UTF-8");m.setAttribute("type","text/css");EditorUi.pro g.defaultPageBorderColor;Graph.prototype.shapeBackgroundColor=g.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=g.shapeForegroundColor;Graph.prototype.defaultThemeName=g.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor: "white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;null!=Editor.styleElt&&(Editor.styleElt.innerHTML=Editor.createMinimalCss());Editor.isDarkMode()?null==m.parentNode&&document.getElementsByTagName("head")[0].appendChild(m):null!=m.parentNode&&m.parentNode.removeChild(m)}}; EditorUi.prototype.setPagesVisible=function(d){Editor.pagesVisible!=d&&(Editor.pagesVisible=d,mxSettings.settings.pagesVisible=d,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(d,g){this.sidebar.sidebarTitles!=d&&(this.sidebar.sidebarTitles=d,this.sidebar.refresh(),this.isSettingsEnabled()&&g&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen= -function(d){Editor.inlineFullscreen!=d&&(Editor.inlineFullscreen=d,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(d){if(Editor.sketchMode!=d){var g=function(n,t,p){null== -n[t]&&(n[t]=p)},k=this.editor.graph;Editor.sketchMode=d;this.menus.defaultFontSize=d?20:16;k.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);g(k.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);k.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);g(k.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);g(k.defaultEdgeStyle,"edgeStyle","none");g(k.defaultEdgeStyle,"rounded","0");g(k.defaultEdgeStyle,"curved","1");g(k.defaultEdgeStyle,"jettySize","auto"); +function(d){Editor.inlineFullscreen!=d&&(Editor.inlineFullscreen=d,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(d){if(Editor.sketchMode!=d){var g=function(n,q,p){null== +n[q]&&(n[q]=p)},k=this.editor.graph;Editor.sketchMode=d;this.menus.defaultFontSize=d?20:16;k.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);g(k.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);k.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);g(k.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);g(k.defaultEdgeStyle,"edgeStyle","none");g(k.defaultEdgeStyle,"rounded","0");g(k.defaultEdgeStyle,"curved","1");g(k.defaultEdgeStyle,"jettySize","auto"); g(k.defaultEdgeStyle,"orthogonalLoop","1");g(k.defaultEdgeStyle,"endArrow","open");g(k.defaultEdgeStyle,"endSize","14");g(k.defaultEdgeStyle,"startSize","14");d&&(g(k.defaultVertexStyle,"fontFamily",Editor.sketchFontFamily),g(k.defaultVertexStyle,"fontSource",Editor.sketchFontSource),g(k.defaultVertexStyle,"hachureGap","4"),g(k.defaultVertexStyle,"sketch","1"),g(k.defaultEdgeStyle,"fontFamily",Editor.sketchFontFamily),g(k.defaultEdgeStyle,"fontSource",Editor.sketchFontSource),g(k.defaultEdgeStyle, "sketch","1"),g(k.defaultEdgeStyle,"hachureGap","4"),g(k.defaultEdgeStyle,"sourcePerimeterSpacing","8"),g(k.defaultEdgeStyle,"targetPerimeterSpacing","8"));k.currentVertexStyle=mxUtils.clone(k.defaultVertexStyle);k.currentEdgeStyle=mxUtils.clone(k.defaultEdgeStyle);this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=function(d){var g=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var k=d.indexOf(",");0<k&&(g=this.getPageById(d.substring(k+1)),g=null!=g?g.getName(): mxResources.get("pageNotFound"))}else"data:"==d.substring(0,5)&&(g=mxResources.get("action"));return g};EditorUi.prototype.handleCustomLink=function(d){if(Graph.isPageLink(d)){var g=d.indexOf(",");if(d=this.getPageById(d.substring(g+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(d)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)}; @@ -11747,173 +11753,173 @@ EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Edito function(d,g){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,g){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor= mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",mxUtils.bind(this,function(d,g){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(d,g){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!= this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth); -mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,g,k){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(n,t){try{this.spinner.stop();var p=this.createImageDataUri(n,g,"png"),A=parseInt(t.getAttribute("width")),E=parseInt(t.getAttribute("height"));this.writeImageToClipboard(p,A,E,mxUtils.bind(this,function(y){this.handleError(y)}))}catch(y){this.handleError(y)}}),null,null,null,mxUtils.bind(this, -function(n){this.spinner.stop();this.handleError(n)}),null,null,null!=k?k:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(n){this.handleError(n)}};EditorUi.prototype.writeImageToClipboard=function(d,g,k,n){var t=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":t,"text/html":new Blob(['<img src="'+d+'" width="'+g+'" height="'+k+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](n)}; -EditorUi.prototype.copyCells=function(d,g){var k=this.editor.graph;if(k.isSelectionEmpty())d.innerText="";else{var n=mxUtils.sortCells(k.model.getTopmostCells(k.getSelectionCells())),t=mxUtils.getXml(k.encodeCells(n));mxUtils.setTextContent(d,encodeURIComponent(t));g?(k.removeCells(n,!1),k.lastPasteXml=null):(k.lastPasteXml=t,k.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var g=this.editor.graph; -g.isSelectionEmpty()||(d=mxUtils.sortCells(g.getExportableCells(g.model.getTopmostCells(g.getSelectionCells()))),g=mxUtils.getXml(g.encodeCells(d)),navigator.clipboard.writeText(g))}return d};EditorUi.prototype.pasteXml=function(d,g,k,n){var t=this.editor.graph,p=null;t.lastPasteXml==d?t.pasteCounter++:(t.lastPasteXml=d,t.pasteCounter=0);var A=t.pasteCounter*t.gridSize;if(k||this.isCompatibleString(d))p=this.importXml(d,A,A),t.setSelectionCells(p);else if(g&&1==t.getSelectionCount()){A=t.getStartEditingCell(t.getSelectionCell(), -n);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==t.getCurrentCellStyle(A)[mxConstants.STYLE_SHAPE])t.setCellStyles(mxConstants.STYLE_IMAGE,d,[A]);else{t.model.beginUpdate();try{t.labelChanged(A,d),Graph.isLink(d)&&t.setLinkForCell(A,d)}finally{t.model.endUpdate()}}t.setSelectionCell(A)}else p=t.getInsertPoint(),t.isMouseInsertPoint()&&(A=0,t.lastPasteXml==d&&0<t.pasteCounter&&t.pasteCounter--),p=this.insertTextAt(d,p.x+A,p.y+A,!0),t.setSelectionCells(p);t.isSelectionEmpty()||(t.scrollCellToVisible(t.getSelectionCell()), -null!=this.hoverIcons&&this.hoverIcons.update(t.view.getState(t.getSelectionCell())));return p};EditorUi.prototype.pasteCells=function(d,g,k,n){if(!mxEvent.isConsumed(d)){var t=g,p=!1;if(k&&null!=d.clipboardData&&d.clipboardData.getData){var A=d.clipboardData.getData("text/plain"),E=!1;if(null!=A&&0<A.length&&"%3CmxGraphModel%3E"==A.substring(0,18))try{var y=decodeURIComponent(A);this.isCompatibleString(y)&&(E=!0,A=y)}catch(G){}E=E?null:d.clipboardData.getData("text/html");null!=E&&0<E.length?(t= -this.parseHtmlData(E),p="text/plain"!=t.getAttribute("data-type")):null!=A&&0<A.length&&(t=document.createElement("div"),mxUtils.setTextContent(t,E))}A=t.getElementsByTagName("span");if(null!=A&&0<A.length&&"application/vnd.lucid.chart.objects"===A[0].getAttribute("data-lucid-type"))k=A[0].getAttribute("data-lucid-content"),null!=k&&0<k.length&&(this.convertLucidChart(k,mxUtils.bind(this,function(G){var H=this.editor.graph;H.lastPasteXml==G?H.pasteCounter++:(H.lastPasteXml=G,H.pasteCounter=0);var M= -H.pasteCounter*H.gridSize;H.setSelectionCells(this.importXml(G,M,M));H.scrollCellToVisible(H.getSelectionCell())}),mxUtils.bind(this,function(G){this.handleError(G)})),mxEvent.consume(d));else{var B=p?t.innerHTML:mxUtils.trim(null==t.innerText?mxUtils.getTextContent(t):t.innerText),J=!1;try{var N=B.lastIndexOf("%3E");0<=N&&N<B.length-3&&(B=B.substring(0,N+3))}catch(G){}try{A=t.getElementsByTagName("span"),(y=null!=A&&0<A.length?mxUtils.trim(decodeURIComponent(A[0].textContent)):decodeURIComponent(B))&& -(this.isCompatibleString(y)||0==y.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(J=!0,B=y)}catch(G){}try{if(null!=B&&0<B.length){if(0==B.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var v=mxUtils.bind(this,function(){try{B=(new MiroImporter).importMiroJson(JSON.parse(B)),this.pasteXml(B,n,J,d)}catch(G){console.log("Miro import error:",G)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",v):v()}else this.pasteXml(B,n,J,d);try{mxEvent.consume(d)}catch(G){}}else if(!k){var u= +mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,g,k){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(n,q){try{this.spinner.stop();var p=this.createImageDataUri(n,g,"png"),A=parseInt(q.getAttribute("width")),E=parseInt(q.getAttribute("height"));this.writeImageToClipboard(p,A,E,mxUtils.bind(this,function(z){this.handleError(z)}))}catch(z){this.handleError(z)}}),null,null,null,mxUtils.bind(this, +function(n){this.spinner.stop();this.handleError(n)}),null,null,null!=k?k:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(n){this.handleError(n)}};EditorUi.prototype.writeImageToClipboard=function(d,g,k,n){var q=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":q,"text/html":new Blob(['<img src="'+d+'" width="'+g+'" height="'+k+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](n)}; +EditorUi.prototype.copyCells=function(d,g){var k=this.editor.graph;if(k.isSelectionEmpty())d.innerText="";else{var n=mxUtils.sortCells(k.model.getTopmostCells(k.getSelectionCells())),q=mxUtils.getXml(k.encodeCells(n));mxUtils.setTextContent(d,encodeURIComponent(q));g?(k.removeCells(n,!1),k.lastPasteXml=null):(k.lastPasteXml=q,k.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var g=this.editor.graph; +g.isSelectionEmpty()||(d=mxUtils.sortCells(g.getExportableCells(g.model.getTopmostCells(g.getSelectionCells()))),g=mxUtils.getXml(g.encodeCells(d)),navigator.clipboard.writeText(g))}return d};EditorUi.prototype.pasteXml=function(d,g,k,n){var q=this.editor.graph,p=null;q.lastPasteXml==d?q.pasteCounter++:(q.lastPasteXml=d,q.pasteCounter=0);var A=q.pasteCounter*q.gridSize;if(k||this.isCompatibleString(d))p=this.importXml(d,A,A),q.setSelectionCells(p);else if(g&&1==q.getSelectionCount()){A=q.getStartEditingCell(q.getSelectionCell(), +n);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==q.getCurrentCellStyle(A)[mxConstants.STYLE_SHAPE])q.setCellStyles(mxConstants.STYLE_IMAGE,d,[A]);else{q.model.beginUpdate();try{q.labelChanged(A,d),Graph.isLink(d)&&q.setLinkForCell(A,d)}finally{q.model.endUpdate()}}q.setSelectionCell(A)}else p=q.getInsertPoint(),q.isMouseInsertPoint()&&(A=0,q.lastPasteXml==d&&0<q.pasteCounter&&q.pasteCounter--),p=this.insertTextAt(d,p.x+A,p.y+A,!0),q.setSelectionCells(p);q.isSelectionEmpty()||(q.scrollCellToVisible(q.getSelectionCell()), +null!=this.hoverIcons&&this.hoverIcons.update(q.view.getState(q.getSelectionCell())));return p};EditorUi.prototype.pasteCells=function(d,g,k,n){if(!mxEvent.isConsumed(d)){var q=g,p=!1;if(k&&null!=d.clipboardData&&d.clipboardData.getData){var A=d.clipboardData.getData("text/plain"),E=!1;if(null!=A&&0<A.length&&"%3CmxGraphModel%3E"==A.substring(0,18))try{var z=decodeURIComponent(A);this.isCompatibleString(z)&&(E=!0,A=z)}catch(G){}E=E?null:d.clipboardData.getData("text/html");null!=E&&0<E.length?(q= +this.parseHtmlData(E),p="text/plain"!=q.getAttribute("data-type")):null!=A&&0<A.length&&(q=document.createElement("div"),mxUtils.setTextContent(q,E))}A=q.getElementsByTagName("span");if(null!=A&&0<A.length&&"application/vnd.lucid.chart.objects"===A[0].getAttribute("data-lucid-type"))k=A[0].getAttribute("data-lucid-content"),null!=k&&0<k.length&&(this.convertLucidChart(k,mxUtils.bind(this,function(G){var I=this.editor.graph;I.lastPasteXml==G?I.pasteCounter++:(I.lastPasteXml=G,I.pasteCounter=0);var F= +I.pasteCounter*I.gridSize;I.setSelectionCells(this.importXml(G,F,F));I.scrollCellToVisible(I.getSelectionCell())}),mxUtils.bind(this,function(G){this.handleError(G)})),mxEvent.consume(d));else{var B=p?q.innerHTML:mxUtils.trim(null==q.innerText?mxUtils.getTextContent(q):q.innerText),J=!1;try{var M=B.lastIndexOf("%3E");0<=M&&M<B.length-3&&(B=B.substring(0,M+3))}catch(G){}try{A=q.getElementsByTagName("span"),(z=null!=A&&0<A.length?mxUtils.trim(decodeURIComponent(A[0].textContent)):decodeURIComponent(B))&& +(this.isCompatibleString(z)||0==z.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(J=!0,B=z)}catch(G){}try{if(null!=B&&0<B.length){if(0==B.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var v=mxUtils.bind(this,function(){try{B=(new MiroImporter).importMiroJson(JSON.parse(B)),this.pasteXml(B,n,J,d)}catch(G){console.log("Miro import error:",G)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",v):v()}else this.pasteXml(B,n,J,d);try{mxEvent.consume(d)}catch(G){}}else if(!k){var u= this.editor.graph;u.lastPasteXml=null;u.pasteCounter=0}}catch(G){this.handleError(G)}}}g.innerHTML=" "};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var g=null,k=0;k<d.length;k++)mxEvent.addListener(d[k],"dragleave",function(n){null!=g&&(g.parentNode.removeChild(g),g=null);n.stopPropagation();n.preventDefault()}),mxEvent.addListener(d[k],"dragover",mxUtils.bind(this,function(n){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==g&&(!mxClient.IS_IE||10< document.documentMode&&12>document.documentMode)&&(g=this.highlightElement());n.stopPropagation();n.preventDefault()})),mxEvent.addListener(d[k],"drop",mxUtils.bind(this,function(n){null!=g&&(g.parentNode.removeChild(g),g=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<n.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(n.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(n)&&!mxEvent.isShiftDown(n)):this.openFiles(n.dataTransfer.files, -!0);else{var t=this.extractGraphModelFromEvent(n);if(null==t){var p=null!=n.dataTransfer?n.dataTransfer:n.clipboardData;null!=p&&(10==document.documentMode||11==document.documentMode?t=p.getData("Text"):(t=null,t=0<=mxUtils.indexOf(p.types,"text/uri-list")?n.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(p.types,"text/html")?p.getData("text/html"):null,null!=t&&0<t.length?(p=document.createElement("div"),p.innerHTML=this.editor.graph.sanitizeHtml(t),p=p.getElementsByTagName("img"),0<p.length&& -(t=p[0].getAttribute("src"))):0<=mxUtils.indexOf(p.types,"text/plain")&&(t=p.getData("text/plain"))),null!=t&&(Editor.isPngDataUrl(t)?(t=Editor.extractGraphModelFromPng(t),null!=t&&0<t.length&&this.openLocalFile(t,null,!0)):this.isRemoteFileFormat(t)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(t))).send(mxUtils.bind(this,function(A){200<=A.getStatus()&&299>=A.getStatus()&&this.openLocalFile(A.getText(), -null,!0)})):/^https?:\/\//.test(t)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(t):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(t)))))}else this.openLocalFile(t,null,!0)}n.stopPropagation();n.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var g=0,k=0;if(null==d){var n=document.body;var t=document.documentElement;var p=(n.clientWidth||t.clientWidth)-3;n= -Math.max(n.clientHeight||0,t.clientHeight)-3}else g=d.offsetTop,k=d.offsetLeft,p=d.clientWidth,n=d.clientHeight;t=document.createElement("div");t.style.zIndex=mxPopupMenu.prototype.zIndex+2;t.style.border="3px dotted rgb(254, 137, 12)";t.style.pointerEvents="none";t.style.position="absolute";t.style.top=g+"px";t.style.left=k+"px";t.style.width=Math.max(0,p-3)+"px";t.style.height=Math.max(0,n-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(t):document.body.appendChild(t); -return t};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var g=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=g){var k=new mxCodec(g.ownerDocument),n=new mxGraphModel;k.decode(g,n);g=n.getChildAt(n.getRoot(),0);for(k=0;k<n.getChildCount(g);k++)d.push(n.getChildAt(g,k))}return d};EditorUi.prototype.openFileHandle=function(d,g,k,n,t){if(null!=g&&0<g.length){!this.useCanvasForExport&&/(\.png)$/i.test(g)?g=g.substring(0,g.length-4)+".drawio":/(\.pdf)$/i.test(g)&&(g= -g.substring(0,g.length-4)+".drawio");var p=mxUtils.bind(this,function(E){g=0<=g.lastIndexOf(".")?g.substring(0,g.lastIndexOf("."))+".drawio":g+".drawio";if("<mxlibrary"==E.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,n);try{this.loadLibrary(new LocalLibrary(this,E,g))}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(E,g,n)});if(/(\.v(dx|sdx?))($|\?)/i.test(g)||/(\.vs(x|sx?))($|\?)/i.test(g))this.importVisio(k, +!0);else{var q=this.extractGraphModelFromEvent(n);if(null==q){var p=null!=n.dataTransfer?n.dataTransfer:n.clipboardData;null!=p&&(10==document.documentMode||11==document.documentMode?q=p.getData("Text"):(q=null,q=0<=mxUtils.indexOf(p.types,"text/uri-list")?n.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(p.types,"text/html")?p.getData("text/html"):null,null!=q&&0<q.length?(p=document.createElement("div"),p.innerHTML=this.editor.graph.sanitizeHtml(q),p=p.getElementsByTagName("img"),0<p.length&& +(q=p[0].getAttribute("src"))):0<=mxUtils.indexOf(p.types,"text/plain")&&(q=p.getData("text/plain"))),null!=q&&(Editor.isPngDataUrl(q)?(q=Editor.extractGraphModelFromPng(q),null!=q&&0<q.length&&this.openLocalFile(q,null,!0)):this.isRemoteFileFormat(q)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(q))).send(mxUtils.bind(this,function(A){200<=A.getStatus()&&299>=A.getStatus()&&this.openLocalFile(A.getText(), +null,!0)})):/^https?:\/\//.test(q)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(q):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(q)))))}else this.openLocalFile(q,null,!0)}n.stopPropagation();n.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var g=0,k=0;if(null==d){var n=document.body;var q=document.documentElement;var p=(n.clientWidth||q.clientWidth)-3;n= +Math.max(n.clientHeight||0,q.clientHeight)-3}else g=d.offsetTop,k=d.offsetLeft,p=d.clientWidth,n=d.clientHeight;q=document.createElement("div");q.style.zIndex=mxPopupMenu.prototype.zIndex+2;q.style.border="3px dotted rgb(254, 137, 12)";q.style.pointerEvents="none";q.style.position="absolute";q.style.top=g+"px";q.style.left=k+"px";q.style.width=Math.max(0,p-3)+"px";q.style.height=Math.max(0,n-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(q):document.body.appendChild(q); +return q};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var g=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=g){var k=new mxCodec(g.ownerDocument),n=new mxGraphModel;k.decode(g,n);g=n.getChildAt(n.getRoot(),0);for(k=0;k<n.getChildCount(g);k++)d.push(n.getChildAt(g,k))}return d};EditorUi.prototype.openFileHandle=function(d,g,k,n,q){if(null!=g&&0<g.length){!this.useCanvasForExport&&/(\.png)$/i.test(g)?g=g.substring(0,g.length-4)+".drawio":/(\.pdf)$/i.test(g)&&(g= +g.substring(0,g.length-4)+".drawio");var p=mxUtils.bind(this,function(E){g=0<=g.lastIndexOf(".")?g.substring(0,g.lastIndexOf("."))+".drawio":g+".drawio";if("<mxlibrary"==E.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,n);try{this.loadLibrary(new LocalLibrary(this,E,g))}catch(z){this.handleError(z,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(E,g,n)});if(/(\.v(dx|sdx?))($|\?)/i.test(g)||/(\.vs(x|sx?))($|\?)/i.test(g))this.importVisio(k, mxUtils.bind(this,function(E){this.spinner.stop();p(E)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(E){this.spinner.stop();p(E)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,g))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(k,mxUtils.bind(this,function(E){4==E.readyState&&(this.spinner.stop(),200<=E.status&&299>=E.status?p(E.responseText):this.handleError({message:mxResources.get(413== E.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(g)&&(g=g.substring(0,g.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(E){this.spinner.stop();this.openLocalFile(E,g,n)}),mxUtils.bind(this,function(E){this.spinner.stop();this.handleError(E)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml, -this.defaultFilename,n);try{this.loadLibrary(new LocalLibrary(this,d,k.name))}catch(E){this.handleError(E,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(k,mxUtils.bind(this,function(E){this.spinner.stop();p(E)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,g,n)}));else{if("image/png"==k.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==k.type){var A=Editor.extractGraphModelFromPdf(d);null!=A&&(t=null,n=!0, -d=A)}this.spinner.stop();this.openLocalFile(d,g,n,t,null!=t?k:null)}}};EditorUi.prototype.openFiles=function(d,g){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var k=0;k<d.length;k++)mxUtils.bind(this,function(n){var t=new FileReader;t.onload=mxUtils.bind(this,function(p){try{this.openFileHandle(p.target.result,n.name,n,g)}catch(A){this.handleError(A)}});t.onerror=mxUtils.bind(this,function(p){this.spinner.stop();this.handleError(p);window.openFile=null});"image"!==n.type.substring(0, -5)&&"application/pdf"!==n.type||"image/svg"===n.type.substring(0,9)?t.readAsText(n):t.readAsDataURL(n)})(d[k])};EditorUi.prototype.openLocalFile=function(d,g,k,n,t){var p=this.getCurrentFile(),A=mxUtils.bind(this,function(){window.openFile=null;if(null==g&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var E=mxUtils.parseXml(d);null!=E&&(this.editor.setGraphXml(E.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,d,g||this.defaultFilename,k,n,t))});if(null!= +this.defaultFilename,n);try{this.loadLibrary(new LocalLibrary(this,d,k.name))}catch(E){this.handleError(E,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(k,mxUtils.bind(this,function(E){this.spinner.stop();p(E)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,g,n)}));else{if("image/png"==k.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==k.type){var A=Editor.extractGraphModelFromPdf(d);null!=A&&(q=null,n=!0, +d=A)}this.spinner.stop();this.openLocalFile(d,g,n,q,null!=q?k:null)}}};EditorUi.prototype.openFiles=function(d,g){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var k=0;k<d.length;k++)mxUtils.bind(this,function(n){var q=new FileReader;q.onload=mxUtils.bind(this,function(p){try{this.openFileHandle(p.target.result,n.name,n,g)}catch(A){this.handleError(A)}});q.onerror=mxUtils.bind(this,function(p){this.spinner.stop();this.handleError(p);window.openFile=null});"image"!==n.type.substring(0, +5)&&"application/pdf"!==n.type||"image/svg"===n.type.substring(0,9)?q.readAsText(n):q.readAsDataURL(n)})(d[k])};EditorUi.prototype.openLocalFile=function(d,g,k,n,q){var p=this.getCurrentFile(),A=mxUtils.bind(this,function(){window.openFile=null;if(null==g&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var E=mxUtils.parseXml(d);null!=E&&(this.editor.setGraphXml(E.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,d,g||this.defaultFilename,k,n,q))});if(null!= d&&0<d.length)null==p||!p.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=n)?A():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=n)&&null!=p&&p.isModified()?this.confirm(mxResources.get("allChangesLost"),null,A,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,g),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=p&&p.isModified()?this.confirm(mxResources.get("allChangesLost"), null,A,mxResources.get("cancel"),mxResources.get("discardChanges")):A()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var g=0;g<this.pages.length;g++)this.updatePageRoot(this.pages[g]),this.addBasenamesForCell(this.pages[g].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);g=[];for(var k in d)g.push(k);return g};EditorUi.prototype.addBasenamesForCell=function(d,g){function k(A){if(null!= -A){var E=A.lastIndexOf(".");0<E&&(A=A.substring(E+1,A.length));null==g[A]&&(g[A]=!0)}}var n=this.editor.graph,t=n.getCellStyle(d);k(mxStencilRegistry.getBasenameForStencil(t[mxConstants.STYLE_SHAPE]));n.model.isEdge(d)&&(k(mxMarker.getPackageForType(t[mxConstants.STYLE_STARTARROW])),k(mxMarker.getPackageForType(t[mxConstants.STYLE_ENDARROW])));t=n.model.getChildCount(d);for(var p=0;p<t;p++)this.addBasenamesForCell(n.model.getChildAt(d,p),g)};EditorUi.prototype.setGraphEnabled=function(d){this.diagramContainer.style.visibility= +A){var E=A.lastIndexOf(".");0<E&&(A=A.substring(E+1,A.length));null==g[A]&&(g[A]=!0)}}var n=this.editor.graph,q=n.getCellStyle(d);k(mxStencilRegistry.getBasenameForStencil(q[mxConstants.STYLE_SHAPE]));n.model.isEdge(d)&&(k(mxMarker.getPackageForType(q[mxConstants.STYLE_STARTARROW])),k(mxMarker.getPackageForType(q[mxConstants.STYLE_ENDARROW])));q=n.model.getChildCount(d);for(var p=0;p<q;p++)this.addBasenamesForCell(n.model.getChildAt(d,p),g)};EditorUi.prototype.setGraphEnabled=function(d){this.diagramContainer.style.visibility= d?"":"hidden";this.formatContainer.style.visibility=d?"":"hidden";this.sidebarFooterContainer.style.display=d?"":"none";this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=d?"":"none";this.editor.graph.setEnabled(d);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=d?"":"hidden",this.ruler.vRuler.container.style.visibility=d?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=d?"":"hidden");d||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1), null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d= -!1;this.installMessageHandler(mxUtils.bind(this,function(g,k,n,t){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==g||0==g.length)g=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,g,{}));this.mode=App.MODE_EMBED;this.setFileData(g);if(t)try{var p=this.editor.graph;p.setGridEnabled(!1);p.pageVisible=!1;var A=p.model.cells,E;for(E in A){var y=A[E];null!=y&&null!=y.style&&(y.style+=";sketch=1;"+(-1==y.style.indexOf("fontFamily=")||-1<y.style.indexOf("fontFamily=Helvetica;")? +!1;this.installMessageHandler(mxUtils.bind(this,function(g,k,n,q){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==g||0==g.length)g=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,g,{}));this.mode=App.MODE_EMBED;this.setFileData(g);if(q)try{var p=this.editor.graph;p.setGridEnabled(!1);p.pageVisible=!1;var A=p.model.cells,E;for(E in A){var z=A[E];null!=z&&null!=z.style&&(z.style+=";sketch=1;"+(-1==z.style.indexOf("fontFamily=")||-1<z.style.indexOf("fontFamily=Helvetica;")? "fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(B){console.log(B)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=n?n:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog= function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(d,g){null!=d?d.getPublicUrl(g):g(null)};EditorUi.prototype.createLoadMessage=function(d){var g=this.editor.graph;return{event:d,pageVisible:g.pageVisible,translate:g.view.translate,bounds:g.getGraphBounds(),currentPage:this.getSelectedPageIndex(), -scale:g.view.scale,page:g.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(d){var g=this.editor.graph;g.isEditing()&&g.stopEditing(!g.isInvokesStopCellEditing());var k=window.opener||window.parent;if(this.editor.modified){var n=g.background;if(null==n||n==mxConstants.NONE)n=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),g,null,!0,mxUtils.bind(this,function(t){k.postMessage(JSON.stringify({event:"export", -point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(t)}),"*")}),null,null,!0,n,1,this.embedExportBorder)}else d||k.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,g.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler= -function(d){var g=null,k=!1,n=!1,t=null,p=mxUtils.bind(this,function(y,B){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,p);mxEvent.addListener(window,"message",mxUtils.bind(this,function(y){if(y.source==(window.opener||window.parent)){var B=y.data,J=null,N=mxUtils.bind(this,function(Y){if(null!=Y&&"function"===typeof Y.charAt&& -"<"!=Y.charAt(0))try{Editor.isPngDataUrl(Y)?Y=Editor.extractGraphModelFromPng(Y):"data:image/svg+xml;base64,"==Y.substring(0,26)?Y=atob(Y.substring(26)):"data:image/svg+xml;utf8,"==Y.substring(0,24)&&(Y=Y.substring(24)),null!=Y&&("%"==Y.charAt(0)?Y=decodeURIComponent(Y):"<"!=Y.charAt(0)&&(Y=Graph.decompress(Y)))}catch(Z){}return Y});if("json"==urlParams.proto){var v=!1;try{B=JSON.parse(B),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[y],"data",[B])}catch(Y){B=null}try{if(null==B)return; +scale:g.view.scale,page:g.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(d){var g=this.editor.graph;g.isEditing()&&g.stopEditing(!g.isInvokesStopCellEditing());var k=window.opener||window.parent;if(this.editor.modified){var n=g.background;if(null==n||n==mxConstants.NONE)n=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),g,null,!0,mxUtils.bind(this,function(q){k.postMessage(JSON.stringify({event:"export", +point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(q)}),"*")}),null,null,!0,n,1,this.embedExportBorder)}else d||k.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,g.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler= +function(d){var g=null,k=!1,n=!1,q=null,p=mxUtils.bind(this,function(z,B){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,p);mxEvent.addListener(window,"message",mxUtils.bind(this,function(z){if(z.source==(window.opener||window.parent)){var B=z.data,J=null,M=mxUtils.bind(this,function(Y){if(null!=Y&&"function"===typeof Y.charAt&& +"<"!=Y.charAt(0))try{Editor.isPngDataUrl(Y)?Y=Editor.extractGraphModelFromPng(Y):"data:image/svg+xml;base64,"==Y.substring(0,26)?Y=atob(Y.substring(26)):"data:image/svg+xml;utf8,"==Y.substring(0,24)&&(Y=Y.substring(24)),null!=Y&&("%"==Y.charAt(0)?Y=decodeURIComponent(Y):"<"!=Y.charAt(0)&&(Y=Graph.decompress(Y)))}catch(Z){}return Y});if("json"==urlParams.proto){var v=!1;try{B=JSON.parse(B),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[z],"data",[B])}catch(Y){B=null}try{if(null==B)return; if("dialog"==B.action){this.showError(null!=B.titleKey?mxResources.get(B.titleKey):B.title,null!=B.messageKey?mxResources.get(B.messageKey):B.message,null!=B.buttonKey?mxResources.get(B.buttonKey):B.button);null!=B.modified&&(this.editor.modified=B.modified);return}if("layout"==B.action){this.executeLayouts(this.editor.graph.createLayouts(B.layouts));return}if("prompt"==B.action){this.spinner.stop();var u=new FilenameDialog(this,B.defaultValue||"",null!=B.okKey?mxResources.get(B.okKey):B.ok,function(Y){null!= -Y?A.postMessage(JSON.stringify({event:"prompt",value:Y,message:B}),"*"):A.postMessage(JSON.stringify({event:"prompt-cancel",message:B}),"*")},null!=B.titleKey?mxResources.get(B.titleKey):B.title);this.showDialog(u.container,300,80,!0,!1);u.init();return}if("draft"==B.action){var G=N(B.xml);this.spinner.stop();u=new DraftDialog(this,mxResources.get("draftFound",[B.name||this.defaultFilename]),G,mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"edit", +Y?A.postMessage(JSON.stringify({event:"prompt",value:Y,message:B}),"*"):A.postMessage(JSON.stringify({event:"prompt-cancel",message:B}),"*")},null!=B.titleKey?mxResources.get(B.titleKey):B.title);this.showDialog(u.container,300,80,!0,!1);u.init();return}if("draft"==B.action){var G=M(B.xml);this.spinner.stop();u=new DraftDialog(this,mxResources.get("draftFound",[B.name||this.defaultFilename]),G,mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"edit", message:B}),"*")}),mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"discard",message:B}),"*")}),B.editKey?mxResources.get(B.editKey):null,B.discardKey?mxResources.get(B.discardKey):null,B.ignore?mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"ignore",message:B}),"*")}):null);this.showDialog(u.container,640,480,!0,!1,mxUtils.bind(this,function(Y){Y&&this.actions.get("exit").funct()}));try{u.init()}catch(Y){A.postMessage(JSON.stringify({event:"draft", -error:Y.toString(),message:B}),"*")}return}if("template"==B.action){this.spinner.stop();var H=1==B.enableRecent,M=1==B.enableSearch,K=1==B.enableCustomTemp;if("1"==urlParams.newTempDlg&&!B.templatesOnly&&null!=B.callback){var I=this.getCurrentUser(),F=new TemplatesDialog(this,function(Y,Z,ba){Y=Y||this.emptyDiagramXml;A.postMessage(JSON.stringify({event:"template",xml:Y,blank:Y==this.emptyDiagramXml,name:Z,tempUrl:ba.url,libs:ba.libs,builtIn:null!=ba.info&&null!=ba.info.custContentId,message:B}), -"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=I?I.id:null,H?mxUtils.bind(this,function(Y,Z,ba){this.remoteInvoke("getRecentDiagrams",[ba],null,Y,Z)}):null,M?mxUtils.bind(this,function(Y,Z,ba,fa){this.remoteInvoke("searchDiagrams",[Y,fa],null,Z,ba)}):null,mxUtils.bind(this,function(Y,Z,ba){this.remoteInvoke("getFileContent",[Y.url],null,Z,ba)}),null,K?mxUtils.bind(this,function(Y){this.remoteInvoke("getCustomTemplates",null,null,Y,function(){Y({},0)})}):null, -!1,!1,!0,!0);this.showDialog(F.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}u=new NewDialog(this,!1,B.templatesOnly?!1:null!=B.callback,mxUtils.bind(this,function(Y,Z,ba,fa){Y=Y||this.emptyDiagramXml;null!=B.callback?A.postMessage(JSON.stringify({event:"template",xml:Y,blank:Y==this.emptyDiagramXml,name:Z,tempUrl:ba,libs:fa,builtIn:!0,message:B}),"*"):(d(Y,y,Y!=this.emptyDiagramXml,B.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null, -null,H?mxUtils.bind(this,function(Y){this.remoteInvoke("getRecentDiagrams",[null],null,Y,function(){Y(null,"Network Error!")})}):null,M?mxUtils.bind(this,function(Y,Z){this.remoteInvoke("searchDiagrams",[Y,null],null,Z,function(){Z(null,"Network Error!")})}):null,mxUtils.bind(this,function(Y,Z,ba){A.postMessage(JSON.stringify({event:"template",docUrl:Y,info:Z,name:ba}),"*")}),null,null,K?mxUtils.bind(this,function(Y){this.remoteInvoke("getCustomTemplates",null,null,Y,function(){Y({},0)})}):null,1== -B.withoutType);this.showDialog(u.container,620,460,!0,!1,mxUtils.bind(this,function(Y){this.sidebar.hideTooltip();Y&&this.actions.get("exit").funct()}));u.init();return}if("textContent"==B.action){var P=this.getDiagramTextContent();A.postMessage(JSON.stringify({event:"textContent",data:P,message:B}),"*");return}if("status"==B.action){null!=B.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(B.messageKey))):null!=B.message&&this.editor.setStatus(mxUtils.htmlEntities(B.message)); +error:Y.toString(),message:B}),"*")}return}if("template"==B.action){this.spinner.stop();var I=1==B.enableRecent,F=1==B.enableSearch,L=1==B.enableCustomTemp;if("1"==urlParams.newTempDlg&&!B.templatesOnly&&null!=B.callback){var K=this.getCurrentUser(),H=new TemplatesDialog(this,function(Y,Z,ba){Y=Y||this.emptyDiagramXml;A.postMessage(JSON.stringify({event:"template",xml:Y,blank:Y==this.emptyDiagramXml,name:Z,tempUrl:ba.url,libs:ba.libs,builtIn:null!=ba.info&&null!=ba.info.custContentId,message:B}), +"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=K?K.id:null,I?mxUtils.bind(this,function(Y,Z,ba){this.remoteInvoke("getRecentDiagrams",[ba],null,Y,Z)}):null,F?mxUtils.bind(this,function(Y,Z,ba,ea){this.remoteInvoke("searchDiagrams",[Y,ea],null,Z,ba)}):null,mxUtils.bind(this,function(Y,Z,ba){this.remoteInvoke("getFileContent",[Y.url],null,Z,ba)}),null,L?mxUtils.bind(this,function(Y){this.remoteInvoke("getCustomTemplates",null,null,Y,function(){Y({},0)})}):null, +!1,!1,!0,!0);this.showDialog(H.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}u=new NewDialog(this,!1,B.templatesOnly?!1:null!=B.callback,mxUtils.bind(this,function(Y,Z,ba,ea){Y=Y||this.emptyDiagramXml;null!=B.callback?A.postMessage(JSON.stringify({event:"template",xml:Y,blank:Y==this.emptyDiagramXml,name:Z,tempUrl:ba,libs:ea,builtIn:!0,message:B}),"*"):(d(Y,z,Y!=this.emptyDiagramXml,B.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null, +null,I?mxUtils.bind(this,function(Y){this.remoteInvoke("getRecentDiagrams",[null],null,Y,function(){Y(null,"Network Error!")})}):null,F?mxUtils.bind(this,function(Y,Z){this.remoteInvoke("searchDiagrams",[Y,null],null,Z,function(){Z(null,"Network Error!")})}):null,mxUtils.bind(this,function(Y,Z,ba){A.postMessage(JSON.stringify({event:"template",docUrl:Y,info:Z,name:ba}),"*")}),null,null,L?mxUtils.bind(this,function(Y){this.remoteInvoke("getCustomTemplates",null,null,Y,function(){Y({},0)})}):null,1== +B.withoutType);this.showDialog(u.container,620,460,!0,!1,mxUtils.bind(this,function(Y){this.sidebar.hideTooltip();Y&&this.actions.get("exit").funct()}));u.init();return}if("textContent"==B.action){var Q=this.getDiagramTextContent();A.postMessage(JSON.stringify({event:"textContent",data:Q,message:B}),"*");return}if("status"==B.action){null!=B.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(B.messageKey))):null!=B.message&&this.editor.setStatus(mxUtils.htmlEntities(B.message)); null!=B.modified&&(this.editor.modified=B.modified);return}if("spinner"==B.action){var U=null!=B.messageKey?mxResources.get(B.messageKey):B.message;null==B.show||B.show?this.spinner.spin(document.body,U):this.spinner.stop();return}if("exit"==B.action){this.actions.get("exit").funct();return}if("viewport"==B.action){null!=B.viewport&&(this.embedViewport=B.viewport);return}if("snapshot"==B.action){this.sendEmbeddedSvgExport(!0);return}if("export"==B.action){if("png"==B.format||"xmlpng"==B.format){if(null== -B.spin&&null==B.spinKey||this.spinner.spin(document.body,null!=B.spinKey?mxResources.get(B.spinKey):B.spin)){var T=null!=B.xml?B.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var V=this.editor.graph,W=mxUtils.bind(this,function(Y){this.editor.graph.setEnabled(!0);this.spinner.stop();var Z=this.createLoadMessage("export");Z.format=B.format;Z.message=B;Z.data=Y;Z.xml=T;A.postMessage(JSON.stringify(Z),"*")}),q=mxUtils.bind(this,function(Y){null==Y&&(Y=Editor.blankImage);"xmlpng"==B.format&& -(Y=Editor.writeGraphModelToPng(Y,"tEXt","mxfile",encodeURIComponent(T)));V!=this.editor.graph&&V.container.parentNode.removeChild(V.container);W(Y)}),D=B.pageId||(null!=this.pages?B.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var L=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=D){var Y=V.getGlobalVariable;V=this.createTemporaryGraph(V.getStylesheet());for(var Z,ba=0;ba<this.pages.length;ba++)if(this.pages[ba].getId()== -D){Z=this.updatePageRoot(this.pages[ba]);break}null==Z&&(Z=this.currentPage);V.getGlobalVariable=function(ra){return"page"==ra?Z.getName():"pagenumber"==ra?1:Y.apply(this,arguments)};document.body.appendChild(V.container);V.model.setRoot(Z.root)}if(null!=B.layerIds){var fa=V.model,ka=fa.getChildCells(fa.getRoot()),ha={};for(ba=0;ba<B.layerIds.length;ba++)ha[B.layerIds[ba]]=!0;for(ba=0;ba<ka.length;ba++)fa.setVisible(ka[ba],ha[ka[ba].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(ra){q(ra.toDataURL("image/png"))}), -B.width,null,B.background,mxUtils.bind(this,function(){q(null)}),null,null,B.scale,B.transparent,B.shadow,null,V,B.border,null,B.grid,B.keepTheme)});null!=B.xml&&0<B.xml.length&&(k=!0,this.setFileData(T),k=!1);L()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==B.format?"1":"0")+(null!=D?"&pageId="+D:"")+(null!=B.layerIds&&0<B.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:B.layerIds})):"")+(null!=B.scale?"&scale="+B.scale:"")+"&base64=1&xml="+encodeURIComponent(T))).send(mxUtils.bind(this, -function(Y){200<=Y.getStatus()&&299>=Y.getStatus()?W("data:image/png;base64,"+Y.getText()):q(null)}),mxUtils.bind(this,function(){q(null)}))}}else if(L=mxUtils.bind(this,function(){var Y=this.createLoadMessage("export");Y.message=B;if("html2"==B.format||"html"==B.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Z=this.getXmlFileData();Y.xml=mxUtils.getXml(Z);Y.data=this.getFileData(null,null,!0,null,null,null,Z);Y.format=B.format}else if("html"==B.format)Z=this.editor.getGraphXml(), -Y.data=this.getHtml(Z,this.editor.graph),Y.xml=mxUtils.getXml(Z),Y.format=B.format;else{mxSvgCanvas2D.prototype.foAltText=null;Z=null!=B.background?B.background:this.editor.graph.background;Z==mxConstants.NONE&&(Z=null);Y.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);Y.format="svg";var ba=mxUtils.bind(this,function(fa){this.editor.graph.setEnabled(!0);this.spinner.stop();Y.data=Editor.createSvgDataUri(fa);A.postMessage(JSON.stringify(Y),"*")});if("xmlsvg"==B.format)(null==B.spin&& +B.spin&&null==B.spinKey||this.spinner.spin(document.body,null!=B.spinKey?mxResources.get(B.spinKey):B.spin)){var T=null!=B.xml?B.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var V=this.editor.graph,W=mxUtils.bind(this,function(Y){this.editor.graph.setEnabled(!0);this.spinner.stop();var Z=this.createLoadMessage("export");Z.format=B.format;Z.message=B;Z.data=Y;Z.xml=T;A.postMessage(JSON.stringify(Z),"*")}),t=mxUtils.bind(this,function(Y){null==Y&&(Y=Editor.blankImage);"xmlpng"==B.format&& +(Y=Editor.writeGraphModelToPng(Y,"tEXt","mxfile",encodeURIComponent(T)));V!=this.editor.graph&&V.container.parentNode.removeChild(V.container);W(Y)}),C=B.pageId||(null!=this.pages?B.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var N=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=C){var Y=V.getGlobalVariable;V=this.createTemporaryGraph(V.getStylesheet());for(var Z,ba=0;ba<this.pages.length;ba++)if(this.pages[ba].getId()== +C){Z=this.updatePageRoot(this.pages[ba]);break}null==Z&&(Z=this.currentPage);V.getGlobalVariable=function(pa){return"page"==pa?Z.getName():"pagenumber"==pa?1:Y.apply(this,arguments)};document.body.appendChild(V.container);V.model.setRoot(Z.root)}if(null!=B.layerIds){var ea=V.model,ma=ea.getChildCells(ea.getRoot()),ia={};for(ba=0;ba<B.layerIds.length;ba++)ia[B.layerIds[ba]]=!0;for(ba=0;ba<ma.length;ba++)ea.setVisible(ma[ba],ia[ma[ba].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(pa){t(pa.toDataURL("image/png"))}), +B.width,null,B.background,mxUtils.bind(this,function(){t(null)}),null,null,B.scale,B.transparent,B.shadow,null,V,B.border,null,B.grid,B.keepTheme)});null!=B.xml&&0<B.xml.length&&(k=!0,this.setFileData(T),k=!1);N()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==B.format?"1":"0")+(null!=C?"&pageId="+C:"")+(null!=B.layerIds&&0<B.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:B.layerIds})):"")+(null!=B.scale?"&scale="+B.scale:"")+"&base64=1&xml="+encodeURIComponent(T))).send(mxUtils.bind(this, +function(Y){200<=Y.getStatus()&&299>=Y.getStatus()?W("data:image/png;base64,"+Y.getText()):t(null)}),mxUtils.bind(this,function(){t(null)}))}}else if(N=mxUtils.bind(this,function(){var Y=this.createLoadMessage("export");Y.message=B;if("html2"==B.format||"html"==B.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Z=this.getXmlFileData();Y.xml=mxUtils.getXml(Z);Y.data=this.getFileData(null,null,!0,null,null,null,Z);Y.format=B.format}else if("html"==B.format)Z=this.editor.getGraphXml(), +Y.data=this.getHtml(Z,this.editor.graph),Y.xml=mxUtils.getXml(Z),Y.format=B.format;else{mxSvgCanvas2D.prototype.foAltText=null;Z=null!=B.background?B.background:this.editor.graph.background;Z==mxConstants.NONE&&(Z=null);Y.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);Y.format="svg";var ba=mxUtils.bind(this,function(ea){this.editor.graph.setEnabled(!0);this.spinner.stop();Y.data=Editor.createSvgDataUri(ea);A.postMessage(JSON.stringify(Y),"*")});if("xmlsvg"==B.format)(null==B.spin&& null==B.spinKey||this.spinner.spin(document.body,null!=B.spinKey?mxResources.get(B.spinKey):B.spin))&&this.getEmbeddedSvg(Y.xml,this.editor.graph,null,!0,ba,null,null,B.embedImages,Z,B.scale,B.border,B.shadow,B.keepTheme);else if(null==B.spin&&null==B.spinKey||this.spinner.spin(document.body,null!=B.spinKey?mxResources.get(B.spinKey):B.spin))this.editor.graph.setEnabled(!1),Z=this.editor.graph.getSvg(Z,B.scale,B.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||B.shadow,null,B.keepTheme), -(this.editor.graph.shadowVisible||B.shadow)&&this.editor.graph.addSvgShadow(Z),this.embedFonts(Z,mxUtils.bind(this,function(fa){B.embedImages||null==B.embedImages?this.editor.convertImages(fa,mxUtils.bind(this,function(ka){ba(mxUtils.getXml(ka))})):ba(mxUtils.getXml(fa))}));return}A.postMessage(JSON.stringify(Y),"*")}),null!=B.xml&&0<B.xml.length){if(this.editor.graph.mathEnabled){var R=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){R.apply(this,arguments);L()}}k=!0;this.setFileData(B.xml); -k=!1;this.editor.graph.mathEnabled||L()}else L();return}if("load"==B.action){v=B.toSketch;n=1==B.autosave;this.hideDialog();null!=B.modified&&null==urlParams.modified&&(urlParams.modified=B.modified);null!=B.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=B.saveAndExit);null!=B.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=B.noSaveBtn);if(null!=B.rough){var O=Editor.sketchMode;this.doSetSketchMode(B.rough);O!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!= -B.dark&&(O=Editor.darkMode,this.doSetDarkMode(B.dark),O!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=B.border&&(this.embedExportBorder=B.border);null!=B.background&&(this.embedExportBackground=B.background);null!=B.viewport&&(this.embedViewport=B.viewport);this.embedExitPoint=null;if(null!=B.rect){var Q=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=B.rect.top+"px";this.diagramContainer.style.left=B.rect.left+ -"px";this.diagramContainer.style.height=B.rect.height+"px";this.diagramContainer.style.width=B.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";J=mxUtils.bind(this,function(){var Y=this.editor.graph,Z=Y.maxFitScale;Y.maxFitScale=B.maxFitScale;Y.fit(2*Q);Y.maxFitScale=Z;Y.container.scrollTop-=2*Q;Y.container.scrollLeft-=2*Q;this.fireEvent(new mxEventObject("editInlineStart","data",[B]))})}null!=B.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=B.noExitBtn); -null!=B.title&&null!=this.buttonContainer&&(G=document.createElement("span"),mxUtils.write(G,B.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(G),this.embedFilenameSpan=G);try{B.libs&&this.sidebar.showEntries(B.libs)}catch(Y){}B=null!=B.xmlpng?this.extractGraphModelFromPng(B.xmlpng):null!=B.descriptor?B.descriptor:B.xml}else{if("merge"==B.action){var S=this.getCurrentFile();null!=S&&(G=N(B.xml),null!=G&&""!= -G&&S.mergeFile(new LocalFile(this,G),function(){A.postMessage(JSON.stringify({event:"merge",message:B}),"*")},function(Y){A.postMessage(JSON.stringify({event:"merge",message:B,error:Y}),"*")}))}else"remoteInvokeReady"==B.action?this.handleRemoteInvokeReady(A):"remoteInvoke"==B.action?this.handleRemoteInvoke(B,y.origin):"remoteInvokeResponse"==B.action?this.handleRemoteInvokeResponse(B):A.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(B)}),"*");return}}catch(Y){this.handleError(Y)}}var X= -mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),aa=mxUtils.bind(this,function(Y,Z){k=!0;try{d(Y,Z,null,v)}catch(ba){this.handleError(ba)}k=!1;null!=urlParams.modified&&this.editor.setStatus("");t=X();n&&null==g&&(g=mxUtils.bind(this,function(ba,fa){ba=X();ba==t||k||(fa=this.createLoadMessage("autosave"),fa.xml=ba,(window.opener||window.parent).postMessage(JSON.stringify(fa),"*"));t=ba}), +(this.editor.graph.shadowVisible||B.shadow)&&this.editor.graph.addSvgShadow(Z),this.embedFonts(Z,mxUtils.bind(this,function(ea){B.embedImages||null==B.embedImages?this.editor.convertImages(ea,mxUtils.bind(this,function(ma){ba(mxUtils.getXml(ma))})):ba(mxUtils.getXml(ea))}));return}A.postMessage(JSON.stringify(Y),"*")}),null!=B.xml&&0<B.xml.length){if(this.editor.graph.mathEnabled){var R=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){R.apply(this,arguments);N()}}k=!0;this.setFileData(B.xml); +k=!1;this.editor.graph.mathEnabled||N()}else N();return}if("load"==B.action){v=B.toSketch;n=1==B.autosave;this.hideDialog();null!=B.modified&&null==urlParams.modified&&(urlParams.modified=B.modified);null!=B.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=B.saveAndExit);null!=B.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=B.noSaveBtn);if(null!=B.rough){var O=Editor.sketchMode;this.doSetSketchMode(B.rough);O!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!= +B.dark&&(O=Editor.darkMode,this.doSetDarkMode(B.dark),O!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=B.border&&(this.embedExportBorder=B.border);null!=B.background&&(this.embedExportBackground=B.background);null!=B.viewport&&(this.embedViewport=B.viewport);this.embedExitPoint=null;if(null!=B.rect){var P=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=B.rect.top+"px";this.diagramContainer.style.left=B.rect.left+ +"px";this.diagramContainer.style.height=B.rect.height+"px";this.diagramContainer.style.width=B.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";J=mxUtils.bind(this,function(){var Y=this.editor.graph,Z=Y.maxFitScale;Y.maxFitScale=B.maxFitScale;Y.fit(2*P);Y.maxFitScale=Z;Y.container.scrollTop-=2*P;Y.container.scrollLeft-=2*P;this.fireEvent(new mxEventObject("editInlineStart","data",[B]))})}null!=B.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=B.noExitBtn); +null!=B.title&&null!=this.buttonContainer&&(G=document.createElement("span"),mxUtils.write(G,B.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(G),this.embedFilenameSpan=G);try{B.libs&&this.sidebar.showEntries(B.libs)}catch(Y){}B=null!=B.xmlpng?this.extractGraphModelFromPng(B.xmlpng):null!=B.descriptor?B.descriptor:B.xml}else{if("merge"==B.action){var S=this.getCurrentFile();null!=S&&(G=M(B.xml),null!=G&&""!= +G&&S.mergeFile(new LocalFile(this,G),function(){A.postMessage(JSON.stringify({event:"merge",message:B}),"*")},function(Y){A.postMessage(JSON.stringify({event:"merge",message:B,error:Y}),"*")}))}else"remoteInvokeReady"==B.action?this.handleRemoteInvokeReady(A):"remoteInvoke"==B.action?this.handleRemoteInvoke(B,z.origin):"remoteInvokeResponse"==B.action?this.handleRemoteInvokeResponse(B):A.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(B)}),"*");return}}catch(Y){this.handleError(Y)}}var X= +mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),aa=mxUtils.bind(this,function(Y,Z){k=!0;try{d(Y,Z,null,v)}catch(ba){this.handleError(ba)}k=!1;null!=urlParams.modified&&this.editor.setStatus("");q=X();n&&null==g&&(g=mxUtils.bind(this,function(ba,ea){ba=X();ba==q||k||(ea=this.createLoadMessage("autosave"),ea.xml=ba,(window.opener||window.parent).postMessage(JSON.stringify(ea),"*"));q=ba}), this.editor.graph.model.addListener(mxEvent.CHANGE,g),this.editor.graph.addListener("gridSizeChanged",g),this.editor.graph.addListener("shadowVisibleChanged",g),this.addListener("pageFormatChanged",g),this.addListener("pageScaleChanged",g),this.addListener("backgroundColorChanged",g),this.addListener("backgroundImageChanged",g),this.addListener("foldingEnabledChanged",g),this.addListener("mathEnabledChanged",g),this.addListener("gridEnabledChanged",g),this.addListener("guidesEnabledChanged",g),this.addListener("pageViewChanged", -g));if("1"==urlParams.returnbounds||"json"==urlParams.proto)Z=this.createLoadMessage("load"),Z.xml=Y,A.postMessage(JSON.stringify(Z),"*");null!=J&&J()});null!=B&&"function"===typeof B.substring&&"data:application/vnd.visio;base64,"==B.substring(0,34)?(N="0M8R4KGxGuE"==B.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(B.substring(B.indexOf(",")+1)),function(Y){aa(Y,y)},mxUtils.bind(this,function(Y){this.handleError(Y)}),N)):null!=B&&"function"===typeof B.substring&&(new XMLHttpRequest).upload&& -this.isRemoteFileFormat(B,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(B,mxUtils.bind(this,function(Y){4==Y.readyState&&200<=Y.status&&299>=Y.status&&"<mxGraphModel"==Y.responseText.substring(0,13)&&aa(Y.responseText,y)}),""):null!=B&&"function"===typeof B.substring&&this.isLucidChartData(B)?this.convertLucidChart(B,mxUtils.bind(this,function(Y){aa(Y)}),mxUtils.bind(this,function(Y){this.handleError(Y)})):null==B||"object"!==typeof B|| -null==B.format||null==B.data&&null==B.url?(B=N(B),aa(B,y)):this.loadDescriptor(B,mxUtils.bind(this,function(Y){aa(X(),y)}),mxUtils.bind(this,function(Y){this.handleError(Y,mxResources.get("errorLoadingFile"))}))}}));var A=window.opener||window.parent;p="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";A.postMessage(p,"*");if("json"==urlParams.proto){var E=this.editor.graph.openLink;this.editor.graph.openLink=function(y,B,J){E.apply(this,arguments);A.postMessage(JSON.stringify({event:"openLink", -href:y,target:B,allowOpener:J}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var d=document.createElement("div");d.style.display="inline-block";d.style.position="absolute";d.style.paddingTop="2px";d.style.paddingLeft="8px";d.style.paddingBottom="2px";var g=document.createElement("button");g.className="geBigButton";var k=g;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var n="1"==urlParams.publishClose?mxResources.get("publish"): -mxResources.get("saveAndExit");mxUtils.write(g,n);g.setAttribute("title",n);mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));d.appendChild(g)}}else mxUtils.write(g,mxResources.get("save")),g.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),d.appendChild(g),"1"==urlParams.saveAndExit&&(g=document.createElement("a"),mxUtils.write(g, -mxResources.get("saveAndExit")),g.setAttribute("title",mxResources.get("saveAndExit")),g.className="geBigButton geBigStandardButton",g.style.marginLeft="6px",mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),d.appendChild(g),k=g);"1"!=urlParams.noExitBtn&&(g=document.createElement("a"),k="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(g,k),g.setAttribute("title",k),g.className="geBigButton geBigStandardButton", -g.style.marginLeft="6px",mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),d.appendChild(g),k=g);k.style.marginRight="20px";this.toolbar.container.appendChild(d);this.toolbar.staticElements.push(d);d.style.right="atlas"==uiTheme||"1"==urlParams.atlas?"62px":"72px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this, -function(d){this.importCsv(d)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(d){var g=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();d()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?g():this.spinner.spin(document.body, -mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",g)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",g))};EditorUi.prototype.importCsv=function(d,g){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,g)}))};EditorUi.prototype.doImportCsv=function(d, -g){try{var k=d.split("\n"),n=[],t=[],p=[],A={};if(0<k.length){var E={},y=this.editor.graph,B=null,J=null,N=null,v=null,u=null,G=null,H=null,M="whiteSpace=wrap;html=1;",K=null,I=null,F="",P="auto",U="auto",T=!1,V=null,W=null,q=40,D=40,L=100,R=0,O=mxUtils.bind(this,function(){null!=g?g(va):(y.setSelectionCells(va),y.scrollCellToVisible(y.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),Q=y.getFreeInsertPoint(),S=Q.x,X= -Q.y;Q=X;var aa=null,Y="auto";I=null;for(var Z=[],ba=null,fa=null,ka=0;ka<k.length&&"#"==k[ka].charAt(0);){d=k[ka].replace(/\r$/,"");for(ka++;ka<k.length&&"\\"==d.charAt(d.length-1)&&"#"==k[ka].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(k[ka].substring(1)),ka++;if("#"!=d.charAt(1)){var ha=d.indexOf(":");if(0<ha){var ra=mxUtils.trim(d.substring(1,ha)),la=mxUtils.trim(d.substring(ha+1));"label"==ra?aa=y.sanitizeHtml(la):"labelname"==ra&&0<la.length&&"-"!=la?u=la:"labels"==ra&&0<la.length&&"-"!= -la?H=JSON.parse(la):"style"==ra?J=la:"parentstyle"==ra?M=la:"unknownStyle"==ra&&"-"!=la?G=la:"stylename"==ra&&0<la.length&&"-"!=la?v=la:"styles"==ra&&0<la.length&&"-"!=la?N=JSON.parse(la):"vars"==ra&&0<la.length&&"-"!=la?B=JSON.parse(la):"identity"==ra&&0<la.length&&"-"!=la?K=la:"parent"==ra&&0<la.length&&"-"!=la?I=la:"namespace"==ra&&0<la.length&&"-"!=la?F=la:"width"==ra?P=la:"height"==ra?U=la:"collapsed"==ra&&"-"!=la?T="true"==la:"left"==ra&&0<la.length?V=la:"top"==ra&&0<la.length?W=la:"ignore"== -ra?fa=la.split(","):"connect"==ra?Z.push(JSON.parse(la)):"link"==ra?ba=la:"padding"==ra?R=parseFloat(la):"edgespacing"==ra?q=parseFloat(la):"nodespacing"==ra?D=parseFloat(la):"levelspacing"==ra?L=parseFloat(la):"layout"==ra&&(Y=la)}}}if(null==k[ka])throw Error(mxResources.get("invalidOrMissingFile"));var Fa=this.editor.csvToArray(k[ka].replace(/\r$/,""));ha=d=null;ra=[];for(la=0;la<Fa.length;la++)K==Fa[la]&&(d=la),I==Fa[la]&&(ha=la),ra.push(mxUtils.trim(Fa[la]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/, -"").replace(/_+$/,""));null==aa&&(aa="%"+ra[0]+"%");if(null!=Z)for(var Ga=0;Ga<Z.length;Ga++)null==E[Z[Ga].to]&&(E[Z[Ga].to]={});K=[];for(la=ka+1;la<k.length;la++){var Aa=this.editor.csvToArray(k[la].replace(/\r$/,""));if(null==Aa){var Ma=40<k[la].length?k[la].substring(0,40)+"...":k[la];throw Error(Ma+" ("+la+"):\n"+mxResources.get("containsValidationErrors"));}0<Aa.length&&K.push(Aa)}y.model.beginUpdate();try{for(la=0;la<K.length;la++){Aa=K[la];var za=null,Da=null!=d?F+Aa[d]:null;k=!1;null!=Da&& -(za=y.model.getCell(Da),k=null==za||0<=mxUtils.indexOf(n,za));var Ca=new mxCell(aa,new mxGeometry(S,Q,0,0),J||"whiteSpace=wrap;html=1;");Ca.collapsed=T;Ca.vertex=!0;Ca.id=Da;null==za||k||y.model.setCollapsed(za,T);for(var pa=0;pa<Aa.length;pa++)y.setAttributeForCell(Ca,ra[pa],Aa[pa]),null==za||k||y.setAttributeForCell(za,ra[pa],Aa[pa]);if(null!=u&&null!=H){var qa=H[Ca.getAttribute(u)];null!=qa&&(y.labelChanged(Ca,qa),null==za||k||y.cellLabelChanged(za,qa))}if(null!=v&&null!=N){var wa=N[Ca.getAttribute(v)]; -null!=wa&&(Ca.style=wa)}y.setAttributeForCell(Ca,"placeholders","1");Ca.style=y.replacePlaceholders(Ca,Ca.style,B);null==za||k?y.fireEvent(new mxEventObject("cellsInserted","cells",[Ca])):(y.model.setStyle(za,Ca.style),0>mxUtils.indexOf(p,za)&&p.push(za),y.fireEvent(new mxEventObject("cellsInserted","cells",[za])));k=null!=za;za=Ca;if(!k)for(Ga=0;Ga<Z.length;Ga++)E[Z[Ga].to][za.getAttribute(Z[Ga].to)]=za;null!=ba&&"link"!=ba&&(y.setLinkForCell(za,za.getAttribute(ba)),y.setAttributeForCell(za,ba,null)); -var Ha=this.editor.graph.getPreferredSizeForCell(za);I=null!=ha?y.model.getCell(F+Aa[ha]):null;if(za.vertex){Ma=null!=I?0:S;ka=null!=I?0:X;null!=V&&null!=za.getAttribute(V)&&(za.geometry.x=Ma+parseFloat(za.getAttribute(V)));null!=W&&null!=za.getAttribute(W)&&(za.geometry.y=ka+parseFloat(za.getAttribute(W)));var ya="@"==P.charAt(0)?za.getAttribute(P.substring(1)):null;za.geometry.width=null!=ya&&"auto"!=ya?parseFloat(za.getAttribute(P.substring(1))):"auto"==P||"auto"==ya?Ha.width+R:parseFloat(P);var Ia= -"@"==U.charAt(0)?za.getAttribute(U.substring(1)):null;za.geometry.height=null!=Ia&&"auto"!=Ia?parseFloat(Ia):"auto"==U||"auto"==Ia?Ha.height+R:parseFloat(U);Q+=za.geometry.height+D}k?(null==A[Da]&&(A[Da]=[]),A[Da].push(za)):(n.push(za),null!=I?(I.style=y.replacePlaceholders(I,M,B),y.addCell(za,I),t.push(I)):p.push(y.addCell(za)))}for(la=0;la<t.length;la++)ya="@"==P.charAt(0)?t[la].getAttribute(P.substring(1)):null,Ia="@"==U.charAt(0)?t[la].getAttribute(U.substring(1)):null,"auto"!=P&&"auto"!=ya|| -"auto"!=U&&"auto"!=Ia||y.updateGroupBounds([t[la]],R,!0);var ja=p.slice(),va=p.slice();for(Ga=0;Ga<Z.length;Ga++){var ta=Z[Ga];for(la=0;la<n.length;la++){za=n[la];var da=mxUtils.bind(this,function(Ja,Na,Ra){var Ka=Na.getAttribute(Ra.from);if(null!=Ka&&""!=Ka){Ka=Ka.split(",");for(var Pa=0;Pa<Ka.length;Pa++){var Qa=E[Ra.to][Ka[Pa]];if(null==Qa&&null!=G){Qa=new mxCell(Ka[Pa],new mxGeometry(S,X,0,0),G);Qa.style=y.replacePlaceholders(Na,Qa.style,B);var Oa=this.editor.graph.getPreferredSizeForCell(Qa); -Qa.geometry.width=Oa.width+R;Qa.geometry.height=Oa.height+R;E[Ra.to][Ka[Pa]]=Qa;Qa.vertex=!0;Qa.id=Ka[Pa];p.push(y.addCell(Qa))}if(null!=Qa){Oa=Ra.label;null!=Ra.fromlabel&&(Oa=(Na.getAttribute(Ra.fromlabel)||"")+(Oa||""));null!=Ra.sourcelabel&&(Oa=y.replacePlaceholders(Na,Ra.sourcelabel,B)+(Oa||""));null!=Ra.tolabel&&(Oa=(Oa||"")+(Qa.getAttribute(Ra.tolabel)||""));null!=Ra.targetlabel&&(Oa=(Oa||"")+y.replacePlaceholders(Qa,Ra.targetlabel,B));var Sa="target"==Ra.placeholders==!Ra.invert?Qa:Ja;Sa= -null!=Ra.style?y.replacePlaceholders(Sa,Ra.style,B):y.createCurrentEdgeStyle();Oa=y.insertEdge(null,null,Oa||"",Ra.invert?Qa:Ja,Ra.invert?Ja:Qa,Sa);if(null!=Ra.labels)for(Sa=0;Sa<Ra.labels.length;Sa++){var Ua=Ra.labels[Sa],La=new mxCell(Ua.label||Sa,new mxGeometry(null!=Ua.x?Ua.x:0,null!=Ua.y?Ua.y:0,0,0),"resizable=0;html=1;");La.vertex=!0;La.connectable=!1;La.geometry.relative=!0;null!=Ua.placeholders&&(La.value=y.replacePlaceholders("target"==Ua.placeholders==!Ra.invert?Qa:Ja,La.value,B));if(null!= -Ua.dx||null!=Ua.dy)La.geometry.offset=new mxPoint(null!=Ua.dx?Ua.dx:0,null!=Ua.dy?Ua.dy:0);Oa.insert(La)}va.push(Oa);mxUtils.remove(Ra.invert?Ja:Qa,ja)}}}});da(za,za,ta);if(null!=A[za.id])for(pa=0;pa<A[za.id].length;pa++)da(za,A[za.id][pa],ta)}}if(null!=fa)for(la=0;la<n.length;la++)for(za=n[la],pa=0;pa<fa.length;pa++)y.setAttributeForCell(za,mxUtils.trim(fa[pa]),null);if(0<p.length){var ca=new mxParallelEdgeLayout(y);ca.spacing=q;ca.checkOverlap=!0;var na=function(){0<ca.spacing&&ca.execute(y.getDefaultParent()); -for(var Ja=0;Ja<p.length;Ja++){var Na=y.getCellGeometry(p[Ja]);Na.x=Math.round(y.snap(Na.x));Na.y=Math.round(y.snap(Na.y));"auto"==P&&(Na.width=Math.round(y.snap(Na.width)));"auto"==U&&(Na.height=Math.round(y.snap(Na.height)))}};if("["==Y.charAt(0)){var ea=O;y.view.validate();this.executeLayouts(y.createLayouts(JSON.parse(Y)),function(){na();ea()});O=null}else if("circle"==Y){var ia=new mxCircleLayout(y);ia.disableEdgeStyle=!1;ia.resetEdges=!1;var oa=ia.isVertexIgnored;ia.isVertexIgnored=function(Ja){return oa.apply(this, -arguments)||0>mxUtils.indexOf(p,Ja)};this.executeLayout(function(){ia.execute(y.getDefaultParent());na()},!0,O);O=null}else if("horizontaltree"==Y||"verticaltree"==Y||"auto"==Y&&va.length==2*p.length-1&&1==ja.length){y.view.validate();var ma=new mxCompactTreeLayout(y,"horizontaltree"==Y);ma.levelDistance=D;ma.edgeRouting=!1;ma.resetEdges=!1;this.executeLayout(function(){ma.execute(y.getDefaultParent(),0<ja.length?ja[0]:null)},!0,O);O=null}else if("horizontalflow"==Y||"verticalflow"==Y||"auto"==Y&& -1==ja.length){y.view.validate();var xa=new mxHierarchicalLayout(y,"horizontalflow"==Y?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);xa.intraCellSpacing=D;xa.parallelEdgeSpacing=q;xa.interRankCellSpacing=L;xa.disableEdgeStyle=!1;this.executeLayout(function(){xa.execute(y.getDefaultParent(),va);y.moveCells(va,S,X)},!0,O);O=null}else if("orgchart"==Y){y.view.validate();var Ea=new mxOrgChartLayout(y,2,L,D),Ba=Ea.isVertexIgnored;Ea.isVertexIgnored=function(Ja){return Ba.apply(this,arguments)|| -0>mxUtils.indexOf(p,Ja)};this.executeLayout(function(){Ea.execute(y.getDefaultParent());na()},!0,O);O=null}else if("organic"==Y||"auto"==Y&&va.length>p.length){y.view.validate();var ua=new mxFastOrganicLayout(y);ua.forceConstant=3*D;ua.disableEdgeStyle=!1;ua.resetEdges=!1;var sa=ua.isVertexIgnored;ua.isVertexIgnored=function(Ja){return sa.apply(this,arguments)||0>mxUtils.indexOf(p,Ja)};this.executeLayout(function(){ua.execute(y.getDefaultParent());na()},!0,O);O=null}}this.hideDialog()}finally{y.model.endUpdate()}null!= -O&&O()}}catch(Ja){this.handleError(Ja)}};EditorUi.prototype.getSearch=function(d){var g="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var k="?",n;for(n in urlParams)0>mxUtils.indexOf(d,n)&&null!=urlParams[n]&&(g+=k+n+"="+urlParams[n],k="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var g=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var k="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "), -n;for(n in urlParams)0>mxUtils.indexOf(k,n)&&(d=0==g?d+"?":d+"&",null!=urlParams[n]&&(d+=n+"="+urlParams[n],g++))}return d};EditorUi.prototype.showLinkDialog=function(d,g,k,n,t){d=new LinkDialog(this,d,g,k,!0,n,t);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var g=1;null==this.drive&&"function"!==typeof window.DriveClient||g++;null==this.dropbox&&"function"!==typeof window.DropboxClient||g++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient|| +g));if("1"==urlParams.returnbounds||"json"==urlParams.proto)Z=this.createLoadMessage("load"),Z.xml=Y,A.postMessage(JSON.stringify(Z),"*");null!=J&&J()});null!=B&&"function"===typeof B.substring&&"data:application/vnd.visio;base64,"==B.substring(0,34)?(M="0M8R4KGxGuE"==B.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(B.substring(B.indexOf(",")+1)),function(Y){aa(Y,z)},mxUtils.bind(this,function(Y){this.handleError(Y)}),M)):null!=B&&"function"===typeof B.substring&&(new XMLHttpRequest).upload&& +this.isRemoteFileFormat(B,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(B,mxUtils.bind(this,function(Y){4==Y.readyState&&200<=Y.status&&299>=Y.status&&"<mxGraphModel"==Y.responseText.substring(0,13)&&aa(Y.responseText,z)}),""):null!=B&&"function"===typeof B.substring&&this.isLucidChartData(B)?this.convertLucidChart(B,mxUtils.bind(this,function(Y){aa(Y)}),mxUtils.bind(this,function(Y){this.handleError(Y)})):null==B||"object"!==typeof B|| +null==B.format||null==B.data&&null==B.url?(B=M(B),aa(B,z)):this.loadDescriptor(B,mxUtils.bind(this,function(Y){aa(X(),z)}),mxUtils.bind(this,function(Y){this.handleError(Y,mxResources.get("errorLoadingFile"))}))}}));var A=window.opener||window.parent;p="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";A.postMessage(p,"*");if("json"==urlParams.proto){var E=this.editor.graph.openLink;this.editor.graph.openLink=function(z,B,J){E.apply(this,arguments);A.postMessage(JSON.stringify({event:"openLink", +href:z,target:B,allowOpener:J}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var d=document.createElement("div");d.style.display="inline-block";d.style.position="absolute";d.style.paddingTop="2px";d.style.paddingLeft="8px";d.style.paddingBottom="2px";d.style.marginRight="12px";d.style.right="atlas"==uiTheme||"1"==urlParams.atlas||"1"==urlParams["live-ui"]?"52px":"72px";var g=document.createElement("button");g.className="geBigButton";if("1"== +urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var k="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(g,k);g.setAttribute("title",k);mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));d.appendChild(g)}}else mxUtils.write(g,mxResources.get("save")),g.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})), +d.appendChild(g),"1"==urlParams.saveAndExit&&(g=document.createElement("a"),mxUtils.write(g,mxResources.get("saveAndExit")),g.setAttribute("title",mxResources.get("saveAndExit")),g.className="geBigButton geBigStandardButton",g.style.marginLeft="6px",mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),d.appendChild(g));"1"!=urlParams.noExitBtn&&(g=document.createElement("a"),k="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"), +mxUtils.write(g,k),g.setAttribute("title",k),g.className="geBigButton geBigStandardButton",g.style.marginLeft="6px",mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),d.appendChild(g));this.toolbar.container.appendChild(d);this.toolbar.staticElements.push(d)}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(d){this.importCsv(d)}), +null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(d){var g=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();d()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?g():this.spinner.spin(document.body,mxResources.get("loading"))&& +(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",g)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",g))};EditorUi.prototype.importCsv=function(d,g){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,g)}))};EditorUi.prototype.doImportCsv=function(d,g){try{var k=d.split("\n"), +n=[],q=[],p=[],A={};if(0<k.length){var E={},z=this.editor.graph,B=null,J=null,M=null,v=null,u=null,G=null,I=null,F="whiteSpace=wrap;html=1;",L=null,K=null,H="",Q="auto",U="auto",T=!1,V=null,W=null,t=40,C=40,N=100,R=0,O=mxUtils.bind(this,function(){null!=g?g(ta):(z.setSelectionCells(ta),z.scrollCellToVisible(z.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),P=z.getFreeInsertPoint(),S=P.x,X=P.y;P=X;var aa=null,Y="auto"; +K=null;for(var Z=[],ba=null,ea=null,ma=0;ma<k.length&&"#"==k[ma].charAt(0);){d=k[ma].replace(/\r$/,"");for(ma++;ma<k.length&&"\\"==d.charAt(d.length-1)&&"#"==k[ma].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(k[ma].substring(1)),ma++;if("#"!=d.charAt(1)){var ia=d.indexOf(":");if(0<ia){var pa=mxUtils.trim(d.substring(1,ia)),na=mxUtils.trim(d.substring(ia+1));"label"==pa?aa=z.sanitizeHtml(na):"labelname"==pa&&0<na.length&&"-"!=na?u=na:"labels"==pa&&0<na.length&&"-"!=na?I=JSON.parse(na):"style"== +pa?J=na:"parentstyle"==pa?F=na:"unknownStyle"==pa&&"-"!=na?G=na:"stylename"==pa&&0<na.length&&"-"!=na?v=na:"styles"==pa&&0<na.length&&"-"!=na?M=JSON.parse(na):"vars"==pa&&0<na.length&&"-"!=na?B=JSON.parse(na):"identity"==pa&&0<na.length&&"-"!=na?L=na:"parent"==pa&&0<na.length&&"-"!=na?K=na:"namespace"==pa&&0<na.length&&"-"!=na?H=na:"width"==pa?Q=na:"height"==pa?U=na:"collapsed"==pa&&"-"!=na?T="true"==na:"left"==pa&&0<na.length?V=na:"top"==pa&&0<na.length?W=na:"ignore"==pa?ea=na.split(","):"connect"== +pa?Z.push(JSON.parse(na)):"link"==pa?ba=na:"padding"==pa?R=parseFloat(na):"edgespacing"==pa?t=parseFloat(na):"nodespacing"==pa?C=parseFloat(na):"levelspacing"==pa?N=parseFloat(na):"layout"==pa&&(Y=na)}}}if(null==k[ma])throw Error(mxResources.get("invalidOrMissingFile"));var Fa=this.editor.csvToArray(k[ma].replace(/\r$/,""));ia=d=null;pa=[];for(na=0;na<Fa.length;na++)L==Fa[na]&&(d=na),K==Fa[na]&&(ia=na),pa.push(mxUtils.trim(Fa[na]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,"")); +null==aa&&(aa="%"+pa[0]+"%");if(null!=Z)for(var Ga=0;Ga<Z.length;Ga++)null==E[Z[Ga].to]&&(E[Z[Ga].to]={});L=[];for(na=ma+1;na<k.length;na++){var xa=this.editor.csvToArray(k[na].replace(/\r$/,""));if(null==xa){var Ma=40<k[na].length?k[na].substring(0,40)+"...":k[na];throw Error(Ma+" ("+na+"):\n"+mxResources.get("containsValidationErrors"));}0<xa.length&&L.push(xa)}z.model.beginUpdate();try{for(na=0;na<L.length;na++){xa=L[na];var va=null,Ea=null!=d?H+xa[d]:null;k=!1;null!=Ea&&(va=z.model.getCell(Ea), +k=null==va||0<=mxUtils.indexOf(n,va));var Ba=new mxCell(aa,new mxGeometry(S,P,0,0),J||"whiteSpace=wrap;html=1;");Ba.collapsed=T;Ba.vertex=!0;Ba.id=Ea;null==va||k||z.model.setCollapsed(va,T);for(var za=0;za<xa.length;za++)z.setAttributeForCell(Ba,pa[za],xa[za]),null==va||k||z.setAttributeForCell(va,pa[za],xa[za]);if(null!=u&&null!=I){var Da=I[Ba.getAttribute(u)];null!=Da&&(z.labelChanged(Ba,Da),null==va||k||z.cellLabelChanged(va,Da))}if(null!=v&&null!=M){var la=M[Ba.getAttribute(v)];null!=la&&(Ba.style= +la)}z.setAttributeForCell(Ba,"placeholders","1");Ba.style=z.replacePlaceholders(Ba,Ba.style,B);null==va||k?z.fireEvent(new mxEventObject("cellsInserted","cells",[Ba])):(z.model.setStyle(va,Ba.style),0>mxUtils.indexOf(p,va)&&p.push(va),z.fireEvent(new mxEventObject("cellsInserted","cells",[va])));k=null!=va;va=Ba;if(!k)for(Ga=0;Ga<Z.length;Ga++)E[Z[Ga].to][va.getAttribute(Z[Ga].to)]=va;null!=ba&&"link"!=ba&&(z.setLinkForCell(va,va.getAttribute(ba)),z.setAttributeForCell(va,ba,null));var Ha=this.editor.graph.getPreferredSizeForCell(va); +K=null!=ia?z.model.getCell(H+xa[ia]):null;if(va.vertex){Ma=null!=K?0:S;ma=null!=K?0:X;null!=V&&null!=va.getAttribute(V)&&(va.geometry.x=Ma+parseFloat(va.getAttribute(V)));null!=W&&null!=va.getAttribute(W)&&(va.geometry.y=ma+parseFloat(va.getAttribute(W)));var ya="@"==Q.charAt(0)?va.getAttribute(Q.substring(1)):null;va.geometry.width=null!=ya&&"auto"!=ya?parseFloat(va.getAttribute(Q.substring(1))):"auto"==Q||"auto"==ya?Ha.width+R:parseFloat(Q);var Ia="@"==U.charAt(0)?va.getAttribute(U.substring(1)): +null;va.geometry.height=null!=Ia&&"auto"!=Ia?parseFloat(Ia):"auto"==U||"auto"==Ia?Ha.height+R:parseFloat(U);P+=va.geometry.height+C}k?(null==A[Ea]&&(A[Ea]=[]),A[Ea].push(va)):(n.push(va),null!=K?(K.style=z.replacePlaceholders(K,F,B),z.addCell(va,K),q.push(K)):p.push(z.addCell(va)))}for(na=0;na<q.length;na++)ya="@"==Q.charAt(0)?q[na].getAttribute(Q.substring(1)):null,Ia="@"==U.charAt(0)?q[na].getAttribute(U.substring(1)):null,"auto"!=Q&&"auto"!=ya||"auto"!=U&&"auto"!=Ia||z.updateGroupBounds([q[na]], +R,!0);var ka=p.slice(),ta=p.slice();for(Ga=0;Ga<Z.length;Ga++){var ra=Z[Ga];for(na=0;na<n.length;na++){va=n[na];var wa=mxUtils.bind(this,function(Ja,Na,Ra){var Ka=Na.getAttribute(Ra.from);if(null!=Ka&&""!=Ka){Ka=Ka.split(",");for(var Pa=0;Pa<Ka.length;Pa++){var Qa=E[Ra.to][Ka[Pa]];if(null==Qa&&null!=G){Qa=new mxCell(Ka[Pa],new mxGeometry(S,X,0,0),G);Qa.style=z.replacePlaceholders(Na,Qa.style,B);var Oa=this.editor.graph.getPreferredSizeForCell(Qa);Qa.geometry.width=Oa.width+R;Qa.geometry.height=Oa.height+ +R;E[Ra.to][Ka[Pa]]=Qa;Qa.vertex=!0;Qa.id=Ka[Pa];p.push(z.addCell(Qa))}if(null!=Qa){Oa=Ra.label;null!=Ra.fromlabel&&(Oa=(Na.getAttribute(Ra.fromlabel)||"")+(Oa||""));null!=Ra.sourcelabel&&(Oa=z.replacePlaceholders(Na,Ra.sourcelabel,B)+(Oa||""));null!=Ra.tolabel&&(Oa=(Oa||"")+(Qa.getAttribute(Ra.tolabel)||""));null!=Ra.targetlabel&&(Oa=(Oa||"")+z.replacePlaceholders(Qa,Ra.targetlabel,B));var Sa="target"==Ra.placeholders==!Ra.invert?Qa:Ja;Sa=null!=Ra.style?z.replacePlaceholders(Sa,Ra.style,B):z.createCurrentEdgeStyle(); +Oa=z.insertEdge(null,null,Oa||"",Ra.invert?Qa:Ja,Ra.invert?Ja:Qa,Sa);if(null!=Ra.labels)for(Sa=0;Sa<Ra.labels.length;Sa++){var Ua=Ra.labels[Sa],La=new mxCell(Ua.label||Sa,new mxGeometry(null!=Ua.x?Ua.x:0,null!=Ua.y?Ua.y:0,0,0),"resizable=0;html=1;");La.vertex=!0;La.connectable=!1;La.geometry.relative=!0;null!=Ua.placeholders&&(La.value=z.replacePlaceholders("target"==Ua.placeholders==!Ra.invert?Qa:Ja,La.value,B));if(null!=Ua.dx||null!=Ua.dy)La.geometry.offset=new mxPoint(null!=Ua.dx?Ua.dx:0,null!= +Ua.dy?Ua.dy:0);Oa.insert(La)}ta.push(Oa);mxUtils.remove(Ra.invert?Ja:Qa,ka)}}}});wa(va,va,ra);if(null!=A[va.id])for(za=0;za<A[va.id].length;za++)wa(va,A[va.id][za],ra)}}if(null!=ea)for(na=0;na<n.length;na++)for(va=n[na],za=0;za<ea.length;za++)z.setAttributeForCell(va,mxUtils.trim(ea[za]),null);if(0<p.length){var ca=new mxParallelEdgeLayout(z);ca.spacing=t;ca.checkOverlap=!0;var fa=function(){0<ca.spacing&&ca.execute(z.getDefaultParent());for(var Ja=0;Ja<p.length;Ja++){var Na=z.getCellGeometry(p[Ja]); +Na.x=Math.round(z.snap(Na.x));Na.y=Math.round(z.snap(Na.y));"auto"==Q&&(Na.width=Math.round(z.snap(Na.width)));"auto"==U&&(Na.height=Math.round(z.snap(Na.height)))}};if("["==Y.charAt(0)){var da=O;z.view.validate();this.executeLayouts(z.createLayouts(JSON.parse(Y)),function(){fa();da()});O=null}else if("circle"==Y){var ha=new mxCircleLayout(z);ha.disableEdgeStyle=!1;ha.resetEdges=!1;var ja=ha.isVertexIgnored;ha.isVertexIgnored=function(Ja){return ja.apply(this,arguments)||0>mxUtils.indexOf(p,Ja)}; +this.executeLayout(function(){ha.execute(z.getDefaultParent());fa()},!0,O);O=null}else if("horizontaltree"==Y||"verticaltree"==Y||"auto"==Y&&ta.length==2*p.length-1&&1==ka.length){z.view.validate();var sa=new mxCompactTreeLayout(z,"horizontaltree"==Y);sa.levelDistance=C;sa.edgeRouting=!1;sa.resetEdges=!1;this.executeLayout(function(){sa.execute(z.getDefaultParent(),0<ka.length?ka[0]:null)},!0,O);O=null}else if("horizontalflow"==Y||"verticalflow"==Y||"auto"==Y&&1==ka.length){z.view.validate();var oa= +new mxHierarchicalLayout(z,"horizontalflow"==Y?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);oa.intraCellSpacing=C;oa.parallelEdgeSpacing=t;oa.interRankCellSpacing=N;oa.disableEdgeStyle=!1;this.executeLayout(function(){oa.execute(z.getDefaultParent(),ta);z.moveCells(ta,S,X)},!0,O);O=null}else if("orgchart"==Y){z.view.validate();var Ca=new mxOrgChartLayout(z,2,N,C),Aa=Ca.isVertexIgnored;Ca.isVertexIgnored=function(Ja){return Aa.apply(this,arguments)||0>mxUtils.indexOf(p,Ja)};this.executeLayout(function(){Ca.execute(z.getDefaultParent()); +fa()},!0,O);O=null}else if("organic"==Y||"auto"==Y&&ta.length>p.length){z.view.validate();var ua=new mxFastOrganicLayout(z);ua.forceConstant=3*C;ua.disableEdgeStyle=!1;ua.resetEdges=!1;var qa=ua.isVertexIgnored;ua.isVertexIgnored=function(Ja){return qa.apply(this,arguments)||0>mxUtils.indexOf(p,Ja)};this.executeLayout(function(){ua.execute(z.getDefaultParent());fa()},!0,O);O=null}}this.hideDialog()}finally{z.model.endUpdate()}null!=O&&O()}}catch(Ja){this.handleError(Ja)}};EditorUi.prototype.getSearch= +function(d){var g="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var k="?",n;for(n in urlParams)0>mxUtils.indexOf(d,n)&&null!=urlParams[n]&&(g+=k+n+"="+urlParams[n],k="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var g=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var k="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "), +n;for(n in urlParams)0>mxUtils.indexOf(k,n)&&(d=0==g?d+"?":d+"&",null!=urlParams[n]&&(d+=n+"="+urlParams[n],g++))}return d};EditorUi.prototype.showLinkDialog=function(d,g,k,n,q){d=new LinkDialog(this,d,g,k,!0,n,q);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var g=1;null==this.drive&&"function"!==typeof window.DriveClient||g++;null==this.dropbox&&"function"!==typeof window.DropboxClient||g++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient|| g++;null!=this.gitHub&&g++;null!=this.gitLab&&g++;d&&isLocalStorage&&"1"==urlParams.browser&&g++;return g};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),g=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(g);this.menus.get("viewZoom").setEnabled(g);var k=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!k); this.actions.get("print").setEnabled(!k);this.menus.get("exportAs").setEnabled(!k);this.menus.get("embed").setEnabled(!k);k="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(k);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(k),this.menus.get("newLibrary").setEnabled(k));d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(g);this.actions.get("zoomIn").setEnabled(g);this.actions.get("zoomOut").setEnabled(g); -this.actions.get("resetView").setEnabled(g);this.actions.get("undo").setEnabled(this.canUndo()&&d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(g);this.menus.get("view").setEnabled(g);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()}; -EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var x=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=function(d){var g=x.apply(this,arguments);this.addListener("darkModeChanged", -mxUtils.bind(this,function(){g.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){g.refresh()}));return g};var z=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){z.apply(this,arguments);var d=this.editor.graph,g=this.getCurrentFile(),k=this.getSelectionState(),n=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(n);this.actions.get("autosave").setEnabled(null!=g&&g.isEditable()&&g.isAutosaveOptional());this.actions.get("guides").setEnabled(n); -this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(n);this.actions.get("connectionArrows").setEnabled(n);this.actions.get("connectionPoints").setEnabled(n);this.actions.get("copyStyle").setEnabled(n&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(n&&0<k.cells.length);this.actions.get("editGeometry").setEnabled(0<k.vertices.length);this.actions.get("createShape").setEnabled(n);this.actions.get("createRevision").setEnabled(n);this.actions.get("moveToFolder").setEnabled(null!= -g);this.actions.get("makeCopy").setEnabled(null!=g&&!g.isRestricted());this.actions.get("editDiagram").setEnabled(n&&(null==g||!g.isRestricted()));this.actions.get("publishLink").setEnabled(null!=g&&!g.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!= -g&&g.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=g);this.menus.get("publish").setEnabled(null!=g&&!g.isRestricted());g=this.actions.get("findReplace");g.setEnabled("hidden"!=this.diagramContainer.style.visibility);g.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"");d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(n&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};var C=EditorUi.prototype.destroy;EditorUi.prototype.destroy= -function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);C.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,g,k,n,t,p,A,E){var y=d.editor.graph;if("xml"==k)d.hideDialog(),d.saveData(g,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==k)d.hideDialog(),d.saveData(g,"svg",mxUtils.getXml(y.getSvg(n,t,p)),"image/svg+xml"); -else{var B=d.getFileData(!0,null,null,null,null,!0),J=y.getGraphBounds(),N=Math.floor(J.width*t/y.view.scale),v=Math.floor(J.height*t/y.view.scale);if(B.length<=MAX_REQUEST_SIZE&&N*v<MAX_AREA)if(d.hideDialog(),"png"!=k&&"jpg"!=k&&"jpeg"!=k||!d.isExportToCanvas()){var u={globalVars:y.getExportVariables()};E&&(u.grid={size:y.gridSize,steps:y.view.gridSteps,color:y.view.gridColor});d.saveRequest(g,k,function(G,H){return new mxXmlRequest(EXPORT_URL,"format="+k+"&base64="+(H||"0")+(null!=G?"&filename="+ -encodeURIComponent(G):"")+"&extras="+encodeURIComponent(JSON.stringify(u))+(0<A?"&dpi="+A:"")+"&bg="+(null!=n?n:"none")+"&w="+N+"&h="+v+"&border="+p+"&xml="+encodeURIComponent(B))})}else"png"==k?d.exportImage(t,null==n||"none"==n,!0,!1,!1,p,!0,!1,null,E,A):d.exportImage(t,!1,!0,!1,!1,p,!0,!1,"jpeg",E);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,g="";if(null!=this.pages)for(var k= -0;k<this.pages.length;k++){var n=d;this.currentPage!=this.pages[k]&&(n=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[k]),n.model.setRoot(this.pages[k].root));g+=this.pages[k].getName()+" "+n.getIndexableText()+" "}else g=d.getIndexableText();this.editor.graph.setEnabled(!0);return g};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var g={},k=document.createElement("div");k.style.whiteSpace="nowrap";var n=document.createElement("h3");mxUtils.write(n,mxUtils.htmlEntities(d)); -n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(n);var t=document.createElement("div");t.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";t.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var p={};try{var A=mxSettings.getCustomLibraries();for(d=0;d<A.length;d++){var E=A[d];if("R"==E.substring(0,1)){var y=JSON.parse(decodeURIComponent(E.substring(1)));p[y[0]]={id:y[0],title:y[1],downloadUrl:y[2]}}}}catch(B){}this.remoteInvoke("getCustomLibraries", -null,null,function(B){t.innerText="";if(0==B.length)t.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var J=0;J<B.length;J++){var N=B[J];p[N.id]&&(g[N.id]=N);var v=this.addCheckbox(t,N.title,p[N.id]);(function(u,G){mxEvent.addListener(G,"change",function(){this.checked?g[u.id]=u:delete g[u.id]})})(N,v)}},mxUtils.bind(this,function(B){t.innerText="";var J=document.createElement("div");J.style.padding="8px"; -J.style.textAlign="center";mxUtils.write(J,mxResources.get("error")+": ");mxUtils.write(J,null!=B&&null!=B.message?B.message:mxResources.get("unknownError"));t.appendChild(J)}));k.appendChild(t);k=new CustomDialog(this,k,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var B=0,J;for(J in g)null==p[J]&&(B++,mxUtils.bind(this,function(N){this.remoteInvoke("getFileContent",[N.downloadUrl],null,mxUtils.bind(this,function(v){B--;0==B&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this, -v,N))}catch(u){this.handleError(u,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){B--;0==B&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(g[J]));for(J in p)g[J]||this.closeLibrary(new RemoteLibrary(this,null,p[J]));0==B&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(k.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1}, -getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin=d;for(var g=0;g<this.remoteInvokeQueue.length;g++)d.postMessage(this.remoteInvokeQueue[g],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse= -function(d){var g=d.msgMarkers,k=this.remoteInvokeCallbacks[g.callbackId];if(null==k)throw Error("No callback for "+(null!=g?g.callbackId:"null"));d.error?k.error&&k.error(d.error.errResp):k.callback&&k.callback.apply(this,d.resp);this.remoteInvokeCallbacks[g.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,g,k,n,t){var p=!0,A=window.setTimeout(mxUtils.bind(this,function(){p=!1;t({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),E=mxUtils.bind(this,function(){window.clearTimeout(A); -p&&n.apply(this,arguments)}),y=mxUtils.bind(this,function(){window.clearTimeout(A);p&&t.apply(this,arguments)});k=k||{};k.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:E,error:y});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:g,msgMarkers:k});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,g){var k=mxUtils.bind(this,function(B,J){var N={event:"remoteInvokeResponse", -msgMarkers:d.msgMarkers};null!=J?N.error={errResp:J}:null!=B&&(N.resp=B);this.remoteWin.postMessage(JSON.stringify(N),"*")});try{var n=d.funtionName,t=this.remoteInvokableFns[n];if(null!=t&&"function"===typeof this[n]){if(t.allowedDomains){for(var p=!1,A=0;A<t.allowedDomains.length;A++)if(g=="https://"+t.allowedDomains[A]){p=!0;break}if(!p){k(null,"Invalid Call: "+n+" is not allowed.");return}}var E=d.functionArgs;Array.isArray(E)||(E=[]);if(t.isAsync)E.push(function(){k(Array.prototype.slice.apply(arguments))}), -E.push(function(B){k(null,B||"Unkown Error")}),this[n].apply(this,E);else{var y=this[n].apply(this,E);k([y])}}else k(null,"Invalid Call: "+n+" is not found.")}catch(B){k(null,"Invalid Call: An error occurred, "+B.message)}};EditorUi.prototype.openDatabase=function(d,g){if(null==this.database){var k=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=k)try{var n=k.open("database",2);n.onupgradeneeded=function(t){try{var p=n.result;1>t.oldVersion&&p.createObjectStore("objects",{keyPath:"key"}); -2>t.oldVersion&&(p.createObjectStore("files",{keyPath:"title"}),p.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(A){null!=g&&g(A)}};n.onsuccess=mxUtils.bind(this,function(t){var p=n.result;this.database=p;EditorUi.migrateStorageFiles&&(StorageFile.migrate(p),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(A){if(!A|| -"1"==urlParams.forceMigration){var E=document.createElement("iframe");E.style.display="none";E.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(E);var y=!0,B=!1,J,N=0,v=mxUtils.bind(this,function(){B=!0;this.setDatabaseItem(".drawioMigrated3",!0);E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),u=mxUtils.bind(this,function(){N++;G()}),G=mxUtils.bind(this,function(){try{if(N>= -J.length)v();else{var M=J[N];StorageFile.getFileContent(this,M,mxUtils.bind(this,function(K){null==K||".scratchpad"==M&&K==this.emptyLibraryXml?E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[M]}),"*"):u()}),u)}}catch(K){console.log(K)}}),H=mxUtils.bind(this,function(M){try{this.setDatabaseItem(null,[{title:M.title,size:M.data.length,lastModified:Date.now(),type:M.isLib?"L":"F"},{title:M.title,data:M.data}],u,u,["filesInfo","files"])}catch(K){console.log(K)}}); -A=mxUtils.bind(this,function(M){try{if(M.source==E.contentWindow){var K={};try{K=JSON.parse(M.data)}catch(I){}"init"==K.event?(E.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=K.event||B||(y?null!=K.resp&&0<K.resp.length&&null!=K.resp[0]?(J=K.resp[0],y=!1,G()):v():null!=K.resp&&0<K.resp.length&&null!=K.resp[0]?H(K.resp[0]):u())}}catch(I){console.log(I)}}); -window.addEventListener("message",A)}})));d(p);p.onversionchange=function(){p.close()}});n.onerror=g;n.onblocked=function(){}}catch(t){null!=g&&g(t)}else null!=g&&g()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,g,k,n,t){this.openDatabase(mxUtils.bind(this,function(p){try{t=t||"objects";Array.isArray(t)||(t=[t],d=[d],g=[g]);var A=p.transaction(t,"readwrite");A.oncomplete=k;A.onerror=n;for(p=0;p<t.length;p++)A.objectStore(t[p]).put(null!=d&&null!=d[p]?{key:d[p],data:g[p]}:g[p])}catch(E){null!= -n&&n(E)}}),n)};EditorUi.prototype.removeDatabaseItem=function(d,g,k,n){this.openDatabase(mxUtils.bind(this,function(t){n=n||"objects";Array.isArray(n)||(n=[n],d=[d]);t=t.transaction(n,"readwrite");t.oncomplete=g;t.onerror=k;for(var p=0;p<n.length;p++)t.objectStore(n[p]).delete(d[p])}),k)};EditorUi.prototype.getDatabaseItem=function(d,g,k,n){this.openDatabase(mxUtils.bind(this,function(t){try{n=n||"objects";var p=t.transaction([n],"readonly").objectStore(n).get(d);p.onsuccess=function(){g(p.result)}; -p.onerror=k}catch(A){null!=k&&k(A)}}),k)};EditorUi.prototype.getDatabaseItems=function(d,g,k){this.openDatabase(mxUtils.bind(this,function(n){try{k=k||"objects";var t=n.transaction([k],"readonly").objectStore(k).openCursor(IDBKeyRange.lowerBound(0)),p=[];t.onsuccess=function(A){null==A.target.result?d(p):(p.push(A.target.result.value),A.target.result.continue())};t.onerror=g}catch(A){null!=g&&g(A)}}),g)};EditorUi.prototype.getDatabaseItemKeys=function(d,g,k){this.openDatabase(mxUtils.bind(this,function(n){try{k= -k||"objects";var t=n.transaction([k],"readonly").objectStore(k).getAllKeys();t.onsuccess=function(){d(t.result)};t.onerror=g}catch(p){null!=g&&g(p)}}),g)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsSaveNeeded(): -!1};EditorUi.prototype.getComments=function(d,g){var k=this.getCurrentFile();null!=k?k.getComments(d,g):d([])};EditorUi.prototype.addComment=function(d,g,k){var n=this.getCurrentFile();null!=n?n.addComment(d,g,k):g(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,g){var k=this.getCurrentFile(); -return null!=k?k.newComment(d,g):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,g)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(d,g){var k=this.getCurrentFile();null!=k&&k.getRevisions?k.getRevisions(d,g):g({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor== -DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,g,k,n,t,p,A,E){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,g,k,n,t,p,A,E)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)}; -EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,g)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,g,k,n,t,p,A,E,y,B,J,N,v,u,G,H){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas"); -return this.editor.exportToCanvas(d,g,k,n,t,p,A,E,y,B,J,N,v,u,G,H)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,g,k,n){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,g,k,n)};EditorUi.prototype.convertImageToDataUri=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri"); -return this.editor.convertImageToDataUri(d,g)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,g,k,n){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,g,k,n)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,g,k,n,t){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng"); -return Editor.writeGraphModelToPng(d,g,k,n,t)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],g=0;g<localStorage.length;g++){var k=localStorage.key(g),n=localStorage.getItem(k);if(0<k.length&&(".scratchpad"==k||"."!=k.charAt(0))&&0<n.length){var t="<mxfile "===n.substring(0,8)||"<?xml"===n.substring(0,5)||"\x3c!--[if IE]>"===n.substring(0,12);n="<mxlibrary>"===n.substring(0,11);(t|| -n)&&d.push(k)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var g=localStorage.getItem(d);return{title:d,data:g,isLib:"<mxlibrary>"===g.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})(); -var CommentsWindow=function(b,e,f,c,l,m){function x(){for(var M=B.getElementsByTagName("div"),K=0,I=0;I<M.length;I++)"none"!=M[I].style.display&&M[I].parentNode==B&&K++;J.style.display=0==K?"block":"none"}function z(M,K,I,F){function P(){K.removeChild(V);K.removeChild(W);T.style.display="block";U.style.display="block"}A={div:K,comment:M,saveCallback:I,deleteOnCancel:F};var U=K.querySelector(".geCommentTxt"),T=K.querySelector(".geCommentActionsList"),V=document.createElement("textarea");V.className= -"geCommentEditTxtArea";V.style.minHeight=U.offsetHeight+"px";V.value=M.content;K.insertBefore(V,U);var W=document.createElement("div");W.className="geCommentEditBtns";var q=mxUtils.button(mxResources.get("cancel"),function(){F?(K.parentNode.removeChild(K),x()):P();A=null});q.className="geCommentEditBtn";W.appendChild(q);var D=mxUtils.button(mxResources.get("save"),function(){U.innerText="";M.content=V.value;mxUtils.write(U,M.content);P();I(M);A=null});mxEvent.addListener(V,"keydown",mxUtils.bind(this, -function(L){mxEvent.isConsumed(L)||((mxEvent.isControlDown(L)||mxClient.IS_MAC&&mxEvent.isMetaDown(L))&&13==L.keyCode?(D.click(),mxEvent.consume(L)):27==L.keyCode&&(q.click(),mxEvent.consume(L)))}));D.focus();D.className="geCommentEditBtn gePrimaryBtn";W.appendChild(D);K.insertBefore(W,U);T.style.display="none";U.style.display="none";V.focus()}function C(M,K){K.innerText="";M=new Date(M.modifiedDate);var I=b.timeSince(M);null==I&&(I=mxResources.get("lessThanAMinute"));mxUtils.write(K,mxResources.get("timeAgo", -[I],"{1} ago"));K.setAttribute("title",M.toLocaleDateString()+" "+M.toLocaleTimeString())}function d(M){var K=document.createElement("img");K.className="geCommentBusyImg";K.src=IMAGE_PATH+"/spin.gif";M.appendChild(K);M.busyImg=K}function g(M){M.style.border="1px solid red";M.removeChild(M.busyImg)}function k(M){M.style.border="";M.removeChild(M.busyImg)}function n(M,K,I,F,P){function U(O,Q,S){var X=document.createElement("li");X.className="geCommentAction";var aa=document.createElement("a");aa.className= -"geCommentActionLnk";mxUtils.write(aa,O);X.appendChild(aa);mxEvent.addListener(aa,"click",function(Y){Q(Y,M);Y.preventDefault();mxEvent.consume(Y)});R.appendChild(X);S&&(X.style.display="none")}function T(){function O(X){Q.push(S);if(null!=X.replies)for(var aa=0;aa<X.replies.length;aa++)S=S.nextSibling,O(X.replies[aa])}var Q=[],S=W;O(M);return{pdiv:S,replies:Q}}function V(O,Q,S,X,aa){function Y(){d(ka);M.addReply(fa,function(ha){fa.id=ha;M.replies.push(fa);k(ka);S&&S()},function(ha){Z();g(ka);b.handleError(ha, -null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},X,aa)}function Z(){z(fa,ka,function(ha){Y()},!0)}var ba=T().pdiv,fa=b.newComment(O,b.getCurrentUser());fa.pCommentId=M.id;null==M.replies&&(M.replies=[]);var ka=n(fa,M.replies,ba,F+1);Q?Z():Y()}if(P||!M.isResolved){J.style.display="none";var W=document.createElement("div");W.className="geCommentContainer";W.setAttribute("data-commentId",M.id);W.style.marginLeft=20*F+5+"px";M.isResolved&&!Editor.isDarkMode()&&(W.style.backgroundColor= -"ghostWhite");var q=document.createElement("div");q.className="geCommentHeader";var D=document.createElement("img");D.className="geCommentUserImg";D.src=M.user.pictureUrl||Editor.userImage;q.appendChild(D);D=document.createElement("div");D.className="geCommentHeaderTxt";q.appendChild(D);var L=document.createElement("div");L.className="geCommentUsername";mxUtils.write(L,M.user.displayName||"");D.appendChild(L);L=document.createElement("div");L.className="geCommentDate";L.setAttribute("data-commentId", -M.id);C(M,L);D.appendChild(L);W.appendChild(q);q=document.createElement("div");q.className="geCommentTxt";mxUtils.write(q,M.content||"");W.appendChild(q);M.isLocked&&(W.style.opacity="0.5");q=document.createElement("div");q.className="geCommentActions";var R=document.createElement("ul");R.className="geCommentActionsList";q.appendChild(R);t||M.isLocked||0!=F&&!p||U(mxResources.get("reply"),function(){V("",!0)},M.isResolved);D=b.getCurrentUser();null==D||D.id!=M.user.id||t||M.isLocked||(U(mxResources.get("edit"), -function(){function O(){z(M,W,function(){d(W);M.editComment(M.content,function(){k(W)},function(Q){g(W);O();b.handleError(Q,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}O()},M.isResolved),U(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){d(W);M.deleteComment(function(O){if(!0===O){O=W.querySelector(".geCommentTxt");O.innerText="";mxUtils.write(O,mxResources.get("msgDeleted"));var Q=W.querySelectorAll(".geCommentAction");for(O= -0;O<Q.length;O++)Q[O].parentNode.removeChild(Q[O]);k(W);W.style.opacity="0.5"}else{Q=T(M).replies;for(O=0;O<Q.length;O++)B.removeChild(Q[O]);for(O=0;O<K.length;O++)if(K[O]==M){K.splice(O,1);break}J.style.display=0==B.getElementsByTagName("div").length?"block":"none"}},function(O){g(W);b.handleError(O,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},M.isResolved));t||M.isLocked||0!=F||U(M.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(O){function Q(){var S= -O.target;S.innerText="";M.isResolved=!M.isResolved;mxUtils.write(S,M.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var X=M.isResolved?"none":"",aa=T(M).replies,Y=Editor.isDarkMode()?"transparent":M.isResolved?"ghostWhite":"white",Z=0;Z<aa.length;Z++){aa[Z].style.backgroundColor=Y;for(var ba=aa[Z].querySelectorAll(".geCommentAction"),fa=0;fa<ba.length;fa++)ba[fa]!=S.parentNode&&(ba[fa].style.display=X);u||(aa[Z].style.display="none")}x()}M.isResolved?V(mxResources.get("reOpened")+ -": ",!0,Q,!1,!0):V(mxResources.get("markedAsResolved"),!1,Q,!0)});W.appendChild(q);null!=I?B.insertBefore(W,I.nextSibling):B.appendChild(W);for(I=0;null!=M.replies&&I<M.replies.length;I++)q=M.replies[I],q.isResolved=M.isResolved,n(q,M.replies,null,F+1,P);null!=A&&(A.comment.id==M.id?(P=M.content,M.content=A.comment.content,z(M,W,A.saveCallback,A.deleteOnCancel),M.content=P):null==A.comment.id&&A.comment.pCommentId==M.id&&(B.appendChild(A.div),z(A.comment,A.div,A.saveCallback,A.deleteOnCancel)));return W}} -var t=!b.canComment(),p=b.canReplyToReplies(),A=null,E=document.createElement("div");E.className="geCommentsWin";E.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var y=EditorUi.compactUi?"26px":"30px",B=document.createElement("div");B.className="geCommentsList";B.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";B.style.bottom=parseInt(y)+7+"px";E.appendChild(B);var J=document.createElement("span");J.style.cssText="display:none;padding-top:10px;text-align:center;"; -mxUtils.write(J,mxResources.get("noCommentsFound"));var N=document.createElement("div");N.className="geToolbarContainer geCommentsToolbar";N.style.height=y;N.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";N.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";y=document.createElement("a");y.className="geButton";if(!t){var v=y.cloneNode();v.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';v.setAttribute("title",mxResources.get("create")+ -"...");mxEvent.addListener(v,"click",function(M){function K(){z(I,F,function(P){d(F);b.addComment(P,function(U){P.id=U;G.push(P);k(F)},function(U){g(F);K();b.handleError(U,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var I=b.newComment("",b.getCurrentUser()),F=n(I,G,null,0);K();M.preventDefault();mxEvent.consume(M)});N.appendChild(v)}v=y.cloneNode();v.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';v.setAttribute("title",mxResources.get("showResolved")); -v.className="geAdaptiveAsset";var u=!1;mxEvent.addListener(v,"click",function(M){this.className=(u=!u)?"geButton geCheckedBtn":"geButton";H();M.preventDefault();mxEvent.consume(M)});N.appendChild(v);b.commentsRefreshNeeded()&&(v=y.cloneNode(),v.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',v.setAttribute("title",mxResources.get("refresh")),v.className="geAdaptiveAsset",mxEvent.addListener(v,"click",function(M){H();M.preventDefault();mxEvent.consume(M)}),N.appendChild(v)); -b.commentsSaveNeeded()&&(y=y.cloneNode(),y.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',y.setAttribute("title",mxResources.get("save")),y.className="geAdaptiveAsset",mxEvent.addListener(y,"click",function(M){m();M.preventDefault();mxEvent.consume(M)}),N.appendChild(y));E.appendChild(N);var G=[],H=mxUtils.bind(this,function(){this.hasError=!1;if(null!=A)try{A.div=A.div.cloneNode(!0);var M=A.div.querySelector(".geCommentEditTxtArea"),K=A.div.querySelector(".geCommentEditBtns"); -A.comment.content=M.value;M.parentNode.removeChild(M);K.parentNode.removeChild(K)}catch(I){b.handleError(I)}B.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";p=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(I){function F(P){if(null!=P){P.sort(function(T,V){return new Date(T.modifiedDate)-new Date(V.modifiedDate)});for(var U=0;U<P.length;U++)F(P[U].replies)}} -I.sort(function(P,U){return new Date(P.modifiedDate)-new Date(U.modifiedDate)});B.innerText="";B.appendChild(J);J.style.display="block";G=I;for(I=0;I<G.length;I++)F(G[I].replies),n(G[I],G,null,0,u);null!=A&&null==A.comment.id&&null==A.comment.pCommentId&&(B.appendChild(A.div),z(A.comment,A.div,A.saveCallback,A.deleteOnCancel))},mxUtils.bind(this,function(I){B.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(I&&I.message?": "+I.message:""));this.hasError=!0})):B.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))}); -H();this.refreshComments=H;N=mxUtils.bind(this,function(){function M(U){var T=I[U.id];if(null!=T)for(C(U,T),T=0;null!=U.replies&&T<U.replies.length;T++)M(U.replies[T])}if(this.window.isVisible()){for(var K=B.querySelectorAll(".geCommentDate"),I={},F=0;F<K.length;F++){var P=K[F];I[P.getAttribute("data-commentId")]=P}for(F=0;F<G.length;F++)M(G[F])}});setInterval(N,6E4);this.refreshCommentsTime=N;this.window=new mxWindow(mxResources.get("comments"),E,e,f,c,l,!0,!0);this.window.minimumSize=new mxRectangle(0, -0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,f,c,l,m,x,z,C,d,g){var k=document.createElement("div");k.style.textAlign="center";g=null!=g?g:44;var n=document.createElement("div");n.style.padding="6px";n.style.overflow="auto";n.style.maxHeight=g+ -"px";n.style.lineHeight="1.2em";mxUtils.write(n,e);k.appendChild(n);null!=d&&(n=document.createElement("div"),n.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",d),n.appendChild(e),k.appendChild(n));d=document.createElement("div");d.style.textAlign="center";d.style.whiteSpace="nowrap";var t=document.createElement("input");t.setAttribute("type","checkbox");m=mxUtils.button(m||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c(t.checked)});m.className="geBtn"; -null!=z&&(m.innerHTML=z+"<br>"+m.innerHTML,m.style.paddingBottom="8px",m.style.paddingTop="8px",m.style.height="auto",m.style.width="40%");b.editor.cancelFirst&&d.appendChild(m);var p=mxUtils.button(l||mxResources.get("ok"),function(){b.hideDialog();null!=f&&f(t.checked)});d.appendChild(p);null!=x?(p.innerHTML=x+"<br>"+p.innerHTML+"<br>",p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.className="geBtn",p.style.width="40%"):p.className="geBtn gePrimaryBtn";b.editor.cancelFirst|| -d.appendChild(m);k.appendChild(d);C?(d.style.marginTop="10px",n=document.createElement("p"),n.style.marginTop="20px",n.style.marginBottom="0px",n.appendChild(t),l=document.createElement("span"),mxUtils.write(l," "+mxResources.get("rememberThisSetting")),n.appendChild(l),k.appendChild(n),mxEvent.addListener(l,"click",function(A){t.checked=!t.checked;mxEvent.consume(A)})):d.style.marginTop="12px";this.init=function(){p.focus()};this.container=k};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0}; +this.actions.get("resetView").setEnabled(g);this.actions.get("toggleDarkMode").setEnabled("atlas"!=uiTheme);this.actions.get("undo").setEnabled(this.canUndo()&&d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(g);this.menus.get("view").setEnabled(g);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&& +this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var x=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar= +function(d){var g=x.apply(this,arguments);this.addListener("darkModeChanged",mxUtils.bind(this,function(){g.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){g.refresh()}));return g};var y=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){y.apply(this,arguments);var d=this.editor.graph,g=this.getCurrentFile(),k=this.getSelectionState(),n=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(n);this.actions.get("autosave").setEnabled(null!= +g&&g.isEditable()&&g.isAutosaveOptional());this.actions.get("guides").setEnabled(n);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(n);this.actions.get("connectionArrows").setEnabled(n);this.actions.get("connectionPoints").setEnabled(n);this.actions.get("copyStyle").setEnabled(n&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(n&&0<k.cells.length);this.actions.get("editGeometry").setEnabled(0<k.vertices.length);this.actions.get("createShape").setEnabled(n); +this.actions.get("createRevision").setEnabled(n);this.actions.get("moveToFolder").setEnabled(null!=g);this.actions.get("makeCopy").setEnabled(null!=g&&!g.isRestricted());this.actions.get("editDiagram").setEnabled(n&&(null==g||!g.isRestricted()));this.actions.get("publishLink").setEnabled(null!=g&&!g.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!= +this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=g&&g.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=g);this.menus.get("publish").setEnabled(null!=g&&!g.isRestricted());g=this.actions.get("findReplace");g.setEnabled("hidden"!=this.diagramContainer.style.visibility);g.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"");d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(n&&null!= +d&&null!=d.shape&&null!=d.shape.stencil)};var D=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);D.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,g,k,n,q,p,A,E){var z=d.editor.graph;if("xml"==k)d.hideDialog(),d.saveData(g,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml"); +else if("svg"==k)d.hideDialog(),d.saveData(g,"svg",mxUtils.getXml(z.getSvg(n,q,p)),"image/svg+xml");else{var B=d.getFileData(!0,null,null,null,null,!0),J=z.getGraphBounds(),M=Math.floor(J.width*q/z.view.scale),v=Math.floor(J.height*q/z.view.scale);if(B.length<=MAX_REQUEST_SIZE&&M*v<MAX_AREA)if(d.hideDialog(),"png"!=k&&"jpg"!=k&&"jpeg"!=k||!d.isExportToCanvas()){var u={globalVars:z.getExportVariables()};E&&(u.grid={size:z.gridSize,steps:z.view.gridSteps,color:z.view.gridColor});d.saveRequest(g,k,function(G, +I){return new mxXmlRequest(EXPORT_URL,"format="+k+"&base64="+(I||"0")+(null!=G?"&filename="+encodeURIComponent(G):"")+"&extras="+encodeURIComponent(JSON.stringify(u))+(0<A?"&dpi="+A:"")+"&bg="+(null!=n?n:"none")+"&w="+M+"&h="+v+"&border="+p+"&xml="+encodeURIComponent(B))})}else"png"==k?d.exportImage(q,null==n||"none"==n,!0,!1,!1,p,!0,!1,null,E,A):d.exportImage(q,!1,!0,!1,!1,p,!0,!1,"jpeg",E);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1); +var d=this.editor.graph,g="";if(null!=this.pages)for(var k=0;k<this.pages.length;k++){var n=d;this.currentPage!=this.pages[k]&&(n=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[k]),n.model.setRoot(this.pages[k].root));g+=this.pages[k].getName()+" "+n.getIndexableText()+" "}else g=d.getIndexableText();this.editor.graph.setEnabled(!0);return g};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var g={},k=document.createElement("div");k.style.whiteSpace="nowrap";var n= +document.createElement("h3");mxUtils.write(n,mxUtils.htmlEntities(d));n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(n);var q=document.createElement("div");q.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";q.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var p={};try{var A=mxSettings.getCustomLibraries();for(d=0;d<A.length;d++){var E=A[d];if("R"==E.substring(0,1)){var z=JSON.parse(decodeURIComponent(E.substring(1))); +p[z[0]]={id:z[0],title:z[1],downloadUrl:z[2]}}}}catch(B){}this.remoteInvoke("getCustomLibraries",null,null,function(B){q.innerText="";if(0==B.length)q.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var J=0;J<B.length;J++){var M=B[J];p[M.id]&&(g[M.id]=M);var v=this.addCheckbox(q,M.title,p[M.id]);(function(u,G){mxEvent.addListener(G,"change",function(){this.checked?g[u.id]=u:delete g[u.id]})})(M,v)}},mxUtils.bind(this, +function(B){q.innerText="";var J=document.createElement("div");J.style.padding="8px";J.style.textAlign="center";mxUtils.write(J,mxResources.get("error")+": ");mxUtils.write(J,null!=B&&null!=B.message?B.message:mxResources.get("unknownError"));q.appendChild(J)}));k.appendChild(q);k=new CustomDialog(this,k,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var B=0,J;for(J in g)null==p[J]&&(B++,mxUtils.bind(this,function(M){this.remoteInvoke("getFileContent",[M.downloadUrl], +null,mxUtils.bind(this,function(v){B--;0==B&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,v,M))}catch(u){this.handleError(u,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){B--;0==B&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(g[J]));for(J in p)g[J]||this.closeLibrary(new RemoteLibrary(this,null,p[J]));0==B&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(k.container, +340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin=d;for(var g=0;g<this.remoteInvokeQueue.length;g++)d.postMessage(this.remoteInvokeQueue[g], +"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var g=d.msgMarkers,k=this.remoteInvokeCallbacks[g.callbackId];if(null==k)throw Error("No callback for "+(null!=g?g.callbackId:"null"));d.error?k.error&&k.error(d.error.errResp):k.callback&&k.callback.apply(this,d.resp);this.remoteInvokeCallbacks[g.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,g,k,n,q){var p=!0,A=window.setTimeout(mxUtils.bind(this,function(){p=!1;q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}), +this.timeout),E=mxUtils.bind(this,function(){window.clearTimeout(A);p&&n.apply(this,arguments)}),z=mxUtils.bind(this,function(){window.clearTimeout(A);p&&q.apply(this,arguments)});k=k||{};k.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:E,error:z});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:g,msgMarkers:k});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d, +g){var k=mxUtils.bind(this,function(B,J){var M={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=J?M.error={errResp:J}:null!=B&&(M.resp=B);this.remoteWin.postMessage(JSON.stringify(M),"*")});try{var n=d.funtionName,q=this.remoteInvokableFns[n];if(null!=q&&"function"===typeof this[n]){if(q.allowedDomains){for(var p=!1,A=0;A<q.allowedDomains.length;A++)if(g=="https://"+q.allowedDomains[A]){p=!0;break}if(!p){k(null,"Invalid Call: "+n+" is not allowed.");return}}var E=d.functionArgs;Array.isArray(E)|| +(E=[]);if(q.isAsync)E.push(function(){k(Array.prototype.slice.apply(arguments))}),E.push(function(B){k(null,B||"Unkown Error")}),this[n].apply(this,E);else{var z=this[n].apply(this,E);k([z])}}else k(null,"Invalid Call: "+n+" is not found.")}catch(B){k(null,"Invalid Call: An error occurred, "+B.message)}};EditorUi.prototype.openDatabase=function(d,g){if(null==this.database){var k=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=k)try{var n=k.open("database",2);n.onupgradeneeded= +function(q){try{var p=n.result;1>q.oldVersion&&p.createObjectStore("objects",{keyPath:"key"});2>q.oldVersion&&(p.createObjectStore("files",{keyPath:"title"}),p.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(A){null!=g&&g(A)}};n.onsuccess=mxUtils.bind(this,function(q){var p=n.result;this.database=p;EditorUi.migrateStorageFiles&&(StorageFile.migrate(p),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted|| +(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(A){if(!A||"1"==urlParams.forceMigration){var E=document.createElement("iframe");E.style.display="none";E.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(E);var z=!0,B=!1,J,M=0,v=mxUtils.bind(this,function(){B=!0;this.setDatabaseItem(".drawioMigrated3",!0);E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke", +funtionName:"setMigratedFlag"}),"*")}),u=mxUtils.bind(this,function(){M++;G()}),G=mxUtils.bind(this,function(){try{if(M>=J.length)v();else{var F=J[M];StorageFile.getFileContent(this,F,mxUtils.bind(this,function(L){null==L||".scratchpad"==F&&L==this.emptyLibraryXml?E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[F]}),"*"):u()}),u)}}catch(L){console.log(L)}}),I=mxUtils.bind(this,function(F){try{this.setDatabaseItem(null,[{title:F.title, +size:F.data.length,lastModified:Date.now(),type:F.isLib?"L":"F"},{title:F.title,data:F.data}],u,u,["filesInfo","files"])}catch(L){console.log(L)}});A=mxUtils.bind(this,function(F){try{if(F.source==E.contentWindow){var L={};try{L=JSON.parse(F.data)}catch(K){}"init"==L.event?(E.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=L.event||B|| +(z?null!=L.resp&&0<L.resp.length&&null!=L.resp[0]?(J=L.resp[0],z=!1,G()):v():null!=L.resp&&0<L.resp.length&&null!=L.resp[0]?I(L.resp[0]):u())}}catch(K){console.log(K)}});window.addEventListener("message",A)}})));d(p);p.onversionchange=function(){p.close()}});n.onerror=g;n.onblocked=function(){}}catch(q){null!=g&&g(q)}else null!=g&&g()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,g,k,n,q){this.openDatabase(mxUtils.bind(this,function(p){try{q=q||"objects";Array.isArray(q)||(q= +[q],d=[d],g=[g]);var A=p.transaction(q,"readwrite");A.oncomplete=k;A.onerror=n;for(p=0;p<q.length;p++)A.objectStore(q[p]).put(null!=d&&null!=d[p]?{key:d[p],data:g[p]}:g[p])}catch(E){null!=n&&n(E)}}),n)};EditorUi.prototype.removeDatabaseItem=function(d,g,k,n){this.openDatabase(mxUtils.bind(this,function(q){n=n||"objects";Array.isArray(n)||(n=[n],d=[d]);q=q.transaction(n,"readwrite");q.oncomplete=g;q.onerror=k;for(var p=0;p<n.length;p++)q.objectStore(n[p]).delete(d[p])}),k)};EditorUi.prototype.getDatabaseItem= +function(d,g,k,n){this.openDatabase(mxUtils.bind(this,function(q){try{n=n||"objects";var p=q.transaction([n],"readonly").objectStore(n).get(d);p.onsuccess=function(){g(p.result)};p.onerror=k}catch(A){null!=k&&k(A)}}),k)};EditorUi.prototype.getDatabaseItems=function(d,g,k){this.openDatabase(mxUtils.bind(this,function(n){try{k=k||"objects";var q=n.transaction([k],"readonly").objectStore(k).openCursor(IDBKeyRange.lowerBound(0)),p=[];q.onsuccess=function(A){null==A.target.result?d(p):(p.push(A.target.result.value), +A.target.result.continue())};q.onerror=g}catch(A){null!=g&&g(A)}}),g)};EditorUi.prototype.getDatabaseItemKeys=function(d,g,k){this.openDatabase(mxUtils.bind(this,function(n){try{k=k||"objects";var q=n.transaction([k],"readonly").objectStore(k).getAllKeys();q.onsuccess=function(){d(q.result)};q.onerror=g}catch(p){null!=g&&g(p)}}),g)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d= +this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(d,g){var k=this.getCurrentFile();null!=k?k.getComments(d,g):d([])};EditorUi.prototype.addComment=function(d,g,k){var n=this.getCurrentFile();null!=n?n.addComment(d,g,k):g(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var d=this.getCurrentFile();return null!=d? +d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,g){var k=this.getCurrentFile();return null!=k?k.newComment(d,g):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,g)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(d,g){var k=this.getCurrentFile();null!= +k&&k.getRevisions?k.getRevisions(d,g):g({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,g,k,n,q,p,A,E){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl"); +return this.editor.loadUrl(d,g,k,n,q,p,A,E)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,g)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts"); +return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,g,k,n,q,p,A,E,z,B,J,M,v,u,G,I){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,g,k,n,q,p,A,E,z,B,J,M,v,u,G,I)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,g,k,n){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages"); +return this.editor.convertImages(d,g,k,n)};EditorUi.prototype.convertImageToDataUri=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,g)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,g,k,n){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,g,k,n)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32"); +return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,g,k,n,q){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,g,k,n,q)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],g=0;g<localStorage.length;g++){var k=localStorage.key(g),n=localStorage.getItem(k);if(0<k.length&&(".scratchpad"==k||"."!=k.charAt(0))&&0<n.length){var q= +"<mxfile "===n.substring(0,8)||"<?xml"===n.substring(0,5)||"\x3c!--[if IE]>"===n.substring(0,12);n="<mxlibrary>"===n.substring(0,11);(q||n)&&d.push(k)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var g=localStorage.getItem(d);return{title:d,data:g,isLib:"<mxlibrary>"===g.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})(); +var CommentsWindow=function(b,e,f,c,l,m){function x(){for(var F=B.getElementsByTagName("div"),L=0,K=0;K<F.length;K++)"none"!=F[K].style.display&&F[K].parentNode==B&&L++;J.style.display=0==L?"block":"none"}function y(F,L,K,H){function Q(){L.removeChild(V);L.removeChild(W);T.style.display="block";U.style.display="block"}A={div:L,comment:F,saveCallback:K,deleteOnCancel:H};var U=L.querySelector(".geCommentTxt"),T=L.querySelector(".geCommentActionsList"),V=document.createElement("textarea");V.className= +"geCommentEditTxtArea";V.style.minHeight=U.offsetHeight+"px";V.value=F.content;L.insertBefore(V,U);var W=document.createElement("div");W.className="geCommentEditBtns";var t=mxUtils.button(mxResources.get("cancel"),function(){H?(L.parentNode.removeChild(L),x()):Q();A=null});t.className="geCommentEditBtn";W.appendChild(t);var C=mxUtils.button(mxResources.get("save"),function(){U.innerText="";F.content=V.value;mxUtils.write(U,F.content);Q();K(F);A=null});mxEvent.addListener(V,"keydown",mxUtils.bind(this, +function(N){mxEvent.isConsumed(N)||((mxEvent.isControlDown(N)||mxClient.IS_MAC&&mxEvent.isMetaDown(N))&&13==N.keyCode?(C.click(),mxEvent.consume(N)):27==N.keyCode&&(t.click(),mxEvent.consume(N)))}));C.focus();C.className="geCommentEditBtn gePrimaryBtn";W.appendChild(C);L.insertBefore(W,U);T.style.display="none";U.style.display="none";V.focus()}function D(F,L){L.innerText="";F=new Date(F.modifiedDate);var K=b.timeSince(F);null==K&&(K=mxResources.get("lessThanAMinute"));mxUtils.write(L,mxResources.get("timeAgo", +[K],"{1} ago"));L.setAttribute("title",F.toLocaleDateString()+" "+F.toLocaleTimeString())}function d(F){var L=document.createElement("img");L.className="geCommentBusyImg";L.src=IMAGE_PATH+"/spin.gif";F.appendChild(L);F.busyImg=L}function g(F){F.style.border="1px solid red";F.removeChild(F.busyImg)}function k(F){F.style.border="";F.removeChild(F.busyImg)}function n(F,L,K,H,Q){function U(O,P,S){var X=document.createElement("li");X.className="geCommentAction";var aa=document.createElement("a");aa.className= +"geCommentActionLnk";mxUtils.write(aa,O);X.appendChild(aa);mxEvent.addListener(aa,"click",function(Y){P(Y,F);Y.preventDefault();mxEvent.consume(Y)});R.appendChild(X);S&&(X.style.display="none")}function T(){function O(X){P.push(S);if(null!=X.replies)for(var aa=0;aa<X.replies.length;aa++)S=S.nextSibling,O(X.replies[aa])}var P=[],S=W;O(F);return{pdiv:S,replies:P}}function V(O,P,S,X,aa){function Y(){d(ma);F.addReply(ea,function(ia){ea.id=ia;F.replies.push(ea);k(ma);S&&S()},function(ia){Z();g(ma);b.handleError(ia, +null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},X,aa)}function Z(){y(ea,ma,function(ia){Y()},!0)}var ba=T().pdiv,ea=b.newComment(O,b.getCurrentUser());ea.pCommentId=F.id;null==F.replies&&(F.replies=[]);var ma=n(ea,F.replies,ba,H+1);P?Z():Y()}if(Q||!F.isResolved){J.style.display="none";var W=document.createElement("div");W.className="geCommentContainer";W.setAttribute("data-commentId",F.id);W.style.marginLeft=20*H+5+"px";F.isResolved&&!Editor.isDarkMode()&&(W.style.backgroundColor= +"ghostWhite");var t=document.createElement("div");t.className="geCommentHeader";var C=document.createElement("img");C.className="geCommentUserImg";C.src=F.user.pictureUrl||Editor.userImage;t.appendChild(C);C=document.createElement("div");C.className="geCommentHeaderTxt";t.appendChild(C);var N=document.createElement("div");N.className="geCommentUsername";mxUtils.write(N,F.user.displayName||"");C.appendChild(N);N=document.createElement("div");N.className="geCommentDate";N.setAttribute("data-commentId", +F.id);D(F,N);C.appendChild(N);W.appendChild(t);t=document.createElement("div");t.className="geCommentTxt";mxUtils.write(t,F.content||"");W.appendChild(t);F.isLocked&&(W.style.opacity="0.5");t=document.createElement("div");t.className="geCommentActions";var R=document.createElement("ul");R.className="geCommentActionsList";t.appendChild(R);q||F.isLocked||0!=H&&!p||U(mxResources.get("reply"),function(){V("",!0)},F.isResolved);C=b.getCurrentUser();null==C||C.id!=F.user.id||q||F.isLocked||(U(mxResources.get("edit"), +function(){function O(){y(F,W,function(){d(W);F.editComment(F.content,function(){k(W)},function(P){g(W);O();b.handleError(P,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}O()},F.isResolved),U(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){d(W);F.deleteComment(function(O){if(!0===O){O=W.querySelector(".geCommentTxt");O.innerText="";mxUtils.write(O,mxResources.get("msgDeleted"));var P=W.querySelectorAll(".geCommentAction");for(O= +0;O<P.length;O++)P[O].parentNode.removeChild(P[O]);k(W);W.style.opacity="0.5"}else{P=T(F).replies;for(O=0;O<P.length;O++)B.removeChild(P[O]);for(O=0;O<L.length;O++)if(L[O]==F){L.splice(O,1);break}J.style.display=0==B.getElementsByTagName("div").length?"block":"none"}},function(O){g(W);b.handleError(O,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},F.isResolved));q||F.isLocked||0!=H||U(F.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(O){function P(){var S= +O.target;S.innerText="";F.isResolved=!F.isResolved;mxUtils.write(S,F.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var X=F.isResolved?"none":"",aa=T(F).replies,Y=Editor.isDarkMode()?"transparent":F.isResolved?"ghostWhite":"white",Z=0;Z<aa.length;Z++){aa[Z].style.backgroundColor=Y;for(var ba=aa[Z].querySelectorAll(".geCommentAction"),ea=0;ea<ba.length;ea++)ba[ea]!=S.parentNode&&(ba[ea].style.display=X);u||(aa[Z].style.display="none")}x()}F.isResolved?V(mxResources.get("reOpened")+ +": ",!0,P,!1,!0):V(mxResources.get("markedAsResolved"),!1,P,!0)});W.appendChild(t);null!=K?B.insertBefore(W,K.nextSibling):B.appendChild(W);for(K=0;null!=F.replies&&K<F.replies.length;K++)t=F.replies[K],t.isResolved=F.isResolved,n(t,F.replies,null,H+1,Q);null!=A&&(A.comment.id==F.id?(Q=F.content,F.content=A.comment.content,y(F,W,A.saveCallback,A.deleteOnCancel),F.content=Q):null==A.comment.id&&A.comment.pCommentId==F.id&&(B.appendChild(A.div),y(A.comment,A.div,A.saveCallback,A.deleteOnCancel)));return W}} +var q=!b.canComment(),p=b.canReplyToReplies(),A=null,E=document.createElement("div");E.className="geCommentsWin";E.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var z=EditorUi.compactUi?"26px":"30px",B=document.createElement("div");B.className="geCommentsList";B.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";B.style.bottom=parseInt(z)+7+"px";E.appendChild(B);var J=document.createElement("span");J.style.cssText="display:none;padding-top:10px;text-align:center;"; +mxUtils.write(J,mxResources.get("noCommentsFound"));var M=document.createElement("div");M.className="geToolbarContainer geCommentsToolbar";M.style.height=z;M.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";M.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";z=document.createElement("a");z.className="geButton";if(!q){var v=z.cloneNode();v.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';v.setAttribute("title",mxResources.get("create")+ +"...");mxEvent.addListener(v,"click",function(F){function L(){y(K,H,function(Q){d(H);b.addComment(Q,function(U){Q.id=U;G.push(Q);k(H)},function(U){g(H);L();b.handleError(U,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var K=b.newComment("",b.getCurrentUser()),H=n(K,G,null,0);L();F.preventDefault();mxEvent.consume(F)});M.appendChild(v)}v=z.cloneNode();v.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';v.setAttribute("title",mxResources.get("showResolved")); +v.className="geAdaptiveAsset";var u=!1;mxEvent.addListener(v,"click",function(F){this.className=(u=!u)?"geButton geCheckedBtn":"geButton";I();F.preventDefault();mxEvent.consume(F)});M.appendChild(v);b.commentsRefreshNeeded()&&(v=z.cloneNode(),v.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',v.setAttribute("title",mxResources.get("refresh")),v.className="geAdaptiveAsset",mxEvent.addListener(v,"click",function(F){I();F.preventDefault();mxEvent.consume(F)}),M.appendChild(v)); +b.commentsSaveNeeded()&&(z=z.cloneNode(),z.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',z.setAttribute("title",mxResources.get("save")),z.className="geAdaptiveAsset",mxEvent.addListener(z,"click",function(F){m();F.preventDefault();mxEvent.consume(F)}),M.appendChild(z));E.appendChild(M);var G=[],I=mxUtils.bind(this,function(){this.hasError=!1;if(null!=A)try{A.div=A.div.cloneNode(!0);var F=A.div.querySelector(".geCommentEditTxtArea"),L=A.div.querySelector(".geCommentEditBtns"); +A.comment.content=F.value;F.parentNode.removeChild(F);L.parentNode.removeChild(L)}catch(K){b.handleError(K)}B.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";p=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(K){function H(Q){if(null!=Q){Q.sort(function(T,V){return new Date(T.modifiedDate)-new Date(V.modifiedDate)});for(var U=0;U<Q.length;U++)H(Q[U].replies)}} +K.sort(function(Q,U){return new Date(Q.modifiedDate)-new Date(U.modifiedDate)});B.innerText="";B.appendChild(J);J.style.display="block";G=K;for(K=0;K<G.length;K++)H(G[K].replies),n(G[K],G,null,0,u);null!=A&&null==A.comment.id&&null==A.comment.pCommentId&&(B.appendChild(A.div),y(A.comment,A.div,A.saveCallback,A.deleteOnCancel))},mxUtils.bind(this,function(K){B.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(K&&K.message?": "+K.message:""));this.hasError=!0})):B.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))}); +I();this.refreshComments=I;M=mxUtils.bind(this,function(){function F(U){var T=K[U.id];if(null!=T)for(D(U,T),T=0;null!=U.replies&&T<U.replies.length;T++)F(U.replies[T])}if(this.window.isVisible()){for(var L=B.querySelectorAll(".geCommentDate"),K={},H=0;H<L.length;H++){var Q=L[H];K[Q.getAttribute("data-commentId")]=Q}for(H=0;H<G.length;H++)F(G[H])}});setInterval(M,6E4);this.refreshCommentsTime=M;this.window=new mxWindow(mxResources.get("comments"),E,e,f,c,l,!0,!0);this.window.minimumSize=new mxRectangle(0, +0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,f,c,l,m,x,y,D,d,g){var k=document.createElement("div");k.style.textAlign="center";g=null!=g?g:44;var n=document.createElement("div");n.style.padding="6px";n.style.overflow="auto";n.style.maxHeight=g+ +"px";n.style.lineHeight="1.2em";mxUtils.write(n,e);k.appendChild(n);null!=d&&(n=document.createElement("div"),n.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",d),n.appendChild(e),k.appendChild(n));d=document.createElement("div");d.style.textAlign="center";d.style.whiteSpace="nowrap";var q=document.createElement("input");q.setAttribute("type","checkbox");m=mxUtils.button(m||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c(q.checked)});m.className="geBtn"; +null!=y&&(m.innerHTML=y+"<br>"+m.innerHTML,m.style.paddingBottom="8px",m.style.paddingTop="8px",m.style.height="auto",m.style.width="40%");b.editor.cancelFirst&&d.appendChild(m);var p=mxUtils.button(l||mxResources.get("ok"),function(){b.hideDialog();null!=f&&f(q.checked)});d.appendChild(p);null!=x?(p.innerHTML=x+"<br>"+p.innerHTML+"<br>",p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.className="geBtn",p.style.width="40%"):p.className="geBtn gePrimaryBtn";b.editor.cancelFirst|| +d.appendChild(m);k.appendChild(d);D?(d.style.marginTop="10px",n=document.createElement("p"),n.style.marginTop="20px",n.style.marginBottom="0px",n.appendChild(q),l=document.createElement("span"),mxUtils.write(l," "+mxResources.get("rememberThisSetting")),n.appendChild(l),k.appendChild(n),mxEvent.addListener(l,"click",function(A){q.checked=!q.checked;mxEvent.consume(A)})):d.style.marginTop="12px";this.init=function(){p.focus()};this.container=k};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0}; EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,overlays:!0,mxObjectId:!0,mxTransient:!0};EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.applyPatches=function(b,e,f,c,l){if(null!=e)for(var m=0;m<e.length;m++)null!=e[m]&&(b=this.patchPages(b,e[m],f,c,l));return b}; -EditorUi.prototype.patchPages=function(b,e,f,c,l){var m={},x=[],z={},C={},d={},g={};if(null!=c&&null!=c[EditorUi.DIFF_UPDATE])for(var k in c[EditorUi.DIFF_UPDATE])m[k]=c[EditorUi.DIFF_UPDATE][k];if(null!=e[EditorUi.DIFF_REMOVE])for(c=0;c<e[EditorUi.DIFF_REMOVE].length;c++)C[e[EditorUi.DIFF_REMOVE][c]]=!0;if(null!=e[EditorUi.DIFF_INSERT])for(c=0;c<e[EditorUi.DIFF_INSERT].length;c++)z[e[EditorUi.DIFF_INSERT][c].previous]=e[EditorUi.DIFF_INSERT][c];if(null!=e[EditorUi.DIFF_UPDATE])for(k in e[EditorUi.DIFF_UPDATE])c= -e[EditorUi.DIFF_UPDATE][k],null!=c.previous&&(g[c.previous]=k);if(null!=b){var n="";for(c=0;c<b.length;c++){var t=b[c].getId();d[t]=b[c];null!=g[n]||C[t]||null!=e[EditorUi.DIFF_UPDATE]&&null!=e[EditorUi.DIFF_UPDATE][t]&&null!=e[EditorUi.DIFF_UPDATE][t].previous||(g[n]=t);n=t}}var p={},A=mxUtils.bind(this,function(y){var B=null!=y?y.getId():"";if(null!=y&&!p[B]){p[B]=!0;x.push(y);var J=null!=e[EditorUi.DIFF_UPDATE]?e[EditorUi.DIFF_UPDATE][B]:null;null!=J&&(this.updatePageRoot(y),null!=J.name&&y.setName(J.name), -null!=J.view&&this.patchViewState(y,J.view),null!=J.cells&&this.patchPage(y,J.cells,m[y.getId()],l),!f||null==J.cells&&null==J.view||(y.needsUpdate=!0))}y=g[B];null!=y&&(delete g[B],A(d[y]));y=z[B];null!=y&&(delete z[B],E(y))}),E=mxUtils.bind(this,function(y){y=mxUtils.parseXml(y.data).documentElement;y=new DiagramPage(y);this.updatePageRoot(y);var B=d[y.getId()];null==B?A(y):(this.patchPage(B,this.diffPages([B],[y]),m[B.getId()],l),f&&(B.needsUpdate=!0))});A();for(k in g)A(d[g[k]]),delete g[k];for(k in z)E(z[k]), -delete z[k];return x};EditorUi.prototype.patchViewState=function(b,e){if(null!=b.viewState&&null!=e){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var f in e)try{this.patchViewStateProperty(b,e,f)}catch(c){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,e,f){b.viewState[f]=JSON.parse(e[f])}; -EditorUi.prototype.createParentLookup=function(b,e){function f(d){var g=c[d];null==g&&(g={inserted:[],moved:{}},c[d]=g);return g}var c={};if(null!=e[EditorUi.DIFF_INSERT])for(var l=0;l<e[EditorUi.DIFF_INSERT].length;l++){var m=e[EditorUi.DIFF_INSERT][l],x=null!=m.parent?m.parent:"",z=null!=m.previous?m.previous:"";f(x).inserted[z]=m}if(null!=e[EditorUi.DIFF_UPDATE])for(var C in e[EditorUi.DIFF_UPDATE])m=e[EditorUi.DIFF_UPDATE][C],null!=m.previous&&(x=m.parent,null==x&&(l=b.getCell(C),null!=l&&(l= -b.getParent(l),null!=l&&(x=l.getId()))),null!=x&&(f(x).moved[m.previous]=C));return c}; -EditorUi.prototype.patchPage=function(b,e,f,c){var l=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),m=this.createParentLookup(l,e);l.beginUpdate();try{var x=l.updateEdgeParent,z=new mxDictionary,C=[];l.updateEdgeParent=function(E,y){!z.get(E)&&c&&(z.put(E,!0),C.push(E))};var d=m[""],g=null!=d&&null!=d.inserted?d.inserted[""]:null,k=null;null!=g&&(k=this.getCellForJson(g));if(null==k){var n=null!=d&&null!=d.moved?d.moved[""]:null;null!=n&&(k=l.getCell(n))}null!=k&&(l.setRoot(k), -b.root=k);this.patchCellRecursive(b,l,l.root,m,e);if(null!=e[EditorUi.DIFF_REMOVE])for(var t=0;t<e[EditorUi.DIFF_REMOVE].length;t++){var p=l.getCell(e[EditorUi.DIFF_REMOVE][t]);null!=p&&l.remove(p)}if(null!=e[EditorUi.DIFF_UPDATE]){var A=null!=f&&null!=f.cells?f.cells[EditorUi.DIFF_UPDATE]:null;for(n in e[EditorUi.DIFF_UPDATE])this.patchCell(l,l.getCell(n),e[EditorUi.DIFF_UPDATE][n],null!=A?A[n]:null)}if(null!=e[EditorUi.DIFF_INSERT])for(t=0;t<e[EditorUi.DIFF_INSERT].length;t++)g=e[EditorUi.DIFF_INSERT][t], -p=l.getCell(g.id),null!=p&&(l.setTerminal(p,l.getCell(g.source),!0),l.setTerminal(p,l.getCell(g.target),!1));l.updateEdgeParent=x;if(c&&0<C.length)for(t=0;t<C.length;t++)l.contains(C[t])&&l.updateEdgeParent(C[t])}finally{l.endUpdate()}}; -EditorUi.prototype.patchCellRecursive=function(b,e,f,c,l){if(null!=f){var m=c[f.getId()],x=null!=m&&null!=m.inserted?m.inserted:{};m=null!=m&&null!=m.moved?m.moved:{};for(var z=0,C=e.getChildCount(f),d="",g=0;g<C;g++){var k=e.getChildAt(f,g).getId();null==m[d]&&(null==l[EditorUi.DIFF_UPDATE]||null==l[EditorUi.DIFF_UPDATE][k]||null==l[EditorUi.DIFF_UPDATE][k].previous&&null==l[EditorUi.DIFF_UPDATE][k].parent)&&(m[d]=k);d=k}C=mxUtils.bind(this,function(n,t){var p=null!=n?n.getId():"";null!=n&&t&&(t= -e.getCell(p),null!=t&&t!=n&&(n=null));null!=n&&(e.getChildAt(f,z)!=n&&e.add(f,n,z),this.patchCellRecursive(b,e,n,c,l),z++);return p});for(d=[null];0<d.length;)if(g=d.shift(),g=C(null!=g?g.child:null,null!=g?g.insert:!1),k=m[g],null!=k&&(delete m[g],d.push({child:e.getCell(k)})),k=x[g],null!=k&&(delete x[g],d.push({child:this.getCellForJson(k),insert:!0})),0==d.length){for(g in m)d.push({child:e.getCell(m[g])}),delete m[g];for(g in x)d.push({child:this.getCellForJson(x[g]),insert:!0}),delete x[g]}}}; +EditorUi.prototype.patchPages=function(b,e,f,c,l){var m={},x=[],y={},D={},d={},g={};if(null!=c&&null!=c[EditorUi.DIFF_UPDATE])for(var k in c[EditorUi.DIFF_UPDATE])m[k]=c[EditorUi.DIFF_UPDATE][k];if(null!=e[EditorUi.DIFF_REMOVE])for(c=0;c<e[EditorUi.DIFF_REMOVE].length;c++)D[e[EditorUi.DIFF_REMOVE][c]]=!0;if(null!=e[EditorUi.DIFF_INSERT])for(c=0;c<e[EditorUi.DIFF_INSERT].length;c++)y[e[EditorUi.DIFF_INSERT][c].previous]=e[EditorUi.DIFF_INSERT][c];if(null!=e[EditorUi.DIFF_UPDATE])for(k in e[EditorUi.DIFF_UPDATE])c= +e[EditorUi.DIFF_UPDATE][k],null!=c.previous&&(g[c.previous]=k);if(null!=b){var n="";for(c=0;c<b.length;c++){var q=b[c].getId();d[q]=b[c];null!=g[n]||D[q]||null!=e[EditorUi.DIFF_UPDATE]&&null!=e[EditorUi.DIFF_UPDATE][q]&&null!=e[EditorUi.DIFF_UPDATE][q].previous||(g[n]=q);n=q}}var p={},A=mxUtils.bind(this,function(z){var B=null!=z?z.getId():"";if(null!=z&&!p[B]){p[B]=!0;x.push(z);var J=null!=e[EditorUi.DIFF_UPDATE]?e[EditorUi.DIFF_UPDATE][B]:null;null!=J&&(this.updatePageRoot(z),null!=J.name&&z.setName(J.name), +null!=J.view&&this.patchViewState(z,J.view),null!=J.cells&&this.patchPage(z,J.cells,m[z.getId()],l),!f||null==J.cells&&null==J.view||(z.needsUpdate=!0))}z=g[B];null!=z&&(delete g[B],A(d[z]));z=y[B];null!=z&&(delete y[B],E(z))}),E=mxUtils.bind(this,function(z){z=mxUtils.parseXml(z.data).documentElement;z=new DiagramPage(z);this.updatePageRoot(z);var B=d[z.getId()];null==B?A(z):(this.patchPage(B,this.diffPages([B],[z]),m[B.getId()],l),f&&(B.needsUpdate=!0))});A();for(k in g)A(d[g[k]]),delete g[k];for(k in y)E(y[k]), +delete y[k];return x};EditorUi.prototype.patchViewState=function(b,e){if(null!=b.viewState&&null!=e){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var f in e)try{this.patchViewStateProperty(b,e,f)}catch(c){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,e,f){b.viewState[f]=JSON.parse(e[f])}; +EditorUi.prototype.createParentLookup=function(b,e){function f(d){var g=c[d];null==g&&(g={inserted:[],moved:{}},c[d]=g);return g}var c={};if(null!=e[EditorUi.DIFF_INSERT])for(var l=0;l<e[EditorUi.DIFF_INSERT].length;l++){var m=e[EditorUi.DIFF_INSERT][l],x=null!=m.parent?m.parent:"",y=null!=m.previous?m.previous:"";f(x).inserted[y]=m}if(null!=e[EditorUi.DIFF_UPDATE])for(var D in e[EditorUi.DIFF_UPDATE])m=e[EditorUi.DIFF_UPDATE][D],null!=m.previous&&(x=m.parent,null==x&&(l=b.getCell(D),null!=l&&(l= +b.getParent(l),null!=l&&(x=l.getId()))),null!=x&&(f(x).moved[m.previous]=D));return c}; +EditorUi.prototype.patchPage=function(b,e,f,c){var l=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),m=this.createParentLookup(l,e);l.beginUpdate();try{var x=l.updateEdgeParent,y=new mxDictionary,D=[];l.updateEdgeParent=function(E,z){!y.get(E)&&c&&(y.put(E,!0),D.push(E))};var d=m[""],g=null!=d&&null!=d.inserted?d.inserted[""]:null,k=null;null!=g&&(k=this.getCellForJson(g));if(null==k){var n=null!=d&&null!=d.moved?d.moved[""]:null;null!=n&&(k=l.getCell(n))}null!=k&&(l.setRoot(k), +b.root=k);this.patchCellRecursive(b,l,l.root,m,e);if(null!=e[EditorUi.DIFF_REMOVE])for(var q=0;q<e[EditorUi.DIFF_REMOVE].length;q++){var p=l.getCell(e[EditorUi.DIFF_REMOVE][q]);null!=p&&l.remove(p)}if(null!=e[EditorUi.DIFF_UPDATE]){var A=null!=f&&null!=f.cells?f.cells[EditorUi.DIFF_UPDATE]:null;for(n in e[EditorUi.DIFF_UPDATE])this.patchCell(l,l.getCell(n),e[EditorUi.DIFF_UPDATE][n],null!=A?A[n]:null)}if(null!=e[EditorUi.DIFF_INSERT])for(q=0;q<e[EditorUi.DIFF_INSERT].length;q++)g=e[EditorUi.DIFF_INSERT][q], +p=l.getCell(g.id),null!=p&&(l.setTerminal(p,l.getCell(g.source),!0),l.setTerminal(p,l.getCell(g.target),!1));l.updateEdgeParent=x;if(c&&0<D.length)for(q=0;q<D.length;q++)l.contains(D[q])&&l.updateEdgeParent(D[q])}finally{l.endUpdate()}}; +EditorUi.prototype.patchCellRecursive=function(b,e,f,c,l){if(null!=f){var m=c[f.getId()],x=null!=m&&null!=m.inserted?m.inserted:{};m=null!=m&&null!=m.moved?m.moved:{};for(var y=0,D=e.getChildCount(f),d="",g=0;g<D;g++){var k=e.getChildAt(f,g).getId();null==m[d]&&(null==l[EditorUi.DIFF_UPDATE]||null==l[EditorUi.DIFF_UPDATE][k]||null==l[EditorUi.DIFF_UPDATE][k].previous&&null==l[EditorUi.DIFF_UPDATE][k].parent)&&(m[d]=k);d=k}D=mxUtils.bind(this,function(n,q){var p=null!=n?n.getId():"";null!=n&&q&&(q= +e.getCell(p),null!=q&&q!=n&&(n=null));null!=n&&(e.getChildAt(f,y)!=n&&e.add(f,n,y),this.patchCellRecursive(b,e,n,c,l),y++);return p});for(d=[null];0<d.length;)if(g=d.shift(),g=D(null!=g?g.child:null,null!=g?g.insert:!1),k=m[g],null!=k&&(delete m[g],d.push({child:e.getCell(k)})),k=x[g],null!=k&&(delete x[g],d.push({child:this.getCellForJson(k),insert:!0})),0==d.length){for(g in m)d.push({child:e.getCell(m[g])}),delete m[g];for(g in x)d.push({child:this.getCellForJson(x[g]),insert:!0}),delete x[g]}}}; EditorUi.prototype.patchCell=function(b,e,f,c){if(null!=e&&null!=f){if(null==c||null==c.xmlValue&&(null==c.value||""==c.value))"value"in f?b.setValue(e,f.value):null!=f.xmlValue&&b.setValue(e,mxUtils.parseXml(f.xmlValue).documentElement);null!=c&&null!=c.style||null==f.style||b.setStyle(e,f.style);null!=f.visible&&b.setVisible(e,1==f.visible);null!=f.collapsed&&b.setCollapsed(e,1==f.collapsed);null!=f.vertex&&(e.vertex=1==f.vertex);null!=f.edge&&(e.edge=1==f.edge);null!=f.connectable&&(e.connectable= 1==f.connectable);null!=f.geometry&&b.setGeometry(e,this.codec.decode(mxUtils.parseXml(f.geometry).documentElement));null!=f.source&&b.setTerminal(e,b.getCell(f.source),!0);null!=f.target&&b.setTerminal(e,b.getCell(f.target),!1);for(var l in f)this.cellProperties[l]||(e[l]=f[l])}};EditorUi.prototype.getXmlForPages=function(b){b=this.getNodeForPages(b);var e=null;null!=b&&(e=mxUtils.getXml(b));return e}; EditorUi.prototype.getNodeForPages=function(b){var e=null;if(null!=this.fileNode&&null!=b){e=this.fileNode.cloneNode(!1);for(var f=0;f<b.length;f++){var c=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b[f].root));this.editor.graph.saveViewState(b[f].viewState,c);var l=b[f].node.cloneNode(!1);l.appendChild(c);e.appendChild(l)}}return e};EditorUi.prototype.getPagesForXml=function(b){b=mxUtils.parseXml(b);return this.getPagesForNode(b.documentElement)}; EditorUi.prototype.getPagesForNode=function(b,e){var f=this.editor.extractGraphModel(b,!0,!0);null!=f&&(b=f);e=b.getElementsByTagName(e||"diagram");f=[];if(0<e.length)for(b=0;b<e.length;b++){var c=new DiagramPage(e[b]);this.updatePageRoot(c,!0);f.push(c)}else"mxGraphModel"==b.nodeName&&(c=new DiagramPage(b.ownerDocument.createElement("diagram")),c.setName(mxResources.get("pageWithNumber",[1])),mxUtils.setTextContent(c.node,Graph.compressNode(b,!0)),f.push(c));return f}; -EditorUi.prototype.diffPages=function(b,e){var f=[],c=[],l={},m={},x={},z=null;if(null!=b&&null!=e){for(var C=0;C<e.length;C++)m[e[C].getId()]={page:e[C],prev:z},z=e[C];z=null;for(C=0;C<b.length;C++){var d=b[C].getId();e=m[d];if(null==e)c.push(d);else{var g=this.diffPage(b[C],e.page),k={};mxUtils.isEmptyObject(g)||(k.cells=g);g=this.diffViewState(b[C],e.page);mxUtils.isEmptyObject(g)||(k.view=g);if((null!=e.prev?null==z:null!=z)||null!=z&&null!=e.prev&&z.getId()!=e.prev.getId())k.previous=null!=e.prev? -e.prev.getId():"";null!=e.page.getName()&&b[C].getName()!=e.page.getName()&&(k.name=e.page.getName());mxUtils.isEmptyObject(k)||(x[d]=k)}delete m[b[C].getId()];z=b[C]}for(d in m)e=m[d],f.push({data:mxUtils.getXml(e.page.node),previous:null!=e.prev?e.prev.getId():""});mxUtils.isEmptyObject(x)||(l[EditorUi.DIFF_UPDATE]=x);0<c.length&&(l[EditorUi.DIFF_REMOVE]=c);0<f.length&&(l[EditorUi.DIFF_INSERT]=f)}return l}; +EditorUi.prototype.diffPages=function(b,e){var f=[],c=[],l={},m={},x={},y=null;if(null!=b&&null!=e){for(var D=0;D<e.length;D++)m[e[D].getId()]={page:e[D],prev:y},y=e[D];y=null;for(D=0;D<b.length;D++){var d=b[D].getId();e=m[d];if(null==e)c.push(d);else{var g=this.diffPage(b[D],e.page),k={};mxUtils.isEmptyObject(g)||(k.cells=g);g=this.diffViewState(b[D],e.page);mxUtils.isEmptyObject(g)||(k.view=g);if((null!=e.prev?null==y:null!=y)||null!=y&&null!=e.prev&&y.getId()!=e.prev.getId())k.previous=null!=e.prev? +e.prev.getId():"";null!=e.page.getName()&&b[D].getName()!=e.page.getName()&&(k.name=e.page.getName());mxUtils.isEmptyObject(k)||(x[d]=k)}delete m[b[D].getId()];y=b[D]}for(d in m)e=m[d],f.push({data:mxUtils.getXml(e.page.node),previous:null!=e.prev?e.prev.getId():""});mxUtils.isEmptyObject(x)||(l[EditorUi.DIFF_UPDATE]=x);0<c.length&&(l[EditorUi.DIFF_REMOVE]=c);0<f.length&&(l[EditorUi.DIFF_INSERT]=f)}return l}; EditorUi.prototype.createCellLookup=function(b,e,f){f=null!=f?f:{};f[b.getId()]={cell:b,prev:e};var c=b.getChildCount();e=null;for(var l=0;l<c;l++){var m=b.getChildAt(l);this.createCellLookup(m,e,f);e=m}return f}; -EditorUi.prototype.diffCellRecursive=function(b,e,f,c,l){c=null!=c?c:{};var m=f[b.getId()];delete f[b.getId()];if(null==m)l.push(b.getId());else{var x=this.diffCell(b,m.cell);if(null!=x.parent||(null!=m.prev?null==e:null!=e)||null!=e&&null!=m.prev&&e.getId()!=m.prev.getId())x.previous=null!=m.prev?m.prev.getId():"";mxUtils.isEmptyObject(x)||(c[b.getId()]=x)}m=b.getChildCount();e=null;for(x=0;x<m;x++){var z=b.getChildAt(x);this.diffCellRecursive(z,e,f,c,l);e=z}return c}; +EditorUi.prototype.diffCellRecursive=function(b,e,f,c,l){c=null!=c?c:{};var m=f[b.getId()];delete f[b.getId()];if(null==m)l.push(b.getId());else{var x=this.diffCell(b,m.cell);if(null!=x.parent||(null!=m.prev?null==e:null!=e)||null!=e&&null!=m.prev&&e.getId()!=m.prev.getId())x.previous=null!=m.prev?m.prev.getId():"";mxUtils.isEmptyObject(x)||(c[b.getId()]=x)}m=b.getChildCount();e=null;for(x=0;x<m;x++){var y=b.getChildAt(x);this.diffCellRecursive(y,e,f,c,l);e=y}return c}; EditorUi.prototype.diffPage=function(b,e){var f=[],c=[],l={};this.updatePageRoot(b);this.updatePageRoot(e);e=this.createCellLookup(e.root);var m=this.diffCellRecursive(b.root,null,e,m,c),x;for(x in e)b=e[x],f.push(this.getJsonForCell(b.cell,b.prev));mxUtils.isEmptyObject(m)||(l[EditorUi.DIFF_UPDATE]=m);0<c.length&&(l[EditorUi.DIFF_REMOVE]=c);0<f.length&&(l[EditorUi.DIFF_INSERT]=f);return l}; EditorUi.prototype.diffViewState=function(b,e){b=b.viewState;var f=e.viewState,c={};e==this.currentPage&&(f=this.editor.graph.getViewState());if(null!=b&&null!=f)for(var l in this.viewStateProperties)this.diffViewStateProperty(b,f,l,c);return c};EditorUi.prototype.diffViewStateProperty=function(b,e,f,c){b=JSON.stringify(this.getViewStateProperty(b,f));e=JSON.stringify(this.getViewStateProperty(e,f));b!=e&&(c[f]=e)}; EditorUi.prototype.getViewStateProperty=function(b,e){b=b[e];"backgroundImage"==e&&null!=b&&null!=b.originalSrc?delete b.src:"extFonts"==e&&null==b&&(b=[]);return b}; @@ -11949,11 +11955,12 @@ this.p2pCollab=null))};DrawioFileSync.prototype.initRealtime=function(){this.fil DrawioFileSync.prototype.isConnected=function(){return null!=this.pusher&&null!=this.pusher.connection?"connected"==this.pusher.connection.state:!1}; DrawioFileSync.prototype.updateOnlineState=function(){if("1"!=urlParams.embedRT){var b=mxUtils.bind(this,function(c){mxEvent.addListener(c,"click",mxUtils.bind(this,function(l){if(this.file.isRealtimeEnabled()&&this.file.isRealtimeSupported()){l=this.file.getRealtimeState();var m=mxResources.get("disconnected");this.file.invalidChecksum?m=mxResources.get("error")+": "+mxResources.get("checksum"):this.ui.isOffline(!0)||!this.isConnected()?m=mxResources.get("offline"):1==l&&(m=mxResources.get("online")); this.ui.showError(mxResources.get("realtimeCollaboration"),mxUtils.htmlEntities(m))}else this.enabled=!this.enabled,this.ui.updateButtonContainer(),this.resetUpdateStatusThread(),this.updateOnlineState(),this.updateStatus(),!this.file.inConflictState&&this.enabled&&this.fileChangedNotify()}))});if(null!=this.ui.toolbarContainer&&null==this.collaboratorsElement){var e=document.createElement("a");e.className="geButton geAdaptiveAsset";e.style.position="absolute";e.style.display="inline-block";e.style.verticalAlign= -"bottom";e.style.color="#666";e.style.top="6px";e.style.right="atlas"!=uiTheme?"90px":"50px";e.style.padding="2px";e.style.fontSize="8pt";e.style.verticalAlign="middle";e.style.textDecoration="none";e.style.backgroundPosition="center center";e.style.backgroundRepeat="no-repeat";e.style.backgroundSize="16px 16px";e.style.width="16px";e.style.height="16px";mxUtils.setOpacity(e,60);mxEvent.addListener(e,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(c){c.preventDefault()})); -b(e);this.ui.toolbarContainer.appendChild(e);this.collaboratorsElement=e}if(null!=this.collaboratorsElement){this.collaboratorsElement.style.display="inline-block";var f=Editor.cloudImage;b="";this.enabled?this.file.invalidChecksum?(b=mxResources.get("error")+": "+mxResources.get("checksum"),f=Editor.syncProblemImage):this.ui.isOffline(!0)||!this.isConnected()?(b=mxResources.get("offline"),f=Editor.cloudOffImage):(b=mxResources.get("online"),this.file.isRealtimeEnabled()&&this.file.isRealtimeSupported()&& -(e=this.file.getRealtimeError(),f=this.file.getRealtimeState(),b=mxResources.get("realtimeCollaboration"),1==f?(this.collaboratorsElement.style.display="none",f=Editor.syncImage):(f=Editor.syncProblemImage,b=null!=e&&null!=e.message?b+(" ("+e.message+")"):b+(" ("+mxResources.get("disconnected")+")")))):(b=mxResources.get("disconnected"),f=Editor.cloudOffImage);this.collaboratorsElement.setAttribute("title",b);this.collaboratorsElement.style.backgroundImage="url("+f+")"}}}; -DrawioFileSync.prototype.updateStatus=function(){this.isConnected()&&null!=this.lastActivity&&(Date.now()-this.lastActivity)/1E3>this.inactivityTimeoutSeconds&&this.stop();if(!(this.file.isModified()||this.file.inConflictState||null!=this.file.autosaveThread||this.file.savingFile||this.file.redirectDialogShowing))if(this.enabled&&null!=this.ui.statusContainer){var b=this.ui.timeSince(new Date(this.lastModified));null==b&&(b=mxResources.get("lessThanAMinute"));var e=this.file.isRevisionHistorySupported(), -f=this.lastMessage;this.lastMessage=null;null!=f&&40<f.length&&(f=f.substring(0,40)+"...");b=mxResources.get("lastChange",[b]);this.ui.editor.setStatus('<div title="'+mxUtils.htmlEntities(b)+'">'+mxUtils.htmlEntities(b)+"</div>"+(this.file.isEditable()?"":'<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>")+(this.isConnected()?"":'<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("disconnected"))+"</div>")+(null!=f?' <span title="'+mxUtils.htmlEntities(f)+ +"bottom";e.style.color="#666";e.style.top="6px";e.style.right="atlas"!=uiTheme?"1"!=urlParams["live-ui"]?"90px":"70px":"50px";e.style.padding="2px";e.style.fontSize="8pt";e.style.verticalAlign="middle";e.style.textDecoration="none";e.style.backgroundPosition="center center";e.style.backgroundRepeat="no-repeat";e.style.backgroundSize="16px 16px";e.style.width="16px";e.style.height="16px";mxUtils.setOpacity(e,60);mxEvent.addListener(e,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this, +function(c){c.preventDefault()}));b(e);this.ui.toolbarContainer.appendChild(e);this.collaboratorsElement=e}if(null!=this.collaboratorsElement){this.collaboratorsElement.style.display="inline-block";var f=Editor.cloudImage;b="";this.enabled?this.file.invalidChecksum?(b=mxResources.get("error")+": "+mxResources.get("checksum"),f=Editor.syncProblemImage):this.ui.isOffline(!0)||!this.isConnected()?(b=mxResources.get("offline"),f=Editor.cloudOffImage):(b=mxResources.get("online"),this.file.isRealtimeEnabled()&& +this.file.isRealtimeSupported()&&(e=this.file.getRealtimeError(),f=this.file.getRealtimeState(),b=mxResources.get("realtimeCollaboration"),1==f?(this.collaboratorsElement.style.display="none",f=Editor.syncImage):(f=Editor.syncProblemImage,b=null!=e&&null!=e.message?b+(" ("+e.message+")"):b+(" ("+mxResources.get("disconnected")+")")))):(b=mxResources.get("disconnected"),f=Editor.cloudOffImage);this.collaboratorsElement.setAttribute("title",b);this.collaboratorsElement.style.backgroundImage="url("+ +f+")"}}}; +DrawioFileSync.prototype.updateStatus=function(){this.isConnected()&&null!=this.lastActivity&&(Date.now()-this.lastActivity)/1E3>this.inactivityTimeoutSeconds&&this.stop();if(!(this.file.isModified()||this.file.inConflictState||null!=this.file.autosaveThread||this.file.savingFile||this.file.redirectDialogShowing))if(this.enabled&&null!=this.ui.statusContainer){var b=this.ui.timeSince(new Date(this.lastModified));null==b&&(b=mxResources.get("lessThanAMinute"));var e=this.file.isRevisionHistorySupported(),f= +this.lastMessage;this.lastMessage=null;null!=f&&40<f.length&&(f=f.substring(0,40)+"...");b=mxResources.get("lastChange",[b]);this.ui.editor.setStatus('<div title="'+mxUtils.htmlEntities(b)+'">'+mxUtils.htmlEntities(b)+"</div>"+(this.file.isEditable()?"":'<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>")+(this.isConnected()?"":'<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("disconnected"))+"</div>")+(null!=f?' <span title="'+mxUtils.htmlEntities(f)+ '">('+mxUtils.htmlEntities(f)+")</span>":""));f=this.ui.statusContainer.getElementsByTagName("div");0<f.length&&e&&(f[0].style.display="inline-block",e&&(f[0].style.cursor="pointer",f[0].style.textDecoration="underline",mxEvent.addListener(f[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()}))));e=this.ui.statusContainer.getElementsByTagName("span");if(0<e.length){var c=e[0];c.style.opacity="0";mxUtils.setPrefixedStyle(c.style,"transition","all 0.2s ease");window.setTimeout(mxUtils.bind(this, function(){mxUtils.setOpacity(c,100);mxUtils.setPrefixedStyle(c.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(c,0);window.setTimeout(mxUtils.bind(this,function(){this.updateStatus()}),1E3)}),this.updateStatusInterval/2)}),0)}this.resetUpdateStatusThread()}else this.file.addAllSavedStatus()}; DrawioFileSync.prototype.resetUpdateStatusThread=function(){null!=this.updateStatusThread&&window.clearInterval(this.updateStatusThread);null!=this.channel&&(this.updateStatusThread=window.setInterval(mxUtils.bind(this,function(){this.updateStatus()}),this.updateStatusInterval))};DrawioFileSync.prototype.installListeners=function(){null!=this.pusher&&null!=this.pusher.connection&&this.pusher.connection.bind("state_change",this.connectionListener);null!=this.channel&&this.channel.bind("changed",this.changeListener)}; @@ -11975,26 +11982,26 @@ DrawioFileSync.prototype.patchRealtime=function(b,e,f){var c=null;if(this.file.i l,"applied",m)}return c};DrawioFileSync.prototype.isRealtimeActive=function(){return this.ui.editor.autosave}; DrawioFileSync.prototype.sendLocalChanges=function(){try{if(this.file.isRealtime()&&this.localFileWasChanged){var b=this.ui.clonePages(this.ui.pages),e=this.ui.diffPages(this.snapshot,b);this.file.ownPages=this.ui.patchPages(this.file.ownPages,e,!0);this.snapshot=b;this.isRealtimeActive()&&this.doSendLocalChanges([e])}this.localFileWasChanged=!1}catch(f){b=this.file.getCurrentUser(),b=null!=b?b.id:"unknown",EditorUi.logError("Error in sendLocalChanges",null,this.file.getMode()+"."+this.file.getId(), b,f)}};DrawioFileSync.prototype.doReceiveRemoteChanges=function(b){this.file.isRealtime()&&this.isRealtimeActive()&&(this.sendLocalChanges(),this.file.patch(b),this.file.theirPages=this.ui.applyPatches(this.file.theirPages,b),this.scheduleCleanup(),EditorUi.debug("DrawioFileSync.doReceiveRemoteChanges",[this],"changes",b))}; -DrawioFileSync.prototype.merge=function(b,e,f,c,l,m){try{this.file.stats.merged++;this.lastModified=new Date;var x=this.file.getDescriptorRevisionId(f);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var z=this.file.getShadowPages();this.file.backupPatch=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(z,this.ui.pages):null;var C=this.file.isRealtime()?this.ui.diffPages(z,this.file.ownPages):null;z=this.ui.applyPatches(z,b);var d=null==e?null:this.ui.getHashValueForPages(z); -this.file.setShadowPages(z);EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"backup",this.file.backupPatch,"pending",C,"checksum",e,"current",d,"valid",e==d,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",x,"etag",this.file.getDescriptorEtag(f));if(null!=e&&e!=d){var g=this.ui.hashValue(x),k=this.ui.hashValue(this.file.getCurrentRevisionId());this.file.checksumError(l,b,"From: "+k+"\nTo: "+g+"\nChecksum: "+e+"\nCurrent: "+d,x,"merge", -e,d,x);"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.merge.checksumError",[this],"data",[this.file.data,this.file.createData(),this.ui.getXmlForPages(z)]);return}null==this.patchRealtime(b,null,C)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),f);this.file.backupPatch=null;null!=c&&c(!0)}catch(p){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged(); -null!=l&&l(p);try{if(this.file.errorReportsEnabled)k=this.ui.hashValue(this.file.getCurrentRevisionId()),g=this.ui.hashValue(x),this.file.sendErrorReport("Error in merge","From: "+k+"\nTo: "+g+"\nChecksum: "+e+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(b,null,2)),p);else{var n=this.file.getCurrentUser(),t=null!=n?n.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),t,p)}}catch(A){}}}; +DrawioFileSync.prototype.merge=function(b,e,f,c,l,m){try{this.file.stats.merged++;this.lastModified=new Date;var x=this.file.getDescriptorRevisionId(f);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var y=this.file.getShadowPages();this.file.backupPatch=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(y,this.ui.pages):null;var D=this.file.isRealtime()?this.ui.diffPages(y,this.file.ownPages):null;y=this.ui.applyPatches(y,b);var d=null==e?null:this.ui.getHashValueForPages(y); +this.file.setShadowPages(y);EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"backup",this.file.backupPatch,"pending",D,"checksum",e,"current",d,"valid",e==d,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",x,"etag",this.file.getDescriptorEtag(f));if(null!=e&&e!=d){var g=this.ui.hashValue(x),k=this.ui.hashValue(this.file.getCurrentRevisionId());this.file.checksumError(l,b,"From: "+k+"\nTo: "+g+"\nChecksum: "+e+"\nCurrent: "+d,x,"merge", +e,d,x);"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.merge.checksumError",[this],"data",[this.file.data,this.file.createData(),this.ui.getXmlForPages(y)]);return}null==this.patchRealtime(b,null,D)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),f);this.file.backupPatch=null;null!=c&&c(!0)}catch(p){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged(); +null!=l&&l(p);try{if(this.file.errorReportsEnabled)k=this.ui.hashValue(this.file.getCurrentRevisionId()),g=this.ui.hashValue(x),this.file.sendErrorReport("Error in merge","From: "+k+"\nTo: "+g+"\nChecksum: "+e+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(b,null,2)),p);else{var n=this.file.getCurrentUser(),q=null!=n?n.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),q,p)}}catch(A){}}}; DrawioFileSync.prototype.fileChanged=function(b,e,f,c){var l=window.setTimeout(mxUtils.bind(this,function(){null!=f&&f()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",c,"valid",this.isValidState()),this.isValidState()?this.file.loadPatchDescriptor(mxUtils.bind(this,function(m){null!=f&&f()||(this.isValidState()?this.catchup(m,b,e,f):null!=e&&e())}),e):null!=e&&e())}),c?this.cacheReadyDelay:0);return this.notifyThread=l}; DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(b){null!=b?(this.file.setDescriptorRevisionId(b,this.file.getCurrentRevisionId()),this.updateDescriptor(b),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(b){this.file.inConflictState=!0;this.file.handleFileError(b)}))}; DrawioFileSync.prototype.updateDescriptor=function(b){this.file.setDescriptor(b);this.file.descriptorChanged();this.start()}; -DrawioFileSync.prototype.catchup=function(b,e,f,c){if(null!=b&&(null==c||!c())){var l=this.file.getCurrentRevisionId(),m=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",l,"to",m,"valid",this.isValidState());if(l==m)this.file.patchDescriptor(this.file.getDescriptor(),b),null!=e&&e(!0);else if(this.isValidState()){var x=this.file.getDescriptorSecret(b);if(null==x||"1"==urlParams.lockdown)this.reload(e,f,c);else{var z=0,C=!1,d=mxUtils.bind(this,function(){if(null== +DrawioFileSync.prototype.catchup=function(b,e,f,c){if(null!=b&&(null==c||!c())){var l=this.file.getCurrentRevisionId(),m=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",l,"to",m,"valid",this.isValidState());if(l==m)this.file.patchDescriptor(this.file.getDescriptor(),b),null!=e&&e(!0);else if(this.isValidState()){var x=this.file.getDescriptorSecret(b);if(null==x||"1"==urlParams.lockdown)this.reload(e,f,c);else{var y=0,D=!1,d=mxUtils.bind(this,function(){if(null== c||!c())if(l!=this.file.getCurrentRevisionId())null!=e&&e(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var g=!0,k=window.setTimeout(mxUtils.bind(this,function(){g=!1;this.reload(e,f,c)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(l)+"&to="+encodeURIComponent(m)+(null!=x?"&secret="+encodeURIComponent(x):""),mxUtils.bind(this,function(n){this.file.stats.bytesReceived+=n.getText().length;window.clearTimeout(k);if(g&& -(null==c||!c()))if(l!=this.file.getCurrentRevisionId())null!=e&&e(!0);else if(this.isValidState()){var t=null,p=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"req",[n],"status",n.getStatus(),"cacheReadyRetryCount",z,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=n.getStatus()&&299>=n.getStatus()&&0<n.getText().length)try{var A=JSON.parse(n.getText());if(null!=A&&0<A.length)for(var E=0;E<A.length;E++){var y=this.stringToObject(A[E]);if(y.v>DrawioFileSync.PROTOCOL){C=!0;p=[];break}else if(y.v=== -DrawioFileSync.PROTOCOL&&null!=y.d)t=y.d.checksum,p.push(y.d.patch);else{C=!0;p=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[A],"failed",C,"temp",p,"checksum",t)}catch(B){p=[],null!=window.console&&"1"==urlParams.test&&console.log(B)}try{0<p.length?(this.file.stats.cacheHits++,this.merge(p,t,b,e,f,c)):z<=this.maxCacheReadyRetries-1&&!C&&401!=n.getStatus()&&503!=n.getStatus()&&410!=n.getStatus()?(z++,this.file.stats.cacheMiss++,window.setTimeout(d,(z+1)*this.cacheReadyDelay)): +(null==c||!c()))if(l!=this.file.getCurrentRevisionId())null!=e&&e(!0);else if(this.isValidState()){var q=null,p=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"req",[n],"status",n.getStatus(),"cacheReadyRetryCount",y,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=n.getStatus()&&299>=n.getStatus()&&0<n.getText().length)try{var A=JSON.parse(n.getText());if(null!=A&&0<A.length)for(var E=0;E<A.length;E++){var z=this.stringToObject(A[E]);if(z.v>DrawioFileSync.PROTOCOL){D=!0;p=[];break}else if(z.v=== +DrawioFileSync.PROTOCOL&&null!=z.d)q=z.d.checksum,p.push(z.d.patch);else{D=!0;p=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[A],"failed",D,"temp",p,"checksum",q)}catch(B){p=[],null!=window.console&&"1"==urlParams.test&&console.log(B)}try{0<p.length?(this.file.stats.cacheHits++,this.merge(p,q,b,e,f,c)):y<=this.maxCacheReadyRetries-1&&!D&&401!=n.getStatus()&&503!=n.getStatus()&&410!=n.getStatus()?(y++,this.file.stats.cacheMiss++,window.setTimeout(d,(y+1)*this.cacheReadyDelay)): (this.file.stats.cacheFail++,this.reload(e,f,c))}catch(B){null!=f&&f(B)}}else null!=f&&f()}))}else null!=f&&f()});window.setTimeout(d,this.cacheReadyDelay)}}else null!=f&&f()}};DrawioFileSync.prototype.reload=function(b,e,f,c){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(l){null!=e&&e(l)}),f,c)}; DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var e=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),f=this.file.getCurrentRevisionId(),c=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(f)+"&msg="+encodeURIComponent(e)+"&data="+encodeURIComponent(c));this.file.stats.bytesSent+=c.length;this.file.stats.msgSent++; EditorUi.debug("DrawioFileSync.descriptorChanged",[this],"from",b,"to",f)}this.updateStatus()};DrawioFileSync.prototype.objectToString=function(b){b=Graph.compress(JSON.stringify(b));null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.encrypt(b,this.key).toString());return b};DrawioFileSync.prototype.stringToObject=function(b){null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.decrypt(b,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(b))}; DrawioFileSync.prototype.createToken=function(b,e,f){var c=!0,l=window.setTimeout(mxUtils.bind(this,function(){c=!1;f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(m){window.clearTimeout(l);c&&(200<=m.getStatus()&&299>=m.getStatus()?e(m.getText()):f({code:m.getStatus(),message:"Token Error "+m.getStatus()}))}))}; DrawioFileSync.prototype.fileSaving=function(){if(this.file.isOptimisticSync()){var b=this.objectToString(this.createMessage({m:(new Date).getTime(),type:"optimistic"}));mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(b),function(){})}EditorUi.debug("DrawioFileSync.fileSaving",[this],"optimistic",this.file.isOptimisticSync())};DrawioFileSync.prototype.fileDataUpdated=function(){this.scheduleCleanup(!0);EditorUi.debug("DrawioFileSync.fileDataUpdated",[this])}; -DrawioFileSync.prototype.fileSaved=function(b,e,f,c,l){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var m=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),x=this.file.getDescriptorSecret(this.file.getDescriptor()),z=this.file.getDescriptorRevisionId(e),C=this.file.getCurrentRevisionId();if(null== -x||null==l||"1"==urlParams.lockdown)this.file.stats.msgSent++,mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(m),function(){}),null!=f&&f(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",z,"to",C,"etag",this.file.getCurrentEtag());else{var d=this.ui.diffPages(this.file.getShadowPages(),b);e=this.file.getDescriptorSecret(e);var g=this.ui.getHashValueForPages(b),k=this.objectToString(this.createMessage({patch:d,checksum:g}));this.file.stats.bytesSent+=k.length; -this.file.stats.msgSent++;var n=!0,t=window.setTimeout(mxUtils.bind(this,function(){n=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(z)+"&to="+encodeURIComponent(C)+"&msg="+encodeURIComponent(m)+(null!=x?"&secret="+encodeURIComponent(x):"")+(null!=e?"&last-secret="+encodeURIComponent(e):"")+(k.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(k):"")+(null!=l?"&token="+encodeURIComponent(l): -""),mxUtils.bind(this,function(p){window.clearTimeout(t);n&&(200<=p.getStatus()&&299>=p.getStatus()?null!=f&&f():c({code:p.getStatus(),message:p.getStatus()}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"diff",d,k.length,"bytes","from",z,"to",C,"etag",this.file.getCurrentEtag(),"checksum",g)}}this.file.setShadowPages(b);this.scheduleCleanup()}; +DrawioFileSync.prototype.fileSaved=function(b,e,f,c,l){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var m=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),x=this.file.getDescriptorSecret(this.file.getDescriptor()),y=this.file.getDescriptorRevisionId(e),D=this.file.getCurrentRevisionId();if(null== +x||null==l||"1"==urlParams.lockdown)this.file.stats.msgSent++,mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(m),function(){}),null!=f&&f(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",y,"to",D,"etag",this.file.getCurrentEtag());else{var d=this.ui.diffPages(this.file.getShadowPages(),b);e=this.file.getDescriptorSecret(e);var g=this.ui.getHashValueForPages(b),k=this.objectToString(this.createMessage({patch:d,checksum:g}));this.file.stats.bytesSent+=k.length; +this.file.stats.msgSent++;var n=!0,q=window.setTimeout(mxUtils.bind(this,function(){n=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(y)+"&to="+encodeURIComponent(D)+"&msg="+encodeURIComponent(m)+(null!=x?"&secret="+encodeURIComponent(x):"")+(null!=e?"&last-secret="+encodeURIComponent(e):"")+(k.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(k):"")+(null!=l?"&token="+encodeURIComponent(l): +""),mxUtils.bind(this,function(p){window.clearTimeout(q);n&&(200<=p.getStatus()&&299>=p.getStatus()?null!=f&&f():c({code:p.getStatus(),message:p.getStatus()}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"diff",d,k.length,"bytes","from",y,"to",D,"etag",this.file.getCurrentEtag(),"checksum",g)}}this.file.setShadowPages(b);this.scheduleCleanup()}; DrawioFileSync.prototype.getIdParameters=function(){var b="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&null!=this.pusher.connection.socket_id&&(b+="&sid="+this.pusher.connection.socket_id);return b};DrawioFileSync.prototype.createMessage=function(b){return{v:DrawioFileSync.PROTOCOL,d:b,c:this.clientId}}; DrawioFileSync.prototype.fileConflict=function(b,e,f){this.catchupRetryCount++;EditorUi.debug("DrawioFileSync.fileConflict",[this],"desc",[b],"catchupRetryCount",this.catchupRetryCount,"maxCatchupRetries",this.maxCatchupRetries);this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=b?this.catchup(b,e,f):this.fileChanged(e,f)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=f&&f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")}))}; DrawioFileSync.prototype.stop=function(){null!=this.pusher&&(EditorUi.debug("DrawioFileSync.stop",[this]),null!=this.pusher.connection&&(this.pusher.connection.unbind("state_change",this.connectionListener),this.pusher.connection.unbind("error",this.pusherErrorListener)),null!=this.channel&&(this.channel.unbind("changed",this.changeListener),this.channel=null),this.pusher.disconnect(),this.pusher=null,null!=this.p2pCollab&&(this.p2pCollab.destroy(),this.p2pCollab=null));this.updateOnlineState();this.updateStatus()}; @@ -12005,13 +12012,13 @@ Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-s mxAsyncCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxAsyncCanvas.prototype.updateFont=function(){var b="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(b+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(b+="italic ");this.ctx.font=b+this.state.fontSize+"px "+this.state.fontFamily};mxAsyncCanvas.prototype.rotate=function(b,e,f,c,l){}; mxAsyncCanvas.prototype.setAlpha=function(b){this.state.alpha=b};mxAsyncCanvas.prototype.setFontColor=function(b){this.state.fontColor=b};mxAsyncCanvas.prototype.setFontBackgroundColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBackgroundColor=b};mxAsyncCanvas.prototype.setFontBorderColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBorderColor=b};mxAsyncCanvas.prototype.setFontSize=function(b){this.state.fontSize=b}; mxAsyncCanvas.prototype.setFontFamily=function(b){this.state.fontFamily=b};mxAsyncCanvas.prototype.setFontStyle=function(b){this.state.fontStyle=b};mxAsyncCanvas.prototype.rect=function(b,e,f,c){};mxAsyncCanvas.prototype.roundrect=function(b,e,f,c,l,m){};mxAsyncCanvas.prototype.ellipse=function(b,e,f,c){};mxAsyncCanvas.prototype.rewriteImageSource=function(b){if("http://"==b.substring(0,7)||"https://"==b.substring(0,8))b="/proxy?url="+encodeURIComponent(b);return b}; -mxAsyncCanvas.prototype.image=function(b,e,f,c,l,m,x,z){l=this.rewriteImageSource(l);b=this.htmlCanvas.images[l];null==b&&(b=new Image,b.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),b.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[l]=b,b.src=l)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){}; -mxAsyncCanvas.prototype.text=function(b,e,f,c,l,m,x,z,C,d,g,k){if(null!=l&&0!=l.length&&(b=this.state.scale,"html"==C&&"function"===typeof html2canvas)){this.incWaitCounter();var n=this.canvasIndex++;html2canvas(l,{onrendered:mxUtils.bind(this,function(t){this.htmlCanvas.subCanvas[n]=t;this.decWaitCounter()}),scale:b,logging:!0})}};mxAsyncCanvas.prototype.finish=function(b){0==this.waitCounter?b():this.onComplete=b};function mxJsCanvas(b){mxAbstractCanvas2D.call(this);this.ctx=b.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null; +mxAsyncCanvas.prototype.image=function(b,e,f,c,l,m,x,y){l=this.rewriteImageSource(l);b=this.htmlCanvas.images[l];null==b&&(b=new Image,b.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),b.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[l]=b,b.src=l)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){}; +mxAsyncCanvas.prototype.text=function(b,e,f,c,l,m,x,y,D,d,g,k){if(null!=l&&0!=l.length&&(b=this.state.scale,"html"==D&&"function"===typeof html2canvas)){this.incWaitCounter();var n=this.canvasIndex++;html2canvas(l,{onrendered:mxUtils.bind(this,function(q){this.htmlCanvas.subCanvas[n]=q;this.decWaitCounter()}),scale:b,logging:!0})}};mxAsyncCanvas.prototype.finish=function(b){0==this.waitCounter?b():this.onComplete=b};function mxJsCanvas(b){mxAbstractCanvas2D.call(this);this.ctx=b.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null; mxJsCanvas.prototype.subCanvas=null;mxJsCanvas.prototype.canvasIndex=0;mxJsCanvas.prototype.hexToRgb=function(b){b=b.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,f,c,l){return f+f+c+c+l+l});return(b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(b))?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16)}:null};mxJsCanvas.prototype.incWaitCounter=function(){this.waitCounter++}; mxJsCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxJsCanvas.prototype.updateFont=function(){var b="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(b+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(b+="italic ");this.ctx.font=b+this.state.fontSize+"px "+this.state.fontFamily}; mxJsCanvas.prototype.save=function(){this.states.push(this.state);this.state=mxUtils.clone(this.state);this.ctx.save()};mxJsCanvas.prototype.restore=function(){this.state=this.states.pop();this.ctx.restore()};mxJsCanvas.prototype.scale=function(b){this.state.scale*=b;this.state.strokeWidth*=b;this.ctx.scale(b,b)};mxJsCanvas.prototype.translate=function(b,e){this.state.dx+=b;this.state.dy+=e;this.ctx.translate(b,e)}; mxJsCanvas.prototype.rotate=function(b,e,f,c,l){c-=this.state.dx;l-=this.state.dy;this.ctx.translate(c,l);(e||f)&&this.ctx.scale(e?-1:1,f?-1:1);this.ctx.rotate(b*this.M_RAD_PER_DEG);this.ctx.translate(-c,-l)};mxJsCanvas.prototype.setAlpha=function(b){this.state.alpha=b;this.ctx.globalAlpha=b};mxJsCanvas.prototype.setFillColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fillColor=b;this.state.gradientColor=null;this.ctx.fillStyle=b}; -mxJsCanvas.prototype.setGradient=function(b,e,f,c,l,m,x,z,C){f=this.ctx.createLinearGradient(0,c,0,c+m);c=this.state;c.fillColor=b;c.fillAlpha=null!=z?z:1;c.gradientColor=e;c.gradientAlpha=null!=C?C:1;c.gradientDirection=x;b=this.hexToRgb(b);e=this.hexToRgb(e);null!=b&&f.addColorStop(0,"rgba("+b.r+","+b.g+","+b.b+","+c.fillAlpha+")");null!=e&&f.addColorStop(1,"rgba("+e.r+","+e.g+","+e.b+","+c.gradientAlpha+")");this.ctx.fillStyle=f}; +mxJsCanvas.prototype.setGradient=function(b,e,f,c,l,m,x,y,D){f=this.ctx.createLinearGradient(0,c,0,c+m);c=this.state;c.fillColor=b;c.fillAlpha=null!=y?y:1;c.gradientColor=e;c.gradientAlpha=null!=D?D:1;c.gradientDirection=x;b=this.hexToRgb(b);e=this.hexToRgb(e);null!=b&&f.addColorStop(0,"rgba("+b.r+","+b.g+","+b.b+","+c.fillAlpha+")");null!=e&&f.addColorStop(1,"rgba("+e.r+","+e.g+","+e.b+","+c.gradientAlpha+")");this.ctx.fillStyle=f}; mxJsCanvas.prototype.setStrokeColor=function(b){null!=b&&(b==mxConstants.NONE?(this.state.strokeColor=null,this.ctx.strokeStyle="rgba(0, 0, 0, 0)"):(this.ctx.strokeStyle=b,this.state.strokeColor=b))};mxJsCanvas.prototype.setStrokeWidth=function(b){this.ctx.lineWidth=b};mxJsCanvas.prototype.setDashed=function(b){if(this.state.dashed=b){b=this.state.dashPattern.split(" ");for(var e=0;e<b.length;e++)b[e]=parseInt(b[e],10);this.setLineDash(b)}else this.setLineDash([0])}; mxJsCanvas.prototype.setLineDash=function(b){try{"function"===typeof this.ctx.setLineDash&&this.ctx.setLineDash(b)}catch(e){}};mxJsCanvas.prototype.setDashPattern=function(b){this.state.dashPattern=b;if(this.state.dashed){b=b.split(" ");for(var e=0;e<b.length;e++)b[e]=parseInt(b[e],10);this.ctx.setLineDash(b)}};mxJsCanvas.prototype.setLineCap=function(b){this.ctx.lineCap=b};mxJsCanvas.prototype.setLineJoin=function(b){this.ctx.lineJoin=b}; mxJsCanvas.prototype.setMiterLimit=function(b){this.ctx.lineJoin=b};mxJsCanvas.prototype.setFontColor=function(b){this.ctx.fillStyle=b};mxJsCanvas.prototype.setFontBackgroundColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBackgroundColor=b};mxJsCanvas.prototype.setFontBorderColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBorderColor=b};mxJsCanvas.prototype.setFontSize=function(b){this.state.fontSize=b}; @@ -12021,13 +12028,13 @@ mxJsCanvas.prototype.setShadowOffset=function(b,e){this.state.shadowDx=b;this.st mxJsCanvas.prototype.arcTo=function(b,e,f,c,l,m,x){b=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,b,e,f,c,l,m,x);if(null!=b)for(e=0;e<b.length;e+=6)this.curveTo(b[e],b[e+1],b[e+2],b[e+3],b[e+4],b[e+5])};mxJsCanvas.prototype.curveTo=function(b,e,f,c,l,m){this.ctx.bezierCurveTo(b,e,f,c,l,m);this.lastMoveX=l;this.lastMoveY=m};mxJsCanvas.prototype.rect=function(b,e,f,c){this.begin();this.moveTo(b,e);this.lineTo(b+f,e);this.lineTo(b+f,e+c);this.lineTo(b,e+c);this.close()}; mxJsCanvas.prototype.roundrect=function(b,e,f,c,l,m){this.begin();this.moveTo(b+l,e);this.lineTo(b+f-l,e);this.quadTo(b+f,e,b+f,e+m);this.lineTo(b+f,e+c-m);this.quadTo(b+f,e+c,b+f-l,e+c);this.lineTo(b+l,e+c);this.quadTo(b,e+c,b,e+c-m);this.lineTo(b,e+m);this.quadTo(b,e,b+l,e)};mxJsCanvas.prototype.ellipse=function(b,e,f,c){this.ctx.save();this.ctx.translate(b+f/2,e+c/2);this.ctx.scale(f/2,c/2);this.ctx.beginPath();this.ctx.arc(0,0,1,0,2*Math.PI,!1);this.ctx.restore()}; mxJsCanvas.prototype.rewriteImageSource=function(b){if("http://"==b.substring(0,7)||"https://"==b.substring(0,8))b="/proxy?url="+encodeURIComponent(b);return b}; -mxJsCanvas.prototype.image=function(b,e,f,c,l,m,x,z){l=this.rewriteImageSource(l);l=this.images[l];if(null!=l&&0<l.height&&0<l.width){var C=this.ctx;C.save();if(m){m=l.width;var d=l.height,g=Math.min(f/m,c/d);b+=(f-m*g)/2;e+=(c-d*g)/2;f=m*g;c=d*g}x&&(C.translate(2*b+f,0),C.scale(-1,1));z&&(C.translate(0,2*e+c),C.scale(1,-1));C.drawImage(l,b,e,f,c);C.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()}; +mxJsCanvas.prototype.image=function(b,e,f,c,l,m,x,y){l=this.rewriteImageSource(l);l=this.images[l];if(null!=l&&0<l.height&&0<l.width){var D=this.ctx;D.save();if(m){m=l.width;var d=l.height,g=Math.min(f/m,c/d);b+=(f-m*g)/2;e+=(c-d*g)/2;f=m*g;c=d*g}x&&(D.translate(2*b+f,0),D.scale(-1,1));y&&(D.translate(0,2*e+c),D.scale(1,-1));D.drawImage(l,b,e,f,c);D.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()}; mxJsCanvas.prototype.fill=function(){this.ctx.fill()};mxJsCanvas.prototype.stroke=function(){this.ctx.stroke()};mxJsCanvas.prototype.fillAndStroke=function(){if(this.state.shadow){this.ctx.stroke();this.ctx.fill();var b=this.ctx.shadowColor,e=this.ctx.shadowOffsetX,f=this.ctx.shadowOffsetY;this.ctx.shadowColor="transparent";this.ctx.shadowOffsetX=0;this.ctx.shadowOffsetY=0;this.ctx.stroke();this.ctx.shadowColor=b;this.ctx.shadowOffsetX=e;this.ctx.shadowOffsetY=f}else this.ctx.fill(),this.ctx.stroke()}; -mxJsCanvas.prototype.text=function(b,e,f,c,l,m,x,z,C,d,g,k){if(null!=l&&0!=l.length){f=this.state.scale;0!=k&&(this.ctx.translate(Math.round(b),Math.round(e)),this.ctx.rotate(k*Math.PI/180),this.ctx.translate(Math.round(-b),Math.round(-e)));if("html"==C){l=this.subCanvas[this.canvasIndex++];C=l.height;k=l.width;switch(x){case mxConstants.ALIGN_MIDDLE:e-=C/2/f;break;case mxConstants.ALIGN_BOTTOM:e-=C/f}switch(m){case mxConstants.ALIGN_CENTER:b-=k/2/f;break;case mxConstants.ALIGN_RIGHT:b-=k/f}this.ctx.save(); +mxJsCanvas.prototype.text=function(b,e,f,c,l,m,x,y,D,d,g,k){if(null!=l&&0!=l.length){f=this.state.scale;0!=k&&(this.ctx.translate(Math.round(b),Math.round(e)),this.ctx.rotate(k*Math.PI/180),this.ctx.translate(Math.round(-b),Math.round(-e)));if("html"==D){l=this.subCanvas[this.canvasIndex++];D=l.height;k=l.width;switch(x){case mxConstants.ALIGN_MIDDLE:e-=D/2/f;break;case mxConstants.ALIGN_BOTTOM:e-=D/f}switch(m){case mxConstants.ALIGN_CENTER:b-=k/2/f;break;case mxConstants.ALIGN_RIGHT:b-=k/f}this.ctx.save(); if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor)null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(Math.round(b)-.5,Math.round(e)-.5,Math.round(l.width/f),Math.round(l.height/f))),null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(Math.round(b)-.5,Math.round(e)-.5,Math.round(l.width/f),Math.round(l.height/f)));this.ctx.scale(1/f,1/f);this.ctx.drawImage(l, -Math.round(b*f),Math.round(e*f))}else{this.ctx.save();this.updateFont();k=document.createElement("div");k.innerHTML=l;k.style.position="absolute";k.style.top="-9999px";k.style.left="-9999px";k.style.fontFamily=this.state.fontFamily;k.style.fontWeight="bold";k.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(k);C=[k.offsetWidth,k.offsetHeight];document.body.removeChild(k);l=l.split("\n");k=C[1];this.ctx.textBaseline="top";C=e;switch(x){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline= -"middle";e-=(l.length-1)*k/2;C=e-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",e-=k*(l.length-1),C=e-this.state.fontSize}x=[];k=[];for(f=0;f<l.length;f++)k[f]=b,x[f]=this.ctx.measureText(l[f]).width,null!=m&&m!=mxConstants.ALIGN_LEFT&&(k[f]-=x[f],m==mxConstants.ALIGN_CENTER&&(k[f]+=x[f]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){b=k[0];m=x[0];for(f=1;f<l.length;f++)b=Math.min(b,k[f]),m=Math.max(m,x[f]);this.ctx.save(); -b=Math.round(b)-.5;C=Math.round(C)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(b,C,m,this.state.fontSize*mxConstants.LINE_HEIGHT*l.length));null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(b,C,m,this.state.fontSize*mxConstants.LINE_HEIGHT*l.length));this.ctx.restore()}for(f=0;f<l.length;f++)this.ctx.fillText(l[f],k[f],e),e+=this.state.fontSize*mxConstants.LINE_HEIGHT}this.ctx.restore()}}; +Math.round(b*f),Math.round(e*f))}else{this.ctx.save();this.updateFont();k=document.createElement("div");k.innerHTML=l;k.style.position="absolute";k.style.top="-9999px";k.style.left="-9999px";k.style.fontFamily=this.state.fontFamily;k.style.fontWeight="bold";k.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(k);D=[k.offsetWidth,k.offsetHeight];document.body.removeChild(k);l=l.split("\n");k=D[1];this.ctx.textBaseline="top";D=e;switch(x){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline= +"middle";e-=(l.length-1)*k/2;D=e-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",e-=k*(l.length-1),D=e-this.state.fontSize}x=[];k=[];for(f=0;f<l.length;f++)k[f]=b,x[f]=this.ctx.measureText(l[f]).width,null!=m&&m!=mxConstants.ALIGN_LEFT&&(k[f]-=x[f],m==mxConstants.ALIGN_CENTER&&(k[f]+=x[f]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){b=k[0];m=x[0];for(f=1;f<l.length;f++)b=Math.min(b,k[f]),m=Math.max(m,x[f]);this.ctx.save(); +b=Math.round(b)-.5;D=Math.round(D)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(b,D,m,this.state.fontSize*mxConstants.LINE_HEIGHT*l.length));null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(b,D,m,this.state.fontSize*mxConstants.LINE_HEIGHT*l.length));this.ctx.restore()}for(f=0;f<l.length;f++)this.ctx.fillText(l[f],k[f],e),e+=this.state.fontSize*mxConstants.LINE_HEIGHT}this.ctx.restore()}}; mxJsCanvas.prototype.getCanvas=function(){return canvas};mxJsCanvas.prototype.finish=function(b){0==this.waitCounter?b():this.onComplete=b};DrawioClient=function(b,e){mxEventSource.call(this);this.ui=b;this.cookieName=e;this.token=this.getPersistentToken()};mxUtils.extend(DrawioClient,mxEventSource);DrawioClient.prototype.token=null;DrawioClient.prototype.user=null;DrawioClient.prototype.setUser=function(b){this.user=b;this.fireEvent(new mxEventObject("userChanged"))};DrawioClient.prototype.getUser=function(){return this.user}; DrawioClient.prototype.clearPersistentToken=function(){if(isLocalStorage)localStorage.removeItem("."+this.cookieName),sessionStorage.removeItem("."+this.cookieName);else if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()-1);document.cookie=this.cookieName+"=; expires="+b.toUTCString()}}; DrawioClient.prototype.getPersistentToken=function(b){var e=null;isLocalStorage&&(e=localStorage.getItem("."+this.cookieName),null==e&&b&&(e=sessionStorage.getItem("."+this.cookieName)));if(null==e&&"undefined"!=typeof Storage){var f=document.cookie;b=this.cookieName+"=";var c=f.indexOf(b);0<=c&&(c+=b.length,e=f.indexOf(";",c),0>e?e=f.length:postCookie=f.substring(e),e=f.substring(c,e),e=0<e.length?e:null,null!=e&&isLocalStorage&&(f=new Date,f.setYear(f.getFullYear()-1),document.cookie=b+"; expires="+ @@ -12035,9 +12042,9 @@ f.toUTCString(),localStorage.setItem("."+this.cookieName,e)))}return e};DrawioCl DriveFile.prototype.isConflict=function(b){return null!=b&&null!=b.error&&412==b.error.code};DriveFile.prototype.getCurrentUser=function(){return null!=this.ui.drive?this.ui.drive.user:null};DriveFile.prototype.getMode=function(){return App.MODE_GOOGLE}; DriveFile.prototype.getPublicUrl=function(b){this.ui.drive.executeRequest({url:"/files/"+this.desc.id+"/permissions?supportsAllDrives=true"},mxUtils.bind(this,function(e){if(null!=e&&null!=e.items)for(var f=0;f<e.items.length;f++)if("anyoneWithLink"===e.items[f].id||"anyone"===e.items[f].id){b(this.desc.webContentLink);return}b(null)}),mxUtils.bind(this,function(){b(null)}))};DriveFile.prototype.isAutosaveOptional=function(){return!0}; DriveFile.prototype.isRenamable=function(){return this.isEditable()&&DrawioFile.prototype.isEditable.apply(this,arguments)};DriveFile.prototype.isMovable=function(){return this.isEditable()};DriveFile.prototype.isTrashed=function(){return this.desc.labels.trashed};DriveFile.prototype.save=function(b,e,f,c,l){DrawioFile.prototype.save.apply(this,[b,mxUtils.bind(this,function(){this.saveFile(null,b,e,f,c,l)}),f,c,l])}; -DriveFile.prototype.saveFile=function(b,e,f,c,l,m){try{this.isEditable()?this.savingFile||(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.createSecret(mxUtils.bind(this,function(x,z){var C=mxUtils.bind(this,function(d,g){try{var k=this.desc;null!=this.sync&&this.sync.fileSaving();this.ui.drive.saveFile(this,g,mxUtils.bind(this,function(n,t){try{this.savingFile=!1,0!=n?(this.setModified(this.getShadowModified()),e&&(this.lastAutosaveRevision=(new Date).getTime()),this.autosaveDelay= -Math.round(Math.min(1E4,Math.max(DriveFile.prototype.autosaveDelay,this.saveDelay))),this.desc=n,null!=z?this.fileSaved(t,k,mxUtils.bind(this,function(){this.contentChanged();null!=f&&f(n)}),c,z):null!=f&&f(n)):null!=c&&c(n)}catch(p){if(this.savingFile=!1,null!=c)c(p);else throw p;}}),mxUtils.bind(this,function(n,t){try{this.savingFile=!1,this.isConflict(n)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(t,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this, -function(){this.updateFileData();this.setShadowModified(!1);C(d,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&c(n)}catch(p){if(this.savingFile=!1,null!=c)c(p);else throw p;}}),l,l,d,null,x)}catch(n){if(this.savingFile=!1,null!=c)c(n);else throw n;}});C(m,e)}))):null!=f&&f()}catch(x){if(null!=c)c(x);else throw x;}}; +DriveFile.prototype.saveFile=function(b,e,f,c,l,m){try{this.isEditable()?this.savingFile||(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.createSecret(mxUtils.bind(this,function(x,y){var D=mxUtils.bind(this,function(d,g){try{var k=this.desc;null!=this.sync&&this.sync.fileSaving();this.ui.drive.saveFile(this,g,mxUtils.bind(this,function(n,q){try{this.savingFile=!1,0!=n?(this.setModified(this.getShadowModified()),e&&(this.lastAutosaveRevision=(new Date).getTime()),this.autosaveDelay= +Math.round(Math.min(1E4,Math.max(DriveFile.prototype.autosaveDelay,this.saveDelay))),this.desc=n,null!=y?this.fileSaved(q,k,mxUtils.bind(this,function(){this.contentChanged();null!=f&&f(n)}),c,y):null!=f&&f(n)):null!=c&&c(n)}catch(p){if(this.savingFile=!1,null!=c)c(p);else throw p;}}),mxUtils.bind(this,function(n,q){try{this.savingFile=!1,this.isConflict(n)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(q,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this, +function(){this.updateFileData();this.setShadowModified(!1);D(d,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&c(n)}catch(p){if(this.savingFile=!1,null!=c)c(p);else throw p;}}),l,l,d,null,x)}catch(n){if(this.savingFile=!1,null!=c)c(n);else throw n;}});D(m,e)}))):null!=f&&f()}catch(x){if(null!=c)c(x);else throw x;}}; DriveFile.prototype.copyFile=function(b,e){this.isRestricted()?DrawioFile.prototype.copyFile.apply(this,arguments):this.makeCopy(mxUtils.bind(this,function(){if(this.ui.spinner.spin(document.body,mxResources.get("saving")))try{this.save(!0,b,e)}catch(f){e(f)}}),e,!0)}; DriveFile.prototype.makeCopy=function(b,e,f){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.saveAs(this.ui.getCopyFilename(this,f),mxUtils.bind(this,function(c){this.desc=c;this.ui.spinner.stop();this.setModified(!1);this.backupPatch=null;this.inConflictState=this.invalidChecksum=!1;this.descriptorChanged();b()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=e&&e()}))};DriveFile.prototype.saveAs=function(b,e,f){this.ui.drive.copyFile(this.getId(),b,e,f)}; DriveFile.prototype.rename=function(b,e,f){var c=this.getCurrentRevisionId();this.ui.drive.renameFile(this.getId(),b,mxUtils.bind(this,function(l){this.hasSameExtension(b,this.getTitle())?(this.desc=l,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(c),null!=e&&e(l)):(this.desc=l,null!=this.sync&&this.sync.descriptorChanged(c),this.save(!0,e,f))}),f)}; @@ -12045,13 +12052,13 @@ DriveFile.prototype.move=function(b,e,f){this.ui.drive.moveFile(this.getId(),b,m DriveFile.prototype.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&this.desc.editable};DriveFile.prototype.isSyncSupported=function(){return!0};DriveFile.prototype.isRealtimeSupported=function(){return!0};DriveFile.prototype.isRealtimeOptional=function(){return null!=this.sync&&this.sync.isConnected()}; DriveFile.prototype.setRealtimeEnabled=function(b,e,f){null!=this.sync?this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/properties?alt=json&supportsAllDrives=true",method:"POST",contentType:"application/json; charset=UTF-8",params:{key:"collaboration",value:b?"enabled":"0"!=urlParams["fast-sync"]?"disabled":""}},mxUtils.bind(this,function(){this.loadDescriptor(mxUtils.bind(this,function(c){null!=c?(this.sync.descriptorChanged(this.getCurrentEtag()),this.sync.updateDescriptor(c),e()):f()}), f)}),f):f()};DriveFile.prototype.isRealtimeEnabled=function(){var b=this.ui.drive.getCustomProperty(this.desc,"collaboration");return DrawioFile.prototype.isRealtimeEnabled.apply(this,arguments)&&"disabled"!=b||Editor.enableRealtime&&"enabled"==b};DriveFile.prototype.isRevisionHistorySupported=function(){return!0}; -DriveFile.prototype.getRevisions=function(b,e){this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/revisions"},mxUtils.bind(this,function(f){for(var c=0;c<f.items.length;c++)mxUtils.bind(this,function(l){l.title=l.originalFilename;l.getXml=mxUtils.bind(this,function(m,x){this.ui.drive.getXmlFile(l,mxUtils.bind(this,function(z){m(z.getData())}),x)});l.getUrl=mxUtils.bind(this,function(m){return this.ui.getUrl(window.location.pathname+"?rev="+l.id+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!= +DriveFile.prototype.getRevisions=function(b,e){this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/revisions"},mxUtils.bind(this,function(f){for(var c=0;c<f.items.length;c++)mxUtils.bind(this,function(l){l.title=l.originalFilename;l.getXml=mxUtils.bind(this,function(m,x){this.ui.drive.getXmlFile(l,mxUtils.bind(this,function(y){m(y.getData())}),x)});l.getUrl=mxUtils.bind(this,function(m){return this.ui.getUrl(window.location.pathname+"?rev="+l.id+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!= m?"&page="+m:""))+window.location.hash})})(f.items[c]);b(f.items)}),e)};DriveFile.prototype.getLatestVersion=function(b,e){this.ui.drive.getFile(this.getId(),b,e,!0)};DriveFile.prototype.getChannelId=function(){var b=this.ui.drive.getCustomProperty(this.desc,"channel");null!=b&&(b="G-"+this.getId()+"."+b);return b};DriveFile.prototype.getChannelKey=function(){return this.ui.drive.getCustomProperty(this.desc,"key")};DriveFile.prototype.getLastModifiedDate=function(){return new Date(this.desc.modifiedDate)}; DriveFile.prototype.getDescriptor=function(){return this.desc};DriveFile.prototype.setDescriptor=function(b){this.desc=b};DriveFile.prototype.getDescriptorSecret=function(b){return this.ui.drive.getCustomProperty(b,"secret")};DriveFile.prototype.setDescriptorRevisionId=function(b,e){b.headRevisionId=e};DriveFile.prototype.getDescriptorRevisionId=function(b){return b.headRevisionId};DriveFile.prototype.getDescriptorEtag=function(b){return b.etag}; DriveFile.prototype.setDescriptorEtag=function(b,e){b.etag=e};DriveFile.prototype.loadPatchDescriptor=function(b,e){this.ui.drive.executeRequest({url:"/files/"+this.getId()+"?supportsAllDrives=true&fields="+this.ui.drive.catchupFields},mxUtils.bind(this,function(f){b(f)}),e)};DriveFile.prototype.patchDescriptor=function(b,e){b.headRevisionId=e.headRevisionId;b.modifiedDate=e.modifiedDate;DrawioFile.prototype.patchDescriptor.apply(this,arguments)}; DriveFile.prototype.loadDescriptor=function(b,e){this.ui.drive.loadDescriptor(this.getId(),b,e)};DriveFile.prototype.commentsSupported=function(){return!0}; -DriveFile.prototype.getComments=function(b,e){function f(l,m,x){if(m.deleted)return null;x=new DriveComment(l,m.commentId||m.replyId,m.content,m.modifiedDate,m.createdDate,"resolved"==m.status,m.author.isAuthenticatedUser?c:new DrawioUser(m.author.permissionId,m.author.emailAddress,m.author.displayName,m.author.picture.url),x);for(var z=0;null!=m.replies&&z<m.replies.length;z++)x.addReplyDirect(f(l,m.replies[z],m.commentId));return x}var c=this.ui.getCurrentUser();this.ui.drive.executeRequest({url:"/files/"+ -this.getId()+"/comments"},mxUtils.bind(this,function(l){for(var m=[],x=0;x<l.items.length;x++){var z=f(this,l.items[x]);null!=z&&m.push(z)}b(m)}),e)};DriveFile.prototype.addComment=function(b,e,f){b={content:b.content};this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/comments",method:"POST",params:b},mxUtils.bind(this,function(c){e(c.commentId)}),f)};DriveFile.prototype.canReplyToReplies=function(){return!1};DriveFile.prototype.canComment=function(){return this.desc.canComment}; +DriveFile.prototype.getComments=function(b,e){function f(l,m,x){if(m.deleted)return null;x=new DriveComment(l,m.commentId||m.replyId,m.content,m.modifiedDate,m.createdDate,"resolved"==m.status,m.author.isAuthenticatedUser?c:new DrawioUser(m.author.permissionId,m.author.emailAddress,m.author.displayName,m.author.picture.url),x);for(var y=0;null!=m.replies&&y<m.replies.length;y++)x.addReplyDirect(f(l,m.replies[y],m.commentId));return x}var c=this.ui.getCurrentUser();this.ui.drive.executeRequest({url:"/files/"+ +this.getId()+"/comments"},mxUtils.bind(this,function(l){for(var m=[],x=0;x<l.items.length;x++){var y=f(this,l.items[x]);null!=y&&m.push(y)}b(m)}),e)};DriveFile.prototype.addComment=function(b,e,f){b={content:b.content};this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/comments",method:"POST",params:b},mxUtils.bind(this,function(c){e(c.commentId)}),f)};DriveFile.prototype.canReplyToReplies=function(){return!1};DriveFile.prototype.canComment=function(){return this.desc.canComment}; DriveFile.prototype.newComment=function(b,e){return new DriveComment(this,null,b,Date.now(),Date.now(),!1,e)};DriveLibrary=function(b,e,f){DriveFile.call(this,b,e,f)};mxUtils.extend(DriveLibrary,DriveFile);DriveLibrary.prototype.isAutosave=function(){return!0};DriveLibrary.prototype.save=function(b,e,f){this.ui.drive.saveFile(this,b,mxUtils.bind(this,function(c){this.desc=c;null!=e&&e(c)}),f)};DriveLibrary.prototype.open=function(){};(function(){var b=null,e={};window.DriveClient=function(f,c){null==c&&null!=window.urlParams&&"1"==window.urlParams.extAuth&&(c=!0);mxEventSource.call(this);DrawioClient.call(this,f,"gDriveAuthInfo");this.isExtAuth=c;this.ui=f;this.xmlMimeType="application/vnd.jgraph.mxfile";this.mimeType="application/vnd.jgraph.mxfile.realtime";this.ui.editor.chromeless&&!this.ui.editor.editable&&"1"!=urlParams.rt&&"1"!=urlParams.extAuth?(this.cookieName="gDriveViewerAuthInfo",this.token=this.getPersistentToken(), this.appId=window.DRAWIO_GOOGLE_VIEWER_APP_ID||"850530949725",this.clientId=window.DRAWIO_GOOGLE_VIEWER_CLIENT_ID||"850530949725.apps.googleusercontent.com",this.scopes=["https://www.googleapis.com/auth/drive.readonly","https://www.googleapis.com/auth/userinfo.profile"]):(this.appId=window.DRAWIO_GOOGLE_APP_ID||"671128082532",this.clientId=window.DRAWIO_GOOGLE_CLIENT_ID||"671128082532-jhphbq6d0e1gnsus9mn7vf8a6fjn10mp.apps.googleusercontent.com");this.mimeTypes=this.xmlMimeType+",application/mxe,application/mxr,application/vnd.jgraph.mxfile.realtime,application/vnd.jgraph.mxfile.rtlegacy"; f=JSON.parse(this.token);null!=f&&null!=f.current&&(this.userId=f.current.userId,this.authCalled=!1)};mxUtils.extend(DriveClient,mxEventSource);mxUtils.extend(DriveClient,DrawioClient);DriveClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/google";DriveClient.prototype.GDriveBaseUrl="https://www.googleapis.com/drive/v2";DriveClient.prototype.scopes=["https://www.googleapis.com/auth/drive.file","https://www.googleapis.com/auth/drive.install","https://www.googleapis.com/auth/userinfo.profile"]; @@ -12059,90 +12066,90 @@ DriveClient.prototype.allFields="kind,id,parents,headRevisionId,etag,title,mimeT "-").replace(/\//g,"_");DriveClient.prototype.placeholderMimeType="image/png";DriveClient.prototype.libraryMimeType="application/vnd.jgraph.mxlibrary";DriveClient.prototype.newAppHostname="www.draw.io";DriveClient.prototype.extension=".drawio";DriveClient.prototype.tokenRefreshInterval=0;DriveClient.prototype.lastTokenRefresh=0;DriveClient.prototype.maxRetries=5;DriveClient.prototype.staleEtagMaxRetries=3;DriveClient.prototype.coolOff=1E3;DriveClient.prototype.mimeTypeCheckCoolOff=6E4;DriveClient.prototype.user= null;DriveClient.prototype.sameWinAuthMode=!1;DriveClient.prototype.sameWinRedirectUrl=null;DriveClient.prototype.setUser=function(f){this.user=f;null==this.user?(this.userId=null,null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null)):this.userId=f.id;this.fireEvent(new mxEventObject("userChanged"))};DriveClient.prototype.setUserId=function(f){this.userId=f;null!=this.user&&this.user.id!=this.userId&&(this.user=null)};DriveClient.prototype.getUser= function(){return this.user};DriveClient.prototype.getUsersList=function(){var f=[],c=JSON.parse(this.getPersistentToken(!0)),l=null;if(null!=c){null!=c.current&&(l=c.current.userId,f.push(c[l].user),f[0].isCurrent=!0);for(var m in c)"current"!=m&&m!=l&&f.push(c[m].user)}return f};DriveClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&userId="+this.userId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken(); -this.setUser(null);b=null};DriveClient.prototype.execute=function(f){var c=mxUtils.bind(this,function(l){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(m,x){this.authorize(!1,mxUtils.bind(this,function(){null!=x&&x();f()}),mxUtils.bind(this,function(z){var C=null!=z.message?z.message:mxResources.get("cannotLogin");null!=z&&null!=z.error&&403==z.error.code&&null!=z.error.data&&0<z.error.data.length&&"domainPolicy"==z.error.data[0].reason&&(C=z.error.message);this.logout();this.ui.showError(mxResources.get("error"), -C,mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.diagrams.net/doc/faq/gsuite-authorisation-troubleshoot")}),null,mxResources.get("ok"))}),m)}))});this.authorize(!0,f,c)};DriveClient.prototype.executeRequest=function(f,c,l){try{var m=!0,x=null,z=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var C=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=f;null!=x&&window.clearTimeout(x);x=window.setTimeout(mxUtils.bind(this, -function(){m=!1;null!=l&&l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:C})}),this.ui.timeout);var d=null,g=!1;"string"===typeof f.params?d=f.params:null!=f.params&&(d=JSON.stringify(f.params),g=!0);var k=f.fullUrl||this.GDriveBaseUrl+f.url;g&&(k+=(0<k.indexOf("?")?"&":"?")+"alt=json");var n=new mxXmlRequest(k,d,f.method||"GET");n.setRequestHeaders=mxUtils.bind(this,function(t,p){if(null!=f.headers)for(var A in f.headers)t.setRequestHeader(A,f.headers[A]);else null!=f.contentType? -t.setRequestHeader("Content-Type",f.contentType):g&&t.setRequestHeader("Content-Type","application/json");t.setRequestHeader("Authorization","Bearer "+b)});n.send(mxUtils.bind(this,function(t){try{if(window.clearTimeout(x),m){try{var p=JSON.parse(t.getText())}catch(y){p=null}if(200<=t.getStatus()&&299>=t.getStatus())null!=c&&c(p);else{var A=null!=p&&null!=p.error?null!=p.error.data?p.error.data:p.error.errors:null,E=null!=A&&0<A.length?A[0].reason:null;null==l||null==p||null==p.error||-1!=p.error.code&& -(403!=p.error.code||"domainPolicy"!=E&&"The requested mime type change is forbidden."!=p.error.message)?null!=p&&null!=p.error&&(401==p.error.code||403==p.error.code&&"rateLimitExceeded"!=E)?403==p.error.code&&this.retryAuth||401==p.error.code&&this.retryAuth&&"authError"==E?(null!=l&&l(p),this.retryAuth=!1):(this.retryAuth=!0,this.execute(C)):null!=p&&null!=p.error&&412!=p.error.code&&404!=p.error.code&&400!=p.error.code&&this.currentRequest==f&&z<this.maxRetries?(z++,this.requestThread=window.setTimeout(C, -Math.round(Math.pow(2,z)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=l&&l(p):l(p)}}}catch(y){if(null!=l)l(y);else throw y;}}))}catch(t){if(null!=l)l(t);else throw t;}});null!=b&&this.authCalled?C():this.execute(C)}catch(d){if(null!=l)l(d);else throw d;}};DriveClient.prototype.createAuthWin=function(f){return window.open(f?f:"about:blank","gdauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join())}; -DriveClient.prototype.authorize=function(f,c,l,m,x){this.isExtAuth&&!f?window.parent.driveAuth(mxUtils.bind(this,function(z){this.updateAuthInfo(z,!0,!0,c,l)}),l):(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(z){200<=z.getStatus()&&299>=z.getStatus()?this.authorizeStep2(z.getText(),f,c,l,m,x):null!=l&&l(z)}),l)};DriveClient.prototype.updateAuthInfo=function(f,c,l,m,x){b=f.access_token;delete f.access_token;f.expires=Date.now()+1E3*parseInt(f.expires_in); -f.remember=c;this.resetTokenRefresh(f);this.authCalled=!0;if(l||null==this.user){var z=JSON.stringify(f);this.updateUser(mxUtils.bind(this,function(){var C=JSON.parse(z);this.setPersistentToken(C,!c);null!=m&&m()}),x)}else null!=m&&(this.setPersistentToken(f,!c),m())};DriveClient.prototype.authorizeStep2=function(f,c,l,m,x,z){try{null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(this.userId=this.ui.stateArg.userId,null!=this.user&&this.user.id!=this.userId&&(this.user=null));if(null==this.userId){var C= -JSON.parse(this.getPersistentToken(!0));C&&null!=C.current&&(this.userId=C.current.userId)}if(c&&null==this.userId)null!=m&&m();else if(c)(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+f)+"&userId="+this.userId,null,"GET")).send(mxUtils.bind(this,function(g){200<=g.getStatus()&&299>=g.getStatus()?(g=JSON.parse(g.getText()),this.updateAuthInfo(g,!0,!1,l,m)):(0!=g.getStatus()&&this.logout(),null!=m&&m(g))}),m);else{var d= +this.setUser(null);b=null};DriveClient.prototype.execute=function(f){var c=mxUtils.bind(this,function(l){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(m,x){this.authorize(!1,mxUtils.bind(this,function(){null!=x&&x();f()}),mxUtils.bind(this,function(y){var D=null!=y.message?y.message:mxResources.get("cannotLogin");null!=y&&null!=y.error&&403==y.error.code&&null!=y.error.data&&0<y.error.data.length&&"domainPolicy"==y.error.data[0].reason&&(D=y.error.message);this.logout();this.ui.showError(mxResources.get("error"), +D,mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.diagrams.net/doc/faq/gsuite-authorisation-troubleshoot")}),null,mxResources.get("ok"))}),m)}))});this.authorize(!0,f,c)};DriveClient.prototype.executeRequest=function(f,c,l){try{var m=!0,x=null,y=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var D=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=f;null!=x&&window.clearTimeout(x);x=window.setTimeout(mxUtils.bind(this, +function(){m=!1;null!=l&&l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:D})}),this.ui.timeout);var d=null,g=!1;"string"===typeof f.params?d=f.params:null!=f.params&&(d=JSON.stringify(f.params),g=!0);var k=f.fullUrl||this.GDriveBaseUrl+f.url;g&&(k+=(0<k.indexOf("?")?"&":"?")+"alt=json");var n=new mxXmlRequest(k,d,f.method||"GET");n.setRequestHeaders=mxUtils.bind(this,function(q,p){if(null!=f.headers)for(var A in f.headers)q.setRequestHeader(A,f.headers[A]);else null!=f.contentType? +q.setRequestHeader("Content-Type",f.contentType):g&&q.setRequestHeader("Content-Type","application/json");q.setRequestHeader("Authorization","Bearer "+b)});n.send(mxUtils.bind(this,function(q){try{if(window.clearTimeout(x),m){try{var p=JSON.parse(q.getText())}catch(z){p=null}if(200<=q.getStatus()&&299>=q.getStatus())null!=c&&c(p);else{var A=null!=p&&null!=p.error?null!=p.error.data?p.error.data:p.error.errors:null,E=null!=A&&0<A.length?A[0].reason:null;null==l||null==p||null==p.error||-1!=p.error.code&& +(403!=p.error.code||"domainPolicy"!=E&&"The requested mime type change is forbidden."!=p.error.message)?null!=p&&null!=p.error&&(401==p.error.code||403==p.error.code&&"rateLimitExceeded"!=E)?403==p.error.code&&this.retryAuth||401==p.error.code&&this.retryAuth&&"authError"==E?(null!=l&&l(p),this.retryAuth=!1):(this.retryAuth=!0,this.execute(D)):null!=p&&null!=p.error&&412!=p.error.code&&404!=p.error.code&&400!=p.error.code&&this.currentRequest==f&&y<this.maxRetries?(y++,this.requestThread=window.setTimeout(D, +Math.round(Math.pow(2,y)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=l&&l(p):l(p)}}}catch(z){if(null!=l)l(z);else throw z;}}))}catch(q){if(null!=l)l(q);else throw q;}});null!=b&&this.authCalled?D():this.execute(D)}catch(d){if(null!=l)l(d);else throw d;}};DriveClient.prototype.createAuthWin=function(f){return window.open(f?f:"about:blank","gdauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join())}; +DriveClient.prototype.authorize=function(f,c,l,m,x){this.isExtAuth&&!f?window.parent.driveAuth(mxUtils.bind(this,function(y){this.updateAuthInfo(y,!0,!0,c,l)}),l):(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(y){200<=y.getStatus()&&299>=y.getStatus()?this.authorizeStep2(y.getText(),f,c,l,m,x):null!=l&&l(y)}),l)};DriveClient.prototype.updateAuthInfo=function(f,c,l,m,x){b=f.access_token;delete f.access_token;f.expires=Date.now()+1E3*parseInt(f.expires_in); +f.remember=c;this.resetTokenRefresh(f);this.authCalled=!0;if(l||null==this.user){var y=JSON.stringify(f);this.updateUser(mxUtils.bind(this,function(){var D=JSON.parse(y);this.setPersistentToken(D,!c);null!=m&&m()}),x)}else null!=m&&(this.setPersistentToken(f,!c),m())};DriveClient.prototype.authorizeStep2=function(f,c,l,m,x,y){try{null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(this.userId=this.ui.stateArg.userId,null!=this.user&&this.user.id!=this.userId&&(this.user=null));if(null==this.userId){var D= +JSON.parse(this.getPersistentToken(!0));D&&null!=D.current&&(this.userId=D.current.userId)}if(c&&null==this.userId)null!=m&&m();else if(c)(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+f)+"&userId="+this.userId,null,"GET")).send(mxUtils.bind(this,function(g){200<=g.getStatus()&&299>=g.getStatus()?(g=JSON.parse(g.getText()),this.updateAuthInfo(g,!0,!1,l,m)):(0!=g.getStatus()&&this.logout(),null!=m&&m(g))}),m);else{var d= "https://accounts.google.com/o/oauth2/v2/auth?client_id="+this.clientId+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&include_granted_scopes=true"+(x?"&access_type=offline&prompt=consent%20select_account":"")+"&scope="+encodeURIComponent(this.scopes.join(" "))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+f+(this.sameWinRedirectUrl?"&redirect="+this.sameWinRedirectUrl:""));this.sameWinAuthMode?(window.location.assign(d), -z=null):null==z?z=this.createAuthWin(d):z.location=d;null!=z?(window.onGoogleDriveCallback=mxUtils.bind(this,function(g,k){window.onGoogleDriveCallback=null;try{null==g?null!=m&&m({message:mxResources.get("accessDenied")}):this.updateAuthInfo(g,x,!0,l,m)}catch(n){null!=m&&m(n)}finally{null!=k&&k.close()}}),z.focus()):null!=m&&m({message:mxResources.get("allowPopups")})}}catch(g){if(null!=m)m(g);else throw g;}};DriveClient.prototype.resetTokenRefresh=function(f){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread), +y=null):null==y?y=this.createAuthWin(d):y.location=d;null!=y?(window.onGoogleDriveCallback=mxUtils.bind(this,function(g,k){window.onGoogleDriveCallback=null;try{null==g?null!=m&&m({message:mxResources.get("accessDenied")}):this.updateAuthInfo(g,x,!0,l,m)}catch(n){null!=m&&m(n)}finally{null!=k&&k.close()}}),y.focus()):null!=m&&m({message:mxResources.get("allowPopups")})}}catch(g){if(null!=m)m(g);else throw g;}};DriveClient.prototype.resetTokenRefresh=function(f){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread), this.tokenRefreshThread=null);null!=f&&null==f.error&&0<f.expires_in&&(this.tokenRefreshInterval=1E3*parseInt(f.expires_in),this.lastTokenRefresh=(new Date).getTime(),this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,function(){this.authorize(!0,mxUtils.bind(this,function(){}),mxUtils.bind(this,function(){}))}),900*f.expires_in))};DriveClient.prototype.checkToken=function(f){var c=0<this.lastTokenRefresh;(new Date).getTime()-this.lastTokenRefresh>this.tokenRefreshInterval||null==this.tokenRefreshThread? -this.execute(mxUtils.bind(this,function(){f();c&&this.fireEvent(new mxEventObject("disconnected"))})):f()};DriveClient.prototype.updateUser=function(f,c){try{var l={Authorization:"Bearer "+b};this.ui.editor.loadUrl("https://www.googleapis.com/oauth2/v2/userinfo?alt=json",mxUtils.bind(this,function(m){var x=JSON.parse(m);this.executeRequest({url:"/about"},mxUtils.bind(this,function(z){var C=mxResources.get("notAvailable"),d=C,g=null;null!=z&&null!=z.user&&(C=z.user.emailAddress,d=z.user.displayName, -g=null!=z.user.picture?z.user.picture.url:null);this.setUser(new DrawioUser(x.id,C,d,g,x.locale));this.userId=x.id;null!=f&&f()}),c)}),c,null,null,null,null,l)}catch(m){if(null!=c)c(m);else throw m;}};DriveClient.prototype.copyFile=function(f,c,l,m){null!=f&&null!=c&&this.executeRequest({url:"/files/"+f+"/copy?fields="+encodeURIComponent(this.allFields)+"&supportsAllDrives=true&enforceSingleParent=true",method:"POST",params:{title:c,properties:[{key:"channel",value:Editor.guid()}]}},l,m)};DriveClient.prototype.renameFile= +this.execute(mxUtils.bind(this,function(){f();c&&this.fireEvent(new mxEventObject("disconnected"))})):f()};DriveClient.prototype.updateUser=function(f,c){try{var l={Authorization:"Bearer "+b};this.ui.editor.loadUrl("https://www.googleapis.com/oauth2/v2/userinfo?alt=json",mxUtils.bind(this,function(m){var x=JSON.parse(m);this.executeRequest({url:"/about"},mxUtils.bind(this,function(y){var D=mxResources.get("notAvailable"),d=D,g=null;null!=y&&null!=y.user&&(D=y.user.emailAddress,d=y.user.displayName, +g=null!=y.user.picture?y.user.picture.url:null);this.setUser(new DrawioUser(x.id,D,d,g,x.locale));this.userId=x.id;null!=f&&f()}),c)}),c,null,null,null,null,l)}catch(m){if(null!=c)c(m);else throw m;}};DriveClient.prototype.copyFile=function(f,c,l,m){null!=f&&null!=c&&this.executeRequest({url:"/files/"+f+"/copy?fields="+encodeURIComponent(this.allFields)+"&supportsAllDrives=true&enforceSingleParent=true",method:"POST",params:{title:c,properties:[{key:"channel",value:Editor.guid()}]}},l,m)};DriveClient.prototype.renameFile= function(f,c,l,m){null!=f&&null!=c&&this.executeRequest(this.createDriveRequest(f,{title:c}),l,m)};DriveClient.prototype.moveFile=function(f,c,l,m){null!=f&&null!=c&&this.executeRequest(this.createDriveRequest(f,{parents:[{kind:"drive#fileLink",id:c}]}),l,m)};DriveClient.prototype.createDriveRequest=function(f,c){return{url:"/files/"+f+"?uploadType=multipart&supportsAllDrives=true",method:"PUT",contentType:"application/json; charset=UTF-8",params:c}};DriveClient.prototype.getLibrary=function(f,c, l){return this.getFile(f,c,l,!0,!0)};DriveClient.prototype.loadDescriptor=function(f,c,l,m){this.executeRequest({url:"/files/"+f+"?supportsAllDrives=true&fields="+(null!=m?m:this.allFields)},c,l)};DriveClient.prototype.listFiles=function(f,c,l,m,x){this.executeRequest({url:"/files?supportsAllDrives=true&includeItemsFromAllDrives=true&q="+encodeURIComponent("(mimeType contains '"+this.xmlMimeType+"') "+(f?" and (title contains '"+f+"')":"")+(c?" and (modifiedDate > '"+c.toISOString()+"')":"")+(l?" and ('me' in owners)": -""))+"&orderBy=modifiedDate desc,title"},m,x)};DriveClient.prototype.getCustomProperty=function(f,c){f=f.properties;var l=null;if(null!=f)for(var m=0;m<f.length;m++)if(f[m].key==c){l=f[m].value;break}return l};DriveClient.prototype.getFile=function(f,c,l,m,x){m=null!=m?m:!1;x=null!=x?x:!1;null!=urlParams.rev?this.executeRequest({url:"/files/"+f+"/revisions/"+urlParams.rev+"?supportsAllDrives=true"},mxUtils.bind(this,function(z){z.title=z.originalFilename;z.headRevisionId=z.id;z.id=f;this.getXmlFile(z, -c,l)}),l):this.loadDescriptor(f,mxUtils.bind(this,function(z){try{if(null!=this.user){var C=/\.png$/i.test(z.title);/\.v(dx|sdx?)$/i.test(z.title)||/\.gliffy$/i.test(z.title)||!this.ui.useCanvasForExport&&C?this.ui.convertFile(z.downloadUrl,z.title,z.mimeType,this.extension,c,l,null,{Authorization:"Bearer "+b}):m||x||z.mimeType==this.libraryMimeType||z.mimeType==this.xmlMimeType?this.getXmlFile(z,c,l,!0,x):this.getXmlFile(z,c,l)}else l({message:mxResources.get("loggedOut")})}catch(d){if(null!=l)l(d); -else throw d;}}),l)};DriveClient.prototype.isGoogleRealtimeMimeType=function(f){return null!=f&&"application/vnd.jgraph.mxfile."==f.substring(0,30)};DriveClient.prototype.getXmlFile=function(f,c,l,m,x){try{var z={Authorization:"Bearer "+b},C=f.downloadUrl;if(null==C)null!=l&&l({message:mxResources.get("exportOptionsDisabledDetails")});else{var d=0,g=mxUtils.bind(this,function(){this.ui.editor.loadUrl(C,mxUtils.bind(this,function(k){try{if(null==k)l({message:mxResources.get("invalidOrMissingFile")}); -else if(f.mimeType==this.libraryMimeType||x)f.mimeType!=this.libraryMimeType||x?c(new DriveLibrary(this.ui,k,f)):l({message:mxResources.get("notADiagramFile")});else{var n=!1;if(/\.png$/i.test(f.title)){var t=k.lastIndexOf(",");if(0<t){var p=this.ui.extractGraphModelFromPng(k);if(null!=p&&0<p.length)k=p;else try{p=k.substring(t+1);var A=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(p):atob(p),E=this.ui.editor.extractGraphModel(mxUtils.parseXml(A).documentElement,!0);null==E||0<E.getElementsByTagName("parsererror").length? -n=!0:k=A}catch(y){n=!0}}}else/\.pdf$/i.test(f.title)?(p=Editor.extractGraphModelFromPdf(k),null!=p&&0<p.length&&(n=!0,k=p)):"data:image/png;base64,PG14ZmlsZS"==k.substring(0,32)&&(A=k.substring(22),k=window.atob&&!mxClient.IS_SF?atob(A):Base64.decode(A));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(k,C)?this.ui.parseFileData(k,mxUtils.bind(this,function(y){try{4==y.readyState&&(200<=y.status&&299>=y.status?c(new LocalFile(this.ui,y.responseText,f.title+this.extension, -!0)):null!=l&&l({message:mxResources.get("errorLoadingFile")}))}catch(B){if(null!=l)l(B);else throw B;}}),f.title):c(n?new LocalFile(this.ui,k,f.title,!0):new DriveFile(this.ui,k,f))}}catch(y){if(null!=l)l(y);else throw y;}}),mxUtils.bind(this,function(k,n){if(d<this.maxRetries&&null!=n&&403==n.getStatus())d++,window.setTimeout(g,2*d*this.coolOff*(1+.1*(Math.random()-.5)));else if(null!=l)l(k);else throw k;}),null!=f.mimeType&&"image/"==f.mimeType.substring(0,6)&&"image/svg"!=f.mimeType.substring(0, -9)||/\.png$/i.test(f.title)||/\.jpe?g$/i.test(f.title)||/\.pdf$/i.test(f.title),null,null,null,z)});g()}}catch(k){if(null!=l)l(k);else throw k;}};DriveClient.prototype.saveFile=function(f,c,l,m,x,z,C,d,g){try{var k=0;f.saveLevel=1;var n=mxUtils.bind(this,function(G){if(null!=m)m(G);else throw G;try{if(!f.isConflict(G)){var H="sl_"+f.saveLevel+"-error_"+(f.getErrorMessage(G)||"unknown");null!=G&&null!=G.error&&null!=G.error.code&&(H+="-code_"+G.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+ -f.getHash()+"-rev_"+f.desc.headRevisionId+"-mod_"+f.desc.modifiedDate+"-size_"+f.getSize()+"-mime_"+f.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(f.isAutosave()?"":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),action:H,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}}catch(M){}}),t=mxUtils.bind(this,function(G){n(G);try{EditorUi.logError(G.message,null,null, -G)}catch(H){}});if(f.isEditable()&&null!=f.desc){var p=(new Date).getTime(),A=f.desc.etag,E=f.desc.modifiedDate,y=f.desc.headRevisionId,B=this.ui.useCanvasForExport&&/(\.png)$/i.test(f.getTitle());z=null!=z?z:!1;var J=null,N=!1,v={mimeType:f.desc.mimeType,title:f.getTitle()};if(this.isGoogleRealtimeMimeType(v.mimeType))v.mimeType=this.xmlMimeType,J=f.desc,N=c=!0;else if("application/octet-stream"==v.mimeType||"1"==urlParams["override-mime"]&&v.mimeType!=this.xmlMimeType)v.mimeType=this.xmlMimeType; -var u=mxUtils.bind(this,function(G,H,M){try{f.saveLevel=3;f.constructor==DriveFile&&(null==d&&(d=[]),null==f.getChannelId()&&d.push({key:"channel",value:Editor.guid(32)}),null==f.getChannelKey()&&d.push({key:"key",value:Editor.guid(32)}),d.push({key:"secret",value:null!=g?g:Editor.guid(32)}));M||(null!=G||z||(G=this.placeholderThumbnail,H=this.placeholderMimeType),null!=G&&null!=H&&(v.thumbnail={image:G,mimeType:H}));var K=f.getData(),I=mxUtils.bind(this,function(U){try{if(f.saveDelay=(new Date).getTime()- -p,f.saveLevel=11,null==U)n({message:mxResources.get("errorSavingFile")+": Empty response"});else{var T=(new Date(U.modifiedDate)).getTime()-(new Date(E)).getTime();if(0>=T||A==U.etag||c&&y==U.headRevisionId){f.saveLevel=12;var V=[];0>=T&&V.push("invalid modified time");A==U.etag&&V.push("stale etag");c&&y==U.headRevisionId&&V.push("stale revision");var W=V.join(", ");n({message:mxResources.get("errorSavingFile")+": "+W},U);try{EditorUi.logError("Critical: Error saving to Google Drive "+f.desc.id, -null,"from-"+y+"."+E+"-"+this.ui.hashValue(A)+"-to-"+U.headRevisionId+"."+U.modifiedDate+"-"+this.ui.hashValue(U.etag)+(0<W.length?"-errors-"+W:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync"))}catch(q){}}else if(f.saveLevel=null,l(U,K),null!=J){this.executeRequest({url:"/files/"+J.id+"/revisions/"+J.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(q){q.pinned=!0;this.executeRequest({url:"/files/"+J.id+"/revisions/"+ -J.headRevisionId,method:"PUT",params:q})})));try{EditorUi.logEvent({category:f.convertedFrom+"-CONVERT-FILE-"+f.getHash(),action:"from_"+J.id+"."+J.headRevisionId+"-to_"+f.desc.id+"."+f.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=f.sync?"-client_"+f.sync.clientId:"nosync")})}catch(q){}}}}catch(q){t(q)}}),F=mxUtils.bind(this,function(U,T){f.saveLevel=4;try{null!=d&&(v.properties=d);var V=C||f.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC? -null:f.getCurrentEtag(),W=mxUtils.bind(this,function(L){f.saveLevel=5;try{var R=f.desc.mimeType!=this.xmlMimeType&&f.desc.mimeType!=this.mimeType&&f.desc.mimeType!=this.libraryMimeType,O=!0,Q=null;try{Q=window.setTimeout(mxUtils.bind(this,function(){O=!1;n({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(S){}this.executeRequest(this.createUploadRequest(f.getId(),v,U,c||L||R,T,L?null:V,N),mxUtils.bind(this,function(S){window.clearTimeout(Q);O&&I(S)}),mxUtils.bind(this,function(S){window.clearTimeout(Q); -if(O){f.saveLevel=6;try{f.isConflict(S)?this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(X){f.saveLevel=7;try{if(null!=X&&X.etag==V)if(k<this.staleEtagMaxRetries){k++;var aa=2*k*this.coolOff*(1+.1*(Math.random()-.5));window.setTimeout(q,aa);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",k,"delay",aa)}else{q(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+f.getHash(),action:"rev_"+ -f.desc.headRevisionId+"-mod_"+f.desc.modifiedDate+"-size_"+f.getSize()+"-mime_"+f.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(f.isAutosave()?"":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}catch(Y){}}else"1"==urlParams.test&&X.headRevisionId==y&&EditorUi.debug("DriveClient: Remote Etag Changed","local",V,"remote", -X.etag,"rev",f.desc.headRevisionId,"response",[X],"file",[f]),n(S,X)}catch(Y){t(Y)}}),mxUtils.bind(this,function(){n(S)})):n(S)}catch(X){t(X)}}}))}catch(S){t(S)}}),q=mxUtils.bind(this,function(L){f.saveLevel=9;if(L||null==V)W(L);else{var R=!0,O=null;try{O=window.setTimeout(mxUtils.bind(this,function(){R=!1;n({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(Q){}this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(Q){window.clearTimeout(O); -if(R){f.saveLevel=10;try{null!=Q&&Q.headRevisionId==y?("1"==urlParams.test&&V!=Q.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",V,"to",Q.etag,"rev",f.desc.headRevisionId,"response",[Q],"file",[f]),V=Q.etag,W(L)):n({error:{code:412}},Q)}catch(S){t(S)}}}),mxUtils.bind(this,function(Q){window.clearTimeout(O);R&&(f.saveLevel=11,n(Q))}))}});if(B&&null==G){f.saveLevel=8;var D=new Image;D.onload=mxUtils.bind(this,function(){try{var L=this.thumbnailWidth/D.width,R=document.createElement("canvas"); -R.width=this.thumbnailWidth;R.height=Math.floor(D.height*L);R.getContext("2d").drawImage(D,0,0,R.width,R.height);var O=R.toDataURL();O=O.substring(O.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");v.thumbnail={image:O,mimeType:"image/png"};q(!1)}catch(Q){try{q(!1)}catch(S){t(S)}}});D.src="data:image/png;base64,"+U}else q(!1)}catch(L){t(L)}});if(B){var P=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(U){F(U,!0)}),n,this.ui.getCurrentFile()!=f? -K:null,P.scale,P.border)}else F(K,!1)}catch(U){t(U)}});try{f.saveLevel=2,(z||B||f.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=v.mimeType&&"application/vnd.jgraph.mxfile"!=v.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(G){try{var H=null;try{null!=G&&(H=G.toDataURL("image/png")),null!=H&&(H=H.length>this.maxThumbnailSize?null:H.substring(H.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(M){H=null}u(H,"image/png")}catch(M){t(M)}})))&& -u(null,null,f.constructor!=DriveLibrary)}catch(G){t(G)}}else this.ui.editor.graph.reset(),n({message:mxResources.get("readOnly")})}catch(G){t(G)}};DriveClient.prototype.insertFile=function(f,c,l,m,x,z,C){z=null!=z?z:this.xmlMimeType;f={mimeType:z,title:f};null!=l&&(f.parents=[{kind:"drive#fileLink",id:l}]);this.executeRequest(this.createUploadRequest(null,f,c,!1,C),mxUtils.bind(this,function(d){z==this.libraryMimeType?m(new DriveLibrary(this.ui,c,d)):0==d?null!=x&&x({message:mxResources.get("errorSavingFile")}): -m(new DriveFile(this.ui,c,d))}),x)};DriveClient.prototype.createUploadRequest=function(f,c,l,m,x,z,C){x=null!=x?x:!1;var d={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=z&&(d["If-Match"]=z);f={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=f?"/"+f:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+this.allFields,method:null!=f?"PUT":"POST",headers:d,params:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+ -JSON.stringify(c)+"\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+(null!=l?x?l:!window.btoa||mxClient.IS_IE||mxClient.IS_IE11?Base64.encode(l):Graph.base64EncodeUnicode(l):"")+"\r\n---------314159265358979323846--"};m||(f.fullUrl+="&newRevision=false");C&&(f.fullUrl+="&pinned=true");return f};DriveClient.prototype.createLinkPicker=function(){var f=e.linkPicker;if(null==f||e.linkPickerToken!=b){e.linkPickerToken=b;f=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0); +""))+"&orderBy=modifiedDate desc,title"},m,x)};DriveClient.prototype.getCustomProperty=function(f,c){f=f.properties;var l=null;if(null!=f)for(var m=0;m<f.length;m++)if(f[m].key==c){l=f[m].value;break}return l};DriveClient.prototype.getFile=function(f,c,l,m,x){m=null!=m?m:!1;x=null!=x?x:!1;null!=urlParams.rev?this.executeRequest({url:"/files/"+f+"/revisions/"+urlParams.rev+"?supportsAllDrives=true"},mxUtils.bind(this,function(y){y.title=y.originalFilename;y.headRevisionId=y.id;y.id=f;this.getXmlFile(y, +c,l)}),l):this.loadDescriptor(f,mxUtils.bind(this,function(y){try{if(null!=this.user){var D=/\.png$/i.test(y.title);/\.v(dx|sdx?)$/i.test(y.title)||/\.gliffy$/i.test(y.title)||!this.ui.useCanvasForExport&&D?this.ui.convertFile(y.downloadUrl,y.title,y.mimeType,this.extension,c,l,null,{Authorization:"Bearer "+b}):m||x||y.mimeType==this.libraryMimeType||y.mimeType==this.xmlMimeType?this.getXmlFile(y,c,l,!0,x):this.getXmlFile(y,c,l)}else l({message:mxResources.get("loggedOut")})}catch(d){if(null!=l)l(d); +else throw d;}}),l)};DriveClient.prototype.isGoogleRealtimeMimeType=function(f){return null!=f&&"application/vnd.jgraph.mxfile."==f.substring(0,30)};DriveClient.prototype.getXmlFile=function(f,c,l,m,x){try{var y={Authorization:"Bearer "+b},D=f.downloadUrl;if(null==D)null!=l&&l({message:mxResources.get("exportOptionsDisabledDetails")});else{var d=0,g=mxUtils.bind(this,function(){this.ui.editor.loadUrl(D,mxUtils.bind(this,function(k){try{if(null==k)l({message:mxResources.get("invalidOrMissingFile")}); +else if(f.mimeType==this.libraryMimeType||x)f.mimeType!=this.libraryMimeType||x?c(new DriveLibrary(this.ui,k,f)):l({message:mxResources.get("notADiagramFile")});else{var n=!1;if(/\.png$/i.test(f.title)){var q=k.lastIndexOf(",");if(0<q){var p=this.ui.extractGraphModelFromPng(k);if(null!=p&&0<p.length)k=p;else try{p=k.substring(q+1);var A=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(p):atob(p),E=this.ui.editor.extractGraphModel(mxUtils.parseXml(A).documentElement,!0);null==E||0<E.getElementsByTagName("parsererror").length? +n=!0:k=A}catch(z){n=!0}}}else/\.pdf$/i.test(f.title)?(p=Editor.extractGraphModelFromPdf(k),null!=p&&0<p.length&&(n=!0,k=p)):"data:image/png;base64,PG14ZmlsZS"==k.substring(0,32)&&(A=k.substring(22),k=window.atob&&!mxClient.IS_SF?atob(A):Base64.decode(A));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(k,D)?this.ui.parseFileData(k,mxUtils.bind(this,function(z){try{4==z.readyState&&(200<=z.status&&299>=z.status?c(new LocalFile(this.ui,z.responseText,f.title+this.extension, +!0)):null!=l&&l({message:mxResources.get("errorLoadingFile")}))}catch(B){if(null!=l)l(B);else throw B;}}),f.title):c(n?new LocalFile(this.ui,k,f.title,!0):new DriveFile(this.ui,k,f))}}catch(z){if(null!=l)l(z);else throw z;}}),mxUtils.bind(this,function(k,n){if(d<this.maxRetries&&null!=n&&403==n.getStatus())d++,window.setTimeout(g,2*d*this.coolOff*(1+.1*(Math.random()-.5)));else if(null!=l)l(k);else throw k;}),null!=f.mimeType&&"image/"==f.mimeType.substring(0,6)&&"image/svg"!=f.mimeType.substring(0, +9)||/\.png$/i.test(f.title)||/\.jpe?g$/i.test(f.title)||/\.pdf$/i.test(f.title),null,null,null,y)});g()}}catch(k){if(null!=l)l(k);else throw k;}};DriveClient.prototype.saveFile=function(f,c,l,m,x,y,D,d,g){try{var k=0;f.saveLevel=1;var n=mxUtils.bind(this,function(G){if(null!=m)m(G);else throw G;try{if(!f.isConflict(G)){var I="sl_"+f.saveLevel+"-error_"+(f.getErrorMessage(G)||"unknown");null!=G&&null!=G.error&&null!=G.error.code&&(I+="-code_"+G.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+ +f.getHash()+"-rev_"+f.desc.headRevisionId+"-mod_"+f.desc.modifiedDate+"-size_"+f.getSize()+"-mime_"+f.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(f.isAutosave()?"":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),action:I,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}}catch(F){}}),q=mxUtils.bind(this,function(G){n(G);try{EditorUi.logError(G.message,null,null, +G)}catch(I){}});if(f.isEditable()&&null!=f.desc){var p=(new Date).getTime(),A=f.desc.etag,E=f.desc.modifiedDate,z=f.desc.headRevisionId,B=this.ui.useCanvasForExport&&/(\.png)$/i.test(f.getTitle());y=null!=y?y:!1;var J=null,M=!1,v={mimeType:f.desc.mimeType,title:f.getTitle()};if(this.isGoogleRealtimeMimeType(v.mimeType))v.mimeType=this.xmlMimeType,J=f.desc,M=c=!0;else if("application/octet-stream"==v.mimeType||"1"==urlParams["override-mime"]&&v.mimeType!=this.xmlMimeType)v.mimeType=this.xmlMimeType; +var u=mxUtils.bind(this,function(G,I,F){try{f.saveLevel=3;f.constructor==DriveFile&&(null==d&&(d=[]),null==f.getChannelId()&&d.push({key:"channel",value:Editor.guid(32)}),null==f.getChannelKey()&&d.push({key:"key",value:Editor.guid(32)}),d.push({key:"secret",value:null!=g?g:Editor.guid(32)}));F||(null!=G||y||(G=this.placeholderThumbnail,I=this.placeholderMimeType),null!=G&&null!=I&&(v.thumbnail={image:G,mimeType:I}));var L=f.getData(),K=mxUtils.bind(this,function(U){try{if(f.saveDelay=(new Date).getTime()- +p,f.saveLevel=11,null==U)n({message:mxResources.get("errorSavingFile")+": Empty response"});else{var T=(new Date(U.modifiedDate)).getTime()-(new Date(E)).getTime();if(0>=T||A==U.etag||c&&z==U.headRevisionId){f.saveLevel=12;var V=[];0>=T&&V.push("invalid modified time");A==U.etag&&V.push("stale etag");c&&z==U.headRevisionId&&V.push("stale revision");var W=V.join(", ");n({message:mxResources.get("errorSavingFile")+": "+W},U);try{EditorUi.logError("Critical: Error saving to Google Drive "+f.desc.id, +null,"from-"+z+"."+E+"-"+this.ui.hashValue(A)+"-to-"+U.headRevisionId+"."+U.modifiedDate+"-"+this.ui.hashValue(U.etag)+(0<W.length?"-errors-"+W:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync"))}catch(t){}}else if(f.saveLevel=null,l(U,L),null!=J){this.executeRequest({url:"/files/"+J.id+"/revisions/"+J.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(t){t.pinned=!0;this.executeRequest({url:"/files/"+J.id+"/revisions/"+ +J.headRevisionId,method:"PUT",params:t})})));try{EditorUi.logEvent({category:f.convertedFrom+"-CONVERT-FILE-"+f.getHash(),action:"from_"+J.id+"."+J.headRevisionId+"-to_"+f.desc.id+"."+f.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=f.sync?"-client_"+f.sync.clientId:"nosync")})}catch(t){}}}}catch(t){q(t)}}),H=mxUtils.bind(this,function(U,T){f.saveLevel=4;try{null!=d&&(v.properties=d);var V=D||f.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC? +null:f.getCurrentEtag(),W=mxUtils.bind(this,function(N){f.saveLevel=5;try{var R=f.desc.mimeType!=this.xmlMimeType&&f.desc.mimeType!=this.mimeType&&f.desc.mimeType!=this.libraryMimeType,O=!0,P=null;try{P=window.setTimeout(mxUtils.bind(this,function(){O=!1;n({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(S){}this.executeRequest(this.createUploadRequest(f.getId(),v,U,c||N||R,T,N?null:V,M),mxUtils.bind(this,function(S){window.clearTimeout(P);O&&K(S)}),mxUtils.bind(this,function(S){window.clearTimeout(P); +if(O){f.saveLevel=6;try{f.isConflict(S)?this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(X){f.saveLevel=7;try{if(null!=X&&X.etag==V)if(k<this.staleEtagMaxRetries){k++;var aa=2*k*this.coolOff*(1+.1*(Math.random()-.5));window.setTimeout(t,aa);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",k,"delay",aa)}else{t(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+f.getHash(),action:"rev_"+ +f.desc.headRevisionId+"-mod_"+f.desc.modifiedDate+"-size_"+f.getSize()+"-mime_"+f.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(f.isAutosave()?"":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}catch(Y){}}else"1"==urlParams.test&&X.headRevisionId==z&&EditorUi.debug("DriveClient: Remote Etag Changed","local",V,"remote", +X.etag,"rev",f.desc.headRevisionId,"response",[X],"file",[f]),n(S,X)}catch(Y){q(Y)}}),mxUtils.bind(this,function(){n(S)})):n(S)}catch(X){q(X)}}}))}catch(S){q(S)}}),t=mxUtils.bind(this,function(N){f.saveLevel=9;if(N||null==V)W(N);else{var R=!0,O=null;try{O=window.setTimeout(mxUtils.bind(this,function(){R=!1;n({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(P){}this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(P){window.clearTimeout(O); +if(R){f.saveLevel=10;try{null!=P&&P.headRevisionId==z?("1"==urlParams.test&&V!=P.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",V,"to",P.etag,"rev",f.desc.headRevisionId,"response",[P],"file",[f]),V=P.etag,W(N)):n({error:{code:412}},P)}catch(S){q(S)}}}),mxUtils.bind(this,function(P){window.clearTimeout(O);R&&(f.saveLevel=11,n(P))}))}});if(B&&null==G){f.saveLevel=8;var C=new Image;C.onload=mxUtils.bind(this,function(){try{var N=this.thumbnailWidth/C.width,R=document.createElement("canvas"); +R.width=this.thumbnailWidth;R.height=Math.floor(C.height*N);R.getContext("2d").drawImage(C,0,0,R.width,R.height);var O=R.toDataURL();O=O.substring(O.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");v.thumbnail={image:O,mimeType:"image/png"};t(!1)}catch(P){try{t(!1)}catch(S){q(S)}}});C.src="data:image/png;base64,"+U}else t(!1)}catch(N){q(N)}});if(B){var Q=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(U){H(U,!0)}),n,this.ui.getCurrentFile()!=f? +L:null,Q.scale,Q.border)}else H(L,!1)}catch(U){q(U)}});try{f.saveLevel=2,(y||B||f.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=v.mimeType&&"application/vnd.jgraph.mxfile"!=v.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(G){try{var I=null;try{null!=G&&(I=G.toDataURL("image/png")),null!=I&&(I=I.length>this.maxThumbnailSize?null:I.substring(I.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(F){I=null}u(I,"image/png")}catch(F){q(F)}})))&& +u(null,null,f.constructor!=DriveLibrary)}catch(G){q(G)}}else this.ui.editor.graph.reset(),n({message:mxResources.get("readOnly")})}catch(G){q(G)}};DriveClient.prototype.insertFile=function(f,c,l,m,x,y,D){y=null!=y?y:this.xmlMimeType;f={mimeType:y,title:f};null!=l&&(f.parents=[{kind:"drive#fileLink",id:l}]);this.executeRequest(this.createUploadRequest(null,f,c,!1,D),mxUtils.bind(this,function(d){y==this.libraryMimeType?m(new DriveLibrary(this.ui,c,d)):0==d?null!=x&&x({message:mxResources.get("errorSavingFile")}): +m(new DriveFile(this.ui,c,d))}),x)};DriveClient.prototype.createUploadRequest=function(f,c,l,m,x,y,D){x=null!=x?x:!1;var d={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=y&&(d["If-Match"]=y);f={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=f?"/"+f:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+this.allFields,method:null!=f?"PUT":"POST",headers:d,params:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+ +JSON.stringify(c)+"\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+(null!=l?x?l:!window.btoa||mxClient.IS_IE||mxClient.IS_IE11?Base64.encode(l):Graph.base64EncodeUnicode(l):"")+"\r\n---------314159265358979323846--"};m||(f.fullUrl+="&newRevision=false");D&&(f.fullUrl+="&pinned=true");return f};DriveClient.prototype.createLinkPicker=function(){var f=e.linkPicker;if(null==f||e.linkPickerToken!=b){e.linkPickerToken=b;f=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0); var c=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),l=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0);f=(new google.picker.PickerBuilder).setAppId(this.appId).setLocale(mxLanguage).setOAuthToken(e.linkPickerToken).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(f).addView(c).addView(l).addView(google.picker.ViewId.RECENTLY_PICKED)}return f};DriveClient.prototype.pickFile=function(f,c,l){this.filePickerCallback= null!=f?f:mxUtils.bind(this,function(m){this.ui.loadFile("G"+m)});this.filePicked=mxUtils.bind(this,function(m){m.action==google.picker.Action.PICKED&&this.filePickerCallback(m.docs[0].id,m.docs[0])});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var m=c?"genericPicker":"filePicker",x=mxUtils.bind(this,function(n){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(n).className&&(mxEvent.removeListener(document, -"click",x),this[m].setVisible(!1),l&&l())});if(null==e[m]||e[m+"Token"]!=b){e[m+"Token"]=b;var z=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),C=(new google.picker.DocsView).setIncludeFolders(!0),d=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0),g=(new google.picker.DocsUploadView).setIncludeFolders(!0);c?(z.setMimeTypes("*/*"),C.setMimeTypes("*/*"),d.setMimeTypes("*/*")):(z.setMimeTypes(this.mimeTypes),C.setMimeTypes(this.mimeTypes), -d.setMimeTypes(this.mimeTypes));e[m]=(new google.picker.PickerBuilder).setOAuthToken(e[m+"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(z).addView(C).addView(d).addView(google.picker.ViewId.RECENTLY_PICKED).addView(g);if(urlParams.gPickerSize){var k=urlParams.gPickerSize.split(",");e[m]=e[m].setSize(k[0],k[1])}urlParams.topBaseUrl&&(e[m]=e[m].setOrigin(decodeURIComponent(urlParams.topBaseUrl)));e[m]=e[m].setCallback(mxUtils.bind(this, +"click",x),this[m].setVisible(!1),l&&l())});if(null==e[m]||e[m+"Token"]!=b){e[m+"Token"]=b;var y=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),D=(new google.picker.DocsView).setIncludeFolders(!0),d=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0),g=(new google.picker.DocsUploadView).setIncludeFolders(!0);c?(y.setMimeTypes("*/*"),D.setMimeTypes("*/*"),d.setMimeTypes("*/*")):(y.setMimeTypes(this.mimeTypes),D.setMimeTypes(this.mimeTypes), +d.setMimeTypes(this.mimeTypes));e[m]=(new google.picker.PickerBuilder).setOAuthToken(e[m+"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(y).addView(D).addView(d).addView(google.picker.ViewId.RECENTLY_PICKED).addView(g);if(urlParams.gPickerSize){var k=urlParams.gPickerSize.split(",");e[m]=e[m].setSize(k[0],k[1])}urlParams.topBaseUrl&&(e[m]=e[m].setOrigin(decodeURIComponent(urlParams.topBaseUrl)));e[m]=e[m].setCallback(mxUtils.bind(this, function(n){if(n.action==google.picker.Action.PICKED||n.action==google.picker.Action.CANCEL)mxEvent.removeListener(document,"click",x),l&&n.action==google.picker.Action.CANCEL&&l();n.action==google.picker.Action.PICKED&&this.filePicked(n)})).build()}mxEvent.addListener(document,"click",x);e[m].setVisible(!0)}catch(n){this.ui.spinner.stop(),this.ui.handleError(n)}}))};DriveClient.prototype.pickFolder=function(f,c){this.folderPickerCallback=f;var l=mxUtils.bind(this,function(){try{this.ui.spinner.spin(document.body, mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var m=mxUtils.bind(this,function(g){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(g).className&&(mxEvent.removeListener(document,"click",m),e.folderPicker.setVisible(!1))});if(null==e.folderPicker||e.folderPickerToken!=b){e.folderPickerToken=b;var x=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"), -z=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),C=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder");e.folderPicker=(new google.picker.PickerBuilder).setSelectableMimeTypes("application/vnd.google-apps.folder").setOAuthToken(e.folderPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(x).addView(z).addView(C).addView(google.picker.ViewId.RECENTLY_PICKED).setTitle(mxResources.get("pickFolder")); +y=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),D=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder");e.folderPicker=(new google.picker.PickerBuilder).setSelectableMimeTypes("application/vnd.google-apps.folder").setOAuthToken(e.folderPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(x).addView(y).addView(D).addView(google.picker.ViewId.RECENTLY_PICKED).setTitle(mxResources.get("pickFolder")); if(urlParams.gPickerSize){var d=urlParams.gPickerSize.split(",");e.folderPicker=e.folderPicker.setSize(d[0],d[1])}urlParams.topBaseUrl&&(e.folderPicker=e.folderPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));e.folderPicker=e.folderPicker.setCallback(mxUtils.bind(this,function(g){g.action!=google.picker.Action.PICKED&&g.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",m);this.folderPickerCallback(g)})).build()}mxEvent.addListener(document,"click",m);e.folderPicker.setVisible(!0)}catch(g){this.ui.spinner.stop(), this.ui.handleError(g)}}))}catch(m){this.ui.handleError(m)}});c?l():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){this.folderPickerCallback({action:google.picker.Action.PICKED,docs:[{type:"folder",id:"root"}]})}),mxUtils.bind(this,function(){l()}),mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0)};DriveClient.prototype.pickLibrary=function(f){this.filePickerCallback=f;this.filePicked=mxUtils.bind(this,function(c){c.action==google.picker.Action.PICKED? this.filePickerCallback(c.docs[0].id):c.action==google.picker.Action.CANCEL&&null==this.ui.getCurrentFile()&&this.ui.showSplash()});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var c=mxUtils.bind(this,function(d){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(d).className&&(mxEvent.removeListener(document,"click",c),e.libraryPicker.setVisible(!1))});if(null==e.libraryPicker||e.libraryPickerToken!= b){e.libraryPickerToken=b;var l=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),m=(new google.picker.DocsView).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),x=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"), -z=(new google.picker.DocsUploadView).setIncludeFolders(!0);e.libraryPicker=(new google.picker.PickerBuilder).setOAuthToken(e.libraryPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(l).addView(m).addView(x).addView(google.picker.ViewId.RECENTLY_PICKED).addView(z);if(urlParams.gPickerSize){var C=urlParams.gPickerSize.split(",");e.libraryPicker=e.libraryPicker.setSize(C[0],C[1])}urlParams.topBaseUrl&&(e.libraryPicker=e.libraryPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl))); +y=(new google.picker.DocsUploadView).setIncludeFolders(!0);e.libraryPicker=(new google.picker.PickerBuilder).setOAuthToken(e.libraryPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(l).addView(m).addView(x).addView(google.picker.ViewId.RECENTLY_PICKED).addView(y);if(urlParams.gPickerSize){var D=urlParams.gPickerSize.split(",");e.libraryPicker=e.libraryPicker.setSize(D[0],D[1])}urlParams.topBaseUrl&&(e.libraryPicker=e.libraryPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl))); e.libraryPicker=e.libraryPicker.setCallback(mxUtils.bind(this,function(d){d.action!=google.picker.Action.PICKED&&d.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",c);d.action==google.picker.Action.PICKED&&this.filePicked(d)})).build()}mxEvent.addListener(document,"click",c);e.libraryPicker.setVisible(!0)}catch(d){this.ui.spinner.stop(),this.ui.handleError(d)}}))};DriveClient.prototype.showPermissions=function(f){var c=mxUtils.bind(this,function(){var l=new ConfirmDialog(this.ui, mxResources.get("googleSharingNotAvailable"),mxUtils.bind(this,function(){this.ui.editor.graph.openLink("https://drive.google.com/open?id="+f)}),null,mxResources.get("open"),null,null,null,null,IMAGE_PATH+"/google-share.png");this.ui.showDialog(l.container,360,190,!0,!0);l.init()});this.sharingFailed?c():this.checkToken(mxUtils.bind(this,function(){try{var l=new gapi.drive.share.ShareClient(this.appId);l.setOAuthToken(b);l.setItemIds([f]);l.showSettingsDialog();"MutationObserver"in window&&(null!= -this.sharingObserver&&(this.sharingObserver.disconnect(),this.sharingObserver=null),this.sharingObserver=new MutationObserver(mxUtils.bind(this,function(m){for(var x=!1,z=0;z<m.length;z++)for(var C=0;C<m[z].addedNodes.length;C++){var d=m[z].addedNodes[C];"BUTTON"==d.nodeName&&"ok"==d.getAttribute("name")&&null!=d.parentNode&&null!=d.parentNode.parentNode&&"dialog"==d.parentNode.parentNode.getAttribute("role")?(this.sharingFailed=!0,d.click(),c(),x=!0):"DIV"==d.nodeName&&"shr-q-shr-r-shr-xb"==d.className&& +this.sharingObserver&&(this.sharingObserver.disconnect(),this.sharingObserver=null),this.sharingObserver=new MutationObserver(mxUtils.bind(this,function(m){for(var x=!1,y=0;y<m.length;y++)for(var D=0;D<m[y].addedNodes.length;D++){var d=m[y].addedNodes[D];"BUTTON"==d.nodeName&&"ok"==d.getAttribute("name")&&null!=d.parentNode&&null!=d.parentNode.parentNode&&"dialog"==d.parentNode.parentNode.getAttribute("role")?(this.sharingFailed=!0,d.click(),c(),x=!0):"DIV"==d.nodeName&&"shr-q-shr-r-shr-xb"==d.className&& (x=!0)}x&&(this.sharingObserver.disconnect(),this.sharingObserver=null)})),this.sharingObserver.observe(document,{childList:!0,subtree:!0}))}catch(m){this.ui.handleError(m)}}))};DriveClient.prototype.clearPersistentToken=function(){var f=JSON.parse(this.getPersistentToken(!0))||{};delete f.current;delete f[this.userId];for(var c in f){f.current={userId:c,expires:0};break}DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(f))};DriveClient.prototype.setPersistentToken=function(f,c){var l= JSON.parse(this.getPersistentToken(!0))||{};f.userId=this.userId;l.current=f;l[this.userId]={user:this.user};DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(l),c)}})();DropboxFile=function(b,e,f){DrawioFile.call(this,b,e);this.stat=f};mxUtils.extend(DropboxFile,DrawioFile);DropboxFile.prototype.getId=function(){return this.stat.path_display.substring(1)};DropboxFile.prototype.getHash=function(){return"D"+encodeURIComponent(this.getId())};DropboxFile.prototype.getMode=function(){return App.MODE_DROPBOX};DropboxFile.prototype.isAutosaveOptional=function(){return!0};DropboxFile.prototype.getTitle=function(){return this.stat.name}; DropboxFile.prototype.isRenamable=function(){return!0};DropboxFile.prototype.getSize=function(){return this.stat.size};DropboxFile.prototype.isRevisionHistorySupported=function(){return!0}; -DropboxFile.prototype.getRevisions=function(b,e){var f=this.ui.dropbox.client.filesListRevisions({path:this.stat.path_lower,limit:100});f.then(mxUtils.bind(this,function(c){try{for(var l=[],m=c.entries.length-1;0<=m;m--)mxUtils.bind(this,function(x){l.push({modifiedDate:x.client_modified,fileSize:x.size,getXml:mxUtils.bind(this,function(z,C){this.ui.dropbox.readFile({path:this.stat.path_lower,rev:x.rev},z,C)}),getUrl:mxUtils.bind(this,function(z){return this.ui.getUrl(window.location.pathname+"?rev="+ -x.rev+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=z?"&page="+z:""))+window.location.hash})})})(c.entries[m]);b(l)}catch(x){e(x)}}));f["catch"](function(c){e(c)})};DropboxFile.prototype.getLatestVersion=function(b,e){this.ui.dropbox.getFile(this.getId(),b,e)};DropboxFile.prototype.updateDescriptor=function(b){this.stat=b.stat};DropboxFile.prototype.save=function(b,e,f,c,l){this.doSave(this.getTitle(),b,e,f,c,l)};DropboxFile.prototype.saveAs=function(b,e,f){this.doSave(b,!1,e,f)}; +DropboxFile.prototype.getRevisions=function(b,e){var f=this.ui.dropbox.client.filesListRevisions({path:this.stat.path_lower,limit:100});f.then(mxUtils.bind(this,function(c){try{for(var l=[],m=c.entries.length-1;0<=m;m--)mxUtils.bind(this,function(x){l.push({modifiedDate:x.client_modified,fileSize:x.size,getXml:mxUtils.bind(this,function(y,D){this.ui.dropbox.readFile({path:this.stat.path_lower,rev:x.rev},y,D)}),getUrl:mxUtils.bind(this,function(y){return this.ui.getUrl(window.location.pathname+"?rev="+ +x.rev+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=y?"&page="+y:""))+window.location.hash})})})(c.entries[m]);b(l)}catch(x){e(x)}}));f["catch"](function(c){e(c)})};DropboxFile.prototype.getLatestVersion=function(b,e){this.ui.dropbox.getFile(this.getId(),b,e)};DropboxFile.prototype.updateDescriptor=function(b){this.stat=b.stat};DropboxFile.prototype.save=function(b,e,f,c,l){this.doSave(this.getTitle(),b,e,f,c,l)};DropboxFile.prototype.saveAs=function(b,e,f){this.doSave(b,!1,e,f)}; DropboxFile.prototype.doSave=function(b,e,f,c,l,m){var x=this.stat.name;this.stat.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.stat.name=x;this.saveFile(b,e,f,c,l,m)}),c,l,m])}; -DropboxFile.prototype.saveFile=function(b,e,f,c){this.isEditable()?this.savingFile?null!=c&&c({code:App.ERROR_BUSY}):(e=mxUtils.bind(this,function(l){if(l)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var m=mxUtils.bind(this,function(z){var C=this.stat.path_display.lastIndexOf("/");C=1<C?this.stat.path_display.substring(1,C+1):null;this.ui.dropbox.saveFile(b,z,mxUtils.bind(this,function(d){this.setModified(this.getShadowModified());this.savingFile=!1;this.stat=d;this.contentChanged(); -null!=f&&f()}),mxUtils.bind(this,function(d){this.savingFile=!1;null!=c&&c(d)}),C)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())){var x=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(z){m(this.ui.base64ToBlob(z,"image/png"))}),c,this.ui.getCurrentFile()!=this?this.getData():null,x.scale,x.border)}else m(this.getData())}catch(z){if(this.savingFile=!1,null!=c)c(z);else throw z;}else null!=c&&c()}),this.getTitle()==b?e(!0):this.ui.dropbox.checkExists(b, +DropboxFile.prototype.saveFile=function(b,e,f,c){this.isEditable()?this.savingFile?null!=c&&c({code:App.ERROR_BUSY}):(e=mxUtils.bind(this,function(l){if(l)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var m=mxUtils.bind(this,function(y){var D=this.stat.path_display.lastIndexOf("/");D=1<D?this.stat.path_display.substring(1,D+1):null;this.ui.dropbox.saveFile(b,y,mxUtils.bind(this,function(d){this.setModified(this.getShadowModified());this.savingFile=!1;this.stat=d;this.contentChanged(); +null!=f&&f()}),mxUtils.bind(this,function(d){this.savingFile=!1;null!=c&&c(d)}),D)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())){var x=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(y){m(this.ui.base64ToBlob(y,"image/png"))}),c,this.ui.getCurrentFile()!=this?this.getData():null,x.scale,x.border)}else m(this.getData())}catch(y){if(this.savingFile=!1,null!=c)c(y);else throw y;}else null!=c&&c()}),this.getTitle()==b?e(!0):this.ui.dropbox.checkExists(b, e)):null!=f&&f()};DropboxFile.prototype.rename=function(b,e,f){this.ui.dropbox.renameFile(this,b,mxUtils.bind(this,function(c){this.hasSameExtension(b,this.getTitle())?(this.stat=c,this.descriptorChanged(),null!=e&&e()):(this.stat=c,this.descriptorChanged(),this.save(!0,e,f))}),f)};DropboxLibrary=function(b,e,f){DropboxFile.call(this,b,e,f)};mxUtils.extend(DropboxLibrary,DropboxFile);DropboxLibrary.prototype.isAutosave=function(){return!0};DropboxLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};DropboxLibrary.prototype.open=function(){};(function(){var b=null;window.DropboxClient=function(e){DrawioClient.call(this,e,"dbauth");this.client=new Dropbox({clientId:this.clientId})};mxUtils.extend(DropboxClient,DrawioClient);DropboxClient.prototype.appPath="/drawio-diagrams/";DropboxClient.prototype.extension=".drawio";DropboxClient.prototype.writingFile=!1;DropboxClient.prototype.maxRetries=4;DropboxClient.prototype.clientId=window.DRAWIO_DROPBOX_ID;DropboxClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+ "/dropbox";DropboxClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();this.setUser(null);b=null;this.client.authTokenRevoke().then(mxUtils.bind(this,function(){this.client.setAccessToken(null)}))};DropboxClient.prototype.updateUser=function(e,f,c){var l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;f({code:App.ERROR_TIMEOUT})}),this.ui.timeout), -x=this.client.usersGetCurrentAccount();x.then(mxUtils.bind(this,function(z){window.clearTimeout(m);l&&(this.setUser(new DrawioUser(z.account_id,z.email,z.name.display_name)),e())}));x["catch"](mxUtils.bind(this,function(z){window.clearTimeout(m);l&&(null==z||401!==z.status||c?f({message:mxResources.get("accessDenied")}):(this.setUser(null),this.client.setAccessToken(null),b=null,this.authenticate(mxUtils.bind(this,function(){this.updateUser(e,f,!0)}),f)))}))};DropboxClient.prototype.authenticate= +x=this.client.usersGetCurrentAccount();x.then(mxUtils.bind(this,function(y){window.clearTimeout(m);l&&(this.setUser(new DrawioUser(y.account_id,y.email,y.name.display_name)),e())}));x["catch"](mxUtils.bind(this,function(y){window.clearTimeout(m);l&&(null==y||401!==y.status||c?f({message:mxResources.get("accessDenied")}):(this.setUser(null),this.client.setAccessToken(null),b=null,this.authenticate(mxUtils.bind(this,function(){this.updateUser(e,f,!0)}),f)))}))};DropboxClient.prototype.authenticate= function(e,f){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),e,f):null!=f&&f(c)}),f)};DropboxClient.prototype.authenticateStep2=function(e,f,c){if(null==window.onDropboxCallback){var l=mxUtils.bind(this,function(){var m=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+ -"&token="+e),null,"GET")).send(mxUtils.bind(this,function(x){200<=x.getStatus()&&299>=x.getStatus()?(b=JSON.parse(x.getText()).access_token,this.client.setAccessToken(b),this.setUser(null),f()):(this.clearPersistentToken(),this.setUser(null),b=null,this.client.setAccessToken(null),401==x.getStatus()?l():c({message:mxResources.get("accessDenied"),retry:l}))}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(x,z){null!=window.open("https://www.dropbox.com/oauth2/authorize?client_id="+this.clientId+ -(x?"&token_access_type=offline":"")+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(C,d){if(m){window.onDropboxCallback=null;m=!1;try{null==C?c({message:mxResources.get("accessDenied"),retry:l}):(null!=z&&z(),b=C.access_token,this.client.setAccessToken(b),this.setUser(null),x&&this.setPersistentToken("remembered"), -f())}catch(g){c(g)}finally{null!=d&&d.close()}}else null!=d&&d.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:l})}),mxUtils.bind(this,function(){m&&(window.onDropboxCallback=null,m=!1,c({message:mxResources.get("accessDenied"),retry:l}))}))});l()}else c({code:App.ERROR_BUSY})};DropboxClient.prototype.executePromise=function(e,f,c){var l=mxUtils.bind(this,function(x){var z=!0,C=window.setTimeout(mxUtils.bind(this,function(){z=!1;c({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout), -d=e();d.then(mxUtils.bind(this,function(g){window.clearTimeout(C);z&&null!=f&&f(g)}));d["catch"](mxUtils.bind(this,function(g){window.clearTimeout(C);z&&(null==g||500!=g.status&&400!=g.status&&401!=g.status?c({message:mxResources.get("error")+" "+g.status}):(this.setUser(null),this.client.setAccessToken(null),b=null,x?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){m(!0)},c)})}):this.authenticate(function(){l(!0)},c)))}))}),m=mxUtils.bind(this, -function(x){null==this.user?this.updateUser(function(){m(!0)},c,x):l(x)});null==b?this.authenticate(function(){m(!0)},c):m(!1)};DropboxClient.prototype.getLibrary=function(e,f,c){this.getFile(e,f,c,!0)};DropboxClient.prototype.getFile=function(e,f,c,l){l=null!=l?l:!1;var m=/\.png$/i.test(e);if(/^https:\/\//i.test(e)||/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&m){var x=mxUtils.bind(this,function(){var z=e.split("/");this.ui.convertFile(e,0<z.length? -z[z.length-1]:e,null,this.extension,f,c)});null!=b?x():this.authenticate(x,c)}else x={path:"/"+e},null!=urlParams.rev&&(x.rev=urlParams.rev),this.readFile(x,mxUtils.bind(this,function(z,C){var d=null;if(0<(m?z.lastIndexOf(","):-1)){var g=this.ui.extractGraphModelFromPng(z);null!=g&&0<g.length?z=g:d=new LocalFile(this,z,e,!0)}f(null!=d?d:l?new DropboxLibrary(this.ui,z,C):new DropboxFile(this.ui,z,C))}),c,m)};DropboxClient.prototype.readFile=function(e,f,c,l){var m=mxUtils.bind(this,function(z){var C= -!0,d=window.setTimeout(mxUtils.bind(this,function(){C=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),g=this.client.filesGetMetadata({path:"/"+e.path.substring(1),include_deleted:!1});g.then(mxUtils.bind(this,function(k){}));g["catch"](function(k){window.clearTimeout(d);C&&null!=k&&409==k.status&&(C=!1,c({message:mxResources.get("fileNotFound")}))});g=this.client.filesDownload(e);g.then(mxUtils.bind(this,function(k){window.clearTimeout(d);if(C){C=!1;try{var n=new FileReader;n.onload=mxUtils.bind(this, -function(t){f(n.result,k)});l?n.readAsDataURL(k.fileBlob):n.readAsText(k.fileBlob)}catch(t){c(t)}}}));g["catch"](mxUtils.bind(this,function(k){window.clearTimeout(d);C&&(C=!1,null==k||500!=k.status&&400!=k.status&&401!=k.status?c({message:mxResources.get("error")+" "+k.status}):(this.client.setAccessToken(null),this.setUser(null),b=null,z?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){x(!0)},c)})}):this.authenticate(function(){m(!0)},c)))}))}), -x=mxUtils.bind(this,function(z){null==this.user?this.updateUser(function(){x(!0)},c,z):m(z)});null==b?this.authenticate(function(){x(!0)},c):x(!1)};DropboxClient.prototype.checkExists=function(e,f,c){var l=mxUtils.bind(this,function(){return this.client.filesGetMetadata({path:"/"+e.toLowerCase(),include_deleted:!1})});this.executePromise(l,mxUtils.bind(this,function(m){c?f(!1,!0,m):this.ui.confirm(mxResources.get("replaceIt",[e]),function(){f(!0,!0,m)},function(){f(!1,!0,m)})}),function(m){f(!0,!1)})}; -DropboxClient.prototype.renameFile=function(e,f,c,l){if(/[\\\/:\?\*"\|]/.test(f))l({message:mxResources.get("dropboxCharsNotAllowed")});else{if(null!=e&&null!=f){var m=e.stat.path_display.substring(1),x=m.lastIndexOf("/");0<x&&(f=m.substring(0,x+1)+f)}null!=e&&null!=f&&e.stat.path_lower.substring(1)!==f.toLowerCase()?this.checkExists(f,mxUtils.bind(this,function(z,C,d){z?(z=mxUtils.bind(this,function(g){g=mxUtils.bind(this,function(){return this.client.filesMove({from_path:e.stat.path_display,to_path:"/"+ -f,autorename:!1})});this.executePromise(g,c,l)}),C&&d.path_lower.substring(1)!==f.toLowerCase()?(C=mxUtils.bind(this,function(){return this.client.filesDelete({path:"/"+f.toLowerCase()})}),this.executePromise(C,z,l)):z()):l()})):l({message:mxResources.get("invalidName")})}};DropboxClient.prototype.insertLibrary=function(e,f,c,l){this.insertFile(e,f,c,l,!0)};DropboxClient.prototype.insertFile=function(e,f,c,l,m){m=null!=m?m:!1;this.checkExists(e,mxUtils.bind(this,function(x){x?this.saveFile(e,f,mxUtils.bind(this, -function(z){m?c(new DropboxLibrary(this.ui,f,z)):c(new DropboxFile(this.ui,f,z))}),l):l()}))};DropboxClient.prototype.saveFile=function(e,f,c,l,m){if(/[\\\/:\?\*"\|]/.test(e))l({message:mxResources.get("dropboxCharsNotAllowed")});else if(15E7<=f.length)l({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(f.length)+" / 150 MB)"});else{m=null!=m?m:"";var x=mxUtils.bind(this,function(){return this.client.filesUpload({path:"/"+m+e,mode:{".tag":"overwrite"},mute:!0,contents:new Blob([f], +"&token="+e),null,"GET")).send(mxUtils.bind(this,function(x){200<=x.getStatus()&&299>=x.getStatus()?(b=JSON.parse(x.getText()).access_token,this.client.setAccessToken(b),this.setUser(null),f()):(this.clearPersistentToken(),this.setUser(null),b=null,this.client.setAccessToken(null),401==x.getStatus()?l():c({message:mxResources.get("accessDenied"),retry:l}))}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(x,y){null!=window.open("https://www.dropbox.com/oauth2/authorize?client_id="+this.clientId+ +(x?"&token_access_type=offline":"")+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(D,d){if(m){window.onDropboxCallback=null;m=!1;try{null==D?c({message:mxResources.get("accessDenied"),retry:l}):(null!=y&&y(),b=D.access_token,this.client.setAccessToken(b),this.setUser(null),x&&this.setPersistentToken("remembered"), +f())}catch(g){c(g)}finally{null!=d&&d.close()}}else null!=d&&d.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:l})}),mxUtils.bind(this,function(){m&&(window.onDropboxCallback=null,m=!1,c({message:mxResources.get("accessDenied"),retry:l}))}))});l()}else c({code:App.ERROR_BUSY})};DropboxClient.prototype.executePromise=function(e,f,c){var l=mxUtils.bind(this,function(x){var y=!0,D=window.setTimeout(mxUtils.bind(this,function(){y=!1;c({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout), +d=e();d.then(mxUtils.bind(this,function(g){window.clearTimeout(D);y&&null!=f&&f(g)}));d["catch"](mxUtils.bind(this,function(g){window.clearTimeout(D);y&&(null==g||500!=g.status&&400!=g.status&&401!=g.status?c({message:mxResources.get("error")+" "+g.status}):(this.setUser(null),this.client.setAccessToken(null),b=null,x?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){m(!0)},c)})}):this.authenticate(function(){l(!0)},c)))}))}),m=mxUtils.bind(this, +function(x){null==this.user?this.updateUser(function(){m(!0)},c,x):l(x)});null==b?this.authenticate(function(){m(!0)},c):m(!1)};DropboxClient.prototype.getLibrary=function(e,f,c){this.getFile(e,f,c,!0)};DropboxClient.prototype.getFile=function(e,f,c,l){l=null!=l?l:!1;var m=/\.png$/i.test(e);if(/^https:\/\//i.test(e)||/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&m){var x=mxUtils.bind(this,function(){var y=e.split("/");this.ui.convertFile(e,0<y.length? +y[y.length-1]:e,null,this.extension,f,c)});null!=b?x():this.authenticate(x,c)}else x={path:"/"+e},null!=urlParams.rev&&(x.rev=urlParams.rev),this.readFile(x,mxUtils.bind(this,function(y,D){var d=null;if(0<(m?y.lastIndexOf(","):-1)){var g=this.ui.extractGraphModelFromPng(y);null!=g&&0<g.length?y=g:d=new LocalFile(this,y,e,!0)}f(null!=d?d:l?new DropboxLibrary(this.ui,y,D):new DropboxFile(this.ui,y,D))}),c,m)};DropboxClient.prototype.readFile=function(e,f,c,l){var m=mxUtils.bind(this,function(y){var D= +!0,d=window.setTimeout(mxUtils.bind(this,function(){D=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),g=this.client.filesGetMetadata({path:"/"+e.path.substring(1),include_deleted:!1});g.then(mxUtils.bind(this,function(k){}));g["catch"](function(k){window.clearTimeout(d);D&&null!=k&&409==k.status&&(D=!1,c({message:mxResources.get("fileNotFound")}))});g=this.client.filesDownload(e);g.then(mxUtils.bind(this,function(k){window.clearTimeout(d);if(D){D=!1;try{var n=new FileReader;n.onload=mxUtils.bind(this, +function(q){f(n.result,k)});l?n.readAsDataURL(k.fileBlob):n.readAsText(k.fileBlob)}catch(q){c(q)}}}));g["catch"](mxUtils.bind(this,function(k){window.clearTimeout(d);D&&(D=!1,null==k||500!=k.status&&400!=k.status&&401!=k.status?c({message:mxResources.get("error")+" "+k.status}):(this.client.setAccessToken(null),this.setUser(null),b=null,y?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){x(!0)},c)})}):this.authenticate(function(){m(!0)},c)))}))}), +x=mxUtils.bind(this,function(y){null==this.user?this.updateUser(function(){x(!0)},c,y):m(y)});null==b?this.authenticate(function(){x(!0)},c):x(!1)};DropboxClient.prototype.checkExists=function(e,f,c){var l=mxUtils.bind(this,function(){return this.client.filesGetMetadata({path:"/"+e.toLowerCase(),include_deleted:!1})});this.executePromise(l,mxUtils.bind(this,function(m){c?f(!1,!0,m):this.ui.confirm(mxResources.get("replaceIt",[e]),function(){f(!0,!0,m)},function(){f(!1,!0,m)})}),function(m){f(!0,!1)})}; +DropboxClient.prototype.renameFile=function(e,f,c,l){if(/[\\\/:\?\*"\|]/.test(f))l({message:mxResources.get("dropboxCharsNotAllowed")});else{if(null!=e&&null!=f){var m=e.stat.path_display.substring(1),x=m.lastIndexOf("/");0<x&&(f=m.substring(0,x+1)+f)}null!=e&&null!=f&&e.stat.path_lower.substring(1)!==f.toLowerCase()?this.checkExists(f,mxUtils.bind(this,function(y,D,d){y?(y=mxUtils.bind(this,function(g){g=mxUtils.bind(this,function(){return this.client.filesMove({from_path:e.stat.path_display,to_path:"/"+ +f,autorename:!1})});this.executePromise(g,c,l)}),D&&d.path_lower.substring(1)!==f.toLowerCase()?(D=mxUtils.bind(this,function(){return this.client.filesDelete({path:"/"+f.toLowerCase()})}),this.executePromise(D,y,l)):y()):l()})):l({message:mxResources.get("invalidName")})}};DropboxClient.prototype.insertLibrary=function(e,f,c,l){this.insertFile(e,f,c,l,!0)};DropboxClient.prototype.insertFile=function(e,f,c,l,m){m=null!=m?m:!1;this.checkExists(e,mxUtils.bind(this,function(x){x?this.saveFile(e,f,mxUtils.bind(this, +function(y){m?c(new DropboxLibrary(this.ui,f,y)):c(new DropboxFile(this.ui,f,y))}),l):l()}))};DropboxClient.prototype.saveFile=function(e,f,c,l,m){if(/[\\\/:\?\*"\|]/.test(e))l({message:mxResources.get("dropboxCharsNotAllowed")});else if(15E7<=f.length)l({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(f.length)+" / 150 MB)"});else{m=null!=m?m:"";var x=mxUtils.bind(this,function(){return this.client.filesUpload({path:"/"+m+e,mode:{".tag":"overwrite"},mute:!0,contents:new Blob([f], {type:"text/plain"})})});this.executePromise(x,c,l)}};DropboxClient.prototype.pickLibrary=function(e){Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(f){if(this.ui.spinner.spin(document.body,mxResources.get("loading"))){var c=mxUtils.bind(this,function(x){this.ui.spinner.stop();this.ui.handleError(x)}),l=f[0].link.indexOf(this.appPath);if(0<l){var m=decodeURIComponent(f[0].link.substring(l+this.appPath.length-1));this.readFile({path:m},mxUtils.bind(this, -function(x,z){if(null!=z&&z.id==f[0].id)try{this.ui.spinner.stop(),e(m.substring(1),new DropboxLibrary(this.ui,x,z))}catch(C){this.ui.handleError(C)}else this.createLibrary(f[0],e,c)}),c)}else this.createLibrary(f[0],e,c)}})})};DropboxClient.prototype.createLibrary=function(e,f,c){this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[e.name]),mxUtils.bind(this,function(){this.ui.editor.loadUrl(e.link,mxUtils.bind(this,function(l){this.insertFile(e.name,l,mxUtils.bind(this, +function(x,y){if(null!=y&&y.id==f[0].id)try{this.ui.spinner.stop(),e(m.substring(1),new DropboxLibrary(this.ui,x,y))}catch(D){this.ui.handleError(D)}else this.createLibrary(f[0],e,c)}),c)}else this.createLibrary(f[0],e,c)}})})};DropboxClient.prototype.createLibrary=function(e,f,c){this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[e.name]),mxUtils.bind(this,function(){this.ui.editor.loadUrl(e.link,mxUtils.bind(this,function(l){this.insertFile(e.name,l,mxUtils.bind(this, function(m){try{this.ui.spinner.stop(),f(m.getHash().substring(1),m)}catch(x){c(x)}}),c,!0)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()}))};DropboxClient.prototype.pickFile=function(e,f){null!=Dropbox.choose?(e=null!=e?e:mxUtils.bind(this,function(c,l){this.ui.loadFile(null!=c?"D"+encodeURIComponent(c):l.getHash(),null,l)}),Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(c){if(this.ui.spinner.spin(document.body,mxResources.get("loading")))if(f)this.ui.spinner.stop(), -e(c[0].link);else{var l=mxUtils.bind(this,function(d){this.ui.spinner.stop();this.ui.handleError(d)}),m=mxUtils.bind(this,function(d,g){this.ui.spinner.stop();e(d,g)}),x=/\.png$/i.test(c[0].name);if(/\.vsdx$/i.test(c[0].name)||/\.gliffy$/i.test(c[0].name)||!this.ui.useCanvasForExport&&x)m(c[0].link);else{var z=c[0].link.indexOf(this.appPath);if(0<z){var C=decodeURIComponent(c[0].link.substring(z+this.appPath.length-1));this.readFile({path:C},mxUtils.bind(this,function(d,g){if(null!=g&&g.id==c[0].id){var k= -x?d.lastIndexOf(","):-1;this.ui.spinner.stop();var n=null;0<k&&(k=this.ui.extractGraphModelFromPng(d),null!=k&&0<k.length?d=k:n=new LocalFile(this,d,C,!0));e(C.substring(1),null!=n?n:new DropboxFile(this.ui,d,g))}else this.createFile(c[0],m,l)}),l,x)}else this.createFile(c[0],m,l)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};DropboxClient.prototype.createFile=function(e,f,c){var l=/(\.png)$/i.test(e.name);this.ui.editor.loadUrl(e.link,mxUtils.bind(this,function(m){null!= -m&&0<m.length?this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[e.name]),mxUtils.bind(this,function(){var x=l?m.lastIndexOf(","):-1;0<x&&(x=this.ui.extractGraphModelFromPng(m.substring(x+1)),null!=x&&0<x.length&&(m=x));this.insertFile(e.name,m,mxUtils.bind(this,function(z){f(e.name,z)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()})):(this.ui.spinner.stop(),c({message:mxResources.get("errorLoadingFile")}))}),c,l)}})();OneDriveFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f};mxUtils.extend(OneDriveFile,DrawioFile);OneDriveFile.prototype.autosaveDelay=500;OneDriveFile.prototype.isRealtimeSupported=function(){return!0}; +e(c[0].link);else{var l=mxUtils.bind(this,function(d){this.ui.spinner.stop();this.ui.handleError(d)}),m=mxUtils.bind(this,function(d,g){this.ui.spinner.stop();e(d,g)}),x=/\.png$/i.test(c[0].name);if(/\.vsdx$/i.test(c[0].name)||/\.gliffy$/i.test(c[0].name)||!this.ui.useCanvasForExport&&x)m(c[0].link);else{var y=c[0].link.indexOf(this.appPath);if(0<y){var D=decodeURIComponent(c[0].link.substring(y+this.appPath.length-1));this.readFile({path:D},mxUtils.bind(this,function(d,g){if(null!=g&&g.id==c[0].id){var k= +x?d.lastIndexOf(","):-1;this.ui.spinner.stop();var n=null;0<k&&(k=this.ui.extractGraphModelFromPng(d),null!=k&&0<k.length?d=k:n=new LocalFile(this,d,D,!0));e(D.substring(1),null!=n?n:new DropboxFile(this.ui,d,g))}else this.createFile(c[0],m,l)}),l,x)}else this.createFile(c[0],m,l)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};DropboxClient.prototype.createFile=function(e,f,c){var l=/(\.png)$/i.test(e.name);this.ui.editor.loadUrl(e.link,mxUtils.bind(this,function(m){null!= +m&&0<m.length?this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[e.name]),mxUtils.bind(this,function(){var x=l?m.lastIndexOf(","):-1;0<x&&(x=this.ui.extractGraphModelFromPng(m.substring(x+1)),null!=x&&0<x.length&&(m=x));this.insertFile(e.name,m,mxUtils.bind(this,function(y){f(e.name,y)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()})):(this.ui.spinner.stop(),c({message:mxResources.get("errorLoadingFile")}))}),c,l)}})();OneDriveFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f};mxUtils.extend(OneDriveFile,DrawioFile);OneDriveFile.prototype.autosaveDelay=500;OneDriveFile.prototype.isRealtimeSupported=function(){return!0}; OneDriveFile.prototype.share=function(){var b=this.meta.webUrl;b=b.substring(0,b.lastIndexOf("/"));if(null!=this.meta.parentReference)try{if("personal"==this.meta.parentReference.driveType)b="https://onedrive.live.com/?cid="+encodeURIComponent(this.meta.parentReference.driveId)+"&id="+encodeURIComponent(this.meta.id);else if("documentLibrary"==this.meta.parentReference.driveType){var e=this.meta.parentReference.path;e=e.substring(e.indexOf("/root:")+6);var f=this.meta.webUrl;b=f.substring(0,f.length- e.length-this.meta.name.length-(0<e.length?1:0));f=f.substring(f.indexOf("/",8));b=b+"/Forms/AllItems.aspx?id="+f+"&parent="+f.substring(0,f.lastIndexOf("/"))}else if("business"==this.meta.parentReference.driveType){b=this.meta["@microsoft.graph.downloadUrl"];var c=b.indexOf("/_layouts/15/download.aspx?");e=f=this.meta.webUrl;f=f.substring(8);f=f.substring(f.indexOf("/"));e=e.substring(0,e.lastIndexOf("/"));e=e.substring(e.indexOf("/",8));b=b.substring(0,c)+"/_layouts/15/onedrive.aspx?id="+f+"&parent="+ e}}catch(l){}this.ui.editor.graph.openLink(b)};OneDriveFile.prototype.getId=function(){return this.getIdOf(this.meta)};OneDriveFile.prototype.getParentId=function(){return this.getIdOf(this.meta,!0)};OneDriveFile.prototype.getIdOf=function(b,e){return(null!=b.parentReference&&null!=b.parentReference.driveId?b.parentReference.driveId+"/":"")+(null!=e?b.parentReference.id:b.id+(b.folder&&b.folder.isRoot?"/root":""))}; @@ -12152,9 +12159,9 @@ OneDriveFile.prototype.loadDescriptor=function(b,e){this.ui.oneDrive.executeRequ OneDriveFile.prototype.getDescriptorEtag=function(b){return b.eTag};OneDriveFile.prototype.setDescriptorEtag=function(b,e){b.eTag=e};OneDriveFile.prototype.loadPatchDescriptor=function(b,e){var f=this.ui.oneDrive.getItemURL(this.getId());this.ui.oneDrive.executeRequest(f+"?select=etag,file",mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?b(JSON.parse(c.getText())):e(this.ui.oneDrive.parseRequestText(c))}),e)}; OneDriveFile.prototype.getChannelKey=function(){return"undefined"!==typeof CryptoJS?CryptoJS.MD5(this.meta.createdDateTime+(null!=this.meta.createdBy&&null!=this.meta.createdBy.user?this.meta.createdBy.user.id:"")).toString():null};OneDriveFile.prototype.getLastModifiedDate=function(){return new Date(this.meta.lastModifiedDateTime)};OneDriveFile.prototype.save=function(b,e,f,c,l){this.doSave(this.getTitle(),b,e,f,c,l)};OneDriveFile.prototype.saveAs=function(b,e,f){this.doSave(b,!1,e,f)}; OneDriveFile.prototype.doSave=function(b,e,f,c,l,m){var x=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=x;this.saveFile(b,e,f,c,l,m)}),c,l,m])}; -OneDriveFile.prototype.saveFile=function(b,e,f,c,l,m){if(!this.isEditable())null!=f&&f();else if(!this.savingFile)if(this.getTitle()==b){var x=mxUtils.bind(this,function(){try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var z=m||this.constructor!=OneDriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:this.getCurrentEtag(),C=this.meta;null!=this.sync&&this.sync.fileSaving();this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(d,g){this.setModified(this.getShadowModified()); -this.savingFile=!1;this.meta=d;this.fileSaved(g,C,mxUtils.bind(this,function(){this.contentChanged();null!=f&&f()}),c)}),mxUtils.bind(this,function(d,g){try{this.savingFile=!1,this.isConflict(g)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();x()}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&& -c(d)}catch(k){if(this.savingFile=!1,null!=c)c(k);else throw k;}}),z)}catch(d){if(this.savingFile=!1,null!=c)c(d);else throw d;}});x()}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.oneDrive.insertFile(b,this.getData(),mxUtils.bind(this,function(z){this.setModified(this.getShadowModified());this.savingFile=!1;null!=f&&f();this.ui.fileLoaded(z)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))}; +OneDriveFile.prototype.saveFile=function(b,e,f,c,l,m){if(!this.isEditable())null!=f&&f();else if(!this.savingFile)if(this.getTitle()==b){var x=mxUtils.bind(this,function(){try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var y=m||this.constructor!=OneDriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:this.getCurrentEtag(),D=this.meta;null!=this.sync&&this.sync.fileSaving();this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(d,g){this.setModified(this.getShadowModified()); +this.savingFile=!1;this.meta=d;this.fileSaved(g,D,mxUtils.bind(this,function(){this.contentChanged();null!=f&&f()}),c)}),mxUtils.bind(this,function(d,g){try{this.savingFile=!1,this.isConflict(g)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();x()}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&& +c(d)}catch(k){if(this.savingFile=!1,null!=c)c(k);else throw k;}}),y)}catch(d){if(this.savingFile=!1,null!=c)c(d);else throw d;}});x()}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.oneDrive.insertFile(b,this.getData(),mxUtils.bind(this,function(y){this.setModified(this.getShadowModified());this.savingFile=!1;null!=f&&f();this.ui.fileLoaded(y)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))}; OneDriveFile.prototype.rename=function(b,e,f){var c=this.getCurrentRevisionId();this.ui.oneDrive.renameFile(this,b,mxUtils.bind(this,function(l){this.hasSameExtension(b,this.getTitle())?(this.meta=l,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(c),null!=e&&e(l)):(this.meta=l,null!=this.sync&&this.sync.descriptorChanged(c),this.save(!0,e,f))}),f)}; OneDriveFile.prototype.move=function(b,e,f){this.ui.oneDrive.moveFile(this.getId(),b,mxUtils.bind(this,function(c){this.meta=c;this.descriptorChanged();null!=e&&e(c)}),f)};OneDriveLibrary=function(b,e,f){OneDriveFile.call(this,b,e,f)};mxUtils.extend(OneDriveLibrary,OneDriveFile);OneDriveLibrary.prototype.isAutosave=function(){return!0};OneDriveLibrary.prototype.save=function(b,e,f){this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(c){this.desc=c;null!=e&&e(c)}),f)};OneDriveLibrary.prototype.open=function(){};(function(){var b=null;window.OneDriveClient=function(e,f,c,l){null==f&&null!=window.urlParams&&"1"==window.urlParams.extAuth&&(f=!0);null==c&&(c=null!=window.Editor?Editor.oneDriveInlinePicker:!0);null==l&&null!=window.urlParams&&"1"==window.urlParams.noLogoutOD&&(l=!0);DrawioClient.call(this,e,f?"oneDriveExtAuthInfo":"oneDriveAuthInfo");this.isExtAuth=f;this.inlinePicker=c;this.noLogout=l;e=JSON.parse(this.token);null!=e&&(this.endpointHint=null!=e.endpointHint?e.endpointHint.replace("/Documents", "/_layouts/15/onedrive.aspx"):e.endpointHint)};mxUtils.extend(OneDriveClient,DrawioClient);OneDriveClient.prototype.clientId=window.DRAWIO_MSGRAPH_CLIENT_ID||("test.draw.io"==window.location.hostname?"95e4b4ed-ed5c-4a05-935b-b411b4562ef2":"24b129a6-117b-4394-bdc8-3b9955e5cdef");OneDriveClient.prototype.clientId="app.diagrams.net"==window.location.hostname?"b5ff67d6-3155-4fca-965a-59a3655c4476":OneDriveClient.prototype.clientId;OneDriveClient.prototype.clientId="viewer.diagrams.net"==window.location.hostname? @@ -12164,32 +12171,32 @@ return!0};OneDriveClient.prototype.get=function(e,f,c){e=new mxXmlRequest(e,null (this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(e,f,!0)}),f)):(x=JSON.parse(x.getText()),this.setUser(new DrawioUser(x.id,x.mail,x.displayName)),e()))}),mxUtils.bind(this,function(x){window.clearTimeout(m);l&&f(x)}))};OneDriveClient.prototype.resetTokenRefresh=function(e){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);0<e&&(this.tokenRefreshInterval=1E3*e,this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this, function(){this.authenticate(this.emptyFn,this.emptyFn,!0)}),900*e))};OneDriveClient.prototype.authenticate=function(e,f,c){if(this.isExtAuth)window.parent.oneDriveAuth(mxUtils.bind(this,function(l){this.updateAuthInfo(l,!0,null==this.endpointHint,e,f)}),f,null!=window.urlParams&&"1"==urlParams.odAuthCancellable);else(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(l){200<=l.getStatus()&&299>=l.getStatus()?this.authenticateStep2(l.getText(),e,f,c):null!= f&&f(l)}),f)};OneDriveClient.prototype.updateAuthInfo=function(e,f,c,l,m){c&&this.setUser(null);b=e.access_token;delete e.access_token;e.expiresOn=Date.now()+1E3*e.expires_in;this.tokenExpiresOn=e.expiresOn;e.remember=f;this.setPersistentToken(JSON.stringify(e),!f);this.resetTokenRefresh(e.expires_in);c?this.getAccountTypeAndEndpoint(mxUtils.bind(this,function(){l()}),m):l()};OneDriveClient.prototype.authenticateStep2=function(e,f,c,l){if(null==window.onOneDriveCallback){var m=mxUtils.bind(this,function(){var x= -!0,z=JSON.parse(this.getPersistentToken(!0));null!=z?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),null,"GET")).send(mxUtils.bind(this,function(C){200<=C.getStatus()&&299>=C.getStatus()?this.updateAuthInfo(JSON.parse(C.getText()),z.remember,!1,f,c):(this.clearPersistentToken(),this.setUser(null),b=null,401!=C.getStatus()&&400!=C.getStatus()||l?c({message:mxResources.get("accessDenied"),retry:m}):m())}),c):this.ui.showAuthDialog(this, -!0,mxUtils.bind(this,function(C,d){var g="https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id="+this.clientId+"&response_type=code&redirect_uri="+encodeURIComponent(this.redirectUri)+"&scope="+encodeURIComponent(this.scopes+(C?" offline_access":""))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e);g=window.open(g,"odauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+ -Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join());null!=g&&(window.onOneDriveCallback=mxUtils.bind(this,function(k,n){if(x){window.onOneDriveCallback=null;x=!1;try{null==k?c({message:mxResources.get("accessDenied"),retry:m}):(null!=d&&d(),this.updateAuthInfo(k,C,!0,f,c))}catch(t){c(t)}finally{null!=n&&n.close()}}else null!=n&&n.close()}),g.focus())}),mxUtils.bind(this,function(){x&&(window.onOneDriveCallback=null,x=!1,c({message:mxResources.get("accessDenied"), +!0,y=JSON.parse(this.getPersistentToken(!0));null!=y?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),null,"GET")).send(mxUtils.bind(this,function(D){200<=D.getStatus()&&299>=D.getStatus()?this.updateAuthInfo(JSON.parse(D.getText()),y.remember,!1,f,c):(this.clearPersistentToken(),this.setUser(null),b=null,401!=D.getStatus()&&400!=D.getStatus()||l?c({message:mxResources.get("accessDenied"),retry:m}):m())}),c):this.ui.showAuthDialog(this, +!0,mxUtils.bind(this,function(D,d){var g="https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id="+this.clientId+"&response_type=code&redirect_uri="+encodeURIComponent(this.redirectUri)+"&scope="+encodeURIComponent(this.scopes+(D?" offline_access":""))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e);g=window.open(g,"odauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+ +Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join());null!=g&&(window.onOneDriveCallback=mxUtils.bind(this,function(k,n){if(x){window.onOneDriveCallback=null;x=!1;try{null==k?c({message:mxResources.get("accessDenied"),retry:m}):(null!=d&&d(),this.updateAuthInfo(k,D,!0,f,c))}catch(q){c(q)}finally{null!=n&&n.close()}}else null!=n&&n.close()}),g.focus())}),mxUtils.bind(this,function(){x&&(window.onOneDriveCallback=null,x=!1,c({message:mxResources.get("accessDenied"), retry:m}))}))});m()}else c({code:App.ERROR_BUSY})};OneDriveClient.prototype.getAccountTypeAndEndpoint=function(e,f){this.get(this.baseUrl+"/me/drive/root",mxUtils.bind(this,function(c){try{if(200<=c.getStatus()&&299>=c.getStatus()){var l=JSON.parse(c.getText());0<l.webUrl.indexOf(".sharepoint.com")?this.endpointHint=l.webUrl.replace("/Documents","/_layouts/15/onedrive.aspx"):this.endpointHint=this.defEndpointHint;var m=JSON.parse(this.getPersistentToken(!0));null!=m&&(m.endpointHint=this.endpointHint, -this.setPersistentToken(JSON.stringify(m),!m.remember));e();return}}catch(x){}f({message:mxResources.get("unknownError")+" (Code: "+c.getStatus()+")"})}),f)};OneDriveClient.prototype.executeRequest=function(e,f,c){var l=mxUtils.bind(this,function(m){var x=!0,z=window.setTimeout(mxUtils.bind(this,function(){x=!1;c({code:App.ERROR_TIMEOUT,retry:l})}),this.ui.timeout);this.get(e,mxUtils.bind(this,function(C){window.clearTimeout(z);x&&(200<=C.getStatus()&&299>=C.getStatus()||404==C.getStatus()?(null== -this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),f(C)):m||401!==C.getStatus()&&400!==C.getStatus()?c(this.parseRequestText(C)):this.authenticate(function(){l(!0)},c,m))}),mxUtils.bind(this,function(C){window.clearTimeout(z);x&&c(C)}))});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){l(!0)},c):l(!1)};OneDriveClient.prototype.checkToken=function(e,f){null==b||null==this.tokenRefreshThread||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(e,null!=f?f:this.emptyFn): +this.setPersistentToken(JSON.stringify(m),!m.remember));e();return}}catch(x){}f({message:mxResources.get("unknownError")+" (Code: "+c.getStatus()+")"})}),f)};OneDriveClient.prototype.executeRequest=function(e,f,c){var l=mxUtils.bind(this,function(m){var x=!0,y=window.setTimeout(mxUtils.bind(this,function(){x=!1;c({code:App.ERROR_TIMEOUT,retry:l})}),this.ui.timeout);this.get(e,mxUtils.bind(this,function(D){window.clearTimeout(y);x&&(200<=D.getStatus()&&299>=D.getStatus()||404==D.getStatus()?(null== +this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),f(D)):m||401!==D.getStatus()&&400!==D.getStatus()?c(this.parseRequestText(D)):this.authenticate(function(){l(!0)},c,m))}),mxUtils.bind(this,function(D){window.clearTimeout(y);x&&c(D)}))});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){l(!0)},c):l(!1)};OneDriveClient.prototype.checkToken=function(e,f){null==b||null==this.tokenRefreshThread||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(e,null!=f?f:this.emptyFn): e()};OneDriveClient.prototype.getItemRef=function(e){var f=e.split("/");return 1<f.length?{driveId:f[0],id:f[1]}:{id:e}};OneDriveClient.prototype.getItemURL=function(e,f){var c=e.split("/");return 1<c.length?(e=c[1],(f?"":this.baseUrl)+"/drives/"+c[0]+("root"==e?"/root":"/items/"+e)):(f?"":this.baseUrl)+"/me/drive/items/"+e};OneDriveClient.prototype.getLibrary=function(e,f,c){this.getFile(e,f,c,!1,!0)};OneDriveClient.prototype.removeExtraHtmlContent=function(e){var f=e.lastIndexOf('<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"><meta name="Robots" '); -0<f&&(e=e.substring(0,f));return e};OneDriveClient.prototype.getFile=function(e,f,c,l,m){m=null!=m?m:!1;this.executeRequest(this.getItemURL(e),mxUtils.bind(this,function(x){if(200<=x.getStatus()&&299>=x.getStatus()){var z=JSON.parse(x.getText()),C=/\.png$/i.test(z.name);if(/\.v(dx|sdx?)$/i.test(z.name)||/\.gliffy$/i.test(z.name)||/\.pdf$/i.test(z.name)||!this.ui.useCanvasForExport&&C)this.ui.convertFile(z["@microsoft.graph.downloadUrl"],z.name,null!=z.file?z.file.mimeType:null,this.extension,f,c); -else{var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.editor.loadUrl(z["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(k){try{if(window.clearTimeout(g),d){/\.html$/i.test(z.name)&&(k=this.removeExtraHtmlContent(k));var n=null;if(0<(C?k.lastIndexOf(","):-1)){var t=this.ui.extractGraphModelFromPng(k);null!=t&&0<t.length?k=t:n=new LocalFile(this.ui,k,z.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==k.substring(0,32)){var p= -k.substring(22);k=window.atob&&!mxClient.IS_SF?atob(p):Base64.decode(p)}Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(k,z["@microsoft.graph.downloadUrl"])?this.ui.parseFileData(k,mxUtils.bind(this,function(A){try{4==A.readyState&&(200<=A.status&&299>=A.status?f(new LocalFile(this.ui,A.responseText,z.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(E){if(null!=c)c(E);else throw E;}}),z.name):null!=n?f(n):m?f(new OneDriveLibrary(this.ui, -k,z)):f(new OneDriveFile(this.ui,k,z))}}catch(A){if(null!=c)c(A);else throw A;}}),mxUtils.bind(this,function(k){window.clearTimeout(g);d&&c(this.parseRequestText(k))}),C||null!=z.file&&null!=z.file.mimeType&&("image/"==z.file.mimeType.substring(0,6)&&"image/svg"!=z.file.mimeType.substring(0,9)||"application/pdf"==z.file.mimeType))}}else this.isExtAuth?c({message:mxResources.get("fileNotFoundOrDenied"),ownerEmail:null!=window.urlParams?urlParams.ownerEml:null}):c(this.parseRequestText(x))}),c)};OneDriveClient.prototype.renameFile= +0<f&&(e=e.substring(0,f));return e};OneDriveClient.prototype.getFile=function(e,f,c,l,m){m=null!=m?m:!1;this.executeRequest(this.getItemURL(e),mxUtils.bind(this,function(x){if(200<=x.getStatus()&&299>=x.getStatus()){var y=JSON.parse(x.getText()),D=/\.png$/i.test(y.name);if(/\.v(dx|sdx?)$/i.test(y.name)||/\.gliffy$/i.test(y.name)||/\.pdf$/i.test(y.name)||!this.ui.useCanvasForExport&&D)this.ui.convertFile(y["@microsoft.graph.downloadUrl"],y.name,null!=y.file?y.file.mimeType:null,this.extension,f,c); +else{var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.editor.loadUrl(y["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(k){try{if(window.clearTimeout(g),d){/\.html$/i.test(y.name)&&(k=this.removeExtraHtmlContent(k));var n=null;if(0<(D?k.lastIndexOf(","):-1)){var q=this.ui.extractGraphModelFromPng(k);null!=q&&0<q.length?k=q:n=new LocalFile(this.ui,k,y.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==k.substring(0,32)){var p= +k.substring(22);k=window.atob&&!mxClient.IS_SF?atob(p):Base64.decode(p)}Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(k,y["@microsoft.graph.downloadUrl"])?this.ui.parseFileData(k,mxUtils.bind(this,function(A){try{4==A.readyState&&(200<=A.status&&299>=A.status?f(new LocalFile(this.ui,A.responseText,y.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(E){if(null!=c)c(E);else throw E;}}),y.name):null!=n?f(n):m?f(new OneDriveLibrary(this.ui, +k,y)):f(new OneDriveFile(this.ui,k,y))}}catch(A){if(null!=c)c(A);else throw A;}}),mxUtils.bind(this,function(k){window.clearTimeout(g);d&&c(this.parseRequestText(k))}),D||null!=y.file&&null!=y.file.mimeType&&("image/"==y.file.mimeType.substring(0,6)&&"image/svg"!=y.file.mimeType.substring(0,9)||"application/pdf"==y.file.mimeType))}}else this.isExtAuth?c({message:mxResources.get("fileNotFoundOrDenied"),ownerEmail:null!=window.urlParams?urlParams.ownerEml:null}):c(this.parseRequestText(x))}),c)};OneDriveClient.prototype.renameFile= function(e,f,c,l){null!=e&&null!=f&&(this.isValidFilename(f)?this.checkExists(e.getParentId(),f,!1,mxUtils.bind(this,function(m){m?this.writeFile(this.getItemURL(e.getId()),JSON.stringify({name:f}),"PATCH","application/json",c,l):l()})):l({message:this.invalidFilenameRegExs[0].test(f)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")}))};OneDriveClient.prototype.moveFile=function(e,f,c,l){f=this.getItemRef(f);var m=this.getItemRef(e);f.driveId!=m.driveId?l({message:mxResources.get("cannotMoveOneDrive", -null,"Moving a file between accounts is not supported yet.")}):this.writeFile(this.getItemURL(e),JSON.stringify({parentReference:f}),"PATCH","application/json",c,l)};OneDriveClient.prototype.insertLibrary=function(e,f,c,l,m){this.insertFile(e,f,c,l,!0,m)};OneDriveClient.prototype.insertFile=function(e,f,c,l,m,x){this.isValidFilename(e)?(m=null!=m?m:!1,this.checkExists(x,e,!0,mxUtils.bind(this,function(z){if(z){z="/me/drive/root";null!=x&&(z=this.getItemURL(x,!0));var C=mxUtils.bind(this,function(d){m? -c(new OneDriveLibrary(this.ui,f,d)):c(new OneDriveFile(this.ui,f,d))});z=this.baseUrl+z+"/children/"+encodeURIComponent(e)+"/content";4E6<=f.length?this.writeFile(z,"","PUT",null,mxUtils.bind(this,function(d){this.writeLargeFile(this.getItemURL(d.id),f,C,l)}),l):this.writeFile(z,f,"PUT",null,C,l)}else l()}))):l({message:this.invalidFilenameRegExs[0].test(e)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")})};OneDriveClient.prototype.checkExists=function(e,f, +null,"Moving a file between accounts is not supported yet.")}):this.writeFile(this.getItemURL(e),JSON.stringify({parentReference:f}),"PATCH","application/json",c,l)};OneDriveClient.prototype.insertLibrary=function(e,f,c,l,m){this.insertFile(e,f,c,l,!0,m)};OneDriveClient.prototype.insertFile=function(e,f,c,l,m,x){this.isValidFilename(e)?(m=null!=m?m:!1,this.checkExists(x,e,!0,mxUtils.bind(this,function(y){if(y){y="/me/drive/root";null!=x&&(y=this.getItemURL(x,!0));var D=mxUtils.bind(this,function(d){m? +c(new OneDriveLibrary(this.ui,f,d)):c(new OneDriveFile(this.ui,f,d))});y=this.baseUrl+y+"/children/"+encodeURIComponent(e)+"/content";4E6<=f.length?this.writeFile(y,"","PUT",null,mxUtils.bind(this,function(d){this.writeLargeFile(this.getItemURL(d.id),f,D,l)}),l):this.writeFile(y,f,"PUT",null,D,l)}else l()}))):l({message:this.invalidFilenameRegExs[0].test(e)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")})};OneDriveClient.prototype.checkExists=function(e,f, c,l){var m="/me/drive/root";null!=e&&(m=this.getItemURL(e,!0));this.executeRequest(this.baseUrl+m+"/children/"+encodeURIComponent(f),mxUtils.bind(this,function(x){404==x.getStatus()?l(!0):c?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[f]),function(){l(!0)},function(){l(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){l(!1)}))}),function(x){l(!1)},!0)};OneDriveClient.prototype.saveFile=function(e, -f,c,l){try{var m=e.getData(),x=mxUtils.bind(this,function(C){var d=mxUtils.bind(this,function(k){f(k,m)}),g=this.getItemURL(e.getId());4E6<=C.length?this.writeLargeFile(g,C,d,c,l):this.writeFile(g+"/content/",C,"PUT",null,d,c,l)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(e.meta.name)){var z=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(C){x(this.ui.base64ToBlob(C,"image/png"))}),c,this.ui.getCurrentFile()!=e?m:null,z.scale,z.border)}else x(m)}catch(C){c(C)}}; -OneDriveClient.prototype.writeLargeFile=function(e,f,c,l,m){try{if(null!=f){var x=mxUtils.bind(this,function(C,d,g){try{g=g||0;var k=!0,n=null;n=window.setTimeout(mxUtils.bind(this,function(){k=!1;l({code:App.ERROR_TIMEOUT})}),this.ui.timeout);var t=f.substr(d,4194304),p=new mxXmlRequest(C,t,"PUT");p.setRequestHeaders=mxUtils.bind(this,function(A,E){A.setRequestHeader("Content-Length",t.length);A.setRequestHeader("Content-Range","bytes "+d+"-"+(d+t.length-1)+"/"+f.length)});p.send(mxUtils.bind(this, -function(A){window.clearTimeout(n);if(k){var E=A.getStatus();200<=E&&299>=E?(E=d+t.length,E==f.length?c(JSON.parse(A.getText())):x(C,E,g)):500<=E&&599>=E&&2>g?(g++,x(C,d,g)):l(this.parseRequestText(A),A)}}),mxUtils.bind(this,function(A){window.clearTimeout(n);k&&l(this.parseRequestText(A))}))}catch(A){l(A)}}),z=mxUtils.bind(this,function(C){try{var d=!0,g=null;try{g=window.setTimeout(mxUtils.bind(this,function(){d=!1;l({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(n){}var k=new mxXmlRequest(e+ -"/createUploadSession","{}","POST");k.setRequestHeaders=mxUtils.bind(this,function(n,t){n.setRequestHeader("Content-Type","application/json");n.setRequestHeader("Authorization","Bearer "+b);null!=m&&n.setRequestHeader("If-Match",m)});k.send(mxUtils.bind(this,function(n){window.clearTimeout(g);d&&(200<=n.getStatus()&&299>=n.getStatus()?(n=JSON.parse(n.getText()),x(n.uploadUrl,0)):C||401!==n.getStatus()?l(this.parseRequestText(n),n):this.authenticate(function(){z(!0)},l,C))}),mxUtils.bind(this,function(n){window.clearTimeout(g); -d&&l(this.parseRequestText(n))}))}catch(n){l(n)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){z(!0)},l):z(!1)}else l({message:mxResources.get("unknownError")})}catch(C){l(C)}};OneDriveClient.prototype.writeFile=function(e,f,c,l,m,x,z){try{if(null!=e&&null!=f){var C=mxUtils.bind(this,function(d){try{var g=!0,k=null;try{k=window.setTimeout(mxUtils.bind(this,function(){g=!1;x({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(t){}var n=new mxXmlRequest(e,f,c);n.setRequestHeaders= -mxUtils.bind(this,function(t,p){t.setRequestHeader("Content-Type",l||" ");t.setRequestHeader("Authorization","Bearer "+b);null!=z&&t.setRequestHeader("If-Match",z)});n.send(mxUtils.bind(this,function(t){window.clearTimeout(k);g&&(200<=t.getStatus()&&299>=t.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),m(JSON.parse(t.getText()))):d||401!==t.getStatus()?x(this.parseRequestText(t),t):this.authenticate(function(){C(!0)},x,d))}),mxUtils.bind(this,function(t){window.clearTimeout(k); -g&&x(this.parseRequestText(t))}))}catch(t){x(t)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){C(!0)},x):C(!1)}else x({message:mxResources.get("unknownError")})}catch(d){x(d)}};OneDriveClient.prototype.parseRequestText=function(e){var f={message:mxResources.get("unknownError")};try{f=JSON.parse(e.getText()),f.status=e.getStatus(),f.error&&(f.error.status=f.status,f.error.code=f.status)}catch(c){}return f};OneDriveClient.prototype.pickLibrary=function(e){this.pickFile(function(f){e(f)})}; -OneDriveClient.prototype.createInlinePicker=function(e,f,c){return mxUtils.bind(this,function(){var l=null,m=document.createElement("div");m.style.position="relative";var x=new CustomDialog(this.ui,m,mxUtils.bind(this,function(){var z=l.getSelectedItem();if(null!=z)if(f&&"object"==typeof z.folder)e({value:[z]});else{if(!z.folder){var C=OneDriveFile.prototype.getIdOf(z);this.executeRequest(this.getItemURL(C),mxUtils.bind(this,function(d){200<=d.getStatus()&&299>=d.getStatus()&&(d=JSON.parse(d.getText()), -e(C,{value:[d]}))}),null)}}else return mxResources.get("invalidSel",null,"Invalid selection")}),null,mxResources.get(f?"save":"open"),null,null,null,null,!0);this.ui.showDialog(x.container,550,500,!0,!0);m.style.width=x.container.parentNode.style.width;m.style.height=parseInt(x.container.parentNode.style.height)-60+"px";l=new mxODPicker(m,null,mxUtils.bind(this,function(z,C,d,g){this.executeRequest(g?z:this.baseUrl+z,function(k){C(JSON.parse(k.getText()))},d)}),mxUtils.bind(this,function(z,C,d,g){this.executeRequest(this.baseUrl+ -"/drives/"+C+"/items/"+z,function(k){d(JSON.parse(k.getText()))},g)}),null,null,function(z){f?e({value:[z]}):e(OneDriveFile.prototype.getIdOf(z))},mxUtils.bind(this,function(z){this.ui.showError(mxResources.get("error"),z)}),f,null,null,null,null,c)})};OneDriveClient.prototype.pickFolder=function(e,f){var c=mxUtils.bind(this,function(m){this.ui.showError(mxResources.get("error"),m&&m.message?m.message:m)}),l=mxUtils.bind(this,function(m){var x=this.inlinePicker?this.createInlinePicker(e,!0):mxUtils.bind(this, -function(){OneDrive.save({clientId:this.clientId,action:"query",openInNewWindow:!0,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference",accessToken:b,isConsumerAccount:!1},success:mxUtils.bind(this,function(z){e(z);mxClient.IS_IE11&&(b=z.accessToken)}),cancel:mxUtils.bind(this,function(){}),error:c})});m?x():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){e({value:[{id:"root", +f,c,l){try{var m=e.getData(),x=mxUtils.bind(this,function(D){var d=mxUtils.bind(this,function(k){f(k,m)}),g=this.getItemURL(e.getId());4E6<=D.length?this.writeLargeFile(g,D,d,c,l):this.writeFile(g+"/content/",D,"PUT",null,d,c,l)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(e.meta.name)){var y=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(D){x(this.ui.base64ToBlob(D,"image/png"))}),c,this.ui.getCurrentFile()!=e?m:null,y.scale,y.border)}else x(m)}catch(D){c(D)}}; +OneDriveClient.prototype.writeLargeFile=function(e,f,c,l,m){try{if(null!=f){var x=mxUtils.bind(this,function(D,d,g){try{g=g||0;var k=!0,n=null;n=window.setTimeout(mxUtils.bind(this,function(){k=!1;l({code:App.ERROR_TIMEOUT})}),this.ui.timeout);var q=f.substr(d,4194304),p=new mxXmlRequest(D,q,"PUT");p.setRequestHeaders=mxUtils.bind(this,function(A,E){A.setRequestHeader("Content-Length",q.length);A.setRequestHeader("Content-Range","bytes "+d+"-"+(d+q.length-1)+"/"+f.length)});p.send(mxUtils.bind(this, +function(A){window.clearTimeout(n);if(k){var E=A.getStatus();200<=E&&299>=E?(E=d+q.length,E==f.length?c(JSON.parse(A.getText())):x(D,E,g)):500<=E&&599>=E&&2>g?(g++,x(D,d,g)):l(this.parseRequestText(A),A)}}),mxUtils.bind(this,function(A){window.clearTimeout(n);k&&l(this.parseRequestText(A))}))}catch(A){l(A)}}),y=mxUtils.bind(this,function(D){try{var d=!0,g=null;try{g=window.setTimeout(mxUtils.bind(this,function(){d=!1;l({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(n){}var k=new mxXmlRequest(e+ +"/createUploadSession","{}","POST");k.setRequestHeaders=mxUtils.bind(this,function(n,q){n.setRequestHeader("Content-Type","application/json");n.setRequestHeader("Authorization","Bearer "+b);null!=m&&n.setRequestHeader("If-Match",m)});k.send(mxUtils.bind(this,function(n){window.clearTimeout(g);d&&(200<=n.getStatus()&&299>=n.getStatus()?(n=JSON.parse(n.getText()),x(n.uploadUrl,0)):D||401!==n.getStatus()?l(this.parseRequestText(n),n):this.authenticate(function(){y(!0)},l,D))}),mxUtils.bind(this,function(n){window.clearTimeout(g); +d&&l(this.parseRequestText(n))}))}catch(n){l(n)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){y(!0)},l):y(!1)}else l({message:mxResources.get("unknownError")})}catch(D){l(D)}};OneDriveClient.prototype.writeFile=function(e,f,c,l,m,x,y){try{if(null!=e&&null!=f){var D=mxUtils.bind(this,function(d){try{var g=!0,k=null;try{k=window.setTimeout(mxUtils.bind(this,function(){g=!1;x({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(q){}var n=new mxXmlRequest(e,f,c);n.setRequestHeaders= +mxUtils.bind(this,function(q,p){q.setRequestHeader("Content-Type",l||" ");q.setRequestHeader("Authorization","Bearer "+b);null!=y&&q.setRequestHeader("If-Match",y)});n.send(mxUtils.bind(this,function(q){window.clearTimeout(k);g&&(200<=q.getStatus()&&299>=q.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),m(JSON.parse(q.getText()))):d||401!==q.getStatus()?x(this.parseRequestText(q),q):this.authenticate(function(){D(!0)},x,d))}),mxUtils.bind(this,function(q){window.clearTimeout(k); +g&&x(this.parseRequestText(q))}))}catch(q){x(q)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){D(!0)},x):D(!1)}else x({message:mxResources.get("unknownError")})}catch(d){x(d)}};OneDriveClient.prototype.parseRequestText=function(e){var f={message:mxResources.get("unknownError")};try{f=JSON.parse(e.getText()),f.status=e.getStatus(),f.error&&(f.error.status=f.status,f.error.code=f.status)}catch(c){}return f};OneDriveClient.prototype.pickLibrary=function(e){this.pickFile(function(f){e(f)})}; +OneDriveClient.prototype.createInlinePicker=function(e,f,c){return mxUtils.bind(this,function(){var l=null,m=document.createElement("div");m.style.position="relative";var x=new CustomDialog(this.ui,m,mxUtils.bind(this,function(){var y=l.getSelectedItem();if(null!=y)if(f&&"object"==typeof y.folder)e({value:[y]});else{if(!y.folder){var D=OneDriveFile.prototype.getIdOf(y);this.executeRequest(this.getItemURL(D),mxUtils.bind(this,function(d){200<=d.getStatus()&&299>=d.getStatus()&&(d=JSON.parse(d.getText()), +e(D,{value:[d]}))}),null)}}else return mxResources.get("invalidSel",null,"Invalid selection")}),null,mxResources.get(f?"save":"open"),null,null,null,null,!0);this.ui.showDialog(x.container,550,500,!0,!0);m.style.width=x.container.parentNode.style.width;m.style.height=parseInt(x.container.parentNode.style.height)-60+"px";l=new mxODPicker(m,null,mxUtils.bind(this,function(y,D,d,g){this.executeRequest(g?y:this.baseUrl+y,function(k){D(JSON.parse(k.getText()))},d)}),mxUtils.bind(this,function(y,D,d,g){this.executeRequest(this.baseUrl+ +"/drives/"+D+"/items/"+y,function(k){d(JSON.parse(k.getText()))},g)}),null,null,function(y){f?e({value:[y]}):e(OneDriveFile.prototype.getIdOf(y))},mxUtils.bind(this,function(y){this.ui.showError(mxResources.get("error"),y)}),f,null,null,null,null,c)})};OneDriveClient.prototype.pickFolder=function(e,f){var c=mxUtils.bind(this,function(m){this.ui.showError(mxResources.get("error"),m&&m.message?m.message:m)}),l=mxUtils.bind(this,function(m){var x=this.inlinePicker?this.createInlinePicker(e,!0):mxUtils.bind(this, +function(){OneDrive.save({clientId:this.clientId,action:"query",openInNewWindow:!0,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference",accessToken:b,isConsumerAccount:!1},success:mxUtils.bind(this,function(y){e(y);mxClient.IS_IE11&&(b=y.accessToken)}),cancel:mxUtils.bind(this,function(){}),error:c})});m?x():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){e({value:[{id:"root", name:"root",parentReference:{driveId:"me"}}]})}),x,mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0);null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){l(!1)}),c):l(f)};OneDriveClient.prototype.pickFile=function(e,f){e=null!=e?e:mxUtils.bind(this,function(m){this.ui.loadFile("W"+encodeURIComponent(m))});var c=mxUtils.bind(this,function(m){this.ui.showError(mxResources.get("error"), m&&m.message?m.message:m)}),l=this.inlinePicker?this.createInlinePicker(e,null,f):mxUtils.bind(this,function(){OneDrive.open({clientId:this.clientId,action:"query",multiSelect:!1,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference,webUrl",accessToken:b,isConsumerAccount:!1},success:mxUtils.bind(this,function(m){null!=m&&null!=m.value&&0<m.value.length&&(mxClient.IS_IE11&&(b=m.accessToken),e(OneDriveFile.prototype.getIdOf(m.value[0]), m))}),cancel:mxUtils.bind(this,function(){}),error:c});null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){this.inlinePicker?l():this.ui.showDialog((new BtnDialog(this.ui,this,mxResources.get("open"),mxUtils.bind(this,function(){this.ui.hideDialog();l()}))).container,300,140,!0,!0)}),c):l()};OneDriveClient.prototype.logout=function(){if(isLocalStorage){var e=localStorage.getItem("odpickerv7cache"); @@ -12198,125 +12205,125 @@ GitHubFile.prototype.getId=function(){return encodeURIComponent(this.meta.org)+" GitHubFile.prototype.getPublicUrl=function(b){null!=this.meta.download_url?mxUtils.get(this.meta.download_url,mxUtils.bind(this,function(e){b(200<=e.getStatus()&&299>=e.getStatus()?this.meta.download_url:null)}),mxUtils.bind(this,function(){b(null)})):b(null)};GitHubFile.prototype.isConflict=function(b){return null!=b&&409==b.status};GitHubFile.prototype.getMode=function(){return App.MODE_GITHUB};GitHubFile.prototype.isAutosave=function(){return!1};GitHubFile.prototype.getTitle=function(){return this.meta.name}; GitHubFile.prototype.isRenamable=function(){return!1};GitHubFile.prototype.getLatestVersion=function(b,e){this.peer.getFile(this.getId(),b,e)};GitHubFile.prototype.isCompressedStorage=function(){return!1};GitHubFile.prototype.getDescriptor=function(){return this.meta};GitHubFile.prototype.setDescriptor=function(b){this.meta=b};GitHubFile.prototype.getDescriptorEtag=function(b){return b.sha};GitHubFile.prototype.setDescriptorEtag=function(b,e){b.sha=e}; GitHubFile.prototype.save=function(b,e,f,c,l,m){this.doSave(this.getTitle(),e,f,c,l,m)};GitHubFile.prototype.saveAs=function(b,e,f){this.doSave(b,e,f)};GitHubFile.prototype.doSave=function(b,e,f,c,l,m){var x=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=x;this.saveFile(b,!1,e,f,c,l,m)}),f,c,l])}; -GitHubFile.prototype.saveFile=function(b,e,f,c,l,m,x){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else{var z=mxUtils.bind(this,function(C){if(this.getTitle()==b)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var d=this.getCurrentEtag(),g=this.data;this.peer.saveFile(this,mxUtils.bind(this,function(k){this.setModified(this.getShadowModified());this.savingFile=!1;this.setDescriptorEtag(this.meta,k);this.fileSaved(g,d,mxUtils.bind(this,function(){this.contentChanged(); -null!=f&&f()}),c)}),mxUtils.bind(this,function(k){this.savingFile=!1;this.isConflict(k)?(this.inConflictState=!0,null!=c&&c({commitMessage:C})):null!=c&&c(k)}),m,C)}catch(k){if(this.savingFile=!1,null!=c)c(k);else throw k;}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.pickFolder(this.getMode(),mxUtils.bind(this,function(k){this.peer.insertFile(b,this.getData(),mxUtils.bind(this,function(n){this.setModified(this.getShadowModified());this.savingFile=!1;null!= -f&&f();this.ui.fileLoaded(n)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,k,C)}))});null!=x?z(x):this.peer.showCommitDialog(this.meta.name,null==this.getDescriptorEtag(this.meta)||this.meta.isNew,mxUtils.bind(this,function(C){z(C)}),c)}else null!=f&&f()};GitHubLibrary=function(b,e,f){GitHubFile.call(this,b,e,f)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};GitHubLibrary.prototype.open=function(){};(function(){var b=null;window.GitHubClient=function(e,f){DrawioClient.call(this,e,f||"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"Iv1.1218f5567fbc258a":window.DRAWIO_GITHUB_ID;GitHubClient.prototype.extension=".drawio";GitHubClient.prototype.baseUrl=DRAWIO_GITHUB_API_URL;GitHubClient.prototype.baseHostUrl=DRAWIO_GITHUB_URL;GitHubClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/github2"; -GitHubClient.prototype.maxFileSize=1E6;GitHubClient.prototype.authToken="token";GitHubClient.prototype.setToken=function(e){b=e};GitHubClient.prototype.updateUser=function(e,f,c){var l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),x=new mxXmlRequest(this.baseUrl+"/user",null,"GET"),z=this.authToken+" "+b;x.setRequestHeaders=function(C,d){C.setRequestHeader("Authorization",z)};x.send(mxUtils.bind(this,function(){window.clearTimeout(m); +GitHubFile.prototype.saveFile=function(b,e,f,c,l,m,x){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else{var y=mxUtils.bind(this,function(D){if(this.getTitle()==b)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var d=this.getCurrentEtag(),g=this.data;this.peer.saveFile(this,mxUtils.bind(this,function(k){this.setModified(this.getShadowModified());this.savingFile=!1;this.setDescriptorEtag(this.meta,k);this.fileSaved(g,d,mxUtils.bind(this,function(){this.contentChanged(); +null!=f&&f()}),c)}),mxUtils.bind(this,function(k){this.savingFile=!1;this.isConflict(k)?(this.inConflictState=!0,null!=c&&c({commitMessage:D})):null!=c&&c(k)}),m,D)}catch(k){if(this.savingFile=!1,null!=c)c(k);else throw k;}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.pickFolder(this.getMode(),mxUtils.bind(this,function(k){this.peer.insertFile(b,this.getData(),mxUtils.bind(this,function(n){this.setModified(this.getShadowModified());this.savingFile=!1;null!= +f&&f();this.ui.fileLoaded(n)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,k,D)}))});null!=x?y(x):this.peer.showCommitDialog(this.meta.name,null==this.getDescriptorEtag(this.meta)||this.meta.isNew,mxUtils.bind(this,function(D){y(D)}),c)}else null!=f&&f()};GitHubLibrary=function(b,e,f){GitHubFile.call(this,b,e,f)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};GitHubLibrary.prototype.open=function(){};(function(){var b=null;window.GitHubClient=function(e,f){DrawioClient.call(this,e,f||"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"Iv1.1218f5567fbc258a":window.DRAWIO_GITHUB_ID;GitHubClient.prototype.extension=".drawio";GitHubClient.prototype.baseUrl=DRAWIO_GITHUB_API_URL;GitHubClient.prototype.baseHostUrl=DRAWIO_GITHUB_URL;GitHubClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/github2"; +GitHubClient.prototype.maxFileSize=1E6;GitHubClient.prototype.authToken="token";GitHubClient.prototype.setToken=function(e){b=e};GitHubClient.prototype.updateUser=function(e,f,c){var l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),x=new mxXmlRequest(this.baseUrl+"/user",null,"GET"),y=this.authToken+" "+b;x.setRequestHeaders=function(D,d){D.setRequestHeader("Authorization",y)};x.send(mxUtils.bind(this,function(){window.clearTimeout(m); l&&(401===x.getStatus()?c?f({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(e,f,!0)}),f)):200>x.getStatus()||300<=x.getStatus()?f({message:mxResources.get("accessDenied")}):(this.setUser(this.createUser(JSON.parse(x.getText()))),e()))}),f)};GitHubClient.prototype.createUser=function(e){return new DrawioUser(e.id,e.email,e.name)};GitHubClient.prototype.authenticate=function(e,f){(new mxXmlRequest(this.redirectUri+"?getState=1", null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),e,f):null!=f&&f(c)}),f)};GitHubClient.prototype.authenticateStep2=function(e,f,c){if(null==window.onGitHubCallback){var l=mxUtils.bind(this,function(){var m=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),null,"GET")).send(mxUtils.bind(this,function(x){200<= -x.getStatus()&&299>=x.getStatus()?(b=JSON.parse(x.getText()).access_token,this.setUser(null),f()):(this.clearPersistentToken(),this.setUser(null),b=null,401==x.getStatus()?l():c({message:mxResources.get("accessDenied"),retry:l}))}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(x,z){null!=window.open(this.baseHostUrl+"/login/oauth/authorize?client_id="+this.clientId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),"ghauth")?window.onGitHubCallback= -mxUtils.bind(this,function(C,d){m?(window.onGitHubCallback=null,m=!1,null==C?c({message:mxResources.get("accessDenied"),retry:l}):(null!=z&&z(),b=C.access_token,this.setUser(null),x&&this.setPersistentToken("remembered"),f(),null!=d&&d.close())):null!=d&&d.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:l})}),mxUtils.bind(this,function(){m&&(window.onGitHubCallback=null,m=!1,c({message:mxResources.get("accessDenied"),retry:l}))}))});l()}else c({code:App.ERROR_BUSY})};GitHubClient.prototype.getErrorMessage= +x.getStatus()&&299>=x.getStatus()?(b=JSON.parse(x.getText()).access_token,this.setUser(null),f()):(this.clearPersistentToken(),this.setUser(null),b=null,401==x.getStatus()?l():c({message:mxResources.get("accessDenied"),retry:l}))}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(x,y){null!=window.open(this.baseHostUrl+"/login/oauth/authorize?client_id="+this.clientId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),"ghauth")?window.onGitHubCallback= +mxUtils.bind(this,function(D,d){m?(window.onGitHubCallback=null,m=!1,null==D?c({message:mxResources.get("accessDenied"),retry:l}):(null!=y&&y(),b=D.access_token,this.setUser(null),x&&this.setPersistentToken("remembered"),f(),null!=d&&d.close())):null!=d&&d.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:l})}),mxUtils.bind(this,function(){m&&(window.onGitHubCallback=null,m=!1,c({message:mxResources.get("accessDenied"),retry:l}))}))});l()}else c({code:App.ERROR_BUSY})};GitHubClient.prototype.getErrorMessage= function(e,f){try{var c=JSON.parse(e.getText());null!=c&&null!=c.message&&(f=c.message)}catch(l){}return f};GitHubClient.prototype.showAuthorizeDialog=function(e,f){this.ui.showError(mxResources.get("accessDenied"),mxResources.get("authorizationRequired"),mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.diagrams.net/blog/single-repository-diagrams")}),e,mxResources.get("authorize"),mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname? -"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")}),mxResources.get("cancel"),f,480,null,!1)};GitHubClient.prototype.executeRequest=function(e,f,c,l,m){var x=mxUtils.bind(this,function(C){var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({code:App.ERROR_TIMEOUT,retry:z})}),this.ui.timeout),k=this.authToken+" "+b;e.setRequestHeaders=function(n,t){n.setRequestHeader("Authorization",k)};e.send(mxUtils.bind(this,function(){window.clearTimeout(g);var n= -mxUtils.bind(this,function(){var A=this.ui.spinner.pause();this.showAuthorizeDialog(mxUtils.bind(this,function(){A();z()}),mxUtils.bind(this,function(){this.ui.hideDialog();c({name:"AbortError"})}))});if(d)if(200<=e.getStatus()&&299>=e.getStatus()||l&&404==e.getStatus())f(e);else if(401===e.getStatus())C?c({code:e.getStatus(),message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){z(!0)},c)})}):this.authenticate(function(){x(!0)},c);else if(403===e.getStatus()){var t= -!1;try{var p=JSON.parse(e.getText());null!=p&&"Resource not accessible by integration"==p.message?n():(null!=p&&null!=p.errors&&0<p.errors.length&&(t="too_large"==p.errors[0].code),c({message:mxResources.get(t?"drawingTooLarge":"forbidden")}))}catch(A){c({message:mxResources.get(t?"drawingTooLarge":"forbidden")})}}else 404===e.getStatus()?m?c({code:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):n():409===e.getStatus()?c({code:e.getStatus(),status:409}):c({code:e.getStatus(), -message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(n){window.clearTimeout(g);d&&c(n)}))}),z=mxUtils.bind(this,function(C){null==this.user?this.updateUser(function(){z(!0)},c,C):x(C)});null==b?this.authenticate(function(){z(!0)},c):z(!1)};GitHubClient.prototype.getLibrary=function(e,f,c){this.getFile(e,f,c,!0)};GitHubClient.prototype.getSha=function(e,f,c,l,m,x,z){var C="&t="+(new Date).getTime();e=new mxXmlRequest(this.baseUrl+"/repos/"+e+"/"+ -f+"/contents/"+c+"?ref="+l+C,null,"HEAD");this.executeRequest(e,mxUtils.bind(this,function(d){try{m(d.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(g){x(g)}}),x,null,z)};GitHubClient.prototype.getFile=function(e,f,c,l,m){l=null!=l?l:!1;var x=e.split("/"),z=x[0],C=x[1],d=x[2];e=x.slice(3,x.length).join("/");x=/\.png$/i.test(e);if(!m&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&x))if(null!=b){m=this.baseUrl+"/repos/"+z+"/"+C+"/contents/"+ -e+"?ref="+d;var g={Authorization:"token "+b};x=e.split("/");this.ui.convertFile(m,0<x.length?x[x.length-1]:e,null,this.extension,f,c,null,g)}else c({message:mxResources.get("accessDenied")});else x="&t="+(new Date).getTime(),e=new mxXmlRequest(this.baseUrl+"/repos/"+z+"/"+C+"/contents/"+e+"?ref="+d+x,null,"GET"),this.executeRequest(e,mxUtils.bind(this,function(k){try{f(this.createGitHubFile(z,C,d,JSON.parse(k.getText()),l))}catch(n){c(n)}}),c)};GitHubClient.prototype.createGitHubFile=function(e,f, +"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")}),mxResources.get("cancel"),f,480,null,!1)};GitHubClient.prototype.executeRequest=function(e,f,c,l,m){var x=mxUtils.bind(this,function(D){var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({code:App.ERROR_TIMEOUT,retry:y})}),this.ui.timeout),k=this.authToken+" "+b;e.setRequestHeaders=function(n,q){n.setRequestHeader("Authorization",k)};e.send(mxUtils.bind(this,function(){window.clearTimeout(g);var n= +mxUtils.bind(this,function(){var A=this.ui.spinner.pause();this.showAuthorizeDialog(mxUtils.bind(this,function(){A();y()}),mxUtils.bind(this,function(){this.ui.hideDialog();c({name:"AbortError"})}))});if(d)if(200<=e.getStatus()&&299>=e.getStatus()||l&&404==e.getStatus())f(e);else if(401===e.getStatus())D?c({code:e.getStatus(),message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){y(!0)},c)})}):this.authenticate(function(){x(!0)},c);else if(403===e.getStatus()){var q= +!1;try{var p=JSON.parse(e.getText());null!=p&&"Resource not accessible by integration"==p.message?n():(null!=p&&null!=p.errors&&0<p.errors.length&&(q="too_large"==p.errors[0].code),c({message:mxResources.get(q?"drawingTooLarge":"forbidden")}))}catch(A){c({message:mxResources.get(q?"drawingTooLarge":"forbidden")})}}else 404===e.getStatus()?m?c({code:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):n():409===e.getStatus()?c({code:e.getStatus(),status:409}):c({code:e.getStatus(), +message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(n){window.clearTimeout(g);d&&c(n)}))}),y=mxUtils.bind(this,function(D){null==this.user?this.updateUser(function(){y(!0)},c,D):x(D)});null==b?this.authenticate(function(){y(!0)},c):y(!1)};GitHubClient.prototype.getLibrary=function(e,f,c){this.getFile(e,f,c,!0)};GitHubClient.prototype.getSha=function(e,f,c,l,m,x,y){var D="&t="+(new Date).getTime();e=new mxXmlRequest(this.baseUrl+"/repos/"+e+"/"+ +f+"/contents/"+c+"?ref="+l+D,null,"HEAD");this.executeRequest(e,mxUtils.bind(this,function(d){try{m(d.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(g){x(g)}}),x,null,y)};GitHubClient.prototype.getFile=function(e,f,c,l,m){l=null!=l?l:!1;var x=e.split("/"),y=x[0],D=x[1],d=x[2];e=x.slice(3,x.length).join("/");x=/\.png$/i.test(e);if(!m&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&x))if(null!=b){m=this.baseUrl+"/repos/"+y+"/"+D+"/contents/"+ +e+"?ref="+d;var g={Authorization:"token "+b};x=e.split("/");this.ui.convertFile(m,0<x.length?x[x.length-1]:e,null,this.extension,f,c,null,g)}else c({message:mxResources.get("accessDenied")});else x="&t="+(new Date).getTime(),e=new mxXmlRequest(this.baseUrl+"/repos/"+y+"/"+D+"/contents/"+e+"?ref="+d+x,null,"GET"),this.executeRequest(e,mxUtils.bind(this,function(k){try{f(this.createGitHubFile(y,D,d,JSON.parse(k.getText()),l))}catch(n){c(n)}}),c)};GitHubClient.prototype.createGitHubFile=function(e,f, c,l,m){e={org:e,repo:f,ref:c,name:l.name,path:l.path,sha:l.sha,html_url:l.html_url,download_url:l.download_url};f=l.content;"base64"===l.encoding&&(/\.jpe?g$/i.test(l.name)?f="data:image/jpeg;base64,"+f:/\.gif$/i.test(l.name)?f="data:image/gif;base64,"+f:/\.png$/i.test(l.name)?(l=this.ui.extractGraphModelFromPng(f),f=null!=l&&0<l.length?l:"data:image/png;base64,"+f):f=Base64.decode(f));return m?new GitHubLibrary(this.ui,f,e):new GitHubFile(this.ui,f,e)};GitHubClient.prototype.insertLibrary=function(e, -f,c,l,m){this.insertFile(e,f,c,l,!0,m,!1)};GitHubClient.prototype.insertFile=function(e,f,c,l,m,x,z){m=null!=m?m:!1;x=x.split("/");var C=x[0],d=x[1],g=x[2],k=x.slice(3,x.length).join("/");0<k.length&&(k+="/");k+=e;this.checkExists(C+"/"+d+"/"+g+"/"+k,!0,mxUtils.bind(this,function(n,t){n?m?(z||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(p){this.writeFile(C,d,g,k,p,f,t,mxUtils.bind(this,function(A){try{var E=JSON.parse(A.getText());c(this.createGitHubFile(C,d,g,E.content, -m))}catch(y){l(y)}}),l)}),l)):c(new GitHubFile(this.ui,f,{org:C,repo:d,ref:g,name:e,path:k,sha:t,isNew:!0})):l()}))};GitHubClient.prototype.showCommitDialog=function(e,f,c,l){var m=this.ui.spinner.pause();e=new FilenameDialog(this.ui,mxResources.get(f?"addedFile":"updateFile",[e]),mxResources.get("ok"),mxUtils.bind(this,function(x){m();c(x)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){l()}),null,280);this.ui.showDialog(e.container,400,80,!0,!1);e.init()};GitHubClient.prototype.writeFile= -function(e,f,c,l,m,x,z,C,d){x.length>=this.maxFileSize?d({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(x.length)+" / 1 MB)"}):(c={path:l,branch:decodeURIComponent(c),message:m,content:x},null!=z&&(c.sha=z),e=new mxXmlRequest(this.baseUrl+"/repos/"+e+"/"+f+"/contents/"+l,JSON.stringify(c),"PUT"),this.executeRequest(e,mxUtils.bind(this,function(g){C(g)}),mxUtils.bind(this,function(g){404==g.code&&(g.helpLink=this.baseHostUrl+"/settings/connections/applications/"+this.clientId, -g.code=null);d(g)})))};GitHubClient.prototype.checkExists=function(e,f,c){var l=e.split("/"),m=l[0],x=l[1],z=l[2];e=l.slice(3,l.length).join("/");this.getSha(m,x,e,z,mxUtils.bind(this,function(C){if(f){var d=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[e]),function(){d();c(!0,C)},function(){d();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(C){c(!0)}), -!0)};GitHubClient.prototype.saveFile=function(e,f,c,l,m){var x=e.meta.org,z=e.meta.repo,C=e.meta.ref,d=e.meta.path,g=mxUtils.bind(this,function(n,t){this.writeFile(x,z,C,d,m,t,n,mxUtils.bind(this,function(p){delete e.meta.isNew;f(JSON.parse(p.getText()).content.sha)}),mxUtils.bind(this,function(p){c(p)}))}),k=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(d)){var n=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(t){g(e.meta.sha, -t)}),c,this.ui.getCurrentFile()!=e?e.getData():null,n.scale,n.border)}else g(e.meta.sha,Base64.encode(e.getData()))});l?this.getSha(x,z,d,C,mxUtils.bind(this,function(n){e.meta.sha=n;k()}),c):k()};GitHubClient.prototype.pickLibrary=function(e){this.pickFile(e)};GitHubClient.prototype.pickFolder=function(e){this.showGitHubDialog(!1,e)};GitHubClient.prototype.pickFile=function(e){e=null!=e?e:mxUtils.bind(this,function(f){this.ui.loadFile("H"+encodeURIComponent(f))});this.showGitHubDialog(!0,e)};GitHubClient.prototype.showGitHubDialog= -function(e,f){var c=null,l=null,m=null,x=null,z=document.createElement("div");z.style.whiteSpace="nowrap";z.style.overflow="hidden";z.style.height="304px";var C=document.createElement("h3");mxUtils.write(C,mxResources.get(e?"selectFile":"selectFolder"));C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";z.appendChild(C);var d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.border="1px solid lightgray";d.style.boxSizing="border-box";d.style.padding="4px"; -d.style.overflow="auto";d.style.lineHeight="1.2em";d.style.height="274px";z.appendChild(d);var g=document.createElement("div");g.style.textOverflow="ellipsis";g.style.boxSizing="border-box";g.style.overflow="hidden";g.style.padding="4px";g.style.width="100%";var k=new CustomDialog(this.ui,z,mxUtils.bind(this,function(){f(c+"/"+l+"/"+encodeURIComponent(m)+"/"+x)}),null,null,"https://www.diagrams.net/blog/single-repository-diagrams",null,null,null,null,[[mxResources.get("refresh"),mxUtils.bind(this, -function(){J()})],[mxResources.get("authorize"),mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")})]]);this.ui.showDialog(k.container,420,370,!0,!0);e&&k.okButton.parentNode.removeChild(k.okButton);var n=mxUtils.bind(this,function(N,v,u,G){var H=document.createElement("a");H.setAttribute("title",N);H.style.cursor="pointer";mxUtils.write(H,N);mxEvent.addListener(H,"click",v); -G&&(H.style.textDecoration="underline");null!=u&&(N=g.cloneNode(),N.style.padding=u,N.appendChild(H),H=N);return H}),t=mxUtils.bind(this,function(N){var v=document.createElement("div");v.style.marginBottom="8px";v.appendChild(n(c+"/"+l,mxUtils.bind(this,function(){x=null;J()}),null,!0));N||(mxUtils.write(v," / "),v.appendChild(n(decodeURIComponent(m),mxUtils.bind(this,function(){x=null;B()}),null,!0)));if(null!=x&&0<x.length){var u=x.split("/");for(N=0;N<u.length;N++)(function(G){mxUtils.write(v, -" / ");v.appendChild(n(u[G],mxUtils.bind(this,function(){x=u.slice(0,G+1).join("/");y()}),null,!0))})(N)}d.appendChild(v)}),p=mxUtils.bind(this,function(N){this.ui.handleError(N,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(x=m=l=c=null,J()):this.ui.hideDialog()}),null,{})}),A=null,E=null,y=mxUtils.bind(this,function(N){null==N&&(d.innerText="",N=1);var v=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+l+"/contents/"+x+"?ref="+encodeURIComponent(m)+"&per_page=100&page="+ -N,null,"GET");this.ui.spinner.spin(d,mxResources.get("loading"));k.okButton.removeAttribute("disabled");null!=E&&(mxEvent.removeListener(d,"scroll",E),E=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");A.style.display="block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var u=mxUtils.bind(this,function(){y(N+1)});mxEvent.addListener(A,"click",u);this.executeRequest(v,mxUtils.bind(this,function(G){this.ui.spinner.stop();1==N&&(t(), -d.appendChild(n("../ [Up]",mxUtils.bind(this,function(){if(""==x)x=null,J();else{var I=x.split("/");x=I.slice(0,I.length-1).join("/");y()}}),"4px")));var H=JSON.parse(G.getText());if(null==H||0==H.length)mxUtils.write(d,mxResources.get("noFiles"));else{var M=!0,K=0;G=mxUtils.bind(this,function(I){for(var F=0;F<H.length;F++)mxUtils.bind(this,function(P,U){if(I==("dir"==P.type)){U=g.cloneNode();U.style.backgroundColor=M?Editor.isDarkMode()?"#000000":"#eeeeee":"";M=!M;var T=document.createElement("img"); -T.src=IMAGE_PATH+"/"+("dir"==P.type?"folder.png":"file.png");T.setAttribute("align","absmiddle");T.style.marginRight="4px";T.style.marginTop="-4px";T.width=20;U.appendChild(T);U.appendChild(n(P.name+("dir"==P.type?"/":""),mxUtils.bind(this,function(){"dir"==P.type?(x=P.path,y()):e&&"file"==P.type&&(this.ui.hideDialog(),f(c+"/"+l+"/"+encodeURIComponent(m)+"/"+P.path))})));d.appendChild(U);K++}})(H[F],F)});G(!0);e&&G(!1)}}),p,!0)}),B=mxUtils.bind(this,function(N,v){null==N&&(d.innerText="",N=1);var u= -new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+l+"/branches?per_page=100&page="+N,null,"GET");k.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(d,mxResources.get("loading"));null!=E&&(mxEvent.removeListener(d,"scroll",E),E=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");A.style.display="block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var G=mxUtils.bind(this,function(){B(N+1)});mxEvent.addListener(A,"click", -G);this.executeRequest(u,mxUtils.bind(this,function(H){this.ui.spinner.stop();1==N&&(t(!0),d.appendChild(n("../ [Up]",mxUtils.bind(this,function(){x=null;J()}),"4px")));H=JSON.parse(H.getText());if(null==H||0==H.length)mxUtils.write(d,mxResources.get("noFiles"));else if(1==H.length&&v)m=H[0].name,x="",y();else{for(var M=0;M<H.length;M++)mxUtils.bind(this,function(K,I){var F=g.cloneNode();F.style.backgroundColor=0==I%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";F.appendChild(n(K.name,mxUtils.bind(this, -function(){m=K.name;x="";y()})));d.appendChild(F)})(H[M],M);100==H.length&&(d.appendChild(A),E=function(){d.scrollTop>=d.scrollHeight-d.offsetHeight&&G()},mxEvent.addListener(d,"scroll",E))}}),p)}),J=mxUtils.bind(this,function(N){null==N&&(d.innerText="",N=1);var v=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+N,null,"GET");k.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(d,mxResources.get("loading"));null!=E&&mxEvent.removeListener(d,"scroll",E);null!=A&&null!= -A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");A.style.display="block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var u=mxUtils.bind(this,function(){J(N+1)});mxEvent.addListener(A,"click",u);this.executeRequest(v,mxUtils.bind(this,function(G){this.ui.spinner.stop();G=JSON.parse(G.getText());if(null==G||0==G.length)mxUtils.write(d,mxResources.get("noFiles"));else{1==N&&(d.appendChild(n(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var M= -new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(K){if(null!=K){var I=K.split("/");if(1<I.length){K=I[0];var F=I[1];3>I.length?(c=K,l=F,x=m=null,B()):this.ui.spinner.spin(d,mxResources.get("loading"))&&(I=encodeURIComponent(I.slice(2,I.length).join("/")),this.getFile(K+"/"+F+"/"+I,mxUtils.bind(this,function(P){this.ui.spinner.stop();c=P.meta.org;l=P.meta.repo;m=decodeURIComponent(P.meta.ref);x="";y()}),mxUtils.bind(this,function(P){this.ui.spinner.stop(); -this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(M.container,300,80,!0,!1);M.init()}))),mxUtils.br(d),mxUtils.br(d));for(var H=0;H<G.length;H++)mxUtils.bind(this,function(M,K){var I=g.cloneNode();I.style.backgroundColor=0==K%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";I.appendChild(n(M.full_name,mxUtils.bind(this,function(){c=M.owner.login; -l=M.name;x="";B(null,!0)})));d.appendChild(I)})(G[H],H)}100==G.length&&(d.appendChild(A),E=function(){d.scrollTop>=d.scrollHeight-d.offsetHeight&&u()},mxEvent.addListener(d,"scroll",E))}),p)});J()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes}; +f,c,l,m){this.insertFile(e,f,c,l,!0,m,!1)};GitHubClient.prototype.insertFile=function(e,f,c,l,m,x,y){m=null!=m?m:!1;x=x.split("/");var D=x[0],d=x[1],g=x[2],k=x.slice(3,x.length).join("/");0<k.length&&(k+="/");k+=e;this.checkExists(D+"/"+d+"/"+g+"/"+k,!0,mxUtils.bind(this,function(n,q){n?m?(y||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(p){this.writeFile(D,d,g,k,p,f,q,mxUtils.bind(this,function(A){try{var E=JSON.parse(A.getText());c(this.createGitHubFile(D,d,g,E.content, +m))}catch(z){l(z)}}),l)}),l)):c(new GitHubFile(this.ui,f,{org:D,repo:d,ref:g,name:e,path:k,sha:q,isNew:!0})):l()}))};GitHubClient.prototype.showCommitDialog=function(e,f,c,l){var m=this.ui.spinner.pause();e=new FilenameDialog(this.ui,mxResources.get(f?"addedFile":"updateFile",[e]),mxResources.get("ok"),mxUtils.bind(this,function(x){m();c(x)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){l()}),null,280);this.ui.showDialog(e.container,400,80,!0,!1);e.init()};GitHubClient.prototype.writeFile= +function(e,f,c,l,m,x,y,D,d){x.length>=this.maxFileSize?d({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(x.length)+" / 1 MB)"}):(c={path:l,branch:decodeURIComponent(c),message:m,content:x},null!=y&&(c.sha=y),e=new mxXmlRequest(this.baseUrl+"/repos/"+e+"/"+f+"/contents/"+l,JSON.stringify(c),"PUT"),this.executeRequest(e,mxUtils.bind(this,function(g){D(g)}),mxUtils.bind(this,function(g){404==g.code&&(g.helpLink=this.baseHostUrl+"/settings/connections/applications/"+this.clientId, +g.code=null);d(g)})))};GitHubClient.prototype.checkExists=function(e,f,c){var l=e.split("/"),m=l[0],x=l[1],y=l[2];e=l.slice(3,l.length).join("/");this.getSha(m,x,e,y,mxUtils.bind(this,function(D){if(f){var d=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[e]),function(){d();c(!0,D)},function(){d();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(D){c(!0)}), +!0)};GitHubClient.prototype.saveFile=function(e,f,c,l,m){var x=e.meta.org,y=e.meta.repo,D=e.meta.ref,d=e.meta.path,g=mxUtils.bind(this,function(n,q){this.writeFile(x,y,D,d,m,q,n,mxUtils.bind(this,function(p){delete e.meta.isNew;f(JSON.parse(p.getText()).content.sha)}),mxUtils.bind(this,function(p){c(p)}))}),k=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(d)){var n=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(q){g(e.meta.sha, +q)}),c,this.ui.getCurrentFile()!=e?e.getData():null,n.scale,n.border)}else g(e.meta.sha,Base64.encode(e.getData()))});l?this.getSha(x,y,d,D,mxUtils.bind(this,function(n){e.meta.sha=n;k()}),c):k()};GitHubClient.prototype.pickLibrary=function(e){this.pickFile(e)};GitHubClient.prototype.pickFolder=function(e){this.showGitHubDialog(!1,e)};GitHubClient.prototype.pickFile=function(e){e=null!=e?e:mxUtils.bind(this,function(f){this.ui.loadFile("H"+encodeURIComponent(f))});this.showGitHubDialog(!0,e)};GitHubClient.prototype.showGitHubDialog= +function(e,f){var c=null,l=null,m=null,x=null,y=document.createElement("div");y.style.whiteSpace="nowrap";y.style.overflow="hidden";y.style.height="304px";var D=document.createElement("h3");mxUtils.write(D,mxResources.get(e?"selectFile":"selectFolder"));D.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";y.appendChild(D);var d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.border="1px solid lightgray";d.style.boxSizing="border-box";d.style.padding="4px"; +d.style.overflow="auto";d.style.lineHeight="1.2em";d.style.height="274px";y.appendChild(d);var g=document.createElement("div");g.style.textOverflow="ellipsis";g.style.boxSizing="border-box";g.style.overflow="hidden";g.style.padding="4px";g.style.width="100%";var k=new CustomDialog(this.ui,y,mxUtils.bind(this,function(){f(c+"/"+l+"/"+encodeURIComponent(m)+"/"+x)}),null,null,"https://www.diagrams.net/blog/single-repository-diagrams",null,null,null,null,[[mxResources.get("refresh"),mxUtils.bind(this, +function(){J()})],[mxResources.get("authorize"),mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")})]]);this.ui.showDialog(k.container,420,370,!0,!0);e&&k.okButton.parentNode.removeChild(k.okButton);var n=mxUtils.bind(this,function(M,v,u,G){var I=document.createElement("a");I.setAttribute("title",M);I.style.cursor="pointer";mxUtils.write(I,M);mxEvent.addListener(I,"click",v); +G&&(I.style.textDecoration="underline");null!=u&&(M=g.cloneNode(),M.style.padding=u,M.appendChild(I),I=M);return I}),q=mxUtils.bind(this,function(M){var v=document.createElement("div");v.style.marginBottom="8px";v.appendChild(n(c+"/"+l,mxUtils.bind(this,function(){x=null;J()}),null,!0));M||(mxUtils.write(v," / "),v.appendChild(n(decodeURIComponent(m),mxUtils.bind(this,function(){x=null;B()}),null,!0)));if(null!=x&&0<x.length){var u=x.split("/");for(M=0;M<u.length;M++)(function(G){mxUtils.write(v, +" / ");v.appendChild(n(u[G],mxUtils.bind(this,function(){x=u.slice(0,G+1).join("/");z()}),null,!0))})(M)}d.appendChild(v)}),p=mxUtils.bind(this,function(M){this.ui.handleError(M,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(x=m=l=c=null,J()):this.ui.hideDialog()}),null,{})}),A=null,E=null,z=mxUtils.bind(this,function(M){null==M&&(d.innerText="",M=1);var v=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+l+"/contents/"+x+"?ref="+encodeURIComponent(m)+"&per_page=100&page="+ +M,null,"GET");this.ui.spinner.spin(d,mxResources.get("loading"));k.okButton.removeAttribute("disabled");null!=E&&(mxEvent.removeListener(d,"scroll",E),E=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");A.style.display="block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var u=mxUtils.bind(this,function(){z(M+1)});mxEvent.addListener(A,"click",u);this.executeRequest(v,mxUtils.bind(this,function(G){this.ui.spinner.stop();1==M&&(q(), +d.appendChild(n("../ [Up]",mxUtils.bind(this,function(){if(""==x)x=null,J();else{var K=x.split("/");x=K.slice(0,K.length-1).join("/");z()}}),"4px")));var I=JSON.parse(G.getText());if(null==I||0==I.length)mxUtils.write(d,mxResources.get("noFiles"));else{var F=!0,L=0;G=mxUtils.bind(this,function(K){for(var H=0;H<I.length;H++)mxUtils.bind(this,function(Q,U){if(K==("dir"==Q.type)){U=g.cloneNode();U.style.backgroundColor=F?Editor.isDarkMode()?"#000000":"#eeeeee":"";F=!F;var T=document.createElement("img"); +T.src=IMAGE_PATH+"/"+("dir"==Q.type?"folder.png":"file.png");T.setAttribute("align","absmiddle");T.style.marginRight="4px";T.style.marginTop="-4px";T.width=20;U.appendChild(T);U.appendChild(n(Q.name+("dir"==Q.type?"/":""),mxUtils.bind(this,function(){"dir"==Q.type?(x=Q.path,z()):e&&"file"==Q.type&&(this.ui.hideDialog(),f(c+"/"+l+"/"+encodeURIComponent(m)+"/"+Q.path))})));d.appendChild(U);L++}})(I[H],H)});G(!0);e&&G(!1)}}),p,!0)}),B=mxUtils.bind(this,function(M,v){null==M&&(d.innerText="",M=1);var u= +new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+l+"/branches?per_page=100&page="+M,null,"GET");k.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(d,mxResources.get("loading"));null!=E&&(mxEvent.removeListener(d,"scroll",E),E=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");A.style.display="block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var G=mxUtils.bind(this,function(){B(M+1)});mxEvent.addListener(A,"click", +G);this.executeRequest(u,mxUtils.bind(this,function(I){this.ui.spinner.stop();1==M&&(q(!0),d.appendChild(n("../ [Up]",mxUtils.bind(this,function(){x=null;J()}),"4px")));I=JSON.parse(I.getText());if(null==I||0==I.length)mxUtils.write(d,mxResources.get("noFiles"));else if(1==I.length&&v)m=I[0].name,x="",z();else{for(var F=0;F<I.length;F++)mxUtils.bind(this,function(L,K){var H=g.cloneNode();H.style.backgroundColor=0==K%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";H.appendChild(n(L.name,mxUtils.bind(this, +function(){m=L.name;x="";z()})));d.appendChild(H)})(I[F],F);100==I.length&&(d.appendChild(A),E=function(){d.scrollTop>=d.scrollHeight-d.offsetHeight&&G()},mxEvent.addListener(d,"scroll",E))}}),p)}),J=mxUtils.bind(this,function(M){null==M&&(d.innerText="",M=1);var v=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+M,null,"GET");k.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(d,mxResources.get("loading"));null!=E&&mxEvent.removeListener(d,"scroll",E);null!=A&&null!= +A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");A.style.display="block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var u=mxUtils.bind(this,function(){J(M+1)});mxEvent.addListener(A,"click",u);this.executeRequest(v,mxUtils.bind(this,function(G){this.ui.spinner.stop();G=JSON.parse(G.getText());if(null==G||0==G.length)mxUtils.write(d,mxResources.get("noFiles"));else{1==M&&(d.appendChild(n(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var F= +new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(L){if(null!=L){var K=L.split("/");if(1<K.length){L=K[0];var H=K[1];3>K.length?(c=L,l=H,x=m=null,B()):this.ui.spinner.spin(d,mxResources.get("loading"))&&(K=encodeURIComponent(K.slice(2,K.length).join("/")),this.getFile(L+"/"+H+"/"+K,mxUtils.bind(this,function(Q){this.ui.spinner.stop();c=Q.meta.org;l=Q.meta.repo;m=decodeURIComponent(Q.meta.ref);x="";z()}),mxUtils.bind(this,function(Q){this.ui.spinner.stop(); +this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(F.container,300,80,!0,!1);F.init()}))),mxUtils.br(d),mxUtils.br(d));for(var I=0;I<G.length;I++)mxUtils.bind(this,function(F,L){var K=g.cloneNode();K.style.backgroundColor=0==L%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";K.appendChild(n(F.full_name,mxUtils.bind(this,function(){c=F.owner.login; +l=F.name;x="";B(null,!0)})));d.appendChild(K)})(G[I],I)}100==G.length&&(d.appendChild(A),E=function(){d.scrollTop>=d.scrollHeight-d.offsetHeight&&u()},mxEvent.addListener(d,"scroll",E))}),p)});J()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes}; TrelloFile.prototype.save=function(b,e,f){this.doSave(this.getTitle(),e,f)};TrelloFile.prototype.saveAs=function(b,e,f){this.doSave(b,e,f)};TrelloFile.prototype.doSave=function(b,e,f){var c=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=c;this.saveFile(b,!1,e,f)}),f])}; TrelloFile.prototype.saveFile=function(b,e,f,c){this.isEditable()?this.savingFile?null!=c&&(this.saveNeededCounter++,c({code:App.ERROR_BUSY})):(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.getTitle()==b?this.ui.trello.saveFile(this,mxUtils.bind(this,function(l){this.setModified(this.getShadowModified());this.savingFile=!1;this.meta=l;this.contentChanged();null!=f&&f();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,e,f,c))}),mxUtils.bind(this, function(l){this.savingFile=!1;null!=c&&c(l)})):this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(l){this.ui.trello.insertFile(b,this.getData(),mxUtils.bind(this,function(m){this.savingFile=!1;null!=f&&f();this.ui.fileLoaded(m);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,e,f,c))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,l)}))):null!=f&&f()};TrelloLibrary=function(b,e,f){TrelloFile.call(this,b,e,f)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};TrelloLibrary.prototype.open=function(){};TrelloClient=function(b){DrawioClient.call(this,b,"tauth");Trello.setKey(this.key)};mxUtils.extend(TrelloClient,DrawioClient);TrelloClient.prototype.key="e89d109082298ce91f6576f82f458551";TrelloClient.prototype.baseUrl="https://api.trello.com/1/";TrelloClient.prototype.SEPARATOR="|$|";TrelloClient.prototype.maxFileSize=1E7;TrelloClient.prototype.extension=".xml"; TrelloClient.prototype.authenticate=function(b,e,f){f&&this.logout();f=mxUtils.bind(this,function(c,l){Trello.authorize({type:"popup",name:"draw.io",scope:{read:"true",write:"true"},expiration:c?"never":"1hour",success:function(){null!=l&&l();b()},error:function(){null!=l&&l();null!=e&&e(mxResources.get("loggedOut"))}})});this.isAuthorized()?f(!0):this.ui.showAuthDialog(this,!0,f)};TrelloClient.prototype.getLibrary=function(b,e,f){this.getFile(b,e,f,!1,!0)}; -TrelloClient.prototype.getFile=function(b,e,f,c,l){l=null!=l?l:!1;var m=mxUtils.bind(this,function(){var x=b.split(this.SEPARATOR),z=!0,C=window.setTimeout(mxUtils.bind(this,function(){z=!1;f({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout);Trello.cards.get(x[0]+"/attachments/"+x[1],mxUtils.bind(this,function(d){window.clearTimeout(C);if(z){var g=/\.png$/i.test(d.name),k={Authorization:'OAuth oauth_consumer_key="'+Trello.key()+'", oauth_token="'+Trello.token()+'"'};/\.v(dx|sdx?)$/i.test(d.name)|| -/\.gliffy$/i.test(d.name)||!this.ui.useCanvasForExport&&g?this.ui.convertFile(PROXY_URL+"?url="+encodeURIComponent(d.url),d.name,d.mimeType,this.extension,e,f,null,k):(z=!0,C=window.setTimeout(mxUtils.bind(this,function(){z=!1;f({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(d.url),mxUtils.bind(this,function(n){window.clearTimeout(C);if(z){d.compoundId=b;if(0<(g?n.lastIndexOf(","):-1)){var t=this.ui.extractGraphModelFromPng(n);null!=t&&0<t.length&& -(n=t)}l?e(new TrelloLibrary(this.ui,n,d)):e(new TrelloFile(this.ui,n,d))}}),mxUtils.bind(this,function(n,t){window.clearTimeout(C);z&&(401==t.status?this.authenticate(m,f,!0):f())}),g||null!=d.mimeType&&"image/"==d.mimeType.substring(0,6),null,null,null,k))}}),mxUtils.bind(this,function(d){window.clearTimeout(C);z&&(null!=d&&401==d.status?this.authenticate(m,f,!0):f())}))});this.authenticate(m,f)};TrelloClient.prototype.insertLibrary=function(b,e,f,c,l){this.insertFile(b,e,f,c,!0,l)}; -TrelloClient.prototype.insertFile=function(b,e,f,c,l,m){l=null!=l?l:!1;var x=mxUtils.bind(this,function(){var z=mxUtils.bind(this,function(C){this.writeFile(b,C,m,mxUtils.bind(this,function(d){l?f(new TrelloLibrary(this.ui,e,d)):f(new TrelloFile(this.ui,e,d))}),c)});this.ui.useCanvasForExport&&/(\.png)$/i.test(b)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(C){z(this.ui.base64ToBlob(C,"image/png"))}),c,e):z(e)});this.authenticate(x,c)}; -TrelloClient.prototype.saveFile=function(b,e,f){var c=b.meta.compoundId.split(this.SEPARATOR),l=mxUtils.bind(this,function(x){this.writeFile(b.meta.name,x,c[0],function(z){Trello.del("cards/"+c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(){e(z)}),mxUtils.bind(this,function(C){null!=C&&401==C.status?this.authenticate(m,f,!0):f()}))},f)}),m=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(b.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(x){l(this.ui.base64ToBlob(x, +TrelloClient.prototype.getFile=function(b,e,f,c,l){l=null!=l?l:!1;var m=mxUtils.bind(this,function(){var x=b.split(this.SEPARATOR),y=!0,D=window.setTimeout(mxUtils.bind(this,function(){y=!1;f({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout);Trello.cards.get(x[0]+"/attachments/"+x[1],mxUtils.bind(this,function(d){window.clearTimeout(D);if(y){var g=/\.png$/i.test(d.name),k={Authorization:'OAuth oauth_consumer_key="'+Trello.key()+'", oauth_token="'+Trello.token()+'"'};/\.v(dx|sdx?)$/i.test(d.name)|| +/\.gliffy$/i.test(d.name)||!this.ui.useCanvasForExport&&g?this.ui.convertFile(PROXY_URL+"?url="+encodeURIComponent(d.url),d.name,d.mimeType,this.extension,e,f,null,k):(y=!0,D=window.setTimeout(mxUtils.bind(this,function(){y=!1;f({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(d.url),mxUtils.bind(this,function(n){window.clearTimeout(D);if(y){d.compoundId=b;if(0<(g?n.lastIndexOf(","):-1)){var q=this.ui.extractGraphModelFromPng(n);null!=q&&0<q.length&& +(n=q)}l?e(new TrelloLibrary(this.ui,n,d)):e(new TrelloFile(this.ui,n,d))}}),mxUtils.bind(this,function(n,q){window.clearTimeout(D);y&&(401==q.status?this.authenticate(m,f,!0):f())}),g||null!=d.mimeType&&"image/"==d.mimeType.substring(0,6),null,null,null,k))}}),mxUtils.bind(this,function(d){window.clearTimeout(D);y&&(null!=d&&401==d.status?this.authenticate(m,f,!0):f())}))});this.authenticate(m,f)};TrelloClient.prototype.insertLibrary=function(b,e,f,c,l){this.insertFile(b,e,f,c,!0,l)}; +TrelloClient.prototype.insertFile=function(b,e,f,c,l,m){l=null!=l?l:!1;var x=mxUtils.bind(this,function(){var y=mxUtils.bind(this,function(D){this.writeFile(b,D,m,mxUtils.bind(this,function(d){l?f(new TrelloLibrary(this.ui,e,d)):f(new TrelloFile(this.ui,e,d))}),c)});this.ui.useCanvasForExport&&/(\.png)$/i.test(b)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(D){y(this.ui.base64ToBlob(D,"image/png"))}),c,e):y(e)});this.authenticate(x,c)}; +TrelloClient.prototype.saveFile=function(b,e,f){var c=b.meta.compoundId.split(this.SEPARATOR),l=mxUtils.bind(this,function(x){this.writeFile(b.meta.name,x,c[0],function(y){Trello.del("cards/"+c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(){e(y)}),mxUtils.bind(this,function(D){null!=D&&401==D.status?this.authenticate(m,f,!0):f()}))},f)}),m=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(b.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(x){l(this.ui.base64ToBlob(x, "image/png"))}),f,this.ui.getCurrentFile()!=b?b.getData():null):l(b.getData())});this.authenticate(m,f)}; -TrelloClient.prototype.writeFile=function(b,e,f,c,l){if(null!=b&&null!=e)if(e.length>=this.maxFileSize)l({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 10 MB)"});else{var m=mxUtils.bind(this,function(){var x=!0,z=window.setTimeout(mxUtils.bind(this,function(){x=!1;l({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout),C=new FormData;C.append("key",Trello.key());C.append("token",Trello.token());C.append("file","string"===typeof e?new Blob([e]):e,b);C.append("name", -b);var d=new XMLHttpRequest;d.responseType="json";d.onreadystatechange=mxUtils.bind(this,function(){if(4===d.readyState&&(window.clearTimeout(z),x))if(200==d.status){var g=d.response;g.compoundId=f+this.SEPARATOR+g.id;c(g)}else 401==d.status?this.authenticate(m,l,!0):l()});d.open("POST",this.baseUrl+"cards/"+f+"/attachments");d.send(C)});this.authenticate(m,l)}else l({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(b){this.pickFile(b)}; +TrelloClient.prototype.writeFile=function(b,e,f,c,l){if(null!=b&&null!=e)if(e.length>=this.maxFileSize)l({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 10 MB)"});else{var m=mxUtils.bind(this,function(){var x=!0,y=window.setTimeout(mxUtils.bind(this,function(){x=!1;l({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout),D=new FormData;D.append("key",Trello.key());D.append("token",Trello.token());D.append("file","string"===typeof e?new Blob([e]):e,b);D.append("name", +b);var d=new XMLHttpRequest;d.responseType="json";d.onreadystatechange=mxUtils.bind(this,function(){if(4===d.readyState&&(window.clearTimeout(y),x))if(200==d.status){var g=d.response;g.compoundId=f+this.SEPARATOR+g.id;c(g)}else 401==d.status?this.authenticate(m,l,!0):l()});d.open("POST",this.baseUrl+"cards/"+f+"/attachments");d.send(D)});this.authenticate(m,l)}else l({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(b){this.pickFile(b)}; TrelloClient.prototype.pickFolder=function(b){this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!1,b)}),mxUtils.bind(this,function(e){this.ui.showError(mxResources.get("error"),e)}))};TrelloClient.prototype.pickFile=function(b,e){b=null!=b?b:mxUtils.bind(this,function(f){this.ui.loadFile("T"+encodeURIComponent(f))});this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!0,b)}),mxUtils.bind(this,function(f){this.ui.showError(mxResources.get("error"),f,mxResources.get("ok"))}))}; -TrelloClient.prototype.showTrelloDialog=function(b,e){var f=null,c="@me",l=0,m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.overflow="hidden";m.style.height="224px";var x=document.createElement("h3");mxUtils.write(x,b?mxResources.get("selectFile"):mxResources.get("selectCard"));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";m.appendChild(x);var z=document.createElement("div");z.style.whiteSpace="nowrap";z.style.overflow="auto";z.style.height= -"194px";m.appendChild(z);m=new CustomDialog(this.ui,m);this.ui.showDialog(m.container,340,290,!0,!0);m.okButton.parentNode.removeChild(m.okButton);var C=mxUtils.bind(this,function(p,A,E){l++;var y=document.createElement("div");y.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;padding:2px 0 2px 0;background:"+(0==l%2?Editor.isDarkMode()?"#000":"#eee":Editor.isDarkMode()?"":"#fff");var B=document.createElement("a");B.style.cursor="pointer";if(null!=E){var J=document.createElement("img"); -J.src=E.url;J.width=E.width;J.height=E.height;J.style="border: 1px solid black;margin:5px;vertical-align:middle";B.appendChild(J)}mxUtils.write(B,p);mxEvent.addListener(B,"click",A);y.appendChild(B);return y}),d=mxUtils.bind(this,function(p){this.ui.handleError(p,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),g=mxUtils.bind(this,function(){l=0;z.innerText="";this.ui.spinner.spin(z,mxResources.get("loading"));var p=mxUtils.bind(this,function(){Trello.cards.get(f+ -"/attachments",{fields:"id,name,previews"},mxUtils.bind(this,function(A){this.ui.spinner.stop();z.appendChild(C("../ [Up]",mxUtils.bind(this,function(){t()})));mxUtils.br(z);null==A||0==A.length?mxUtils.write(z,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var E=0;E<A.length;E++)mxUtils.bind(this,function(y){z.appendChild(C(y.name,mxUtils.bind(this,function(){this.ui.hideDialog();e(f+this.SEPARATOR+y.id)}),null!=y.previews?y.previews[0]:null))})(A[E])})()}),mxUtils.bind(this,function(A){401== -A.status?this.authenticate(p,d,!0):null!=d&&d(A)}))});p()}),k=null,n=null,t=mxUtils.bind(this,function(p){null==p&&(l=0,z.innerText="",p=1);this.ui.spinner.spin(z,mxResources.get("loading"));null!=k&&null!=k.parentNode&&k.parentNode.removeChild(k);k=document.createElement("a");k.style.display="block";k.style.cursor="pointer";mxUtils.write(k,mxResources.get("more")+"...");var A=mxUtils.bind(this,function(){mxEvent.removeListener(z,"scroll",n);t(p+1)});mxEvent.addListener(k,"click",A);var E=mxUtils.bind(this, -function(){Trello.get("search",{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:p-1},mxUtils.bind(this,function(y){this.ui.spinner.stop();y=null!=y?y.cards:null;if(null==y||0==y.length)mxUtils.write(z,mxResources.get("noFiles"));else{1==p&&(z.appendChild(C(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var J=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(N){null!=N&&(c=N,t())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards"); -this.ui.showDialog(J.container,300,80,!0,!1);J.init()}))),mxUtils.br(z));for(var B=0;B<y.length;B++)mxUtils.bind(this,function(J){z.appendChild(C(J.name,mxUtils.bind(this,function(){b?(f=J.id,g()):(this.ui.hideDialog(),e(J.id))})))})(y[B]);100==y.length&&(z.appendChild(k),n=function(){z.scrollTop>=z.scrollHeight-z.offsetHeight&&A()},mxEvent.addListener(z,"scroll",n))}}),mxUtils.bind(this,function(y){401==y.status?this.authenticate(E,d,!0):null!=d&&d({message:y.responseText})}))});E()});t()}; +TrelloClient.prototype.showTrelloDialog=function(b,e){var f=null,c="@me",l=0,m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.overflow="hidden";m.style.height="224px";var x=document.createElement("h3");mxUtils.write(x,b?mxResources.get("selectFile"):mxResources.get("selectCard"));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";m.appendChild(x);var y=document.createElement("div");y.style.whiteSpace="nowrap";y.style.overflow="auto";y.style.height= +"194px";m.appendChild(y);m=new CustomDialog(this.ui,m);this.ui.showDialog(m.container,340,290,!0,!0);m.okButton.parentNode.removeChild(m.okButton);var D=mxUtils.bind(this,function(p,A,E){l++;var z=document.createElement("div");z.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;padding:2px 0 2px 0;background:"+(0==l%2?Editor.isDarkMode()?"#000":"#eee":Editor.isDarkMode()?"":"#fff");var B=document.createElement("a");B.style.cursor="pointer";if(null!=E){var J=document.createElement("img"); +J.src=E.url;J.width=E.width;J.height=E.height;J.style="border: 1px solid black;margin:5px;vertical-align:middle";B.appendChild(J)}mxUtils.write(B,p);mxEvent.addListener(B,"click",A);z.appendChild(B);return z}),d=mxUtils.bind(this,function(p){this.ui.handleError(p,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),g=mxUtils.bind(this,function(){l=0;y.innerText="";this.ui.spinner.spin(y,mxResources.get("loading"));var p=mxUtils.bind(this,function(){Trello.cards.get(f+ +"/attachments",{fields:"id,name,previews"},mxUtils.bind(this,function(A){this.ui.spinner.stop();y.appendChild(D("../ [Up]",mxUtils.bind(this,function(){q()})));mxUtils.br(y);null==A||0==A.length?mxUtils.write(y,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var E=0;E<A.length;E++)mxUtils.bind(this,function(z){y.appendChild(D(z.name,mxUtils.bind(this,function(){this.ui.hideDialog();e(f+this.SEPARATOR+z.id)}),null!=z.previews?z.previews[0]:null))})(A[E])})()}),mxUtils.bind(this,function(A){401== +A.status?this.authenticate(p,d,!0):null!=d&&d(A)}))});p()}),k=null,n=null,q=mxUtils.bind(this,function(p){null==p&&(l=0,y.innerText="",p=1);this.ui.spinner.spin(y,mxResources.get("loading"));null!=k&&null!=k.parentNode&&k.parentNode.removeChild(k);k=document.createElement("a");k.style.display="block";k.style.cursor="pointer";mxUtils.write(k,mxResources.get("more")+"...");var A=mxUtils.bind(this,function(){mxEvent.removeListener(y,"scroll",n);q(p+1)});mxEvent.addListener(k,"click",A);var E=mxUtils.bind(this, +function(){Trello.get("search",{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:p-1},mxUtils.bind(this,function(z){this.ui.spinner.stop();z=null!=z?z.cards:null;if(null==z||0==z.length)mxUtils.write(y,mxResources.get("noFiles"));else{1==p&&(y.appendChild(D(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var J=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(M){null!=M&&(c=M,q())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards"); +this.ui.showDialog(J.container,300,80,!0,!1);J.init()}))),mxUtils.br(y));for(var B=0;B<z.length;B++)mxUtils.bind(this,function(J){y.appendChild(D(J.name,mxUtils.bind(this,function(){b?(f=J.id,g()):(this.ui.hideDialog(),e(J.id))})))})(z[B]);100==z.length&&(y.appendChild(k),n=function(){y.scrollTop>=y.scrollHeight-y.offsetHeight&&A()},mxEvent.addListener(y,"scroll",n))}}),mxUtils.bind(this,function(z){401==z.status?this.authenticate(E,d,!0):null!=d&&d({message:z.responseText})}))});E()});q()}; TrelloClient.prototype.isAuthorized=function(){try{return null!=localStorage.trello_token}catch(b){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("trello_token");Trello.deauthorize()};GitLabFile=function(b,e,f){GitHubFile.call(this,b,e,f);this.peer=this.ui.gitLab};mxUtils.extend(GitLabFile,GitHubFile);GitLabFile.prototype.share=function(){this.ui.editor.graph.openLink(DRAWIO_GITLAB_URL+"/"+encodeURIComponent(this.meta.org)+"/"+encodeURIComponent(this.meta.repo)+"/-/project_members")}; GitLabFile.prototype.getId=function(){return this.meta.org+"/"+(null!=this.meta.repo?encodeURIComponent(this.meta.repo)+"/"+(null!=this.meta.ref?this.meta.ref+(null!=this.meta.path?"/"+this.meta.path:""):""):"")};GitLabFile.prototype.getHash=function(){return encodeURIComponent("A"+this.getId())};GitLabFile.prototype.isConflict=function(b){return null!=b&&400==b.status};GitLabFile.prototype.getMode=function(){return App.MODE_GITLAB};GitLabFile.prototype.getDescriptorEtag=function(b){return b.last_commit_id}; GitLabFile.prototype.setDescriptorEtag=function(b,e){b.last_commit_id=e};GitLabLibrary=function(b,e,f){GitLabFile.call(this,b,e,f)};mxUtils.extend(GitLabLibrary,GitLabFile);GitLabLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};GitLabLibrary.prototype.open=function(){};(function(){var b=null;window.GitLabClient=function(e){GitHubClient.call(this,e,"gitlabauth")};mxUtils.extend(GitLabClient,GitHubClient);GitLabClient.prototype.clientId=DRAWIO_GITLAB_ID;GitLabClient.prototype.scope="api%20read_repository%20write_repository";GitLabClient.prototype.baseUrl=DRAWIO_GITLAB_URL+"/api/v4";GitLabClient.prototype.maxFileSize=1E7;GitLabClient.prototype.authToken="Bearer";GitLabClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/gitlab";GitLabClient.prototype.authenticate= function(e,f){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),e,f):null!=f&&f(c)}),f)};GitLabClient.prototype.authenticateStep2=function(e,f,c){if(null==window.onGitLabCallback){var l=mxUtils.bind(this,function(){var m=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+ -e),null,"GET")).send(mxUtils.bind(this,function(x){200<=x.getStatus()&&299>=x.getStatus()?(b=JSON.parse(x.getText()).access_token,this.setToken(b),this.setUser(null),f()):(this.clearPersistentToken(),this.setUser(null),b=null,this.setToken(null),401==x.getStatus()?l():c({message:mxResources.get("accessDenied"),retry:l}))}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(x,z){null!=window.open(DRAWIO_GITLAB_URL+"/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope+"&redirect_uri="+ -encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),"gitlabauth")?window.onGitLabCallback=mxUtils.bind(this,function(C,d){m?(window.onGitLabCallback=null,m=!1,null==C?c({message:mxResources.get("accessDenied"),retry:l}):(null!=z&&z(),b=C.access_token,this.setToken(b),this.setUser(null),x&&this.setPersistentToken("remembered"),f(),null!=d&&d.close())):null!=d&&d.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"), -retry:l})}),mxUtils.bind(this,function(){m&&(window.onGitLabCallback=null,m=!1,c({message:mxResources.get("accessDenied"),retry:l}))}))});l()}else c({code:App.ERROR_BUSY})};GitLabClient.prototype.executeRequest=function(e,f,c,l){var m=mxUtils.bind(this,function(z){var C=!0,d=window.setTimeout(mxUtils.bind(this,function(){C=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),g=this.authToken+" "+b;e.setRequestHeaders=function(k,n){k.setRequestHeader("Authorization", -g);k.setRequestHeader("PRIVATE_TOKEN",g);k.setRequestHeader("Content-Type","application/json")};e.send(mxUtils.bind(this,function(){window.clearTimeout(d);if(C)if(200<=e.getStatus()&&299>=e.getStatus()||l&&404==e.getStatus())f(e);else if(401===e.getStatus())z?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){x(!0)},c)})}):this.authenticate(function(){m(!0)},c);else if(403===e.getStatus()){var k=!1;try{var n=JSON.parse(e.getText());null!=n&& -null!=n.errors&&0<n.errors.length&&(k="too_large"==n.errors[0].code)}catch(t){}c({message:mxResources.get(k?"drawingTooLarge":"forbidden")})}else 404===e.getStatus()?c({message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):400===e.getStatus()?c({status:400}):c({status:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(k){window.clearTimeout(d);C&&c(k)}))}),x=mxUtils.bind(this,function(z){null==this.user?this.updateUser(function(){x(!0)}, -c,z):m(z)});null==b?this.authenticate(function(){x(!0)},c):x(!1)};GitLabClient.prototype.getRefIndex=function(e,f,c,l,m,x){if(null!=m)c(e,m);else{var z=e.length-2,C=mxUtils.bind(this,function(){if(2>z)l({message:mxResources.get("fileNotFound")});else{var d=Math.max(z-1,0),g=e.slice(0,d).join("/");d=e[d];var k=e[z],n=e.slice(z+1,e.length).join("/");g=this.baseUrl+"/projects/"+encodeURIComponent(g+"/"+d)+"/repository/"+(f?x?"branches?per_page=1&page=1&ref="+k:"tree?path="+n+"&ref="+k:"files/"+encodeURIComponent(n)+ -"?ref="+k);var t=new mxXmlRequest(g,null,"HEAD");this.executeRequest(t,mxUtils.bind(this,function(){200==t.getStatus()?c(e,z):l({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==t.getStatus()?(z--,C()):l({message:mxResources.get("fileNotFound")})}))}});C()}};GitLabClient.prototype.getFile=function(e,f,c,l,m,x){l=null!=l?l:!1;this.getRefIndex(e.split("/"),!1,mxUtils.bind(this,function(z,C){var d=Math.max(C-1,0),g=z.slice(0,d).join("/"),k=z[d],n=z[C];e=z.slice(C+1,z.length).join("/"); -z=/\.png$/i.test(e);if(!m&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&z))if(null!=b){d="&t="+(new Date).getTime();var t=this.baseUrl+"/projects/"+encodeURIComponent(g+"/"+k)+"/repository/files/"+encodeURIComponent(e)+"?ref="+n;z=e.split("/");this.ui.convertFile(t+d,0<z.length?z[z.length-1]:e,null,this.extension,f,c,mxUtils.bind(this,function(p,A,E){p=new mxXmlRequest(p,null,"GET");this.executeRequest(p,mxUtils.bind(this,function(y){try{A(this.getFileContent(JSON.parse(y.getText())))}catch(B){E(B)}}), -E)}))}else c({message:mxResources.get("accessDenied")});else d="&t="+(new Date).getTime(),t=this.baseUrl+"/projects/"+encodeURIComponent(g+"/"+k)+"/repository/files/"+encodeURIComponent(e)+"?ref="+n,z=new mxXmlRequest(t+d,null,"GET"),this.executeRequest(z,mxUtils.bind(this,function(p){try{f(this.createGitLabFile(g,k,n,JSON.parse(p.getText()),l,C))}catch(A){c(A)}}),c)}),c,x)};GitLabClient.prototype.getFileContent=function(e){var f=e.file_name,c=e.content;"base64"===e.encoding&&(/\.jpe?g$/i.test(f)? -c="data:image/jpeg;base64,"+c:/\.gif$/i.test(f)?c="data:image/gif;base64,"+c:/\.pdf$/i.test(f)?c="data:application/pdf;base64,"+c:/\.png$/i.test(f)?(e=this.ui.extractGraphModelFromPng(c),c=null!=e&&0<e.length?e:"data:image/png;base64,"+c):c=Base64.decode(c));return c};GitLabClient.prototype.createGitLabFile=function(e,f,c,l,m,x){var z=DRAWIO_GITLAB_URL+"/";e={org:e,repo:f,ref:c,name:l.file_name,path:l.file_path,html_url:z+e+"/"+f+"/blob/"+c+"/"+l.file_path,download_url:z+e+"/"+f+"/raw/"+c+"/"+l.file_path+ -"?inline=false",last_commit_id:l.last_commit_id,refPos:x};l=this.getFileContent(l);return m?new GitLabLibrary(this.ui,l,e):new GitLabFile(this.ui,l,e)};GitLabClient.prototype.insertFile=function(e,f,c,l,m,x,z){m=null!=m?m:!1;x=x.split("/");this.getRefIndex(x,!0,mxUtils.bind(this,function(C,d){var g=Math.max(d-1,0),k=C.slice(0,g).join("/"),n=C[g],t=C[d];path=C.slice(d+1,C.length).join("/");0<path.length&&(path+="/");path+=e;this.checkExists(k+"/"+n+"/"+t+"/"+path,!0,mxUtils.bind(this,function(p,A){p? -m?(z||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(E){this.writeFile(k,n,t,path,E,f,A,mxUtils.bind(this,function(y){try{var B=JSON.parse(y.getText());c(this.createGitLabFile(k,n,t,null!=B.content?B.content:B,m,d))}catch(J){l(J)}}),l)}),l)):(p=DRAWIO_GITLAB_URL+"/",c(new GitLabFile(this.ui,f,{org:k,repo:n,ref:t,name:e,path:path,html_url:p+k+"/"+n+"/blob/"+t+"/"+path,download_url:p+k+"/"+n+"/raw/"+t+"/"+path+"?inline=false",refPos:d,last_commit_id:A,isNew:!0}))):l()}))}), +e),null,"GET")).send(mxUtils.bind(this,function(x){200<=x.getStatus()&&299>=x.getStatus()?(b=JSON.parse(x.getText()).access_token,this.setToken(b),this.setUser(null),f()):(this.clearPersistentToken(),this.setUser(null),b=null,this.setToken(null),401==x.getStatus()?l():c({message:mxResources.get("accessDenied"),retry:l}))}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(x,y){null!=window.open(DRAWIO_GITLAB_URL+"/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope+"&redirect_uri="+ +encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),"gitlabauth")?window.onGitLabCallback=mxUtils.bind(this,function(D,d){m?(window.onGitLabCallback=null,m=!1,null==D?c({message:mxResources.get("accessDenied"),retry:l}):(null!=y&&y(),b=D.access_token,this.setToken(b),this.setUser(null),x&&this.setPersistentToken("remembered"),f(),null!=d&&d.close())):null!=d&&d.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"), +retry:l})}),mxUtils.bind(this,function(){m&&(window.onGitLabCallback=null,m=!1,c({message:mxResources.get("accessDenied"),retry:l}))}))});l()}else c({code:App.ERROR_BUSY})};GitLabClient.prototype.executeRequest=function(e,f,c,l){var m=mxUtils.bind(this,function(y){var D=!0,d=window.setTimeout(mxUtils.bind(this,function(){D=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),g=this.authToken+" "+b;e.setRequestHeaders=function(k,n){k.setRequestHeader("Authorization", +g);k.setRequestHeader("PRIVATE_TOKEN",g);k.setRequestHeader("Content-Type","application/json")};e.send(mxUtils.bind(this,function(){window.clearTimeout(d);if(D)if(200<=e.getStatus()&&299>=e.getStatus()||l&&404==e.getStatus())f(e);else if(401===e.getStatus())y?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){x(!0)},c)})}):this.authenticate(function(){m(!0)},c);else if(403===e.getStatus()){var k=!1;try{var n=JSON.parse(e.getText());null!=n&& +null!=n.errors&&0<n.errors.length&&(k="too_large"==n.errors[0].code)}catch(q){}c({message:mxResources.get(k?"drawingTooLarge":"forbidden")})}else 404===e.getStatus()?c({message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):400===e.getStatus()?c({status:400}):c({status:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(k){window.clearTimeout(d);D&&c(k)}))}),x=mxUtils.bind(this,function(y){null==this.user?this.updateUser(function(){x(!0)}, +c,y):m(y)});null==b?this.authenticate(function(){x(!0)},c):x(!1)};GitLabClient.prototype.getRefIndex=function(e,f,c,l,m,x){if(null!=m)c(e,m);else{var y=e.length-2,D=mxUtils.bind(this,function(){if(2>y)l({message:mxResources.get("fileNotFound")});else{var d=Math.max(y-1,0),g=e.slice(0,d).join("/");d=e[d];var k=e[y],n=e.slice(y+1,e.length).join("/");g=this.baseUrl+"/projects/"+encodeURIComponent(g+"/"+d)+"/repository/"+(f?x?"branches?per_page=1&page=1&ref="+k:"tree?path="+n+"&ref="+k:"files/"+encodeURIComponent(n)+ +"?ref="+k);var q=new mxXmlRequest(g,null,"HEAD");this.executeRequest(q,mxUtils.bind(this,function(){200==q.getStatus()?c(e,y):l({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==q.getStatus()?(y--,D()):l({message:mxResources.get("fileNotFound")})}))}});D()}};GitLabClient.prototype.getFile=function(e,f,c,l,m,x){l=null!=l?l:!1;this.getRefIndex(e.split("/"),!1,mxUtils.bind(this,function(y,D){var d=Math.max(D-1,0),g=y.slice(0,d).join("/"),k=y[d],n=y[D];e=y.slice(D+1,y.length).join("/"); +y=/\.png$/i.test(e);if(!m&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&y))if(null!=b){d="&t="+(new Date).getTime();var q=this.baseUrl+"/projects/"+encodeURIComponent(g+"/"+k)+"/repository/files/"+encodeURIComponent(e)+"?ref="+n;y=e.split("/");this.ui.convertFile(q+d,0<y.length?y[y.length-1]:e,null,this.extension,f,c,mxUtils.bind(this,function(p,A,E){p=new mxXmlRequest(p,null,"GET");this.executeRequest(p,mxUtils.bind(this,function(z){try{A(this.getFileContent(JSON.parse(z.getText())))}catch(B){E(B)}}), +E)}))}else c({message:mxResources.get("accessDenied")});else d="&t="+(new Date).getTime(),q=this.baseUrl+"/projects/"+encodeURIComponent(g+"/"+k)+"/repository/files/"+encodeURIComponent(e)+"?ref="+n,y=new mxXmlRequest(q+d,null,"GET"),this.executeRequest(y,mxUtils.bind(this,function(p){try{f(this.createGitLabFile(g,k,n,JSON.parse(p.getText()),l,D))}catch(A){c(A)}}),c)}),c,x)};GitLabClient.prototype.getFileContent=function(e){var f=e.file_name,c=e.content;"base64"===e.encoding&&(/\.jpe?g$/i.test(f)? +c="data:image/jpeg;base64,"+c:/\.gif$/i.test(f)?c="data:image/gif;base64,"+c:/\.pdf$/i.test(f)?c="data:application/pdf;base64,"+c:/\.png$/i.test(f)?(e=this.ui.extractGraphModelFromPng(c),c=null!=e&&0<e.length?e:"data:image/png;base64,"+c):c=Base64.decode(c));return c};GitLabClient.prototype.createGitLabFile=function(e,f,c,l,m,x){var y=DRAWIO_GITLAB_URL+"/";e={org:e,repo:f,ref:c,name:l.file_name,path:l.file_path,html_url:y+e+"/"+f+"/blob/"+c+"/"+l.file_path,download_url:y+e+"/"+f+"/raw/"+c+"/"+l.file_path+ +"?inline=false",last_commit_id:l.last_commit_id,refPos:x};l=this.getFileContent(l);return m?new GitLabLibrary(this.ui,l,e):new GitLabFile(this.ui,l,e)};GitLabClient.prototype.insertFile=function(e,f,c,l,m,x,y){m=null!=m?m:!1;x=x.split("/");this.getRefIndex(x,!0,mxUtils.bind(this,function(D,d){var g=Math.max(d-1,0),k=D.slice(0,g).join("/"),n=D[g],q=D[d];path=D.slice(d+1,D.length).join("/");0<path.length&&(path+="/");path+=e;this.checkExists(k+"/"+n+"/"+q+"/"+path,!0,mxUtils.bind(this,function(p,A){p? +m?(y||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(E){this.writeFile(k,n,q,path,E,f,A,mxUtils.bind(this,function(z){try{var B=JSON.parse(z.getText());c(this.createGitLabFile(k,n,q,null!=B.content?B.content:B,m,d))}catch(J){l(J)}}),l)}),l)):(p=DRAWIO_GITLAB_URL+"/",c(new GitLabFile(this.ui,f,{org:k,repo:n,ref:q,name:e,path:path,html_url:p+k+"/"+n+"/blob/"+q+"/"+path,download_url:p+k+"/"+n+"/raw/"+q+"/"+path+"?inline=false",refPos:d,last_commit_id:A,isNew:!0}))):l()}))}), l,null,4>=x.length)};GitLabClient.prototype.checkExists=function(e,f,c){this.getFile(e,mxUtils.bind(this,function(l){if(f){var m=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[e]),function(){m();c(!0,l.getCurrentEtag())},function(){m();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(l){c(!0)}),null,!0)};GitLabClient.prototype.writeFile=function(e, -f,c,l,m,x,z,C,d){if(x.length>=this.maxFileSize)d({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(x.length)+" / 10 MB)"});else{var g="POST";c={path:encodeURIComponent(l),branch:decodeURIComponent(c),commit_message:m,content:x,encoding:"base64"};null!=z&&(c.last_commit_id=z,g="PUT");e=this.baseUrl+"/projects/"+encodeURIComponent(e+"/"+f)+"/repository/files/"+encodeURIComponent(l);g=new mxXmlRequest(e,JSON.stringify(c),g);this.executeRequest(g,mxUtils.bind(this,function(k){C(k)}), -d)}};GitLabClient.prototype.saveFile=function(e,f,c,l,m){var x=e.meta.org,z=e.meta.repo,C=e.meta.ref,d=e.meta.path,g=mxUtils.bind(this,function(n,t){this.writeFile(x,z,C,d,m,t,n,mxUtils.bind(this,function(p){delete e.meta.isNew;this.getFile(x+"/"+z+"/"+C+"/"+d,mxUtils.bind(this,function(A){A.getData()==e.getData()?f(A.getCurrentEtag()):f({content:e.getCurrentEtag()})}),c,null,null,e.meta.refPos)}),c)}),k=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(d)){var n=this.ui.getPngFileProperties(this.ui.fileNode); -this.ui.getEmbeddedPng(mxUtils.bind(this,function(t){g(e.meta.last_commit_id,t)}),c,this.ui.getCurrentFile()!=e?e.getData():null,n.scale,n.border)}else g(e.meta.last_commit_id,Base64.encode(e.getData()))});l?this.getFile(x+"/"+z+"/"+C+"/"+d,mxUtils.bind(this,function(n){e.meta.last_commit_id=n.meta.last_commit_id;k()}),c):k()};GitLabClient.prototype.pickFolder=function(e){this.showGitLabDialog(!1,e)};GitLabClient.prototype.pickFile=function(e){e=null!=e?e:mxUtils.bind(this,function(f){this.ui.loadFile("A"+ -encodeURIComponent(f))});this.showGitLabDialog(!0,e)};GitLabClient.prototype.showGitLabDialog=function(e,f){var c=null,l=null,m=null,x=null,z=document.createElement("div");z.style.whiteSpace="nowrap";z.style.overflow="hidden";z.style.height="304px";var C=document.createElement("h3");mxUtils.write(C,mxResources.get(e?"selectFile":"selectFolder"));C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";z.appendChild(C);var d=document.createElement("div");d.style.whiteSpace= -"nowrap";d.style.border="1px solid lightgray";d.style.boxSizing="border-box";d.style.padding="4px";d.style.overflow="auto";d.style.lineHeight="1.2em";d.style.height="274px";z.appendChild(d);var g=document.createElement("div");g.style.textOverflow="ellipsis";g.style.boxSizing="border-box";g.style.overflow="hidden";g.style.padding="4px";g.style.width="100%";var k=new CustomDialog(this.ui,z,mxUtils.bind(this,function(){f(c+"/"+l+"/"+encodeURIComponent(m)+"/"+x)}));this.ui.showDialog(k.container,420, -370,!0,!0);e&&k.okButton.parentNode.removeChild(k.okButton);var n=mxUtils.bind(this,function(N,v,u,G){var H=document.createElement("a");H.setAttribute("title",N);H.style.cursor="pointer";mxUtils.write(H,N);mxEvent.addListener(H,"click",v);G&&(H.style.textDecoration="underline");null!=u&&(N=g.cloneNode(),N.style.padding=u,N.appendChild(H),H=N);return H}),t=mxUtils.bind(this,function(N){var v=document.createElement("div");v.style.marginBottom="8px";v.appendChild(n(c+"/"+l,mxUtils.bind(this,function(){x= -null;J()}),null,!0));N||(mxUtils.write(v," / "),v.appendChild(n(decodeURIComponent(m),mxUtils.bind(this,function(){x=null;B()}),null,!0)));if(null!=x&&0<x.length){var u=x.split("/");for(N=0;N<u.length;N++)(function(G){mxUtils.write(v," / ");v.appendChild(n(u[G],mxUtils.bind(this,function(){x=u.slice(0,G+1).join("/");y()}),null,!0))})(N)}d.appendChild(v)}),p=mxUtils.bind(this,function(N){this.ui.handleError(N,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(x=m=l=c=null, -J()):this.ui.hideDialog()}))}),A=null,E=null,y=mxUtils.bind(this,function(N){null==N&&(d.innerText="",N=1);var v=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+l)+"/repository/tree?path="+x+"&ref="+m+"&per_page=100&page="+N,null,"GET");this.ui.spinner.spin(d,mxResources.get("loading"));k.okButton.removeAttribute("disabled");null!=E&&(mxEvent.removeListener(d,"scroll",E),E=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");A.style.display= -"block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var u=mxUtils.bind(this,function(){y(N+1)});mxEvent.addListener(A,"click",u);this.executeRequest(v,mxUtils.bind(this,function(G){this.ui.spinner.stop();1==N&&(t(!m),d.appendChild(n("../ [Up]",mxUtils.bind(this,function(){if(""==x)x=null,J();else{var I=x.split("/");x=I.slice(0,I.length-1).join("/");y()}}),"4px")));var H=JSON.parse(G.getText());if(null==H||0==H.length)mxUtils.write(d,mxResources.get("noFiles"));else{var M= -!0,K=0;G=mxUtils.bind(this,function(I){for(var F=0;F<H.length;F++)mxUtils.bind(this,function(P){if(I==("tree"==P.type)){var U=g.cloneNode();U.style.backgroundColor=M?Editor.isDarkMode()?"#000000":"#eeeeee":"";M=!M;var T=document.createElement("img");T.src=IMAGE_PATH+"/"+("tree"==P.type?"folder.png":"file.png");T.setAttribute("align","absmiddle");T.style.marginRight="4px";T.style.marginTop="-4px";T.width=20;U.appendChild(T);U.appendChild(n(P.name+("tree"==P.type?"/":""),mxUtils.bind(this,function(){"tree"== -P.type?(x=P.path,y()):e&&"blob"==P.type&&(this.ui.hideDialog(),f(c+"/"+l+"/"+m+"/"+P.path))})));d.appendChild(U);K++}})(H[F])});G(!0);e&&G(!1);100==K&&(d.appendChild(A),E=function(){d.scrollTop>=d.scrollHeight-d.offsetHeight&&u()},mxEvent.addListener(d,"scroll",E))}}),p,!0)}),B=mxUtils.bind(this,function(N,v){null==N&&(d.innerText="",N=1);var u=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+l)+"/repository/branches?per_page=100&page="+N,null,"GET");k.okButton.setAttribute("disabled", -"disabled");this.ui.spinner.spin(d,mxResources.get("loading"));null!=E&&(mxEvent.removeListener(d,"scroll",E),E=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");A.style.display="block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var G=mxUtils.bind(this,function(){B(N+1)});mxEvent.addListener(A,"click",G);this.executeRequest(u,mxUtils.bind(this,function(H){this.ui.spinner.stop();1==N&&(t(!0),d.appendChild(n("../ [Up]",mxUtils.bind(this, -function(){x=null;J()}),"4px")));H=JSON.parse(H.getText());if(null==H||0==H.length)mxUtils.write(d,mxResources.get("noFiles"));else if(1==H.length&&v)m=H[0].name,x="",y();else{for(var M=0;M<H.length;M++)mxUtils.bind(this,function(K,I){var F=g.cloneNode();F.style.backgroundColor=0==I%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";F.appendChild(n(K.name,mxUtils.bind(this,function(){m=encodeURIComponent(K.name);x="";y()})));d.appendChild(F)})(H[M],M);100==H.length&&(d.appendChild(A),E=function(){d.scrollTop>= -d.scrollHeight-d.offsetHeight&&G()},mxEvent.addListener(d,"scroll",E))}}),p)});k.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(d,mxResources.get("loading"));var J=mxUtils.bind(this,function(N){var v=this.ui.spinner,u=0;this.ui.spinner.stop();var G=function(){v.spin(d,mxResources.get("loading"));u+=1},H=function(){--u;0===u&&v.stop()};null==N&&(d.innerText="",N=1);null!=E&&(mxEvent.removeListener(d,"scroll",E),E=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a"); -A.style.display="block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var M=mxUtils.bind(this,function(){0===u&&J(N+1)});mxEvent.addListener(A,"click",M);var K=mxUtils.bind(this,function(F){G();var P=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(P,mxUtils.bind(this,function(U){F(JSON.parse(U.getText()));H()}),p)}),I=mxUtils.bind(this,function(F,P){G();var U=new mxXmlRequest(this.baseUrl+"/groups/"+F.id+"/projects?per_page=100",null, -"GET");this.executeRequest(U,mxUtils.bind(this,function(T){P(F,JSON.parse(T.getText()));H()}),p)});K(mxUtils.bind(this,function(F){if(null==this.user)mxUtils.write(d,mxResources.get("loggedOut"));else{G();var P=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+N,null,"GET");this.executeRequest(P,mxUtils.bind(this,function(U){U=JSON.parse(U.getText());if(null!=U&&0!=U.length||null!=F&&0!=F.length){1==N&&(d.appendChild(n(mxResources.get("enterValue")+"...",mxUtils.bind(this, -function(){if(0===u){var W=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(q){null!=q&&(q=q.split("/"),1<q.length?(c=q[0],l=q[1],m=x=null,2<q.length?(m=encodeURIComponent(q.slice(2,q.length).join("/")),y()):B(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(W.container,300,80,!0,!1);W.init()}}))),mxUtils.br(d),mxUtils.br(d));for(var T=!0,V=0;V<U.length;V++)mxUtils.bind(this, -function(W){var q=g.cloneNode();q.style.backgroundColor=T?Editor.isDarkMode()?"#000000":"#eeeeee":"";T=!T;q.appendChild(n(W.name_with_namespace,mxUtils.bind(this,function(){0===u&&(c=W.owner.username,l=W.path,x="",B(null,!0))})));d.appendChild(q)})(U[V]);for(V=0;V<F.length;V++)G(),I(F[V],mxUtils.bind(this,function(W,q){H();for(var D=0;D<q.length;D++){var L=g.cloneNode();L.style.backgroundColor=T?Editor.isDarkMode()?"#000000":"#eeeeee":"";T=!T;mxUtils.bind(this,function(R){L.appendChild(n(R.name_with_namespace, -mxUtils.bind(this,function(){0===u&&(c=W.full_path,l=R.path,x="",B(null,!0))})));d.appendChild(L)})(q[D])}}));H()}else H(),mxUtils.write(d,mxResources.get("noFiles"));100==U.length&&(d.appendChild(A),E=function(){d.scrollTop>=d.scrollHeight-d.offsetHeight&&M()},mxEvent.addListener(d,"scroll",E))}),p)}}))});b?this.user?J():this.updateUser(function(){J()},p,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){J()},p,!0)}),p)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+ -"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();this.setUser(null);b=null;this.setToken(null)}})();DrawioComment=function(b,e,f,c,l,m,x){this.file=b;this.id=e;this.content=f;this.modifiedDate=c;this.createdDate=l;this.isResolved=m;this.user=x;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,f,c,l){e()};DrawioComment.prototype.editComment=function(b,e,f){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DriveComment=function(b,e,f,c,l,m,x,z){DrawioComment.call(this,b,e,f,c,l,m,x);this.pCommentId=z};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(b,e,f,c,l){b={content:b.content};c?b.verb="resolve":l&&(b.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:b,method:"POST"},mxUtils.bind(this,function(m){e(m.replyId)}),f)}; +f,c,l,m,x,y,D,d){if(x.length>=this.maxFileSize)d({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(x.length)+" / 10 MB)"});else{var g="POST";c={path:encodeURIComponent(l),branch:decodeURIComponent(c),commit_message:m,content:x,encoding:"base64"};null!=y&&(c.last_commit_id=y,g="PUT");e=this.baseUrl+"/projects/"+encodeURIComponent(e+"/"+f)+"/repository/files/"+encodeURIComponent(l);g=new mxXmlRequest(e,JSON.stringify(c),g);this.executeRequest(g,mxUtils.bind(this,function(k){D(k)}), +d)}};GitLabClient.prototype.saveFile=function(e,f,c,l,m){var x=e.meta.org,y=e.meta.repo,D=e.meta.ref,d=e.meta.path,g=mxUtils.bind(this,function(n,q){this.writeFile(x,y,D,d,m,q,n,mxUtils.bind(this,function(p){delete e.meta.isNew;this.getFile(x+"/"+y+"/"+D+"/"+d,mxUtils.bind(this,function(A){A.getData()==e.getData()?f(A.getCurrentEtag()):f({content:e.getCurrentEtag()})}),c,null,null,e.meta.refPos)}),c)}),k=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(d)){var n=this.ui.getPngFileProperties(this.ui.fileNode); +this.ui.getEmbeddedPng(mxUtils.bind(this,function(q){g(e.meta.last_commit_id,q)}),c,this.ui.getCurrentFile()!=e?e.getData():null,n.scale,n.border)}else g(e.meta.last_commit_id,Base64.encode(e.getData()))});l?this.getFile(x+"/"+y+"/"+D+"/"+d,mxUtils.bind(this,function(n){e.meta.last_commit_id=n.meta.last_commit_id;k()}),c):k()};GitLabClient.prototype.pickFolder=function(e){this.showGitLabDialog(!1,e)};GitLabClient.prototype.pickFile=function(e){e=null!=e?e:mxUtils.bind(this,function(f){this.ui.loadFile("A"+ +encodeURIComponent(f))});this.showGitLabDialog(!0,e)};GitLabClient.prototype.showGitLabDialog=function(e,f){var c=null,l=null,m=null,x=null,y=document.createElement("div");y.style.whiteSpace="nowrap";y.style.overflow="hidden";y.style.height="304px";var D=document.createElement("h3");mxUtils.write(D,mxResources.get(e?"selectFile":"selectFolder"));D.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";y.appendChild(D);var d=document.createElement("div");d.style.whiteSpace= +"nowrap";d.style.border="1px solid lightgray";d.style.boxSizing="border-box";d.style.padding="4px";d.style.overflow="auto";d.style.lineHeight="1.2em";d.style.height="274px";y.appendChild(d);var g=document.createElement("div");g.style.textOverflow="ellipsis";g.style.boxSizing="border-box";g.style.overflow="hidden";g.style.padding="4px";g.style.width="100%";var k=new CustomDialog(this.ui,y,mxUtils.bind(this,function(){f(c+"/"+l+"/"+encodeURIComponent(m)+"/"+x)}));this.ui.showDialog(k.container,420, +370,!0,!0);e&&k.okButton.parentNode.removeChild(k.okButton);var n=mxUtils.bind(this,function(M,v,u,G){var I=document.createElement("a");I.setAttribute("title",M);I.style.cursor="pointer";mxUtils.write(I,M);mxEvent.addListener(I,"click",v);G&&(I.style.textDecoration="underline");null!=u&&(M=g.cloneNode(),M.style.padding=u,M.appendChild(I),I=M);return I}),q=mxUtils.bind(this,function(M){var v=document.createElement("div");v.style.marginBottom="8px";v.appendChild(n(c+"/"+l,mxUtils.bind(this,function(){x= +null;J()}),null,!0));M||(mxUtils.write(v," / "),v.appendChild(n(decodeURIComponent(m),mxUtils.bind(this,function(){x=null;B()}),null,!0)));if(null!=x&&0<x.length){var u=x.split("/");for(M=0;M<u.length;M++)(function(G){mxUtils.write(v," / ");v.appendChild(n(u[G],mxUtils.bind(this,function(){x=u.slice(0,G+1).join("/");z()}),null,!0))})(M)}d.appendChild(v)}),p=mxUtils.bind(this,function(M){this.ui.handleError(M,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(x=m=l=c=null, +J()):this.ui.hideDialog()}))}),A=null,E=null,z=mxUtils.bind(this,function(M){null==M&&(d.innerText="",M=1);var v=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+l)+"/repository/tree?path="+x+"&ref="+m+"&per_page=100&page="+M,null,"GET");this.ui.spinner.spin(d,mxResources.get("loading"));k.okButton.removeAttribute("disabled");null!=E&&(mxEvent.removeListener(d,"scroll",E),E=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");A.style.display= +"block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var u=mxUtils.bind(this,function(){z(M+1)});mxEvent.addListener(A,"click",u);this.executeRequest(v,mxUtils.bind(this,function(G){this.ui.spinner.stop();1==M&&(q(!m),d.appendChild(n("../ [Up]",mxUtils.bind(this,function(){if(""==x)x=null,J();else{var K=x.split("/");x=K.slice(0,K.length-1).join("/");z()}}),"4px")));var I=JSON.parse(G.getText());if(null==I||0==I.length)mxUtils.write(d,mxResources.get("noFiles"));else{var F= +!0,L=0;G=mxUtils.bind(this,function(K){for(var H=0;H<I.length;H++)mxUtils.bind(this,function(Q){if(K==("tree"==Q.type)){var U=g.cloneNode();U.style.backgroundColor=F?Editor.isDarkMode()?"#000000":"#eeeeee":"";F=!F;var T=document.createElement("img");T.src=IMAGE_PATH+"/"+("tree"==Q.type?"folder.png":"file.png");T.setAttribute("align","absmiddle");T.style.marginRight="4px";T.style.marginTop="-4px";T.width=20;U.appendChild(T);U.appendChild(n(Q.name+("tree"==Q.type?"/":""),mxUtils.bind(this,function(){"tree"== +Q.type?(x=Q.path,z()):e&&"blob"==Q.type&&(this.ui.hideDialog(),f(c+"/"+l+"/"+m+"/"+Q.path))})));d.appendChild(U);L++}})(I[H])});G(!0);e&&G(!1);100==L&&(d.appendChild(A),E=function(){d.scrollTop>=d.scrollHeight-d.offsetHeight&&u()},mxEvent.addListener(d,"scroll",E))}}),p,!0)}),B=mxUtils.bind(this,function(M,v){null==M&&(d.innerText="",M=1);var u=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+l)+"/repository/branches?per_page=100&page="+M,null,"GET");k.okButton.setAttribute("disabled", +"disabled");this.ui.spinner.spin(d,mxResources.get("loading"));null!=E&&(mxEvent.removeListener(d,"scroll",E),E=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");A.style.display="block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var G=mxUtils.bind(this,function(){B(M+1)});mxEvent.addListener(A,"click",G);this.executeRequest(u,mxUtils.bind(this,function(I){this.ui.spinner.stop();1==M&&(q(!0),d.appendChild(n("../ [Up]",mxUtils.bind(this, +function(){x=null;J()}),"4px")));I=JSON.parse(I.getText());if(null==I||0==I.length)mxUtils.write(d,mxResources.get("noFiles"));else if(1==I.length&&v)m=I[0].name,x="",z();else{for(var F=0;F<I.length;F++)mxUtils.bind(this,function(L,K){var H=g.cloneNode();H.style.backgroundColor=0==K%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";H.appendChild(n(L.name,mxUtils.bind(this,function(){m=encodeURIComponent(L.name);x="";z()})));d.appendChild(H)})(I[F],F);100==I.length&&(d.appendChild(A),E=function(){d.scrollTop>= +d.scrollHeight-d.offsetHeight&&G()},mxEvent.addListener(d,"scroll",E))}}),p)});k.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(d,mxResources.get("loading"));var J=mxUtils.bind(this,function(M){var v=this.ui.spinner,u=0;this.ui.spinner.stop();var G=function(){v.spin(d,mxResources.get("loading"));u+=1},I=function(){--u;0===u&&v.stop()};null==M&&(d.innerText="",M=1);null!=E&&(mxEvent.removeListener(d,"scroll",E),E=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a"); +A.style.display="block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var F=mxUtils.bind(this,function(){0===u&&J(M+1)});mxEvent.addListener(A,"click",F);var L=mxUtils.bind(this,function(H){G();var Q=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(Q,mxUtils.bind(this,function(U){H(JSON.parse(U.getText()));I()}),p)}),K=mxUtils.bind(this,function(H,Q){G();var U=new mxXmlRequest(this.baseUrl+"/groups/"+H.id+"/projects?per_page=100",null, +"GET");this.executeRequest(U,mxUtils.bind(this,function(T){Q(H,JSON.parse(T.getText()));I()}),p)});L(mxUtils.bind(this,function(H){if(null==this.user)mxUtils.write(d,mxResources.get("loggedOut"));else{G();var Q=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+M,null,"GET");this.executeRequest(Q,mxUtils.bind(this,function(U){U=JSON.parse(U.getText());if(null!=U&&0!=U.length||null!=H&&0!=H.length){1==M&&(d.appendChild(n(mxResources.get("enterValue")+"...",mxUtils.bind(this, +function(){if(0===u){var W=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(t){null!=t&&(t=t.split("/"),1<t.length?(c=t[0],l=t[1],m=x=null,2<t.length?(m=encodeURIComponent(t.slice(2,t.length).join("/")),z()):B(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(W.container,300,80,!0,!1);W.init()}}))),mxUtils.br(d),mxUtils.br(d));for(var T=!0,V=0;V<U.length;V++)mxUtils.bind(this, +function(W){var t=g.cloneNode();t.style.backgroundColor=T?Editor.isDarkMode()?"#000000":"#eeeeee":"";T=!T;t.appendChild(n(W.name_with_namespace,mxUtils.bind(this,function(){0===u&&(c=W.owner.username,l=W.path,x="",B(null,!0))})));d.appendChild(t)})(U[V]);for(V=0;V<H.length;V++)G(),K(H[V],mxUtils.bind(this,function(W,t){I();for(var C=0;C<t.length;C++){var N=g.cloneNode();N.style.backgroundColor=T?Editor.isDarkMode()?"#000000":"#eeeeee":"";T=!T;mxUtils.bind(this,function(R){N.appendChild(n(R.name_with_namespace, +mxUtils.bind(this,function(){0===u&&(c=W.full_path,l=R.path,x="",B(null,!0))})));d.appendChild(N)})(t[C])}}));I()}else I(),mxUtils.write(d,mxResources.get("noFiles"));100==U.length&&(d.appendChild(A),E=function(){d.scrollTop>=d.scrollHeight-d.offsetHeight&&F()},mxEvent.addListener(d,"scroll",E))}),p)}}))});b?this.user?J():this.updateUser(function(){J()},p,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){J()},p,!0)}),p)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+ +"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();this.setUser(null);b=null;this.setToken(null)}})();DrawioComment=function(b,e,f,c,l,m,x){this.file=b;this.id=e;this.content=f;this.modifiedDate=c;this.createdDate=l;this.isResolved=m;this.user=x;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,f,c,l){e()};DrawioComment.prototype.editComment=function(b,e,f){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DriveComment=function(b,e,f,c,l,m,x,y){DrawioComment.call(this,b,e,f,c,l,m,x);this.pCommentId=y};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(b,e,f,c,l){b={content:b.content};c?b.verb="resolve":l&&(b.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:b,method:"POST"},mxUtils.bind(this,function(m){e(m.replyId)}),f)}; DriveComment.prototype.editComment=function(b,e,f){this.content=b;b={content:b};this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,params:b,method:"PATCH"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,params:b,method:"PATCH"},e,f)}; -DriveComment.prototype.deleteComment=function(b,e){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},b,e)};function mxODPicker(b,e,f,c,l,m,x,z,C,d,g,k,n,t){function p(Q,S){S=S||document;return S.querySelector(Q)}function A(Q,S,X){if(null==Q["@microsoft.graph.downloadUrl"])if(null==Q.parentReference)X();else{c(Q.id,Q.parentReference.driveId,function(Z){A(Z,S,X)},X);return}var aa=new XMLHttpRequest;aa.open("GET",Q["@microsoft.graph.downloadUrl"]);var Y=Q.file?"image/png"==Q.file.mimeType:!1;aa.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var Z=aa.responseText; -Y&&(Z="data:image/png;base64,"+Editor.base64Encode(Z),Z=Editor.extractGraphModelFromPng(Z));var ba=mxUtils.parseXml(Z),fa="mxlibrary"==ba.documentElement.nodeName?ba.documentElement:Editor.extractGraphModel(ba.documentElement);if(null!=fa){S(fa.ownerDocument);return}}catch(ka){}X()}};Y&&aa.overrideMimeType&&aa.overrideMimeType("text/plain; charset=x-user-defined");aa.send()}function E(){k&&null!=I?K.exportToCanvas(function(Q){Q=EditorUi.prototype.createImageDataUri(Q,null,"png");x(F,Q);m(F)},400, -null,null,function(Q){console.log(Q)},600,null,null,null,null,null,I):(x(F,void 0),m(F))}function y(Q){function S(X){L.style.background="transparent";L.innerText="";var aa=document.createElement("div");aa.className="odPreviewStatus";mxUtils.write(aa,X);L.appendChild(aa);M.stop()}if(null!=L)if(L.style.background="transparent",L.innerText="",null==Q||Q.folder||/\.drawiolib$/.test(Q.name))S(mxResources.get("noPreview"));else try{null!=Q.remoteItem&&(Q=Q.remoteItem),W=Q,M.spin(L),A(Q,function(X){M.stop(); -if(W==Q)if("mxlibrary"==X.documentElement.nodeName)S(mxResources.get("noPreview"));else{var aa=X.getElementsByTagName("diagram");I=AspectDialog.prototype.createViewer(L,0==aa.length?X.documentElement:aa[0],null,"transparent")}},function(){F=null;S(mxResources.get("notADiagramFile"))})}catch(X){F=null,S(mxResources.get("notADiagramFile"))}}function B(){var Q=p(".odFilesBreadcrumb");if(null!=Q){Q.innerText="";for(var S=0;S<T.length-1;S++){var X=document.createElement("span");X.className="odBCFolder"; -X.innerHTML=mxUtils.htmlEntities(T[S].name||mxResources.get("home"));Q.appendChild(X);(function(Y,Z){X.addEventListener("click",function(){e(null);T=T.slice(0,Z);N(Y.driveId,Y.folderId,Y.siteId,Y.name)})})(T[S],S);var aa=document.createElement("span");aa.innerHTML=" > ";Q.appendChild(aa)}null!=T[T.length-1]&&(S=document.createElement("span"),S.innerHTML=mxUtils.htmlEntities(1==T.length?mxResources.get("officeSelDiag"):T[T.length-1].name||mxResources.get("home")),Q.appendChild(S))}}function J(){if(null!= -F&&!U)if("sharepoint"==P)N("site",null,F.id,F.displayName);else if("site"==P)N("subsite",null,F.id,F.name);else{var Q=F.folder;F=F.remoteItem?F.remoteItem:F;var S=(F.parentReference?F.parentReference.driveId:null)||P,X=F.id;Q?N(S,X,null,F.name):E()}}function N(Q,S,X,aa,Y){function Z(za){M.stop();var Da=document.createElement("table");Da.className="odFileListGrid";for(var Ca=null,pa=0,qa=0;null!=za&&qa<za.length;qa++){var wa=za[qa];if(1!=ka||!wa.webUrl||0<wa.webUrl.indexOf("sharepoint.com/sites/")|| -0>wa.webUrl.indexOf("sharepoint.com/")){var Ha=wa.displayName||wa.name,ya=mxUtils.htmlEntities(wa.description||Ha);ka&&(wa.folder=2==ka?{isRoot:!0}:!0);var Ia=null!=wa.folder;if(!C||Ia){var ja=document.createElement("tr");ja.className=pa++%2?"odOddRow":"odEvenRow";var va=document.createElement("td");va.style.width="36px";var ta=document.createElement("img");ta.src="/images/"+(Ia?"folder.png":"file.png");ta.className="odFileImg";va.appendChild(ta);ja.appendChild(va);va=document.createElement("td"); -Ia=document.createElement("div");Ia.className="odFileTitle";Ia.innerHTML=mxUtils.htmlEntities(Ha);Ia.setAttribute("title",ya);va.appendChild(Ia);ja.appendChild(va);Da.appendChild(ja);null==Ca&&(Ca=ja,Ca.className+=" odRowSelected",F=wa,P=Q,t||e(F));(function(da,ca){ja.addEventListener("dblclick",J);ja.addEventListener("click",function(){Ca!=ca&&(Ca.className=Ca.className.replace("odRowSelected",""),Ca=ca,Ca.className+=" odRowSelected",F=da,P=Q,t||e(F))})})(wa,ja)}}}0==pa?(za=document.createElement("div"), -za.className="odEmptyFolder",za.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),ra.appendChild(za)):ra.appendChild(Da);B();U=!1}function ba(za){f(za?za:Aa,function(Da){if(fa){var Ca=Da.value||[];if(t||ka)Array.prototype.push.apply(Ma,Ca);else for(var pa=0;pa<Ca.length;pa++){var qa=Ca[pa],wa=qa.file?qa.file.mimeType:null;(qa.folder||"text/html"==wa||"text/xml"==wa||"application/xml"==wa||"image/png"==wa||/\.svg$/.test(qa.name)||/\.html$/.test(qa.name)||/\.xml$/.test(qa.name)|| -/\.png$/.test(qa.name)||/\.drawio$/.test(qa.name)||/\.drawiolib$/.test(qa.name))&&Ma.push(qa)}Da["@odata.nextLink"]&&1E3>Ma.length?ba(Da["@odata.nextLink"]):(clearTimeout(ha),Z(Ma))}},function(Da){if(fa){clearTimeout(ha);var Ca=null;try{Ca=JSON.parse(Da.responseText).error.message}catch(pa){}z(mxResources.get("errorFetchingFolder",null,"Error fetching folder items")+(null!=Ca?" ("+Ca+")":""));U=!1;M.stop()}},null!=za)}if(!U){p(".odCatsList").style.display="block";p(".odFilesSec").style.display="block"; -null!=L&&(L.innerText="",L.style.top="50%");var fa=U=!0,ka=0;V=arguments;var ha=setTimeout(function(){U=fa=!1;M.stop();z(mxResources.get("timeout"))},2E4),ra=p(".odFilesList");ra.innerText="";M.spin(ra);switch(Q){case "recent":T=[{name:mxResources.get("recent",null,"Recent"),driveId:Q}];var la=l()||{},Fa=[],Ga;for(Ga in la)Fa.push(la[Ga]);clearTimeout(ha);Z(Fa);return;case "shared":var Aa="/me/drive/sharedWithMe";T=[{name:mxResources.get("sharedWithMe",null,"Shared With Me"),driveId:Q}];break;case "sharepoint":Aa= -"/sites?search=";T=[{name:mxResources.get("sharepointSites",null,"Sharepoint Sites"),driveId:Q}];ka=1;break;case "site":T.push({name:aa,driveId:Q,folderId:S,siteId:X});Aa="/sites/"+X+"/drives";ka=2;break;case "subsite":T.push({name:aa,driveId:Q,folderId:S,siteId:X});Aa="/drives/"+X+(S?"/items/"+S:"/root")+"/children";break;case "search":Q=P;T=[{driveId:Q,name:mxResources.get("back",null,"Back")}];Y=encodeURIComponent(Y.replace(/'/g,"\\'"));Aa=Q?"/drives/"+Q+"/root/search(q='"+Y+"')":"/me/drive/root/search(q='"+ -Y+"')";break;default:null==S?T=[{driveId:Q}]:T.push({name:aa,driveId:Q,folderId:S}),Aa=(Q?"/drives/"+Q:"/me/drive")+(S?"/items/"+S:"/root")+"/children"}ka||(Aa+=(0<Aa.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl");var Ma=[];ba()}}function v(Q){R.className=R.className.replace("odCatSelected","");R=Q;R.className+=" odCatSelected"}function u(Q){U||(O=null,N("search",null,null,null, -Q))}var G="";null==e&&(e=y,G='<div style="text-align: center;" class="odPreview"></div>');null==l&&(l=function(){var Q=null;try{Q=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(S){}return Q});null==m&&(m=function(Q){if(null!=Q){var S=l()||{};delete Q["@microsoft.graph.downloadUrl"];S[Q.id]=Q;localStorage.setItem("mxODPickerRecentList",JSON.stringify(S))}});G='<div class="odCatsList"><div class="odCatsListLbl">OneDrive</div><div id="odFiles" class="odCatListTitle odCatSelected">'+mxUtils.htmlEntities(mxResources.get("files"))+ +DriveComment.prototype.deleteComment=function(b,e){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},b,e)};function mxODPicker(b,e,f,c,l,m,x,y,D,d,g,k,n,q){function p(P,S){S=S||document;return S.querySelector(P)}function A(P,S,X){if(null==P["@microsoft.graph.downloadUrl"])if(null==P.parentReference)X();else{c(P.id,P.parentReference.driveId,function(Z){A(Z,S,X)},X);return}var aa=new XMLHttpRequest;aa.open("GET",P["@microsoft.graph.downloadUrl"]);var Y=P.file?"image/png"==P.file.mimeType:!1;aa.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var Z=aa.responseText; +Y&&(Z="data:image/png;base64,"+Editor.base64Encode(Z),Z=Editor.extractGraphModelFromPng(Z));var ba=mxUtils.parseXml(Z),ea="mxlibrary"==ba.documentElement.nodeName?ba.documentElement:Editor.extractGraphModel(ba.documentElement);if(null!=ea){S(ea.ownerDocument);return}}catch(ma){}X()}};Y&&aa.overrideMimeType&&aa.overrideMimeType("text/plain; charset=x-user-defined");aa.send()}function E(){k&&null!=K?L.exportToCanvas(function(P){P=EditorUi.prototype.createImageDataUri(P,null,"png");x(H,P);m(H)},400, +null,null,function(P){console.log(P)},600,null,null,null,null,null,K):(x(H,void 0),m(H))}function z(P){function S(X){N.style.background="transparent";N.innerText="";var aa=document.createElement("div");aa.className="odPreviewStatus";mxUtils.write(aa,X);N.appendChild(aa);F.stop()}if(null!=N)if(N.style.background="transparent",N.innerText="",null==P||P.folder||/\.drawiolib$/.test(P.name))S(mxResources.get("noPreview"));else try{null!=P.remoteItem&&(P=P.remoteItem),W=P,F.spin(N),A(P,function(X){F.stop(); +if(W==P)if("mxlibrary"==X.documentElement.nodeName)S(mxResources.get("noPreview"));else{var aa=X.getElementsByTagName("diagram");K=AspectDialog.prototype.createViewer(N,0==aa.length?X.documentElement:aa[0],null,"transparent")}},function(){H=null;S(mxResources.get("notADiagramFile"))})}catch(X){H=null,S(mxResources.get("notADiagramFile"))}}function B(){var P=p(".odFilesBreadcrumb");if(null!=P){P.innerText="";for(var S=0;S<T.length-1;S++){var X=document.createElement("span");X.className="odBCFolder"; +X.innerHTML=mxUtils.htmlEntities(T[S].name||mxResources.get("home"));P.appendChild(X);(function(Y,Z){X.addEventListener("click",function(){e(null);T=T.slice(0,Z);M(Y.driveId,Y.folderId,Y.siteId,Y.name)})})(T[S],S);var aa=document.createElement("span");aa.innerHTML=" > ";P.appendChild(aa)}null!=T[T.length-1]&&(S=document.createElement("span"),S.innerHTML=mxUtils.htmlEntities(1==T.length?mxResources.get("officeSelDiag"):T[T.length-1].name||mxResources.get("home")),P.appendChild(S))}}function J(){if(null!= +H&&!U)if("sharepoint"==Q)M("site",null,H.id,H.displayName);else if("site"==Q)M("subsite",null,H.id,H.name);else{var P=H.folder;H=H.remoteItem?H.remoteItem:H;var S=(H.parentReference?H.parentReference.driveId:null)||Q,X=H.id;P?M(S,X,null,H.name):E()}}function M(P,S,X,aa,Y){function Z(va){F.stop();var Ea=document.createElement("table");Ea.className="odFileListGrid";for(var Ba=null,za=0,Da=0;null!=va&&Da<va.length;Da++){var la=va[Da];if(1!=ma||!la.webUrl||0<la.webUrl.indexOf("sharepoint.com/sites/")|| +0>la.webUrl.indexOf("sharepoint.com/")){var Ha=la.displayName||la.name,ya=mxUtils.htmlEntities(la.description||Ha);ma&&(la.folder=2==ma?{isRoot:!0}:!0);var Ia=null!=la.folder;if(!D||Ia){var ka=document.createElement("tr");ka.className=za++%2?"odOddRow":"odEvenRow";var ta=document.createElement("td");ta.style.width="36px";var ra=document.createElement("img");ra.src="/images/"+(Ia?"folder.png":"file.png");ra.className="odFileImg";ta.appendChild(ra);ka.appendChild(ta);ta=document.createElement("td"); +Ia=document.createElement("div");Ia.className="odFileTitle";Ia.innerHTML=mxUtils.htmlEntities(Ha);Ia.setAttribute("title",ya);ta.appendChild(Ia);ka.appendChild(ta);Ea.appendChild(ka);null==Ba&&(Ba=ka,Ba.className+=" odRowSelected",H=la,Q=P,q||e(H));(function(wa,ca){ka.addEventListener("dblclick",J);ka.addEventListener("click",function(){Ba!=ca&&(Ba.className=Ba.className.replace("odRowSelected",""),Ba=ca,Ba.className+=" odRowSelected",H=wa,Q=P,q||e(H))})})(la,ka)}}}0==za?(va=document.createElement("div"), +va.className="odEmptyFolder",va.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),pa.appendChild(va)):pa.appendChild(Ea);B();U=!1}function ba(va){f(va?va:xa,function(Ea){if(ea){var Ba=Ea.value||[];if(q||ma)Array.prototype.push.apply(Ma,Ba);else for(var za=0;za<Ba.length;za++){var Da=Ba[za],la=Da.file?Da.file.mimeType:null;(Da.folder||"text/html"==la||"text/xml"==la||"application/xml"==la||"image/png"==la||/\.svg$/.test(Da.name)||/\.html$/.test(Da.name)||/\.xml$/.test(Da.name)|| +/\.png$/.test(Da.name)||/\.drawio$/.test(Da.name)||/\.drawiolib$/.test(Da.name))&&Ma.push(Da)}Ea["@odata.nextLink"]&&1E3>Ma.length?ba(Ea["@odata.nextLink"]):(clearTimeout(ia),Z(Ma))}},function(Ea){if(ea){clearTimeout(ia);var Ba=null;try{Ba=JSON.parse(Ea.responseText).error.message}catch(za){}y(mxResources.get("errorFetchingFolder",null,"Error fetching folder items")+(null!=Ba?" ("+Ba+")":""));U=!1;F.stop()}},null!=va)}if(!U){p(".odCatsList").style.display="block";p(".odFilesSec").style.display="block"; +null!=N&&(N.innerText="",N.style.top="50%");var ea=U=!0,ma=0;V=arguments;var ia=setTimeout(function(){U=ea=!1;F.stop();y(mxResources.get("timeout"))},2E4),pa=p(".odFilesList");pa.innerText="";F.spin(pa);switch(P){case "recent":T=[{name:mxResources.get("recent",null,"Recent"),driveId:P}];var na=l()||{},Fa=[],Ga;for(Ga in na)Fa.push(na[Ga]);clearTimeout(ia);Z(Fa);return;case "shared":var xa="/me/drive/sharedWithMe";T=[{name:mxResources.get("sharedWithMe",null,"Shared With Me"),driveId:P}];break;case "sharepoint":xa= +"/sites?search=";T=[{name:mxResources.get("sharepointSites",null,"Sharepoint Sites"),driveId:P}];ma=1;break;case "site":T.push({name:aa,driveId:P,folderId:S,siteId:X});xa="/sites/"+X+"/drives";ma=2;break;case "subsite":T.push({name:aa,driveId:P,folderId:S,siteId:X});xa="/drives/"+X+(S?"/items/"+S:"/root")+"/children";break;case "search":P=Q;T=[{driveId:P,name:mxResources.get("back",null,"Back")}];Y=encodeURIComponent(Y.replace(/'/g,"\\'"));xa=P?"/drives/"+P+"/root/search(q='"+Y+"')":"/me/drive/root/search(q='"+ +Y+"')";break;default:null==S?T=[{driveId:P}]:T.push({name:aa,driveId:P,folderId:S}),xa=(P?"/drives/"+P:"/me/drive")+(S?"/items/"+S:"/root")+"/children"}ma||(xa+=(0<xa.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl");var Ma=[];ba()}}function v(P){R.className=R.className.replace("odCatSelected","");R=P;R.className+=" odCatSelected"}function u(P){U||(O=null,M("search",null,null,null, +P))}var G="";null==e&&(e=z,G='<div style="text-align: center;" class="odPreview"></div>');null==l&&(l=function(){var P=null;try{P=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(S){}return P});null==m&&(m=function(P){if(null!=P){var S=l()||{};delete P["@microsoft.graph.downloadUrl"];S[P.id]=P;localStorage.setItem("mxODPickerRecentList",JSON.stringify(S))}});G='<div class="odCatsList"><div class="odCatsListLbl">OneDrive</div><div id="odFiles" class="odCatListTitle odCatSelected">'+mxUtils.htmlEntities(mxResources.get("files"))+ '</div><div id="odRecent" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("recent"))+'</div><div id="odShared" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("shared"))+'</div><div id="odSharepoint" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("sharepoint"))+'</div></div><div class="odFilesSec"><div class="searchBar" style="display:none"><input type="search" id="odSearchBox" placeholder="'+mxUtils.htmlEntities(mxResources.get("search"))+'"></div><div class="odFilesBreadcrumb"></div><div id="refreshOD" class="odRefreshButton"><img src="/images/update32.png" width="16" height="16" title="'+ -mxUtils.htmlEntities(mxResources.get("refresh"))+'Refresh" border="0"/></div><div class="odFilesList"></div></div>'+G+(d?'<div id="odBackBtn" class="odLinkBtn">< '+mxUtils.htmlEntities(mxResources.get("back"))+"</div>":"")+(g?'<button id="odSubmitBtn" class="odSubmitBtn">'+mxUtils.htmlEntities(mxResources.get(C?"save":"open"))+"</button>":"");var H=null!=window.Editor&&null!=Editor.isDarkMode&&Editor.isDarkMode();H=".odCatsList *, .odFilesSec * { user-select: none; }.odCatsList {\tbox-sizing: border-box;\tposition:absolute;\ttop:0px;\tbottom:50%;\twidth:30%;\tborder: 1px solid #CCCCCC;\tborder-bottom:none;\tdisplay: inline-block;\toverflow-x: hidden;\toverflow-y: auto;}.odCatsListLbl {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;}.odFilesSec {\tbox-sizing: border-box;\tposition:absolute;\tleft:30%;\ttop:0px;\tbottom:50%;\twidth: 70%;\tborder: 1px solid #CCCCCC;\tborder-left:none;\tborder-bottom:none;\tdisplay: inline-block;\toverflow: hidden;}.odFilesBreadcrumb {\tbox-sizing: border-box;\tposition:absolute;\tmin-height: 32px;\tleft:0px;\tright:20px;\ttext-overflow:ellipsis;\toverflow:hidden;\tfont-size: 13px;\tcolor: #6D6D6D;\tpadding: 5px;}.odRefreshButton {\tbox-sizing: border-box;\tposition:absolute;\tright:0px;\ttop:0px;\tpadding: 4px;\tmargin: 1px;\theight:24px;\tcursor:default;}.odRefreshButton>img {\topacity:0.5;}.odRefreshButton:hover {\tbackground-color:#ddd;\tborder-radius:50%;}.odRefreshButton:active {\topacity:0.7;}.odFilesList {\tbox-sizing: border-box;\tposition:absolute;\ttop:32px;\tbottom:0px;\twidth: 100%;\toverflow-x: hidden;\toverflow-y: auto;}.odFileImg {\twidth: 24px;\tpadding-left: 5px;\tpadding-right: 5px;}.odFileTitle {\tcursor: default;\tfont-weight: normal;\tcolor: #666666 !important;\twidth: calc(100% - 20px);\twhite-space: nowrap;\toverflow: hidden;\ttext-overflow: ellipsis;}.odFileListGrid {\twidth: 100%;\twhite-space: nowrap;\tfont-size: 13px; box-sizing: border-box; border-spacing: 0;}.odOddRow {"+ -(H?"":"\tbackground-color: #eeeeee;")+"}.odEvenRow {"+(H?"":"\tbackground-color: #FFFFFF;")+"}.odRowSelected {\tbackground-color: #cadfff;}.odCatListTitle {\tbox-sizing: border-box;\theight: 17px;\tcursor: default;\tcolor: #666666;\tfont-size: 14px;\tline-height: 17px;\tmargin: 5px 0 5px 0px; padding-left: 10px;}.odCatSelected {\tfont-weight: bold;\tbackground-color: #cadfff;}.odEmptyFolder {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;\twidth: 100%; text-align: center;}.odBCFolder {\tcursor: pointer;\tcolor: #0432ff;}.odPreviewStatus {\tposition:absolute;\ttext-align:center;\twidth:100%;\ttop:50%;\ttransform: translateY(-50%);\tfont-size:13px;\topacity:0.5;}.odPreview { position:absolute;\t overflow:hidden;\t border: 1px solid #CCCCCC; bottom:0px; top: 50%; left:0px; right:0px;}.odLinkBtn { position: absolute;\tfont-size: 12px;\tcursor: pointer;\tcolor: #6D6D6D;\tleft: 5px;\tbottom: 3px;}.odSubmitBtn { position: absolute;\tcolor: #333;\tright: 5px;\tbottom: 5px;}"; -var M=new Spinner({left:"50%",lines:12,length:8,width:3,radius:5,rotate:0,color:"#000",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9}),K=new Editor,I=null,F=null,P=null,U=!1,T=[],V=null,W=null;this.getSelectedItem=function(){null!=F&&m(F);return F};if(null==p("#mxODPickerCss")){var q=document.head||document.getElementsByTagName("head")[0],D=document.createElement("style");q.appendChild(D);D.type="text/css";D.id="mxODPickerCss";D.appendChild(document.createTextNode(H))}b.innerHTML= -G;var L=p(".odPreview"),R=p("#odFiles");b=function(Q,S){S=S||document;return S.querySelectorAll(Q)}(".odCatListTitle");for(G=0;G<b.length;G++)b[G].addEventListener("click",function(){F=W=null;if(!U)switch(v(this),this.id){case "odFiles":N();break;case "odRecent":N("recent");break;case "odShared":N("shared");break;case "odSharepoint":N("sharepoint")}});var O=null;p("#odSearchBox").addEventListener("keyup",function(Q){var S=this;null!=O&&clearTimeout(O);13==Q.keyCode?u(S.value):O=setTimeout(function(){u(S.value)}, -500)});p("#refreshOD").addEventListener("click",function(){null!=V&&(e(null),N.apply(this,V))});d&&p("#odBackBtn").addEventListener("click",d);g&&p("#odSubmitBtn").addEventListener("click",E);null!=n?(d=n.pop(),"sharepoint"==n[0].driveId&&v(p("#odSharepoint")),T=n,N(d.driveId,d.folderId,d.siteId,d.name)):N()};App=function(b,e,f){EditorUi.call(this,b,e,null!=f?f:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var c=this.getCurrentFile();if(null!=c&&c.isModified()){var l={category:"DISCARD-FILE-"+c.getHash(),action:(c.savingFile?"saving":"")+(c.savingFile&&null!=c.savingFileTime?"_"+Math.round((Date.now()-c.savingFileTime.getTime())/1E3):"")+(null!=c.saveLevel?"-sl_"+c.saveLevel:"")+"-age_"+(null!= +mxUtils.htmlEntities(mxResources.get("refresh"))+'Refresh" border="0"/></div><div class="odFilesList"></div></div>'+G+(d?'<div id="odBackBtn" class="odLinkBtn">< '+mxUtils.htmlEntities(mxResources.get("back"))+"</div>":"")+(g?'<button id="odSubmitBtn" class="odSubmitBtn">'+mxUtils.htmlEntities(mxResources.get(D?"save":"open"))+"</button>":"");var I=null!=window.Editor&&null!=Editor.isDarkMode&&Editor.isDarkMode();I=".odCatsList *, .odFilesSec * { user-select: none; }.odCatsList {\tbox-sizing: border-box;\tposition:absolute;\ttop:0px;\tbottom:50%;\twidth:30%;\tborder: 1px solid #CCCCCC;\tborder-bottom:none;\tdisplay: inline-block;\toverflow-x: hidden;\toverflow-y: auto;}.odCatsListLbl {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;}.odFilesSec {\tbox-sizing: border-box;\tposition:absolute;\tleft:30%;\ttop:0px;\tbottom:50%;\twidth: 70%;\tborder: 1px solid #CCCCCC;\tborder-left:none;\tborder-bottom:none;\tdisplay: inline-block;\toverflow: hidden;}.odFilesBreadcrumb {\tbox-sizing: border-box;\tposition:absolute;\tmin-height: 32px;\tleft:0px;\tright:20px;\ttext-overflow:ellipsis;\toverflow:hidden;\tfont-size: 13px;\tcolor: #6D6D6D;\tpadding: 5px;}.odRefreshButton {\tbox-sizing: border-box;\tposition:absolute;\tright:0px;\ttop:0px;\tpadding: 4px;\tmargin: 1px;\theight:24px;\tcursor:default;}.odRefreshButton>img {\topacity:0.5;}.odRefreshButton:hover {\tbackground-color:#ddd;\tborder-radius:50%;}.odRefreshButton:active {\topacity:0.7;}.odFilesList {\tbox-sizing: border-box;\tposition:absolute;\ttop:32px;\tbottom:0px;\twidth: 100%;\toverflow-x: hidden;\toverflow-y: auto;}.odFileImg {\twidth: 24px;\tpadding-left: 5px;\tpadding-right: 5px;}.odFileTitle {\tcursor: default;\tfont-weight: normal;\tcolor: #666666 !important;\twidth: calc(100% - 20px);\twhite-space: nowrap;\toverflow: hidden;\ttext-overflow: ellipsis;}.odFileListGrid {\twidth: 100%;\twhite-space: nowrap;\tfont-size: 13px; box-sizing: border-box; border-spacing: 0;}.odOddRow {"+ +(I?"":"\tbackground-color: #eeeeee;")+"}.odEvenRow {"+(I?"":"\tbackground-color: #FFFFFF;")+"}.odRowSelected {\tbackground-color: #cadfff;}.odCatListTitle {\tbox-sizing: border-box;\theight: 17px;\tcursor: default;\tcolor: #666666;\tfont-size: 14px;\tline-height: 17px;\tmargin: 5px 0 5px 0px; padding-left: 10px;}.odCatSelected {\tfont-weight: bold;\tbackground-color: #cadfff;}.odEmptyFolder {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;\twidth: 100%; text-align: center;}.odBCFolder {\tcursor: pointer;\tcolor: #0432ff;}.odPreviewStatus {\tposition:absolute;\ttext-align:center;\twidth:100%;\ttop:50%;\ttransform: translateY(-50%);\tfont-size:13px;\topacity:0.5;}.odPreview { position:absolute;\t overflow:hidden;\t border: 1px solid #CCCCCC; bottom:0px; top: 50%; left:0px; right:0px;}.odLinkBtn { position: absolute;\tfont-size: 12px;\tcursor: pointer;\tcolor: #6D6D6D;\tleft: 5px;\tbottom: 3px;}.odSubmitBtn { position: absolute;\tcolor: #333;\tright: 5px;\tbottom: 5px;}"; +var F=new Spinner({left:"50%",lines:12,length:8,width:3,radius:5,rotate:0,color:"#000",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9}),L=new Editor,K=null,H=null,Q=null,U=!1,T=[],V=null,W=null;this.getSelectedItem=function(){null!=H&&m(H);return H};if(null==p("#mxODPickerCss")){var t=document.head||document.getElementsByTagName("head")[0],C=document.createElement("style");t.appendChild(C);C.type="text/css";C.id="mxODPickerCss";C.appendChild(document.createTextNode(I))}b.innerHTML= +G;var N=p(".odPreview"),R=p("#odFiles");b=function(P,S){S=S||document;return S.querySelectorAll(P)}(".odCatListTitle");for(G=0;G<b.length;G++)b[G].addEventListener("click",function(){H=W=null;if(!U)switch(v(this),this.id){case "odFiles":M();break;case "odRecent":M("recent");break;case "odShared":M("shared");break;case "odSharepoint":M("sharepoint")}});var O=null;p("#odSearchBox").addEventListener("keyup",function(P){var S=this;null!=O&&clearTimeout(O);13==P.keyCode?u(S.value):O=setTimeout(function(){u(S.value)}, +500)});p("#refreshOD").addEventListener("click",function(){null!=V&&(e(null),M.apply(this,V))});d&&p("#odBackBtn").addEventListener("click",d);g&&p("#odSubmitBtn").addEventListener("click",E);null!=n?(d=n.pop(),"sharepoint"==n[0].driveId&&v(p("#odSharepoint")),T=n,M(d.driveId,d.folderId,d.siteId,d.name)):M()};App=function(b,e,f){EditorUi.call(this,b,e,null!=f?f:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var c=this.getCurrentFile();if(null!=c&&c.isModified()){var l={category:"DISCARD-FILE-"+c.getHash(),action:(c.savingFile?"saving":"")+(c.savingFile&&null!=c.savingFileTime?"_"+Math.round((Date.now()-c.savingFileTime.getTime())/1E3):"")+(null!=c.saveLevel?"-sl_"+c.saveLevel:"")+"-age_"+(null!= c.ageStart?Math.round((Date.now()-c.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(c.isAutosave()?"":"-noauto")+"-open_"+(null!=c.opened?Math.round((Date.now()-c.opened.getTime())/1E3):"x")+"-save_"+(null!=c.lastSaved?Math.round((Date.now()-c.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=c.lastChanged?Math.round((Date.now()-c.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=c.sync?"client_"+c.sync.clientId:"nosync"}; c.constructor==DriveFile&&null!=c.desc&&null!=this.drive&&(l.label+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+c.desc.headRevisionId+"-mod_"+c.desc.modifiedDate+"-size_"+c.getSize()+"-mime_"+c.desc.mimeType);EditorUi.logEvent(l)}}));this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+c.getHash(),action:"changed",label:"autosave_"+(this.editor.autosave? "on":"off")})}));mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=": -(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(c,l,m){if("1"==urlParams.openInSameWin||navigator.standalone)m();else{var x=null;try{x=window.open(c)}catch(z){}null==x||void 0===x?this.showDialog((new PopupDialog(this,c,l,m)).container,320,140,!0,!0):null!=l&&l()}});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(c){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(c)});this.editor.chromeless&& +(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(c,l,m){if("1"==urlParams.openInSameWin||navigator.standalone)m();else{var x=null;try{x=window.open(c)}catch(y){}null==x||void 0===x?this.showDialog((new PopupDialog(this,c,l,m)).container,320,140,!0,!0):null!=l&&l()}});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(c){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(c)});this.editor.chromeless&& !this.editor.editable||this.addFileDropHandler([document]);if(null!=App.DrawPlugins){for(b=0;b<App.DrawPlugins.length;b++)try{App.DrawPlugins[b](this)}catch(c){null!=window.console&&console.log("Plugin Error:",c,App.DrawPlugins[b])}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}window.Draw.loadPlugin=mxUtils.bind(this,function(c){try{c(this)}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}});setTimeout(mxUtils.bind(this,function(){0<App.embedModePluginsCount&&(App.embedModePluginsCount= 0,this.initializeEmbedMode())}),5E3)}this.load()};App.ERROR_TIMEOUT="timeout";App.ERROR_BUSY="busy";App.ERROR_UNKNOWN="unknown";App.MODE_GOOGLE="google";App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive";App.MODE_GITHUB="github";App.MODE_GITLAB="gitlab";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.MODE_TRELLO="trello";App.MODE_EMBED="embed";App.MODE_ATLAS="atlas";App.DROPBOX_APPKEY=window.DRAWIO_DROPBOX_ID;App.DROPBOX_URL=window.DRAWIO_BASE_URL+"/js/dropbox/Dropbox-sdk.min.js"; App.DROPINS_URL="https://www.dropbox.com/static/api/2/dropins.js";App.ONEDRIVE_URL=mxClient.IS_IE11?"https://js.live.net/v7.2/OneDrive.js":window.DRAWIO_BASE_URL+"/js/onedrive/OneDrive.js";App.TRELLO_URL="https://api.trello.com/1/client.js";App.TRELLO_JQUERY_URL=window.DRAWIO_BASE_URL+"/js/jquery/jquery-3.6.0.min.js";App.PUSHER_KEY="1e756b07a690c5bdb054";App.PUSHER_CLUSTER="eu";App.PUSHER_URL="https://js.pusher.com/7.0.3/pusher.min.js";App.SIMPLE_PEER_URL=window.DRAWIO_BASE_URL+"/js/simplepeer/simplepeer9.10.0.min.js"; @@ -12329,32 +12336,32 @@ App.getStoredMode=function(){var b=null;null==b&&isLocalStorage&&(b=localStorage "#G"==window.location.hash.substring(0,2)?mxscript("https://apis.google.com/js/api.js"):"0"!=urlParams.chrome||null!=window.location.hash&&"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"===window.location.hash.substring(0,45)||(window.DriveClient=null):window.DriveClient=null),"function"===typeof window.DropboxClient&&("0"!=urlParams.db&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?App.mode==App.MODE_DROPBOX||null!=window.location.hash&&"#D"==window.location.hash.substring(0, 2)?mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,null,"dropboxjs",App.DROPBOX_APPKEY,!0)}):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript(App.ONEDRIVE_URL):"0"==urlParams.chrome&&(window.OneDriveClient= null):window.OneDriveClient=null),"function"===typeof window.TrelloClient&&("1"==urlParams.tr&&isSvgBrowser&&!mxClient.IS_IE11&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_TRELLO||null!=window.location.hash&&"#T"==window.location.hash.substring(0,2)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL)}):"0"==urlParams.chrome&&(window.TrelloClient=null):window.TrelloClient=null)))})(); -App.clearServiceWorker=function(b,e){navigator.serviceWorker.getRegistrations().then(function(f){if(null!=f&&0<f.length){for(var c=0;c<f.length;c++)f[c].unregister();null!=b&&b()}})["catch"](function(){null!=e&&e()})}; -App.main=function(b,e){function f(g){mxUtils.getAll("1"!=urlParams.dev?[g]:[g,STYLE_PATH+"/default.xml"],function(k){function n(){var J=null!=e?e():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode|| +App.clearServiceWorker=function(b,e){navigator.serviceWorker.getRegistrations().then(function(f){if(null!=f&&0<f.length){for(var c=0;c<f.length;c++)f[c].unregister();null!=b&&b()}})["catch"](function(){null!=e&&e()})};App.isSameDomain=function(b){var e=document.createElement("a");e.href=b;return e.protocol===window.location.protocol||e.host===window.location.host};App.isBuiltInPlugin=function(b){for(var e in App.pluginRegistry)if(App.pluginRegistry[e]==b)return!0;return!1}; +App.main=function(b,e){function f(d){mxUtils.getAll("1"!=urlParams.dev?[d]:[d,STYLE_PATH+"/default.xml"],function(g){function k(){var E=null!=e?e():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode|| 9<document.documentMode))mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)});else if("undefined"===typeof window.Dropbox||"undefined"===typeof window.Dropbox.choose)window.DropboxClient=null;"function"===typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(null==navigator.userAgent|| 0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null);"function"===typeof window.TrelloClient&&!mxClient.IS_IE11&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&"1"==urlParams.tr&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL, -function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=b&&b(J);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[J,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}mxResources.parse(k[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var t=function(J){if(null!=J)for(var N=0;N<J.length;N++)if(!p[J[N]])throw Error(mxResources.get("invalidInput")+ -' "'+J[N])+'"';return!0},p={},A;for(A in App.pluginRegistry)p[App.pluginRegistry[A]]=!0;var E=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=E&&t(E.plugins)){EditorUi.debug("Setting configuration",JSON.stringify(E));if(null!=E.merge){var y=localStorage.getItem(Editor.configurationKey);if(null!=y)try{var B=JSON.parse(y);for(A in E.merge)B[A]=E.merge[A];E=B}catch(J){window.location.hash="",alert(J)}else E=E.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&& -(localStorage.setItem(Editor.configurationKey,JSON.stringify(E)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(J){window.location.hash="",alert(J)}1<k.length&&(Graph.prototype.defaultThemes["default-style2"]=k[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=k[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?n():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"], -n))},function(k){k=document.getElementById("geStatus");null!=k&&(k.innerHTML="Error loading page. <a>Please try refreshing.</a>",k.getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";f(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})}function c(){try{if(null!=mxSettings.settings){document.body.style.backgroundColor="atlas"!=uiTheme&&"kennedy"!=uiTheme&&(Editor.isDarkMode()||mxSettings.settings.darkMode)?Editor.darkColor: -"#ffffff";if(null!=mxSettings.settings.autosaveDelay){var g=parseInt(mxSettings.settings.autosaveDelay);!isNaN(g)&&0<g?(DrawioFile.prototype.autosaveDelay=g,EditorUi.debug("Setting autosaveDelay",g)):EditorUi.debug("Invalid autosaveDelay",g)}null!=mxSettings.settings.defaultEdgeLength&&(g=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(g)&&0<g?(Graph.prototype.defaultEdgeLength=g,EditorUi.debug("Using defaultEdgeLength",g)):EditorUi.debug("Invalid defaultEdgeLength",g))}}catch(n){null!=window.console&& -console.error(n)}if(null!=Menus.prototype.defaultFonts)for(g=0;g<Menus.prototype.defaultFonts.length;g++){var k=Menus.prototype.defaultFonts[g];"string"!==typeof k&&null!=k.fontFamily&&null!=k.fontUrl&&Graph.addFont(k.fontFamily,k.fontUrl)}mxResources.loadDefaultBundle=!1;f(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(g,k,n,t,p){EditorUi.logError("Global: "+(null!=g?g:""),k,n,t,p,null,!0)};if(window.top!=window.self|| -"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&"aj.draw.io"!==window.location.hostname){if("1"==urlParams.embed||"1"==urlParams.lightbox){var l=document.getElementById("geInfo");null!=l&&l.parentNode.removeChild(l)}null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){if("1"==urlParams.dev&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&& -null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){l=document.getElementsByTagName("script");if(null!=l&&0<l.length){var m=mxUtils.getTextContent(l[0]);"1f536e2400baaa30261b8c3976d6fe06"!=CryptoJS.MD5(m).toString()&&(console.log("Change bootstrap script MD5 in the previous line:",CryptoJS.MD5(m).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}null!=l&&1<l.length&&(m=mxUtils.getTextContent(l[l.length-1]),"d53805dd6f0bbba2da4966491ca0a505"!=CryptoJS.MD5(m).toString()&& -(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(m).toString()),alert("[Dev] Main script change requires update of CSP")))}try{Editor.enableServiceWorker&&("0"==urlParams.offline||/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"==urlParams.dev)?App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")}):Editor.enableServiceWorker&&navigator.serviceWorker.register("service-worker.js")}catch(g){null!=window.console&&console.error(g)}!("ArrayBuffer"in -window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&"1"!=urlParams.embedRT||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=urlParams.rt||"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){l=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var x= -JSON.parse(localStorage.getItem(mxSettings.key));null!=x&&(l=x.plugins)}catch(g){}x=urlParams.p;App.initPluginCallback();null!=x&&App.loadPlugins(x.split(";"));if(null!=l&&0<l.length&&"0"!=urlParams.plugins){x=window.location.protocol+"//"+window.location.host;m=!0;for(var z=0;z<l.length&&m;z++)"/"!=l[z].charAt(0)&&l[z].substring(0,x.length)!=x&&(m=!1);if(m||mxUtils.confirm(mxResources.replacePlaceholders("The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n", -[l.join("\n")]).replace(/\\n/g,"\n")))for(z=0;z<l.length;z++)try{null==App.pluginsLoaded[l[z]]&&(App.pluginsLoaded[l[z]]=!0,App.embedModePluginsCount++,"/"==l[z].charAt(0)&&(l[z]=PLUGINS_BASE_PATH+l[z]),mxscript(l[z]))}catch(g){}}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback", -null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var C=window.opener||window.parent,d=function(g){if(g.source==C)try{var k=JSON.parse(g.data);null!=k&&"configure"==k.action&&(mxEvent.removeListener(window,"message",d),Editor.configure(k.config,!0),mxSettings.load(),k.colorSchemeMeta&&mxmeta("color-scheme","dark light"),c())}catch(n){null!=window.console&&console.log("Error in configure message: "+ -n,g.data)}};mxEvent.addListener(window,"message",d);C.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),mxSettings.load()}catch(g){null!=window.console&&console.error(g)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&(l=localStorage.getItem(Editor.configurationKey),null!=l))try{l=JSON.parse(l),null!=l&&(EditorUi.debug("Using local configuration", -l),Editor.configure(l),mxSettings.load())}catch(g){null!=window.console&&console.error(g)}}c()}}else document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'};mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture=IMAGE_PATH+"/default-user.jpg";App.prototype.shareImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMjU2NzdEMTcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMjU2NzdEMDcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNjgwMTE3NDA3MjA2ODExODcxRkM4MUY1OTFDMjQ5OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrM/fs0AAADgSURBVHjaYmDAA/7//88MwgzkAKDGFiD+BsQ/QWxSNaf9RwN37twpI8WAS+gGfP78+RpQSoRYA36iG/D379+vQClNdLVMOMz4gi7w79+/n0CKg1gD9qELvH379hzIHGK9oA508ieY8//8+fO5rq4uFCilRKwL1JmYmNhhHEZGRiZ+fn6Q2meEbDYG4u3/cYCfP38uA7kOm0ZOIJ7zn0jw48ePPiDFhmzArv8kgi9fvuwB+w5qwH9ykjswbFSZyM4sEMDPBDTlL5BxkFSd7969OwZ2BZKYGhDzkmjOJ4AAAwBhpRqGnEFb8QAAAABJRU5ErkJggg=="; +function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=b&&b(E);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[E,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}mxResources.parse(g[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var n=JSON.parse(Graph.decompress(window.location.hash.substring(9))); +if(null!=n){EditorUi.debug("Setting configuration",JSON.stringify(n));if(null!=n.merge){var q=localStorage.getItem(Editor.configurationKey);if(null!=q)try{var p=JSON.parse(q),A;for(A in n.merge)p[A]=n.merge[A];n=p}catch(E){window.location.hash="",alert(E)}else n=n.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(n)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(E){window.location.hash= +"",alert(E)}1<g.length&&(Graph.prototype.defaultThemes["default-style2"]=g[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=g[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?k():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],k))},function(g){g=document.getElementById("geStatus");null!=g&&(g.innerHTML="Error loading page. <a>Please try refreshing.</a>",g.getElementsByTagName("a")[0].onclick= +function(){mxLanguage="en";f(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})}function c(){try{if(null!=mxSettings.settings){document.body.style.backgroundColor="atlas"!=uiTheme&&"kennedy"!=uiTheme&&(Editor.isDarkMode()||mxSettings.settings.darkMode)?Editor.darkColor:"#ffffff";if(null!=mxSettings.settings.autosaveDelay){var d=parseInt(mxSettings.settings.autosaveDelay);!isNaN(d)&&0<d?(DrawioFile.prototype.autosaveDelay=d,EditorUi.debug("Setting autosaveDelay", +d)):EditorUi.debug("Invalid autosaveDelay",d)}null!=mxSettings.settings.defaultEdgeLength&&(d=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(d)&&0<d?(Graph.prototype.defaultEdgeLength=d,EditorUi.debug("Using defaultEdgeLength",d)):EditorUi.debug("Invalid defaultEdgeLength",d))}}catch(k){null!=window.console&&console.error(k)}if(null!=Menus.prototype.defaultFonts)for(d=0;d<Menus.prototype.defaultFonts.length;d++){var g=Menus.prototype.defaultFonts[d];"string"!==typeof g&&null!=g.fontFamily&& +null!=g.fontUrl&&Graph.addFont(g.fontFamily,g.fontUrl)}mxResources.loadDefaultBundle=!1;f(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(d,g,k,n,q){EditorUi.logError("Global: "+(null!=d?d:""),g,k,n,q,null,!0)};if(window.top!=window.self||"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&"aj.draw.io"!==window.location.hostname){if("1"==urlParams.embed||"1"==urlParams.lightbox){var l= +document.getElementById("geInfo");null!=l&&l.parentNode.removeChild(l)}null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){if("1"==urlParams.dev&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){l=document.getElementsByTagName("script");if(null!=l&&0<l.length){var m=mxUtils.getTextContent(l[0]);"1f536e2400baaa30261b8c3976d6fe06"!= +CryptoJS.MD5(m).toString()&&(console.log("Change bootstrap script MD5 in the previous line:",CryptoJS.MD5(m).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}null!=l&&1<l.length&&(m=mxUtils.getTextContent(l[l.length-1]),"d53805dd6f0bbba2da4966491ca0a505"!=CryptoJS.MD5(m).toString()&&(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(m).toString()),alert("[Dev] Main script change requires update of CSP")))}try{Editor.enableServiceWorker&&("0"==urlParams.offline|| +/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"==urlParams.dev)?App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")}):Editor.enableServiceWorker&&navigator.serviceWorker.register("service-worker.js")}catch(d){null!=window.console&&console.error(d)}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&"1"!=urlParams.embedRT||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!= +urlParams.rt||"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){l=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var x=JSON.parse(localStorage.getItem(mxSettings.key));null!=x&&(l=x.plugins)}catch(d){}x=urlParams.p;App.initPluginCallback();null!=x&&App.loadPlugins(x.split(";"));if(null!= +l&&0<l.length&&"0"!=urlParams.plugins)for(x=0;x<l.length;x++)try{("/"==l[x].charAt(0)&&(l[x]=PLUGINS_BASE_PATH+l[x]),App.isSameDomain(l[x]))?ALLOW_CUSTOM_PLUGINS||App.isBuiltInPlugin(l[x])?null==App.pluginsLoaded[l[x]]&&(App.pluginsLoaded[l[x]]=!0,App.embedModePluginsCount++,mxscript(l[x])):null!=window.console&&console.log("Unknown plugin:",l[x]):null!=window.console&&console.log("Blocked plugin:",l[x])}catch(d){}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&& +"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var y=window.opener||window.parent,D=function(d){if(d.source==y)try{var g=JSON.parse(d.data);null!=g&&"configure"== +g.action&&(mxEvent.removeListener(window,"message",D),Editor.configure(g.config),mxSettings.load(),g.colorSchemeMeta&&mxmeta("color-scheme","dark light"),c())}catch(k){null!=window.console&&console.log("Error in configure message: "+k,d.data)}};mxEvent.addListener(window,"message",D);y.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG), +mxSettings.load()}catch(d){null!=window.console&&console.error(d)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&(x=localStorage.getItem(Editor.configurationKey),null!=x))try{x=JSON.parse(x),null!=x&&(EditorUi.debug("Using local configuration",x),Editor.configure(x),mxSettings.load())}catch(d){null!=window.console&&console.error(d)}}c()}}else document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'}; +mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture=IMAGE_PATH+"/default-user.jpg";App.prototype.shareImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMjU2NzdEMTcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMjU2NzdEMDcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNjgwMTE3NDA3MjA2ODExODcxRkM4MUY1OTFDMjQ5OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrM/fs0AAADgSURBVHjaYmDAA/7//88MwgzkAKDGFiD+BsQ/QWxSNaf9RwN37twpI8WAS+gGfP78+RpQSoRYA36iG/D379+vQClNdLVMOMz4gi7w79+/n0CKg1gD9qELvH379hzIHGK9oA508ieY8//8+fO5rq4uFCilRKwL1JmYmNhhHEZGRiZ+fn6Q2meEbDYG4u3/cYCfP38uA7kOm0ZOIJ7zn0jw48ePPiDFhmzArv8kgi9fvuwB+w5qwH9ykjswbFSZyM4sEMDPBDTlL5BxkFSd7969OwZ2BZKYGhDzkmjOJ4AAAwBhpRqGnEFb8QAAAABJRU5ErkJggg=="; App.prototype.chevronUpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUY1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NjA1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1RDUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1RTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pg+qUokAAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAAL0lEQVR42mJgRgMMRAswMKAKMDDARBjg8lARBoR6KImkH0wTbygT6YaS4DmAAAMAYPkClOEDDD0AAAAASUVORK5CYII="; App.prototype.chevronDownImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUI1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NUM1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1OTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1QTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsCtve8AAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAALUlEQVR42mJgRgMMRAkwQEXBNAOcBSPhclB1cNVwfcxI+vEZykSpoSR6DiDAAF23ApT99bZ+AAAAAElFTkSuQmCC"; App.prototype.formatShowImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODdCREY5REY1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODdCREY5RTA1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4N0JERjlERDU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4N0JERjlERTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PlnMQ/8AAAAJUExURQAAAP///3FxcTfTiAsAAAACdFJOU/8A5bcwSgAAACFJREFUeNpiYEQDDEQJMMABTAAixcQ00ALoDiPRcwABBgB6DADly9Yx8wAAAABJRU5ErkJggg=="; App.prototype.formatHideImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODdCREY5REI1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODdCREY5REM1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4N0JERjlEOTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4N0JERjlEQTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PqjT9SMAAAAGUExURQAAAP///6XZn90AAAACdFJOU/8A5bcwSgAAAB9JREFUeNpiYEQDDEQJMMABTAAmNdAC6A4j0XMAAQYAcbwA1Xvj1CgAAAAASUVORK5CYII="; App.prototype.warnInterval=3E5;App.prototype.compactMode=!1;App.prototype.fullscreenMode=!1;"1"!=urlParams.embed?App.prototype.menubarHeight=64:App.prototype.footerHeight=0;App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(b){App.DrawPlugins.push(b)})};App.pluginsLoaded={};App.embedModePluginsCount=0; -App.loadPlugins=function(b,e){EditorUi.debug("Loading plugins",b);for(var f=0;f<b.length;f++)if(null!=b[f]&&0<b[f].length)try{var c=PLUGINS_BASE_PATH+App.pluginRegistry[b[f]];null!=c?null==App.pluginsLoaded[c]&&(App.pluginsLoaded[c]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?e?mxinclude(c):mxscript(c):e?mxinclude(c):mxscript(drawDevUrl+c)):null!=window.console&&console.log("Unknown plugin:",b[f])}catch(l){null!=window.console&&console.log("Error loading plugin:",b[f],l)}}; -App.prototype.initializeEmbedMode=function(){"1"==urlParams.embed&&("app.diagrams.net"==window.location.hostname&&this.showBanner("EmbedDeprecationFooter","app.diagrams.net will stop working for embed mode. Please use embed.diagrams.net."),0<App.embedModePluginsCount||this.initEmbedDone||(this.initEmbedDone=!0,EditorUi.prototype.initializeEmbedMode.apply(this,arguments)))}; +App.loadPlugins=function(b,e){EditorUi.debug("Loading plugins",b);for(var f=0;f<b.length;f++)if(null!=b[f]&&0<b[f].length)try{if(null!=App.pluginRegistry[b[f]]){var c=PLUGINS_BASE_PATH+App.pluginRegistry[b[f]];null==App.pluginsLoaded[c]&&(App.pluginsLoaded[c]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?e?mxinclude(c):mxscript(c):e?mxinclude(c):mxscript(drawDevUrl+c))}else null!=window.console&&console.log("Unknown plugin:",b[f])}catch(l){null!=window.console&&console.log("Error loading plugin:", +b[f],l)}};App.prototype.initializeEmbedMode=function(){"1"==urlParams.embed&&("app.diagrams.net"==window.location.hostname&&this.showBanner("EmbedDeprecationFooter","app.diagrams.net will stop working for embed mode. Please use embed.diagrams.net."),0<App.embedModePluginsCount||this.initEmbedDone||(this.initEmbedDone=!0,EditorUi.prototype.initializeEmbedMode.apply(this,arguments)))}; App.prototype.initializeViewerMode=function(){var b=window.opener||window.parent;null!=b&&this.editor.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(){b.postMessage(JSON.stringify(this.createLoadMessage("size")),"*")}))}; App.prototype.init=function(){EditorUi.prototype.init.apply(this,arguments);this.defaultLibraryName=mxResources.get("untitledLibrary");this.descriptorChangedListener=mxUtils.bind(this,this.descriptorChanged);this.gitHub=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gh||"1"==urlParams.embed&&"1"!=urlParams.gh?null:new GitHubClient(this);null!=this.gitHub&&this.gitHub.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})); this.gitLab=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gl||"1"==urlParams.embed&&"1"!=urlParams.gl?null:new GitLabClient(this);null!=this.gitLab&&this.gitLab.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()}));if("1"!=urlParams.embed||"1"==urlParams.od){var b=mxUtils.bind(this,function(){"undefined"!==typeof OneDrive?(this.oneDrive=new OneDriveClient(this),this.oneDrive.addListener("userChanged", @@ -12381,21 +12388,21 @@ f.setAttribute("border","0");f.setAttribute("align","absmiddle");f.setAttribute( b.appendChild(f);var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.setAttribute("title","2 star");c.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");c.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg=="); b.appendChild(c);var l=document.createElement("img");l.setAttribute("border","0");l.setAttribute("align","absmiddle");l.setAttribute("title","3 star");l.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");l.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg=="); b.appendChild(l);var m=document.createElement("img");m.setAttribute("border","0");m.setAttribute("align","absmiddle");m.setAttribute("title","4 star");m.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");m.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg=="); -b.appendChild(m);this.bannerShowing=!0;var x=mxUtils.bind(this,function(){null!=b.parentNode&&(b.parentNode.removeChild(b),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))});mxEvent.addListener(e,"click",mxUtils.bind(this,function(z){mxEvent.consume(z);x()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(z){mxEvent.consume(z);x()}));mxEvent.addListener(c,"click",mxUtils.bind(this, -function(z){mxEvent.consume(z);x()}));mxEvent.addListener(l,"click",mxUtils.bind(this,function(z){mxEvent.consume(z);x()}));mxEvent.addListener(m,"click",mxUtils.bind(this,function(z){mxEvent.consume(z);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");x()}));e=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){x()}),1E3)});window.setTimeout(mxUtils.bind(this, +b.appendChild(m);this.bannerShowing=!0;var x=mxUtils.bind(this,function(){null!=b.parentNode&&(b.parentNode.removeChild(b),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))});mxEvent.addListener(e,"click",mxUtils.bind(this,function(y){mxEvent.consume(y);x()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(y){mxEvent.consume(y);x()}));mxEvent.addListener(c,"click",mxUtils.bind(this, +function(y){mxEvent.consume(y);x()}));mxEvent.addListener(l,"click",mxUtils.bind(this,function(y){mxEvent.consume(y);x()}));mxEvent.addListener(m,"click",mxUtils.bind(this,function(y){mxEvent.consume(y);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");x()}));e=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){x()}),1E3)});window.setTimeout(mxUtils.bind(this, function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(e,6E4)}}; App.prototype.checkLicense=function(){var b=this.drive.getUser(),e=null!=b?b.email:null;if(!this.isOffline()&&!this.editor.chromeless&&null!=e&&null!=b.id){var f=e.lastIndexOf("@"),c=0<=f?e.substring(f+1):"";b=Editor.crc32(b.id);mxUtils.post("/license","domain="+encodeURIComponent(c)+"&id="+encodeURIComponent(b)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(l){try{if(200<=l.getStatus()&&299>=l.getStatus()){var m=l.getText();if(0<m.length){var x=JSON.parse(m);null!=x&&this.handleLicense(x, -c)}}}catch(z){}}))}};App.prototype.handleLicense=function(b,e){null!=b&&null!=b.plugins&&App.loadPlugins(b.plugins.split(";"),!0)};App.prototype.getEditBlankXml=function(){var b=this.getCurrentFile();return null!=b&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?b.getData():this.getFileData(!0)};App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);this.actions.get("revisionHistory").setEnabled(this.isRevisionHistoryEnabled())}; +c)}}}catch(y){}}))}};App.prototype.handleLicense=function(b,e){};App.prototype.getEditBlankXml=function(){var b=this.getCurrentFile();return null!=b&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?b.getData():this.getFileData(!0)};App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);this.actions.get("revisionHistory").setEnabled(this.isRevisionHistoryEnabled())}; App.prototype.addRecent=function(b){if(isLocalStorage&&null!=localStorage){var e=this.getRecent();if(null==e)e=[];else for(var f=0;f<e.length;f++)e[f].id==b.id&&e.splice(f,1);null!=e&&(e.unshift(b),e=e.slice(0,10),localStorage.setItem(".recent",JSON.stringify(e)))}};App.prototype.getRecent=function(){if(isLocalStorage&&null!=localStorage){try{var b=localStorage.getItem(".recent");if(null!=b)return JSON.parse(b)}catch(e){}return null}}; App.prototype.resetRecent=function(b){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent")}catch(e){}}; App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");var b=this.getCurrentFile();if(null!=b)if(b.constructor!=LocalFile||""!=b.getHash()||b.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()||null!=b.fileHandle){if(b.isModified())return mxResources.get("allChangesLost");b.close(!0)}else return mxResources.get("ensureDataSaved")}; App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var b=this.editor.appName,e=this.getCurrentFile();this.isOfflineApp()&&(b+=" app");null!=e&&(b=(null!=e.getTitle()?e.getTitle():this.defaultFilename)+" - "+b);document.title!=b&&(document.title=b,b=this.editor.graph,b.invalidateDescendantsWithPlaceholders(b.model.getRoot()),b.view.validate())}}; -App.prototype.getThumbnail=function(b,e){var f=!1;try{var c=!0,l=window.setTimeout(mxUtils.bind(this,function(){c=!1;e(null)}),this.timeout),m=mxUtils.bind(this,function(H){window.clearTimeout(l);c&&e(H)});null==this.thumbImageCache&&(this.thumbImageCache={});var x=this.editor.graph,z=x.backgroundImage,C=null!=x.themes&&"darkTheme"==x.defaultThemeName;if(null!=this.pages&&(C||this.currentPage!=this.pages[0])){var d=x.getGlobalVariable;x=this.createTemporaryGraph(x.getStylesheet());x.setBackgroundImage= -this.editor.graph.setBackgroundImage;var g=this.pages[0];this.currentPage==g?x.setBackgroundImage(z):null!=g.viewState&&null!=g.viewState&&(z=g.viewState.backgroundImage,x.setBackgroundImage(z));x.getGlobalVariable=function(H){return"page"==H?g.getName():"pagenumber"==H?1:d.apply(this,arguments)};x.getGlobalVariable=d;document.body.appendChild(x.container);x.model.setRoot(g.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(H){try{x!=this.editor.graph&& -null!=x.container.parentNode&&x.container.parentNode.removeChild(x.container)}catch(M){H=null}m(H)}),b,this.thumbImageCache,"#ffffff",function(){m()},null,null,null,null,null,null,x,null,null,null,null,"diagram",null),f=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var k=document.createElement("canvas"),n=x.getGraphBounds(),t=x.view.translate,p=x.view.scale;null!=z&&(n=mxRectangle.fromRectangle(n),n.add(new mxRectangle((t.x+z.x)*p,(t.y+z.y)*p,z.width*p,z.height*p)));var A=b/n.width; -A=Math.min(1,Math.min(3*b/(4*n.height),A));var E=Math.floor(n.x),y=Math.floor(n.y);k.setAttribute("width",Math.ceil(A*(n.width+4)));k.setAttribute("height",Math.ceil(A*(n.height+4)));var B=k.getContext("2d");B.scale(A,A);B.translate(-E,-y);var J=x.background;if(null==J||""==J||J==mxConstants.NONE)J="#ffffff";B.save();B.fillStyle=J;B.fillRect(E,y,Math.ceil(n.width+4),Math.ceil(n.height+4));B.restore();if(null!=z){var N=new Image;N.src=z.src;B.drawImage(N,z.x*A,z.y*A,z.width*A,z.height*A)}var v=new mxJsCanvas(k), -u=new mxAsyncCanvas(this.thumbImageCache);v.images=this.thumbImageCache.images;var G=new mxImageExport;G.drawShape=function(H,M){H.shape instanceof mxShape&&H.shape.checkBounds()&&(M.save(),M.translate(.5,.5),H.shape.paint(M),M.translate(-.5,-.5),M.restore())};G.drawText=function(H,M){};G.drawState(x.getView().getState(x.model.root),u);u.finish(mxUtils.bind(this,function(){try{G.drawState(x.getView().getState(x.model.root),v),x!=this.editor.graph&&null!=x.container.parentNode&&x.container.parentNode.removeChild(x.container)}catch(H){k= -null}m(k)}));f=!0}}catch(H){f=!1,null!=x&&x!=this.editor.graph&&null!=x.container.parentNode&&x.container.parentNode.removeChild(x.container)}f||window.clearTimeout(l);return f};App.prototype.createBackground=function(){var b=this.createDiv("background");b.style.position="absolute";b.style.background="white";b.style.left="0px";b.style.top="0px";b.style.bottom="0px";b.style.right="0px";mxUtils.setOpacity(b,100);return b}; +App.prototype.getThumbnail=function(b,e){var f=!1;try{var c=!0,l=window.setTimeout(mxUtils.bind(this,function(){c=!1;e(null)}),this.timeout),m=mxUtils.bind(this,function(I){window.clearTimeout(l);c&&e(I)});null==this.thumbImageCache&&(this.thumbImageCache={});var x=this.editor.graph,y=x.backgroundImage,D=null!=x.themes&&"darkTheme"==x.defaultThemeName;if(null!=this.pages&&(D||this.currentPage!=this.pages[0])){var d=x.getGlobalVariable;x=this.createTemporaryGraph(x.getStylesheet());x.setBackgroundImage= +this.editor.graph.setBackgroundImage;var g=this.pages[0];this.currentPage==g?x.setBackgroundImage(y):null!=g.viewState&&null!=g.viewState&&(y=g.viewState.backgroundImage,x.setBackgroundImage(y));x.getGlobalVariable=function(I){return"page"==I?g.getName():"pagenumber"==I?1:d.apply(this,arguments)};x.getGlobalVariable=d;document.body.appendChild(x.container);x.model.setRoot(g.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(I){try{x!=this.editor.graph&& +null!=x.container.parentNode&&x.container.parentNode.removeChild(x.container)}catch(F){I=null}m(I)}),b,this.thumbImageCache,"#ffffff",function(){m()},null,null,null,null,null,null,x,null,null,null,null,"diagram",null),f=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var k=document.createElement("canvas"),n=x.getGraphBounds(),q=x.view.translate,p=x.view.scale;null!=y&&(n=mxRectangle.fromRectangle(n),n.add(new mxRectangle((q.x+y.x)*p,(q.y+y.y)*p,y.width*p,y.height*p)));var A=b/n.width; +A=Math.min(1,Math.min(3*b/(4*n.height),A));var E=Math.floor(n.x),z=Math.floor(n.y);k.setAttribute("width",Math.ceil(A*(n.width+4)));k.setAttribute("height",Math.ceil(A*(n.height+4)));var B=k.getContext("2d");B.scale(A,A);B.translate(-E,-z);var J=x.background;if(null==J||""==J||J==mxConstants.NONE)J="#ffffff";B.save();B.fillStyle=J;B.fillRect(E,z,Math.ceil(n.width+4),Math.ceil(n.height+4));B.restore();if(null!=y){var M=new Image;M.src=y.src;B.drawImage(M,y.x*A,y.y*A,y.width*A,y.height*A)}var v=new mxJsCanvas(k), +u=new mxAsyncCanvas(this.thumbImageCache);v.images=this.thumbImageCache.images;var G=new mxImageExport;G.drawShape=function(I,F){I.shape instanceof mxShape&&I.shape.checkBounds()&&(F.save(),F.translate(.5,.5),I.shape.paint(F),F.translate(-.5,-.5),F.restore())};G.drawText=function(I,F){};G.drawState(x.getView().getState(x.model.root),u);u.finish(mxUtils.bind(this,function(){try{G.drawState(x.getView().getState(x.model.root),v),x!=this.editor.graph&&null!=x.container.parentNode&&x.container.parentNode.removeChild(x.container)}catch(I){k= +null}m(k)}));f=!0}}catch(I){f=!1,null!=x&&x!=this.editor.graph&&null!=x.container.parentNode&&x.container.parentNode.removeChild(x.container)}f||window.clearTimeout(l);return f};App.prototype.createBackground=function(){var b=this.createDiv("background");b.style.position="absolute";b.style.background="white";b.style.left="0px";b.style.top="0px";b.style.bottom="0px";b.style.right="0px";mxUtils.setOpacity(b,100);return b}; (function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(e,f){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var c=this.getCurrentFile();e=null!=c?c.getMode():e;e==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):e==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])), this.appIcon.style.cursor="pointer"):e==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor=e==App.MODE_DEVICE?"pointer":"default")}if(f)try{if(isLocalStorage)localStorage.setItem(".mode",e);else if("undefined"!=typeof Storage){var l=new Date;l.setYear(l.getFullYear()+1);document.cookie="MODE="+e+"; expires="+l.toUTCString()}}catch(m){}}})(); App.prototype.appIconClicked=function(b){if(mxEvent.isAltDown(b))this.showSplash(!0);else{var e=this.getCurrentFile(),f=null!=e?e.getMode():null;f==App.MODE_GOOGLE?null!=e&&null!=e.desc&&null!=e.desc.parents&&0<e.desc.parents.length&&!mxEvent.isShiftDown(b)?this.openLink("https://drive.google.com/drive/folders/"+e.desc.parents[0].id):null!=e&&null!=e.getId()?this.openLink("https://drive.google.com/open?id="+e.getId()):this.openLink("https://drive.google.com/?authuser=0"):f==App.MODE_ONEDRIVE?null!= @@ -12411,20 +12418,20 @@ App.prototype.showRefreshDialog=function(b,e){this.showingRefreshDialog||(this.s App.prototype.showAlert=function(b){if(null!=b&&0<b.length){var e=document.createElement("div");e.className="geAlert";e.style.zIndex=2E9;e.style.left="50%";e.style.top="-100%";e.style.maxWidth="80%";e.style.width="max-content";e.style.whiteSpace="pre-wrap";mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");e.innerHTML=b;b=document.createElement("a");b.className="geAlertLink";b.style.textAlign="right";b.style.marginTop="20px"; b.style.display="block";b.setAttribute("title",mxResources.get("close"));b.innerHTML=mxResources.get("close");e.appendChild(b);mxEvent.addListener(b,"click",function(f){null!=e.parentNode&&(e.parentNode.removeChild(e),mxEvent.consume(f))});document.body.appendChild(e);window.setTimeout(function(){e.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(e.style,"transition","all 2s ease");e.style.opacity="0";window.setTimeout(function(){null!=e.parentNode&&e.parentNode.removeChild(e)}, 2E3)},15E3)}}; -App.prototype.start=function(){null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{var b=this;window.onerror=function(m,x,z,C,d){"ResizeObserver loop limit exceeded"!=m&&(EditorUi.logError("Uncaught: "+(null!=m?m:""),x,z,C,d,null,!0),b.handleError({message:m},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this, +App.prototype.start=function(){null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{var b=this;window.onerror=function(m,x,y,D,d){"ResizeObserver loop limit exceeded"!=m&&(EditorUi.logError("Uncaught: "+(null!=m?m:""),x,y,D,d,null,!0),b.handleError({message:m},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this, function(m){var x=this.getCurrentFile();EditorUi.debug("storage event",[m],[x]);null!=x&&".draft-alive-check"==m.key&&null!=m.newValue&&null!=x.draftId&&(this.draftAliveCheck=m.newValue,x.saveDraft())})),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()||null!=urlParams.open||!/www\.draw\.io$/.test(window.location.hostname)||this.editor.chromeless&&!this.editor.editable||this.showNameChangeBanner()}catch(m){}mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(m){try{this.hideDialog(); -var x=this.getDiagramId(),z=this.getCurrentFile();null!=z&&z.getHash()==x||this.loadFile(x,!0)}catch(C){null!=document.body&&this.handleError(C,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var d=this.getCurrentFile();window.location.hash=null!=d?d.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(m){this.handleError(m,mxResources.get("errorLoadingFile"))}))}catch(m){this.handleError(m, -mxResources.get("errorLoadingFile"))}else if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var e=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var m=mxUtils.bind(this,function(C){Editor.isPngDataUrl(C)&&(C=Editor.extractGraphModelFromPng(C));var d=urlParams.title;d=null!=d?decodeURIComponent(d): -this.defaultFilename;C=new LocalFile(this,C,d,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(C.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(C);this.getCurrentFile().setModified(!this.editor.chromeless)}),x=window.opener||window.parent;if(x!=window){var z=urlParams.create;null!=z?m(x[decodeURIComponent(z)]):(z=urlParams.data,null!=z?m(decodeURIComponent(z)):this.installMessageHandler(mxUtils.bind(this,function(C,d){d.source==x&&m(C)})))}}else if(null== -this.dialog)if("1"==urlParams.demo)z=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=z;else{z=!1;try{z=null!=window.opener&&null!=window.opener.openFile}catch(C){}z?this.spinner.spin(document.body,mxResources.get("loading")):(z=this.getDiagramId(),!EditorUi.enableDrafts||null!=urlParams.mode||"draw.io"!=this.getServiceName()||null!=z&&0!=z.length||this.editor.isChromelessView()?null!=z&&0<z.length?this.loadFile(z,null,null,mxUtils.bind(this, -function(){var C=decodeURIComponent(urlParams.viewbox||"");if(""!=C)try{var d=JSON.parse(C);this.editor.graph.fitWindow(d,d.border)}catch(g){console.error(g)}})):"0"!=urlParams.splash||null!=urlParams.mode?this.loadFile():EditorUi.isElectronApp||this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0):this.checkDrafts())}}),f=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=f&&0<f.length&&this.spinner.spin(document.body, -mxResources.get("loading"))){var c=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),l=mxUtils.bind(this,function(m){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,m,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var x=urlParams.title;x=null!=x?decodeURIComponent(x):this.defaultFilename;m=this.getServiceCount(!0);isLocalStorage&&m++;var z=4>= -m?2:6<m?4:3;x=new CreateDialog(this,x,mxUtils.bind(this,function(C,d){if(null==d){this.hideDialog();var g=Editor.useLocalStorage;this.createFile(0<C.length?C:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=g}else this.pickFolder(d,mxUtils.bind(this,function(k){this.createFile(C,this.getFileData(!0),null,d,null,!0,k)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,z,null,null,null,this.editor.fileExtensions);this.showDialog(x.container,420,m>z? -390:280,!0,!1,mxUtils.bind(this,function(C){C&&null==this.getCurrentFile()&&this.showSplash()}));x.init()}});f=decodeURIComponent(f);if("http://"!=f.substring(0,7)&&"https://"!=f.substring(0,8))try{null!=window.opener&&null!=window.opener[f]?l(window.opener[f]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(m){this.handleError(m,mxResources.get("errorLoadingFile"))}else this.loadTemplate(f,function(m){l(m)},mxUtils.bind(this,function(m){this.handleError(m,mxResources.get("errorLoadingFile"), +var x=this.getDiagramId(),y=this.getCurrentFile();null!=y&&y.getHash()==x||this.loadFile(x,!0)}catch(D){null!=document.body&&this.handleError(D,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var d=this.getCurrentFile();window.location.hash=null!=d?d.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(m){this.handleError(m,mxResources.get("errorLoadingFile"))}))}catch(m){this.handleError(m, +mxResources.get("errorLoadingFile"))}else if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var e=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var m=mxUtils.bind(this,function(D){Editor.isPngDataUrl(D)&&(D=Editor.extractGraphModelFromPng(D));var d=urlParams.title;d=null!=d?decodeURIComponent(d): +this.defaultFilename;D=new LocalFile(this,D,d,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(D.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(D);this.getCurrentFile().setModified(!this.editor.chromeless)}),x=window.opener||window.parent;if(x!=window){var y=urlParams.create;null!=y?m(x[decodeURIComponent(y)]):(y=urlParams.data,null!=y?m(decodeURIComponent(y)):this.installMessageHandler(mxUtils.bind(this,function(D,d){d.source==x&&m(D)})))}}else if(null== +this.dialog)if("1"==urlParams.demo)y=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=y;else{y=!1;try{y=null!=window.opener&&null!=window.opener.openFile}catch(D){}y?this.spinner.spin(document.body,mxResources.get("loading")):(y=this.getDiagramId(),!EditorUi.enableDrafts||null!=urlParams.mode||"draw.io"!=this.getServiceName()||null!=y&&0!=y.length||this.editor.isChromelessView()?null!=y&&0<y.length?this.loadFile(y,null,null,mxUtils.bind(this, +function(){var D=decodeURIComponent(urlParams.viewbox||"");if(""!=D)try{var d=JSON.parse(D);this.editor.graph.fitWindow(d,d.border)}catch(g){console.error(g)}})):"0"!=urlParams.splash||null!=urlParams.mode?this.loadFile():EditorUi.isElectronApp||this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0):this.checkDrafts())}}),f=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=f&&0<f.length&&this.spinner.spin(document.body, +mxResources.get("loading"))){var c=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),l=mxUtils.bind(this,function(m){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,m,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var x=urlParams.title;x=null!=x?decodeURIComponent(x):this.defaultFilename;m=this.getServiceCount(!0);isLocalStorage&&m++;var y=4>= +m?2:6<m?4:3;x=new CreateDialog(this,x,mxUtils.bind(this,function(D,d){if(null==d){this.hideDialog();var g=Editor.useLocalStorage;this.createFile(0<D.length?D:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=g}else this.pickFolder(d,mxUtils.bind(this,function(k){this.createFile(D,this.getFileData(!0),null,d,null,!0,k)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,y,null,null,null,this.editor.fileExtensions);this.showDialog(x.container,420,m>y? +390:280,!0,!1,mxUtils.bind(this,function(D){D&&null==this.getCurrentFile()&&this.showSplash()}));x.init()}});f=decodeURIComponent(f);if("http://"!=f.substring(0,7)&&"https://"!=f.substring(0,8))try{null!=window.opener&&null!=window.opener[f]?l(window.opener[f]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(m){this.handleError(m,mxResources.get("errorLoadingFile"))}else this.loadTemplate(f,function(m){l(m)},mxUtils.bind(this,function(m){this.handleError(m,mxResources.get("errorLoadingFile"), c)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action?null!=this.stateArg.ids&&(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),window.location.hash="G"+this.stateArg.ids[0]):(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(window.history&& window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),this.setMode(App.MODE_GOOGLE),"0"==urlParams.splash?this.createFile(null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename):this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open","sketch"])),window.location.hash=urlParams.open), e())}}catch(m){this.handleError(m)}};App.prototype.loadDraft=function(b,e){this.createFile(this.defaultFilename,b,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var f=this.getCurrentFile();null!=f&&(f.fileChanged(),null!=e&&e())}),0)}),null,null,!0)}; -App.prototype.filterDrafts=function(b,e,f){function c(){f(l)}var l=[];try{this.getDatabaseItems(mxUtils.bind(this,function(m){EditorUi.debug("App.filterDrafts",[this],"items",m);for(var x=0;x<m.length;x++)try{var z=m[x].key;if(null!=z&&".draft_"==z.substring(0,7)){var C=JSON.parse(m[x].data);null!=C&&"draft"==C.type&&C.aliveCheck!=e&&(null==b&&null==C.fileObject||null!=C.fileObject&&C.fileObject.path==b)&&(C.key=z,l.push(C))}}catch(d){}c()},c))}catch(m){c()}}; +App.prototype.filterDrafts=function(b,e,f){function c(){f(l)}var l=[];try{this.getDatabaseItems(mxUtils.bind(this,function(m){EditorUi.debug("App.filterDrafts",[this],"items",m);for(var x=0;x<m.length;x++)try{var y=m[x].key;if(null!=y&&".draft_"==y.substring(0,7)){var D=JSON.parse(m[x].data);null!=D&&"draft"==D.type&&D.aliveCheck!=e&&(null==b&&null==D.fileObject||null!=D.fileObject&&D.fileObject.path==b)&&(D.key=y,l.push(D))}}catch(d){}c()},c))}catch(m){c()}}; App.prototype.checkDrafts=function(){try{var b=Editor.guid();localStorage.setItem(".draft-alive-check",b);window.setTimeout(mxUtils.bind(this,function(){localStorage.removeItem(".draft-alive-check");this.filterDrafts(null,b,mxUtils.bind(this,function(e){if(1==e.length)this.loadDraft(e[0].data,mxUtils.bind(this,function(){this.removeDatabaseItem(e[0].key)}));else if(1<e.length){var f=new Date(e[0].modified);f=new DraftDialog(this,1<e.length?mxResources.get("selectDraft"):mxResources.get("draftFound", [f.toLocaleDateString()+" "+f.toLocaleTimeString()]),1<e.length?null:e[0].data,mxUtils.bind(this,function(c){this.hideDialog();c=""!=c?c:0;this.loadDraft(e[c].data,mxUtils.bind(this,function(){this.removeDatabaseItem(e[c].key)}))}),mxUtils.bind(this,function(c,l){c=""!=c?c:0;this.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){this.removeDatabaseItem(e[c].key);null!=l&&l()}),mxResources.get("no"),mxResources.get("yes"))}),null,null,null,1<e.length?e:null);this.showDialog(f.container, 640,480,!0,!1,mxUtils.bind(this,function(c){"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}));f.init()}else"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(e){}}; @@ -12433,80 +12440,80 @@ mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash App.prototype.addLanguageMenu=function(b,e,f){var c=null;null!=this.menus.get("language")&&(c=document.createElement("div"),c.setAttribute("title",mxResources.get("language")),c.className="atlas"!=uiTheme?"geIcon geAdaptiveAsset":"",c.style.backgroundImage="url("+Editor.globeImage+")",c.style.backgroundPosition="right center",c.style.backgroundRepeat="no-repeat",c.style.backgroundSize="19px 19px",c.style.width="19px",c.style.height="19px",mxUtils.setOpacity(c,40),c.style.position="absolute",c.style.cursor= "pointer",c.style.bottom="20px",c.style.right=null!=f?f:"22px",e&&(c.style.direction="rtl",c.style.textAlign="right",c.style.right=null!=f?f:"24px",e=document.createElement("span"),e.style.display="inline-block",e.style.fontSize="12px",e.style.margin="2px 24px 0 0",e.style.userSelect="none",mxUtils.write(e,mxResources.get("language")),c.appendChild(e),e.className="atlas"!=uiTheme?"geAdaptiveAsset":""),mxEvent.addListener(c,"click",mxUtils.bind(this,function(l){this.editor.graph.popupMenuHandler.hideMenu(); var m=new mxPopupMenu(this.menus.get("language").funct);m.div.className+=" geMenubarMenu";m.smartSeparators=!0;m.showDisabled=!0;m.autoExpand=!0;m.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(m,arguments);m.destroy()});var x=mxUtils.getOffset(c);m.popup(x.x,x.y+c.offsetHeight,null,l);this.setCurrentMenu(m)})),b.appendChild(c));return c}; -App.prototype.loadFileSystemEntry=function(b,e,f){f=null!=f?f:mxUtils.bind(this,function(c){this.handleError(c)});try{b.getFile().then(mxUtils.bind(this,function(c){var l=new FileReader;l.onload=mxUtils.bind(this,function(m){try{if(null!=e){var x=m.target.result;"image/png"==c.type&&(x=this.extractGraphModelFromPng(x));e(new LocalFile(this,x,c.name,null,b,c))}else this.openFileHandle(m.target.result,c.name,c,!1,b)}catch(z){f(z)}});l.onerror=f;"image"!==c.type.substring(0,5)&&"application/pdf"!==c.type|| +App.prototype.loadFileSystemEntry=function(b,e,f){f=null!=f?f:mxUtils.bind(this,function(c){this.handleError(c)});try{b.getFile().then(mxUtils.bind(this,function(c){var l=new FileReader;l.onload=mxUtils.bind(this,function(m){try{if(null!=e){var x=m.target.result;"image/png"==c.type&&(x=this.extractGraphModelFromPng(x));e(new LocalFile(this,x,c.name,null,b,c))}else this.openFileHandle(m.target.result,c.name,c,!1,b)}catch(y){f(y)}});l.onerror=f;"image"!==c.type.substring(0,5)&&"application/pdf"!==c.type|| "image/svg"===c.type.substring(0,9)?l.readAsText(c):l.readAsDataURL(c)}),f)}catch(c){f(c)}}; App.prototype.createFileSystemOptions=function(b){var e=[],f=null;if(null!=b){var c=b.lastIndexOf(".");0<c&&(f=b.substring(c+1))}for(c=0;c<this.editor.diagramFileTypes.length;c++){var l={description:mxResources.get(this.editor.diagramFileTypes[c].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[c].extension+")":""),accept:{}};l.accept[this.editor.diagramFileTypes[c].mimeType]=["."+this.editor.diagramFileTypes[c].extension];this.editor.diagramFileTypes[c].extension==f?e.splice(0,0, l):this.editor.diagramFileTypes[c].extension==f?e.splice(0,0,l):e.push(l)}return{types:e,fileName:b}};App.prototype.showSaveFilePicker=function(b,e,f){e=null!=e?e:mxUtils.bind(this,function(c){"AbortError"!=c.name&&this.handleError(c)});f=null!=f?f:this.createFileSystemOptions();window.showSaveFilePicker(f).then(mxUtils.bind(this,function(c){null!=c&&c.getFile().then(mxUtils.bind(this,function(l){b(c,l)}),e)}),e)}; App.prototype.pickFile=function(b){try{if(b=null!=b?b:this.mode,b==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var e=this.getPeerForMode(b);if(null!=e)e.pickFile();else if(b==App.MODE_DEVICE&&EditorUi.nativeFileSupport)window.showOpenFilePicker().then(mxUtils.bind(this,function(x){null!=x&&0<x.length&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.loadFileSystemEntry(x[0])}), mxUtils.bind(this,function(x){"AbortError"!=x.name&&this.handleError(x)}));else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.openFileInputElt){var f=document.createElement("input");f.setAttribute("type","file");mxEvent.addListener(f,"change",mxUtils.bind(this,function(){null!=f.files&&(this.openFiles(f.files),f.type="",f.type="file",f.value="")}));f.style.display="none";document.body.appendChild(f);this.openFileInputElt=f}this.openFileInputElt.click()}else{this.hideDialog();window.openNew= -null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(x,z){StorageFile.listFiles(this,"F",x,z)});window.openBrowserFile=mxUtils.bind(this,function(x,z,C){StorageFile.getFileContent(this,x,z,C)});window.deleteBrowserFile=mxUtils.bind(this,function(x,z,C){StorageFile.deleteFile(this,x,z,C)});var c=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this, -function(x,z){var C=mxUtils.bind(this,function(){this.useCanvasForExport||".png"!=z.substring(z.length-4)||(z=z.substring(0,z.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,x,z):new LocalFile(this,x,z))}),d=this.getCurrentFile();null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,C,mxResources.get("cancel"),mxResources.get("discardChanges")):C()}));var l=this.dialog,m=l.close;this.dialog.close=mxUtils.bind(this,function(x){Editor.useLocalStorage= +null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(x,y){StorageFile.listFiles(this,"F",x,y)});window.openBrowserFile=mxUtils.bind(this,function(x,y,D){StorageFile.getFileContent(this,x,y,D)});window.deleteBrowserFile=mxUtils.bind(this,function(x,y,D){StorageFile.deleteFile(this,x,y,D)});var c=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this, +function(x,y){var D=mxUtils.bind(this,function(){this.useCanvasForExport||".png"!=y.substring(y.length-4)||(y=y.substring(0,y.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,x,y):new LocalFile(this,x,y))}),d=this.getCurrentFile();null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,D,mxResources.get("cancel"),mxResources.get("discardChanges")):D()}));var l=this.dialog,m=l.close;this.dialog.close=mxUtils.bind(this,function(x){Editor.useLocalStorage= c;m.apply(l,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(x){this.handleError(x)}}; App.prototype.pickLibrary=function(b){b=null!=b?b:this.mode;if(b==App.MODE_GOOGLE||b==App.MODE_DROPBOX||b==App.MODE_ONEDRIVE||b==App.MODE_GITHUB||b==App.MODE_GITLAB||b==App.MODE_TRELLO){var e=b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:this.dropbox;null!=e&&e.pickLibrary(mxUtils.bind(this,function(l,m){if(null!=m)try{this.loadLibrary(m)}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body, -mxResources.get("loading"))&&e.getLibrary(l,mxUtils.bind(this,function(x){this.spinner.stop();try{this.loadLibrary(x)}catch(z){this.handleError(z,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(x){this.handleError(x,null!=x?mxResources.get("errorLoadingFile"):null)}))}))}else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var f=document.createElement("input");f.setAttribute("type","file");mxEvent.addListener(f,"change",mxUtils.bind(this,function(){if(null!= -f.files){for(var l=0;l<f.files.length;l++)mxUtils.bind(this,function(m){var x=new FileReader;x.onload=mxUtils.bind(this,function(z){try{this.loadLibrary(new LocalLibrary(this,z.target.result,m.name))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}});x.readAsText(m)})(f.files[l]);f.type="";f.type="file";f.value=""}}));f.style.display="none";document.body.appendChild(f);this.libFileInputElt=f}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles= +mxResources.get("loading"))&&e.getLibrary(l,mxUtils.bind(this,function(x){this.spinner.stop();try{this.loadLibrary(x)}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(x){this.handleError(x,null!=x?mxResources.get("errorLoadingFile"):null)}))}))}else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var f=document.createElement("input");f.setAttribute("type","file");mxEvent.addListener(f,"change",mxUtils.bind(this,function(){if(null!= +f.files){for(var l=0;l<f.files.length;l++)mxUtils.bind(this,function(m){var x=new FileReader;x.onload=mxUtils.bind(this,function(y){try{this.loadLibrary(new LocalLibrary(this,y.target.result,m.name))}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}});x.readAsText(m)})(f.files[l]);f.type="";f.type="file";f.value=""}}));f.style.display="none";document.body.appendChild(f);this.libFileInputElt=f}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles= mxUtils.bind(this,function(l,m){StorageFile.listFiles(this,"L",l,m)});window.openBrowserFile=mxUtils.bind(this,function(l,m,x){StorageFile.getFileContent(this,l,m,x)});window.deleteBrowserFile=mxUtils.bind(this,function(l,m,x){StorageFile.deleteFile(this,l,m,x)});var c=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(l){this.hideDialog(l)}));window.openFile.setConsumer(mxUtils.bind(this,function(l,m){try{this.loadLibrary(b== App.MODE_BROWSER?new StorageLibrary(this,l,m):new LocalLibrary(this,l,m))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=c;window.openFile=null})}}; -App.prototype.saveLibrary=function(b,e,f,c,l,m,x){try{c=null!=c?c:this.mode;l=null!=l?l:!1;m=null!=m?m:!1;var z=this.createLibraryDataFromImages(e),C=mxUtils.bind(this,function(k){this.spinner.stop();null!=x&&x();this.handleError(k,null!=k?mxResources.get("errorSavingFile"):null)});null==f&&c==App.MODE_DEVICE&&(f=new LocalLibrary(this,z,b));if(null==f)this.pickFolder(c,mxUtils.bind(this,function(k){c==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))? -this.drive.insertFile(b,z,k,mxUtils.bind(this,function(n){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(n,e)}),C,this.drive.libraryMimeType):c==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,z,mxUtils.bind(this,function(n){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(n,e)}),C,k):c==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b, -z,mxUtils.bind(this,function(n){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(n,e)}),C,k):c==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,z,mxUtils.bind(this,function(n){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(n,e)}),C,k):c==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,z,mxUtils.bind(this,function(n){this.spinner.stop(); -this.hideDialog(!0);this.libraryLoaded(n,e)}),C,k):c==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,z,mxUtils.bind(this,function(n){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(n,e)}),C,k):c==App.MODE_BROWSER?(k=mxUtils.bind(this,function(){var n=new StorageLibrary(this,z,b);n.saveFile(b,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(n,e)}),C)}),null==localStorage.getItem(b)? -k():this.confirm(mxResources.get("replaceIt",[b]),k)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(l||this.spinner.spin(document.body,mxResources.get("saving"))){f.setData(z);var d=mxUtils.bind(this,function(){f.save(!0,mxUtils.bind(this,function(k){this.spinner.stop();this.hideDialog(!0);m||this.libraryLoaded(f,e);null!=x&&x()}),C)});if(b!=f.getTitle()){var g=f.getHash();f.rename(b,mxUtils.bind(this,function(k){f.constructor!=LocalLibrary&&g!=f.getHash()&& -(mxSettings.removeCustomLibrary(g),mxSettings.addCustomLibrary(f.getHash()));this.removeLibrarySidebar(g);d()}),C)}else d()}}catch(k){this.handleError(k)}}; +App.prototype.saveLibrary=function(b,e,f,c,l,m,x){try{c=null!=c?c:this.mode;l=null!=l?l:!1;m=null!=m?m:!1;var y=this.createLibraryDataFromImages(e),D=mxUtils.bind(this,function(k){this.spinner.stop();null!=x&&x();this.handleError(k,null!=k?mxResources.get("errorSavingFile"):null)});null==f&&c==App.MODE_DEVICE&&(f=new LocalLibrary(this,y,b));if(null==f)this.pickFolder(c,mxUtils.bind(this,function(k){c==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))? +this.drive.insertFile(b,y,k,mxUtils.bind(this,function(n){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(n,e)}),D,this.drive.libraryMimeType):c==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,y,mxUtils.bind(this,function(n){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(n,e)}),D,k):c==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b, +y,mxUtils.bind(this,function(n){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(n,e)}),D,k):c==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,y,mxUtils.bind(this,function(n){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(n,e)}),D,k):c==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,y,mxUtils.bind(this,function(n){this.spinner.stop(); +this.hideDialog(!0);this.libraryLoaded(n,e)}),D,k):c==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,y,mxUtils.bind(this,function(n){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(n,e)}),D,k):c==App.MODE_BROWSER?(k=mxUtils.bind(this,function(){var n=new StorageLibrary(this,y,b);n.saveFile(b,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(n,e)}),D)}),null==localStorage.getItem(b)? +k():this.confirm(mxResources.get("replaceIt",[b]),k)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(l||this.spinner.spin(document.body,mxResources.get("saving"))){f.setData(y);var d=mxUtils.bind(this,function(){f.save(!0,mxUtils.bind(this,function(k){this.spinner.stop();this.hideDialog(!0);m||this.libraryLoaded(f,e);null!=x&&x()}),D)});if(b!=f.getTitle()){var g=f.getHash();f.rename(b,mxUtils.bind(this,function(k){f.constructor!=LocalLibrary&&g!=f.getHash()&& +(mxSettings.removeCustomLibrary(g),mxSettings.addCustomLibrary(f.getHash()));this.removeLibrarySidebar(g);d()}),D)}else d()}}catch(k){this.handleError(k)}}; App.prototype.saveFile=function(b,e){var f=this.getCurrentFile();if(null!=f){var c=mxUtils.bind(this,function(){EditorUi.enableDrafts&&f.removeDraft();this.getCurrentFile()==f||f.isModified()||(f.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=e&&e()});if(b||null==f.getTitle()||null!=f.invalidFileHandle||null==this.mode)if(null!=f&&f.constructor==LocalFile&&null!=f.fileHandle)this.showSaveFilePicker(mxUtils.bind(this, -function(C,d){f.invalidFileHandle=null;f.fileHandle=C;f.title=d.name;f.desc=d;this.save(d.name,c)}),null,this.createFileSystemOptions(f.getTitle()));else{var l=null!=f.getTitle()?f.getTitle():this.defaultFilename,m=!mxClient.IS_IOS||!navigator.standalone,x=this.mode;b=this.getServiceCount(!0);isLocalStorage&&b++;var z=4>=b?2:6<b?4:3;l=new CreateDialog(this,l,mxUtils.bind(this,function(C,d,g){null!=C&&0<C.length&&(/(\.pdf)$/i.test(C)?this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this, -function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){g.value=C.split(".").slice(0,-1).join(".");g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?g.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no")):(this.hideDialog(),null==x&&d==App.MODE_DEVICE?null!=f&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(k,n){f.fileHandle=k;f.mode=App.MODE_DEVICE;f.title=n.name; -f.desc=n;this.setMode(App.MODE_DEVICE);this.save(n.name,c)}),mxUtils.bind(this,function(k){"AbortError"!=k.name&&this.handleError(k)}),this.createFileSystemOptions(C)):(this.setMode(App.MODE_DEVICE),this.save(C,c)):"download"==d?(new LocalFile(this,null,C)).save():"_blank"==d?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0)):x!=d?this.pickFolder(d,mxUtils.bind(this,function(k){this.createFile(C, -this.getFileData(/(\.xml)$/i.test(C)||0>C.indexOf(".")||/(\.drawio)$/i.test(C),/(\.svg)$/i.test(C),/(\.html)$/i.test(C)),null,d,c,null==this.mode,k)})):null!=d&&this.save(C,c)))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,m,null,!0,z,null,null,null,this.editor.fileExtensions,!1);this.showDialog(l.container,420,b>z?390:280,!0,!0);l.init()}else this.save(f.getTitle(),c)}}; -App.prototype.loadTemplate=function(b,e,f,c,l){var m=!1,x=b,z=null!=c?c:b,C=/(\.v(dx|sdx?))($|\?)/i.test(z)||/(\.vs(x|sx?))($|\?)/i.test(z);c=/\.png$/i.test(z)||/\.pdf$/i.test(z);this.editor.isCorsEnabledForUrl(x)||(m=c||C,x="t="+(new Date).getTime(),x=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+x+(m?"&base64=1":""));this.editor.loadUrl(x,mxUtils.bind(this,function(d){try{var g=m?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(d):atob(d):d;if(C||this.isVisioData(g))C||(z=l?this.isRemoteVisioData(g)? -"raw.vss":"raw.vssx":this.isRemoteVisioData(g)?"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(d.substring(d.indexOf(",")+1)),function(k){e(k)},f,z);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,z))this.isExternalDataComms()?this.parseFileData(g,mxUtils.bind(this,function(k){4==k.readyState&&200<=k.status&&299>=k.status&&"<mxGraphModel"==k.responseText.substring(0,13)&&e(k.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,f); -else if(this.isLucidChartData(g))this.convertLucidChart(g,mxUtils.bind(this,function(k){e(k)}),mxUtils.bind(this,function(k){f(k)}));else{if(/(\.png)($|\?)/i.test(z)||Editor.isPngData(g))g=Editor.extractGraphModelFromPng(d);e(g)}}catch(k){f(k)}}),f,/(\.png)($|\?)/i.test(z)||/(\.v(dx|sdx?))($|\?)/i.test(z)||/(\.vs(x|sx?))($|\?)/i.test(z),null,null,m)}; +function(D,d){f.invalidFileHandle=null;f.fileHandle=D;f.title=d.name;f.desc=d;this.save(d.name,c)}),null,this.createFileSystemOptions(f.getTitle()));else{var l=null!=f.getTitle()?f.getTitle():this.defaultFilename,m=!mxClient.IS_IOS||!navigator.standalone,x=this.mode;b=this.getServiceCount(!0);isLocalStorage&&b++;var y=4>=b?2:6<b?4:3;l=new CreateDialog(this,l,mxUtils.bind(this,function(D,d,g){null!=D&&0<D.length&&(/(\.pdf)$/i.test(D)?this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this, +function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){g.value=D.split(".").slice(0,-1).join(".");g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?g.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no")):(this.hideDialog(),null==x&&d==App.MODE_DEVICE?null!=f&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(k,n){f.fileHandle=k;f.mode=App.MODE_DEVICE;f.title=n.name; +f.desc=n;this.setMode(App.MODE_DEVICE);this.save(n.name,c)}),mxUtils.bind(this,function(k){"AbortError"!=k.name&&this.handleError(k)}),this.createFileSystemOptions(D)):(this.setMode(App.MODE_DEVICE),this.save(D,c)):"download"==d?(new LocalFile(this,null,D)).save():"_blank"==d?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0)):x!=d?this.pickFolder(d,mxUtils.bind(this,function(k){this.createFile(D, +this.getFileData(/(\.xml)$/i.test(D)||0>D.indexOf(".")||/(\.drawio)$/i.test(D),/(\.svg)$/i.test(D),/(\.html)$/i.test(D)),null,d,c,null==this.mode,k)})):null!=d&&this.save(D,c)))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,m,null,!0,y,null,null,null,this.editor.fileExtensions,!1);this.showDialog(l.container,420,b>y?390:280,!0,!0);l.init()}else this.save(f.getTitle(),c)}}; +App.prototype.loadTemplate=function(b,e,f,c,l){var m=!1,x=b,y=null!=c?c:b,D=/(\.v(dx|sdx?))($|\?)/i.test(y)||/(\.vs(x|sx?))($|\?)/i.test(y);c=/\.png$/i.test(y)||/\.pdf$/i.test(y);this.editor.isCorsEnabledForUrl(x)||(m=c||D,x="t="+(new Date).getTime(),x=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+x+(m?"&base64=1":""));this.editor.loadUrl(x,mxUtils.bind(this,function(d){try{var g=m?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(d):atob(d):d;if(D||this.isVisioData(g))D||(y=l?this.isRemoteVisioData(g)? +"raw.vss":"raw.vssx":this.isRemoteVisioData(g)?"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(d.substring(d.indexOf(",")+1)),function(k){e(k)},f,y);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,y))this.isExternalDataComms()?this.parseFileData(g,mxUtils.bind(this,function(k){4==k.readyState&&200<=k.status&&299>=k.status&&"<mxGraphModel"==k.responseText.substring(0,13)&&e(k.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,f); +else if(this.isLucidChartData(g))this.convertLucidChart(g,mxUtils.bind(this,function(k){e(k)}),mxUtils.bind(this,function(k){f(k)}));else{if(/(\.png)($|\?)/i.test(y)||Editor.isPngData(g))g=Editor.extractGraphModelFromPng(d);e(g)}}catch(k){f(k)}}),f,/(\.png)($|\?)/i.test(y)||/(\.v(dx|sdx?))($|\?)/i.test(y)||/(\.vs(x|sx?))($|\?)/i.test(y),null,null,m)}; App.prototype.getPeerForMode=function(b){return b==App.MODE_GOOGLE?this.drive:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_DROPBOX?this.dropbox:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_TRELLO?this.trello:null}; -App.prototype.createFile=function(b,e,f,c,l,m,x,z,C){c=z?null:null!=c?c:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){e=null!=e?e:this.emptyDiagramXml;var d=mxUtils.bind(this,function(){this.spinner.stop()}),g=mxUtils.bind(this,function(k){d();null==k&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=k&&this.handleError(k)});try{c==App.MODE_GOOGLE&&null!=this.drive?(null==x&&null!=this.stateArg&&null!=this.stateArg.folderId&&(x=this.stateArg.folderId), -this.drive.insertFile(b,e,x,mxUtils.bind(this,function(k){d();this.fileCreated(k,f,m,l,C)}),g)):c==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,e,mxUtils.bind(this,function(k){d();this.fileCreated(k,f,m,l,C)}),g,!1,x):c==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,e,mxUtils.bind(this,function(k){d();this.fileCreated(k,f,m,l,C)}),g,!1,x):c==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,e,mxUtils.bind(this,function(k){d();this.fileCreated(k,f,m,l,C)}),g, -!1,x):c==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,e,mxUtils.bind(this,function(k){d();this.fileCreated(k,f,m,l,C)}),g):c==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(b,e,mxUtils.bind(this,function(k){d();this.fileCreated(k,f,m,l,C)}),g,!1,x):c==App.MODE_BROWSER?StorageFile.insertFile(this,b,e,mxUtils.bind(this,function(k){d();this.fileCreated(k,f,m,l,C)}),g):!z&&c==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(d(),this.showSaveFilePicker(mxUtils.bind(this, -function(k,n){var t=new LocalFile(this,e,n.name,null,k,n);t.saveFile(n.name,!1,mxUtils.bind(this,function(){this.fileCreated(t,f,m,l,C)}),g,!0)}),mxUtils.bind(this,function(k){"AbortError"!=k.name&&g(k)}),this.createFileSystemOptions(b))):(d(),this.fileCreated(new LocalFile(this,e,b,null==c),f,m,l,C))}catch(k){d(),this.handleError(k)}}}; -App.prototype.fileCreated=function(b,e,f,c,l){var m=window.location.pathname;null!=e&&0<e.length&&(m+="?libs="+e);null!=l&&0<l.length&&(m+="?clibs="+l);m=this.getUrl(m);b.getMode()!=App.MODE_DEVICE&&(m+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var x=b.getData();x=0<x.length?this.editor.extractGraphModel(mxUtils.parseXml(x).documentElement,!0):null;var z=window.location.protocol+"//"+window.location.hostname+m,C=x,d=null;null!=x&&/\.svg$/i.test(b.getTitle())&& -(d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(d.container),C=this.decodeNodeIntoGraph(C,d));b.setData(this.createFileData(x,d,b,z));null!=d&&d.container.parentNode.removeChild(d.container);var g=mxUtils.bind(this,function(){this.spinner.stop()}),k=mxUtils.bind(this,function(){g();var n=this.getCurrentFile();null==f&&null!=n&&(f=!n.isModified()&&null==n.getMode());var t=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b);f&&b.addAllSavedStatus(); -null!=e&&this.sidebar.showEntries(e);if(null!=l){for(var A=[],E=l.split(";"),y=0;y<E.length;y++)A.push(decodeURIComponent(E[y]));this.loadLibraries(A)}}),p=mxUtils.bind(this,function(){f||null==n||!n.isModified()?t():this.confirm(mxResources.get("allChangesLost"),null,t,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=c&&c();null==f||f?p():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(), +App.prototype.createFile=function(b,e,f,c,l,m,x,y,D){c=y?null:null!=c?c:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){e=null!=e?e:this.emptyDiagramXml;var d=mxUtils.bind(this,function(){this.spinner.stop()}),g=mxUtils.bind(this,function(k){d();null==k&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=k&&this.handleError(k)});try{c==App.MODE_GOOGLE&&null!=this.drive?(null==x&&null!=this.stateArg&&null!=this.stateArg.folderId&&(x=this.stateArg.folderId), +this.drive.insertFile(b,e,x,mxUtils.bind(this,function(k){d();this.fileCreated(k,f,m,l,D)}),g)):c==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,e,mxUtils.bind(this,function(k){d();this.fileCreated(k,f,m,l,D)}),g,!1,x):c==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,e,mxUtils.bind(this,function(k){d();this.fileCreated(k,f,m,l,D)}),g,!1,x):c==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,e,mxUtils.bind(this,function(k){d();this.fileCreated(k,f,m,l,D)}),g, +!1,x):c==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,e,mxUtils.bind(this,function(k){d();this.fileCreated(k,f,m,l,D)}),g):c==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(b,e,mxUtils.bind(this,function(k){d();this.fileCreated(k,f,m,l,D)}),g,!1,x):c==App.MODE_BROWSER?StorageFile.insertFile(this,b,e,mxUtils.bind(this,function(k){d();this.fileCreated(k,f,m,l,D)}),g):!y&&c==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(d(),this.showSaveFilePicker(mxUtils.bind(this, +function(k,n){var q=new LocalFile(this,e,n.name,null,k,n);q.saveFile(n.name,!1,mxUtils.bind(this,function(){this.fileCreated(q,f,m,l,D)}),g,!0)}),mxUtils.bind(this,function(k){"AbortError"!=k.name&&g(k)}),this.createFileSystemOptions(b))):(d(),this.fileCreated(new LocalFile(this,e,b,null==c),f,m,l,D))}catch(k){d(),this.handleError(k)}}}; +App.prototype.fileCreated=function(b,e,f,c,l){var m=window.location.pathname;null!=e&&0<e.length&&(m+="?libs="+e);null!=l&&0<l.length&&(m+="?clibs="+l);m=this.getUrl(m);b.getMode()!=App.MODE_DEVICE&&(m+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var x=b.getData();x=0<x.length?this.editor.extractGraphModel(mxUtils.parseXml(x).documentElement,!0):null;var y=window.location.protocol+"//"+window.location.hostname+m,D=x,d=null;null!=x&&/\.svg$/i.test(b.getTitle())&& +(d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(d.container),D=this.decodeNodeIntoGraph(D,d));b.setData(this.createFileData(x,d,b,y));null!=d&&d.container.parentNode.removeChild(d.container);var g=mxUtils.bind(this,function(){this.spinner.stop()}),k=mxUtils.bind(this,function(){g();var n=this.getCurrentFile();null==f&&null!=n&&(f=!n.isModified()&&null==n.getMode());var q=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b);f&&b.addAllSavedStatus(); +null!=e&&this.sidebar.showEntries(e);if(null!=l){for(var A=[],E=l.split(";"),z=0;z<E.length;z++)A.push(decodeURIComponent(E[z]));this.loadLibraries(A)}}),p=mxUtils.bind(this,function(){f||null==n||!n.isModified()?q():this.confirm(mxResources.get("allChangesLost"),null,q,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=c&&c();null==f||f?p():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(), null==b.getMode())),null!=c&&c(),window.openWindow(m,null,p))});b.constructor==LocalFile?k():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){k()}),mxUtils.bind(this,function(n){g();null!=n&&"AbortError"==n.name||this.handleError(n)}))}}; -App.prototype.loadFile=function(b,e,f,c,l){if("1"==urlParams.openInSameWin||navigator.standalone)e=!0;this.hideDialog();var m=mxUtils.bind(this,function(){if(null==b||0==b.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var C=mxUtils.bind(this,function(t){this.handleError(t,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var p=this.getCurrentFile(); -window.location.hash=null!=p?p.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(t){null!=t?(this.fileLoaded(new StorageFile(this,t,b)),null!=c&&c()):C({message:mxResources.get("fileNotFound")})}),C)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var t=this.getCurrentFile();window.location.hash=null!=t?t.getHash():""}));else if(null!=f)this.spinner.stop(), +App.prototype.loadFile=function(b,e,f,c,l){if("1"==urlParams.openInSameWin||navigator.standalone)e=!0;this.hideDialog();var m=mxUtils.bind(this,function(){if(null==b||0==b.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var D=mxUtils.bind(this,function(q){this.handleError(q,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var p=this.getCurrentFile(); +window.location.hash=null!=p?p.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(q){null!=q?(this.fileLoaded(new StorageFile(this,q,b)),null!=c&&c()):D({message:mxResources.get("fileNotFound")})}),D)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var q=this.getCurrentFile();window.location.hash=null!=q?q.getHash():""}));else if(null!=f)this.spinner.stop(), this.fileLoaded(f),null!=c&&c();else if("S"==b.charAt(0))this.spinner.stop(),this.alert("[Deprecation] #S is no longer supported, go to https://app.diagrams.net/?desc="+b.substring(1).substring(0,10),mxUtils.bind(this,function(){window.location.href="https://app.diagrams.net/?desc="+b.substring(1)}));else if("R"==b.charAt(0)){this.spinner.stop();var d=decodeURIComponent(b.substring(1));"<"!=d.charAt(0)&&(d=Graph.decompress(d));d=new LocalFile(this,d,null!=urlParams.title?decodeURIComponent(urlParams.title): -this.defaultFilename,!0);d.getHash=function(){return b};this.fileLoaded(d);null!=c&&c()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(t,p){this.spinner.stop();this.fileLoaded(new EmbedFile(this,t,p));null!=c&&c()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")}, -mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var g=decodeURIComponent(b.substring(1)),k=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=g.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var t=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var p=g.substring(31,g.lastIndexOf("&ex"));this.loadFile("G"+p,e,null,mxUtils.bind(this,function(){var A=this.getCurrentFile();null!=A&&this.editor.chromeless&& -!this.editor.editable&&(A.getHash=function(){return"G"+p},window.location.hash="#"+A.getHash());null!=c&&c()}));return!0}return!1});!t()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",t);return!0});this.loadTemplate(g,mxUtils.bind(this,function(t){this.spinner.stop();if(null!=t&&0<t.length){var p=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var A=g,E=g.lastIndexOf("."),y=A.lastIndexOf("/");E>y&&0<y&&(A=A.substring(y+1,E),E=g.substring(E), -this.useCanvasForExport||".png"!=E||(E=".drawio"),".svg"===E||".xml"===E||".html"===E||".png"===E||".drawio"===E)&&(p=A+E)}t=new LocalFile(this,t,null!=urlParams.title?decodeURIComponent(urlParams.title):p,!0);t.getHash=function(){return b};this.fileLoaded(t,!0)?null!=c&&c():k()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else k()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this, +this.defaultFilename,!0);d.getHash=function(){return b};this.fileLoaded(d);null!=c&&c()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(q,p){this.spinner.stop();this.fileLoaded(new EmbedFile(this,q,p));null!=c&&c()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")}, +mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var g=decodeURIComponent(b.substring(1)),k=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=g.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var q=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var p=g.substring(31,g.lastIndexOf("&ex"));this.loadFile("G"+p,e,null,mxUtils.bind(this,function(){var A=this.getCurrentFile();null!=A&&this.editor.chromeless&& +!this.editor.editable&&(A.getHash=function(){return"G"+p},window.location.hash="#"+A.getHash());null!=c&&c()}));return!0}return!1});!q()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",q);return!0});this.loadTemplate(g,mxUtils.bind(this,function(q){this.spinner.stop();if(null!=q&&0<q.length){var p=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var A=g,E=g.lastIndexOf("."),z=A.lastIndexOf("/");E>z&&0<z&&(A=A.substring(z+1,E),E=g.substring(E), +this.useCanvasForExport||".png"!=E||(E=".drawio"),".svg"===E||".xml"===E||".html"===E||".png"===E||".drawio"===E)&&(p=A+E)}q=new LocalFile(this,q,null!=urlParams.title?decodeURIComponent(urlParams.title):p,!0);q.getHash=function(){return b};this.fileLoaded(q,!0)?null!=c&&c():k()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else k()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this, function(){k()||(this.spinner.stop(),this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else if(d=null,"G"==b.charAt(0)?d=this.drive:"D"==b.charAt(0)?d=this.dropbox:"W"==b.charAt(0)?d=this.oneDrive:"H"==b.charAt(0)?d=this.gitHub:"A"==b.charAt(0)?d=this.gitLab:"T"==b.charAt(0)&&(d=this.trello),null==d)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")}, -mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var t=this.getCurrentFile();window.location.hash=null!=t?t.getHash():""}));else{var n=b.charAt(0);b=decodeURIComponent(b.substring(1));d.getFile(b,mxUtils.bind(this,function(t){this.spinner.stop();this.fileLoaded(t);var p=this.getCurrentFile();null==p?(window.location.hash="",this.showSplash()):this.editor.chromeless&&!this.editor.editable?(p.getHash=function(){return n+b},window.location.hash="#"+p.getHash()):t==p&&null==t.getMode()&& -(t=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+t+'" class="geStatusAlert">'+t+"</div>"));null!=c&&c()}),mxUtils.bind(this,function(t){null!=window.console&&null!=t&&console.log("error in loadFile:",b,t);var p=mxUtils.bind(this,function(){var A=this.getCurrentFile();null==A?(window.location.hash="",this.showSplash()):window.location.hash="#"+A.getHash()});null==t||"AbortError"!=t.name?this.handleError(t,null!=t?mxResources.get("errorLoadingFile"):null,p,null,null,"#"+n+b):p()}))}}), -x=this.getCurrentFile(),z=mxUtils.bind(this,function(){l||null==x||!x.isModified()?m():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=x&&(window.location.hash=x.getHash())}),m,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?z():null==x||e?z():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,z)).container,320,140,!0,!0)}; +mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var q=this.getCurrentFile();window.location.hash=null!=q?q.getHash():""}));else{var n=b.charAt(0);b=decodeURIComponent(b.substring(1));d.getFile(b,mxUtils.bind(this,function(q){this.spinner.stop();this.fileLoaded(q);var p=this.getCurrentFile();null==p?(window.location.hash="",this.showSplash()):this.editor.chromeless&&!this.editor.editable?(p.getHash=function(){return n+b},window.location.hash="#"+p.getHash()):q==p&&null==q.getMode()&& +(q=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+q+'" class="geStatusAlert">'+q+"</div>"));null!=c&&c()}),mxUtils.bind(this,function(q){null!=window.console&&null!=q&&console.log("error in loadFile:",b,q);var p=mxUtils.bind(this,function(){var A=this.getCurrentFile();null==A?(window.location.hash="",this.showSplash()):window.location.hash="#"+A.getHash()});null==q||"AbortError"!=q.name?this.handleError(q,null!=q?mxResources.get("errorLoadingFile"):null,p,null,null,"#"+n+b):p()}))}}), +x=this.getCurrentFile(),y=mxUtils.bind(this,function(){l||null==x||!x.isModified()?m():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=x&&(window.location.hash=x.getHash())}),m,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?y():null==x||e?y():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,y)).container,320,140,!0,!0)}; App.prototype.getLibraryStorageHint=function(b){var e=b.getTitle();b.constructor!=LocalLibrary&&(e+="\n"+b.getHash());b.constructor==DriveLibrary?e+=" ("+mxResources.get("googleDrive")+")":b.constructor==GitHubLibrary?e+=" ("+mxResources.get("github")+")":b.constructor==TrelloLibrary?e+=" ("+mxResources.get("trello")+")":b.constructor==DropboxLibrary?e+=" ("+mxResources.get("dropbox")+")":b.constructor==OneDriveLibrary?e+=" ("+mxResources.get("oneDrive")+")":b.constructor==StorageLibrary?e+=" ("+ mxResources.get("browser")+")":b.constructor==LocalLibrary&&(e+=" ("+mxResources.get("device")+")");return e};App.prototype.restoreLibraries=function(){function b(f){for(var c=0;c<f.length;c++)""!=f[c]&&0>mxUtils.indexOf(e,f[c])&&e.push(f[c])}var e=[];b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"));this.loadLibraries(e)}; -App.prototype.loadLibraries=function(b,e){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var f=mxUtils.bind(this,function(d,g){g||mxSettings.removeCustomLibrary(d);delete this.loadedLibraries[d]}),c=0,l=[],m=0<b.length&&"L.scratchpad"==b[0]?1:0,x=mxUtils.bind(this,function(){if(0==c){if(null!=b)for(var d=b.length-1;0<=d;d--)null!=l[d]&&this.loadLibrary(l[d],d<=m);null!=e&&e()}});if(null!=b)for(var z=0;z<b.length;z++){var C=encodeURIComponent(decodeURIComponent(b[z])); -mxUtils.bind(this,function(d,g){if(null!=d&&0<d.length&&null==this.loadedLibraries[d]&&null==this.sidebar.palettes[d]){this.loadedLibraries[d]=!0;c++;var k=mxUtils.bind(this,function(y){l[g]=y;c--;x()}),n=mxUtils.bind(this,function(y){f(d,y);c--;x()}),t=d.substring(0,1);if("L"==t)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var y=decodeURIComponent(d.substring(1));StorageFile.getFileContent(this,y,mxUtils.bind(this,function(B){".scratchpad"==y&&null== -B&&(B=this.emptyLibraryXml);null!=B?k(new StorageLibrary(this,B,y)):n()}),n)}catch(B){n()}}),0);else if("U"==t){var p=decodeURIComponent(d.substring(1));this.isOffline()||this.loadTemplate(p,mxUtils.bind(this,function(y){null!=y&&0<y.length?k(new UrlLibrary(this,y,p)):n()}),function(){n()},null,!0)}else if("R"==t){t=decodeURIComponent(d.substring(1));try{t=JSON.parse(t);var A={id:t[0],title:t[1],downloadUrl:t[2]};this.remoteInvoke("getFileContent",[A.downloadUrl],null,mxUtils.bind(this,function(y){try{k(new RemoteLibrary(this, -y,A))}catch(B){n()}}),function(){n()})}catch(y){n()}}else if("S"==t&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(d.substring(1)),function(y){k(y)},n)}catch(y){n()}else{var E=null;"G"==t?null!=this.drive&&null!=this.drive.user&&(E=this.drive):"H"==t?null!=this.gitHub&&null!=this.gitHub.getUser()&&(E=this.gitHub):"T"==t?null!=this.trello&&this.trello.isAuthorized()&&(E=this.trello):"D"==t?null!=this.dropbox&&null!=this.dropbox.getUser()&&(E=this.dropbox):"W"==t&&null!=this.oneDrive&& -null!=this.oneDrive.getUser()&&(E=this.oneDrive);null!=E?E.getLibrary(decodeURIComponent(d.substring(1)),mxUtils.bind(this,function(y){try{k(y)}catch(B){n()}}),function(y){n()}):n(!0)}}})(C,z)}x()}}; -App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var b=this.getCurrentFile();"1"==urlParams.embed&&("atlas"==uiTheme||"1"==urlParams.atlas?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="1"==urlParams.noLangIcon?"0":"25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"));this.commentsSupported()&&"1"!=urlParams.sketch?null==this.commentButton&& -(this.commentButton=document.createElement("a"),this.commentButton.setAttribute("title",mxResources.get("comments")),this.commentButton.className="geToolbarButton geAdaptiveAsset",this.commentButton.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;float:left;cursor:pointer;width:24px;height:24px;background-size:24px 24px;background-position:center center;background-repeat:no-repeat;background-image:url("+Editor.commentImage+");","atlas"==uiTheme?(this.commentButton.style.marginRight= -"10px",this.commentButton.style.marginTop="-3px"):this.commentButton.style.marginTop="min"==uiTheme?"1px":"1"==urlParams.atlas?"-2px":"-5px",mxEvent.addListener(this.commentButton,"click",mxUtils.bind(this,function(){this.actions.get("comments").funct()})),this.buttonContainer.appendChild(this.commentButton),"atlas"==uiTheme&&(this.commentButton.style.filter="invert(100%)")):null!=this.commentButton&&(this.commentButton.parentNode.removeChild(this.commentButton),this.commentButton=null);"1"==urlParams.embed|| -"draw.io"!=this.getServiceName()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()?null!=urlParams.notif&&this.fetchAndShowNotification(urlParams.notif):(null!=b?null==this.shareButton&&(this.shareButton=document.createElement("div"),this.shareButton.className="geBtn gePrimaryBtn",this.shareButton.style.display="inline-block",this.shareButton.style.backgroundColor="#F2931E",this.shareButton.style.borderColor="#F08705",this.shareButton.style.backgroundImage="none",this.shareButton.style.padding= -"2px 10px 0 10px",this.shareButton.style.marginTop="-10px",this.shareButton.style.height="28px",this.shareButton.style.lineHeight="28px",this.shareButton.style.minWidth="0px",this.shareButton.style.cssFloat="right",this.shareButton.setAttribute("title",mxResources.get("share")),b=document.createElement("img"),b.className="geInverseAdaptiveAsset",b.setAttribute("src",this.shareImage),b.setAttribute("align","absmiddle"),b.style.marginRight="4px",b.style.marginTop="-3px",this.shareButton.appendChild(b), -"atlas"!=uiTheme&&(this.shareButton.style.color="black",b.style.filter="invert(100%)"),mxUtils.write(this.shareButton,mxResources.get("share")),mxEvent.addListener(this.shareButton,"click",mxUtils.bind(this,function(){this.actions.get("share").funct()})),this.buttonContainer.appendChild(this.shareButton)):null!=this.shareButton&&(this.shareButton.parentNode.removeChild(this.shareButton),this.shareButton=null),"1"!=urlParams.extAuth&&this.fetchAndShowNotification("online",this.mode))}}; -App.prototype.fetchAndShowNotification=function(b,e){if(!this.fetchingNotif){b=b||"online";var f=null,c=mxUtils.bind(this,function(l){l=l.filter(function(C){return!C.targets||-1<C.targets.indexOf(b)||null!=e&&-1<C.targets.indexOf(e)});for(var m=b+"NotifReadTS",x=isLocalStorage?parseInt(localStorage.getItem(m)):!0,z=0;z<l.length;z++)l[z].isNew=!x||l[z].timestamp>x;this.showNotification(l,m)});try{isLocalStorage&&(f=JSON.parse(localStorage.getItem(".notifCache")))}catch(l){}null==f||f.ts+864E5<Date.now()? +App.prototype.loadLibraries=function(b,e){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var f=mxUtils.bind(this,function(d,g){g||mxSettings.removeCustomLibrary(d);delete this.loadedLibraries[d]}),c=0,l=[],m=0<b.length&&"L.scratchpad"==b[0]?1:0,x=mxUtils.bind(this,function(){if(0==c){if(null!=b)for(var d=b.length-1;0<=d;d--)null!=l[d]&&this.loadLibrary(l[d],d<=m);null!=e&&e()}});if(null!=b)for(var y=0;y<b.length;y++){var D=encodeURIComponent(decodeURIComponent(b[y])); +mxUtils.bind(this,function(d,g){if(null!=d&&0<d.length&&null==this.loadedLibraries[d]&&null==this.sidebar.palettes[d]){this.loadedLibraries[d]=!0;c++;var k=mxUtils.bind(this,function(z){l[g]=z;c--;x()}),n=mxUtils.bind(this,function(z){f(d,z);c--;x()}),q=d.substring(0,1);if("L"==q)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var z=decodeURIComponent(d.substring(1));StorageFile.getFileContent(this,z,mxUtils.bind(this,function(B){".scratchpad"==z&&null== +B&&(B=this.emptyLibraryXml);null!=B?k(new StorageLibrary(this,B,z)):n()}),n)}catch(B){n()}}),0);else if("U"==q){var p=decodeURIComponent(d.substring(1));this.isOffline()||this.loadTemplate(p,mxUtils.bind(this,function(z){null!=z&&0<z.length?k(new UrlLibrary(this,z,p)):n()}),function(){n()},null,!0)}else if("R"==q){q=decodeURIComponent(d.substring(1));try{q=JSON.parse(q);var A={id:q[0],title:q[1],downloadUrl:q[2]};this.remoteInvoke("getFileContent",[A.downloadUrl],null,mxUtils.bind(this,function(z){try{k(new RemoteLibrary(this, +z,A))}catch(B){n()}}),function(){n()})}catch(z){n()}}else if("S"==q&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(d.substring(1)),function(z){k(z)},n)}catch(z){n()}else{var E=null;"G"==q?null!=this.drive&&null!=this.drive.user&&(E=this.drive):"H"==q?null!=this.gitHub&&null!=this.gitHub.getUser()&&(E=this.gitHub):"T"==q?null!=this.trello&&this.trello.isAuthorized()&&(E=this.trello):"D"==q?null!=this.dropbox&&null!=this.dropbox.getUser()&&(E=this.dropbox):"W"==q&&null!=this.oneDrive&& +null!=this.oneDrive.getUser()&&(E=this.oneDrive);null!=E?E.getLibrary(decodeURIComponent(d.substring(1)),mxUtils.bind(this,function(z){try{k(z)}catch(B){n()}}),function(z){n()}):n(!0)}}})(D,y)}x()}}; +App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var b=this.getCurrentFile();"1"==urlParams.embed&&(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px");this.commentsSupported()&&"1"!=urlParams.sketch?null==this.commentButton&&(this.commentButton=document.createElement("a"),this.commentButton.setAttribute("title",mxResources.get("comments")),this.commentButton.className="geToolbarButton geAdaptiveAsset",this.commentButton.style.cssText= +"display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;float:left;cursor:pointer;width:24px;height:24px;background-size:24px 24px;background-position:center center;background-repeat:no-repeat;background-image:url("+Editor.commentImage+");","atlas"==uiTheme?(this.commentButton.style.marginRight="10px",this.commentButton.style.marginTop="-3px"):this.commentButton.style.marginTop="min"==uiTheme?"1px":"1"==urlParams.atlas?"-2px":"-5px",mxEvent.addListener(this.commentButton,"click", +mxUtils.bind(this,function(){this.actions.get("comments").funct()})),this.buttonContainer.appendChild(this.commentButton),"atlas"==uiTheme&&(this.commentButton.style.filter="invert(100%)")):null!=this.commentButton&&(this.commentButton.parentNode.removeChild(this.commentButton),this.commentButton=null);"1"==urlParams.embed||"draw.io"!=this.getServiceName()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()?null!=urlParams.notif&&this.fetchAndShowNotification(urlParams.notif):(null!= +b?null==this.shareButton&&(this.shareButton=document.createElement("div"),this.shareButton.className="geBtn gePrimaryBtn",this.shareButton.style.display="inline-block",this.shareButton.style.backgroundColor="#F2931E",this.shareButton.style.borderColor="#F08705",this.shareButton.style.backgroundImage="none",this.shareButton.style.padding="2px 10px 0 10px",this.shareButton.style.marginTop="-10px",this.shareButton.style.height="28px",this.shareButton.style.lineHeight="28px",this.shareButton.style.minWidth= +"0px",this.shareButton.style.cssFloat="right",this.shareButton.setAttribute("title",mxResources.get("share")),b=document.createElement("img"),b.className="geInverseAdaptiveAsset",b.setAttribute("src",this.shareImage),b.setAttribute("align","absmiddle"),b.style.marginRight="4px",b.style.marginTop="-3px",this.shareButton.appendChild(b),"atlas"!=uiTheme&&(this.shareButton.style.color="black",b.style.filter="invert(100%)"),mxUtils.write(this.shareButton,mxResources.get("share")),mxEvent.addListener(this.shareButton, +"click",mxUtils.bind(this,function(){this.actions.get("share").funct()})),this.buttonContainer.appendChild(this.shareButton)):null!=this.shareButton&&(this.shareButton.parentNode.removeChild(this.shareButton),this.shareButton=null),"1"!=urlParams.extAuth&&this.fetchAndShowNotification("online",this.mode))}}; +App.prototype.fetchAndShowNotification=function(b,e){if(!this.fetchingNotif){b=b||"online";var f=null,c=mxUtils.bind(this,function(l){l=l.filter(function(D){return!D.targets||-1<D.targets.indexOf(b)||null!=e&&-1<D.targets.indexOf(e)});for(var m=b+"NotifReadTS",x=isLocalStorage?parseInt(localStorage.getItem(m)):!0,y=0;y<l.length;y++)l[y].isNew=!x||l[y].timestamp>x;this.showNotification(l,m)});try{isLocalStorage&&(f=JSON.parse(localStorage.getItem(".notifCache")))}catch(l){}null==f||f.ts+864E5<Date.now()? (this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,function(l){200<=l.getStatus()&&299>=l.getStatus()&&(l=JSON.parse(l.getText()),l.sort(function(m,x){return x.timestamp-m.timestamp}),isLocalStorage&&localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:l})),this.fetchingNotif=!1,c(l))}))):c(f.notifs)}}; App.prototype.showNotification=function(b,e){function f(d){var g=document.querySelector(".geNotification-count");null!=g&&(g.innerHTML=d,g.style.display=0==d?"none":"",g=document.querySelector(".geNotification-bell"),g.style.animation=0==d?"none":"",g.className="geNotification-bell"+(0==d?" geNotification-bellOff":""),document.querySelector(".geBell-rad").style.animation=0==d?"none":"")}var c=b.length;if("min"==uiTheme)for(var l=c=0;l<b.length;l++)b[l].isNew&&c++;if(0==c)null!=this.notificationBtn&& (this.notificationBtn.style.display="none",this.editor.fireEvent(new mxEventObject("statusChanged")));else{var m=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var d=this.notificationWin.querySelectorAll(".circle.active"),g=0;g<d.length;g++)d[g].className="circle";isLocalStorage&&b[0]&&localStorage.setItem(e,b[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className="geNotification-box";"min"==uiTheme? (this.notificationBtn.style.width="30px",this.notificationBtn.style.top="4px"):"1"==urlParams.atlas&&(this.notificationBtn.style.top="2px");c=document.createElement("span");c.className="geNotification-count";this.notificationBtn.appendChild(c);c=document.createElement("div");c.className="geNotification-bell";c.style.opacity="min"==uiTheme?"0.5":"";l=document.createElement("span");l.className="geBell-top";c.appendChild(l);l=document.createElement("span");l.className="geBell-middle";c.appendChild(l); l=document.createElement("span");l.className="geBell-bottom";c.appendChild(l);l=document.createElement("span");l.className="geBell-rad";c.appendChild(l);this.notificationBtn.appendChild(c);this.buttonContainer.insertBefore(this.notificationBtn,this.buttonContainer.firstChild);this.notificationWin=document.createElement("div");this.notificationWin.className="geNotifPanel";this.notificationWin.style.display="none";document.body.appendChild(this.notificationWin);l=document.createElement("div");l.className= "header";c=document.createElement("span");c.className="title";c.textContent=mxResources.get("notifications");l.appendChild(c);c=document.createElement("span");c.className="closeBtn";c.textContent="x";l.appendChild(c);this.notificationWin.appendChild(l);l=document.createElement("div");l.className="notifications clearfix";var x=document.createElement("div");x.setAttribute("id","geNotifList");x.style.position="relative";l.appendChild(x);this.notificationWin.appendChild(l);mxEvent.addListener(this.notificationBtn, -"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=0;var d=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=d.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=d.right-this.notificationWin.clientWidth+"px";f(0)}else m()}));mxEvent.addListener(c,"click",m)}else this.notificationBtn.style.display="";var z=0,C=document.getElementById("geNotifList"); -if(null!=C){C.innerHTML='<div class="line"></div>';for(l=0;l<b.length;l++)(function(d,g){g.isNew&&z++;var k=document.createElement("div");k.className="notification";d=d.timeSince(new Date(g.timestamp));null==d&&(d=mxResources.get("lessThanAMinute"));k.innerHTML='<div class="circle'+(g.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[d],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(g.content)+"</p>";g.link&&mxEvent.addListener(k,"click",function(){window.open(g.link, -"notifWin")});C.appendChild(k)})(this,b[l]);f(z)}}}; +"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=0;var d=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=d.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=d.right-this.notificationWin.clientWidth+"px";f(0)}else m()}));mxEvent.addListener(c,"click",m)}else this.notificationBtn.style.display="";var y=0,D=document.getElementById("geNotifList"); +if(null!=D){D.innerHTML='<div class="line"></div>';for(l=0;l<b.length;l++)(function(d,g){g.isNew&&y++;var k=document.createElement("div");k.className="notification";d=d.timeSince(new Date(g.timestamp));null==d&&(d=mxResources.get("lessThanAMinute"));k.innerHTML='<div class="circle'+(g.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[d],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(g.content)+"</p>";g.link&&mxEvent.addListener(k,"click",function(){window.open(g.link, +"notifWin")});D.appendChild(k)})(this,b[l]);f(y)}}}; App.prototype.save=function(b,e){var f=this.getCurrentFile();if(null!=f&&this.spinner.spin(document.body,mxResources.get("saving"))){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var c=mxUtils.bind(this,function(){f.handleFileSuccess(!0);null!=e&&e()}),l=mxUtils.bind(this,function(m){f.isModified()&&Editor.addRetryToError(m,mxUtils.bind(this,function(){this.save(b,e)}));f.handleFileError(m,null==m||"AbortError"!=m.name)});try{b==f.getTitle()?f.save(!0,c, l):f.saveAs(b,c,l)}catch(m){l(m)}}}; -App.prototype.pickFolder=function(b,e,f,c,l){f=null!=f?f:!0;var m=this.spinner.pause();f&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(x){m();if(x.action==google.picker.Action.PICKED){var z=null;null!=x.docs&&0<x.docs.length&&"folder"==x.docs[0].type&&(z=x.docs[0].id);e(z)}}),l):f&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(x){m();null!=x&&null!=x.value&&0<x.value.length&&(x=OneDriveFile.prototype.getIdOf(x.value[0]), +App.prototype.pickFolder=function(b,e,f,c,l){f=null!=f?f:!0;var m=this.spinner.pause();f&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(x){m();if(x.action==google.picker.Action.PICKED){var y=null;null!=x.docs&&0<x.docs.length&&"folder"==x.docs[0].type&&(y=x.docs[0].id);e(y)}}),l):f&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(x){m();null!=x&&null!=x.value&&0<x.value.length&&(x=OneDriveFile.prototype.getIdOf(x.value[0]), e(x))}),c):f&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(x){m();e(x)})):f&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(x){m();e(x)})):f&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(x){m();e(x)})):EditorUi.prototype.pickFolder.apply(this,arguments)}; App.prototype.exportFile=function(b,e,f,c,l,m){l==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(e,c?this.base64ToBlob(b,f):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x)})):l==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(e,b,m,mxUtils.bind(this,function(x){this.spinner.stop()}), mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x)}),f,c):l==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(e,c?this.base64ToBlob(b,f):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x)}),!1,m):l==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(e,b,mxUtils.bind(this, @@ -12515,29 +12522,27 @@ f):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,functi App.prototype.descriptorChanged=function(){var b=this.getCurrentFile();if(null!=b){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerText="";var e=null!=b.getTitle()?b.getTitle():this.defaultFilename;mxUtils.write(this.fname,e);this.fname.setAttribute("title",e+" - "+mxResources.get("rename"))}e=this.editor.graph;var f=b.isEditable()&&!b.invalidChecksum;e.isEnabled()&&!f&&e.reset();e.setEnabled(f);null==urlParams.rev&&(this.updateDocumentTitle(),e=b.getHash(),0<e.length? window.location.hash=e:0<window.location.hash.length&&(window.location.hash=""))}this.updateUi();null==this.format||null!=b&&this.fileEditable==b.isEditable()||!this.editor.graph.isSelectionEmpty()||(this.format.refresh(),this.fileEditable=null!=b?b.isEditable():null);this.fireEvent(new mxEventObject("fileDescriptorChanged","file",b))}; App.prototype.showAuthDialog=function(b,e,f,c){var l=this.spinner.pause();this.showDialog((new AuthDialog(this,b,e,mxUtils.bind(this,function(m){try{null!=f&&f(m,mxUtils.bind(this,function(){this.hideDialog();l()}))}catch(x){this.editor.setStatus(mxUtils.htmlEntities(x.message))}}))).container,300,e?180:140,!0,!0,mxUtils.bind(this,function(m){null!=c&&c(m);m&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))}; -App.prototype.convertFile=function(b,e,f,c,l,m,x,z){var C=e;/\.svg$/i.test(C)||(C=C.substring(0,e.lastIndexOf("."))+c);var d=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(d=!0);if(/\.v(dx|sdx?)$/i.test(e)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var g=new XMLHttpRequest;g.open("GET",b,!0);d||(g.responseType="blob");if(z)for(var k in z)g.setRequestHeader(k,z[k]);g.onload=mxUtils.bind(this,function(){if(200<= -g.status&&299>=g.status){var t=null;d?(t=JSON.parse(g.responseText),t=this.base64ToBlob(t.content,"application/octet-stream")):t=new Blob([g.response],{type:"application/octet-stream"});this.importVisio(t,mxUtils.bind(this,function(p){l(new LocalFile(this,p,C,!0))}),m,e)}else null!=m&&m({message:mxResources.get("errorLoadingFile")})});g.onerror=m;g.send()}else{var n=mxUtils.bind(this,function(t){try{if(/\.pdf$/i.test(e)){var p=Editor.extractGraphModelFromPdf(t);null!=p&&0<p.length&&l(new LocalFile(this, -p,C,!0))}else/\.png$/i.test(e)?(p=this.extractGraphModelFromPng(t),null!=p?l(new LocalFile(this,p,C,!0)):l(new LocalFile(this,t,e,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(t,b)?this.parseFileData(t,mxUtils.bind(this,function(A){4==A.readyState&&(200<=A.status&&299>=A.status?l(new LocalFile(this,A.responseText,C,!0)):null!=m&&m({message:mxResources.get("errorLoadingFile")}))}),e):l(new LocalFile(this,t,C,!0))}catch(A){null!=m&&m(A)}});f=/\.png$/i.test(e)||/\.jpe?g$/i.test(e)|| -/\.pdf$/i.test(e)||null!=f&&"image/"==f.substring(0,6);d?mxUtils.get(b,mxUtils.bind(this,function(t){if(200<=t.getStatus()&&299>=t.getStatus()){if(null!=l){t=JSON.parse(t.getText());var p=t.content;"base64"===t.encoding&&(p=/\.png$/i.test(e)?"data:image/png;base64,"+p:/\.pdf$/i.test(e)?"data:application/pdf;base64,"+p:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(p):atob(p));n(p)}}else null!=m&&m({code:App.ERROR_UNKNOWN})}),function(){null!=m&&m({code:App.ERROR_UNKNOWN})},!1,this.timeout, -function(){null!=m&&m({code:App.ERROR_TIMEOUT,retry:fn})},z):null!=x?x(b,n,m,f):this.editor.loadUrl(b,n,m,f,null,null,null,z)}}; +App.prototype.convertFile=function(b,e,f,c,l,m,x,y){var D=e;/\.svg$/i.test(D)||(D=D.substring(0,e.lastIndexOf("."))+c);var d=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(d=!0);if(/\.v(dx|sdx?)$/i.test(e)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var g=new XMLHttpRequest;g.open("GET",b,!0);d||(g.responseType="blob");if(y)for(var k in y)g.setRequestHeader(k,y[k]);g.onload=mxUtils.bind(this,function(){if(200<= +g.status&&299>=g.status){var q=null;d?(q=JSON.parse(g.responseText),q=this.base64ToBlob(q.content,"application/octet-stream")):q=new Blob([g.response],{type:"application/octet-stream"});this.importVisio(q,mxUtils.bind(this,function(p){l(new LocalFile(this,p,D,!0))}),m,e)}else null!=m&&m({message:mxResources.get("errorLoadingFile")})});g.onerror=m;g.send()}else{var n=mxUtils.bind(this,function(q){try{if(/\.pdf$/i.test(e)){var p=Editor.extractGraphModelFromPdf(q);null!=p&&0<p.length&&l(new LocalFile(this, +p,D,!0))}else/\.png$/i.test(e)?(p=this.extractGraphModelFromPng(q),null!=p?l(new LocalFile(this,p,D,!0)):l(new LocalFile(this,q,e,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(q,b)?this.parseFileData(q,mxUtils.bind(this,function(A){4==A.readyState&&(200<=A.status&&299>=A.status?l(new LocalFile(this,A.responseText,D,!0)):null!=m&&m({message:mxResources.get("errorLoadingFile")}))}),e):l(new LocalFile(this,q,D,!0))}catch(A){null!=m&&m(A)}});f=/\.png$/i.test(e)||/\.jpe?g$/i.test(e)|| +/\.pdf$/i.test(e)||null!=f&&"image/"==f.substring(0,6);d?mxUtils.get(b,mxUtils.bind(this,function(q){if(200<=q.getStatus()&&299>=q.getStatus()){if(null!=l){q=JSON.parse(q.getText());var p=q.content;"base64"===q.encoding&&(p=/\.png$/i.test(e)?"data:image/png;base64,"+p:/\.pdf$/i.test(e)?"data:application/pdf;base64,"+p:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(p):atob(p));n(p)}}else null!=m&&m({code:App.ERROR_UNKNOWN})}),function(){null!=m&&m({code:App.ERROR_UNKNOWN})},!1,this.timeout, +function(){null!=m&&m({code:App.ERROR_TIMEOUT,retry:fn})},y):null!=x?x(b,n,m,f):this.editor.loadUrl(b,n,m,f,null,null,null,y)}}; App.prototype.updateHeader=function(){if(null!=this.menubar){var b="url("+Editor.logoImage+")";this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="32px";this.appIcon.style.height=this.menubarHeight-28+"px";this.appIcon.style.margin="14px 0px 8px 16px";this.appIcon.style.opacity="0.85";this.appIcon.style.borderRadius="3px";this.appIcon.style.backgroundPosition="center center";this.appIcon.style.backgroundSize= -"100% 100%";this.appIcon.style.backgroundRepeat="no-repeat";this.appIcon.style.backgroundImage=b;mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(c){this.appIconClicked(c)}));var e=mxUtils.bind(this,function(){this.appIcon.style.backgroundColor=Editor.isDarkMode()?"":"#f08705"});this.addListener("darkModeChanged",e);e();mxUtils.setPrefixedStyle(this.appIcon.style,"transition","all 125ms linear");mxEvent.addListener(this.appIcon,"mouseover", -mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&(c=c.getMode(),c==App.MODE_GOOGLE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/google-drive-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):c==App.MODE_DROPBOX?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):c==App.MODE_ONEDRIVE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/onedrive-logo-white.svg)",this.appIcon.style.backgroundSize= -"70% 70%"):c==App.MODE_GITHUB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/github-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):c==App.MODE_GITLAB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/gitlab-logo-white.svg)",this.appIcon.style.backgroundSize="100% 100%"):c==App.MODE_TRELLO&&(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/trello-logo-white-orange.svg)",this.appIcon.style.backgroundSize="70% 70%"))}));mxEvent.addListener(this.appIcon,"mouseout", +"100% 100%";this.appIcon.style.backgroundRepeat="no-repeat";this.appIcon.style.backgroundImage=b;mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(l){this.appIconClicked(l)}));var e=mxUtils.bind(this,function(){this.appIcon.style.backgroundColor=Editor.isDarkMode()?"":"#f08705"});this.addListener("darkModeChanged",e);e();mxUtils.setPrefixedStyle(this.appIcon.style,"transition","all 125ms linear");mxEvent.addListener(this.appIcon,"mouseover", +mxUtils.bind(this,function(){var l=this.getCurrentFile();null!=l&&(l=l.getMode(),l==App.MODE_GOOGLE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/google-drive-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):l==App.MODE_DROPBOX?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):l==App.MODE_ONEDRIVE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/onedrive-logo-white.svg)",this.appIcon.style.backgroundSize= +"70% 70%"):l==App.MODE_GITHUB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/github-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):l==App.MODE_GITLAB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/gitlab-logo-white.svg)",this.appIcon.style.backgroundSize="100% 100%"):l==App.MODE_TRELLO&&(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/trello-logo-white-orange.svg)",this.appIcon.style.backgroundSize="70% 70%"))}));mxEvent.addListener(this.appIcon,"mouseout", mxUtils.bind(this,function(){this.appIcon.style.backgroundImage=b;this.appIcon.style.backgroundSize="90% 90%"}));"1"!=urlParams.embed&&this.menubarContainer.appendChild(this.appIcon);this.fnameWrapper=document.createElement("div");this.fnameWrapper.style.position="absolute";this.fnameWrapper.style.right="120px";this.fnameWrapper.style.left="60px";this.fnameWrapper.style.top="9px";this.fnameWrapper.style.height="26px";this.fnameWrapper.style.display="none";this.fnameWrapper.style.overflow="hidden"; -this.fnameWrapper.style.textOverflow="ellipsis";this.fname=document.createElement("a");this.fname.setAttribute("title",mxResources.get("rename"));this.fname.className="geItem";this.fname.style.padding="2px 8px 2px 8px";this.fname.style.display="inline";this.fname.style.fontSize="18px";this.fname.style.whiteSpace="nowrap";mxEvent.addListener(this.fname,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(c){c.preventDefault()}));mxEvent.addListener(this.fname,"click",mxUtils.bind(this, -function(c){var l=this.getCurrentFile();null!=l&&l.isRenamable()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),this.actions.get("rename").funct());mxEvent.consume(c)}));this.fnameWrapper.appendChild(this.fname);"1"!=urlParams.embed&&(this.menubarContainer.appendChild(this.fnameWrapper),this.menubar.container.style.position="absolute",this.menubar.container.style.paddingLeft="59px",this.toolbar.container.style.paddingLeft="16px",this.menubar.container.style.boxSizing="border-box", -this.menubar.container.style.top="34px");this.toggleFormatElement=document.createElement("a");this.toggleFormatElement.setAttribute("title",mxResources.get("formatPanel")+" ("+Editor.ctrlKey+"+Shift+P)");this.toggleFormatElement.style.position="absolute";this.toggleFormatElement.style.display="inline-block";this.toggleFormatElement.style.top="atlas"==uiTheme?"8px":"6px";this.toggleFormatElement.style.right="atlas"!=uiTheme&&"1"!=urlParams.embed?"30px":"10px";this.toggleFormatElement.style.padding= -"2px";this.toggleFormatElement.style.fontSize="14px";this.toggleFormatElement.className="atlas"!=uiTheme?"geButton geAdaptiveAsset":"";this.toggleFormatElement.style.width="16px";this.toggleFormatElement.style.height="16px";this.toggleFormatElement.style.backgroundPosition="50% 50%";this.toggleFormatElement.style.backgroundRepeat="no-repeat";this.toolbarContainer.appendChild(this.toggleFormatElement);mxEvent.addListener(this.toggleFormatElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this, -function(c){c.preventDefault()}));mxEvent.addListener(this.toggleFormatElement,"click",mxUtils.bind(this,function(c){EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"formatPanel"});this.actions.get("formatPanel").funct();mxEvent.consume(c)}));e=mxUtils.bind(this,function(){this.toggleFormatElement.style.backgroundImage=0<this.formatWidth?"url('"+this.formatShowImage+"')":"url('"+this.formatHideImage+"')"});this.addListener("formatWidthChanged",e);e();this.fullscreenElement=document.createElement("a"); -this.fullscreenElement.setAttribute("title",mxResources.get("fullscreen"));this.fullscreenElement.style.position="absolute";this.fullscreenElement.style.display="inline-block";this.fullscreenElement.style.top="atlas"==uiTheme?"8px":"6px";this.fullscreenElement.style.right="atlas"!=uiTheme&&"1"!=urlParams.embed?"50px":"30px";this.fullscreenElement.style.padding="2px";this.fullscreenElement.style.fontSize="14px";this.fullscreenElement.className="atlas"!=uiTheme?"geButton geAdaptiveAsset":"";this.fullscreenElement.style.width= -"16px";this.fullscreenElement.style.height="16px";this.fullscreenElement.style.backgroundPosition="50% 50%";this.fullscreenElement.style.backgroundSize="16px 16px";this.fullscreenElement.style.backgroundRepeat="no-repeat";this.fullscreenElement.style.backgroundImage="url('"+Editor.fullscreenImage+"')";this.toolbarContainer.appendChild(this.fullscreenElement);mxEvent.addListener(this.fullscreenElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(c){c.preventDefault()})); -"atlas"!=uiTheme&&(this.darkModeElement=document.createElement("a"),this.darkModeElement.setAttribute("title",mxResources.get("theme")),this.darkModeElement.style.position="absolute",this.darkModeElement.style.display="inline-block",this.darkModeElement.style.top="atlas"==uiTheme?"8px":"6px",this.darkModeElement.style.right="atlas"!=uiTheme&&"1"!=urlParams.embed?"70px":"50px",this.darkModeElement.style.padding="2px",this.darkModeElement.style.fontSize="14px",this.darkModeElement.className="atlas"!= -uiTheme?"geButton geAdaptiveAsset":"",this.darkModeElement.style.width="16px",this.darkModeElement.style.height="16px",this.darkModeElement.style.backgroundPosition="50% 50%",this.darkModeElement.style.backgroundSize="16px 16px",this.darkModeElement.style.backgroundRepeat="no-repeat",this.toolbarContainer.appendChild(this.darkModeElement),e=mxUtils.bind(this,function(){this.darkModeElement.style.backgroundImage="url('"+(Editor.isDarkMode()?Editor.lightModeImage:Editor.darkModeImage)+"')"}),this.addListener("darkModeChanged", -e),e(),mxEvent.addListener(this.darkModeElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(c){this.actions.get("toggleDarkMode").funct();c.preventDefault()})));"atlas"==uiTheme&&(mxUtils.setOpacity(this.toggleFormatElement,70),mxUtils.setOpacity(this.fullscreenElement,70));var f=this.hsplitPosition;mxEvent.addListener(this.fullscreenElement,"click",mxUtils.bind(this,function(c){var l=this.fullscreenMode;EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"fullscreen", -currentstate:l});"atlas"!=uiTheme&&"1"!=urlParams.embed&&this.toggleCompactMode(l);l||(f=this.hsplitPosition);this.hsplitPosition=l?f:0;this.toggleFormatPanel(l);this.fullscreenMode=!l;mxEvent.consume(c)}));"1"!=urlParams.embed&&(this.toggleElement=document.createElement("a"),this.toggleElement.setAttribute("title",mxResources.get("collapseExpand")),this.toggleElement.className="geButton geAdaptiveAsset",this.toggleElement.style.position="absolute",this.toggleElement.style.display="inline-block", -this.toggleElement.style.width="16px",this.toggleElement.style.height="16px",this.toggleElement.style.color="#666",this.toggleElement.style.top="atlas"==uiTheme?"8px":"6px",this.toggleElement.style.right="10px",this.toggleElement.style.padding="2px",this.toggleElement.style.fontSize="14px",this.toggleElement.style.textDecoration="none",this.toggleElement.style.backgroundImage="url('"+this.chevronUpImage+"')",this.toggleElement.style.backgroundPosition="50% 50%",this.toggleElement.style.backgroundRepeat= -"no-repeat",mxEvent.addListener(this.toggleElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(c){c.preventDefault()})),mxEvent.addListener(this.toggleElement,"click",mxUtils.bind(this,function(c){EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"toggleUI"});this.toggleCompactMode();mxEvent.consume(c)})),"atlas"!=uiTheme&&this.toolbarContainer.appendChild(this.toggleElement),!mxClient.IS_FF&&740>=screen.height&&"undefined"!==typeof this.toggleElement.click&&window.setTimeout(mxUtils.bind(this, +this.fnameWrapper.style.textOverflow="ellipsis";this.fname=document.createElement("a");this.fname.setAttribute("title",mxResources.get("rename"));this.fname.className="geItem";this.fname.style.padding="2px 8px 2px 8px";this.fname.style.display="inline";this.fname.style.fontSize="18px";this.fname.style.whiteSpace="nowrap";mxEvent.addListener(this.fname,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(l){l.preventDefault()}));mxEvent.addListener(this.fname,"click",mxUtils.bind(this, +function(l){var m=this.getCurrentFile();null!=m&&m.isRenamable()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),this.actions.get("rename").funct());mxEvent.consume(l)}));this.fnameWrapper.appendChild(this.fname);"1"!=urlParams.embed&&(this.menubarContainer.appendChild(this.fnameWrapper),this.menubar.container.style.position="absolute",this.menubar.container.style.paddingLeft="59px",this.toolbar.container.style.paddingLeft="16px",this.menubar.container.style.boxSizing="border-box", +this.menubar.container.style.top="34px");e="atlas"!=uiTheme&&"1"!=urlParams.embed?30:10;this.toggleFormatElement=document.createElement("a");this.toggleFormatElement.setAttribute("title",mxResources.get("formatPanel")+" ("+Editor.ctrlKey+"+Shift+P)");this.toggleFormatElement.style.position="absolute";this.toggleFormatElement.style.display="inline-block";this.toggleFormatElement.style.top="atlas"==uiTheme?"8px":"6px";this.toggleFormatElement.style.right=e+"px";this.toggleFormatElement.style.padding= +"2px";this.toggleFormatElement.style.fontSize="14px";this.toggleFormatElement.className="atlas"!=uiTheme?"geButton geAdaptiveAsset":"";this.toggleFormatElement.style.width="16px";this.toggleFormatElement.style.height="16px";this.toggleFormatElement.style.backgroundPosition="50% 50%";this.toggleFormatElement.style.backgroundSize="16px 16px";this.toggleFormatElement.style.backgroundRepeat="no-repeat";this.toolbarContainer.appendChild(this.toggleFormatElement);e+=20;mxEvent.addListener(this.toggleFormatElement, +mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(l){l.preventDefault()}));mxEvent.addListener(this.toggleFormatElement,"click",mxUtils.bind(this,function(l){EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"formatPanel"});this.actions.get("formatPanel").funct();mxEvent.consume(l)}));var f=mxUtils.bind(this,function(){this.toggleFormatElement.style.backgroundImage=0<this.formatWidth?"url('"+this.formatShowImage+"')":"url('"+this.formatHideImage+"')"});this.addListener("formatWidthChanged", +f);f();this.fullscreenElement=this.toggleFormatElement.cloneNode(!0);this.fullscreenElement.setAttribute("title",mxResources.get("fullscreen"));this.fullscreenElement.style.backgroundImage="url('"+Editor.fullscreenImage+"')";this.fullscreenElement.style.right=e+"px";this.toolbarContainer.appendChild(this.fullscreenElement);e+=20;mxEvent.addListener(this.fullscreenElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(l){l.preventDefault()}));mxEvent.addListener(this.fullscreenElement, +"click",mxUtils.bind(this,function(l){var m=this.fullscreenMode;EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"fullscreen",currentstate:m});"atlas"!=uiTheme&&"1"!=urlParams.embed&&this.toggleCompactMode(m);m||(c=this.hsplitPosition);this.hsplitPosition=m?c:0;this.toggleFormatPanel(m);this.fullscreenMode=!m;mxEvent.consume(l)}));"1"!=urlParams["live-ui"]&&"atlas"!=uiTheme&&(this.darkModeElement=this.toggleFormatElement.cloneNode(!0),this.darkModeElement.setAttribute("title",mxResources.get("theme")), +this.darkModeElement.style.right=e+"px",this.toolbarContainer.appendChild(this.darkModeElement),e+=20,e=mxUtils.bind(this,function(){this.darkModeElement.style.backgroundImage="url('"+(Editor.isDarkMode()||"atlas"==uiTheme?Editor.lightModeImage:Editor.darkModeImage)+"')"}),this.addListener("darkModeChanged",e),e(),mxEvent.addListener(this.darkModeElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(l){l.preventDefault()})),mxEvent.addListener(this.darkModeElement,"click", +mxUtils.bind(this,function(l){this.actions.get("toggleDarkMode").funct();mxEvent.consume(l)})));"atlas"==uiTheme&&(mxUtils.setOpacity(this.toggleFormatElement,70),mxUtils.setOpacity(this.fullscreenElement,70));var c=this.hsplitPosition;"1"!=urlParams.embed&&(this.toggleElement=document.createElement("a"),this.toggleElement.setAttribute("title",mxResources.get("collapseExpand")),this.toggleElement.className="geButton geAdaptiveAsset",this.toggleElement.style.position="absolute",this.toggleElement.style.display= +"inline-block",this.toggleElement.style.width="16px",this.toggleElement.style.height="16px",this.toggleElement.style.color="#666",this.toggleElement.style.top="atlas"==uiTheme?"8px":"6px",this.toggleElement.style.right="10px",this.toggleElement.style.padding="2px",this.toggleElement.style.fontSize="14px",this.toggleElement.style.textDecoration="none",this.toggleElement.style.backgroundImage="url('"+this.chevronUpImage+"')",this.toggleElement.style.backgroundPosition="50% 50%",this.toggleElement.style.backgroundRepeat= +"no-repeat",mxEvent.addListener(this.toggleElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(l){l.preventDefault()})),mxEvent.addListener(this.toggleElement,"click",mxUtils.bind(this,function(l){EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"toggleUI"});this.toggleCompactMode();mxEvent.consume(l)})),"atlas"!=uiTheme&&this.toolbarContainer.appendChild(this.toggleElement),!mxClient.IS_FF&&740>=screen.height&&"undefined"!==typeof this.toggleElement.click&&window.setTimeout(mxUtils.bind(this, function(){this.toggleElement.click()}),0))}}; App.prototype.toggleCompactMode=function(b){(b=null!=b?b:this.compactMode)?(this.menubar.container.style.position="absolute",this.menubar.container.style.paddingLeft="59px",this.menubar.container.style.paddingTop="",this.menubar.container.style.paddingBottom="",this.menubar.container.style.top="34px",this.toolbar.container.style.paddingLeft="16px",this.buttonContainer.style.visibility="visible",this.appIcon.style.display="block",this.fnameWrapper.style.display="block",this.fnameWrapper.style.visibility= "visible",this.menubarHeight=App.prototype.menubarHeight,this.refresh(),this.toggleElement.style.backgroundImage="url('"+this.chevronUpImage+"')"):(this.menubar.container.style.position="relative",this.menubar.container.style.paddingLeft="4px",this.menubar.container.style.paddingTop="0px",this.menubar.container.style.paddingBottom="0px",this.menubar.container.style.top="0px",this.toolbar.container.style.paddingLeft="8px",this.buttonContainer.style.visibility="hidden",this.appIcon.style.display="none", @@ -12546,180 +12551,181 @@ App.prototype.updateUserElement=function(){if(null!=this.drive&&null!=this.drive "8pt",this.userElement.style.top="atlas"==uiTheme?"8px":"2px",this.userElement.style.right="30px",this.userElement.style.margin="4px",this.userElement.style.padding="2px",this.userElement.style.paddingRight="16px",this.userElement.style.verticalAlign="middle",this.userElement.style.backgroundImage="url("+IMAGE_PATH+"/expanded.gif)",this.userElement.style.backgroundPosition="100% 60%",this.userElement.style.backgroundRepeat="no-repeat",this.menubarContainer.appendChild(this.userElement),mxEvent.addListener(this.userElement, mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(e){e.preventDefault()})),mxEvent.addListener(this.userElement,"click",mxUtils.bind(this,function(e){if(null==this.userPanel){var f=document.createElement("div");f.className="geDialog";f.style.position="absolute";f.style.top=this.userElement.clientTop+this.userElement.clientHeight+6+"px";f.style.zIndex=5;f.style.right="36px";f.style.padding="0px";f.style.cursor="default";f.style.minWidth="300px";this.userPanel=f}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel); else{var c=!1;this.userPanel.innerText="";var l=document.createElement("img");l.setAttribute("src",Dialog.prototype.closeImage);l.setAttribute("title",mxResources.get("close"));l.className="geDialogClose";l.style.top="8px";l.style.right="8px";mxEvent.addListener(l,"click",mxUtils.bind(this,function(){null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)}));this.userPanel.appendChild(l);if(null!=this.drive){var m=this.drive.getUsersList();if(0<m.length){var x=mxUtils.bind(this, -function(C,d){var g=this.getCurrentFile();null!=g&&g.constructor==DriveFile?(this.spinner.spin(document.body,d),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();C()}),2E3)):C()});f=mxUtils.bind(this,function(C){var d=document.createElement("tr");d.setAttribute("title","User ID: "+C.id);var g=document.createElement("td");g.setAttribute("valig","middle");g.style.height="59px";g.style.width="66px";var k=document.createElement("img");k.setAttribute("width","50"); -k.setAttribute("height","50");k.setAttribute("border","0");k.setAttribute("src",null!=C.pictureUrl?C.pictureUrl:this.defaultUserPicture);k.style.borderRadius="50%";k.style.margin="4px 8px 0 8px";g.appendChild(k);d.appendChild(g);g=document.createElement("td");g.setAttribute("valign","middle");g.style.whiteSpace="nowrap";g.style.paddingTop="4px";g.style.maxWidth="0";g.style.overflow="hidden";g.style.textOverflow="ellipsis";mxUtils.write(g,C.displayName+(C.isCurrent&&1<m.length?" ("+mxResources.get("default")+ -")":""));null!=C.email&&(mxUtils.br(g),k=document.createElement("small"),k.style.color="gray",mxUtils.write(k,C.email),g.appendChild(k));k=document.createElement("div");k.style.marginTop="4px";var n=document.createElement("i");mxUtils.write(n,mxResources.get("googleDrive"));k.appendChild(n);g.appendChild(k);d.appendChild(g);C.isCurrent||(d.style.cursor="pointer",d.style.opacity="0.3",mxEvent.addListener(d,"click",mxUtils.bind(this,function(t){x(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(C); -this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(p){this.handleError(p)}),!0)}),mxResources.get("closingFile")+"...");mxEvent.consume(t)})));return d});c=!0;l=document.createElement("table");l.style.borderSpacing="0";l.style.fontSize="10pt";l.style.width="100%";l.style.padding="10px";for(var z=0;z<m.length;z++)l.appendChild(f(m[z]));this.userPanel.appendChild(l);f=document.createElement("div");f.style.textAlign= +function(D,d){var g=this.getCurrentFile();null!=g&&g.constructor==DriveFile?(this.spinner.spin(document.body,d),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();D()}),2E3)):D()});f=mxUtils.bind(this,function(D){var d=document.createElement("tr");d.setAttribute("title","User ID: "+D.id);var g=document.createElement("td");g.setAttribute("valig","middle");g.style.height="59px";g.style.width="66px";var k=document.createElement("img");k.setAttribute("width","50"); +k.setAttribute("height","50");k.setAttribute("border","0");k.setAttribute("src",null!=D.pictureUrl?D.pictureUrl:this.defaultUserPicture);k.style.borderRadius="50%";k.style.margin="4px 8px 0 8px";g.appendChild(k);d.appendChild(g);g=document.createElement("td");g.setAttribute("valign","middle");g.style.whiteSpace="nowrap";g.style.paddingTop="4px";g.style.maxWidth="0";g.style.overflow="hidden";g.style.textOverflow="ellipsis";mxUtils.write(g,D.displayName+(D.isCurrent&&1<m.length?" ("+mxResources.get("default")+ +")":""));null!=D.email&&(mxUtils.br(g),k=document.createElement("small"),k.style.color="gray",mxUtils.write(k,D.email),g.appendChild(k));k=document.createElement("div");k.style.marginTop="4px";var n=document.createElement("i");mxUtils.write(n,mxResources.get("googleDrive"));k.appendChild(n);g.appendChild(k);d.appendChild(g);D.isCurrent||(d.style.cursor="pointer",d.style.opacity="0.3",mxEvent.addListener(d,"click",mxUtils.bind(this,function(q){x(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(D); +this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(p){this.handleError(p)}),!0)}),mxResources.get("closingFile")+"...");mxEvent.consume(q)})));return d});c=!0;l=document.createElement("table");l.style.borderSpacing="0";l.style.fontSize="10pt";l.style.width="100%";l.style.padding="10px";for(var y=0;y<m.length;y++)l.appendChild(f(m[y]));this.userPanel.appendChild(l);f=document.createElement("div");f.style.textAlign= "left";f.style.padding="10px";f.style.whiteSpace="nowrap";f.style.borderTop="1px solid rgb(224, 224, 224)";l=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){x(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxResources.get("signOut"))}))}));l.className="geBtn";l.style.float="right";f.appendChild(l);l=mxUtils.button(mxResources.get("addAccount"), -mxUtils.bind(this,function(){var C=this.drive.createAuthWin();C.blur();window.focus();x(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(d){this.handleError(d)}),!0,C)}),mxResources.get("closingFile")+"...")}));l.className="geBtn";l.style.margin="0px";f.appendChild(l);this.userPanel.appendChild(f)}}l=mxUtils.bind(this,function(C,d,g,k){if(null!=C){c&&this.userPanel.appendChild(document.createElement("hr")); -c=!0;var n=document.createElement("table");n.style.borderSpacing="0";n.style.fontSize="10pt";n.style.width="100%";n.style.padding="10px";var t=document.createElement("tbody"),p=document.createElement("tr"),A=document.createElement("td");A.setAttribute("valig","top");A.style.width="40px";if(null!=d){var E=document.createElement("img");E.setAttribute("width","40");E.setAttribute("height","40");E.setAttribute("border","0");E.setAttribute("src",d);E.style.marginRight="6px";A.appendChild(E)}p.appendChild(A); -A=document.createElement("td");A.setAttribute("valign","middle");A.style.whiteSpace="nowrap";A.style.maxWidth="0";A.style.overflow="hidden";A.style.textOverflow="ellipsis";mxUtils.write(A,C.displayName);null!=C.email&&(mxUtils.br(A),d=document.createElement("small"),d.style.color="gray",mxUtils.write(d,C.email),A.appendChild(d));null!=k&&(C=document.createElement("div"),C.style.marginTop="4px",d=document.createElement("i"),mxUtils.write(d,k),C.appendChild(d),A.appendChild(C));p.appendChild(A);t.appendChild(p); -n.appendChild(t);this.userPanel.appendChild(n);C=document.createElement("div");C.style.textAlign="center";C.style.padding="10px";C.style.whiteSpace="nowrap";null!=g&&(g=mxUtils.button(mxResources.get("signOut"),g),g.className="geBtn",C.appendChild(g));this.userPanel.appendChild(C)}});null!=this.dropbox&&l(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var C=this.getCurrentFile();if(null!=C&&C.constructor==DropboxFile){var d=mxUtils.bind(this,function(){this.dropbox.logout(); -window.location.hash=""});C.isModified()?this.confirm(mxResources.get("allChangesLost"),null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):d()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&l(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var C=this.getCurrentFile();if(null!=C&&C.constructor==OneDriveFile){var d=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash= -""});C.isModified()?this.confirm(mxResources.get("allChangesLost"),null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):d()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&l(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var C=this.getCurrentFile();if(null!=C&&C.constructor==GitHubFile){var d=mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});C.isModified()?this.confirm(mxResources.get("allChangesLost"), -null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):d()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&l(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,function(){var C=this.getCurrentFile();if(null!=C&&C.constructor==GitLabFile){var d=mxUtils.bind(this,function(){this.gitLab.logout();window.location.hash=""});C.isModified()?this.confirm(mxResources.get("allChangesLost"),null,d,mxResources.get("cancel"),mxResources.get("discardChanges")): -d()}else this.gitLab.logout()}),mxResources.get("gitlab"));null!=this.trello&&l(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var C=this.getCurrentFile();if(null!=C&&C.constructor==TrelloFile){var d=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=""});C.isModified()?this.confirm(mxResources.get("allChangesLost"),null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):d()}else this.trello.logout()}),mxResources.get("trello"));"min"== -uiTheme&&(l=this.getCurrentFile(),null!=l&&l.isRealtimeEnabled()&&l.isRealtimeSupported()&&(f=f.cloneNode(!1),f.style.textAlign="center",f.style.padding="10px",f.style.fontSize="9pt",z=l.getRealtimeError(),1!=l.getRealtimeState()&&(mxUtils.write(f,mxResources.get("realtimeCollaboration")+": "+(null!=z&&null!=z.message?z.message:mxResources.get("disconnected"))),this.userPanel.appendChild(f))));document.body.appendChild(this.userPanel)}mxEvent.consume(e)})),mxEvent.addListener(document.body,"click", +mxUtils.bind(this,function(){var D=this.drive.createAuthWin();D.blur();window.focus();x(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(d){this.handleError(d)}),!0,D)}),mxResources.get("closingFile")+"...")}));l.className="geBtn";l.style.margin="0px";f.appendChild(l);this.userPanel.appendChild(f)}}l=mxUtils.bind(this,function(D,d,g,k){if(null!=D){c&&this.userPanel.appendChild(document.createElement("hr")); +c=!0;var n=document.createElement("table");n.style.borderSpacing="0";n.style.fontSize="10pt";n.style.width="100%";n.style.padding="10px";var q=document.createElement("tbody"),p=document.createElement("tr"),A=document.createElement("td");A.setAttribute("valig","top");A.style.width="40px";if(null!=d){var E=document.createElement("img");E.setAttribute("width","40");E.setAttribute("height","40");E.setAttribute("border","0");E.setAttribute("src",d);E.style.marginRight="6px";A.appendChild(E)}p.appendChild(A); +A=document.createElement("td");A.setAttribute("valign","middle");A.style.whiteSpace="nowrap";A.style.maxWidth="0";A.style.overflow="hidden";A.style.textOverflow="ellipsis";mxUtils.write(A,D.displayName);null!=D.email&&(mxUtils.br(A),d=document.createElement("small"),d.style.color="gray",mxUtils.write(d,D.email),A.appendChild(d));null!=k&&(D=document.createElement("div"),D.style.marginTop="4px",d=document.createElement("i"),mxUtils.write(d,k),D.appendChild(d),A.appendChild(D));p.appendChild(A);q.appendChild(p); +n.appendChild(q);this.userPanel.appendChild(n);D=document.createElement("div");D.style.textAlign="center";D.style.padding="10px";D.style.whiteSpace="nowrap";null!=g&&(g=mxUtils.button(mxResources.get("signOut"),g),g.className="geBtn",D.appendChild(g));this.userPanel.appendChild(D)}});null!=this.dropbox&&l(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var D=this.getCurrentFile();if(null!=D&&D.constructor==DropboxFile){var d=mxUtils.bind(this,function(){this.dropbox.logout(); +window.location.hash=""});D.isModified()?this.confirm(mxResources.get("allChangesLost"),null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):d()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&l(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var D=this.getCurrentFile();if(null!=D&&D.constructor==OneDriveFile){var d=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash= +""});D.isModified()?this.confirm(mxResources.get("allChangesLost"),null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):d()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&l(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var D=this.getCurrentFile();if(null!=D&&D.constructor==GitHubFile){var d=mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});D.isModified()?this.confirm(mxResources.get("allChangesLost"), +null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):d()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&l(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,function(){var D=this.getCurrentFile();if(null!=D&&D.constructor==GitLabFile){var d=mxUtils.bind(this,function(){this.gitLab.logout();window.location.hash=""});D.isModified()?this.confirm(mxResources.get("allChangesLost"),null,d,mxResources.get("cancel"),mxResources.get("discardChanges")): +d()}else this.gitLab.logout()}),mxResources.get("gitlab"));null!=this.trello&&l(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var D=this.getCurrentFile();if(null!=D&&D.constructor==TrelloFile){var d=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=""});D.isModified()?this.confirm(mxResources.get("allChangesLost"),null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):d()}else this.trello.logout()}),mxResources.get("trello"));"min"== +uiTheme&&(l=this.getCurrentFile(),null!=l&&l.isRealtimeEnabled()&&l.isRealtimeSupported()&&(f=f.cloneNode(!1),f.style.textAlign="center",f.style.padding="10px",f.style.fontSize="9pt",y=l.getRealtimeError(),1!=l.getRealtimeState()&&(mxUtils.write(f,mxResources.get("realtimeCollaboration")+": "+(null!=y&&null!=y.message?y.message:mxResources.get("disconnected"))),this.userPanel.appendChild(f))));document.body.appendChild(this.userPanel)}mxEvent.consume(e)})),mxEvent.addListener(document.body,"click", mxUtils.bind(this,function(e){mxEvent.isConsumed(e)||null==this.userPanel||null==this.userPanel.parentNode||this.userPanel.parentNode.removeChild(this.userPanel)})));var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()?b=this.gitHub.getUser():null!=this.gitLab&&null!=this.gitLab.getUser()&& (b=this.gitLab.getUser());null!=b?(this.userElement.innerText="",560<screen.width&&(mxUtils.write(this.userElement,b.displayName),this.userElement.style.display="block")):this.userElement.style.display="none"}else null!=this.userElement&&(this.userElement.parentNode.removeChild(this.userElement),this.userElement=null)}; App.prototype.getCurrentUser=function(){var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(b=this.gitHub.getUser());return b};var editorResetGraph=Editor.prototype.resetGraph; Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);null==this.graph.defaultPageFormat&&(this.graph.pageFormat=mxSettings.getPageFormat())};(function(){var b=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-(EditorUi.isElectronApp?50:10)+"px";b.apply(this,arguments)};Menus.prototype.createHelpLink=function(f){var c=document.createElement("span");c.setAttribute("title",mxResources.get("help"));c.style.cssText="color:blue;text-decoration:underline;margin-left:8px;cursor:help;"; var l=document.createElement("img");mxUtils.setOpacity(l,50);l.style.height="16px";l.style.width="16px";l.setAttribute("border","0");l.setAttribute("valign","bottom");l.setAttribute("src",Editor.helpImage);c.appendChild(l);mxEvent.addGestureListeners(c,mxUtils.bind(this,function(m){this.editorUi.hideCurrentMenu();this.editorUi.openLink(f);mxEvent.consume(m)}));return c};Menus.prototype.addLinkToItem=function(f,c){null!=f&&f.firstChild.nextSibling.appendChild(this.createHelpLink(c))};var e=Menus.prototype.init; -Menus.prototype.init=function(){function f(v,u,G){this.ui=v;this.previousExtFonts=this.extFonts=u;this.prevCustomFonts=this.customFonts=G}e.apply(this,arguments);var c=this.editorUi,l=c.editor.graph,m=mxUtils.bind(l,l.isEnabled),x=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),z=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&& -(null==document.documentMode||9<document.documentMode),C=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"app.diagrams.net"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!mxClient.IS_IOS&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),d="1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);mxClient.IS_SVG|| -c.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(v){return"file"!=v}));c.actions.addAction("new...",function(){var v=c.isOffline();if(v||"1"!=urlParams.newTempDlg||c.mode!=App.MODE_GOOGLE){var u=new NewDialog(c,v,!(c.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));c.showDialog(u.container,v?350:620,v?70:460,!0,!0,function(H){c.sidebar.hideTooltip();H&&null==c.getCurrentFile()&&c.showSplash()}); -u.init()}else{var G=function(H){return{id:H.id,isExt:!0,url:H.downloadUrl,title:H.title,imgUrl:H.thumbnailLink,changedBy:H.lastModifyingUserName,lastModifiedOn:H.modifiedDate}};v=new TemplatesDialog(c,function(H,M,K){var I=K.libs,F=K.clibs;c.pickFolder(c.mode,function(P){c.createFile(M,H,null!=I&&0<I.length?I:null,null,function(){c.hideDialog()},null,P,null,null!=F&&0<F.length?F:null)},null==c.stateArg||null==c.stateArg.folderId)},null,null,null,"user",function(H,M,K){var I=new Date;I.setDate(I.getDate()- -7);c.drive.listFiles(null,I,K?!0:!1,function(F){for(var P=[],U=0;U<F.items.length;U++)P.push(G(F.items[U]));H(P)},M)},function(H,M,K,I){c.drive.listFiles(H,null,I?!0:!1,function(F){for(var P=[],U=0;U<F.items.length;U++)P.push(G(F.items[U]));M(P)},K)},function(H,M,K){c.drive.getFile(H.id,function(I){M(I.data)},K)},null,null,!1,!1);c.showDialog(v.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}});c.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(l.isEnabled()&& +Menus.prototype.init=function(){function f(v,u,G){this.ui=v;this.previousExtFonts=this.extFonts=u;this.prevCustomFonts=this.customFonts=G}e.apply(this,arguments);var c=this.editorUi,l=c.editor.graph,m=mxUtils.bind(l,l.isEnabled),x=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),y=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&& +(null==document.documentMode||9<document.documentMode),D=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"app.diagrams.net"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!mxClient.IS_IOS&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),d="1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);mxClient.IS_SVG|| +c.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(v){return"file"!=v}));c.actions.addAction("new...",function(){var v=c.isOffline();if(v||"1"!=urlParams.newTempDlg||c.mode!=App.MODE_GOOGLE){var u=new NewDialog(c,v,!(c.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));c.showDialog(u.container,v?350:620,v?70:460,!0,!0,function(I){c.sidebar.hideTooltip();I&&null==c.getCurrentFile()&&c.showSplash()}); +u.init()}else{var G=function(I){return{id:I.id,isExt:!0,url:I.downloadUrl,title:I.title,imgUrl:I.thumbnailLink,changedBy:I.lastModifyingUserName,lastModifiedOn:I.modifiedDate}};v=new TemplatesDialog(c,function(I,F,L){var K=L.libs,H=L.clibs;c.pickFolder(c.mode,function(Q){c.createFile(F,I,null!=K&&0<K.length?K:null,null,function(){c.hideDialog()},null,Q,null,null!=H&&0<H.length?H:null)},null==c.stateArg||null==c.stateArg.folderId)},null,null,null,"user",function(I,F,L){var K=new Date;K.setDate(K.getDate()- +7);c.drive.listFiles(null,K,L?!0:!1,function(H){for(var Q=[],U=0;U<H.items.length;U++)Q.push(G(H.items[U]));I(Q)},F)},function(I,F,L,K){c.drive.listFiles(I,null,K?!0:!1,function(H){for(var Q=[],U=0;U<H.items.length;U++)Q.push(G(H.items[U]));F(Q)},L)},function(I,F,L){c.drive.getFile(I.id,function(K){F(K.data)},L)},null,null,!1,!1);c.showDialog(v.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}});c.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(l.isEnabled()&& !l.isCellLocked(l.getDefaultParent())){var v=new NewDialog(c,null,!1,function(u){c.hideDialog();if(null!=u){var G=c.editor.graph.getFreeInsertPoint();l.setSelectionCells(c.importXml(u,Math.max(G.x,20),Math.max(G.y,20),!0,null,null,!0));l.scrollCellToVisible(l.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));c.showDialog(v.container,620,460,!0,!0,function(){c.sidebar.hideTooltip()});v.init()}})).isEnabled=m;var g=c.actions.addAction("shareCursor", function(){c.setShareCursorPosition(!c.isShareCursorPosition())});g.setToggleAction(!0);g.setSelectedCallback(function(){return c.isShareCursorPosition()});g=c.actions.addAction("showRemoteCursors",function(){c.setShowRemoteCursors(!c.isShowRemoteCursors())});g.setToggleAction(!0);g.setSelectedCallback(function(){return c.isShowRemoteCursors()});g=c.actions.addAction("points",function(){c.editor.graph.view.setUnit(mxConstants.POINTS)});g.setToggleAction(!0);g.setSelectedCallback(function(){return c.editor.graph.view.unit== mxConstants.POINTS});g=c.actions.addAction("inches",function(){c.editor.graph.view.setUnit(mxConstants.INCHES)});g.setToggleAction(!0);g.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.INCHES});g=c.actions.addAction("millimeters",function(){c.editor.graph.view.setUnit(mxConstants.MILLIMETERS)});g.setToggleAction(!0);g.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.MILLIMETERS});g=c.actions.addAction("meters",function(){c.editor.graph.view.setUnit(mxConstants.METERS)}); g.setToggleAction(!0);g.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.METERS});this.put("units",new Menu(mxUtils.bind(this,function(v,u){this.addMenuItems(v,["points","inches","millimeters","meters"],u)})));g=c.actions.addAction("ruler",function(){mxSettings.setRulerOn(!mxSettings.isRulerOn());mxSettings.save();null!=c.ruler?(c.ruler.destroy(),c.ruler=null):c.ruler=new mxDualRuler(c,c.editor.graph.view.unit);c.refresh()});g.setEnabled(c.canvasSupported&&9!=document.documentMode); g.setToggleAction(!0);g.setSelectedCallback(function(){return null!=c.ruler});g=c.actions.addAction("fullscreen",function(){"1"==urlParams.embedInline?c.setInlineFullscreen(!Editor.inlineFullscreen):null==document.fullscreenElement?document.body.requestFullscreen():document.exitFullscreen()});g.visible="1"==urlParams.embedInline||window==window.top&&document.fullscreenEnabled&&null!=document.body.requestFullscreen;g.setToggleAction(!0);g.setSelectedCallback(function(){return"1"==urlParams.embedInline? -Editor.inlineFullscreen:null!=document.fullscreenElement});g=c.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(v){c.setDarkMode(!Editor.isDarkMode());v=mxSettings.getUi();"atlas"!=v&&"min"!=v&&"sketch"!=v&&c.setCurrentTheme(Editor.isDarkMode()?"dark":"kennedy",!0)}));g.setToggleAction(!0);g.setSelectedCallback(function(){return Editor.isDarkMode()});g.isEnabled=function(){return"atlas"!=mxSettings.getUi()};c.actions.addAction("properties...",function(){var v=new FilePropertiesDialog(c); -c.showDialog(v.container,320,120,!0,!0);v.init()}).isEnabled=m;window.mxFreehand&&(c.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(){if(l.isEnabled()){if(null==this.freehandWindow){var v=!mxClient.IS_IE&&!mxClient.IS_IE11;this.freehandWindow=new FreehandWindow(c,document.body.offsetWidth-420,102,176,v?120:84,v)}l.freehand.isDrawing()?l.freehand.stopDrawing():l.freehand.startDrawing();this.freehandWindow.window.setVisible(l.freehand.isDrawing())}},null,null,"X")).isEnabled= -function(){return m()&&mxClient.IS_SVG});c.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var v=document.createElement("div");v.style.whiteSpace="nowrap";var u=null==c.pages||1>=c.pages.length,G=document.createElement("h3");mxUtils.write(G,mxResources.get("formatXml"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";v.appendChild(G);var H=c.addCheckbox(v,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),M=c.addCheckbox(v,mxResources.get("compressed"), -!0),K=c.addCheckbox(v,mxResources.get("allPages"),!u,u);K.style.marginBottom="16px";mxEvent.addListener(H,"change",function(){H.checked?K.setAttribute("disabled","disabled"):K.removeAttribute("disabled")});v=new CustomDialog(c,v,mxUtils.bind(this,function(){c.downloadFile("xml",!M.checked,null,!H.checked,u||!K.checked)}),null,mxResources.get("export"));c.showDialog(v.container,300,200,!0,!0)}));Editor.enableExportUrl&&c.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){c.showPublishLinkDialog(mxResources.get("url"), -!0,null,null,function(v,u,G,H,M,K,I,F,P){I=[];P&&I.push("tags=%7B%7D");v=new EmbedDialog(c,c.createLink(v,u,G,H,M,K,null,!0,I));c.showDialog(v.container,450,240,!0,!0);v.init()})}));c.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(v){c.spinner.stop();c.showHtmlDialog(mxResources.get("export"),null,v,function(u,G,H,M,K,I,F,P,U,T,V){c.createHtml(u,G,H,M,K, -I,F,P,U,T,V,mxUtils.bind(this,function(W,q){var D=c.getBaseFilename(F);W='\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>'+W+"\n"+q+"\n</body>\n</html>";c.saveData(D+(".drawio"==D.substring(D.lenth-7)?"":".drawio")+".html","html",W,"text/html")}))})})}));c.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp|| -!c.isOffline()&&!c.printPdfExport){var v=null==c.pages||1>=c.pages.length,u=document.createElement("div");u.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,mxResources.get("formatPdf"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";u.appendChild(G);var H=function(){F!=this&&this.checked?(q.removeAttribute("disabled"),q.checked=!l.pageVisible):(q.setAttribute("disabled","disabled"),q.checked=!1)};G=200;var M=1,K=null;if(c.pdfPageExport&& -!v){var I=function(){V.value=Math.max(1,Math.min(M,Math.max(parseInt(V.value),parseInt(U.value))));U.value=Math.max(1,Math.min(M,Math.min(parseInt(V.value),parseInt(U.value))))},F=c.addRadiobox(u,"pages",mxResources.get("allPages"),!0),P=c.addRadiobox(u,"pages",mxResources.get("pages")+":",!1,null,!0),U=document.createElement("input");U.style.cssText="margin:0 8px 0 8px;";U.setAttribute("value","1");U.setAttribute("type","number");U.setAttribute("min","1");U.style.width="50px";u.appendChild(U);var T= -document.createElement("span");mxUtils.write(T,mxResources.get("to"));u.appendChild(T);var V=U.cloneNode(!0);u.appendChild(V);mxEvent.addListener(U,"focus",function(){P.checked=!0});mxEvent.addListener(V,"focus",function(){P.checked=!0});mxEvent.addListener(U,"change",I);mxEvent.addListener(V,"change",I);if(null!=c.pages&&(M=c.pages.length,null!=c.currentPage))for(I=0;I<c.pages.length;I++)if(c.currentPage==c.pages[I]){K=I+1;U.value=K;V.value=K;break}U.setAttribute("max",M);V.setAttribute("max",M); -mxUtils.br(u);var W=c.addRadiobox(u,"pages",mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),q=c.addCheckbox(u,mxResources.get("crop"),!1,!0),D=c.addCheckbox(u,mxResources.get("grid"),!1,!1);mxEvent.addListener(F,"change",H);mxEvent.addListener(P,"change",H);mxEvent.addListener(W,"change",H);G+=64}else W=c.addCheckbox(u,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),q=c.addCheckbox(u,mxResources.get("crop"),!l.pageVisible||!c.pdfPageExport,!c.pdfPageExport),D=c.addCheckbox(u,mxResources.get("grid"), -!1,!1),c.pdfPageExport||mxEvent.addListener(W,"change",H);H=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==c.getServiceName();var L=null,R=null;if(EditorUi.isElectronApp||H)R=c.addCheckbox(u,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),G+=30;H&&(L=c.addCheckbox(u,mxResources.get("transparentBackground"),!1),G+=30);u=new CustomDialog(c,u,mxUtils.bind(this,function(){var O=null;if(!v){O=parseInt(U.value);var Q=parseInt(V.value);O=F.checked||O==K&&Q==K?null:{from:Math.max(0, -Math.min(M-1,O-1)),to:Math.max(0,Math.min(M-1,Q-1))}}c.downloadFile("pdf",null,null,!W.checked,v?!0:!F.checked&&null==O,!q.checked,null!=L&&L.checked,null,null,D.checked,null!=R&&R.checked,O)}),null,mxResources.get("export"));c.showDialog(u.container,300,G,!0,!0)}else c.showDialog((new PrintDialog(c,mxResources.get("formatPdf"))).container,360,null!=c.pages&&1<c.pages.length&&(c.editor.editable||"1"!=urlParams["hide-pages"])?470:390,!0,!0)}));c.actions.addAction("open...",function(){c.pickFile()}); +Editor.inlineFullscreen:null!=document.fullscreenElement});g=c.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(v){c.setDarkMode(!Editor.isDarkMode());v=mxSettings.getUi();"atlas"!=v&&"min"!=v&&"sketch"!=v&&c.setCurrentTheme(Editor.isDarkMode()?"dark":"kennedy",!0)}));g.setToggleAction(!0);g.setSelectedCallback(function(){return Editor.isDarkMode()});c.actions.addAction("properties...",function(){var v=new FilePropertiesDialog(c);c.showDialog(v.container,320,120,!0,!0);v.init()}).isEnabled= +m;window.mxFreehand&&(c.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(){if(l.isEnabled()){if(null==this.freehandWindow){var v=!mxClient.IS_IE&&!mxClient.IS_IE11;this.freehandWindow=new FreehandWindow(c,document.body.offsetWidth-420,102,176,v?120:84,v)}l.freehand.isDrawing()?l.freehand.stopDrawing():l.freehand.startDrawing();this.freehandWindow.window.setVisible(l.freehand.isDrawing())}},null,null,"X")).isEnabled=function(){return m()&&mxClient.IS_SVG});c.actions.put("exportXml", +new Action(mxResources.get("formatXml")+"...",function(){var v=document.createElement("div");v.style.whiteSpace="nowrap";var u=null==c.pages||1>=c.pages.length,G=document.createElement("h3");mxUtils.write(G,mxResources.get("formatXml"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";v.appendChild(G);var I=c.addCheckbox(v,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),F=c.addCheckbox(v,mxResources.get("compressed"),!0),L=c.addCheckbox(v,mxResources.get("allPages"), +!u,u);L.style.marginBottom="16px";mxEvent.addListener(I,"change",function(){I.checked?L.setAttribute("disabled","disabled"):L.removeAttribute("disabled")});v=new CustomDialog(c,v,mxUtils.bind(this,function(){c.downloadFile("xml",!F.checked,null,!I.checked,u||!L.checked)}),null,mxResources.get("export"));c.showDialog(v.container,300,200,!0,!0)}));Editor.enableExportUrl&&c.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){c.showPublishLinkDialog(mxResources.get("url"),!0,null, +null,function(v,u,G,I,F,L,K,H,Q){K=[];Q&&K.push("tags=%7B%7D");v=new EmbedDialog(c,c.createLink(v,u,G,I,F,L,null,!0,K));c.showDialog(v.container,450,240,!0,!0);v.init()})}));c.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(v){c.spinner.stop();c.showHtmlDialog(mxResources.get("export"),null,v,function(u,G,I,F,L,K,H,Q,U,T,V){c.createHtml(u,G,I,F,L,K,H,Q,U, +T,V,mxUtils.bind(this,function(W,t){var C=c.getBaseFilename(H);W='\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(C)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+W+"\n"+t+"\n</body>\n</html>";c.saveData(C+(".drawio"==C.substring(C.lenth-7)?"":".drawio")+".html","html",W,"text/html")}))})})}));c.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp|| +!c.isOffline()&&!c.printPdfExport){var v=null==c.pages||1>=c.pages.length,u=document.createElement("div");u.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,mxResources.get("formatPdf"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";u.appendChild(G);var I=function(){H!=this&&this.checked?(t.removeAttribute("disabled"),t.checked=!l.pageVisible):(t.setAttribute("disabled","disabled"),t.checked=!1)};G=200;var F=1,L=null;if(c.pdfPageExport&& +!v){var K=function(){V.value=Math.max(1,Math.min(F,Math.max(parseInt(V.value),parseInt(U.value))));U.value=Math.max(1,Math.min(F,Math.min(parseInt(V.value),parseInt(U.value))))},H=c.addRadiobox(u,"pages",mxResources.get("allPages"),!0),Q=c.addRadiobox(u,"pages",mxResources.get("pages")+":",!1,null,!0),U=document.createElement("input");U.style.cssText="margin:0 8px 0 8px;";U.setAttribute("value","1");U.setAttribute("type","number");U.setAttribute("min","1");U.style.width="50px";u.appendChild(U);var T= +document.createElement("span");mxUtils.write(T,mxResources.get("to"));u.appendChild(T);var V=U.cloneNode(!0);u.appendChild(V);mxEvent.addListener(U,"focus",function(){Q.checked=!0});mxEvent.addListener(V,"focus",function(){Q.checked=!0});mxEvent.addListener(U,"change",K);mxEvent.addListener(V,"change",K);if(null!=c.pages&&(F=c.pages.length,null!=c.currentPage))for(K=0;K<c.pages.length;K++)if(c.currentPage==c.pages[K]){L=K+1;U.value=L;V.value=L;break}U.setAttribute("max",F);V.setAttribute("max",F); +mxUtils.br(u);var W=c.addRadiobox(u,"pages",mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),t=c.addCheckbox(u,mxResources.get("crop"),!1,!0),C=c.addCheckbox(u,mxResources.get("grid"),!1,!1);mxEvent.addListener(H,"change",I);mxEvent.addListener(Q,"change",I);mxEvent.addListener(W,"change",I);G+=64}else W=c.addCheckbox(u,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),t=c.addCheckbox(u,mxResources.get("crop"),!l.pageVisible||!c.pdfPageExport,!c.pdfPageExport),C=c.addCheckbox(u,mxResources.get("grid"), +!1,!1),c.pdfPageExport||mxEvent.addListener(W,"change",I);I=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==c.getServiceName();var N=null,R=null;if(EditorUi.isElectronApp||I)R=c.addCheckbox(u,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),G+=30;I&&(N=c.addCheckbox(u,mxResources.get("transparentBackground"),!1),G+=30);u=new CustomDialog(c,u,mxUtils.bind(this,function(){var O=null;if(!v){O=parseInt(U.value);var P=parseInt(V.value);O=H.checked||O==L&&P==L?null:{from:Math.max(0, +Math.min(F-1,O-1)),to:Math.max(0,Math.min(F-1,P-1))}}c.downloadFile("pdf",null,null,!W.checked,v?!0:!H.checked&&null==O,!t.checked,null!=N&&N.checked,null,null,C.checked,null!=R&&R.checked,O)}),null,mxResources.get("export"));c.showDialog(u.container,300,G,!0,!0)}else c.showDialog((new PrintDialog(c,mxResources.get("formatPdf"))).container,360,null!=c.pages&&1<c.pages.length&&(c.editor.editable||"1"!=urlParams["hide-pages"])?470:390,!0,!0)}));c.actions.addAction("open...",function(){c.pickFile()}); c.actions.addAction("close",function(){function v(){null!=u&&u.removeDraft();c.fileLoaded(null)}var u=c.getCurrentFile();null!=u&&u.isModified()?c.confirm(mxResources.get("allChangesLost"),null,v,mxResources.get("cancel"),mxResources.get("discardChanges")):v()});c.actions.addAction("editShape...",mxUtils.bind(this,function(){l.getSelectionCells();if(1==l.getSelectionCount()){var v=l.getSelectionCell(),u=l.view.getState(v);null!=u&&null!=u.shape&&null!=u.shape.stencil&&(v=new EditShapeDialog(c,v,mxResources.get("editShape")+ ":",630,400),c.showDialog(v.container,640,480,!0,!1),v.init())}}));c.actions.addAction("revisionHistory...",function(){c.isRevisionHistorySupported()?c.spinner.spin(document.body,mxResources.get("loading"))&&c.getRevisions(mxUtils.bind(this,function(v,u){c.spinner.stop();v=new RevisionDialog(c,v,u);c.showDialog(v.container,640,480,!0,!0);v.init()}),mxUtils.bind(this,function(v){c.handleError(v)})):c.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});c.actions.addAction("createRevision", function(){c.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");g=c.actions.addAction("synchronize",function(){c.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(g.label=mxResources.get("refresh"));c.actions.addAction("upload...",function(){var v=c.getCurrentFile();null!=v&&(window.drawdata=c.getFileData(),v=null!=v.getTitle()?v.getTitle():c.defaultFilename,c.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+ (c.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(v),null,!0))});"undefined"!==typeof MathJax&&(g=c.actions.addAction("mathematicalTypesetting",function(){var v=new ChangePageSetup(c);v.ignoreColor=!0;v.ignoreImage=!0;v.mathEnabled=!c.isMathEnabled();l.model.execute(v)}),g.setToggleAction(!0),g.setSelectedCallback(function(){return c.isMathEnabled()}),g.isEnabled=m);isLocalStorage&&(g=c.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen()); mxSettings.save()}),g.setToggleAction(!0),g.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var k=c.actions.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});k.setToggleAction(!0);k.setSelectedCallback(function(){return k.isEnabled()&&c.editor.autosave});c.actions.addAction("editGeometry...",function(){for(var v=l.getSelectionCells(),u=[],G=0;G<v.length;G++)l.getModel().isVertex(v[G])&&u.push(v[G]);0<u.length&&(v=new EditGeometryDialog(c,u),c.showDialog(v.container, 200,270,!0,!0),v.init())},null,null,Editor.ctrlKey+"+Shift+M");var n=null;c.actions.addAction("copyStyle",function(){l.isEnabled()&&!l.isSelectionEmpty()&&(n=l.copyStyle(l.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");c.actions.addAction("pasteStyle",function(){l.isEnabled()&&!l.isSelectionEmpty()&&null!=n&&l.pasteStyle(n,l.getSelectionCells())},null,null,Editor.ctrlKey+"+Shift+V");c.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!c.isOffline()){var v= -new BackgroundImageDialog(c,function(u){c.setBackgroundImage(u)});c.showDialog(v.container,400,170,!0,!0);v.init()}}));c.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(v,u,G,H,M,K,I,F,P,U,T,V,W,q,D){P=parseInt(v);!isNaN(P)&&0<P&&(D?c.downloadFile("remoteSvg",null,null,G,null,F,u,v,I,null,M):c.exportSvg(P/100,u,G, -H,M,K,I,!F,!1,U,V,W,q))}),!0,null,"svg",!0)}));c.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(v,u,G,H,M,K,I,F,P,U,T,V,W){v=parseInt(v);!isNaN(v)&&0<v&&c.exportImage(v/100,u,G,H,M,I,!F,!1,null,T,null,V,W)}),!0,Editor.defaultIncludeDiagram,"png",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone|| -c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(v,u,G,H,M){c.downloadFile(u?"xmlpng":"png",null,null,v,null,null,G,H,M)}),!1,!0)}));c.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(v,u,G,H,M,K,I,F,P,U,T,V,W){v=parseInt(v);!isNaN(v)&&0<v&&c.exportImage(v/100,!1, -G,H,!1,I,!F,!1,"jpeg",T,null,V,W)}),!0,!1,"jpeg",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(v,u,G,H,M){c.downloadFile("jpeg",null,null,v,null,null,null,H,M)}),!0,!0)}));g=c.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var v=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),u=mxUtils.getXml(0==v.length?c.editor.getGraphXml():l.encodeCells(v));c.copyImage(v,u)}));g.visible= +new BackgroundImageDialog(c,function(u){c.setBackgroundImage(u)});c.showDialog(v.container,400,170,!0,!0);v.init()}}));c.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(v,u,G,I,F,L,K,H,Q,U,T,V,W,t,C){Q=parseInt(v);!isNaN(Q)&&0<Q&&(C?c.downloadFile("remoteSvg",null,null,G,null,H,u,v,K,null,F):c.exportSvg(Q/100,u,G, +I,F,L,K,!H,!1,U,V,W,t))}),!0,null,"svg",!0)}));c.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(v,u,G,I,F,L,K,H,Q,U,T,V,W){v=parseInt(v);!isNaN(v)&&0<v&&c.exportImage(v/100,u,G,I,F,K,!H,!1,null,T,null,V,W)}),!0,Editor.defaultIncludeDiagram,"png",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone|| +c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(v,u,G,I,F){c.downloadFile(u?"xmlpng":"png",null,null,v,null,null,G,I,F)}),!1,!0)}));c.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(v,u,G,I,F,L,K,H,Q,U,T,V,W){v=parseInt(v);!isNaN(v)&&0<v&&c.exportImage(v/100,!1, +G,I,!1,K,!H,!1,"jpeg",T,null,V,W)}),!0,!1,"jpeg",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(v,u,G,I,F){c.downloadFile("jpeg",null,null,v,null,null,null,I,F)}),!0,!0)}));g=c.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var v=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),u=mxUtils.getXml(0==v.length?c.editor.getGraphXml():l.encodeCells(v));c.copyImage(v,u)}));g.visible= Editor.enableNativeCipboard&&c.isExportToCanvas()&&!mxClient.IS_SF;g=c.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){l.setShadowVisible(!l.shadowVisible)}));g.setToggleAction(!0);g.setSelectedCallback(function(){return l.shadowVisible});c.actions.put("about",new Action(mxResources.get("about")+" "+EditorUi.VERSION+"...",function(){c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.alert(c.editor.appName+" "+EditorUi.VERSION):c.openLink("https://www.diagrams.net/")})); c.actions.addAction("support...",function(){EditorUi.isElectronApp?c.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):c.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});c.actions.addAction("exportOptionsDisabled...",function(){c.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});c.actions.addAction("keyboardShortcuts...",function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp? c.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):c.openLink("shortcuts.svg")});c.actions.addAction("feedback...",function(){var v=new FeedbackDialog(c);c.showDialog(v.container,610,360,!0,!1);v.init()});c.actions.addAction("quickStart...",function(){c.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});g=c.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(c,document.body.offsetWidth-400,60, 212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,function(){c.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+K");g.setToggleAction(!0);g.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&& -this.tagsWindow.window.isVisible()}));g=c.actions.addAction("findReplace",mxUtils.bind(this,function(v,u){var G=(v=l.isEnabled()&&(null==u||!mxEvent.isShiftDown(u)))?"findReplace":"find";u=G+"Window";if(null==this[u]){var H=v?"min"==uiTheme?330:300:240;this[u]=new FindWindow(c,document.body.offsetWidth-(H+20),100,H,v?"min"==uiTheme?304:288:170,v);this[u].window.addListener("show",function(){c.fireEvent(new mxEventObject(G))});this[u].window.addListener("hide",function(){c.fireEvent(new mxEventObject(G))}); +this.tagsWindow.window.isVisible()}));g=c.actions.addAction("findReplace",mxUtils.bind(this,function(v,u){var G=(v=l.isEnabled()&&(null==u||!mxEvent.isShiftDown(u)))?"findReplace":"find";u=G+"Window";if(null==this[u]){var I=v?"min"==uiTheme?330:300:240;this[u]=new FindWindow(c,document.body.offsetWidth-(I+20),100,I,v?"min"==uiTheme?304:288:170,v);this[u].window.addListener("show",function(){c.fireEvent(new mxEventObject(G))});this[u].window.addListener("hide",function(){c.fireEvent(new mxEventObject(G))}); this[u].window.setVisible(!0)}else this[u].window.setVisible(!this[u].window.isVisible())}),null,null,Editor.ctrlKey+"+F");g.setToggleAction(!0);g.setSelectedCallback(mxUtils.bind(this,function(){var v=l.isEnabled()?"findReplaceWindow":"findWindow";return null!=this[v]&&this[v].window.isVisible()}));c.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var v=null==c.pages||1>=c.pages.length;if(v)c.exportVisio();else{var u=document.createElement("div");u.style.whiteSpace= -"nowrap";var G=document.createElement("h3");mxUtils.write(G,mxResources.get("formatVsdx"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";u.appendChild(G);var H=c.addCheckbox(u,mxResources.get("allPages"),!v,v);H.style.marginBottom="16px";v=new CustomDialog(c,u,mxUtils.bind(this,function(){c.exportVisio(!H.checked)}),null,mxResources.get("export"));c.showDialog(v.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&c.actions.addAction("configuration...", -function(){var v=document.createElement("input");v.setAttribute("type","checkbox");v.style.marginRight="4px";v.checked=mxSettings.getShowStartScreen();v.defaultChecked=v.checked;if(c.isSettingsEnabled()&&"1"==urlParams.sketch){var u=document.createElement("span");u.style["float"]="right";u.style.cursor="pointer";u.style.userSelect="none";u.style.marginTop="-4px";u.appendChild(v);mxUtils.write(u,mxResources.get("showStartScreen"));mxEvent.addListener(u,"click",function(M){mxEvent.getSource(M)!=v&& -(v.checked=!v.checked)});header=u}var G=localStorage.getItem(Editor.configurationKey);u=[[mxResources.get("reset"),function(M,K){c.confirm(mxResources.get("areYouSure"),function(){try{mxEvent.isShiftDown(M)?(localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config")):(localStorage.removeItem(Editor.configurationKey),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired")))}catch(I){c.handleError(I)}})},"Shift+Click to Reset Settings"]];var H=c.actions.get("plugins"); -null!=H&&"1"==urlParams.sketch&&u.push([mxResources.get("plugins"),H.funct]);EditorUi.isElectronApp||u.push([mxResources.get("share"),function(M,K){if(0<K.value.length)try{var I=JSON.parse(K.value),F=window.location.protocol+"//"+window.location.host+"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(I)),P=new EmbedDialog(c,F);c.showDialog(P.container,450,240,!0);P.init()}catch(U){c.handleError(U)}else c.handleError({message:mxResources.get("invalidInput")})}]);u=new TextareaDialog(c,mxResources.get("configuration")+ -":",null!=G?JSON.stringify(JSON.parse(G),null,2):"",function(M){if(null!=M)try{if(null!=v.parentNode&&(mxSettings.setShowStartScreen(v.checked),mxSettings.save()),M==G)c.hideDialog();else{if(0<M.length){var K=JSON.parse(M);localStorage.setItem(Editor.configurationKey,JSON.stringify(K))}else localStorage.removeItem(Editor.configurationKey);c.hideDialog();c.alert(mxResources.get("restartForChangeRequired"))}}catch(I){c.handleError(I)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor", -u,v.parentNode);c.showDialog(u.container,620,460,!0,!1);u.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(v,u){var G=mxUtils.bind(this,function(M){var K=""==M?mxResources.get("automatic"):mxLanguageMap[M],I=null;""!=K&&(I=v.addItem(K,null,mxUtils.bind(this,function(){mxSettings.setLanguage(M);mxSettings.save();mxClient.language=M;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);c.alert(mxResources.get("restartForChangeRequired"))}), -u),(M==mxLanguage||""==M&&null==mxLanguage)&&v.addCheckmark(I,Editor.checkmarkImage));return I});G("");v.addSeparator(u);for(var H in mxLanguageMap)G(H)})));var t=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(v){var u=t.apply(this,arguments);if(null!=u&&"1"!=urlParams.noLangIcon){var G=this.get("language");if(null!=G){G=u.addMenu("",G.funct);G.setAttribute("title",mxResources.get("language"));G.className="geAdaptiveAsset";G.style.width="16px";G.style.paddingTop="2px";G.style.paddingLeft= -"4px";G.style.zIndex="1";G.style.position="absolute";G.style.display="block";G.style.cursor="pointer";G.style.right="17px";"atlas"==uiTheme?(G.style.top="6px",G.style.right="15px"):G.style.top="min"==uiTheme?"2px":"0px";var H=document.createElement("div");H.style.backgroundImage="url("+Editor.globeImage+")";H.style.backgroundPosition="center center";H.style.backgroundRepeat="no-repeat";H.style.backgroundSize="19px 19px";H.style.position="absolute";H.style.height="19px";H.style.width="19px";H.style.marginTop= -"2px";H.style.zIndex="1";G.appendChild(H);mxUtils.setOpacity(G,40);"1"==urlParams.winCtrls&&(G.style.right="95px",G.style.width="19px",G.style.height="19px",G.style.webkitAppRegion="no-drag",H.style.webkitAppRegion="no-drag");"atlas"==uiTheme&&(G.style.opacity="0.85",G.style.filter="invert(100%)");document.body.appendChild(G);u.langIcon=G}}return u}}c.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60, -parallelEdgeSpacing:10}}];c.actions.addAction("runLayout",function(){var v=new TextareaDialog(c,"Run Layouts:",JSON.stringify(c.customLayoutConfig,null,2),function(u){if(0<u.length)try{var G=JSON.parse(u);c.executeLayouts(l.createLayouts(G));c.customLayoutConfig=G;c.hideDialog()}catch(H){c.handleError(H)}},null,null,null,null,function(u,G){var H=mxUtils.button(mxResources.get("copy"),function(){try{var M=G.value;G.value=JSON.stringify(JSON.parse(M));G.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode? -G.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");c.alert(mxResources.get("copiedToClipboard"));G.value=M}catch(K){c.handleError(K)}});H.setAttribute("title","copy");H.className="geBtn";u.appendChild(H)},!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");c.showDialog(v.container,620,460,!0,!0);v.init()});g=this.get("layout");var p=g.funct;g.funct=function(v,u){p.apply(this,arguments);v.addItem(mxResources.get("orgChart"),null,function(){var G=null,H=20, -M=20,K=function(){if("undefined"!==typeof mxOrgChartLayout&&null!=G){var q=c.editor.graph,D=new mxOrgChartLayout(q,G,H,M),L=q.getDefaultParent();1<q.model.getChildCount(q.getSelectionCell())&&(L=q.getSelectionCell());D.execute(L)}},I=document.createElement("div"),F=document.createElement("div");F.style.marginTop="6px";F.style.display="inline-block";F.style.width="140px";mxUtils.write(F,mxResources.get("orgChartType")+": ");I.appendChild(F);var P=document.createElement("select");P.style.width="200px"; -P.style.boxSizing="border-box";F=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var U=0;U<F.length;U++){var T=document.createElement("option");mxUtils.write(T,F[U]);T.value=U;2==U&&T.setAttribute("selected","selected");P.appendChild(T)}mxEvent.addListener(P,"change",function(){G=P.value});I.appendChild(P);F=document.createElement("div"); -F.style.marginTop="6px";F.style.display="inline-block";F.style.width="140px";mxUtils.write(F,mxResources.get("parentChildSpacing")+": ");I.appendChild(F);var V=document.createElement("input");V.type="number";V.value=H;V.style.width="200px";V.style.boxSizing="border-box";I.appendChild(V);mxEvent.addListener(V,"change",function(){H=V.value});F=document.createElement("div");F.style.marginTop="6px";F.style.display="inline-block";F.style.width="140px";mxUtils.write(F,mxResources.get("siblingSpacing")+ -": ");I.appendChild(F);var W=document.createElement("input");W.type="number";W.value=M;W.style.width="200px";W.style.boxSizing="border-box";I.appendChild(W);mxEvent.addListener(W,"change",function(){M=W.value});I=new CustomDialog(c,I,function(){null==G&&(G=2);c.loadOrgChartLayouts(K)});c.showDialog(I.container,355,140,!0,!0)},u,null,m());v.addSeparator(u);v.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var G=new mxParallelEdgeLayout(l);G.checkOverlap=!0;c.prompt(mxResources.get("spacing"), -G.spacing,mxUtils.bind(this,function(H){G.spacing=H;c.executeLayout(function(){G.execute(l.getDefaultParent(),l.isSelectionEmpty()?null:l.getSelectionCells())},!1)}))}),u);v.addSeparator(u);c.menus.addMenuItem(v,"runLayout",u,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(v,u){if(!mxClient.IS_CHROMEAPP&&c.isOffline())this.addMenuItems(v,["about"],u);else{var G=v.addItem("Search:",null,null,u,null,null,!1);G.style.backgroundColor=Editor.isDarkMode()? -"#505759":"whiteSmoke";G.style.cursor="default";var H=document.createElement("input");H.setAttribute("type","text");H.setAttribute("size","25");H.style.marginLeft="8px";mxEvent.addListener(H,"keydown",mxUtils.bind(this,function(M){var K=mxUtils.trim(H.value);13==M.keyCode&&0<K.length?(this.editorUi.openLink("https://www.diagrams.net/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(K)),H.value="",EditorUi.logEvent({category:"SEARCH-HELP", -action:"search",label:K}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==M.keyCode&&(H.value="")}));G.firstChild.nextSibling.appendChild(H);mxEvent.addGestureListeners(H,function(M){document.activeElement!=H&&H.focus();mxEvent.consume(M)},function(M){mxEvent.consume(M)},function(M){mxEvent.consume(M)});window.setTimeout(function(){H.focus()},0);EditorUi.isElectronApp?(c.actions.addAction("website...",function(){c.openLink("https://www.diagrams.net")}),c.actions.addAction("check4Updates", +"nowrap";var G=document.createElement("h3");mxUtils.write(G,mxResources.get("formatVsdx"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";u.appendChild(G);var I=c.addCheckbox(u,mxResources.get("allPages"),!v,v);I.style.marginBottom="16px";v=new CustomDialog(c,u,mxUtils.bind(this,function(){c.exportVisio(!I.checked)}),null,mxResources.get("export"));c.showDialog(v.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&c.actions.addAction("configuration...", +function(){var v=document.createElement("input");v.setAttribute("type","checkbox");v.style.marginRight="4px";v.checked=mxSettings.getShowStartScreen();v.defaultChecked=v.checked;if(c.isSettingsEnabled()&&"1"==urlParams.sketch){var u=document.createElement("span");u.style["float"]="right";u.style.cursor="pointer";u.style.userSelect="none";u.style.marginTop="-4px";u.appendChild(v);mxUtils.write(u,mxResources.get("showStartScreen"));mxEvent.addListener(u,"click",function(F){mxEvent.getSource(F)!=v&& +(v.checked=!v.checked)});header=u}var G=localStorage.getItem(Editor.configurationKey);u=[[mxResources.get("reset"),function(F,L){c.confirm(mxResources.get("areYouSure"),function(){try{mxEvent.isShiftDown(F)?(localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config")):(localStorage.removeItem(Editor.configurationKey),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired")))}catch(K){c.handleError(K)}})},"Shift+Click to Reset Settings"]];var I=c.actions.get("plugins"); +null!=I&&"1"==urlParams.sketch&&u.push([mxResources.get("plugins"),I.funct]);EditorUi.isElectronApp||u.push([mxResources.get("share"),function(F,L){if(0<L.value.length)try{var K=JSON.parse(L.value),H=window.location.protocol+"//"+window.location.host+"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(K)),Q=new EmbedDialog(c,H);c.showDialog(Q.container,450,240,!0);Q.init()}catch(U){c.handleError(U)}else c.handleError({message:mxResources.get("invalidInput")})}]);u=new TextareaDialog(c,mxResources.get("configuration")+ +":",null!=G?JSON.stringify(JSON.parse(G),null,2):"",function(F){if(null!=F)try{if(null!=v.parentNode&&(mxSettings.setShowStartScreen(v.checked),mxSettings.save()),F==G)c.hideDialog();else{if(0<F.length){var L=JSON.parse(F);localStorage.setItem(Editor.configurationKey,JSON.stringify(L))}else localStorage.removeItem(Editor.configurationKey);c.hideDialog();c.alert(mxResources.get("restartForChangeRequired"))}}catch(K){c.handleError(K)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor", +u,v.parentNode);c.showDialog(u.container,620,460,!0,!1);u.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(v,u){var G=mxUtils.bind(this,function(F){var L=""==F?mxResources.get("automatic"):mxLanguageMap[F],K=null;""!=L&&(K=v.addItem(L,null,mxUtils.bind(this,function(){mxSettings.setLanguage(F);mxSettings.save();mxClient.language=F;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);c.alert(mxResources.get("restartForChangeRequired"))}), +u),(F==mxLanguage||""==F&&null==mxLanguage)&&v.addCheckmark(K,Editor.checkmarkImage));return K});G("");v.addSeparator(u);for(var I in mxLanguageMap)G(I)})));var q=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(v){var u=q.apply(this,arguments);if(null!=u&&"1"!=urlParams.embed&&("atlas"!=uiTheme||"1"==urlParams["live-ui"])){var G=this.get("1"==urlParams["live-ui"]?"theme":"language");if(null!=G){G=u.addMenu("",G.funct);G.setAttribute("title",mxResources.get("1"==urlParams["live-ui"]? +"preferences":"language"));G.className="geAdaptiveAsset";G.style.boxSizing="border-box";G.style.width="19px";G.style.height="19px";G.style.paddingTop="2px";G.style.paddingLeft="4px";G.style.zIndex="1";G.style.position="absolute";G.style.display="block";G.style.cursor="pointer";G.style.right="20px";G.style.top="min"==uiTheme?"2px":"0px";var I=document.createElement("div");I.className="geToolbarButton";I.style.backgroundImage="url("+Editor.globeImage+")";I.style.backgroundPosition="center center";I.style.backgroundRepeat= +"no-repeat";I.style.backgroundSize="100% 100%";I.style.filter="none";I.style.position="absolute";I.style.height="100%";I.style.width="100%";I.style.marginTop="atlas"==uiTheme?"8px":"2px";I.style.marginLeft="2px";I.style.zIndex="1";G.appendChild(I);"1"!=urlParams["live-ui"]&&mxUtils.setOpacity(G,70);"1"==urlParams.winCtrls&&(G.style.right="95px",G.style.width="19px",G.style.height="19px",G.style.webkitAppRegion="no-drag",I.style.webkitAppRegion="no-drag");"atlas"==uiTheme&&(G.style.filter="invert(100%)", +G.style.opacity="0.85");document.body.appendChild(G);u.langIcon=G;if("1"==urlParams["live-ui"]){var F=mxUtils.bind(this,function(){I.style.backgroundImage="url('"+(Editor.isDarkMode()||"atlas"==uiTheme?Editor.lightModeImage:Editor.darkModeImage)+"')"});this.editorUi.addListener("darkModeChanged",F);F()}this.editorUi.switchThemeElt=G}}return u}}c.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}]; +c.actions.addAction("runLayout",function(){var v=new TextareaDialog(c,"Run Layouts:",JSON.stringify(c.customLayoutConfig,null,2),function(u){if(0<u.length)try{var G=JSON.parse(u);c.executeLayouts(l.createLayouts(G));c.customLayoutConfig=G;c.hideDialog()}catch(I){c.handleError(I)}},null,null,null,null,function(u,G){var I=mxUtils.button(mxResources.get("copy"),function(){try{var F=G.value;G.value=JSON.stringify(JSON.parse(F));G.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?G.select(): +document.execCommand("selectAll",!1,null);document.execCommand("copy");c.alert(mxResources.get("copiedToClipboard"));G.value=F}catch(L){c.handleError(L)}});I.setAttribute("title","copy");I.className="geBtn";u.appendChild(I)},!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");c.showDialog(v.container,620,460,!0,!0);v.init()});g=this.get("layout");var p=g.funct;g.funct=function(v,u){p.apply(this,arguments);v.addItem(mxResources.get("orgChart"),null,function(){var G=null,I=20,F=20,L=function(){if("undefined"!== +typeof mxOrgChartLayout&&null!=G){var t=c.editor.graph,C=new mxOrgChartLayout(t,G,I,F),N=t.getDefaultParent();1<t.model.getChildCount(t.getSelectionCell())&&(N=t.getSelectionCell());C.execute(N)}},K=document.createElement("div"),H=document.createElement("div");H.style.marginTop="6px";H.style.display="inline-block";H.style.width="140px";mxUtils.write(H,mxResources.get("orgChartType")+": ");K.appendChild(H);var Q=document.createElement("select");Q.style.width="200px";Q.style.boxSizing="border-box"; +H=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var U=0;U<H.length;U++){var T=document.createElement("option");mxUtils.write(T,H[U]);T.value=U;2==U&&T.setAttribute("selected","selected");Q.appendChild(T)}mxEvent.addListener(Q,"change",function(){G=Q.value});K.appendChild(Q);H=document.createElement("div");H.style.marginTop= +"6px";H.style.display="inline-block";H.style.width="140px";mxUtils.write(H,mxResources.get("parentChildSpacing")+": ");K.appendChild(H);var V=document.createElement("input");V.type="number";V.value=I;V.style.width="200px";V.style.boxSizing="border-box";K.appendChild(V);mxEvent.addListener(V,"change",function(){I=V.value});H=document.createElement("div");H.style.marginTop="6px";H.style.display="inline-block";H.style.width="140px";mxUtils.write(H,mxResources.get("siblingSpacing")+": ");K.appendChild(H); +var W=document.createElement("input");W.type="number";W.value=F;W.style.width="200px";W.style.boxSizing="border-box";K.appendChild(W);mxEvent.addListener(W,"change",function(){F=W.value});K=new CustomDialog(c,K,function(){null==G&&(G=2);c.loadOrgChartLayouts(L)});c.showDialog(K.container,355,140,!0,!0)},u,null,m());v.addSeparator(u);v.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var G=new mxParallelEdgeLayout(l);G.checkOverlap=!0;c.prompt(mxResources.get("spacing"),G.spacing, +mxUtils.bind(this,function(I){G.spacing=I;c.executeLayout(function(){G.execute(l.getDefaultParent(),l.isSelectionEmpty()?null:l.getSelectionCells())},!1)}))}),u);v.addSeparator(u);c.menus.addMenuItem(v,"runLayout",u,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(v,u){if(!mxClient.IS_CHROMEAPP&&c.isOffline())this.addMenuItems(v,["about"],u);else{var G=v.addItem("Search:",null,null,u,null,null,!1);G.style.backgroundColor=Editor.isDarkMode()?"#505759": +"whiteSmoke";G.style.cursor="default";var I=document.createElement("input");I.setAttribute("type","text");I.setAttribute("size","25");I.style.marginLeft="8px";mxEvent.addListener(I,"keydown",mxUtils.bind(this,function(F){var L=mxUtils.trim(I.value);13==F.keyCode&&0<L.length?(this.editorUi.openLink("https://www.diagrams.net/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(L)),I.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search", +label:L}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==F.keyCode&&(I.value="")}));G.firstChild.nextSibling.appendChild(I);mxEvent.addGestureListeners(I,function(F){document.activeElement!=I&&I.focus();mxEvent.consume(F)},function(F){mxEvent.consume(F)},function(F){mxEvent.consume(F)});window.setTimeout(function(){I.focus()},0);EditorUi.isElectronApp?(c.actions.addAction("website...",function(){c.openLink("https://www.diagrams.net")}),c.actions.addAction("check4Updates", function(){c.checkForUpdates()}),this.addMenuItems(v,"- keyboardShortcuts quickStart website support -".split(" "),u),"1"!=urlParams.disableUpdate&&this.addMenuItems(v,["check4Updates"],u),this.addMenuItems(v,["openDevTools","-","about"],u)):this.addMenuItems(v,"- keyboardShortcuts quickStart support - about".split(" "),u)}"1"==urlParams.test&&(v.addSeparator(u),this.addSubmenu("testDevelop",v,u))})));mxResources.parse("diagramLanguage=Diagram Language");c.actions.addAction("diagramLanguage...",function(){var v= prompt("Language Code",Graph.diagramLanguage||"");null!=v&&(Graph.diagramLanguage=0<v.length?v:null,l.refresh())});if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testInspectPages=Check Pages");mxResources.parse("testFixPages=Fix Pages");mxResources.parse("testInspect=Inspect"); mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");mxResources.parse("testOptimize=Remove Inline Images");c.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!l.isSelectionEmpty()){var v=l.cloneCells(l.getSelectionCells()),u=l.getBoundingBoxFromGeometry(v);v=l.moveCells(v,-u.x,-u.y);c.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+u.width+", "+u.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(l.encodeCells(v)))+ "'),")}}));c.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var v=l.getGraphBounds(),u=l.view.translate,G=l.view.scale;l.insertVertex(l.getDefaultParent(),null,"",v.x/G-u.x,v.y/G-u.y,v.width/G,v.height/G,"fillColor=none;strokeColor=red;")}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var v=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"";v=new TextareaDialog(c,"Paste Data:",v,function(u){if(0<u.length)try{var G= -function(F){function P(Q){if(null==O[Q]){if(O[Q]=!0,null!=V[Q]){for(;0<V[Q].length;){var S=V[Q].pop();P(S)}delete V[Q]}}else mxLog.debug(U+": Visited: "+Q)}var U=F.parentNode.id,T=F.childNodes;F={};for(var V={},W=null,q={},D=0;D<T.length;D++){var L=T[D];if(null!=L.id&&0<L.id.length)if(null==F[L.id]){F[L.id]=L.id;var R=L.getAttribute("parent");null==R?null!=W?mxLog.debug(U+": Multiple roots: "+L.id):W=L.id:(null==V[R]&&(V[R]=[]),V[R].push(L.id))}else q[L.id]=L.id}T=Object.keys(q);0<T.length?(T=U+": "+ -T.length+" Duplicates: "+T.join(", "),mxLog.debug(T+" (see console)")):mxLog.debug(U+": Checked");var O={};null==W?mxLog.debug(U+": No root"):(P(W),Object.keys(O).length!=Object.keys(F).length&&(mxLog.debug(U+": Invalid tree: (see console)"),console.log(U+": Invalid tree",V)))};"<"!=u.charAt(0)&&(u=Graph.decompress(u),mxLog.debug("See console for uncompressed XML"),console.log("xml",u));var H=mxUtils.parseXml(u),M=c.getPagesForNode(H.documentElement,"mxGraphModel");if(null!=M&&0<M.length)try{var K= -c.getHashValueForPages(M);mxLog.debug("Checksum: ",K)}catch(F){mxLog.debug("Error: ",F.message)}else mxLog.debug("No pages found for checksum");var I=H.getElementsByTagName("root");for(u=0;u<I.length;u++)G(I[u]);mxLog.show()}catch(F){c.handleError(F),null!=window.console&&console.error(F)}});c.showDialog(v.container,620,460,!0,!0);v.init()}));var A=null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var v=new TextareaDialog(c,"Diff/Sync:","",function(u){var G=c.getCurrentFile(); -if(0<u.length&&null!=G)try{var H=JSON.parse(u);G.patch([H],null,!0);c.hideDialog()}catch(M){c.handleError(M)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(u,G){A=c.getPagesForXml(c.getFileData(!0));v.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(A)}],["Diff",function(u,G){try{v.textarea.value=JSON.stringify(c.diffPages(A,c.pages),null,2)}catch(H){c.handleError(H)}}]]);null==A?(A=c.getPagesForXml(c.getFileData(!0)),v.textarea.value= +function(H){function Q(P){if(null==O[P]){if(O[P]=!0,null!=V[P]){for(;0<V[P].length;){var S=V[P].pop();Q(S)}delete V[P]}}else mxLog.debug(U+": Visited: "+P)}var U=H.parentNode.id,T=H.childNodes;H={};for(var V={},W=null,t={},C=0;C<T.length;C++){var N=T[C];if(null!=N.id&&0<N.id.length)if(null==H[N.id]){H[N.id]=N.id;var R=N.getAttribute("parent");null==R?null!=W?mxLog.debug(U+": Multiple roots: "+N.id):W=N.id:(null==V[R]&&(V[R]=[]),V[R].push(N.id))}else t[N.id]=N.id}T=Object.keys(t);0<T.length?(T=U+": "+ +T.length+" Duplicates: "+T.join(", "),mxLog.debug(T+" (see console)")):mxLog.debug(U+": Checked");var O={};null==W?mxLog.debug(U+": No root"):(Q(W),Object.keys(O).length!=Object.keys(H).length&&(mxLog.debug(U+": Invalid tree: (see console)"),console.log(U+": Invalid tree",V)))};"<"!=u.charAt(0)&&(u=Graph.decompress(u),mxLog.debug("See console for uncompressed XML"),console.log("xml",u));var I=mxUtils.parseXml(u),F=c.getPagesForNode(I.documentElement,"mxGraphModel");if(null!=F&&0<F.length)try{var L= +c.getHashValueForPages(F);mxLog.debug("Checksum: ",L)}catch(H){mxLog.debug("Error: ",H.message)}else mxLog.debug("No pages found for checksum");var K=I.getElementsByTagName("root");for(u=0;u<K.length;u++)G(K[u]);mxLog.show()}catch(H){c.handleError(H),null!=window.console&&console.error(H)}});c.showDialog(v.container,620,460,!0,!0);v.init()}));var A=null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var v=new TextareaDialog(c,"Diff/Sync:","",function(u){var G=c.getCurrentFile(); +if(0<u.length&&null!=G)try{var I=JSON.parse(u);G.patch([I],null,!0);c.hideDialog()}catch(F){c.handleError(F)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(u,G){A=c.getPagesForXml(c.getFileData(!0));v.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(A)}],["Diff",function(u,G){try{v.textarea.value=JSON.stringify(c.diffPages(A,c.pages),null,2)}catch(I){c.handleError(I)}}]]);null==A?(A=c.getPagesForXml(c.getFileData(!0)),v.textarea.value= "Snapshot created "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(A)):v.textarea.value=JSON.stringify(c.diffPages(A,c.pages),null,2);c.showDialog(v.container,620,460,!0,!0);v.init()}else c.alert("No pages")}));c.actions.addAction("testInspectPages",mxUtils.bind(this,function(){var v=c.getCurrentFile();console.log("editorUi",c,"file",v);if(null!=v&&v.isRealtime()){console.log("Checksum ownPages",c.getHashValueForPages(v.ownPages));console.log("Checksum theirPages",c.getHashValueForPages(v.theirPages)); console.log("diff ownPages/theirPages",c.diffPages(v.ownPages,v.theirPages));var u=v.getShadowPages();null!=u&&(console.log("Checksum shadowPages",c.getHashValueForPages(u)),console.log("diff shadowPages/ownPages",c.diffPages(u,v.ownPages)),console.log("diff ownPages/shadowPages",c.diffPages(v.ownPages,u)),console.log("diff theirPages/shadowPages",c.diffPages(v.theirPages,u)));null!=v.sync&&null!=v.sync.snapshot&&(console.log("Checksum snapshot",c.getHashValueForPages(v.sync.snapshot)),console.log("diff ownPages/snapshot", c.diffPages(v.ownPages,v.sync.snapshot)),console.log("diff theirPages/snapshot",c.diffPages(v.theirPages,v.sync.snapshot)),null!=c.pages&&console.log("diff snapshot/actualPages",c.diffPages(v.sync.snapshot,c.pages)));null!=c.pages&&(console.log("diff ownPages/actualPages",c.diffPages(v.ownPages,c.pages)),console.log("diff theirPages/actualPages",c.diffPages(v.theirPages,c.pages)))}null!=v&&console.log("Shadow pages",[c.getXmlForPages(v.getShadowPages())]);null!=c.pages&&console.log("Checksum actualPages", c.getHashValueForPages(c.pages))}));c.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",c);var v=c.getCurrentFile();null!=v&&v.isRealtime()&&null!=v.shadowPages&&(console.log("patching actualPages to shadowPages",v.patch([c.diffPages(v.shadowPages,c.pages)])),v.ownPages=c.clonePages(c.pages),v.theirPages=c.clonePages(c.pages),v.shadowPages=c.clonePages(c.pages),null!=v.sync&&(v.sync.snapshot=c.clonePages(c.pages)))}));c.actions.addAction("testOptimize",mxUtils.bind(this, -function(){l.model.beginUpdate();try{var v=l.model.cells,u=0,G=[],H=[],M;for(M in v){var K=v[M],I=l.getCurrentCellStyle(K)[mxConstants.STYLE_IMAGE];null!=I&&"data:"==I.substring(0,5)&&(null==G[I]&&(G[I]=(G[I]||0)+1,u++),H.push(K))}l.setCellStyles(mxConstants.STYLE_IMAGE,null,H);console.log("Removed",u,"image(s) from",H.length,"cell(s): ",[H,G])}finally{l.model.endUpdate()}}));c.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(c,l.getModel())}));c.actions.addAction("testXmlImageExport", -mxUtils.bind(this,function(){var v=new mxImageExport,u=l.getGraphBounds(),G=l.view.scale,H=mxUtils.createXmlDocument(),M=H.createElement("output");H.appendChild(M);H=new mxXmlCanvas2D(M);H.translate(Math.floor((1-u.x)/G),Math.floor((1-u.y)/G));H.scale(1/G);var K=0,I=H.save;H.save=function(){K++;I.apply(this,arguments)};var F=H.restore;H.restore=function(){K--;F.apply(this,arguments)};var P=v.drawShape;v.drawShape=function(U){mxLog.debug("entering shape",U,K);P.apply(this,arguments);mxLog.debug("leaving shape", -U,K)};v.drawState(l.getView().getState(l.model.root),H);mxLog.show();mxLog.debug(mxUtils.getXml(M));mxLog.debug("stateCounter",K)}));c.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});this.put("testDevelop",new Menu(mxUtils.bind(this,function(v,u){this.addMenuItems(v,"createSidebarEntry showBoundingBox - testInspectPages testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport - testShowConsole".split(" "), +function(){l.model.beginUpdate();try{var v=l.model.cells,u=0,G=[],I=[],F;for(F in v){var L=v[F],K=l.getCurrentCellStyle(L)[mxConstants.STYLE_IMAGE];null!=K&&"data:"==K.substring(0,5)&&(null==G[K]&&(G[K]=(G[K]||0)+1,u++),I.push(L))}l.setCellStyles(mxConstants.STYLE_IMAGE,null,I);console.log("Removed",u,"image(s) from",I.length,"cell(s): ",[I,G])}finally{l.model.endUpdate()}}));c.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(c,l.getModel())}));c.actions.addAction("testXmlImageExport", +mxUtils.bind(this,function(){var v=new mxImageExport,u=l.getGraphBounds(),G=l.view.scale,I=mxUtils.createXmlDocument(),F=I.createElement("output");I.appendChild(F);I=new mxXmlCanvas2D(F);I.translate(Math.floor((1-u.x)/G),Math.floor((1-u.y)/G));I.scale(1/G);var L=0,K=I.save;I.save=function(){L++;K.apply(this,arguments)};var H=I.restore;I.restore=function(){L--;H.apply(this,arguments)};var Q=v.drawShape;v.drawShape=function(U){mxLog.debug("entering shape",U,L);Q.apply(this,arguments);mxLog.debug("leaving shape", +U,L)};v.drawState(l.getView().getState(l.model.root),I);mxLog.show();mxLog.debug(mxUtils.getXml(F));mxLog.debug("stateCounter",L)}));c.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});this.put("testDevelop",new Menu(mxUtils.bind(this,function(v,u){this.addMenuItems(v,"createSidebarEntry showBoundingBox - testInspectPages testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport - testShowConsole".split(" "), u)})))}c.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!c.isOffline()?c.showDialog((new MoreShapesDialog(c,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):c.showDialog((new MoreShapesDialog(c,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});c.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(v){l.isEnabled()&&(v=new mxCell("",new mxGeometry(0,0,120,120),c.defaultCustomShapeStyle),v.vertex=!0,v=new EditShapeDialog(c, -v,mxResources.get("editShape")+":",630,400),c.showDialog(v.container,640,480,!0,!1),v.init())})).isEnabled=m;c.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(v){c.spinner.stop();c.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",v,function(u,G,H,M,K,I,F,P,U,T,V){c.createHtml(u,G,H,M,K,I,F,P,U,T,V,mxUtils.bind(this,function(W, -q){var D=new EmbedDialog(c,W+"\n"+q,null,null,function(){var L=window.open(),R=L.document;if(null!=R){"CSS1Compat"===document.compatMode&&R.writeln("<!DOCTYPE html>");R.writeln("<html>");R.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');R.writeln("<body>");R.writeln(W);var O=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;O&&R.writeln(q);R.writeln("</body>");R.writeln("</html>");R.close();if(!O){var Q=L.document.createElement("div"); -Q.marginLeft="26px";Q.marginTop="26px";mxUtils.write(Q,mxResources.get("updatingDocument"));O=L.document.createElement("img");O.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");O.style.marginLeft="6px";Q.appendChild(O);L.document.body.insertBefore(Q,L.document.body.firstChild);window.setTimeout(function(){var S=document.createElement("script");S.type="text/javascript";S.src=/<script.*?src="(.*?)"/.exec(q)[1];R.body.appendChild(S);Q.parentNode.removeChild(Q)}, -20)}}else c.handleError({message:mxResources.get("errorUpdatingPreview")})});c.showDialog(D.container,450,240,!0,!0);D.init()}))})})}));c.actions.put("liveImage",new Action("Live image...",function(){var v=c.getCurrentFile();null!=v&&c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(u){c.spinner.stop();null!=u?(u=new EmbedDialog(c,'<img src="'+(v.constructor!=DriveFile?u:"https://drive.google.com/uc?id="+v.getId())+'"/>'),c.showDialog(u.container, -450,240,!0,!0),u.init()):c.handleError({message:mxResources.get("invalidPublicUrl")})})}));c.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){c.showEmbedImageDialog(function(v,u,G,H,M,K){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedImage(v,u,G,H,M,K,function(I){c.spinner.stop();I=new EmbedDialog(c,I);c.showDialog(I.container,450,240,!0,!0);I.init()},function(I){c.spinner.stop();c.handleError(I)})},mxResources.get("image"),mxResources.get("retina"), -c.isExportToCanvas())}));c.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showEmbedImageDialog(function(v,u,G,H,M,K){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedSvg(v,u,G,H,M,K,function(I){c.spinner.stop();I=new EmbedDialog(c,I);c.showDialog(I.container,450,240,!0,!0);I.init()},function(I){c.spinner.stop();c.handleError(I)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.diagrams.net/doc/faq/embed-svg.html")})); -c.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var v=l.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(v.height/l.view.scale)+2,function(u,G,H,M,K,I,F,P,U){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(T){c.spinner.stop();var V=[];U&&V.push("tags=%7B%7D");T=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+F+";height:"+P+';" src="'+c.createLink(u,G,H,M,K,I,T,null, +v,mxResources.get("editShape")+":",630,400),c.showDialog(v.container,640,480,!0,!1),v.init())})).isEnabled=m;c.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(v){c.spinner.stop();c.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",v,function(u,G,I,F,L,K,H,Q,U,T,V){c.createHtml(u,G,I,F,L,K,H,Q,U,T,V,mxUtils.bind(this,function(W, +t){var C=new EmbedDialog(c,W+"\n"+t,null,null,function(){var N=window.open(),R=N.document;if(null!=R){"CSS1Compat"===document.compatMode&&R.writeln("<!DOCTYPE html>");R.writeln("<html>");R.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');R.writeln("<body>");R.writeln(W);var O=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;O&&R.writeln(t);R.writeln("</body>");R.writeln("</html>");R.close();if(!O){var P=N.document.createElement("div"); +P.marginLeft="26px";P.marginTop="26px";mxUtils.write(P,mxResources.get("updatingDocument"));O=N.document.createElement("img");O.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");O.style.marginLeft="6px";P.appendChild(O);N.document.body.insertBefore(P,N.document.body.firstChild);window.setTimeout(function(){var S=document.createElement("script");S.type="text/javascript";S.src=/<script.*?src="(.*?)"/.exec(t)[1];R.body.appendChild(S);P.parentNode.removeChild(P)}, +20)}}else c.handleError({message:mxResources.get("errorUpdatingPreview")})});c.showDialog(C.container,450,240,!0,!0);C.init()}))})})}));c.actions.put("liveImage",new Action("Live image...",function(){var v=c.getCurrentFile();null!=v&&c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(u){c.spinner.stop();null!=u?(u=new EmbedDialog(c,'<img src="'+(v.constructor!=DriveFile?u:"https://drive.google.com/uc?id="+v.getId())+'"/>'),c.showDialog(u.container, +450,240,!0,!0),u.init()):c.handleError({message:mxResources.get("invalidPublicUrl")})})}));c.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){c.showEmbedImageDialog(function(v,u,G,I,F,L){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedImage(v,u,G,I,F,L,function(K){c.spinner.stop();K=new EmbedDialog(c,K);c.showDialog(K.container,450,240,!0,!0);K.init()},function(K){c.spinner.stop();c.handleError(K)})},mxResources.get("image"),mxResources.get("retina"), +c.isExportToCanvas())}));c.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showEmbedImageDialog(function(v,u,G,I,F,L){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedSvg(v,u,G,I,F,L,function(K){c.spinner.stop();K=new EmbedDialog(c,K);c.showDialog(K.container,450,240,!0,!0);K.init()},function(K){c.spinner.stop();c.handleError(K)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.diagrams.net/doc/faq/embed-svg.html")})); +c.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var v=l.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(v.height/l.view.scale)+2,function(u,G,I,F,L,K,H,Q,U){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(T){c.spinner.stop();var V=[];U&&V.push("tags=%7B%7D");T=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+H+";height:"+Q+';" src="'+c.createLink(u,G,I,F,L,K,T,null, V)+'"></iframe>');c.showDialog(T.container,450,240,!0,!0);T.init()})},!0)}));c.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var v=document.createElement("div");v.style.position="absolute";v.style.bottom="30px";v.style.textAlign="center";v.style.width="100%";v.style.left="0px";var u=document.createElement("a");u.setAttribute("href","javascript:void(0);");u.setAttribute("target","_blank");u.style.cursor="pointer";mxUtils.write(u,mxResources.get("getNotionChromeExtension")); -v.appendChild(u);mxEvent.addListener(u,"click",function(G){c.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(G)});c.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(G,H,M,K,I,F,P,U,T){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(V){c.spinner.stop();var W=["border=0"];T&&W.push("tags=%7B%7D");V=new EmbedDialog(c,c.createLink(G,H,M,K,I,F,V,null,W,!0)); -c.showDialog(V.container,450,240,!0,!0);V.init()})},!0,"https://www.diagrams.net/blog/drawio-notion",v)}));c.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){c.showPublishLinkDialog(null,null,null,null,function(v,u,G,H,M,K,I,F,P){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(U){c.spinner.stop();var T=[];P&&T.push("tags=%7B%7D");U=new EmbedDialog(c,c.createLink(v,u,G,H,M,K,U,null,T));c.showDialog(U.container,450,240, +v.appendChild(u);mxEvent.addListener(u,"click",function(G){c.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(G)});c.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(G,I,F,L,K,H,Q,U,T){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(V){c.spinner.stop();var W=["border=0"];T&&W.push("tags=%7B%7D");V=new EmbedDialog(c,c.createLink(G,I,F,L,K,H,V,null,W,!0)); +c.showDialog(V.container,450,240,!0,!0);V.init()})},!0,"https://www.diagrams.net/blog/drawio-notion",v)}));c.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){c.showPublishLinkDialog(null,null,null,null,function(v,u,G,I,F,L,K,H,Q){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(U){c.spinner.stop();var T=[];Q&&T.push("tags=%7B%7D");U=new EmbedDialog(c,c.createLink(v,u,G,I,F,L,U,null,T));c.showDialog(U.container,450,240, !0,!0);U.init()})})}));c.actions.addAction("microsoftOffice...",function(){c.openLink("https://office.draw.io")});c.actions.addAction("googleDocs...",function(){c.openLink("http://docsaddon.draw.io")});c.actions.addAction("googleSlides...",function(){c.openLink("https://slidesaddon.draw.io")});c.actions.addAction("googleSheets...",function(){c.openLink("https://sheetsaddon.draw.io")});c.actions.addAction("googleSites...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(), function(v){c.spinner.stop();v=new GoogleSitesDialog(c,v);c.showDialog(v.container,420,256,!0,!0);v.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)g=c.actions.addAction("scratchpad",function(){c.toggleScratchpad()}),g.setToggleAction(!0),g.setSelectedCallback(function(){return null!=c.scratchpad}),"0"!=urlParams.plugins&&c.actions.addAction("plugins...",function(){c.showDialog((new PluginsDialog(c)).container,380,240,!0,!1)});g=c.actions.addAction("search",function(){var v=c.sidebar.isEntryVisible("search"); c.sidebar.showPalette("search",!v);isLocalStorage&&(mxSettings.settings.search=!v,mxSettings.save())});g.label=mxResources.get("searchShapes");g.setToggleAction(!0);g.setSelectedCallback(function(){return c.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(c.actions.get("save").funct=function(v){l.isEditing()&&l.stopEditing();var u="0"!=urlParams.pages||null!=c.pages&&1<c.pages.length?c.getFileData(!0):mxUtils.getXml(c.editor.getGraphXml());if("json"==urlParams.proto){var G=c.createLoadMessage("save"); G.xml=u;v&&(G.exit=!0);u=JSON.stringify(G)}(window.opener||window.parent).postMessage(u,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(c.editor.modified=!1,c.editor.setStatus(""));v=c.getCurrentFile();null==v||v.constructor==EmbedFile||v.constructor==LocalFile&&null==v.mode||c.saveFile()},c.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?c.sendEmbeddedSvgExport():c.actions.get("save").funct(!0)}).label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"), c.actions.addAction("exit",function(){if("1"==urlParams.embedInline)c.sendEmbeddedSvgExport();else{var v=function(){c.editor.modified=!1;var u="json"==urlParams.proto?JSON.stringify({event:"exit",modified:c.editor.modified}):"";(window.opener||window.parent).postMessage(u,"*")};c.editor.modified?c.confirm(mxResources.get("allChangesLost"),null,v,mxResources.get("cancel"),mxResources.get("discardChanges")):v()}}));this.put("exportAs",new Menu(mxUtils.bind(this,function(v,u){c.isExportToCanvas()?(this.addMenuItems(v, ["exportPng"],u),c.jpgSupported&&this.addMenuItems(v,["exportJpg"],u)):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(v,["exportPng","exportJpg"],u);this.addMenuItems(v,["exportSvg","-"],u);c.isOffline()||c.printPdfExport?this.addMenuItems(v,["exportPdf"],u):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(v,["exportPdf"],u);mxClient.IS_IE||"undefined"===typeof VsdxExport&&c.isOffline()||this.addMenuItems(v,["exportVsdx"],u);this.addMenuItems(v,["-", -"exportHtml","exportXml","exportUrl"],u);c.isOffline()||(v.addSeparator(u),this.addMenuItem(v,"export",u).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(v,u){function G(K){K.pickFile(function(I){c.spinner.spin(document.body,mxResources.get("loading"))&&K.getFile(I,function(F){var P="data:image/"==F.getData().substring(0,11)?M(F.getTitle()):"text/xml";/\.svg$/i.test(F.getTitle())&&!c.editor.isDataSvg(F.getData())&&(F.setData(Editor.createSvgDataUri(F.getData())), -P="image/svg+xml");H(F.getData(),P,F.getTitle())},function(F){c.handleError(F,null!=F?mxResources.get("errorLoadingFile"):null)},K==c.drive)},!0)}var H=mxUtils.bind(this,function(K,I,F){var P=l.view,U=l.getGraphBounds(),T=l.snap(Math.ceil(Math.max(0,U.x/P.scale-P.translate.x)+4*l.gridSize)),V=l.snap(Math.ceil(Math.max(0,(U.y+U.height)/P.scale-P.translate.y)+4*l.gridSize));"data:image/"==K.substring(0,11)?c.loadImage(K,mxUtils.bind(this,function(W){var q=!0,D=mxUtils.bind(this,function(){c.resizeImage(W, -K,mxUtils.bind(this,function(L,R,O){L=q?Math.min(1,Math.min(c.maxImageSize/R,c.maxImageSize/O)):1;c.importFile(K,I,T,V,Math.round(R*L),Math.round(O*L),F,function(Q){c.spinner.stop();l.setSelectionCells(Q);l.scrollCellToVisible(l.getSelectionCell())})}),q)});K.length>c.resampleThreshold?c.confirmImageResize(function(L){q=L;D()}):D()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):c.importFile(K,I,T,V,0,0,F,function(W){c.spinner.stop();l.setSelectionCells(W); -l.scrollCellToVisible(l.getSelectionCell())})}),M=mxUtils.bind(this,function(K){var I="text/xml";/\.png$/i.test(K)?I="image/png":/\.jpe?g$/i.test(K)?I="image/jpg":/\.gif$/i.test(K)?I="image/gif":/\.pdf$/i.test(K)&&(I="application/pdf");return I});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?v.addItem(mxResources.get("googleDrive")+"...",null,function(){G(c.drive)},u):x&&"function"===typeof window.DriveClient&&v.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+ -"...)",null,function(){},u,null,!1));null!=c.oneDrive?v.addItem(mxResources.get("oneDrive")+"...",null,function(){G(c.oneDrive)},u):C&&"function"===typeof window.OneDriveClient&&v.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);null!=c.dropbox?v.addItem(mxResources.get("dropbox")+"...",null,function(){G(c.dropbox)},u):z&&"function"===typeof window.DropboxClient&&v.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null, +"exportHtml","exportXml","exportUrl"],u);c.isOffline()||(v.addSeparator(u),this.addMenuItem(v,"export",u).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(v,u){function G(L){L.pickFile(function(K){c.spinner.spin(document.body,mxResources.get("loading"))&&L.getFile(K,function(H){var Q="data:image/"==H.getData().substring(0,11)?F(H.getTitle()):"text/xml";/\.svg$/i.test(H.getTitle())&&!c.editor.isDataSvg(H.getData())&&(H.setData(Editor.createSvgDataUri(H.getData())), +Q="image/svg+xml");I(H.getData(),Q,H.getTitle())},function(H){c.handleError(H,null!=H?mxResources.get("errorLoadingFile"):null)},L==c.drive)},!0)}var I=mxUtils.bind(this,function(L,K,H){var Q=l.view,U=l.getGraphBounds(),T=l.snap(Math.ceil(Math.max(0,U.x/Q.scale-Q.translate.x)+4*l.gridSize)),V=l.snap(Math.ceil(Math.max(0,(U.y+U.height)/Q.scale-Q.translate.y)+4*l.gridSize));"data:image/"==L.substring(0,11)?c.loadImage(L,mxUtils.bind(this,function(W){var t=!0,C=mxUtils.bind(this,function(){c.resizeImage(W, +L,mxUtils.bind(this,function(N,R,O){N=t?Math.min(1,Math.min(c.maxImageSize/R,c.maxImageSize/O)):1;c.importFile(L,K,T,V,Math.round(R*N),Math.round(O*N),H,function(P){c.spinner.stop();l.setSelectionCells(P);l.scrollCellToVisible(l.getSelectionCell())})}),t)});L.length>c.resampleThreshold?c.confirmImageResize(function(N){t=N;C()}):C()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):c.importFile(L,K,T,V,0,0,H,function(W){c.spinner.stop();l.setSelectionCells(W); +l.scrollCellToVisible(l.getSelectionCell())})}),F=mxUtils.bind(this,function(L){var K="text/xml";/\.png$/i.test(L)?K="image/png":/\.jpe?g$/i.test(L)?K="image/jpg":/\.gif$/i.test(L)?K="image/gif":/\.pdf$/i.test(L)&&(K="application/pdf");return K});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?v.addItem(mxResources.get("googleDrive")+"...",null,function(){G(c.drive)},u):x&&"function"===typeof window.DriveClient&&v.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+ +"...)",null,function(){},u,null,!1));null!=c.oneDrive?v.addItem(mxResources.get("oneDrive")+"...",null,function(){G(c.oneDrive)},u):D&&"function"===typeof window.OneDriveClient&&v.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);null!=c.dropbox?v.addItem(mxResources.get("dropbox")+"...",null,function(){G(c.dropbox)},u):y&&"function"===typeof window.DropboxClient&&v.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null, function(){},u,null,!1);v.addSeparator(u);null!=c.gitHub&&v.addItem(mxResources.get("github")+"...",null,function(){G(c.gitHub)},u);null!=c.gitLab&&v.addItem(mxResources.get("gitlab")+"...",null,function(){G(c.gitLab)},u);null!=c.trello?v.addItem(mxResources.get("trello")+"...",null,function(){G(c.trello)},u):d&&"function"===typeof window.TrelloClient&&v.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);v.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&& -v.addItem(mxResources.get("browser")+"...",null,function(){c.importLocalFile(!1)},u);"1"!=urlParams.noDevice&&v.addItem(mxResources.get("device")+"...",null,function(){c.importLocalFile(!0)},u);c.isOffline()||(v.addSeparator(u),v.addItem(mxResources.get("url")+"...",null,function(){var K=new FilenameDialog(c,"",mxResources.get("import"),function(I){if(null!=I&&0<I.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var F=/(\.png)($|\?)/i.test(I)?"image/png":"text/xml";c.editor.loadUrl(PROXY_URL+ -"?url="+encodeURIComponent(I),function(P){H(P,F,I)},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==F)}},mxResources.get("url"));c.showDialog(K.container,300,80,!0,!0);K.init()},u))}))).isEnabled=m;this.put("theme",new Menu(mxUtils.bind(this,function(v,u){var G="1"==urlParams.sketch?"sketch":mxSettings.getUi(),H=v.addItem(mxResources.get("automatic"),null,function(){c.setCurrentTheme("")},u);"kennedy"!=G&&"atlas"!=G&&"dark"!=G&&"min"!=G&&"sketch"!= -G&&v.addCheckmark(H,Editor.checkmarkImage);v.addSeparator(u);H=v.addItem(mxResources.get("default"),null,function(){c.setCurrentTheme("kennedy")},u);"kennedy"!=G&&"dark"!=G||v.addCheckmark(H,Editor.checkmarkImage);H=v.addItem(mxResources.get("minimal"),null,function(){c.setCurrentTheme("min")},u);"min"==G&&v.addCheckmark(H,Editor.checkmarkImage);H=v.addItem(mxResources.get("atlas"),null,function(){c.setCurrentTheme("atlas")},u);"atlas"==G&&v.addCheckmark(H,Editor.checkmarkImage);H=v.addItem(mxResources.get("sketch"), -null,function(){c.setCurrentTheme("sketch")},u);"sketch"==G&&v.addCheckmark(H,Editor.checkmarkImage);v.addSeparator(u);("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(v,["toggleDarkMode"],u)})));g=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var v=this.editorUi.getCurrentFile();if(null!=v)if(v.constructor==LocalFile&&null!=v.fileHandle)c.showSaveFilePicker(mxUtils.bind(c,function(G,H){v.invalidFileHandle=null;v.fileHandle= -G;v.title=H.name;v.desc=H;c.save(H.name)}),null,c.createFileSystemOptions(v.getTitle()));else{var u=null!=v.getTitle()?v.getTitle():this.editorUi.defaultFilename;u=new FilenameDialog(this.editorUi,u,mxResources.get("rename"),mxUtils.bind(this,function(G){null!=G&&0<G.length&&null!=v&&G!=v.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&v.rename(G,mxUtils.bind(this,function(H){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(H){this.editorUi.handleError(H, -null!=H?mxResources.get("errorRenamingFile"):null)}))}),v.constructor==DriveFile||v.constructor==StorageFile?mxResources.get("diagramName"):null,function(G){if(null!=G&&0<G.length)return!0;c.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,c.editor.fileExtensions);this.editorUi.showDialog(u.container,340,96,!0,!0);u.init()}}));g.isEnabled=function(){return this.enabled&&m.apply(this,arguments)};g.visible="1"!=urlParams.embed;c.actions.addAction("makeCopy...", -mxUtils.bind(this,function(){var v=c.getCurrentFile();if(null!=v){var u=c.getCopyFilename(v);v.constructor==DriveFile?(u=new CreateDialog(c,u,mxUtils.bind(this,function(G,H){"_blank"==H?c.editor.editAsNew(c.getFileData(),G):("download"==H&&(H=App.MODE_GOOGLE),null!=G&&0<G.length&&(H==App.MODE_GOOGLE?c.spinner.spin(document.body,mxResources.get("saving"))&&v.saveAs(G,mxUtils.bind(this,function(M){v.desc=M;v.save(!1,mxUtils.bind(this,function(){c.spinner.stop();v.setModified(!1);v.addAllSavedStatus()}), -mxUtils.bind(this,function(K){c.handleError(K)}))}),mxUtils.bind(this,function(M){c.handleError(M)})):c.createFile(G,c.getFileData(!0),null,H)))}),mxUtils.bind(this,function(){c.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,!0,null,!0,null,null,null,null,c.editor.fileExtensions),c.showDialog(u.container,420,380,!0,!0),u.init()):c.editor.editAsNew(this.editorUi.getFileData(!0),u)}}));c.actions.put("openFolder",new Action(mxResources.get("openIt",[mxResources.get("folder")])+ -"...",function(v,u){c.appIconClicked(u)}));c.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var v=c.getCurrentFile();if(v.getMode()==App.MODE_GOOGLE||v.getMode()==App.MODE_ONEDRIVE){var u=!1;if(v.getMode()==App.MODE_GOOGLE&&null!=v.desc.parents)for(var G=0;G<v.desc.parents.length;G++)if(v.desc.parents[G].isRoot){u=!0;break}c.pickFolder(v.getMode(),mxUtils.bind(this,function(H){c.spinner.spin(document.body,mxResources.get("moving"))&&v.move(H,mxUtils.bind(this,function(M){c.spinner.stop()}), -mxUtils.bind(this,function(M){c.handleError(M)}))}),null,!0,u)}}));this.put("publish",new Menu(mxUtils.bind(this,function(v,u){this.addMenuItems(v,["publishLink"],u)})));c.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){c.openLink("https://app.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var v=c.getCurrentFile();null!=v&&v.share()}catch(u){c.handleError(u)}}));this.put("embed",new Menu(mxUtils.bind(this,function(v,u){var G= -c.getCurrentFile();null==G||G.getMode()!=App.MODE_GOOGLE&&G.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(G.getTitle())||this.addMenuItems(v,["liveImage","-"],u);this.addMenuItems(v,["embedImage","embedSvg","-","embedHtml"],u);navigator.standalone||c.isOffline()||this.addMenuItems(v,["embedIframe"],u);"1"==urlParams.embed||c.isOffline()||this.addMenuItems(v,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),u)})));c.addInsertItem=function(v,u,G,H){("plantUml"!=H|| -EditorUi.enablePlantUml&&!c.isOffline())&&v.addItem(G,null,mxUtils.bind(this,function(){if("fromText"==H||"formatSql"==H||"plantUml"==H||"mermaid"==H){var M=new ParseDialog(c,G,H);c.showDialog(M.container,620,420,!0,!1);c.dialog.container.style.overflow="auto"}else M=new CreateGraphDialog(c,G,H),c.showDialog(M.container,620,420,!0,!1);M.init()}),u,null,m())};var E=function(v){l.getModel().beginUpdate();try{v=l.addCell(v),l.fireEvent(new mxEventObject("cellsInserted","cells",[v]))}finally{l.getModel().endUpdate()}l.scrollCellToVisible(v); -l.setSelectionCell(v);l.container.focus();l.editAfterInsert&&l.startEditing(v);window.setTimeout(function(){null!=c.hoverIcons&&c.hoverIcons.update(l.view.getState(v))},0);return v},y=function(v,u,G,H,M){v=new mxCell(v,new mxGeometry(0,0,u,G),H);v.vertex=!0;null==M&&(M=l.getCenterInsertPoint(l.getBoundingBoxFromGeometry([v],!0)));v.geometry.x=M.x;v.geometry.y=M.y;return E(v)};c.actions.put("insertText",new Action(mxResources.get("text"),function(v){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&& -l.startEditingAtCell(y("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;",null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)?null:l.getInsertPoint()))},null,null,Editor.ctrlKey+"+Shift+X/A")).isEnabled=m;c.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(v){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&y("",120,60,"whiteSpace=wrap;html=1;",null==v||mxEvent.isControlDown(v)|| -mxEvent.isMetaDown(v)?null:l.getInsertPoint())},null,null,"D")).isEnabled=m;c.actions.put("insertNote",new Action(mxResources.get("note"),function(v){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&y("",140,160,"shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)? -null:l.getInsertPoint())},null,null,"S")).isEnabled=m;c.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(v){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&y("",80,80,"ellipse;whiteSpace=wrap;html=1;",null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)?null:l.getInsertPoint())},null,null,"F")).isEnabled=m;c.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(v){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&y("",80,80,"rhombus;whiteSpace=wrap;html=1;", -null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)?null:l.getInsertPoint())})).isEnabled=m;c.actions.put("insertEdge",new Action(mxResources.get("line"),function(v){if(l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())){var u=l.defaultEdgeLength;v=null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)?null:l.getInsertPoint();null==v&&(v=l.getCenterInsertPoint(l.getBoundingBoxFromGeometry([G],!0)));var G=new mxCell("",new mxGeometry(0,0,u,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;"); -G.geometry.setTerminalPoint(v,!0);G.geometry.setTerminalPoint(new mxPoint(v.x+G.geometry.width,v.y),!1);G.geometry.points=[];G.geometry.relative=!0;G.edge=!0;E(G)}},null,null,"C")).isEnabled=m;c.addInsertMenuItems=mxUtils.bind(this,function(v,u,G){for(var H=0;H<G.length;H++)"-"==G[H]?v.addSeparator(u):c.addInsertItem(v,u,mxResources.get(G[H])+"...",G[H])});this.put("insert",new Menu(mxUtils.bind(this,function(v,u){this.addMenuItems(v,"insertRectangle insertEllipse insertRhombus - insertEdge insertNote - insertText insertLink - createShape insertFreehand - insertImage".split(" "), -u);c.insertTemplateEnabled&&!c.isOffline()&&this.addMenuItems(v,["insertTemplate"],u);v.addSeparator(u);this.addSubmenu("insertLayout",v,u,mxResources.get("layout"));this.addSubmenu("insertAdvanced",v,u,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(v,u){c.addInsertMenuItems(v,u,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(v,u){c.addInsertMenuItems(v, -u,["fromText","plantUml","mermaid","-","formatSql"]);v.addItem(mxResources.get("csv")+"...",null,function(){c.showImportCsvDialog()},u,null,m())})));this.put("openRecent",new Menu(function(v,u){var G=c.getRecent();if(null!=G){for(var H=0;H<G.length;H++)(function(M){var K=M.mode;K==App.MODE_GOOGLE?K="googleDrive":K==App.MODE_ONEDRIVE&&(K="oneDrive");v.addItem(M.title+" ("+mxResources.get(K)+")",null,function(){c.loadFile(M.id)},u)})(G[H]);v.addSeparator(u)}v.addItem(mxResources.get("reset"),null,function(){c.resetRecent()}, -u)}));this.put("openFrom",new Menu(function(v,u){null!=c.drive?v.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickFile(App.MODE_GOOGLE)},u):x&&"function"===typeof window.DriveClient&&v.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);null!=c.oneDrive?v.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickFile(App.MODE_ONEDRIVE)},u):C&&"function"===typeof window.OneDriveClient&&v.addItem(mxResources.get("oneDrive")+ -" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);null!=c.dropbox?v.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickFile(App.MODE_DROPBOX)},u):z&&"function"===typeof window.DropboxClient&&v.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);v.addSeparator(u);null!=c.gitHub&&v.addItem(mxResources.get("github")+"...",null,function(){c.pickFile(App.MODE_GITHUB)},u);null!=c.gitLab&&v.addItem(mxResources.get("gitlab")+ -"...",null,function(){c.pickFile(App.MODE_GITLAB)},u);null!=c.trello?v.addItem(mxResources.get("trello")+"...",null,function(){c.pickFile(App.MODE_TRELLO)},u):d&&"function"===typeof window.TrelloClient&&v.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);v.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&v.addItem(mxResources.get("browser")+"...",null,function(){c.pickFile(App.MODE_BROWSER)},u);"1"!=urlParams.noDevice&&v.addItem(mxResources.get("device")+ -"...",null,function(){c.pickFile(App.MODE_DEVICE)},u);c.isOffline()||(v.addSeparator(u),v.addItem(mxResources.get("url")+"...",null,function(){var G=new FilenameDialog(c,"",mxResources.get("open"),function(H){null!=H&&0<H.length&&(null==c.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(H):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(H)))},mxResources.get("url"));c.showDialog(G.container,300, -80,!0,!0);G.init()},u))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(v,u){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?v.addItem(mxResources.get("googleDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},u):x&&"function"===typeof window.DriveClient&&v.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1));null!=c.oneDrive?v.addItem(mxResources.get("oneDrive")+ -"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},u):C&&"function"===typeof window.OneDriveClient&&v.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);null!=c.dropbox?v.addItem(mxResources.get("dropbox")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},u):z&&"function"===typeof window.DropboxClient&&v.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){}, -u,null,!1);v.addSeparator(u);null!=c.gitHub&&v.addItem(mxResources.get("github")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},u);null!=c.gitLab&&v.addItem(mxResources.get("gitlab")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},u);null!=c.trello?v.addItem(mxResources.get("trello")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},u):d&&"function"===typeof window.TrelloClient&&v.addItem(mxResources.get("trello")+ -" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);v.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&v.addItem(mxResources.get("browser")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},u);"1"!=urlParams.noDevice&&v.addItem(mxResources.get("device")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},u)})),this.put("openLibraryFrom",new Menu(function(v,u){"undefined"!=typeof google&&"undefined"!=typeof google.picker&& -(null!=c.drive?v.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickLibrary(App.MODE_GOOGLE)},u):x&&"function"===typeof window.DriveClient&&v.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1));null!=c.oneDrive?v.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickLibrary(App.MODE_ONEDRIVE)},u):C&&"function"===typeof window.OneDriveClient&&v.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)", -null,function(){},u,null,!1);null!=c.dropbox?v.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickLibrary(App.MODE_DROPBOX)},u):z&&"function"===typeof window.DropboxClient&&v.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);v.addSeparator(u);null!=c.gitHub&&v.addItem(mxResources.get("github")+"...",null,function(){c.pickLibrary(App.MODE_GITHUB)},u);null!=c.gitLab&&v.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickLibrary(App.MODE_GITLAB)}, -u);null!=c.trello?v.addItem(mxResources.get("trello")+"...",null,function(){c.pickLibrary(App.MODE_TRELLO)},u):d&&"function"===typeof window.TrelloClient&&v.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);v.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&v.addItem(mxResources.get("browser")+"...",null,function(){c.pickLibrary(App.MODE_BROWSER)},u);"1"!=urlParams.noDevice&&v.addItem(mxResources.get("device")+"...",null,function(){c.pickLibrary(App.MODE_DEVICE)}, -u);c.isOffline()||(v.addSeparator(u),v.addItem(mxResources.get("url")+"...",null,function(){var G=new FilenameDialog(c,"",mxResources.get("open"),function(H){if(null!=H&&0<H.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var M=H;c.editor.isCorsEnabledForUrl(H)||(M=PROXY_URL+"?url="+encodeURIComponent(H));mxUtils.get(M,function(K){if(200<=K.getStatus()&&299>=K.getStatus()){c.spinner.stop();try{c.loadLibrary(new UrlLibrary(this,K.getText(),H))}catch(I){c.handleError(I,mxResources.get("errorLoadingFile"))}}else c.spinner.stop(), +v.addItem(mxResources.get("browser")+"...",null,function(){c.importLocalFile(!1)},u);"1"!=urlParams.noDevice&&v.addItem(mxResources.get("device")+"...",null,function(){c.importLocalFile(!0)},u);c.isOffline()||(v.addSeparator(u),v.addItem(mxResources.get("url")+"...",null,function(){var L=new FilenameDialog(c,"",mxResources.get("import"),function(K){if(null!=K&&0<K.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var H=/(\.png)($|\?)/i.test(K)?"image/png":"text/xml";c.editor.loadUrl(PROXY_URL+ +"?url="+encodeURIComponent(K),function(Q){I(Q,H,K)},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==H)}},mxResources.get("url"));c.showDialog(L.container,300,80,!0,!0);L.init()},u))}))).isEnabled=m;this.put("theme",new Menu(mxUtils.bind(this,function(v,u){var G="1"==urlParams.sketch?"sketch":mxSettings.getUi();("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(v,["toggleDarkMode"],u);v.addSeparator(u); +var I=v.addItem(mxResources.get("default"),null,function(){c.setCurrentTheme("")},u);("kennedy"==G||"dark"==G||"atlas"!=G&&"min"!=G&&"sketch"!=G)&&v.addCheckmark(I,Editor.checkmarkImage);I=v.addItem(mxResources.get("sketch"),null,function(){c.setCurrentTheme("sketch")},u);"sketch"==G&&v.addCheckmark(I,Editor.checkmarkImage);I=v.addItem(mxResources.get("minimal"),null,function(){c.setCurrentTheme("min")},u);"min"==G&&v.addCheckmark(I,Editor.checkmarkImage);I=v.addItem(mxResources.get("atlas"),null, +function(){c.setCurrentTheme("atlas")},u);"atlas"==G&&v.addCheckmark(I,Editor.checkmarkImage)})));g=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var v=this.editorUi.getCurrentFile();if(null!=v)if(v.constructor==LocalFile&&null!=v.fileHandle)c.showSaveFilePicker(mxUtils.bind(c,function(G,I){v.invalidFileHandle=null;v.fileHandle=G;v.title=I.name;v.desc=I;c.save(I.name)}),null,c.createFileSystemOptions(v.getTitle()));else{var u=null!=v.getTitle()?v.getTitle():this.editorUi.defaultFilename; +u=new FilenameDialog(this.editorUi,u,mxResources.get("rename"),mxUtils.bind(this,function(G){null!=G&&0<G.length&&null!=v&&G!=v.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&v.rename(G,mxUtils.bind(this,function(I){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(I){this.editorUi.handleError(I,null!=I?mxResources.get("errorRenamingFile"):null)}))}),v.constructor==DriveFile||v.constructor==StorageFile?mxResources.get("diagramName"):null,function(G){if(null!= +G&&0<G.length)return!0;c.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,c.editor.fileExtensions);this.editorUi.showDialog(u.container,340,96,!0,!0);u.init()}}));g.isEnabled=function(){return this.enabled&&m.apply(this,arguments)};g.visible="1"!=urlParams.embed;c.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var v=c.getCurrentFile();if(null!=v){var u=c.getCopyFilename(v);v.constructor==DriveFile?(u=new CreateDialog(c, +u,mxUtils.bind(this,function(G,I){"_blank"==I?c.editor.editAsNew(c.getFileData(),G):("download"==I&&(I=App.MODE_GOOGLE),null!=G&&0<G.length&&(I==App.MODE_GOOGLE?c.spinner.spin(document.body,mxResources.get("saving"))&&v.saveAs(G,mxUtils.bind(this,function(F){v.desc=F;v.save(!1,mxUtils.bind(this,function(){c.spinner.stop();v.setModified(!1);v.addAllSavedStatus()}),mxUtils.bind(this,function(L){c.handleError(L)}))}),mxUtils.bind(this,function(F){c.handleError(F)})):c.createFile(G,c.getFileData(!0), +null,I)))}),mxUtils.bind(this,function(){c.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,!0,null,!0,null,null,null,null,c.editor.fileExtensions),c.showDialog(u.container,420,380,!0,!0),u.init()):c.editor.editAsNew(this.editorUi.getFileData(!0),u)}}));c.actions.put("openFolder",new Action(mxResources.get("openIt",[mxResources.get("folder")])+"...",function(v,u){c.appIconClicked(u)}));c.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var v=c.getCurrentFile(); +if(v.getMode()==App.MODE_GOOGLE||v.getMode()==App.MODE_ONEDRIVE){var u=!1;if(v.getMode()==App.MODE_GOOGLE&&null!=v.desc.parents)for(var G=0;G<v.desc.parents.length;G++)if(v.desc.parents[G].isRoot){u=!0;break}c.pickFolder(v.getMode(),mxUtils.bind(this,function(I){c.spinner.spin(document.body,mxResources.get("moving"))&&v.move(I,mxUtils.bind(this,function(F){c.spinner.stop()}),mxUtils.bind(this,function(F){c.handleError(F)}))}),null,!0,u)}}));this.put("publish",new Menu(mxUtils.bind(this,function(v, +u){this.addMenuItems(v,["publishLink"],u)})));c.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){c.openLink("https://app.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var v=c.getCurrentFile();null!=v&&v.share()}catch(u){c.handleError(u)}}));this.put("embed",new Menu(mxUtils.bind(this,function(v,u){var G=c.getCurrentFile();null==G||G.getMode()!=App.MODE_GOOGLE&&G.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(G.getTitle())|| +this.addMenuItems(v,["liveImage","-"],u);this.addMenuItems(v,["embedImage","embedSvg","-","embedHtml"],u);navigator.standalone||c.isOffline()||this.addMenuItems(v,["embedIframe"],u);"1"==urlParams.embed||c.isOffline()||this.addMenuItems(v,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),u)})));c.addInsertItem=function(v,u,G,I){("plantUml"!=I||EditorUi.enablePlantUml&&!c.isOffline())&&v.addItem(G,null,mxUtils.bind(this,function(){if("fromText"==I||"formatSql"==I|| +"plantUml"==I||"mermaid"==I){var F=new ParseDialog(c,G,I);c.showDialog(F.container,620,420,!0,!1);c.dialog.container.style.overflow="auto"}else F=new CreateGraphDialog(c,G,I),c.showDialog(F.container,620,420,!0,!1);F.init()}),u,null,m())};var E=function(v){l.getModel().beginUpdate();try{v=l.addCell(v),l.fireEvent(new mxEventObject("cellsInserted","cells",[v]))}finally{l.getModel().endUpdate()}l.scrollCellToVisible(v);l.setSelectionCell(v);l.container.focus();l.editAfterInsert&&l.startEditing(v);window.setTimeout(function(){null!= +c.hoverIcons&&c.hoverIcons.update(l.view.getState(v))},0);return v},z=function(v,u,G,I,F){v=new mxCell(v,new mxGeometry(0,0,u,G),I);v.vertex=!0;null==F&&(F=l.getCenterInsertPoint(l.getBoundingBoxFromGeometry([v],!0)));v.geometry.x=F.x;v.geometry.y=F.y;return E(v)};c.actions.put("insertText",new Action(mxResources.get("text"),function(v){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&l.startEditingAtCell(z("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;", +null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)?null:l.getInsertPoint()))},null,null,Editor.ctrlKey+"+Shift+X/A")).isEnabled=m;c.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(v){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&z("",120,60,"whiteSpace=wrap;html=1;",null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)?null:l.getInsertPoint())},null,null,"D")).isEnabled=m;c.actions.put("insertNote",new Action(mxResources.get("note"),function(v){l.isEnabled()&& +!l.isCellLocked(l.getDefaultParent())&&z("",140,160,"shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)?null:l.getInsertPoint())},null,null,"S")).isEnabled=m;c.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(v){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&& +z("",80,80,"ellipse;whiteSpace=wrap;html=1;",null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)?null:l.getInsertPoint())},null,null,"F")).isEnabled=m;c.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(v){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&z("",80,80,"rhombus;whiteSpace=wrap;html=1;",null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)?null:l.getInsertPoint())})).isEnabled=m;c.actions.put("insertEdge",new Action(mxResources.get("line"),function(v){if(l.isEnabled()&& +!l.isCellLocked(l.getDefaultParent())){var u=l.defaultEdgeLength;v=null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)?null:l.getInsertPoint();null==v&&(v=l.getCenterInsertPoint(l.getBoundingBoxFromGeometry([G],!0)));var G=new mxCell("",new mxGeometry(0,0,u,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");G.geometry.setTerminalPoint(v,!0);G.geometry.setTerminalPoint(new mxPoint(v.x+G.geometry.width,v.y),!1);G.geometry.points=[];G.geometry.relative=!0;G.edge=!0;E(G)}},null,null,"C")).isEnabled= +m;c.addInsertMenuItems=mxUtils.bind(this,function(v,u,G){for(var I=0;I<G.length;I++)"-"==G[I]?v.addSeparator(u):c.addInsertItem(v,u,mxResources.get(G[I])+"...",G[I])});this.put("insert",new Menu(mxUtils.bind(this,function(v,u){this.addMenuItems(v,"insertRectangle insertEllipse insertRhombus - insertEdge insertNote - insertText insertLink - createShape insertFreehand - insertImage".split(" "),u);c.insertTemplateEnabled&&!c.isOffline()&&this.addMenuItems(v,["insertTemplate"],u);v.addSeparator(u);this.addSubmenu("insertLayout", +v,u,mxResources.get("layout"));this.addSubmenu("insertAdvanced",v,u,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(v,u){c.addInsertMenuItems(v,u,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(v,u){c.addInsertMenuItems(v,u,["fromText","plantUml","mermaid","-","formatSql"]);v.addItem(mxResources.get("csv")+"...",null,function(){l.popupMenuHandler.hideMenu(); +c.showImportCsvDialog()},u,null,m());"min"==uiTheme&&this.addMenuItems(v,["-","createShape","editDiagram"],u)})));this.put("openRecent",new Menu(function(v,u){var G=c.getRecent();if(null!=G){for(var I=0;I<G.length;I++)(function(F){var L=F.mode;L==App.MODE_GOOGLE?L="googleDrive":L==App.MODE_ONEDRIVE&&(L="oneDrive");v.addItem(F.title+" ("+mxResources.get(L)+")",null,function(){c.loadFile(F.id)},u)})(G[I]);v.addSeparator(u)}v.addItem(mxResources.get("reset"),null,function(){c.resetRecent()},u)}));this.put("openFrom", +new Menu(function(v,u){null!=c.drive?v.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickFile(App.MODE_GOOGLE)},u):x&&"function"===typeof window.DriveClient&&v.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);null!=c.oneDrive?v.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickFile(App.MODE_ONEDRIVE)},u):D&&"function"===typeof window.OneDriveClient&&v.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+ +"...)",null,function(){},u,null,!1);null!=c.dropbox?v.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickFile(App.MODE_DROPBOX)},u):y&&"function"===typeof window.DropboxClient&&v.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);v.addSeparator(u);null!=c.gitHub&&v.addItem(mxResources.get("github")+"...",null,function(){c.pickFile(App.MODE_GITHUB)},u);null!=c.gitLab&&v.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickFile(App.MODE_GITLAB)}, +u);null!=c.trello?v.addItem(mxResources.get("trello")+"...",null,function(){c.pickFile(App.MODE_TRELLO)},u):d&&"function"===typeof window.TrelloClient&&v.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);v.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&v.addItem(mxResources.get("browser")+"...",null,function(){c.pickFile(App.MODE_BROWSER)},u);"1"!=urlParams.noDevice&&v.addItem(mxResources.get("device")+"...",null,function(){c.pickFile(App.MODE_DEVICE)}, +u);c.isOffline()||(v.addSeparator(u),v.addItem(mxResources.get("url")+"...",null,function(){var G=new FilenameDialog(c,"",mxResources.get("open"),function(I){null!=I&&0<I.length&&(null==c.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(I):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(I)))},mxResources.get("url"));c.showDialog(G.container,300,80,!0,!0);G.init()},u))}));Editor.enableCustomLibraries&& +(this.put("newLibrary",new Menu(function(v,u){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?v.addItem(mxResources.get("googleDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},u):x&&"function"===typeof window.DriveClient&&v.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1));null!=c.oneDrive?v.addItem(mxResources.get("oneDrive")+"...",null,function(){c.showLibraryDialog(null, +null,null,null,App.MODE_ONEDRIVE)},u):D&&"function"===typeof window.OneDriveClient&&v.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);null!=c.dropbox?v.addItem(mxResources.get("dropbox")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},u):y&&"function"===typeof window.DropboxClient&&v.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);v.addSeparator(u);null!= +c.gitHub&&v.addItem(mxResources.get("github")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},u);null!=c.gitLab&&v.addItem(mxResources.get("gitlab")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},u);null!=c.trello?v.addItem(mxResources.get("trello")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},u):d&&"function"===typeof window.TrelloClient&&v.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+ +"...)",null,function(){},u,null,!1);v.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&v.addItem(mxResources.get("browser")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},u);"1"!=urlParams.noDevice&&v.addItem(mxResources.get("device")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},u)})),this.put("openLibraryFrom",new Menu(function(v,u){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?v.addItem(mxResources.get("googleDrive")+ +"...",null,function(){c.pickLibrary(App.MODE_GOOGLE)},u):x&&"function"===typeof window.DriveClient&&v.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1));null!=c.oneDrive?v.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickLibrary(App.MODE_ONEDRIVE)},u):D&&"function"===typeof window.OneDriveClient&&v.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);null!=c.dropbox?v.addItem(mxResources.get("dropbox")+ +"...",null,function(){c.pickLibrary(App.MODE_DROPBOX)},u):y&&"function"===typeof window.DropboxClient&&v.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);v.addSeparator(u);null!=c.gitHub&&v.addItem(mxResources.get("github")+"...",null,function(){c.pickLibrary(App.MODE_GITHUB)},u);null!=c.gitLab&&v.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickLibrary(App.MODE_GITLAB)},u);null!=c.trello?v.addItem(mxResources.get("trello")+"...", +null,function(){c.pickLibrary(App.MODE_TRELLO)},u):d&&"function"===typeof window.TrelloClient&&v.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);v.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&v.addItem(mxResources.get("browser")+"...",null,function(){c.pickLibrary(App.MODE_BROWSER)},u);"1"!=urlParams.noDevice&&v.addItem(mxResources.get("device")+"...",null,function(){c.pickLibrary(App.MODE_DEVICE)},u);c.isOffline()||(v.addSeparator(u), +v.addItem(mxResources.get("url")+"...",null,function(){var G=new FilenameDialog(c,"",mxResources.get("open"),function(I){if(null!=I&&0<I.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var F=I;c.editor.isCorsEnabledForUrl(I)||(F=PROXY_URL+"?url="+encodeURIComponent(I));mxUtils.get(F,function(L){if(200<=L.getStatus()&&299>=L.getStatus()){c.spinner.stop();try{c.loadLibrary(new UrlLibrary(this,L.getText(),I))}catch(K){c.handleError(K,mxResources.get("errorLoadingFile"))}}else c.spinner.stop(), c.handleError(null,mxResources.get("errorLoadingFile"))},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));c.showDialog(G.container,300,80,!0,!0);G.init()},u));"1"==urlParams.confLib&&(v.addSeparator(u),v.addItem(mxResources.get("confluenceCloud")+"...",null,function(){c.showRemotelyStoredLibrary(mxResources.get("libraries"))},u))})));this.put("edit",new Menu(mxUtils.bind(this,function(v,u){this.addMenuItems(v,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))}))); g=c.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(c,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("comments"));else{var v=!this.commentsWindow.window.isVisible(); this.commentsWindow.window.setVisible(v);this.commentsWindow.refreshCommentsTime();v&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));g.setToggleAction(!0);g.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));c.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));g=this.get("viewPanels");var B=g.funct;g.funct= function(v,u){B.apply(this,arguments);c.menus.addMenuItems(v,["tags"],u);c.commentsSupported()&&c.menus.addMenuItems(v,["comments"],u)};this.put("view",new Menu(mxUtils.bind(this,function(v,u){this.addMenuItems(v,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","tags"]).concat(c.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(v,["-","search"],u);if(isLocalStorage||mxClient.IS_CHROMEAPP){var G=this.addMenuItem(v,"scratchpad",u);(!c.isOffline()||mxClient.IS_CHROMEAPP|| EditorUi.isElectronApp)&&this.addLinkToItem(G,"https://www.diagrams.net/doc/faq/scratchpad")}this.addMenuItems(v,["shapes","-","pageView","pageScale"]);this.addSubmenu("units",v,u);this.addMenuItems(v,"- scrollbars tooltips ruler - grid guides".split(" "),u);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(v,"shadowVisible",u);this.addMenuItems(v,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),u);"1"!=urlParams.sketch&&this.addMenuItems(v, -["-","fullscreen"],u)})));if(EditorUi.isElectronApp){var J="1"==urlParams.enableSpellCheck;g=c.actions.addAction("spellCheck",function(){c.toggleSpellCheck();J=!J;c.alert(mxResources.get("restartForChangeRequired"))});g.setToggleAction(!0);g.setSelectedCallback(function(){return J});var N="1"==urlParams.enableStoreBkp;g=c.actions.addAction("autoBkp",function(){c.toggleStoreBkp();N=!N});g.setToggleAction(!0);g.setSelectedCallback(function(){return N});c.actions.addAction("openDevTools",function(){c.openDevTools()}); -c.actions.addAction("drafts...",function(){var v=new FilenameDialog(c,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(u){u=parseInt(u);0<=u&&(EditorUi.draftSaveDelay=1E3*u,EditorUi.enableDrafts=0<u,mxSettings.setDraftSaveDelay(u),mxSettings.save())}),mxResources.get("draftSaveInt"),null,null,null,null,null,null,50,250);c.showDialog(v.container,320,80,!0,!0);v.init()})}this.put("extras",new Menu(mxUtils.bind(this,function(v,u){"1"==urlParams.noLangIcon&&(this.addSubmenu("language", -v,u),v.addSeparator(u));"1"!=urlParams.embed&&(this.addSubmenu("theme",v,u),v.addSeparator(u));if("undefined"!==typeof MathJax){var G=this.addMenuItem(v,"mathematicalTypesetting",u);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(G,"https://www.diagrams.net/doc/faq/math-typesetting")}EditorUi.isElectronApp&&this.addMenuItems(v,["spellCheck","autoBkp","drafts"],u);this.addMenuItems(v,["copyConnect","collapseExpand","-"],u);"1"!=urlParams.embed&&(G=c.getCurrentFile(), +["-","fullscreen"],u)})));if(EditorUi.isElectronApp){var J="1"==urlParams.enableSpellCheck;g=c.actions.addAction("spellCheck",function(){c.toggleSpellCheck();J=!J;c.alert(mxResources.get("restartForChangeRequired"))});g.setToggleAction(!0);g.setSelectedCallback(function(){return J});var M="1"==urlParams.enableStoreBkp;g=c.actions.addAction("autoBkp",function(){c.toggleStoreBkp();M=!M});g.setToggleAction(!0);g.setSelectedCallback(function(){return M});c.actions.addAction("openDevTools",function(){c.openDevTools()}); +c.actions.addAction("drafts...",function(){var v=new FilenameDialog(c,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(u){u=parseInt(u);0<=u&&(EditorUi.draftSaveDelay=1E3*u,EditorUi.enableDrafts=0<u,mxSettings.setDraftSaveDelay(u),mxSettings.save())}),mxResources.get("draftSaveInt"),null,null,null,null,null,null,50,250);c.showDialog(v.container,320,80,!0,!0);v.init()})}this.put("extras",new Menu(mxUtils.bind(this,function(v,u){"1"==urlParams.embed&&null!=urlParams.lang|| +this.addSubmenu("language",v,u);"1"!=urlParams.embed&&this.addSubmenu("theme",v,u);v.addSeparator(u);if("undefined"!==typeof MathJax){var G=this.addMenuItem(v,"mathematicalTypesetting",u);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(G,"https://www.diagrams.net/doc/faq/math-typesetting")}EditorUi.isElectronApp&&this.addMenuItems(v,["spellCheck","autoBkp","drafts"],u);this.addMenuItems(v,["copyConnect","collapseExpand","-"],u);"1"!=urlParams.embed&&(G=c.getCurrentFile(), null!=G&&G.isRealtimeEnabled()&&G.isRealtimeSupported()&&this.addMenuItems(v,["showRemoteCursors","shareCursor"],u),this.addMenuItems(v,["autosave"],u));v.addSeparator(u);!c.isOfflineApp()&&isLocalStorage&&this.addMenuItem(v,"plugins",u);this.addMenuItems(v,["-","editDiagram"],u);Graph.translateDiagram&&this.addMenuItems(v,["diagramLanguage"]);v.addSeparator(u);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(v,["showStartScreen"],u);this.addMenuItems(v,["configuration"], -u);v.addSeparator(u);"1"==urlParams.newTempDlg&&(c.actions.addAction("templates",function(){function H(K){return{id:K.id,isExt:!0,url:K.downloadUrl,title:K.title,imgUrl:K.thumbnailLink,changedBy:K.lastModifyingUserName,lastModifiedOn:K.modifiedDate}}var M=new TemplatesDialog(c,function(K){console.log(arguments)},null,null,null,"user",function(K,I,F){var P=new Date;P.setDate(P.getDate()-7);c.drive.listFiles(null,P,F?!0:!1,function(U){for(var T=[],V=0;V<U.items.length;V++)T.push(H(U.items[V]));K(T)}, -I)},function(K,I,F,P){c.drive.listFiles(K,null,P?!0:!1,function(U){for(var T=[],V=0;V<U.items.length;V++)T.push(H(U.items[V]));I(T)},F)},function(K,I,F){c.drive.getFile(K.id,function(P){I(P.data)},F)},null,function(K){K({Test:[]},1)},!0,!1);c.showDialog(M.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}),this.addMenuItem(v,"templates",u))})));this.put("file",new Menu(mxUtils.bind(this,function(v,u){if("1"==urlParams.embed)this.addSubmenu("importFrom",v,u),this.addSubmenu("exportAs", +u);v.addSeparator(u);"1"==urlParams.newTempDlg&&(c.actions.addAction("templates",function(){function I(L){return{id:L.id,isExt:!0,url:L.downloadUrl,title:L.title,imgUrl:L.thumbnailLink,changedBy:L.lastModifyingUserName,lastModifiedOn:L.modifiedDate}}var F=new TemplatesDialog(c,function(L){console.log(arguments)},null,null,null,"user",function(L,K,H){var Q=new Date;Q.setDate(Q.getDate()-7);c.drive.listFiles(null,Q,H?!0:!1,function(U){for(var T=[],V=0;V<U.items.length;V++)T.push(I(U.items[V]));L(T)}, +K)},function(L,K,H,Q){c.drive.listFiles(L,null,Q?!0:!1,function(U){for(var T=[],V=0;V<U.items.length;V++)T.push(I(U.items[V]));K(T)},H)},function(L,K,H){c.drive.getFile(L.id,function(Q){K(Q.data)},H)},null,function(L){L({Test:[]},1)},!0,!1);c.showDialog(F.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}),this.addMenuItem(v,"templates",u))})));this.put("file",new Menu(mxUtils.bind(this,function(v,u){if("1"==urlParams.embed)this.addSubmenu("importFrom",v,u),this.addSubmenu("exportAs", v,u),this.addSubmenu("embed",v,u),"1"==urlParams.libraries&&(this.addMenuItems(v,["-"],u),this.addSubmenu("newLibrary",v,u),this.addSubmenu("openLibraryFrom",v,u)),c.isRevisionHistorySupported()&&this.addMenuItems(v,["-","revisionHistory"],u),this.addMenuItems(v,["-","pageSetup","print","-","rename"],u),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(v,["saveAndExit"],u):(this.addMenuItems(v,["save"],u),"1"==urlParams.saveAndExit&&this.addMenuItems(v, -["saveAndExit"],u))),"1"!=urlParams.noExitBtn&&this.addMenuItems(v,["exit"],u);else{var G=this.editorUi.getCurrentFile();if(null!=G&&G.constructor==DriveFile){G.isRestricted()&&this.addMenuItems(v,["exportOptionsDisabled"],u);this.addMenuItems(v,["save","-","share"],u);var H=this.addMenuItem(v,"synchronize",u);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(H,"https://www.diagrams.net/doc/faq/synchronize");v.addSeparator(u)}else this.addMenuItems(v,["new"],u);this.addSubmenu("openFrom", -v,u);isLocalStorage&&this.addSubmenu("openRecent",v,u);null!=G&&G.constructor==DriveFile?this.addMenuItems(v,"new - rename makeCopy openFolder moveToFolder".split(" "),u):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==G||G.constructor==LocalFile&&null==G.fileHandle||(v.addSeparator(u),H=this.addMenuItem(v,"synchronize",u),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(H,"https://www.diagrams.net/doc/faq/synchronize")),this.addMenuItems(v,["-","save","saveAs", +["saveAndExit"],u))),"1"!=urlParams.noExitBtn&&this.addMenuItems(v,["exit"],u);else{var G=this.editorUi.getCurrentFile();if(null!=G&&G.constructor==DriveFile){G.isRestricted()&&this.addMenuItems(v,["exportOptionsDisabled"],u);this.addMenuItems(v,["save","-","share"],u);var I=this.addMenuItem(v,"synchronize",u);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(I,"https://www.diagrams.net/doc/faq/synchronize");v.addSeparator(u)}else this.addMenuItems(v,["new"],u);this.addSubmenu("openFrom", +v,u);isLocalStorage&&this.addSubmenu("openRecent",v,u);null!=G&&G.constructor==DriveFile?this.addMenuItems(v,"new - rename makeCopy openFolder moveToFolder".split(" "),u):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==G||G.constructor==LocalFile&&null==G.fileHandle||(v.addSeparator(u),I=this.addMenuItem(v,"synchronize",u),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(I,"https://www.diagrams.net/doc/faq/synchronize")),this.addMenuItems(v,["-","save","saveAs", "-"],u),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||c.isOfflineApp()||null==G||this.addMenuItems(v,["share","-"],u),this.addMenuItems(v,["rename"],u),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(v,["upload"],u):(this.addMenuItems(v,["makeCopy"],u),null!=G&&G.constructor==OneDriveFile&&this.addMenuItems(v,["moveToFolder"],u)));v.addSeparator(u);this.addSubmenu("importFrom",v,u);this.addSubmenu("exportAs",v,u); -v.addSeparator(u);this.addSubmenu("embed",v,u);this.addSubmenu("publish",v,u);v.addSeparator(u);this.addSubmenu("newLibrary",v,u);this.addSubmenu("openLibraryFrom",v,u);c.isRevisionHistorySupported()&&this.addMenuItems(v,["-","revisionHistory"],u);null!=G&&null!=c.fileNode&&"1"!=urlParams.embedInline&&(H=null!=G.getTitle()?G.getTitle():c.defaultFilename,(G.constructor==DriveFile&&null!=G.sync&&G.sync.isConnected()||!/(\.html)$/i.test(H)&&!/(\.svg)$/i.test(H))&&this.addMenuItems(v,["-","properties"])); -this.addMenuItems(v,["-","pageSetup"],u);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(v,["print"],u);this.addMenuItems(v,["-","close"])}})));f.prototype.execute=function(){var v=this.ui.editor.graph;this.customFonts=this.prevCustomFonts;this.prevCustomFonts=this.ui.menus.customFonts;this.ui.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));this.extFonts=this.previousExtFonts;for(var u=v.extFonts,G=0;null!=u&&G<u.length;G++){var H=document.getElementById("extFont_"+ -u[G].name);null!=H&&H.parentNode.removeChild(H)}v.extFonts=[];for(G=0;null!=this.previousExtFonts&&G<this.previousExtFonts.length;G++)this.ui.editor.graph.addExtFont(this.previousExtFonts[G].name,this.previousExtFonts[G].url);this.previousExtFonts=u};this.put("fontFamily",new Menu(mxUtils.bind(this,function(v,u){for(var G=mxUtils.bind(this,function(V,W,q,D,L){var R=c.editor.graph;D=this.styleChange(v,D||V,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY], +v.addSeparator(u);this.addSubmenu("embed",v,u);this.addSubmenu("publish",v,u);v.addSeparator(u);this.addSubmenu("newLibrary",v,u);this.addSubmenu("openLibraryFrom",v,u);c.isRevisionHistorySupported()&&this.addMenuItems(v,["-","revisionHistory"],u);null!=G&&null!=c.fileNode&&"1"!=urlParams.embedInline&&(I=null!=G.getTitle()?G.getTitle():c.defaultFilename,(G.constructor==DriveFile&&null!=G.sync&&G.sync.isConnected()||!/(\.html)$/i.test(I)&&!/(\.svg)$/i.test(I))&&this.addMenuItems(v,["-","properties"])); +this.addMenuItems(v,["-","pageSetup"],u);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(v,["print"],u);this.addMenuItems(v,["-","close"])}})));f.prototype.execute=function(){var v=this.ui.editor.graph;this.customFonts=this.prevCustomFonts;this.prevCustomFonts=this.ui.menus.customFonts;this.ui.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));this.extFonts=this.previousExtFonts;for(var u=v.extFonts,G=0;null!=u&&G<u.length;G++){var I=document.getElementById("extFont_"+ +u[G].name);null!=I&&I.parentNode.removeChild(I)}v.extFonts=[];for(G=0;null!=this.previousExtFonts&&G<this.previousExtFonts.length;G++)this.ui.editor.graph.addExtFont(this.previousExtFonts[G].name,this.previousExtFonts[G].url);this.previousExtFonts=u};this.put("fontFamily",new Menu(mxUtils.bind(this,function(v,u){for(var G=mxUtils.bind(this,function(V,W,t,C,N){var R=c.editor.graph;C=this.styleChange(v,C||V,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY], "1"!=urlParams["ext-fonts"]?[V,null!=W?encodeURIComponent(W):null,null]:[V],null,u,function(){"1"!=urlParams["ext-fonts"]?R.setFont(V,W):(document.execCommand("fontname",!1,V),R.addExtFont(V,W));c.fireEvent(new mxEventObject("styleChanged","keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values","1"!=urlParams["ext-fonts"]?[V,null!=W?encodeURIComponent(W):null,null]:[V],"cells",[R.cellEditor.getEditingCell()]))},function(){R.updateLabelElements(R.getSelectionCells(), -function(O){O.removeAttribute("face");O.style.fontFamily=null;"PRE"==O.nodeName&&R.replaceElement(O,"div")});"1"==urlParams["ext-fonts"]&&R.addExtFont(V,W)});q&&(q=document.createElement("span"),q.className="geSprite geSprite-delete",q.style.cursor="pointer",q.style.display="inline-block",D.firstChild.nextSibling.nextSibling.appendChild(q),mxEvent.addListener(q,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(O){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[V.toLowerCase()]; -for(var Q=0;Q<this.customFonts.length;Q++)if(this.customFonts[Q].name==V&&this.customFonts[Q].url==W){this.customFonts.splice(Q,1);c.fireEvent(new mxEventObject("customFontsChanged"));break}}else{var S=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=S&&0<S.length)for(Q=0;Q<S.length;Q++)if(S[Q].name==V){S.splice(Q,1);break}var X=mxUtils.clone(this.customFonts);for(Q=0;Q<X.length;Q++)if(X[Q].name==V){X.splice(Q,1);break}Q=new f(this.editorUi,S,X);this.editorUi.editor.graph.model.execute(Q)}this.editorUi.hideCurrentMenu(); -mxEvent.consume(O)})));Graph.addFont(V,W);D.firstChild.nextSibling.style.fontFamily=V;null!=L&&D.setAttribute("title",L)}),H={},M=0;M<this.defaultFonts.length;M++){var K=this.defaultFonts[M];"string"===typeof K?G(K):null!=K.fontFamily&&null!=K.fontUrl&&(H[encodeURIComponent(K.fontFamily)+"@"+encodeURIComponent(K.fontUrl)]=!0,G(K.fontFamily,K.fontUrl))}v.addSeparator(u);if("1"!=urlParams["ext-fonts"]){K=function(V){var W=encodeURIComponent(V.name)+(null==V.url?"":"@"+encodeURIComponent(V.url));if(!H[W]){for(var q= -V.name,D=0;null!=F[q.toLowerCase()];)q=V.name+" ("+ ++D+")";null==I[W]&&(P.push({name:V.name,url:V.url,label:q,title:V.url}),F[q.toLowerCase()]=V,I[W]=V)}};var I={},F={},P=[];for(M=0;M<this.customFonts.length;M++)K(this.customFonts[M]);for(var U in Graph.recentCustomFonts)K(Graph.recentCustomFonts[U]);P.sort(function(V,W){return V.label<W.label?-1:V.label>W.label?1:0});if(0<P.length){for(M=0;M<P.length;M++)G(P[M].name,P[M].url,!0,P[M].label,P[M].url);v.addSeparator(u)}v.addItem(mxResources.get("reset"), -null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),u);v.addSeparator(u)}else{U=this.editorUi.editor.graph.extFonts;if(null!=U&&0<U.length){K={};var T=!1;for(M=0;M<this.customFonts.length;M++)K[this.customFonts[M].name]=!0;for(M=0;M<U.length;M++)K[U[M].name]||(this.customFonts.push(U[M]),T=!0);T&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(M= -0;M<this.customFonts.length;M++)U=this.customFonts[M].name,K=this.customFonts[M].url,G(U,K,!0),this.editorUi.editor.graph.addExtFont(U,K,!0);v.addSeparator(u);v.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var V=new f(this.editorUi,[],[]);c.editor.graph.model.execute(V)}),u);v.addSeparator(u)}}v.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var V=this.editorUi.editor.graph,W=V.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],q= -"s",D=null;if("1"!=urlParams["ext-fonts"]&&V.isEditing()){var L=V.getSelectedEditingElement();null!=L&&(L=mxUtils.getCurrentStyle(L),null!=L&&(W=Graph.stripQuotes(L.fontFamily),D=Graph.getFontUrl(W,null),null!=D&&(Graph.isGoogleFontUrl(D)?(D=null,q="g"):q="w")))}else L=V.getView().getState(V.getSelectionCell()),null!=L&&(W=L.style[mxConstants.STYLE_FONTFAMILY]||W,"1"!=urlParams["ext-fonts"]?(L=L.style.fontSource,null!=L&&(L=decodeURIComponent(L),Graph.isGoogleFontUrl(L)?q="g":(q="w",D=L))):(q=L.style.FType|| -q,"w"==q&&(D=this.editorUi.editor.graph.extFonts,L=null,null!=D&&(L=D.find(function(O){return O.name==W})),D=null!=L?L.url:mxResources.get("urlNotFound",null,"URL not found"))));null!=D&&D.substring(0,PROXY_URL.length)==PROXY_URL&&(D=decodeURIComponent(D.substr((PROXY_URL+"?url=").length)));var R=null;document.activeElement==V.cellEditor.textarea&&(R=V.cellEditor.saveSelection());q=new FontDialog(this.editorUi,W,D,q,mxUtils.bind(this,function(O,Q,S){null!=R&&(V.cellEditor.restoreSelection(R),R=null); -if(null!=O&&0<O.length)if("1"!=urlParams["ext-fonts"]&&V.isEditing())V.setFont(O,Q);else{V.getModel().beginUpdate();try{V.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(V.setCellStyles(mxConstants.STYLE_FONTFAMILY,O),V.setCellStyles("fontSource",null!=Q?encodeURIComponent(Q):null),V.setCellStyles("FType",null)):(V.setCellStyles(mxConstants.STYLE_FONTFAMILY,O),"s"!=S&&(V.setCellStyles("FType",S),0==Q.indexOf("http://")&&(Q=PROXY_URL+"?url="+encodeURIComponent(Q)),this.editorUi.editor.graph.addExtFont(O, -Q)));S=!0;for(var X=0;X<this.customFonts.length;X++)if(this.customFonts[X].name==O){S=!1;break}S&&(this.customFonts.push({name:O,url:Q}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{V.getModel().endUpdate()}}}));this.editorUi.showDialog(q.container,380,Editor.enableWebFonts?250:180,!0,!0);q.init()}),u,null,!0)})))}})();function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")}; +function(O){O.removeAttribute("face");O.style.fontFamily=null;"PRE"==O.nodeName&&R.replaceElement(O,"div")});"1"==urlParams["ext-fonts"]&&R.addExtFont(V,W)});t&&(t=document.createElement("span"),t.className="geSprite geSprite-delete",t.style.cursor="pointer",t.style.display="inline-block",C.firstChild.nextSibling.nextSibling.appendChild(t),mxEvent.addListener(t,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(O){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[V.toLowerCase()]; +for(var P=0;P<this.customFonts.length;P++)if(this.customFonts[P].name==V&&this.customFonts[P].url==W){this.customFonts.splice(P,1);c.fireEvent(new mxEventObject("customFontsChanged"));break}}else{var S=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=S&&0<S.length)for(P=0;P<S.length;P++)if(S[P].name==V){S.splice(P,1);break}var X=mxUtils.clone(this.customFonts);for(P=0;P<X.length;P++)if(X[P].name==V){X.splice(P,1);break}P=new f(this.editorUi,S,X);this.editorUi.editor.graph.model.execute(P)}this.editorUi.hideCurrentMenu(); +mxEvent.consume(O)})));Graph.addFont(V,W);C.firstChild.nextSibling.style.fontFamily=V;null!=N&&C.setAttribute("title",N)}),I={},F=0;F<this.defaultFonts.length;F++){var L=this.defaultFonts[F];"string"===typeof L?G(L):null!=L.fontFamily&&null!=L.fontUrl&&(I[encodeURIComponent(L.fontFamily)+"@"+encodeURIComponent(L.fontUrl)]=!0,G(L.fontFamily,L.fontUrl))}v.addSeparator(u);if("1"!=urlParams["ext-fonts"]){L=function(V){var W=encodeURIComponent(V.name)+(null==V.url?"":"@"+encodeURIComponent(V.url));if(!I[W]){for(var t= +V.name,C=0;null!=H[t.toLowerCase()];)t=V.name+" ("+ ++C+")";null==K[W]&&(Q.push({name:V.name,url:V.url,label:t,title:V.url}),H[t.toLowerCase()]=V,K[W]=V)}};var K={},H={},Q=[];for(F=0;F<this.customFonts.length;F++)L(this.customFonts[F]);for(var U in Graph.recentCustomFonts)L(Graph.recentCustomFonts[U]);Q.sort(function(V,W){return V.label<W.label?-1:V.label>W.label?1:0});if(0<Q.length){for(F=0;F<Q.length;F++)G(Q[F].name,Q[F].url,!0,Q[F].label,Q[F].url);v.addSeparator(u)}v.addItem(mxResources.get("reset"), +null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),u);v.addSeparator(u)}else{U=this.editorUi.editor.graph.extFonts;if(null!=U&&0<U.length){L={};var T=!1;for(F=0;F<this.customFonts.length;F++)L[this.customFonts[F].name]=!0;for(F=0;F<U.length;F++)L[U[F].name]||(this.customFonts.push(U[F]),T=!0);T&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(F= +0;F<this.customFonts.length;F++)U=this.customFonts[F].name,L=this.customFonts[F].url,G(U,L,!0),this.editorUi.editor.graph.addExtFont(U,L,!0);v.addSeparator(u);v.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var V=new f(this.editorUi,[],[]);c.editor.graph.model.execute(V)}),u);v.addSeparator(u)}}v.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var V=this.editorUi.editor.graph,W=V.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],t= +"s",C=null;if("1"!=urlParams["ext-fonts"]&&V.isEditing()){var N=V.getSelectedEditingElement();null!=N&&(N=mxUtils.getCurrentStyle(N),null!=N&&(W=Graph.stripQuotes(N.fontFamily),C=Graph.getFontUrl(W,null),null!=C&&(Graph.isGoogleFontUrl(C)?(C=null,t="g"):t="w")))}else N=V.getView().getState(V.getSelectionCell()),null!=N&&(W=N.style[mxConstants.STYLE_FONTFAMILY]||W,"1"!=urlParams["ext-fonts"]?(N=N.style.fontSource,null!=N&&(N=decodeURIComponent(N),Graph.isGoogleFontUrl(N)?t="g":(t="w",C=N))):(t=N.style.FType|| +t,"w"==t&&(C=this.editorUi.editor.graph.extFonts,N=null,null!=C&&(N=C.find(function(O){return O.name==W})),C=null!=N?N.url:mxResources.get("urlNotFound",null,"URL not found"))));null!=C&&C.substring(0,PROXY_URL.length)==PROXY_URL&&(C=decodeURIComponent(C.substr((PROXY_URL+"?url=").length)));var R=null;document.activeElement==V.cellEditor.textarea&&(R=V.cellEditor.saveSelection());t=new FontDialog(this.editorUi,W,C,t,mxUtils.bind(this,function(O,P,S){null!=R&&(V.cellEditor.restoreSelection(R),R=null); +if(null!=O&&0<O.length)if("1"!=urlParams["ext-fonts"]&&V.isEditing())V.setFont(O,P);else{V.getModel().beginUpdate();try{V.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(V.setCellStyles(mxConstants.STYLE_FONTFAMILY,O),V.setCellStyles("fontSource",null!=P?encodeURIComponent(P):null),V.setCellStyles("FType",null)):(V.setCellStyles(mxConstants.STYLE_FONTFAMILY,O),"s"!=S&&(V.setCellStyles("FType",S),0==P.indexOf("http://")&&(P=PROXY_URL+"?url="+encodeURIComponent(P)),this.editorUi.editor.graph.addExtFont(O, +P)));S=!0;for(var X=0;X<this.customFonts.length;X++)if(this.customFonts[X].name==O){S=!1;break}S&&(this.customFonts.push({name:O,url:P}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{V.getModel().endUpdate()}}}));this.editorUi.showDialog(t.container,380,Editor.enableWebFonts?250:180,!0,!0);t.init()}),u,null,!0)})))}})();function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")}; DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,e,f){this.ui=b;this.page=e;this.previous=this.name=f}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))}; function MovePage(b,e,f){this.ui=b;this.oldIndex=e;this.newIndex=f}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))}; function SelectPage(b,e,f){this.ui=b;this.previousPage=this.page=e;this.neverShown=!0;null!=e&&(this.neverShown=null==e.viewState,this.ui.updatePageRoot(e),null!=f&&(e.viewState=f,this.neverShown=!1))} @@ -12729,16 +12735,16 @@ function ChangePage(b,e,f,c,l){SelectPage.call(this,b,f);this.relatedPage=e;this ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};EditorUi.prototype.tabContainerHeight=38;EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)}; EditorUi.prototype.getPageIndex=function(b){var e=null;if(null!=this.pages&&null!=b)for(var f=0;f<this.pages.length;f++)if(this.pages[f]==b){e=f;break}return e};EditorUi.prototype.getPageById=function(b,e){e=null!=e?e:this.pages;if(null!=e)for(var f=0;f<e.length;f++)if(e[f].getId()==b)return e[f];return null}; EditorUi.prototype.createImageForPageLink=function(b,e,f){var c=b.indexOf(","),l=null;0<c&&(c=this.getPageById(b.substring(c+1)),null!=c&&c!=e&&(l=this.getImageForPage(c,e,f),l.originalSrc=b));null==l&&(l={originalSrc:b});return l}; -EditorUi.prototype.getImageForPage=function(b,e,f){f=null!=f?f:this.editor.graph;var c=f.getGlobalVariable,l=this.createTemporaryGraph(f.getStylesheet());l.defaultPageBackgroundColor=f.defaultPageBackgroundColor;l.shapeBackgroundColor=f.shapeBackgroundColor;l.shapeForegroundColor=f.shapeForegroundColor;var m=this.getPageIndex(null!=e?e:this.currentPage);l.getGlobalVariable=function(z){return"pagenumber"==z?m+1:"page"==z&&null!=e?e.getName():c.apply(this,arguments)};document.body.appendChild(l.container); +EditorUi.prototype.getImageForPage=function(b,e,f){f=null!=f?f:this.editor.graph;var c=f.getGlobalVariable,l=this.createTemporaryGraph(f.getStylesheet());l.defaultPageBackgroundColor=f.defaultPageBackgroundColor;l.shapeBackgroundColor=f.shapeBackgroundColor;l.shapeForegroundColor=f.shapeForegroundColor;var m=this.getPageIndex(null!=e?e:this.currentPage);l.getGlobalVariable=function(y){return"pagenumber"==y?m+1:"page"==y&&null!=e?e.getName():c.apply(this,arguments)};document.body.appendChild(l.container); this.updatePageRoot(b);l.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";f=l.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var x=l.getGraphBounds();document.body.removeChild(l.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(f)),x.width,x.height,x.x,x.y)}; EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,e=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var l= this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";l!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(b.view,arguments)});var f=null,c=mxUtils.bind(this,function(){this.updateTabContainer();var l=this.currentPage;null!=l&&l!=f&&(null==l.viewState||null==l.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&& (b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+l.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+l.viewState.scrollTop),f=l);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"===typeof Editor.MathJaxClear||this.editor.graph.mathEnabled&&null!=this.editor||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(l, m){l=m.getProperty("edit").changes;for(m=0;m<l.length;m++)if(l[m]instanceof SelectPage||l[m]instanceof RenamePage||l[m]instanceof MovePage||l[m]instanceof mxRootChange){c();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}}; EditorUi.prototype.restoreViewState=function(b,e,f){b=null!=b?this.getPageById(b.getId()):null;var c=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,e):(c.setViewState(e),this.editor.updateGraphComponents(),c.view.revalidate(),c.sizeDidChange()),c.container.scrollLeft=c.view.translate.x*c.view.scale+e.scrollLeft,c.container.scrollTop=c.view.translate.y*c.view.scale+e.scrollTop,c.restoreSelection(f))}; -Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),f=parseFloat(b.getAttribute("pageScale")),c=parseFloat(b.getAttribute("pageWidth")),l=parseFloat(b.getAttribute("pageHeight")),m=b.getAttribute("background"),x=this.parseBackgroundImage(b.getAttribute("backgroundImage")),z=b.getAttribute("extFonts");if(z)try{z=z.split("|").map(function(C){C=C.split("^");return{name:C[0],url:C[1]}})}catch(C){console.log("ExtFonts format error: "+C.message)}return{gridEnabled:"0"!=b.getAttribute("grid"), +Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),f=parseFloat(b.getAttribute("pageScale")),c=parseFloat(b.getAttribute("pageWidth")),l=parseFloat(b.getAttribute("pageHeight")),m=b.getAttribute("background"),x=this.parseBackgroundImage(b.getAttribute("backgroundImage")),y=b.getAttribute("extFonts");if(y)try{y=y.split("|").map(function(D){D=D.split("^");return{name:D[0],url:D[1]}})}catch(D){console.log("ExtFonts format error: "+D.message)}return{gridEnabled:"0"!=b.getAttribute("grid"), gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=m&&0<m.length?m:null,backgroundImage:x,pageScale:isNaN(f)?mxGraph.prototype.pageScale:f,pageFormat:isNaN(c)||isNaN(l)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat: -mxSettings.getPageFormat():new mxRectangle(0,0,c,l),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:z||[]}}; +mxSettings.getPageFormat():new mxRectangle(0,0,c,l),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:y||[]}}; Graph.prototype.saveViewState=function(b,e,f,c){f||(e.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),e.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),e.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),e.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),e.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),e.setAttribute("connect",null==b||b.connect?"1":"0"),e.setAttribute("arrows",null==b||b.arrows?"1":"0"),e.setAttribute("fold", null==b||b.foldingEnabled?"1":"0"));e.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);f=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=f&&(e.setAttribute("pageWidth",f.width),e.setAttribute("pageHeight",f.height));null!=b&&(null!=b.background&&e.setAttribute("background",b.background),c=this.getBackgroundImageObject(b.backgroundImage,c),null!=c&&e.setAttribute("backgroundImage", JSON.stringify(c)));e.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");e.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null!=b&&null!=b.extFonts&&0<b.extFonts.length&&e.setAttribute("extFonts",b.extFonts.map(function(l){return l.name+"^"+l.url}).join("|"))}; @@ -12758,245 +12764,244 @@ EditorUi.prototype.selectNextPage=function(b){var e=this.currentPage;null!=e&&nu EditorUi.prototype.insertPage=function(b,e){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId()),e=null!=e?e:this.pages.length,e=new ChangePage(this,b,b,e),this.editor.graph.model.execute(e));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b}; EditorUi.prototype.createPage=function(b,e){e=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),e);e.setName(null!=b?b:this.createPageName());this.initDiagramNode(e);return e};EditorUi.prototype.createPageName=function(){for(var b={},e=0;e<this.pages.length;e++){var f=this.pages[e].getName();null!=f&&0<f.length&&(b[f]=f)}e=this.pages.length;do f=mxResources.get("pageWithNumber",[++e]);while(null!=b[f]);return f}; EditorUi.prototype.removePage=function(b){try{var e=this.editor.graph,f=mxUtils.indexOf(this.pages,b);if(e.isEnabled()&&0<=f){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e.model.beginUpdate();try{var c=this.currentPage;c==b&&1<this.pages.length?(f==this.pages.length-1?f--:f++,c=this.pages[f]):1>=this.pages.length&&(c=this.insertPage(),e.model.execute(new RenamePage(this,c,mxResources.get("pageWithNumber",[1]))));e.model.execute(new ChangePage(this,b,c))}finally{e.model.endUpdate()}}}catch(l){this.handleError(l)}return b}; -EditorUi.prototype.duplicatePage=function(b,e){var f=null;try{var c=this.editor.graph;if(c.isEnabled()){c.isEditing()&&c.stopEditing();var l=b.node.cloneNode(!1);l.removeAttribute("id");var m={},x=c.createCellLookup([c.model.root]);f=new DiagramPage(l);f.root=c.cloneCell(c.model.root,null,m);var z=new mxGraphModel;z.prefix=Editor.guid()+"-";z.setRoot(f.root);c.updateCustomLinks(c.createCellMapping(m,x),[f.root]);f.viewState=b==this.currentPage?c.getViewState():b.viewState;this.initDiagramNode(f); -f.viewState.scale=1;f.viewState.scrollLeft=null;f.viewState.scrollTop=null;f.viewState.currentRoot=null;f.viewState.defaultParent=null;f.setName(e);f=this.insertPage(f,mxUtils.indexOf(this.pages,b)+1)}}catch(C){this.handleError(C)}return f};EditorUi.prototype.initDiagramNode=function(b){var e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,e);mxUtils.setTextContent(b.node,Graph.compressNode(e))}; +EditorUi.prototype.duplicatePage=function(b,e){var f=null;try{var c=this.editor.graph;if(c.isEnabled()){c.isEditing()&&c.stopEditing();var l=b.node.cloneNode(!1);l.removeAttribute("id");var m={},x=c.createCellLookup([c.model.root]);f=new DiagramPage(l);f.root=c.cloneCell(c.model.root,null,m);var y=new mxGraphModel;y.prefix=Editor.guid()+"-";y.setRoot(f.root);c.updateCustomLinks(c.createCellMapping(m,x),[f.root]);f.viewState=b==this.currentPage?c.getViewState():b.viewState;this.initDiagramNode(f); +f.viewState.scale=1;f.viewState.scrollLeft=null;f.viewState.scrollTop=null;f.viewState.currentRoot=null;f.viewState.defaultParent=null;f.setName(e);f=this.insertPage(f,mxUtils.indexOf(this.pages,b)+1)}}catch(D){this.handleError(D)}return f};EditorUi.prototype.initDiagramNode=function(b){var e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,e);mxUtils.setTextContent(b.node,Graph.compressNode(e))}; EditorUi.prototype.clonePages=function(b){for(var e=[],f=0;f<b.length;f++)e.push(this.clonePage(b[f]));return e};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var e=new DiagramPage(b.node.cloneNode(!0)),f=b==this.currentPage?this.editor.graph.getViewState():b.viewState;e.viewState=mxUtils.clone(f,EditorUi.transientViewStateProperties);e.root=this.editor.graph.model.cloneCell(b.root,null,!0);return e}; EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(f){null!=f&&0<f.length&&this.editor.graph.model.execute(new RenamePage(this,b,f))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return b};EditorUi.prototype.movePage=function(b,e){this.editor.graph.model.execute(new MovePage(this,b,e))}; EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer";b.style.position="absolute";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.height="0px";return b}; EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,e=document.createElement("div");e.style.position="relative";e.style.display="inline-block";e.style.verticalAlign="top";e.style.height=this.tabContainer.style.height;e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.fontSize="13px";e.style.marginLeft="30px";for(var f=this.editor.isChromelessView()?29:59,c=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-f)/this.pages.length)+ 1),l=null,m=0;m<this.pages.length;m++)mxUtils.bind(this,function(d,g){this.pages[d]==this.currentPage?(g.className="geActivePage",g.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):g.className="geInactivePage";g.setAttribute("draggable","true");mxEvent.addListener(g,"dragstart",mxUtils.bind(this,function(k){b.isEnabled()?(mxClient.IS_FF&&k.dataTransfer.setData("Text","<diagram/>"),l=d):mxEvent.consume(k)}));mxEvent.addListener(g,"dragend",mxUtils.bind(this,function(k){l=null;k.stopPropagation(); k.preventDefault()}));mxEvent.addListener(g,"dragover",mxUtils.bind(this,function(k){null!=l&&(k.dataTransfer.dropEffect="move");k.stopPropagation();k.preventDefault()}));mxEvent.addListener(g,"drop",mxUtils.bind(this,function(k){null!=l&&d!=l&&this.movePage(l,d);k.stopPropagation();k.preventDefault()}));e.appendChild(g)})(m,this.createTabForPage(this.pages[m],c,this.pages[m]!=this.currentPage,m+1));this.tabContainer.innerText="";this.tabContainer.appendChild(e);c=this.createPageMenuTab();this.tabContainer.appendChild(c); -c=null;this.isPageInsertTabVisible()&&(c=this.createPageInsertTab(),this.tabContainer.appendChild(c));if(e.clientWidth>this.tabContainer.clientWidth-f){null!=c&&(c.style.position="absolute",c.style.right="0px",e.style.marginRight="30px");var x=this.createControlTab(4," ❮ ");x.style.position="absolute";x.style.right=this.editor.chromeless?"29px":"55px";x.style.fontSize="13pt";this.tabContainer.appendChild(x);var z=this.createControlTab(4," ❯");z.style.position="absolute"; -z.style.right=this.editor.chromeless?"0px":"29px";z.style.fontSize="13pt";this.tabContainer.appendChild(z);var C=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=C+"px";mxEvent.addListener(x,"click",mxUtils.bind(this,function(d){e.scrollLeft-=Math.max(20,C-20);mxUtils.setOpacity(x,0<e.scrollLeft?100:50);mxUtils.setOpacity(z,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}));mxUtils.setOpacity(x,0<e.scrollLeft?100:50);mxUtils.setOpacity(z, -e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(z,"click",mxUtils.bind(this,function(d){e.scrollLeft+=Math.max(20,C-20);mxUtils.setOpacity(x,0<e.scrollLeft?100:50);mxUtils.setOpacity(z,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()}; +c=null;this.isPageInsertTabVisible()&&(c=this.createPageInsertTab(),this.tabContainer.appendChild(c));if(e.clientWidth>this.tabContainer.clientWidth-f){null!=c&&(c.style.position="absolute",c.style.right="0px",e.style.marginRight="30px");var x=this.createControlTab(4," ❮ ");x.style.position="absolute";x.style.right=this.editor.chromeless?"29px":"55px";x.style.fontSize="13pt";this.tabContainer.appendChild(x);var y=this.createControlTab(4," ❯");y.style.position="absolute"; +y.style.right=this.editor.chromeless?"0px":"29px";y.style.fontSize="13pt";this.tabContainer.appendChild(y);var D=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=D+"px";mxEvent.addListener(x,"click",mxUtils.bind(this,function(d){e.scrollLeft-=Math.max(20,D-20);mxUtils.setOpacity(x,0<e.scrollLeft?100:50);mxUtils.setOpacity(y,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}));mxUtils.setOpacity(x,0<e.scrollLeft?100:50);mxUtils.setOpacity(y, +e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(y,"click",mxUtils.bind(this,function(d){e.scrollLeft+=Math.max(20,D-20);mxUtils.setOpacity(x,0<e.scrollLeft?100:50);mxUtils.setOpacity(y,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()}; EditorUi.prototype.createTab=function(b){var e=document.createElement("div");e.style.display="inline-block";e.style.whiteSpace="nowrap";e.style.boxSizing="border-box";e.style.position="relative";e.style.overflow="hidden";e.style.textAlign="center";e.style.marginLeft="-1px";e.style.height=this.tabContainer.clientHeight+"px";e.style.padding="12px 4px 8px 4px";e.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";e.style.borderTopStyle="none";e.style.borderBottomStyle="none";e.style.backgroundColor= this.tabContainer.style.backgroundColor;e.style.cursor="move";e.style.color="gray";b&&(mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(f){this.editor.graph.isMouseDown||(e.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(f))})),mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(f){e.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(f)})));return e}; EditorUi.prototype.createControlTab=function(b,e,f){f=this.createTab(null!=f?f:!0);f.style.lineHeight=this.tabContainerHeight+"px";f.style.paddingTop=b+"px";f.style.cursor="pointer";f.style.width="30px";f.innerHTML=e;null!=f.firstChild&&null!=f.firstChild.style&&mxUtils.setOpacity(f.firstChild,40);return f};EditorUi.prototype.getShortPageName=function(b){b=b.getName();36<b.length&&(b=b.substring(0,34)+"...");return b}; EditorUi.prototype.createPageMenuTab=function(b,e){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var f=b.getElementsByTagName("div")[0];f.style.display="inline-block";f.style.marginTop="5px";f.style.width="21px";f.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(c){this.editor.graph.popupMenuHandler.hideMenu(); -var l=new mxPopupMenu(mxUtils.bind(this,function(z,C){var d=mxUtils.bind(this,function(){for(var t=0;t<this.pages.length;t++)mxUtils.bind(this,function(p){var A=z.addItem(this.getShortPageName(this.pages[p]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[p])}),C),E=this.pages[p].getId();A.setAttribute("title",this.pages[p].getName()+" ("+(p+1)+"/"+this.pages.length+")"+(null!=E?" ["+E+"]":""));this.pages[p]==this.currentPage&&z.addCheckmark(A,Editor.checkmarkImage)})(t)}),g=mxUtils.bind(this, -function(){z.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),C)});e||d();if(this.editor.graph.isEnabled()){e||(z.addSeparator(C),g());var k=this.currentPage;if(null!=k){z.addSeparator(C);var n=this.getShortPageName(k);z.addItem(mxResources.get("removeIt",[n]),null,mxUtils.bind(this,function(){this.removePage(k)}),C);z.addItem(mxResources.get("renameIt",[n]),null,mxUtils.bind(this,function(){this.renamePage(k,k.getName())}),C);e||z.addSeparator(C);z.addItem(mxResources.get("duplicateIt", -[n]),null,mxUtils.bind(this,function(){this.duplicatePage(k,mxResources.get("copyOf",[k.getName()]))}),C)}}e&&(z.addSeparator(C),g(),z.addSeparator(C),d())}));l.div.className+=" geMenubarMenu";l.smartSeparators=!0;l.showDisabled=!0;l.autoExpand=!0;l.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(l,arguments);l.destroy()});var m=mxEvent.getClientX(c),x=mxEvent.getClientY(c);l.popup(m,x,null,c);this.setCurrentMenu(l);mxEvent.consume(c)}));return b}; +var l=new mxPopupMenu(mxUtils.bind(this,function(y,D){var d=mxUtils.bind(this,function(){for(var q=0;q<this.pages.length;q++)mxUtils.bind(this,function(p){var A=y.addItem(this.getShortPageName(this.pages[p]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[p])}),D),E=this.pages[p].getId();A.setAttribute("title",this.pages[p].getName()+" ("+(p+1)+"/"+this.pages.length+")"+(null!=E?" ["+E+"]":""));this.pages[p]==this.currentPage&&y.addCheckmark(A,Editor.checkmarkImage)})(q)}),g=mxUtils.bind(this, +function(){y.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),D)});e||d();if(this.editor.graph.isEnabled()){e||(y.addSeparator(D),g());var k=this.currentPage;if(null!=k){y.addSeparator(D);var n=this.getShortPageName(k);y.addItem(mxResources.get("removeIt",[n]),null,mxUtils.bind(this,function(){this.removePage(k)}),D);y.addItem(mxResources.get("renameIt",[n]),null,mxUtils.bind(this,function(){this.renamePage(k,k.getName())}),D);e||y.addSeparator(D);y.addItem(mxResources.get("duplicateIt", +[n]),null,mxUtils.bind(this,function(){this.duplicatePage(k,mxResources.get("copyOf",[k.getName()]))}),D)}}e&&(y.addSeparator(D),g(),y.addSeparator(D),d())}));l.div.className+=" geMenubarMenu";l.smartSeparators=!0;l.showDisabled=!0;l.autoExpand=!0;l.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(l,arguments);l.destroy()});var m=mxEvent.getClientX(c),x=mxEvent.getClientY(c);l.popup(m,x,null,c);this.setCurrentMenu(l);mxEvent.consume(c)}));return b}; EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(f){this.insertPage();mxEvent.consume(f)}));var e=b.getElementsByTagName("div")[0];e.style.display="inline-block";e.style.width="21px";e.style.height="21px";return b}; EditorUi.prototype.createTabForPage=function(b,e,f,c){f=this.createTab(f);var l=b.getName()||mxResources.get("untitled"),m=b.getId();f.setAttribute("title",l+(null!=m?" ("+m+")":"")+" ["+c+"]");mxUtils.write(f,l);f.style.maxWidth=e+"px";f.style.width=e+"px";this.addTabListeners(b,f);42<e&&(f.style.textOverflow="ellipsis");return f}; EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var f=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(m){this.renamePage(b);mxEvent.consume(m)}));var c=!1,l=!1;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(m){c=null!=this.currentMenu;l=b==this.currentPage;f.isMouseDown||l||this.selectPage(b)}),null,mxUtils.bind(this,function(m){if(f.isEnabled()&&!f.isMouseDown&&(mxEvent.isTouchEvent(m)&&l||mxEvent.isPopupTrigger(m))){f.popupMenuHandler.hideMenu(); -this.hideCurrentMenu();if(!mxEvent.isTouchEvent(m)||!c){var x=new mxPopupMenu(this.createPageMenu(b));x.div.className+=" geMenubarMenu";x.smartSeparators=!0;x.showDisabled=!0;x.autoExpand=!0;x.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(x,arguments);this.resetCurrentMenu();x.destroy()});var z=mxEvent.getClientX(m),C=mxEvent.getClientY(m);x.popup(z,C,null,m);this.setCurrentMenu(x,e)}mxEvent.consume(m)}}))}; +this.hideCurrentMenu();if(!mxEvent.isTouchEvent(m)||!c){var x=new mxPopupMenu(this.createPageMenu(b));x.div.className+=" geMenubarMenu";x.smartSeparators=!0;x.showDisabled=!0;x.autoExpand=!0;x.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(x,arguments);this.resetCurrentMenu();x.destroy()});var y=mxEvent.getClientX(m),D=mxEvent.getClientY(m);x.popup(y,D,null,m);this.setCurrentMenu(x,e)}mxEvent.consume(m)}}))}; EditorUi.prototype.getLinkForPage=function(b,e,f){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var c=this.getCurrentFile();if(null!=c&&c.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var l=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));l+=(0==l.length?"?":"&")+"page-id="+b.getId();null!=e&&(l+="&"+e.join("&"));return(f&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)? EditorUi.drawHost:"https://"+window.location.host)+"/"+l+"#"+c.getHash()}}return null}; EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(f,c){var l=this.editor.graph;f.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),c);f.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),c);f.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,e)}),c);null!=this.getLinkForPage(b)&&(f.addSeparator(c),f.addItem(mxResources.get("link"), -null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(m,x,z,C,d,g){m=this.createUrlParameters(m,x,z,C,d,g);z||m.push("hide-pages=1");l.isSelectionEmpty()||(z=l.getBoundingBox(l.getSelectionCells()),x=l.view.translate,d=l.view.scale,z.width/=d,z.height/=d,z.x=z.x/d-x.x,z.y=z.y/d-x.y,m.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(z.x),y:Math.round(z.y),width:Math.round(z.width),height:Math.round(z.height),border:100})))); -C=new EmbedDialog(this,this.getLinkForPage(b,m,C));this.showDialog(C.container,450,240,!0,!0);C.init()}))})));f.addSeparator(c);f.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(f.addSeparator(c),f.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null, +null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(m,x,y,D,d,g){m=this.createUrlParameters(m,x,y,D,d,g);y||m.push("hide-pages=1");l.isSelectionEmpty()||(y=l.getBoundingBox(l.getSelectionCells()),x=l.view.translate,d=l.view.scale,y.width/=d,y.height/=d,y.x=y.x/d-x.x,y.y=y.y/d-x.y,m.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(y.x),y:Math.round(y.y),width:Math.round(y.width),height:Math.round(y.height),border:100})))); +D=new EmbedDialog(this,this.getLinkForPage(b,m,D));this.showDialog(D.container,450,240,!0,!0);D.init()}))})));f.addSeparator(c);f.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(f.addSeparator(c),f.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null, !0,!0))}),c))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};b.afterDecode=function(e,f,c){e=c.oldIndex;c.oldIndex=c.newIndex;c.newIndex=e;return c};mxCodecRegistry.register(b)})(); (function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};b.afterDecode=function(e,f,c){e=c.previous;c.previous=c.name;c.name=e;return c};mxCodecRegistry.register(b)})(); (function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(e,f,c){c.setAttribute("relatedPage",f.relatedPage.getId());null==f.index&&(c.setAttribute("name",f.relatedPage.getName()),null!=f.relatedPage.viewState&&c.setAttribute("viewState",JSON.stringify(f.relatedPage.viewState,function(l,m){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,l)?m:void 0})),null!=f.relatedPage.root&&e.encodeCell(f.relatedPage.root, c));return c};b.beforeDecode=function(e,f,c){c.ui=e.ui;c.relatedPage=c.ui.getPageById(f.getAttribute("relatedPage"));if(null==c.relatedPage){var l=f.ownerDocument.createElement("diagram");l.setAttribute("id",f.getAttribute("relatedPage"));l.setAttribute("name",f.getAttribute("name"));c.relatedPage=new DiagramPage(l);l=f.getAttribute("viewState");null!=l&&(c.relatedPage.viewState=JSON.parse(l),f.removeAttribute("viewState"));f=f.cloneNode(!0);l=f.firstChild;if(null!=l)for(c.relatedPage.root=e.decodeCell(l, -!1),c=l.nextSibling,l.parentNode.removeChild(l),l=c;null!=l;){c=l.nextSibling;if(l.nodeType==mxConstants.NODETYPE_ELEMENT){var m=l.getAttribute("id");null==e.lookup(m)&&e.decodeCell(l)}l.parentNode.removeChild(l);l=c}}return f};b.afterDecode=function(e,f,c){c.index=c.previousIndex;return c};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(c,l,m,x,z){l=null!=l?l:!1;null==m&&(m=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var C=m.slice(),d=0;d<m.length;d++)"1"==mxUtils.getValue(this.getCurrentCellStyle(m[d]),"treeFolding","0")&&this.foldTreeCell(c,m[d]);m=C;m=b.apply(this,arguments)}finally{this.model.endUpdate()}return m};Graph.prototype.foldTreeCell= -function(c,l){this.model.beginUpdate();try{var m=[];this.traverse(l,!0,mxUtils.bind(this,function(z,C){var d=null!=C&&this.isTreeEdge(C);d&&m.push(C);z==l||null!=C&&!d||m.push(z);return(null==C||d)&&(z==l||!this.model.isCollapsed(z))}));this.model.setCollapsed(l,c);for(var x=0;x<m.length;x++)this.model.setVisible(m[x],!c)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(c){return!this.isEdgeIgnored(c)};Graph.prototype.getTreeEdges=function(c,l,m,x,z,C){return this.model.filterCells(this.getEdges(c, -l,m,x,z,C),mxUtils.bind(this,function(d){return this.isTreeEdge(d)}))};Graph.prototype.getIncomingTreeEdges=function(c,l){return this.getTreeEdges(c,l,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(c,l){return this.getTreeEdges(c,l,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function c(F){return A.isVertex(F)&&m(F)}function l(F){var P= -!1;null!=F&&(P="1"==p.getCurrentCellStyle(F).treeMoving);return P}function m(F){var P=!1;null!=F&&(F=A.getParent(F),P=p.view.getState(F),P="tree"==(null!=P?P.style:p.getCellStyle(F)).containerType);return P}function x(F){var P=!1;null!=F&&(F=A.getParent(F),P=p.view.getState(F),p.view.getState(F),P=null!=(null!=P?P.style:p.getCellStyle(F)).childLayout);return P}function z(F){F=p.view.getState(F);if(null!=F){var P=p.getIncomingTreeEdges(F.cell);if(0<P.length&&(P=p.view.getState(P[0]),null!=P&&(P=P.absolutePoints, -null!=P&&0<P.length&&(P=P[P.length-1],null!=P)))){if(P.y==F.y&&Math.abs(P.x-F.getCenterX())<F.width/2)return mxConstants.DIRECTION_SOUTH;if(P.y==F.y+F.height&&Math.abs(P.x-F.getCenterX())<F.width/2)return mxConstants.DIRECTION_NORTH;if(P.x>F.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function C(F,P){P=null!=P?P:!0;p.model.beginUpdate();try{var U=p.model.getParent(F),T=p.getIncomingTreeEdges(F),V=p.cloneCells([T[0],F]);p.model.setTerminal(V[0],p.model.getTerminal(T[0], -!0),!0);var W=z(F),q=U.geometry;W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NORTH?V[1].geometry.x+=P?F.geometry.width+10:-V[1].geometry.width-10:V[1].geometry.y+=P?F.geometry.height+10:-V[1].geometry.height-10;p.view.currentRoot!=U&&(V[1].geometry.x-=q.x,V[1].geometry.y-=q.y);var D=p.view.getState(F),L=p.view.scale;if(null!=D){var R=mxRectangle.fromRectangle(D);W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NORTH?R.x+=(P?F.geometry.width+10:-V[1].geometry.width-10)*L:R.y+=(P? -F.geometry.height+10:-V[1].geometry.height-10)*L;var O=p.getOutgoingTreeEdges(p.model.getTerminal(T[0],!0));if(null!=O){for(var Q=W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NORTH,S=q=T=0;S<O.length;S++){var X=p.model.getTerminal(O[S],!1);if(W==z(X)){var aa=p.view.getState(X);X!=F&&null!=aa&&(Q&&P!=aa.getCenterX()<D.getCenterX()||!Q&&P!=aa.getCenterY()<D.getCenterY())&&mxUtils.intersects(R,aa)&&(T=10+Math.max(T,(Math.min(R.x+R.width,aa.x+aa.width)-Math.max(R.x,aa.x))/L),q=10+Math.max(q, -(Math.min(R.y+R.height,aa.y+aa.height)-Math.max(R.y,aa.y))/L))}}Q?q=0:T=0;for(S=0;S<O.length;S++)if(X=p.model.getTerminal(O[S],!1),W==z(X)&&(aa=p.view.getState(X),X!=F&&null!=aa&&(Q&&P!=aa.getCenterX()<D.getCenterX()||!Q&&P!=aa.getCenterY()<D.getCenterY()))){var Y=[];p.traverse(aa.cell,!0,function(Z,ba){var fa=null!=ba&&p.isTreeEdge(ba);fa&&Y.push(ba);(null==ba||fa)&&Y.push(Z);return null==ba||fa});p.moveCells(Y,(P?1:-1)*T,(P?1:-1)*q)}}}return p.addCells(V,U)}finally{p.model.endUpdate()}}function d(F){p.model.beginUpdate(); -try{var P=z(F),U=p.getIncomingTreeEdges(F),T=p.cloneCells([U[0],F]);p.model.setTerminal(U[0],T[1],!1);p.model.setTerminal(T[0],T[1],!0);p.model.setTerminal(T[0],F,!1);var V=p.model.getParent(F),W=V.geometry,q=[];p.view.currentRoot!=V&&(T[1].geometry.x-=W.x,T[1].geometry.y-=W.y);p.traverse(F,!0,function(R,O){var Q=null!=O&&p.isTreeEdge(O);Q&&q.push(O);(null==O||Q)&&q.push(R);return null==O||Q});var D=F.geometry.width+40,L=F.geometry.height+40;P==mxConstants.DIRECTION_SOUTH?D=0:P==mxConstants.DIRECTION_NORTH? -(D=0,L=-L):P==mxConstants.DIRECTION_WEST?(D=-D,L=0):P==mxConstants.DIRECTION_EAST&&(L=0);p.moveCells(q,D,L);return p.addCells(T,V)}finally{p.model.endUpdate()}}function g(F,P){p.model.beginUpdate();try{var U=p.model.getParent(F),T=p.getIncomingTreeEdges(F),V=z(F);0==T.length&&(T=[p.createEdge(U,null,"",null,null,p.createCurrentEdgeStyle())],V=P);var W=p.cloneCells([T[0],F]);p.model.setTerminal(W[0],F,!0);if(null==p.model.getTerminal(W[0],!1)){p.model.setTerminal(W[0],W[1],!1);var q=p.getCellStyle(W[1]).newEdgeStyle; -if(null!=q)try{var D=JSON.parse(q),L;for(L in D)p.setCellStyles(L,D[L],[W[0]]),"edgeStyle"==L&&"elbowEdgeStyle"==D[L]&&p.setCellStyles("elbow",V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[W[0]])}catch(aa){}}T=p.getOutgoingTreeEdges(F);var R=U.geometry;P=[];p.view.currentRoot==U&&(R=new mxRectangle);for(q=0;q<T.length;q++){var O=p.model.getTerminal(T[q],!1);null!=O&&P.push(O)}var Q=p.view.getBounds(P),S=p.view.translate,X=p.view.scale;V==mxConstants.DIRECTION_SOUTH? -(W[1].geometry.x=null==Q?F.geometry.x+(F.geometry.width-W[1].geometry.width)/2:(Q.x+Q.width)/X-S.x-R.x+10,W[1].geometry.y+=W[1].geometry.height-R.y+40):V==mxConstants.DIRECTION_NORTH?(W[1].geometry.x=null==Q?F.geometry.x+(F.geometry.width-W[1].geometry.width)/2:(Q.x+Q.width)/X-S.x+-R.x+10,W[1].geometry.y-=W[1].geometry.height+R.y+40):(W[1].geometry.x=V==mxConstants.DIRECTION_WEST?W[1].geometry.x-(W[1].geometry.width+R.x+40):W[1].geometry.x+(W[1].geometry.width-R.x+40),W[1].geometry.y=null==Q?F.geometry.y+ -(F.geometry.height-W[1].geometry.height)/2:(Q.y+Q.height)/X-S.y+-R.y+10);return p.addCells(W,U)}finally{p.model.endUpdate()}}function k(F,P,U){F=p.getOutgoingTreeEdges(F);U=p.view.getState(U);var T=[];if(null!=U&&null!=F){for(var V=0;V<F.length;V++){var W=p.view.getState(p.model.getTerminal(F[V],!1));null!=W&&(!P&&Math.min(W.x+W.width,U.x+U.width)>=Math.max(W.x,U.x)||P&&Math.min(W.y+W.height,U.y+U.height)>=Math.max(W.y,U.y))&&T.push(W)}T.sort(function(q,D){return P?q.x+q.width-D.x-D.width:q.y+q.height- -D.y-D.height})}return T}function n(F,P){var U=z(F),T=P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST;(U==mxConstants.DIRECTION_EAST||U==mxConstants.DIRECTION_WEST)==T&&U!=P?t.actions.get("selectParent").funct():U==P?(P=p.getOutgoingTreeEdges(F),null!=P&&0<P.length&&p.setSelectionCell(p.model.getTerminal(P[0],!1))):(U=p.getIncomingTreeEdges(F),null!=U&&0<U.length&&(T=k(p.model.getTerminal(U[0],!0),T,F),F=p.view.getState(F),null!=F&&(F=mxUtils.indexOf(T,F),0<=F&&(F+=P==mxConstants.DIRECTION_NORTH|| -P==mxConstants.DIRECTION_WEST?-1:1,0<=F&&F<=T.length-1&&p.setSelectionCell(T[F].cell)))))}var t=this,p=t.editor.graph,A=p.getModel(),E=t.menus.createPopupMenu;t.menus.createPopupMenu=function(F,P,U){E.apply(this,arguments);if(1==p.getSelectionCount()){P=p.getSelectionCell();var T=p.getOutgoingTreeEdges(P);F.addSeparator();0<T.length&&(c(p.getSelectionCell())&&this.addMenuItems(F,["selectChildren"],null,U),this.addMenuItems(F,["selectDescendants"],null,U));c(p.getSelectionCell())?(F.addSeparator(), -0<p.getIncomingTreeEdges(P).length&&this.addMenuItems(F,["selectSiblings","selectParent"],null,U)):0<p.model.getEdgeCount(P)&&this.addMenuItems(F,["selectConnections"],null,U)}};t.actions.addAction("selectChildren",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var F=p.getSelectionCell();F=p.getOutgoingTreeEdges(F);if(null!=F){for(var P=[],U=0;U<F.length;U++)P.push(p.model.getTerminal(F[U],!1));p.setSelectionCells(P)}}},null,null,"Alt+Shift+X");t.actions.addAction("selectSiblings",function(){if(p.isEnabled()&& -1==p.getSelectionCount()){var F=p.getSelectionCell();F=p.getIncomingTreeEdges(F);if(null!=F&&0<F.length&&(F=p.getOutgoingTreeEdges(p.model.getTerminal(F[0],!0)),null!=F)){for(var P=[],U=0;U<F.length;U++)P.push(p.model.getTerminal(F[U],!1));p.setSelectionCells(P)}}},null,null,"Alt+Shift+S");t.actions.addAction("selectParent",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var F=p.getSelectionCell();F=p.getIncomingTreeEdges(F);null!=F&&0<F.length&&p.setSelectionCell(p.model.getTerminal(F[0], -!0))}},null,null,"Alt+Shift+P");t.actions.addAction("selectDescendants",function(F,P){F=p.getSelectionCell();if(p.isEnabled()&&p.model.isVertex(F)){if(null!=P&&mxEvent.isAltDown(P))p.setSelectionCells(p.model.getTreeEdges(F,null==P||!mxEvent.isShiftDown(P),null==P||!mxEvent.isControlDown(P)));else{var U=[];p.traverse(F,!0,function(T,V){var W=null!=V&&p.isTreeEdge(V);W&&U.push(V);null!=V&&!W||null!=P&&mxEvent.isShiftDown(P)||U.push(T);return null==V||W})}p.setSelectionCells(U)}},null,null,"Alt+Shift+D"); -var y=p.removeCells;p.removeCells=function(F,P){P=null!=P?P:!0;null==F&&(F=this.getDeletableCells(this.getSelectionCells()));P&&(F=this.getDeletableCells(this.addAllEdges(F)));for(var U=[],T=0;T<F.length;T++){var V=F[T];A.isEdge(V)&&m(V)&&(U.push(V),V=A.getTerminal(V,!1));if(c(V)){var W=[];p.traverse(V,!0,function(q,D){var L=null!=D&&p.isTreeEdge(D);L&&W.push(D);(null==D||L)&&W.push(q);return null==D||L});0<W.length&&(U=U.concat(W),V=p.getIncomingTreeEdges(F[T]),F=F.concat(V))}else null!=V&&U.push(F[T])}F= -U;return y.apply(this,arguments)};t.hoverIcons.getStateAt=function(F,P,U){return c(F.cell)?null:this.graph.view.getState(this.graph.getCellAt(P,U))};var B=p.duplicateCells;p.duplicateCells=function(F,P){F=null!=F?F:this.getSelectionCells();for(var U=F.slice(0),T=0;T<U.length;T++){var V=p.view.getState(U[T]);if(null!=V&&c(V.cell)){var W=p.getIncomingTreeEdges(V.cell);for(V=0;V<W.length;V++)mxUtils.remove(W[V],F)}}this.model.beginUpdate();try{var q=B.call(this,F,P);if(q.length==F.length)for(T=0;T<F.length;T++)if(c(F[T])){var D= -p.getIncomingTreeEdges(q[T]);W=p.getIncomingTreeEdges(F[T]);if(0==D.length&&0<W.length){var L=this.cloneCell(W[0]);this.addEdge(L,p.getDefaultParent(),this.model.getTerminal(W[0],!0),q[T])}}}finally{this.model.endUpdate()}return q};var J=p.moveCells;p.moveCells=function(F,P,U,T,V,W,q){var D=null;this.model.beginUpdate();try{var L=V,R=this.getCurrentCellStyle(V);if(null!=F&&c(V)&&"1"==mxUtils.getValue(R,"treeFolding","0")){for(var O=0;O<F.length;O++)if(c(F[O])||p.model.isEdge(F[O])&&null==p.model.getTerminal(F[O], -!0)){V=p.model.getParent(F[O]);break}if(null!=L&&V!=L&&null!=this.view.getState(F[0])){var Q=p.getIncomingTreeEdges(F[0]);if(0<Q.length){var S=p.view.getState(p.model.getTerminal(Q[0],!0));if(null!=S){var X=p.view.getState(L);null!=X&&(P=(X.getCenterX()-S.getCenterX())/p.view.scale,U=(X.getCenterY()-S.getCenterY())/p.view.scale)}}}}D=J.apply(this,arguments);if(null!=D&&null!=F&&D.length==F.length)for(O=0;O<D.length;O++)if(this.model.isEdge(D[O]))c(L)&&0>mxUtils.indexOf(D,this.model.getTerminal(D[O], -!0))&&this.model.setTerminal(D[O],L,!0);else if(c(F[O])&&(Q=p.getIncomingTreeEdges(F[O]),0<Q.length))if(!T)c(L)&&0>mxUtils.indexOf(F,this.model.getTerminal(Q[0],!0))&&this.model.setTerminal(Q[0],L,!0);else if(0==p.getIncomingTreeEdges(D[O]).length){R=L;if(null==R||R==p.model.getParent(F[O]))R=p.model.getTerminal(Q[0],!0);T=this.cloneCell(Q[0]);this.addEdge(T,p.getDefaultParent(),R,D[O])}}finally{this.model.endUpdate()}return D};if(null!=t.sidebar){var N=t.sidebar.dropAndConnect;t.sidebar.dropAndConnect= -function(F,P,U,T){var V=p.model,W=null;V.beginUpdate();try{if(W=N.apply(this,arguments),c(F))for(var q=0;q<W.length;q++)if(V.isEdge(W[q])&&null==V.getTerminal(W[q],!0)){V.setTerminal(W[q],F,!0);var D=p.getCellGeometry(W[q]);D.points=null;null!=D.getTerminalPoint(!0)&&D.setTerminalPoint(null,!0)}}finally{V.endUpdate()}return W}}var v={88:t.actions.get("selectChildren"),84:t.actions.get("selectSubtree"),80:t.actions.get("selectParent"),83:t.actions.get("selectSiblings")},u=t.onKeyDown;t.onKeyDown=function(F){try{if(p.isEnabled()&& -!p.isEditing()&&c(p.getSelectionCell())&&1==p.getSelectionCount()){var P=null;0<p.getIncomingTreeEdges(p.getSelectionCell()).length&&(9==F.which?P=mxEvent.isShiftDown(F)?d(p.getSelectionCell()):g(p.getSelectionCell()):13==F.which&&(P=C(p.getSelectionCell(),!mxEvent.isShiftDown(F))));if(null!=P&&0<P.length)1==P.length&&p.model.isEdge(P[0])?p.setSelectionCell(p.model.getTerminal(P[0],!1)):p.setSelectionCell(P[P.length-1]),null!=t.hoverIcons&&t.hoverIcons.update(p.view.getState(p.getSelectionCell())), -p.startEditingAtCell(p.getSelectionCell()),mxEvent.consume(F);else if(mxEvent.isAltDown(F)&&mxEvent.isShiftDown(F)){var U=v[F.keyCode];null!=U&&(U.funct(F),mxEvent.consume(F))}else 37==F.keyCode?(n(p.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(F)):38==F.keyCode?(n(p.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(F)):39==F.keyCode?(n(p.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(F)):40==F.keyCode&&(n(p.getSelectionCell(),mxConstants.DIRECTION_SOUTH), -mxEvent.consume(F))}}catch(T){t.handleError(T)}mxEvent.isConsumed(F)||u.apply(this,arguments)};var G=p.connectVertex;p.connectVertex=function(F,P,U,T,V,W,q){var D=p.getIncomingTreeEdges(F);if(c(F)){var L=z(F),R=L==mxConstants.DIRECTION_EAST||L==mxConstants.DIRECTION_WEST,O=P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST;return L==P||0==D.length?g(F,P):R==O?d(F):C(F,P!=mxConstants.DIRECTION_NORTH&&P!=mxConstants.DIRECTION_WEST)}return G.apply(this,arguments)};p.getSubtree=function(F){var P= -[F];!l(F)&&!c(F)||x(F)||p.traverse(F,!0,function(U,T){var V=null!=T&&p.isTreeEdge(T);V&&0>mxUtils.indexOf(P,T)&&P.push(T);(null==T||V)&&0>mxUtils.indexOf(P,U)&&P.push(U);return null==T||V});return P};var H=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){H.apply(this,arguments);(l(this.state.cell)||c(this.state.cell))&&!x(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title", -"Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(F){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(F),mxEvent.getClientY(F),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(F); -this.graph.isMouseDown=!0;t.hoverIcons.reset();mxEvent.consume(F)})))};var M=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){M.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var K=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(F){K.apply(this, -arguments);null!=this.moveHandle&&(this.moveHandle.style.display=F?"":"none")};var I=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(F,P){I.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var f=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var c=f.apply(this,arguments),l=this.graph;return c.concat([this.addEntry("tree container", -function(){var m=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");m.vertex=!0;var x=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');x.vertex=!0;var z=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};'); -z.vertex=!0;var C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");C.geometry.relative=!0;C.edge=!0;x.insertEdge(C,!0);z.insertEdge(C,!1);m.insert(C);m.insert(x);m.insert(z);return sb.createVertexTemplateFromCells([m],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var m=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;"); -m.vertex=!0;var x=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');x.vertex=!0;var z=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); -z.vertex=!0;var C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");C.geometry.relative=!0;C.edge=!0;x.insertEdge(C,!0);z.insertEdge(C,!1);var d=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); +!1),c=l.nextSibling,l.parentNode.removeChild(l),l=c;null!=l;){c=l.nextSibling;if(l.nodeType==mxConstants.NODETYPE_ELEMENT){var m=l.getAttribute("id");null==e.lookup(m)&&e.decodeCell(l)}l.parentNode.removeChild(l);l=c}}return f};b.afterDecode=function(e,f,c){c.index=c.previousIndex;return c};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(c,l,m,x,y){l=null!=l?l:!1;null==m&&(m=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var D=m.slice(),d=0;d<m.length;d++)"1"==mxUtils.getValue(this.getCurrentCellStyle(m[d]),"treeFolding","0")&&this.foldTreeCell(c,m[d]);m=D;m=b.apply(this,arguments)}finally{this.model.endUpdate()}return m};Graph.prototype.foldTreeCell= +function(c,l){this.model.beginUpdate();try{var m=[];this.traverse(l,!0,mxUtils.bind(this,function(y,D){var d=null!=D&&this.isTreeEdge(D);d&&m.push(D);y==l||null!=D&&!d||m.push(y);return(null==D||d)&&(y==l||!this.model.isCollapsed(y))}));this.model.setCollapsed(l,c);for(var x=0;x<m.length;x++)this.model.setVisible(m[x],!c)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(c){return!this.isEdgeIgnored(c)};Graph.prototype.getTreeEdges=function(c,l,m,x,y,D){return this.model.filterCells(this.getEdges(c, +l,m,x,y,D),mxUtils.bind(this,function(d){return this.isTreeEdge(d)}))};Graph.prototype.getIncomingTreeEdges=function(c,l){return this.getTreeEdges(c,l,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(c,l){return this.getTreeEdges(c,l,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function c(H){return A.isVertex(H)&&m(H)}function l(H){var Q= +!1;null!=H&&(Q="1"==p.getCurrentCellStyle(H).treeMoving);return Q}function m(H){var Q=!1;null!=H&&(H=A.getParent(H),Q=p.view.getState(H),Q="tree"==(null!=Q?Q.style:p.getCellStyle(H)).containerType);return Q}function x(H){var Q=!1;null!=H&&(H=A.getParent(H),Q=p.view.getState(H),p.view.getState(H),Q=null!=(null!=Q?Q.style:p.getCellStyle(H)).childLayout);return Q}function y(H){H=p.view.getState(H);if(null!=H){var Q=p.getIncomingTreeEdges(H.cell);if(0<Q.length&&(Q=p.view.getState(Q[0]),null!=Q&&(Q=Q.absolutePoints, +null!=Q&&0<Q.length&&(Q=Q[Q.length-1],null!=Q)))){if(Q.y==H.y&&Math.abs(Q.x-H.getCenterX())<H.width/2)return mxConstants.DIRECTION_SOUTH;if(Q.y==H.y+H.height&&Math.abs(Q.x-H.getCenterX())<H.width/2)return mxConstants.DIRECTION_NORTH;if(Q.x>H.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function D(H,Q){Q=null!=Q?Q:!0;p.model.beginUpdate();try{var U=p.model.getParent(H),T=p.getIncomingTreeEdges(H),V=p.cloneCells([T[0],H]);p.model.setTerminal(V[0],p.model.getTerminal(T[0], +!0),!0);var W=y(H),t=U.geometry;W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NORTH?V[1].geometry.x+=Q?H.geometry.width+10:-V[1].geometry.width-10:V[1].geometry.y+=Q?H.geometry.height+10:-V[1].geometry.height-10;p.view.currentRoot!=U&&(V[1].geometry.x-=t.x,V[1].geometry.y-=t.y);var C=p.view.getState(H),N=p.view.scale;if(null!=C){var R=mxRectangle.fromRectangle(C);W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NORTH?R.x+=(Q?H.geometry.width+10:-V[1].geometry.width-10)*N:R.y+=(Q? +H.geometry.height+10:-V[1].geometry.height-10)*N;var O=p.getOutgoingTreeEdges(p.model.getTerminal(T[0],!0));if(null!=O){for(var P=W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NORTH,S=t=T=0;S<O.length;S++){var X=p.model.getTerminal(O[S],!1);if(W==y(X)){var aa=p.view.getState(X);X!=H&&null!=aa&&(P&&Q!=aa.getCenterX()<C.getCenterX()||!P&&Q!=aa.getCenterY()<C.getCenterY())&&mxUtils.intersects(R,aa)&&(T=10+Math.max(T,(Math.min(R.x+R.width,aa.x+aa.width)-Math.max(R.x,aa.x))/N),t=10+Math.max(t, +(Math.min(R.y+R.height,aa.y+aa.height)-Math.max(R.y,aa.y))/N))}}P?t=0:T=0;for(S=0;S<O.length;S++)if(X=p.model.getTerminal(O[S],!1),W==y(X)&&(aa=p.view.getState(X),X!=H&&null!=aa&&(P&&Q!=aa.getCenterX()<C.getCenterX()||!P&&Q!=aa.getCenterY()<C.getCenterY()))){var Y=[];p.traverse(aa.cell,!0,function(Z,ba){var ea=null!=ba&&p.isTreeEdge(ba);ea&&Y.push(ba);(null==ba||ea)&&Y.push(Z);return null==ba||ea});p.moveCells(Y,(Q?1:-1)*T,(Q?1:-1)*t)}}}return p.addCells(V,U)}finally{p.model.endUpdate()}}function d(H){p.model.beginUpdate(); +try{var Q=y(H),U=p.getIncomingTreeEdges(H),T=p.cloneCells([U[0],H]);p.model.setTerminal(U[0],T[1],!1);p.model.setTerminal(T[0],T[1],!0);p.model.setTerminal(T[0],H,!1);var V=p.model.getParent(H),W=V.geometry,t=[];p.view.currentRoot!=V&&(T[1].geometry.x-=W.x,T[1].geometry.y-=W.y);p.traverse(H,!0,function(R,O){var P=null!=O&&p.isTreeEdge(O);P&&t.push(O);(null==O||P)&&t.push(R);return null==O||P});var C=H.geometry.width+40,N=H.geometry.height+40;Q==mxConstants.DIRECTION_SOUTH?C=0:Q==mxConstants.DIRECTION_NORTH? +(C=0,N=-N):Q==mxConstants.DIRECTION_WEST?(C=-C,N=0):Q==mxConstants.DIRECTION_EAST&&(N=0);p.moveCells(t,C,N);return p.addCells(T,V)}finally{p.model.endUpdate()}}function g(H,Q){p.model.beginUpdate();try{var U=p.model.getParent(H),T=p.getIncomingTreeEdges(H),V=y(H);0==T.length&&(T=[p.createEdge(U,null,"",null,null,p.createCurrentEdgeStyle())],V=Q);var W=p.cloneCells([T[0],H]);p.model.setTerminal(W[0],H,!0);if(null==p.model.getTerminal(W[0],!1)){p.model.setTerminal(W[0],W[1],!1);var t=p.getCellStyle(W[1]).newEdgeStyle; +if(null!=t)try{var C=JSON.parse(t),N;for(N in C)p.setCellStyles(N,C[N],[W[0]]),"edgeStyle"==N&&"elbowEdgeStyle"==C[N]&&p.setCellStyles("elbow",V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[W[0]])}catch(aa){}}T=p.getOutgoingTreeEdges(H);var R=U.geometry;Q=[];p.view.currentRoot==U&&(R=new mxRectangle);for(t=0;t<T.length;t++){var O=p.model.getTerminal(T[t],!1);null!=O&&Q.push(O)}var P=p.view.getBounds(Q),S=p.view.translate,X=p.view.scale;V==mxConstants.DIRECTION_SOUTH? +(W[1].geometry.x=null==P?H.geometry.x+(H.geometry.width-W[1].geometry.width)/2:(P.x+P.width)/X-S.x-R.x+10,W[1].geometry.y+=W[1].geometry.height-R.y+40):V==mxConstants.DIRECTION_NORTH?(W[1].geometry.x=null==P?H.geometry.x+(H.geometry.width-W[1].geometry.width)/2:(P.x+P.width)/X-S.x+-R.x+10,W[1].geometry.y-=W[1].geometry.height+R.y+40):(W[1].geometry.x=V==mxConstants.DIRECTION_WEST?W[1].geometry.x-(W[1].geometry.width+R.x+40):W[1].geometry.x+(W[1].geometry.width-R.x+40),W[1].geometry.y=null==P?H.geometry.y+ +(H.geometry.height-W[1].geometry.height)/2:(P.y+P.height)/X-S.y+-R.y+10);return p.addCells(W,U)}finally{p.model.endUpdate()}}function k(H,Q,U){H=p.getOutgoingTreeEdges(H);U=p.view.getState(U);var T=[];if(null!=U&&null!=H){for(var V=0;V<H.length;V++){var W=p.view.getState(p.model.getTerminal(H[V],!1));null!=W&&(!Q&&Math.min(W.x+W.width,U.x+U.width)>=Math.max(W.x,U.x)||Q&&Math.min(W.y+W.height,U.y+U.height)>=Math.max(W.y,U.y))&&T.push(W)}T.sort(function(t,C){return Q?t.x+t.width-C.x-C.width:t.y+t.height- +C.y-C.height})}return T}function n(H,Q){var U=y(H),T=Q==mxConstants.DIRECTION_EAST||Q==mxConstants.DIRECTION_WEST;(U==mxConstants.DIRECTION_EAST||U==mxConstants.DIRECTION_WEST)==T&&U!=Q?q.actions.get("selectParent").funct():U==Q?(Q=p.getOutgoingTreeEdges(H),null!=Q&&0<Q.length&&p.setSelectionCell(p.model.getTerminal(Q[0],!1))):(U=p.getIncomingTreeEdges(H),null!=U&&0<U.length&&(T=k(p.model.getTerminal(U[0],!0),T,H),H=p.view.getState(H),null!=H&&(H=mxUtils.indexOf(T,H),0<=H&&(H+=Q==mxConstants.DIRECTION_NORTH|| +Q==mxConstants.DIRECTION_WEST?-1:1,0<=H&&H<=T.length-1&&p.setSelectionCell(T[H].cell)))))}var q=this,p=q.editor.graph,A=p.getModel(),E=q.menus.createPopupMenu;q.menus.createPopupMenu=function(H,Q,U){E.apply(this,arguments);if(1==p.getSelectionCount()){Q=p.getSelectionCell();var T=p.getOutgoingTreeEdges(Q);H.addSeparator();0<T.length&&(c(p.getSelectionCell())&&this.addMenuItems(H,["selectChildren"],null,U),this.addMenuItems(H,["selectDescendants"],null,U));c(p.getSelectionCell())?(H.addSeparator(), +0<p.getIncomingTreeEdges(Q).length&&this.addMenuItems(H,["selectSiblings","selectParent"],null,U)):0<p.model.getEdgeCount(Q)&&this.addMenuItems(H,["selectConnections"],null,U)}};q.actions.addAction("selectChildren",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var H=p.getSelectionCell();H=p.getOutgoingTreeEdges(H);if(null!=H){for(var Q=[],U=0;U<H.length;U++)Q.push(p.model.getTerminal(H[U],!1));p.setSelectionCells(Q)}}},null,null,"Alt+Shift+X");q.actions.addAction("selectSiblings",function(){if(p.isEnabled()&& +1==p.getSelectionCount()){var H=p.getSelectionCell();H=p.getIncomingTreeEdges(H);if(null!=H&&0<H.length&&(H=p.getOutgoingTreeEdges(p.model.getTerminal(H[0],!0)),null!=H)){for(var Q=[],U=0;U<H.length;U++)Q.push(p.model.getTerminal(H[U],!1));p.setSelectionCells(Q)}}},null,null,"Alt+Shift+S");q.actions.addAction("selectParent",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var H=p.getSelectionCell();H=p.getIncomingTreeEdges(H);null!=H&&0<H.length&&p.setSelectionCell(p.model.getTerminal(H[0], +!0))}},null,null,"Alt+Shift+P");q.actions.addAction("selectDescendants",function(H,Q){H=p.getSelectionCell();if(p.isEnabled()&&p.model.isVertex(H)){if(null!=Q&&mxEvent.isAltDown(Q))p.setSelectionCells(p.model.getTreeEdges(H,null==Q||!mxEvent.isShiftDown(Q),null==Q||!mxEvent.isControlDown(Q)));else{var U=[];p.traverse(H,!0,function(T,V){var W=null!=V&&p.isTreeEdge(V);W&&U.push(V);null!=V&&!W||null!=Q&&mxEvent.isShiftDown(Q)||U.push(T);return null==V||W})}p.setSelectionCells(U)}},null,null,"Alt+Shift+D"); +var z=p.removeCells;p.removeCells=function(H,Q){Q=null!=Q?Q:!0;null==H&&(H=this.getDeletableCells(this.getSelectionCells()));Q&&(H=this.getDeletableCells(this.addAllEdges(H)));for(var U=[],T=0;T<H.length;T++){var V=H[T];A.isEdge(V)&&m(V)&&(U.push(V),V=A.getTerminal(V,!1));if(c(V)){var W=[];p.traverse(V,!0,function(t,C){var N=null!=C&&p.isTreeEdge(C);N&&W.push(C);(null==C||N)&&W.push(t);return null==C||N});0<W.length&&(U=U.concat(W),V=p.getIncomingTreeEdges(H[T]),H=H.concat(V))}else null!=V&&U.push(H[T])}H= +U;return z.apply(this,arguments)};q.hoverIcons.getStateAt=function(H,Q,U){return c(H.cell)?null:this.graph.view.getState(this.graph.getCellAt(Q,U))};var B=p.duplicateCells;p.duplicateCells=function(H,Q){H=null!=H?H:this.getSelectionCells();for(var U=H.slice(0),T=0;T<U.length;T++){var V=p.view.getState(U[T]);if(null!=V&&c(V.cell)){var W=p.getIncomingTreeEdges(V.cell);for(V=0;V<W.length;V++)mxUtils.remove(W[V],H)}}this.model.beginUpdate();try{var t=B.call(this,H,Q);if(t.length==H.length)for(T=0;T<H.length;T++)if(c(H[T])){var C= +p.getIncomingTreeEdges(t[T]);W=p.getIncomingTreeEdges(H[T]);if(0==C.length&&0<W.length){var N=this.cloneCell(W[0]);this.addEdge(N,p.getDefaultParent(),this.model.getTerminal(W[0],!0),t[T])}}}finally{this.model.endUpdate()}return t};var J=p.moveCells;p.moveCells=function(H,Q,U,T,V,W,t){var C=null;this.model.beginUpdate();try{var N=V,R=this.getCurrentCellStyle(V);if(null!=H&&c(V)&&"1"==mxUtils.getValue(R,"treeFolding","0")){for(var O=0;O<H.length;O++)if(c(H[O])||p.model.isEdge(H[O])&&null==p.model.getTerminal(H[O], +!0)){V=p.model.getParent(H[O]);break}if(null!=N&&V!=N&&null!=this.view.getState(H[0])){var P=p.getIncomingTreeEdges(H[0]);if(0<P.length){var S=p.view.getState(p.model.getTerminal(P[0],!0));if(null!=S){var X=p.view.getState(N);null!=X&&(Q=(X.getCenterX()-S.getCenterX())/p.view.scale,U=(X.getCenterY()-S.getCenterY())/p.view.scale)}}}}C=J.apply(this,arguments);if(null!=C&&null!=H&&C.length==H.length)for(O=0;O<C.length;O++)if(this.model.isEdge(C[O]))c(N)&&0>mxUtils.indexOf(C,this.model.getTerminal(C[O], +!0))&&this.model.setTerminal(C[O],N,!0);else if(c(H[O])&&(P=p.getIncomingTreeEdges(H[O]),0<P.length))if(!T)c(N)&&0>mxUtils.indexOf(H,this.model.getTerminal(P[0],!0))&&this.model.setTerminal(P[0],N,!0);else if(0==p.getIncomingTreeEdges(C[O]).length){R=N;if(null==R||R==p.model.getParent(H[O]))R=p.model.getTerminal(P[0],!0);T=this.cloneCell(P[0]);this.addEdge(T,p.getDefaultParent(),R,C[O])}}finally{this.model.endUpdate()}return C};if(null!=q.sidebar){var M=q.sidebar.dropAndConnect;q.sidebar.dropAndConnect= +function(H,Q,U,T){var V=p.model,W=null;V.beginUpdate();try{if(W=M.apply(this,arguments),c(H))for(var t=0;t<W.length;t++)if(V.isEdge(W[t])&&null==V.getTerminal(W[t],!0)){V.setTerminal(W[t],H,!0);var C=p.getCellGeometry(W[t]);C.points=null;null!=C.getTerminalPoint(!0)&&C.setTerminalPoint(null,!0)}}finally{V.endUpdate()}return W}}var v={88:q.actions.get("selectChildren"),84:q.actions.get("selectSubtree"),80:q.actions.get("selectParent"),83:q.actions.get("selectSiblings")},u=q.onKeyDown;q.onKeyDown=function(H){try{if(p.isEnabled()&& +!p.isEditing()&&c(p.getSelectionCell())&&1==p.getSelectionCount()){var Q=null;0<p.getIncomingTreeEdges(p.getSelectionCell()).length&&(9==H.which?Q=mxEvent.isShiftDown(H)?d(p.getSelectionCell()):g(p.getSelectionCell()):13==H.which&&(Q=D(p.getSelectionCell(),!mxEvent.isShiftDown(H))));if(null!=Q&&0<Q.length)1==Q.length&&p.model.isEdge(Q[0])?p.setSelectionCell(p.model.getTerminal(Q[0],!1)):p.setSelectionCell(Q[Q.length-1]),null!=q.hoverIcons&&q.hoverIcons.update(p.view.getState(p.getSelectionCell())), +p.startEditingAtCell(p.getSelectionCell()),mxEvent.consume(H);else if(mxEvent.isAltDown(H)&&mxEvent.isShiftDown(H)){var U=v[H.keyCode];null!=U&&(U.funct(H),mxEvent.consume(H))}else 37==H.keyCode?(n(p.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(H)):38==H.keyCode?(n(p.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(H)):39==H.keyCode?(n(p.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(H)):40==H.keyCode&&(n(p.getSelectionCell(),mxConstants.DIRECTION_SOUTH), +mxEvent.consume(H))}}catch(T){q.handleError(T)}mxEvent.isConsumed(H)||u.apply(this,arguments)};var G=p.connectVertex;p.connectVertex=function(H,Q,U,T,V,W,t){var C=p.getIncomingTreeEdges(H);if(c(H)){var N=y(H),R=N==mxConstants.DIRECTION_EAST||N==mxConstants.DIRECTION_WEST,O=Q==mxConstants.DIRECTION_EAST||Q==mxConstants.DIRECTION_WEST;return N==Q||0==C.length?g(H,Q):R==O?d(H):D(H,Q!=mxConstants.DIRECTION_NORTH&&Q!=mxConstants.DIRECTION_WEST)}return G.apply(this,arguments)};p.getSubtree=function(H){var Q= +[H];!l(H)&&!c(H)||x(H)||p.traverse(H,!0,function(U,T){var V=null!=T&&p.isTreeEdge(T);V&&0>mxUtils.indexOf(Q,T)&&Q.push(T);(null==T||V)&&0>mxUtils.indexOf(Q,U)&&Q.push(U);return null==T||V});return Q};var I=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){I.apply(this,arguments);(l(this.state.cell)||c(this.state.cell))&&!x(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title", +"Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(H){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(H),mxEvent.getClientY(H),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(H); +this.graph.isMouseDown=!0;q.hoverIcons.reset();mxEvent.consume(H)})))};var F=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){F.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var L=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(H){L.apply(this, +arguments);null!=this.moveHandle&&(this.moveHandle.style.display=H?"":"none")};var K=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(H,Q){K.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var f=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var c=f.apply(this,arguments),l=this.graph;return c.concat([this.addEntry("tree container", +function(){var m=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");m.vertex=!0;var x=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');x.vertex=!0;var y=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};'); +y.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");D.geometry.relative=!0;D.edge=!0;x.insertEdge(D,!0);y.insertEdge(D,!1);m.insert(D);m.insert(x);m.insert(y);return sb.createVertexTemplateFromCells([m],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var m=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;"); +m.vertex=!0;var x=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');x.vertex=!0;var y=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); +y.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");D.geometry.relative=!0;D.edge=!0;x.insertEdge(D,!0);y.insertEdge(D,!1);var d=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); d.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;x.insertEdge(g,!0);d.insertEdge(g,!1);var k=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); -k.vertex=!0;var n=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");n.geometry.relative=!0;n.edge=!0;x.insertEdge(n,!0);k.insertEdge(n,!1);var t=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); -t.vertex=!0;var p=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");p.geometry.relative=!0;p.edge=!0;x.insertEdge(p,!0);t.insertEdge(p,!1);m.insert(C);m.insert(g);m.insert(n);m.insert(p);m.insert(x);m.insert(z);m.insert(d);m.insert(k);m.insert(t);return sb.createVertexTemplateFromCells([m],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var m=new mxCell("Central Idea", +k.vertex=!0;var n=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");n.geometry.relative=!0;n.edge=!0;x.insertEdge(n,!0);k.insertEdge(n,!1);var q=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); +q.vertex=!0;var p=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");p.geometry.relative=!0;p.edge=!0;x.insertEdge(p,!0);q.insertEdge(p,!1);m.insert(D);m.insert(g);m.insert(n);m.insert(p);m.insert(x);m.insert(y);m.insert(d);m.insert(k);m.insert(q);return sb.createVertexTemplateFromCells([m],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var m=new mxCell("Central Idea", new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');m.vertex=!0;return sb.createVertexTemplateFromCells([m],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var m=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); m.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");x.geometry.setTerminalPoint(new mxPoint(-40,40),!0);x.geometry.relative=!0;x.edge=!0;m.insertEdge(x,!1);return sb.createVertexTemplateFromCells([m,x],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var m=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); m.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");x.geometry.setTerminalPoint(new mxPoint(-40,40),!0);x.geometry.relative=!0;x.edge=!0;m.insertEdge(x,!1);return sb.createVertexTemplateFromCells([m,x],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree orgchart organization division",function(){var m=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};'); -m.vertex=!0;var x=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');l.setAttributeForCell(x,"treeRoot","1");x.vertex=!0;var z=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};'); -z.vertex=!0;var C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");C.geometry.relative=!0;C.edge=!0;x.insertEdge(C,!0);z.insertEdge(C,!1);var d=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');d.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;"); -g.geometry.relative=!0;g.edge=!0;x.insertEdge(g,!0);d.insertEdge(g,!1);m.insert(C);m.insert(g);m.insert(x);m.insert(z);m.insert(d);return sb.createVertexTemplateFromCells([m],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree root",function(){var m=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');l.setAttributeForCell(m,"treeRoot", +m.vertex=!0;var x=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');l.setAttributeForCell(x,"treeRoot","1");x.vertex=!0;var y=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};'); +y.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");D.geometry.relative=!0;D.edge=!0;x.insertEdge(D,!0);y.insertEdge(D,!1);var d=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');d.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;"); +g.geometry.relative=!0;g.edge=!0;x.insertEdge(g,!0);d.insertEdge(g,!1);m.insert(D);m.insert(g);m.insert(x);m.insert(y);m.insert(d);return sb.createVertexTemplateFromCells([m],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree root",function(){var m=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');l.setAttributeForCell(m,"treeRoot", "1");m.vertex=!0;return sb.createVertexTemplateFromCells([m],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree division",function(){var m=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');m.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;"); x.geometry.setTerminalPoint(new mxPoint(0,0),!0);x.geometry.relative=!0;x.edge=!0;m.insertEdge(x,!1);return sb.createVertexTemplateFromCells([m,x],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree sub sections",function(){var m=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");m.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;"); -x.geometry.setTerminalPoint(new mxPoint(110,-40),!0);x.geometry.relative=!0;x.edge=!0;m.insertEdge(x,!1);var z=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");z.vertex=!0;var C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");C.geometry.setTerminalPoint(new mxPoint(110,-40),!0);C.geometry.relative= -!0;C.edge=!0;z.insertEdge(C,!1);return sb.createVertexTemplateFromCells([x,C,m,z],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows; -EditorUi.initMinimalTheme=function(){function b(y,B){if(EditorUi.windowed){var J=y.editor.graph;J.popupMenuHandler.hideMenu();if(null==y.formatWindow){B="1"==urlParams.sketch?Math.max(10,y.diagramContainer.clientWidth-241):Math.max(10,y.diagramContainer.clientWidth-248);var N="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;J="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,J.container.clientHeight-10);y.formatWindow=new WrapperWindow(y,mxResources.get("format"),B,N,240,J, -function(v){v=y.createFormat(v);v.init();return v});y.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){y.formatWindow.window.fit()}));y.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else y.formatWindow.window.setVisible(null!=B?B:!y.formatWindow.window.isVisible())}else null==y.formatElt&&(y.formatElt=y.createSidebarContainer(),y.createFormat(y.formatElt).init(),y.formatElt.style.border="none",y.formatElt.style.width="240px",y.formatElt.style.borderLeft="1px solid gray", -y.formatElt.style.right="0px"),J=y.diagramContainer.parentNode,null!=y.formatElt.parentNode?(y.formatElt.parentNode.removeChild(y.formatElt),J.style.right="0px"):(J.parentNode.appendChild(y.formatElt),J.style.right=y.formatElt.style.width)}function e(y,B){function J(G,H){var M=y.menus.get(G);G=u.addMenu(H,mxUtils.bind(this,function(){M.funct.apply(this,arguments)}));G.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;"; -G.className="geTitle";B.appendChild(G);return G}var N=document.createElement("div");N.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";N.className="geTitle";var v=document.createElement("span");v.style.fontSize="18px";v.style.marginRight="5px";v.innerHTML="+";N.appendChild(v);mxUtils.write(N,mxResources.get("moreShapes"));B.appendChild(N);mxEvent.addListener(N,"click",function(){y.actions.get("shapes").funct()}); -var u=new Menubar(y,B);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?N.style.bottom="0":null!=y.actions.get("newLibrary")?(N=document.createElement("div"),N.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",N.className="geTitle",v=document.createElement("span"),v.style.cssText="position:relative;top:6px;",mxUtils.write(v,mxResources.get("newLibrary")),N.appendChild(v), -B.appendChild(N),mxEvent.addListener(N,"click",y.actions.get("newLibrary").funct),N=document.createElement("div"),N.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",N.className="geTitle",v=document.createElement("span"),v.style.cssText="position:relative;top:6px;",mxUtils.write(v,mxResources.get("openLibrary")),N.appendChild(v),B.appendChild(N),mxEvent.addListener(N, -"click",y.actions.get("openLibrary").funct)):(N=J("newLibrary",mxResources.get("newLibrary")),N.style.boxSizing="border-box",N.style.paddingRight="6px",N.style.paddingLeft="6px",N.style.height="32px",N.style.left="0",N=J("openLibraryFrom",mxResources.get("openLibraryFrom")),N.style.borderLeft="1px solid lightgray",N.style.boxSizing="border-box",N.style.paddingRight="6px",N.style.paddingLeft="6px",N.style.height="32px",N.style.left="50%");B.appendChild(y.sidebar.container);B.style.overflow="hidden"} -function f(y,B){if(EditorUi.windowed){var J=y.editor.graph;J.popupMenuHandler.hideMenu();if(null==y.sidebarWindow){B=Math.min(J.container.clientWidth-10,218);var N="1"==urlParams.embedInline?650:Math.min(J.container.clientHeight-40,650);y.sidebarWindow=new WrapperWindow(y,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(J.container.clientHeight-N)/2):56,B-6,N-6,function(v){e(y,v)});y.sidebarWindow.window.addListener(mxEvent.SHOW, -mxUtils.bind(this,function(){y.sidebarWindow.window.fit()}));y.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);y.sidebarWindow.window.setVisible(!0);isLocalStorage&&y.getLocalData("sidebar",function(v){y.sidebar.showEntries(v,null,!0)});y.restoreLibraries()}else y.sidebarWindow.window.setVisible(null!=B?B:!y.sidebarWindow.window.isVisible())}else null==y.sidebarElt&&(y.sidebarElt=y.createSidebarContainer(),e(y,y.sidebarElt),y.sidebarElt.style.border="none",y.sidebarElt.style.width="210px", -y.sidebarElt.style.borderRight="1px solid gray"),J=y.diagramContainer.parentNode,null!=y.sidebarElt.parentNode?(y.sidebarElt.parentNode.removeChild(y.sidebarElt),J.style.left="0px"):(J.parentNode.appendChild(y.sidebarElt),J.style.left=y.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var c=0;try{c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(y){}Editor.checkmarkImage= +x.geometry.setTerminalPoint(new mxPoint(110,-40),!0);x.geometry.relative=!0;x.edge=!0;m.insertEdge(x,!1);var y=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");y.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");D.geometry.setTerminalPoint(new mxPoint(110,-40),!0);D.geometry.relative= +!0;D.edge=!0;y.insertEdge(D,!1);return sb.createVertexTemplateFromCells([x,D,m,y],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows; +EditorUi.initMinimalTheme=function(){function b(z,B){if(EditorUi.windowed){var J=z.editor.graph;J.popupMenuHandler.hideMenu();if(null==z.formatWindow){B="1"==urlParams.sketch?Math.max(10,z.diagramContainer.clientWidth-241):Math.max(10,z.diagramContainer.clientWidth-248);var M="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;J="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,J.container.clientHeight-10);z.formatWindow=new WrapperWindow(z,mxResources.get("format"),B,M,240,J, +function(v){z.createFormat(v).init()});z.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){z.formatWindow.window.fit()}));z.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else z.formatWindow.window.setVisible(null!=B?B:!z.formatWindow.window.isVisible())}else null==z.formatElt&&(z.formatElt=z.createSidebarContainer(),z.createFormat(z.formatElt).init(),z.formatElt.style.border="none",z.formatElt.style.width="240px",z.formatElt.style.borderLeft="1px solid gray", +z.formatElt.style.right="0px"),J=z.diagramContainer.parentNode,null!=z.formatElt.parentNode?(z.formatElt.parentNode.removeChild(z.formatElt),J.style.right="0px"):(J.parentNode.appendChild(z.formatElt),J.style.right=z.formatElt.style.width)}function e(z,B){function J(G,I){var F=z.menus.get(G);G=u.addMenu(I,mxUtils.bind(this,function(){F.funct.apply(this,arguments)}));G.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;"; +G.className="geTitle";B.appendChild(G);return G}var M=document.createElement("div");M.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";M.className="geTitle";var v=document.createElement("span");v.style.fontSize="18px";v.style.marginRight="5px";v.innerHTML="+";M.appendChild(v);mxUtils.write(M,mxResources.get("moreShapes"));B.appendChild(M);mxEvent.addListener(M,"click",function(){z.actions.get("shapes").funct()}); +var u=new Menubar(z,B);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?M.style.bottom="0":null!=z.actions.get("newLibrary")?(M=document.createElement("div"),M.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",M.className="geTitle",v=document.createElement("span"),v.style.cssText="position:relative;top:6px;",mxUtils.write(v,mxResources.get("newLibrary")),M.appendChild(v), +B.appendChild(M),mxEvent.addListener(M,"click",z.actions.get("newLibrary").funct),M=document.createElement("div"),M.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",M.className="geTitle",v=document.createElement("span"),v.style.cssText="position:relative;top:6px;",mxUtils.write(v,mxResources.get("openLibrary")),M.appendChild(v),B.appendChild(M),mxEvent.addListener(M, +"click",z.actions.get("openLibrary").funct)):(M=J("newLibrary",mxResources.get("newLibrary")),M.style.boxSizing="border-box",M.style.paddingRight="6px",M.style.paddingLeft="6px",M.style.height="32px",M.style.left="0",M=J("openLibraryFrom",mxResources.get("openLibraryFrom")),M.style.borderLeft="1px solid lightgray",M.style.boxSizing="border-box",M.style.paddingRight="6px",M.style.paddingLeft="6px",M.style.height="32px",M.style.left="50%");B.appendChild(z.sidebar.container);B.style.overflow="hidden"} +function f(z,B){if(EditorUi.windowed){var J=z.editor.graph;J.popupMenuHandler.hideMenu();if(null==z.sidebarWindow){B=Math.min(J.container.clientWidth-10,218);var M="1"==urlParams.embedInline?650:Math.min(J.container.clientHeight-40,650);z.sidebarWindow=new WrapperWindow(z,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(J.container.clientHeight-M)/2):56,B-6,M-6,function(v){e(z,v)});z.sidebarWindow.window.addListener(mxEvent.SHOW, +mxUtils.bind(this,function(){z.sidebarWindow.window.fit()}));z.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);z.sidebarWindow.window.setVisible(!0);isLocalStorage&&z.getLocalData("sidebar",function(v){z.sidebar.showEntries(v,null,!0)});z.restoreLibraries()}else z.sidebarWindow.window.setVisible(null!=B?B:!z.sidebarWindow.window.isVisible())}else null==z.sidebarElt&&(z.sidebarElt=z.createSidebarContainer(),e(z,z.sidebarElt),z.sidebarElt.style.border="none",z.sidebarElt.style.width="210px", +z.sidebarElt.style.borderRight="1px solid gray"),J=z.diagramContainer.parentNode,null!=z.sidebarElt.parentNode?(z.sidebarElt.parentNode.removeChild(z.sidebarElt),J.style.left="0px"):(J.parentNode.appendChild(z.sidebarElt),J.style.left=z.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var c=0;try{c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(z){}Editor.checkmarkImage= Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src; mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR= "#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor= "#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight="1"==urlParams.sketch?1:46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert="1"!=urlParams.sketch&&!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.styleElt=document.createElement("style");Editor.styleElt.type="text/css";Editor.styleElt.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(Editor.styleElt); Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var l=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");l.apply(this,arguments)};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);this.menus.get("save").setEnabled(null!= -this.getCurrentFile()||"1"==urlParams.embed)};var x=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(y,B){null!=B.shortcut&&900>c&&!mxClient.IS_IOS?y.firstChild.nextSibling.setAttribute("title",B.shortcut):x.apply(this,arguments)};var z=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){z.apply(this,arguments);if(null!=this.userElement){var y=this.userElement;y.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+y.style.display;y.className= -"geToolbarButton";y.innerText="";y.style.backgroundImage="url("+Editor.userImage+")";y.style.backgroundPosition="center center";y.style.backgroundRepeat="no-repeat";y.style.backgroundSize="24px 24px";y.style.height="24px";y.style.width="24px";y.style.cssFloat="right";y.setAttribute("title",mxResources.get("changeUser"));if("none"!=y.style.display){y.style.display="inline-block";var B=this.getCurrentFile();if(null!=B&&B.isRealtimeEnabled()&&B.isRealtimeSupported()){var J=document.createElement("img"); -J.setAttribute("border","0");J.style.position="absolute";J.style.left="18px";J.style.top="2px";J.style.width="12px";J.style.height="12px";var N=B.getRealtimeError();B=B.getRealtimeState();var v=mxResources.get("realtimeCollaboration");1==B?(J.src=Editor.syncImage,v+=" ("+mxResources.get("online")+")"):(J.src=Editor.syncProblemImage,v=null!=N&&null!=N.message?v+(" ("+N.message+")"):v+(" ("+mxResources.get("disconnected")+")"));J.setAttribute("title",v);y.style.paddingRight="4px";y.appendChild(J)}}}}; -var C=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){C.apply(this,arguments);if(null!=this.shareButton){var y=this.shareButton;y.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";y.className="geToolbarButton";y.innerText="";y.style.backgroundImage="url("+Editor.shareImage+")";y.style.backgroundPosition="center center";y.style.backgroundRepeat="no-repeat";y.style.backgroundSize="24px 24px";y.style.height= -"24px";y.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop="-2px",this.buttonContainer.style.paddingTop="4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var y=document.createElement("div");y.style.display="inline-block";y.style.position="relative";y.style.marginTop="6px";y.style.marginRight="4px";var B=document.createElement("a");B.className= -"geMenuItem gePrimaryBtn";B.style.marginLeft="8px";B.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var J="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(B,J);B.setAttribute("title",J);mxEvent.addListener(B,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));y.appendChild(B)}}else mxUtils.write(B,mxResources.get("save")),B.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+ -"+S)"),mxEvent.addListener(B,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),y.appendChild(B),"1"==urlParams.saveAndExit&&(B=document.createElement("a"),mxUtils.write(B,mxResources.get("saveAndExit")),B.setAttribute("title",mxResources.get("saveAndExit")),B.className="geMenuItem",B.style.marginLeft="6px",B.style.padding="6px",mxEvent.addListener(B,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),y.appendChild(B));"1"!=urlParams.noExitBtn&&(B= -document.createElement("a"),J="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(B,J),B.setAttribute("title",J),B.className="geMenuItem",B.style.marginLeft="6px",B.style.padding="6px",mxEvent.addListener(B,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),y.appendChild(B));this.buttonContainer.appendChild(y);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var d=Sidebar.prototype.getTooltipOffset; -Sidebar.prototype.getTooltipOffset=function(y,B){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,y)){var J=mxUtils.getOffset(this.editorUi.picker);J.x+=this.editorUi.picker.offsetWidth+4;J.y+=y.offsetTop-B.height/2+16;return J}var N=d.apply(this,arguments);J=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);N.x+=J.x-16;N.y+=J.y;return N};var g=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(y,B,J){var N=this.editorUi.editor.graph; -y.smartSeparators=!0;g.apply(this,arguments);"1"==urlParams.sketch?N.isEnabled()&&(y.addSeparator(),1==N.getSelectionCount()&&this.addMenuItems(y,["-","lockUnlock"],null,J)):1==N.getSelectionCount()?(N.isCellFoldable(N.getSelectionCell())&&this.addMenuItems(y,N.isCellCollapsed(B)?["expand"]:["collapse"],null,J),this.addMenuItems(y,["collapsible","-","lockUnlock","enterGroup"],null,J),y.addSeparator(),this.addSubmenu("layout",y)):N.isSelectionEmpty()&&N.isEnabled()?(y.addSeparator(),this.addMenuItems(y, -["editData"],null,J),y.addSeparator(),this.addSubmenu("layout",y),this.addSubmenu("insert",y),this.addMenuItems(y,["-","exitGroup"],null,J)):N.isEnabled()&&this.addMenuItems(y,["-","lockUnlock"],null,J)};var k=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(y,B,J){k.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(y,["copyAsImage"],null,J)};EditorUi.prototype.toggleFormatPanel=function(y){null!=this.formatWindow?this.formatWindow.window.setVisible(null!= -y?y:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var n=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1), -this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow= -null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.window.setVisible(!1),this.menus.findReplaceWindow.window.destroy(),this.menus.findReplaceWindow=null);n.apply(this,arguments)};var t=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(y){t.apply(this,arguments);if(y){var B=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=B&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0); -null!=this.formatWindow&&(1E3<=B||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var p=Menus.prototype.init;Menus.prototype.init=function(){p.apply(this,arguments);var y=this.editorUi,B=y.editor.graph,J=y.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(K){y.setPagesVisible(!Editor.pagesVisible)})); -J.setToggleAction(!0);J.setSelectedCallback(function(){return Editor.pagesVisible});y.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){B.popupMenuHandler.hideMenu();y.showImportCsvDialog()}));y.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var K=new ParseDialog(y,"Insert from Text");y.showDialog(K.container,620,420,!0,!1);K.init()}));y.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var K=new ParseDialog(y,"Insert from Text", -"formatSql");y.showDialog(K.container,620,420,!0,!1);K.init()}));y.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){f(y)},null,null,Editor.ctrlKey+"+Shift+K"));J=y.actions.put("toggleFormat",new Action(mxResources.get("format"),function(){b(y)}));J.shortcut=y.actions.get("formatPanel").shortcut;J.setToggleAction(!0);J.setSelectedCallback(mxUtils.bind(this,function(){return null!=y.formatWindow&&y.formatWindow.window.isVisible()})); -EditorUi.enablePlantUml&&!y.isOffline()&&y.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var K=new ParseDialog(y,mxResources.get("plantUml")+"...","plantUml");y.showDialog(K.container,620,420,!0,!1);K.init()}));y.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var K=new ParseDialog(y,mxResources.get("mermaid")+"...","mermaid");y.showDialog(K.container,620,420,!0,!1);K.init()}));var N=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this, -function(K,I){var F=this.editorUi.editor.graph,P=F.getSelectionCell();N.call(this,K,P,null,I);this.addMenuItems(K,["editTooltip"],I);F.model.isVertex(P)&&this.addMenuItems(K,["editGeometry"],I);this.addMenuItems(K,["-","edit"],I)})));this.addPopupMenuCellEditItems=function(K,I,F,P){K.addSeparator();this.addSubmenu("editCell",K,P,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,function(K,I){var F=y.getCurrentFile();y.menus.addMenuItems(K,["new"],I);y.menus.addSubmenu("openFrom", -K,I);isLocalStorage&&this.addSubmenu("openRecent",K,I);K.addSeparator(I);y.menus.addMenuItems(K,["-","save"],I);null!=F&&F.constructor==DriveFile||y.menus.addMenuItems(K,["saveAs"],I);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||F.constructor==LocalFile&&null==F.fileHandle||y.menus.addMenuItems(K,["synchronize"],I);null!=F&&F.constructor==DriveFile?y.menus.addMenuItems(K,"- rename makeCopy - moveToFolder openFolder".split(" "),I):(y.menus.addMenuItems(K,["-","rename"],I),y.isOfflineApp()?navigator.onLine&& -"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(K,["upload"],I):y.menus.addMenuItems(K,["makeCopy"],I));null!=F&&F.isRevisionHistorySupported()&&y.menus.addMenuItems(K,["-","revisionHistory"],I);if(null!=F){if(null!=y.fileNode&&"1"!=urlParams.embedInline){var P=null!=F.getTitle()?F.getTitle():y.defaultFilename;(F.constructor==DriveFile&&null!=F.sync&&F.sync.isConnected()||!/(\.html)$/i.test(P)&&!/(\.svg)$/i.test(P))&&this.addMenuItems(K,["properties"],I)}F.constructor==DriveFile&& -y.menus.addMenuItems(K,["share"],I)}y.menus.addMenuItems(K,["-","autosave"],I)})));this.put("diagram",new Menu(mxUtils.bind(this,function(K,I){var F=y.getCurrentFile();y.menus.addSubmenu("extras",K,I,mxResources.get("preferences"));K.addSeparator(I);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)y.menus.addMenuItems(K,"new open - synchronize - save saveAs -".split(" "),I);else if("1"==urlParams.embed||y.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&y.menus.addMenuItems(K, -["-","save"],I);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||y.mode==App.MODE_ATLAS)y.menus.addMenuItems(K,["saveAndExit"],I),null!=F&&F.isRevisionHistorySupported()&&y.menus.addMenuItems(K,["revisionHistory"],I);K.addSeparator(I)}else y.mode==App.MODE_ATLAS?y.menus.addMenuItems(K,["save","synchronize","-"],I):"1"!=urlParams.noFileMenu&&("1"!=urlParams.sketch?(y.menus.addMenuItems(K,["new"],I),y.menus.addSubmenu("openFrom",K,I),isLocalStorage&&this.addSubmenu("openRecent", -K,I),K.addSeparator(I),null!=F&&(F.constructor==DriveFile&&y.menus.addMenuItems(K,["share"],I),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||F.constructor==LocalFile||y.menus.addMenuItems(K,["synchronize"],I)),K.addSeparator(I),y.menus.addSubmenu("save",K,I)):y.menus.addSubmenu("file",K,I));y.menus.addSubmenu("exportAs",K,I);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?y.menus.addMenuItems(K,["import"],I):"1"!=urlParams.noFileMenu&&y.menus.addSubmenu("importFrom",K,I);y.menus.addMenuItems(K,["-", -"findReplace"],I);y.commentsSupported()&&y.menus.addMenuItems(K,["comments","-"],I);y.menus.addMenuItems(K,["toggleFormat","layers","tags","-","pageSetup"],I);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||y.menus.addMenuItems(K,["print"],I);"1"!=urlParams.sketch&&null!=F&&null!=y.fileNode&&"1"!=urlParams.embedInline&&(F=null!=F.getTitle()?F.getTitle():y.defaultFilename,/(\.html)$/i.test(F)||/(\.svg)$/i.test(F)||this.addMenuItems(K,["-","properties"]));K.addSeparator(I);y.menus.addSubmenu("help", -K,I);"1"==urlParams.embed||y.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||y.mode==App.MODE_ATLAS)&&y.menus.addMenuItems(K,["-","exit"],I):"1"!=urlParams.noFileMenu&&y.menus.addMenuItems(K,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(K,I){var F=y.getCurrentFile();null!=F&&F.constructor==DriveFile?y.menus.addMenuItems(K,["save","makeCopy","-","rename","moveToFolder"],I):(y.menus.addMenuItems(K,["save","saveAs","-","rename"],I),y.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&& -"1"!=urlParams.lockdown&&this.addMenuItems(K,["upload"],I):y.menus.addMenuItems(K,["makeCopy"],I));y.menus.addMenuItems(K,["-","autosave"],I);null!=F&&F.isRevisionHistorySupported()&&y.menus.addMenuItems(K,["-","revisionHistory"],I)})));var v=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(K,I){v.funct(K,I);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||y.menus.addMenuItems(K,["publishLink"],I);y.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(K.addSeparator(I),y.menus.addSubmenu("embed", -K,I))})));var u=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(K,I){y.menus.addInsertTableCellItem(K,I)})));var G=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(K,I){G.funct(K,I);this.addMenuItems(K,["-","ruler","-","pageScale"],I)})));this.put("extras",new Menu(mxUtils.bind(this,function(K,I){null!=u&&y.menus.addSubmenu("language",K,I);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&y.mode!=App.MODE_ATLAS&&y.menus.addSubmenu("theme",K,I);y.menus.addSubmenu("units", -K,I);K.addSeparator(I);"1"!=urlParams.sketch&&y.menus.addMenuItems(K,["scrollbars","-","tooltips","copyConnect","collapseExpand"],I);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&y.mode!=App.MODE_ATLAS&&y.menus.addMenuItems(K,["-","showStartScreen","search","scratchpad"],I);K.addSeparator(I);"1"==urlParams.sketch&&y.menus.addMenuItems(K,["copyConnect","collapseExpand","tooltips","-"],I);EditorUi.isElectronApp&&y.menus.addMenuItems(K, -["-","spellCheck","autoBkp","drafts","-"],I);var F=y.getCurrentFile();null!=F&&F.isRealtimeEnabled()&&F.isRealtimeSupported()&&this.addMenuItems(K,["-","showRemoteCursors","shareCursor","-"],I);Graph.translateDiagram&&y.menus.addMenuItems(K,["diagramLanguage"],I);y.mode!=App.MODE_ATLAS&&y.menus.addMenuItem(K,"configuration",I);"1"!=urlParams.sketch&&!y.isOfflineApp()&&isLocalStorage&&y.mode!=App.MODE_ATLAS&&y.menus.addMenuItem(K,"plugins",I);K.addSeparator(I)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this, -function(K,I){y.menus.addMenuItems(K,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),I)})));mxUtils.bind(this,function(){var K=this.get("insert"),I=K.funct;K.funct=function(F,P){"1"==urlParams.sketch?(y.menus.addMenuItems(F,["toggleShapes"],P),y.menus.addSubmenu("table",F,P),F.addSeparator(P),y.insertTemplateEnabled&&!y.isOffline()&&y.menus.addMenuItems(F,["insertTemplate"],P),y.menus.addMenuItems(F,["insertImage","insertLink","-"],P),y.menus.addSubmenu("insertAdvanced", -F,P,mxResources.get("advanced")),y.menus.addSubmenu("layout",F,P)):(I.apply(this,arguments),y.menus.addSubmenu("table",F,P))}})();var H="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),M=function(K,I,F,P){K.addItem(F,null,mxUtils.bind(this,function(){var U=new CreateGraphDialog(y,F,P);y.showDialog(U.container,620,420,!0,!1);U.init()}),I)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(K,I){for(var F=0;F<H.length;F++)"-"==H[F]?K.addSeparator(I): -M(K,I,mxResources.get(H[F])+"...",H[F])})))};EditorUi.prototype.installFormatToolbar=function(y){var B=this.editor.graph,J=document.createElement("div");J.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";B.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(N,v){0<B.getSelectionCount()?(y.appendChild(J),J.innerHTML="Selected: "+ -B.getSelectionCount()):null!=J.parentNode&&J.parentNode.removeChild(J)}))};var A=!1;EditorUi.prototype.initFormatWindow=function(){if(!A&&null!=this.formatWindow){A=!0;var y=this.formatWindow.window.toggleMinimized,B=240;this.formatWindow.window.toggleMinimized=function(){y.apply(this,arguments);this.minimized?(B=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+B-140+"px"):(this.div.style.width=B+"px",this.table.style.width= -this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-B+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(J){mxEvent.getSource(J)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var E=EditorUi.prototype.init;EditorUi.prototype.init=function(){function y(da,ca,na){var ea=u.menus.get(da),ia=K.addMenu(mxResources.get(da),mxUtils.bind(this,function(){ea.funct.apply(this,arguments)}), -M);ia.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ia.style.display="inline-block";ia.style.boxSizing="border-box";ia.style.top="6px";ia.style.marginRight="6px";ia.style.height="30px";ia.style.paddingTop="6px";ia.style.paddingBottom="6px";ia.style.cursor="pointer";ia.setAttribute("title",mxResources.get(da));u.menus.menuCreated(ea,ia,"geMenuItem");null!=na?(ia.style.backgroundImage="url("+na+")",ia.style.backgroundPosition="center center",ia.style.backgroundRepeat="no-repeat",ia.style.backgroundSize= -"24px 24px",ia.style.width="34px",ia.innerText=""):ca||(ia.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",ia.style.backgroundPosition="right 6px center",ia.style.backgroundRepeat="no-repeat",ia.style.paddingRight="22px");return ia}function B(da,ca,na,ea,ia,oa){var ma=document.createElement("a");ma.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ma.style.display="inline-block";ma.style.boxSizing="border-box";ma.style.height="30px";ma.style.padding="6px";ma.style.position= -"relative";ma.style.verticalAlign="top";ma.style.top="0px";"1"==urlParams.sketch&&(ma.style.borderStyle="none",ma.style.boxShadow="none",ma.style.padding="6px",ma.style.margin="0px");null!=u.statusContainer?H.insertBefore(ma,u.statusContainer):H.appendChild(ma);null!=oa?(ma.style.backgroundImage="url("+oa+")",ma.style.backgroundPosition="center center",ma.style.backgroundRepeat="no-repeat",ma.style.backgroundSize="24px 24px",ma.style.width="34px"):mxUtils.write(ma,da);mxEvent.addListener(ma,mxClient.IS_POINTER? -"pointerdown":"mousedown",mxUtils.bind(this,function(xa){xa.preventDefault()}));mxEvent.addListener(ma,"click",function(xa){"disabled"!=ma.getAttribute("disabled")&&ca(xa);mxEvent.consume(xa)});null==na&&(ma.style.marginRight="4px");null!=ea&&ma.setAttribute("title",ea);null!=ia&&(da=function(){ia.isEnabled()?(ma.removeAttribute("disabled"),ma.style.cursor="pointer"):(ma.setAttribute("disabled","disabled"),ma.style.cursor="default")},ia.addListener("stateChanged",da),G.addListener("enabledChanged", -da),da());return ma}function J(da,ca,na){na=document.createElement("div");na.className="geMenuItem";na.style.display="inline-block";na.style.verticalAlign="top";na.style.marginRight="6px";na.style.padding="0 4px 0 4px";na.style.height="30px";na.style.position="relative";na.style.top="0px";"1"==urlParams.sketch&&(na.style.boxShadow="none");for(var ea=0;ea<da.length;ea++)null!=da[ea]&&("1"==urlParams.sketch&&(da[ea].style.padding="10px 8px",da[ea].style.width="30px"),da[ea].style.margin="0px",da[ea].style.boxShadow= -"none",na.appendChild(da[ea]));null!=ca&&mxUtils.setOpacity(na,ca);null!=u.statusContainer&&"1"!=urlParams.sketch?H.insertBefore(na,u.statusContainer):H.appendChild(na);return na}function N(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(D.style.left=58>q.offsetTop-q.offsetHeight/2?"70px":"10px");else{for(var da=H.firstChild;null!=da;){var ca=da.nextSibling;"geMenuItem"!=da.className&&"geItem"!=da.className||da.parentNode.removeChild(da);da=ca}M=H.firstChild;c=window.innerWidth||document.documentElement.clientWidth|| -document.body.clientWidth;da=1E3>c||"1"==urlParams.sketch;var na=null;da||(na=y("diagram"));ca=da?y("diagram",null,Editor.menuImage):null;null!=ca&&(na=ca);J([na,B(mxResources.get("shapes"),u.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),u.actions.get("image"),da?Editor.shapesImage:null),B(mxResources.get("format"),u.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+u.actions.get("formatPanel").shortcut+")",u.actions.get("image"),da?Editor.formatImage:null)], -da?60:null);ca=y("insert",!0,da?V:null);J([ca,B(mxResources.get("delete"),u.actions.get("delete").funct,null,mxResources.get("delete"),u.actions.get("delete"),da?Editor.trashImage:null)],da?60:null);411<=c&&(J([Ga,Aa],60),520<=c&&J([wa,640<=c?B("",ha.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",ha,Editor.zoomInImage):null,640<=c?B("",ra.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",ra,Editor.zoomOutImage):null],60))}null!=na&&(mxEvent.disableContextMenu(na),mxEvent.addGestureListeners(na, -mxUtils.bind(this,function(ea){(mxEvent.isShiftDown(ea)||mxEvent.isAltDown(ea)||mxEvent.isMetaDown(ea)||mxEvent.isControlDown(ea)||mxEvent.isPopupTrigger(ea))&&u.appIconClicked(ea)}),null,null));ca=u.menus.get("language");null!=ca&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=c&&"1"!=urlParams.sketch?(null==ya&&(ca=K.addMenu("",ca.funct),ca.setAttribute("title",mxResources.get("language")),ca.className="geToolbarButton",ca.style.backgroundImage="url("+Editor.globeImage+")",ca.style.backgroundPosition= -"center center",ca.style.backgroundRepeat="no-repeat",ca.style.backgroundSize="24px 24px",ca.style.position="absolute",ca.style.height="24px",ca.style.width="24px",ca.style.zIndex="1",ca.style.right="8px",ca.style.cursor="pointer",ca.style.top="1"==urlParams.embed?"12px":"11px",H.appendChild(ca),ya=ca),u.buttonContainer.style.paddingRight="34px"):(u.buttonContainer.style.paddingRight="4px",null!=ya&&(ya.parentNode.removeChild(ya),ya=null))}E.apply(this,arguments);var v=document.createElement("div"); -v.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";v.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(v);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search)); -if("1"!=urlParams.sketch&&1E3<=c||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])f(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var u=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==u.embedViewport)mxUtils.fit(this.div);else{var da=parseInt(this.div.offsetLeft),ca=parseInt(this.div.offsetWidth),na=u.embedViewport.x+ -u.embedViewport.width,ea=parseInt(this.div.offsetTop),ia=parseInt(this.div.offsetHeight),oa=u.embedViewport.y+u.embedViewport.height;this.div.style.left=Math.max(u.embedViewport.x,Math.min(da,na-ca))+"px";this.div.style.top=Math.max(u.embedViewport.y,Math.min(ea,oa-ia))+"px";this.div.style.height=Math.min(u.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(u.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes", -!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=c)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),v=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>c||708>v)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));u=this;var G=u.editor.graph;u.toolbar=this.createToolbar(u.createDiv("geToolbar"));u.defaultLibraryName= -mxResources.get("untitledLibrary");var H=document.createElement("div");H.className="geMenubarContainer";var M=null,K=new Menubar(u,H);u.statusContainer=u.createStatusContainer();u.statusContainer.style.position="relative";u.statusContainer.style.maxWidth="";u.statusContainer.style.marginTop="7px";u.statusContainer.style.marginLeft="6px";u.statusContainer.style.color="gray";u.statusContainer.style.cursor="default";var I=u.hideCurrentMenu;u.hideCurrentMenu=function(){I.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()}; -var F=u.descriptorChanged;u.descriptorChanged=function(){F.apply(this,arguments);var da=u.getCurrentFile();if(null!=da&&null!=da.getTitle()){var ca=da.getMode();"google"==ca?ca="googleDrive":"github"==ca?ca="gitHub":"gitlab"==ca?ca="gitLab":"onedrive"==ca&&(ca="oneDrive");ca=mxResources.get(ca);H.setAttribute("title",da.getTitle()+(null!=ca?" ("+ca+")":""))}else H.removeAttribute("title")};u.setStatusText(u.editor.getStatus());H.appendChild(u.statusContainer);u.buttonContainer=document.createElement("div"); -u.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";H.appendChild(u.buttonContainer);u.menubarContainer=u.buttonContainer;u.tabContainer=document.createElement("div");u.tabContainer.className="geTabContainer";u.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";v=u.diagramContainer.parentNode;var P=document.createElement("div"); -P.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";u.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){P.style.top="20px";u.titlebar=document.createElement("div");u.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var U=document.createElement("div");U.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;"; -u.titlebar.appendChild(U);v.appendChild(u.titlebar)}U=u.menus.get("viewZoom");var T=U.funct;U.funct=function(da,ca){T.apply(this,arguments);u.menus.addMenuItems(da,["-","outline","fullscreen"],ca)};var V="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,W="1"==urlParams.sketch?document.createElement("div"):null,q="1"==urlParams.sketch?document.createElement("div"):null,D="1"==urlParams.sketch?document.createElement("div"):null,L=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)D.style.left= -"10px",D.style.top="10px",q.style.left="10px",q.style.top="60px",W.style.top="10px",W.style.right="12px",W.style.left="",u.diagramContainer.setAttribute("data-bounds",u.diagramContainer.style.top+" "+u.diagramContainer.style.left+" "+u.diagramContainer.style.width+" "+u.diagramContainer.style.height),u.diagramContainer.style.top="0px",u.diagramContainer.style.left="0px",u.diagramContainer.style.bottom="0px",u.diagramContainer.style.right="0px",u.diagramContainer.style.width="",u.diagramContainer.style.height= -"";else{var da=u.diagramContainer.getAttribute("data-bounds");if(null!=da){u.diagramContainer.style.background="transparent";u.diagramContainer.removeAttribute("data-bounds");var ca=G.getGraphBounds();da=da.split(" ");u.diagramContainer.style.top=da[0];u.diagramContainer.style.left=da[1];u.diagramContainer.style.width=ca.width+50+"px";u.diagramContainer.style.height=ca.height+46+"px";u.diagramContainer.style.bottom="";u.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize", -rect:u.diagramContainer.getBoundingClientRect()}),"*");u.refresh()}D.style.left=u.diagramContainer.offsetLeft+"px";D.style.top=u.diagramContainer.offsetTop-D.offsetHeight-4+"px";q.style.display="";q.style.left=u.diagramContainer.offsetLeft-q.offsetWidth-4+"px";q.style.top=u.diagramContainer.offsetTop+"px";W.style.left=u.diagramContainer.offsetLeft+u.diagramContainer.offsetWidth-W.offsetWidth+"px";W.style.top=D.style.top;W.style.right="";u.bottomResizer.style.left=u.diagramContainer.offsetLeft+(u.diagramContainer.offsetWidth- -u.bottomResizer.offsetWidth)/2+"px";u.bottomResizer.style.top=u.diagramContainer.offsetTop+u.diagramContainer.offsetHeight-u.bottomResizer.offsetHeight/2-1+"px";u.rightResizer.style.left=u.diagramContainer.offsetLeft+u.diagramContainer.offsetWidth-u.rightResizer.offsetWidth/2-1+"px";u.rightResizer.style.top=u.diagramContainer.offsetTop+(u.diagramContainer.offsetHeight-u.bottomResizer.offsetHeight)/2+"px"}u.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";u.rightResizer.style.visibility= -u.bottomResizer.style.visibility;H.style.display="none";D.style.visibility="";W.style.visibility=""}),R=u.actions.get("fullscreen"),O=B("",R.funct,null,mxResources.get(""),R,Editor.fullscreenImage),Q=mxUtils.bind(this,function(){O.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";L()});R=mxUtils.bind(this,function(){b(u, -!0);u.initFormatWindow();var da=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(da.x+da.width+4,da.y);Q()});u.addListener("inlineFullscreenChanged",Q);u.addListener("editInlineStart",R);"1"==urlParams.embedInline&&u.addListener("darkModeChanged",R);u.addListener("editInlineStop",mxUtils.bind(this,function(da){u.diagramContainer.style.width="10px";u.diagramContainer.style.height="10px";u.diagramContainer.style.border="";u.bottomResizer.style.visibility="hidden";u.rightResizer.style.visibility= -"hidden";D.style.visibility="hidden";W.style.visibility="hidden";q.style.display="none"}));if(null!=u.hoverIcons){var S=u.hoverIcons.update;u.hoverIcons.update=function(){G.freehand.isDrawing()||S.apply(this,arguments)}}if(null!=G.freehand){var X=G.freehand.createStyle;G.freehand.createStyle=function(da){return X.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){q.className="geToolbarContainer";W.className="geToolbarContainer";D.className="geToolbarContainer";H.className="geToolbarContainer"; -u.picker=q;var aa=!1;"1"!=urlParams.embed&&"atlassian"!=u.getServiceName()&&(mxEvent.addListener(H,"mouseenter",function(){u.statusContainer.style.display="inline-block"}),mxEvent.addListener(H,"mouseleave",function(){aa||(u.statusContainer.style.display="none")}));var Y=mxUtils.bind(this,function(da){null!=u.notificationBtn&&(null!=da?u.notificationBtn.setAttribute("title",da):u.notificationBtn.removeAttribute("title"))});H.style.visibility=20>H.clientWidth?"hidden":"";u.editor.addListener("statusChanged", -mxUtils.bind(this,function(){u.setStatusText(u.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=u.getServiceName())if(u.statusContainer.style.display="inline-block",aa=!0,1==u.statusContainer.children.length&&""==u.editor.getStatus())H.style.visibility="hidden";else{if(0==u.statusContainer.children.length||1==u.statusContainer.children.length&&"function"===typeof u.statusContainer.firstChild.getAttribute&&null==u.statusContainer.firstChild.getAttribute("class")){var da=null!=u.statusContainer.firstChild&& -"function"===typeof u.statusContainer.firstChild.getAttribute?u.statusContainer.firstChild.getAttribute("title"):u.editor.getStatus();Y(da);var ca=u.getCurrentFile();ca=null!=ca?ca.savingStatusKey:DrawioFile.prototype.savingStatusKey;da==mxResources.get(ca)+"..."?(u.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(ca))+'..."src="'+Editor.tailSpin+'">',u.statusContainer.style.display="inline-block",aa=!0):6<u.buttonContainer.clientWidth&&(u.statusContainer.style.display= -"none",aa=!1)}else u.statusContainer.style.display="inline-block",Y(null),aa=!0;H.style.visibility=20>H.clientWidth&&!aa?"hidden":""}}));qa=y("diagram",null,Editor.menuImage);qa.style.boxShadow="none";qa.style.padding="6px";qa.style.margin="0px";D.appendChild(qa);mxEvent.disableContextMenu(qa);mxEvent.addGestureListeners(qa,mxUtils.bind(this,function(da){(mxEvent.isShiftDown(da)||mxEvent.isAltDown(da)||mxEvent.isMetaDown(da)||mxEvent.isControlDown(da)||mxEvent.isPopupTrigger(da))&&this.appIconClicked(da)}), -null,null);u.statusContainer.style.position="";u.statusContainer.style.display="none";u.statusContainer.style.margin="0px";u.statusContainer.style.padding="6px 0px";u.statusContainer.style.maxWidth=Math.min(c-240,280)+"px";u.statusContainer.style.display="inline-block";u.statusContainer.style.textOverflow="ellipsis";u.buttonContainer.style.position="";u.buttonContainer.style.paddingRight="0px";u.buttonContainer.style.display="inline-block";var Z=document.createElement("a");Z.style.padding="0px";Z.style.boxShadow= -"none";Z.className="geMenuItem";Z.style.display="inline-block";Z.style.width="40px";Z.style.height="12px";Z.style.marginBottom="-2px";Z.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";Z.style.backgroundPosition="top center";Z.style.backgroundRepeat="no-repeat";Z.setAttribute("title","Minimize");var ba=!1,fa=mxUtils.bind(this,function(){q.innerText="";if(!ba){var da=function(ca,na,ea,ia){null!=na&&ca.setAttribute("title",na);ca.style.cursor=null!=ea?ea:"default";ca.style.margin= -"2px 0px";q.appendChild(ca);mxUtils.br(q);null!=ia&&(ca.style.position="relative",ca.style.overflow="visible",na=document.createElement("div"),na.style.position="absolute",na.style.left="34px",na.style.top="28px",na.style.fontSize="8px",mxUtils.write(na,ia),ca.appendChild(na));return ca};da(u.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+ -" (A)",null,"A");da(u.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");da(u.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)", -!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");da(u.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");(function(){var ca=new mxCell("",new mxGeometry(0,0,G.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");ca.geometry.setTerminalPoint(new mxPoint(0,0),!0);ca.geometry.setTerminalPoint(new mxPoint(ca.geometry.width,0),!1);ca.geometry.points= -[];ca.geometry.relative=!0;ca.edge=!0;da(u.sidebar.createEdgeTemplateFromCells([ca],ca.geometry.width,ca.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");ca=ca.clone();ca.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";ca.geometry.width=G.defaultEdgeLength+20;ca.geometry.setTerminalPoint(new mxPoint(0,20),!0);ca.geometry.setTerminalPoint(new mxPoint(ca.geometry.width,20),!1);da(u.sidebar.createEdgeTemplateFromCells([ca], -ca.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"))})();(function(ca,na,ea,ia){ca=B("",ca.funct,null,na,ca,ea);ca.style.width="40px";ca.style.height="34px";ca.style.opacity="0.7";return da(ca,null,"pointer",ia)})(u.actions.get("insertFreehand"),mxResources.get("freehand")+" (X)",Editor.freehandImage,"X");qa=y("insert",null,Editor.plusImage);qa.style.boxShadow="none";qa.style.opacity="0.7";qa.style.padding="6px";qa.style.margin="0px";qa.style.height="34px";qa.style.width= -"37px";da(qa,null,"pointer")}"1"!=urlParams.embedInline&&q.appendChild(Z)});mxEvent.addListener(Z,"click",mxUtils.bind(this,function(){ba?(mxUtils.setPrefixedStyle(q.style,"transform","translate(0, -50%)"),q.style.padding="8px 6px 4px",q.style.top="50%",q.style.bottom="",q.style.height="",Z.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Z.style.width="40px",Z.style.height="12px",Z.setAttribute("title","Minimize"),ba=!1,fa()):(q.innerText="",q.appendChild(Z),mxUtils.setPrefixedStyle(q.style, -"transform","translate(0, 0)"),q.style.top="",q.style.bottom="12px",q.style.padding="0px",q.style.height="24px",Z.style.height="24px",Z.style.backgroundImage="url("+Editor.plusImage+")",Z.setAttribute("title",mxResources.get("insert")),Z.style.width="24px",ba=!0)}));fa();u.addListener("darkModeChanged",fa);u.addListener("sketchModeChanged",fa)}else u.editor.addListener("statusChanged",mxUtils.bind(this,function(){u.setStatusText(u.editor.getStatus())}));if(null!=U){var ka=function(da){if(mxEvent.isAltDown(da))u.hideCurrentMenu(), -u.actions.get("customZoom").funct(),mxEvent.consume(da);else if("geItem"!=mxEvent.getSource(da).className||mxEvent.isShiftDown(da))u.hideCurrentMenu(),u.actions.get("smartFit").funct(),mxEvent.consume(da)},ha=u.actions.get("zoomIn"),ra=u.actions.get("zoomOut");R=u.actions.get("resetView");var la=u.actions.get("undo"),Fa=u.actions.get("redo"),Ga=B("",la.funct,null,mxResources.get("undo")+" ("+la.shortcut+")",la,Editor.undoImage),Aa=B("",Fa.funct,null,mxResources.get("redo")+" ("+Fa.shortcut+")",Fa, -Editor.redoImage);if(null!=W){R=function(){pa.style.display=null!=u.pages&&("0"!=urlParams.pages||1<u.pages.length||Editor.pagesVisible)?"inline-block":"none"};var Ma=function(){pa.innerText="";if(null!=u.currentPage){mxUtils.write(pa,u.currentPage.getName());var da=null!=u.pages?u.pages.length:1,ca=u.getPageIndex(u.currentPage);ca=null!=ca?ca+1:1;var na=u.currentPage.getId();pa.setAttribute("title",u.currentPage.getName()+" ("+ca+"/"+da+")"+(null!=na?" ["+na+"]":""))}},za=u.actions.get("delete"), -Da=B("",za.funct,null,mxResources.get("delete"),za,Editor.trashImage);Da.style.opacity="0.1";D.appendChild(Da);za.addListener("stateChanged",function(){Da.style.opacity=za.enabled?"":"0.1"});var Ca=function(){Ga.style.display=0<u.editor.undoManager.history.length||G.isEditing()?"inline-block":"none";Aa.style.display=Ga.style.display;Ga.style.opacity=la.enabled?"":"0.1";Aa.style.opacity=Fa.enabled?"":"0.1"};D.appendChild(Ga);D.appendChild(Aa);la.addListener("stateChanged",Ca);Fa.addListener("stateChanged", -Ca);Ca();var pa=this.createPageMenuTab(!1,!0);pa.style.display="none";pa.style.position="";pa.style.marginLeft="";pa.style.top="";pa.style.left="";pa.style.height="100%";pa.style.lineHeight="";pa.style.borderStyle="none";pa.style.padding="3px 0";pa.style.margin="0px";pa.style.background="";pa.style.border="";pa.style.boxShadow="none";pa.style.verticalAlign="top";pa.style.width="auto";pa.style.maxWidth="160px";pa.style.position="relative";pa.style.padding="6px";pa.style.textOverflow="ellipsis";pa.style.opacity= -"0.8";W.appendChild(pa);u.editor.addListener("pagesPatched",Ma);u.editor.addListener("pageSelected",Ma);u.editor.addListener("pageRenamed",Ma);u.editor.addListener("fileLoaded",Ma);Ma();u.addListener("fileDescriptorChanged",R);u.addListener("pagesVisibleChanged",R);u.editor.addListener("pagesPatched",R);R();R=B("",ra.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",ra,Editor.zoomOutImage);W.appendChild(R);var qa=K.addMenu("100%",U.funct);qa.setAttribute("title",mxResources.get("zoom")); -qa.innerHTML="100%";qa.style.display="inline-block";qa.style.color="inherit";qa.style.cursor="pointer";qa.style.textAlign="center";qa.style.whiteSpace="nowrap";qa.style.paddingRight="10px";qa.style.textDecoration="none";qa.style.verticalAlign="top";qa.style.padding="6px 0";qa.style.fontSize="14px";qa.style.width="40px";qa.style.opacity="0.4";W.appendChild(qa);U=B("",ha.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",ha,Editor.zoomInImage);W.appendChild(U);"1"==urlParams.embedInline? -(W.appendChild(O),U=u.actions.get("exit"),W.appendChild(B("",U.funct,null,mxResources.get("exit"),U,Editor.closeImage))):O.parentNode.removeChild(O);u.tabContainer.style.visibility="hidden";H.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";D.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;"; -W.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";P.appendChild(D);P.appendChild(W);q.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";mxClient.IS_POINTER&&(q.style.touchAction="none");P.appendChild(q);window.setTimeout(function(){mxUtils.setPrefixedStyle(q.style, -"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(P)}else{var wa=B("",ka,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",R,Editor.zoomFitImage);H.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";qa=K.addMenu("100%",U.funct);qa.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");qa.style.whiteSpace="nowrap";qa.style.paddingRight= -"10px";qa.style.textDecoration="none";qa.style.textDecoration="none";qa.style.overflow="hidden";qa.style.visibility="hidden";qa.style.textAlign="center";qa.style.cursor="pointer";qa.style.height=parseInt(u.tabContainerHeight)-1+"px";qa.style.lineHeight=parseInt(u.tabContainerHeight)+1+"px";qa.style.position="absolute";qa.style.display="block";qa.style.fontSize="12px";qa.style.width="59px";qa.style.right="0px";qa.style.bottom="0px";qa.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")"; -qa.style.backgroundPosition="right 6px center";qa.style.backgroundRepeat="no-repeat";P.appendChild(qa)}(function(da){mxEvent.addListener(da,"click",ka);var ca=mxUtils.bind(this,function(){da.innerText="";mxUtils.write(da,Math.round(100*u.editor.graph.view.scale)+"%")});u.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ca);u.editor.addListener("resetGraphView",ca);u.editor.addListener("pageSelected",ca)})(qa);var Ha=u.setGraphEnabled;u.setGraphEnabled=function(){Ha.apply(this,arguments);null!=this.tabContainer&& -(qa.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==W?this.tabContainerHeight+"px":"0px")}}P.appendChild(H);P.appendChild(u.diagramContainer);v.appendChild(P);u.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=c)&&"1"!=urlParams.embedInline&&b(this,!0);null==W&&P.appendChild(u.tabContainer);var ya=null;N();mxEvent.addListener(window,"resize",function(){N();null!=u.sidebarWindow&&u.sidebarWindow.window.fit(); -null!=u.formatWindow&&u.formatWindow.window.fit();null!=u.actions.outlineWindow&&u.actions.outlineWindow.window.fit();null!=u.actions.layersWindow&&u.actions.layersWindow.window.fit();null!=u.menus.tagsWindow&&u.menus.tagsWindow.window.fit();null!=u.menus.findWindow&&u.menus.findWindow.window.fit();null!=u.menus.findReplaceWindow&&u.menus.findReplaceWindow.window.fit()});if("1"==urlParams.embedInline){document.body.style.cursor="text";q.style.transform="";mxEvent.addGestureListeners(u.diagramContainer.parentNode, -function(da){mxEvent.getSource(da)==u.diagramContainer.parentNode&&(u.embedExitPoint=new mxPoint(mxEvent.getClientX(da),mxEvent.getClientY(da)),u.sendEmbeddedSvgExport())});v=document.createElement("div");v.style.position="absolute";v.style.width="10px";v.style.height="10px";v.style.borderRadius="5px";v.style.border="1px solid gray";v.style.background="#ffffff";v.style.cursor="row-resize";u.diagramContainer.parentNode.appendChild(v);u.bottomResizer=v;var Ia=null,ja=null,va=null,ta=null;mxEvent.addGestureListeners(v, -function(da){ta=parseInt(u.diagramContainer.style.height);ja=mxEvent.getClientY(da);G.popupMenuHandler.hideMenu();mxEvent.consume(da)});v=v.cloneNode(!1);v.style.cursor="col-resize";u.diagramContainer.parentNode.appendChild(v);u.rightResizer=v;mxEvent.addGestureListeners(v,function(da){va=parseInt(u.diagramContainer.style.width);Ia=mxEvent.getClientX(da);G.popupMenuHandler.hideMenu();mxEvent.consume(da)});mxEvent.addGestureListeners(document.body,null,function(da){var ca=!1;null!=Ia&&(u.diagramContainer.style.width= -Math.max(20,va+mxEvent.getClientX(da)-Ia)+"px",ca=!0);null!=ja&&(u.diagramContainer.style.height=Math.max(20,ta+mxEvent.getClientY(da)-ja)+"px",ca=!0);ca&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:u.diagramContainer.getBoundingClientRect()}),"*"),L(),u.refresh())},function(da){null==Ia&&null==ja||mxEvent.consume(da);ja=Ia=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent"; -u.bottomResizer.style.visibility="hidden";u.rightResizer.style.visibility="hidden";D.style.visibility="hidden";W.style.visibility="hidden";q.style.display="none"}"1"==urlParams.prefetchFonts&&u.editor.loadFonts()}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(c,l,m,x){var z=l.y,C=l.x,d=!1,g=!1;if(null!=this.states&&null!=c&&null!=l){var k=this,n=new mxCellState,t=this.graph.getView().scale,p=Math.max(2,this.getGuideTolerance()/2);n.x=c.x+C;n.y=c.y+z;n.width=c.width;n.height=c.height;for(var A=[],E=[],y=0;y<this.states.length;y++){var B=this.states[y];B instanceof mxCellState&&(x||!this.graph.isCellSelected(B.cell))&&((n.x>=B.x&&n.x<=B.x+B.width||B.x>=n.x&&B.x<=n.x+n.width)&&(n.y> -B.y+B.height+4||n.y+n.height+4<B.y)?A.push(B):(n.y>=B.y&&n.y<=B.y+B.height||B.y>=n.y&&B.y<=n.y+n.height)&&(n.x>B.x+B.width+4||n.x+n.width+4<B.x)&&E.push(B))}var J=0,N=0,v=B=0,u=0,G=0,H=0,M=0,K=5*t;if(1<A.length){A.push(n);A.sort(function(U,T){return U.y-T.y});var I=!1;y=n==A[0];t=n==A[A.length-1];if(!y&&!t)for(y=1;y<A.length-1;y++)if(n==A[y]){t=A[y-1];y=A[y+1];B=N=v=(y.y-t.y-t.height-n.height)/2;break}for(y=0;y<A.length-1;y++){t=A[y];var F=A[y+1],P=n==t||n==F;F=F.y-t.y-t.height;I|=n==t;if(0==N&&0== -J)N=F,J=1;else if(Math.abs(N-F)<=(P||1==y&&I?p:0))J+=1;else if(1<J&&I){A=A.slice(0,y+1);break}else if(3<=A.length-y&&!I)J=0,B=N=0!=v?v:0,A.splice(0,0==y?1:y),y=-1;else break;0!=B||P||(N=B=F)}3==A.length&&A[1]==n&&(B=0)}if(1<E.length){E.push(n);E.sort(function(U,T){return U.x-T.x});I=!1;y=n==E[0];t=n==E[E.length-1];if(!y&&!t)for(y=1;y<E.length-1;y++)if(n==E[y]){t=E[y-1];y=E[y+1];H=G=M=(y.x-t.x-t.width-n.width)/2;break}for(y=0;y<E.length-1;y++){t=E[y];F=E[y+1];P=n==t||n==F;F=F.x-t.x-t.width;I|=n==t; -if(0==G&&0==u)G=F,u=1;else if(Math.abs(G-F)<=(P||1==y&&I?p:0))u+=1;else if(1<u&&I){E=E.slice(0,y+1);break}else if(3<=E.length-y&&!I)u=0,H=G=0!=M?M:0,E.splice(0,0==y?1:y),y=-1;else break;0!=H||P||(G=H=F)}3==E.length&&E[1]==n&&(H=0)}p=function(U,T,V,W){var q=[];if(W){W=K;var D=0}else W=0,D=K;q.push(new mxPoint(U.x-W,U.y-D));q.push(new mxPoint(U.x+W,U.y+D));q.push(U);q.push(T);q.push(new mxPoint(T.x-W,T.y-D));q.push(new mxPoint(T.x+W,T.y+D));if(null!=V)return V.points=q,V;U=new mxPolyline(q,mxConstants.GUIDE_COLOR, -mxConstants.GUIDE_STROKEWIDTH);U.dialect=mxConstants.DIALECT_SVG;U.pointerEvents=!1;U.init(k.graph.getView().getOverlayPane());return U};G=function(U,T){if(U&&null!=k.guidesArrHor)for(U=0;U<k.guidesArrHor.length;U++)k.guidesArrHor[U].node.style.visibility="hidden";if(T&&null!=k.guidesArrVer)for(U=0;U<k.guidesArrVer.length;U++)k.guidesArrVer[U].node.style.visibility="hidden"};if(1<u&&u==E.length-1){u=[];M=k.guidesArrHor;d=[];C=0;y=E[0]==n?1:0;I=E[y].y+E[y].height;if(0<H)for(y=0;y<E.length-1;y++)t= -E[y],F=E[y+1],n==t?(C=F.x-t.width-H,d.push(new mxPoint(C+t.width+K,I)),d.push(new mxPoint(F.x-K,I))):n==F?(d.push(new mxPoint(t.x+t.width+K,I)),C=t.x+t.width+H,d.push(new mxPoint(C-K,I))):(d.push(new mxPoint(t.x+t.width+K,I)),d.push(new mxPoint(F.x-K,I)));else t=E[0],y=E[2],C=t.x+t.width+(y.x-t.x-t.width-n.width)/2,d.push(new mxPoint(t.x+t.width+K,I)),d.push(new mxPoint(C-K,I)),d.push(new mxPoint(C+n.width+K,I)),d.push(new mxPoint(y.x-K,I));for(y=0;y<d.length;y+=2)E=d[y],H=d[y+1],E=p(E,H,null!=M? -M[y/2]:null),E.node.style.visibility="visible",E.redraw(),u.push(E);for(y=d.length/2;null!=M&&y<M.length;y++)M[y].destroy();k.guidesArrHor=u;C-=c.x;d=!0}else G(!0);if(1<J&&J==A.length-1){u=[];M=k.guidesArrVer;g=[];z=0;y=A[0]==n?1:0;J=A[y].x+A[y].width;if(0<B)for(y=0;y<A.length-1;y++)t=A[y],F=A[y+1],n==t?(z=F.y-t.height-B,g.push(new mxPoint(J,z+t.height+K)),g.push(new mxPoint(J,F.y-K))):n==F?(g.push(new mxPoint(J,t.y+t.height+K)),z=t.y+t.height+B,g.push(new mxPoint(J,z-K))):(g.push(new mxPoint(J,t.y+ -t.height+K)),g.push(new mxPoint(J,F.y-K)));else t=A[0],y=A[2],z=t.y+t.height+(y.y-t.y-t.height-n.height)/2,g.push(new mxPoint(J,t.y+t.height+K)),g.push(new mxPoint(J,z-K)),g.push(new mxPoint(J,z+n.height+K)),g.push(new mxPoint(J,y.y-K));for(y=0;y<g.length;y+=2)E=g[y],H=g[y+1],E=p(E,H,null!=M?M[y/2]:null,!0),E.node.style.visibility="visible",E.redraw(),u.push(E);for(y=g.length/2;null!=M&&y<M.length;y++)M[y].destroy();k.guidesArrVer=u;z-=c.y;g=!0}else G(!1,!0)}if(d||g)return n=new mxPoint(C,z),A=b.call(this, +this.getCurrentFile()||"1"==urlParams.embed)};var x=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(z,B){null!=B.shortcut&&900>c&&!mxClient.IS_IOS?z.firstChild.nextSibling.setAttribute("title",B.shortcut):x.apply(this,arguments)};var y=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){y.apply(this,arguments);if(null!=this.userElement){var z=this.userElement;z.style.cssText="position:relative;cursor:pointer;display:"+z.style.display;z.className="geToolbarButton"; +z.innerText="";z.style.backgroundImage="url("+Editor.userImage+")";z.style.backgroundPosition="center center";z.style.backgroundRepeat="no-repeat";z.style.backgroundSize="24px 24px";z.style.height="24px";z.style.width="24px";var B=mxResources.get("changeUser");if("none"!=z.style.display){z.style.display="inline-block";var J=this.getCurrentFile();if(null!=J&&J.isRealtimeEnabled()&&J.isRealtimeSupported()){var M=document.createElement("img");M.setAttribute("border","0");M.style.position="absolute"; +M.style.left="18px";M.style.top="2px";M.style.width="12px";M.style.height="12px";var v=J.getRealtimeError();J=J.getRealtimeState();B+=" ("+mxResources.get("realtimeCollaboration");1==J?(M.src=Editor.syncImage,B+=mxResources.get("online")):(M.src=Editor.syncProblemImage,B=null!=v&&null!=v.message?B+v.message:B+mxResources.get("disconnected"));z.style.marginRight="6px";z.appendChild(M);B+=")"}}z.setAttribute("title",B)}};var D=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer= +function(){D.apply(this,arguments);null!=this.shareButton&&(this.shareButton.style.display="none")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var z=document.createElement("div");z.style.display="inline-block";z.style.position="relative";z.style.marginTop="6px";z.style.marginRight="4px";var B=document.createElement("a");B.className="geMenuItem gePrimaryBtn";B.style.marginLeft="8px";B.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!= +urlParams.saveAndExit){var J="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(B,J);B.setAttribute("title",J);mxEvent.addListener(B,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));z.appendChild(B)}}else mxUtils.write(B,mxResources.get("save")),B.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(B,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),z.appendChild(B), +"1"==urlParams.saveAndExit&&(B=document.createElement("a"),mxUtils.write(B,mxResources.get("saveAndExit")),B.setAttribute("title",mxResources.get("saveAndExit")),B.className="geMenuItem",B.style.marginLeft="6px",B.style.padding="6px",mxEvent.addListener(B,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),z.appendChild(B));"1"!=urlParams.noExitBtn&&(B=document.createElement("a"),J="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(B, +J),B.setAttribute("title",J),B.className="geMenuItem",B.style.marginLeft="6px",B.style.padding="6px",mxEvent.addListener(B,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),z.appendChild(B));this.buttonContainer.appendChild(z);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var d=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(z,B){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker, +z)){var J=mxUtils.getOffset(this.editorUi.picker);J.x+=this.editorUi.picker.offsetWidth+4;J.y+=z.offsetTop-B.height/2+16;return J}var M=d.apply(this,arguments);J=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);M.x+=J.x-16;M.y+=J.y;return M};var g=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(z,B,J){var M=this.editorUi.editor.graph;z.smartSeparators=!0;g.apply(this,arguments);"1"==urlParams.sketch?M.isEnabled()&&(z.addSeparator(),1==M.getSelectionCount()&&this.addMenuItems(z, +["-","lockUnlock"],null,J)):1==M.getSelectionCount()?(M.isCellFoldable(M.getSelectionCell())&&this.addMenuItems(z,M.isCellCollapsed(B)?["expand"]:["collapse"],null,J),this.addMenuItems(z,["collapsible","-","lockUnlock","enterGroup"],null,J),z.addSeparator(),this.addSubmenu("layout",z)):M.isSelectionEmpty()&&M.isEnabled()?(z.addSeparator(),this.addMenuItems(z,["editData"],null,J),z.addSeparator(),this.addSubmenu("layout",z),this.addSubmenu("insert",z),this.addMenuItems(z,["-","exitGroup"],null,J)): +M.isEnabled()&&this.addMenuItems(z,["-","lockUnlock"],null,J)};var k=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(z,B,J){k.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(z,["copyAsImage"],null,J)};EditorUi.prototype.toggleFormatPanel=function(z){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=z?z:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0}; +var n=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&& +(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null);n.apply(this,arguments)};var q=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(z){q.apply(this,arguments);if(z){var B=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=B&& +null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=B||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var p=Menus.prototype.init;Menus.prototype.init=function(){p.apply(this,arguments);var z=this.editorUi,B=z.actions.put("togglePagesVisible", +new Action(mxResources.get("pages"),function(F){z.setPagesVisible(!Editor.pagesVisible)}));B.setToggleAction(!0);B.setSelectedCallback(function(){return Editor.pagesVisible});z.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){f(z)},null,null,Editor.ctrlKey+"+Shift+K"));B=z.actions.put("toggleFormat",new Action(mxResources.get("format"),function(){b(z)}));B.shortcut=z.actions.get("formatPanel").shortcut;B.setToggleAction(!0);B.setSelectedCallback(mxUtils.bind(this,function(){return null!= +z.formatWindow&&z.formatWindow.window.isVisible()}));EditorUi.enablePlantUml&&!z.isOffline()&&z.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var F=new ParseDialog(z,mxResources.get("plantUml")+"...","plantUml");z.showDialog(F.container,620,420,!0,!1);F.init()}));z.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var F=new ParseDialog(z,mxResources.get("mermaid")+"...","mermaid");z.showDialog(F.container,620,420,!0,!1);F.init()}));var J= +this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(F,L){var K=this.editorUi.editor.graph,H=K.getSelectionCell();J.call(this,F,H,null,L);this.addMenuItems(F,["editTooltip"],L);K.model.isVertex(H)&&this.addMenuItems(F,["editGeometry"],L);this.addMenuItems(F,["-","edit"],L)})));this.addPopupMenuCellEditItems=function(F,L,K,H){F.addSeparator();this.addSubmenu("editCell",F,H,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,function(F,L){var K=z.getCurrentFile(); +z.menus.addMenuItems(F,["new"],L);z.menus.addSubmenu("openFrom",F,L);isLocalStorage&&this.addSubmenu("openRecent",F,L);F.addSeparator(L);z.menus.addMenuItems(F,["-","save"],L);null!=K&&K.constructor==DriveFile||z.menus.addMenuItems(F,["saveAs"],L);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||K.constructor==LocalFile&&null==K.fileHandle||z.menus.addMenuItems(F,["synchronize"],L);null!=K&&K.constructor==DriveFile?z.menus.addMenuItems(F,"- rename makeCopy - moveToFolder openFolder".split(" "),L):(z.menus.addMenuItems(F, +["-","rename"],L),z.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(F,["upload"],L):z.menus.addMenuItems(F,["makeCopy"],L));null!=K&&K.isRevisionHistorySupported()&&z.menus.addMenuItems(F,["-","revisionHistory"],L);if(null!=K){if(null!=z.fileNode&&"1"!=urlParams.embedInline){var H=null!=K.getTitle()?K.getTitle():z.defaultFilename;(K.constructor==DriveFile&&null!=K.sync&&K.sync.isConnected()||!/(\.html)$/i.test(H)&&!/(\.svg)$/i.test(H))&&this.addMenuItems(F, +["properties"],L)}K.constructor==DriveFile&&z.menus.addMenuItems(F,["share"],L)}z.menus.addMenuItems(F,["-","autosave"],L)})));this.put("diagram",new Menu(mxUtils.bind(this,function(F,L){var K=z.getCurrentFile();z.menus.addSubmenu("extras",F,L,mxResources.get("preferences"));F.addSeparator(L);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)z.menus.addMenuItems(F,"new open - synchronize - save saveAs -".split(" "),L);else if("1"==urlParams.embed||z.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&& +"1"!=urlParams.embedInline&&z.menus.addMenuItems(F,["-","save"],L);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||z.mode==App.MODE_ATLAS)z.menus.addMenuItems(F,["saveAndExit"],L),null!=K&&K.isRevisionHistorySupported()&&z.menus.addMenuItems(F,["revisionHistory"],L);F.addSeparator(L)}else z.mode==App.MODE_ATLAS?z.menus.addMenuItems(F,["save","synchronize","-"],L):"1"!=urlParams.noFileMenu&&("1"!=urlParams.sketch?(z.menus.addMenuItems(F,["new"],L),z.menus.addSubmenu("openFrom", +F,L),isLocalStorage&&this.addSubmenu("openRecent",F,L),F.addSeparator(L),null!=K&&(K.constructor==DriveFile&&z.menus.addMenuItems(F,["share"],L),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||K.constructor==LocalFile||z.menus.addMenuItems(F,["synchronize"],L)),F.addSeparator(L),z.menus.addSubmenu("save",F,L)):z.menus.addSubmenu("file",F,L));z.menus.addSubmenu("exportAs",F,L);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?z.menus.addMenuItems(F,["import"],L):"1"!=urlParams.noFileMenu&&z.menus.addSubmenu("importFrom", +F,L);z.menus.addMenuItems(F,["-","findReplace"],L);z.commentsSupported()&&z.menus.addMenuItems(F,["comments","-"],L);z.menus.addMenuItems(F,["toggleFormat","layers","tags","-","pageSetup"],L);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||z.menus.addMenuItems(F,["print"],L);"1"!=urlParams.sketch&&null!=K&&null!=z.fileNode&&"1"!=urlParams.embedInline&&(K=null!=K.getTitle()?K.getTitle():z.defaultFilename,/(\.html)$/i.test(K)||/(\.svg)$/i.test(K)||this.addMenuItems(F,["-","properties"])); +F.addSeparator(L);z.menus.addSubmenu("help",F,L);"1"==urlParams.embed||z.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||z.mode==App.MODE_ATLAS)&&z.menus.addMenuItems(F,["-","exit"],L):"1"!=urlParams.noFileMenu&&z.menus.addMenuItems(F,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(F,L){var K=z.getCurrentFile();null!=K&&K.constructor==DriveFile?z.menus.addMenuItems(F,["save","makeCopy","-","rename","moveToFolder"],L):(z.menus.addMenuItems(F,["save","saveAs","-","rename"],L), +z.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(F,["upload"],L):z.menus.addMenuItems(F,["makeCopy"],L));z.menus.addMenuItems(F,["-","autosave"],L);null!=K&&K.isRevisionHistorySupported()&&z.menus.addMenuItems(F,["-","revisionHistory"],L)})));var M=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(F,L){M.funct(F,L);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||z.menus.addMenuItems(F,["publishLink"],L);z.mode!=App.MODE_ATLAS&& +"1"!=urlParams.extAuth&&(F.addSeparator(L),z.menus.addSubmenu("embed",F,L))})));var v=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(F,L){z.menus.addInsertTableCellItem(F,L)})));var u=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(F,L){u.funct(F,L);this.addMenuItems(F,["-","ruler","-","pageScale"],L)})));this.put("extras",new Menu(mxUtils.bind(this,function(F,L){null==v||"1"==urlParams.embed&&null!=urlParams.lang||z.menus.addSubmenu("language",F, +L);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&z.mode!=App.MODE_ATLAS&&z.menus.addSubmenu("theme",F,L);z.menus.addSubmenu("units",F,L);F.addSeparator(L);"1"!=urlParams.sketch&&z.menus.addMenuItems(F,["scrollbars","-","tooltips","copyConnect","collapseExpand"],L);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&z.mode!=App.MODE_ATLAS&&z.menus.addMenuItems(F,["-","showStartScreen","search","scratchpad"],L);F.addSeparator(L);"1"==urlParams.sketch&& +z.menus.addMenuItems(F,["copyConnect","collapseExpand","tooltips","-"],L);EditorUi.isElectronApp&&z.menus.addMenuItems(F,["-","spellCheck","autoBkp","drafts","-"],L);var K=z.getCurrentFile();null!=K&&K.isRealtimeEnabled()&&K.isRealtimeSupported()&&this.addMenuItems(F,["-","showRemoteCursors","shareCursor","-"],L);Graph.translateDiagram&&z.menus.addMenuItems(F,["diagramLanguage"],L);z.mode!=App.MODE_ATLAS&&z.menus.addMenuItem(F,"configuration",L);"1"!=urlParams.sketch&&!z.isOfflineApp()&&isLocalStorage&& +z.mode!=App.MODE_ATLAS&&z.menus.addMenuItem(F,"plugins",L);F.addSeparator(L)})));mxUtils.bind(this,function(){var F=this.get("insert"),L=F.funct;F.funct=function(K,H){"1"==urlParams.sketch?(z.menus.addMenuItems(K,["toggleShapes"],H),z.menus.addSubmenu("table",K,H),K.addSeparator(H),z.insertTemplateEnabled&&!z.isOffline()&&z.menus.addMenuItems(K,["insertTemplate"],H),z.menus.addMenuItems(K,["insertImage","insertLink","-"],H),z.menus.addSubmenu("insertAdvanced",K,H,mxResources.get("advanced")),z.menus.addSubmenu("layout", +K,H)):(L.apply(this,arguments),z.menus.addSubmenu("table",K,H))}})();var G="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),I=function(F,L,K,H){F.addItem(K,null,mxUtils.bind(this,function(){var Q=new CreateGraphDialog(z,K,H);z.showDialog(Q.container,620,420,!0,!1);Q.init()}),L)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(F,L){for(var K=0;K<G.length;K++)"-"==G[K]?F.addSeparator(L):I(F,L,mxResources.get(G[K])+"...",G[K])})))};EditorUi.prototype.installFormatToolbar= +function(z){var B=this.editor.graph,J=document.createElement("div");J.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";B.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(M,v){0<B.getSelectionCount()?(z.appendChild(J),J.innerHTML="Selected: "+B.getSelectionCount()):null!=J.parentNode&&J.parentNode.removeChild(J)}))};var A=!1;EditorUi.prototype.initFormatWindow= +function(){if(!A&&null!=this.formatWindow){A=!0;var z=this.formatWindow.window.toggleMinimized,B=240;this.formatWindow.window.toggleMinimized=function(){z.apply(this,arguments);this.minimized?(B=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+B-140+"px"):(this.div.style.width=B+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-B+140)+"px");this.fit()}; +mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(J){mxEvent.getSource(J)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var E=EditorUi.prototype.init;EditorUi.prototype.init=function(){function z(ca,fa,da){var ha=u.menus.get(ca),ja=L.addMenu(mxResources.get(ca),mxUtils.bind(this,function(){ha.funct.apply(this,arguments)}),F);ja.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ja.style.display="inline-block";ja.style.boxSizing= +"border-box";ja.style.top="6px";ja.style.marginRight="6px";ja.style.height="30px";ja.style.paddingTop="6px";ja.style.paddingBottom="6px";ja.style.cursor="pointer";ja.setAttribute("title",mxResources.get(ca));u.menus.menuCreated(ha,ja,"geMenuItem");null!=da?(ja.style.backgroundImage="url("+da+")",ja.style.backgroundPosition="center center",ja.style.backgroundRepeat="no-repeat",ja.style.backgroundSize="24px 24px",ja.style.width="34px",ja.innerText=""):fa||(ja.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+ +")",ja.style.backgroundPosition="right 6px center",ja.style.backgroundRepeat="no-repeat",ja.style.paddingRight="22px");return ja}function B(ca,fa,da,ha,ja,sa){var oa=document.createElement("a");oa.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";oa.style.display="inline-block";oa.style.boxSizing="border-box";oa.style.height="30px";oa.style.padding="6px";oa.style.position="relative";oa.style.verticalAlign="top";oa.style.top="0px";"1"==urlParams.sketch&&(oa.style.borderStyle="none",oa.style.boxShadow= +"none",oa.style.padding="6px",oa.style.margin="0px");null!=u.statusContainer?I.insertBefore(oa,u.statusContainer):I.appendChild(oa);null!=sa?(oa.style.backgroundImage="url("+sa+")",oa.style.backgroundPosition="center center",oa.style.backgroundRepeat="no-repeat",oa.style.backgroundSize="24px 24px",oa.style.width="34px"):mxUtils.write(oa,ca);mxEvent.addListener(oa,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Ca){Ca.preventDefault()}));mxEvent.addListener(oa,"click",function(Ca){"disabled"!= +oa.getAttribute("disabled")&&fa(Ca);mxEvent.consume(Ca)});null==da&&(oa.style.marginRight="4px");null!=ha&&oa.setAttribute("title",ha);null!=ja&&(ca=function(){ja.isEnabled()?(oa.removeAttribute("disabled"),oa.style.cursor="pointer"):(oa.setAttribute("disabled","disabled"),oa.style.cursor="default")},ja.addListener("stateChanged",ca),G.addListener("enabledChanged",ca),ca());return oa}function J(ca,fa,da){da=document.createElement("div");da.className="geMenuItem";da.style.display="inline-block";da.style.verticalAlign= +"top";da.style.marginRight="6px";da.style.padding="0 4px 0 4px";da.style.height="30px";da.style.position="relative";da.style.top="0px";"1"==urlParams.sketch&&(da.style.boxShadow="none");for(var ha=0;ha<ca.length;ha++)null!=ca[ha]&&("1"==urlParams.sketch&&(ca[ha].style.padding="10px 8px",ca[ha].style.width="30px"),ca[ha].style.margin="0px",ca[ha].style.boxShadow="none",da.appendChild(ca[ha]));null!=fa&&mxUtils.setOpacity(da,fa);null!=u.statusContainer&&"1"!=urlParams.sketch?I.insertBefore(da,u.statusContainer): +I.appendChild(da);return da}function M(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(C.style.left=58>t.offsetTop-t.offsetHeight/2?"70px":"10px");else{for(var ca=I.firstChild;null!=ca;){var fa=ca.nextSibling;"geMenuItem"!=ca.className&&"geItem"!=ca.className||ca.parentNode.removeChild(ca);ca=fa}F=I.firstChild;c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;ca=1E3>c||"1"==urlParams.sketch;var da=null;ca||(da=z("diagram"));fa=ca?z("diagram",null,Editor.menuImage): +null;null!=fa&&(da=fa);J([da,B(mxResources.get("shapes"),u.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),u.actions.get("image"),ca?Editor.shapesImage:null),B(mxResources.get("format"),u.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+u.actions.get("formatPanel").shortcut+")",u.actions.get("image"),ca?Editor.formatImage:null)],ca?60:null);var ha=z("insert",!0,ca?V:null);J([ha,B(mxResources.get("delete"),u.actions.get("delete").funct,null,mxResources.get("delete"), +u.actions.get("delete"),ca?Editor.trashImage:null)],ca?60:null);411<=c&&(J([xa,Ma],60),520<=c&&J([Ha,640<=c?B("",pa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",pa,Editor.zoomInImage):null,640<=c?B("",na.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",na,Editor.zoomOutImage):null],60))}null!=da&&(mxEvent.disableContextMenu(da),mxEvent.addGestureListeners(da,mxUtils.bind(this,function(ja){(mxEvent.isShiftDown(ja)||mxEvent.isAltDown(ja)||mxEvent.isMetaDown(ja)||mxEvent.isControlDown(ja)|| +mxEvent.isPopupTrigger(ja))&&u.appIconClicked(ja)}),null,null));fa=u.menus.get("1"==urlParams["live-ui"]?"theme":"language");null!=fa&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=c&&"1"!=urlParams.embed&&"1"!=urlParams.sketch?(null==Ia&&(ha=L.addMenu("",fa.funct),ha.setAttribute("title",mxResources.get("1"==urlParams["live-ui"]?"preferences":"language")),ha.className="geToolbarButton",ha.style.backgroundImage="url("+Editor.globeImage+")",ha.style.backgroundPosition="center center",ha.style.backgroundRepeat= +"no-repeat",ha.style.backgroundSize="22px 22px",ha.style.position="absolute",ha.style.height="24px",ha.style.width="24px",ha.style.zIndex="1",ha.style.right="8px",ha.style.cursor="pointer",ha.style.top="12px",I.appendChild(ha),Ia=ha,"1"==urlParams["live-ui"]&&(fa=mxUtils.bind(this,function(){ha.style.backgroundImage="url('"+(Editor.isDarkMode()?Editor.lightModeImage:Editor.darkModeImage)+"')"}),u.addListener("darkModeChanged",fa),fa())),u.buttonContainer.style.paddingRight="34px"):(u.buttonContainer.style.paddingRight= +"4px",null!=Ia&&(Ia.parentNode.removeChild(Ia),Ia=null))}E.apply(this,arguments);var v=document.createElement("div");v.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";v.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(v);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version|| +0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=c||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])f(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var u=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==u.embedViewport)mxUtils.fit(this.div); +else{var ca=parseInt(this.div.offsetLeft),fa=parseInt(this.div.offsetWidth),da=u.embedViewport.x+u.embedViewport.width,ha=parseInt(this.div.offsetTop),ja=parseInt(this.div.offsetHeight),sa=u.embedViewport.y+u.embedViewport.height;this.div.style.left=Math.max(u.embedViewport.x,Math.min(ca,da-fa))+"px";this.div.style.top=Math.max(u.embedViewport.y,Math.min(ha,sa-ja))+"px";this.div.style.height=Math.min(u.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(u.embedViewport.width, +parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=c)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),v=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>c||708>v)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));u=this;var G=u.editor.graph; +u.toolbar=this.createToolbar(u.createDiv("geToolbar"));u.defaultLibraryName=mxResources.get("untitledLibrary");var I=document.createElement("div");I.className="geMenubarContainer";var F=null,L=new Menubar(u,I);u.statusContainer=u.createStatusContainer();u.statusContainer.style.position="relative";u.statusContainer.style.maxWidth="";u.statusContainer.style.marginTop="7px";u.statusContainer.style.marginLeft="6px";u.statusContainer.style.color="gray";u.statusContainer.style.cursor="default";var K=u.hideCurrentMenu; +u.hideCurrentMenu=function(){K.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var H=u.descriptorChanged;u.descriptorChanged=function(){H.apply(this,arguments);var ca=u.getCurrentFile();if(null!=ca&&null!=ca.getTitle()){var fa=ca.getMode();"google"==fa?fa="googleDrive":"github"==fa?fa="gitHub":"gitlab"==fa?fa="gitLab":"onedrive"==fa&&(fa="oneDrive");fa=mxResources.get(fa);I.setAttribute("title",ca.getTitle()+(null!=fa?" ("+fa+")":""))}else I.removeAttribute("title")};u.setStatusText(u.editor.getStatus()); +I.appendChild(u.statusContainer);u.buttonContainer=document.createElement("div");u.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";I.appendChild(u.buttonContainer);u.menubarContainer=u.buttonContainer;u.tabContainer=document.createElement("div");u.tabContainer.className="geTabContainer";u.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;"; +v=u.diagramContainer.parentNode;var Q=document.createElement("div");Q.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";u.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){Q.style.top="20px";u.titlebar=document.createElement("div");u.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var U=document.createElement("div"); +U.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";u.titlebar.appendChild(U);v.appendChild(u.titlebar)}U=u.menus.get("viewZoom");var T=U.funct;U.funct=function(ca,fa){T.apply(this,arguments);u.menus.addMenuItems(ca,["-","outline","fullscreen"],fa)};var V="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,W="1"==urlParams.sketch?document.createElement("div"):null,t="1"==urlParams.sketch? +document.createElement("div"):null,C="1"==urlParams.sketch?document.createElement("div"):null,N=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)C.style.left="10px",C.style.top="10px",t.style.left="10px",t.style.top="60px",W.style.top="10px",W.style.right="12px",W.style.left="",u.diagramContainer.setAttribute("data-bounds",u.diagramContainer.style.top+" "+u.diagramContainer.style.left+" "+u.diagramContainer.style.width+" "+u.diagramContainer.style.height),u.diagramContainer.style.top="0px", +u.diagramContainer.style.left="0px",u.diagramContainer.style.bottom="0px",u.diagramContainer.style.right="0px",u.diagramContainer.style.width="",u.diagramContainer.style.height="";else{var ca=u.diagramContainer.getAttribute("data-bounds");if(null!=ca){u.diagramContainer.style.background="transparent";u.diagramContainer.removeAttribute("data-bounds");var fa=G.getGraphBounds();ca=ca.split(" ");u.diagramContainer.style.top=ca[0];u.diagramContainer.style.left=ca[1];u.diagramContainer.style.width=fa.width+ +50+"px";u.diagramContainer.style.height=fa.height+46+"px";u.diagramContainer.style.bottom="";u.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:u.diagramContainer.getBoundingClientRect()}),"*");u.refresh()}C.style.left=u.diagramContainer.offsetLeft+"px";C.style.top=u.diagramContainer.offsetTop-C.offsetHeight-4+"px";t.style.display="";t.style.left=u.diagramContainer.offsetLeft-t.offsetWidth-4+"px";t.style.top=u.diagramContainer.offsetTop+ +"px";W.style.left=u.diagramContainer.offsetLeft+u.diagramContainer.offsetWidth-W.offsetWidth+"px";W.style.top=C.style.top;W.style.right="";u.bottomResizer.style.left=u.diagramContainer.offsetLeft+(u.diagramContainer.offsetWidth-u.bottomResizer.offsetWidth)/2+"px";u.bottomResizer.style.top=u.diagramContainer.offsetTop+u.diagramContainer.offsetHeight-u.bottomResizer.offsetHeight/2-1+"px";u.rightResizer.style.left=u.diagramContainer.offsetLeft+u.diagramContainer.offsetWidth-u.rightResizer.offsetWidth/ +2-1+"px";u.rightResizer.style.top=u.diagramContainer.offsetTop+(u.diagramContainer.offsetHeight-u.bottomResizer.offsetHeight)/2+"px"}u.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";u.rightResizer.style.visibility=u.bottomResizer.style.visibility;I.style.display="none";C.style.visibility="";W.style.visibility=""}),R=u.actions.get("fullscreen"),O=B("",R.funct,null,mxResources.get(""),R,Editor.fullscreenImage),P=mxUtils.bind(this,function(){O.style.backgroundImage="url("+(Editor.inlineFullscreen? +Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";N()});R=mxUtils.bind(this,function(){b(u,!0);u.initFormatWindow();var ca=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(ca.x+ca.width+4,ca.y);P()});u.addListener("inlineFullscreenChanged",P);u.addListener("editInlineStart",R);"1"==urlParams.embedInline&&u.addListener("darkModeChanged", +R);u.addListener("editInlineStop",mxUtils.bind(this,function(ca){u.diagramContainer.style.width="10px";u.diagramContainer.style.height="10px";u.diagramContainer.style.border="";u.bottomResizer.style.visibility="hidden";u.rightResizer.style.visibility="hidden";C.style.visibility="hidden";W.style.visibility="hidden";t.style.display="none"}));if(null!=u.hoverIcons){var S=u.hoverIcons.update;u.hoverIcons.update=function(){G.freehand.isDrawing()||S.apply(this,arguments)}}if(null!=G.freehand){var X=G.freehand.createStyle; +G.freehand.createStyle=function(ca){return X.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){t.className="geToolbarContainer";W.className="geToolbarContainer";C.className="geToolbarContainer";I.className="geToolbarContainer";u.picker=t;var aa=!1;"1"!=urlParams.embed&&"atlassian"!=u.getServiceName()&&(mxEvent.addListener(I,"mouseenter",function(){u.statusContainer.style.display="inline-block"}),mxEvent.addListener(I,"mouseleave",function(){aa||(u.statusContainer.style.display="none")})); +var Y=mxUtils.bind(this,function(ca){null!=u.notificationBtn&&(null!=ca?u.notificationBtn.setAttribute("title",ca):u.notificationBtn.removeAttribute("title"))});if("1"!=urlParams.embed&&"1"==urlParams["live-ui"]){var Z=z("theme",null,Editor.darkModeImage);null!=Z&&(Z.style.position="relative",Z.style.backgroundPosition="top center",Z.style.backgroundSize="22px 22px",Z.style.width="24px",Z.style.height="28px",Z.style.top="4px",I.appendChild(Z),R=mxUtils.bind(this,function(){Z.style.backgroundImage= +"url('"+(Editor.isDarkMode()?Editor.lightModeImage:Editor.darkModeImage)+"')"}),u.addListener("darkModeChanged",R),R())}I.style.visibility=20>I.clientWidth?"hidden":"";u.editor.addListener("statusChanged",mxUtils.bind(this,function(){u.setStatusText(u.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=u.getServiceName())if(u.statusContainer.style.display="inline-block",aa=!0,1==u.statusContainer.children.length&&""==u.editor.getStatus())I.style.visibility="hidden";else{if(0==u.statusContainer.children.length|| +1==u.statusContainer.children.length&&"function"===typeof u.statusContainer.firstChild.getAttribute&&null==u.statusContainer.firstChild.getAttribute("class")){var ca=null!=u.statusContainer.firstChild&&"function"===typeof u.statusContainer.firstChild.getAttribute?u.statusContainer.firstChild.getAttribute("title"):u.editor.getStatus();Y(ca);var fa=u.getCurrentFile();fa=null!=fa?fa.savingStatusKey:DrawioFile.prototype.savingStatusKey;ca==mxResources.get(fa)+"..."?(u.statusContainer.innerHTML='<img title="'+ +mxUtils.htmlEntities(mxResources.get(fa))+'..."src="'+Editor.tailSpin+'">',u.statusContainer.style.display="inline-block",aa=!0):6<u.buttonContainer.clientWidth&&(u.statusContainer.style.display="none",aa=!1)}else u.statusContainer.style.display="inline-block",Y(null),aa=!0;I.style.visibility=20>I.clientWidth&&!aa?"hidden":""}}));la=z("diagram",null,Editor.menuImage);la.style.boxShadow="none";la.style.padding="6px";la.style.margin="0px";C.appendChild(la);mxEvent.disableContextMenu(la);mxEvent.addGestureListeners(la, +mxUtils.bind(this,function(ca){(mxEvent.isShiftDown(ca)||mxEvent.isAltDown(ca)||mxEvent.isMetaDown(ca)||mxEvent.isControlDown(ca)||mxEvent.isPopupTrigger(ca))&&this.appIconClicked(ca)}),null,null);u.statusContainer.style.position="";u.statusContainer.style.display="none";u.statusContainer.style.margin="0px";u.statusContainer.style.padding="6px 0px";u.statusContainer.style.maxWidth=Math.min(c-240,280)+"px";u.statusContainer.style.display="inline-block";u.statusContainer.style.textOverflow="ellipsis"; +u.buttonContainer.style.display="inline-block";u.buttonContainer.style.position="relative";u.buttonContainer.style.paddingRight="0px";u.buttonContainer.style.top="0px";var ba=document.createElement("a");ba.style.padding="0px";ba.style.boxShadow="none";ba.className="geMenuItem";ba.style.display="inline-block";ba.style.width="40px";ba.style.height="12px";ba.style.marginBottom="-2px";ba.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";ba.style.backgroundPosition="top center";ba.style.backgroundRepeat= +"no-repeat";ba.setAttribute("title","Minimize");var ea=!1,ma=mxUtils.bind(this,function(){t.innerText="";if(!ea){var ca=function(fa,da,ha,ja){null!=da&&fa.setAttribute("title",da);fa.style.cursor=null!=ha?ha:"default";fa.style.margin="2px 0px";t.appendChild(fa);mxUtils.br(t);null!=ja&&(fa.style.position="relative",fa.style.overflow="visible",da=document.createElement("div"),da.style.position="absolute",da.style.left="34px",da.style.top="28px",da.style.fontSize="8px",mxUtils.write(da,ja),fa.appendChild(da)); +return fa};ca(u.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+" (A)",null,"A");ca(u.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;", +140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");ca(u.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");ca(u.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");(function(){var fa=new mxCell("",new mxGeometry(0,0,G.defaultEdgeLength, +0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");fa.geometry.setTerminalPoint(new mxPoint(0,0),!0);fa.geometry.setTerminalPoint(new mxPoint(fa.geometry.width,0),!1);fa.geometry.points=[];fa.geometry.relative=!0;fa.edge=!0;ca(u.sidebar.createEdgeTemplateFromCells([fa],fa.geometry.width,fa.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");fa=fa.clone();fa.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;"; +fa.geometry.width=G.defaultEdgeLength+20;fa.geometry.setTerminalPoint(new mxPoint(0,20),!0);fa.geometry.setTerminalPoint(new mxPoint(fa.geometry.width,20),!1);ca(u.sidebar.createEdgeTemplateFromCells([fa],fa.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"))})();(function(fa,da,ha,ja){fa=B("",fa.funct,null,da,fa,ha);fa.style.width="40px";fa.style.height="34px";fa.style.opacity="0.7";return ca(fa,null,"pointer",ja)})(u.actions.get("insertFreehand"),mxResources.get("freehand")+ +" (X)",Editor.freehandImage,"X");la=z("insert",null,Editor.plusImage);la.style.boxShadow="none";la.style.opacity="0.7";la.style.padding="6px";la.style.margin="0px";la.style.height="34px";la.style.width="37px";ca(la,null,"pointer")}"1"!=urlParams.embedInline&&t.appendChild(ba)});mxEvent.addListener(ba,"click",mxUtils.bind(this,function(){ea?(mxUtils.setPrefixedStyle(t.style,"transform","translate(0, -50%)"),t.style.padding="8px 6px 4px",t.style.top="50%",t.style.bottom="",t.style.height="",ba.style.backgroundImage= +"url("+mxWindow.prototype.normalizeImage+")",ba.style.width="40px",ba.style.height="12px",ba.setAttribute("title","Minimize"),ea=!1,ma()):(t.innerText="",t.appendChild(ba),mxUtils.setPrefixedStyle(t.style,"transform","translate(0, 0)"),t.style.top="",t.style.bottom="12px",t.style.padding="0px",t.style.height="24px",ba.style.height="24px",ba.style.backgroundImage="url("+Editor.plusImage+")",ba.setAttribute("title",mxResources.get("insert")),ba.style.width="24px",ea=!0)}));ma();u.addListener("darkModeChanged", +ma);u.addListener("sketchModeChanged",ma)}else u.editor.addListener("statusChanged",mxUtils.bind(this,function(){u.setStatusText(u.editor.getStatus())}));if(null!=U){var ia=function(ca){if(mxEvent.isAltDown(ca))u.hideCurrentMenu(),u.actions.get("customZoom").funct(),mxEvent.consume(ca);else if("geItem"!=mxEvent.getSource(ca).className||mxEvent.isShiftDown(ca))u.hideCurrentMenu(),u.actions.get("smartFit").funct(),mxEvent.consume(ca)},pa=u.actions.get("zoomIn"),na=u.actions.get("zoomOut");R=u.actions.get("resetView"); +var Fa=u.actions.get("undo"),Ga=u.actions.get("redo"),xa=B("",Fa.funct,null,mxResources.get("undo")+" ("+Fa.shortcut+")",Fa,Editor.undoImage),Ma=B("",Ga.funct,null,mxResources.get("redo")+" ("+Ga.shortcut+")",Ga,Editor.redoImage);if(null!=W){R=function(){Da.style.display=null!=u.pages&&("0"!=urlParams.pages||1<u.pages.length||Editor.pagesVisible)?"inline-block":"none"};var va=function(){Da.innerText="";if(null!=u.currentPage){mxUtils.write(Da,u.currentPage.getName());var ca=null!=u.pages?u.pages.length: +1,fa=u.getPageIndex(u.currentPage);fa=null!=fa?fa+1:1;var da=u.currentPage.getId();Da.setAttribute("title",u.currentPage.getName()+" ("+fa+"/"+ca+")"+(null!=da?" ["+da+"]":""))}},Ea=u.actions.get("delete"),Ba=B("",Ea.funct,null,mxResources.get("delete"),Ea,Editor.trashImage);Ba.style.opacity="0.1";C.appendChild(Ba);Ea.addListener("stateChanged",function(){Ba.style.opacity=Ea.enabled?"":"0.1"});var za=function(){xa.style.display=0<u.editor.undoManager.history.length||G.isEditing()?"inline-block":"none"; +Ma.style.display=xa.style.display;xa.style.opacity=Fa.enabled?"":"0.1";Ma.style.opacity=Ga.enabled?"":"0.1"};C.appendChild(xa);C.appendChild(Ma);Fa.addListener("stateChanged",za);Ga.addListener("stateChanged",za);za();var Da=this.createPageMenuTab(!1,!0);Da.style.display="none";Da.style.position="";Da.style.marginLeft="";Da.style.top="";Da.style.left="";Da.style.height="100%";Da.style.lineHeight="";Da.style.borderStyle="none";Da.style.padding="3px 0";Da.style.margin="0px";Da.style.background="";Da.style.border= +"";Da.style.boxShadow="none";Da.style.verticalAlign="top";Da.style.width="auto";Da.style.maxWidth="160px";Da.style.position="relative";Da.style.padding="6px";Da.style.textOverflow="ellipsis";Da.style.opacity="0.8";W.appendChild(Da);u.editor.addListener("pagesPatched",va);u.editor.addListener("pageSelected",va);u.editor.addListener("pageRenamed",va);u.editor.addListener("fileLoaded",va);va();u.addListener("fileDescriptorChanged",R);u.addListener("pagesVisibleChanged",R);u.editor.addListener("pagesPatched", +R);R();R=B("",na.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",na,Editor.zoomOutImage);W.appendChild(R);var la=L.addMenu("100%",U.funct);la.setAttribute("title",mxResources.get("zoom"));la.innerHTML="100%";la.style.display="inline-block";la.style.color="inherit";la.style.cursor="pointer";la.style.textAlign="center";la.style.whiteSpace="nowrap";la.style.paddingRight="10px";la.style.textDecoration="none";la.style.verticalAlign="top";la.style.padding="6px 0";la.style.fontSize= +"14px";la.style.width="40px";la.style.opacity="0.4";W.appendChild(la);U=B("",pa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",pa,Editor.zoomInImage);W.appendChild(U);"1"==urlParams.embedInline?(W.appendChild(O),U=u.actions.get("exit"),W.appendChild(B("",U.funct,null,mxResources.get("exit"),U,Editor.closeImage))):O.parentNode.removeChild(O);u.tabContainer.style.visibility="hidden";I.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;"; +C.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";W.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";Q.appendChild(C);Q.appendChild(W);t.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;"; +mxClient.IS_POINTER&&(t.style.touchAction="none");Q.appendChild(t);window.setTimeout(function(){mxUtils.setPrefixedStyle(t.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(Q)}else{var Ha=B("",ia,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",R,Editor.zoomFitImage);I.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";la=L.addMenu("100%", +U.funct);la.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");la.style.whiteSpace="nowrap";la.style.paddingRight="10px";la.style.textDecoration="none";la.style.textDecoration="none";la.style.overflow="hidden";la.style.visibility="hidden";la.style.textAlign="center";la.style.cursor="pointer";la.style.height=parseInt(u.tabContainerHeight)-1+"px";la.style.lineHeight=parseInt(u.tabContainerHeight)+1+"px";la.style.position="absolute";la.style.display="block";la.style.fontSize="12px";la.style.width= +"59px";la.style.right="0px";la.style.bottom="0px";la.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";la.style.backgroundPosition="right 6px center";la.style.backgroundRepeat="no-repeat";Q.appendChild(la)}(function(ca){mxEvent.addListener(ca,"click",ia);var fa=mxUtils.bind(this,function(){ca.innerText="";mxUtils.write(ca,Math.round(100*u.editor.graph.view.scale)+"%")});u.editor.graph.view.addListener(mxEvent.EVENT_SCALE,fa);u.editor.addListener("resetGraphView",fa);u.editor.addListener("pageSelected", +fa)})(la);var ya=u.setGraphEnabled;u.setGraphEnabled=function(){ya.apply(this,arguments);null!=this.tabContainer&&(la.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==W?this.tabContainerHeight+"px":"0px")}}Q.appendChild(I);Q.appendChild(u.diagramContainer);v.appendChild(Q);u.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=c)&&"1"!=urlParams.embedInline&&b(this,!0);null==W&&Q.appendChild(u.tabContainer); +var Ia=null;M();mxEvent.addListener(window,"resize",function(){M();null!=u.sidebarWindow&&u.sidebarWindow.window.fit();null!=u.formatWindow&&u.formatWindow.window.fit();null!=u.actions.outlineWindow&&u.actions.outlineWindow.window.fit();null!=u.actions.layersWindow&&u.actions.layersWindow.window.fit();null!=u.menus.tagsWindow&&u.menus.tagsWindow.window.fit();null!=u.menus.findWindow&&u.menus.findWindow.window.fit();null!=u.menus.findReplaceWindow&&u.menus.findReplaceWindow.window.fit()});if("1"== +urlParams.embedInline){document.body.style.cursor="text";t.style.transform="";mxEvent.addGestureListeners(u.diagramContainer.parentNode,function(ca){mxEvent.getSource(ca)==u.diagramContainer.parentNode&&(u.embedExitPoint=new mxPoint(mxEvent.getClientX(ca),mxEvent.getClientY(ca)),u.sendEmbeddedSvgExport())});v=document.createElement("div");v.style.position="absolute";v.style.width="10px";v.style.height="10px";v.style.borderRadius="5px";v.style.border="1px solid gray";v.style.background="#ffffff";v.style.cursor= +"row-resize";u.diagramContainer.parentNode.appendChild(v);u.bottomResizer=v;var ka=null,ta=null,ra=null,wa=null;mxEvent.addGestureListeners(v,function(ca){wa=parseInt(u.diagramContainer.style.height);ta=mxEvent.getClientY(ca);G.popupMenuHandler.hideMenu();mxEvent.consume(ca)});v=v.cloneNode(!1);v.style.cursor="col-resize";u.diagramContainer.parentNode.appendChild(v);u.rightResizer=v;mxEvent.addGestureListeners(v,function(ca){ra=parseInt(u.diagramContainer.style.width);ka=mxEvent.getClientX(ca);G.popupMenuHandler.hideMenu(); +mxEvent.consume(ca)});mxEvent.addGestureListeners(document.body,null,function(ca){var fa=!1;null!=ka&&(u.diagramContainer.style.width=Math.max(20,ra+mxEvent.getClientX(ca)-ka)+"px",fa=!0);null!=ta&&(u.diagramContainer.style.height=Math.max(20,wa+mxEvent.getClientY(ca)-ta)+"px",fa=!0);fa&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:u.diagramContainer.getBoundingClientRect()}),"*"),N(),u.refresh())},function(ca){null==ka&&null== +ta||mxEvent.consume(ca);ta=ka=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";u.bottomResizer.style.visibility="hidden";u.rightResizer.style.visibility="hidden";C.style.visibility="hidden";W.style.visibility="hidden";t.style.display="none"}"1"==urlParams.prefetchFonts&&u.editor.loadFonts()}}}; +(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(c,l,m,x){var y=l.y,D=l.x,d=!1,g=!1;if(null!=this.states&&null!=c&&null!=l){var k=this,n=new mxCellState,q=this.graph.getView().scale,p=Math.max(2,this.getGuideTolerance()/2);n.x=c.x+D;n.y=c.y+y;n.width=c.width;n.height=c.height;for(var A=[],E=[],z=0;z<this.states.length;z++){var B=this.states[z];B instanceof mxCellState&&(x||!this.graph.isCellSelected(B.cell))&&((n.x>=B.x&&n.x<=B.x+B.width||B.x>=n.x&&B.x<=n.x+n.width)&&(n.y> +B.y+B.height+4||n.y+n.height+4<B.y)?A.push(B):(n.y>=B.y&&n.y<=B.y+B.height||B.y>=n.y&&B.y<=n.y+n.height)&&(n.x>B.x+B.width+4||n.x+n.width+4<B.x)&&E.push(B))}var J=0,M=0,v=B=0,u=0,G=0,I=0,F=0,L=5*q;if(1<A.length){A.push(n);A.sort(function(U,T){return U.y-T.y});var K=!1;z=n==A[0];q=n==A[A.length-1];if(!z&&!q)for(z=1;z<A.length-1;z++)if(n==A[z]){q=A[z-1];z=A[z+1];B=M=v=(z.y-q.y-q.height-n.height)/2;break}for(z=0;z<A.length-1;z++){q=A[z];var H=A[z+1],Q=n==q||n==H;H=H.y-q.y-q.height;K|=n==q;if(0==M&&0== +J)M=H,J=1;else if(Math.abs(M-H)<=(Q||1==z&&K?p:0))J+=1;else if(1<J&&K){A=A.slice(0,z+1);break}else if(3<=A.length-z&&!K)J=0,B=M=0!=v?v:0,A.splice(0,0==z?1:z),z=-1;else break;0!=B||Q||(M=B=H)}3==A.length&&A[1]==n&&(B=0)}if(1<E.length){E.push(n);E.sort(function(U,T){return U.x-T.x});K=!1;z=n==E[0];q=n==E[E.length-1];if(!z&&!q)for(z=1;z<E.length-1;z++)if(n==E[z]){q=E[z-1];z=E[z+1];I=G=F=(z.x-q.x-q.width-n.width)/2;break}for(z=0;z<E.length-1;z++){q=E[z];H=E[z+1];Q=n==q||n==H;H=H.x-q.x-q.width;K|=n==q; +if(0==G&&0==u)G=H,u=1;else if(Math.abs(G-H)<=(Q||1==z&&K?p:0))u+=1;else if(1<u&&K){E=E.slice(0,z+1);break}else if(3<=E.length-z&&!K)u=0,I=G=0!=F?F:0,E.splice(0,0==z?1:z),z=-1;else break;0!=I||Q||(G=I=H)}3==E.length&&E[1]==n&&(I=0)}p=function(U,T,V,W){var t=[];if(W){W=L;var C=0}else W=0,C=L;t.push(new mxPoint(U.x-W,U.y-C));t.push(new mxPoint(U.x+W,U.y+C));t.push(U);t.push(T);t.push(new mxPoint(T.x-W,T.y-C));t.push(new mxPoint(T.x+W,T.y+C));if(null!=V)return V.points=t,V;U=new mxPolyline(t,mxConstants.GUIDE_COLOR, +mxConstants.GUIDE_STROKEWIDTH);U.dialect=mxConstants.DIALECT_SVG;U.pointerEvents=!1;U.init(k.graph.getView().getOverlayPane());return U};G=function(U,T){if(U&&null!=k.guidesArrHor)for(U=0;U<k.guidesArrHor.length;U++)k.guidesArrHor[U].node.style.visibility="hidden";if(T&&null!=k.guidesArrVer)for(U=0;U<k.guidesArrVer.length;U++)k.guidesArrVer[U].node.style.visibility="hidden"};if(1<u&&u==E.length-1){u=[];F=k.guidesArrHor;d=[];D=0;z=E[0]==n?1:0;K=E[z].y+E[z].height;if(0<I)for(z=0;z<E.length-1;z++)q= +E[z],H=E[z+1],n==q?(D=H.x-q.width-I,d.push(new mxPoint(D+q.width+L,K)),d.push(new mxPoint(H.x-L,K))):n==H?(d.push(new mxPoint(q.x+q.width+L,K)),D=q.x+q.width+I,d.push(new mxPoint(D-L,K))):(d.push(new mxPoint(q.x+q.width+L,K)),d.push(new mxPoint(H.x-L,K)));else q=E[0],z=E[2],D=q.x+q.width+(z.x-q.x-q.width-n.width)/2,d.push(new mxPoint(q.x+q.width+L,K)),d.push(new mxPoint(D-L,K)),d.push(new mxPoint(D+n.width+L,K)),d.push(new mxPoint(z.x-L,K));for(z=0;z<d.length;z+=2)E=d[z],I=d[z+1],E=p(E,I,null!=F? +F[z/2]:null),E.node.style.visibility="visible",E.redraw(),u.push(E);for(z=d.length/2;null!=F&&z<F.length;z++)F[z].destroy();k.guidesArrHor=u;D-=c.x;d=!0}else G(!0);if(1<J&&J==A.length-1){u=[];F=k.guidesArrVer;g=[];y=0;z=A[0]==n?1:0;J=A[z].x+A[z].width;if(0<B)for(z=0;z<A.length-1;z++)q=A[z],H=A[z+1],n==q?(y=H.y-q.height-B,g.push(new mxPoint(J,y+q.height+L)),g.push(new mxPoint(J,H.y-L))):n==H?(g.push(new mxPoint(J,q.y+q.height+L)),y=q.y+q.height+B,g.push(new mxPoint(J,y-L))):(g.push(new mxPoint(J,q.y+ +q.height+L)),g.push(new mxPoint(J,H.y-L)));else q=A[0],z=A[2],y=q.y+q.height+(z.y-q.y-q.height-n.height)/2,g.push(new mxPoint(J,q.y+q.height+L)),g.push(new mxPoint(J,y-L)),g.push(new mxPoint(J,y+n.height+L)),g.push(new mxPoint(J,z.y-L));for(z=0;z<g.length;z+=2)E=g[z],I=g[z+1],E=p(E,I,null!=F?F[z/2]:null,!0),E.node.style.visibility="visible",E.redraw(),u.push(E);for(z=g.length/2;null!=F&&z<F.length;z++)F[z].destroy();k.guidesArrVer=u;y-=c.y;g=!0}else G(!1,!0)}if(d||g)return n=new mxPoint(D,y),A=b.call(this, c,n,m,x),d&&!g?n.y=A.y:g&&!d&&(n.x=A.x),A.y!=n.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),A.x!=n.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),n;G(!0,!0);return b.apply(this,arguments)};var e=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(c){e.call(this,c);var l=this.guidesArrVer,m=this.guidesArrHor;if(null!=l)for(var x=0;x<l.length;x++)l[x].node.style.visibility=c?"visible":"hidden";if(null!= -m)for(x=0;x<m.length;x++)m[x].node.style.visibility=c?"visible":"hidden"};var f=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){f.call(this);var c=this.guidesArrVer,l=this.guidesArrHor;if(null!=c){for(var m=0;m<c.length;m++)c[m].destroy();this.guidesArrVer=null}if(null!=l){for(m=0;m<l.length;m++)l[m].destroy();this.guidesArrHor=null}}})();function mxRuler(b,e,f,c){function l(){var J=b.diagramContainer;k.style.top=J.offsetTop-C+"px";k.style.left=J.offsetLeft-C+"px";k.style.width=(f?0:J.offsetWidth)+C+"px";k.style.height=(f?J.offsetHeight:0)+C+"px"}function m(J,N,v){if(null!=x)return J;var u;return function(){var G=this,H=arguments,M=v&&!u;clearTimeout(u);u=setTimeout(function(){u=null;v||J.apply(G,H)},N);M&&J.apply(G,H)}}var x=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame, -z=window.cancelAnimationFrame||window.mozCancelAnimationFrame,C=this.RULER_THICKNESS,d=this;this.unit=e;var g=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},k=document.createElement("div");k.style.position="absolute";this.updateStyle=mxUtils.bind(this,function(){g=Editor.isDarkMode()? +m)for(x=0;x<m.length;x++)m[x].node.style.visibility=c?"visible":"hidden"};var f=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){f.call(this);var c=this.guidesArrVer,l=this.guidesArrHor;if(null!=c){for(var m=0;m<c.length;m++)c[m].destroy();this.guidesArrVer=null}if(null!=l){for(m=0;m<l.length;m++)l[m].destroy();this.guidesArrHor=null}}})();function mxRuler(b,e,f,c){function l(){var J=b.diagramContainer;k.style.top=J.offsetTop-D+"px";k.style.left=J.offsetLeft-D+"px";k.style.width=(f?0:J.offsetWidth)+D+"px";k.style.height=(f?J.offsetHeight:0)+D+"px"}function m(J,M,v){if(null!=x)return J;var u;return function(){var G=this,I=arguments,F=v&&!u;clearTimeout(u);u=setTimeout(function(){u=null;v||J.apply(G,I)},M);F&&J.apply(G,I)}}var x=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame, +y=window.cancelAnimationFrame||window.mozCancelAnimationFrame,D=this.RULER_THICKNESS,d=this;this.unit=e;var g=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},k=document.createElement("div");k.style.position="absolute";this.updateStyle=mxUtils.bind(this,function(){g=Editor.isDarkMode()? {bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};k.style.background=g.bkgClr;k.style[f?"borderRight":"borderBottom"]="0.5px solid "+g.strokeClr;k.style.borderLeft="0.5px solid "+g.strokeClr});this.updateStyle();document.body.appendChild(k);mxEvent.disableContextMenu(k);this.editorUiRefresh=b.refresh;b.refresh= -function(J){d.editorUiRefresh.apply(b,arguments);l()};l();var n=document.createElement("canvas");n.width=k.offsetWidth;n.height=k.offsetHeight;k.style.overflow="hidden";n.style.position="relative";k.appendChild(n);var t=n.getContext("2d");this.ui=b;var p=b.editor.graph;this.graph=p;this.container=k;this.canvas=n;var A=function(J,N,v,u,G){J=Math.round(J);N=Math.round(N);v=Math.round(v);u=Math.round(u);t.beginPath();t.moveTo(J+.5,N+.5);t.lineTo(v+.5,u+.5);t.stroke();G&&(f?(t.save(),t.translate(J,N), -t.rotate(-Math.PI/2),t.fillText(G,0,0),t.restore()):t.fillText(G,J,N))},E=function(){t.clearRect(0,0,n.width,n.height);t.beginPath();t.lineWidth=.7;t.strokeStyle=g.strokeClr;t.setLineDash([]);t.font="9px Arial";t.textAlign="center";var J=p.view.scale,N=p.view.getBackgroundPageBounds(),v=p.view.translate,u=p.pageVisible;v=u?C+(f?N.y-p.container.scrollTop:N.x-p.container.scrollLeft):C+(f?v.y*J-p.container.scrollTop:v.x*J-p.container.scrollLeft);var G=0;u&&(G=p.getPageLayout(),G=f?G.y*p.pageFormat.height: -G.x*p.pageFormat.width);var H;switch(d.unit){case mxConstants.POINTS:var M=H=10;var K=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:H=10;M=mxConstants.PIXELS_PER_MM;K=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:H=20;M=mxConstants.PIXELS_PER_MM;K=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:H=.5>=J||4<=J?8:16,M=mxConstants.PIXELS_PER_INCH/H,K=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var I=M;2<=J?I=M/(2*Math.floor(J/2)):.5>=J&&(I=M*Math.floor(1/J/2)*(d.unit== -mxConstants.MILLIMETERS?2:1));M=null;N=u?Math.min(v+(f?N.height:N.width),f?n.height:n.width):f?n.height:n.width;if(u)if(t.fillStyle=g.outBkgClr,f){var F=v-C;0<F&&t.fillRect(0,C,C,F);N<n.height&&t.fillRect(0,N,C,n.height)}else F=v-C,0<F&&t.fillRect(C,0,F,C),N<n.width&&t.fillRect(N,0,n.width,C);t.fillStyle=g.fontClr;for(u=u?v:v%(I*J);u<=N;u+=I*J)if(F=Math.round((u-v)/J/I),!(u<C||F==M)){M=F;var P=null;0==F%H&&(P=d.formatText(G+F*I)+"");f?A(C-K[Math.abs(F)%H],u,C,u,P):A(u,C-K[Math.abs(F)%H],u,C,P)}t.lineWidth= -1;A(f?0:C,f?C:0,C,C);t.fillStyle=g.cornerClr;t.fillRect(0,0,C,C)},y=-1,B=function(){null!=x?(null!=z&&z(y),y=x(E)):E()};this.drawRuler=B;this.sizeListener=e=m(function(){var J=p.container;f?(J=J.offsetHeight+C,n.height!=J&&(n.height=J,k.style.height=J+"px",B())):(J=J.offsetWidth+C,n.width!=J&&(n.width=J,k.style.width=J+"px",B()))},10);this.pageListener=function(){B()};this.scrollListener=c=m(function(){var J=f?p.container.scrollTop:p.container.scrollLeft;d.lastScroll!=J&&(d.lastScroll=J,B())},10); -this.unitListener=function(J,N){d.setUnit(N.getProperty("unit"))};p.addListener(mxEvent.SIZE,e);p.container.addEventListener("scroll",c);p.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(J){g=J;k.style.background=g.bkgClr;E()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(J,N,v,u){if(f&&4<J.height|| -!f&&4<J.width){if(null!=d.guidePart)try{t.putImageData(d.guidePart.imgData1,d.guidePart.x1,d.guidePart.y1),t.putImageData(d.guidePart.imgData2,d.guidePart.x2,d.guidePart.y2),t.putImageData(d.guidePart.imgData3,d.guidePart.x3,d.guidePart.y3)}catch(W){}var G=d.origGuideMove.apply(this,arguments);try{t.lineWidth=.5;t.strokeStyle=g.guideClr;t.setLineDash([2]);if(f){var H=J.y+G.y+C-this.graph.container.scrollTop;var M=0;var K=H+J.height/2;var I=C/2;var F=H+J.height;var P=0;var U=t.getImageData(M,H-1,C, -3);A(M,H,C,H);H--;var T=t.getImageData(I,K-1,C,3);A(I,K,C,K);K--;var V=t.getImageData(P,F-1,C,3);A(P,F,C,F);F--}else H=0,M=J.x+G.x+C-this.graph.container.scrollLeft,K=C/2,I=M+J.width/2,F=0,P=M+J.width,U=t.getImageData(M-1,H,3,C),A(M,H,M,C),M--,T=t.getImageData(I-1,K,3,C),A(I,K,I,C),I--,V=t.getImageData(P-1,F,3,C),A(P,F,P,C),P--;if(null==d.guidePart||d.guidePart.x1!=M||d.guidePart.y1!=H)d.guidePart={imgData1:U,x1:M,y1:H,imgData2:T,x2:I,y2:K,imgData3:V,x3:P,y3:F}}catch(W){}}else G=d.origGuideMove.apply(this, -arguments);return G};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var J=d.origGuideDestroy.apply(this,arguments);if(null!=d.guidePart)try{t.putImageData(d.guidePart.imgData1,d.guidePart.x1,d.guidePart.y1),t.putImageData(d.guidePart.imgData2,d.guidePart.x2,d.guidePart.y2),t.putImageData(d.guidePart.imgData3,d.guidePart.x3,d.guidePart.y3),d.guidePart=null}catch(N){}return J}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS; +function(J){d.editorUiRefresh.apply(b,arguments);l()};l();var n=document.createElement("canvas");n.width=k.offsetWidth;n.height=k.offsetHeight;k.style.overflow="hidden";n.style.position="relative";k.appendChild(n);var q=n.getContext("2d");this.ui=b;var p=b.editor.graph;this.graph=p;this.container=k;this.canvas=n;var A=function(J,M,v,u,G){J=Math.round(J);M=Math.round(M);v=Math.round(v);u=Math.round(u);q.beginPath();q.moveTo(J+.5,M+.5);q.lineTo(v+.5,u+.5);q.stroke();G&&(f?(q.save(),q.translate(J,M), +q.rotate(-Math.PI/2),q.fillText(G,0,0),q.restore()):q.fillText(G,J,M))},E=function(){q.clearRect(0,0,n.width,n.height);q.beginPath();q.lineWidth=.7;q.strokeStyle=g.strokeClr;q.setLineDash([]);q.font="9px Arial";q.textAlign="center";var J=p.view.scale,M=p.view.getBackgroundPageBounds(),v=p.view.translate,u=p.pageVisible;v=u?D+(f?M.y-p.container.scrollTop:M.x-p.container.scrollLeft):D+(f?v.y*J-p.container.scrollTop:v.x*J-p.container.scrollLeft);var G=0;u&&(G=p.getPageLayout(),G=f?G.y*p.pageFormat.height: +G.x*p.pageFormat.width);var I;switch(d.unit){case mxConstants.POINTS:var F=I=10;var L=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:I=10;F=mxConstants.PIXELS_PER_MM;L=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:I=20;F=mxConstants.PIXELS_PER_MM;L=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:I=.5>=J||4<=J?8:16,F=mxConstants.PIXELS_PER_INCH/I,L=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var K=F;2<=J?K=F/(2*Math.floor(J/2)):.5>=J&&(K=F*Math.floor(1/J/2)*(d.unit== +mxConstants.MILLIMETERS?2:1));F=null;M=u?Math.min(v+(f?M.height:M.width),f?n.height:n.width):f?n.height:n.width;if(u)if(q.fillStyle=g.outBkgClr,f){var H=v-D;0<H&&q.fillRect(0,D,D,H);M<n.height&&q.fillRect(0,M,D,n.height)}else H=v-D,0<H&&q.fillRect(D,0,H,D),M<n.width&&q.fillRect(M,0,n.width,D);q.fillStyle=g.fontClr;for(u=u?v:v%(K*J);u<=M;u+=K*J)if(H=Math.round((u-v)/J/K),!(u<D||H==F)){F=H;var Q=null;0==H%I&&(Q=d.formatText(G+H*K)+"");f?A(D-L[Math.abs(H)%I],u,D,u,Q):A(u,D-L[Math.abs(H)%I],u,D,Q)}q.lineWidth= +1;A(f?0:D,f?D:0,D,D);q.fillStyle=g.cornerClr;q.fillRect(0,0,D,D)},z=-1,B=function(){null!=x?(null!=y&&y(z),z=x(E)):E()};this.drawRuler=B;this.sizeListener=e=m(function(){var J=p.container;f?(J=J.offsetHeight+D,n.height!=J&&(n.height=J,k.style.height=J+"px",B())):(J=J.offsetWidth+D,n.width!=J&&(n.width=J,k.style.width=J+"px",B()))},10);this.pageListener=function(){B()};this.scrollListener=c=m(function(){var J=f?p.container.scrollTop:p.container.scrollLeft;d.lastScroll!=J&&(d.lastScroll=J,B())},10); +this.unitListener=function(J,M){d.setUnit(M.getProperty("unit"))};p.addListener(mxEvent.SIZE,e);p.container.addEventListener("scroll",c);p.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(J){g=J;k.style.background=g.bkgClr;E()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(J,M,v,u){if(f&&4<J.height|| +!f&&4<J.width){if(null!=d.guidePart)try{q.putImageData(d.guidePart.imgData1,d.guidePart.x1,d.guidePart.y1),q.putImageData(d.guidePart.imgData2,d.guidePart.x2,d.guidePart.y2),q.putImageData(d.guidePart.imgData3,d.guidePart.x3,d.guidePart.y3)}catch(W){}var G=d.origGuideMove.apply(this,arguments);try{q.lineWidth=.5;q.strokeStyle=g.guideClr;q.setLineDash([2]);if(f){var I=J.y+G.y+D-this.graph.container.scrollTop;var F=0;var L=I+J.height/2;var K=D/2;var H=I+J.height;var Q=0;var U=q.getImageData(F,I-1,D, +3);A(F,I,D,I);I--;var T=q.getImageData(K,L-1,D,3);A(K,L,D,L);L--;var V=q.getImageData(Q,H-1,D,3);A(Q,H,D,H);H--}else I=0,F=J.x+G.x+D-this.graph.container.scrollLeft,L=D/2,K=F+J.width/2,H=0,Q=F+J.width,U=q.getImageData(F-1,I,3,D),A(F,I,F,D),F--,T=q.getImageData(K-1,L,3,D),A(K,L,K,D),K--,V=q.getImageData(Q-1,H,3,D),A(Q,H,Q,D),Q--;if(null==d.guidePart||d.guidePart.x1!=F||d.guidePart.y1!=I)d.guidePart={imgData1:U,x1:F,y1:I,imgData2:T,x2:K,y2:L,imgData3:V,x3:Q,y3:H}}catch(W){}}else G=d.origGuideMove.apply(this, +arguments);return G};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var J=d.origGuideDestroy.apply(this,arguments);if(null!=d.guidePart)try{q.putImageData(d.guidePart.imgData1,d.guidePart.x1,d.guidePart.y1),q.putImageData(d.guidePart.imgData2,d.guidePart.x2,d.guidePart.y2),q.putImageData(d.guidePart.imgData3,d.guidePart.x3,d.guidePart.y3),d.guidePart=null}catch(M){}return J}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS; mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};mxRuler.prototype.formatText=function(b){switch(this.unit){case mxConstants.POINTS:return Math.round(b);case mxConstants.MILLIMETERS:return(b/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(b/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(b/mxConstants.PIXELS_PER_INCH).toFixed(2)}}; mxRuler.prototype.destroy=function(){this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.graph.removeListener(this.sizeListener);this.graph.container.removeEventListener("scroll",this.scrollListener);this.graph.view.removeListener("unitChanged",this.unitListener);this.ui.removeListener("pageViewChanged",this.pageListener);this.ui.removeListener("pageScaleChanged",this.pageListener);this.ui.removeListener("pageFormatChanged", this.pageListener);null!=this.container&&this.container.parentNode.removeChild(this.container)}; function mxDualRuler(b,e){var f=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return f};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,e,!0);this.hRuler=new mxRuler(b,e,!1,!0);e=mxUtils.bind(this,function(c){var l=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this, function(m){l=null!=b.currentMenu;mxEvent.consume(m)}),null,mxUtils.bind(this,function(m){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(m)||mxEvent.isPopupTrigger(m))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(m)||!l){var x=new mxPopupMenu(mxUtils.bind(this,function(d,g){b.menus.addMenuItems(d,["points","inches","millimeters","meters"],g)}));x.div.className+=" geMenubarMenu";x.smartSeparators=!0;x.showDisabled=!0;x.autoExpand= -!0;x.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(x,arguments);b.resetCurrentMenu();x.destroy()});var z=mxEvent.getClientX(m),C=mxEvent.getClientY(m);x.popup(z,C,null,m);b.setCurrentMenu(x,c)}mxEvent.consume(m)}}))});e(this.hRuler.container);e(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()}; -mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var e=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=e){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var f=mxFreehand.prototype.NORMAL_SMOOTHING,c=null,l=[],m,x=[],z,C=!1,d=!0,g=!0,k=!0,n=!0,t=[],p=!1,A=!0,E=!1,y={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},B=!0;this.setClosedPath=function(K){C=K};this.setAutoClose=function(K){d=K};this.setAutoInsert= -function(K){g=K};this.setAutoScroll=function(K){k=K};this.setOpenFill=function(K){n=K};this.setStopClickEnabled=function(K){A=K};this.setSelectInserted=function(K){E=K};this.setSmoothing=function(K){f=K};this.setPerfectFreehandMode=function(K){B=K};this.isPerfectFreehandMode=function(){return B};this.setBrushSize=function(K){y.size=K};this.getBrushSize=function(){return y.size};var J=function(K){p=K;b.getRubberband().setEnabled(!K);b.graphHandler.setSelectEnabled(!K);b.graphHandler.setMoveEnabled(!K); -b.container.style.cursor=K?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){J(!0)};this.isDrawing=function(){return p};var N=mxUtils.bind(this,function(K){if(c){var I=z.length,F=A&&0<x.length&&null!=z&&2>z.length;F||x.push.apply(x,z);z=[];x.push(null);l.push(c);c=null;(F||g)&&this.stopDrawing();g&&2<=I&&this.startDrawing();mxEvent.consume(K)}}),v=new mxCell;v.edge=!0;var u=function(){var K=b.getCurrentCellStyle(v);K=mxUtils.getValue(b.currentVertexStyle, -mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(K,mxConstants.STYLE_STROKECOLOR,"#000"));"default"==K&&(K=b.shapeForegroundColor);return K};this.createStyle=function(K){var I=";fillColor=none;";B&&(I=";lineShape=1;");return mxConstants.STYLE_SHAPE+"="+K+I};this.stopDrawing=function(){if(0<l.length){if(B){for(var K=[],I=0;I<x.length;I++)null!=x[I]&&K.push([x[I].x,x[I].y]);K=PerfectFreehand.getStroke(K,y);x=[];for(I=0;I<K.length;I++)x.push({x:K[I][0],y:K[I][1]});x.push(null)}K=x[0].x;var F=x[0].x,P= -x[0].y,U=x[0].y;for(I=1;I<x.length;I++)null!=x[I]&&(K=Math.max(K,x[I].x),F=Math.min(F,x[I].x),P=Math.max(P,x[I].y),U=Math.min(U,x[I].y));K-=F;P-=U;if(0<K&&0<P){var T=100/K,V=100/P;x.map(function(R){if(null==R)return R;R.x=(R.x-F)*T;R.y=(R.y-U)*V;return R});var W='<shape strokewidth="inherit"><foreground>',q=0;for(I=0;I<x.length;I++){var D=x[I];if(null==D){D=!1;q=x[q];var L=x[I-1];!C&&d&&(D=q.x-L.x,L=q.y-L.y,D=Math.sqrt(D*D+L*L)<=b.tolerance);if(C||D)W+='<line x="'+q.x.toFixed(2)+'" y="'+q.y.toFixed(2)+ -'"/>';W+="</path>"+(n||C||D?"<fillstroke/>":"<stroke/>");q=I+1}else W=I==q?W+('<path><move x="'+D.x.toFixed(2)+'" y="'+D.y.toFixed(2)+'"/>'):W+('<line x="'+D.x.toFixed(2)+'" y="'+D.y.toFixed(2)+'"/>')}W+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){I=this.createStyle("stencil("+Graph.compress(W)+")");W=b.view.scale;q=b.view.translate;I=new mxCell("",new mxGeometry(F/W-q.x,U/W-q.y,K/W,P/W),I);I.vertex=1;b.model.beginUpdate();try{I=b.addCell(I),b.fireEvent(new mxEventObject("cellsInserted", -"cells",[I])),b.fireEvent(new mxEventObject("freehandInserted","cell",I))}finally{b.model.endUpdate()}E&&b.setSelectionCells([I])}}for(I=0;I<l.length;I++)l[I].parentNode.removeChild(l[I]);c=null;l=[];x=[]}J(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(K,I){K=I.getProperty("eventName");I=I.getProperty("event");K==mxEvent.MOUSE_MOVE&&p&&(null!=I.sourceState&&I.sourceState.setCursor("crosshair"),I.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(K,I){if(b.isEnabled()&& -!b.isCellLocked(b.getDefaultParent())&&(K=I.getEvent(),p&&!mxEvent.isPopupTrigger(K)&&!mxEvent.isMultiTouchEvent(K))){var F=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);F=Math.max(1,F*b.view.scale);var P=u();c=document.createElementNS("http://www.w3.org/2000/svg","path");c.setAttribute("fill",B?P:"none");c.setAttribute("stroke",P);c.setAttribute("stroke-width",F);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(P=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3", -P=P.split(" ").map(function(U){return parseFloat(U)*F}).join(" "),c.setAttribute("stroke-dasharray",P));t=[];K=G(K);H(K);m="M"+K.x+" "+K.y;x.push(K);z=[];c.setAttribute("d",B?PerfectFreehand.getSvgPathFromStroke([[K.x,K.y]],y):m);e.appendChild(c);I.consume()}}),mouseMove:mxUtils.bind(this,function(K,I){if(c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){K=I.getEvent();K=G(K);H(K);var F=M(0);if(F)if(x.push(F),B){var P=[];for(F=0;F<x.length;F++)P.push([x[F].x,x[F].y]);z=[];for(var U=2;U<t.length;U+= -2)F=M(U),P.push([F.x,F.y]),z.push(F);c.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(P,y))}else{m+=" L"+F.x+" "+F.y;P="";z=[];for(U=2;U<t.length;U+=2)F=M(U),P+=" L"+F.x+" "+F.y,z.push(F);c.setAttribute("d",m+P)}k&&(F=b.view.translate,b.scrollRectToVisible((new mxRectangle(K.x-F.x,K.y-F.y)).grow(20)));I.consume()}}),mouseUp:mxUtils.bind(this,function(K,I){c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(N(I.getEvent()),I.consume())})});var G=function(K){return mxUtils.convertPoint(b.container, -mxEvent.getClientX(K),mxEvent.getClientY(K))},H=function(K){for(t.push(K);t.length>f;)t.shift()},M=function(K){var I=t.length;if(1===I%2||I>=f){var F=0,P=0,U,T=0;for(U=K;U<I;U++)T++,K=t[U],F+=K.x,P+=K.y;return{x:F/T,y:P/T}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;function P2PCollab(b,e,f){function c(T,V){try{if(!M){var W=e.file.getCurrentUser();if(H&&null!=W&&null!=W.displayName){var q={from:N,id:A,type:T,sessionId:e.clientId,userId:W.id,username:W.displayName,data:V,protocol:DrawioFileSync.PROTOCOL,editor:EditorUi.VERSION};q={bytes:e.objectToString(q),data:"aes"};q=JSON.stringify(q);K&&"cursor"!=T&&EditorUi.debug("P2PCollab: sending to socket server",[q]);A++;T=!K&&("cursor"==T||"selectionChange"==T);G&&!T&&U("message",q);if(T)for(p2pId in u)u[p2pId].send(q)}}}catch(D){null!= -window.console&&console.log("Error:",D)}}function l(T){if(b.shareCursorPosition&&!g.isMouseDown){var V=mxUtils.getOffset(g.container),W=g.view.translate,q=g.view.scale,D=null!=b.currentPage?b.currentPage.getId():null;c("cursor",{pageId:D,x:Math.round((T.getX()-V.x+g.container.scrollLeft)/q-W.x),y:Math.round((T.getY()-V.y+g.container.scrollTop)/q-W.y)})}}function m(T,V){var W=null!=b.currentPage?b.currentPage.getId():null;if(null!=T&&null!=T.cursor&&null!=T.lastCursor)if(null!=T.lastCursor.hide||!b.isShowRemoteCursors()|| -null!=T.lastCursor.pageId&&T.lastCursor.pageId!=W)T.cursor.style.display="none";else{W=function(){var Q=Math.max(g.container.scrollLeft,Math.min(g.container.scrollLeft+g.container.clientWidth-T.cursor.clientWidth,L)),S=Math.max(g.container.scrollTop-22,Math.min(g.container.scrollTop+g.container.clientHeight-T.cursor.clientHeight,R));O.style.opacity=Q!=L||S!=R?0:1;T.cursor.style.left=Q+"px";T.cursor.style.top=S+"px";T.cursor.style.display=""};var q=g.view.translate,D=g.view.scale,L=(q.x+T.lastCursor.x)* -D+8,R=(q.y+T.lastCursor.y)*D-12,O=T.cursor.getElementsByTagName("img")[0];V?(mxUtils.setPrefixedStyle(T.cursor.style,"transition","all 900ms ease-out"),mxUtils.setPrefixedStyle(O.style,"transition","all 900ms ease-out"),window.setTimeout(W,0)):(mxUtils.setPrefixedStyle(T.cursor.style,"transition",null),mxUtils.setPrefixedStyle(O.style,"transition",null),W())}}function x(T,V){try{var W=function(){if(null==p[D]){var Y=J[D];null==Y&&(Y=k%t.length,J[D]=Y,k++);var Z=t[Y];Y=11<Y?"black":"white";p[D]={cursor:document.createElement("div"), -color:Z,selection:{}};y[V]=D;L=p[D].cursor;L.style.pointerEvents="none";L.style.position="absolute";L.style.display="none";L.style.opacity="0.9";var ba=document.createElement("img");mxUtils.setPrefixedStyle(ba.style,"transform","rotate(-45deg)translateX(-14px)");ba.setAttribute("src",Graph.createSvgImage(8,12,'<path d="M 4 0 L 8 12 L 4 10 L 0 12 Z" stroke="'+Z+'" fill="'+Z+'"/>').src);ba.style.width="10px";L.appendChild(ba);ba=document.createElement("div");ba.style.backgroundColor=Z;ba.style.color= -Y;ba.style.fontSize="9pt";ba.style.padding="3px 7px";ba.style.marginTop="8px";ba.style.borderRadius="10px";ba.style.maxWidth="100px";ba.style.overflow="hidden";ba.style.textOverflow="ellipsis";ba.style.whiteSpace="nowrap";mxUtils.write(ba,q);L.appendChild(ba);b.diagramContainer.appendChild(L)}else L=p[D].cursor;R=p[D].selection};if(!M){T=JSON.parse(T);null!=T.bytes&&(T=e.stringToObject(T.bytes));K&&"cursor"!=T.type&&EditorUi.debug("P2PCollab: msg received",[T]);if(null!=V){if(T.from==N||E[T.from]>= -T.id){EditorUi.debug("P2PCollab: Dropped Message",T,N,E[T.from]);return}E[T.from]=T.id}var q=T.username?T.username:"Anonymous",D=T.sessionId,L,R;null!=p[D]&&(clearTimeout(p[D].inactiveTO),p[D].inactiveTO=setTimeout(function(){C(null,D)},12E4));var O=T.data;switch(T.type){case "cursor":W();p[D].lastCursor=O;m(p[D],!0);break;case "diff":try{T=null!=O.patch?e.stringToObject(decodeURIComponent(O.patch)):O.diff,e.receiveRemoteChanges(T.d)}catch(Y){EditorUi.debug("P2PCollab: Diff msg error",Y)}break;case "selectionChange":if("0"!= -urlParams["remote-selection"]){var Q=null!=b.currentPage?b.currentPage.getId():null;if(null==Q||null!=O.pageId&&O.pageId==Q){W();for(W=0;W<O.removed.length;W++){var S=O.removed[W];if(null!=S){var X=R[S];delete R[S];null!=X&&X.destroy()}}for(W=0;W<O.added.length;W++)if(S=O.added[W],null!=S){var aa=g.model.getCell(S);null!=aa&&(R[S]=g.highlightCell(aa,p[D].color,6E4,70,3))}}}}e.file.fireEvent(new mxEventObject("realtimeMessage","message",T))}}catch(Y){null!=window.console&&console.log("Error:",Y)}} -function z(T,V){if(!K&&SimplePeer.WEBRTC_SUPPORT){var W=new SimplePeer({initiator:V,config:{iceServers:[{urls:"stun:54.89.235.160:3478"}]}});W.on("signal",function(q){U("sendSignal",{to:T,from:N,signal:q})});W.on("error",function(q){delete v[T];EditorUi.debug("P2PCollab: p2p socket error",q);!M&&V&&W.destroyed&&B[T]&&(EditorUi.debug("P2PCollab: p2p socket reconnecting",T),z(T,!0))});W.on("connect",function(){delete v[T];null==u[T]||u[T].destroyed?(u[T]=W,B[T]=!0,EditorUi.debug("P2PCollab: p2p socket connected", -T)):(W.noP2PMapDel=!0,W.destroy(),EditorUi.debug("P2PCollab: p2p socket duplicate",T))});W.on("close",function(){W.noP2PMapDel||(EditorUi.debug("P2PCollab: p2p socket closed",T),d(y[T]),delete u[T])});W.on("data",x);return v[T]=W}}function C(T,V){d(V||y[T]);null!=T&&(delete y[T],B[T]=!1)}function d(T){var V=p[T];if(null!=V){var W=V.selection,q;for(q in W)null!=W[q]&&W[q].destroy();null!=V.cursor&&null!=V.cursor.parentNode&&V.cursor.parentNode.removeChild(V.cursor);clearTimeout(V.inactiveTO);delete p[T]}} -var g=b.editor.graph,k=0,n=null,t="#e6194b #3cb44b #4363d8 #f58231 #911eb4 #f032e6 #469990 #9A6324 #800000 #808000 #000075 #a9a9a9 #ffe119 #42d4f4 #bfef45 #fabed4 #dcbeff #fffac8 #aaffc3 #ffd8b1".split(" "),p={},A=1,E={},y={},B={},J={},N,v={},u={},G=!0,H=!1,M=!1,K="0"!=urlParams["no-p2p"],I=!1,F=0,P=null,U=mxUtils.bind(this,function(T,V){if(!M)try{null!=n?(n.send(JSON.stringify({action:T,msg:V})),K||EditorUi.debug("P2PCollab: sending to socket server",[T],[V])):this.joinFile(!0)}catch(W){P=W,e.file.fireEvent(new mxEventObject("realtimeStateChanged")), -EditorUi.debug("P2PCollab:","sendReply error",arguments,W)}});this.sendMessage=c;this.sendDiff=function(T){this.sendMessage("diff",{diff:T})};this.getState=function(){return null!=n?n.readyState:3};this.getLastError=function(){return P};this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(T,V){},mouseMove:function(T,V){var W,q=-1;return function(){clearTimeout(W);var D=this,L=arguments,R=function(){W=null;q=Date.now();T.apply(D,L)};Date.now()-q>V?R():W=setTimeout(R,V)}}(function(T, -V){l(V)},300),mouseUp:function(T,V){l(V)}};g.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()||c("cursor",{hide:!0})};b.addListener("shareCursorPositionChanged",this.shareCursorPositionListener);this.selectionChangeListener=function(T,V){T=function(D){return null!=D?D.id:null};var W=null!=b.currentPage?b.currentPage.getId():null,q=V.getProperty("added");V=V.getProperty("removed");c("selectionChange",{pageId:W,removed:q?q.map(T):[],added:V? +!0;x.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(x,arguments);b.resetCurrentMenu();x.destroy()});var y=mxEvent.getClientX(m),D=mxEvent.getClientY(m);x.popup(y,D,null,m);b.setCurrentMenu(x,c)}mxEvent.consume(m)}}))});e(this.hRuler.container);e(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()}; +mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var e=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=e){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var f=mxFreehand.prototype.NORMAL_SMOOTHING,c=null,l=[],m,x=[],y,D=!1,d=!0,g=!0,k=!0,n=!0,q=[],p=!1,A=!0,E=!1,z={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},B=!0;this.setClosedPath=function(L){D=L};this.setAutoClose=function(L){d=L};this.setAutoInsert= +function(L){g=L};this.setAutoScroll=function(L){k=L};this.setOpenFill=function(L){n=L};this.setStopClickEnabled=function(L){A=L};this.setSelectInserted=function(L){E=L};this.setSmoothing=function(L){f=L};this.setPerfectFreehandMode=function(L){B=L};this.isPerfectFreehandMode=function(){return B};this.setBrushSize=function(L){z.size=L};this.getBrushSize=function(){return z.size};var J=function(L){p=L;b.getRubberband().setEnabled(!L);b.graphHandler.setSelectEnabled(!L);b.graphHandler.setMoveEnabled(!L); +b.container.style.cursor=L?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){J(!0)};this.isDrawing=function(){return p};var M=mxUtils.bind(this,function(L){if(c){var K=y.length,H=A&&0<x.length&&null!=y&&2>y.length;H||x.push.apply(x,y);y=[];x.push(null);l.push(c);c=null;(H||g)&&this.stopDrawing();g&&2<=K&&this.startDrawing();mxEvent.consume(L)}}),v=new mxCell;v.edge=!0;var u=function(){var L=b.getCurrentCellStyle(v);L=mxUtils.getValue(b.currentVertexStyle, +mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(L,mxConstants.STYLE_STROKECOLOR,"#000"));"default"==L&&(L=b.shapeForegroundColor);return L};this.createStyle=function(L){var K=";fillColor=none;";B&&(K=";lineShape=1;");return mxConstants.STYLE_SHAPE+"="+L+K};this.stopDrawing=function(){if(0<l.length){if(B){for(var L=[],K=0;K<x.length;K++)null!=x[K]&&L.push([x[K].x,x[K].y]);L=PerfectFreehand.getStroke(L,z);x=[];for(K=0;K<L.length;K++)x.push({x:L[K][0],y:L[K][1]});x.push(null)}L=x[0].x;var H=x[0].x,Q= +x[0].y,U=x[0].y;for(K=1;K<x.length;K++)null!=x[K]&&(L=Math.max(L,x[K].x),H=Math.min(H,x[K].x),Q=Math.max(Q,x[K].y),U=Math.min(U,x[K].y));L-=H;Q-=U;if(0<L&&0<Q){var T=100/L,V=100/Q;x.map(function(R){if(null==R)return R;R.x=(R.x-H)*T;R.y=(R.y-U)*V;return R});var W='<shape strokewidth="inherit"><foreground>',t=0;for(K=0;K<x.length;K++){var C=x[K];if(null==C){C=!1;t=x[t];var N=x[K-1];!D&&d&&(C=t.x-N.x,N=t.y-N.y,C=Math.sqrt(C*C+N*N)<=b.tolerance);if(D||C)W+='<line x="'+t.x.toFixed(2)+'" y="'+t.y.toFixed(2)+ +'"/>';W+="</path>"+(n||D||C?"<fillstroke/>":"<stroke/>");t=K+1}else W=K==t?W+('<path><move x="'+C.x.toFixed(2)+'" y="'+C.y.toFixed(2)+'"/>'):W+('<line x="'+C.x.toFixed(2)+'" y="'+C.y.toFixed(2)+'"/>')}W+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){K=this.createStyle("stencil("+Graph.compress(W)+")");W=b.view.scale;t=b.view.translate;K=new mxCell("",new mxGeometry(H/W-t.x,U/W-t.y,L/W,Q/W),K);K.vertex=1;b.model.beginUpdate();try{K=b.addCell(K),b.fireEvent(new mxEventObject("cellsInserted", +"cells",[K])),b.fireEvent(new mxEventObject("freehandInserted","cell",K))}finally{b.model.endUpdate()}E&&b.setSelectionCells([K])}}for(K=0;K<l.length;K++)l[K].parentNode.removeChild(l[K]);c=null;l=[];x=[]}J(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(L,K){L=K.getProperty("eventName");K=K.getProperty("event");L==mxEvent.MOUSE_MOVE&&p&&(null!=K.sourceState&&K.sourceState.setCursor("crosshair"),K.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(L,K){if(b.isEnabled()&& +!b.isCellLocked(b.getDefaultParent())&&(L=K.getEvent(),p&&!mxEvent.isPopupTrigger(L)&&!mxEvent.isMultiTouchEvent(L))){var H=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);H=Math.max(1,H*b.view.scale);var Q=u();c=document.createElementNS("http://www.w3.org/2000/svg","path");c.setAttribute("fill",B?Q:"none");c.setAttribute("stroke",Q);c.setAttribute("stroke-width",H);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(Q=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3", +Q=Q.split(" ").map(function(U){return parseFloat(U)*H}).join(" "),c.setAttribute("stroke-dasharray",Q));q=[];L=G(L);I(L);m="M"+L.x+" "+L.y;x.push(L);y=[];c.setAttribute("d",B?PerfectFreehand.getSvgPathFromStroke([[L.x,L.y]],z):m);e.appendChild(c);K.consume()}}),mouseMove:mxUtils.bind(this,function(L,K){if(c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){L=K.getEvent();L=G(L);I(L);var H=F(0);if(H)if(x.push(H),B){var Q=[];for(H=0;H<x.length;H++)Q.push([x[H].x,x[H].y]);y=[];for(var U=2;U<q.length;U+= +2)H=F(U),Q.push([H.x,H.y]),y.push(H);c.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(Q,z))}else{m+=" L"+H.x+" "+H.y;Q="";y=[];for(U=2;U<q.length;U+=2)H=F(U),Q+=" L"+H.x+" "+H.y,y.push(H);c.setAttribute("d",m+Q)}k&&(H=b.view.translate,b.scrollRectToVisible((new mxRectangle(L.x-H.x,L.y-H.y)).grow(20)));K.consume()}}),mouseUp:mxUtils.bind(this,function(L,K){c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(M(K.getEvent()),K.consume())})});var G=function(L){return mxUtils.convertPoint(b.container, +mxEvent.getClientX(L),mxEvent.getClientY(L))},I=function(L){for(q.push(L);q.length>f;)q.shift()},F=function(L){var K=q.length;if(1===K%2||K>=f){var H=0,Q=0,U,T=0;for(U=L;U<K;U++)T++,L=q[U],H+=L.x,Q+=L.y;return{x:H/T,y:Q/T}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;function P2PCollab(b,e,f){function c(T,V){try{if(!F){var W=e.file.getCurrentUser();if(I&&null!=W&&null!=W.displayName){var t={from:M,id:A,type:T,sessionId:e.clientId,userId:W.id,username:W.displayName,data:V,protocol:DrawioFileSync.PROTOCOL,editor:EditorUi.VERSION};t={bytes:e.objectToString(t),data:"aes"};t=JSON.stringify(t);L&&"cursor"!=T&&EditorUi.debug("P2PCollab: sending to socket server",[t]);A++;T=!L&&("cursor"==T||"selectionChange"==T);G&&!T&&U("message",t);if(T)for(p2pId in u)u[p2pId].send(t)}}}catch(C){null!= +window.console&&console.log("Error:",C)}}function l(T){if(b.shareCursorPosition&&!g.isMouseDown){var V=mxUtils.getOffset(g.container),W=g.view.translate,t=g.view.scale,C=null!=b.currentPage?b.currentPage.getId():null;c("cursor",{pageId:C,x:Math.round((T.getX()-V.x+g.container.scrollLeft)/t-W.x),y:Math.round((T.getY()-V.y+g.container.scrollTop)/t-W.y)})}}function m(T,V){var W=null!=b.currentPage?b.currentPage.getId():null;if(null!=T&&null!=T.cursor&&null!=T.lastCursor)if(null!=T.lastCursor.hide||!b.isShowRemoteCursors()|| +null!=T.lastCursor.pageId&&T.lastCursor.pageId!=W)T.cursor.style.display="none";else{W=function(){var P=Math.max(g.container.scrollLeft,Math.min(g.container.scrollLeft+g.container.clientWidth-T.cursor.clientWidth,N)),S=Math.max(g.container.scrollTop-22,Math.min(g.container.scrollTop+g.container.clientHeight-T.cursor.clientHeight,R));O.style.opacity=P!=N||S!=R?0:1;T.cursor.style.left=P+"px";T.cursor.style.top=S+"px";T.cursor.style.display=""};var t=g.view.translate,C=g.view.scale,N=(t.x+T.lastCursor.x)* +C+8,R=(t.y+T.lastCursor.y)*C-12,O=T.cursor.getElementsByTagName("img")[0];V?(mxUtils.setPrefixedStyle(T.cursor.style,"transition","all 900ms ease-out"),mxUtils.setPrefixedStyle(O.style,"transition","all 900ms ease-out"),window.setTimeout(W,0)):(mxUtils.setPrefixedStyle(T.cursor.style,"transition",null),mxUtils.setPrefixedStyle(O.style,"transition",null),W())}}function x(T,V){try{var W=function(){if(null==p[C]){var Y=J[C];null==Y&&(Y=k%q.length,J[C]=Y,k++);var Z=q[Y];Y=11<Y?"black":"white";p[C]={cursor:document.createElement("div"), +color:Z,selection:{}};z[V]=C;N=p[C].cursor;N.style.pointerEvents="none";N.style.position="absolute";N.style.display="none";N.style.opacity="0.9";var ba=document.createElement("img");mxUtils.setPrefixedStyle(ba.style,"transform","rotate(-45deg)translateX(-14px)");ba.setAttribute("src",Graph.createSvgImage(8,12,'<path d="M 4 0 L 8 12 L 4 10 L 0 12 Z" stroke="'+Z+'" fill="'+Z+'"/>').src);ba.style.width="10px";N.appendChild(ba);ba=document.createElement("div");ba.style.backgroundColor=Z;ba.style.color= +Y;ba.style.fontSize="9pt";ba.style.padding="3px 7px";ba.style.marginTop="8px";ba.style.borderRadius="10px";ba.style.maxWidth="100px";ba.style.overflow="hidden";ba.style.textOverflow="ellipsis";ba.style.whiteSpace="nowrap";mxUtils.write(ba,t);N.appendChild(ba);b.diagramContainer.appendChild(N)}else N=p[C].cursor;R=p[C].selection};if(!F){T=JSON.parse(T);null!=T.bytes&&(T=e.stringToObject(T.bytes));L&&"cursor"!=T.type&&EditorUi.debug("P2PCollab: msg received",[T]);if(null!=V){if(T.from==M||E[T.from]>= +T.id){EditorUi.debug("P2PCollab: Dropped Message",T,M,E[T.from]);return}E[T.from]=T.id}var t=T.username?T.username:"Anonymous",C=T.sessionId,N,R;null!=p[C]&&(clearTimeout(p[C].inactiveTO),p[C].inactiveTO=setTimeout(function(){D(null,C)},12E4));var O=T.data;switch(T.type){case "cursor":W();p[C].lastCursor=O;m(p[C],!0);break;case "diff":try{T=null!=O.patch?e.stringToObject(decodeURIComponent(O.patch)):O.diff,e.receiveRemoteChanges(T.d)}catch(Y){EditorUi.debug("P2PCollab: Diff msg error",Y)}break;case "selectionChange":if("0"!= +urlParams["remote-selection"]){var P=null!=b.currentPage?b.currentPage.getId():null;if(null==P||null!=O.pageId&&O.pageId==P){W();for(W=0;W<O.removed.length;W++){var S=O.removed[W];if(null!=S){var X=R[S];delete R[S];null!=X&&X.destroy()}}for(W=0;W<O.added.length;W++)if(S=O.added[W],null!=S){var aa=g.model.getCell(S);null!=aa&&(R[S]=g.highlightCell(aa,p[C].color,6E4,70,3))}}}}e.file.fireEvent(new mxEventObject("realtimeMessage","message",T))}}catch(Y){null!=window.console&&console.log("Error:",Y)}} +function y(T,V){if(!L&&SimplePeer.WEBRTC_SUPPORT){var W=new SimplePeer({initiator:V,config:{iceServers:[{urls:"stun:54.89.235.160:3478"}]}});W.on("signal",function(t){U("sendSignal",{to:T,from:M,signal:t})});W.on("error",function(t){delete v[T];EditorUi.debug("P2PCollab: p2p socket error",t);!F&&V&&W.destroyed&&B[T]&&(EditorUi.debug("P2PCollab: p2p socket reconnecting",T),y(T,!0))});W.on("connect",function(){delete v[T];null==u[T]||u[T].destroyed?(u[T]=W,B[T]=!0,EditorUi.debug("P2PCollab: p2p socket connected", +T)):(W.noP2PMapDel=!0,W.destroy(),EditorUi.debug("P2PCollab: p2p socket duplicate",T))});W.on("close",function(){W.noP2PMapDel||(EditorUi.debug("P2PCollab: p2p socket closed",T),d(z[T]),delete u[T])});W.on("data",x);return v[T]=W}}function D(T,V){d(V||z[T]);null!=T&&(delete z[T],B[T]=!1)}function d(T){var V=p[T];if(null!=V){var W=V.selection,t;for(t in W)null!=W[t]&&W[t].destroy();null!=V.cursor&&null!=V.cursor.parentNode&&V.cursor.parentNode.removeChild(V.cursor);clearTimeout(V.inactiveTO);delete p[T]}} +var g=b.editor.graph,k=0,n=null,q="#e6194b #3cb44b #4363d8 #f58231 #911eb4 #f032e6 #469990 #9A6324 #800000 #808000 #000075 #a9a9a9 #ffe119 #42d4f4 #bfef45 #fabed4 #dcbeff #fffac8 #aaffc3 #ffd8b1".split(" "),p={},A=1,E={},z={},B={},J={},M,v={},u={},G=!0,I=!1,F=!1,L="0"!=urlParams["no-p2p"],K=!1,H=0,Q=null,U=mxUtils.bind(this,function(T,V){if(!F)try{null!=n?(n.send(JSON.stringify({action:T,msg:V})),L||EditorUi.debug("P2PCollab: sending to socket server",[T],[V])):this.joinFile(!0)}catch(W){Q=W,e.file.fireEvent(new mxEventObject("realtimeStateChanged")), +EditorUi.debug("P2PCollab:","sendReply error",arguments,W)}});this.sendMessage=c;this.sendDiff=function(T){this.sendMessage("diff",{diff:T})};this.getState=function(){return null!=n?n.readyState:3};this.getLastError=function(){return Q};this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(T,V){},mouseMove:function(T,V){var W,t=-1;return function(){clearTimeout(W);var C=this,N=arguments,R=function(){W=null;t=Date.now();T.apply(C,N)};Date.now()-t>V?R():W=setTimeout(R,V)}}(function(T, +V){l(V)},300),mouseUp:function(T,V){l(V)}};g.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()||c("cursor",{hide:!0})};b.addListener("shareCursorPositionChanged",this.shareCursorPositionListener);this.selectionChangeListener=function(T,V){T=function(C){return null!=C?C.id:null};var W=null!=b.currentPage?b.currentPage.getId():null,t=V.getProperty("added");V=V.getProperty("removed");c("selectionChange",{pageId:W,removed:t?t.map(T):[],added:V? V.map(T):[]})};g.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionChangeListener);this.cursorHandler=mxUtils.bind(this,function(){for(var T in p)m(p[T])});mxEvent.addListener(g.container,"scroll",this.cursorHandler);g.getView().addListener(mxEvent.SCALE,this.cursorHandler);g.getView().addListener(mxEvent.TRANSLATE,this.cursorHandler);g.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler);b.addListener("showRemoteCursorsChanged",this.cursorHandler);b.editor.addListener("pageSelected", -this.cursorHandler);this.joinFile=function(T){if(!M)try{I&&(EditorUi.debug("P2PCollab: joinInProgress on",I),P="busy");I=++F;try{null!=n&&(EditorUi.debug("P2PCollab: force closing socket on",n.joinId),n.close(1E3),n=null)}catch(q){EditorUi.debug("P2PCollab: closing socket error",q)}var V=new WebSocket(window.RT_WEBSOCKET_URL+"?id="+f);V.addEventListener("open",function(q){n=V;n.joinId=I;I=!1;e.file.fireEvent(new mxEventObject("realtimeStateChanged"));EditorUi.debug("P2PCollab: open socket",n.joinId); -T&&e.scheduleCleanup()});V.addEventListener("message",mxUtils.bind(this,function(q){K||EditorUi.debug("P2PCollab: msg received",[q]);var D=JSON.parse(q.data);K&&"message"!=D.action&&EditorUi.debug("P2PCollab: msg received",[q]);switch(D.action){case "message":x(D.msg,D.from);break;case "clientsList":q=D.msg;N=q.cId;H=!0;for(D=0;D<q.list.length;D++)z(q.list[D],!0);break;case "signal":q=D.msg;K||(v[q.from]?D=v[q.from]:(D=z(q.from,!1),G=!0),D.signal(q.signal));break;case "newClient":G=!0;break;case "clientLeft":C(D.msg); -break;case "sendSignalFailed":q=D.msg,EditorUi.debug("P2PCollab: signal failed (socket not found on server)",q),delete v[q.to],B[q.to]=!1}}));var W=!1;V.addEventListener("close",mxUtils.bind(this,function(q){EditorUi.debug("P2PCollab: WebSocket closed",V.joinId,"reconnecting",q.code,q.reason);EditorUi.debug("P2PCollab: closing socket on",V.joinId);M||1E3==q.code||F!=V.joinId||(I==F&&(EditorUi.debug("P2PCollab: joinInProgress in close on",V.joinId),I=!1),W||(EditorUi.debug("P2PCollab: calling rejoin on", -V.joinId),W=!0,this.joinFile(!0)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));V.addEventListener("error",mxUtils.bind(this,function(q){EditorUi.debug("P2PCollab: WebSocket error, reconnecting",q);EditorUi.debug("P2PCollab: error socket on",V.joinId);M||F!=V.joinId||(I==F&&(EditorUi.debug("P2PCollab: joinInProgress in error on",V.joinId),I=!1),W||(EditorUi.debug("P2PCollab: calling rejoin on",V.joinId),W=!0,this.joinFile(!0)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))})); -e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}catch(q){P=q,e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}};this.destroy=function(){if(!M){EditorUi.debug("P2PCollab: destroyed");M=!0;for(sessionId in p)d(sessionId);null!=this.mouseListeners&&g.removeMouseListener(this.mouseListeners);null!=this.selectionChangeListener&&g.getSelectionModel().removeListener(this.selectionChangeListener);null!=this.shareCursorPositionListener&&b.removeListener(this.shareCursorPositionListener); +this.cursorHandler);this.joinFile=function(T){if(!F)try{K&&(EditorUi.debug("P2PCollab: joinInProgress on",K),Q="busy");K=++H;try{null!=n&&(EditorUi.debug("P2PCollab: force closing socket on",n.joinId),n.close(1E3),n=null)}catch(t){EditorUi.debug("P2PCollab: closing socket error",t)}var V=new WebSocket(window.RT_WEBSOCKET_URL+"?id="+f);V.addEventListener("open",function(t){n=V;n.joinId=K;K=!1;e.file.fireEvent(new mxEventObject("realtimeStateChanged"));EditorUi.debug("P2PCollab: open socket",n.joinId); +T&&e.scheduleCleanup()});V.addEventListener("message",mxUtils.bind(this,function(t){L||EditorUi.debug("P2PCollab: msg received",[t]);var C=JSON.parse(t.data);L&&"message"!=C.action&&EditorUi.debug("P2PCollab: msg received",[t]);switch(C.action){case "message":x(C.msg,C.from);break;case "clientsList":t=C.msg;M=t.cId;I=!0;for(C=0;C<t.list.length;C++)y(t.list[C],!0);break;case "signal":t=C.msg;L||(v[t.from]?C=v[t.from]:(C=y(t.from,!1),G=!0),C.signal(t.signal));break;case "newClient":G=!0;break;case "clientLeft":D(C.msg); +break;case "sendSignalFailed":t=C.msg,EditorUi.debug("P2PCollab: signal failed (socket not found on server)",t),delete v[t.to],B[t.to]=!1}}));var W=!1;V.addEventListener("close",mxUtils.bind(this,function(t){EditorUi.debug("P2PCollab: WebSocket closed",V.joinId,"reconnecting",t.code,t.reason);EditorUi.debug("P2PCollab: closing socket on",V.joinId);F||1E3==t.code||H!=V.joinId||(K==H&&(EditorUi.debug("P2PCollab: joinInProgress in close on",V.joinId),K=!1),W||(EditorUi.debug("P2PCollab: calling rejoin on", +V.joinId),W=!0,this.joinFile(!0)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));V.addEventListener("error",mxUtils.bind(this,function(t){EditorUi.debug("P2PCollab: WebSocket error, reconnecting",t);EditorUi.debug("P2PCollab: error socket on",V.joinId);F||H!=V.joinId||(K==H&&(EditorUi.debug("P2PCollab: joinInProgress in error on",V.joinId),K=!1),W||(EditorUi.debug("P2PCollab: calling rejoin on",V.joinId),W=!0,this.joinFile(!0)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))})); +e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}catch(t){Q=t,e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}};this.destroy=function(){if(!F){EditorUi.debug("P2PCollab: destroyed");F=!0;for(sessionId in p)d(sessionId);null!=this.mouseListeners&&g.removeMouseListener(this.mouseListeners);null!=this.selectionChangeListener&&g.getSelectionModel().removeListener(this.selectionChangeListener);null!=this.shareCursorPositionListener&&b.removeListener(this.shareCursorPositionListener); null!=this.cursorHandler&&(mxEvent.removeListener(g.container,"scroll",this.cursorHandler),g.getView().removeListener(mxEvent.SCALE,this.cursorHandler),g.getView().removeListener(mxEvent.TRANSLATE,this.cursorHandler),g.getView().removeListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler),b.editor.removeListener("pageSelected",this.cursorHandler),b.removeListener(this.cursorHandler));null!=n&&(n.close(1E3),n=null);for(var T in u)null!=u[T]&&u[T].destroy();e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}}} ; diff --git a/src/main/webapp/js/diagramly/App.js b/src/main/webapp/js/diagramly/App.js index 05a65484..837db3d4 100644 --- a/src/main/webapp/js/diagramly/App.js +++ b/src/main/webapp/js/diagramly/App.js @@ -589,6 +589,34 @@ App.clearServiceWorker = function(success, error) }; /** + * Returns true if the given link is on the same domain as this app. + */ +App.isSameDomain = function(link) +{ + var a = document.createElement('a'); + a.href = link; + + return a.protocol === window.location.protocol || + a.host === window.location.host; +}; + +/** + * Returns true if the given relative path is a built-in plugin. + */ +App.isBuiltInPlugin = function(path) +{ + for (var key in App.pluginRegistry) + { + if (App.pluginRegistry[key] == path) + { + return true; + } + } + + return false; +}; + +/** * Program flow starts here. * * Optional callback is called with the app instance. @@ -746,44 +774,40 @@ App.main = function(callback, createUi) if (plugins != null && plugins.length > 0 && urlParams['plugins'] != '0') { - // Loading plugins inside the asynchronous block below stops the page from loading so a - // hardcoded message for the warning dialog is used since the resources are loadd below - var warning = 'The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n'; - var tmp = window.location.protocol + '//' + window.location.host; - var local = true; - - for (var i = 0; i < plugins.length && local; i++) - { - if (plugins[i].charAt(0) != '/' && plugins[i].substring(0, tmp.length) != tmp) - { - local = false; - } - } - - if (local || mxUtils.confirm(mxResources.replacePlaceholders(warning, [plugins.join('\n')]).replace(/\\n/g, '\n'))) + for (var i = 0; i < plugins.length; i++) { - for (var i = 0; i < plugins.length; i++) + try { - try + if (plugins[i].charAt(0) == '/') + { + plugins[i] = PLUGINS_BASE_PATH + plugins[i]; + } + + if (!App.isSameDomain(plugins[i])) { - if (App.pluginsLoaded[plugins[i]] == null) + if (window.console != null) { - App.pluginsLoaded[plugins[i]] = true; - App.embedModePluginsCount++; - - if (plugins[i].charAt(0) == '/') - { - plugins[i] = PLUGINS_BASE_PATH + plugins[i]; - } - - mxscript(plugins[i]); + console.log('Blocked plugin:', plugins[i]); } } - catch (e) + else if (!ALLOW_CUSTOM_PLUGINS && !App.isBuiltInPlugin(plugins[i])) { - // ignore + if (window.console != null) + { + console.log('Unknown plugin:', plugins[i]); + } + } + else if (App.pluginsLoaded[plugins[i]] == null) + { + App.pluginsLoaded[plugins[i]] = true; + App.embedModePluginsCount++; + mxscript(plugins[i]); } } + catch (e) + { + // ignore + } } } } @@ -829,33 +853,9 @@ App.main = function(callback, createUi) { try { - var trustedPlugins = {}; - - for (var key in App.pluginRegistry) - { - trustedPlugins[App.pluginRegistry[key]] = true; - } - - // Only allows trusted plugins - function checkPlugins(plugins) - { - if (plugins != null) - { - for (var i = 0; i < plugins.length; i++) - { - if (!trustedPlugins[plugins[i]]) - { - throw new Error(mxResources.get('invalidInput') + ' "' + plugins[i]) + '"'; - } - } - } - - return true; - }; - var value = JSON.parse(Graph.decompress(window.location.hash.substring(9))); - if (value != null && checkPlugins(value.plugins)) + if (value != null) { EditorUi.debug('Setting configuration', JSON.stringify(value)); @@ -865,7 +865,6 @@ App.main = function(callback, createUi) if (temp != null) { - try { var config = JSON.parse(temp); @@ -1123,7 +1122,7 @@ App.main = function(callback, createUi) if (data != null && data.action == 'configure') { mxEvent.removeListener(window, 'message', configHandler); - Editor.configure(data.config, true); + Editor.configure(data.config); mxSettings.load(); //To enable transparent iframe in dark mode (e.g, in gitlab) @@ -1288,10 +1287,10 @@ App.loadPlugins = function(plugins, useInclude) { try { - var url = PLUGINS_BASE_PATH + App.pluginRegistry[plugins[i]]; - - if (url != null) + if (App.pluginRegistry[plugins[i]] != null) { + var url = PLUGINS_BASE_PATH + App.pluginRegistry[plugins[i]]; + if (App.pluginsLoaded[url] == null) { App.pluginsLoaded[url] = true; @@ -2096,10 +2095,7 @@ App.prototype.checkLicense = function() */ App.prototype.handleLicense = function(lic, domain) { - if (lic != null && lic.plugins != null) - { - App.loadPlugins(lic.plugins.split(';'), true); - } + // Hook for subclassers to handle license response }; /** @@ -5728,20 +5724,11 @@ App.prototype.updateButtonContainer = function() if (this.buttonContainer != null) { var file = this.getCurrentFile(); - + if (urlParams['embed'] == '1') { - if (uiTheme == 'atlas' || urlParams['atlas'] == '1') - { - this.buttonContainer.style.paddingRight = '12px'; - this.buttonContainer.style.paddingTop = '6px'; - this.buttonContainer.style.right = urlParams['noLangIcon'] == '1'? '0' : '25px'; - } - else if (uiTheme != 'min') - { - this.buttonContainer.style.paddingRight = '38px'; - this.buttonContainer.style.paddingTop = '6px'; - } + this.buttonContainer.style.paddingRight = '12px'; + this.buttonContainer.style.paddingTop = '6px'; } // Comments @@ -6846,20 +6833,23 @@ App.prototype.updateHeader = function() /** * Adds format panel toggle. */ + var right = (uiTheme != 'atlas' && urlParams['embed'] != '1') ? 30 : 10; this.toggleFormatElement = document.createElement('a'); this.toggleFormatElement.setAttribute('title', mxResources.get('formatPanel') + ' (' + Editor.ctrlKey + '+Shift+P)'); this.toggleFormatElement.style.position = 'absolute'; this.toggleFormatElement.style.display = 'inline-block'; this.toggleFormatElement.style.top = (uiTheme == 'atlas') ? '8px' : '6px'; - this.toggleFormatElement.style.right = (uiTheme != 'atlas' && urlParams['embed'] != '1') ? '30px' : '10px'; + this.toggleFormatElement.style.right = right + 'px'; this.toggleFormatElement.style.padding = '2px'; this.toggleFormatElement.style.fontSize = '14px'; this.toggleFormatElement.className = (uiTheme != 'atlas') ? 'geButton geAdaptiveAsset' : ''; this.toggleFormatElement.style.width = '16px'; this.toggleFormatElement.style.height = '16px'; this.toggleFormatElement.style.backgroundPosition = '50% 50%'; + this.toggleFormatElement.style.backgroundSize = '16px 16px'; this.toggleFormatElement.style.backgroundRepeat = 'no-repeat'; this.toolbarContainer.appendChild(this.toggleFormatElement); + right += 20; // Prevents focus mxEvent.addListener(this.toggleFormatElement, (mxClient.IS_POINTER) ? 'pointerdown' : 'mousedown', @@ -6892,22 +6882,12 @@ App.prototype.updateHeader = function() this.addListener('formatWidthChanged', toggleFormatPanel); toggleFormatPanel(); - this.fullscreenElement = document.createElement('a'); + this.fullscreenElement = this.toggleFormatElement.cloneNode(true); this.fullscreenElement.setAttribute('title', mxResources.get('fullscreen')); - this.fullscreenElement.style.position = 'absolute'; - this.fullscreenElement.style.display = 'inline-block'; - this.fullscreenElement.style.top = (uiTheme == 'atlas') ? '8px' : '6px'; - this.fullscreenElement.style.right = (uiTheme != 'atlas' && urlParams['embed'] != '1') ? '50px' : '30px'; - this.fullscreenElement.style.padding = '2px'; - this.fullscreenElement.style.fontSize = '14px'; - this.fullscreenElement.className = (uiTheme != 'atlas') ? 'geButton geAdaptiveAsset' : ''; - this.fullscreenElement.style.width = '16px'; - this.fullscreenElement.style.height = '16px'; - this.fullscreenElement.style.backgroundPosition = '50% 50%'; - this.fullscreenElement.style.backgroundSize = '16px 16px'; - this.fullscreenElement.style.backgroundRepeat = 'no-repeat'; this.fullscreenElement.style.backgroundImage = 'url(\'' + Editor.fullscreenImage + '\')'; + this.fullscreenElement.style.right = right + 'px'; this.toolbarContainer.appendChild(this.fullscreenElement); + right += 20; // Prevents focus mxEvent.addListener(this.fullscreenElement, (mxClient.IS_POINTER) ? 'pointerdown' : 'mousedown', @@ -6915,28 +6895,41 @@ App.prototype.updateHeader = function() { evt.preventDefault(); })); + + mxEvent.addListener(this.fullscreenElement, 'click', mxUtils.bind(this, function(evt) + { + var visible = this.fullscreenMode; - if (uiTheme != 'atlas') + EditorUi.logEvent({category: 'TOOLBAR-ACTION-', + action: 'fullscreen' , currentstate: visible}); + + if (uiTheme != 'atlas' && urlParams['embed'] != '1') + { + this.toggleCompactMode(visible); + } + + if (!visible) + { + initialPosition = this.hsplitPosition; + } + + this.hsplitPosition = (visible) ? initialPosition : 0; + this.toggleFormatPanel(visible); + this.fullscreenMode = !visible; + mxEvent.consume(evt); + })); + + if (urlParams['live-ui'] != '1' && uiTheme != 'atlas') { - this.darkModeElement = document.createElement('a'); + this.darkModeElement = this.toggleFormatElement.cloneNode(true); this.darkModeElement.setAttribute('title', mxResources.get('theme')); - this.darkModeElement.style.position = 'absolute'; - this.darkModeElement.style.display = 'inline-block'; - this.darkModeElement.style.top = (uiTheme == 'atlas') ? '8px' : '6px'; - this.darkModeElement.style.right = (uiTheme != 'atlas' && urlParams['embed'] != '1') ? '70px' : '50px'; - this.darkModeElement.style.padding = '2px'; - this.darkModeElement.style.fontSize = '14px'; - this.darkModeElement.className = (uiTheme != 'atlas') ? 'geButton geAdaptiveAsset' : ''; - this.darkModeElement.style.width = '16px'; - this.darkModeElement.style.height = '16px'; - this.darkModeElement.style.backgroundPosition = '50% 50%'; - this.darkModeElement.style.backgroundSize = '16px 16px'; - this.darkModeElement.style.backgroundRepeat = 'no-repeat'; + this.darkModeElement.style.right = right + 'px'; this.toolbarContainer.appendChild(this.darkModeElement); + right += 20; var updateDarkModeElement = mxUtils.bind(this, function() { - this.darkModeElement.style.backgroundImage = 'url(\'' + ((Editor.isDarkMode()) ? + this.darkModeElement.style.backgroundImage = 'url(\'' + ((Editor.isDarkMode() || uiTheme == 'atlas') ? Editor.lightModeImage : Editor.darkModeImage) + '\')'; }); @@ -6947,9 +6940,14 @@ App.prototype.updateHeader = function() mxEvent.addListener(this.darkModeElement, (mxClient.IS_POINTER) ? 'pointerdown' : 'mousedown', mxUtils.bind(this, function(evt) { - this.actions.get('toggleDarkMode').funct(); evt.preventDefault(); })); + + mxEvent.addListener(this.darkModeElement, 'click', mxUtils.bind(this, function(evt) + { + this.actions.get('toggleDarkMode').funct(); + mxEvent.consume(evt); + })); } // Some style changes in Atlas theme @@ -6960,29 +6958,6 @@ App.prototype.updateHeader = function() } var initialPosition = this.hsplitPosition; - - mxEvent.addListener(this.fullscreenElement, 'click', mxUtils.bind(this, function(evt) - { - var visible = this.fullscreenMode; - - EditorUi.logEvent({category: 'TOOLBAR-ACTION-', - action: 'fullscreen' , currentstate: visible}); - - if (uiTheme != 'atlas' && urlParams['embed'] != '1') - { - this.toggleCompactMode(visible); - } - - if (!visible) - { - initialPosition = this.hsplitPosition; - } - - this.hsplitPosition = (visible) ? initialPosition : 0; - this.toggleFormatPanel(visible); - this.fullscreenMode = !visible; - mxEvent.consume(evt); - })); /** * Adds compact UI toggle. diff --git a/src/main/webapp/js/diagramly/Devel.js b/src/main/webapp/js/diagramly/Devel.js index 713ff7b2..b0b37076 100644 --- a/src/main/webapp/js/diagramly/Devel.js +++ b/src/main/webapp/js/diagramly/Devel.js @@ -11,9 +11,7 @@ if (!mxIsElectron && location.protocol !== 'http:') (function() { var hashes = 'default-src \'self\'; ' + - // storage.googleapis.com is needed for workbox-service-worker - 'script-src %script-src% \'self\' https://viewer.diagrams.net https://storage.googleapis.com ' + - 'https://apis.google.com https://*.pusher.com ' + + 'script-src %script-src% \'self\' https://viewer.diagrams.net https://apis.google.com https://*.pusher.com ' + // Below are the SHAs of the two script blocks in index.html. // These must be updated here and in the CDN after changes. //----------------------------------------------------------// diff --git a/src/main/webapp/js/diagramly/Dialogs.js b/src/main/webapp/js/diagramly/Dialogs.js index 817de945..5fd0d4ea 100644 --- a/src/main/webapp/js/diagramly/Dialogs.js +++ b/src/main/webapp/js/diagramly/Dialogs.js @@ -303,11 +303,11 @@ var SplashDialog = function(editorUi) if (mxClient.IS_CHROMEAPP || EditorUi.isElectronApp) { - var elt = editorUi.addLanguageMenu(div, true, '28px'); + var elt = editorUi.addLanguageMenu(div, false, '28px'); if (elt != null) { - elt.style.bottom = '19px'; + elt.style.bottom = '24px'; } } @@ -1402,15 +1402,15 @@ var CreateGraphDialog = function(editorUi, title, type) { layout = new mxHierarchicalLayout(graph, mxConstants.DIRECTION_WEST); } - else if (type == 'organic') - { - layout = new mxFastOrganicLayout(graph, false); - layout.forceConstant = 80; - } else if (type == 'circle') { layout = new mxCircleLayout(graph); } + else + { + layout = new mxFastOrganicLayout(graph, false); + layout.forceConstant = 80; + } if (layout != null) { @@ -8511,7 +8511,7 @@ var PluginsDialog = function(editorUi, addFn, delFn, closeOnly) refresh(); } }), null, null, null, customBtn); - editorUi.showDialog(dlg.container, 300, 100, true, true); + editorUi.showDialog(dlg.container, 360, 100, true, true); }); addBtn.className = 'geBtn'; diff --git a/src/main/webapp/js/diagramly/DrawioFileSync.js b/src/main/webapp/js/diagramly/DrawioFileSync.js index 69d3d07e..b5126fff 100644 --- a/src/main/webapp/js/diagramly/DrawioFileSync.js +++ b/src/main/webapp/js/diagramly/DrawioFileSync.js @@ -494,7 +494,8 @@ DrawioFileSync.prototype.updateOnlineState = function() elt.style.verticalAlign = 'bottom'; elt.style.color = '#666'; elt.style.top = '6px'; - elt.style.right = (uiTheme != 'atlas') ? '90px' : '50px'; + elt.style.right = (uiTheme != 'atlas') ? (urlParams['live-ui'] != '1' ? + '90px' : '70px') : '50px'; elt.style.padding = '2px'; elt.style.fontSize = '8pt'; elt.style.verticalAlign = 'middle'; diff --git a/src/main/webapp/js/diagramly/Editor.js b/src/main/webapp/js/diagramly/Editor.js index 8fe307a7..fcfb6297 100644 --- a/src/main/webapp/js/diagramly/Editor.js +++ b/src/main/webapp/js/diagramly/Editor.js @@ -110,7 +110,6 @@ Editor.syncImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgNFYxTDggNWw0IDRWNmMzLjMxIDAgNiAyLjY5IDYgNiAwIDEuMDEtLjI1IDEuOTctLjcgMi44bDEuNDYgMS40NkMxOS41NCAxNS4wMyAyMCAxMy41NyAyMCAxMmMwLTQuNDItMy41OC04LTgtOHptMCAxNGMtMy4zMSAwLTYtMi42OS02LTYgMC0xLjAxLjI1LTEuOTcuNy0yLjhMNS4yNCA3Ljc0QzQuNDYgOC45NyA0IDEwLjQzIDQgMTJjMCA0LjQyIDMuNTggOCA4IDh2M2w0LTQtNC00djN6Ii8+PC9zdmc+'; Editor.cloudImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEyIDZjMi42MiAwIDQuODggMS44NiA1LjM5IDQuNDNsLjMgMS41IDEuNTMuMTFjMS41Ni4xIDIuNzggMS40MSAyLjc4IDIuOTYgMCAxLjY1LTEuMzUgMy0zIDNINmMtMi4yMSAwLTQtMS43OS00LTQgMC0yLjA1IDEuNTMtMy43NiAzLjU2LTMuOTdsMS4wNy0uMTEuNS0uOTVDOC4wOCA3LjE0IDkuOTQgNiAxMiA2bTAtMkM5LjExIDQgNi42IDUuNjQgNS4zNSA4LjA0IDIuMzQgOC4zNiAwIDEwLjkxIDAgMTRjMCAzLjMxIDIuNjkgNiA2IDZoMTNjMi43NiAwIDUtMi4yNCA1LTUgMC0yLjY0LTIuMDUtNC43OC00LjY1LTQuOTZDMTguNjcgNi41OSAxNS42NCA0IDEyIDR6Ii8+PC9zdmc+'; Editor.cloudOffImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTI0IDE1YzAtMi42NC0yLjA1LTQuNzgtNC42NS00Ljk2QzE4LjY3IDYuNTkgMTUuNjQgNCAxMiA0Yy0xLjMzIDAtMi41Ny4zNi0zLjY1Ljk3bDEuNDkgMS40OUMxMC41MSA2LjE3IDExLjIzIDYgMTIgNmMzLjA0IDAgNS41IDIuNDYgNS41IDUuNXYuNUgxOWMxLjY2IDAgMyAxLjM0IDMgMyAwIC45OS0uNDggMS44NS0xLjIxIDIuNGwxLjQxIDEuNDFjMS4wOS0uOTIgMS44LTIuMjcgMS44LTMuODF6TTQuNDEgMy44NkwzIDUuMjdsMi43NyAyLjc3aC0uNDJDMi4zNCA4LjM2IDAgMTAuOTEgMCAxNGMwIDMuMzEgMi42OSA2IDYgNmgxMS43M2wyIDIgMS40MS0xLjQxTDQuNDEgMy44NnpNNiAxOGMtMi4yMSAwLTQtMS43OS00LTRzMS43OS00IDQtNGgxLjczbDggOEg2eiIvPjwvc3ZnPg=='; - Editor.syncDisabledImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTAgNi4zNVY0LjI2Yy0uOC4yMS0xLjU1LjU0LTIuMjMuOTZsMS40NiAxLjQ2Yy4yNS0uMTIuNS0uMjQuNzctLjMzem0tNy4xNC0uOTRsMi4zNiAyLjM2QzQuNDUgOC45OSA0IDEwLjQ0IDQgMTJjMCAyLjIxLjkxIDQuMiAyLjM2IDUuNjRMNCAyMGg2di02bC0yLjI0IDIuMjRDNi42OCAxNS4xNSA2IDEzLjY2IDYgMTJjMC0xIC4yNS0xLjk0LjY4LTIuNzdsOC4wOCA4LjA4Yy0uMjUuMTMtLjUuMjUtLjc3LjM0djIuMDljLjgtLjIxIDEuNTUtLjU0IDIuMjMtLjk2bDIuMzYgMi4zNiAxLjI3LTEuMjdMNC4xNCA0LjE0IDIuODYgNS40MXpNMjAgNGgtNnY2bDIuMjQtMi4yNEMxNy4zMiA4Ljg1IDE4IDEwLjM0IDE4IDEyYzAgMS0uMjUgMS45NC0uNjggMi43N2wxLjQ2IDEuNDZDMTkuNTUgMTUuMDEgMjAgMTMuNTYgMjAgMTJjMC0yLjIxLS45MS00LjItMi4zNi01LjY0TDIwIDR6Ii8+PC9zdmc+'; Editor.calendarImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48cGF0aCBkPSJNMjAsNEg0QzIuOSw0LDIsNC45LDIsNnYxMmMwLDEuMSwwLjksMiwyLDJoMTZjMS4xLDAsMi0wLjksMi0yVjZDMjIsNC45LDIxLjEsNCwyMCw0eiBNOCwxMUg0VjZoNFYxMXogTTE0LDExaC00VjZoNFYxMXogTTIwLDExaC00VjZoNFYxMXogTTgsMThINHYtNWg0VjE4eiBNMTQsMThoLTR2LTVoNFYxOHogTTIwLDE4aC00di01aDRWMTh6Ii8+PC9nPjwvc3ZnPg=='; Editor.syncProblemImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyAxMmMwIDIuMjEuOTEgNC4yIDIuMzYgNS42NEwzIDIwaDZ2LTZsLTIuMjQgMi4yNEM1LjY4IDE1LjE1IDUgMTMuNjYgNSAxMmMwLTIuNjEgMS42Ny00LjgzIDQtNS42NVY0LjI2QzUuNTUgNS4xNSAzIDguMjcgMyAxMnptOCA1aDJ2LTJoLTJ2MnpNMjEgNGgtNnY2bDIuMjQtMi4yNEMxOC4zMiA4Ljg1IDE5IDEwLjM0IDE5IDEyYzAgMi42MS0xLjY3IDQuODMtNCA1LjY1djIuMDljMy40NS0uODkgNi00LjAxIDYtNy43NCAwLTIuMjEtLjkxLTQuMi0yLjM2LTUuNjRMMjEgNHptLTEwIDloMlY3aC0ydjZ6Ii8+PC9zdmc+'; Editor.tailSpin = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9Ii0yIC0yIDQ0IDQ0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogICAgPGRlZnM+CiAgICAgICAgPGxpbmVhckdyYWRpZW50IHgxPSI4LjA0MiUiIHkxPSIwJSIgeDI9IjY1LjY4MiUiIHkyPSIyMy44NjUlIiBpZD0iYSI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiM4MDgwODAiIHN0b3Atb3BhY2l0eT0iMCIgb2Zmc2V0PSIwJSIvPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjODA4MDgwIiBzdG9wLW9wYWNpdHk9Ii42MzEiIG9mZnNldD0iNjMuMTQ2JSIvPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjODA4MDgwIiBvZmZzZXQ9IjEwMCUiLz4KICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPC9kZWZzPgogICAgPGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxIDEpIj4KICAgICAgICAgICAgPHBhdGggZD0iTTM2IDE4YzAtOS45NC04LjA2LTE4LTE4LTE4IiBzdHJva2U9InVybCgjYSkiIHN0cm9rZS13aWR0aD0iNiI+CiAgICAgICAgICAgICAgICA8YW5pbWF0ZVRyYW5zZm9ybQogICAgICAgICAgICAgICAgICAgIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIKICAgICAgICAgICAgICAgICAgICB0eXBlPSJyb3RhdGUiCiAgICAgICAgICAgICAgICAgICAgZnJvbT0iMCAxOCAxOCIKICAgICAgICAgICAgICAgICAgICB0bz0iMzYwIDE4IDE4IgogICAgICAgICAgICAgICAgICAgIGR1cj0iMC45cyIKICAgICAgICAgICAgICAgICAgICByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgLz4KICAgICAgICAgICAgPC9wYXRoPgogICAgICAgICAgICA8Y2lyY2xlIGZpbGw9IiM4MDgwODAiIGN4PSIzNiIgY3k9IjE4IiByPSIxIj4KICAgICAgICAgICAgICAgIDxhbmltYXRlVHJhbnNmb3JtCiAgICAgICAgICAgICAgICAgICAgYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIgogICAgICAgICAgICAgICAgICAgIHR5cGU9InJvdGF0ZSIKICAgICAgICAgICAgICAgICAgICBmcm9tPSIwIDE4IDE4IgogICAgICAgICAgICAgICAgICAgIHRvPSIzNjAgMTggMTgiCiAgICAgICAgICAgICAgICAgICAgZHVyPSIwLjlzIgogICAgICAgICAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPgogICAgICAgICAgICA8L2NpcmNsZT4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPgo='; @@ -1709,7 +1708,7 @@ * For defaultVertexStyle, defaultEdgeStyle and defaultLibraries, this must be called before * mxSettings.load via global config variable window.mxLoadSettings = false. */ - Editor.configure = function(config, untrusted) + Editor.configure = function(config) { if (config != null) { @@ -1999,18 +1998,7 @@ EditorUi.debug('Configuration Error: Int > 0 expected for autosaveDelay'); } } - - if (config.plugins != null && !untrusted) - { - // Required for callback - App.initPluginCallback(); - - for (var i = 0; i < config.plugins.length; i++) - { - mxscript(config.plugins[i]); - } - } - + if(config.maxImageBytes != null) { EditorUi.prototype.maxImageBytes = config.maxImageBytes; diff --git a/src/main/webapp/js/diagramly/EditorUi.js b/src/main/webapp/js/diagramly/EditorUi.js index 80a80a14..b4bf4193 100644 --- a/src/main/webapp/js/diagramly/EditorUi.js +++ b/src/main/webapp/js/diagramly/EditorUi.js @@ -10568,7 +10568,7 @@ EditorUi.prototype.setCurrentTheme = function(value, noRestart) { mxSettings.setUi(value); - this.doSetCurrentTheme(value); + noRestart = noRestart || this.doSetCurrentTheme(value); this.fireEvent(new mxEventObject('currentThemeChanged')); if (!noRestart) @@ -10582,10 +10582,245 @@ */ EditorUi.prototype.doSetCurrentTheme = function(value) { - if (Editor.currentTheme != value) + var curr = Editor.currentTheme; + var noRestart = false; + + if (curr != value) { + if (urlParams['live-ui'] == '1') + { + console.log('doSetCurrentTheme', curr, value); + + function isDefault(theme) + { + return theme == null || theme == '' || theme == 'dark' || + theme == 'kennedy'; + }; + + value = (isDefault(value)) ? 'default' : value; + curr = (isDefault(curr)) ? 'default' : curr; + + // TODO: Change theme at runtime + if (curr == 'sketch' && value == 'default') + { + this.sidebarFooterContainer.style.display = 'block'; + this.menubarContainer.style.display = 'block'; + this.toolbarContainer.style.display = 'block'; + this.sidebarContainer.style.display = 'block'; + this.tabContainer.style.display = 'block'; + this.hsplit.style.display = 'block'; + this.hsplitPosition = EditorUi.prototype.hsplitPosition; + this.menubarHeight = App.prototype.menubarHeight; + this.formatWidth = EditorUi.prototype.formatWidth; + noRestart = true; + } + else if (curr == 'default' && value == 'sketch') + { + this.sidebarFooterContainer.style.display = 'none'; + this.menubarContainer.style.display = 'none'; + this.toolbarContainer.style.display = 'none'; + this.sidebarContainer.style.display = 'none'; + this.tabContainer.style.display = 'none'; + this.hsplit.style.display = 'none'; + this.hsplitPosition = 0; + this.menubarHeight = 0; + this.formatWidth = 0; + noRestart = true; + } + + this.switchTheme(value); + } + Editor.currentTheme = value; - // TODO: Change theme at runtime + } + + return noRestart; + }; + + /** + * Overrides image dialog to add image search and Google+. + */ + EditorUi.prototype.switchTheme = function(value) + { + this.createMenubarForTheme(value); + this.switchCssForTheme(value); + + if (value == 'sketch') + { + + this.refresh(); + + + this.createFormatWindow(); + + this.formatContainer.style.left = '0px'; + this.formatContainer.style.top = '0px'; + this.formatContainer.style.width = ''; + + + } + else if (value == 'default') + { + if (this.formatContainer != null) + { + this.formatContainer.style.left = ''; + + if (this.footerContainer != null) + { + if (this.footerContainer.parentNode != this.formatContainer.parentNode) + { + this.footerContainer.parentNode.insertBefore(this.formatContainer, this.footerContainer); + } + } + + if (this.formatWindow != null) + { + this.formatWindow.destroy(); + this.formatWindow = null; + } + } + + this.refresh(); + + + } + }; + + /** + * Overrides image dialog to add image search and Google+. + */ + EditorUi.prototype.switchCssForTheme = function(value) + { + if (value == 'sketch') + { + if (this.sketchStyleElt == null) + { + this.sketchStyleElt = document.createElement('style'); + this.sketchStyleElt.setAttribute('type', 'text/css'); + this.sketchStyleElt.innerHTML = Editor.createMinimalCss(); + document.getElementsByTagName('head')[0].appendChild(this.sketchStyleElt); + } + } + else + { + if (this.sketchStyleElt != null) + { + this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt); + this.sketchStyleElt = null; + } + } + }; + + /** + * Overrides image dialog to add image search and Google+. + */ + EditorUi.prototype.createMenubarForTheme = function(value) + { + if (value == 'sketch') + { + if (this.sketchMenubarElt == null) + { + this.sketchMenubarElt = document.createElement('div'); + this.sketchMenubarElt.className = 'geToolbarContainer'; + this.sketchMenubarElt.style.cssText = 'position:absolute;right:14px;top:10px;height:30px;z-index:1;' + + 'border-radius:4px;padding:6px;border:1px solid #c0c0c0;overflow:hidden;' + + 'text-align:right;white-space:nowrap;user-select:none;'; + + if (this.switchThemeElt != null) + { + this.switchThemeElt.style.position = 'relative'; + this.switchThemeElt.style.width = '22px'; + this.switchThemeElt.style.height = '22px'; + this.switchThemeElt.style.top = '0px'; + this.switchThemeElt.style.right = '6px'; + + this.sketchMenubarElt.appendChild(this.switchThemeElt); + } + + this.diagramContainer.parentNode.appendChild(this.sketchMenubarElt); + } + } + else + { + if (this.switchThemeElt != null) + { + this.switchThemeElt.style.position = 'absolute'; + this.switchThemeElt.style.width = '19px'; + this.switchThemeElt.style.height = '19px'; + this.switchThemeElt.style.top = '0px'; + this.switchThemeElt.style.right = '17px'; + + document.body.appendChild(this.switchThemeElt); + } + + if (this.sketchMenubarElt != null) + { + this.sketchMenubarElt.parentNode.removeChild(this.sketchMenubarElt); + this.sketchMenubarElt = null; + } + } + }; + + /** + * Overrides image dialog to add image search and Google+. + */ + EditorUi.prototype.addMenuToMenubar = function(menubar, key, classname, img) + { + var menu = this.menus.get(key); + var elt = menubar.addMenu(mxResources.get(key), menu.funct); + + elt.className = classname; + elt.style.display = 'inline-block'; + elt.style.boxSizing = 'border-box'; + elt.style.top = '6px'; + elt.style.marginRight = '6px'; + elt.style.height = '30px'; + elt.style.paddingTop = '6px'; + elt.style.paddingBottom = '6px'; + elt.style.cursor = 'pointer'; + elt.setAttribute('title', mxResources.get(key)); + this.menus.menuCreated(menu, elt, 'geMenuItem'); + + if (img != null) + { + elt.style.backgroundImage = 'url(' + img + ')'; + elt.style.backgroundPosition = 'center center'; + elt.style.backgroundRepeat = 'no-repeat'; + elt.style.backgroundSize = '24px 24px'; + elt.style.width = '34px'; + elt.innerText = ''; + } + + return elt; + }; + + /** + * Overrides image dialog to add image search and Google+. + */ + EditorUi.prototype.createFormatWindow = function() + { + if (this.formatWindow == null) + { + var x = (urlParams['sketch'] == '1') ? + Math.max(10, this.diagramContainer.clientWidth - 241) : + Math.max(10, this.diagramContainer.clientWidth - 248); + var y = urlParams['winCtrls'] == '1' && urlParams['sketch'] == '1'? 80 : 60; + var h = (urlParams['embedInline'] == '1') ? 580 : + ((urlParams['sketch'] == '1') ? 580 : Math.min(566, + this.editor.graph.container.clientHeight - 10)); + + this.formatWindow = new WrapperWindow(this, mxResources.get('format'), x, y, 240, h, + mxUtils.bind(this, function(container) + { + container.appendChild(this.formatContainer); + })); + + this.formatWindow.window.addListener(mxEvent.SHOW, mxUtils.bind(this, function() + { + this.formatWindow.window.fit(); + })); + + this.formatWindow.window.minimumSize = new mxRectangle(0, 0, 240, 80); } }; @@ -13409,10 +13644,12 @@ div.style.paddingTop = '2px'; div.style.paddingLeft = '8px'; div.style.paddingBottom = '2px'; + div.style.marginRight = '12px'; + div.style.right = (uiTheme == 'atlas' || urlParams['atlas'] == '1' || + urlParams['live-ui'] == '1') ? '52px' : '72px'; var button = document.createElement('button'); button.className = 'geBigButton'; - var lastBtn = button; if (urlParams['noSaveBtn'] == '1') { @@ -13456,14 +13693,14 @@ })); div.appendChild(button); - lastBtn = button; } } if (urlParams['noExitBtn'] != '1') { button = document.createElement('a'); - var exitTitle = urlParams['publishClose'] == '1' ? mxResources.get('close') : mxResources.get('exit'); + var exitTitle = urlParams['publishClose'] == '1' ? + mxResources.get('close') : mxResources.get('exit'); mxUtils.write(button, exitTitle); button.setAttribute('title', exitTitle); button.className = 'geBigButton geBigStandardButton'; @@ -13475,14 +13712,10 @@ })); div.appendChild(button); - lastBtn = button; } - lastBtn.style.marginRight = '20px'; - this.toolbar.container.appendChild(div); this.toolbar.staticElements.push(div); - div.style.right = (uiTheme == 'atlas' || urlParams['atlas'] == '1') ? '62px' : '72px'; } }; @@ -14518,6 +14751,7 @@ this.actions.get('zoomIn').setEnabled(active); this.actions.get('zoomOut').setEnabled(active); this.actions.get('resetView').setEnabled(active); + this.actions.get('toggleDarkMode').setEnabled(uiTheme != 'atlas'); // Updates undo history states this.actions.get('undo').setEnabled(this.canUndo() && editable); diff --git a/src/main/webapp/js/diagramly/Init.js b/src/main/webapp/js/diagramly/Init.js index a31164e9..e0fc4624 100644 --- a/src/main/webapp/js/diagramly/Init.js +++ b/src/main/webapp/js/diagramly/Init.js @@ -50,6 +50,9 @@ window.TEMPLATE_PATH = window.TEMPLATE_PATH || 'templates'; window.NEW_DIAGRAM_CATS_PATH = window.NEW_DIAGRAM_CATS_PATH || 'newDiagramCats'; window.PLUGINS_BASE_PATH = window.PLUGINS_BASE_PATH || ''; +// Allows third-party plugins to run +window.ALLOW_CUSTOM_PLUGINS = window.ALLOW_CUSTOM_PLUGINS || false; + // Directory for i18 files and basename for main i18n file window.RESOURCES_PATH = window.RESOURCES_PATH || 'resources'; window.RESOURCE_BASE = window.RESOURCE_BASE || RESOURCES_PATH + '/dia'; diff --git a/src/main/webapp/js/diagramly/Menus.js b/src/main/webapp/js/diagramly/Menus.js index b82fc9e0..7479bea9 100644 --- a/src/main/webapp/js/diagramly/Menus.js +++ b/src/main/webapp/js/diagramly/Menus.js @@ -313,11 +313,6 @@ toggleDarkModeAction.setToggleAction(true); toggleDarkModeAction.setSelectedCallback(function() { return Editor.isDarkMode(); }); - - toggleDarkModeAction.isEnabled = function() - { - return mxSettings.getUi() != 'atlas'; - }; editorUi.actions.addAction('properties...', function() { @@ -1230,7 +1225,7 @@ return item; }); - var item = addLangItem(''); + addLangItem(''); menu.addSeparator(parent); // LATER: Sort menu by language name @@ -1246,30 +1241,30 @@ { var menubar = menusCreateMenuBar.apply(this, arguments); - if (menubar != null && urlParams['noLangIcon'] != '1') + if (menubar != null && urlParams['embed'] != '1' && + (uiTheme != 'atlas' || urlParams['live-ui'] == '1')) { - var langMenu = this.get('language'); + var langMenu = this.get((urlParams['live-ui'] == '1') ? 'theme' : 'language'); if (langMenu != null) { var elt = menubar.addMenu('', langMenu.funct); - elt.setAttribute('title', mxResources.get('language')); + elt.setAttribute('title', mxResources.get( + (urlParams['live-ui'] == '1') ? + 'preferences' : 'language')); elt.className = 'geAdaptiveAsset'; - elt.style.width = '16px'; + elt.style.boxSizing = 'border-box'; + elt.style.width = '19px'; + elt.style.height = '19px'; elt.style.paddingTop = '2px'; elt.style.paddingLeft = '4px'; elt.style.zIndex = '1'; elt.style.position = 'absolute'; elt.style.display = 'block'; elt.style.cursor = 'pointer'; - elt.style.right = '17px'; + elt.style.right = '20px'; - if (uiTheme == 'atlas') - { - elt.style.top = '6px'; - elt.style.right = '15px'; - } - else if (uiTheme == 'min') + if (uiTheme == 'min') { elt.style.top = '2px'; } @@ -1279,17 +1274,24 @@ } var icon = document.createElement('div'); + icon.className = 'geToolbarButton'; icon.style.backgroundImage = 'url(' + Editor.globeImage + ')'; icon.style.backgroundPosition = 'center center'; icon.style.backgroundRepeat = 'no-repeat'; - icon.style.backgroundSize = '19px 19px'; + icon.style.backgroundSize = '100% 100%'; + icon.style.filter = 'none'; icon.style.position = 'absolute'; - icon.style.height = '19px'; - icon.style.width = '19px'; - icon.style.marginTop = '2px'; + icon.style.height = '100%'; + icon.style.width = '100%'; + icon.style.marginTop = (uiTheme == 'atlas') ? '8px' : '2px'; + icon.style.marginLeft = '2px'; icon.style.zIndex = '1'; elt.appendChild(icon); - mxUtils.setOpacity(elt, 40); + + if (urlParams['live-ui'] != '1') + { + mxUtils.setOpacity(elt, 70); + } if (urlParams['winCtrls'] == '1') { @@ -1299,15 +1301,29 @@ elt.style.webkitAppRegion = 'no-drag'; icon.style.webkitAppRegion = 'no-drag'; } - + if (uiTheme == 'atlas') { - elt.style.opacity = '0.85'; elt.style.filter = 'invert(100%)'; + elt.style.opacity = '0.85'; } document.body.appendChild(elt); menubar.langIcon = elt; + + if (urlParams['live-ui'] == '1') + { + var updateThemeElement = mxUtils.bind(this, function() + { + icon.style.backgroundImage = 'url(\'' + ((Editor.isDarkMode() || uiTheme == 'atlas') ? + Editor.lightModeImage : Editor.darkModeImage) + '\')'; + }); + + this.editorUi.addListener('darkModeChanged', updateThemeElement); + updateThemeElement(); + } + + this.editorUi.switchThemeElt = elt; } } @@ -2872,26 +2888,32 @@ { var theme = (urlParams['sketch'] == '1') ? 'sketch' : mxSettings.getUi(); - var item = menu.addItem(mxResources.get('automatic'), null, function() + if (urlParams['embedInline'] != '1' && Editor.isDarkMode() || + (!mxClient.IS_IE && !mxClient.IS_IE11)) + { + this.addMenuItems(menu, ['toggleDarkMode'], parent); + } + + menu.addSeparator(parent); + + var item = menu.addItem(mxResources.get('default'), null, function() { editorUi.setCurrentTheme(''); }, parent); - - if (theme != 'kennedy' && theme != 'atlas' && - theme != 'dark' && theme != 'min' && - theme != 'sketch') + + if (theme == 'kennedy' || theme == 'dark' || + (theme != 'atlas' && theme != 'min' && + theme != 'sketch')) { menu.addCheckmark(item, Editor.checkmarkImage); } - menu.addSeparator(parent); - - item = menu.addItem(mxResources.get('default'), null, function() + item = menu.addItem(mxResources.get('sketch'), null, function() { - editorUi.setCurrentTheme('kennedy'); + editorUi.setCurrentTheme('sketch'); }, parent); - - if (theme == 'kennedy' || theme == 'dark') + + if (theme == 'sketch') { menu.addCheckmark(item, Editor.checkmarkImage); } @@ -2915,24 +2937,6 @@ { menu.addCheckmark(item, Editor.checkmarkImage); } - - item = menu.addItem(mxResources.get('sketch'), null, function() - { - editorUi.setCurrentTheme('sketch'); - }, parent); - - if (theme == 'sketch') - { - menu.addCheckmark(item, Editor.checkmarkImage); - } - - menu.addSeparator(parent); - - if (urlParams['embedInline'] != '1' && Editor.isDarkMode() || - (!mxClient.IS_IE && !mxClient.IS_IE11)) - { - this.addMenuItems(menu, ['toggleDarkMode'], parent); - } }))); var renameAction = this.editorUi.actions.addAction('rename...', mxUtils.bind(this, function() @@ -3362,8 +3366,15 @@ menu.addItem(mxResources.get('csv') + '...', null, function() { + graph.popupMenuHandler.hideMenu(); editorUi.showImportCsvDialog(); }, parent, null, isGraphEnabled()); + + if (uiTheme == 'min') + { + this.addMenuItems(menu, ['-', 'createShape', + 'editDiagram'], parent); + } }))); this.put('openRecent', new Menu(function(menu, parent) @@ -3958,18 +3969,18 @@ this.put('extras', new Menu(mxUtils.bind(this, function(menu, parent) { - if (urlParams['noLangIcon'] == '1') + if (urlParams['embed'] != '1' || urlParams['lang'] == null) { this.addSubmenu('language', menu, parent); - menu.addSeparator(parent); } if (urlParams['embed'] != '1') { this.addSubmenu('theme', menu, parent); - menu.addSeparator(parent); } + menu.addSeparator(parent); + if (typeof(MathJax) !== 'undefined') { var item = this.addMenuItem(menu, 'mathematicalTypesetting', parent); diff --git a/src/main/webapp/js/diagramly/Minimal.js b/src/main/webapp/js/diagramly/Minimal.js index 619931bd..fb740643 100644 --- a/src/main/webapp/js/diagramly/Minimal.js +++ b/src/main/webapp/js/diagramly/Minimal.js @@ -49,8 +49,6 @@ EditorUi.initMinimalTheme = function() { var format = ui.createFormat(container); format.init(); - - return format; }); ui.formatWindow.window.addListener(mxEvent.SHOW, mxUtils.bind(this, function() @@ -131,7 +129,7 @@ EditorUi.initMinimalTheme = function() container.appendChild(elt); return elt; - } + }; if (Editor.enableCustomLibraries && (urlParams['embed'] != '1' || urlParams['libraries'] == '1')) { @@ -377,7 +375,7 @@ EditorUi.initMinimalTheme = function() if (this.userElement != null) { var elt = this.userElement; - elt.style.cssText = 'position:relative;margin-right:4px;cursor:pointer;display:' + elt.style.display; + elt.style.cssText = 'position:relative;cursor:pointer;display:' + elt.style.display; elt.className = 'geToolbarButton'; elt.innerText = ''; elt.style.backgroundImage = 'url(' + Editor.userImage + ')'; @@ -386,13 +384,11 @@ EditorUi.initMinimalTheme = function() elt.style.backgroundSize = '24px 24px'; elt.style.height = '24px'; elt.style.width = '24px'; - elt.style.cssFloat = 'right'; - elt.setAttribute('title', mxResources.get('changeUser')); + var title = mxResources.get('changeUser'); if (elt.style.display != 'none') { elt.style.display = 'inline-block'; - var file = this.getCurrentFile(); if (file != null && file.isRealtimeEnabled() && file.isRealtimeSupported()) @@ -404,16 +400,15 @@ EditorUi.initMinimalTheme = function() icon.style.top = '2px'; icon.style.width = '12px'; icon.style.height = '12px'; - // icon.style.cursor = 'default'; var err = file.getRealtimeError(); var state = file.getRealtimeState(); - var status = mxResources.get('realtimeCollaboration'); + title += ' (' + mxResources.get('realtimeCollaboration'); if (state == 1) { icon.src = Editor.syncImage; - status += ' (' + mxResources.get('online') + ')'; + title += mxResources.get('online'); } else { @@ -421,19 +416,21 @@ EditorUi.initMinimalTheme = function() if (err != null && err.message != null) { - status += ' (' + err.message + ')'; + title += err.message; } else { - status += ' (' + mxResources.get('disconnected') + ')'; + title += mxResources.get('disconnected'); } } - icon.setAttribute('title', status); - elt.style.paddingRight = '4px'; + elt.style.marginRight = '6px'; elt.appendChild(icon); + title += ')'; } } + + elt.setAttribute('title', title); } }; @@ -445,28 +442,7 @@ EditorUi.initMinimalTheme = function() if (this.shareButton != null) { - var elt = this.shareButton; - elt.style.cssText = 'display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;'; - elt.className = 'geToolbarButton'; - elt.innerText = ''; - elt.style.backgroundImage = 'url(' + Editor.shareImage + ')'; - elt.style.backgroundPosition = 'center center'; - elt.style.backgroundRepeat = 'no-repeat'; - elt.style.backgroundSize = '24px 24px'; - elt.style.height = '24px'; - elt.style.width = '24px'; - - // Share button hidden via CSS to enable notifications button - if (urlParams['sketch'] == '1') - { - this.shareButton.style.display = 'none'; - } - } - - if (this.buttonContainer != null) - { - this.buttonContainer.style.marginTop = '-2px'; - this.buttonContainer.style.paddingTop = '4px'; + this.shareButton.style.display = 'none'; } }; @@ -682,43 +658,37 @@ EditorUi.initMinimalTheme = function() if (this.formatWindow != null) { - this.formatWindow.window.setVisible(false); - this.formatWindow.window.destroy(); + this.formatWindow.destroy(); this.formatWindow = null; } if (this.actions.outlineWindow != null) { - this.actions.outlineWindow.window.setVisible(false); - this.actions.outlineWindow.window.destroy(); + this.actions.outlineWindow.destroy(); this.actions.outlineWindow = null; } if (this.actions.layersWindow != null) { - this.actions.layersWindow.window.setVisible(false); this.actions.layersWindow.destroy(); this.actions.layersWindow = null; } if (this.menus.tagsWindow != null) { - this.menus.tagsWindow.window.setVisible(false); - this.menus.tagsWindow.window.destroy(); + this.menus.tagsWindow.destroy(); this.menus.tagsWindow = null; } if (this.menus.findWindow != null) { - this.menus.findWindow.window.setVisible(false); - this.menus.findWindow.window.destroy(); + this.menus.findWindow.destroy(); this.menus.findWindow = null; } if (this.menus.findReplaceWindow != null) { - this.menus.findReplaceWindow.window.setVisible(false); - this.menus.findReplaceWindow.window.destroy(); + this.menus.findReplaceWindow.destroy(); this.menus.findReplaceWindow = null; } @@ -770,36 +740,16 @@ EditorUi.initMinimalTheme = function() menusInit.apply(this, arguments); var ui = this.editorUi; - var graph = ui.editor.graph; var togglePagesAction = ui.actions.put('togglePagesVisible', new Action(mxResources.get('pages'), function(e) { ui.setPagesVisible(!Editor.pagesVisible); })); - + togglePagesAction.setToggleAction(true); togglePagesAction.setSelectedCallback(function() { return Editor.pagesVisible; }); - ui.actions.put('importCsv', new Action(mxResources.get('csv') + '...', function() - { - graph.popupMenuHandler.hideMenu(); - ui.showImportCsvDialog(); - })); - ui.actions.put('importText', new Action(mxResources.get('text') + '...', function() - { - var dlg = new ParseDialog(ui, 'Insert from Text'); - ui.showDialog(dlg.container, 620, 420, true, false); - dlg.init(); - })); - ui.actions.put('formatSql', new Action(mxResources.get('formatSql') + '...', function() - { - var dlg = new ParseDialog(ui, 'Insert from Text', 'formatSql'); - ui.showDialog(dlg.container, 620, 420, true, false); - dlg.init(); - })); - - ui.actions.put('toggleShapes', new Action(mxResources.get((urlParams['sketch'] == '1') ? - 'moreShapes' : 'shapes') + '...', function() + ui.actions.put('toggleShapes', new Action(mxResources.get('shapes'), function() { toggleShapes(ui); }, null, null, Editor.ctrlKey + '+Shift+K')); @@ -1139,7 +1089,7 @@ EditorUi.initMinimalTheme = function() // Extras menu is labelled preferences but keeps ID for extensions this.put('extras', new Menu(mxUtils.bind(this, function(menu, parent) { - if (langMenu != null) + if (langMenu != null && (urlParams['embed'] != '1' || urlParams['lang'] == null)) { ui.menus.addSubmenu('language', menu, parent); } @@ -1207,16 +1157,10 @@ EditorUi.initMinimalTheme = function() // Adds trailing separator in case new plugin entries are added menu.addSeparator(parent); - }))); - - this.put('insertAdvanced', new Menu(mxUtils.bind(this, function(menu, parent) - { - ui.menus.addMenuItems(menu, ['importText', 'plantUml', 'mermaid', '-', - 'formatSql', 'importCsv', '-', 'createShape', 'editDiagram'], parent); - }))); - - (mxUtils.bind(this, function() - { + }))); + + (mxUtils.bind(this, function() + { var insertMenu = this.get('insert'); var insertMenuFunct = insertMenu.funct; @@ -1935,7 +1879,32 @@ EditorUi.initMinimalTheme = function() } } }); - + + if (urlParams['embed'] != '1' && urlParams['live-ui'] == '1') + { + var themeElt = addMenu('theme', null, Editor.darkModeImage); + + if (themeElt != null) + { + themeElt.style.position = 'relative'; + themeElt.style.backgroundPosition = 'top center'; + themeElt.style.backgroundSize = '22px 22px'; + themeElt.style.width = '24px'; + themeElt.style.height = '28px'; + themeElt.style.top = '4px'; + menubar.appendChild(themeElt); + + var updateThemeElement = mxUtils.bind(this, function() + { + themeElt.style.backgroundImage = 'url(\'' + ((Editor.isDarkMode()) ? + Editor.lightModeImage : Editor.darkModeImage) + '\')'; + }); + + ui.addListener('darkModeChanged', updateThemeElement); + updateThemeElement(); + } + } + // Connects the status bar to the editor status and moves // status to bell icon title for frequent common messages menubar.style.visibility = (menubar.clientWidth < 20) ? 'hidden' : ''; @@ -2022,9 +1991,10 @@ EditorUi.initMinimalTheme = function() ui.statusContainer.style.display = 'inline-block'; ui.statusContainer.style.textOverflow = 'ellipsis'; - ui.buttonContainer.style.position = ''; - ui.buttonContainer.style.paddingRight = '0px'; ui.buttonContainer.style.display = 'inline-block'; + ui.buttonContainer.style.position = 'relative'; + ui.buttonContainer.style.paddingRight = '0px'; + ui.buttonContainer.style.top = '0px'; var foldImg = document.createElement('a'); foldImg.style.padding = '0px'; @@ -2354,7 +2324,7 @@ EditorUi.initMinimalTheme = function() ui.tabContainer.style.visibility = 'hidden'; menubar.style.cssText = 'position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;' + - 'box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;' + + 'box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;' + 'text-align:right;white-space:nowrap;overflow:hidden;user-select:none;'; toolbar.style.cssText = 'position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;' + 'box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;' + @@ -2510,31 +2480,31 @@ EditorUi.initMinimalTheme = function() appElt = temp; } - createGroup([appElt, addMenuItem(mxResources.get('shapes'), ui.actions.get('toggleShapes').funct, null, + createGroup([appElt, addMenuItem(mxResources.get('shapes'), ui.actions.get('toggleShapes').funct, null, mxResources.get('shapes'), ui.actions.get('image'), (small) ? Editor.shapesImage : null), addMenuItem(mxResources.get('format'), ui.actions.get('toggleFormat').funct, null, mxResources.get('format') + ' (' + ui.actions.get('formatPanel').shortcut + ')', ui.actions.get('image'), (small) ? Editor.formatImage : null)], (small) ? 60 : null); - var elt = addMenu('insert', true, (small) ? insertImage : null); - createGroup([elt, addMenuItem(mxResources.get('delete'), ui.actions.get('delete').funct, + var elt = addMenu('insert', true, (small) ? insertImage : null); + createGroup([elt, addMenuItem(mxResources.get('delete'), ui.actions.get('delete').funct, null, mxResources.get('delete'), ui.actions.get('delete'), - (small) ? Editor.trashImage : null)], (small) ? 60 : null); + (small) ? Editor.trashImage : null)], (small) ? 60 : null); - if (iw >= 411) - { - createGroup([undoElt, redoElt], 60); + if (iw >= 411) + { + createGroup([undoElt, redoElt], 60); - if (iw >= 520) - { - createGroup([fitElt, - (iw >= 640) ? addMenuItem('', zoomInAction.funct, true, mxResources.get('zoomIn') + ' (' + Editor.ctrlKey + ' +)', + if (iw >= 520) + { + createGroup([fitElt, + (iw >= 640) ? addMenuItem('', zoomInAction.funct, true, mxResources.get('zoomIn') + ' (' + Editor.ctrlKey + ' +)', zoomInAction, Editor.zoomInImage) : null, - (iw >= 640) ? addMenuItem('', zoomOutAction.funct, true, mxResources.get('zoomOut') + ' (' + Editor.ctrlKey + ' -)', + (iw >= 640) ? addMenuItem('', zoomOutAction.funct, true, mxResources.get('zoomOut') + ' (' + Editor.ctrlKey + ' -)', zoomOutAction, Editor.zoomOutImage) : null], 60); - } - } + } + } } if (appElt != null) @@ -2552,30 +2522,45 @@ EditorUi.initMinimalTheme = function() }), null, null); } - var langMenu = ui.menus.get('language'); + var langMenu = ui.menus.get((urlParams['live-ui'] == '1') ? + 'theme' : 'language'); if (langMenu != null && !mxClient.IS_CHROMEAPP && !EditorUi.isElectronApp && iw >= 600 && + urlParams['embed'] != '1' && urlParams['sketch'] != '1') { if (langMenuElt == null) { var elt = menuObj.addMenu('', langMenu.funct); - elt.setAttribute('title', mxResources.get('language')); + elt.setAttribute('title', mxResources.get((urlParams['live-ui'] == '1') ? + 'preferences' : 'language')); elt.className = 'geToolbarButton'; elt.style.backgroundImage = 'url(' + Editor.globeImage + ')'; - elt.style.backgroundPosition = 'center center'; - elt.style.backgroundRepeat = 'no-repeat'; - elt.style.backgroundSize = '24px 24px'; + elt.style.backgroundPosition = 'center center'; + elt.style.backgroundRepeat = 'no-repeat'; + elt.style.backgroundSize = '22px 22px'; elt.style.position = 'absolute'; - elt.style.height = '24px'; - elt.style.width = '24px'; + elt.style.height = '24px'; + elt.style.width = '24px'; elt.style.zIndex = '1'; elt.style.right = '8px'; elt.style.cursor = 'pointer'; - elt.style.top = (urlParams['embed'] == '1') ? '12px' : '11px'; + elt.style.top = '12px'; menubar.appendChild(elt); langMenuElt = elt; + + if (urlParams['live-ui'] == '1') + { + var updateThemeElement = mxUtils.bind(this, function() + { + elt.style.backgroundImage = 'url(\'' + ((Editor.isDarkMode()) ? + Editor.lightModeImage : Editor.darkModeImage) + '\')'; + }); + + ui.addListener('darkModeChanged', updateThemeElement); + updateThemeElement(); + } } ui.buttonContainer.style.paddingRight = '34px'; diff --git a/src/main/webapp/js/grapheditor/Editor.js b/src/main/webapp/js/grapheditor/Editor.js index 8fc51539..2da5f561 100644 --- a/src/main/webapp/js/grapheditor/Editor.js +++ b/src/main/webapp/js/grapheditor/Editor.js @@ -139,8 +139,6 @@ Editor.plusImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My Editor.shapesImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48Zz48cGF0aCBkPSJNMywxMWg4VjNIM1YxMXogTTUsNWg0djRINVY1eiIvPjxwYXRoIGQ9Ik0xMywzdjhoOFYzSDEzeiBNMTksOWgtNFY1aDRWOXoiLz48cGF0aCBkPSJNMywyMWg4di04SDNWMjF6IE01LDE1aDR2NEg1VjE1eiIvPjxwb2x5Z29uIHBvaW50cz0iMTgsMTMgMTYsMTMgMTYsMTYgMTMsMTYgMTMsMTggMTYsMTggMTYsMjEgMTgsMjEgMTgsMTggMjEsMTggMjEsMTYgMTgsMTYiLz48L2c+PC9nPjwvc3ZnPg=='; Editor.formatImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg=='; Editor.freehandImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHJlY3QgZmlsbD0ibm9uZSIgaGVpZ2h0PSIyNCIgd2lkdGg9IjI0Ii8+PHBhdGggZD0iTTQuNSw4YzEuMDQsMCwyLjM0LTEuNSw0LjI1LTEuNWMxLjUyLDAsMi43NSwxLjIzLDIuNzUsMi43NWMwLDIuMDQtMS45OSwzLjE1LTMuOTEsNC4yMkM1LjQyLDE0LjY3LDQsMTUuNTcsNCwxNyBjMCwxLjEsMC45LDIsMiwydjJjLTIuMjEsMC00LTEuNzktNC00YzAtMi43MSwyLjU2LTQuMTQsNC42Mi01LjI4YzEuNDItMC43OSwyLjg4LTEuNiwyLjg4LTIuNDdjMC0wLjQxLTAuMzQtMC43NS0wLjc1LTAuNzUgQzcuNSw4LjUsNi4yNSwxMCw0LjUsMTBDMy4xMiwxMCwyLDguODgsMiw3LjVDMiw1LjQ1LDQuMTcsMi44Myw1LDJsMS40MSwxLjQxQzUuNDEsNC40Miw0LDYuNDMsNCw3LjVDNCw3Ljc4LDQuMjIsOCw0LjUsOHogTTgsMjEgbDMuNzUsMGw4LjA2LTguMDZsLTMuNzUtMy43NUw4LDE3LjI1TDgsMjF6IE0xMCwxOC4wOGw2LjA2LTYuMDZsMC45MiwwLjkyTDEwLjkyLDE5TDEwLDE5TDEwLDE4LjA4eiBNMjAuMzcsNi4yOSBjLTAuMzktMC4zOS0xLjAyLTAuMzktMS40MSwwbC0xLjgzLDEuODNsMy43NSwzLjc1bDEuODMtMS44M2MwLjM5LTAuMzksMC4zOS0xLjAyLDAtMS40MUwyMC4zNyw2LjI5eiIvPjwvc3ZnPg=='; -Editor.darkImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxyZWN0IGZpbGw9Im5vbmUiIGhlaWdodD0iMjQiIHdpZHRoPSIyNCIvPjxwYXRoIGQ9Ik05LjM3LDUuNTFDOS4xOSw2LjE1LDkuMSw2LjgyLDkuMSw3LjVjMCw0LjA4LDMuMzIsNy40LDcuNCw3LjRjMC42OCwwLDEuMzUtMC4wOSwxLjk5LTAuMjdDMTcuNDUsMTcuMTksMTQuOTMsMTksMTIsMTkgYy0zLjg2LDAtNy0zLjE0LTctN0M1LDkuMDcsNi44MSw2LjU1LDkuMzcsNS41MXogTTEyLDNjLTQuOTcsMC05LDQuMDMtOSw5czQuMDMsOSw5LDlzOS00LjAzLDktOWMwLTAuNDYtMC4wNC0wLjkyLTAuMS0xLjM2IGMtMC45OCwxLjM3LTIuNTgsMi4yNi00LjQsMi4yNmMtMi45OCwwLTUuNC0yLjQyLTUuNC01LjRjMC0xLjgxLDAuODktMy40MiwyLjI2LTQuNEMxMi45MiwzLjA0LDEyLjQ2LDMsMTIsM0wxMiwzeiIvPjwvc3ZnPg=='; -Editor.lightImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxyZWN0IGZpbGw9Im5vbmUiIGhlaWdodD0iMjQiIHdpZHRoPSIyNCIvPjxwYXRoIGQ9Ik0xMiw5YzEuNjUsMCwzLDEuMzUsMywzcy0xLjM1LDMtMywzcy0zLTEuMzUtMy0zUzEwLjM1LDksMTIsOSBNMTIsN2MtMi43NiwwLTUsMi4yNC01LDVzMi4yNCw1LDUsNXM1LTIuMjQsNS01IFMxNC43Niw3LDEyLDdMMTIsN3ogTTIsMTNsMiwwYzAuNTUsMCwxLTAuNDUsMS0xcy0wLjQ1LTEtMS0xbC0yLDBjLTAuNTUsMC0xLDAuNDUtMSwxUzEuNDUsMTMsMiwxM3ogTTIwLDEzbDIsMGMwLjU1LDAsMS0wLjQ1LDEtMSBzLTAuNDUtMS0xLTFsLTIsMGMtMC41NSwwLTEsMC40NS0xLDFTMTkuNDUsMTMsMjAsMTN6IE0xMSwydjJjMCwwLjU1LDAuNDUsMSwxLDFzMS0wLjQ1LDEtMVYyYzAtMC41NS0wLjQ1LTEtMS0xUzExLDEuNDUsMTEsMnogTTExLDIwdjJjMCwwLjU1LDAuNDUsMSwxLDFzMS0wLjQ1LDEtMXYtMmMwLTAuNTUtMC40NS0xLTEtMUMxMS40NSwxOSwxMSwxOS40NSwxMSwyMHogTTUuOTksNC41OGMtMC4zOS0wLjM5LTEuMDMtMC4zOS0xLjQxLDAgYy0wLjM5LDAuMzktMC4zOSwxLjAzLDAsMS40MWwxLjA2LDEuMDZjMC4zOSwwLjM5LDEuMDMsMC4zOSwxLjQxLDBzMC4zOS0xLjAzLDAtMS40MUw1Ljk5LDQuNTh6IE0xOC4zNiwxNi45NSBjLTAuMzktMC4zOS0xLjAzLTAuMzktMS40MSwwYy0wLjM5LDAuMzktMC4zOSwxLjAzLDAsMS40MWwxLjA2LDEuMDZjMC4zOSwwLjM5LDEuMDMsMC4zOSwxLjQxLDBjMC4zOS0wLjM5LDAuMzktMS4wMywwLTEuNDEgTDE4LjM2LDE2Ljk1eiBNMTkuNDIsNS45OWMwLjM5LTAuMzksMC4zOS0xLjAzLDAtMS40MWMtMC4zOS0wLjM5LTEuMDMtMC4zOS0xLjQxLDBsLTEuMDYsMS4wNmMtMC4zOSwwLjM5LTAuMzksMS4wMywwLDEuNDEgczEuMDMsMC4zOSwxLjQxLDBMMTkuNDIsNS45OXogTTcuMDUsMTguMzZjMC4zOS0wLjM5LDAuMzktMS4wMywwLTEuNDFjLTAuMzktMC4zOS0xLjAzLTAuMzktMS40MSwwbC0xLjA2LDEuMDYgYy0wLjM5LDAuMzktMC4zOSwxLjAzLDAsMS40MXMxLjAzLDAuMzksMS40MSwwTDcuMDUsMTguMzZ6Ii8+PC9zdmc+'; Editor.undoImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+'; Editor.redoImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg=='; Editor.outlineImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjxwYXRoIGQ9Ik0yMC41IDNsLS4xNi4wM0wxNSA1LjEgOSAzIDMuMzYgNC45Yy0uMjEuMDctLjM2LjI1LS4zNi40OFYyMC41YzAgLjI4LjIyLjUuNS41bC4xNi0uMDNMOSAxOC45bDYgMi4xIDUuNjQtMS45Yy4yMS0uMDcuMzYtLjI1LjM2LS40OFYzLjVjMC0uMjgtLjIyLS41LS41LS41ek0xNSAxOWwtNi0yLjExVjVsNiAyLjExVjE5eiIvPjwvc3ZnPg=='; diff --git a/src/main/webapp/js/grapheditor/EditorUi.js b/src/main/webapp/js/grapheditor/EditorUi.js index 261f3394..85c9219c 100644 --- a/src/main/webapp/js/grapheditor/EditorUi.js +++ b/src/main/webapp/js/grapheditor/EditorUi.js @@ -2550,11 +2550,16 @@ EditorUi.prototype.initCanvas = function() if (toolbarConfig.backBtn != null) { - addButton(mxUtils.bind(this, function(evt) + var backUrl = Graph.sanitizeLink(toolbarConfig.backBtn.url); + + if (backUrl != null) { - window.location.href = toolbarConfig.backBtn.url; - mxEvent.consume(evt); - }), Editor.backImage, mxResources.get('back', null, 'Back')); + addButton(mxUtils.bind(this, function(evt) + { + window.location.href = backUrl; + mxEvent.consume(evt); + }), Editor.backImage, mxResources.get('back', null, 'Back')); + } } if (this.isPagesEnabled()) @@ -2812,11 +2817,14 @@ EditorUi.prototype.initCanvas = function() if (toolbarConfig.refreshBtn != null) { + var refreshUrl = (toolbarConfig.refreshBtn.url == null) ? null : + Graph.sanitizeLink(toolbarConfig.refreshBtn.url); + addButton(mxUtils.bind(this, function(evt) { - if (toolbarConfig.refreshBtn.url) + if (refreshUrl != null) { - window.location.href = toolbarConfig.refreshBtn.url; + window.location.href = refreshUrl; } else { diff --git a/src/main/webapp/js/grapheditor/Graph.js b/src/main/webapp/js/grapheditor/Graph.js index c12646a9..e660a594 100644 --- a/src/main/webapp/js/grapheditor/Graph.js +++ b/src/main/webapp/js/grapheditor/Graph.js @@ -1767,8 +1767,9 @@ Graph.sanitizeNode = function(value) // Allows use tag in SVG with local references only DOMPurify.addHook('afterSanitizeAttributes', function(node) { - if (node.nodeName == 'use' && node.hasAttribute('xlink:href') && - !node.getAttribute('xlink:href').match(/^#/)) + if (node.nodeName == 'use' && ((node.getAttribute('xlink:href') != null && + !node.getAttribute('xlink:href').startsWith('#')) || + (node.getAttribute('href') != null && !node.getAttribute('href').startsWith('#')))) { node.remove(); } @@ -6110,8 +6111,9 @@ HoverIcons.prototype.getState = function(state) */ HoverIcons.prototype.update = function(state, x, y) { - if (!this.graph.connectionArrowsEnabled || (state != null && - mxUtils.getValue(state.style, 'allowArrows', '1') == '0')) + if (!this.graph.connectionArrowsEnabled || + (this.graph.freehand != null && this.graph.freehand.isDrawing()) || + (state != null && mxUtils.getValue(state.style, 'allowArrows', '1') == '0')) { this.reset(); } diff --git a/src/main/webapp/js/integrate.min.js b/src/main/webapp/js/integrate.min.js index 54bba6bc..2289e91c 100644 --- a/src/main/webapp/js/integrate.min.js +++ b/src/main/webapp/js/integrate.min.js @@ -130,7 +130,7 @@ window.EXPORT_URL=window.EXPORT_URL||"https://convert.diagrams.net/node/export"; window.REALTIME_URL=window.REALTIME_URL||("test.draw.io"==window.location.hostname&&"local"!=urlParams.cache?"https://app.diagrams.net/cache":"cache");window.DRAWIO_GITLAB_URL=window.DRAWIO_GITLAB_URL||"https://gitlab.com";window.DRAWIO_GITLAB_ID=window.DRAWIO_GITLAB_ID||"2b14debc5feeb18ba65358d863ec870e4cc9294b28c3c941cb3014eb4af9a9b4";window.DRAWIO_GITHUB_URL=window.DRAWIO_GITHUB_URL||"https://github.com";window.DRAWIO_GITHUB_API_URL=window.DRAWIO_GITHUB_API_URL||"https://api.github.com"; window.DRAWIO_GITHUB_ID=window.DRAWIO_GITHUB_ID||"Iv1.98d62f0431e40543";window.DRAWIO_DROPBOX_ID=window.DRAWIO_DROPBOX_ID||"jg02tc0onwmhlgm";window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"import";window.PROXY_URL=window.PROXY_URL||"proxy";window.DRAWIO_VIEWER_URL=window.DRAWIO_VIEWER_URL||null;window.NOTIFICATIONS_URL=window.NOTIFICATIONS_URL||"https://www.draw.io/notifications"; window.RT_WEBSOCKET_URL=window.RT_WEBSOCKET_URL||"wss://"+("test.draw.io"==window.location.hostname?"app.diagrams.net":window.location.hostname)+"/rt";window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||((null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":window.DRAWIO_BASE_URL+"/iconSearch"); -window.TEMPLATE_PATH=window.TEMPLATE_PATH||"templates";window.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"newDiagramCats";window.PLUGINS_BASE_PATH=window.PLUGINS_BASE_PATH||"";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_CONFIG=window.DRAWIO_CONFIG||null;window.mxLoadResources=window.mxLoadResources||!1; +window.TEMPLATE_PATH=window.TEMPLATE_PATH||"templates";window.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"newDiagramCats";window.PLUGINS_BASE_PATH=window.PLUGINS_BASE_PATH||"";window.ALLOW_CUSTOM_PLUGINS=window.ALLOW_CUSTOM_PLUGINS||!1;window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_CONFIG=window.DRAWIO_CONFIG||null;window.mxLoadResources=window.mxLoadResources||!1; window.mxLanguage=window.mxLanguage||function(){var a=urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null);if(!a&&window.mxIsElectron&&(a=urlParams.appLang,null!=a)){var c=a.indexOf("-");0<=c&&(a=a.substring(0,c));a=a.toLowerCase()}}catch(d){isLocalStorage=!1}return a}(); window.mxLanguageMap=window.mxLanguageMap||{i18n:"",id:"Bahasa Indonesia",ms:"Bahasa Melayu",bs:"Bosanski",bg:"Bulgarian",ca:"Català",cs:"Čeština",da:"Dansk",de:"Deutsch",et:"Eesti",en:"English",es:"Español",eu:"Euskara",fil:"Filipino",fr:"Français",gl:"Galego",it:"Italiano",hu:"Magyar",lt:"Lietuvių",lv:"Latviešu",nl:"Nederlands",no:"Norsk",pl:"Polski","pt-br":"Português (Brasil)",pt:"Português (Portugal)",ro:"Română",fi:"Suomi",sv:"Svenska",vi:"Tiếng Việt",tr:"Türkçe",el:"Ελληνικά",ru:"Русский", sr:"Српски",uk:"Українська",he:"עברית",ar:"العربية",fa:"فارسی",th:"ไทย",ko:"한국어",ja:"日本語",zh:"简体中文","zh-tw":"繁體中文"};"undefined"===typeof window.mxBasePath&&(window.mxBasePath="mxgraph",window.mxImageBasePath="mxgraph/images"); @@ -145,7 +145,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url "se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1"); "embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources"; window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang; -window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.2.8",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"), +window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.3.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"), IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor), IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&& 0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!== @@ -2012,8 +2012,6 @@ Editor.closeBlackImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy Editor.plusImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==";Editor.shapesImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48Zz48cGF0aCBkPSJNMywxMWg4VjNIM1YxMXogTTUsNWg0djRINVY1eiIvPjxwYXRoIGQ9Ik0xMywzdjhoOFYzSDEzeiBNMTksOWgtNFY1aDRWOXoiLz48cGF0aCBkPSJNMywyMWg4di04SDNWMjF6IE01LDE1aDR2NEg1VjE1eiIvPjxwb2x5Z29uIHBvaW50cz0iMTgsMTMgMTYsMTMgMTYsMTYgMTMsMTYgMTMsMTggMTYsMTggMTYsMjEgMTgsMjEgMTgsMTggMjEsMTggMjEsMTYgMTgsMTYiLz48L2c+PC9nPjwvc3ZnPg=="; Editor.formatImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg=="; Editor.freehandImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHJlY3QgZmlsbD0ibm9uZSIgaGVpZ2h0PSIyNCIgd2lkdGg9IjI0Ii8+PHBhdGggZD0iTTQuNSw4YzEuMDQsMCwyLjM0LTEuNSw0LjI1LTEuNWMxLjUyLDAsMi43NSwxLjIzLDIuNzUsMi43NWMwLDIuMDQtMS45OSwzLjE1LTMuOTEsNC4yMkM1LjQyLDE0LjY3LDQsMTUuNTcsNCwxNyBjMCwxLjEsMC45LDIsMiwydjJjLTIuMjEsMC00LTEuNzktNC00YzAtMi43MSwyLjU2LTQuMTQsNC42Mi01LjI4YzEuNDItMC43OSwyLjg4LTEuNiwyLjg4LTIuNDdjMC0wLjQxLTAuMzQtMC43NS0wLjc1LTAuNzUgQzcuNSw4LjUsNi4yNSwxMCw0LjUsMTBDMy4xMiwxMCwyLDguODgsMiw3LjVDMiw1LjQ1LDQuMTcsMi44Myw1LDJsMS40MSwxLjQxQzUuNDEsNC40Miw0LDYuNDMsNCw3LjVDNCw3Ljc4LDQuMjIsOCw0LjUsOHogTTgsMjEgbDMuNzUsMGw4LjA2LTguMDZsLTMuNzUtMy43NUw4LDE3LjI1TDgsMjF6IE0xMCwxOC4wOGw2LjA2LTYuMDZsMC45MiwwLjkyTDEwLjkyLDE5TDEwLDE5TDEwLDE4LjA4eiBNMjAuMzcsNi4yOSBjLTAuMzktMC4zOS0xLjAyLTAuMzktMS40MSwwbC0xLjgzLDEuODNsMy43NSwzLjc1bDEuODMtMS44M2MwLjM5LTAuMzksMC4zOS0xLjAyLDAtMS40MUwyMC4zNyw2LjI5eiIvPjwvc3ZnPg=="; -Editor.darkImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxyZWN0IGZpbGw9Im5vbmUiIGhlaWdodD0iMjQiIHdpZHRoPSIyNCIvPjxwYXRoIGQ9Ik05LjM3LDUuNTFDOS4xOSw2LjE1LDkuMSw2LjgyLDkuMSw3LjVjMCw0LjA4LDMuMzIsNy40LDcuNCw3LjRjMC42OCwwLDEuMzUtMC4wOSwxLjk5LTAuMjdDMTcuNDUsMTcuMTksMTQuOTMsMTksMTIsMTkgYy0zLjg2LDAtNy0zLjE0LTctN0M1LDkuMDcsNi44MSw2LjU1LDkuMzcsNS41MXogTTEyLDNjLTQuOTcsMC05LDQuMDMtOSw5czQuMDMsOSw5LDlzOS00LjAzLDktOWMwLTAuNDYtMC4wNC0wLjkyLTAuMS0xLjM2IGMtMC45OCwxLjM3LTIuNTgsMi4yNi00LjQsMi4yNmMtMi45OCwwLTUuNC0yLjQyLTUuNC01LjRjMC0xLjgxLDAuODktMy40MiwyLjI2LTQuNEMxMi45MiwzLjA0LDEyLjQ2LDMsMTIsM0wxMiwzeiIvPjwvc3ZnPg=="; -Editor.lightImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxyZWN0IGZpbGw9Im5vbmUiIGhlaWdodD0iMjQiIHdpZHRoPSIyNCIvPjxwYXRoIGQ9Ik0xMiw5YzEuNjUsMCwzLDEuMzUsMywzcy0xLjM1LDMtMywzcy0zLTEuMzUtMy0zUzEwLjM1LDksMTIsOSBNMTIsN2MtMi43NiwwLTUsMi4yNC01LDVzMi4yNCw1LDUsNXM1LTIuMjQsNS01IFMxNC43Niw3LDEyLDdMMTIsN3ogTTIsMTNsMiwwYzAuNTUsMCwxLTAuNDUsMS0xcy0wLjQ1LTEtMS0xbC0yLDBjLTAuNTUsMC0xLDAuNDUtMSwxUzEuNDUsMTMsMiwxM3ogTTIwLDEzbDIsMGMwLjU1LDAsMS0wLjQ1LDEtMSBzLTAuNDUtMS0xLTFsLTIsMGMtMC41NSwwLTEsMC40NS0xLDFTMTkuNDUsMTMsMjAsMTN6IE0xMSwydjJjMCwwLjU1LDAuNDUsMSwxLDFzMS0wLjQ1LDEtMVYyYzAtMC41NS0wLjQ1LTEtMS0xUzExLDEuNDUsMTEsMnogTTExLDIwdjJjMCwwLjU1LDAuNDUsMSwxLDFzMS0wLjQ1LDEtMXYtMmMwLTAuNTUtMC40NS0xLTEtMUMxMS40NSwxOSwxMSwxOS40NSwxMSwyMHogTTUuOTksNC41OGMtMC4zOS0wLjM5LTEuMDMtMC4zOS0xLjQxLDAgYy0wLjM5LDAuMzktMC4zOSwxLjAzLDAsMS40MWwxLjA2LDEuMDZjMC4zOSwwLjM5LDEuMDMsMC4zOSwxLjQxLDBzMC4zOS0xLjAzLDAtMS40MUw1Ljk5LDQuNTh6IE0xOC4zNiwxNi45NSBjLTAuMzktMC4zOS0xLjAzLTAuMzktMS40MSwwYy0wLjM5LDAuMzktMC4zOSwxLjAzLDAsMS40MWwxLjA2LDEuMDZjMC4zOSwwLjM5LDEuMDMsMC4zOSwxLjQxLDBjMC4zOS0wLjM5LDAuMzktMS4wMywwLTEuNDEgTDE4LjM2LDE2Ljk1eiBNMTkuNDIsNS45OWMwLjM5LTAuMzksMC4zOS0xLjAzLDAtMS40MWMtMC4zOS0wLjM5LTEuMDMtMC4zOS0xLjQxLDBsLTEuMDYsMS4wNmMtMC4zOSwwLjM5LTAuMzksMS4wMywwLDEuNDEgczEuMDMsMC4zOSwxLjQxLDBMMTkuNDIsNS45OXogTTcuMDUsMTguMzZjMC4zOS0wLjM5LDAuMzktMS4wMywwLTEuNDFjLTAuMzktMC4zOS0xLjAzLTAuMzktMS40MSwwbC0xLjA2LDEuMDYgYy0wLjM5LDAuMzktMC4zOSwxLjAzLDAsMS40MXMxLjAzLDAuMzksMS40MSwwTDcuMDUsMTguMzZ6Ii8+PC9zdmc+"; Editor.undoImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+";Editor.redoImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg=="; Editor.outlineImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjxwYXRoIGQ9Ik0yMC41IDNsLS4xNi4wM0wxNSA1LjEgOSAzIDMuMzYgNC45Yy0uMjEuMDctLjM2LjI1LS4zNi40OFYyMC41YzAgLjI4LjIyLjUuNS41bC4xNi0uMDNMOSAxOC45bDYgMi4xIDUuNjQtMS45Yy4yMS0uMDcuMzYtLjI1LjM2LS40OFYzLjVjMC0uMjgtLjIyLS41LS41LS41ek0xNSAxOWwtNi0yLjExVjVsNiAyLjExVjE5eiIvPjwvc3ZnPg=="; Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDEydjdINXYtN0gzdjdjMCAxLjEuOSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMnYtN2gtMnptLTYgLjY3bDIuNTktMi41OEwxNyAxMS41bC01IDUtNS01IDEuNDEtMS40MUwxMSAxMi42N1YzaDJ2OS42N3oiLz48L3N2Zz4=";Editor.helpImage=Editor.lightHelpImage;Editor.checkmarkImage=Editor.lightCheckmarkImage; @@ -2041,12 +2039,12 @@ Editor.prototype.setFilename=function(a){this.filename=a}; Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(e,g){b.undoableEditHappened(g.getProperty("edit"))};var f=mxUtils.bind(this,function(e,g){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,f);a.getView().addListener(mxEvent.UNDO,f);f=function(e,g){e=a.getSelectionCellsForChanges(g.getProperty("edit").changes,function(k){return!(k instanceof mxChildChange)});if(0<e.length){a.getModel();g=[];for(var d=0;d<e.length;d++)null!= a.view.getState(e[d])&&g.push(e[d]);a.setSelectionCells(g)}};b.addListener(mxEvent.UNDO,f);b.addListener(mxEvent.REDO,f);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()}; OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)}; -function Dialog(a,b,f,e,g,d,k,n,u,m,r){var x=u?57:0,B=f,D=e,F=u?0:64,J=Editor.inlineFullscreen||null==a.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(a.embedViewport);null==a.embedViewport&&null!=window.innerHeight&&(J.height=window.innerHeight);var C=J.height,O=Math.max(1,Math.round((J.width-f-F)/2)),R=Math.max(1,Math.round((C-e-a.footerHeight)/3));b.style.maxHeight="100%";f=null!=document.body?Math.min(f,document.body.scrollWidth-F):f;e=Math.min(e,C-F);0<a.dialogs.length&&(this.zIndex+= -2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=C+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));J=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=J.x+"px";this.bg.style.top=J.y+"px";O+=J.x;R+=J.y;Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px", -R+=a.embedViewport.y,O+=a.embedViewport.x);g&&document.body.appendChild(this.bg);var T=a.createDiv(u?"geTransDialog":"geDialog");g=this.getPosition(O,R,f,e);O=g.x;R=g.y;T.style.width=f+"px";T.style.height=e+"px";T.style.left=O+"px";T.style.top=R+"px";T.style.zIndex=this.zIndex;T.appendChild(b);document.body.appendChild(T);!n&&b.clientHeight>T.clientHeight-F&&(b.style.overflowY="auto");b.style.overflowX="hidden";if(d&&(d=document.createElement("img"),d.setAttribute("src",Dialog.prototype.closeImage), -d.setAttribute("title",mxResources.get("close")),d.className="geDialogClose",d.style.top=R+14+"px",d.style.left=O+f+38-x+"px",d.style.zIndex=this.zIndex,mxEvent.addListener(d,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(d),this.dialogImg=d,!r)){var Q=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(aa){Q=!0}),null,mxUtils.bind(this,function(aa){Q&&(a.hideDialog(!0),Q=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=m){var aa=m(); -null!=aa&&(B=f=aa.w,D=e=aa.h)}aa=mxUtils.getDocumentSize();C=aa.height;this.bg.style.height=C+"px";Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");O=Math.max(1,Math.round((aa.width-f-F)/2));R=Math.max(1,Math.round((C-e-a.footerHeight)/3));f=null!=document.body?Math.min(B,document.body.scrollWidth-F):B;e=Math.min(D,C-F);aa=this.getPosition(O,R,f,e);O=aa.x;R=aa.y;T.style.left=O+"px";T.style.top=R+"px";T.style.width=f+"px";T.style.height=e+ -"px";!n&&b.clientHeight>T.clientHeight-F&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=R+14+"px",this.dialogImg.style.left=O+f+38-x+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=k;this.container=T;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2; +function Dialog(a,b,f,e,g,d,k,n,u,m,r){var x=u?57:0,B=f,D=e,F=u?0:64,I=Editor.inlineFullscreen||null==a.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(a.embedViewport);null==a.embedViewport&&null!=window.innerHeight&&(I.height=window.innerHeight);var C=I.height,N=Math.max(1,Math.round((I.width-f-F)/2)),R=Math.max(1,Math.round((C-e-a.footerHeight)/3));b.style.maxHeight="100%";f=null!=document.body?Math.min(f,document.body.scrollWidth-F):f;e=Math.min(e,C-F);0<a.dialogs.length&&(this.zIndex+= +2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=C+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));I=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=I.x+"px";this.bg.style.top=I.y+"px";N+=I.x;R+=I.y;Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px", +R+=a.embedViewport.y,N+=a.embedViewport.x);g&&document.body.appendChild(this.bg);var S=a.createDiv(u?"geTransDialog":"geDialog");g=this.getPosition(N,R,f,e);N=g.x;R=g.y;S.style.width=f+"px";S.style.height=e+"px";S.style.left=N+"px";S.style.top=R+"px";S.style.zIndex=this.zIndex;S.appendChild(b);document.body.appendChild(S);!n&&b.clientHeight>S.clientHeight-F&&(b.style.overflowY="auto");b.style.overflowX="hidden";if(d&&(d=document.createElement("img"),d.setAttribute("src",Dialog.prototype.closeImage), +d.setAttribute("title",mxResources.get("close")),d.className="geDialogClose",d.style.top=R+14+"px",d.style.left=N+f+38-x+"px",d.style.zIndex=this.zIndex,mxEvent.addListener(d,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(d),this.dialogImg=d,!r)){var Q=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(aa){Q=!0}),null,mxUtils.bind(this,function(aa){Q&&(a.hideDialog(!0),Q=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=m){var aa=m(); +null!=aa&&(B=f=aa.w,D=e=aa.h)}aa=mxUtils.getDocumentSize();C=aa.height;this.bg.style.height=C+"px";Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");N=Math.max(1,Math.round((aa.width-f-F)/2));R=Math.max(1,Math.round((C-e-a.footerHeight)/3));f=null!=document.body?Math.min(B,document.body.scrollWidth-F):B;e=Math.min(D,C-F);aa=this.getPosition(N,R,f,e);N=aa.x;R=aa.y;S.style.left=N+"px";S.style.top=R+"px";S.style.width=f+"px";S.style.height=e+ +"px";!n&&b.clientHeight>S.clientHeight-F&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=R+14+"px",this.dialogImg.style.left=N+f+38-x+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=k;this.container=S;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2; Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+ "/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png"; Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+ @@ -2054,8 +2052,8 @@ Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKA var ErrorDialog=function(a,b,f,e,g,d,k,n,u,m,r){u=null!=u?u:!0;var x=document.createElement("div");x.style.textAlign="center";if(null!=b){var B=document.createElement("div");B.style.padding="0px";B.style.margin="0px";B.style.fontSize="18px";B.style.paddingBottom="16px";B.style.marginBottom="10px";B.style.borderBottom="1px solid #c0c0c0";B.style.color="gray";B.style.whiteSpace="nowrap";B.style.textOverflow="ellipsis";B.style.overflow="hidden";mxUtils.write(B,b);B.setAttribute("title",b);x.appendChild(B)}b= document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=f;x.appendChild(b);f=document.createElement("div");f.style.marginTop="12px";f.style.textAlign="center";null!=d&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();d()}),b.className="geBtn",f.appendChild(b),f.style.textAlign="center");null!=m&&(m=mxUtils.button(m,function(){null!=r&&r()}),m.className="geBtn",f.appendChild(m));var D=mxUtils.button(e,function(){u&&a.hideDialog();null!=g&&g()}); D.className="geBtn";f.appendChild(D);null!=k&&(e=mxUtils.button(k,function(){u&&a.hideDialog();null!=n&&n()}),e.className="geBtn gePrimaryBtn",f.appendChild(e));this.init=function(){D.focus()};x.appendChild(f);this.container=x},PrintDialog=function(a,b){this.create(a,b)}; -PrintDialog.prototype.create=function(a){function b(D){var F=k.checked||m.checked,J=parseInt(x.value)/100;isNaN(J)&&(J=1,x.value="100%");J*=.75;var C=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,O=1/f.pageScale;if(F){var R=k.checked?1:parseInt(r.value);isNaN(R)||(O=mxUtils.getScaleForPageCount(R,f,C))}f.getGraphBounds();var T=R=0;C=mxRectangle.fromRectangle(C);C.width=Math.ceil(C.width*J);C.height=Math.ceil(C.height*J);O*=J;!F&&f.pageVisible?(J=f.getPageLayout(),R-=J.x*C.width,T-=J.y*C.height): -F=!0;F=PrintDialog.createPrintPreview(f,O,C,0,R,T,F);F.open();D&&PrintDialog.printPreview(F)}var f=a.editor.graph,e=document.createElement("table");e.style.width="100%";e.style.height="100%";var g=document.createElement("tbody");var d=document.createElement("tr");var k=document.createElement("input");k.setAttribute("type","checkbox");var n=document.createElement("td");n.setAttribute("colspan","2");n.style.fontSize="10pt";n.appendChild(k);var u=document.createElement("span");mxUtils.write(u," "+mxResources.get("fitPage")); +PrintDialog.prototype.create=function(a){function b(D){var F=k.checked||m.checked,I=parseInt(x.value)/100;isNaN(I)&&(I=1,x.value="100%");I*=.75;var C=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,N=1/f.pageScale;if(F){var R=k.checked?1:parseInt(r.value);isNaN(R)||(N=mxUtils.getScaleForPageCount(R,f,C))}f.getGraphBounds();var S=R=0;C=mxRectangle.fromRectangle(C);C.width=Math.ceil(C.width*I);C.height=Math.ceil(C.height*I);N*=I;!F&&f.pageVisible?(I=f.getPageLayout(),R-=I.x*C.width,S-=I.y*C.height): +F=!0;F=PrintDialog.createPrintPreview(f,N,C,0,R,S,F);F.open();D&&PrintDialog.printPreview(F)}var f=a.editor.graph,e=document.createElement("table");e.style.width="100%";e.style.height="100%";var g=document.createElement("tbody");var d=document.createElement("tr");var k=document.createElement("input");k.setAttribute("type","checkbox");var n=document.createElement("td");n.setAttribute("colspan","2");n.style.fontSize="10pt";n.appendChild(k);var u=document.createElement("span");mxUtils.write(u," "+mxResources.get("fitPage")); n.appendChild(u);mxEvent.addListener(u,"click",function(D){k.checked=!k.checked;m.checked=!k.checked;mxEvent.consume(D)});mxEvent.addListener(k,"change",function(){m.checked=!k.checked});d.appendChild(n);g.appendChild(d);d=d.cloneNode(!1);var m=document.createElement("input");m.setAttribute("type","checkbox");n=document.createElement("td");n.style.fontSize="10pt";n.appendChild(m);u=document.createElement("span");mxUtils.write(u," "+mxResources.get("posterPrint")+":");n.appendChild(u);mxEvent.addListener(u, "click",function(D){m.checked=!m.checked;k.checked=!m.checked;mxEvent.consume(D)});d.appendChild(n);var r=document.createElement("input");r.setAttribute("value","1");r.setAttribute("type","number");r.setAttribute("min","1");r.setAttribute("size","4");r.setAttribute("disabled","disabled");r.style.width="50px";n=document.createElement("td");n.style.fontSize="10pt";n.appendChild(r);mxUtils.write(n," "+mxResources.get("pages")+" (max)");d.appendChild(n);g.appendChild(d);mxEvent.addListener(m,"change", function(){m.checked?r.removeAttribute("disabled"):r.setAttribute("disabled","disabled");k.checked=!m.checked});d=d.cloneNode(!1);n=document.createElement("td");mxUtils.write(n,mxResources.get("pageScale")+":");d.appendChild(n);n=document.createElement("td");var x=document.createElement("input");x.setAttribute("value","100 %");x.setAttribute("size","5");x.style.width="50px";n.appendChild(x);d.appendChild(n);g.appendChild(d);d=document.createElement("tr");n=document.createElement("td");n.colSpan=2; @@ -2066,29 +2064,29 @@ PrintDialog.previewEnabled=!0; var PageSetupDialog=function(a){function b(){null==r||r==mxConstants.NONE?(m.style.backgroundColor="",m.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(m.style.backgroundColor=r,m.style.backgroundImage="")}function f(){var C=F;null!=C&&Graph.isPageLink(C.src)&&(C=a.createImageForPageLink(C.src,null));null!=C&&null!=C.src?(D.setAttribute("src",C.src),D.style.display=""):(D.removeAttribute("src"),D.style.display="none")}var e=a.editor.graph,g=document.createElement("table");g.style.width= "100%";g.style.height="100%";var d=document.createElement("tbody");var k=document.createElement("tr");var n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("paperSize")+":");k.appendChild(n);n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";var u=PageSetupDialog.addPageFormatPanel(n,"pagesetupdialog",e.pageFormat);k.appendChild(n);d.appendChild(k);k=document.createElement("tr");n=document.createElement("td"); mxUtils.write(n,mxResources.get("background")+":");k.appendChild(n);n=document.createElement("td");n.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var m=document.createElement("button");m.style.width="22px";m.style.height="22px";m.style.cursor="pointer";m.style.marginRight="20px";m.style.backgroundPosition="center center";m.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(m.style.position="relative",m.style.top="-6px");var r=e.background;b();mxEvent.addListener(m, -"click",function(C){a.pickColor(r||"none",function(O){r=O;b()});mxEvent.consume(C)});n.appendChild(m);mxUtils.write(n,mxResources.get("gridSize")+":");var x=document.createElement("input");x.setAttribute("type","number");x.setAttribute("min","0");x.style.width="40px";x.style.marginLeft="6px";x.value=e.getGridSize();n.appendChild(x);mxEvent.addListener(x,"change",function(){var C=parseInt(x.value);x.value=Math.max(1,isNaN(C)?e.getGridSize():C)});k.appendChild(n);d.appendChild(k);k=document.createElement("tr"); +"click",function(C){a.pickColor(r||"none",function(N){r=N;b()});mxEvent.consume(C)});n.appendChild(m);mxUtils.write(n,mxResources.get("gridSize")+":");var x=document.createElement("input");x.setAttribute("type","number");x.setAttribute("min","0");x.style.width="40px";x.style.marginLeft="6px";x.value=e.getGridSize();n.appendChild(x);mxEvent.addListener(x,"change",function(){var C=parseInt(x.value);x.value=Math.max(1,isNaN(C)?e.getGridSize():C)});k.appendChild(n);d.appendChild(k);k=document.createElement("tr"); n=document.createElement("td");mxUtils.write(n,mxResources.get("image")+":");k.appendChild(n);n=document.createElement("td");var B=document.createElement("button");B.className="geBtn";B.style.margin="0px";mxUtils.write(B,mxResources.get("change")+"...");var D=document.createElement("img");D.setAttribute("valign","middle");D.style.verticalAlign="middle";D.style.border="1px solid lightGray";D.style.borderRadius="4px";D.style.marginRight="14px";D.style.maxWidth="100px";D.style.cursor="pointer";D.style.height= -"60px";D.style.padding="4px";var F=e.backgroundImage,J=function(C){a.showBackgroundImageDialog(function(O,R){R||(F=O,f())},F);mxEvent.consume(C)};mxEvent.addListener(B,"click",J);mxEvent.addListener(D,"click",J);f();n.appendChild(D);n.appendChild(B);k.appendChild(n);d.appendChild(k);k=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.paddingTop="16px";n.setAttribute("align","right");B=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});B.className="geBtn"; -a.editor.cancelFirst&&n.appendChild(B);J=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var C=parseInt(x.value);isNaN(C)||e.gridSize===C||e.setGridSize(C);C=new ChangePageSetup(a,r,F,u.get());C.ignoreColor=e.background==r;C.ignoreImage=(null!=e.backgroundImage?e.backgroundImage.src:null)===(null!=F?F.src:null);e.pageFormat.width==C.previousFormat.width&&e.pageFormat.height==C.previousFormat.height&&C.ignoreColor&&C.ignoreImage||e.model.execute(C)});J.className="geBtn gePrimaryBtn"; -n.appendChild(J);a.editor.cancelFirst||n.appendChild(B);k.appendChild(n);d.appendChild(k);g.appendChild(d);this.container=g}; -PageSetupDialog.addPageFormatPanel=function(a,b,f,e){function g(aa,S,P){if(P||x!=document.activeElement&&B!=document.activeElement){aa=!1;for(S=0;S<F.length;S++)P=F[S],R?"custom"==P.key&&(n.value=P.key,R=!1):null!=P.format&&("a4"==P.key?826==f.width?(f=mxRectangle.fromRectangle(f),f.width=827):826==f.height&&(f=mxRectangle.fromRectangle(f),f.height=827):"a5"==P.key&&(584==f.width?(f=mxRectangle.fromRectangle(f),f.width=583):584==f.height&&(f=mxRectangle.fromRectangle(f),f.height=583)),f.width==P.format.width&& +"60px";D.style.padding="4px";var F=e.backgroundImage,I=function(C){a.showBackgroundImageDialog(function(N,R){R||(F=N,f())},F);mxEvent.consume(C)};mxEvent.addListener(B,"click",I);mxEvent.addListener(D,"click",I);f();n.appendChild(D);n.appendChild(B);k.appendChild(n);d.appendChild(k);k=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.paddingTop="16px";n.setAttribute("align","right");B=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});B.className="geBtn"; +a.editor.cancelFirst&&n.appendChild(B);I=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var C=parseInt(x.value);isNaN(C)||e.gridSize===C||e.setGridSize(C);C=new ChangePageSetup(a,r,F,u.get());C.ignoreColor=e.background==r;C.ignoreImage=(null!=e.backgroundImage?e.backgroundImage.src:null)===(null!=F?F.src:null);e.pageFormat.width==C.previousFormat.width&&e.pageFormat.height==C.previousFormat.height&&C.ignoreColor&&C.ignoreImage||e.model.execute(C)});I.className="geBtn gePrimaryBtn"; +n.appendChild(I);a.editor.cancelFirst||n.appendChild(B);k.appendChild(n);d.appendChild(k);g.appendChild(d);this.container=g}; +PageSetupDialog.addPageFormatPanel=function(a,b,f,e){function g(aa,U,P){if(P||x!=document.activeElement&&B!=document.activeElement){aa=!1;for(U=0;U<F.length;U++)P=F[U],R?"custom"==P.key&&(n.value=P.key,R=!1):null!=P.format&&("a4"==P.key?826==f.width?(f=mxRectangle.fromRectangle(f),f.width=827):826==f.height&&(f=mxRectangle.fromRectangle(f),f.height=827):"a5"==P.key&&(584==f.width?(f=mxRectangle.fromRectangle(f),f.width=583):584==f.height&&(f=mxRectangle.fromRectangle(f),f.height=583)),f.width==P.format.width&& f.height==P.format.height?(n.value=P.key,d.setAttribute("checked","checked"),d.defaultChecked=!0,d.checked=!0,k.removeAttribute("checked"),k.defaultChecked=!1,k.checked=!1,aa=!0):f.width==P.format.height&&f.height==P.format.width&&(n.value=P.key,d.removeAttribute("checked"),d.defaultChecked=!1,d.checked=!1,k.setAttribute("checked","checked"),k.defaultChecked=!0,aa=k.checked=!0));aa?(u.style.display="",r.style.display="none"):(x.value=f.width/100,B.value=f.height/100,d.setAttribute("checked","checked"), n.value="custom",u.style.display="none",r.style.display="")}}b="format-"+b;var d=document.createElement("input");d.setAttribute("name",b);d.setAttribute("type","radio");d.setAttribute("value","portrait");var k=document.createElement("input");k.setAttribute("name",b);k.setAttribute("type","radio");k.setAttribute("value","landscape");var n=document.createElement("select");n.style.marginBottom="8px";n.style.borderRadius="4px";n.style.border="1px solid rgb(160, 160, 160)";n.style.width="206px";var u= document.createElement("div");u.style.marginLeft="4px";u.style.width="210px";u.style.height="24px";d.style.marginRight="6px";u.appendChild(d);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));u.appendChild(b);k.style.marginLeft="10px";k.style.marginRight="6px";u.appendChild(k);var m=document.createElement("span");m.style.width="100px";mxUtils.write(m,mxResources.get("landscape"));u.appendChild(m);var r=document.createElement("div");r.style.marginLeft= -"4px";r.style.width="210px";r.style.height="24px";var x=document.createElement("input");x.setAttribute("size","7");x.style.textAlign="right";r.appendChild(x);mxUtils.write(r," in x ");var B=document.createElement("input");B.setAttribute("size","7");B.style.textAlign="right";r.appendChild(B);mxUtils.write(r," in");u.style.display="none";r.style.display="none";for(var D={},F=PageSetupDialog.getFormats(),J=0;J<F.length;J++){var C=F[J];D[C.key]=C;var O=document.createElement("option");O.setAttribute("value", -C.key);mxUtils.write(O,C.title);n.appendChild(O)}var R=!1;g();a.appendChild(n);mxUtils.br(a);a.appendChild(u);a.appendChild(r);var T=f,Q=function(aa,S){aa=D[n.value];null!=aa.format?(x.value=aa.format.width/100,B.value=aa.format.height/100,r.style.display="none",u.style.display=""):(u.style.display="none",r.style.display="");aa=parseFloat(x.value);if(isNaN(aa)||0>=aa)x.value=f.width/100;aa=parseFloat(B.value);if(isNaN(aa)||0>=aa)B.value=f.height/100;aa=new mxRectangle(0,0,Math.floor(100*parseFloat(x.value)), -Math.floor(100*parseFloat(B.value)));"custom"!=n.value&&k.checked&&(aa=new mxRectangle(0,0,aa.height,aa.width));S&&R||aa.width==T.width&&aa.height==T.height||(T=aa,null!=e&&e(T))};mxEvent.addListener(b,"click",function(aa){d.checked=!0;Q(aa);mxEvent.consume(aa)});mxEvent.addListener(m,"click",function(aa){k.checked=!0;Q(aa);mxEvent.consume(aa)});mxEvent.addListener(x,"blur",Q);mxEvent.addListener(x,"click",Q);mxEvent.addListener(B,"blur",Q);mxEvent.addListener(B,"click",Q);mxEvent.addListener(k,"change", -Q);mxEvent.addListener(d,"change",Q);mxEvent.addListener(n,"change",function(aa){R="custom"==n.value;Q(aa,!0)});Q();return{set:function(aa){f=aa;g(null,null,!0)},get:function(){return T},widthInput:x,heightInput:B}}; +"4px";r.style.width="210px";r.style.height="24px";var x=document.createElement("input");x.setAttribute("size","7");x.style.textAlign="right";r.appendChild(x);mxUtils.write(r," in x ");var B=document.createElement("input");B.setAttribute("size","7");B.style.textAlign="right";r.appendChild(B);mxUtils.write(r," in");u.style.display="none";r.style.display="none";for(var D={},F=PageSetupDialog.getFormats(),I=0;I<F.length;I++){var C=F[I];D[C.key]=C;var N=document.createElement("option");N.setAttribute("value", +C.key);mxUtils.write(N,C.title);n.appendChild(N)}var R=!1;g();a.appendChild(n);mxUtils.br(a);a.appendChild(u);a.appendChild(r);var S=f,Q=function(aa,U){aa=D[n.value];null!=aa.format?(x.value=aa.format.width/100,B.value=aa.format.height/100,r.style.display="none",u.style.display=""):(u.style.display="none",r.style.display="");aa=parseFloat(x.value);if(isNaN(aa)||0>=aa)x.value=f.width/100;aa=parseFloat(B.value);if(isNaN(aa)||0>=aa)B.value=f.height/100;aa=new mxRectangle(0,0,Math.floor(100*parseFloat(x.value)), +Math.floor(100*parseFloat(B.value)));"custom"!=n.value&&k.checked&&(aa=new mxRectangle(0,0,aa.height,aa.width));U&&R||aa.width==S.width&&aa.height==S.height||(S=aa,null!=e&&e(S))};mxEvent.addListener(b,"click",function(aa){d.checked=!0;Q(aa);mxEvent.consume(aa)});mxEvent.addListener(m,"click",function(aa){k.checked=!0;Q(aa);mxEvent.consume(aa)});mxEvent.addListener(x,"blur",Q);mxEvent.addListener(x,"click",Q);mxEvent.addListener(B,"blur",Q);mxEvent.addListener(B,"click",Q);mxEvent.addListener(k,"change", +Q);mxEvent.addListener(d,"change",Q);mxEvent.addListener(n,"change",function(aa){R="custom"==n.value;Q(aa,!0)});Q();return{set:function(aa){f=aa;g(null,null,!0)},get:function(){return S},widthInput:x,heightInput:B}}; PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)", format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)}, {key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]}; -var FilenameDialog=function(a,b,f,e,g,d,k,n,u,m,r,x,B){u=null!=u?u:!0;var D=document.createElement("table"),F=document.createElement("tbody");D.style.position="absolute";D.style.top="30px";D.style.left="20px";var J=document.createElement("tr");var C=document.createElement("td");C.style.textOverflow="ellipsis";C.style.textAlign="right";C.style.maxWidth=(B?B+15:100)+"px";C.style.fontSize="10pt";C.style.width=(B?B:84)+"px";mxUtils.write(C,(g||mxResources.get("filename"))+":");J.appendChild(C);var O= -document.createElement("input");O.setAttribute("value",b||"");O.style.marginLeft="4px";O.style.width=null!=x?x+"px":"180px";var R=mxUtils.button(f,function(){if(null==d||d(O.value))u&&a.hideDialog(),e(O.value)});R.className="geBtn gePrimaryBtn";this.init=function(){if(null!=g||null==k)if(O.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?O.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var T=D.parentNode;if(null!=T){var Q=null;mxEvent.addListener(T,"dragleave", -function(aa){null!=Q&&(Q.style.backgroundColor="",Q=null);aa.stopPropagation();aa.preventDefault()});mxEvent.addListener(T,"dragover",mxUtils.bind(this,function(aa){null==Q&&(!mxClient.IS_IE||10<document.documentMode)&&(Q=O,Q.style.backgroundColor="#ebf2f9");aa.stopPropagation();aa.preventDefault()}));mxEvent.addListener(T,"drop",mxUtils.bind(this,function(aa){null!=Q&&(Q.style.backgroundColor="",Q=null);0<=mxUtils.indexOf(aa.dataTransfer.types,"text/uri-list")&&(O.value=decodeURIComponent(aa.dataTransfer.getData("text/uri-list")), -R.click());aa.stopPropagation();aa.preventDefault()}))}}};C=document.createElement("td");C.style.whiteSpace="nowrap";C.appendChild(O);J.appendChild(C);if(null!=g||null==k)F.appendChild(J),null!=r&&(C.appendChild(FilenameDialog.createTypeHint(a,O,r)),null!=a.editor.diagramFileTypes&&(J=document.createElement("tr"),C=document.createElement("td"),C.style.textOverflow="ellipsis",C.style.textAlign="right",C.style.maxWidth="100px",C.style.fontSize="10pt",C.style.width="84px",mxUtils.write(C,mxResources.get("type")+ -":"),J.appendChild(C),C=document.createElement("td"),C.style.whiteSpace="nowrap",J.appendChild(C),b=FilenameDialog.createFileTypes(a,O,a.editor.diagramFileTypes),b.style.marginLeft="4px",b.style.width="198px",C.appendChild(b),O.style.width=null!=x?x-40+"px":"190px",J.appendChild(C),F.appendChild(J)));null!=k&&(J=document.createElement("tr"),C=document.createElement("td"),C.colSpan=2,C.appendChild(k),J.appendChild(C),F.appendChild(J));J=document.createElement("tr");C=document.createElement("td");C.colSpan= -2;C.style.paddingTop=null!=r?"12px":"20px";C.style.whiteSpace="nowrap";C.setAttribute("align","right");r=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=m&&m()});r.className="geBtn";a.editor.cancelFirst&&C.appendChild(r);null!=n&&(x=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(n)}),x.className="geBtn",C.appendChild(x));mxEvent.addListener(O,"keypress",function(T){13==T.keyCode&&R.click()});C.appendChild(R);a.editor.cancelFirst||C.appendChild(r); -J.appendChild(C);F.appendChild(J);D.appendChild(F);this.container=D};FilenameDialog.filenameHelpLink=null; +var FilenameDialog=function(a,b,f,e,g,d,k,n,u,m,r,x,B){u=null!=u?u:!0;var D=document.createElement("table"),F=document.createElement("tbody");D.style.position="absolute";D.style.top="30px";D.style.left="20px";var I=document.createElement("tr");var C=document.createElement("td");C.style.textOverflow="ellipsis";C.style.textAlign="right";C.style.maxWidth=(B?B+15:100)+"px";C.style.fontSize="10pt";C.style.width=(B?B:84)+"px";mxUtils.write(C,(g||mxResources.get("filename"))+":");I.appendChild(C);var N= +document.createElement("input");N.setAttribute("value",b||"");N.style.marginLeft="4px";N.style.width=null!=x?x+"px":"180px";var R=mxUtils.button(f,function(){if(null==d||d(N.value))u&&a.hideDialog(),e(N.value)});R.className="geBtn gePrimaryBtn";this.init=function(){if(null!=g||null==k)if(N.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?N.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var S=D.parentNode;if(null!=S){var Q=null;mxEvent.addListener(S,"dragleave", +function(aa){null!=Q&&(Q.style.backgroundColor="",Q=null);aa.stopPropagation();aa.preventDefault()});mxEvent.addListener(S,"dragover",mxUtils.bind(this,function(aa){null==Q&&(!mxClient.IS_IE||10<document.documentMode)&&(Q=N,Q.style.backgroundColor="#ebf2f9");aa.stopPropagation();aa.preventDefault()}));mxEvent.addListener(S,"drop",mxUtils.bind(this,function(aa){null!=Q&&(Q.style.backgroundColor="",Q=null);0<=mxUtils.indexOf(aa.dataTransfer.types,"text/uri-list")&&(N.value=decodeURIComponent(aa.dataTransfer.getData("text/uri-list")), +R.click());aa.stopPropagation();aa.preventDefault()}))}}};C=document.createElement("td");C.style.whiteSpace="nowrap";C.appendChild(N);I.appendChild(C);if(null!=g||null==k)F.appendChild(I),null!=r&&(C.appendChild(FilenameDialog.createTypeHint(a,N,r)),null!=a.editor.diagramFileTypes&&(I=document.createElement("tr"),C=document.createElement("td"),C.style.textOverflow="ellipsis",C.style.textAlign="right",C.style.maxWidth="100px",C.style.fontSize="10pt",C.style.width="84px",mxUtils.write(C,mxResources.get("type")+ +":"),I.appendChild(C),C=document.createElement("td"),C.style.whiteSpace="nowrap",I.appendChild(C),b=FilenameDialog.createFileTypes(a,N,a.editor.diagramFileTypes),b.style.marginLeft="4px",b.style.width="198px",C.appendChild(b),N.style.width=null!=x?x-40+"px":"190px",I.appendChild(C),F.appendChild(I)));null!=k&&(I=document.createElement("tr"),C=document.createElement("td"),C.colSpan=2,C.appendChild(k),I.appendChild(C),F.appendChild(I));I=document.createElement("tr");C=document.createElement("td");C.colSpan= +2;C.style.paddingTop=null!=r?"12px":"20px";C.style.whiteSpace="nowrap";C.setAttribute("align","right");r=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=m&&m()});r.className="geBtn";a.editor.cancelFirst&&C.appendChild(r);null!=n&&(x=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(n)}),x.className="geBtn",C.appendChild(x));mxEvent.addListener(N,"keypress",function(S){13==S.keyCode&&R.click()});C.appendChild(R);a.editor.cancelFirst||C.appendChild(r); +I.appendChild(C);F.appendChild(I);D.appendChild(F);this.container=D};FilenameDialog.filenameHelpLink=null; FilenameDialog.createTypeHint=function(a,b,f){var e=document.createElement("img");e.style.backgroundPosition="center bottom";e.style.backgroundRepeat="no-repeat";e.style.margin="2px 0 0 4px";e.style.verticalAlign="top";e.style.cursor="pointer";e.style.height="16px";e.style.width="16px";mxUtils.setOpacity(e,70);var g=function(){e.setAttribute("src",Editor.helpImage);e.setAttribute("title",mxResources.get("help"));for(var d=0;d<f.length;d++)if(0<f[d].ext.length&&b.value.toLowerCase().substring(b.value.length- f[d].ext.length-1)=="."+f[d].ext){e.setAttribute("title",mxResources.get(f[d].title));break}};mxEvent.addListener(b,"keyup",g);mxEvent.addListener(b,"change",g);mxEvent.addListener(e,"click",function(d){var k=e.getAttribute("title");e.getAttribute("src")==Editor.helpImage?a.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=k&&a.showError(null,k,mxResources.get("help"),function(){a.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(d)}); g();return e}; @@ -2103,39 +2101,39 @@ mxGraphView.prototype.validateBackgroundStyles=function(){var k=this.graph,n=nul k.defaultPageBorderColor,k.container.className="geDiagramContainer geDiagramBackdrop",u.style.backgroundImage="none",u.style.backgroundColor=""):(k.container.className="geDiagramContainer",u.style.backgroundPosition=r,u.style.backgroundColor=n,u.style.backgroundImage=m)};mxGraphView.prototype.createSvgGrid=function(k){for(var n=this.graph.gridSize*this.scale;n<this.minGridSize;)n*=2;for(var u=this.gridSteps*n,m=[],r=1;r<this.gridSteps;r++){var x=r*n;m.push("M 0 "+x+" L "+u+" "+x+" M "+x+" 0 L "+x+ " "+u)}return'<svg width="'+u+'" height="'+u+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+u+'" height="'+u+'" patternUnits="userSpaceOnUse"><path d="'+m.join(" ")+'" fill="none" stroke="'+k+'" opacity="0.2" stroke-width="1"/><path d="M '+u+" 0 L 0 0 0 "+u+'" fill="none" stroke="'+k+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(k,n){a.apply(this,arguments); if(null!=this.shiftPreview1){var u=this.view.canvas;null!=u.ownerSVGElement&&(u=u.ownerSVGElement);var m=this.gridSize*this.view.scale*this.view.gridSteps;m=-Math.round(m-mxUtils.mod(this.view.translate.x*this.view.scale+k,m))+"px "+-Math.round(m-mxUtils.mod(this.view.translate.y*this.view.scale+n,m))+"px";u.style.backgroundPosition=m}};mxGraph.prototype.updatePageBreaks=function(k,n,u){var m=this.view.scale,r=this.view.translate,x=this.pageFormat,B=m*this.pageScale,D=this.view.getBackgroundPageBounds(); -n=D.width;u=D.height;var F=new mxRectangle(m*r.x,m*r.y,x.width*B,x.height*B),J=(k=k&&Math.min(F.width,F.height)>this.minPageBreakDist)?Math.ceil(u/F.height)-1:0,C=k?Math.ceil(n/F.width)-1:0,O=D.x+n,R=D.y+u;null==this.horizontalPageBreaks&&0<J&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<C&&(this.verticalPageBreaks=[]);k=mxUtils.bind(this,function(T){if(null!=T){for(var Q=T==this.horizontalPageBreaks?J:C,aa=0;aa<=Q;aa++){var S=T==this.horizontalPageBreaks?[new mxPoint(Math.round(D.x), -Math.round(D.y+(aa+1)*F.height)),new mxPoint(Math.round(O),Math.round(D.y+(aa+1)*F.height))]:[new mxPoint(Math.round(D.x+(aa+1)*F.width),Math.round(D.y)),new mxPoint(Math.round(D.x+(aa+1)*F.width),Math.round(R))];null!=T[aa]?(T[aa].points=S,T[aa].redraw()):(S=new mxPolyline(S,this.pageBreakColor),S.dialect=this.dialect,S.isDashed=this.pageBreakDashed,S.pointerEvents=!1,S.init(this.view.backgroundPane),S.redraw(),T[aa]=S)}for(aa=Q;aa<T.length;aa++)T[aa].destroy();T.splice(Q,T.length-Q)}});k(this.horizontalPageBreaks); +n=D.width;u=D.height;var F=new mxRectangle(m*r.x,m*r.y,x.width*B,x.height*B),I=(k=k&&Math.min(F.width,F.height)>this.minPageBreakDist)?Math.ceil(u/F.height)-1:0,C=k?Math.ceil(n/F.width)-1:0,N=D.x+n,R=D.y+u;null==this.horizontalPageBreaks&&0<I&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<C&&(this.verticalPageBreaks=[]);k=mxUtils.bind(this,function(S){if(null!=S){for(var Q=S==this.horizontalPageBreaks?I:C,aa=0;aa<=Q;aa++){var U=S==this.horizontalPageBreaks?[new mxPoint(Math.round(D.x), +Math.round(D.y+(aa+1)*F.height)),new mxPoint(Math.round(N),Math.round(D.y+(aa+1)*F.height))]:[new mxPoint(Math.round(D.x+(aa+1)*F.width),Math.round(D.y)),new mxPoint(Math.round(D.x+(aa+1)*F.width),Math.round(R))];null!=S[aa]?(S[aa].points=U,S[aa].redraw()):(U=new mxPolyline(U,this.pageBreakColor),U.dialect=this.dialect,U.isDashed=this.pageBreakDashed,U.pointerEvents=!1,U.init(this.view.backgroundPane),U.redraw(),S[aa]=U)}for(aa=Q;aa<S.length;aa++)S[aa].destroy();S.splice(Q,S.length-Q)}});k(this.horizontalPageBreaks); k(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(k,n,u){for(var m=0;m<n.length;m++){if(this.graph.isTableCell(n[m])||this.graph.isTableRow(n[m]))return!1;if(this.graph.getModel().isVertex(n[m])){var r=this.graph.getCellGeometry(n[m]);if(null!=r&&r.relative)return!1}}return b.apply(this,arguments)};var f=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var k= f.apply(this,arguments);k.intersects=mxUtils.bind(this,function(n,u){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(k,arguments)});return k};mxGraphView.prototype.createBackgroundPageShape=function(k){return new mxRectangleShape(k,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var k=this.getGraphBounds(),n=0<k.width?k.x/this.scale-this.translate.x:0,u=0<k.height?k.y/this.scale-this.translate.y:0,m=this.graph.pageFormat, r=this.graph.pageScale,x=m.width*r;m=m.height*r;r=Math.floor(Math.min(0,n)/x);var B=Math.floor(Math.min(0,u)/m);return new mxRectangle(this.scale*(this.translate.x+r*x),this.scale*(this.translate.y+B*m),this.scale*(Math.ceil(Math.max(1,n+k.width/this.scale)/x)-r)*x,this.scale*(Math.ceil(Math.max(1,u+k.height/this.scale)/m)-B)*m)};var e=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(k,n){e.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape|| this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=k+"px",this.view.backgroundPageShape.node.style.marginTop=n+"px")};var g=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(k,n,u,m,r,x){var B=g.apply(this,arguments);null==x||x||mxEvent.addListener(B,"mousedown",function(D){mxEvent.consume(D)});return B};var d=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell= function(k,n,u){var m=this.graph.model.getParent(k);if(n){var r=this.graph.model.isEdge(k)?null:this.graph.getCellGeometry(k);r=!this.graph.model.isEdge(m)&&!this.graph.isSiblingSelected(k)&&(null!=r&&r.relative||!this.graph.isContainer(m)||this.graph.isPart(k))}else if(r=d.apply(this,arguments),this.graph.isTableCell(k)||this.graph.isTableRow(k))r=m,this.graph.isTable(r)||(r=this.graph.model.getParent(r)),r=!this.graph.selectionCellsHandler.isHandled(r)||this.graph.isCellSelected(r)&&this.graph.isToggleEvent(u.getEvent())|| -this.graph.isCellSelected(k)&&!this.graph.isToggleEvent(u.getEvent())||this.graph.isTableCell(k)&&this.graph.isCellSelected(m);return r};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(k){k=k.getCell();for(var n=this.graph.getModel(),u=n.getParent(k),m=this.graph.view.getState(u),r=this.graph.isCellSelected(k);null!=m&&(n.isVertex(u)||n.isEdge(u));){var x=this.graph.isCellSelected(u);r=r||x;if(x||!r&&(this.graph.isTableCell(k)||this.graph.isTableRow(k)))k=u;u=n.getParent(u)}return k}})();EditorUi=function(a,b,f){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var e=this.editor.graph;e.lightbox=f;var g=e.getGraphBounds;e.getGraphBounds=function(){var G=g.apply(this,arguments),M=this.backgroundImage;if(null!=M&&null!=M.width&&null!=M.height){var U=this.view.translate,ba=this.view.scale;G=mxRectangle.fromRectangle(G);G.add(new mxRectangle((U.x+M.x)*ba,(U.y+M.y)*ba,M.width*ba,M.height*ba))}return G};e.useCssTransforms&&(this.lazyZoomDelay= -0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(G,M){this.clearSelectionState()});e.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener); -e.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);e.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);e.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);e.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,e.isEnabled=function(){return!1},e.panningHandler.isForcePanningEvent=function(G){return!mxEvent.isPopupTrigger(G.getEvent())});this.actions=new Actions(this);this.menus= +this.graph.isCellSelected(k)&&!this.graph.isToggleEvent(u.getEvent())||this.graph.isTableCell(k)&&this.graph.isCellSelected(m);return r};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(k){k=k.getCell();for(var n=this.graph.getModel(),u=n.getParent(k),m=this.graph.view.getState(u),r=this.graph.isCellSelected(k);null!=m&&(n.isVertex(u)||n.isEdge(u));){var x=this.graph.isCellSelected(u);r=r||x;if(x||!r&&(this.graph.isTableCell(k)||this.graph.isTableRow(k)))k=u;u=n.getParent(u)}return k}})();EditorUi=function(a,b,f){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var e=this.editor.graph;e.lightbox=f;var g=e.getGraphBounds;e.getGraphBounds=function(){var O=g.apply(this,arguments),T=this.backgroundImage;if(null!=T&&null!=T.width&&null!=T.height){var J=this.view.translate,ba=this.view.scale;O=mxRectangle.fromRectangle(O);O.add(new mxRectangle((J.x+T.x)*ba,(J.y+T.y)*ba,T.width*ba,T.height*ba))}return O};e.useCssTransforms&&(this.lazyZoomDelay= +0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(O,T){this.clearSelectionState()});e.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener); +e.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);e.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);e.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);e.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,e.isEnabled=function(){return!1},e.panningHandler.isForcePanningEvent=function(O){return!mxEvent.isPopupTrigger(O.getEvent())});this.actions=new Actions(this);this.menus= this.createMenus();if(!e.standalone){var d="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents strokeColor strokeWidth".split(" "),k="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "), -n="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),u=!1,m=!1;this.setDefaultStyle=function(G){try{e.getModel().isEdge(G)?m=!1:u=!1;var M=e.getCellStyle(G,!1),U=[],ba=[],la;for(la in M)U.push(M[la]),ba.push(la);e.getModel().isEdge(G)?e.currentEdgeStyle={}:e.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ba,"values",U,"cells",[G]));e.getModel().isEdge(G)?m=!0:u=!0}catch(ra){this.handleError(ra)}}; +n="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),u=!1,m=!1;this.setDefaultStyle=function(O){try{e.getModel().isEdge(O)?m=!1:u=!1;var T=e.getCellStyle(O,!1),J=[],ba=[],ha;for(ha in T)J.push(T[ha]),ba.push(ha);e.getModel().isEdge(O)?e.currentEdgeStyle={}:e.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ba,"values",J,"cells",[O]));e.getModel().isEdge(O)?m=!0:u=!0}catch(na){this.handleError(na)}}; this.clearDefaultStyle=function(){e.currentEdgeStyle=mxUtils.clone(e.defaultEdgeStyle);e.currentVertexStyle=mxUtils.clone(e.defaultVertexStyle);u=m=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var r=["fontFamily","fontSource","fontSize","fontColor"];for(b=0;b<r.length;b++)0>mxUtils.indexOf(d,r[b])&&d.push(r[b]);var x="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),B=[["startArrow","startFill","endArrow","endFill"],["startSize", -"endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(b=0;b<B.length;b++)for(f=0;f<B[b].length;f++)d.push(B[b][f]);for(b=0;b<k.length;b++)0>mxUtils.indexOf(d,k[b])&&d.push(k[b]);var D=function(G,M,U,ba,la,ra,Y){ba=null!=ba?ba:e.currentVertexStyle;la=null!=la?la:e.currentEdgeStyle;ra=null!=ra?ra:!0;U=null!=U?U:e.getModel();if(Y){Y=[];for(var da=0;da<G.length;da++)Y=Y.concat(U.getDescendants(G[da]));G=Y}U.beginUpdate(); -try{for(da=0;da<G.length;da++){var pa=G[da];if(M)var wa=["fontSize","fontFamily","fontColor"];else{var Ka=U.getStyle(pa),Ha=null!=Ka?Ka.split(";"):[];wa=d.slice();for(var ua=0;ua<Ha.length;ua++){var Ca=Ha[ua],qa=Ca.indexOf("=");if(0<=qa){var Da=Ca.substring(0,qa),Ua=mxUtils.indexOf(wa,Da);0<=Ua&&wa.splice(Ua,1);for(Y=0;Y<B.length;Y++){var db=B[Y];if(0<=mxUtils.indexOf(db,Da))for(var Ta=0;Ta<db.length;Ta++){var ab=mxUtils.indexOf(wa,db[Ta]);0<=ab&&wa.splice(ab,1)}}}}}var Ya=U.isEdge(pa);Y=Ya?la:ba; -var Va=U.getStyle(pa);for(ua=0;ua<wa.length;ua++){Da=wa[ua];var Za=Y[Da];null!=Za&&"edgeStyle"!=Da&&("shape"!=Da||Ya)&&(!Ya||ra||0>mxUtils.indexOf(n,Da))&&(Va=mxUtils.setStyle(Va,Da,Za))}Editor.simpleLabels&&(Va=mxUtils.setStyle(mxUtils.setStyle(Va,"html",null),"whiteSpace",null));U.setStyle(pa,Va)}}finally{U.endUpdate()}return G};e.addListener("cellsInserted",function(G,M){D(M.getProperty("cells"),null,null,null,null,!0,!0)});e.addListener("textInserted",function(G,M){D(M.getProperty("cells"),!0)}); -this.insertHandler=D;this.createDivs();this.createUi();this.refresh();var F=mxUtils.bind(this,function(G){null==G&&(G=window.event);return e.isEditing()||null!=G&&this.isSelectionAllowed(G)});this.container==document.body&&(this.menubarContainer.onselectstart=F,this.menubarContainer.onmousedown=F,this.toolbarContainer.onselectstart=F,this.toolbarContainer.onmousedown=F,this.diagramContainer.onselectstart=F,this.diagramContainer.onmousedown=F,this.sidebarContainer.onselectstart=F,this.sidebarContainer.onmousedown= -F,this.formatContainer.onselectstart=F,this.formatContainer.onmousedown=F,this.footerContainer.onselectstart=F,this.footerContainer.onmousedown=F,null!=this.tabContainer&&(this.tabContainer.onselectstart=F));!this.editor.chromeless||this.editor.editable?(b=function(G){if(null!=G){var M=mxEvent.getSource(G);if("A"==M.nodeName)for(;null!=M;){if("geHint"==M.className)return!0;M=M.parentNode}}return F(G)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer, -"contextmenu",b):this.diagramContainer.oncontextmenu=b):e.panningHandler.usePopupTrigger=!1;e.init(this.diagramContainer);mxClient.IS_SVG&&null!=e.view.getDrawPane()&&(b=e.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=e.graphHandler){var J=e.graphHandler.start;e.graphHandler.start=function(){null!=fa.hoverIcons&&fa.hoverIcons.reset();J.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this, -function(G){var M=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(G)-M.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(G)-M.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var C=!1,O=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(G,M){return C||O.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(G){32!=G.which||e.isEditing()? -mxEvent.isConsumed(G)||27!=G.keyCode||this.hideDialog(null,!0):(C=!0,this.hoverIcons.reset(),e.container.style.cursor="move",e.isEditing()||mxEvent.getSource(G)!=e.container||mxEvent.consume(G))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(G){e.container.style.cursor="";C=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var R=e.panningHandler.isForcePanningEvent;e.panningHandler.isForcePanningEvent=function(G){return R.apply(this, -arguments)||C||mxEvent.isMouseEvent(G.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(G.getEvent()))&&(!mxEvent.isControlDown(G.getEvent())&&mxEvent.isRightMouseButton(G.getEvent())||mxEvent.isMiddleMouseButton(G.getEvent()))};var T=e.cellEditor.isStopEditingEvent;e.cellEditor.isStopEditingEvent=function(G){return T.apply(this,arguments)||13==G.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(G)||mxClient.IS_MAC&&mxEvent.isMetaDown(G)||mxClient.IS_SF&&mxEvent.isShiftDown(G))};var Q=e.isZoomWheelEvent; -e.isZoomWheelEvent=function(){return C||Q.apply(this,arguments)};var aa=!1,S=null,P=null,X=null,ha=mxUtils.bind(this,function(){if(null!=this.toolbar&&aa!=e.cellEditor.isContentEditing()){for(var G=this.toolbar.container.firstChild,M=[];null!=G;){var U=G.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,G)&&(G.parentNode.removeChild(G),M.push(G));G=U}G=this.toolbar.fontMenu;U=this.toolbar.sizeMenu;if(null==X)this.toolbar.createTextToolbar();else{for(var ba=0;ba<X.length;ba++)this.toolbar.container.appendChild(X[ba]); -this.toolbar.fontMenu=S;this.toolbar.sizeMenu=P}aa=e.cellEditor.isContentEditing();S=G;P=U;X=M}}),fa=this,sa=e.cellEditor.startEditing;e.cellEditor.startEditing=function(){sa.apply(this,arguments);ha();if(e.cellEditor.isContentEditing()){var G=!1,M=function(){G||(G=!0,window.setTimeout(function(){var U=e.getSelectedEditingElement();null!=U&&(U=mxUtils.getCurrentStyle(U),null!=U&&null!=fa.toolbar&&(fa.toolbar.setFontName(Graph.stripQuotes(U.fontFamily)),fa.toolbar.setFontSize(parseInt(U.fontSize)))); -G=!1},0))};mxEvent.addListener(e.cellEditor.textarea,"input",M);mxEvent.addListener(e.cellEditor.textarea,"touchend",M);mxEvent.addListener(e.cellEditor.textarea,"mouseup",M);mxEvent.addListener(e.cellEditor.textarea,"keyup",M);M()}};var K=e.cellEditor.stopEditing;e.cellEditor.stopEditing=function(G,M){try{K.apply(this,arguments),ha()}catch(U){fa.handleError(U)}};e.container.setAttribute("tabindex","0");e.container.style.cursor="default";if(window.self===window.top&&null!=e.container.parentNode)try{e.container.focus()}catch(G){}var V= -e.fireMouseEvent;e.fireMouseEvent=function(G,M,U){G==mxEvent.MOUSE_DOWN&&this.container.focus();V.apply(this,arguments)};e.popupMenuHandler.autoExpand=!0;null!=this.menus&&(e.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(G,M,U){this.menus.createPopupMenu(G,M,U)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(G){e.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};e.connectionHandler.addListener(mxEvent.CONNECT, -function(G,M){var U=[M.getProperty("cell")];M.getProperty("terminalInserted")&&(U.push(M.getProperty("terminal")),window.setTimeout(function(){null!=fa.hoverIcons&&fa.hoverIcons.update(e.view.getState(U[U.length-1]))},0));D(U)});this.addListener("styleChanged",mxUtils.bind(this,function(G,M){var U=M.getProperty("cells"),ba=G=!1;if(0<U.length)for(var la=0;la<U.length&&(G=e.getModel().isVertex(U[la])||G,!(ba=e.getModel().isEdge(U[la])||ba)||!G);la++);else ba=G=!0;G=G&&!u;ba=ba&&!m;U=M.getProperty("keys"); -M=M.getProperty("values");for(la=0;la<U.length;la++){var ra=0<=mxUtils.indexOf(r,U[la]);if("strokeColor"!=U[la]||null!=M[la]&&"none"!=M[la])if(0<=mxUtils.indexOf(k,U[la]))ba||0<=mxUtils.indexOf(x,U[la])?null==M[la]?delete e.currentEdgeStyle[U[la]]:e.currentEdgeStyle[U[la]]=M[la]:G&&0<=mxUtils.indexOf(d,U[la])&&(null==M[la]?delete e.currentVertexStyle[U[la]]:e.currentVertexStyle[U[la]]=M[la]);else if(0<=mxUtils.indexOf(d,U[la])){if(G||ra)null==M[la]?delete e.currentVertexStyle[U[la]]:e.currentVertexStyle[U[la]]= -M[la];if(ba||ra||0<=mxUtils.indexOf(x,U[la]))null==M[la]?delete e.currentEdgeStyle[U[la]]:e.currentEdgeStyle[U[la]]=M[la]}}null!=this.toolbar&&(this.toolbar.setFontName(e.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(e.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==e.currentEdgeStyle.edgeStyle&&"1"==e.currentEdgeStyle.curved? +"endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(b=0;b<B.length;b++)for(f=0;f<B[b].length;f++)d.push(B[b][f]);for(b=0;b<k.length;b++)0>mxUtils.indexOf(d,k[b])&&d.push(k[b]);var D=function(O,T,J,ba,ha,na,W){ba=null!=ba?ba:e.currentVertexStyle;ha=null!=ha?ha:e.currentEdgeStyle;na=null!=na?na:!0;J=null!=J?J:e.getModel();if(W){W=[];for(var da=0;da<O.length;da++)W=W.concat(J.getDescendants(O[da]));O=W}J.beginUpdate(); +try{for(da=0;da<O.length;da++){var sa=O[da];if(T)var ta=["fontSize","fontFamily","fontColor"];else{var Ja=J.getStyle(sa),Ha=null!=Ja?Ja.split(";"):[];ta=d.slice();for(var ua=0;ua<Ha.length;ua++){var Aa=Ha[ua],qa=Aa.indexOf("=");if(0<=qa){var Da=Aa.substring(0,qa),Ua=mxUtils.indexOf(ta,Da);0<=Ua&&ta.splice(Ua,1);for(W=0;W<B.length;W++){var db=B[W];if(0<=mxUtils.indexOf(db,Da))for(var Ta=0;Ta<db.length;Ta++){var ab=mxUtils.indexOf(ta,db[Ta]);0<=ab&&ta.splice(ab,1)}}}}}var Ya=J.isEdge(sa);W=Ya?ha:ba; +var Va=J.getStyle(sa);for(ua=0;ua<ta.length;ua++){Da=ta[ua];var Za=W[Da];null!=Za&&"edgeStyle"!=Da&&("shape"!=Da||Ya)&&(!Ya||na||0>mxUtils.indexOf(n,Da))&&(Va=mxUtils.setStyle(Va,Da,Za))}Editor.simpleLabels&&(Va=mxUtils.setStyle(mxUtils.setStyle(Va,"html",null),"whiteSpace",null));J.setStyle(sa,Va)}}finally{J.endUpdate()}return O};e.addListener("cellsInserted",function(O,T){D(T.getProperty("cells"),null,null,null,null,!0,!0)});e.addListener("textInserted",function(O,T){D(T.getProperty("cells"),!0)}); +this.insertHandler=D;this.createDivs();this.createUi();this.refresh();var F=mxUtils.bind(this,function(O){null==O&&(O=window.event);return e.isEditing()||null!=O&&this.isSelectionAllowed(O)});this.container==document.body&&(this.menubarContainer.onselectstart=F,this.menubarContainer.onmousedown=F,this.toolbarContainer.onselectstart=F,this.toolbarContainer.onmousedown=F,this.diagramContainer.onselectstart=F,this.diagramContainer.onmousedown=F,this.sidebarContainer.onselectstart=F,this.sidebarContainer.onmousedown= +F,this.formatContainer.onselectstart=F,this.formatContainer.onmousedown=F,this.footerContainer.onselectstart=F,this.footerContainer.onmousedown=F,null!=this.tabContainer&&(this.tabContainer.onselectstart=F));!this.editor.chromeless||this.editor.editable?(b=function(O){if(null!=O){var T=mxEvent.getSource(O);if("A"==T.nodeName)for(;null!=T;){if("geHint"==T.className)return!0;T=T.parentNode}}return F(O)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer, +"contextmenu",b):this.diagramContainer.oncontextmenu=b):e.panningHandler.usePopupTrigger=!1;e.init(this.diagramContainer);mxClient.IS_SVG&&null!=e.view.getDrawPane()&&(b=e.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=e.graphHandler){var I=e.graphHandler.start;e.graphHandler.start=function(){null!=fa.hoverIcons&&fa.hoverIcons.reset();I.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this, +function(O){var T=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(O)-T.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(O)-T.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var C=!1,N=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(O,T){return C||N.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(O){32!=O.which||e.isEditing()? +mxEvent.isConsumed(O)||27!=O.keyCode||this.hideDialog(null,!0):(C=!0,this.hoverIcons.reset(),e.container.style.cursor="move",e.isEditing()||mxEvent.getSource(O)!=e.container||mxEvent.consume(O))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(O){e.container.style.cursor="";C=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var R=e.panningHandler.isForcePanningEvent;e.panningHandler.isForcePanningEvent=function(O){return R.apply(this, +arguments)||C||mxEvent.isMouseEvent(O.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(O.getEvent()))&&(!mxEvent.isControlDown(O.getEvent())&&mxEvent.isRightMouseButton(O.getEvent())||mxEvent.isMiddleMouseButton(O.getEvent()))};var S=e.cellEditor.isStopEditingEvent;e.cellEditor.isStopEditingEvent=function(O){return S.apply(this,arguments)||13==O.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(O)||mxClient.IS_MAC&&mxEvent.isMetaDown(O)||mxClient.IS_SF&&mxEvent.isShiftDown(O))};var Q=e.isZoomWheelEvent; +e.isZoomWheelEvent=function(){return C||Q.apply(this,arguments)};var aa=!1,U=null,P=null,Y=null,ja=mxUtils.bind(this,function(){if(null!=this.toolbar&&aa!=e.cellEditor.isContentEditing()){for(var O=this.toolbar.container.firstChild,T=[];null!=O;){var J=O.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,O)&&(O.parentNode.removeChild(O),T.push(O));O=J}O=this.toolbar.fontMenu;J=this.toolbar.sizeMenu;if(null==Y)this.toolbar.createTextToolbar();else{for(var ba=0;ba<Y.length;ba++)this.toolbar.container.appendChild(Y[ba]); +this.toolbar.fontMenu=U;this.toolbar.sizeMenu=P}aa=e.cellEditor.isContentEditing();U=O;P=J;Y=T}}),fa=this,ra=e.cellEditor.startEditing;e.cellEditor.startEditing=function(){ra.apply(this,arguments);ja();if(e.cellEditor.isContentEditing()){var O=!1,T=function(){O||(O=!0,window.setTimeout(function(){var J=e.getSelectedEditingElement();null!=J&&(J=mxUtils.getCurrentStyle(J),null!=J&&null!=fa.toolbar&&(fa.toolbar.setFontName(Graph.stripQuotes(J.fontFamily)),fa.toolbar.setFontSize(parseInt(J.fontSize)))); +O=!1},0))};mxEvent.addListener(e.cellEditor.textarea,"input",T);mxEvent.addListener(e.cellEditor.textarea,"touchend",T);mxEvent.addListener(e.cellEditor.textarea,"mouseup",T);mxEvent.addListener(e.cellEditor.textarea,"keyup",T);T()}};var K=e.cellEditor.stopEditing;e.cellEditor.stopEditing=function(O,T){try{K.apply(this,arguments),ja()}catch(J){fa.handleError(J)}};e.container.setAttribute("tabindex","0");e.container.style.cursor="default";if(window.self===window.top&&null!=e.container.parentNode)try{e.container.focus()}catch(O){}var V= +e.fireMouseEvent;e.fireMouseEvent=function(O,T,J){O==mxEvent.MOUSE_DOWN&&this.container.focus();V.apply(this,arguments)};e.popupMenuHandler.autoExpand=!0;null!=this.menus&&(e.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(O,T,J){this.menus.createPopupMenu(O,T,J)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(O){e.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};e.connectionHandler.addListener(mxEvent.CONNECT, +function(O,T){var J=[T.getProperty("cell")];T.getProperty("terminalInserted")&&(J.push(T.getProperty("terminal")),window.setTimeout(function(){null!=fa.hoverIcons&&fa.hoverIcons.update(e.view.getState(J[J.length-1]))},0));D(J)});this.addListener("styleChanged",mxUtils.bind(this,function(O,T){var J=T.getProperty("cells"),ba=O=!1;if(0<J.length)for(var ha=0;ha<J.length&&(O=e.getModel().isVertex(J[ha])||O,!(ba=e.getModel().isEdge(J[ha])||ba)||!O);ha++);else ba=O=!0;O=O&&!u;ba=ba&&!m;J=T.getProperty("keys"); +T=T.getProperty("values");for(ha=0;ha<J.length;ha++){var na=0<=mxUtils.indexOf(r,J[ha]);if("strokeColor"!=J[ha]||null!=T[ha]&&"none"!=T[ha])if(0<=mxUtils.indexOf(k,J[ha]))ba||0<=mxUtils.indexOf(x,J[ha])?null==T[ha]?delete e.currentEdgeStyle[J[ha]]:e.currentEdgeStyle[J[ha]]=T[ha]:O&&0<=mxUtils.indexOf(d,J[ha])&&(null==T[ha]?delete e.currentVertexStyle[J[ha]]:e.currentVertexStyle[J[ha]]=T[ha]);else if(0<=mxUtils.indexOf(d,J[ha])){if(O||na)null==T[ha]?delete e.currentVertexStyle[J[ha]]:e.currentVertexStyle[J[ha]]= +T[ha];if(ba||na||0<=mxUtils.indexOf(x,J[ha]))null==T[ha]?delete e.currentEdgeStyle[J[ha]]:e.currentEdgeStyle[J[ha]]=T[ha]}}null!=this.toolbar&&(this.toolbar.setFontName(e.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(e.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==e.currentEdgeStyle.edgeStyle&&"1"==e.currentEdgeStyle.curved? "geSprite geSprite-curved":"straight"==e.currentEdgeStyle.edgeStyle||"none"==e.currentEdgeStyle.edgeStyle||null==e.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==e.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==e.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==e.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==e.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==e.currentEdgeStyle.elbow? -"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==e.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==e.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==e.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var G=e.currentVertexStyle.fontFamily||"Helvetica", -M=String(e.currentVertexStyle.fontSize||"12"),U=e.getView().getState(e.getSelectionCell());null!=U&&(G=U.style[mxConstants.STYLE_FONTFAMILY]||G,M=U.style[mxConstants.STYLE_FONTSIZE]||M,10<G.length&&(G=G.substring(0,8)+"..."));this.toolbar.setFontName(G);this.toolbar.setFontSize(M)}),e.getSelectionModel().addListener(mxEvent.CHANGE,a),e.getModel().addListener(mxEvent.CHANGE,a));e.addListener(mxEvent.CELLS_ADDED,function(G,M){G=M.getProperty("cells");M=M.getProperty("parent");null!=M&&e.getModel().isLayer(M)&& -!e.isCellVisible(M)&&null!=G&&0<G.length&&e.getModel().setVisible(M,!0)});this.gestureHandler=mxUtils.bind(this,function(G){null!=this.currentMenu&&mxEvent.getSource(G)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler= +"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==e.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==e.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==e.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var O=e.currentVertexStyle.fontFamily||"Helvetica", +T=String(e.currentVertexStyle.fontSize||"12"),J=e.getView().getState(e.getSelectionCell());null!=J&&(O=J.style[mxConstants.STYLE_FONTFAMILY]||O,T=J.style[mxConstants.STYLE_FONTSIZE]||T,10<O.length&&(O=O.substring(0,8)+"..."));this.toolbar.setFontName(O);this.toolbar.setFontSize(T)}),e.getSelectionModel().addListener(mxEvent.CHANGE,a),e.getModel().addListener(mxEvent.CHANGE,a));e.addListener(mxEvent.CELLS_ADDED,function(O,T){O=T.getProperty("cells");T=T.getProperty("parent");null!=T&&e.getModel().isLayer(T)&& +!e.isCellVisible(T)&&null!=O&&0<O.length&&e.getModel().setVisible(T,!0)});this.gestureHandler=mxUtils.bind(this,function(O){null!=this.currentMenu&&mxEvent.getSource(O)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler= mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){e.view.validateBackground()})); this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){e.view.validateBackground()}));e.addListener("gridSizeChanged",mxUtils.bind(this,function(){e.isGridEnabled()&&e.view.validateBackground()}));this.editor.resetGraph()}this.init();e.standalone||this.open()};EditorUi.compactUi=!0; EditorUi.parsePng=function(a,b,f){function e(n,u){var m=d;d+=u;return n.substring(m,d)}function g(n){n=e(n,4);return n.charCodeAt(3)+(n.charCodeAt(2)<<8)+(n.charCodeAt(1)<<16)+(n.charCodeAt(0)<<24)}var d=0;if(e(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=f&&f();else if(e(a,4),"IHDR"!=e(a,4))null!=f&&f();else{e(a,17);do{f=g(a);var k=e(a,4);if(null!=b&&b(d-8,k,f))break;value=e(a,f);e(a,4);if("IEND"==k)break}while(f)}};mxUtils.extend(EditorUi,mxEventSource); @@ -2153,9 +2151,9 @@ a.vertices.push(b);var g=f.getCellGeometry(b);if(null!=g&&(0<g.width?null==a.wid !1);b=f.view.getState(b);null!=b&&(a.autoSize=a.autoSize||f.isAutoSizeState(b),a.glass=a.glass&&f.isGlassState(b),a.rounded=a.rounded&&f.isRoundedState(b),a.lineJumps=a.lineJumps&&f.isLineJumpState(b),a.image=a.image&&f.isImageState(b),a.shadow=a.shadow&&f.isShadowState(b),a.fill=a.fill&&f.isFillState(b),a.stroke=a.stroke&&f.isStrokeState(b),d=mxUtils.getValue(b.style,mxConstants.STYLE_SHAPE,null),a.containsImage=a.containsImage||"image"==d,f.mergeStyle(b.style,a.style,e))}; EditorUi.prototype.installShapePicker=function(){var a=this.editor.graph,b=this;a.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(u,m){"mouseDown"==m.getProperty("eventName")&&b.hideShapePicker()}));var f=mxUtils.bind(this,function(){b.hideShapePicker(!0)});a.addListener("wheel",f);a.addListener(mxEvent.ESCAPE,f);a.view.addListener(mxEvent.SCALE,f);a.view.addListener(mxEvent.SCALE_AND_TRANSLATE,f);a.getSelectionModel().addListener(mxEvent.CHANGE,f);var e=a.popupMenuHandler.isMenuShowing; a.popupMenuHandler.isMenuShowing=function(){return e.apply(this,arguments)||null!=b.shapePicker};var g=a.dblClick;a.dblClick=function(u,m){if(this.isEnabled())if(null!=m||null==b.sidebar||mxEvent.isShiftDown(u)||a.isCellLocked(a.getDefaultParent()))g.apply(this,arguments);else{var r=mxUtils.convertPoint(this.container,mxEvent.getClientX(u),mxEvent.getClientY(u));mxEvent.consume(u);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(r.x,r.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset", -f);var d=this.hoverIcons.drag;this.hoverIcons.drag=function(){b.hideShapePicker();d.apply(this,arguments)};var k=this.hoverIcons.execute;this.hoverIcons.execute=function(u,m,r){var x=r.getEvent();this.graph.isCloneEvent(x)||mxEvent.isShiftDown(x)?k.apply(this,arguments):this.graph.connectVertex(u.cell,m,this.graph.defaultEdgeLength,x,null,null,mxUtils.bind(this,function(B,D,F){var J=a.getCompositeParent(u.cell);B=a.getCellGeometry(J);for(r.consume();null!=J&&a.model.isVertex(J)&&null!=B&&B.relative;)cell= -J,J=a.model.getParent(cell),B=a.getCellGeometry(J);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(r.getGraphX(),r.getGraphY(),J,mxUtils.bind(this,function(C){F(C);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(C))}),m)}),30)}),mxUtils.bind(this,function(B){this.graph.selectCellsForConnectVertex(B,x,this)}))};var n=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(u,m){null!=n&&window.clearTimeout(n);n=window.setTimeout(mxUtils.bind(this,function(){var r= -m.getProperty("arrow"),x=m.getProperty("direction"),B=m.getProperty("event");r=r.getBoundingClientRect();var D=mxUtils.getOffset(a.container),F=a.container.scrollLeft+r.x-D.x;D=a.container.scrollTop+r.y-D.y;var J=a.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),C=b.showShapePicker(F,D,J,mxUtils.bind(this,function(O){null!=O&&a.connectVertex(J,x,a.defaultEdgeLength,B,!0,!0,function(R,T,Q){Q(O);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(O))}, +f);var d=this.hoverIcons.drag;this.hoverIcons.drag=function(){b.hideShapePicker();d.apply(this,arguments)};var k=this.hoverIcons.execute;this.hoverIcons.execute=function(u,m,r){var x=r.getEvent();this.graph.isCloneEvent(x)||mxEvent.isShiftDown(x)?k.apply(this,arguments):this.graph.connectVertex(u.cell,m,this.graph.defaultEdgeLength,x,null,null,mxUtils.bind(this,function(B,D,F){var I=a.getCompositeParent(u.cell);B=a.getCellGeometry(I);for(r.consume();null!=I&&a.model.isVertex(I)&&null!=B&&B.relative;)cell= +I,I=a.model.getParent(cell),B=a.getCellGeometry(I);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(r.getGraphX(),r.getGraphY(),I,mxUtils.bind(this,function(C){F(C);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(C))}),m)}),30)}),mxUtils.bind(this,function(B){this.graph.selectCellsForConnectVertex(B,x,this)}))};var n=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(u,m){null!=n&&window.clearTimeout(n);n=window.setTimeout(mxUtils.bind(this,function(){var r= +m.getProperty("arrow"),x=m.getProperty("direction"),B=m.getProperty("event");r=r.getBoundingClientRect();var D=mxUtils.getOffset(a.container),F=a.container.scrollLeft+r.x-D.x;D=a.container.scrollTop+r.y-D.y;var I=a.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),C=b.showShapePicker(F,D,I,mxUtils.bind(this,function(N){null!=N&&a.connectVertex(I,x,a.defaultEdgeLength,B,!0,!0,function(R,S,Q){Q(N);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(N))}, function(R){a.selectCellsForConnectVertex(R)},B,this.hoverIcons)}),x,!0);this.centerShapePicker(C,r,F,D,x);mxUtils.setOpacity(C,30);mxEvent.addListener(C,"mouseenter",function(){mxUtils.setOpacity(C,100)});mxEvent.addListener(C,"mouseleave",function(){b.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(u,m){null!=n&&window.clearTimeout(n)}))}}; EditorUi.prototype.centerShapePicker=function(a,b,f,e,g){if(g==mxConstants.DIRECTION_EAST||g==mxConstants.DIRECTION_WEST)a.style.width="40px";var d=a.getBoundingClientRect();g==mxConstants.DIRECTION_NORTH?(f-=d.width/2-10,e-=d.height+6):g==mxConstants.DIRECTION_SOUTH?(f-=d.width/2-10,e+=b.height+6):g==mxConstants.DIRECTION_WEST?(f-=d.width+6,e-=d.height/2-10):g==mxConstants.DIRECTION_EAST&&(f+=b.width+6,e-=d.height/2-10);a.style.left=f+"px";a.style.top=e+"px"}; EditorUi.prototype.showShapePicker=function(a,b,f,e,g,d){a=this.createShapePicker(a,b,f,e,g,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(f,d),d);null!=a&&(null==this.hoverIcons||d||this.hoverIcons.reset(),d=this.editor.graph,d.popupMenuHandler.hideMenu(),d.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=e,this.shapePicker=a);return a}; @@ -2181,41 +2179,41 @@ EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipb 0),B=0;B<m.length;B++){r.add(x,m[B]);var D=d.view.getState(k[B]);if(null!=D){var F=d.getCellGeometry(m[B]);null!=F&&F.relative&&!r.isEdge(k[B])&&null==u[mxObjectIdentity.get(r.getParent(k[B]))]&&(F.offset=null,F.relative=!1,F.x=D.x/D.view.scale-D.view.translate.x,F.y=D.y/D.view.scale-D.view.translate.y)}}d.updateCustomLinks(d.createCellMapping(n,u),m);mxClipboard.insertCount=1;mxClipboard.setCells(m)}a.updatePasteActionStates();return k};var f=mxClipboard.paste;mxClipboard.paste=function(d){var k= null;d.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):k=f.apply(this,arguments);a.updatePasteActionStates();return k};var e=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){e.apply(this,arguments);a.updatePasteActionStates()};var g=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(d,k){g.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()}; EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600; -EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var G=this.graph.getPageLayout(),M=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+G.x*M.width),this.scale*(this.translate.y+G.y*M.height),this.scale*G.width*M.width, -this.scale*G.height*M.height)};a.getPreferredPageSize=function(G,M,U){G=this.getPageLayout();M=this.getPageSize();return new mxRectangle(0,0,G.width*M.width,G.height*M.height)};var b=null,f=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(G,M,U,ba){if(null!=a.container&&!a.isViewer()){U=null!=U?U:0;ba=null!=ba?ba:0;var la=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),ra=mxUtils.hasScrollbars(a.container),Y=a.view.translate,da=a.view.scale, -pa=mxRectangle.fromRectangle(la);pa.x=pa.x/da-Y.x;pa.y=pa.y/da-Y.y;pa.width/=da;pa.height/=da;Y=a.container.scrollTop;var wa=a.container.scrollLeft,Ka=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Ka+=3;var Ha=a.container.offsetWidth-Ka;Ka=a.container.offsetHeight-Ka;G=G?Math.max(.3,Math.min(M||1,Ha/pa.width)):da;M=(Ha-G*pa.width)/2/G;var ua=0==this.lightboxVerticalDivider?0:(Ka-G*pa.height)/this.lightboxVerticalDivider/G;ra&&(M=Math.max(M,0),ua=Math.max(ua, -0));if(ra||la.width<Ha||la.height<Ka)a.view.scaleAndTranslate(G,Math.floor(M-pa.x),Math.floor(ua-pa.y)),a.container.scrollTop=Y*G/da,a.container.scrollLeft=wa*G/da;else if(0!=U||0!=ba)la=a.view.translate,a.view.setTranslate(Math.floor(la.x+U/da),Math.floor(la.y+ba/da))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var e=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",e);this.destroyFunctions.push(function(){mxEvent.removeListener(window, -"resize",e)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(G){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(G){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var g=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position= +EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var J=this.graph.getPageLayout(),ba=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+J.x*ba.width),this.scale*(this.translate.y+J.y*ba.height),this.scale*J.width*ba.width, +this.scale*J.height*ba.height)};a.getPreferredPageSize=function(J,ba,ha){J=this.getPageLayout();ba=this.getPageSize();return new mxRectangle(0,0,J.width*ba.width,J.height*ba.height)};var b=null,f=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(J,ba,ha,na){if(null!=a.container&&!a.isViewer()){ha=null!=ha?ha:0;na=null!=na?na:0;var W=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),da=mxUtils.hasScrollbars(a.container),sa=a.view.translate,ta= +a.view.scale,Ja=mxRectangle.fromRectangle(W);Ja.x=Ja.x/ta-sa.x;Ja.y=Ja.y/ta-sa.y;Ja.width/=ta;Ja.height/=ta;sa=a.container.scrollTop;var Ha=a.container.scrollLeft,ua=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)ua+=3;var Aa=a.container.offsetWidth-ua;ua=a.container.offsetHeight-ua;J=J?Math.max(.3,Math.min(ba||1,Aa/Ja.width)):ta;ba=(Aa-J*Ja.width)/2/J;var qa=0==this.lightboxVerticalDivider?0:(ua-J*Ja.height)/this.lightboxVerticalDivider/J;da&&(ba=Math.max(ba, +0),qa=Math.max(qa,0));if(da||W.width<Aa||W.height<ua)a.view.scaleAndTranslate(J,Math.floor(ba-Ja.x),Math.floor(qa-Ja.y)),a.container.scrollTop=sa*J/ta,a.container.scrollLeft=Ha*J/ta;else if(0!=ha||0!=na)W=a.view.translate,a.view.setTranslate(Math.floor(W.x+ha/ta),Math.floor(W.y+na/ta))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var e=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",e);this.destroyFunctions.push(function(){mxEvent.removeListener(window, +"resize",e)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(J){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(J){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var g=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position= "fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=a.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style, -"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var d=mxUtils.bind(this,function(){var G=mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=G?parseInt(G["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",d);d();var k=0;d=mxUtils.bind(this,function(G,M,U){k++; -var ba=document.createElement("span");ba.style.paddingLeft="8px";ba.style.paddingRight="8px";ba.style.cursor="pointer";mxEvent.addListener(ba,"click",G);null!=U&&ba.setAttribute("title",U);G=document.createElement("img");G.setAttribute("border","0");G.setAttribute("src",M);G.style.width="36px";G.style.filter="invert(100%)";ba.appendChild(G);this.chromelessToolbar.appendChild(ba);return ba});null!=g.backBtn&&d(mxUtils.bind(this,function(G){window.location.href=g.backBtn.url;mxEvent.consume(G)}),Editor.backImage, -mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var n=d(mxUtils.bind(this,function(G){this.actions.get("previousPage").funct();mxEvent.consume(G)}),Editor.previousImage,mxResources.get("previousPage")),u=document.createElement("div");u.style.fontFamily=Editor.defaultHtmlFont;u.style.display="inline-block";u.style.verticalAlign="top";u.style.fontWeight="bold";u.style.marginTop="8px";u.style.fontSize="14px";u.style.color=mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(u); -var m=d(mxUtils.bind(this,function(G){this.actions.get("nextPage").funct();mxEvent.consume(G)}),Editor.nextImage,mxResources.get("nextPage")),r=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(u.innerText="",mxUtils.write(u,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});n.style.paddingLeft="0px";n.style.paddingRight="4px";m.style.paddingLeft="4px";m.style.paddingRight="0px";var x=mxUtils.bind(this,function(){null!=this.pages&& -1<this.pages.length&&null!=this.currentPage?(m.style.display="",n.style.display="",u.style.display="inline-block"):(m.style.display="none",n.style.display="none",u.style.display="none");r()});this.editor.addListener("resetGraphView",x);this.editor.addListener("pageSelected",r)}d(mxUtils.bind(this,function(G){this.actions.get("zoomOut").funct();mxEvent.consume(G)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(G){this.actions.get("zoomIn").funct(); -mxEvent.consume(G)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(G){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(G)}),Editor.zoomFitImage,mxResources.get("fit"));var B=null,D=null,F=mxUtils.bind(this,function(G){null!=B&&(window.clearTimeout(B),B=null);null!=D&&(window.clearTimeout(D),D=null);B=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar, -0);B=null;D=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";D=null}),600)}),G||200)}),J=mxUtils.bind(this,function(G){null!=B&&(window.clearTimeout(B),B=null);null!=D&&(window.clearTimeout(D),D=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,G||30)});if("1"==urlParams.layers){this.layersDialog=null;var C=d(mxUtils.bind(this,function(G){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog), -this.layersDialog=null;else{this.layersDialog=a.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var M=C.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding= -"4px 2px 4px 2px";this.layersDialog.style.left=M.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));M=mxUtils.getCurrentStyle(this.editor.graph.container); -this.layersDialog.style.zIndex=M.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(G)}),Editor.layersImage,mxResources.get("layers")),O=a.getModel();O.addListener(mxEvent.CHANGE,function(){C.style.display=1<O.getChildCount(O.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(d);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||d(mxUtils.bind(this,function(G){null!= -this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(G)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(x=0;x<this.lightboxToolbarActions.length;x++){var R=this.lightboxToolbarActions[x];R.elem=d(R.fn,R.icon,R.tooltip)}null!=g.refreshBtn&&d(mxUtils.bind(this,function(G){g.refreshBtn.url?window.location.href=g.refreshBtn.url: -window.location.reload();mxEvent.consume(G)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=g.fullscreenBtn&&window.self!==window.top&&d(mxUtils.bind(this,function(G){g.fullscreenBtn.url?a.openLink(g.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(G)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(g.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&d(mxUtils.bind(this, -function(G){"1"==urlParams.close||g.closeBtn?window.close():(this.destroy(),mxEvent.consume(G))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(G){mxEvent.isTouchEvent(G)||(mxEvent.isShiftDown(G)|| -J(30),F())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(G){mxEvent.consume(G)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(G){a.tooltipHandler.resetTimer();a.tooltipHandler.hideTooltip();mxEvent.isShiftDown(G)?F():J(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(G){mxEvent.isShiftDown(G)?F():J(100);mxEvent.consume(G)}));mxEvent.addListener(this.chromelessToolbar, -"mouseleave",mxUtils.bind(this,function(G){mxEvent.isTouchEvent(G)||J(30)}));var T=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(G,M){this.startX=M.getGraphX();this.startY=M.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(G,M){},mouseUp:function(G,M){mxEvent.isTouchEvent(M.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<T&&Math.abs(this.scrollTop-a.container.scrollTop)<T&& -Math.abs(this.startX-M.getGraphX())<T&&Math.abs(this.startY-M.getGraphY())<T&&(0<parseFloat(f.chromelessToolbar.style.opacity||0)?F():J(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var Q=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var G=this.graph.getPagePadding(),M=this.graph.getPageSize();this.translate.x=G.x-(this.x0||0)*M.width;this.translate.y=G.y-(this.y0||0)*M.height}Q.apply(this, -arguments)};if(!a.isViewer()){var aa=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var G=this.getPageLayout(),M=this.getPagePadding(),U=this.getPageSize(),ba=Math.ceil(2*M.x+G.width*U.width),la=Math.ceil(2*M.y+G.height*U.height),ra=a.minimumGraphSize;if(null==ra||ra.width!=ba||ra.height!=la)a.minimumGraphSize=new mxRectangle(0,0,ba,la);ba=M.x-G.x*U.width;M=M.y-G.y*U.height;this.autoTranslate||this.view.translate.x==ba&&this.view.translate.y== -M?aa.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=G.x,this.view.y0=G.y,G=a.view.translate.x,U=a.view.translate.y,a.view.setTranslate(ba,M),a.container.scrollLeft+=Math.round((ba-G)*a.view.scale),a.container.scrollTop+=Math.round((M-U)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var S=a.view.getBackgroundPane(),P=a.view.getDrawPane();a.cumulativeZoomFactor=1;var X=null,ha=null,fa=null,sa=null,K=null,V=function(G){null!= -X&&window.clearTimeout(X);0<=G&&window.setTimeout(function(){if(!a.isMouseDown||sa)X=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),P.style.transformOrigin="",S.style.transformOrigin="",mxClient.IS_SF?(P.style.transform="scale(1)",S.style.transform= -"scale(1)",window.setTimeout(function(){P.style.transform="";S.style.transform=""},0)):(P.style.transform="",S.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var M=new mxPoint(a.container.scrollLeft,a.container.scrollTop),U=mxUtils.getOffset(a.container),ba=a.view.scale,la=0,ra=0;null!=ha&&(la=a.container.offsetWidth/2-ha.x+U.x,ra=a.container.offsetHeight/2-ha.y+U.y);a.zoom(a.cumulativeZoomFactor,null,a.isFastZoomEnabled()?20:null);a.view.scale!= -ba&&(null!=fa&&(la+=M.x-fa.x,ra+=M.y-fa.y),null!=b&&f.chromelessResize(!1,null,la*(a.cumulativeZoomFactor-1),ra*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==la&&0==ra||(a.container.scrollLeft-=la*(a.cumulativeZoomFactor-1),a.container.scrollTop-=ra*(a.cumulativeZoomFactor-1)));null!=K&&P.setAttribute("filter",K);a.cumulativeZoomFactor=1;K=sa=ha=fa=X=null}),null!=G?G:a.isFastZoomEnabled()?f.wheelZoomDelay:f.lazyZoomDelay)},0)};a.lazyZoom=function(G,M,U,ba){ba=null!=ba?ba:this.zoomFactor; -(M=M||!a.scrollbars)&&(ha=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));G?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=ba,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/= -ba,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;a.isFastZoomEnabled()&&(null==K&&""!=P.getAttribute("filter")&&(K=P.getAttribute("filter"),P.removeAttribute("filter")),fa=new mxPoint(a.container.scrollLeft,a.container.scrollTop),G=M||null==ha?a.container.scrollLeft+a.container.clientWidth/2:ha.x+a.container.scrollLeft-a.container.offsetLeft, -ba=M||null==ha?a.container.scrollTop+a.container.clientHeight/2:ha.y+a.container.scrollTop-a.container.offsetTop,P.style.transformOrigin=G+"px "+ba+"px",P.style.transform="scale("+this.cumulativeZoomFactor+")",S.style.transformOrigin=G+"px "+ba+"px",S.style.transform="scale("+this.cumulativeZoomFactor+")",null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(G=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(G.style,"transform-origin",(M||null==ha?a.container.clientWidth/ -2+a.container.scrollLeft-G.offsetLeft+"px":ha.x+a.container.scrollLeft-G.offsetLeft-a.container.offsetLeft+"px")+" "+(M||null==ha?a.container.clientHeight/2+a.container.scrollTop-G.offsetTop+"px":ha.y+a.container.scrollTop-G.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(G.style,"transform","scale("+this.cumulativeZoomFactor+")")),a.view.getDecoratorPane().style.opacity="0",a.view.getOverlayPane().style.opacity="0",null!=f.hoverIcons&&f.hoverIcons.reset());V(a.isFastZoomEnabled()? -U:0)};mxEvent.addGestureListeners(a.container,function(G){null!=X&&window.clearTimeout(X)},null,function(G){1!=a.cumulativeZoomFactor&&V(0)});mxEvent.addListener(a.container,"scroll",function(G){null==X||a.isMouseDown||1==a.cumulativeZoomFactor||V(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(G,M,U,ba,la){a.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&!U&&a.isScrollWheelEvent(G))U=a.view.getTranslate(),ba=40/a.view.scale,mxEvent.isShiftDown(G)? -a.view.setTranslate(U.x+(M?-ba:ba),U.y):a.view.setTranslate(U.x,U.y+(M?ba:-ba));else if(U||a.isZoomWheelEvent(G))for(var ra=mxEvent.getSource(G);null!=ra;){if(ra==a.container)return a.tooltipHandler.hideTooltip(),ha=null!=ba&&null!=la?new mxPoint(ba,la):new mxPoint(mxEvent.getClientX(G),mxEvent.getClientY(G)),sa=U,U=a.zoomFactor,ba=null,G.ctrlKey&&null!=G.deltaY&&40>Math.abs(G.deltaY)&&Math.round(G.deltaY)!=G.deltaY?U=1+Math.abs(G.deltaY)/20*(U-1):null!=G.movementY&&"pointermove"==G.type&&(U=1+Math.max(1, -Math.abs(G.movementY))/20*(U-1),ba=-1),a.lazyZoom(M,null,ba,U),mxEvent.consume(G),!1;ra=ra.parentNode}}),a.container);a.panningHandler.zoomGraph=function(G){a.cumulativeZoomFactor=G.scale;a.lazyZoom(0<G.scale,!0);mxEvent.consume(G)}};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(b){this.actions.get("print").funct();mxEvent.consume(b)}),Editor.printImage,mxResources.get("print"))}; -EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(a){return Graph.createOffscreenGraph(a)};EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)}; +"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var d=mxUtils.bind(this,function(){var J=mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=J?parseInt(J["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",d);d();var k=0;d=mxUtils.bind(this,function(J,ba,ha){k++; +var na=document.createElement("span");na.style.paddingLeft="8px";na.style.paddingRight="8px";na.style.cursor="pointer";mxEvent.addListener(na,"click",J);null!=ha&&na.setAttribute("title",ha);J=document.createElement("img");J.setAttribute("border","0");J.setAttribute("src",ba);J.style.width="36px";J.style.filter="invert(100%)";na.appendChild(J);this.chromelessToolbar.appendChild(na);return na});if(null!=g.backBtn){var n=Graph.sanitizeLink(g.backBtn.url);null!=n&&d(mxUtils.bind(this,function(J){window.location.href= +n;mxEvent.consume(J)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var u=d(mxUtils.bind(this,function(J){this.actions.get("previousPage").funct();mxEvent.consume(J)}),Editor.previousImage,mxResources.get("previousPage")),m=document.createElement("div");m.style.fontFamily=Editor.defaultHtmlFont;m.style.display="inline-block";m.style.verticalAlign="top";m.style.fontWeight="bold";m.style.marginTop="8px";m.style.fontSize="14px";m.style.color=mxClient.IS_IE||mxClient.IS_IE11? +"#000000":"#ffffff";this.chromelessToolbar.appendChild(m);var r=d(mxUtils.bind(this,function(J){this.actions.get("nextPage").funct();mxEvent.consume(J)}),Editor.nextImage,mxResources.get("nextPage")),x=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(m.innerText="",mxUtils.write(m,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});u.style.paddingLeft="0px";u.style.paddingRight="4px";r.style.paddingLeft="4px";r.style.paddingRight= +"0px";var B=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(r.style.display="",u.style.display="",m.style.display="inline-block"):(r.style.display="none",u.style.display="none",m.style.display="none");x()});this.editor.addListener("resetGraphView",B);this.editor.addListener("pageSelected",x)}d(mxUtils.bind(this,function(J){this.actions.get("zoomOut").funct();mxEvent.consume(J)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");d(mxUtils.bind(this, +function(J){this.actions.get("zoomIn").funct();mxEvent.consume(J)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(J){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(J)}),Editor.zoomFitImage,mxResources.get("fit"));var D=null,F=null,I=mxUtils.bind(this,function(J){null!=D&&(window.clearTimeout(D),D=null);null!=F&&(window.clearTimeout(F),F=null);D=window.setTimeout(mxUtils.bind(this, +function(){mxUtils.setOpacity(this.chromelessToolbar,0);D=null;F=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";F=null}),600)}),J||200)}),C=mxUtils.bind(this,function(J){null!=D&&(window.clearTimeout(D),D=null);null!=F&&(window.clearTimeout(F),F=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,J||30)});if("1"==urlParams.layers){this.layersDialog=null;var N=d(mxUtils.bind(this,function(J){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog), +this.layersDialog=null;else{this.layersDialog=a.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var ba=N.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding= +"4px 2px 4px 2px";this.layersDialog.style.left=ba.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));ba=mxUtils.getCurrentStyle(this.editor.graph.container); +this.layersDialog.style.zIndex=ba.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(J)}),Editor.layersImage,mxResources.get("layers")),R=a.getModel();R.addListener(mxEvent.CHANGE,function(){N.style.display=1<R.getChildCount(R.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(d);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||d(mxUtils.bind(this,function(J){null!= +this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(J)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(B=0;B<this.lightboxToolbarActions.length;B++){var S=this.lightboxToolbarActions[B];S.elem=d(S.fn,S.icon,S.tooltip)}if(null!=g.refreshBtn){var Q=null==g.refreshBtn.url?null:Graph.sanitizeLink(g.refreshBtn.url); +d(mxUtils.bind(this,function(J){null!=Q?window.location.href=Q:window.location.reload();mxEvent.consume(J)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=g.fullscreenBtn&&window.self!==window.top&&d(mxUtils.bind(this,function(J){g.fullscreenBtn.url?a.openLink(g.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(J)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(g.closeBtn&&window.self===window.top||a.lightbox&&("1"== +urlParams.close||this.container!=document.body))&&d(mxUtils.bind(this,function(J){"1"==urlParams.close||g.closeBtn?window.close():(this.destroy(),mxEvent.consume(J))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this, +function(J){mxEvent.isTouchEvent(J)||(mxEvent.isShiftDown(J)||C(30),I())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(J){mxEvent.consume(J)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(J){a.tooltipHandler.resetTimer();a.tooltipHandler.hideTooltip();mxEvent.isShiftDown(J)?I():C(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(J){mxEvent.isShiftDown(J)?I():C(100); +mxEvent.consume(J)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(J){mxEvent.isTouchEvent(J)||C(30)}));var aa=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(J,ba){this.startX=ba.getGraphX();this.startY=ba.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(J,ba){},mouseUp:function(J,ba){mxEvent.isTouchEvent(ba.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)< +aa&&Math.abs(this.scrollTop-a.container.scrollTop)<aa&&Math.abs(this.startX-ba.getGraphX())<aa&&Math.abs(this.startY-ba.getGraphY())<aa&&(0<parseFloat(f.chromelessToolbar.style.opacity||0)?I():C(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var U=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var J=this.graph.getPagePadding(),ba=this.graph.getPageSize();this.translate.x=J.x-(this.x0|| +0)*ba.width;this.translate.y=J.y-(this.y0||0)*ba.height}U.apply(this,arguments)};if(!a.isViewer()){var P=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var J=this.getPageLayout(),ba=this.getPagePadding(),ha=this.getPageSize(),na=Math.ceil(2*ba.x+J.width*ha.width),W=Math.ceil(2*ba.y+J.height*ha.height),da=a.minimumGraphSize;if(null==da||da.width!=na||da.height!=W)a.minimumGraphSize=new mxRectangle(0,0,na,W);na=ba.x-J.x*ha.width;ba=ba.y-J.y* +ha.height;this.autoTranslate||this.view.translate.x==na&&this.view.translate.y==ba?P.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=J.x,this.view.y0=J.y,J=a.view.translate.x,ha=a.view.translate.y,a.view.setTranslate(na,ba),a.container.scrollLeft+=Math.round((na-J)*a.view.scale),a.container.scrollTop+=Math.round((ba-ha)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var Y=a.view.getBackgroundPane(),ja=a.view.getDrawPane(); +a.cumulativeZoomFactor=1;var fa=null,ra=null,K=null,V=null,O=null,T=function(J){null!=fa&&window.clearTimeout(fa);0<=J&&window.setTimeout(function(){if(!a.isMouseDown||V)fa=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),ja.style.transformOrigin= +"",Y.style.transformOrigin="",mxClient.IS_SF?(ja.style.transform="scale(1)",Y.style.transform="scale(1)",window.setTimeout(function(){ja.style.transform="";Y.style.transform=""},0)):(ja.style.transform="",Y.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var ba=new mxPoint(a.container.scrollLeft,a.container.scrollTop),ha=mxUtils.getOffset(a.container),na=a.view.scale,W=0,da=0;null!=ra&&(W=a.container.offsetWidth/2-ra.x+ha.x,da=a.container.offsetHeight/ +2-ra.y+ha.y);a.zoom(a.cumulativeZoomFactor,null,a.isFastZoomEnabled()?20:null);a.view.scale!=na&&(null!=K&&(W+=ba.x-K.x,da+=ba.y-K.y),null!=b&&f.chromelessResize(!1,null,W*(a.cumulativeZoomFactor-1),da*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==W&&0==da||(a.container.scrollLeft-=W*(a.cumulativeZoomFactor-1),a.container.scrollTop-=da*(a.cumulativeZoomFactor-1)));null!=O&&ja.setAttribute("filter",O);a.cumulativeZoomFactor=1;O=V=ra=K=fa=null}),null!=J?J:a.isFastZoomEnabled()? +f.wheelZoomDelay:f.lazyZoomDelay)},0)};a.lazyZoom=function(J,ba,ha,na){na=null!=na?na:this.zoomFactor;(ba=ba||!a.scrollbars)&&(ra=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));J?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=na,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale* +this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=na,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;a.isFastZoomEnabled()&&(null==O&&""!=ja.getAttribute("filter")&&(O=ja.getAttribute("filter"),ja.removeAttribute("filter")),K=new mxPoint(a.container.scrollLeft,a.container.scrollTop), +J=ba||null==ra?a.container.scrollLeft+a.container.clientWidth/2:ra.x+a.container.scrollLeft-a.container.offsetLeft,na=ba||null==ra?a.container.scrollTop+a.container.clientHeight/2:ra.y+a.container.scrollTop-a.container.offsetTop,ja.style.transformOrigin=J+"px "+na+"px",ja.style.transform="scale("+this.cumulativeZoomFactor+")",Y.style.transformOrigin=J+"px "+na+"px",Y.style.transform="scale("+this.cumulativeZoomFactor+")",null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(J= +a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(J.style,"transform-origin",(ba||null==ra?a.container.clientWidth/2+a.container.scrollLeft-J.offsetLeft+"px":ra.x+a.container.scrollLeft-J.offsetLeft-a.container.offsetLeft+"px")+" "+(ba||null==ra?a.container.clientHeight/2+a.container.scrollTop-J.offsetTop+"px":ra.y+a.container.scrollTop-J.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(J.style,"transform","scale("+this.cumulativeZoomFactor+")")),a.view.getDecoratorPane().style.opacity= +"0",a.view.getOverlayPane().style.opacity="0",null!=f.hoverIcons&&f.hoverIcons.reset());T(a.isFastZoomEnabled()?ha:0)};mxEvent.addGestureListeners(a.container,function(J){null!=fa&&window.clearTimeout(fa)},null,function(J){1!=a.cumulativeZoomFactor&&T(0)});mxEvent.addListener(a.container,"scroll",function(J){null==fa||a.isMouseDown||1==a.cumulativeZoomFactor||T(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(J,ba,ha,na,W){a.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs|| +0==this.dialogs.length)if(!a.scrollbars&&!ha&&a.isScrollWheelEvent(J))ha=a.view.getTranslate(),na=40/a.view.scale,mxEvent.isShiftDown(J)?a.view.setTranslate(ha.x+(ba?-na:na),ha.y):a.view.setTranslate(ha.x,ha.y+(ba?na:-na));else if(ha||a.isZoomWheelEvent(J))for(var da=mxEvent.getSource(J);null!=da;){if(da==a.container)return a.tooltipHandler.hideTooltip(),ra=null!=na&&null!=W?new mxPoint(na,W):new mxPoint(mxEvent.getClientX(J),mxEvent.getClientY(J)),V=ha,ha=a.zoomFactor,na=null,J.ctrlKey&&null!=J.deltaY&& +40>Math.abs(J.deltaY)&&Math.round(J.deltaY)!=J.deltaY?ha=1+Math.abs(J.deltaY)/20*(ha-1):null!=J.movementY&&"pointermove"==J.type&&(ha=1+Math.max(1,Math.abs(J.movementY))/20*(ha-1),na=-1),a.lazyZoom(ba,null,na,ha),mxEvent.consume(J),!1;da=da.parentNode}}),a.container);a.panningHandler.zoomGraph=function(J){a.cumulativeZoomFactor=J.scale;a.lazyZoom(0<J.scale,!0);mxEvent.consume(J)}}; +EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(b){this.actions.get("print").funct();mxEvent.consume(b)}),Editor.printImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(a){return Graph.createOffscreenGraph(a)};EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)}; EditorUi.prototype.toggleFormatPanel=function(a){a=null!=a?a:0==this.formatWidth;null!=this.format&&(this.formatWidth=a?240:0,this.formatContainer.style.display=a?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))}; EditorUi.prototype.lightboxFit=function(a){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var b=urlParams.border,f=60;null!=b&&(f=parseInt(b));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(f,null,null,null,null,null,a);this.editor.graph.maxFitScale=null}};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.isSelectionAllowed=function(a){return"SELECT"==mxEvent.getSource(a).nodeName||"INPUT"==mxEvent.getSource(a).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(a))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")}; @@ -2292,13 +2290,13 @@ EditorUi.prototype.showDataDialog=function(a){null!=a&&(a=new EditDataDialog(thi EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bind(this,function(e){e=new ChangePageSetup(this,null,e);e.ignoreColor=!0;this.editor.graph.model.execute(e)});var f=mxUtils.prompt(mxResources.get("backgroundImage"),null!=b?b.src:"");null!=f&&0<f.length?(b=new Image,b.onload=function(){a(new mxImage(f,b.width,b.height),!1)},b.onerror=function(){a(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},b.src=f):a(null)}; EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroundImage(a);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(a,b,f){mxUtils.confirm(a)?null!=b&&b():null!=f&&f()};EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){b.update(!1)});return b}; EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize",66:"copyData",69:"pasteData"}; -EditorUi.prototype.createKeyHandler=function(a){function b(x,B,D){if(!e.isSelectionEmpty()&&e.isEnabled()){B=null!=B?B:1;var F=e.getCompositeParents(e.getSelectionCells()),J=0<F.length?F[0]:null;if(null!=J)if(D){e.getModel().beginUpdate();try{for(J=0;J<F.length;J++)if(e.getModel().isVertex(F[J])&&e.isCellResizable(F[J])){var C=e.getCellGeometry(F[J]);null!=C&&(C=C.clone(),37==x?C.width=Math.max(0,C.width-B):38==x?C.height=Math.max(0,C.height-B):39==x?C.width+=B:40==x&&(C.height+=B),e.getModel().setGeometry(F[J], -C))}}finally{e.getModel().endUpdate()}}else{C=e.model.getParent(J);var O=e.getView().scale;D=null;1==e.getSelectionCount()&&e.model.isVertex(J)&&null!=e.layoutManager&&!e.isCellLocked(J)&&(D=e.layoutManager.getLayout(C));if(null!=D&&D.constructor==mxStackLayout)B=C.getIndex(J),37==x||38==x?e.model.add(C,J,Math.max(0,B-1)):(39==x||40==x)&&e.model.add(C,J,Math.min(e.model.getChildCount(C),B+1));else{var R=e.graphHandler;null!=R&&(null==R.first&&R.start(J,0,0,F),null!=R.first&&(J=F=0,37==x?F=-B:38== -x?J=-B:39==x?F=B:40==x&&(J=B),R.currentDx+=F*O,R.currentDy+=J*O,R.checkPreview(),R.updatePreview()),null!=k&&window.clearTimeout(k),k=window.setTimeout(function(){if(null!=R.first){var T=R.roundLength(R.currentDx/O),Q=R.roundLength(R.currentDy/O);R.moveCells(R.cells,T,Q);R.reset()}},400))}}}}var f=this,e=this.editor.graph,g=new mxKeyHandler(e),d=g.isEventIgnored;g.isEventIgnored=function(x){return!(mxEvent.isShiftDown(x)&&9==x.keyCode)&&(!this.isControlDown(x)||mxEvent.isShiftDown(x)||90!=x.keyCode&& +EditorUi.prototype.createKeyHandler=function(a){function b(x,B,D){if(!e.isSelectionEmpty()&&e.isEnabled()){B=null!=B?B:1;var F=e.getCompositeParents(e.getSelectionCells()),I=0<F.length?F[0]:null;if(null!=I)if(D){e.getModel().beginUpdate();try{for(I=0;I<F.length;I++)if(e.getModel().isVertex(F[I])&&e.isCellResizable(F[I])){var C=e.getCellGeometry(F[I]);null!=C&&(C=C.clone(),37==x?C.width=Math.max(0,C.width-B):38==x?C.height=Math.max(0,C.height-B):39==x?C.width+=B:40==x&&(C.height+=B),e.getModel().setGeometry(F[I], +C))}}finally{e.getModel().endUpdate()}}else{C=e.model.getParent(I);var N=e.getView().scale;D=null;1==e.getSelectionCount()&&e.model.isVertex(I)&&null!=e.layoutManager&&!e.isCellLocked(I)&&(D=e.layoutManager.getLayout(C));if(null!=D&&D.constructor==mxStackLayout)B=C.getIndex(I),37==x||38==x?e.model.add(C,I,Math.max(0,B-1)):(39==x||40==x)&&e.model.add(C,I,Math.min(e.model.getChildCount(C),B+1));else{var R=e.graphHandler;null!=R&&(null==R.first&&R.start(I,0,0,F),null!=R.first&&(I=F=0,37==x?F=-B:38== +x?I=-B:39==x?F=B:40==x&&(I=B),R.currentDx+=F*N,R.currentDy+=I*N,R.checkPreview(),R.updatePreview()),null!=k&&window.clearTimeout(k),k=window.setTimeout(function(){if(null!=R.first){var S=R.roundLength(R.currentDx/N),Q=R.roundLength(R.currentDy/N);R.moveCells(R.cells,S,Q);R.reset()}},400))}}}}var f=this,e=this.editor.graph,g=new mxKeyHandler(e),d=g.isEventIgnored;g.isEventIgnored=function(x){return!(mxEvent.isShiftDown(x)&&9==x.keyCode)&&(!this.isControlDown(x)||mxEvent.isShiftDown(x)||90!=x.keyCode&& 89!=x.keyCode&&188!=x.keyCode&&190!=x.keyCode&&85!=x.keyCode)&&(66!=x.keyCode&&73!=x.keyCode||!this.isControlDown(x)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&d.apply(this,arguments)};g.isEnabledForEvent=function(x){return!mxEvent.isConsumed(x)&&this.isGraphEvent(x)&&this.isEnabled()&&(null==f.dialogs||0==f.dialogs.length)};g.isControlDown=function(x){return mxEvent.isControlDown(x)||mxClient.IS_MAC&&x.metaKey};var k=null,n={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH, 39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},u=g.getFunction;mxKeyHandler.prototype.getFunction=function(x){if(e.isEnabled()){if(mxEvent.isShiftDown(x)&&mxEvent.isAltDown(x)){var B=f.actions.get(f.altShiftActions[x.keyCode]);if(null!=B)return B.funct}if(null!=n[x.keyCode]&&!e.isSelectionEmpty())if(!this.isControlDown(x)&&mxEvent.isShiftDown(x)&&mxEvent.isAltDown(x)){if(e.model.isVertex(e.getSelectionCell()))return function(){var D=e.connectVertex(e.getSelectionCell(),n[x.keyCode], e.defaultEdgeLength,x,!0);null!=D&&0<D.length&&(1==D.length&&e.model.isEdge(D[0])?e.setSelectionCell(e.model.getTerminal(D[0],!1)):e.setSelectionCell(D[D.length-1]),e.scrollCellToVisible(e.getSelectionCell()),null!=f.hoverIcons&&f.hoverIcons.update(e.view.getState(e.getSelectionCell())))}}else return this.isControlDown(x)?function(){b(x.keyCode,mxEvent.isShiftDown(x)?e.gridSize:null,!0)}:function(){b(x.keyCode,mxEvent.isShiftDown(x)?e.gridSize:null)}}return u.apply(this,arguments)};g.bindAction=mxUtils.bind(this, -function(x,B,D,F){var J=this.actions.get(D);null!=J&&(D=function(){J.isEnabled()&&J.funct.apply(this,arguments)},B?F?g.bindControlShiftKey(x,D):g.bindControlKey(x,D):F?g.bindShiftKey(x,D):g.bindKey(x,D))});var m=this,r=g.escape;g.escape=function(x){r.apply(this,arguments)};g.enter=function(){};g.bindControlShiftKey(36,function(){e.exitGroup()});g.bindControlShiftKey(35,function(){e.enterGroup()});g.bindShiftKey(36,function(){e.home()});g.bindKey(35,function(){e.refresh()});g.bindAction(107,!0,"zoomIn"); +function(x,B,D,F){var I=this.actions.get(D);null!=I&&(D=function(){I.isEnabled()&&I.funct.apply(this,arguments)},B?F?g.bindControlShiftKey(x,D):g.bindControlKey(x,D):F?g.bindShiftKey(x,D):g.bindKey(x,D))});var m=this,r=g.escape;g.escape=function(x){r.apply(this,arguments)};g.enter=function(){};g.bindControlShiftKey(36,function(){e.exitGroup()});g.bindControlShiftKey(35,function(){e.enterGroup()});g.bindShiftKey(36,function(){e.home()});g.bindKey(35,function(){e.refresh()});g.bindAction(107,!0,"zoomIn"); g.bindAction(109,!0,"zoomOut");g.bindAction(80,!0,"print");g.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)g.bindControlKey(36,function(){e.isEnabled()&&e.foldCells(!0)}),g.bindControlKey(35,function(){e.isEnabled()&&e.foldCells(!1)}),g.bindControlKey(13,function(){m.ctrlEnter()}),g.bindAction(8,!1,"delete"),g.bindAction(8,!0,"deleteAll"),g.bindAction(8,!1,"deleteLabels",!0),g.bindAction(46,!1,"delete"),g.bindAction(46,!0,"deleteAll"),g.bindAction(46,!1,"deleteLabels", !0),g.bindAction(36,!1,"resetView"),g.bindAction(72,!0,"fitWindow",!0),g.bindAction(74,!0,"fitPage"),g.bindAction(74,!0,"fitTwoPages",!0),g.bindAction(48,!0,"customZoom"),g.bindAction(82,!0,"turn"),g.bindAction(82,!0,"clearDefaultStyle",!0),g.bindAction(83,!0,"save"),g.bindAction(83,!0,"saveAs",!0),g.bindAction(65,!0,"selectAll"),g.bindAction(65,!0,"selectNone",!0),g.bindAction(73,!0,"selectVertices",!0),g.bindAction(69,!0,"selectEdges",!0),g.bindAction(69,!0,"editStyle"),g.bindAction(66,!0,"bold"), g.bindAction(66,!0,"toBack",!0),g.bindAction(70,!0,"toFront",!0),g.bindAction(68,!0,"duplicate"),g.bindAction(68,!0,"setAsDefaultStyle",!0),g.bindAction(90,!0,"undo"),g.bindAction(89,!0,"autosize",!0),g.bindAction(88,!0,"cut"),g.bindAction(67,!0,"copy"),g.bindAction(86,!0,"paste"),g.bindAction(71,!0,"group"),g.bindAction(77,!0,"editData"),g.bindAction(71,!0,"grid",!0),g.bindAction(73,!0,"italic"),g.bindAction(76,!0,"lockUnlock"),g.bindAction(76,!0,"layers",!0),g.bindAction(80,!0,"formatPanel",!0), @@ -2341,11 +2339,11 @@ Sidebar.prototype.searchEntries=function(a,b,f,e,g){if(null!=this.taglist&&null! null,d)};Sidebar.prototype.filterTags=function(a){if(null!=a){a=a.split(" ");for(var b=[],f={},e=0;e<a.length;e++)null==f[a[e]]&&(f[a[e]]="1",b.push(a[e]));return b.join(" ")}return null};Sidebar.prototype.cloneCell=function(a,b){a=a.clone();null!=b&&(a.value=b);return a};Sidebar.prototype.showPopupMenuForEntry=function(a,b,f){}; Sidebar.prototype.addSearchPalette=function(a){var b=document.createElement("div");b.style.visibility="hidden";this.container.appendChild(b);var f=document.createElement("div");f.className="geSidebar";f.style.boxSizing="border-box";f.style.overflow="hidden";f.style.width="100%";f.style.padding="8px";f.style.paddingTop="14px";f.style.paddingBottom="0px";a||(f.style.display="none");var e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.paddingBottom="8px"; e.style.cursor="default";var g=document.createElement("input");g.setAttribute("placeholder",mxResources.get("searchShapes"));g.setAttribute("type","text");g.style.fontSize="12px";g.style.overflow="hidden";g.style.boxSizing="border-box";g.style.border="solid 1px #d5d5d5";g.style.borderRadius="4px";g.style.width="100%";g.style.outline="none";g.style.padding="6px";g.style.paddingRight="20px";e.appendChild(g);var d=document.createElement("img");d.setAttribute("src",Sidebar.prototype.searchImage);d.setAttribute("title", -mxResources.get("search"));d.style.position="relative";d.style.left="-18px";d.style.top="1px";d.style.background="url('"+this.editorUi.editor.transparentImage+"')";e.appendChild(d);f.appendChild(e);var k=document.createElement("center"),n=mxUtils.button(mxResources.get("moreResults"),function(){J()});n.style.display="none";n.style.lineHeight="normal";n.style.fontSize="12px";n.style.padding="6px 12px 6px 12px";n.style.marginTop="4px";n.style.marginBottom="8px";k.style.paddingTop="4px";k.style.paddingBottom= -"4px";k.appendChild(n);f.appendChild(k);var u="",m=!1,r=!1,x=0,B={},D=12,F=mxUtils.bind(this,function(){m=!1;this.currentSearch=null;for(var C=f.firstChild;null!=C;){var O=C.nextSibling;C!=e&&C!=k&&C.parentNode.removeChild(C);C=O}});mxEvent.addListener(d,"click",function(){d.getAttribute("src")==Dialog.prototype.closeImage&&(d.setAttribute("src",Sidebar.prototype.searchImage),d.setAttribute("title",mxResources.get("search")),n.style.display="none",u=g.value="",F());g.focus()});var J=mxUtils.bind(this, -function(){D=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=g.value){if(null!=k.parentNode&&(u!=g.value&&(F(),u=g.value,B={},r=!1,x=0),!m&&!r)){n.setAttribute("disabled","true");n.style.display="";n.style.cursor="wait";n.innerHTML=mxResources.get("loading")+"...";m=!0;var C={};this.currentSearch=C;this.searchEntries(u,D,x,mxUtils.bind(this,function(O,R,T,Q){if(this.currentSearch==C){O=null!=O?O:[];m=!1;x++;this.insertSearchHint(f,u,D,x,O,R,T,Q); -0==O.length&&1==x&&(u="");null!=k.parentNode&&k.parentNode.removeChild(k);for(R=0;R<O.length;R++)mxUtils.bind(this,function(aa){try{var S=aa();null==B[S.innerHTML]?(B[S.innerHTML]=null!=aa.parentLibraries?aa.parentLibraries.slice():[],f.appendChild(S)):null!=aa.parentLibraries&&(B[S.innerHTML]=B[S.innerHTML].concat(aa.parentLibraries));mxEvent.addGestureListeners(S,null,null,mxUtils.bind(this,function(P){var X=B[S.innerHTML];mxEvent.isPopupTrigger(P)&&this.showPopupMenuForEntry(S,X,P)}));mxEvent.disableContextMenu(S)}catch(P){}})(O[R]); -T?(n.removeAttribute("disabled"),n.innerHTML=mxResources.get("moreResults")):(n.innerHTML=mxResources.get("reset"),n.style.display="none",r=!0);n.style.cursor="";f.appendChild(k)}}),mxUtils.bind(this,function(){n.style.cursor=""}))}}else F(),u=g.value="",B={},n.style.display="none",r=!1,g.focus()});this.searchShapes=function(C){g.value=C;J()};mxEvent.addListener(g,"keydown",mxUtils.bind(this,function(C){13==C.keyCode&&(J(),mxEvent.consume(C))}));mxEvent.addListener(g,"keyup",mxUtils.bind(this,function(C){""== +mxResources.get("search"));d.style.position="relative";d.style.left="-18px";d.style.top="1px";d.style.background="url('"+this.editorUi.editor.transparentImage+"')";e.appendChild(d);f.appendChild(e);var k=document.createElement("center"),n=mxUtils.button(mxResources.get("moreResults"),function(){I()});n.style.display="none";n.style.lineHeight="normal";n.style.fontSize="12px";n.style.padding="6px 12px 6px 12px";n.style.marginTop="4px";n.style.marginBottom="8px";k.style.paddingTop="4px";k.style.paddingBottom= +"4px";k.appendChild(n);f.appendChild(k);var u="",m=!1,r=!1,x=0,B={},D=12,F=mxUtils.bind(this,function(){m=!1;this.currentSearch=null;for(var C=f.firstChild;null!=C;){var N=C.nextSibling;C!=e&&C!=k&&C.parentNode.removeChild(C);C=N}});mxEvent.addListener(d,"click",function(){d.getAttribute("src")==Dialog.prototype.closeImage&&(d.setAttribute("src",Sidebar.prototype.searchImage),d.setAttribute("title",mxResources.get("search")),n.style.display="none",u=g.value="",F());g.focus()});var I=mxUtils.bind(this, +function(){D=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=g.value){if(null!=k.parentNode&&(u!=g.value&&(F(),u=g.value,B={},r=!1,x=0),!m&&!r)){n.setAttribute("disabled","true");n.style.display="";n.style.cursor="wait";n.innerHTML=mxResources.get("loading")+"...";m=!0;var C={};this.currentSearch=C;this.searchEntries(u,D,x,mxUtils.bind(this,function(N,R,S,Q){if(this.currentSearch==C){N=null!=N?N:[];m=!1;x++;this.insertSearchHint(f,u,D,x,N,R,S,Q); +0==N.length&&1==x&&(u="");null!=k.parentNode&&k.parentNode.removeChild(k);for(R=0;R<N.length;R++)mxUtils.bind(this,function(aa){try{var U=aa();null==B[U.innerHTML]?(B[U.innerHTML]=null!=aa.parentLibraries?aa.parentLibraries.slice():[],f.appendChild(U)):null!=aa.parentLibraries&&(B[U.innerHTML]=B[U.innerHTML].concat(aa.parentLibraries));mxEvent.addGestureListeners(U,null,null,mxUtils.bind(this,function(P){var Y=B[U.innerHTML];mxEvent.isPopupTrigger(P)&&this.showPopupMenuForEntry(U,Y,P)}));mxEvent.disableContextMenu(U)}catch(P){}})(N[R]); +S?(n.removeAttribute("disabled"),n.innerHTML=mxResources.get("moreResults")):(n.innerHTML=mxResources.get("reset"),n.style.display="none",r=!0);n.style.cursor="";f.appendChild(k)}}),mxUtils.bind(this,function(){n.style.cursor=""}))}}else F(),u=g.value="",B={},n.style.display="none",r=!1,g.focus()});this.searchShapes=function(C){g.value=C;I()};mxEvent.addListener(g,"keydown",mxUtils.bind(this,function(C){13==C.keyCode&&(I(),mxEvent.consume(C))}));mxEvent.addListener(g,"keyup",mxUtils.bind(this,function(C){""== g.value?(d.setAttribute("src",Sidebar.prototype.searchImage),d.setAttribute("title",mxResources.get("search"))):(d.setAttribute("src",Dialog.prototype.closeImage),d.setAttribute("title",mxResources.get("reset")));""==g.value?(r=!0,n.style.display="none"):g.value!=u?(n.style.display="none",r=!1):m||(n.style.display=r?"none":"")}));mxEvent.addListener(g,"mousedown",function(C){C.stopPropagation&&C.stopPropagation();C.cancelBubble=!0});mxEvent.addListener(g,"selectstart",function(C){C.stopPropagation&& C.stopPropagation();C.cancelBubble=!0});a=document.createElement("div");a.appendChild(f);this.container.appendChild(a);this.palettes.search=[b,a]}; Sidebar.prototype.insertSearchHint=function(a,b,f,e,g,d,k,n){0==g.length&&1==e&&(f=document.createElement("div"),f.className="geTitle",f.style.cssText="background-color:transparent;border-color:transparent;color:gray;padding:6px 0px 0px 0px !important;margin:4px 8px 4px 8px;text-align:center;cursor:default !important",mxUtils.write(f,mxResources.get("noResultsFor",[b])),a.appendChild(f))}; @@ -2468,12 +2466,12 @@ Sidebar.prototype.updateShapes=function(a,b){var f=this.editorUi.editor.graph,e= 0;n<b.length;n++){var u=b[n];if(f.getModel().isVertex(u)==f.getModel().isVertex(a)||f.getModel().isEdge(u)==f.getModel().isEdge(a)){var m=f.getCellStyle(b[n],!1);f.getModel().setStyle(u,d);if("1"==mxUtils.getValue(m,"composite","0"))for(var r=f.model.getChildCount(u);0<=r;r--)f.model.remove(f.model.getChildAt(u,r));"umlLifeline"==m[mxConstants.STYLE_SHAPE]&&"umlLifeline"!=e[mxConstants.STYLE_SHAPE]&&(f.setCellStyles(mxConstants.STYLE_SHAPE,"umlLifeline",[u]),f.setCellStyles("participant",e[mxConstants.STYLE_SHAPE], [u]));for(r=0;r<k.length;r++){var x=m[k[r]];null!=x&&f.setCellStyles(k[r],x,[u])}g.push(u)}}}finally{f.model.endUpdate()}return g}; Sidebar.prototype.createDropHandler=function(a,b,f,e){f=null!=f?f:!0;return mxUtils.bind(this,function(g,d,k,n,u,m){for(m=m?null:mxEvent.isTouchEvent(d)||mxEvent.isPenEvent(d)?document.elementFromPoint(mxEvent.getClientX(d),mxEvent.getClientY(d)):mxEvent.getSource(d);null!=m&&m!=this.container;)m=m.parentNode;if(null==m&&g.isEnabled()){a=g.getImportableCells(a);if(0<a.length){g.stopEditing();m=null==k||mxEvent.isAltDown(d)?!1:g.isValidDropTarget(k,a,d);var r=null;null==k||m||(k=null);if(!g.isCellLocked(k|| -g.getDefaultParent())){g.model.beginUpdate();try{n=Math.round(n);u=Math.round(u);if(b&&g.isSplitTarget(k,a,d)){var x=g.view.scale,B=g.view.translate,D=(n+B.x)*x,F=(u+B.y)*x,J=g.cloneCells(a);g.splitEdge(k,J,null,n-e.width/2,u-e.height/2,D,F);r=J}else 0<a.length&&(r=g.importCells(a,n,u,k));if(null!=g.layoutManager){var C=g.layoutManager.getLayout(k);if(null!=C)for(x=g.view.scale,B=g.view.translate,D=(n+B.x)*x,F=(u+B.y)*x,k=0;k<r.length;k++)C.moveCell(r[k],D,F)}!f||null!=d&&mxEvent.isShiftDown(d)|| -g.fireEvent(new mxEventObject("cellsInserted","cells",r))}catch(O){this.editorUi.handleError(O)}finally{g.model.endUpdate()}null!=r&&0<r.length&&(g.scrollCellToVisible(r[0]),g.setSelectionCells(r));g.editAfterInsert&&null!=d&&mxEvent.isMouseEvent(d)&&null!=r&&1==r.length&&window.setTimeout(function(){g.startEditing(r[0])},0)}}mxEvent.consume(d)}})}; +g.getDefaultParent())){g.model.beginUpdate();try{n=Math.round(n);u=Math.round(u);if(b&&g.isSplitTarget(k,a,d)){var x=g.view.scale,B=g.view.translate,D=(n+B.x)*x,F=(u+B.y)*x,I=g.cloneCells(a);g.splitEdge(k,I,null,n-e.width/2,u-e.height/2,D,F);r=I}else 0<a.length&&(r=g.importCells(a,n,u,k));if(null!=g.layoutManager){var C=g.layoutManager.getLayout(k);if(null!=C)for(x=g.view.scale,B=g.view.translate,D=(n+B.x)*x,F=(u+B.y)*x,k=0;k<r.length;k++)C.moveCell(r[k],D,F)}!f||null!=d&&mxEvent.isShiftDown(d)|| +g.fireEvent(new mxEventObject("cellsInserted","cells",r))}catch(N){this.editorUi.handleError(N)}finally{g.model.endUpdate()}null!=r&&0<r.length&&(g.scrollCellToVisible(r[0]),g.setSelectionCells(r));g.editAfterInsert&&null!=d&&mxEvent.isMouseEvent(d)&&null!=r&&1==r.length&&window.setTimeout(function(){g.startEditing(r[0])},0)}}mxEvent.consume(d)}})}; Sidebar.prototype.createDragPreview=function(a,b){var f=document.createElement("div");f.className="geDragPreview";f.style.width=a+"px";f.style.height=b+"px";return f}; -Sidebar.prototype.dropAndConnect=function(a,b,f,e,g){var d=this.getDropAndConnectGeometry(a,b[e],f,b),k=[];if(null!=d){var n=this.editorUi.editor.graph,u=null;n.model.beginUpdate();try{var m=n.getCellGeometry(a),r=n.getCellGeometry(b[e]),x=n.model.getParent(a),B=!0;if(null!=n.layoutManager){var D=n.layoutManager.getLayout(x);null!=D&&D.constructor==mxStackLayout&&(B=!1)}k=n.model.isEdge(a)?null:n.view.getState(x);var F=D=0;if(null!=k){var J=k.origin;D=J.x;F=J.y;var C=d.getTerminalPoint(!1);null!= -C&&(C.x+=J.x,C.y+=J.y)}var O=!n.isTableRow(a)&&!n.isTableCell(a)&&(n.model.isEdge(a)||null!=m&&!m.relative&&B),R=n.getCellAt((d.x+D+n.view.translate.x)*n.view.scale,(d.y+F+n.view.translate.y)*n.view.scale,null,null,null,function(aa,S,P){return!n.isContainer(aa.cell)});if(null!=R&&R!=x)k=n.view.getState(R),null!=k&&(J=k.origin,x=R,O=!0,n.model.isEdge(a)||(d.x-=J.x-D,d.y-=J.y-F));else if(!B||n.isTableRow(a)||n.isTableCell(a))d.x+=D,d.y+=F;D=r.x;F=r.y;n.model.isEdge(b[e])&&(F=D=0);k=b=n.importCells(b, -d.x-(O?D:0),d.y-(O?F:0),O?x:null);if(n.model.isEdge(a))n.model.setTerminal(a,b[e],f==mxConstants.DIRECTION_NORTH);else if(n.model.isEdge(b[e])){n.model.setTerminal(b[e],a,!0);var T=n.getCellGeometry(b[e]);T.points=null;if(null!=T.getTerminalPoint(!1))T.setTerminalPoint(d.getTerminalPoint(!1),!1);else if(O&&n.model.isVertex(x)){var Q=n.view.getState(x);J=Q.cell!=n.view.currentRoot?Q.origin:new mxPoint(0,0);n.cellsMoved(b,J.x,J.y,null,null,!0)}}else r=n.getCellGeometry(b[e]),D=d.x-Math.round(r.x),F= +Sidebar.prototype.dropAndConnect=function(a,b,f,e,g){var d=this.getDropAndConnectGeometry(a,b[e],f,b),k=[];if(null!=d){var n=this.editorUi.editor.graph,u=null;n.model.beginUpdate();try{var m=n.getCellGeometry(a),r=n.getCellGeometry(b[e]),x=n.model.getParent(a),B=!0;if(null!=n.layoutManager){var D=n.layoutManager.getLayout(x);null!=D&&D.constructor==mxStackLayout&&(B=!1)}k=n.model.isEdge(a)?null:n.view.getState(x);var F=D=0;if(null!=k){var I=k.origin;D=I.x;F=I.y;var C=d.getTerminalPoint(!1);null!= +C&&(C.x+=I.x,C.y+=I.y)}var N=!n.isTableRow(a)&&!n.isTableCell(a)&&(n.model.isEdge(a)||null!=m&&!m.relative&&B),R=n.getCellAt((d.x+D+n.view.translate.x)*n.view.scale,(d.y+F+n.view.translate.y)*n.view.scale,null,null,null,function(aa,U,P){return!n.isContainer(aa.cell)});if(null!=R&&R!=x)k=n.view.getState(R),null!=k&&(I=k.origin,x=R,N=!0,n.model.isEdge(a)||(d.x-=I.x-D,d.y-=I.y-F));else if(!B||n.isTableRow(a)||n.isTableCell(a))d.x+=D,d.y+=F;D=r.x;F=r.y;n.model.isEdge(b[e])&&(F=D=0);k=b=n.importCells(b, +d.x-(N?D:0),d.y-(N?F:0),N?x:null);if(n.model.isEdge(a))n.model.setTerminal(a,b[e],f==mxConstants.DIRECTION_NORTH);else if(n.model.isEdge(b[e])){n.model.setTerminal(b[e],a,!0);var S=n.getCellGeometry(b[e]);S.points=null;if(null!=S.getTerminalPoint(!1))S.setTerminalPoint(d.getTerminalPoint(!1),!1);else if(N&&n.model.isVertex(x)){var Q=n.view.getState(x);I=Q.cell!=n.view.currentRoot?Q.origin:new mxPoint(0,0);n.cellsMoved(b,I.x,I.y,null,null,!0)}}else r=n.getCellGeometry(b[e]),D=d.x-Math.round(r.x),F= d.y-Math.round(r.y),d.x=Math.round(r.x),d.y=Math.round(r.y),n.model.setGeometry(b[e],d),n.cellsMoved(b,D,F,null,null,!0),k=b.slice(),u=1==k.length?k[0]:null,b.push(n.insertEdge(null,null,"",a,b[e],n.createCurrentEdgeStyle()));null!=g&&mxEvent.isShiftDown(g)||n.fireEvent(new mxEventObject("cellsInserted","cells",b))}catch(aa){this.editorUi.handleError(aa)}finally{n.model.endUpdate()}n.editAfterInsert&&null!=g&&mxEvent.isMouseEvent(g)&&null!=u&&window.setTimeout(function(){n.startEditing(u)},0)}return k}; Sidebar.prototype.getDropAndConnectGeometry=function(a,b,f,e){var g=this.editorUi.editor.graph,d=g.view,k=1<e.length,n=g.getCellGeometry(a);e=g.getCellGeometry(b);null!=n&&null!=e&&(e=e.clone(),g.model.isEdge(a)?(a=g.view.getState(a),n=a.absolutePoints,b=n[0],g=n[n.length-1],f==mxConstants.DIRECTION_NORTH?(e.x=b.x/d.scale-d.translate.x-e.width/2,e.y=b.y/d.scale-d.translate.y-e.height/2):(e.x=g.x/d.scale-d.translate.x-e.width/2,e.y=g.y/d.scale-d.translate.y-e.height/2)):(n.relative&&(a=g.view.getState(a), n=n.clone(),n.x=(a.x-d.translate.x)/d.scale,n.y=(a.y-d.translate.y)/d.scale),d=g.defaultEdgeLength,g.model.isEdge(b)&&null!=e.getTerminalPoint(!0)&&null!=e.getTerminalPoint(!1)?(b=e.getTerminalPoint(!0),g=e.getTerminalPoint(!1),d=g.x-b.x,b=g.y-b.y,d=Math.sqrt(d*d+b*b),e.x=n.getCenterX(),e.y=n.getCenterY(),e.width=1,e.height=1,f==mxConstants.DIRECTION_NORTH?(e.height=d,e.y=n.y-d,e.setTerminalPoint(new mxPoint(e.x,e.y),!1)):f==mxConstants.DIRECTION_EAST?(e.width=d,e.x=n.x+n.width,e.setTerminalPoint(new mxPoint(e.x+ @@ -2481,29 +2479,29 @@ e.width,e.y),!1)):f==mxConstants.DIRECTION_SOUTH?(e.height=d,e.y=n.y+n.height,e. e.width/2+d:f==mxConstants.DIRECTION_SOUTH?e.y=e.y+n.height/2+e.height/2+d:f==mxConstants.DIRECTION_WEST&&(e.x=e.x-n.width/2-e.width/2-d),g.model.isEdge(b)&&null!=e.getTerminalPoint(!0)&&null!=b.getTerminal(!1)&&(n=g.getCellGeometry(b.getTerminal(!1)),null!=n&&(f==mxConstants.DIRECTION_NORTH?(e.x-=n.getCenterX(),e.y-=n.getCenterY()+n.height/2):f==mxConstants.DIRECTION_EAST?(e.x-=n.getCenterX()-n.width/2,e.y-=n.getCenterY()):f==mxConstants.DIRECTION_SOUTH?(e.x-=n.getCenterX(),e.y-=n.getCenterY()-n.height/ 2):f==mxConstants.DIRECTION_WEST&&(e.x-=n.getCenterX()+n.width/2,e.y-=n.getCenterY()))))));return e};Sidebar.prototype.isDropStyleEnabled=function(a,b){var f=!0;null!=b&&1==a.length&&(a=this.graph.getCellStyle(a[b]),null!=a&&(f=mxUtils.getValue(a,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(a,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE));return f}; Sidebar.prototype.isDropStyleTargetIgnored=function(a){return this.graph.isSwimlane(a.cell)||this.graph.isTableCell(a.cell)||this.graph.isTableRow(a.cell)||this.graph.isTable(a.cell)}; -Sidebar.prototype.createDragSource=function(a,b,f,e,g){function d(da,pa){var wa=mxUtils.createImage(da.src);wa.style.width=da.width+"px";wa.style.height=da.height+"px";null!=pa&&wa.setAttribute("title",pa);mxUtils.setOpacity(wa,da==this.refreshTarget?30:20);wa.style.position="absolute";wa.style.cursor="crosshair";return wa}function k(da,pa,wa,Ka){null!=Ka.parentNode&&(mxUtils.contains(wa,da,pa)?(mxUtils.setOpacity(Ka,100),V=Ka):mxUtils.setOpacity(Ka,Ka==X?30:20));return wa}for(var n=this.editorUi, -u=n.editor.graph,m=null,r=null,x=this,B=0;B<e.length&&(null==r&&u.model.isVertex(e[B])?r=B:null==m&&u.model.isEdge(e[B])&&null==u.model.getTerminal(e[B],!0)&&(m=B),null==r||null==m);B++);var D=this.isDropStyleEnabled(e,r),F=mxUtils.makeDraggable(a,u,mxUtils.bind(this,function(da,pa,wa,Ka,Ha){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=e&&null!=R&&V==X){var ua=da.isCellSelected(R.cell)?da.getSelectionCells():[R.cell];ua=this.updateShapes(da.model.isEdge(R.cell)?e[0]:e[r], -ua);da.setSelectionCells(ua)}else null!=e&&null!=V&&null!=C&&V!=X?(ua=da.model.isEdge(C.cell)||null==m?r:m,da.setSelectionCells(this.dropAndConnect(C.cell,e,K,ua,pa))):b.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(da.view.getState(da.getSelectionCell()))}),f,0,0,u.autoscroll,!0,!0);u.addListener(mxEvent.ESCAPE,function(da,pa){F.isActive()&&F.reset()});var J=F.mouseDown;F.mouseDown=function(da){mxEvent.isPopupTrigger(da)||mxEvent.isMultiTouchEvent(da)||u.isCellLocked(u.getDefaultParent())|| -(u.stopEditing(),J.apply(this,arguments))};var C=null,O=null,R=null,T=!1,Q=d(this.triangleUp,mxResources.get("connect")),aa=d(this.triangleRight,mxResources.get("connect")),S=d(this.triangleDown,mxResources.get("connect")),P=d(this.triangleLeft,mxResources.get("connect")),X=d(this.refreshTarget,mxResources.get("replace")),ha=null,fa=d(this.roundDrop),sa=d(this.roundDrop),K=mxConstants.DIRECTION_NORTH,V=null,G=F.createPreviewElement;F.createPreviewElement=function(da){var pa=G.apply(this,arguments); -mxClient.IS_SVG&&(pa.style.pointerEvents="none");this.previewElementWidth=pa.style.width;this.previewElementHeight=pa.style.height;return pa};var M=F.dragEnter;F.dragEnter=function(da,pa){null!=n.hoverIcons&&n.hoverIcons.setDisplay("none");M.apply(this,arguments)};var U=F.dragExit;F.dragExit=function(da,pa){null!=n.hoverIcons&&n.hoverIcons.setDisplay("");U.apply(this,arguments)};F.dragOver=function(da,pa){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=V&&this.currentGuide.hide(); -if(null!=this.previewElement){var wa=da.view;if(null!=R&&V==X)this.previewElement.style.display=da.model.isEdge(R.cell)?"none":"",this.previewElement.style.left=R.x+"px",this.previewElement.style.top=R.y+"px",this.previewElement.style.width=R.width+"px",this.previewElement.style.height=R.height+"px";else if(null!=C&&null!=V){null!=F.currentHighlight&&null!=F.currentHighlight.state&&F.currentHighlight.hide();var Ka=da.model.isEdge(C.cell)||null==m?r:m,Ha=x.getDropAndConnectGeometry(C.cell,e[Ka],K, -e),ua=da.model.isEdge(C.cell)?null:da.getCellGeometry(C.cell),Ca=da.getCellGeometry(e[Ka]),qa=da.model.getParent(C.cell),Da=wa.translate.x*wa.scale,Ua=wa.translate.y*wa.scale;null!=ua&&!ua.relative&&da.model.isVertex(qa)&&qa!=wa.currentRoot&&(Ua=wa.getState(qa),Da=Ua.x,Ua=Ua.y);ua=Ca.x;Ca=Ca.y;da.model.isEdge(e[Ka])&&(Ca=ua=0);this.previewElement.style.left=(Ha.x-ua)*wa.scale+Da+"px";this.previewElement.style.top=(Ha.y-Ca)*wa.scale+Ua+"px";1==e.length&&(this.previewElement.style.width=Ha.width*wa.scale+ -"px",this.previewElement.style.height=Ha.height*wa.scale+"px");this.previewElement.style.display=""}else null!=F.currentHighlight.state&&da.model.isEdge(F.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-g.width*wa.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-g.height*wa.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight, -this.previewElement.style.display="")}};var ba=(new Date).getTime(),la=0,ra=null,Y=this.editorUi.editor.graph.getCellStyle(e[0]);F.getDropTarget=mxUtils.bind(this,function(da,pa,wa,Ka){var Ha=mxEvent.isAltDown(Ka)||null==e?null:da.getCellAt(pa,wa,null,null,null,function(Ua,db,Ta){return da.isContainer(Ua.cell)});if(null!=Ha&&!this.graph.isCellConnectable(Ha)&&!this.graph.model.isEdge(Ha)){var ua=this.graph.getModel().getParent(Ha);this.graph.getModel().isVertex(ua)&&this.graph.isCellConnectable(ua)&& -(Ha=ua)}da.isCellLocked(Ha)&&(Ha=null);var Ca=da.view.getState(Ha);ua=V=null;ra!=Ca?(ba=(new Date).getTime(),la=0,ra=Ca,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=Ca&&(this.updateThread=window.setTimeout(function(){null==V&&(ra=Ca,F.getDropTarget(da,pa,wa,Ka))},this.dropTargetDelay+10))):la=(new Date).getTime()-ba;if(D&&2500>la&&null!=Ca&&!mxEvent.isShiftDown(Ka)&&(mxUtils.getValue(Ca.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(Y,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(Ca.style, -mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ca.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ca.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(Y,mxConstants.STYLE_SHAPE)||1500<la||da.model.isEdge(Ca.cell))&&la>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(Ca)&&(da.model.isVertex(Ca.cell)&&null!=r||da.model.isEdge(Ca.cell)&&da.model.isEdge(e[0]))){if(da.isCellEditable(Ca.cell)){R= -Ca;var qa=da.model.isEdge(Ca.cell)?da.view.getPoint(Ca):new mxPoint(Ca.getCenterX(),Ca.getCenterY());qa=new mxRectangle(qa.x-this.refreshTarget.width/2,qa.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);X.style.left=Math.floor(qa.x)+"px";X.style.top=Math.floor(qa.y)+"px";null==ha&&(da.container.appendChild(X),ha=X.parentNode);k(pa,wa,qa,X)}}else null==R||!mxUtils.contains(R,pa,wa)||1500<la&&!mxEvent.isShiftDown(Ka)?(R=null,null!=ha&&(X.parentNode.removeChild(X),ha= -null)):null!=R&&null!=ha&&(qa=da.model.isEdge(R.cell)?da.view.getPoint(R):new mxPoint(R.getCenterX(),R.getCenterY()),qa=new mxRectangle(qa.x-this.refreshTarget.width/2,qa.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),k(pa,wa,qa,X));if(T&&null!=C&&!mxEvent.isAltDown(Ka)&&null==V){ua=mxRectangle.fromRectangle(C);if(da.model.isEdge(C.cell)){var Da=C.absolutePoints;null!=fa.parentNode&&(qa=Da[0],ua.add(k(pa,wa,new mxRectangle(qa.x-this.roundDrop.width/2,qa.y-this.roundDrop.height/ -2,this.roundDrop.width,this.roundDrop.height),fa)));null!=sa.parentNode&&(Da=Da[Da.length-1],ua.add(k(pa,wa,new mxRectangle(Da.x-this.roundDrop.width/2,Da.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),sa)))}else qa=mxRectangle.fromRectangle(C),null!=C.shape&&null!=C.shape.boundingBox&&(qa=mxRectangle.fromRectangle(C.shape.boundingBox)),qa.grow(this.graph.tolerance),qa.grow(HoverIcons.prototype.arrowSpacing),Da=this.graph.selectionCellsHandler.getHandler(C.cell),null!=Da&&(qa.x-= -Da.horizontalOffset/2,qa.y-=Da.verticalOffset/2,qa.width+=Da.horizontalOffset,qa.height+=Da.verticalOffset,null!=Da.rotationShape&&null!=Da.rotationShape.node&&"hidden"!=Da.rotationShape.node.style.visibility&&"none"!=Da.rotationShape.node.style.display&&null!=Da.rotationShape.boundingBox&&qa.add(Da.rotationShape.boundingBox)),ua.add(k(pa,wa,new mxRectangle(C.getCenterX()-this.triangleUp.width/2,qa.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),Q)),ua.add(k(pa,wa,new mxRectangle(qa.x+ -qa.width,C.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),aa)),ua.add(k(pa,wa,new mxRectangle(C.getCenterX()-this.triangleDown.width/2,qa.y+qa.height,this.triangleDown.width,this.triangleDown.height),S)),ua.add(k(pa,wa,new mxRectangle(qa.x-this.triangleLeft.width,C.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),P));null!=ua&&ua.grow(10)}K=mxConstants.DIRECTION_NORTH;V==aa?K=mxConstants.DIRECTION_EAST:V==S||V== -sa?K=mxConstants.DIRECTION_SOUTH:V==P&&(K=mxConstants.DIRECTION_WEST);null!=R&&V==X&&(Ca=R);qa=(null==r||da.isCellConnectable(e[r]))&&(da.model.isEdge(Ha)&&null!=r||da.model.isVertex(Ha)&&da.isCellConnectable(Ha));if(null!=C&&5E3<=la||C!=Ca&&(null==ua||!mxUtils.contains(ua,pa,wa)||500<la&&null==V&&qa))if(T=!1,C=5E3>la&&la>this.dropTargetDelay||da.model.isEdge(Ha)?Ca:null,null!=C&&qa){ua=[fa,sa,Q,aa,S,P];for(qa=0;qa<ua.length;qa++)null!=ua[qa].parentNode&&ua[qa].parentNode.removeChild(ua[qa]);da.model.isEdge(Ha)? -(Da=Ca.absolutePoints,null!=Da&&(qa=Da[0],Da=Da[Da.length-1],ua=da.tolerance,new mxRectangle(pa-ua,wa-ua,2*ua,2*ua),fa.style.left=Math.floor(qa.x-this.roundDrop.width/2)+"px",fa.style.top=Math.floor(qa.y-this.roundDrop.height/2)+"px",sa.style.left=Math.floor(Da.x-this.roundDrop.width/2)+"px",sa.style.top=Math.floor(Da.y-this.roundDrop.height/2)+"px",null==da.model.getTerminal(Ha,!0)&&da.container.appendChild(fa),null==da.model.getTerminal(Ha,!1)&&da.container.appendChild(sa))):(qa=mxRectangle.fromRectangle(Ca), -null!=Ca.shape&&null!=Ca.shape.boundingBox&&(qa=mxRectangle.fromRectangle(Ca.shape.boundingBox)),qa.grow(this.graph.tolerance),qa.grow(HoverIcons.prototype.arrowSpacing),Da=this.graph.selectionCellsHandler.getHandler(Ca.cell),null!=Da&&(qa.x-=Da.horizontalOffset/2,qa.y-=Da.verticalOffset/2,qa.width+=Da.horizontalOffset,qa.height+=Da.verticalOffset,null!=Da.rotationShape&&null!=Da.rotationShape.node&&"hidden"!=Da.rotationShape.node.style.visibility&&"none"!=Da.rotationShape.node.style.display&&null!= -Da.rotationShape.boundingBox&&qa.add(Da.rotationShape.boundingBox)),Q.style.left=Math.floor(Ca.getCenterX()-this.triangleUp.width/2)+"px",Q.style.top=Math.floor(qa.y-this.triangleUp.height)+"px",aa.style.left=Math.floor(qa.x+qa.width)+"px",aa.style.top=Math.floor(Ca.getCenterY()-this.triangleRight.height/2)+"px",S.style.left=Q.style.left,S.style.top=Math.floor(qa.y+qa.height)+"px",P.style.left=Math.floor(qa.x-this.triangleLeft.width)+"px",P.style.top=aa.style.top,"eastwest"!=Ca.style.portConstraint&& -(da.container.appendChild(Q),da.container.appendChild(S)),da.container.appendChild(aa),da.container.appendChild(P));null!=Ca&&(O=da.selectionCellsHandler.getHandler(Ca.cell),null!=O&&null!=O.setHandlesVisible&&O.setHandlesVisible(!1));T=!0}else for(ua=[fa,sa,Q,aa,S,P],qa=0;qa<ua.length;qa++)null!=ua[qa].parentNode&&ua[qa].parentNode.removeChild(ua[qa]);T||null==O||O.setHandlesVisible(!0);Ha=mxEvent.isAltDown(Ka)&&!mxEvent.isShiftDown(Ka)||null!=R&&V==X?null:mxDragSource.prototype.getDropTarget.apply(this, -arguments);ua=da.getModel();if(null!=Ha&&(null!=V||!da.isSplitTarget(Ha,e,Ka))){for(;null!=Ha&&!da.isValidDropTarget(Ha,e,Ka)&&ua.isVertex(ua.getParent(Ha));)Ha=ua.getParent(Ha);null!=Ha&&(da.view.currentRoot==Ha||!da.isValidRoot(Ha)&&0==da.getModel().getChildCount(Ha)||da.isCellLocked(Ha)||ua.isEdge(Ha)||!da.isValidDropTarget(Ha,e,Ka))&&(Ha=null)}da.isCellLocked(Ha)&&(Ha=null);return Ha});F.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var da=[fa,sa,X,Q,aa,S,P],pa= -0;pa<da.length;pa++)null!=da[pa].parentNode&&da[pa].parentNode.removeChild(da[pa]);null!=C&&null!=O&&O.reset();V=ha=R=C=O=null};return F}; +Sidebar.prototype.createDragSource=function(a,b,f,e,g){function d(da,sa){var ta=mxUtils.createImage(da.src);ta.style.width=da.width+"px";ta.style.height=da.height+"px";null!=sa&&ta.setAttribute("title",sa);mxUtils.setOpacity(ta,da==this.refreshTarget?30:20);ta.style.position="absolute";ta.style.cursor="crosshair";return ta}function k(da,sa,ta,Ja){null!=Ja.parentNode&&(mxUtils.contains(ta,da,sa)?(mxUtils.setOpacity(Ja,100),V=Ja):mxUtils.setOpacity(Ja,Ja==Y?30:20));return ta}for(var n=this.editorUi, +u=n.editor.graph,m=null,r=null,x=this,B=0;B<e.length&&(null==r&&u.model.isVertex(e[B])?r=B:null==m&&u.model.isEdge(e[B])&&null==u.model.getTerminal(e[B],!0)&&(m=B),null==r||null==m);B++);var D=this.isDropStyleEnabled(e,r),F=mxUtils.makeDraggable(a,u,mxUtils.bind(this,function(da,sa,ta,Ja,Ha){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=e&&null!=R&&V==Y){var ua=da.isCellSelected(R.cell)?da.getSelectionCells():[R.cell];ua=this.updateShapes(da.model.isEdge(R.cell)?e[0]:e[r], +ua);da.setSelectionCells(ua)}else null!=e&&null!=V&&null!=C&&V!=Y?(ua=da.model.isEdge(C.cell)||null==m?r:m,da.setSelectionCells(this.dropAndConnect(C.cell,e,K,ua,sa))):b.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(da.view.getState(da.getSelectionCell()))}),f,0,0,u.autoscroll,!0,!0);u.addListener(mxEvent.ESCAPE,function(da,sa){F.isActive()&&F.reset()});var I=F.mouseDown;F.mouseDown=function(da){mxEvent.isPopupTrigger(da)||mxEvent.isMultiTouchEvent(da)||u.isCellLocked(u.getDefaultParent())|| +(u.stopEditing(),I.apply(this,arguments))};var C=null,N=null,R=null,S=!1,Q=d(this.triangleUp,mxResources.get("connect")),aa=d(this.triangleRight,mxResources.get("connect")),U=d(this.triangleDown,mxResources.get("connect")),P=d(this.triangleLeft,mxResources.get("connect")),Y=d(this.refreshTarget,mxResources.get("replace")),ja=null,fa=d(this.roundDrop),ra=d(this.roundDrop),K=mxConstants.DIRECTION_NORTH,V=null,O=F.createPreviewElement;F.createPreviewElement=function(da){var sa=O.apply(this,arguments); +mxClient.IS_SVG&&(sa.style.pointerEvents="none");this.previewElementWidth=sa.style.width;this.previewElementHeight=sa.style.height;return sa};var T=F.dragEnter;F.dragEnter=function(da,sa){null!=n.hoverIcons&&n.hoverIcons.setDisplay("none");T.apply(this,arguments)};var J=F.dragExit;F.dragExit=function(da,sa){null!=n.hoverIcons&&n.hoverIcons.setDisplay("");J.apply(this,arguments)};F.dragOver=function(da,sa){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=V&&this.currentGuide.hide(); +if(null!=this.previewElement){var ta=da.view;if(null!=R&&V==Y)this.previewElement.style.display=da.model.isEdge(R.cell)?"none":"",this.previewElement.style.left=R.x+"px",this.previewElement.style.top=R.y+"px",this.previewElement.style.width=R.width+"px",this.previewElement.style.height=R.height+"px";else if(null!=C&&null!=V){null!=F.currentHighlight&&null!=F.currentHighlight.state&&F.currentHighlight.hide();var Ja=da.model.isEdge(C.cell)||null==m?r:m,Ha=x.getDropAndConnectGeometry(C.cell,e[Ja],K, +e),ua=da.model.isEdge(C.cell)?null:da.getCellGeometry(C.cell),Aa=da.getCellGeometry(e[Ja]),qa=da.model.getParent(C.cell),Da=ta.translate.x*ta.scale,Ua=ta.translate.y*ta.scale;null!=ua&&!ua.relative&&da.model.isVertex(qa)&&qa!=ta.currentRoot&&(Ua=ta.getState(qa),Da=Ua.x,Ua=Ua.y);ua=Aa.x;Aa=Aa.y;da.model.isEdge(e[Ja])&&(Aa=ua=0);this.previewElement.style.left=(Ha.x-ua)*ta.scale+Da+"px";this.previewElement.style.top=(Ha.y-Aa)*ta.scale+Ua+"px";1==e.length&&(this.previewElement.style.width=Ha.width*ta.scale+ +"px",this.previewElement.style.height=Ha.height*ta.scale+"px");this.previewElement.style.display=""}else null!=F.currentHighlight.state&&da.model.isEdge(F.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-g.width*ta.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-g.height*ta.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight, +this.previewElement.style.display="")}};var ba=(new Date).getTime(),ha=0,na=null,W=this.editorUi.editor.graph.getCellStyle(e[0]);F.getDropTarget=mxUtils.bind(this,function(da,sa,ta,Ja){var Ha=mxEvent.isAltDown(Ja)||null==e?null:da.getCellAt(sa,ta,null,null,null,function(Ua,db,Ta){return da.isContainer(Ua.cell)});if(null!=Ha&&!this.graph.isCellConnectable(Ha)&&!this.graph.model.isEdge(Ha)){var ua=this.graph.getModel().getParent(Ha);this.graph.getModel().isVertex(ua)&&this.graph.isCellConnectable(ua)&& +(Ha=ua)}da.isCellLocked(Ha)&&(Ha=null);var Aa=da.view.getState(Ha);ua=V=null;na!=Aa?(ba=(new Date).getTime(),ha=0,na=Aa,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=Aa&&(this.updateThread=window.setTimeout(function(){null==V&&(na=Aa,F.getDropTarget(da,sa,ta,Ja))},this.dropTargetDelay+10))):ha=(new Date).getTime()-ba;if(D&&2500>ha&&null!=Aa&&!mxEvent.isShiftDown(Ja)&&(mxUtils.getValue(Aa.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(W,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(Aa.style, +mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Aa.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Aa.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(W,mxConstants.STYLE_SHAPE)||1500<ha||da.model.isEdge(Aa.cell))&&ha>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(Aa)&&(da.model.isVertex(Aa.cell)&&null!=r||da.model.isEdge(Aa.cell)&&da.model.isEdge(e[0]))){if(da.isCellEditable(Aa.cell)){R= +Aa;var qa=da.model.isEdge(Aa.cell)?da.view.getPoint(Aa):new mxPoint(Aa.getCenterX(),Aa.getCenterY());qa=new mxRectangle(qa.x-this.refreshTarget.width/2,qa.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);Y.style.left=Math.floor(qa.x)+"px";Y.style.top=Math.floor(qa.y)+"px";null==ja&&(da.container.appendChild(Y),ja=Y.parentNode);k(sa,ta,qa,Y)}}else null==R||!mxUtils.contains(R,sa,ta)||1500<ha&&!mxEvent.isShiftDown(Ja)?(R=null,null!=ja&&(Y.parentNode.removeChild(Y),ja= +null)):null!=R&&null!=ja&&(qa=da.model.isEdge(R.cell)?da.view.getPoint(R):new mxPoint(R.getCenterX(),R.getCenterY()),qa=new mxRectangle(qa.x-this.refreshTarget.width/2,qa.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),k(sa,ta,qa,Y));if(S&&null!=C&&!mxEvent.isAltDown(Ja)&&null==V){ua=mxRectangle.fromRectangle(C);if(da.model.isEdge(C.cell)){var Da=C.absolutePoints;null!=fa.parentNode&&(qa=Da[0],ua.add(k(sa,ta,new mxRectangle(qa.x-this.roundDrop.width/2,qa.y-this.roundDrop.height/ +2,this.roundDrop.width,this.roundDrop.height),fa)));null!=ra.parentNode&&(Da=Da[Da.length-1],ua.add(k(sa,ta,new mxRectangle(Da.x-this.roundDrop.width/2,Da.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),ra)))}else qa=mxRectangle.fromRectangle(C),null!=C.shape&&null!=C.shape.boundingBox&&(qa=mxRectangle.fromRectangle(C.shape.boundingBox)),qa.grow(this.graph.tolerance),qa.grow(HoverIcons.prototype.arrowSpacing),Da=this.graph.selectionCellsHandler.getHandler(C.cell),null!=Da&&(qa.x-= +Da.horizontalOffset/2,qa.y-=Da.verticalOffset/2,qa.width+=Da.horizontalOffset,qa.height+=Da.verticalOffset,null!=Da.rotationShape&&null!=Da.rotationShape.node&&"hidden"!=Da.rotationShape.node.style.visibility&&"none"!=Da.rotationShape.node.style.display&&null!=Da.rotationShape.boundingBox&&qa.add(Da.rotationShape.boundingBox)),ua.add(k(sa,ta,new mxRectangle(C.getCenterX()-this.triangleUp.width/2,qa.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),Q)),ua.add(k(sa,ta,new mxRectangle(qa.x+ +qa.width,C.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),aa)),ua.add(k(sa,ta,new mxRectangle(C.getCenterX()-this.triangleDown.width/2,qa.y+qa.height,this.triangleDown.width,this.triangleDown.height),U)),ua.add(k(sa,ta,new mxRectangle(qa.x-this.triangleLeft.width,C.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),P));null!=ua&&ua.grow(10)}K=mxConstants.DIRECTION_NORTH;V==aa?K=mxConstants.DIRECTION_EAST:V==U||V== +ra?K=mxConstants.DIRECTION_SOUTH:V==P&&(K=mxConstants.DIRECTION_WEST);null!=R&&V==Y&&(Aa=R);qa=(null==r||da.isCellConnectable(e[r]))&&(da.model.isEdge(Ha)&&null!=r||da.model.isVertex(Ha)&&da.isCellConnectable(Ha));if(null!=C&&5E3<=ha||C!=Aa&&(null==ua||!mxUtils.contains(ua,sa,ta)||500<ha&&null==V&&qa))if(S=!1,C=5E3>ha&&ha>this.dropTargetDelay||da.model.isEdge(Ha)?Aa:null,null!=C&&qa){ua=[fa,ra,Q,aa,U,P];for(qa=0;qa<ua.length;qa++)null!=ua[qa].parentNode&&ua[qa].parentNode.removeChild(ua[qa]);da.model.isEdge(Ha)? +(Da=Aa.absolutePoints,null!=Da&&(qa=Da[0],Da=Da[Da.length-1],ua=da.tolerance,new mxRectangle(sa-ua,ta-ua,2*ua,2*ua),fa.style.left=Math.floor(qa.x-this.roundDrop.width/2)+"px",fa.style.top=Math.floor(qa.y-this.roundDrop.height/2)+"px",ra.style.left=Math.floor(Da.x-this.roundDrop.width/2)+"px",ra.style.top=Math.floor(Da.y-this.roundDrop.height/2)+"px",null==da.model.getTerminal(Ha,!0)&&da.container.appendChild(fa),null==da.model.getTerminal(Ha,!1)&&da.container.appendChild(ra))):(qa=mxRectangle.fromRectangle(Aa), +null!=Aa.shape&&null!=Aa.shape.boundingBox&&(qa=mxRectangle.fromRectangle(Aa.shape.boundingBox)),qa.grow(this.graph.tolerance),qa.grow(HoverIcons.prototype.arrowSpacing),Da=this.graph.selectionCellsHandler.getHandler(Aa.cell),null!=Da&&(qa.x-=Da.horizontalOffset/2,qa.y-=Da.verticalOffset/2,qa.width+=Da.horizontalOffset,qa.height+=Da.verticalOffset,null!=Da.rotationShape&&null!=Da.rotationShape.node&&"hidden"!=Da.rotationShape.node.style.visibility&&"none"!=Da.rotationShape.node.style.display&&null!= +Da.rotationShape.boundingBox&&qa.add(Da.rotationShape.boundingBox)),Q.style.left=Math.floor(Aa.getCenterX()-this.triangleUp.width/2)+"px",Q.style.top=Math.floor(qa.y-this.triangleUp.height)+"px",aa.style.left=Math.floor(qa.x+qa.width)+"px",aa.style.top=Math.floor(Aa.getCenterY()-this.triangleRight.height/2)+"px",U.style.left=Q.style.left,U.style.top=Math.floor(qa.y+qa.height)+"px",P.style.left=Math.floor(qa.x-this.triangleLeft.width)+"px",P.style.top=aa.style.top,"eastwest"!=Aa.style.portConstraint&& +(da.container.appendChild(Q),da.container.appendChild(U)),da.container.appendChild(aa),da.container.appendChild(P));null!=Aa&&(N=da.selectionCellsHandler.getHandler(Aa.cell),null!=N&&null!=N.setHandlesVisible&&N.setHandlesVisible(!1));S=!0}else for(ua=[fa,ra,Q,aa,U,P],qa=0;qa<ua.length;qa++)null!=ua[qa].parentNode&&ua[qa].parentNode.removeChild(ua[qa]);S||null==N||N.setHandlesVisible(!0);Ha=mxEvent.isAltDown(Ja)&&!mxEvent.isShiftDown(Ja)||null!=R&&V==Y?null:mxDragSource.prototype.getDropTarget.apply(this, +arguments);ua=da.getModel();if(null!=Ha&&(null!=V||!da.isSplitTarget(Ha,e,Ja))){for(;null!=Ha&&!da.isValidDropTarget(Ha,e,Ja)&&ua.isVertex(ua.getParent(Ha));)Ha=ua.getParent(Ha);null!=Ha&&(da.view.currentRoot==Ha||!da.isValidRoot(Ha)&&0==da.getModel().getChildCount(Ha)||da.isCellLocked(Ha)||ua.isEdge(Ha)||!da.isValidDropTarget(Ha,e,Ja))&&(Ha=null)}da.isCellLocked(Ha)&&(Ha=null);return Ha});F.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var da=[fa,ra,Y,Q,aa,U,P],sa= +0;sa<da.length;sa++)null!=da[sa].parentNode&&da[sa].parentNode.removeChild(da[sa]);null!=C&&null!=N&&N.reset();V=ja=R=C=N=null};return F}; Sidebar.prototype.itemClicked=function(a,b,f,e){e=this.editorUi.editor.graph;e.container.focus();if(mxEvent.isAltDown(f)&&1==e.getSelectionCount()&&e.model.isVertex(e.getSelectionCell())){b=null;for(var g=0;g<a.length&&null==b;g++)e.model.isVertex(a[g])&&(b=g);null!=b&&(e.setSelectionCells(this.dropAndConnect(e.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,b,f)),e.scrollCellToVisible(e.getSelectionCell()))}else mxEvent.isShiftDown(f)&&!e.isSelectionEmpty()?(f=e.getEditableCells(e.getSelectionCells()),this.updateShapes(a[0],f),e.scrollCellToVisible(f)):(a=mxEvent.isAltDown(f)?e.getFreeInsertPoint():e.getCenterInsertPoint(e.getBoundingBoxFromGeometry(a,!0)),b.drop(e,f,null,a.x,a.y,!0))}; Sidebar.prototype.addClickHandler=function(a,b,f){var e=b.mouseDown,g=b.mouseMove,d=b.mouseUp,k=this.editorUi.editor.graph.tolerance,n=null,u=this;b.mouseDown=function(m){e.apply(this,arguments);n=new mxPoint(mxEvent.getClientX(m),mxEvent.getClientY(m));null!=this.dragElement&&(this.dragElement.style.display="none",mxUtils.setOpacity(a,50))};b.mouseMove=function(m){null!=this.dragElement&&"none"==this.dragElement.style.display&&null!=n&&(Math.abs(n.x-mxEvent.getClientX(m))>k||Math.abs(n.y-mxEvent.getClientY(m))> @@ -2519,8 +2517,8 @@ Sidebar.prototype.addFoldingHandler=function(a,b,f){var e=!1;if(!mxClient.IS_IE| Sidebar.prototype.removePalette=function(a){var b=this.palettes[a];if(null!=b){this.palettes[a]=null;for(a=0;a<b.length;a++)this.container.removeChild(b[a]);return!0}return!1}; Sidebar.prototype.addImagePalette=function(a,b,f,e,g,d,k){for(var n=[],u=0;u<g.length;u++)mxUtils.bind(this,function(m,r,x){if(null==x){x=m.lastIndexOf("/");var B=m.lastIndexOf(".");x=m.substring(0<=x?x+1:0,0<=B?B:m.length).replace(/[-_]/g," ")}n.push(this.createVertexTemplateEntry("image;html=1;image="+f+m+e,this.defaultImageWidth,this.defaultImageHeight,"",r,null!=r,null,this.filterTags(x)))})(g[u],null!=d?d[u]:null,null!=k?k[g[u]]:null);this.addPaletteFunctions(a,b,!1,n)}; Sidebar.prototype.getTagsForStencil=function(a,b,f){a=a.split(".");for(var e=1;e<a.length;e++)a[e]=a[e].replace(/_/g," ");a.push(b.replace(/_/g," "));null!=f&&a.push(f);return a.slice(1,a.length)}; -Sidebar.prototype.addStencilPalette=function(a,b,f,e,g,d,k,n,u,m){k=null!=k?k:1;if(this.addStencilsToIndex){var r=[];if(null!=u)for(m=0;m<u.length;m++)r.push(u[m]);mxStencilRegistry.loadStencilSet(f,mxUtils.bind(this,function(x,B,D,F,J){if(null==g||0>mxUtils.indexOf(g,B)){D=this.getTagsForStencil(x,B);var C=null!=n?n[B]:null;null!=C&&D.push(C);r.push(this.createVertexTemplateEntry("shape="+x+B.toLowerCase()+e,Math.round(F*k),Math.round(J*k),"",B.replace(/_/g," "),null,null,this.filterTags(D.join(" "))))}}), -!0,!0);this.addPaletteFunctions(a,b,!1,r)}else this.addPalette(a,b,!1,mxUtils.bind(this,function(x){null==e&&(e="");null!=d&&d.call(this,x);if(null!=u)for(var B=0;B<u.length;B++)u[B](x);mxStencilRegistry.loadStencilSet(f,mxUtils.bind(this,function(D,F,J,C,O){(null==g||0>mxUtils.indexOf(g,F))&&x.appendChild(this.createVertexTemplate("shape="+D+F.toLowerCase()+e,Math.round(C*k),Math.round(O*k),"",F.replace(/_/g," "),!0))}),!0)}))}; +Sidebar.prototype.addStencilPalette=function(a,b,f,e,g,d,k,n,u,m){k=null!=k?k:1;if(this.addStencilsToIndex){var r=[];if(null!=u)for(m=0;m<u.length;m++)r.push(u[m]);mxStencilRegistry.loadStencilSet(f,mxUtils.bind(this,function(x,B,D,F,I){if(null==g||0>mxUtils.indexOf(g,B)){D=this.getTagsForStencil(x,B);var C=null!=n?n[B]:null;null!=C&&D.push(C);r.push(this.createVertexTemplateEntry("shape="+x+B.toLowerCase()+e,Math.round(F*k),Math.round(I*k),"",B.replace(/_/g," "),null,null,this.filterTags(D.join(" "))))}}), +!0,!0);this.addPaletteFunctions(a,b,!1,r)}else this.addPalette(a,b,!1,mxUtils.bind(this,function(x){null==e&&(e="");null!=d&&d.call(this,x);if(null!=u)for(var B=0;B<u.length;B++)u[B](x);mxStencilRegistry.loadStencilSet(f,mxUtils.bind(this,function(D,F,I,C,N){(null==g||0>mxUtils.indexOf(g,F))&&x.appendChild(this.createVertexTemplate("shape="+D+F.toLowerCase()+e,Math.round(C*k),Math.round(N*k),"",F.replace(/_/g," "),!0))}),!0)}))}; Sidebar.prototype.destroy=function(){null!=this.graph&&(null!=this.graph.container&&null!=this.graph.container.parentNode&&this.graph.container.parentNode.removeChild(this.graph.container),this.graph.destroy(),this.graph=null);null!=this.pointerUpHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerup":"mouseup",this.pointerUpHandler),this.pointerUpHandler=null);null!=this.pointerDownHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerdown":"mousedown",this.pointerDownHandler), this.pointerDownHandler=null);null!=this.pointerMoveHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.pointerMoveHandler),this.pointerMoveHandler=null);null!=this.pointerOutHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerout":"mouseout",this.pointerOutHandler),this.pointerOutHandler=null)};(function(){var a=[["nbsp","160"],["shy","173"]],b=mxUtils.parseXml;mxUtils.parseXml=function(f){for(var e=0;e<a.length;e++)f=f.replace(new RegExp("&"+a[e][0]+";","g"),"&#"+a[e][1]+";");return b(f)}})(); Date.prototype.toISOString||function(){function a(b){b=String(b);1===b.length&&(b="0"+b);return b}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()}); @@ -2532,34 +2530,34 @@ mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhC mxGraphView.prototype.setUnit=function(a){this.unit!=a&&(this.unit=a,this.fireEvent(new mxEventObject("unitChanged","unit",a)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(a,b,f){return null}; mxImageShape.prototype.getImageDataUri=function(){var a=this.image;if("data:image/svg+xml;base64,"==a.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=a)this.clippedSvg=Graph.clipSvgDataUri(a,!0),this.clippedImage=a;a=this.clippedSvg}return a}; Graph=function(a,b,f,e,g,d){mxGraph.call(this,a,b,f,e);this.themes=g||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=d?d:!1;a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(K){K=this.getCurrentCellStyle(K); -return null!=K?"1"==K.html||"wrap"==K[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var k=null,n=null,u=null,m=null,r=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(K,V){if("mouseDown"==V.getProperty("eventName")&&this.isEnabled()){K=V.getProperty("event");var G=K.getState();V=this.view.scale;if(!mxEvent.isAltDown(K.getEvent())&&null!=G)if(this.model.isEdge(G.cell))if(k=new mxPoint(K.getGraphX(),K.getGraphY()),r=this.isCellSelected(G.cell),u=G,n=K,null!=G.text&&null!= -G.text.boundingBox&&mxUtils.contains(G.text.boundingBox,K.getGraphX(),K.getGraphY()))m=mxEvent.LABEL_HANDLE;else{var M=this.selectionCellsHandler.getHandler(G.cell);null!=M&&null!=M.bends&&0<M.bends.length&&(m=M.getHandleForEvent(K))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(K.getEvent())&&(M=this.selectionCellsHandler.getHandler(G.cell),null==M||null==M.getHandleForEvent(K))){var U=new mxRectangle(K.getGraphX()-1,K.getGraphY()-1),ba=mxEvent.isTouchEvent(K.getEvent())?mxShape.prototype.svgStrokeTolerance- -1:(mxShape.prototype.svgStrokeTolerance+2)/2;M=ba+2;U.grow(ba);if(this.isTableCell(G.cell)&&!this.isCellSelected(G.cell)&&!(mxUtils.contains(G,K.getGraphX()-M,K.getGraphY()-M)&&mxUtils.contains(G,K.getGraphX()-M,K.getGraphY()+M)&&mxUtils.contains(G,K.getGraphX()+M,K.getGraphY()+M)&&mxUtils.contains(G,K.getGraphX()+M,K.getGraphY()-M))){var la=this.model.getParent(G.cell);M=this.model.getParent(la);if(!this.isCellSelected(M)){ba*=V;var ra=2*ba;if(this.model.getChildAt(M,0)!=la&&mxUtils.intersects(U, -new mxRectangle(G.x,G.y-ba,G.width,ra))||this.model.getChildAt(la,0)!=G.cell&&mxUtils.intersects(U,new mxRectangle(G.x-ba,G.y,ra,G.height))||mxUtils.intersects(U,new mxRectangle(G.x,G.y+G.height-ba,G.width,ra))||mxUtils.intersects(U,new mxRectangle(G.x+G.width-ba,G.y,ra,G.height)))la=this.selectionCellsHandler.isHandled(M),this.selectCellForEvent(M,K.getEvent()),M=this.selectionCellsHandler.getHandler(M),null!=M&&(ba=M.getHandleForEvent(K),null!=ba&&(M.start(K.getGraphX(),K.getGraphY(),ba),M.blockDelayedSelection= -!la,K.consume()))}}for(;!K.isConsumed()&&null!=G&&(this.isTableCell(G.cell)||this.isTableRow(G.cell)||this.isTable(G.cell));)this.isSwimlane(G.cell)&&(M=this.getActualStartSize(G.cell),(0<M.x||0<M.width)&&mxUtils.intersects(U,new mxRectangle(G.x+(M.x-M.width-1)*V+(0==M.x?G.width:0),G.y,1,G.height))||(0<M.y||0<M.height)&&mxUtils.intersects(U,new mxRectangle(G.x,G.y+(M.y-M.height-1)*V+(0==M.y?G.height:0),G.width,1)))&&(this.selectCellForEvent(G.cell,K.getEvent()),M=this.selectionCellsHandler.getHandler(G.cell), -null!=M&&(ba=mxEvent.CUSTOM_HANDLE-M.customHandles.length+1,M.start(K.getGraphX(),K.getGraphY(),ba),K.consume())),G=this.view.getState(this.model.getParent(G.cell))}}}));this.addMouseListener({mouseDown:function(K,V){},mouseMove:mxUtils.bind(this,function(K,V){K=this.selectionCellsHandler.handlers.map;for(var G in K)if(null!=K[G].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(V.getEvent())){var M=this.tolerance;if(null!=k&&null!=u&&null!=n){if(G=u,Math.abs(k.x- -V.getGraphX())>M||Math.abs(k.y-V.getGraphY())>M){var U=this.selectionCellsHandler.getHandler(G.cell);null==U&&this.model.isEdge(G.cell)&&(U=this.createHandler(G));if(null!=U&&null!=U.bends&&0<U.bends.length){K=U.getHandleForEvent(n);var ba=this.view.getEdgeStyle(G);M=ba==mxEdgeStyle.EntityRelation;r||m!=mxEvent.LABEL_HANDLE||(K=m);if(M&&0!=K&&K!=U.bends.length-1&&K!=mxEvent.LABEL_HANDLE)!M||null==G.visibleSourceState&&null==G.visibleTargetState||(this.graphHandler.reset(),V.consume());else if(K== -mxEvent.LABEL_HANDLE||0==K||null!=G.visibleSourceState||K==U.bends.length-1||null!=G.visibleTargetState)M||K==mxEvent.LABEL_HANDLE||(M=G.absolutePoints,null!=M&&(null==ba&&null==K||ba==mxEdgeStyle.OrthConnector)&&(K=m,null==K&&(K=new mxRectangle(k.x,k.y),K.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(K,M[0].x,M[0].y)?K=0:mxUtils.contains(K,M[M.length-1].x,M[M.length-1].y)?K=U.bends.length-1:null!=ba&&(2==M.length||3==M.length&&(0==Math.round(M[0].x-M[1].x)&&0==Math.round(M[1].x- -M[2].x)||0==Math.round(M[0].y-M[1].y)&&0==Math.round(M[1].y-M[2].y)))?K=2:(K=mxUtils.findNearestSegment(G,k.x,k.y),K=null==ba?mxEvent.VIRTUAL_HANDLE-K:K+1))),null==K&&(K=mxEvent.VIRTUAL_HANDLE)),U.start(V.getGraphX(),V.getGraphX(),K),V.consume(),this.graphHandler.reset()}null!=U&&(this.selectionCellsHandler.isHandlerActive(U)?this.isCellSelected(G.cell)||(this.selectionCellsHandler.handlers.put(G.cell,U),this.selectCellForEvent(G.cell,V.getEvent())):this.isCellSelected(G.cell)||U.destroy());r=!1; -k=n=u=m=null}}else if(G=V.getState(),null!=G&&this.isCellEditable(G.cell)){U=null;if(this.model.isEdge(G.cell)){if(K=new mxRectangle(V.getGraphX(),V.getGraphY()),K.grow(mxEdgeHandler.prototype.handleImage.width/2),M=G.absolutePoints,null!=M)if(null!=G.text&&null!=G.text.boundingBox&&mxUtils.contains(G.text.boundingBox,V.getGraphX(),V.getGraphY()))U="move";else if(mxUtils.contains(K,M[0].x,M[0].y)||mxUtils.contains(K,M[M.length-1].x,M[M.length-1].y))U="pointer";else if(null!=G.visibleSourceState|| -null!=G.visibleTargetState)K=this.view.getEdgeStyle(G),U="crosshair",K!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(G)&&(V=mxUtils.findNearestSegment(G,V.getGraphX(),V.getGraphY()),V<M.length-1&&0<=V&&(U=0==Math.round(M[V].x-M[V+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(V.getEvent())){M=mxShape.prototype.svgStrokeTolerance/2;K=new mxRectangle(V.getGraphX(),V.getGraphY());K.grow(M);if(this.isTableCell(G.cell)&&(V=this.model.getParent(G.cell),M=this.model.getParent(V),!this.isCellSelected(M)))if(mxUtils.intersects(K, -new mxRectangle(G.x,G.y-2,G.width,4))&&this.model.getChildAt(M,0)!=V||mxUtils.intersects(K,new mxRectangle(G.x,G.y+G.height-2,G.width,4)))U="row-resize";else if(mxUtils.intersects(K,new mxRectangle(G.x-2,G.y,4,G.height))&&this.model.getChildAt(V,0)!=G.cell||mxUtils.intersects(K,new mxRectangle(G.x+G.width-2,G.y,4,G.height)))U="col-resize";for(V=G;null==U&&null!=V&&(this.isTableCell(V.cell)||this.isTableRow(V.cell)||this.isTable(V.cell));)this.isSwimlane(V.cell)&&(M=this.getActualStartSize(V.cell), -ba=this.view.scale,(0<M.x||0<M.width)&&mxUtils.intersects(K,new mxRectangle(V.x+(M.x-M.width-1)*ba+(0==M.x?V.width*ba:0),V.y,1,V.height))?U="col-resize":(0<M.y||0<M.height)&&mxUtils.intersects(K,new mxRectangle(V.x,V.y+(M.y-M.height-1)*ba+(0==M.y?V.height:0),V.width,1))&&(U="row-resize")),V=this.view.getState(this.model.getParent(V.cell))}null!=U&&G.setCursor(U)}}}),mouseUp:mxUtils.bind(this,function(K,V){m=k=n=u=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(K){var V= +return null!=K?"1"==K.html||"wrap"==K[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var k=null,n=null,u=null,m=null,r=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(K,V){if("mouseDown"==V.getProperty("eventName")&&this.isEnabled()){K=V.getProperty("event");var O=K.getState();V=this.view.scale;if(!mxEvent.isAltDown(K.getEvent())&&null!=O)if(this.model.isEdge(O.cell))if(k=new mxPoint(K.getGraphX(),K.getGraphY()),r=this.isCellSelected(O.cell),u=O,n=K,null!=O.text&&null!= +O.text.boundingBox&&mxUtils.contains(O.text.boundingBox,K.getGraphX(),K.getGraphY()))m=mxEvent.LABEL_HANDLE;else{var T=this.selectionCellsHandler.getHandler(O.cell);null!=T&&null!=T.bends&&0<T.bends.length&&(m=T.getHandleForEvent(K))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(K.getEvent())&&(T=this.selectionCellsHandler.getHandler(O.cell),null==T||null==T.getHandleForEvent(K))){var J=new mxRectangle(K.getGraphX()-1,K.getGraphY()-1),ba=mxEvent.isTouchEvent(K.getEvent())?mxShape.prototype.svgStrokeTolerance- +1:(mxShape.prototype.svgStrokeTolerance+2)/2;T=ba+2;J.grow(ba);if(this.isTableCell(O.cell)&&!this.isCellSelected(O.cell)&&!(mxUtils.contains(O,K.getGraphX()-T,K.getGraphY()-T)&&mxUtils.contains(O,K.getGraphX()-T,K.getGraphY()+T)&&mxUtils.contains(O,K.getGraphX()+T,K.getGraphY()+T)&&mxUtils.contains(O,K.getGraphX()+T,K.getGraphY()-T))){var ha=this.model.getParent(O.cell);T=this.model.getParent(ha);if(!this.isCellSelected(T)){ba*=V;var na=2*ba;if(this.model.getChildAt(T,0)!=ha&&mxUtils.intersects(J, +new mxRectangle(O.x,O.y-ba,O.width,na))||this.model.getChildAt(ha,0)!=O.cell&&mxUtils.intersects(J,new mxRectangle(O.x-ba,O.y,na,O.height))||mxUtils.intersects(J,new mxRectangle(O.x,O.y+O.height-ba,O.width,na))||mxUtils.intersects(J,new mxRectangle(O.x+O.width-ba,O.y,na,O.height)))ha=this.selectionCellsHandler.isHandled(T),this.selectCellForEvent(T,K.getEvent()),T=this.selectionCellsHandler.getHandler(T),null!=T&&(ba=T.getHandleForEvent(K),null!=ba&&(T.start(K.getGraphX(),K.getGraphY(),ba),T.blockDelayedSelection= +!ha,K.consume()))}}for(;!K.isConsumed()&&null!=O&&(this.isTableCell(O.cell)||this.isTableRow(O.cell)||this.isTable(O.cell));)this.isSwimlane(O.cell)&&(T=this.getActualStartSize(O.cell),(0<T.x||0<T.width)&&mxUtils.intersects(J,new mxRectangle(O.x+(T.x-T.width-1)*V+(0==T.x?O.width:0),O.y,1,O.height))||(0<T.y||0<T.height)&&mxUtils.intersects(J,new mxRectangle(O.x,O.y+(T.y-T.height-1)*V+(0==T.y?O.height:0),O.width,1)))&&(this.selectCellForEvent(O.cell,K.getEvent()),T=this.selectionCellsHandler.getHandler(O.cell), +null!=T&&(ba=mxEvent.CUSTOM_HANDLE-T.customHandles.length+1,T.start(K.getGraphX(),K.getGraphY(),ba),K.consume())),O=this.view.getState(this.model.getParent(O.cell))}}}));this.addMouseListener({mouseDown:function(K,V){},mouseMove:mxUtils.bind(this,function(K,V){K=this.selectionCellsHandler.handlers.map;for(var O in K)if(null!=K[O].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(V.getEvent())){var T=this.tolerance;if(null!=k&&null!=u&&null!=n){if(O=u,Math.abs(k.x- +V.getGraphX())>T||Math.abs(k.y-V.getGraphY())>T){var J=this.selectionCellsHandler.getHandler(O.cell);null==J&&this.model.isEdge(O.cell)&&(J=this.createHandler(O));if(null!=J&&null!=J.bends&&0<J.bends.length){K=J.getHandleForEvent(n);var ba=this.view.getEdgeStyle(O);T=ba==mxEdgeStyle.EntityRelation;r||m!=mxEvent.LABEL_HANDLE||(K=m);if(T&&0!=K&&K!=J.bends.length-1&&K!=mxEvent.LABEL_HANDLE)!T||null==O.visibleSourceState&&null==O.visibleTargetState||(this.graphHandler.reset(),V.consume());else if(K== +mxEvent.LABEL_HANDLE||0==K||null!=O.visibleSourceState||K==J.bends.length-1||null!=O.visibleTargetState)T||K==mxEvent.LABEL_HANDLE||(T=O.absolutePoints,null!=T&&(null==ba&&null==K||ba==mxEdgeStyle.OrthConnector)&&(K=m,null==K&&(K=new mxRectangle(k.x,k.y),K.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(K,T[0].x,T[0].y)?K=0:mxUtils.contains(K,T[T.length-1].x,T[T.length-1].y)?K=J.bends.length-1:null!=ba&&(2==T.length||3==T.length&&(0==Math.round(T[0].x-T[1].x)&&0==Math.round(T[1].x- +T[2].x)||0==Math.round(T[0].y-T[1].y)&&0==Math.round(T[1].y-T[2].y)))?K=2:(K=mxUtils.findNearestSegment(O,k.x,k.y),K=null==ba?mxEvent.VIRTUAL_HANDLE-K:K+1))),null==K&&(K=mxEvent.VIRTUAL_HANDLE)),J.start(V.getGraphX(),V.getGraphX(),K),V.consume(),this.graphHandler.reset()}null!=J&&(this.selectionCellsHandler.isHandlerActive(J)?this.isCellSelected(O.cell)||(this.selectionCellsHandler.handlers.put(O.cell,J),this.selectCellForEvent(O.cell,V.getEvent())):this.isCellSelected(O.cell)||J.destroy());r=!1; +k=n=u=m=null}}else if(O=V.getState(),null!=O&&this.isCellEditable(O.cell)){J=null;if(this.model.isEdge(O.cell)){if(K=new mxRectangle(V.getGraphX(),V.getGraphY()),K.grow(mxEdgeHandler.prototype.handleImage.width/2),T=O.absolutePoints,null!=T)if(null!=O.text&&null!=O.text.boundingBox&&mxUtils.contains(O.text.boundingBox,V.getGraphX(),V.getGraphY()))J="move";else if(mxUtils.contains(K,T[0].x,T[0].y)||mxUtils.contains(K,T[T.length-1].x,T[T.length-1].y))J="pointer";else if(null!=O.visibleSourceState|| +null!=O.visibleTargetState)K=this.view.getEdgeStyle(O),J="crosshair",K!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(O)&&(V=mxUtils.findNearestSegment(O,V.getGraphX(),V.getGraphY()),V<T.length-1&&0<=V&&(J=0==Math.round(T[V].x-T[V+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(V.getEvent())){T=mxShape.prototype.svgStrokeTolerance/2;K=new mxRectangle(V.getGraphX(),V.getGraphY());K.grow(T);if(this.isTableCell(O.cell)&&(V=this.model.getParent(O.cell),T=this.model.getParent(V),!this.isCellSelected(T)))if(mxUtils.intersects(K, +new mxRectangle(O.x,O.y-2,O.width,4))&&this.model.getChildAt(T,0)!=V||mxUtils.intersects(K,new mxRectangle(O.x,O.y+O.height-2,O.width,4)))J="row-resize";else if(mxUtils.intersects(K,new mxRectangle(O.x-2,O.y,4,O.height))&&this.model.getChildAt(V,0)!=O.cell||mxUtils.intersects(K,new mxRectangle(O.x+O.width-2,O.y,4,O.height)))J="col-resize";for(V=O;null==J&&null!=V&&(this.isTableCell(V.cell)||this.isTableRow(V.cell)||this.isTable(V.cell));)this.isSwimlane(V.cell)&&(T=this.getActualStartSize(V.cell), +ba=this.view.scale,(0<T.x||0<T.width)&&mxUtils.intersects(K,new mxRectangle(V.x+(T.x-T.width-1)*ba+(0==T.x?V.width*ba:0),V.y,1,V.height))?J="col-resize":(0<T.y||0<T.height)&&mxUtils.intersects(K,new mxRectangle(V.x,V.y+(T.y-T.height-1)*ba+(0==T.y?V.height:0),V.width,1))&&(J="row-resize")),V=this.view.getState(this.model.getParent(V.cell))}null!=J&&O.setCursor(J)}}}),mouseUp:mxUtils.bind(this,function(K,V){m=k=n=u=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(K){var V= mxCellRenderer.prototype.getLabelValue.apply(this,arguments);K.view.graph.isHtmlLabel(K.cell)&&(V=1!=K.style.html?mxUtils.htmlEntities(V,!1):K.view.graph.sanitizeHtml(V));return V};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid= -!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(K,V){return!1};this.alternateEdgeStyle="vertical";null==e&&this.loadStylesheet();var x=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var K=x.apply(this,arguments);if(this.graph.pageVisible){var V=[],G=this.graph.pageFormat,M=this.graph.pageScale,U=G.width*M;G=G.height*M;M=this.graph.view.translate;for(var ba=this.graph.view.scale,la= -this.graph.getPageLayout(),ra=0;ra<la.width;ra++)V.push(new mxRectangle(((la.x+ra)*U+M.x)*ba,(la.y*G+M.y)*ba,U*ba,G*ba));for(ra=1;ra<la.height;ra++)V.push(new mxRectangle((la.x*U+M.x)*ba,((la.y+ra)*G+M.y)*ba,U*ba,G*ba));K=V.concat(K)}return K};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(K,V){return null==K.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(K){this.previewColor="#000000"==this.graph.background? -"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var B=this.graphHandler.getCells;this.graphHandler.getCells=function(K){for(var V=B.apply(this,arguments),G=new mxDictionary,M=[],U=0;U<V.length;U++){var ba=this.graph.isTableCell(K)&&this.graph.isTableCell(V[U])&&this.graph.isCellSelected(V[U])?this.graph.model.getParent(V[U]):this.graph.isTableRow(K)&&this.graph.isTableRow(V[U])&&this.graph.isCellSelected(V[U])?V[U]:this.graph.getCompositeParent(V[U]); -null==ba||G.get(ba)||(G.put(ba,!0),M.push(ba))}return M};var D=this.graphHandler.start;this.graphHandler.start=function(K,V,G,M){var U=!1;this.graph.isTableCell(K)&&(this.graph.isCellSelected(K)?U=!0:K=this.graph.model.getParent(K));U||this.graph.isTableRow(K)&&this.graph.isCellSelected(K)||(K=this.graph.getCompositeParent(K));D.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(K,V){V=this.graph.getCompositeParent(V);return mxConnectionHandler.prototype.createTargetVertex.apply(this, -arguments)};var F=new mxRubberband(this);this.getRubberband=function(){return F};var J=(new Date).getTime(),C=0,O=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var K=this.currentState;O.apply(this,arguments);K!=this.currentState?(J=(new Date).getTime(),C=0):C=(new Date).getTime()-J};var R=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(K){return mxEvent.isShiftDown(K.getEvent())&&mxEvent.isAltDown(K.getEvent())?!1:null!= -this.currentState&&K.getState()==this.currentState&&2E3<C||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&R.apply(this,arguments)};var T=this.isToggleEvent;this.isToggleEvent=function(K){return T.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(K)};var Q=F.isForceRubberbandEvent;F.isForceRubberbandEvent=function(K){return Q.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(K.getEvent())||mxUtils.hasScrollbars(this.graph.container)&& +!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(K,V){return!1};this.alternateEdgeStyle="vertical";null==e&&this.loadStylesheet();var x=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var K=x.apply(this,arguments);if(this.graph.pageVisible){var V=[],O=this.graph.pageFormat,T=this.graph.pageScale,J=O.width*T;O=O.height*T;T=this.graph.view.translate;for(var ba=this.graph.view.scale,ha= +this.graph.getPageLayout(),na=0;na<ha.width;na++)V.push(new mxRectangle(((ha.x+na)*J+T.x)*ba,(ha.y*O+T.y)*ba,J*ba,O*ba));for(na=1;na<ha.height;na++)V.push(new mxRectangle((ha.x*J+T.x)*ba,((ha.y+na)*O+T.y)*ba,J*ba,O*ba));K=V.concat(K)}return K};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(K,V){return null==K.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(K){this.previewColor="#000000"==this.graph.background? +"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var B=this.graphHandler.getCells;this.graphHandler.getCells=function(K){for(var V=B.apply(this,arguments),O=new mxDictionary,T=[],J=0;J<V.length;J++){var ba=this.graph.isTableCell(K)&&this.graph.isTableCell(V[J])&&this.graph.isCellSelected(V[J])?this.graph.model.getParent(V[J]):this.graph.isTableRow(K)&&this.graph.isTableRow(V[J])&&this.graph.isCellSelected(V[J])?V[J]:this.graph.getCompositeParent(V[J]); +null==ba||O.get(ba)||(O.put(ba,!0),T.push(ba))}return T};var D=this.graphHandler.start;this.graphHandler.start=function(K,V,O,T){var J=!1;this.graph.isTableCell(K)&&(this.graph.isCellSelected(K)?J=!0:K=this.graph.model.getParent(K));J||this.graph.isTableRow(K)&&this.graph.isCellSelected(K)||(K=this.graph.getCompositeParent(K));D.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(K,V){V=this.graph.getCompositeParent(V);return mxConnectionHandler.prototype.createTargetVertex.apply(this, +arguments)};var F=new mxRubberband(this);this.getRubberband=function(){return F};var I=(new Date).getTime(),C=0,N=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var K=this.currentState;N.apply(this,arguments);K!=this.currentState?(I=(new Date).getTime(),C=0):C=(new Date).getTime()-I};var R=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(K){return mxEvent.isShiftDown(K.getEvent())&&mxEvent.isAltDown(K.getEvent())?!1:null!= +this.currentState&&K.getState()==this.currentState&&2E3<C||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&R.apply(this,arguments)};var S=this.isToggleEvent;this.isToggleEvent=function(K){return S.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(K)};var Q=F.isForceRubberbandEvent;F.isForceRubberbandEvent=function(K){return Q.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(K.getEvent())||mxUtils.hasScrollbars(this.graph.container)&& mxClient.IS_FF&&mxClient.IS_WIN&&null==K.getState()&&mxEvent.isTouchEvent(K.getEvent())};var aa=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(aa=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=aa)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(K){return mxEvent.isMouseEvent(K.getEvent())}; -var S=this.click;this.click=function(K){var V=null==K.state&&null!=K.sourceState&&this.isCellLocked(K.sourceState.cell);if(this.isEnabled()&&!V||K.isConsumed())return S.apply(this,arguments);var G=V?K.sourceState.cell:K.getCell();null!=G&&(G=this.getClickableLinkForCell(G),null!=G&&(this.isCustomLink(G)?this.customLinkClicked(G):this.openLink(G)));this.isEnabled()&&V&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(K){return K.sourceState};var P=this.tooltipHandler.show;this.tooltipHandler.show= -function(){P.apply(this,arguments);if(null!=this.div)for(var K=this.div.getElementsByTagName("a"),V=0;V<K.length;V++)null!=K[V].getAttribute("href")&&null==K[V].getAttribute("target")&&K[V].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(K){return K.sourceState};this.getCursorForMouseEvent=function(K){var V=null==K.state&&null!=K.sourceState&&this.isCellLocked(K.sourceState.cell);return this.getCursorForCell(V?K.sourceState.cell:K.getCell())};var X=this.getCursorForCell; -this.getCursorForCell=function(K){if(!this.isEnabled()||this.isCellLocked(K)){if(null!=this.getClickableLinkForCell(K))return"pointer";if(this.isCellLocked(K))return"default"}return X.apply(this,arguments)};this.selectRegion=function(K,V){var G=mxEvent.isAltDown(V)?K:null;K=this.getCells(K.x,K.y,K.width,K.height,null,null,G,function(M){return"1"==mxUtils.getValue(M.style,"locked","0")},!0);if(this.isToggleEvent(V))for(G=0;G<K.length;G++)this.selectCellForEvent(K[G],V);else this.selectCellsForEvent(K, -V);return K};var ha=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(K,V,G){return this.graph.isCellSelected(K)?!1:ha.apply(this,arguments)};this.isCellLocked=function(K){for(;null!=K;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(K),"locked","0"))return!0;K=this.model.getParent(K)}return!1};var fa=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(K,V){"mouseDown"==V.getProperty("eventName")&&(K=V.getProperty("event").getState(), -fa=null==K||this.isSelectionEmpty()||this.isCellSelected(K.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(K,V){if(!mxEvent.isMultiTouchEvent(V)){K=V.getProperty("event");var G=V.getProperty("cell");null==G?(K=mxUtils.convertPoint(this.container,mxEvent.getClientX(K),mxEvent.getClientY(K)),F.start(K.x,K.y)):null!=fa?this.addSelectionCells(fa):1<this.getSelectionCount()&&this.isCellSelected(G)&&this.removeSelectionCell(G);fa=null;V.consume()}})); -this.connectionHandler.selectCells=function(K,V){this.graph.setSelectionCell(V||K)};this.connectionHandler.constraintHandler.isStateIgnored=function(K,V){var G=K.view.graph;return V&&(G.isCellSelected(K.cell)||G.isTableRow(K.cell)&&G.selectionCellsHandler.isHandled(G.model.getParent(K.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var K=this.connectionHandler.constraintHandler;null!=K.currentFocus&&K.isStateIgnored(K.currentFocus,!0)&&(K.currentFocus=null,K.constraints= -null,K.destroyIcons());K.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var sa=this.updateMouseEvent;this.updateMouseEvent=function(K){K=sa.apply(this,arguments);null!=K.state&&this.isCellLocked(K.getCell())&&(K.state=null);return K}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch; +var U=this.click;this.click=function(K){var V=null==K.state&&null!=K.sourceState&&this.isCellLocked(K.sourceState.cell);if(this.isEnabled()&&!V||K.isConsumed())return U.apply(this,arguments);var O=V?K.sourceState.cell:K.getCell();null!=O&&(O=this.getClickableLinkForCell(O),null!=O&&(this.isCustomLink(O)?this.customLinkClicked(O):this.openLink(O)));this.isEnabled()&&V&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(K){return K.sourceState};var P=this.tooltipHandler.show;this.tooltipHandler.show= +function(){P.apply(this,arguments);if(null!=this.div)for(var K=this.div.getElementsByTagName("a"),V=0;V<K.length;V++)null!=K[V].getAttribute("href")&&null==K[V].getAttribute("target")&&K[V].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(K){return K.sourceState};this.getCursorForMouseEvent=function(K){var V=null==K.state&&null!=K.sourceState&&this.isCellLocked(K.sourceState.cell);return this.getCursorForCell(V?K.sourceState.cell:K.getCell())};var Y=this.getCursorForCell; +this.getCursorForCell=function(K){if(!this.isEnabled()||this.isCellLocked(K)){if(null!=this.getClickableLinkForCell(K))return"pointer";if(this.isCellLocked(K))return"default"}return Y.apply(this,arguments)};this.selectRegion=function(K,V){var O=mxEvent.isAltDown(V)?K:null;K=this.getCells(K.x,K.y,K.width,K.height,null,null,O,function(T){return"1"==mxUtils.getValue(T.style,"locked","0")},!0);if(this.isToggleEvent(V))for(O=0;O<K.length;O++)this.selectCellForEvent(K[O],V);else this.selectCellsForEvent(K, +V);return K};var ja=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(K,V,O){return this.graph.isCellSelected(K)?!1:ja.apply(this,arguments)};this.isCellLocked=function(K){for(;null!=K;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(K),"locked","0"))return!0;K=this.model.getParent(K)}return!1};var fa=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(K,V){"mouseDown"==V.getProperty("eventName")&&(K=V.getProperty("event").getState(), +fa=null==K||this.isSelectionEmpty()||this.isCellSelected(K.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(K,V){if(!mxEvent.isMultiTouchEvent(V)){K=V.getProperty("event");var O=V.getProperty("cell");null==O?(K=mxUtils.convertPoint(this.container,mxEvent.getClientX(K),mxEvent.getClientY(K)),F.start(K.x,K.y)):null!=fa?this.addSelectionCells(fa):1<this.getSelectionCount()&&this.isCellSelected(O)&&this.removeSelectionCell(O);fa=null;V.consume()}})); +this.connectionHandler.selectCells=function(K,V){this.graph.setSelectionCell(V||K)};this.connectionHandler.constraintHandler.isStateIgnored=function(K,V){var O=K.view.graph;return V&&(O.isCellSelected(K.cell)||O.isTableRow(K.cell)&&O.selectionCellsHandler.isHandled(O.model.getParent(K.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var K=this.connectionHandler.constraintHandler;null!=K.currentFocus&&K.isStateIgnored(K.currentFocus,!0)&&(K.currentFocus=null,K.constraints= +null,K.destroyIcons());K.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var ra=this.updateMouseEvent;this.updateMouseEvent=function(K){K=ra.apply(this,arguments);null!=K.state&&this.isCellLocked(K.getCell())&&(K.state=null);return K}}this.currentTranslate=new mxPoint(0,0)};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);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display"; Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than diagrams.net --\x3e";Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSource fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" "); Graph.layoutNames="mxHierarchicalLayout mxCircleLayout mxCompactTreeLayout mxEdgeLabelLayout mxFastOrganicLayout mxParallelEdgeLayout mxPartitionLayout mxRadialTreeLayout mxStackLayout".split(" "); @@ -2574,7 +2572,7 @@ Graph.arrayBufferIndexOfString=function(a,b,f){var e=b.charCodeAt(0),g=1,d=-1;fo Graph.decompress=function(a,b,f){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=Graph.stringToArrayBuffer(atob(a));b=decodeURIComponent(b?pako.inflate(a,{to:"string"}):pako.inflateRaw(a,{to:"string"}));return f?b:Graph.zapGremlins(b)}; Graph.fadeNodes=function(a,b,f,e,g){g=null!=g?g:1E3;Graph.setTransitionForNodes(a,null);Graph.setOpacityForNodes(a,b);window.setTimeout(function(){Graph.setTransitionForNodes(a,"all "+g+"ms ease-in-out");Graph.setOpacityForNodes(a,f);window.setTimeout(function(){Graph.setTransitionForNodes(a,null);null!=e&&e()},g)},0)};Graph.removeKeys=function(a,b){for(var f in a)b(f)&&delete a[f]}; Graph.setTransitionForNodes=function(a,b){for(var f=0;f<a.length;f++)mxUtils.setPrefixedStyle(a[f].style,"transition",b)};Graph.setOpacityForNodes=function(a,b){for(var f=0;f<a.length;f++)a[f].style.opacity=b};Graph.removePasteFormatting=function(a){for(;null!=a;)null!=a.firstChild&&Graph.removePasteFormatting(a.firstChild),a.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=a.style&&(a.style.whiteSpace="","#000000"==a.style.color&&(a.style.color="")),a=a.nextSibling}; -Graph.sanitizeHtml=function(a,b){return Graph.domPurify(a,!1)};Graph.sanitizeLink=function(a){var b=document.createElement("a");b.setAttribute("href",a);Graph.sanitizeNode(b);return b.getAttribute("href")};Graph.sanitizeNode=function(a){return Graph.domPurify(a,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(a){"use"==a.nodeName&&a.hasAttribute("xlink:href")&&!a.getAttribute("xlink:href").match(/^#/)&&a.remove()}); +Graph.sanitizeHtml=function(a,b){return Graph.domPurify(a,!1)};Graph.sanitizeLink=function(a){var b=document.createElement("a");b.setAttribute("href",a);Graph.sanitizeNode(b);return b.getAttribute("href")};Graph.sanitizeNode=function(a){return Graph.domPurify(a,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(a){"use"==a.nodeName&&(null!=a.getAttribute("xlink:href")&&!a.getAttribute("xlink:href").startsWith("#")||null!=a.getAttribute("href")&&!a.getAttribute("href").startsWith("#"))&&a.remove()}); Graph.domPurify=function(a,b){window.DOM_PURIFY_CONFIG.IN_PLACE=b;return DOMPurify.sanitize(a,window.DOM_PURIFY_CONFIG)}; Graph.clipSvgDataUri=function(a,b){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=a&&"data:image/svg+xml;base64,"==a.substring(0,26))try{var f=document.createElement("div");f.style.position="absolute";f.style.visibility="hidden";var e=decodeURIComponent(escape(atob(a.substring(26)))),g=e.indexOf("<svg");if(0<=g){f.innerHTML=Graph.sanitizeHtml(e.substring(g));var d=f.getElementsByTagName("svg");if(0<d.length){if(b||null!=d[0].getAttribute("preserveAspectRatio")){document.body.appendChild(f);try{e=b= 1;var k=d[0].getAttribute("width"),n=d[0].getAttribute("height");k=null!=k&&"%"!=k.charAt(k.length-1)?parseFloat(k):NaN;n=null!=n&&"%"!=n.charAt(n.length-1)?parseFloat(n):NaN;var u=d[0].getAttribute("viewBox");if(null!=u&&!isNaN(k)&&!isNaN(n)){var m=u.split(" ");4<=u.length&&(b=parseFloat(m[2])/k,e=parseFloat(m[3])/n)}var r=d[0].getBBox();0<r.width&&0<r.height&&(f.getElementsByTagName("svg")[0].setAttribute("viewBox",r.x+" "+r.y+" "+r.width+" "+r.height),f.getElementsByTagName("svg")[0].setAttribute("width", @@ -2630,10 +2628,10 @@ Graph.prototype.getLabel=function(a){var b=mxGraph.prototype.getLabel.apply(this Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(a){this.defaultParent=a;this.fireEvent(new mxEventObject("defaultParentChanged"))};Graph.prototype.getClickableLinkForCell=function(a){do{var b=this.getLinkForCell(a);if(null!=b)return b;a=this.model.getParent(a)}while(null!=a);return null}; Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b}; Graph.prototype.formatDate=function(a,b,f){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy", -shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var e=this.dateFormatCache,g=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,d=/[^-+\dA-Z]/g,k=function(O,R){O=String(O);for(R=R||2;O.length<R;)O="0"+O;return O};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)|| -/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(e.masks[b]||b||e.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),f=!0);var n=f?"getUTC":"get",u=a[n+"Date"](),m=a[n+"Day"](),r=a[n+"Month"](),x=a[n+"FullYear"](),B=a[n+"Hours"](),D=a[n+"Minutes"](),F=a[n+"Seconds"]();n=a[n+"Milliseconds"]();var J=f?0:a.getTimezoneOffset(),C={d:u,dd:k(u),ddd:e.i18n.dayNames[m],dddd:e.i18n.dayNames[m+7],m:r+1,mm:k(r+1),mmm:e.i18n.monthNames[r],mmmm:e.i18n.monthNames[r+ -12],yy:String(x).slice(2),yyyy:x,h:B%12||12,hh:k(B%12||12),H:B,HH:k(B),M:D,MM:k(D),s:F,ss:k(F),l:k(n,3),L:k(99<n?Math.round(n/10):n),t:12>B?"a":"p",tt:12>B?"am":"pm",T:12>B?"A":"P",TT:12>B?"AM":"PM",Z:f?"UTC":(String(a).match(g)||[""]).pop().replace(d,""),o:(0<J?"-":"+")+k(100*Math.floor(Math.abs(J)/60)+Math.abs(J)%60,4),S:["th","st","nd","rd"][3<u%10?0:(10!=u%100-u%10)*u%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(O){return O in C?C[O]:O.slice(1, -O.length-1)})};Graph.prototype.getLayerForCells=function(a){var b=null;if(0<a.length){for(b=a[0];!this.model.isLayer(b);)b=this.model.getParent(b);for(var f=1;f<a.length;f++)if(!this.model.isAncestor(b,a[f])){b=null;break}}return b}; +shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var e=this.dateFormatCache,g=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,d=/[^-+\dA-Z]/g,k=function(N,R){N=String(N);for(R=R||2;N.length<R;)N="0"+N;return N};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)|| +/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(e.masks[b]||b||e.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),f=!0);var n=f?"getUTC":"get",u=a[n+"Date"](),m=a[n+"Day"](),r=a[n+"Month"](),x=a[n+"FullYear"](),B=a[n+"Hours"](),D=a[n+"Minutes"](),F=a[n+"Seconds"]();n=a[n+"Milliseconds"]();var I=f?0:a.getTimezoneOffset(),C={d:u,dd:k(u),ddd:e.i18n.dayNames[m],dddd:e.i18n.dayNames[m+7],m:r+1,mm:k(r+1),mmm:e.i18n.monthNames[r],mmmm:e.i18n.monthNames[r+ +12],yy:String(x).slice(2),yyyy:x,h:B%12||12,hh:k(B%12||12),H:B,HH:k(B),M:D,MM:k(D),s:F,ss:k(F),l:k(n,3),L:k(99<n?Math.round(n/10):n),t:12>B?"a":"p",tt:12>B?"am":"pm",T:12>B?"A":"P",TT:12>B?"AM":"PM",Z:f?"UTC":(String(a).match(g)||[""]).pop().replace(d,""),o:(0<I?"-":"+")+k(100*Math.floor(Math.abs(I)/60)+Math.abs(I)%60,4),S:["th","st","nd","rd"][3<u%10?0:(10!=u%100-u%10)*u%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(N){return N in C?C[N]:N.slice(1, +N.length-1)})};Graph.prototype.getLayerForCells=function(a){var b=null;if(0<a.length){for(b=a[0];!this.model.isLayer(b);)b=this.model.getParent(b);for(var f=1;f<a.length;f++)if(!this.model.isAncestor(b,a[f])){b=null;break}}return b}; Graph.prototype.createLayersDialog=function(a,b){var f=document.createElement("div");f.style.position="absolute";for(var e=this.getModel(),g=e.getChildCount(e.root),d=0;d<g;d++)mxUtils.bind(this,function(k){function n(){e.isVisible(k)?(r.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(m,75)):(r.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(m,25))}var u=this.convertValueToString(k)||mxResources.get("background")||"Background",m=document.createElement("div");m.style.overflow= "hidden";m.style.textOverflow="ellipsis";m.style.padding="2px";m.style.whiteSpace="nowrap";m.style.cursor="pointer";m.setAttribute("title",mxResources.get(e.isVisible(k)?"hideIt":"show",[u]));var r=document.createElement("img");r.setAttribute("draggable","false");r.setAttribute("align","absmiddle");r.setAttribute("border","0");r.style.position="relative";r.style.width="16px";r.style.padding="0px 6px 0 4px";b&&(r.style.filter="invert(100%)",r.style.top="-2px");m.appendChild(r);mxUtils.write(m,u);f.appendChild(m); mxEvent.addListener(m,"click",function(){e.setVisible(k,!e.isVisible(k));n();null!=a&&a(k)});n()})(e.getChildAt(e.root,d));return f}; @@ -2647,11 +2645,11 @@ g)}}}finally{this.getModel().endUpdate()}};Graph.prototype.selectCellsForConnect Graph.prototype.isCloneConnectSource=function(a){var b=null;null!=this.layoutManager&&(b=this.layoutManager.getLayout(this.model.getParent(a)));return this.isTableRow(a)||this.isTableCell(a)||null!=b&&b.constructor==mxStackLayout}; Graph.prototype.connectVertex=function(a,b,f,e,g,d,k,n){d=d?d:!1;if(a.geometry.relative&&this.model.isEdge(a.parent))return[];for(;a.geometry.relative&&this.model.isVertex(a.parent);)a=a.parent;var u=this.isCloneConnectSource(a),m=u?a:this.getCompositeParent(a),r=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(m.geometry.x,m.geometry.y);b==mxConstants.DIRECTION_NORTH?(r.x+=m.geometry.width/2,r.y-=f):b== mxConstants.DIRECTION_SOUTH?(r.x+=m.geometry.width/2,r.y+=m.geometry.height+f):(r.x=b==mxConstants.DIRECTION_WEST?r.x-f:r.x+(m.geometry.width+f),r.y+=m.geometry.height/2);var x=this.view.getState(this.model.getParent(a));f=this.view.scale;var B=this.view.translate;m=B.x*f;B=B.y*f;null!=x&&this.model.isVertex(x.cell)&&(m=x.x,B=x.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(r.x+=a.parent.geometry.x,r.y+=a.parent.geometry.y);d=d?null:(new mxRectangle(m+r.x*f,B+r.y*f)).grow(40*f);d=null!=d? -this.getCells(0,0,0,0,null,null,d,null,!0):null;x=this.view.getState(a);var D=null,F=null;if(null!=d){d=d.reverse();for(var J=0;J<d.length;J++)if(!this.isCellLocked(d[J])&&!this.model.isEdge(d[J])&&d[J]!=a)if(!this.model.isAncestor(a,d[J])&&this.isContainer(d[J])&&(null==D||d[J]==this.model.getParent(a)))D=d[J];else if(null==F&&this.isCellConnectable(d[J])&&!this.model.isAncestor(d[J],a)&&!this.isSwimlane(d[J])){var C=this.view.getState(d[J]);null==x||null==C||mxUtils.intersects(x,C)||(F=d[J])}}var O= -!mxEvent.isShiftDown(e)||mxEvent.isControlDown(e)||g;O&&("1"!=urlParams.sketch||g)&&(b==mxConstants.DIRECTION_NORTH?r.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?r.y+=a.geometry.height/2:r.x=b==mxConstants.DIRECTION_WEST?r.x-a.geometry.width/2:r.x+a.geometry.width/2);var R=[],T=F;F=D;g=mxUtils.bind(this,function(Q){if(null==k||null!=Q||null==F&&u){this.model.beginUpdate();try{if(null==T&&O){var aa=this.getAbsoluteParent(null!=Q?Q:a);aa=u?a:this.getCompositeParent(aa);T=null!=Q?Q:this.duplicateCells([aa], -!1)[0];null!=Q&&this.addCells([T],this.model.getParent(a),null,null,null,!0);var S=this.getCellGeometry(T);null!=S&&(null!=Q&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?r.y-=S.height/2:b==mxConstants.DIRECTION_SOUTH?r.y+=S.height/2:r.x=b==mxConstants.DIRECTION_WEST?r.x-S.width/2:r.x+S.width/2),S.x=r.x-S.width/2,S.y=r.y-S.height/2);null!=D?(this.addCells([T],D,null,null,null,!0),F=null):O&&!u&&this.addCells([T],this.getDefaultParent(),null,null,null,!0)}var P=mxEvent.isControlDown(e)&& -mxEvent.isShiftDown(e)&&O||null==F&&u?null:this.insertEdge(this.model.getParent(a),null,"",a,T,this.createCurrentEdgeStyle());if(null!=P&&this.connectionHandler.insertBeforeSource){var X=null;for(Q=a;null!=Q.parent&&null!=Q.geometry&&Q.geometry.relative&&Q.parent!=P.parent;)Q=this.model.getParent(Q);null!=Q&&null!=Q.parent&&Q.parent==P.parent&&(X=Q.parent.getIndex(Q),this.model.add(Q.parent,P,X))}null==F&&null!=T&&null!=a.parent&&u&&b==mxConstants.DIRECTION_WEST&&(X=a.parent.getIndex(a),this.model.add(a.parent, -T,X));null!=P&&R.push(P);null==F&&null!=T&&R.push(T);null==T&&null!=P&&P.geometry.setTerminalPoint(r,!1);null!=P&&this.fireEvent(new mxEventObject("cellsInserted","cells",[P]))}finally{this.model.endUpdate()}}if(null!=n)n(R);else return R});if(null==k||null!=T||!O||null==F&&u)return g(T);k(m+r.x*f,B+r.y*f,g)}; +this.getCells(0,0,0,0,null,null,d,null,!0):null;x=this.view.getState(a);var D=null,F=null;if(null!=d){d=d.reverse();for(var I=0;I<d.length;I++)if(!this.isCellLocked(d[I])&&!this.model.isEdge(d[I])&&d[I]!=a)if(!this.model.isAncestor(a,d[I])&&this.isContainer(d[I])&&(null==D||d[I]==this.model.getParent(a)))D=d[I];else if(null==F&&this.isCellConnectable(d[I])&&!this.model.isAncestor(d[I],a)&&!this.isSwimlane(d[I])){var C=this.view.getState(d[I]);null==x||null==C||mxUtils.intersects(x,C)||(F=d[I])}}var N= +!mxEvent.isShiftDown(e)||mxEvent.isControlDown(e)||g;N&&("1"!=urlParams.sketch||g)&&(b==mxConstants.DIRECTION_NORTH?r.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?r.y+=a.geometry.height/2:r.x=b==mxConstants.DIRECTION_WEST?r.x-a.geometry.width/2:r.x+a.geometry.width/2);var R=[],S=F;F=D;g=mxUtils.bind(this,function(Q){if(null==k||null!=Q||null==F&&u){this.model.beginUpdate();try{if(null==S&&N){var aa=this.getAbsoluteParent(null!=Q?Q:a);aa=u?a:this.getCompositeParent(aa);S=null!=Q?Q:this.duplicateCells([aa], +!1)[0];null!=Q&&this.addCells([S],this.model.getParent(a),null,null,null,!0);var U=this.getCellGeometry(S);null!=U&&(null!=Q&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?r.y-=U.height/2:b==mxConstants.DIRECTION_SOUTH?r.y+=U.height/2:r.x=b==mxConstants.DIRECTION_WEST?r.x-U.width/2:r.x+U.width/2),U.x=r.x-U.width/2,U.y=r.y-U.height/2);null!=D?(this.addCells([S],D,null,null,null,!0),F=null):N&&!u&&this.addCells([S],this.getDefaultParent(),null,null,null,!0)}var P=mxEvent.isControlDown(e)&& +mxEvent.isShiftDown(e)&&N||null==F&&u?null:this.insertEdge(this.model.getParent(a),null,"",a,S,this.createCurrentEdgeStyle());if(null!=P&&this.connectionHandler.insertBeforeSource){var Y=null;for(Q=a;null!=Q.parent&&null!=Q.geometry&&Q.geometry.relative&&Q.parent!=P.parent;)Q=this.model.getParent(Q);null!=Q&&null!=Q.parent&&Q.parent==P.parent&&(Y=Q.parent.getIndex(Q),this.model.add(Q.parent,P,Y))}null==F&&null!=S&&null!=a.parent&&u&&b==mxConstants.DIRECTION_WEST&&(Y=a.parent.getIndex(a),this.model.add(a.parent, +S,Y));null!=P&&R.push(P);null==F&&null!=S&&R.push(S);null==S&&null!=P&&P.geometry.setTerminalPoint(r,!1);null!=P&&this.fireEvent(new mxEventObject("cellsInserted","cells",[P]))}finally{this.model.endUpdate()}}if(null!=n)n(R);else return R});if(null==k||null!=S||!N||null==F&&u)return g(S);k(m+r.x*f,B+r.y*f,g)}; Graph.prototype.getIndexableText=function(a){a=null!=a?a:this.model.getDescendants(this.model.root);for(var b=document.createElement("div"),f=[],e,g=0;g<a.length;g++)if(e=a[g],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(b.innerHTML=this.sanitizeHtml(this.getLabel(e)),e=mxUtils.extractTextWithWhitespace([b])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&f.push(e);return f.join(" ")}; Graph.prototype.convertValueToString=function(a){var b=this.model.getValue(a);if(null!=b&&"object"==typeof b){var f=null;if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){b=a.getAttribute("placeholder");for(var e=a;null==f&&null!=e;)null!=e.value&&"object"==typeof e.value&&(f=e.hasAttribute(b)?null!=e.getAttribute(b)?e.getAttribute(b):"":null),e=this.model.getParent(e)}else f=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(f=b.getAttribute("label_"+Graph.diagramLanguage)), null==f&&(f=b.getAttribute("label")||"");return f||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null}; @@ -2705,9 +2703,9 @@ this.currentState.cell)||this.graph.isSwimlane(n)||!(null==m||null==d||m.height< this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}}; HoverIcons.prototype.computeBoundingBox=function(){var a=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(b){null!=b.parentNode&&(b=new mxRectangle(b.offsetLeft,b.offsetTop,b.offsetWidth,b.offsetHeight),null==a?a=b:a.add(b))});return a}; HoverIcons.prototype.getState=function(a){if(null!=a)if(a=a.cell,this.graph.getModel().contains(a)){if(this.graph.getModel().isVertex(a)&&!this.graph.isCellConnectable(a)){var b=this.graph.getModel().getParent(a);this.graph.getModel().isVertex(b)&&this.graph.isCellConnectable(b)&&(a=b)}if(this.graph.isCellLocked(a)||this.graph.model.isEdge(a))a=null;a=this.graph.view.getState(a);null!=a&&null==a.style&&(a=null)}else a=null;return a}; -HoverIcons.prototype.update=function(a,b,f){if(!this.graph.connectionArrowsEnabled||null!=a&&"0"==mxUtils.getValue(a.style,"allowArrows","1"))this.reset();else{null!=a&&null!=a.cell.geometry&&a.cell.geometry.relative&&this.graph.model.isEdge(a.cell.parent)&&(a=null);var e=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,e=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()|| -this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,b,f))}),this.updateDelay+10))):null!=this.startTime&&(e=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=a&&e<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,b,f)?this.reset(!1):(null!=this.currentState||e>this.activationDelay)&&this.currentState!=a&&(e>this.updateDelay&&null!=a||null==this.bbox||null==b||null==f||!mxUtils.contains(this.bbox, -b,f))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}}; +HoverIcons.prototype.update=function(a,b,f){if(!this.graph.connectionArrowsEnabled||null!=this.graph.freehand&&this.graph.freehand.isDrawing()||null!=a&&"0"==mxUtils.getValue(a.style,"allowArrows","1"))this.reset();else{null!=a&&null!=a.cell.geometry&&a.cell.geometry.relative&&this.graph.model.isEdge(a.cell.parent)&&(a=null);var e=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,e=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread= +window.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,b,f))}),this.updateDelay+10))):null!=this.startTime&&(e=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=a&&e<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,b,f)?this.reset(!1):(null!=this.currentState||e>this.activationDelay)&&this.currentState!=a&&(e>this.updateDelay&&null!= +a||null==this.bbox||null==b||null==f||!mxUtils.contains(this.bbox,b,f))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}}; HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};Graph.prototype.createParent=function(a,b,f,e,g){a=this.cloneCell(a);for(var d=0;d<f;d++){var k=this.cloneCell(b),n=this.getCellGeometry(k);null!=n&&(n.x+=d*e,n.y+=d*g);a.insert(k)}return a}; Graph.prototype.createTable=function(a,b,f,e,g,d,k,n,u){f=null!=f?f:60;e=null!=e?e:40;d=null!=d?d:30;n=null!=n?n:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";u=null!=u?u:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null, null,null!=g?g:"",0,0,b*f,a*e+(null!=g?d:0),null!=k?k:"shape=table;startSize="+(null!=g?d:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,b*f,e,n),this.createVertex(null,null,"",0,0,f,e,u),b,f,0),a,0,e)}; @@ -2728,22 +2726,22 @@ TableLayout.prototype.getRowLayout=function(a,b){var f=this.graph.model.getChild TableLayout.prototype.layoutRow=function(a,b,f,e){var g=this.graph.getModel(),d=g.getChildCells(a,!0);a=this.graph.getActualStartSize(a,!0);var k=a.x,n=0;null!=b&&(b=b.slice(),b.splice(0,0,a.x));for(var u=0;u<d.length;u++){var m=this.graph.getCellGeometry(d[u]);null!=m&&(m=m.clone(),m.y=a.y,m.height=f-a.y-a.height,null!=b?(m.x=b[u],m.width=b[u+1]-m.x,u==d.length-1&&u<b.length-2&&(m.width=e-m.x-a.x-a.width)):(m.x=k,k+=m.width,u==d.length-1?m.width=e-a.x-a.width-n:n+=m.width),m.alternateBounds=new mxRectangle(0, 0,m.width,m.height),g.setGeometry(d[u],m))}return n}; TableLayout.prototype.execute=function(a){if(null!=a){var b=this.graph.getActualStartSize(a,!0),f=this.graph.getCellGeometry(a),e=this.graph.getCellStyle(a),g="1"==mxUtils.getValue(e,"resizeLastRow","0"),d="1"==mxUtils.getValue(e,"resizeLast","0");e="1"==mxUtils.getValue(e,"fixedRows","0");var k=this.graph.getModel(),n=0;k.beginUpdate();try{for(var u=f.height-b.y-b.height,m=f.width-b.x-b.width,r=k.getChildCells(a,!0),x=0;x<r.length;x++)k.setVisible(r[x],!0);var B=this.getSize(r,!1);if(0<u&&0<m&&0< -r.length&&0<B){if(g){var D=this.graph.getCellGeometry(r[r.length-1]);null!=D&&(D=D.clone(),D.height=u-B+D.height,k.setGeometry(r[r.length-1],D))}var F=d?null:this.getRowLayout(r[0],m),J=[],C=b.y;for(x=0;x<r.length;x++)D=this.graph.getCellGeometry(r[x]),null!=D&&(D=D.clone(),D.x=b.x,D.width=m,D.y=Math.round(C),C=g||e?C+D.height:C+D.height/B*u,D.height=Math.round(C)-D.y,k.setGeometry(r[x],D)),n=Math.max(n,this.layoutRow(r[x],F,D.height,m,J));e&&u<B&&(f=f.clone(),f.height=C+b.height,k.setGeometry(a, -f));d&&m<n+Graph.minTableColumnWidth&&(f=f.clone(),f.width=n+b.width+b.x+Graph.minTableColumnWidth,k.setGeometry(a,f));this.graph.visitTableCells(a,mxUtils.bind(this,function(O){k.setVisible(O.cell,O.actual.cell==O.cell);if(O.actual.cell!=O.cell){if(O.actual.row==O.row){var R=null!=O.geo.alternateBounds?O.geo.alternateBounds:O.geo;O.actual.geo.width+=R.width}O.actual.col==O.col&&(R=null!=O.geo.alternateBounds?O.geo.alternateBounds:O.geo,O.actual.geo.height+=R.height)}}))}else for(x=0;x<r.length;x++)k.setVisible(r[x], +r.length&&0<B){if(g){var D=this.graph.getCellGeometry(r[r.length-1]);null!=D&&(D=D.clone(),D.height=u-B+D.height,k.setGeometry(r[r.length-1],D))}var F=d?null:this.getRowLayout(r[0],m),I=[],C=b.y;for(x=0;x<r.length;x++)D=this.graph.getCellGeometry(r[x]),null!=D&&(D=D.clone(),D.x=b.x,D.width=m,D.y=Math.round(C),C=g||e?C+D.height:C+D.height/B*u,D.height=Math.round(C)-D.y,k.setGeometry(r[x],D)),n=Math.max(n,this.layoutRow(r[x],F,D.height,m,I));e&&u<B&&(f=f.clone(),f.height=C+b.height,k.setGeometry(a, +f));d&&m<n+Graph.minTableColumnWidth&&(f=f.clone(),f.width=n+b.width+b.x+Graph.minTableColumnWidth,k.setGeometry(a,f));this.graph.visitTableCells(a,mxUtils.bind(this,function(N){k.setVisible(N.cell,N.actual.cell==N.cell);if(N.actual.cell!=N.cell){if(N.actual.row==N.row){var R=null!=N.geo.alternateBounds?N.geo.alternateBounds:N.geo;N.actual.geo.width+=R.width}N.actual.col==N.col&&(R=null!=N.geo.alternateBounds?N.geo.alternateBounds:N.geo,N.actual.geo.height+=R.height)}}))}else for(x=0;x<r.length;x++)k.setVisible(r[x], !1)}finally{k.endUpdate()}}}; (function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(r,x){x=null!=x?x:!0;var B=this.getState(r);null!=B&&x&&this.graph.model.isEdge(B.cell)&&null!=B.style&&1!=B.style[mxConstants.STYLE_CURVED]&&!B.invalid&&this.updateLineJumps(B)&&this.graph.cellRenderer.redraw(B,!1,this.isRendering());B=b.apply(this, arguments);null!=B&&x&&this.graph.model.isEdge(B.cell)&&null!=B.style&&1!=B.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(B);return B};var f=mxShape.prototype.paint;mxShape.prototype.paint=function(){f.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var r=this.node.getElementsByTagName("path");if(1<r.length){"1"!=mxUtils.getValue(this.state.style, mxConstants.STYLE_DASHED,"0")&&r[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var x=this.state.view.graph.getFlowAnimationStyle();null!=x&&r[1].setAttribute("class",x.getAttribute("id"))}}};var e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(r,x){return e.apply(this,arguments)||null!=r.routedPoints&&null!=x.routedPoints&&!mxUtils.equalPoints(x.routedPoints,r.routedPoints)};var g=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState= -function(r){g.apply(this,arguments);this.graph.model.isEdge(r.cell)&&1!=r.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(r)};mxGraphView.prototype.updateLineJumps=function(r){var x=r.absolutePoints;if(Graph.lineJumpsEnabled){var B=null!=r.routedPoints,D=null;if(null!=x&&null!=this.validEdges&&"none"!==mxUtils.getValue(r.style,"jumpStyle","none")){var F=function(fa,sa,K){var V=new mxPoint(sa,K);V.type=fa;D.push(V);V=null!=r.routedPoints?r.routedPoints[D.length-1]:null;return null==V||V.type!= -fa||V.x!=sa||V.y!=K},J=.5*this.scale;B=!1;D=[];for(var C=0;C<x.length-1;C++){for(var O=x[C+1],R=x[C],T=[],Q=x[C+2];C<x.length-2&&mxUtils.ptSegDistSq(R.x,R.y,Q.x,Q.y,O.x,O.y)<1*this.scale*this.scale;)O=Q,C++,Q=x[C+2];B=F(0,R.x,R.y)||B;for(var aa=0;aa<this.validEdges.length;aa++){var S=this.validEdges[aa],P=S.absolutePoints;if(null!=P&&mxUtils.intersects(r,S)&&"1"!=S.style.noJump)for(S=0;S<P.length-1;S++){var X=P[S+1],ha=P[S];for(Q=P[S+2];S<P.length-2&&mxUtils.ptSegDistSq(ha.x,ha.y,Q.x,Q.y,X.x,X.y)< -1*this.scale*this.scale;)X=Q,S++,Q=P[S+2];Q=mxUtils.intersection(R.x,R.y,O.x,O.y,ha.x,ha.y,X.x,X.y);if(null!=Q&&(Math.abs(Q.x-R.x)>J||Math.abs(Q.y-R.y)>J)&&(Math.abs(Q.x-O.x)>J||Math.abs(Q.y-O.y)>J)&&(Math.abs(Q.x-ha.x)>J||Math.abs(Q.y-ha.y)>J)&&(Math.abs(Q.x-X.x)>J||Math.abs(Q.y-X.y)>J)){X=Q.x-R.x;ha=Q.y-R.y;Q={distSq:X*X+ha*ha,x:Q.x,y:Q.y};for(X=0;X<T.length;X++)if(T[X].distSq>Q.distSq){T.splice(X,0,Q);Q=null;break}null==Q||0!=T.length&&T[T.length-1].x===Q.x&&T[T.length-1].y===Q.y||T.push(Q)}}}for(S= -0;S<T.length;S++)B=F(1,T[S].x,T[S].y)||B}Q=x[x.length-1];B=F(0,Q.x,Q.y)||B}r.routedPoints=D;return B}return!1};var d=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(r,x,B){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)d.apply(this,arguments);else{var D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,F=(parseInt(mxUtils.getValue(this.style, -"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,J=mxUtils.getValue(this.style,"jumpStyle","none"),C=!0,O=null,R=null,T=[],Q=null;r.begin();for(var aa=0;aa<this.state.routedPoints.length;aa++){var S=this.state.routedPoints[aa],P=new mxPoint(S.x/this.scale,S.y/this.scale);0==aa?P=x[0]:aa==this.state.routedPoints.length-1&&(P=x[x.length-1]);var X=!1;if(null!=O&&1==S.type){var ha=this.state.routedPoints[aa+1];S=ha.x/this.scale-P.x;ha=ha.y/this.scale-P.y;S=S*S+ha*ha;null==Q&&(Q=new mxPoint(P.x- -O.x,P.y-O.y),R=Math.sqrt(Q.x*Q.x+Q.y*Q.y),0<R?(Q.x=Q.x*F/R,Q.y=Q.y*F/R):Q=null);S>F*F&&0<R&&(S=O.x-P.x,ha=O.y-P.y,S=S*S+ha*ha,S>F*F&&(X=new mxPoint(P.x-Q.x,P.y-Q.y),S=new mxPoint(P.x+Q.x,P.y+Q.y),T.push(X),this.addPoints(r,T,B,D,!1,null,C),T=0>Math.round(Q.x)||0==Math.round(Q.x)&&0>=Math.round(Q.y)?1:-1,C=!1,"sharp"==J?(r.lineTo(X.x-Q.y*T,X.y+Q.x*T),r.lineTo(S.x-Q.y*T,S.y+Q.x*T),r.lineTo(S.x,S.y)):"line"==J?(r.moveTo(X.x+Q.y*T,X.y-Q.x*T),r.lineTo(X.x-Q.y*T,X.y+Q.x*T),r.moveTo(S.x-Q.y*T,S.y+Q.x*T), -r.lineTo(S.x+Q.y*T,S.y-Q.x*T),r.moveTo(S.x,S.y)):"arc"==J?(T*=1.3,r.curveTo(X.x-Q.y*T,X.y+Q.x*T,S.x-Q.y*T,S.y+Q.x*T,S.x,S.y)):(r.moveTo(S.x,S.y),C=!0),T=[S],X=!0))}else Q=null;X||(T.push(P),O=P)}this.addPoints(r,T,B,D,!1,null,C);r.stroke()}};var k=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(r,x,B,D){return null!=x&&"centerPerimeter"==x.style[mxConstants.STYLE_PERIMETER]?new mxPoint(x.getCenterX(),x.getCenterY()):k.apply(this,arguments)};var n=mxGraphView.prototype.updateFloatingTerminalPoint; -mxGraphView.prototype.updateFloatingTerminalPoint=function(r,x,B,D){if(null==x||null==r||"1"!=x.style.snapToPoint&&"1"!=r.style.snapToPoint)n.apply(this,arguments);else{x=this.getTerminalPort(r,x,D);var F=this.getNextPoint(r,B,D),J=this.graph.isOrthogonal(r),C=mxUtils.toRadians(Number(x.style[mxConstants.STYLE_ROTATION]||"0")),O=new mxPoint(x.getCenterX(),x.getCenterY());if(0!=C){var R=Math.cos(-C),T=Math.sin(-C);F=mxUtils.getRotatedPoint(F,R,T,O)}R=parseFloat(r.style[mxConstants.STYLE_PERIMETER_SPACING]|| -0);R+=parseFloat(r.style[D?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);F=this.getPerimeterPoint(x,F,0==C&&J,R);0!=C&&(R=Math.cos(C),T=Math.sin(C),F=mxUtils.getRotatedPoint(F,R,T,O));r.setAbsoluteTerminalPoint(this.snapToAnchorPoint(r,x,B,D,F),D)}};mxGraphView.prototype.snapToAnchorPoint=function(r,x,B,D,F){if(null!=x&&null!=r){r=this.graph.getAllConnectionConstraints(x);D=B=null;if(null!=r)for(var J=0;J<r.length;J++){var C=this.graph.getConnectionPoint(x, -r[J]);if(null!=C){var O=(C.x-F.x)*(C.x-F.x)+(C.y-F.y)*(C.y-F.y);if(null==D||O<D)B=C,D=O}}null!=B&&(F=B)}return F};var u=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(r,x,B){var D=u.apply(this,arguments);"1"==r.getAttribute("placeholders")&&null!=B.state&&(D=B.state.view.graph.replacePlaceholders(B.state.cell,D));return D};var m=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(r){if(null!=r.style&&"undefined"!==typeof pako){var x= +function(r){g.apply(this,arguments);this.graph.model.isEdge(r.cell)&&1!=r.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(r)};mxGraphView.prototype.updateLineJumps=function(r){var x=r.absolutePoints;if(Graph.lineJumpsEnabled){var B=null!=r.routedPoints,D=null;if(null!=x&&null!=this.validEdges&&"none"!==mxUtils.getValue(r.style,"jumpStyle","none")){var F=function(fa,ra,K){var V=new mxPoint(ra,K);V.type=fa;D.push(V);V=null!=r.routedPoints?r.routedPoints[D.length-1]:null;return null==V||V.type!= +fa||V.x!=ra||V.y!=K},I=.5*this.scale;B=!1;D=[];for(var C=0;C<x.length-1;C++){for(var N=x[C+1],R=x[C],S=[],Q=x[C+2];C<x.length-2&&mxUtils.ptSegDistSq(R.x,R.y,Q.x,Q.y,N.x,N.y)<1*this.scale*this.scale;)N=Q,C++,Q=x[C+2];B=F(0,R.x,R.y)||B;for(var aa=0;aa<this.validEdges.length;aa++){var U=this.validEdges[aa],P=U.absolutePoints;if(null!=P&&mxUtils.intersects(r,U)&&"1"!=U.style.noJump)for(U=0;U<P.length-1;U++){var Y=P[U+1],ja=P[U];for(Q=P[U+2];U<P.length-2&&mxUtils.ptSegDistSq(ja.x,ja.y,Q.x,Q.y,Y.x,Y.y)< +1*this.scale*this.scale;)Y=Q,U++,Q=P[U+2];Q=mxUtils.intersection(R.x,R.y,N.x,N.y,ja.x,ja.y,Y.x,Y.y);if(null!=Q&&(Math.abs(Q.x-R.x)>I||Math.abs(Q.y-R.y)>I)&&(Math.abs(Q.x-N.x)>I||Math.abs(Q.y-N.y)>I)&&(Math.abs(Q.x-ja.x)>I||Math.abs(Q.y-ja.y)>I)&&(Math.abs(Q.x-Y.x)>I||Math.abs(Q.y-Y.y)>I)){Y=Q.x-R.x;ja=Q.y-R.y;Q={distSq:Y*Y+ja*ja,x:Q.x,y:Q.y};for(Y=0;Y<S.length;Y++)if(S[Y].distSq>Q.distSq){S.splice(Y,0,Q);Q=null;break}null==Q||0!=S.length&&S[S.length-1].x===Q.x&&S[S.length-1].y===Q.y||S.push(Q)}}}for(U= +0;U<S.length;U++)B=F(1,S[U].x,S[U].y)||B}Q=x[x.length-1];B=F(0,Q.x,Q.y)||B}r.routedPoints=D;return B}return!1};var d=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(r,x,B){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)d.apply(this,arguments);else{var D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,F=(parseInt(mxUtils.getValue(this.style, +"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,I=mxUtils.getValue(this.style,"jumpStyle","none"),C=!0,N=null,R=null,S=[],Q=null;r.begin();for(var aa=0;aa<this.state.routedPoints.length;aa++){var U=this.state.routedPoints[aa],P=new mxPoint(U.x/this.scale,U.y/this.scale);0==aa?P=x[0]:aa==this.state.routedPoints.length-1&&(P=x[x.length-1]);var Y=!1;if(null!=N&&1==U.type){var ja=this.state.routedPoints[aa+1];U=ja.x/this.scale-P.x;ja=ja.y/this.scale-P.y;U=U*U+ja*ja;null==Q&&(Q=new mxPoint(P.x- +N.x,P.y-N.y),R=Math.sqrt(Q.x*Q.x+Q.y*Q.y),0<R?(Q.x=Q.x*F/R,Q.y=Q.y*F/R):Q=null);U>F*F&&0<R&&(U=N.x-P.x,ja=N.y-P.y,U=U*U+ja*ja,U>F*F&&(Y=new mxPoint(P.x-Q.x,P.y-Q.y),U=new mxPoint(P.x+Q.x,P.y+Q.y),S.push(Y),this.addPoints(r,S,B,D,!1,null,C),S=0>Math.round(Q.x)||0==Math.round(Q.x)&&0>=Math.round(Q.y)?1:-1,C=!1,"sharp"==I?(r.lineTo(Y.x-Q.y*S,Y.y+Q.x*S),r.lineTo(U.x-Q.y*S,U.y+Q.x*S),r.lineTo(U.x,U.y)):"line"==I?(r.moveTo(Y.x+Q.y*S,Y.y-Q.x*S),r.lineTo(Y.x-Q.y*S,Y.y+Q.x*S),r.moveTo(U.x-Q.y*S,U.y+Q.x*S), +r.lineTo(U.x+Q.y*S,U.y-Q.x*S),r.moveTo(U.x,U.y)):"arc"==I?(S*=1.3,r.curveTo(Y.x-Q.y*S,Y.y+Q.x*S,U.x-Q.y*S,U.y+Q.x*S,U.x,U.y)):(r.moveTo(U.x,U.y),C=!0),S=[U],Y=!0))}else Q=null;Y||(S.push(P),N=P)}this.addPoints(r,S,B,D,!1,null,C);r.stroke()}};var k=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(r,x,B,D){return null!=x&&"centerPerimeter"==x.style[mxConstants.STYLE_PERIMETER]?new mxPoint(x.getCenterX(),x.getCenterY()):k.apply(this,arguments)};var n=mxGraphView.prototype.updateFloatingTerminalPoint; +mxGraphView.prototype.updateFloatingTerminalPoint=function(r,x,B,D){if(null==x||null==r||"1"!=x.style.snapToPoint&&"1"!=r.style.snapToPoint)n.apply(this,arguments);else{x=this.getTerminalPort(r,x,D);var F=this.getNextPoint(r,B,D),I=this.graph.isOrthogonal(r),C=mxUtils.toRadians(Number(x.style[mxConstants.STYLE_ROTATION]||"0")),N=new mxPoint(x.getCenterX(),x.getCenterY());if(0!=C){var R=Math.cos(-C),S=Math.sin(-C);F=mxUtils.getRotatedPoint(F,R,S,N)}R=parseFloat(r.style[mxConstants.STYLE_PERIMETER_SPACING]|| +0);R+=parseFloat(r.style[D?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);F=this.getPerimeterPoint(x,F,0==C&&I,R);0!=C&&(R=Math.cos(C),S=Math.sin(C),F=mxUtils.getRotatedPoint(F,R,S,N));r.setAbsoluteTerminalPoint(this.snapToAnchorPoint(r,x,B,D,F),D)}};mxGraphView.prototype.snapToAnchorPoint=function(r,x,B,D,F){if(null!=x&&null!=r){r=this.graph.getAllConnectionConstraints(x);D=B=null;if(null!=r)for(var I=0;I<r.length;I++){var C=this.graph.getConnectionPoint(x, +r[I]);if(null!=C){var N=(C.x-F.x)*(C.x-F.x)+(C.y-F.y)*(C.y-F.y);if(null==D||N<D)B=C,D=N}}null!=B&&(F=B)}return F};var u=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(r,x,B){var D=u.apply(this,arguments);"1"==r.getAttribute("placeholders")&&null!=B.state&&(D=B.state.view.graph.replacePlaceholders(B.state.cell,D));return D};var m=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(r){if(null!=r.style&&"undefined"!==typeof pako){var x= mxUtils.getValue(r.style,mxConstants.STYLE_SHAPE,null);if(null!=x&&"string"===typeof x&&"stencil("==x.substring(0,8))try{var B=x.substring(8,x.length-1),D=mxUtils.parseXml(Graph.decompress(B));return new mxShape(new mxStencil(D.documentElement))}catch(F){null!=window.console&&console.log("Error in shape: "+F)}}return m.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[]; mxStencilRegistry.filesLoaded={}; mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var f=mxStencilRegistry.getBasenameForStencil(a);if(null!=f){b=mxStencilRegistry.libraries[f];if(null!=b){if(null==mxStencilRegistry.packages[f]){for(var e=0;e<b.length;e++){var g=b[e];if(!mxStencilRegistry.filesLoaded[g])if(mxStencilRegistry.filesLoaded[g]=!0,".xml"==g.toLowerCase().substring(g.length-4,g.length))mxStencilRegistry.loadStencilSet(g, @@ -2761,100 +2759,100 @@ function(t){t=this.graph.createCurrentEdgeStyle();t=this.graph.createEdge(null,n return t};mxConnectionHandler.prototype.updatePreview=function(t){};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var t=k.apply(this,arguments),z=t.getCell;t.getCell=mxUtils.bind(this,function(A){var E=z.apply(this,arguments);this.error=null;return E});return t};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle= function(){for(var t="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",z="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),A=0;A<z.length;A++)null!=this.currentEdgeStyle[z[A]]&&(t+=z[A]+"="+this.currentEdgeStyle[z[A]]+";");null!=this.currentEdgeStyle.orthogonalLoop?t+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&& (t+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?t+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(t+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(t+="elbow="+this.currentEdgeStyle.elbow+";");return t=null!=this.currentEdgeStyle.html?t+("html="+this.currentEdgeStyle.html+";"):t+"html=1;"}; -Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var t=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=t&&(new mxCodec(t.ownerDocument)).decode(t,this.getStylesheet())};Graph.prototype.createCellLookup=function(t,z){z=null!=z?z:{};for(var A=0;A<t.length;A++){var E=t[A];z[mxObjectIdentity.get(E)]=E.getId();for(var H=this.model.getChildCount(E), -L=0;L<H;L++)this.createCellLookup([this.model.getChildAt(E,L)],z)}return z};Graph.prototype.createCellMapping=function(t,z,A){A=null!=A?A:{};for(var E in t){var H=z[E];null==A[H]&&(A[H]=t[E].getId()||"")}return A};Graph.prototype.importGraphModel=function(t,z,A,E){z=null!=z?z:0;A=null!=A?A:0;var H=new mxCodec(t.ownerDocument),L=new mxGraphModel;H.decode(t,L);t=[];H={};var W={},ia=L.getChildren(this.cloneCell(L.root,this.isCloneInvalidEdges(),H));if(null!=ia){var ea=this.createCellLookup([L.root]); -ia=ia.slice();this.model.beginUpdate();try{if(1!=ia.length||this.isCellLocked(this.getDefaultParent()))for(L=0;L<ia.length;L++)ja=this.model.getChildren(this.moveCells([ia[L]],z,A,!1,this.model.getRoot())[0]),null!=ja&&(t=t.concat(ja));else{var ja=L.getChildren(ia[0]);null!=ja&&(t=this.moveCells(ja,z,A,!1,this.getDefaultParent()),W[L.getChildAt(L.root,0).getId()]=this.getDefaultParent().getId())}if(null!=t&&(this.createCellMapping(H,ea,W),this.updateCustomLinks(W,t),E)){this.isGridEnabled()&&(z=this.snap(z), -A=this.snap(A));var ta=this.getBoundingBoxFromGeometry(t,!0);null!=ta&&this.moveCells(t,z-ta.x,A-ta.y)}}finally{this.model.endUpdate()}}return t};Graph.prototype.encodeCells=function(t){for(var z={},A=this.cloneCells(t,null,z),E=new mxDictionary,H=0;H<t.length;H++)E.put(t[H],!0);var L=new mxCodec,W=new mxGraphModel,ia=W.getChildAt(W.getRoot(),0);for(H=0;H<A.length;H++){W.add(ia,A[H]);var ea=this.view.getState(t[H]);if(null!=ea){var ja=this.getCellGeometry(A[H]);null!=ja&&ja.relative&&!this.model.isEdge(t[H])&& -null==E.get(this.model.getParent(t[H]))&&(ja.offset=null,ja.relative=!1,ja.x=ea.x/ea.view.scale-ea.view.translate.x,ja.y=ea.y/ea.view.scale-ea.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(z,this.createCellLookup(t)),A);return L.encode(W)};Graph.prototype.isSwimlane=function(t,z){var A=null;null==t||this.model.isEdge(t)||this.model.getParent(t)==this.model.getRoot()||(A=this.getCurrentCellStyle(t,z)[mxConstants.STYLE_SHAPE]);return A==mxConstants.SHAPE_SWIMLANE||"table"==A||"tableRow"== -A};var n=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(t){var z=this.model.getParent(t);if(null!=z){var A=this.getCurrentCellStyle(z);if(null!=A.expand)return"0"!=A.expand}return n.apply(this,arguments)&&(null==z||!this.isTable(z))};var u=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(t,z,A,E,H,L,W,ia){null==ia&&(ia=this.model.getParent(t),this.isTable(ia)||this.isTableRow(ia))&&(ia=this.getCellAt(L,W,null,!0,!1));A=null;this.model.beginUpdate();try{A=u.apply(this, -[t,z,A,E,H,L,W,ia]);this.model.setValue(A,"");var ea=this.getChildCells(A,!0);for(z=0;z<ea.length;z++){var ja=this.getCellGeometry(ea[z]);null!=ja&&ja.relative&&0<ja.x&&this.model.remove(ea[z])}var ta=this.getChildCells(t,!0);for(z=0;z<ta.length;z++)ja=this.getCellGeometry(ta[z]),null!=ja&&ja.relative&&0>=ja.x&&this.model.remove(ta[z]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[A]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[A]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING, -null,[t]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[t]);var Aa=this.model.getTerminal(A,!1);if(null!=Aa){var Ea=this.getCurrentCellStyle(Aa);null!=Ea&&"1"==Ea.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[t]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[t]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[A]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[A]))}}finally{this.model.endUpdate()}return A};var m=Graph.prototype.selectCell;Graph.prototype.selectCell= -function(t,z,A){if(z||A)m.apply(this,arguments);else{var E=this.getSelectionCell(),H=null,L=[],W=mxUtils.bind(this,function(ia){if(null!=this.view.getState(ia)&&(this.model.isVertex(ia)||this.model.isEdge(ia)))if(L.push(ia),ia==E)H=L.length-1;else if(t&&null==E&&0<L.length||null!=H&&t&&L.length>H||!t&&0<H)return;for(var ea=0;ea<this.model.getChildCount(ia);ea++)W(this.model.getChildAt(ia,ea))});W(this.model.root);0<L.length&&(H=null!=H?mxUtils.mod(H+(t?1:-1),L.length):0,this.setSelectionCell(L[H]))}}; -Graph.prototype.swapShapes=function(t,z,A,E,H,L,W){z=!1;if(!E&&null!=H&&1==t.length&&(E=this.view.getState(H),A=this.view.getState(t[0]),null!=E&&null!=A&&(null!=L&&mxEvent.isShiftDown(L)||"umlLifeline"==E.style.shape&&"umlLifeline"==A.style.shape)&&(E=this.getCellGeometry(H),L=this.getCellGeometry(t[0]),null!=E&&null!=L))){z=E.clone();E=L.clone();E.x=z.x;E.y=z.y;z.x=L.x;z.y=L.y;this.model.beginUpdate();try{this.model.setGeometry(H,z),this.model.setGeometry(t[0],E)}finally{this.model.endUpdate()}z= -!0}return z};var r=Graph.prototype.moveCells;Graph.prototype.moveCells=function(t,z,A,E,H,L,W){if(this.swapShapes(t,z,A,E,H,L,W))return t;W=null!=W?W:{};if(this.isTable(H)){for(var ia=[],ea=0;ea<t.length;ea++)this.isTable(t[ea])?ia=ia.concat(this.model.getChildCells(t[ea],!0).reverse()):ia.push(t[ea]);t=ia}this.model.beginUpdate();try{ia=[];for(ea=0;ea<t.length;ea++)if(null!=H&&this.isTableRow(t[ea])){var ja=this.model.getParent(t[ea]),ta=this.getCellGeometry(t[ea]);this.isTable(ja)&&ia.push(ja); -if(null!=ja&&null!=ta&&this.isTable(ja)&&this.isTable(H)&&(E||ja!=H)){if(!E){var Aa=this.getCellGeometry(ja);null!=Aa&&(Aa=Aa.clone(),Aa.height-=ta.height,this.model.setGeometry(ja,Aa))}Aa=this.getCellGeometry(H);null!=Aa&&(Aa=Aa.clone(),Aa.height+=ta.height,this.model.setGeometry(H,Aa));var Ea=this.model.getChildCells(H,!0);if(0<Ea.length){t[ea]=E?this.cloneCell(t[ea]):t[ea];var Ma=this.model.getChildCells(t[ea],!0),La=this.model.getChildCells(Ea[0],!0),Ia=La.length-Ma.length;if(0<Ia)for(var Fa= +Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var t=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=t&&(new mxCodec(t.ownerDocument)).decode(t,this.getStylesheet())};Graph.prototype.createCellLookup=function(t,z){z=null!=z?z:{};for(var A=0;A<t.length;A++){var E=t[A];z[mxObjectIdentity.get(E)]=E.getId();for(var G=this.model.getChildCount(E), +L=0;L<G;L++)this.createCellLookup([this.model.getChildAt(E,L)],z)}return z};Graph.prototype.createCellMapping=function(t,z,A){A=null!=A?A:{};for(var E in t){var G=z[E];null==A[G]&&(A[G]=t[E].getId()||"")}return A};Graph.prototype.importGraphModel=function(t,z,A,E){z=null!=z?z:0;A=null!=A?A:0;var G=new mxCodec(t.ownerDocument),L=new mxGraphModel;G.decode(t,L);t=[];G={};var X={},ia=L.getChildren(this.cloneCell(L.root,this.isCloneInvalidEdges(),G));if(null!=ia){var ea=this.createCellLookup([L.root]); +ia=ia.slice();this.model.beginUpdate();try{if(1!=ia.length||this.isCellLocked(this.getDefaultParent()))for(L=0;L<ia.length;L++)ka=this.model.getChildren(this.moveCells([ia[L]],z,A,!1,this.model.getRoot())[0]),null!=ka&&(t=t.concat(ka));else{var ka=L.getChildren(ia[0]);null!=ka&&(t=this.moveCells(ka,z,A,!1,this.getDefaultParent()),X[L.getChildAt(L.root,0).getId()]=this.getDefaultParent().getId())}if(null!=t&&(this.createCellMapping(G,ea,X),this.updateCustomLinks(X,t),E)){this.isGridEnabled()&&(z=this.snap(z), +A=this.snap(A));var va=this.getBoundingBoxFromGeometry(t,!0);null!=va&&this.moveCells(t,z-va.x,A-va.y)}}finally{this.model.endUpdate()}}return t};Graph.prototype.encodeCells=function(t){for(var z={},A=this.cloneCells(t,null,z),E=new mxDictionary,G=0;G<t.length;G++)E.put(t[G],!0);var L=new mxCodec,X=new mxGraphModel,ia=X.getChildAt(X.getRoot(),0);for(G=0;G<A.length;G++){X.add(ia,A[G]);var ea=this.view.getState(t[G]);if(null!=ea){var ka=this.getCellGeometry(A[G]);null!=ka&&ka.relative&&!this.model.isEdge(t[G])&& +null==E.get(this.model.getParent(t[G]))&&(ka.offset=null,ka.relative=!1,ka.x=ea.x/ea.view.scale-ea.view.translate.x,ka.y=ea.y/ea.view.scale-ea.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(z,this.createCellLookup(t)),A);return L.encode(X)};Graph.prototype.isSwimlane=function(t,z){var A=null;null==t||this.model.isEdge(t)||this.model.getParent(t)==this.model.getRoot()||(A=this.getCurrentCellStyle(t,z)[mxConstants.STYLE_SHAPE]);return A==mxConstants.SHAPE_SWIMLANE||"table"==A||"tableRow"== +A};var n=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(t){var z=this.model.getParent(t);if(null!=z){var A=this.getCurrentCellStyle(z);if(null!=A.expand)return"0"!=A.expand}return n.apply(this,arguments)&&(null==z||!this.isTable(z))};var u=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(t,z,A,E,G,L,X,ia){null==ia&&(ia=this.model.getParent(t),this.isTable(ia)||this.isTableRow(ia))&&(ia=this.getCellAt(L,X,null,!0,!1));A=null;this.model.beginUpdate();try{A=u.apply(this, +[t,z,A,E,G,L,X,ia]);this.model.setValue(A,"");var ea=this.getChildCells(A,!0);for(z=0;z<ea.length;z++){var ka=this.getCellGeometry(ea[z]);null!=ka&&ka.relative&&0<ka.x&&this.model.remove(ea[z])}var va=this.getChildCells(t,!0);for(z=0;z<va.length;z++)ka=this.getCellGeometry(va[z]),null!=ka&&ka.relative&&0>=ka.x&&this.model.remove(va[z]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[A]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[A]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING, +null,[t]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[t]);var Ba=this.model.getTerminal(A,!1);if(null!=Ba){var Ea=this.getCurrentCellStyle(Ba);null!=Ea&&"1"==Ea.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[t]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[t]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[A]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[A]))}}finally{this.model.endUpdate()}return A};var m=Graph.prototype.selectCell;Graph.prototype.selectCell= +function(t,z,A){if(z||A)m.apply(this,arguments);else{var E=this.getSelectionCell(),G=null,L=[],X=mxUtils.bind(this,function(ia){if(null!=this.view.getState(ia)&&(this.model.isVertex(ia)||this.model.isEdge(ia)))if(L.push(ia),ia==E)G=L.length-1;else if(t&&null==E&&0<L.length||null!=G&&t&&L.length>G||!t&&0<G)return;for(var ea=0;ea<this.model.getChildCount(ia);ea++)X(this.model.getChildAt(ia,ea))});X(this.model.root);0<L.length&&(G=null!=G?mxUtils.mod(G+(t?1:-1),L.length):0,this.setSelectionCell(L[G]))}}; +Graph.prototype.swapShapes=function(t,z,A,E,G,L,X){z=!1;if(!E&&null!=G&&1==t.length&&(E=this.view.getState(G),A=this.view.getState(t[0]),null!=E&&null!=A&&(null!=L&&mxEvent.isShiftDown(L)||"umlLifeline"==E.style.shape&&"umlLifeline"==A.style.shape)&&(E=this.getCellGeometry(G),L=this.getCellGeometry(t[0]),null!=E&&null!=L))){z=E.clone();E=L.clone();E.x=z.x;E.y=z.y;z.x=L.x;z.y=L.y;this.model.beginUpdate();try{this.model.setGeometry(G,z),this.model.setGeometry(t[0],E)}finally{this.model.endUpdate()}z= +!0}return z};var r=Graph.prototype.moveCells;Graph.prototype.moveCells=function(t,z,A,E,G,L,X){if(this.swapShapes(t,z,A,E,G,L,X))return t;X=null!=X?X:{};if(this.isTable(G)){for(var ia=[],ea=0;ea<t.length;ea++)this.isTable(t[ea])?ia=ia.concat(this.model.getChildCells(t[ea],!0).reverse()):ia.push(t[ea]);t=ia}this.model.beginUpdate();try{ia=[];for(ea=0;ea<t.length;ea++)if(null!=G&&this.isTableRow(t[ea])){var ka=this.model.getParent(t[ea]),va=this.getCellGeometry(t[ea]);this.isTable(ka)&&ia.push(ka); +if(null!=ka&&null!=va&&this.isTable(ka)&&this.isTable(G)&&(E||ka!=G)){if(!E){var Ba=this.getCellGeometry(ka);null!=Ba&&(Ba=Ba.clone(),Ba.height-=va.height,this.model.setGeometry(ka,Ba))}Ba=this.getCellGeometry(G);null!=Ba&&(Ba=Ba.clone(),Ba.height+=va.height,this.model.setGeometry(G,Ba));var Ea=this.model.getChildCells(G,!0);if(0<Ea.length){t[ea]=E?this.cloneCell(t[ea]):t[ea];var Ma=this.model.getChildCells(t[ea],!0),La=this.model.getChildCells(Ea[0],!0),Ia=La.length-Ma.length;if(0<Ia)for(var Fa= 0;Fa<Ia;Fa++){var Ga=this.cloneCell(Ma[Ma.length-1]);null!=Ga&&(Ga.value="",this.model.add(t[ea],Ga))}else if(0>Ia)for(Fa=0;Fa>Ia;Fa--)this.model.remove(Ma[Ma.length+Fa-1]);Ma=this.model.getChildCells(t[ea],!0);for(Fa=0;Fa<La.length;Fa++){var Oa=this.getCellGeometry(La[Fa]),Pa=this.getCellGeometry(Ma[Fa]);null!=Oa&&null!=Pa&&(Pa=Pa.clone(),Pa.width=Oa.width,this.model.setGeometry(Ma[Fa],Pa))}}}}var Na=r.apply(this,arguments);for(ea=0;ea<ia.length;ea++)!E&&this.model.contains(ia[ea])&&0==this.model.getChildCount(ia[ea])&& -this.model.remove(ia[ea]);E&&this.updateCustomLinks(this.createCellMapping(W,this.createCellLookup(t)),Na)}finally{this.model.endUpdate()}return Na};var x=Graph.prototype.removeCells;Graph.prototype.removeCells=function(t,z){var A=[];this.model.beginUpdate();try{for(var E=0;E<t.length;E++)if(this.isTableCell(t[E])){var H=this.model.getParent(t[E]),L=this.model.getParent(H);1==this.model.getChildCount(H)&&1==this.model.getChildCount(L)?0>mxUtils.indexOf(t,L)&&0>mxUtils.indexOf(A,L)&&A.push(L):this.labelChanged(t[E], -"")}else{if(this.isTableRow(t[E])&&(L=this.model.getParent(t[E]),0>mxUtils.indexOf(t,L)&&0>mxUtils.indexOf(A,L))){for(var W=this.model.getChildCells(L,!0),ia=0,ea=0;ea<W.length;ea++)0<=mxUtils.indexOf(t,W[ea])&&ia++;ia==W.length&&A.push(L)}A.push(t[E])}A=x.apply(this,[A,z])}finally{this.model.endUpdate()}return A};Graph.prototype.updateCustomLinks=function(t,z,A){A=null!=A?A:new Graph;for(var E=0;E<z.length;E++)null!=z[E]&&A.updateCustomLinksForCell(t,z[E],A)};Graph.prototype.updateCustomLinksForCell= +this.model.remove(ia[ea]);E&&this.updateCustomLinks(this.createCellMapping(X,this.createCellLookup(t)),Na)}finally{this.model.endUpdate()}return Na};var x=Graph.prototype.removeCells;Graph.prototype.removeCells=function(t,z){var A=[];this.model.beginUpdate();try{for(var E=0;E<t.length;E++)if(this.isTableCell(t[E])){var G=this.model.getParent(t[E]),L=this.model.getParent(G);1==this.model.getChildCount(G)&&1==this.model.getChildCount(L)?0>mxUtils.indexOf(t,L)&&0>mxUtils.indexOf(A,L)&&A.push(L):this.labelChanged(t[E], +"")}else{if(this.isTableRow(t[E])&&(L=this.model.getParent(t[E]),0>mxUtils.indexOf(t,L)&&0>mxUtils.indexOf(A,L))){for(var X=this.model.getChildCells(L,!0),ia=0,ea=0;ea<X.length;ea++)0<=mxUtils.indexOf(t,X[ea])&&ia++;ia==X.length&&A.push(L)}A.push(t[E])}A=x.apply(this,[A,z])}finally{this.model.endUpdate()}return A};Graph.prototype.updateCustomLinks=function(t,z,A){A=null!=A?A:new Graph;for(var E=0;E<z.length;E++)null!=z[E]&&A.updateCustomLinksForCell(t,z[E],A)};Graph.prototype.updateCustomLinksForCell= function(t,z){this.doUpdateCustomLinksForCell(t,z);for(var A=this.model.getChildCount(z),E=0;E<A;E++)this.updateCustomLinksForCell(t,this.model.getChildAt(z,E))};Graph.prototype.doUpdateCustomLinksForCell=function(t,z){};Graph.prototype.getAllConnectionConstraints=function(t,z){if(null!=t){z=mxUtils.getValue(t.style,"points",null);if(null!=z){t=[];try{var A=JSON.parse(z);for(z=0;z<A.length;z++){var E=A[z];t.push(new mxConnectionConstraint(new mxPoint(E[0],E[1]),2<E.length?"0"!=E[2]:!0,null,3<E.length? -E[3]:0,4<E.length?E[4]:0))}}catch(L){}return t}if(null!=t.shape&&null!=t.shape.bounds){E=t.shape.direction;z=t.shape.bounds;var H=t.shape.scale;A=z.width/H;z=z.height/H;if(E==mxConstants.DIRECTION_NORTH||E==mxConstants.DIRECTION_SOUTH)E=A,A=z,z=E;z=t.shape.getConstraints(t.style,A,z);if(null!=z)return z;if(null!=t.shape.stencil&&null!=t.shape.stencil.constraints)return t.shape.stencil.constraints;if(null!=t.shape.constraints)return t.shape.constraints}}return null};Graph.prototype.flipEdge=function(t){if(null!= -t){var z=this.getCurrentCellStyle(t);z=mxUtils.getValue(z,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,z,[t])}};Graph.prototype.isValidRoot=function(t){for(var z=this.model.getChildCount(t),A=0,E=0;E<z;E++){var H=this.model.getChildAt(t,E);this.model.isVertex(H)&&(H=this.getCellGeometry(H),null==H||H.relative||A++)}return 0<A||this.isContainer(t)};Graph.prototype.isValidDropTarget= -function(t,z,A){for(var E=this.getCurrentCellStyle(t),H=!0,L=!0,W=0;W<z.length&&L;W++)H=H&&this.isTable(z[W]),L=L&&this.isTableRow(z[W]);return(1==z.length&&null!=A&&mxEvent.isShiftDown(A)&&!mxEvent.isControlDown(A)&&!mxEvent.isAltDown(A)||("1"!=mxUtils.getValue(E,"part","0")||this.isContainer(t))&&"0"!=mxUtils.getValue(E,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(t))&&!this.isTableRow(t)&&(!this.isTable(t)||L||H))&&!this.isCellLocked(t)};Graph.prototype.createGroupCell= +E[3]:0,4<E.length?E[4]:0))}}catch(L){}return t}if(null!=t.shape&&null!=t.shape.bounds){E=t.shape.direction;z=t.shape.bounds;var G=t.shape.scale;A=z.width/G;z=z.height/G;if(E==mxConstants.DIRECTION_NORTH||E==mxConstants.DIRECTION_SOUTH)E=A,A=z,z=E;z=t.shape.getConstraints(t.style,A,z);if(null!=z)return z;if(null!=t.shape.stencil&&null!=t.shape.stencil.constraints)return t.shape.stencil.constraints;if(null!=t.shape.constraints)return t.shape.constraints}}return null};Graph.prototype.flipEdge=function(t){if(null!= +t){var z=this.getCurrentCellStyle(t);z=mxUtils.getValue(z,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,z,[t])}};Graph.prototype.isValidRoot=function(t){for(var z=this.model.getChildCount(t),A=0,E=0;E<z;E++){var G=this.model.getChildAt(t,E);this.model.isVertex(G)&&(G=this.getCellGeometry(G),null==G||G.relative||A++)}return 0<A||this.isContainer(t)};Graph.prototype.isValidDropTarget= +function(t,z,A){for(var E=this.getCurrentCellStyle(t),G=!0,L=!0,X=0;X<z.length&&L;X++)G=G&&this.isTable(z[X]),L=L&&this.isTableRow(z[X]);return(1==z.length&&null!=A&&mxEvent.isShiftDown(A)&&!mxEvent.isControlDown(A)&&!mxEvent.isAltDown(A)||("1"!=mxUtils.getValue(E,"part","0")||this.isContainer(t))&&"0"!=mxUtils.getValue(E,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(t))&&!this.isTableRow(t)&&(!this.isTable(t)||L||G))&&!this.isCellLocked(t)};Graph.prototype.createGroupCell= function(){var t=mxGraph.prototype.createGroupCell.apply(this,arguments);t.setStyle("group");return t};Graph.prototype.isExtendParentsOnAdd=function(t){var z=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(z&&null!=t&&null!=this.layoutManager){var A=this.model.getParent(t);null!=A&&(A=this.layoutManager.getLayout(A),null!=A&&A.constructor==mxStackLayout&&(z=!1))}return z};Graph.prototype.getPreferredSizeForCell=function(t){var z=mxGraph.prototype.getPreferredSizeForCell.apply(this, -arguments);null!=z&&(z.width+=10,z.height+=4,this.gridEnabled&&(z.width=this.snap(z.width),z.height=this.snap(z.height)));return z};Graph.prototype.turnShapes=function(t,z){var A=this.getModel(),E=[];A.beginUpdate();try{for(var H=0;H<t.length;H++){var L=t[H];if(A.isEdge(L)){var W=A.getTerminal(L,!0),ia=A.getTerminal(L,!1);A.setTerminal(L,ia,!0);A.setTerminal(L,W,!1);var ea=A.getGeometry(L);if(null!=ea){ea=ea.clone();null!=ea.points&&ea.points.reverse();var ja=ea.getTerminalPoint(!0),ta=ea.getTerminalPoint(!1); -ea.setTerminalPoint(ja,!1);ea.setTerminalPoint(ta,!0);A.setGeometry(L,ea);var Aa=this.view.getState(L),Ea=this.view.getState(W),Ma=this.view.getState(ia);if(null!=Aa){var La=null!=Ea?this.getConnectionConstraint(Aa,Ea,!0):null,Ia=null!=Ma?this.getConnectionConstraint(Aa,Ma,!1):null;this.setConnectionConstraint(L,W,!0,Ia);this.setConnectionConstraint(L,ia,!1,La);var Fa=mxUtils.getValue(Aa.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING, -mxUtils.getValue(Aa.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[L]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Fa,[L])}E.push(L)}}else if(A.isVertex(L)&&(ea=this.getCellGeometry(L),null!=ea)){if(!(this.isTable(L)||this.isTableRow(L)||this.isTableCell(L)||this.isSwimlane(L))){ea=ea.clone();ea.x+=ea.width/2-ea.height/2;ea.y+=ea.height/2-ea.width/2;var Ga=ea.width;ea.width=ea.height;ea.height=Ga;A.setGeometry(L,ea)}var Oa=this.view.getState(L);if(null!=Oa){var Pa=[mxConstants.DIRECTION_EAST, +arguments);null!=z&&(z.width+=10,z.height+=4,this.gridEnabled&&(z.width=this.snap(z.width),z.height=this.snap(z.height)));return z};Graph.prototype.turnShapes=function(t,z){var A=this.getModel(),E=[];A.beginUpdate();try{for(var G=0;G<t.length;G++){var L=t[G];if(A.isEdge(L)){var X=A.getTerminal(L,!0),ia=A.getTerminal(L,!1);A.setTerminal(L,ia,!0);A.setTerminal(L,X,!1);var ea=A.getGeometry(L);if(null!=ea){ea=ea.clone();null!=ea.points&&ea.points.reverse();var ka=ea.getTerminalPoint(!0),va=ea.getTerminalPoint(!1); +ea.setTerminalPoint(ka,!1);ea.setTerminalPoint(va,!0);A.setGeometry(L,ea);var Ba=this.view.getState(L),Ea=this.view.getState(X),Ma=this.view.getState(ia);if(null!=Ba){var La=null!=Ea?this.getConnectionConstraint(Ba,Ea,!0):null,Ia=null!=Ma?this.getConnectionConstraint(Ba,Ma,!1):null;this.setConnectionConstraint(L,X,!0,Ia);this.setConnectionConstraint(L,ia,!1,La);var Fa=mxUtils.getValue(Ba.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING, +mxUtils.getValue(Ba.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[L]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Fa,[L])}E.push(L)}}else if(A.isVertex(L)&&(ea=this.getCellGeometry(L),null!=ea)){if(!(this.isTable(L)||this.isTableRow(L)||this.isTableCell(L)||this.isSwimlane(L))){ea=ea.clone();ea.x+=ea.width/2-ea.height/2;ea.y+=ea.height/2-ea.width/2;var Ga=ea.width;ea.width=ea.height;ea.height=Ga;A.setGeometry(L,ea)}var Oa=this.view.getState(L);if(null!=Oa){var Pa=[mxConstants.DIRECTION_EAST, mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Na=mxUtils.getValue(Oa.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Pa[mxUtils.mod(mxUtils.indexOf(Pa,Na)+(z?-1:1),Pa.length)],[L])}E.push(L)}}}finally{A.endUpdate()}return E};Graph.prototype.stencilHasPlaceholders=function(t){if(null!=t&&null!=t.fgNode)for(t=t.fgNode.firstChild;null!=t;){if("text"==t.nodeName&&"1"==t.getAttribute("placeholders"))return!0; t=t.nextSibling}return!1};var B=Graph.prototype.processChange;Graph.prototype.processChange=function(t){if(t instanceof mxGeometryChange&&(this.isTableCell(t.cell)||this.isTableRow(t.cell))&&(null==t.previous&&null!=t.geometry||null!=t.previous&&!t.previous.equals(t.geometry))){var z=t.cell;this.isTableCell(z)&&(z=this.model.getParent(z));this.isTableRow(z)&&(z=this.model.getParent(z));var A=this.view.getState(z);null!=A&&null!=A.shape&&(this.view.invalidate(z),A.shape.bounds=null)}B.apply(this,arguments); t instanceof mxValueChange&&null!=t.cell&&null!=t.cell.value&&"object"==typeof t.cell.value&&this.invalidateDescendantsWithPlaceholders(t.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(t){t=this.model.getDescendants(t);if(0<t.length)for(var z=0;z<t.length;z++){var A=this.view.getState(t[z]);null!=A&&null!=A.shape&&null!=A.shape.stencil&&this.stencilHasPlaceholders(A.shape.stencil)?this.removeStateForCell(t[z]):this.isReplacePlaceholders(t[z])&&this.view.invalidate(t[z],!1,!1)}}; Graph.prototype.replaceElement=function(t,z){z=t.ownerDocument.createElement(null!=z?z:"span");for(var A=Array.prototype.slice.call(t.attributes);attr=A.pop();)z.setAttribute(attr.nodeName,attr.nodeValue);z.innerHTML=t.innerHTML;t.parentNode.replaceChild(z,t)};Graph.prototype.processElements=function(t,z){if(null!=t){t=t.getElementsByTagName("*");for(var A=0;A<t.length;A++)z(t[A])}};Graph.prototype.updateLabelElements=function(t,z,A){t=null!=t?t:this.getSelectionCells();for(var E=document.createElement("div"), -H=0;H<t.length;H++)if(this.isHtmlLabel(t[H])){var L=this.convertValueToString(t[H]);if(null!=L&&0<L.length){E.innerHTML=L;for(var W=E.getElementsByTagName(null!=A?A:"*"),ia=0;ia<W.length;ia++)z(W[ia]);E.innerHTML!=L&&this.cellLabelChanged(t[H],E.innerHTML)}}};Graph.prototype.cellLabelChanged=function(t,z,A){z=Graph.zapGremlins(z);this.model.beginUpdate();try{if(null!=t.value&&"object"==typeof t.value){if(this.isReplacePlaceholders(t)&&null!=t.getAttribute("placeholder"))for(var E=t.getAttribute("placeholder"), -H=t;null!=H;){if(H==this.model.getRoot()||null!=H.value&&"object"==typeof H.value&&H.hasAttribute(E)){this.setAttributeForCell(H,E,z);break}H=this.model.getParent(H)}var L=t.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&L.hasAttribute("label_"+Graph.diagramLanguage)?L.setAttribute("label_"+Graph.diagramLanguage,z):L.setAttribute("label",z);z=L}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(t){if(null!= -t){for(var z=new mxDictionary,A=0;A<t.length;A++)z.put(t[A],!0);var E=[];for(A=0;A<t.length;A++){var H=this.model.getParent(t[A]);null==H||z.get(H)||(z.put(H,!0),E.push(H))}for(A=0;A<E.length;A++)if(H=this.view.getState(E[A]),null!=H&&(this.model.isEdge(H.cell)||this.model.isVertex(H.cell))&&this.isCellDeletable(H.cell)&&this.isTransparentState(H)){for(var L=!0,W=0;W<this.model.getChildCount(H.cell)&&L;W++)z.get(this.model.getChildAt(H.cell,W))||(L=!1);L&&t.push(H.cell)}}mxGraph.prototype.cellsRemoved.apply(this, +G=0;G<t.length;G++)if(this.isHtmlLabel(t[G])){var L=this.convertValueToString(t[G]);if(null!=L&&0<L.length){E.innerHTML=L;for(var X=E.getElementsByTagName(null!=A?A:"*"),ia=0;ia<X.length;ia++)z(X[ia]);E.innerHTML!=L&&this.cellLabelChanged(t[G],E.innerHTML)}}};Graph.prototype.cellLabelChanged=function(t,z,A){z=Graph.zapGremlins(z);this.model.beginUpdate();try{if(null!=t.value&&"object"==typeof t.value){if(this.isReplacePlaceholders(t)&&null!=t.getAttribute("placeholder"))for(var E=t.getAttribute("placeholder"), +G=t;null!=G;){if(G==this.model.getRoot()||null!=G.value&&"object"==typeof G.value&&G.hasAttribute(E)){this.setAttributeForCell(G,E,z);break}G=this.model.getParent(G)}var L=t.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&L.hasAttribute("label_"+Graph.diagramLanguage)?L.setAttribute("label_"+Graph.diagramLanguage,z):L.setAttribute("label",z);z=L}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(t){if(null!= +t){for(var z=new mxDictionary,A=0;A<t.length;A++)z.put(t[A],!0);var E=[];for(A=0;A<t.length;A++){var G=this.model.getParent(t[A]);null==G||z.get(G)||(z.put(G,!0),E.push(G))}for(A=0;A<E.length;A++)if(G=this.view.getState(E[A]),null!=G&&(this.model.isEdge(G.cell)||this.model.isVertex(G.cell))&&this.isCellDeletable(G.cell)&&this.isTransparentState(G)){for(var L=!0,X=0;X<this.model.getChildCount(G.cell)&&L;X++)z.get(this.model.getChildAt(G.cell,X))||(L=!1);L&&t.push(G.cell)}}mxGraph.prototype.cellsRemoved.apply(this, arguments)};Graph.prototype.removeCellsAfterUngroup=function(t){for(var z=[],A=0;A<t.length;A++)this.isCellDeletable(t[A])&&this.isTransparentState(this.view.getState(t[A]))&&z.push(t[A]);t=z;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(t,z){this.setAttributeForCell(t,"link",z)};Graph.prototype.setTooltipForCell=function(t,z){var A="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(t.value)&&t.value.hasAttribute("tooltip_"+ Graph.diagramLanguage)&&(A="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(t,A,z)};Graph.prototype.getAttributeForCell=function(t,z,A){t=null!=t.value&&"object"===typeof t.value?t.value.getAttribute(z):null;return null!=t?t:A};Graph.prototype.setAttributeForCell=function(t,z,A){if(null!=t.value&&"object"==typeof t.value)var E=t.value.cloneNode(!0);else E=mxUtils.createXmlDocument().createElement("UserObject"),E.setAttribute("label",t.value||"");null!=A?E.setAttribute(z,A):E.removeAttribute(z); -this.model.setValue(t,E)};var D=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(t,z,A,E){this.getModel();if(mxEvent.isAltDown(z))return null;for(var H=0;H<t.length;H++){var L=this.model.getParent(t[H]);if(this.model.isEdge(L)&&0>mxUtils.indexOf(t,L))return null}L=D.apply(this,arguments);var W=!0;for(H=0;H<t.length&&W;H++)W=W&&this.isTableRow(t[H]);W&&(this.isTableCell(L)&&(L=this.model.getParent(L)),this.isTableRow(L)&&(L=this.model.getParent(L)),this.isTable(L)||(L=null));return L}; +this.model.setValue(t,E)};var D=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(t,z,A,E){this.getModel();if(mxEvent.isAltDown(z))return null;for(var G=0;G<t.length;G++){var L=this.model.getParent(t[G]);if(this.model.isEdge(L)&&0>mxUtils.indexOf(t,L))return null}L=D.apply(this,arguments);var X=!0;for(G=0;G<t.length&&X;G++)X=X&&this.isTableRow(t[G]);X&&(this.isTableCell(L)&&(L=this.model.getParent(L)),this.isTableRow(L)&&(L=this.model.getParent(L)),this.isTable(L)||(L=null));return L}; Graph.prototype.click=function(t){mxGraph.prototype.click.call(this,t);this.firstClickState=t.getState();this.firstClickSource=t.getSource()};Graph.prototype.dblClick=function(t,z){this.isEnabled()&&(z=this.insertTextForEvent(t,z),mxGraph.prototype.dblClick.call(this,t,z))};Graph.prototype.insertTextForEvent=function(t,z){var A=mxUtils.convertPoint(this.container,mxEvent.getClientX(t),mxEvent.getClientY(t));if(null!=t&&!this.model.isVertex(z)){var E=this.model.isEdge(z)?this.view.getState(z):null, -H=mxEvent.getSource(t);this.firstClickState!=E||this.firstClickSource!=H||null!=E&&null!=E.text&&null!=E.text.node&&null!=E.text.boundingBox&&(mxUtils.contains(E.text.boundingBox,A.x,A.y)||mxUtils.isAncestorNode(E.text.node,mxEvent.getSource(t)))||(null!=E||this.isCellLocked(this.getDefaultParent()))&&(null==E||this.isCellLocked(E.cell))||!(null!=E||mxClient.IS_SVG&&H==this.view.getCanvas().ownerSVGElement)||(null==E&&(E=this.view.getState(this.getCellAt(A.x,A.y))),z=this.addText(A.x,A.y,E))}return z}; -Graph.prototype.getInsertPoint=function(){var t=this.getGridSize(),z=this.container.scrollLeft/this.view.scale-this.view.translate.x,A=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var E=this.getPageLayout(),H=this.getPageSize();z=Math.max(z,E.x*H.width);A=Math.max(A,E.y*H.height)}return new mxPoint(this.snap(z+t),this.snap(A+t))};Graph.prototype.getFreeInsertPoint=function(){var t=this.view,z=this.getGraphBounds(),A=this.getInsertPoint(),E=this.snap(Math.round(Math.max(A.x, +G=mxEvent.getSource(t);this.firstClickState!=E||this.firstClickSource!=G||null!=E&&null!=E.text&&null!=E.text.node&&null!=E.text.boundingBox&&(mxUtils.contains(E.text.boundingBox,A.x,A.y)||mxUtils.isAncestorNode(E.text.node,mxEvent.getSource(t)))||(null!=E||this.isCellLocked(this.getDefaultParent()))&&(null==E||this.isCellLocked(E.cell))||!(null!=E||mxClient.IS_SVG&&G==this.view.getCanvas().ownerSVGElement)||(null==E&&(E=this.view.getState(this.getCellAt(A.x,A.y))),z=this.addText(A.x,A.y,E))}return z}; +Graph.prototype.getInsertPoint=function(){var t=this.getGridSize(),z=this.container.scrollLeft/this.view.scale-this.view.translate.x,A=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var E=this.getPageLayout(),G=this.getPageSize();z=Math.max(z,E.x*G.width);A=Math.max(A,E.y*G.height)}return new mxPoint(this.snap(z+t),this.snap(A+t))};Graph.prototype.getFreeInsertPoint=function(){var t=this.view,z=this.getGraphBounds(),A=this.getInsertPoint(),E=this.snap(Math.round(Math.max(A.x, z.x/t.scale-t.translate.x+(0==z.width?2*this.gridSize:0))));t=this.snap(Math.round(Math.max(A.y,(z.y+z.height)/t.scale-t.translate.y+2*this.gridSize)));return new mxPoint(E,t)};Graph.prototype.getCenterInsertPoint=function(t){t=null!=t?t:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-t.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/ 2)/this.view.scale-this.view.translate.y-t.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-t.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-t.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(t,z,A){var E=new mxCell;E.value="Text";E.geometry=new mxGeometry(0,0,0,0);E.vertex=!0;if(null!=A&&this.model.isEdge(A.cell)){E.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];"; -E.geometry.relative=!0;E.connectable=!1;var H=this.view.getRelativePoint(A,t,z);E.geometry.x=Math.round(1E4*H.x)/1E4;E.geometry.y=Math.round(H.y);E.geometry.offset=new mxPoint(0,0);H=this.view.getPoint(A,E.geometry);var L=this.view.scale;E.geometry.offset=new mxPoint(Math.round((t-H.x)/L),Math.round((z-H.y)/L))}else H=this.view.translate,E.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",E.geometry.width=40,E.geometry.height=20,E.geometry.x=Math.round(t/this.view.scale)- -H.x-(null!=A?A.origin.x:0),E.geometry.y=Math.round(z/this.view.scale)-H.y-(null!=A?A.origin.y:0),E.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([E],null!=A?A.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[E])),this.autoSizeCell(E)}finally{this.getModel().endUpdate()}return E};Graph.prototype.addClickHandler=function(t,z,A){var E=mxUtils.bind(this,function(){var ea=this.container.getElementsByTagName("a");if(null!=ea)for(var ja=0;ja<ea.length;ja++){var ta= -this.getAbsoluteUrl(ea[ja].getAttribute("href"));null!=ta&&(ea[ja].setAttribute("rel",this.linkRelation),ea[ja].setAttribute("href",ta),null!=z&&mxEvent.addGestureListeners(ea[ja],null,null,z))}});this.model.addListener(mxEvent.CHANGE,E);E();var H=this.container.style.cursor,L=this.getTolerance(),W=this,ia={currentState:null,currentLink:null,currentTarget:null,highlight:null!=t&&""!=t&&t!=mxConstants.NONE?new mxCellHighlight(W,t,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ea){var ja= -ea.sourceState;if(null==ja||null==W.getLinkForCell(ja.cell))ea=W.getCellAt(ea.getGraphX(),ea.getGraphY(),null,null,null,function(ta,Aa,Ea){return null==W.getLinkForCell(ta.cell)}),ja=null==ja||W.model.isAncestor(ea,ja.cell)?W.view.getState(ea):null;ja!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ja,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(ea,ja){this.startX=ja.getGraphX();this.startY=ja.getGraphY();this.scrollLeft=W.container.scrollLeft; -this.scrollTop=W.container.scrollTop;null==this.currentLink&&"auto"==W.container.style.overflow&&(W.container.style.cursor="move");this.updateCurrentState(ja)},mouseMove:function(ea,ja){if(W.isMouseDown)null!=this.currentLink&&(ea=Math.abs(this.startX-ja.getGraphX()),ja=Math.abs(this.startY-ja.getGraphY()),(ea>L||ja>L)&&this.clear());else{for(ea=ja.getSource();null!=ea&&"a"!=ea.nodeName.toLowerCase();)ea=ea.parentNode;null!=ea?this.clear():(null!=W.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&& -W.tooltipHandler.reset(ja,!0,this.currentState),(null==this.currentState||ja.getState()!=this.currentState&&null!=ja.sourceState||!W.intersects(this.currentState,ja.getGraphX(),ja.getGraphY()))&&this.updateCurrentState(ja))}},mouseUp:function(ea,ja){var ta=ja.getSource();for(ea=ja.getEvent();null!=ta&&"a"!=ta.nodeName.toLowerCase();)ta=ta.parentNode;null==ta&&Math.abs(this.scrollLeft-W.container.scrollLeft)<L&&Math.abs(this.scrollTop-W.container.scrollTop)<L&&(null==ja.sourceState||!ja.isSource(ja.sourceState.control))&& -((mxEvent.isLeftMouseButton(ea)||mxEvent.isMiddleMouseButton(ea))&&!mxEvent.isPopupTrigger(ea)||mxEvent.isTouchEvent(ea))&&(null!=this.currentLink?(ta=W.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&ta||null==z||z(ea,this.currentLink),mxEvent.isConsumed(ea)||(ea=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ea)?"_blank":ta?W.linkTarget:"_top",W.openLink(this.currentLink,ea),ja.consume())):null!=A&&!ja.isConsumed()&&Math.abs(this.scrollLeft-W.container.scrollLeft)< -L&&Math.abs(this.scrollTop-W.container.scrollTop)<L&&Math.abs(this.startX-ja.getGraphX())<L&&Math.abs(this.startY-ja.getGraphY())<L&&A(ja.getEvent()));this.clear()},activate:function(ea){this.currentLink=W.getAbsoluteUrl(W.getLinkForCell(ea.cell));null!=this.currentLink&&(this.currentTarget=W.getLinkTargetForCell(ea.cell),W.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ea))},clear:function(){null!=W.container&&(W.container.style.cursor=H);this.currentLink=this.currentState= -this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=W.tooltipHandler&&W.tooltipHandler.hide()}};W.click=function(ea){};W.addMouseListener(ia);mxEvent.addListener(document,"mouseleave",function(ea){ia.clear()})};Graph.prototype.duplicateCells=function(t,z){t=null!=t?t:this.getSelectionCells();z=null!=z?z:!0;for(var A=0;A<t.length;A++)this.isTableCell(t[A])&&(t[A]=this.model.getParent(t[A]));t=this.model.getTopmostCells(t);var E=this.getModel(),H=this.gridSize,L=[];E.beginUpdate(); -try{var W={},ia=this.createCellLookup(t),ea=this.cloneCells(t,!1,W,!0);for(A=0;A<t.length;A++){var ja=E.getParent(t[A]);if(null!=ja){var ta=this.moveCells([ea[A]],H,H,!1)[0];L.push(ta);if(z)E.add(ja,ea[A]);else{var Aa=ja.getIndex(t[A]);E.add(ja,ea[A],Aa+1)}if(this.isTable(ja)){var Ea=this.getCellGeometry(ea[A]),Ma=this.getCellGeometry(ja);null!=Ea&&null!=Ma&&(Ma=Ma.clone(),Ma.height+=Ea.height,E.setGeometry(ja,Ma))}}else L.push(ea[A])}this.updateCustomLinks(this.createCellMapping(W,ia),ea,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED, -"cells",ea))}finally{E.endUpdate()}return L};Graph.prototype.insertImage=function(t,z,A){if(null!=t&&null!=this.cellEditor.textarea){for(var E=this.cellEditor.textarea.getElementsByTagName("img"),H=[],L=0;L<E.length;L++)H.push(E[L]);document.execCommand("insertimage",!1,t);t=this.cellEditor.textarea.getElementsByTagName("img");if(t.length==H.length+1)for(L=t.length-1;0<=L;L--)if(0==L||t[L]!=H[L-1]){t[L].setAttribute("width",z);t[L].setAttribute("height",A);break}}};Graph.prototype.insertLink=function(t){if(null!= +E.geometry.relative=!0;E.connectable=!1;var G=this.view.getRelativePoint(A,t,z);E.geometry.x=Math.round(1E4*G.x)/1E4;E.geometry.y=Math.round(G.y);E.geometry.offset=new mxPoint(0,0);G=this.view.getPoint(A,E.geometry);var L=this.view.scale;E.geometry.offset=new mxPoint(Math.round((t-G.x)/L),Math.round((z-G.y)/L))}else G=this.view.translate,E.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",E.geometry.width=40,E.geometry.height=20,E.geometry.x=Math.round(t/this.view.scale)- +G.x-(null!=A?A.origin.x:0),E.geometry.y=Math.round(z/this.view.scale)-G.y-(null!=A?A.origin.y:0),E.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([E],null!=A?A.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[E])),this.autoSizeCell(E)}finally{this.getModel().endUpdate()}return E};Graph.prototype.addClickHandler=function(t,z,A){var E=mxUtils.bind(this,function(){var ea=this.container.getElementsByTagName("a");if(null!=ea)for(var ka=0;ka<ea.length;ka++){var va= +this.getAbsoluteUrl(ea[ka].getAttribute("href"));null!=va&&(ea[ka].setAttribute("rel",this.linkRelation),ea[ka].setAttribute("href",va),null!=z&&mxEvent.addGestureListeners(ea[ka],null,null,z))}});this.model.addListener(mxEvent.CHANGE,E);E();var G=this.container.style.cursor,L=this.getTolerance(),X=this,ia={currentState:null,currentLink:null,currentTarget:null,highlight:null!=t&&""!=t&&t!=mxConstants.NONE?new mxCellHighlight(X,t,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ea){var ka= +ea.sourceState;if(null==ka||null==X.getLinkForCell(ka.cell))ea=X.getCellAt(ea.getGraphX(),ea.getGraphY(),null,null,null,function(va,Ba,Ea){return null==X.getLinkForCell(va.cell)}),ka=null==ka||X.model.isAncestor(ea,ka.cell)?X.view.getState(ea):null;ka!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ka,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(ea,ka){this.startX=ka.getGraphX();this.startY=ka.getGraphY();this.scrollLeft=X.container.scrollLeft; +this.scrollTop=X.container.scrollTop;null==this.currentLink&&"auto"==X.container.style.overflow&&(X.container.style.cursor="move");this.updateCurrentState(ka)},mouseMove:function(ea,ka){if(X.isMouseDown)null!=this.currentLink&&(ea=Math.abs(this.startX-ka.getGraphX()),ka=Math.abs(this.startY-ka.getGraphY()),(ea>L||ka>L)&&this.clear());else{for(ea=ka.getSource();null!=ea&&"a"!=ea.nodeName.toLowerCase();)ea=ea.parentNode;null!=ea?this.clear():(null!=X.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&& +X.tooltipHandler.reset(ka,!0,this.currentState),(null==this.currentState||ka.getState()!=this.currentState&&null!=ka.sourceState||!X.intersects(this.currentState,ka.getGraphX(),ka.getGraphY()))&&this.updateCurrentState(ka))}},mouseUp:function(ea,ka){var va=ka.getSource();for(ea=ka.getEvent();null!=va&&"a"!=va.nodeName.toLowerCase();)va=va.parentNode;null==va&&Math.abs(this.scrollLeft-X.container.scrollLeft)<L&&Math.abs(this.scrollTop-X.container.scrollTop)<L&&(null==ka.sourceState||!ka.isSource(ka.sourceState.control))&& +((mxEvent.isLeftMouseButton(ea)||mxEvent.isMiddleMouseButton(ea))&&!mxEvent.isPopupTrigger(ea)||mxEvent.isTouchEvent(ea))&&(null!=this.currentLink?(va=X.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&va||null==z||z(ea,this.currentLink),mxEvent.isConsumed(ea)||(ea=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ea)?"_blank":va?X.linkTarget:"_top",X.openLink(this.currentLink,ea),ka.consume())):null!=A&&!ka.isConsumed()&&Math.abs(this.scrollLeft-X.container.scrollLeft)< +L&&Math.abs(this.scrollTop-X.container.scrollTop)<L&&Math.abs(this.startX-ka.getGraphX())<L&&Math.abs(this.startY-ka.getGraphY())<L&&A(ka.getEvent()));this.clear()},activate:function(ea){this.currentLink=X.getAbsoluteUrl(X.getLinkForCell(ea.cell));null!=this.currentLink&&(this.currentTarget=X.getLinkTargetForCell(ea.cell),X.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ea))},clear:function(){null!=X.container&&(X.container.style.cursor=G);this.currentLink=this.currentState= +this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=X.tooltipHandler&&X.tooltipHandler.hide()}};X.click=function(ea){};X.addMouseListener(ia);mxEvent.addListener(document,"mouseleave",function(ea){ia.clear()})};Graph.prototype.duplicateCells=function(t,z){t=null!=t?t:this.getSelectionCells();z=null!=z?z:!0;for(var A=0;A<t.length;A++)this.isTableCell(t[A])&&(t[A]=this.model.getParent(t[A]));t=this.model.getTopmostCells(t);var E=this.getModel(),G=this.gridSize,L=[];E.beginUpdate(); +try{var X={},ia=this.createCellLookup(t),ea=this.cloneCells(t,!1,X,!0);for(A=0;A<t.length;A++){var ka=E.getParent(t[A]);if(null!=ka){var va=this.moveCells([ea[A]],G,G,!1)[0];L.push(va);if(z)E.add(ka,ea[A]);else{var Ba=ka.getIndex(t[A]);E.add(ka,ea[A],Ba+1)}if(this.isTable(ka)){var Ea=this.getCellGeometry(ea[A]),Ma=this.getCellGeometry(ka);null!=Ea&&null!=Ma&&(Ma=Ma.clone(),Ma.height+=Ea.height,E.setGeometry(ka,Ma))}}else L.push(ea[A])}this.updateCustomLinks(this.createCellMapping(X,ia),ea,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED, +"cells",ea))}finally{E.endUpdate()}return L};Graph.prototype.insertImage=function(t,z,A){if(null!=t&&null!=this.cellEditor.textarea){for(var E=this.cellEditor.textarea.getElementsByTagName("img"),G=[],L=0;L<E.length;L++)G.push(E[L]);document.execCommand("insertimage",!1,t);t=this.cellEditor.textarea.getElementsByTagName("img");if(t.length==G.length+1)for(L=t.length-1;0<=L;L--)if(0==L||t[L]!=G[L-1]){t[L].setAttribute("width",z);t[L].setAttribute("height",A);break}}};Graph.prototype.insertLink=function(t){if(null!= this.cellEditor.textarea)if(0==t.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var z=this.cellEditor.textarea.getElementsByTagName("a"),A=[],E=0;E<z.length;E++)A.push(z[E]);document.execCommand("createlink",!1,mxUtils.trim(t));z=this.cellEditor.textarea.getElementsByTagName("a");if(z.length==A.length+1)for(E=z.length-1;0<=E;E--)if(z[E]!=A[E-1]){for(z=z[E].getElementsByTagName("a");0<z.length;){for(A=z[0].parentNode;null!=z[0].firstChild;)A.insertBefore(z[0].firstChild,z[0]); A.removeChild(z[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(t))};Graph.prototype.isCellResizable=function(t){var z=mxGraph.prototype.isCellResizable.apply(this,arguments),A=this.getCurrentCellStyle(t);return!this.isTableCell(t)&&!this.isTableRow(t)&&(z||"0"!=mxUtils.getValue(A,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==A[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(t,z){null==z&&(z=this.getSelectionCells());if(null!=z&&1<z.length){for(var A=[],E=null, -H=null,L=0;L<z.length;L++)if(this.getModel().isVertex(z[L])){var W=this.view.getState(z[L]);if(null!=W){var ia=t?W.getCenterX():W.getCenterY();E=null!=E?Math.max(E,ia):ia;H=null!=H?Math.min(H,ia):ia;A.push(W)}}if(2<A.length){A.sort(function(Aa,Ea){return t?Aa.x-Ea.x:Aa.y-Ea.y});W=this.view.translate;ia=this.view.scale;H=H/ia-(t?W.x:W.y);E=E/ia-(t?W.x:W.y);this.getModel().beginUpdate();try{var ea=(E-H)/(A.length-1);E=H;for(L=1;L<A.length-1;L++){var ja=this.view.getState(this.model.getParent(A[L].cell)), -ta=this.getCellGeometry(A[L].cell);E+=ea;null!=ta&&null!=ja&&(ta=ta.clone(),t?ta.x=Math.round(E-ta.width/2)-ja.origin.x:ta.y=Math.round(E-ta.height/2)-ja.origin.y,this.getModel().setGeometry(A[L].cell,ta))}}finally{this.getModel().endUpdate()}}}return z};Graph.prototype.isCloneEvent=function(t){return mxClient.IS_MAC&&mxEvent.isMetaDown(t)||mxEvent.isControlDown(t)};Graph.prototype.createSvgImageExport=function(){var t=new mxImageExport;t.getLinkForCellState=mxUtils.bind(this,function(z,A){return this.getLinkForCell(z.cell)}); -return t};Graph.prototype.parseBackgroundImage=function(t){var z=null;null!=t&&0<t.length&&(t=JSON.parse(t),z=new mxImage(t.src,t.width,t.height));return z};Graph.prototype.getBackgroundImageObject=function(t){return t};Graph.prototype.getSvg=function(t,z,A,E,H,L,W,ia,ea,ja,ta,Aa,Ea,Ma){var La=null;if(null!=Ma)for(La=new mxDictionary,ta=0;ta<Ma.length;ta++)La.put(Ma[ta],!0);if(Ma=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{z=null!=z?z:1;A=null!=A? -A:0;H=null!=H?H:!0;L=null!=L?L:!0;W=null!=W?W:!0;ja=null!=ja?ja:!1;var Ia="page"==Ea?this.view.getBackgroundPageBounds():L&&null==La||E||"diagram"==Ea?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Fa=this.view.scale;"diagram"==Ea&&null!=this.backgroundImage&&(Ia=mxRectangle.fromRectangle(Ia),Ia.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*Fa,(this.view.translate.y+this.backgroundImage.y)*Fa,this.backgroundImage.width*Fa,this.backgroundImage.height*Fa))); -if(null==Ia)throw Error(mxResources.get("drawingEmpty"));E=z/Fa;Ea=H?-.5:0;var Ga=Graph.createSvgNode(Ea,Ea,Math.max(1,Math.ceil(Ia.width*E)+2*A)+(ja&&0==A?5:0),Math.max(1,Math.ceil(Ia.height*E)+2*A)+(ja&&0==A?5:0),t),Oa=Ga.ownerDocument,Pa=null!=Oa.createElementNS?Oa.createElementNS(mxConstants.NS_SVG,"g"):Oa.createElement("g");Ga.appendChild(Pa);var Na=this.createSvgCanvas(Pa);Na.foOffset=H?-.5:0;Na.textOffset=H?-.5:0;Na.imageOffset=H?-.5:0;Na.translate(Math.floor(A/z-Ia.x/Fa),Math.floor(A/z-Ia.y/ +G=null,L=0;L<z.length;L++)if(this.getModel().isVertex(z[L])){var X=this.view.getState(z[L]);if(null!=X){var ia=t?X.getCenterX():X.getCenterY();E=null!=E?Math.max(E,ia):ia;G=null!=G?Math.min(G,ia):ia;A.push(X)}}if(2<A.length){A.sort(function(Ba,Ea){return t?Ba.x-Ea.x:Ba.y-Ea.y});X=this.view.translate;ia=this.view.scale;G=G/ia-(t?X.x:X.y);E=E/ia-(t?X.x:X.y);this.getModel().beginUpdate();try{var ea=(E-G)/(A.length-1);E=G;for(L=1;L<A.length-1;L++){var ka=this.view.getState(this.model.getParent(A[L].cell)), +va=this.getCellGeometry(A[L].cell);E+=ea;null!=va&&null!=ka&&(va=va.clone(),t?va.x=Math.round(E-va.width/2)-ka.origin.x:va.y=Math.round(E-va.height/2)-ka.origin.y,this.getModel().setGeometry(A[L].cell,va))}}finally{this.getModel().endUpdate()}}}return z};Graph.prototype.isCloneEvent=function(t){return mxClient.IS_MAC&&mxEvent.isMetaDown(t)||mxEvent.isControlDown(t)};Graph.prototype.createSvgImageExport=function(){var t=new mxImageExport;t.getLinkForCellState=mxUtils.bind(this,function(z,A){return this.getLinkForCell(z.cell)}); +return t};Graph.prototype.parseBackgroundImage=function(t){var z=null;null!=t&&0<t.length&&(t=JSON.parse(t),z=new mxImage(t.src,t.width,t.height));return z};Graph.prototype.getBackgroundImageObject=function(t){return t};Graph.prototype.getSvg=function(t,z,A,E,G,L,X,ia,ea,ka,va,Ba,Ea,Ma){var La=null;if(null!=Ma)for(La=new mxDictionary,va=0;va<Ma.length;va++)La.put(Ma[va],!0);if(Ma=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{z=null!=z?z:1;A=null!=A? +A:0;G=null!=G?G:!0;L=null!=L?L:!0;X=null!=X?X:!0;ka=null!=ka?ka:!1;var Ia="page"==Ea?this.view.getBackgroundPageBounds():L&&null==La||E||"diagram"==Ea?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Fa=this.view.scale;"diagram"==Ea&&null!=this.backgroundImage&&(Ia=mxRectangle.fromRectangle(Ia),Ia.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*Fa,(this.view.translate.y+this.backgroundImage.y)*Fa,this.backgroundImage.width*Fa,this.backgroundImage.height*Fa))); +if(null==Ia)throw Error(mxResources.get("drawingEmpty"));E=z/Fa;Ea=G?-.5:0;var Ga=Graph.createSvgNode(Ea,Ea,Math.max(1,Math.ceil(Ia.width*E)+2*A)+(ka&&0==A?5:0),Math.max(1,Math.ceil(Ia.height*E)+2*A)+(ka&&0==A?5:0),t),Oa=Ga.ownerDocument,Pa=null!=Oa.createElementNS?Oa.createElementNS(mxConstants.NS_SVG,"g"):Oa.createElement("g");Ga.appendChild(Pa);var Na=this.createSvgCanvas(Pa);Na.foOffset=G?-.5:0;Na.textOffset=G?-.5:0;Na.imageOffset=G?-.5:0;Na.translate(Math.floor(A/z-Ia.x/Fa),Math.floor(A/z-Ia.y/ Fa));var Sa=document.createElement("div"),eb=Na.getAlternateText;Na.getAlternateText=function($a,lb,Wa,gb,hb,Xa,sb,qb,ub,nb,fb,Ra,rb){if(null!=Xa&&0<this.state.fontSize)try{mxUtils.isNode(Xa)?Xa=Xa.innerText:(Sa.innerHTML=Xa,Xa=mxUtils.extractTextWithWhitespace(Sa.childNodes));for(var tb=Math.ceil(2*gb/this.state.fontSize),ib=[],jb=0,mb=0;(0==tb||jb<tb)&&mb<Xa.length;){var ob=Xa.charCodeAt(mb);if(10==ob||13==ob){if(0<jb)break}else ib.push(Xa.charAt(mb)),255>ob&&jb++;mb++}ib.length<Xa.length&&1<Xa.length- -ib.length&&(Xa=mxUtils.trim(ib.join(""))+"...");return Xa}catch(yb){return eb.apply(this,arguments)}else return eb.apply(this,arguments)};var bb=this.backgroundImage;if(null!=bb){t=Fa/z;var pb=this.view.translate;Ea=new mxRectangle((bb.x+pb.x)*t,(bb.y+pb.y)*t,bb.width*t,bb.height*t);mxUtils.intersects(Ia,Ea)&&Na.image(bb.x+pb.x,bb.y+pb.y,bb.width,bb.height,bb.src,!0)}Na.scale(E);Na.textEnabled=W;ia=null!=ia?ia:this.createSvgImageExport();var vb=ia.drawCellState,wb=ia.getLinkForCellState;ia.getLinkForCellState= +ib.length&&(Xa=mxUtils.trim(ib.join(""))+"...");return Xa}catch(yb){return eb.apply(this,arguments)}else return eb.apply(this,arguments)};var bb=this.backgroundImage;if(null!=bb){t=Fa/z;var pb=this.view.translate;Ea=new mxRectangle((bb.x+pb.x)*t,(bb.y+pb.y)*t,bb.width*t,bb.height*t);mxUtils.intersects(Ia,Ea)&&Na.image(bb.x+pb.x,bb.y+pb.y,bb.width,bb.height,bb.src,!0)}Na.scale(E);Na.textEnabled=X;ia=null!=ia?ia:this.createSvgImageExport();var vb=ia.drawCellState,wb=ia.getLinkForCellState;ia.getLinkForCellState= function($a,lb){var Wa=wb.apply(this,arguments);return null==Wa||$a.view.graph.isCustomLink(Wa)?null:Wa};ia.getLinkTargetForCellState=function($a,lb){return $a.view.graph.getLinkTargetForCell($a.cell)};ia.drawCellState=function($a,lb){for(var Wa=$a.view.graph,gb=null!=La?La.get($a.cell):Wa.isCellSelected($a.cell),hb=Wa.model.getParent($a.cell);!(L&&null==La||gb)&&null!=hb;)gb=null!=La?La.get(hb):Wa.isCellSelected(hb),hb=Wa.model.getParent(hb);if(L&&null==La||gb)Wa.view.redrawEnumerationState($a), vb.apply(this,arguments),this.doDrawShape($a.secondLabel,lb)};ia.drawState(this.getView().getState(this.model.root),Na);this.updateSvgLinks(Ga,ea,!0);this.addForeignObjectWarning(Na,Ga);return Ga}finally{Ma&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(t,z){if("0"!=urlParams["svg-warning"]&&0<z.getElementsByTagName("foreignObject").length){var A=t.createElement("switch"),E=t.createElement("g");E.setAttribute("requiredFeatures", -"http://www.w3.org/TR/SVG11/feature#Extensibility");var H=t.createElement("a");H.setAttribute("transform","translate(0,-5)");null==H.setAttributeNS||z.ownerDocument!=document&&null==document.documentMode?(H.setAttribute("xlink:href",Graph.foreignObjectWarningLink),H.setAttribute("target","_blank")):(H.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),H.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));t=t.createElement("text");t.setAttribute("text-anchor","middle"); -t.setAttribute("font-size","10px");t.setAttribute("x","50%");t.setAttribute("y","100%");mxUtils.write(t,Graph.foreignObjectWarningText);A.appendChild(E);H.appendChild(t);A.appendChild(H);z.appendChild(A)}};Graph.prototype.updateSvgLinks=function(t,z,A){t=t.getElementsByTagName("a");for(var E=0;E<t.length;E++)if(null==t[E].getAttribute("target")){var H=t[E].getAttribute("href");null==H&&(H=t[E].getAttribute("xlink:href"));null!=H&&(null!=z&&/^https?:\/\//.test(H)?t[E].setAttribute("target",z):A&&this.isCustomLink(H)&& +"http://www.w3.org/TR/SVG11/feature#Extensibility");var G=t.createElement("a");G.setAttribute("transform","translate(0,-5)");null==G.setAttributeNS||z.ownerDocument!=document&&null==document.documentMode?(G.setAttribute("xlink:href",Graph.foreignObjectWarningLink),G.setAttribute("target","_blank")):(G.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),G.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));t=t.createElement("text");t.setAttribute("text-anchor","middle"); +t.setAttribute("font-size","10px");t.setAttribute("x","50%");t.setAttribute("y","100%");mxUtils.write(t,Graph.foreignObjectWarningText);A.appendChild(E);G.appendChild(t);A.appendChild(G);z.appendChild(A)}};Graph.prototype.updateSvgLinks=function(t,z,A){t=t.getElementsByTagName("a");for(var E=0;E<t.length;E++)if(null==t[E].getAttribute("target")){var G=t[E].getAttribute("href");null==G&&(G=t[E].getAttribute("xlink:href"));null!=G&&(null!=z&&/^https?:\/\//.test(G)?t[E].setAttribute("target",z):A&&this.isCustomLink(G)&& t[E].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(t){t=new mxSvgCanvas2D(t);t.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;t.pointerEvents=!0;return t};Graph.prototype.getSelectedElement=function(){var t=null;if(window.getSelection){var z=window.getSelection();z.getRangeAt&&z.rangeCount&&(t=z.getRangeAt(0).commonAncestorContainer)}else document.selection&&(t=document.selection.createRange().parentElement());return t};Graph.prototype.getSelectedEditingElement= function(){for(var t=this.getSelectedElement();null!=t&&t.nodeType!=mxConstants.NODETYPE_ELEMENT;)t=t.parentNode;null!=t&&t==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(t=this.cellEditor.textarea.firstChild);return t};Graph.prototype.getParentByName=function(t,z,A){for(;null!=t&&t.nodeName!=z;){if(t==A)return null;t=t.parentNode}return t};Graph.prototype.getParentByNames=function(t,z,A){for(;null!= t&&!(0<=mxUtils.indexOf(z,t.nodeName));){if(t==A)return null;t=t.parentNode}return t};Graph.prototype.selectNode=function(t){var z=null;if(window.getSelection){if(z=window.getSelection(),z.getRangeAt&&z.rangeCount){var A=document.createRange();A.selectNode(t);z.removeAllRanges();z.addRange(A)}}else(z=document.selection)&&"Control"!=z.type&&(t=z.createRange(),t.collapse(!0),A=z.createRange(),A.setEndPoint("StartToStart",t),A.select())};Graph.prototype.flipEdgePoints=function(t,z,A){var E=this.getCellGeometry(t); -if(null!=E){E=E.clone();if(null!=E.points)for(var H=0;H<E.points.length;H++)z?E.points[H].x=A+(A-E.points[H].x):E.points[H].y=A+(A-E.points[H].y);H=function(L){null!=L&&(z?L.x=A+(A-L.x):L.y=A+(A-L.y))};H(E.getTerminalPoint(!0));H(E.getTerminalPoint(!1));this.model.setGeometry(t,E)}};Graph.prototype.flipChildren=function(t,z,A){this.model.beginUpdate();try{for(var E=this.model.getChildCount(t),H=0;H<E;H++){var L=this.model.getChildAt(t,H);if(this.model.isEdge(L))this.flipEdgePoints(L,z,A);else{var W= -this.getCellGeometry(L);null!=W&&(W=W.clone(),z?W.x=A+(A-W.x-W.width):W.y=A+(A-W.y-W.height),this.model.setGeometry(L,W))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(t,z){this.model.beginUpdate();try{t=this.model.getTopmostCells(t);for(var A=[],E=0;E<t.length;E++)if(this.model.isEdge(t[E])){var H=this.view.getState(t[E]);null!=H&&this.flipEdgePoints(t[E],z,(z?H.getCenterX():H.getCenterY())/this.view.scale-(z?H.origin.x:H.origin.y)-(z?this.view.translate.x:this.view.translate.y))}else{var L= -this.getCellGeometry(t[E]);null!=L&&this.flipChildren(t[E],z,z?L.getCenterX()-L.x:L.getCenterY()-L.y);A.push(t[E])}this.toggleCellStyles(z?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,A)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(t,z){var A=null;if(null!=t&&0<t.length){this.model.beginUpdate();try{for(var E=0;E<t.length;E++){var H=this.model.getParent(t[E]);if(this.isTable(H)){var L=this.getCellGeometry(t[E]),W=this.getCellGeometry(H);null!=L&&null!=W&&(W=W.clone(), -W.height-=L.height,this.model.setGeometry(H,W))}}var ia=this.selectParentAfterDelete?this.model.getParents(t):null;this.removeCells(t,z)}finally{this.model.endUpdate()}if(null!=ia)for(A=[],E=0;E<ia.length;E++)this.model.contains(ia[E])&&(this.model.isVertex(ia[E])||this.model.isEdge(ia[E]))&&A.push(ia[E])}return A};Graph.prototype.insertTableColumn=function(t,z){var A=this.getModel();A.beginUpdate();try{var E=t,H=0;if(this.isTableCell(t)){var L=A.getParent(t);E=A.getParent(L);H=mxUtils.indexOf(A.getChildCells(L, -!0),t)}else this.isTableRow(t)?E=A.getParent(t):t=A.getChildCells(E,!0)[0],z||(H=A.getChildCells(t,!0).length-1);var W=A.getChildCells(E,!0),ia=Graph.minTableColumnWidth;for(t=0;t<W.length;t++){var ea=A.getChildCells(W[t],!0)[H],ja=A.cloneCell(ea,!1),ta=this.getCellGeometry(ja);ja.value=null;ja.style=mxUtils.setStyle(mxUtils.setStyle(ja.style,"rowspan",null),"colspan",null);if(null!=ta){null!=ta.alternateBounds&&(ta.width=ta.alternateBounds.width,ta.height=ta.alternateBounds.height,ta.alternateBounds= -null);ia=ta.width;var Aa=this.getCellGeometry(W[t]);null!=Aa&&(ta.height=Aa.height)}A.add(W[t],ja,H+(z?0:1))}var Ea=this.getCellGeometry(E);null!=Ea&&(Ea=Ea.clone(),Ea.width+=ia,A.setGeometry(E,Ea))}finally{A.endUpdate()}};Graph.prototype.deleteLane=function(t){var z=this.getModel();z.beginUpdate();try{var A=null;A="stackLayout"==this.getCurrentCellStyle(t).childLayout?t:z.getParent(t);var E=z.getChildCells(A,!0);0==E.length?z.remove(A):(A==t&&(t=E[E.length-1]),z.remove(t))}finally{z.endUpdate()}}; -Graph.prototype.insertLane=function(t,z){var A=this.getModel();A.beginUpdate();try{var E=null;if("stackLayout"==this.getCurrentCellStyle(t).childLayout){E=t;var H=A.getChildCells(E,!0);t=H[z?0:H.length-1]}else E=A.getParent(t);var L=E.getIndex(t);t=A.cloneCell(t,!1);t.value=null;A.add(E,t,L+(z?0:1))}finally{A.endUpdate()}};Graph.prototype.insertTableRow=function(t,z){var A=this.getModel();A.beginUpdate();try{var E=t,H=t;if(this.isTableCell(t))H=A.getParent(t),E=A.getParent(H);else if(this.isTableRow(t))E= -A.getParent(t);else{var L=A.getChildCells(E,!0);H=L[z?0:L.length-1]}var W=A.getChildCells(H,!0),ia=E.getIndex(H);H=A.cloneCell(H,!1);H.value=null;var ea=this.getCellGeometry(H);if(null!=ea){for(L=0;L<W.length;L++){t=A.cloneCell(W[L],!1);t.value=null;t.style=mxUtils.setStyle(mxUtils.setStyle(t.style,"rowspan",null),"colspan",null);var ja=this.getCellGeometry(t);null!=ja&&(null!=ja.alternateBounds&&(ja.width=ja.alternateBounds.width,ja.height=ja.alternateBounds.height,ja.alternateBounds=null),ja.height= -ea.height);H.insert(t)}A.add(E,H,ia+(z?0:1));var ta=this.getCellGeometry(E);null!=ta&&(ta=ta.clone(),ta.height+=ea.height,A.setGeometry(E,ta))}}finally{A.endUpdate()}};Graph.prototype.deleteTableColumn=function(t){var z=this.getModel();z.beginUpdate();try{var A=t,E=t;this.isTableCell(t)&&(E=z.getParent(t));this.isTableRow(E)&&(A=z.getParent(E));var H=z.getChildCells(A,!0);if(0==H.length)z.remove(A);else{this.isTableRow(E)||(E=H[0]);var L=z.getChildCells(E,!0);if(1>=L.length)z.remove(A);else{var W= -L.length-1;this.isTableCell(t)&&(W=mxUtils.indexOf(L,t));for(E=t=0;E<H.length;E++){var ia=z.getChildCells(H[E],!0)[W];z.remove(ia);var ea=this.getCellGeometry(ia);null!=ea&&(t=Math.max(t,ea.width))}var ja=this.getCellGeometry(A);null!=ja&&(ja=ja.clone(),ja.width-=t,z.setGeometry(A,ja))}}}finally{z.endUpdate()}};Graph.prototype.deleteTableRow=function(t){var z=this.getModel();z.beginUpdate();try{var A=t,E=t;this.isTableCell(t)&&(t=E=z.getParent(t));this.isTableRow(t)&&(A=z.getParent(E));var H=z.getChildCells(A, -!0);if(1>=H.length)z.remove(A);else{this.isTableRow(E)||(E=H[H.length-1]);z.remove(E);t=0;var L=this.getCellGeometry(E);null!=L&&(t=L.height);var W=this.getCellGeometry(A);null!=W&&(W=W.clone(),W.height-=t,z.setGeometry(A,W))}}finally{z.endUpdate()}};Graph.prototype.insertRow=function(t,z){for(var A=t.tBodies[0],E=A.rows[0].cells,H=t=0;H<E.length;H++){var L=E[H].getAttribute("colspan");t+=null!=L?parseInt(L):1}z=A.insertRow(z);for(H=0;H<t;H++)mxUtils.br(z.insertCell(-1));return z.cells[0]};Graph.prototype.deleteRow= -function(t,z){t.tBodies[0].deleteRow(z)};Graph.prototype.insertColumn=function(t,z){var A=t.tHead;if(null!=A)for(var E=0;E<A.rows.length;E++){var H=document.createElement("th");A.rows[E].appendChild(H);mxUtils.br(H)}t=t.tBodies[0];for(A=0;A<t.rows.length;A++)E=t.rows[A].insertCell(z),mxUtils.br(E);return t.rows[0].cells[0<=z?z:t.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(t,z){if(0<=z){t=t.tBodies[0].rows;for(var A=0;A<t.length;A++)t[A].cells.length>z&&t[A].deleteCell(z)}};Graph.prototype.pasteHtmlAtCaret= -function(t){if(window.getSelection){var z=window.getSelection();if(z.getRangeAt&&z.rangeCount){z=z.getRangeAt(0);z.deleteContents();var A=document.createElement("div");A.innerHTML=t;t=document.createDocumentFragment();for(var E;E=A.firstChild;)lastNode=t.appendChild(E);z.insertNode(t)}}else(z=document.selection)&&"Control"!=z.type&&z.createRange().pasteHTML(t)};Graph.prototype.createLinkForHint=function(t,z){function A(H,L){H.length>L&&(H=H.substring(0,Math.round(L/2))+"..."+H.substring(H.length- -Math.round(L/4)));return H}t=null!=t?t:"javascript:void(0);";if(null==z||0==z.length)z=this.isCustomLink(t)?this.getLinkTitle(t):t;var E=document.createElement("a");E.setAttribute("rel",this.linkRelation);E.setAttribute("href",this.getAbsoluteUrl(t));E.setAttribute("title",A(this.isCustomLink(t)?this.getLinkTitle(t):t,80));null!=this.linkTarget&&E.setAttribute("target",this.linkTarget);mxUtils.write(E,A(z,40));this.isCustomLink(t)&&mxEvent.addListener(E,"click",mxUtils.bind(this,function(H){this.customLinkClicked(t); -mxEvent.consume(H)}));return E};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(L,W){this.popupMenuHandler.hideMenu()});var t=this.updateMouseEvent;this.updateMouseEvent=function(L){L=t.apply(this,arguments);if(mxEvent.isTouchEvent(L.getEvent())&&null==L.getState()){var W=this.getCellAt(L.graphX,L.graphY);null!=W&&this.isSwimlane(W)&&this.hitsSwimlaneContent(W,L.graphX, -L.graphY)||(L.state=this.view.getState(W),null!=L.state&&null!=L.state.shape&&(this.container.style.cursor=L.state.shape.node.style.cursor))}null==L.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return L};var z=!1,A=!1,E=!1,H=this.fireMouseEvent;this.fireMouseEvent=function(L,W,ia){L==mxEvent.MOUSE_DOWN&&(W=this.updateMouseEvent(W),z=this.isCellSelected(W.getCell()),A=this.isSelectionEmpty(),E=this.popupMenuHandler.isMenuShowing());H.apply(this,arguments)};this.popupMenuHandler.mouseUp= -mxUtils.bind(this,function(L,W){var ia=mxEvent.isMouseEvent(W.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==W.getState()||!W.isSource(W.getState().control))&&(this.popupMenuHandler.popupTrigger||!E&&!ia&&(A&&null==W.getCell()&&this.isSelectionEmpty()||z&&this.isCellSelected(W.getCell())));ia=!z||ia?null:mxUtils.bind(this,function(ea){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ja=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(W.getX()+ -ja.x+1,W.getY()+ja.y+1,ea,W.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[L,W,ia])})};mxCellEditor.prototype.isContentEditing=function(){var t=this.graph.view.getState(this.editingCell);return null!=t&&1==t.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var t="";window.getSelection?t=window.getSelection(): +if(null!=E){E=E.clone();if(null!=E.points)for(var G=0;G<E.points.length;G++)z?E.points[G].x=A+(A-E.points[G].x):E.points[G].y=A+(A-E.points[G].y);G=function(L){null!=L&&(z?L.x=A+(A-L.x):L.y=A+(A-L.y))};G(E.getTerminalPoint(!0));G(E.getTerminalPoint(!1));this.model.setGeometry(t,E)}};Graph.prototype.flipChildren=function(t,z,A){this.model.beginUpdate();try{for(var E=this.model.getChildCount(t),G=0;G<E;G++){var L=this.model.getChildAt(t,G);if(this.model.isEdge(L))this.flipEdgePoints(L,z,A);else{var X= +this.getCellGeometry(L);null!=X&&(X=X.clone(),z?X.x=A+(A-X.x-X.width):X.y=A+(A-X.y-X.height),this.model.setGeometry(L,X))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(t,z){this.model.beginUpdate();try{t=this.model.getTopmostCells(t);for(var A=[],E=0;E<t.length;E++)if(this.model.isEdge(t[E])){var G=this.view.getState(t[E]);null!=G&&this.flipEdgePoints(t[E],z,(z?G.getCenterX():G.getCenterY())/this.view.scale-(z?G.origin.x:G.origin.y)-(z?this.view.translate.x:this.view.translate.y))}else{var L= +this.getCellGeometry(t[E]);null!=L&&this.flipChildren(t[E],z,z?L.getCenterX()-L.x:L.getCenterY()-L.y);A.push(t[E])}this.toggleCellStyles(z?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,A)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(t,z){var A=null;if(null!=t&&0<t.length){this.model.beginUpdate();try{for(var E=0;E<t.length;E++){var G=this.model.getParent(t[E]);if(this.isTable(G)){var L=this.getCellGeometry(t[E]),X=this.getCellGeometry(G);null!=L&&null!=X&&(X=X.clone(), +X.height-=L.height,this.model.setGeometry(G,X))}}var ia=this.selectParentAfterDelete?this.model.getParents(t):null;this.removeCells(t,z)}finally{this.model.endUpdate()}if(null!=ia)for(A=[],E=0;E<ia.length;E++)this.model.contains(ia[E])&&(this.model.isVertex(ia[E])||this.model.isEdge(ia[E]))&&A.push(ia[E])}return A};Graph.prototype.insertTableColumn=function(t,z){var A=this.getModel();A.beginUpdate();try{var E=t,G=0;if(this.isTableCell(t)){var L=A.getParent(t);E=A.getParent(L);G=mxUtils.indexOf(A.getChildCells(L, +!0),t)}else this.isTableRow(t)?E=A.getParent(t):t=A.getChildCells(E,!0)[0],z||(G=A.getChildCells(t,!0).length-1);var X=A.getChildCells(E,!0),ia=Graph.minTableColumnWidth;for(t=0;t<X.length;t++){var ea=A.getChildCells(X[t],!0)[G],ka=A.cloneCell(ea,!1),va=this.getCellGeometry(ka);ka.value=null;ka.style=mxUtils.setStyle(mxUtils.setStyle(ka.style,"rowspan",null),"colspan",null);if(null!=va){null!=va.alternateBounds&&(va.width=va.alternateBounds.width,va.height=va.alternateBounds.height,va.alternateBounds= +null);ia=va.width;var Ba=this.getCellGeometry(X[t]);null!=Ba&&(va.height=Ba.height)}A.add(X[t],ka,G+(z?0:1))}var Ea=this.getCellGeometry(E);null!=Ea&&(Ea=Ea.clone(),Ea.width+=ia,A.setGeometry(E,Ea))}finally{A.endUpdate()}};Graph.prototype.deleteLane=function(t){var z=this.getModel();z.beginUpdate();try{var A=null;A="stackLayout"==this.getCurrentCellStyle(t).childLayout?t:z.getParent(t);var E=z.getChildCells(A,!0);0==E.length?z.remove(A):(A==t&&(t=E[E.length-1]),z.remove(t))}finally{z.endUpdate()}}; +Graph.prototype.insertLane=function(t,z){var A=this.getModel();A.beginUpdate();try{var E=null;if("stackLayout"==this.getCurrentCellStyle(t).childLayout){E=t;var G=A.getChildCells(E,!0);t=G[z?0:G.length-1]}else E=A.getParent(t);var L=E.getIndex(t);t=A.cloneCell(t,!1);t.value=null;A.add(E,t,L+(z?0:1))}finally{A.endUpdate()}};Graph.prototype.insertTableRow=function(t,z){var A=this.getModel();A.beginUpdate();try{var E=t,G=t;if(this.isTableCell(t))G=A.getParent(t),E=A.getParent(G);else if(this.isTableRow(t))E= +A.getParent(t);else{var L=A.getChildCells(E,!0);G=L[z?0:L.length-1]}var X=A.getChildCells(G,!0),ia=E.getIndex(G);G=A.cloneCell(G,!1);G.value=null;var ea=this.getCellGeometry(G);if(null!=ea){for(L=0;L<X.length;L++){t=A.cloneCell(X[L],!1);t.value=null;t.style=mxUtils.setStyle(mxUtils.setStyle(t.style,"rowspan",null),"colspan",null);var ka=this.getCellGeometry(t);null!=ka&&(null!=ka.alternateBounds&&(ka.width=ka.alternateBounds.width,ka.height=ka.alternateBounds.height,ka.alternateBounds=null),ka.height= +ea.height);G.insert(t)}A.add(E,G,ia+(z?0:1));var va=this.getCellGeometry(E);null!=va&&(va=va.clone(),va.height+=ea.height,A.setGeometry(E,va))}}finally{A.endUpdate()}};Graph.prototype.deleteTableColumn=function(t){var z=this.getModel();z.beginUpdate();try{var A=t,E=t;this.isTableCell(t)&&(E=z.getParent(t));this.isTableRow(E)&&(A=z.getParent(E));var G=z.getChildCells(A,!0);if(0==G.length)z.remove(A);else{this.isTableRow(E)||(E=G[0]);var L=z.getChildCells(E,!0);if(1>=L.length)z.remove(A);else{var X= +L.length-1;this.isTableCell(t)&&(X=mxUtils.indexOf(L,t));for(E=t=0;E<G.length;E++){var ia=z.getChildCells(G[E],!0)[X];z.remove(ia);var ea=this.getCellGeometry(ia);null!=ea&&(t=Math.max(t,ea.width))}var ka=this.getCellGeometry(A);null!=ka&&(ka=ka.clone(),ka.width-=t,z.setGeometry(A,ka))}}}finally{z.endUpdate()}};Graph.prototype.deleteTableRow=function(t){var z=this.getModel();z.beginUpdate();try{var A=t,E=t;this.isTableCell(t)&&(t=E=z.getParent(t));this.isTableRow(t)&&(A=z.getParent(E));var G=z.getChildCells(A, +!0);if(1>=G.length)z.remove(A);else{this.isTableRow(E)||(E=G[G.length-1]);z.remove(E);t=0;var L=this.getCellGeometry(E);null!=L&&(t=L.height);var X=this.getCellGeometry(A);null!=X&&(X=X.clone(),X.height-=t,z.setGeometry(A,X))}}finally{z.endUpdate()}};Graph.prototype.insertRow=function(t,z){for(var A=t.tBodies[0],E=A.rows[0].cells,G=t=0;G<E.length;G++){var L=E[G].getAttribute("colspan");t+=null!=L?parseInt(L):1}z=A.insertRow(z);for(G=0;G<t;G++)mxUtils.br(z.insertCell(-1));return z.cells[0]};Graph.prototype.deleteRow= +function(t,z){t.tBodies[0].deleteRow(z)};Graph.prototype.insertColumn=function(t,z){var A=t.tHead;if(null!=A)for(var E=0;E<A.rows.length;E++){var G=document.createElement("th");A.rows[E].appendChild(G);mxUtils.br(G)}t=t.tBodies[0];for(A=0;A<t.rows.length;A++)E=t.rows[A].insertCell(z),mxUtils.br(E);return t.rows[0].cells[0<=z?z:t.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(t,z){if(0<=z){t=t.tBodies[0].rows;for(var A=0;A<t.length;A++)t[A].cells.length>z&&t[A].deleteCell(z)}};Graph.prototype.pasteHtmlAtCaret= +function(t){if(window.getSelection){var z=window.getSelection();if(z.getRangeAt&&z.rangeCount){z=z.getRangeAt(0);z.deleteContents();var A=document.createElement("div");A.innerHTML=t;t=document.createDocumentFragment();for(var E;E=A.firstChild;)lastNode=t.appendChild(E);z.insertNode(t)}}else(z=document.selection)&&"Control"!=z.type&&z.createRange().pasteHTML(t)};Graph.prototype.createLinkForHint=function(t,z){function A(G,L){G.length>L&&(G=G.substring(0,Math.round(L/2))+"..."+G.substring(G.length- +Math.round(L/4)));return G}t=null!=t?t:"javascript:void(0);";if(null==z||0==z.length)z=this.isCustomLink(t)?this.getLinkTitle(t):t;var E=document.createElement("a");E.setAttribute("rel",this.linkRelation);E.setAttribute("href",this.getAbsoluteUrl(t));E.setAttribute("title",A(this.isCustomLink(t)?this.getLinkTitle(t):t,80));null!=this.linkTarget&&E.setAttribute("target",this.linkTarget);mxUtils.write(E,A(z,40));this.isCustomLink(t)&&mxEvent.addListener(E,"click",mxUtils.bind(this,function(G){this.customLinkClicked(t); +mxEvent.consume(G)}));return E};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(L,X){this.popupMenuHandler.hideMenu()});var t=this.updateMouseEvent;this.updateMouseEvent=function(L){L=t.apply(this,arguments);if(mxEvent.isTouchEvent(L.getEvent())&&null==L.getState()){var X=this.getCellAt(L.graphX,L.graphY);null!=X&&this.isSwimlane(X)&&this.hitsSwimlaneContent(X,L.graphX, +L.graphY)||(L.state=this.view.getState(X),null!=L.state&&null!=L.state.shape&&(this.container.style.cursor=L.state.shape.node.style.cursor))}null==L.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return L};var z=!1,A=!1,E=!1,G=this.fireMouseEvent;this.fireMouseEvent=function(L,X,ia){L==mxEvent.MOUSE_DOWN&&(X=this.updateMouseEvent(X),z=this.isCellSelected(X.getCell()),A=this.isSelectionEmpty(),E=this.popupMenuHandler.isMenuShowing());G.apply(this,arguments)};this.popupMenuHandler.mouseUp= +mxUtils.bind(this,function(L,X){var ia=mxEvent.isMouseEvent(X.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==X.getState()||!X.isSource(X.getState().control))&&(this.popupMenuHandler.popupTrigger||!E&&!ia&&(A&&null==X.getCell()&&this.isSelectionEmpty()||z&&this.isCellSelected(X.getCell())));ia=!z||ia?null:mxUtils.bind(this,function(ea){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ka=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(X.getX()+ +ka.x+1,X.getY()+ka.y+1,ea,X.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[L,X,ia])})};mxCellEditor.prototype.isContentEditing=function(){var t=this.graph.view.getState(this.editingCell);return null!=t&&1==t.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var t="";window.getSelection?t=window.getSelection(): document.getSelection?t=document.getSelection():document.selection&&(t=document.selection.createRange().text);return""!=t};mxCellEditor.prototype.insertTab=function(t){var z=this.textarea.ownerDocument.defaultView.getSelection(),A=z.getRangeAt(0),E="\t";if(null!=t)for(E="";0<t;)E+=" ",t--;t=document.createElement("span");t.style.whiteSpace="pre";t.appendChild(document.createTextNode(E));A.insertNode(t);A.setStartAfter(t);A.setEndAfter(t);z.removeAllRanges();z.addRange(A)};mxCellEditor.prototype.alignText= -function(t,z){var A=null!=z&&mxEvent.isShiftDown(z);if(A||null!=window.getSelection&&null!=window.getSelection().containsNode){var E=!0;this.graph.processElements(this.textarea,function(H){A||window.getSelection().containsNode(H,!0)?(H.removeAttribute("align"),H.style.textAlign=null):E=!1});E&&this.graph.cellEditor.setAlign(t)}document.execCommand("justify"+t.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var t=window.getSelection();if(t.getRangeAt&& +function(t,z){var A=null!=z&&mxEvent.isShiftDown(z);if(A||null!=window.getSelection&&null!=window.getSelection().containsNode){var E=!0;this.graph.processElements(this.textarea,function(G){A||window.getSelection().containsNode(G,!0)?(G.removeAttribute("align"),G.style.textAlign=null):E=!1});E&&this.graph.cellEditor.setAlign(t)}document.execCommand("justify"+t.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var t=window.getSelection();if(t.getRangeAt&& t.rangeCount){for(var z=[],A=0,E=t.rangeCount;A<E;++A)z.push(t.getRangeAt(A));return z}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(t){try{if(t)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var z=0,A=t.length;z<A;++z)sel.addRange(t[z])}else document.selection&&t.select&&t.select()}catch(E){}};var F=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel= -function(t){null!=t.text&&(t.text.replaceLinefeeds="0"!=mxUtils.getValue(t.style,"nl2Br","1"));F.apply(this,arguments)};var J=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(t,z){this.isKeepFocusEvent(t)||!mxEvent.isAltDown(t.getEvent())?J.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(t){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var C=mxCellEditor.prototype.startEditing; +function(t){null!=t.text&&(t.text.replaceLinefeeds="0"!=mxUtils.getValue(t.style,"nl2Br","1"));F.apply(this,arguments)};var I=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(t,z){this.isKeepFocusEvent(t)||!mxEvent.isAltDown(t.getEvent())?I.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(t){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var C=mxCellEditor.prototype.startEditing; mxCellEditor.prototype.startEditing=function(t,z){t=this.graph.getStartEditingCell(t,z);C.apply(this,arguments);var A=this.graph.view.getState(t);this.textarea.className=null!=A&&1==A.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(t);A=this.graph.getModel().getParent(t);var E=this.graph.getCellGeometry(t);if(this.graph.getModel().isEdge(A)&&null!=E&&E.relative||this.graph.getModel().isEdge(t))this.textarea.style.outline= -mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var O=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(t){function z(H,L){L.originalNode=H;H=H.firstChild;for(var W=L.firstChild;null!=H&&null!=W;)z(H,W),H=H.nextSibling,W=W.nextSibling;return L}function A(H,L){if(null!=H)if(L.originalNode!=H)E(H);else for(H=H.firstChild,L=L.firstChild;null!=H;){var W=H.nextSibling;null==L?E(H):(A(H,L),L=L.nextSibling);H=W}}function E(H){for(var L= -H.firstChild;null!=L;){var W=L.nextSibling;E(L);L=W}1==H.nodeType&&("BR"===H.nodeName||null!=H.firstChild)||3==H.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(H)).length?(3==H.nodeType&&mxUtils.setTextContent(H,mxUtils.getTextContent(H).replace(/\n|\r/g,"")),1==H.nodeType&&(H.removeAttribute("style"),H.removeAttribute("class"),H.removeAttribute("width"),H.removeAttribute("cellpadding"),H.removeAttribute("cellspacing"),H.removeAttribute("border"))):H.parentNode.removeChild(H)}O.apply(this,arguments); -7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(H){var L=z(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?A(this.textarea,L):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var t=this.graph.view.getState(this.editingCell); +mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var N=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(t){function z(G,L){L.originalNode=G;G=G.firstChild;for(var X=L.firstChild;null!=G&&null!=X;)z(G,X),G=G.nextSibling,X=X.nextSibling;return L}function A(G,L){if(null!=G)if(L.originalNode!=G)E(G);else for(G=G.firstChild,L=L.firstChild;null!=G;){var X=G.nextSibling;null==L?E(G):(A(G,L),L=L.nextSibling);G=X}}function E(G){for(var L= +G.firstChild;null!=L;){var X=L.nextSibling;E(L);L=X}1==G.nodeType&&("BR"===G.nodeName||null!=G.firstChild)||3==G.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(G)).length?(3==G.nodeType&&mxUtils.setTextContent(G,mxUtils.getTextContent(G).replace(/\n|\r/g,"")),1==G.nodeType&&(G.removeAttribute("style"),G.removeAttribute("class"),G.removeAttribute("width"),G.removeAttribute("cellpadding"),G.removeAttribute("cellspacing"),G.removeAttribute("border"))):G.parentNode.removeChild(G)}N.apply(this,arguments); +7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(G){var L=z(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?A(this.textarea,L):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var t=this.graph.view.getState(this.editingCell); if(null!=t){var z=null!=t&&"0"!=mxUtils.getValue(t.style,"nl2Br","1"),A=this.saveSelection();if(this.codeViewMode){ia=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ia.length&&"\n"==ia.charAt(ia.length-1)&&(ia=ia.substring(0,ia.length-1));ia=this.graph.sanitizeHtml(z?ia.replace(/\n/g,"<br/>"):ia,!0);this.textarea.className="mxCellEditor geContentEditable";ea=mxUtils.getValue(t.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);z=mxUtils.getValue(t.style,mxConstants.STYLE_FONTFAMILY, -mxConstants.DEFAULT_FONTFAMILY);var E=mxUtils.getValue(t.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),H=(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,L=(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,W=[];(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&W.push("underline");(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE, -0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&W.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ea*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ea)+"px";this.textarea.style.textDecoration=W.join(" ");this.textarea.style.fontWeight=H?"bold":"normal";this.textarea.style.fontStyle=L?"italic":"";this.textarea.style.fontFamily=z;this.textarea.style.textAlign=E;this.textarea.style.padding= +mxConstants.DEFAULT_FONTFAMILY);var E=mxUtils.getValue(t.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),G=(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,L=(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,X=[];(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&X.push("underline");(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE, +0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&X.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ea*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ea)+"px";this.textarea.style.textDecoration=X.join(" ");this.textarea.style.fontWeight=G?"bold":"normal";this.textarea.style.fontStyle=L?"italic":"";this.textarea.style.fontFamily=z;this.textarea.style.textAlign=E;this.textarea.style.padding= "0px";this.textarea.innerHTML!=ia&&(this.textarea.innerHTML=ia,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");var ia=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(ia=mxUtils.replaceTrailingNewlines(ia,"<div><br></div>"));ia=this.graph.sanitizeHtml(z? ia.replace(/\n/g,"").replace(/<br\s*.?>/g,"<br>"):ia,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ea=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ea*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ea)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY; this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=ia&&(this.textarea.innerHTML=ia);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=A;this.resize()}};var R=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(t,z){if(null!=this.textarea)if(t=this.graph.getView().getState(this.editingCell),this.codeViewMode&& @@ -2862,36 +2860,36 @@ null!=t){var A=t.view.scale;this.bounds=mxRectangle.fromRectangle(t);if(0==this. Math.round((this.bounds.width-4)/A)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/A)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/A)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*A);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/A)+(this.textarea.offsetWidth- this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*A);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+A+","+A+")")}else this.textarea.style.height="",this.textarea.style.overflow="",R.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(t,z){if("0"==mxUtils.getValue(t.style, "html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var A=this.graph.getEditingValue(t.cell,z);"1"==mxUtils.getValue(t.style,"nl2Br","1")&&(A=A.replace(/\n/g,"<br/>"));return A=this.graph.sanitizeHtml(A,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(t){if("0"==mxUtils.getValue(t.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var z=this.graph.sanitizeHtml(this.textarea.innerHTML,!0); -return z="1"==mxUtils.getValue(t.style,"nl2Br","1")?z.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):z.replace(/\r\n/g,"").replace(/\n/g,"")};var T=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(t){this.codeViewMode&&this.toggleViewMode();T.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(t){}};var Q=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(t,z){this.graph.getModel().beginUpdate(); +return z="1"==mxUtils.getValue(t.style,"nl2Br","1")?z.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):z.replace(/\r\n/g,"").replace(/\n/g,"")};var S=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(t){this.codeViewMode&&this.toggleViewMode();S.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(t){}};var Q=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(t,z){this.graph.getModel().beginUpdate(); try{Q.apply(this,arguments),""==z&&this.graph.isCellDeletable(t.cell)&&0==this.graph.model.getChildCount(t.cell)&&this.graph.isTransparentState(t)&&this.graph.removeCells([t.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(t){var z=mxUtils.getValue(t.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=z&&z!=mxConstants.NONE||!(null!=t.cell.geometry&&0<t.cell.geometry.width)||0==mxUtils.getValue(t.style,mxConstants.STYLE_ROTATION,0)&&0!= mxUtils.getValue(t.style,mxConstants.STYLE_HORIZONTAL,1)||(z=mxUtils.getValue(t.style,mxConstants.STYLE_FILLCOLOR,null));z==mxConstants.NONE&&(z=null);return z};mxCellEditor.prototype.getBorderColor=function(t){var z=mxUtils.getValue(t.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);null!=z&&z!=mxConstants.NONE||!(null!=t.cell.geometry&&0<t.cell.geometry.width)||0==mxUtils.getValue(t.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(t.style,mxConstants.STYLE_HORIZONTAL,1)||(z=mxUtils.getValue(t.style, mxConstants.STYLE_STROKECOLOR,null));z==mxConstants.NONE&&(z=null);return z};mxCellEditor.prototype.getMinimumSize=function(t){var z=this.graph.getView().scale;return new mxRectangle(0,0,null==t.text?30:t.text.size*z+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(t,z){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(z.getEvent)};mxGraphView.prototype.formatUnitText=function(t){return t? b(t,this.unit):t};mxGraphHandler.prototype.updateHint=function(t){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var z=this.graph.view.translate,A=this.graph.view.scale;t=this.roundLength((this.bounds.x+this.currentDx)/A-z.x);z=this.roundLength((this.bounds.y+this.currentDy)/A-z.y);A=this.graph.view.unit;this.hint.innerHTML=b(t,A)+", "+b(z,A);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width- -this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var aa=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(t,z){aa.apply(this,arguments);var A=this.graph.getCellStyle(t);if(null==A.childLayout){var E=this.graph.model.getParent(t),H=null!=E?this.graph.getCellGeometry(E): -null;if(null!=H&&(A=this.graph.getCellStyle(E),"stackLayout"==A.childLayout)){var L=parseFloat(mxUtils.getValue(A,"stackBorder",mxStackLayout.prototype.border));A="1"==mxUtils.getValue(A,"horizontalStack","1");var W=this.graph.getActualStartSize(E);H=H.clone();A?H.height=z.height+W.y+W.height+2*L:H.width=z.width+W.x+W.width+2*L;this.graph.model.setGeometry(E,H)}}};var S=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function t(ia){A.get(ia)|| -(A.put(ia,!0),H.push(ia))}for(var z=S.apply(this,arguments),A=new mxDictionary,E=this.graph.model,H=[],L=0;L<z.length;L++){var W=z[L];this.graph.isTableCell(W)?t(E.getParent(E.getParent(W))):this.graph.isTableRow(W)&&t(E.getParent(W));t(W)}return H};var P=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(t){var z=P.apply(this,arguments);z.stroke="#C0C0C0";z.strokewidth=1;return z};var X=mxEdgeHandler.prototype.createParentHighlightShape; -mxEdgeHandler.prototype.createParentHighlightShape=function(t){var z=X.apply(this,arguments);z.stroke="#C0C0C0";z.strokewidth=1;return z};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var t=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+t.x/2,this.bounds.y+this.rotationHandleVSpacing-t.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(t,z){return this.graph.isRecursiveVertexResize(t)&& -!mxEvent.isAltDown(z.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(t,z){return mxEvent.isControlDown(z.getEvent())||mxEvent.isMetaDown(z.getEvent())};var ha=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ha.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)? -this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var fa=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return fa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var sa=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(t){return t.tableHandle||sa.apply(this,arguments)&& -(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var t=0;this.graph.isTableRow(this.state.cell)?t=1:this.graph.isTableCell(this.state.cell)&&(t=2);return t};var K=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return K.apply(this,arguments).grow(-this.getSelectionBorderInset())};var V=null,G=mxVertexHandler.prototype.createCustomHandles; -mxVertexHandler.prototype.createCustomHandles=function(){null==V&&(V=mxCellRenderer.defaultShapes.tableLine);var t=G.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var z=function(La,Ia,Fa){for(var Ga=[],Oa=0;Oa<La.length;Oa++){var Pa=La[Oa];Ga.push(null==Pa?null:new mxPoint((ea+Pa.x+Ia)*L,(ja+Pa.y+Fa)*L))}return Ga},A=this,E=this.graph,H=E.model,L=E.view.scale,W=this.state,ia=this.selectionBorder,ea=this.state.origin.x+E.view.translate.x,ja=this.state.origin.y+E.view.translate.y;null== -t&&(t=[]);var ta=E.view.getCellStates(H.getChildCells(this.state.cell,!0));if(0<ta.length){var Aa=H.getChildCells(ta[0].cell,!0),Ea=E.getTableLines(this.state.cell,!1,!0),Ma=E.getTableLines(this.state.cell,!0,!1);for(H=0;H<ta.length;H++)mxUtils.bind(this,function(La){var Ia=ta[La],Fa=La<ta.length-1?ta[La+1]:null;Fa=null!=Fa?E.getCellGeometry(Fa.cell):null;var Ga=null!=Fa&&null!=Fa.alternateBounds?Fa.alternateBounds:Fa;Fa=null!=Ma[La]?new V(Ma[La],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE, -1,!1);Fa.isDashed=ia.isDashed;Fa.svgStrokeTolerance++;Ia=new mxHandle(Ia,"row-resize",null,Fa);Ia.tableHandle=!0;var Oa=0;Ia.shape.node.parentNode.insertBefore(Ia.shape.node,Ia.shape.node.parentNode.firstChild);Ia.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Oa?mxConstants.NONE:ia.stroke;if(this.shape.constructor==V)this.shape.line=z(Ma[La],0,Oa),this.shape.updateBoundsFromLine();else{var Na=E.getActualStartSize(W.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+ -this.state.height+Oa*L;this.shape.bounds.x=W.x+(La==ta.length-1?0:Na.x*L);this.shape.bounds.width=W.width-(La==ta.length-1?0:Na.width+Na.x+L)}this.shape.redraw()}};var Pa=!1;Ia.setPosition=function(Na,Sa,eb){Oa=Math.max(Graph.minTableRowHeight-Na.height,Sa.y-Na.y-Na.height);Pa=mxEvent.isShiftDown(eb.getEvent());null!=Ga&&Pa&&(Oa=Math.min(Oa,Ga.height-Graph.minTableRowHeight))};Ia.execute=function(Na){if(0!=Oa)E.setTableRowHeight(this.state.cell,Oa,!Pa);else if(!A.blockDelayedSelection){var Sa=E.getCellAt(Na.getGraphX(), -Na.getGraphY())||W.cell;E.graphHandler.selectCellForEvent(Sa,Na)}Oa=0};Ia.reset=function(){Oa=0};t.push(Ia)})(H);for(H=0;H<Aa.length;H++)mxUtils.bind(this,function(La){var Ia=E.view.getState(Aa[La]),Fa=E.getCellGeometry(Aa[La]),Ga=null!=Fa.alternateBounds?Fa.alternateBounds:Fa;null==Ia&&(Ia=new mxCellState(E.view,Aa[La],E.getCellStyle(Aa[La])),Ia.x=W.x+Fa.x*L,Ia.y=W.y+Fa.y*L,Ia.width=Ga.width*L,Ia.height=Ga.height*L,Ia.updateCachedBounds());Fa=La<Aa.length-1?Aa[La+1]:null;Fa=null!=Fa?E.getCellGeometry(Fa): +this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var aa=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(t,z){aa.apply(this,arguments);var A=this.graph.getCellStyle(t);if(null==A.childLayout){var E=this.graph.model.getParent(t),G=null!=E?this.graph.getCellGeometry(E): +null;if(null!=G&&(A=this.graph.getCellStyle(E),"stackLayout"==A.childLayout)){var L=parseFloat(mxUtils.getValue(A,"stackBorder",mxStackLayout.prototype.border));A="1"==mxUtils.getValue(A,"horizontalStack","1");var X=this.graph.getActualStartSize(E);G=G.clone();A?G.height=z.height+X.y+X.height+2*L:G.width=z.width+X.x+X.width+2*L;this.graph.model.setGeometry(E,G)}}};var U=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function t(ia){A.get(ia)|| +(A.put(ia,!0),G.push(ia))}for(var z=U.apply(this,arguments),A=new mxDictionary,E=this.graph.model,G=[],L=0;L<z.length;L++){var X=z[L];this.graph.isTableCell(X)?t(E.getParent(E.getParent(X))):this.graph.isTableRow(X)&&t(E.getParent(X));t(X)}return G};var P=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(t){var z=P.apply(this,arguments);z.stroke="#C0C0C0";z.strokewidth=1;return z};var Y=mxEdgeHandler.prototype.createParentHighlightShape; +mxEdgeHandler.prototype.createParentHighlightShape=function(t){var z=Y.apply(this,arguments);z.stroke="#C0C0C0";z.strokewidth=1;return z};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var t=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+t.x/2,this.bounds.y+this.rotationHandleVSpacing-t.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(t,z){return this.graph.isRecursiveVertexResize(t)&& +!mxEvent.isAltDown(z.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(t,z){return mxEvent.isControlDown(z.getEvent())||mxEvent.isMetaDown(z.getEvent())};var ja=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ja.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)? +this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var fa=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return fa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var ra=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(t){return t.tableHandle||ra.apply(this,arguments)&& +(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var t=0;this.graph.isTableRow(this.state.cell)?t=1:this.graph.isTableCell(this.state.cell)&&(t=2);return t};var K=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return K.apply(this,arguments).grow(-this.getSelectionBorderInset())};var V=null,O=mxVertexHandler.prototype.createCustomHandles; +mxVertexHandler.prototype.createCustomHandles=function(){null==V&&(V=mxCellRenderer.defaultShapes.tableLine);var t=O.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var z=function(La,Ia,Fa){for(var Ga=[],Oa=0;Oa<La.length;Oa++){var Pa=La[Oa];Ga.push(null==Pa?null:new mxPoint((ea+Pa.x+Ia)*L,(ka+Pa.y+Fa)*L))}return Ga},A=this,E=this.graph,G=E.model,L=E.view.scale,X=this.state,ia=this.selectionBorder,ea=this.state.origin.x+E.view.translate.x,ka=this.state.origin.y+E.view.translate.y;null== +t&&(t=[]);var va=E.view.getCellStates(G.getChildCells(this.state.cell,!0));if(0<va.length){var Ba=G.getChildCells(va[0].cell,!0),Ea=E.getTableLines(this.state.cell,!1,!0),Ma=E.getTableLines(this.state.cell,!0,!1);for(G=0;G<va.length;G++)mxUtils.bind(this,function(La){var Ia=va[La],Fa=La<va.length-1?va[La+1]:null;Fa=null!=Fa?E.getCellGeometry(Fa.cell):null;var Ga=null!=Fa&&null!=Fa.alternateBounds?Fa.alternateBounds:Fa;Fa=null!=Ma[La]?new V(Ma[La],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE, +1,!1);Fa.isDashed=ia.isDashed;Fa.svgStrokeTolerance++;Ia=new mxHandle(Ia,"row-resize",null,Fa);Ia.tableHandle=!0;var Oa=0;Ia.shape.node.parentNode.insertBefore(Ia.shape.node,Ia.shape.node.parentNode.firstChild);Ia.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Oa?mxConstants.NONE:ia.stroke;if(this.shape.constructor==V)this.shape.line=z(Ma[La],0,Oa),this.shape.updateBoundsFromLine();else{var Na=E.getActualStartSize(X.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+ +this.state.height+Oa*L;this.shape.bounds.x=X.x+(La==va.length-1?0:Na.x*L);this.shape.bounds.width=X.width-(La==va.length-1?0:Na.width+Na.x+L)}this.shape.redraw()}};var Pa=!1;Ia.setPosition=function(Na,Sa,eb){Oa=Math.max(Graph.minTableRowHeight-Na.height,Sa.y-Na.y-Na.height);Pa=mxEvent.isShiftDown(eb.getEvent());null!=Ga&&Pa&&(Oa=Math.min(Oa,Ga.height-Graph.minTableRowHeight))};Ia.execute=function(Na){if(0!=Oa)E.setTableRowHeight(this.state.cell,Oa,!Pa);else if(!A.blockDelayedSelection){var Sa=E.getCellAt(Na.getGraphX(), +Na.getGraphY())||X.cell;E.graphHandler.selectCellForEvent(Sa,Na)}Oa=0};Ia.reset=function(){Oa=0};t.push(Ia)})(G);for(G=0;G<Ba.length;G++)mxUtils.bind(this,function(La){var Ia=E.view.getState(Ba[La]),Fa=E.getCellGeometry(Ba[La]),Ga=null!=Fa.alternateBounds?Fa.alternateBounds:Fa;null==Ia&&(Ia=new mxCellState(E.view,Ba[La],E.getCellStyle(Ba[La])),Ia.x=X.x+Fa.x*L,Ia.y=X.y+Fa.y*L,Ia.width=Ga.width*L,Ia.height=Ga.height*L,Ia.updateCachedBounds());Fa=La<Ba.length-1?Ba[La+1]:null;Fa=null!=Fa?E.getCellGeometry(Fa): null;var Oa=null!=Fa&&null!=Fa.alternateBounds?Fa.alternateBounds:Fa;Fa=null!=Ea[La]?new V(Ea[La],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Fa.isDashed=ia.isDashed;Fa.svgStrokeTolerance++;Ia=new mxHandle(Ia,"col-resize",null,Fa);Ia.tableHandle=!0;var Pa=0;Ia.shape.node.parentNode.insertBefore(Ia.shape.node,Ia.shape.node.parentNode.firstChild);Ia.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Pa?mxConstants.NONE:ia.stroke;if(this.shape.constructor==V)this.shape.line= -z(Ea[La],Pa,0),this.shape.updateBoundsFromLine();else{var Sa=E.getActualStartSize(W.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Ga.width+Pa)*L;this.shape.bounds.y=W.y+(La==Aa.length-1?0:Sa.y*L);this.shape.bounds.height=W.height-(La==Aa.length-1?0:(Sa.height+Sa.y)*L)}this.shape.redraw()}};var Na=!1;Ia.setPosition=function(Sa,eb,bb){Pa=Math.max(Graph.minTableColumnWidth-Ga.width,eb.x-Sa.x-Ga.width);Na=mxEvent.isShiftDown(bb.getEvent());null==Oa||Na||(Pa=Math.min(Pa,Oa.width- -Graph.minTableColumnWidth))};Ia.execute=function(Sa){if(0!=Pa)E.setTableColumnWidth(this.state.cell,Pa,Na);else if(!A.blockDelayedSelection){var eb=E.getCellAt(Sa.getGraphX(),Sa.getGraphY())||W.cell;E.graphHandler.selectCellForEvent(eb,Sa)}Pa=0};Ia.positionChanged=function(){};Ia.reset=function(){Pa=0};t.push(Ia)})(H)}}return null!=t?t.reverse():null};var M=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(t){M.apply(this,arguments);if(null!=this.moveHandles)for(var z= +z(Ea[La],Pa,0),this.shape.updateBoundsFromLine();else{var Sa=E.getActualStartSize(X.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Ga.width+Pa)*L;this.shape.bounds.y=X.y+(La==Ba.length-1?0:Sa.y*L);this.shape.bounds.height=X.height-(La==Ba.length-1?0:(Sa.height+Sa.y)*L)}this.shape.redraw()}};var Na=!1;Ia.setPosition=function(Sa,eb,bb){Pa=Math.max(Graph.minTableColumnWidth-Ga.width,eb.x-Sa.x-Ga.width);Na=mxEvent.isShiftDown(bb.getEvent());null==Oa||Na||(Pa=Math.min(Pa,Oa.width- +Graph.minTableColumnWidth))};Ia.execute=function(Sa){if(0!=Pa)E.setTableColumnWidth(this.state.cell,Pa,Na);else if(!A.blockDelayedSelection){var eb=E.getCellAt(Sa.getGraphX(),Sa.getGraphY())||X.cell;E.graphHandler.selectCellForEvent(eb,Sa)}Pa=0};Ia.positionChanged=function(){};Ia.reset=function(){Pa=0};t.push(Ia)})(G)}}return null!=t?t.reverse():null};var T=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(t){T.apply(this,arguments);if(null!=this.moveHandles)for(var z= 0;z<this.moveHandles.length;z++)this.moveHandles[z].style.visibility=t?"":"hidden";if(null!=this.cornerHandles)for(z=0;z<this.cornerHandles.length;z++)this.cornerHandles[z].node.style.visibility=t?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var t=this.graph.model;if(null!=this.moveHandles){for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].parentNode.removeChild(this.moveHandles[z]);this.moveHandles=null}this.moveHandles=[];for(z=0;z<t.getChildCount(this.state.cell);z++)mxUtils.bind(this, -function(A){if(null!=A&&t.isVertex(A.cell)){var E=mxUtils.createImage(Editor.rowMoveImage);E.style.position="absolute";E.style.cursor="pointer";E.style.width="7px";E.style.height="4px";E.style.padding="4px 2px 4px 2px";E.rowState=A;mxEvent.addGestureListeners(E,mxUtils.bind(this,function(H){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(H)&&this.graph.isCellSelected(A.cell)||this.graph.selectCellForEvent(A.cell,H);mxEvent.isPopupTrigger(H)||(this.graph.graphHandler.start(this.state.cell, -mxEvent.getClientX(H),mxEvent.getClientY(H),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(H),this.graph.isMouseDown=!0);mxEvent.consume(H)}),null,mxUtils.bind(this,function(H){mxEvent.isPopupTrigger(H)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(H),mxEvent.getClientY(H),A.cell,H),mxEvent.consume(H))}));this.moveHandles.push(E);this.graph.container.appendChild(E)}})(this.graph.view.getState(t.getChildAt(this.state.cell, -z)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var t=0;t<this.customHandles.length;t++)this.customHandles[t].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var U=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var t=new mxPoint(0,0),z=this.tolerance,A=this.state.style.shape;null==mxCellRenderer.defaultShapes[A]&&mxStencilRegistry.getStencil(A); -A=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!A&&null!=this.customHandles)for(var E=0;E<this.customHandles.length;E++)if(null!=this.customHandles[E].shape&&null!=this.customHandles[E].shape.bounds){var H=this.customHandles[E].shape.bounds,L=H.getCenterX(),W=H.getCenterY();if(Math.abs(this.state.x-L)<H.width/2||Math.abs(this.state.y-W)<H.height/2||Math.abs(this.state.x+this.state.width-L)<H.width/2||Math.abs(this.state.y+this.state.height-W)<H.height/ -2){A=!0;break}}A&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(z/=2,this.graph.isTable(this.state.cell)&&(z+=7),t.x=this.sizers[0].bounds.width+z,t.y=this.sizers[0].bounds.height+z):t=U.apply(this,arguments);return t};mxVertexHandler.prototype.updateHint=function(t){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"°";else{t= +function(A){if(null!=A&&t.isVertex(A.cell)){var E=mxUtils.createImage(Editor.rowMoveImage);E.style.position="absolute";E.style.cursor="pointer";E.style.width="7px";E.style.height="4px";E.style.padding="4px 2px 4px 2px";E.rowState=A;mxEvent.addGestureListeners(E,mxUtils.bind(this,function(G){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(G)&&this.graph.isCellSelected(A.cell)||this.graph.selectCellForEvent(A.cell,G);mxEvent.isPopupTrigger(G)||(this.graph.graphHandler.start(this.state.cell, +mxEvent.getClientX(G),mxEvent.getClientY(G),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(G),this.graph.isMouseDown=!0);mxEvent.consume(G)}),null,mxUtils.bind(this,function(G){mxEvent.isPopupTrigger(G)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(G),mxEvent.getClientY(G),A.cell,G),mxEvent.consume(G))}));this.moveHandles.push(E);this.graph.container.appendChild(E)}})(this.graph.view.getState(t.getChildAt(this.state.cell, +z)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var t=0;t<this.customHandles.length;t++)this.customHandles[t].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var J=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var t=new mxPoint(0,0),z=this.tolerance,A=this.state.style.shape;null==mxCellRenderer.defaultShapes[A]&&mxStencilRegistry.getStencil(A); +A=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!A&&null!=this.customHandles)for(var E=0;E<this.customHandles.length;E++)if(null!=this.customHandles[E].shape&&null!=this.customHandles[E].shape.bounds){var G=this.customHandles[E].shape.bounds,L=G.getCenterX(),X=G.getCenterY();if(Math.abs(this.state.x-L)<G.width/2||Math.abs(this.state.y-X)<G.height/2||Math.abs(this.state.x+this.state.width-L)<G.width/2||Math.abs(this.state.y+this.state.height-X)<G.height/ +2){A=!0;break}}A&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(z/=2,this.graph.isTable(this.state.cell)&&(z+=7),t.x=this.sizers[0].bounds.width+z,t.y=this.sizers[0].bounds.height+z):t=J.apply(this,arguments);return t};mxVertexHandler.prototype.updateHint=function(t){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"°";else{t= this.state.view.scale;var z=this.state.view.unit;this.hint.innerHTML=b(this.roundLength(this.bounds.width/t),z)+" x "+b(this.roundLength(this.bounds.height/t),z)}t=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==t&&(t=this.bounds);this.hint.style.left=t.x+Math.round((t.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=t.y+t.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}}; -mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var ba=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(t,z){ba.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var la=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp= -function(t,z){la.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(t,z){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var A=this.graph.view.translate,E=this.graph.view.scale,H=this.roundLength(z.x/E-A.x);A=this.roundLength(z.y/E-A.y);E=this.graph.view.unit;this.hint.innerHTML=b(H,E)+", "+b(A,E);this.hint.style.visibility="visible";if(this.isSource|| -this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(H=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*H.x)+"%, "+Math.round(100*H.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(t.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(t.getGraphY(),z.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}; +mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var ba=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(t,z){ba.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var ha=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp= +function(t,z){ha.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(t,z){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var A=this.graph.view.translate,E=this.graph.view.scale,G=this.roundLength(z.x/E-A.x);A=this.roundLength(z.y/E-A.y);E=this.graph.view.unit;this.hint.innerHTML=b(G,E)+", "+b(A,E);this.hint.style.visibility="visible";if(this.isSource|| +this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(G=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*G.x)+"%, "+Math.round(100*G.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(t.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(t.getGraphY(),z.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}; Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 4.5 2 L 4.5 7 M 2 4.5 L 7 4.5 z" stroke="#000"/>'); mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.endMainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.secondaryHandle=Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'); HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');HoverIcons.prototype.endFixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');HoverIcons.prototype.terminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+ @@ -2901,32 +2899,32 @@ mxEdgeHandler.prototype.endHandleImage=HoverIcons.prototype.endMainHandle;mxEdge HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers= !0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled= !0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(t){return!mxEvent.isShiftDown(t.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(t){return!mxEvent.isShiftDown(t.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance= -12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(t){return mxEvent.isMouseEvent(t.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(t){var z=t.getEvent();return null==t.getState()&&!mxEvent.isMouseEvent(z)||mxEvent.isPopupTrigger(z)&&(null==t.getState()||mxEvent.isControlDown(z)||mxEvent.isShiftDown(z))};var ra=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown= -function(t,z){ra.apply(this,arguments);mxEvent.isTouchEvent(z.getEvent())&&this.graph.isCellSelected(z.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(t){var z=t.getEvent();return mxEvent.isLeftMouseButton(z)&&(this.useLeftButtonForPanning&&null==t.getState()||mxEvent.isControlDown(z)&&!mxEvent.isShiftDown(z))||this.usePopupTrigger&&mxEvent.isPopupTrigger(z)};mxRubberband.prototype.isSpaceEvent=function(t){return this.graph.isEnabled()&& -!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(t.getEvent())||mxEvent.isMetaDown(t.getEvent()))&&mxEvent.isShiftDown(t.getEvent())&&mxEvent.isAltDown(t.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(t,z){if(this.cancelled)this.cancelled=!1,z.consume();else{var A=null!=this.div&&"none"!=this.div.style.display,E=null,H=null,L=t=null;null!= -this.first&&null!=this.currentX&&null!=this.currentY&&(E=this.first.x,H=this.first.y,t=(this.currentX-E)/this.graph.view.scale,L=(this.currentY-H)/this.graph.view.scale,mxEvent.isAltDown(z.getEvent())||(t=this.graph.snap(t),L=this.graph.snap(L),this.graph.isGridEnabled()||(Math.abs(t)<this.graph.tolerance&&(t=0),Math.abs(L)<this.graph.tolerance&&(L=0))));this.reset();if(A){if(this.isSpaceEvent(z)){this.graph.model.beginUpdate();try{var W=this.graph.getCellsBeyond(E,H,this.graph.getDefaultParent(), -!0,!0);for(A=0;A<W.length;A++)if(this.graph.isCellMovable(W[A])){var ia=this.graph.view.getState(W[A]),ea=this.graph.getCellGeometry(W[A]);null!=ia&&null!=ea&&(ea=ea.clone(),ea.translate(t,L),this.graph.model.setGeometry(W[A],ea))}}finally{this.graph.model.endUpdate()}}else W=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(W,z.getEvent());z.consume()}}};mxRubberband.prototype.mouseMove=function(t,z){if(!z.isConsumed()&&null!=this.first){var A=mxUtils.getScrollOrigin(this.graph.container); -t=mxUtils.getOffset(this.graph.container);A.x-=t.x;A.y-=t.y;t=z.getX()+A.x;A=z.getY()+A.y;var E=this.first.x-t,H=this.first.y-A,L=this.graph.tolerance;if(null!=this.div||Math.abs(E)>L||Math.abs(H)>L)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(t,A),this.isSpaceEvent(z)?(t=this.x+this.width,A=this.y+this.height,E=this.graph.view.scale,mxEvent.isAltDown(z.getEvent())||(this.width=this.graph.snap(this.width/E)*E,this.height=this.graph.snap(this.height/E)*E,this.graph.isGridEnabled()|| +12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(t){return mxEvent.isMouseEvent(t.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(t){var z=t.getEvent();return null==t.getState()&&!mxEvent.isMouseEvent(z)||mxEvent.isPopupTrigger(z)&&(null==t.getState()||mxEvent.isControlDown(z)||mxEvent.isShiftDown(z))};var na=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown= +function(t,z){na.apply(this,arguments);mxEvent.isTouchEvent(z.getEvent())&&this.graph.isCellSelected(z.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(t){var z=t.getEvent();return mxEvent.isLeftMouseButton(z)&&(this.useLeftButtonForPanning&&null==t.getState()||mxEvent.isControlDown(z)&&!mxEvent.isShiftDown(z))||this.usePopupTrigger&&mxEvent.isPopupTrigger(z)};mxRubberband.prototype.isSpaceEvent=function(t){return this.graph.isEnabled()&& +!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(t.getEvent())||mxEvent.isMetaDown(t.getEvent()))&&mxEvent.isShiftDown(t.getEvent())&&mxEvent.isAltDown(t.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(t,z){if(this.cancelled)this.cancelled=!1,z.consume();else{var A=null!=this.div&&"none"!=this.div.style.display,E=null,G=null,L=t=null;null!= +this.first&&null!=this.currentX&&null!=this.currentY&&(E=this.first.x,G=this.first.y,t=(this.currentX-E)/this.graph.view.scale,L=(this.currentY-G)/this.graph.view.scale,mxEvent.isAltDown(z.getEvent())||(t=this.graph.snap(t),L=this.graph.snap(L),this.graph.isGridEnabled()||(Math.abs(t)<this.graph.tolerance&&(t=0),Math.abs(L)<this.graph.tolerance&&(L=0))));this.reset();if(A){if(this.isSpaceEvent(z)){this.graph.model.beginUpdate();try{var X=this.graph.getCellsBeyond(E,G,this.graph.getDefaultParent(), +!0,!0);for(A=0;A<X.length;A++)if(this.graph.isCellMovable(X[A])){var ia=this.graph.view.getState(X[A]),ea=this.graph.getCellGeometry(X[A]);null!=ia&&null!=ea&&(ea=ea.clone(),ea.translate(t,L),this.graph.model.setGeometry(X[A],ea))}}finally{this.graph.model.endUpdate()}}else X=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(X,z.getEvent());z.consume()}}};mxRubberband.prototype.mouseMove=function(t,z){if(!z.isConsumed()&&null!=this.first){var A=mxUtils.getScrollOrigin(this.graph.container); +t=mxUtils.getOffset(this.graph.container);A.x-=t.x;A.y-=t.y;t=z.getX()+A.x;A=z.getY()+A.y;var E=this.first.x-t,G=this.first.y-A,L=this.graph.tolerance;if(null!=this.div||Math.abs(E)>L||Math.abs(G)>L)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(t,A),this.isSpaceEvent(z)?(t=this.x+this.width,A=this.y+this.height,E=this.graph.view.scale,mxEvent.isAltDown(z.getEvent())||(this.width=this.graph.snap(this.width/E)*E,this.height=this.graph.snap(this.height/E)*E,this.graph.isGridEnabled()|| (this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=t-this.width),this.y<this.first.y&&(this.y=A-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px", null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&& -(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),z.consume()}};var Y=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);Y.apply(this,arguments)};var da=(new Date).getTime(),pa=0,wa=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(t,z,A,E){wa.apply(this,arguments);A!=this.currentTerminalState?(da=(new Date).getTime(), -pa=0):pa=(new Date).getTime()-da;this.currentTerminalState=A};var Ka=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(t){return mxEvent.isShiftDown(t.getEvent())&&mxEvent.isAltDown(t.getEvent())?!1:null!=this.currentTerminalState&&t.getState()==this.currentTerminalState&&2E3<pa||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&Ka.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape= +(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),z.consume()}};var W=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);W.apply(this,arguments)};var da=(new Date).getTime(),sa=0,ta=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(t,z,A,E){ta.apply(this,arguments);A!=this.currentTerminalState?(da=(new Date).getTime(), +sa=0):sa=(new Date).getTime()-da;this.currentTerminalState=A};var Ja=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(t){return mxEvent.isShiftDown(t.getEvent())&&mxEvent.isAltDown(t.getEvent())?!1:null!=this.currentTerminalState&&t.getState()==this.currentTerminalState&&2E3<sa||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&Ja.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape= function(t,z,A){z=null!=t&&0==t;var E=this.state.getVisibleTerminalState(z);t=null!=t&&(0==t||t>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==t)?this.graph.getConnectionConstraint(this.state,E,z):null;A=null!=(null!=t?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(z),t):null)?A?this.endFixedHandleImage:this.fixedHandleImage:null!=t&&null!=E?A?this.endTerminalHandleImage:this.terminalHandleImage:A?this.endHandleImage:this.handleImage;if(null!=A)return A= new mxImageShape(new mxRectangle(0,0,A.width,A.height),A.src),A.preserveImageAspect=!1,A;A=mxConstants.HANDLE_SIZE;this.preferHtml&&--A;return new mxRectangleShape(new mxRectangle(0,0,A,A),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var Ha=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(t,z,A){this.handleImage=z==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:z==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage; -return Ha.apply(this,arguments)};var ua=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(t){if(null!=t&&1==t.length){var z=this.graph.getModel(),A=z.getParent(t[0]),E=this.graph.getCellGeometry(t[0]);if(z.isEdge(A)&&null!=E&&E.relative&&(z=this.graph.view.getState(t[0]),null!=z&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox))return mxRectangle.fromRectangle(z.text.boundingBox)}return ua.apply(this,arguments)};var Ca=mxGraphHandler.prototype.getGuideStates; -mxGraphHandler.prototype.getGuideStates=function(){for(var t=Ca.apply(this,arguments),z=[],A=0;A<t.length;A++)"1"!=mxUtils.getValue(t[A].style,"part","0")&&z.push(t[A]);return z};var qa=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(t){var z=this.graph.getModel(),A=z.getParent(t.cell),E=this.graph.getCellGeometry(t.cell);return z.isEdge(A)&&null!=E&&E.relative&&2>t.width&&2>t.height&&null!=t.text&&null!=t.text.boundingBox?(z=t.text.unrotatedBoundingBox|| -t.text.boundingBox,new mxRectangle(Math.round(z.x),Math.round(z.y),Math.round(z.width),Math.round(z.height))):qa.apply(this,arguments)};var Da=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(t,z){var A=this.graph.getModel(),E=A.getParent(this.state.cell),H=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(z)==mxEvent.ROTATION_HANDLE||!A.isEdge(E)||null==H||!H.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Da.apply(this,arguments)}; +return Ha.apply(this,arguments)};var ua=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(t){if(null!=t&&1==t.length){var z=this.graph.getModel(),A=z.getParent(t[0]),E=this.graph.getCellGeometry(t[0]);if(z.isEdge(A)&&null!=E&&E.relative&&(z=this.graph.view.getState(t[0]),null!=z&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox))return mxRectangle.fromRectangle(z.text.boundingBox)}return ua.apply(this,arguments)};var Aa=mxGraphHandler.prototype.getGuideStates; +mxGraphHandler.prototype.getGuideStates=function(){for(var t=Aa.apply(this,arguments),z=[],A=0;A<t.length;A++)"1"!=mxUtils.getValue(t[A].style,"part","0")&&z.push(t[A]);return z};var qa=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(t){var z=this.graph.getModel(),A=z.getParent(t.cell),E=this.graph.getCellGeometry(t.cell);return z.isEdge(A)&&null!=E&&E.relative&&2>t.width&&2>t.height&&null!=t.text&&null!=t.text.boundingBox?(z=t.text.unrotatedBoundingBox|| +t.text.boundingBox,new mxRectangle(Math.round(z.x),Math.round(z.y),Math.round(z.width),Math.round(z.height))):qa.apply(this,arguments)};var Da=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(t,z){var A=this.graph.getModel(),E=A.getParent(this.state.cell),G=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(z)==mxEvent.ROTATION_HANDLE||!A.isEdge(E)||null==G||!G.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Da.apply(this,arguments)}; mxVertexHandler.prototype.rotateClick=function(){var t=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),z=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&t==mxConstants.NONE&&z==mxConstants.NONE?(t=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,t,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])}; var Ua=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(t,z){Ua.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var db=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(t,z){db.apply(this,arguments);null!=this.rotationShape&&null!= this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var Ta=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){Ta.apply(this,arguments);var t=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles(); else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var z=0;4>z;z++){var A=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);A.dialect=mxConstants.DIALECT_SVG;A.init(this.graph.view.getOverlayPane());this.cornerHandles.push(A)}}var E=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()< -this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(H,L){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));E()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(H,L){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler); +this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(G,L){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));E()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(G,L){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler); z=this.graph.getLinkForCell(this.state.cell);A=this.graph.getLinksForState(this.state);this.updateLinkHint(z,A);if(null!=z||null!=A&&0<A.length)t=!0;t&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(t,z){try{if(null==t&&(null==z||0==z.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=t||null!=z&&0<z.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding= "6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=t&&(this.linkHint.appendChild(this.graph.createLinkForHint(t)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var A=document.createElement("img");A.className="geAdaptiveAsset";A.setAttribute("src",Editor.editImage); A.setAttribute("title",mxResources.get("editLink"));A.setAttribute("width","11");A.setAttribute("height","11");A.style.marginLeft="10px";A.style.marginBottom="-1px";A.style.cursor="pointer";this.linkHint.appendChild(A);mxEvent.addListener(A,"click",mxUtils.bind(this,function(L){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(L)}));var E=A.cloneNode(!0);E.setAttribute("src",Editor.trashImage);E.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")])); -E.style.marginLeft="4px";this.linkHint.appendChild(E);mxEvent.addListener(E,"click",mxUtils.bind(this,function(L){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(L)}))}if(null!=z)for(A=0;A<z.length;A++){var H=document.createElement("div");H.style.marginTop=null!=t||0<A?"6px":"0px";H.appendChild(this.graph.createLinkForHint(z[A].getAttribute("href"),mxUtils.getTextContent(z[A])));this.linkHint.appendChild(H)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(L){}};mxEdgeHandler.prototype.updateLinkHint= +E.style.marginLeft="4px";this.linkHint.appendChild(E);mxEvent.addListener(E,"click",mxUtils.bind(this,function(L){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(L)}))}if(null!=z)for(A=0;A<z.length;A++){var G=document.createElement("div");G.style.marginTop=null!=t||0<A?"6px":"0px";G.appendChild(this.graph.createLinkForHint(z[A].getAttribute("href"),mxUtils.getTextContent(z[A])));this.linkHint.appendChild(G)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(L){}};mxEdgeHandler.prototype.updateLinkHint= mxVertexHandler.prototype.updateLinkHint;var ab=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){ab.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var t=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()< -this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(E,H){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));t();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var z=this.graph.getLinkForCell(this.state.cell),A=this.graph.getLinksForState(this.state);if(null!=z||null!=A&&0<A.length)this.updateLinkHint(z, +this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(E,G){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));t();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var z=this.graph.getLinkForCell(this.state.cell),A=this.graph.getLinksForState(this.state);if(null!=z||null!=A&&0<A.length)this.updateLinkHint(z, A),this.redrawHandles()};var Ya=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Ya.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Va=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var t=0;t<this.moveHandles.length;t++)this.moveHandles[t].style.left=this.moveHandles[t].rowState.x+this.moveHandles[t].rowState.width- 5+"px",this.moveHandles[t].style.top=this.moveHandles[t].rowState.y+this.moveHandles[t].rowState.height/2-6+"px";if(null!=this.cornerHandles){t=this.getSelectionBorderInset();var z=this.cornerHandles,A=z[0].bounds.height/2;z[0].bounds.x=this.state.x-z[0].bounds.width/2+t;z[0].bounds.y=this.state.y-A+t;z[0].redraw();z[1].bounds.x=z[0].bounds.x+this.state.width-2*t;z[1].bounds.y=z[0].bounds.y;z[1].redraw();z[2].bounds.x=z[0].bounds.x;z[2].bounds.y=this.state.y+this.state.height-2*t;z[2].redraw();z[3].bounds.x= z[1].bounds.x;z[3].bounds.y=z[2].bounds.y;z[3].redraw();for(t=0;t<this.cornerHandles.length;t++)this.cornerHandles[t].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Va.apply(this);null!=this.state&&null!=this.linkHint&&(t=new mxPoint(this.state.getCenterX(),this.state.getCenterY()), @@ -2957,8 +2955,8 @@ Format.prototype.diagramIndex=0;Format.prototype.currentIndex=0;Format.prototype Format.prototype.init=function(){var a=this.editorUi,b=a.editor,f=b.graph;this.update=mxUtils.bind(this,function(e,g){this.refresh()});f.getSelectionModel().addListener(mxEvent.CHANGE,this.update);f.getModel().addListener(mxEvent.CHANGE,this.update);f.addListener(mxEvent.EDITING_STARTED,this.update);f.addListener(mxEvent.EDITING_STOPPED,this.update);f.getView().addListener("unitChanged",this.update);b.addListener("autosaveChanged",this.update);f.addListener(mxEvent.ROOT,this.update);a.addListener("styleChanged", this.update);a.addListener("darkModeChanged",this.update);this.refresh()};Format.prototype.clear=function(){this.container.innerText="";if(null!=this.panels)for(var a=0;a<this.panels.length;a++)this.panels[a].destroy();this.panels=[]};Format.prototype.refresh=function(){null!=this.pendingRefresh&&(window.clearTimeout(this.pendingRefresh),this.pendingRefresh=null);this.pendingRefresh=window.setTimeout(mxUtils.bind(this,function(){this.immediateRefresh()}))}; Format.prototype.immediateRefresh=function(){if("0px"!=this.container.style.width){this.clear();var a=this.editorUi,b=a.editor.graph,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.color="rgb(112, 112, 112)";f.style.textAlign="left";f.style.cursor="default";var e=document.createElement("div");e.className="geFormatSection";e.style.textAlign="center";e.style.fontWeight="bold";e.style.paddingTop="8px";e.style.fontSize="13px";e.style.borderWidth="0px 0px 1px 1px";e.style.borderStyle= -"solid";e.style.display="inline-block";e.style.height="25px";e.style.overflow="hidden";e.style.width="100%";this.container.appendChild(f);mxEvent.addListener(e,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(D){D.preventDefault()}));var g=a.getSelectionState(),d=g.containsLabel,k=null,n=null,u=mxUtils.bind(this,function(D,F,J,C){var O=mxUtils.bind(this,function(R){k!=D&&(d?this.labelIndex=J:b.isSelectionEmpty()?this.diagramIndex=J:this.currentIndex=J,null!=k&&(k.style.backgroundColor= -Format.inactiveTabBackgroundColor,k.style.borderBottomWidth="1px"),k=D,k.style.backgroundColor="",k.style.borderBottomWidth="0px",n!=F&&(null!=n&&(n.style.display="none"),n=F,n.style.display=""))});mxEvent.addListener(D,"click",O);mxEvent.addListener(D,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(R){R.preventDefault()}));(C&&null==k||J==(d?this.labelIndex:b.isSelectionEmpty()?this.diagramIndex:this.currentIndex))&&O()}),m=0;if(b.isSelectionEmpty()){mxUtils.write(e,mxResources.get("diagram")); +"solid";e.style.display="inline-block";e.style.height="25px";e.style.overflow="hidden";e.style.width="100%";this.container.appendChild(f);mxEvent.addListener(e,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(D){D.preventDefault()}));var g=a.getSelectionState(),d=g.containsLabel,k=null,n=null,u=mxUtils.bind(this,function(D,F,I,C){var N=mxUtils.bind(this,function(R){k!=D&&(d?this.labelIndex=I:b.isSelectionEmpty()?this.diagramIndex=I:this.currentIndex=I,null!=k&&(k.style.backgroundColor= +Format.inactiveTabBackgroundColor,k.style.borderBottomWidth="1px"),k=D,k.style.backgroundColor="",k.style.borderBottomWidth="0px",n!=F&&(null!=n&&(n.style.display="none"),n=F,n.style.display=""))});mxEvent.addListener(D,"click",N);mxEvent.addListener(D,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(R){R.preventDefault()}));(C&&null==k||I==(d?this.labelIndex:b.isSelectionEmpty()?this.diagramIndex:this.currentIndex))&&N()}),m=0;if(b.isSelectionEmpty()){mxUtils.write(e,mxResources.get("diagram")); e.style.borderLeftWidth="0px";f.appendChild(e);g=f.cloneNode(!1);this.panels.push(new DiagramFormatPanel(this,a,g));this.container.appendChild(g);if(null!=Editor.styles){g.style.display="none";e.style.width=this.showCloseButton?"106px":"50%";e.style.cursor="pointer";e.style.backgroundColor=Format.inactiveTabBackgroundColor;var r=e.cloneNode(!1);r.style.borderLeftWidth="1px";r.style.borderRightWidth="1px";r.style.backgroundColor=Format.inactiveTabBackgroundColor;u(e,g,m++);var x=f.cloneNode(!1);x.style.display= "none";mxUtils.write(r,mxResources.get("style"));f.appendChild(r);this.panels.push(new DiagramStylePanel(this,a,x));this.container.appendChild(x);u(r,x,m++)}this.showCloseButton&&(r=e.cloneNode(!1),r.style.borderLeftWidth="1px",r.style.borderRightWidth="1px",r.style.borderBottomWidth="1px",r.style.backgroundColor=Format.inactiveTabBackgroundColor,r.style.position="absolute",r.style.right="0px",r.style.top="0px",r.style.width="25px",u=document.createElement("img"),u.setAttribute("border","0"),u.setAttribute("src", Dialog.prototype.closeImage),u.setAttribute("title",mxResources.get("hide")),u.style.position="absolute",u.style.display="block",u.style.right="0px",u.style.top="8px",u.style.cursor="pointer",u.style.marginTop="1px",u.style.marginRight="6px",u.style.border="1px solid transparent",u.style.padding="1px",u.style.opacity=.5,r.appendChild(u),mxEvent.addListener(u,"click",function(){a.actions.get("formatPanel").funct()}),f.appendChild(r))}else if(b.isEditing())mxUtils.write(e,mxResources.get("text")),f.appendChild(e), @@ -2966,7 +2964,7 @@ this.panels.push(new TextFormatPanel(this,a,f));else{e.style.backgroundColor=For x.style.display="none",this.panels.push(new StyleFormatPanel(this,a,x)),this.container.appendChild(x),u(e,x,m++));mxUtils.write(r,mxResources.get("text"));f.appendChild(r);e=f.cloneNode(!1);e.style.display="none";this.panels.push(new TextFormatPanel(this,a,e));this.container.appendChild(e);mxUtils.write(B,mxResources.get("arrange"));f.appendChild(B);f=f.cloneNode(!1);f.style.display="none";this.panels.push(new ArrangePanel(this,a,f));this.container.appendChild(f);0<g.cells.length?u(r,e,m++):r.style.display= "none";u(B,f,m++,!0)}}};BaseFormatPanel=function(a,b,f){this.format=a;this.editorUi=b;this.container=f;this.listeners=[]};BaseFormatPanel.prototype.buttonBackgroundColor="white"; BaseFormatPanel.prototype.installInputHandler=function(a,b,f,e,g,d,k,n){d=null!=d?d:"";n=null!=n?n:!1;var u=this.editorUi,m=u.editor.graph;e=null!=e?e:1;g=null!=g?g:999;var r=null,x=!1,B=mxUtils.bind(this,function(D){var F=n?parseFloat(a.value):parseInt(a.value);isNaN(F)||b!=mxConstants.STYLE_ROTATION||(F=mxUtils.mod(Math.round(100*F),36E3)/100);F=Math.min(g,Math.max(e,isNaN(F)?f:F));if(m.cellEditor.isContentEditing()&&k)x||(x=!0,null!=r&&(m.cellEditor.restoreSelection(r),r=null),k(F),a.value=F+d, -x=!1);else if(F!=mxUtils.getValue(u.getSelectionState().style,b,f)){m.isEditing()&&m.stopEditing(!0);m.getModel().beginUpdate();try{var J=u.getSelectionState().cells;m.setCellStyles(b,F,J);b==mxConstants.STYLE_FONTSIZE&&m.updateLabelElements(J,function(O){O.style.fontSize=F+"px";O.removeAttribute("size")});for(var C=0;C<J.length;C++)0==m.model.getChildCount(J[C])&&m.autoSizeCell(J[C],!1);u.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[F],"cells",J))}finally{m.getModel().endUpdate()}}a.value= +x=!1);else if(F!=mxUtils.getValue(u.getSelectionState().style,b,f)){m.isEditing()&&m.stopEditing(!0);m.getModel().beginUpdate();try{var I=u.getSelectionState().cells;m.setCellStyles(b,F,I);b==mxConstants.STYLE_FONTSIZE&&m.updateLabelElements(I,function(N){N.style.fontSize=F+"px";N.removeAttribute("size")});for(var C=0;C<I.length;C++)0==m.model.getChildCount(I[C])&&m.autoSizeCell(I[C],!1);u.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[F],"cells",I))}finally{m.getModel().endUpdate()}}a.value= F+d;mxEvent.consume(D)});k&&m.cellEditor.isContentEditing()&&(mxEvent.addListener(a,"mousedown",function(){document.activeElement==m.cellEditor.textarea&&(r=m.cellEditor.saveSelection())}),mxEvent.addListener(a,"touchstart",function(){document.activeElement==m.cellEditor.textarea&&(r=m.cellEditor.saveSelection())}));mxEvent.addListener(a,"change",B);mxEvent.addListener(a,"blur",B);return B}; BaseFormatPanel.prototype.createPanel=function(){var a=document.createElement("div");a.className="geFormatSection";a.style.padding="12px 0px 12px 14px";return a};BaseFormatPanel.prototype.createTitle=function(a){var b=document.createElement("div");b.style.padding="0px 0px 6px 0px";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.width="200px";b.style.fontWeight="bold";mxUtils.write(b,a);return b}; BaseFormatPanel.prototype.addAction=function(a,b){var f=this.editorUi.actions.get(b);b=null;null!=f&&f.isEnabled()&&(b=mxUtils.button(f.label,function(e){f.funct(e,e)}),b.setAttribute("title",f.label+(null!=f.shortcut?" ("+f.shortcut+")":"")),b.style.marginBottom="2px",b.style.width="210px",a.appendChild(b),result=!0);return b}; @@ -2979,9 +2977,9 @@ a);d.appendChild(n);var u=!1,m=b(),r=function(x,B){u||(u=!0,x?(k.setAttribute("c BaseFormatPanel.prototype.createCellOption=function(a,b,f,e,g,d,k,n,u){var m=this.editorUi,r=m.editor.graph;e=null!=e?"null"==e?null:e:1;g=null!=g?"null"==g?null:g:0;var x=null!=u?r.getCommonStyle(u):m.getSelectionState().style;return this.createOption(a,function(){return mxUtils.getValue(x,b,f)!=g},function(B){n&&r.stopEditing();if(null!=k)k.funct();else{r.getModel().beginUpdate();try{var D=null!=u?u:m.getSelectionState().cells;B=B?e:g;r.setCellStyles(b,B,D);null!=d&&d(D,B);m.fireEvent(new mxEventObject("styleChanged", "keys",[b],"values",[B],"cells",D))}finally{r.getModel().endUpdate()}}},{install:function(B){this.listener=function(){B(mxUtils.getValue(x,b,f)!=g)};r.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){r.getModel().removeListener(this.listener)}})}; BaseFormatPanel.prototype.createColorOption=function(a,b,f,e,g,d,k,n){var u=document.createElement("div");u.style.padding="3px 0px 3px 0px";u.style.whiteSpace="nowrap";u.style.overflow="hidden";u.style.width="200px";u.style.height="18px";var m=document.createElement("input");m.setAttribute("type","checkbox");m.style.margin="1px 6px 0px 0px";m.style.verticalAlign="top";k||u.appendChild(m);var r=document.createElement("span");r.style.verticalAlign="top";mxUtils.write(r,a);u.appendChild(r);var x=b(), -B=!1,D=null,F=function(C,O,R){if(!B){var T="null"==e?null:e;B=!0;C=/(^#?[a-zA-Z0-9]*$)/.test(C)?C:T;T=null!=C&&C!=mxConstants.NONE?C:T;var Q=document.createElement("div");Q.style.width="36px";Q.style.height="12px";Q.style.margin="3px";Q.style.border="1px solid black";Q.style.backgroundColor="default"==T?n:T;D.innerText="";D.appendChild(Q);null!=C&&C!=mxConstants.NONE&&1<C.length&&"string"===typeof C&&(T="#"==C.charAt(0)?C.substring(1).toUpperCase():C,T=ColorDialog.prototype.colorNames[T],D.setAttribute("title", -null!=T?T+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper"));null!=C&&C!=mxConstants.NONE?(m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0):(m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1);D.style.display=m.checked||k?"":"none";null!=d&&d("null"==C?null:C);x=C;O||(R||k||b()!=x)&&f("null"==x?null:x,x);B=!1}},J=document.createElement("input");J.setAttribute("type","color");J.style.visibility="hidden";J.style.width="0px";J.style.height="0px";J.style.border= -"none";u.appendChild(J);D=mxUtils.button("",mxUtils.bind(this,function(C){var O=x;"default"==O&&(O=n);!mxEvent.isShiftDown(C)||mxClient.IS_IE||mxClient.IS_IE11?this.editorUi.pickColor(O,function(R){F(R,null,!0)},n):(J.value=O,J.click(),mxEvent.addListener(J,"input",function(){F(J.value,null,!0)}));mxEvent.consume(C)}));D.style.position="absolute";D.style.marginTop="-3px";D.style.left="178px";D.style.height="22px";D.className="geColorBtn";D.style.display=m.checked||k?"":"none";u.appendChild(D);a=null!= +B=!1,D=null,F=function(C,N,R){if(!B){var S="null"==e?null:e;B=!0;C=/(^#?[a-zA-Z0-9]*$)/.test(C)?C:S;S=null!=C&&C!=mxConstants.NONE?C:S;var Q=document.createElement("div");Q.style.width="36px";Q.style.height="12px";Q.style.margin="3px";Q.style.border="1px solid black";Q.style.backgroundColor="default"==S?n:S;D.innerText="";D.appendChild(Q);null!=C&&C!=mxConstants.NONE&&1<C.length&&"string"===typeof C&&(S="#"==C.charAt(0)?C.substring(1).toUpperCase():C,S=ColorDialog.prototype.colorNames[S],D.setAttribute("title", +null!=S?S+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper"));null!=C&&C!=mxConstants.NONE?(m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0):(m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1);D.style.display=m.checked||k?"":"none";null!=d&&d("null"==C?null:C);x=C;N||(R||k||b()!=x)&&f("null"==x?null:x,x);B=!1}},I=document.createElement("input");I.setAttribute("type","color");I.style.visibility="hidden";I.style.width="0px";I.style.height="0px";I.style.border= +"none";u.appendChild(I);D=mxUtils.button("",mxUtils.bind(this,function(C){var N=x;"default"==N&&(N=n);!mxEvent.isShiftDown(C)||mxClient.IS_IE||mxClient.IS_IE11?this.editorUi.pickColor(N,function(R){F(R,null,!0)},n):(I.value=N,I.click(),mxEvent.addListener(I,"input",function(){F(I.value,null,!0)}));mxEvent.consume(C)}));D.style.position="absolute";D.style.marginTop="-3px";D.style.left="178px";D.style.height="22px";D.className="geColorBtn";D.style.display=m.checked||k?"":"none";u.appendChild(D);a=null!= x&&"string"===typeof x&&"#"==x.charAt(0)?x.substring(1).toUpperCase():x;a=ColorDialog.prototype.colorNames[a];D.setAttribute("title",null!=a?a+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper");mxEvent.addListener(u,"click",function(C){C=mxEvent.getSource(C);if(C==m||"INPUT"!=C.nodeName)C!=m&&(m.checked=!m.checked),m.checked||null==x||x==mxConstants.NONE||e==mxConstants.NONE||(e=x),F(m.checked?e:mxConstants.NONE)});F(x,!0);null!=g&&(g.install(F),this.listeners.push(g));return u}; BaseFormatPanel.prototype.createCellColorOption=function(a,b,f,e,g,d){var k=this.editorUi,n=k.editor.graph;return this.createColorOption(a,function(){var u=n.view.getState(k.getSelectionState().cells[0]);return null!=u?mxUtils.getValue(u.style,b,null):null},function(u,m){n.getModel().beginUpdate();try{var r=k.getSelectionState().cells;n.setCellStyles(b,u,r);null!=g&&g(u);k.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[u],"cells",r))}finally{n.getModel().endUpdate()}},f||mxConstants.NONE, {install:function(u){this.listener=function(){var m=n.view.getState(k.getSelectionState().cells[0]);null!=m&&u(mxUtils.getValue(m.style,b,null),!0)};n.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){n.getModel().removeListener(this.listener)}},e,null,d)}; @@ -3023,78 +3021,78 @@ BaseFormatPanel.prototype.getUnitStep=function(){switch(this.editorUi.editor.gra ArrangePanel.prototype.addGeometry=function(a){var b=this,f=this.editorUi,e=f.editor.graph,g=e.getModel(),d=f.getSelectionState(),k=this.createPanel();k.style.paddingBottom="8px";var n=document.createElement("div");n.style.position="absolute";n.style.width="50px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("size"));k.appendChild(n);var u=this.addUnitInput(k,this.getUnit(),87,52,function(){D.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()), m=this.addUnitInput(k,this.getUnit(),16,52,function(){F.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),r=document.createElement("div");r.className="geSprite geSprite-fit";r.setAttribute("title",mxResources.get("autosize")+" ("+this.editorUi.actions.get("autosize").shortcut+")");r.style.position="relative";r.style.cursor="pointer";r.style.marginTop="-3px";r.style.border="0px";r.style.left="42px";mxUtils.setOpacity(r,50);mxEvent.addListener(r,"mouseenter",function(){mxUtils.setOpacity(r, 100)});mxEvent.addListener(r,"mouseleave",function(){mxUtils.setOpacity(r,50)});mxEvent.addListener(r,"click",function(){f.actions.get("autosize").funct()});k.appendChild(r);d.row?(u.style.visibility="hidden",u.nextSibling.style.visibility="hidden"):this.addLabel(k,mxResources.get("width"),87);this.addLabel(k,mxResources.get("height"),16);mxUtils.br(k);n=document.createElement("div");n.style.paddingTop="8px";n.style.paddingRight="20px";n.style.whiteSpace="nowrap";n.style.textAlign="right";var x=this.createCellOption(mxResources.get("constrainProportions"), -mxConstants.STYLE_ASPECT,null,"fixed","null");x.style.width="210px";n.appendChild(x);d.cell||d.row?r.style.visibility="hidden":k.appendChild(n);var B=x.getElementsByTagName("input")[0];this.addKeyHandler(u,R);this.addKeyHandler(m,R);var D=this.addGeometryHandler(u,function(S,P,X){if(e.isTableCell(X))return e.setTableColumnWidth(X,P-S.width,!0),!0;0<S.width&&(P=Math.max(1,b.fromUnit(P)),B.checked&&(S.height=Math.round(S.height*P*100/S.width)/100),S.width=P)});var F=this.addGeometryHandler(m,function(S, -P,X){e.isTableCell(X)&&(X=e.model.getParent(X));if(e.isTableRow(X))return e.setTableRowHeight(X,P-S.height),!0;0<S.height&&(P=Math.max(1,b.fromUnit(P)),B.checked&&(S.width=Math.round(S.width*P*100/S.height)/100),S.height=P)});(d.resizable||d.row||d.cell)&&a.appendChild(k);var J=this.createPanel();J.style.paddingBottom="30px";n=document.createElement("div");n.style.position="absolute";n.style.width="70px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("position")); -J.appendChild(n);var C=this.addUnitInput(J,this.getUnit(),87,52,function(){T.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),O=this.addUnitInput(J,this.getUnit(),16,52,function(){Q.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(J);this.addLabel(J,mxResources.get("left"),87);this.addLabel(J,mxResources.get("top"),16);var R=mxUtils.bind(this,function(S,P,X){d=f.getSelectionState();if(d.containsLabel||d.vertices.length!=e.getSelectionCount()|| -null==d.width||null==d.height)k.style.display="none";else{k.style.display="";if(X||document.activeElement!=u)u.value=this.inUnit(d.width)+(""==d.width?"":" "+this.getUnit());if(X||document.activeElement!=m)m.value=this.inUnit(d.height)+(""==d.height?"":" "+this.getUnit())}if(d.vertices.length==e.getSelectionCount()&&null!=d.x&&null!=d.y){J.style.display="";if(X||document.activeElement!=C)C.value=this.inUnit(d.x)+(""==d.x?"":" "+this.getUnit());if(X||document.activeElement!=O)O.value=this.inUnit(d.y)+ -(""==d.y?"":" "+this.getUnit())}else J.style.display="none"});this.addKeyHandler(C,R);this.addKeyHandler(O,R);g.addListener(mxEvent.CHANGE,R);this.listeners.push({destroy:function(){g.removeListener(R)}});R();var T=this.addGeometryHandler(C,function(S,P){P=b.fromUnit(P);S.relative?S.offset.x=P:S.x=P});var Q=this.addGeometryHandler(O,function(S,P){P=b.fromUnit(P);S.relative?S.offset.y=P:S.y=P});if(d.movable){if(0==d.edges.length&&1==d.vertices.length&&g.isEdge(g.getParent(d.vertices[0]))){var aa=e.getCellGeometry(d.vertices[0]); -null!=aa&&aa.relative&&(n=mxUtils.button(mxResources.get("center"),mxUtils.bind(this,function(S){g.beginUpdate();try{aa=aa.clone(),aa.x=0,aa.y=0,aa.offset=new mxPoint,g.setGeometry(d.vertices[0],aa)}finally{g.endUpdate()}})),n.setAttribute("title",mxResources.get("center")),n.style.width="210px",n.style.position="absolute",mxUtils.br(J),mxUtils.br(J),J.appendChild(n))}a.appendChild(J)}}; +mxConstants.STYLE_ASPECT,null,"fixed","null");x.style.width="210px";n.appendChild(x);d.cell||d.row?r.style.visibility="hidden":k.appendChild(n);var B=x.getElementsByTagName("input")[0];this.addKeyHandler(u,R);this.addKeyHandler(m,R);var D=this.addGeometryHandler(u,function(U,P,Y){if(e.isTableCell(Y))return e.setTableColumnWidth(Y,P-U.width,!0),!0;0<U.width&&(P=Math.max(1,b.fromUnit(P)),B.checked&&(U.height=Math.round(U.height*P*100/U.width)/100),U.width=P)});var F=this.addGeometryHandler(m,function(U, +P,Y){e.isTableCell(Y)&&(Y=e.model.getParent(Y));if(e.isTableRow(Y))return e.setTableRowHeight(Y,P-U.height),!0;0<U.height&&(P=Math.max(1,b.fromUnit(P)),B.checked&&(U.width=Math.round(U.width*P*100/U.height)/100),U.height=P)});(d.resizable||d.row||d.cell)&&a.appendChild(k);var I=this.createPanel();I.style.paddingBottom="30px";n=document.createElement("div");n.style.position="absolute";n.style.width="70px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("position")); +I.appendChild(n);var C=this.addUnitInput(I,this.getUnit(),87,52,function(){S.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),N=this.addUnitInput(I,this.getUnit(),16,52,function(){Q.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(I);this.addLabel(I,mxResources.get("left"),87);this.addLabel(I,mxResources.get("top"),16);var R=mxUtils.bind(this,function(U,P,Y){d=f.getSelectionState();if(d.containsLabel||d.vertices.length!=e.getSelectionCount()|| +null==d.width||null==d.height)k.style.display="none";else{k.style.display="";if(Y||document.activeElement!=u)u.value=this.inUnit(d.width)+(""==d.width?"":" "+this.getUnit());if(Y||document.activeElement!=m)m.value=this.inUnit(d.height)+(""==d.height?"":" "+this.getUnit())}if(d.vertices.length==e.getSelectionCount()&&null!=d.x&&null!=d.y){I.style.display="";if(Y||document.activeElement!=C)C.value=this.inUnit(d.x)+(""==d.x?"":" "+this.getUnit());if(Y||document.activeElement!=N)N.value=this.inUnit(d.y)+ +(""==d.y?"":" "+this.getUnit())}else I.style.display="none"});this.addKeyHandler(C,R);this.addKeyHandler(N,R);g.addListener(mxEvent.CHANGE,R);this.listeners.push({destroy:function(){g.removeListener(R)}});R();var S=this.addGeometryHandler(C,function(U,P){P=b.fromUnit(P);U.relative?U.offset.x=P:U.x=P});var Q=this.addGeometryHandler(N,function(U,P){P=b.fromUnit(P);U.relative?U.offset.y=P:U.y=P});if(d.movable){if(0==d.edges.length&&1==d.vertices.length&&g.isEdge(g.getParent(d.vertices[0]))){var aa=e.getCellGeometry(d.vertices[0]); +null!=aa&&aa.relative&&(n=mxUtils.button(mxResources.get("center"),mxUtils.bind(this,function(U){g.beginUpdate();try{aa=aa.clone(),aa.x=0,aa.y=0,aa.offset=new mxPoint,g.setGeometry(d.vertices[0],aa)}finally{g.endUpdate()}})),n.setAttribute("title",mxResources.get("center")),n.style.width="210px",n.style.position="absolute",mxUtils.br(I),mxUtils.br(I),I.appendChild(n))}a.appendChild(I)}}; ArrangePanel.prototype.addGeometryHandler=function(a,b){function f(n){if(""!=a.value){var u=parseFloat(a.value);if(isNaN(u))a.value=d+" "+k.getUnit();else if(u!=d){g.getModel().beginUpdate();try{for(var m=e.getSelectionState().cells,r=0;r<m.length;r++)if(g.getModel().isVertex(m[r])){var x=g.getCellGeometry(m[r]);if(null!=x&&(x=x.clone(),!b(x,u,m[r]))){var B=g.view.getState(m[r]);null!=B&&g.isRecursiveVertexResize(B)&&g.resizeChildCells(m[r],x);g.getModel().setGeometry(m[r],x);g.constrainChildCells(m[r])}}}finally{g.getModel().endUpdate()}d= u;a.value=u+" "+k.getUnit()}}mxEvent.consume(n)}var e=this.editorUi,g=e.editor.graph,d=null,k=this;mxEvent.addListener(a,"blur",f);mxEvent.addListener(a,"change",f);mxEvent.addListener(a,"focus",function(){d=a.value});return f}; ArrangePanel.prototype.addEdgeGeometryHandler=function(a,b){function f(k){if(""!=a.value){var n=parseFloat(a.value);if(isNaN(n))a.value=d+" pt";else if(n!=d){g.getModel().beginUpdate();try{for(var u=e.getSelectionState().cells,m=0;m<u.length;m++)if(g.getModel().isEdge(u[m])){var r=g.getCellGeometry(u[m]);null!=r&&(r=r.clone(),b(r,n),g.getModel().setGeometry(u[m],r))}}finally{g.getModel().endUpdate()}d=n;a.value=n+" pt"}}mxEvent.consume(k)}var e=this.editorUi,g=e.editor.graph,d=null;mxEvent.addListener(a, "blur",f);mxEvent.addListener(a,"change",f);mxEvent.addListener(a,"focus",function(){d=a.value});return f}; -ArrangePanel.prototype.addEdgeGeometry=function(a){var b=this.editorUi,f=b.editor.graph,e=b.getSelectionState(),g=this.createPanel(),d=document.createElement("div");d.style.position="absolute";d.style.width="70px";d.style.marginTop="0px";d.style.fontWeight="bold";mxUtils.write(d,mxResources.get("width"));g.appendChild(d);var k=this.addUnitInput(g,"pt",12,44,function(){n.apply(this,arguments)});mxUtils.br(g);this.addKeyHandler(k,F);var n=mxUtils.bind(this,function(T){var Q=parseInt(k.value);Q=Math.min(999, -Math.max(1,isNaN(Q)?1:Q));if(Q!=mxUtils.getValue(e.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)){var aa=b.getSelectionState().cells;f.setCellStyles("width",Q,aa);b.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[Q],"cells",aa))}k.value=Q+" pt";mxEvent.consume(T)});mxEvent.addListener(k,"blur",n);mxEvent.addListener(k,"change",n);a.appendChild(g);var u=this.createPanel();u.style.paddingBottom="30px";d=document.createElement("div");d.style.position= -"absolute";d.style.width="70px";d.style.marginTop="0px";mxUtils.write(d,mxResources.get("linestart"));u.appendChild(d);var m=this.addUnitInput(u,"pt",87,52,function(){J.apply(this,arguments)}),r=this.addUnitInput(u,"pt",16,52,function(){C.apply(this,arguments)});mxUtils.br(u);this.addLabel(u,mxResources.get("left"),87);this.addLabel(u,mxResources.get("top"),16);a.appendChild(u);this.addKeyHandler(m,F);this.addKeyHandler(r,F);var x=this.createPanel();x.style.paddingBottom="30px";d=document.createElement("div"); -d.style.position="absolute";d.style.width="70px";d.style.marginTop="0px";mxUtils.write(d,mxResources.get("lineend"));x.appendChild(d);var B=this.addUnitInput(x,"pt",87,52,function(){O.apply(this,arguments)}),D=this.addUnitInput(x,"pt",16,52,function(){R.apply(this,arguments)});mxUtils.br(x);this.addLabel(x,mxResources.get("left"),87);this.addLabel(x,mxResources.get("top"),16);a.appendChild(x);this.addKeyHandler(B,F);this.addKeyHandler(D,F);var F=mxUtils.bind(this,function(T,Q,aa){e=b.getSelectionState(); -T=e.cells[0];if("link"==e.style.shape||"flexArrow"==e.style.shape){if(g.style.display="",aa||document.activeElement!=k)aa=mxUtils.getValue(e.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),k.value=aa+" pt"}else g.style.display="none";1==e.cells.length&&f.model.isEdge(T)?(aa=f.model.getGeometry(T),null!=aa.sourcePoint&&null==f.model.getTerminal(T,!0)?(m.value=aa.sourcePoint.x,r.value=aa.sourcePoint.y):u.style.display="none",null!=aa.targetPoint&&null==f.model.getTerminal(T, -!1)?(B.value=aa.targetPoint.x,D.value=aa.targetPoint.y):x.style.display="none"):(u.style.display="none",x.style.display="none")});var J=this.addEdgeGeometryHandler(m,function(T,Q){T.sourcePoint.x=Q});var C=this.addEdgeGeometryHandler(r,function(T,Q){T.sourcePoint.y=Q});var O=this.addEdgeGeometryHandler(B,function(T,Q){T.targetPoint.x=Q});var R=this.addEdgeGeometryHandler(D,function(T,Q){T.targetPoint.y=Q});f.getModel().addListener(mxEvent.CHANGE,F);this.listeners.push({destroy:function(){f.getModel().removeListener(F)}}); +ArrangePanel.prototype.addEdgeGeometry=function(a){var b=this.editorUi,f=b.editor.graph,e=b.getSelectionState(),g=this.createPanel(),d=document.createElement("div");d.style.position="absolute";d.style.width="70px";d.style.marginTop="0px";d.style.fontWeight="bold";mxUtils.write(d,mxResources.get("width"));g.appendChild(d);var k=this.addUnitInput(g,"pt",12,44,function(){n.apply(this,arguments)});mxUtils.br(g);this.addKeyHandler(k,F);var n=mxUtils.bind(this,function(S){var Q=parseInt(k.value);Q=Math.min(999, +Math.max(1,isNaN(Q)?1:Q));if(Q!=mxUtils.getValue(e.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)){var aa=b.getSelectionState().cells;f.setCellStyles("width",Q,aa);b.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[Q],"cells",aa))}k.value=Q+" pt";mxEvent.consume(S)});mxEvent.addListener(k,"blur",n);mxEvent.addListener(k,"change",n);a.appendChild(g);var u=this.createPanel();u.style.paddingBottom="30px";d=document.createElement("div");d.style.position= +"absolute";d.style.width="70px";d.style.marginTop="0px";mxUtils.write(d,mxResources.get("linestart"));u.appendChild(d);var m=this.addUnitInput(u,"pt",87,52,function(){I.apply(this,arguments)}),r=this.addUnitInput(u,"pt",16,52,function(){C.apply(this,arguments)});mxUtils.br(u);this.addLabel(u,mxResources.get("left"),87);this.addLabel(u,mxResources.get("top"),16);a.appendChild(u);this.addKeyHandler(m,F);this.addKeyHandler(r,F);var x=this.createPanel();x.style.paddingBottom="30px";d=document.createElement("div"); +d.style.position="absolute";d.style.width="70px";d.style.marginTop="0px";mxUtils.write(d,mxResources.get("lineend"));x.appendChild(d);var B=this.addUnitInput(x,"pt",87,52,function(){N.apply(this,arguments)}),D=this.addUnitInput(x,"pt",16,52,function(){R.apply(this,arguments)});mxUtils.br(x);this.addLabel(x,mxResources.get("left"),87);this.addLabel(x,mxResources.get("top"),16);a.appendChild(x);this.addKeyHandler(B,F);this.addKeyHandler(D,F);var F=mxUtils.bind(this,function(S,Q,aa){e=b.getSelectionState(); +S=e.cells[0];if("link"==e.style.shape||"flexArrow"==e.style.shape){if(g.style.display="",aa||document.activeElement!=k)aa=mxUtils.getValue(e.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),k.value=aa+" pt"}else g.style.display="none";1==e.cells.length&&f.model.isEdge(S)?(aa=f.model.getGeometry(S),null!=aa.sourcePoint&&null==f.model.getTerminal(S,!0)?(m.value=aa.sourcePoint.x,r.value=aa.sourcePoint.y):u.style.display="none",null!=aa.targetPoint&&null==f.model.getTerminal(S, +!1)?(B.value=aa.targetPoint.x,D.value=aa.targetPoint.y):x.style.display="none"):(u.style.display="none",x.style.display="none")});var I=this.addEdgeGeometryHandler(m,function(S,Q){S.sourcePoint.x=Q});var C=this.addEdgeGeometryHandler(r,function(S,Q){S.sourcePoint.y=Q});var N=this.addEdgeGeometryHandler(B,function(S,Q){S.targetPoint.x=Q});var R=this.addEdgeGeometryHandler(D,function(S,Q){S.targetPoint.y=Q});f.getModel().addListener(mxEvent.CHANGE,F);this.listeners.push({destroy:function(){f.getModel().removeListener(F)}}); F()};TextFormatPanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};mxUtils.extend(TextFormatPanel,BaseFormatPanel);TextFormatPanel.prototype.init=function(){this.container.style.borderBottom="none";this.addFont(this.container)}; TextFormatPanel.prototype.addFont=function(a){function b(ca,t){ca.style.backgroundImage=t?Editor.isDarkMode()?"linear-gradient(rgb(0 161 241) 0px, rgb(0, 97, 146) 100%)":"linear-gradient(#c5ecff 0px,#87d4fb 100%)":""}var f=this.editorUi,e=f.editor.graph,g=f.getSelectionState(),d=this.createTitle(mxResources.get("font"));d.style.paddingLeft="14px";d.style.paddingTop="10px";d.style.paddingBottom="6px";a.appendChild(d);d=this.createPanel();d.style.paddingTop="2px";d.style.paddingBottom="2px";d.style.position= "relative";d.style.marginLeft="-2px";d.style.borderWidth="0px";d.className="geToolbarContainer";if(e.cellEditor.isContentEditing()){var k=d.cloneNode(),n=this.editorUi.toolbar.addMenu(mxResources.get("style"),mxResources.get("style"),!0,"formatBlock",k,null,!0);n.style.color="rgb(112, 112, 112)";n.style.whiteSpace="nowrap";n.style.overflow="hidden";n.style.margin="0px";this.addArrow(n);n.style.width="200px";n.style.height="15px";n=n.getElementsByTagName("div")[0];n.style.cssFloat="right";a.appendChild(k)}a.appendChild(d); k=this.createPanel();k.style.marginTop="8px";k.style.borderTop="1px solid #c0c0c0";k.style.paddingTop="6px";k.style.paddingBottom="6px";var u=this.editorUi.toolbar.addMenu("Helvetica",mxResources.get("fontFamily"),!0,"fontFamily",d,null,!0);u.style.color="rgb(112, 112, 112)";u.style.whiteSpace="nowrap";u.style.overflow="hidden";u.style.margin="0px";this.addArrow(u);u.style.width="200px";u.style.height="15px";n=d.cloneNode(!1);n.style.marginLeft="-3px";var m=this.editorUi.toolbar.addItems(["bold", "italic","underline"],n,!0);m[0].setAttribute("title",mxResources.get("bold")+" ("+this.editorUi.actions.get("bold").shortcut+")");m[1].setAttribute("title",mxResources.get("italic")+" ("+this.editorUi.actions.get("italic").shortcut+")");m[2].setAttribute("title",mxResources.get("underline")+" ("+this.editorUi.actions.get("underline").shortcut+")");var r=this.editorUi.toolbar.addItems(["vertical"],n,!0)[0];a.appendChild(n);this.styleButtons(m);this.styleButtons([r]);var x=d.cloneNode(!1);x.style.marginLeft= "-3px";x.style.paddingBottom="0px";var B=function(ca){return function(){return ca()}},D=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),e.cellEditor.isContentEditing()?function(ca){e.cellEditor.alignText(mxConstants.ALIGN_LEFT,ca);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_LEFT],"cells",g.cells))}:B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT])),x),F=this.editorUi.toolbar.addButton("geSprite-center", -mxResources.get("center"),e.cellEditor.isContentEditing()?function(ca){e.cellEditor.alignText(mxConstants.ALIGN_CENTER,ca);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_CENTER],"cells",g.cells))}:B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),x),J=this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),e.cellEditor.isContentEditing()?function(ca){e.cellEditor.alignText(mxConstants.ALIGN_RIGHT, -ca);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",g.cells))}:B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),x);this.styleButtons([D,F,J]);if(e.cellEditor.isContentEditing()){var C=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},n);this.styleButtons([C]);C.firstChild.style.background= +mxResources.get("center"),e.cellEditor.isContentEditing()?function(ca){e.cellEditor.alignText(mxConstants.ALIGN_CENTER,ca);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_CENTER],"cells",g.cells))}:B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),x),I=this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),e.cellEditor.isContentEditing()?function(ca){e.cellEditor.alignText(mxConstants.ALIGN_RIGHT, +ca);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",g.cells))}:B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),x);this.styleButtons([D,F,I]);if(e.cellEditor.isContentEditing()){var C=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},n);this.styleButtons([C]);C.firstChild.style.background= "url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjR2MjRIMFYweiIvPjwvZGVmcz48Y2xpcFBhdGggaWQ9ImIiPjx1c2UgeGxpbms6aHJlZj0iI2EiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9jbGlwUGF0aD48cGF0aCBjbGlwLXBhdGg9InVybCgjYikiIGZpbGw9IiMwMTAxMDEiIGQ9Ik03LjI0IDguNzVjLS4yNi0uNDgtLjM5LTEuMDMtLjM5LTEuNjcgMC0uNjEuMTMtMS4xNi40LTEuNjcuMjYtLjUuNjMtLjkzIDEuMTEtMS4yOS40OC0uMzUgMS4wNS0uNjMgMS43LS44My42Ni0uMTkgMS4zOS0uMjkgMi4xOC0uMjkuODEgMCAxLjU0LjExIDIuMjEuMzQuNjYuMjIgMS4yMy41NCAxLjY5Ljk0LjQ3LjQuODMuODggMS4wOCAxLjQzLjI1LjU1LjM4IDEuMTUuMzggMS44MWgtMy4wMWMwLS4zMS0uMDUtLjU5LS4xNS0uODUtLjA5LS4yNy0uMjQtLjQ5LS40NC0uNjgtLjItLjE5LS40NS0uMzMtLjc1LS40NC0uMy0uMS0uNjYtLjE2LTEuMDYtLjE2LS4zOSAwLS43NC4wNC0xLjAzLjEzLS4yOS4wOS0uNTMuMjEtLjcyLjM2LS4xOS4xNi0uMzQuMzQtLjQ0LjU1LS4xLjIxLS4xNS40My0uMTUuNjYgMCAuNDguMjUuODguNzQgMS4yMS4zOC4yNS43Ny40OCAxLjQxLjdINy4zOWMtLjA1LS4wOC0uMTEtLjE3LS4xNS0uMjV6TTIxIDEydi0ySDN2Mmg5LjYyYy4xOC4wNy40LjE0LjU1LjIuMzcuMTcuNjYuMzQuODcuNTEuMjEuMTcuMzUuMzYuNDMuNTcuMDcuMi4xMS40My4xMS42OSAwIC4yMy0uMDUuNDUtLjE0LjY2LS4wOS4yLS4yMy4zOC0uNDIuNTMtLjE5LjE1LS40Mi4yNi0uNzEuMzUtLjI5LjA4LS42My4xMy0xLjAxLjEzLS40MyAwLS44My0uMDQtMS4xOC0uMTNzLS42Ni0uMjMtLjkxLS40MmMtLjI1LS4xOS0uNDUtLjQ0LS41OS0uNzUtLjE0LS4zMS0uMjUtLjc2LS4yNS0xLjIxSDYuNGMwIC41NS4wOCAxLjEzLjI0IDEuNTguMTYuNDUuMzcuODUuNjUgMS4yMS4yOC4zNS42LjY2Ljk4LjkyLjM3LjI2Ljc4LjQ4IDEuMjIuNjUuNDQuMTcuOS4zIDEuMzguMzkuNDguMDguOTYuMTMgMS40NC4xMy44IDAgMS41My0uMDkgMi4xOC0uMjhzMS4yMS0uNDUgMS42Ny0uNzljLjQ2LS4zNC44Mi0uNzcgMS4wNy0xLjI3cy4zOC0xLjA3LjM4LTEuNzFjMC0uNi0uMS0xLjE0LS4zMS0xLjYxLS4wNS0uMTEtLjExLS4yMy0uMTctLjMzSDIxeiIvPjwvc3ZnPg==)"; -C.firstChild.style.backgroundPosition="2px 2px";C.firstChild.style.backgroundSize="18px 18px";this.styleButtons([C])}var O=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),x),R=this.editorUi.toolbar.addButton("geSprite-middle",mxResources.get("middle"),B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),x),T=this.editorUi.toolbar.addButton("geSprite-bottom", -mxResources.get("bottom"),B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),x);this.styleButtons([O,R,T]);a.appendChild(x);var Q,aa,S,P,X;if(e.cellEditor.isContentEditing()){O.style.display="none";R.style.display="none";T.style.display="none";r.style.display="none";var ha=this.editorUi.toolbar.addButton("geSprite-justifyfull",mxResources.get("block"),function(){1==ha.style.opacity&&document.execCommand("justifyfull",!1,null)},x);ha.style.marginRight= -"9px";ha.style.opacity=1;this.styleButtons([ha,Q=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},x),aa=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},x)]);Q.style.marginLeft="10px";B=x.cloneNode(!1);B.style.paddingTop="4px";x=[this.editorUi.toolbar.addButton("geSprite-orderedlist", +C.firstChild.style.backgroundPosition="2px 2px";C.firstChild.style.backgroundSize="18px 18px";this.styleButtons([C])}var N=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),x),R=this.editorUi.toolbar.addButton("geSprite-middle",mxResources.get("middle"),B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),x),S=this.editorUi.toolbar.addButton("geSprite-bottom", +mxResources.get("bottom"),B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),x);this.styleButtons([N,R,S]);a.appendChild(x);var Q,aa,U,P,Y;if(e.cellEditor.isContentEditing()){N.style.display="none";R.style.display="none";S.style.display="none";r.style.display="none";var ja=this.editorUi.toolbar.addButton("geSprite-justifyfull",mxResources.get("block"),function(){1==ja.style.opacity&&document.execCommand("justifyfull",!1,null)},x);ja.style.marginRight= +"9px";ja.style.opacity=1;this.styleButtons([ja,Q=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},x),aa=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},x)]);Q.style.marginLeft="10px";B=x.cloneNode(!1);B.style.paddingTop="4px";x=[this.editorUi.toolbar.addButton("geSprite-orderedlist", mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},B),this.editorUi.toolbar.addButton("geSprite-unorderedlist",mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},B),this.editorUi.toolbar.addButton("geSprite-outdent",mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},B),this.editorUi.toolbar.addButton("geSprite-indent",mxResources.get("increaseIndent"),function(){document.execCommand("indent", -!1,null)},B),this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},B),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){e.cellEditor.toggleViewMode()},B)];this.styleButtons(x);x[x.length-2].style.marginLeft="10px";a.appendChild(B)}else m[2].style.marginRight="12px",J.style.marginRight="12px";x=d.cloneNode(!1);x.style.marginLeft="0px";x.style.paddingTop="8px";x.style.paddingBottom= -"4px";x.style.fontWeight="normal";mxUtils.write(x,mxResources.get("position"));var fa=document.createElement("select");fa.style.position="absolute";fa.style.left="126px";fa.style.width="98px";fa.style.border="1px solid rgb(160, 160, 160)";fa.style.borderRadius="4px";fa.style.marginTop="-2px";C="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" ");var sa={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER, +!1,null)},B),this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},B),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){e.cellEditor.toggleViewMode()},B)];this.styleButtons(x);x[x.length-2].style.marginLeft="10px";a.appendChild(B)}else m[2].style.marginRight="12px",I.style.marginRight="12px";x=d.cloneNode(!1);x.style.marginLeft="0px";x.style.paddingTop="8px";x.style.paddingBottom= +"4px";x.style.fontWeight="normal";mxUtils.write(x,mxResources.get("position"));var fa=document.createElement("select");fa.style.position="absolute";fa.style.left="126px";fa.style.width="98px";fa.style.border="1px solid rgb(160, 160, 160)";fa.style.borderRadius="4px";fa.style.marginTop="-2px";C="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" ");var ra={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER, mxConstants.ALIGN_TOP,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],left:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE],center:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT, mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]};for(B=0;B<C.length;B++){var K=document.createElement("option");K.setAttribute("value",C[B]);mxUtils.write(K,mxResources.get(C[B]));fa.appendChild(K)}x.appendChild(fa);C=d.cloneNode(!1);C.style.marginLeft="0px";C.style.paddingTop= -"4px";C.style.paddingBottom="4px";C.style.fontWeight="normal";mxUtils.write(C,mxResources.get("writingDirection"));var V=document.createElement("select");V.style.position="absolute";V.style.border="1px solid rgb(160, 160, 160)";V.style.left="126px";V.style.width="98px";V.style.borderRadius="4px";V.style.marginTop="-2px";K=["automatic","leftToRight","rightToLeft"];var G={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL};for(B=0;B<K.length;B++){var M= -document.createElement("option");M.setAttribute("value",K[B]);mxUtils.write(M,mxResources.get(K[B]));V.appendChild(M)}C.appendChild(V);e.isEditing()||(a.appendChild(x),mxEvent.addListener(fa,"change",function(ca){e.getModel().beginUpdate();try{var t=sa[fa.value];null!=t&&(e.setCellStyles(mxConstants.STYLE_LABEL_POSITION,t[0],g.cells),e.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,t[1],g.cells),e.setCellStyles(mxConstants.STYLE_ALIGN,t[2],g.cells),e.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN, -t[3],g.cells))}finally{e.getModel().endUpdate()}mxEvent.consume(ca)}),a.appendChild(C),mxEvent.addListener(V,"change",function(ca){e.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,G[V.value],g.cells);mxEvent.consume(ca)}));var U=document.createElement("input");U.style.position="absolute";U.style.border="1px solid rgb(160, 160, 160)";U.style.textAlign="right";U.style.marginTop="4px";U.style.left="161px";U.style.width="53px";U.style.borderRadius="4px";U.style.height="23px";U.style.boxSizing="border-box"; -n.appendChild(U);var ba=null;x=this.installInputHandler(U,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,1,999," pt",function(ca){if(window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11){var t=function(H,L){null!=e.cellEditor.textarea&&H!=e.cellEditor.textarea&&e.cellEditor.textarea.contains(H)&&(L||z.containsNode(H,!0))&&("FONT"==H.nodeName?(H.removeAttribute("size"),H.style.fontSize=ca+"px"):mxUtils.getCurrentStyle(H).fontSize!=ca+"px"&&(mxUtils.getCurrentStyle(H.parentNode).fontSize!= -ca+"px"?H.style.fontSize=ca+"px":H.style.fontSize=""));f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTSIZE],"values",[ca],"cells",g.cells))},z=window.getSelection(),A=0<z.rangeCount?z.getRangeAt(0).commonAncestorContainer:e.cellEditor.textarea;A!=e.cellEditor.textarea&&A.nodeType==mxConstants.NODETYPE_ELEMENT||document.execCommand("fontSize",!1,"1");A!=e.cellEditor.textarea&&(A=A.parentNode);if(null!=A&&A.nodeType==mxConstants.NODETYPE_ELEMENT){var E=A.getElementsByTagName("*"); -t(A);for(A=0;A<E.length;A++)t(E[A])}U.value=ca+" pt"}else if(window.getSelection||document.selection)if(t=function(H,L){for(;null!=L;){if(L===H)return!0;L=L.parentNode}return!1},E=null,document.selection?E=document.selection.createRange().parentElement():(z=window.getSelection(),0<z.rangeCount&&(E=z.getRangeAt(0).commonAncestorContainer)),null!=E&&t(e.cellEditor.textarea,E))for(ba=ca,document.execCommand("fontSize",!1,"4"),E=e.cellEditor.textarea.getElementsByTagName("font"),A=0;A<E.length;A++)if("4"== -E[A].getAttribute("size")){E[A].removeAttribute("size");E[A].style.fontSize=ba+"px";window.setTimeout(function(){U.value=ba+" pt";ba=null},0);break}},!0);x=this.createStepper(U,x,1,10,!0,Menus.prototype.defaultFontSize);x.style.display=U.style.display;x.style.marginTop="4px";x.style.left="214px";n.appendChild(x);n=u.getElementsByTagName("div")[0];n.style.cssFloat="right";var la=null,ra=e.shapeBackgroundColor,Y=null,da=e.shapeForegroundColor,pa=e.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"), -function(){return ra},function(ca){document.execCommand("backcolor",!1,ca!=mxConstants.NONE?ca:"transparent");f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],"values",[ca],"cells",g.cells))},e.shapeBackgroundColor,{install:function(ca){la=ca},destroy:function(){la=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"default",null,function(ca){e.updateLabelElements(g.cells,function(t){t.style.backgroundColor= -null})},e.shapeBackgroundColor);pa.style.fontWeight="bold";var wa=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"default",null,null,e.shapeForegroundColor);wa.style.fontWeight="bold";n=1<=g.vertices.length?e.stylesheet.getDefaultVertexStyle():e.stylesheet.getDefaultEdgeStyle();n=e.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return da},function(ca){if(mxClient.IS_FF){for(var t=e.cellEditor.textarea.getElementsByTagName("font"), +"4px";C.style.paddingBottom="4px";C.style.fontWeight="normal";mxUtils.write(C,mxResources.get("writingDirection"));var V=document.createElement("select");V.style.position="absolute";V.style.border="1px solid rgb(160, 160, 160)";V.style.left="126px";V.style.width="98px";V.style.borderRadius="4px";V.style.marginTop="-2px";K=["automatic","leftToRight","rightToLeft"];var O={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL};for(B=0;B<K.length;B++){var T= +document.createElement("option");T.setAttribute("value",K[B]);mxUtils.write(T,mxResources.get(K[B]));V.appendChild(T)}C.appendChild(V);e.isEditing()||(a.appendChild(x),mxEvent.addListener(fa,"change",function(ca){e.getModel().beginUpdate();try{var t=ra[fa.value];null!=t&&(e.setCellStyles(mxConstants.STYLE_LABEL_POSITION,t[0],g.cells),e.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,t[1],g.cells),e.setCellStyles(mxConstants.STYLE_ALIGN,t[2],g.cells),e.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN, +t[3],g.cells))}finally{e.getModel().endUpdate()}mxEvent.consume(ca)}),a.appendChild(C),mxEvent.addListener(V,"change",function(ca){e.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,O[V.value],g.cells);mxEvent.consume(ca)}));var J=document.createElement("input");J.style.position="absolute";J.style.border="1px solid rgb(160, 160, 160)";J.style.textAlign="right";J.style.marginTop="4px";J.style.left="161px";J.style.width="53px";J.style.borderRadius="4px";J.style.height="23px";J.style.boxSizing="border-box"; +n.appendChild(J);var ba=null;x=this.installInputHandler(J,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,1,999," pt",function(ca){if(window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11){var t=function(G,L){null!=e.cellEditor.textarea&&G!=e.cellEditor.textarea&&e.cellEditor.textarea.contains(G)&&(L||z.containsNode(G,!0))&&("FONT"==G.nodeName?(G.removeAttribute("size"),G.style.fontSize=ca+"px"):mxUtils.getCurrentStyle(G).fontSize!=ca+"px"&&(mxUtils.getCurrentStyle(G.parentNode).fontSize!= +ca+"px"?G.style.fontSize=ca+"px":G.style.fontSize=""));f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTSIZE],"values",[ca],"cells",g.cells))},z=window.getSelection(),A=0<z.rangeCount?z.getRangeAt(0).commonAncestorContainer:e.cellEditor.textarea;A!=e.cellEditor.textarea&&A.nodeType==mxConstants.NODETYPE_ELEMENT||document.execCommand("fontSize",!1,"1");A!=e.cellEditor.textarea&&(A=A.parentNode);if(null!=A&&A.nodeType==mxConstants.NODETYPE_ELEMENT){var E=A.getElementsByTagName("*"); +t(A);for(A=0;A<E.length;A++)t(E[A])}J.value=ca+" pt"}else if(window.getSelection||document.selection)if(t=function(G,L){for(;null!=L;){if(L===G)return!0;L=L.parentNode}return!1},E=null,document.selection?E=document.selection.createRange().parentElement():(z=window.getSelection(),0<z.rangeCount&&(E=z.getRangeAt(0).commonAncestorContainer)),null!=E&&t(e.cellEditor.textarea,E))for(ba=ca,document.execCommand("fontSize",!1,"4"),E=e.cellEditor.textarea.getElementsByTagName("font"),A=0;A<E.length;A++)if("4"== +E[A].getAttribute("size")){E[A].removeAttribute("size");E[A].style.fontSize=ba+"px";window.setTimeout(function(){J.value=ba+" pt";ba=null},0);break}},!0);x=this.createStepper(J,x,1,10,!0,Menus.prototype.defaultFontSize);x.style.display=J.style.display;x.style.marginTop="4px";x.style.left="214px";n.appendChild(x);n=u.getElementsByTagName("div")[0];n.style.cssFloat="right";var ha=null,na=e.shapeBackgroundColor,W=null,da=e.shapeForegroundColor,sa=e.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"), +function(){return na},function(ca){document.execCommand("backcolor",!1,ca!=mxConstants.NONE?ca:"transparent");f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],"values",[ca],"cells",g.cells))},e.shapeBackgroundColor,{install:function(ca){ha=ca},destroy:function(){ha=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"default",null,function(ca){e.updateLabelElements(g.cells,function(t){t.style.backgroundColor= +null})},e.shapeBackgroundColor);sa.style.fontWeight="bold";var ta=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"default",null,null,e.shapeForegroundColor);ta.style.fontWeight="bold";n=1<=g.vertices.length?e.stylesheet.getDefaultVertexStyle():e.stylesheet.getDefaultEdgeStyle();n=e.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return da},function(ca){if(mxClient.IS_FF){for(var t=e.cellEditor.textarea.getElementsByTagName("font"), z=[],A=0;A<t.length;A++)z.push({node:t[A],color:t[A].getAttribute("color")});document.execCommand("forecolor",!1,ca!=mxConstants.NONE?ca:"transparent");f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[ca],"cells",g.cells));ca=e.cellEditor.textarea.getElementsByTagName("font");for(A=0;A<ca.length;A++)if(A>=z.length||ca[A]!=z[A].node||ca[A]==z[A].node&&ca[A].getAttribute("color")!=z[A].color){z=ca[A].firstChild;if(null!=z&&"A"==z.nodeName&&null==z.nextSibling&& -null!=z.firstChild){ca[A].parentNode.insertBefore(z,ca[A]);for(t=z.firstChild;null!=t;){var E=t.nextSibling;ca[A].appendChild(t);t=E}z.appendChild(ca[A])}break}}else document.execCommand("forecolor",!1,ca!=mxConstants.NONE?ca:"transparent"),f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[ca],"cells",g.cells))},null!=n[mxConstants.STYLE_FONTCOLOR]?n[mxConstants.STYLE_FONTCOLOR]:e.shapeForegroundColor,{install:function(ca){Y=ca},destroy:function(){Y=null}}, -null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"default",function(ca){pa.style.display=ca==mxConstants.NONE?"none":"";wa.style.display=pa.style.display},function(ca){ca==mxConstants.NONE?e.setCellStyles(mxConstants.STYLE_NOLABEL,"1",g.cells):e.setCellStyles(mxConstants.STYLE_NOLABEL,null,g.cells);e.setCellStyles(mxConstants.STYLE_FONTCOLOR,ca,g.cells);e.updateLabelElements(g.cells,function(t){t.removeAttribute("color");t.style.color=null})},e.shapeForegroundColor); -n.style.fontWeight="bold";k.appendChild(n);k.appendChild(pa);e.cellEditor.isContentEditing()||k.appendChild(wa);a.appendChild(k);k=this.createPanel();k.style.paddingTop="2px";k.style.paddingBottom="4px";n=e.filterSelectionCells(mxUtils.bind(this,function(ca){var t=e.view.getState(ca);return null==t||e.isAutoSizeState(t)||e.getModel().isEdge(ca)||!e.isTableRow(ca)&&!e.isTableCell(ca)&&!e.isCellResizable(ca)}));x=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap", +null!=z.firstChild){ca[A].parentNode.insertBefore(z,ca[A]);for(t=z.firstChild;null!=t;){var E=t.nextSibling;ca[A].appendChild(t);t=E}z.appendChild(ca[A])}break}}else document.execCommand("forecolor",!1,ca!=mxConstants.NONE?ca:"transparent"),f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[ca],"cells",g.cells))},null!=n[mxConstants.STYLE_FONTCOLOR]?n[mxConstants.STYLE_FONTCOLOR]:e.shapeForegroundColor,{install:function(ca){W=ca},destroy:function(){W=null}}, +null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"default",function(ca){sa.style.display=ca==mxConstants.NONE?"none":"";ta.style.display=sa.style.display},function(ca){ca==mxConstants.NONE?e.setCellStyles(mxConstants.STYLE_NOLABEL,"1",g.cells):e.setCellStyles(mxConstants.STYLE_NOLABEL,null,g.cells);e.setCellStyles(mxConstants.STYLE_FONTCOLOR,ca,g.cells);e.updateLabelElements(g.cells,function(t){t.removeAttribute("color");t.style.color=null})},e.shapeForegroundColor); +n.style.fontWeight="bold";k.appendChild(n);k.appendChild(sa);e.cellEditor.isContentEditing()||k.appendChild(ta);a.appendChild(k);k=this.createPanel();k.style.paddingTop="2px";k.style.paddingBottom="4px";n=e.filterSelectionCells(mxUtils.bind(this,function(ca){var t=e.view.getState(ca);return null==t||e.isAutoSizeState(t)||e.getModel().isEdge(ca)||!e.isTableRow(ca)&&!e.isTableCell(ca)&&!e.isCellResizable(ca)}));x=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap", "null",null,null,!0,n);x.style.fontWeight="bold";0<n.length&&k.appendChild(x);n=this.createCellOption(mxResources.get("formattedText"),"html",0,null,null,null,f.actions.get("formattedText"));n.style.fontWeight="bold";k.appendChild(n);n=this.createPanel();n.style.paddingTop="10px";n.style.paddingBottom="28px";n.style.fontWeight="normal";x=document.createElement("div");x.style.position="absolute";x.style.width="70px";x.style.marginTop="0px";x.style.fontWeight="bold";mxUtils.write(x,mxResources.get("spacing")); -n.appendChild(x);var Ka=this.addUnitInput(n,"pt",87,52,function(){Ya.apply(this,arguments)}),Ha=this.addUnitInput(n,"pt",16,52,function(){ab.apply(this,arguments)});mxUtils.br(n);this.addLabel(n,mxResources.get("top"),87);this.addLabel(n,mxResources.get("global"),16);mxUtils.br(n);mxUtils.br(n);var ua=this.addUnitInput(n,"pt",158,52,function(){kb.apply(this,arguments)}),Ca=this.addUnitInput(n,"pt",87,52,function(){Za.apply(this,arguments)}),qa=this.addUnitInput(n,"pt",16,52,function(){Va.apply(this, +n.appendChild(x);var Ja=this.addUnitInput(n,"pt",87,52,function(){Ya.apply(this,arguments)}),Ha=this.addUnitInput(n,"pt",16,52,function(){ab.apply(this,arguments)});mxUtils.br(n);this.addLabel(n,mxResources.get("top"),87);this.addLabel(n,mxResources.get("global"),16);mxUtils.br(n);mxUtils.br(n);var ua=this.addUnitInput(n,"pt",158,52,function(){kb.apply(this,arguments)}),Aa=this.addUnitInput(n,"pt",87,52,function(){Za.apply(this,arguments)}),qa=this.addUnitInput(n,"pt",16,52,function(){Va.apply(this, arguments)});mxUtils.br(n);this.addLabel(n,mxResources.get("left"),158);this.addLabel(n,mxResources.get("bottom"),87);this.addLabel(n,mxResources.get("right"),16);if(e.cellEditor.isContentEditing()){var Da=null,Ua=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(ca){var t=""==ca.value?120:parseInt(ca.value);t=Math.max(0,isNaN(t)?120:t);null!=Da&&(e.cellEditor.restoreSelection(Da),Da=null);for(var z=e.getSelectedElement();null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z= z.parentNode;null!=z&&z==e.cellEditor.textarea&&null!=e.cellEditor.textarea.firstChild&&("P"!=e.cellEditor.textarea.firstChild.nodeName&&(e.cellEditor.textarea.innerHTML="<p>"+e.cellEditor.textarea.innerHTML+"</p>"),z=e.cellEditor.textarea.firstChild);null!=z&&null!=e.cellEditor.textarea&&z!=e.cellEditor.textarea&&e.cellEditor.textarea.contains(z)&&(z.style.lineHeight=t/100);ca.value=t+" %"},function(ca){Ua=ca;mxEvent.addListener(ca,"mousedown",function(){document.activeElement==e.cellEditor.textarea&& (Da=e.cellEditor.saveSelection())});mxEvent.addListener(ca,"touchstart",function(){document.activeElement==e.cellEditor.textarea&&(Da=e.cellEditor.saveSelection())});ca.value="120 %"}));k=d.cloneNode(!1);k.style.paddingLeft="0px";n=this.editorUi.toolbar.addItems(["link","image"],k,!0);x=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},k),this.editorUi.toolbar.addMenuFunctionInContainer(k, "geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(ca){this.editorUi.menus.addInsertTableItem(ca,null,null,!1)}))];this.styleButtons(n);this.styleButtons(x);n=this.createPanel();n.style.paddingTop="10px";n.style.paddingBottom="10px";n.appendChild(this.createTitle(mxResources.get("insert")));n.appendChild(k);a.appendChild(n);n=d.cloneNode(!1);n.style.paddingLeft="0px";x=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this, -function(){try{null!=S&&e.insertColumn(S,null!=P?P.cellIndex:0)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=S&&e.insertColumn(S,null!=P?P.cellIndex+1:-1)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=S&&null!=P&&e.deleteColumn(S,P.cellIndex)}catch(ca){this.editorUi.handleError(ca)}}), -n),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=S&&null!=X&&e.insertRow(S,X.sectionRowIndex)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=S&&null!=X&&e.insertRow(S,X.sectionRowIndex+1)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-deleterow", -mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=S&&null!=X&&e.deleteRow(S,X.sectionRowIndex)}catch(ca){this.editorUi.handleError(ca)}}),n)];this.styleButtons(x);x[2].style.marginRight="10px";k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="10px";k.appendChild(this.createTitle(mxResources.get("table")));k.appendChild(n);d=d.cloneNode(!1);d.style.paddingLeft="0px";x=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),mxUtils.bind(this, -function(ca){if(null!=S){var t=S.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(z,A,E,H){return"#"+("0"+Number(A).toString(16)).substr(-2)+("0"+Number(E).toString(16)).substr(-2)+("0"+Number(H).toString(16)).substr(-2)});this.editorUi.pickColor(t,function(z){var A=null==P||null!=ca&&mxEvent.isShiftDown(ca)?S:P;e.processElements(A,function(E){E.style.border=null});null==z||z==mxConstants.NONE?(A.removeAttribute("border"),A.style.border="",A.style.borderCollapse= -""):(A.setAttribute("border","1"),A.style.border="1px solid "+z,A.style.borderCollapse="collapse")})}}),d),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(ca){if(null!=S){var t=S.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(z,A,E,H){return"#"+("0"+Number(A).toString(16)).substr(-2)+("0"+Number(E).toString(16)).substr(-2)+("0"+Number(H).toString(16)).substr(-2)});this.editorUi.pickColor(t, -function(z){var A=null==P||null!=ca&&mxEvent.isShiftDown(ca)?S:P;e.processElements(A,function(E){E.style.backgroundColor=null});A.style.backgroundColor=null==z||z==mxConstants.NONE?"":z})}}),d),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=S){var ca=S.getAttribute("cellPadding")||0;ca=new FilenameDialog(f,ca,mxResources.get("apply"),mxUtils.bind(this,function(t){null!=t&&0<t.length?S.setAttribute("cellPadding",t):S.removeAttribute("cellPadding")}),mxResources.get("spacing")); -f.showDialog(ca.container,300,80,!0,!0);ca.init()}},d),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=S&&S.setAttribute("align","left")},d),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=S&&S.setAttribute("align","center")},d),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=S&&S.setAttribute("align","right")},d)];this.styleButtons(x);x[2].style.marginRight="10px";k.appendChild(d); +function(){try{null!=U&&e.insertColumn(U,null!=P?P.cellIndex:0)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=U&&e.insertColumn(U,null!=P?P.cellIndex+1:-1)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=U&&null!=P&&e.deleteColumn(U,P.cellIndex)}catch(ca){this.editorUi.handleError(ca)}}), +n),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=U&&null!=Y&&e.insertRow(U,Y.sectionRowIndex)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=U&&null!=Y&&e.insertRow(U,Y.sectionRowIndex+1)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-deleterow", +mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=U&&null!=Y&&e.deleteRow(U,Y.sectionRowIndex)}catch(ca){this.editorUi.handleError(ca)}}),n)];this.styleButtons(x);x[2].style.marginRight="10px";k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="10px";k.appendChild(this.createTitle(mxResources.get("table")));k.appendChild(n);d=d.cloneNode(!1);d.style.paddingLeft="0px";x=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),mxUtils.bind(this, +function(ca){if(null!=U){var t=U.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(z,A,E,G){return"#"+("0"+Number(A).toString(16)).substr(-2)+("0"+Number(E).toString(16)).substr(-2)+("0"+Number(G).toString(16)).substr(-2)});this.editorUi.pickColor(t,function(z){var A=null==P||null!=ca&&mxEvent.isShiftDown(ca)?U:P;e.processElements(A,function(E){E.style.border=null});null==z||z==mxConstants.NONE?(A.removeAttribute("border"),A.style.border="",A.style.borderCollapse= +""):(A.setAttribute("border","1"),A.style.border="1px solid "+z,A.style.borderCollapse="collapse")})}}),d),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(ca){if(null!=U){var t=U.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(z,A,E,G){return"#"+("0"+Number(A).toString(16)).substr(-2)+("0"+Number(E).toString(16)).substr(-2)+("0"+Number(G).toString(16)).substr(-2)});this.editorUi.pickColor(t, +function(z){var A=null==P||null!=ca&&mxEvent.isShiftDown(ca)?U:P;e.processElements(A,function(E){E.style.backgroundColor=null});A.style.backgroundColor=null==z||z==mxConstants.NONE?"":z})}}),d),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=U){var ca=U.getAttribute("cellPadding")||0;ca=new FilenameDialog(f,ca,mxResources.get("apply"),mxUtils.bind(this,function(t){null!=t&&0<t.length?U.setAttribute("cellPadding",t):U.removeAttribute("cellPadding")}),mxResources.get("spacing")); +f.showDialog(ca.container,300,80,!0,!0);ca.init()}},d),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=U&&U.setAttribute("align","left")},d),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=U&&U.setAttribute("align","center")},d),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=U&&U.setAttribute("align","right")},d)];this.styleButtons(x);x[2].style.marginRight="10px";k.appendChild(d); a.appendChild(k);var db=k}else a.appendChild(k),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(n);for(B=0;3>B;B++)(function(ca){mxEvent.addListener(m[ca],"click",function(){b(m[ca],""==m[ca].style.backgroundImage)})})(B);var Ta=mxUtils.bind(this,function(ca,t,z){g=f.getSelectionState();ca=mxUtils.getValue(g.style,mxConstants.STYLE_FONTSTYLE,0);b(m[0],(ca&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);b(m[1],(ca&mxConstants.FONT_ITALIC)== -mxConstants.FONT_ITALIC);b(m[2],(ca&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);u.firstChild.nodeValue=mxUtils.getValue(g.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);b(r,"0"==mxUtils.getValue(g.style,mxConstants.STYLE_HORIZONTAL,"1"));if(z||document.activeElement!=U)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),U.value=isNaN(ca)?"":ca+" pt";ca=mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER); -b(D,ca==mxConstants.ALIGN_LEFT);b(F,ca==mxConstants.ALIGN_CENTER);b(J,ca==mxConstants.ALIGN_RIGHT);ca=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);b(O,ca==mxConstants.ALIGN_TOP);b(R,ca==mxConstants.ALIGN_MIDDLE);b(T,ca==mxConstants.ALIGN_BOTTOM);ca=mxUtils.getValue(g.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);t=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);fa.value=ca==mxConstants.ALIGN_LEFT&& +mxConstants.FONT_ITALIC);b(m[2],(ca&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);u.firstChild.nodeValue=mxUtils.getValue(g.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);b(r,"0"==mxUtils.getValue(g.style,mxConstants.STYLE_HORIZONTAL,"1"));if(z||document.activeElement!=J)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),J.value=isNaN(ca)?"":ca+" pt";ca=mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER); +b(D,ca==mxConstants.ALIGN_LEFT);b(F,ca==mxConstants.ALIGN_CENTER);b(I,ca==mxConstants.ALIGN_RIGHT);ca=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);b(N,ca==mxConstants.ALIGN_TOP);b(R,ca==mxConstants.ALIGN_MIDDLE);b(S,ca==mxConstants.ALIGN_BOTTOM);ca=mxUtils.getValue(g.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);t=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);fa.value=ca==mxConstants.ALIGN_LEFT&& t==mxConstants.ALIGN_TOP?"topLeft":ca==mxConstants.ALIGN_CENTER&&t==mxConstants.ALIGN_TOP?"top":ca==mxConstants.ALIGN_RIGHT&&t==mxConstants.ALIGN_TOP?"topRight":ca==mxConstants.ALIGN_LEFT&&t==mxConstants.ALIGN_BOTTOM?"bottomLeft":ca==mxConstants.ALIGN_CENTER&&t==mxConstants.ALIGN_BOTTOM?"bottom":ca==mxConstants.ALIGN_RIGHT&&t==mxConstants.ALIGN_BOTTOM?"bottomRight":ca==mxConstants.ALIGN_LEFT?"left":ca==mxConstants.ALIGN_RIGHT?"right":"center";ca=mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_DIRECTION, -mxConstants.DEFAULT_TEXT_DIRECTION);ca==mxConstants.TEXT_DIRECTION_RTL?V.value="rightToLeft":ca==mxConstants.TEXT_DIRECTION_LTR?V.value="leftToRight":ca==mxConstants.TEXT_DIRECTION_AUTO&&(V.value="automatic");if(z||document.activeElement!=Ha)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING,2)),Ha.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=Ka)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_TOP,0)),Ka.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!= -qa)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_RIGHT,0)),qa.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=Ca)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Ca.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=ua)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_LEFT,0)),ua.value=isNaN(ca)?"":ca+" pt"});var ab=this.installInputHandler(Ha,mxConstants.STYLE_SPACING,2,-999,999," pt");var Ya=this.installInputHandler(Ka, -mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");var Va=this.installInputHandler(qa,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");var Za=this.installInputHandler(Ca,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");var kb=this.installInputHandler(ua,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(U,Ta);this.addKeyHandler(Ha,Ta);this.addKeyHandler(Ka,Ta);this.addKeyHandler(qa,Ta);this.addKeyHandler(Ca,Ta);this.addKeyHandler(ua,Ta);e.getModel().addListener(mxEvent.CHANGE,Ta); -this.listeners.push({destroy:function(){e.getModel().removeListener(Ta)}});Ta();if(e.cellEditor.isContentEditing()){var cb=!1;d=function(){cb||(cb=!0,window.setTimeout(function(){var ca=e.getSelectedEditingElement();if(null!=ca){var t=function(Aa,Ea){if(null!=Aa&&null!=Ea){if(Aa==Ea)return!0;if(Aa.length>Ea.length+1)return Aa.substring(Aa.length-Ea.length-1,Aa.length)=="-"+Ea}return!1},z=function(Aa){if(null!=e.getParentByName(ca,Aa,e.cellEditor.textarea))return!0;for(var Ea=ca;null!=Ea&&1==Ea.childNodes.length;)if(Ea= -Ea.childNodes[0],Ea.nodeName==Aa)return!0;return!1},A=function(Aa){Aa=null!=Aa?Aa.fontSize:null;return null!=Aa&&"px"==Aa.substring(Aa.length-2)?parseFloat(Aa):mxConstants.DEFAULT_FONTSIZE},E=function(Aa,Ea,Ma){return null!=Ma.style&&null!=Ea?(Ea=Ea.lineHeight,null!=Ma.style.lineHeight&&"%"==Ma.style.lineHeight.substring(Ma.style.lineHeight.length-1)?parseInt(Ma.style.lineHeight)/100:"px"==Ea.substring(Ea.length-2)?parseFloat(Ea)/Aa:parseInt(Ea)):""},H=mxUtils.getCurrentStyle(ca),L=A(H),W=E(L,H,ca), -ia=ca.getElementsByTagName("*");if(0<ia.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var ea=window.getSelection(),ja=0;ja<ia.length;ja++)if(ea.containsNode(ia[ja],!0)){temp=mxUtils.getCurrentStyle(ia[ja]);L=Math.max(A(temp),L);var ta=E(L,temp,ia[ja]);if(ta!=W||isNaN(ta))W=""}null!=H&&(b(m[0],"bold"==H.fontWeight||400<H.fontWeight||z("B")||z("STRONG")),b(m[1],"italic"==H.fontStyle||z("I")||z("EM")),b(m[2],z("U")),b(aa,z("SUP")),b(Q,z("SUB")),e.cellEditor.isTableSelected()?(b(ha, -t(H.textAlign,"justify")),b(D,t(H.textAlign,"left")),b(F,t(H.textAlign,"center")),b(J,t(H.textAlign,"right"))):(z=e.cellEditor.align||mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),t(H.textAlign,"justify")?(b(ha,t(H.textAlign,"justify")),b(D,!1),b(F,!1),b(J,!1)):(b(ha,!1),b(D,z==mxConstants.ALIGN_LEFT),b(F,z==mxConstants.ALIGN_CENTER),b(J,z==mxConstants.ALIGN_RIGHT))),S=e.getParentByName(ca,"TABLE",e.cellEditor.textarea),X=null==S?null:e.getParentByName(ca,"TR",S),P=null== -S?null:e.getParentByNames(ca,["TD","TH"],S),db.style.display=null!=S?"":"none",document.activeElement!=U&&("FONT"==ca.nodeName&&"4"==ca.getAttribute("size")&&null!=ba?(ca.removeAttribute("size"),ca.style.fontSize=ba+" pt",ba=null):U.value=isNaN(L)?"":L+" pt",ta=parseFloat(W),isNaN(ta)?Ua.value="100 %":Ua.value=Math.round(100*ta)+" %"),null!=Y&&(da="rgba(0, 0, 0, 0)"==H.color||"transparent"==H.color?mxConstants.NONE:mxUtils.rgba2hex(H.color),Y(da,!0)),null!=la&&(ra="rgba(0, 0, 0, 0)"==H.backgroundColor|| -"transparent"==H.backgroundColor?mxConstants.NONE:mxUtils.rgba2hex(H.backgroundColor),la(ra,!0)),null!=u.firstChild&&(u.firstChild.nodeValue=Graph.stripQuotes(H.fontFamily)))}cb=!1},0))};(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(e.cellEditor.textarea,"DOMSubtreeModified",d);mxEvent.addListener(e.cellEditor.textarea,"input",d);mxEvent.addListener(e.cellEditor.textarea,"touchend",d);mxEvent.addListener(e.cellEditor.textarea,"mouseup",d);mxEvent.addListener(e.cellEditor.textarea, +mxConstants.DEFAULT_TEXT_DIRECTION);ca==mxConstants.TEXT_DIRECTION_RTL?V.value="rightToLeft":ca==mxConstants.TEXT_DIRECTION_LTR?V.value="leftToRight":ca==mxConstants.TEXT_DIRECTION_AUTO&&(V.value="automatic");if(z||document.activeElement!=Ha)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING,2)),Ha.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=Ja)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_TOP,0)),Ja.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!= +qa)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_RIGHT,0)),qa.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=Aa)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Aa.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=ua)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_LEFT,0)),ua.value=isNaN(ca)?"":ca+" pt"});var ab=this.installInputHandler(Ha,mxConstants.STYLE_SPACING,2,-999,999," pt");var Ya=this.installInputHandler(Ja, +mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");var Va=this.installInputHandler(qa,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");var Za=this.installInputHandler(Aa,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");var kb=this.installInputHandler(ua,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(J,Ta);this.addKeyHandler(Ha,Ta);this.addKeyHandler(Ja,Ta);this.addKeyHandler(qa,Ta);this.addKeyHandler(Aa,Ta);this.addKeyHandler(ua,Ta);e.getModel().addListener(mxEvent.CHANGE,Ta); +this.listeners.push({destroy:function(){e.getModel().removeListener(Ta)}});Ta();if(e.cellEditor.isContentEditing()){var cb=!1;d=function(){cb||(cb=!0,window.setTimeout(function(){var ca=e.getSelectedEditingElement();if(null!=ca){var t=function(Ba,Ea){if(null!=Ba&&null!=Ea){if(Ba==Ea)return!0;if(Ba.length>Ea.length+1)return Ba.substring(Ba.length-Ea.length-1,Ba.length)=="-"+Ea}return!1},z=function(Ba){if(null!=e.getParentByName(ca,Ba,e.cellEditor.textarea))return!0;for(var Ea=ca;null!=Ea&&1==Ea.childNodes.length;)if(Ea= +Ea.childNodes[0],Ea.nodeName==Ba)return!0;return!1},A=function(Ba){Ba=null!=Ba?Ba.fontSize:null;return null!=Ba&&"px"==Ba.substring(Ba.length-2)?parseFloat(Ba):mxConstants.DEFAULT_FONTSIZE},E=function(Ba,Ea,Ma){return null!=Ma.style&&null!=Ea?(Ea=Ea.lineHeight,null!=Ma.style.lineHeight&&"%"==Ma.style.lineHeight.substring(Ma.style.lineHeight.length-1)?parseInt(Ma.style.lineHeight)/100:"px"==Ea.substring(Ea.length-2)?parseFloat(Ea)/Ba:parseInt(Ea)):""},G=mxUtils.getCurrentStyle(ca),L=A(G),X=E(L,G,ca), +ia=ca.getElementsByTagName("*");if(0<ia.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var ea=window.getSelection(),ka=0;ka<ia.length;ka++)if(ea.containsNode(ia[ka],!0)){temp=mxUtils.getCurrentStyle(ia[ka]);L=Math.max(A(temp),L);var va=E(L,temp,ia[ka]);if(va!=X||isNaN(va))X=""}null!=G&&(b(m[0],"bold"==G.fontWeight||400<G.fontWeight||z("B")||z("STRONG")),b(m[1],"italic"==G.fontStyle||z("I")||z("EM")),b(m[2],z("U")),b(aa,z("SUP")),b(Q,z("SUB")),e.cellEditor.isTableSelected()?(b(ja, +t(G.textAlign,"justify")),b(D,t(G.textAlign,"left")),b(F,t(G.textAlign,"center")),b(I,t(G.textAlign,"right"))):(z=e.cellEditor.align||mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),t(G.textAlign,"justify")?(b(ja,t(G.textAlign,"justify")),b(D,!1),b(F,!1),b(I,!1)):(b(ja,!1),b(D,z==mxConstants.ALIGN_LEFT),b(F,z==mxConstants.ALIGN_CENTER),b(I,z==mxConstants.ALIGN_RIGHT))),U=e.getParentByName(ca,"TABLE",e.cellEditor.textarea),Y=null==U?null:e.getParentByName(ca,"TR",U),P=null== +U?null:e.getParentByNames(ca,["TD","TH"],U),db.style.display=null!=U?"":"none",document.activeElement!=J&&("FONT"==ca.nodeName&&"4"==ca.getAttribute("size")&&null!=ba?(ca.removeAttribute("size"),ca.style.fontSize=ba+" pt",ba=null):J.value=isNaN(L)?"":L+" pt",va=parseFloat(X),isNaN(va)?Ua.value="100 %":Ua.value=Math.round(100*va)+" %"),null!=W&&(da="rgba(0, 0, 0, 0)"==G.color||"transparent"==G.color?mxConstants.NONE:mxUtils.rgba2hex(G.color),W(da,!0)),null!=ha&&(na="rgba(0, 0, 0, 0)"==G.backgroundColor|| +"transparent"==G.backgroundColor?mxConstants.NONE:mxUtils.rgba2hex(G.backgroundColor),ha(na,!0)),null!=u.firstChild&&(u.firstChild.nodeValue=Graph.stripQuotes(G.fontFamily)))}cb=!1},0))};(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(e.cellEditor.textarea,"DOMSubtreeModified",d);mxEvent.addListener(e.cellEditor.textarea,"input",d);mxEvent.addListener(e.cellEditor.textarea,"touchend",d);mxEvent.addListener(e.cellEditor.textarea,"mouseup",d);mxEvent.addListener(e.cellEditor.textarea, "keyup",d);this.listeners.push({destroy:function(){}});d()}return a};StyleFormatPanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);StyleFormatPanel.prototype.defaultStrokeColor="black"; StyleFormatPanel.prototype.init=function(){var a=this.editorUi.getSelectionState();!a.containsLabel&&0<a.cells.length&&(a.containsImage&&1==a.vertices.length&&"image"==a.style.shape&&null!=a.style.image&&"data:image/svg+xml;"==a.style.image.substring(0,19)&&this.container.appendChild(this.addSvgStyles(this.createPanel())),a.fill&&this.container.appendChild(this.addFill(this.createPanel())),this.container.appendChild(this.addStroke(this.createPanel())),this.container.appendChild(this.addLineJumps(this.createPanel())), a=this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_OPACITY),a.style.paddingTop="8px",a.style.paddingBottom="8px",this.container.appendChild(a),this.container.appendChild(this.addEffects(this.createPanel())));a=this.addEditOps(this.createPanel());null!=a.firstChild&&mxUtils.br(a);this.container.appendChild(this.addStyleOps(a))}; @@ -3106,97 +3104,97 @@ StyleFormatPanel.prototype.addSvgRule=function(a,b,f,e,g,d,k){var n=this.editorU mxResources.get("gradient")))}; StyleFormatPanel.prototype.addEditOps=function(a){var b=this.editorUi.getSelectionState(),f=null;1==b.cells.length&&(f=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(e){this.editorUi.actions.get("editStyle").funct()})),f.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),f.style.width="210px",f.style.marginBottom="2px",a.appendChild(f));b.image&&0<b.cells.length&&(b=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this, function(e){this.editorUi.actions.get("image").funct()})),b.setAttribute("title",mxResources.get("editImage")),b.style.marginBottom="2px",null==f?b.style.width="210px":(f.style.width="104px",b.style.width="104px",b.style.marginLeft="2px"),a.appendChild(b));return a}; -StyleFormatPanel.prototype.addFill=function(a){function b(){k.innerHTML="";D=1;for(var J=0;J<Editor.fillStyles.length;J++){var C=document.createElement("option");C.setAttribute("value",Editor.fillStyles[J].val);mxUtils.write(C,Editor.fillStyles[J].dispName);k.appendChild(C)}}var f=this.editorUi,e=f.editor.graph,g=f.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";var d=document.createElement("select");d.style.position="absolute";d.style.left="104px";d.style.width="70px";d.style.height= -"22px";d.style.padding="0px";d.style.marginTop="-3px";d.style.borderRadius="4px";d.style.border="1px solid rgb(160, 160, 160)";d.style.boxSizing="border-box";var k=d.cloneNode(!1);mxEvent.addListener(d,"click",function(J){mxEvent.consume(J)});mxEvent.addListener(k,"click",function(J){mxEvent.consume(J)});var n=this.createCellColorOption(mxResources.get("gradient"),mxConstants.STYLE_GRADIENTCOLOR,"default",function(J){d.style.display=null==J||J==mxConstants.NONE?"none":""},function(J){e.updateCellStyles({gradientColor:J}, -e.getSelectionCells())},e.getDefaultColor(g.style,mxConstants.STYLE_GRADIENTCOLOR,e.shapeForegroundColor,e.shapeBackgroundColor)),u="image"==g.style.shape?mxConstants.STYLE_IMAGE_BACKGROUND:mxConstants.STYLE_FILLCOLOR,m=this.createCellColorOption(mxResources.get("fill"),u,"default",null,mxUtils.bind(this,function(J){e.setCellStyles(u,J,g.cells)}),e.getDefaultColor(g.style,u,e.shapeBackgroundColor,e.shapeForegroundColor));m.style.fontWeight="bold";var r=mxUtils.getValue(g.style,u,null);n.style.display= -null!=r&&r!=mxConstants.NONE&&g.fill&&"image"!=g.style.shape?"":"none";var x=[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_RADIAL];for(r=0;r<x.length;r++){var B=document.createElement("option");B.setAttribute("value",x[r]);mxUtils.write(B,mxResources.get(x[r]));d.appendChild(B)}n.appendChild(d);var D;b();m.appendChild(k);var F=mxUtils.bind(this,function(){g=f.getSelectionState();var J=mxUtils.getValue(g.style,mxConstants.STYLE_GRADIENT_DIRECTION, -mxConstants.DIRECTION_SOUTH),C=mxUtils.getValue(g.style,"fillStyle","auto");""==J&&(J=mxConstants.DIRECTION_SOUTH);d.value=J;a.style.display=g.fill?"":"none";J=mxUtils.getValue(g.style,u,null);if(g.fill&&null!=J&&J!=mxConstants.NONE&&"filledEdge"!=g.style.shape){if("1"==g.style.sketch){if(2!=D){k.innerHTML="";D=2;for(J=0;J<Editor.roughFillStyles.length;J++){var O=document.createElement("option");O.setAttribute("value",Editor.roughFillStyles[J].val);mxUtils.write(O,Editor.roughFillStyles[J].dispName); -k.appendChild(O)}k.value="auto"}}else 1!=D&&b();k.value=C;k.value||(C="auto",k.value=C);k.style.display="1"==g.style.sketch||"none"==d.style.display?"":"none";n.style.display=g.containsImage||"1"==g.style.sketch&&"solid"!=C&&"auto"!=C?"none":""}else k.style.display="none",n.style.display="none"});e.getModel().addListener(mxEvent.CHANGE,F);this.listeners.push({destroy:function(){e.getModel().removeListener(F)}});F();mxEvent.addListener(d,"change",function(J){e.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION, -d.value,g.cells);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_GRADIENT_DIRECTION],"values",[d.value],"cells",g.cells));mxEvent.consume(J)});mxEvent.addListener(k,"change",function(J){e.setCellStyles("fillStyle",k.value,g.cells);f.fireEvent(new mxEventObject("styleChanged","keys",["fillStyle"],"values",[k.value],"cells",g.cells));mxEvent.consume(J)});a.appendChild(m);a.appendChild(n);m=this.getCustomColors();for(r=0;r<m.length;r++)a.appendChild(this.createCellColorOption(m[r].title, +StyleFormatPanel.prototype.addFill=function(a){function b(){k.innerHTML="";D=1;for(var I=0;I<Editor.fillStyles.length;I++){var C=document.createElement("option");C.setAttribute("value",Editor.fillStyles[I].val);mxUtils.write(C,Editor.fillStyles[I].dispName);k.appendChild(C)}}var f=this.editorUi,e=f.editor.graph,g=f.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";var d=document.createElement("select");d.style.position="absolute";d.style.left="104px";d.style.width="70px";d.style.height= +"22px";d.style.padding="0px";d.style.marginTop="-3px";d.style.borderRadius="4px";d.style.border="1px solid rgb(160, 160, 160)";d.style.boxSizing="border-box";var k=d.cloneNode(!1);mxEvent.addListener(d,"click",function(I){mxEvent.consume(I)});mxEvent.addListener(k,"click",function(I){mxEvent.consume(I)});var n=this.createCellColorOption(mxResources.get("gradient"),mxConstants.STYLE_GRADIENTCOLOR,"default",function(I){d.style.display=null==I||I==mxConstants.NONE?"none":""},function(I){e.updateCellStyles({gradientColor:I}, +e.getSelectionCells())},e.getDefaultColor(g.style,mxConstants.STYLE_GRADIENTCOLOR,e.shapeForegroundColor,e.shapeBackgroundColor)),u="image"==g.style.shape?mxConstants.STYLE_IMAGE_BACKGROUND:mxConstants.STYLE_FILLCOLOR,m=this.createCellColorOption(mxResources.get("fill"),u,"default",null,mxUtils.bind(this,function(I){e.setCellStyles(u,I,g.cells)}),e.getDefaultColor(g.style,u,e.shapeBackgroundColor,e.shapeForegroundColor));m.style.fontWeight="bold";var r=mxUtils.getValue(g.style,u,null);n.style.display= +null!=r&&r!=mxConstants.NONE&&g.fill&&"image"!=g.style.shape?"":"none";var x=[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_RADIAL];for(r=0;r<x.length;r++){var B=document.createElement("option");B.setAttribute("value",x[r]);mxUtils.write(B,mxResources.get(x[r]));d.appendChild(B)}n.appendChild(d);var D;b();m.appendChild(k);var F=mxUtils.bind(this,function(){g=f.getSelectionState();var I=mxUtils.getValue(g.style,mxConstants.STYLE_GRADIENT_DIRECTION, +mxConstants.DIRECTION_SOUTH),C=mxUtils.getValue(g.style,"fillStyle","auto");""==I&&(I=mxConstants.DIRECTION_SOUTH);d.value=I;a.style.display=g.fill?"":"none";I=mxUtils.getValue(g.style,u,null);if(g.fill&&null!=I&&I!=mxConstants.NONE&&"filledEdge"!=g.style.shape){if("1"==g.style.sketch){if(2!=D){k.innerHTML="";D=2;for(I=0;I<Editor.roughFillStyles.length;I++){var N=document.createElement("option");N.setAttribute("value",Editor.roughFillStyles[I].val);mxUtils.write(N,Editor.roughFillStyles[I].dispName); +k.appendChild(N)}k.value="auto"}}else 1!=D&&b();k.value=C;k.value||(C="auto",k.value=C);k.style.display="1"==g.style.sketch||"none"==d.style.display?"":"none";n.style.display=g.containsImage||"1"==g.style.sketch&&"solid"!=C&&"auto"!=C?"none":""}else k.style.display="none",n.style.display="none"});e.getModel().addListener(mxEvent.CHANGE,F);this.listeners.push({destroy:function(){e.getModel().removeListener(F)}});F();mxEvent.addListener(d,"change",function(I){e.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION, +d.value,g.cells);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_GRADIENT_DIRECTION],"values",[d.value],"cells",g.cells));mxEvent.consume(I)});mxEvent.addListener(k,"change",function(I){e.setCellStyles("fillStyle",k.value,g.cells);f.fireEvent(new mxEventObject("styleChanged","keys",["fillStyle"],"values",[k.value],"cells",g.cells));mxEvent.consume(I)});a.appendChild(m);a.appendChild(n);m=this.getCustomColors();for(r=0;r<m.length;r++)a.appendChild(this.createCellColorOption(m[r].title, m[r].key,m[r].defaultValue));return a};StyleFormatPanel.prototype.getCustomColors=function(){var a=[];this.editorUi.getSelectionState().swimlane&&a.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return a}; -StyleFormatPanel.prototype.addStroke=function(a){function b(Y){var da=parseFloat(C.value);da=Math.min(999,Math.max(0,isNaN(da)?1:da));da!=mxUtils.getValue(d.style,mxConstants.STYLE_STROKEWIDTH,1)&&(g.setCellStyles(mxConstants.STYLE_STROKEWIDTH,da,d.cells),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[da],"cells",d.cells)));C.value=da+" pt";mxEvent.consume(Y)}function f(Y){var da=parseFloat(O.value);da=Math.min(999,Math.max(0,isNaN(da)?1:da));da!=mxUtils.getValue(d.style, -mxConstants.STYLE_STROKEWIDTH,1)&&(g.setCellStyles(mxConstants.STYLE_STROKEWIDTH,da,d.cells),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[da],"cells",d.cells)));O.value=da+" pt";mxEvent.consume(Y)}var e=this.editorUi,g=e.editor.graph,d=e.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var k=document.createElement("div");k.style.fontWeight="bold";d.stroke||(k.style.display="none");var n=document.createElement("select"); -n.style.position="absolute";n.style.height="22px";n.style.padding="0px";n.style.marginTop="-3px";n.style.boxSizing="border-box";n.style.left="94px";n.style.width="80px";n.style.border="1px solid rgb(160, 160, 160)";n.style.borderRadius="4px";for(var u=["sharp","rounded","curved"],m=0;m<u.length;m++){var r=document.createElement("option");r.setAttribute("value",u[m]);mxUtils.write(r,mxResources.get(u[m]));n.appendChild(r)}mxEvent.addListener(n,"change",function(Y){g.getModel().beginUpdate();try{var da= -[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],pa=["0",null];"rounded"==n.value?pa=["1",null]:"curved"==n.value&&(pa=[null,"1"]);for(var wa=0;wa<da.length;wa++)g.setCellStyles(da[wa],pa[wa],d.cells);e.fireEvent(new mxEventObject("styleChanged","keys",da,"values",pa,"cells",d.cells))}finally{g.getModel().endUpdate()}mxEvent.consume(Y)});mxEvent.addListener(n,"click",function(Y){mxEvent.consume(Y)});var x="image"==d.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR;u="image"== -d.style.shape?mxResources.get("border"):mxResources.get("line");u=this.createCellColorOption(u,x,"default",null,mxUtils.bind(this,function(Y){g.setCellStyles(x,Y,d.cells)}),g.shapeForegroundColor);u.appendChild(n);k.appendChild(u);var B=k.cloneNode(!1);B.style.fontWeight="normal";B.style.whiteSpace="nowrap";B.style.position="relative";B.style.paddingLeft="0px";B.style.marginBottom="2px";B.style.overflow="hidden";B.style.marginTop="2px";B.style.width="220px";B.className="geToolbarContainer";var D= -mxUtils.bind(this,function(Y,da,pa,wa,Ka){Y=this.editorUi.menus.styleChange(Y,"",wa,Ka,"geIcon",null);wa=document.createElement("div");wa.style.width=da+"px";wa.style.height="1px";wa.style.borderBottom="1px "+pa+" "+this.defaultStrokeColor;wa.style.paddingTop="6px";Y.firstChild.firstChild.style.padding="0px 4px 0px 4px";Y.firstChild.firstChild.style.width=da+"px";Y.firstChild.firstChild.appendChild(wa);return Y});m=this.editorUi.toolbar.addMenuFunctionInContainer(B,"geSprite-orthogonal",mxResources.get("pattern"), -!1,mxUtils.bind(this,function(Y){D(Y,75,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));D(Y,75,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));D(Y,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");D(Y,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN], -["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");D(Y,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")}));var F=B.cloneNode(!1),J=this.editorUi.toolbar.addMenuFunctionInContainer(F,"geSprite-connection",mxResources.get("connection"),!1,mxUtils.bind(this,function(Y){this.editorUi.menus.styleChange(Y,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null, -null,null,null],"geIcon geSprite geSprite-connection",null,!0).setAttribute("title",mxResources.get("line"));this.editorUi.menus.styleChange(Y,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["link",null,null,null],"geIcon geSprite geSprite-linkedge",null,!0).setAttribute("title",mxResources.get("link"));this.editorUi.menus.styleChange(Y,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null], -"geIcon geSprite geSprite-arrow",null,!0).setAttribute("title",mxResources.get("arrow"));this.editorUi.menus.styleChange(Y,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,null],"geIcon geSprite geSprite-simplearrow",null,!0).setAttribute("title",mxResources.get("simpleArrow"))}));r=this.editorUi.toolbar.addMenuFunctionInContainer(F,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(Y){D(Y,33,"solid",[mxConstants.STYLE_DASHED, -mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));D(Y,33,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));D(Y,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");D(Y,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+ -" (2)");D(Y,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")}));u=B.cloneNode(!1);var C=document.createElement("input");C.style.position="absolute";C.style.textAlign="right";C.style.marginTop="2px";C.style.width="52px";C.style.height="21px";C.style.left="146px";C.style.border="1px solid rgb(160, 160, 160)";C.style.borderRadius="4px";C.style.boxSizing="border-box";C.setAttribute("title",mxResources.get("linewidth")); -B.appendChild(C);var O=C.cloneNode(!0);F.appendChild(O);var R=this.createStepper(C,b,1,9);R.style.display=C.style.display;R.style.marginTop="2px";R.style.left="198px";B.appendChild(R);R=this.createStepper(O,f,1,9);R.style.display=O.style.display;R.style.marginTop="2px";O.style.position="absolute";R.style.left="198px";F.appendChild(R);mxEvent.addListener(C,"blur",b);mxEvent.addListener(C,"change",b);mxEvent.addListener(O,"blur",f);mxEvent.addListener(O,"change",f);var T=this.editorUi.toolbar.addMenuFunctionInContainer(u, -"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(Y){"arrow"!=d.style.shape&&(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",null,!0).setAttribute("title",mxResources.get("straight")),this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal", -null,!0).setAttribute("title",mxResources.get("orthogonal")),this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle", -"vertical",null,null],"geIcon geSprite geSprite-verticalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED, -mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),"connector"==d.style.shape&&this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",null,!0).setAttribute("title",mxResources.get("curved")),this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_EDGE, -mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",null,!0).setAttribute("title",mxResources.get("entityRelation")))})),Q=this.editorUi.toolbar.addMenuFunctionInContainer(u,"geSprite-startclassic",mxResources.get("linestart"),!1,mxUtils.bind(this,function(Y){if("connector"==d.style.shape||"flexArrow"==d.style.shape||"filledEdge"==d.style.shape){var da=this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW, -"startFill"],[mxConstants.NONE,0],"geIcon",null,!1);da.setAttribute("title",mxResources.get("none"));var pa=document.createElement("font");pa.style.fontSize="10px";mxUtils.write(pa,mxResources.get("none"));da.firstChild.firstChild.appendChild(pa);"connector"==d.style.shape||"filledEdge"==d.style.shape?(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC,1],null,null,!1,Format.classicFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y, -"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,1],null,null,!1,Format.classicThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN,0],null,null,!1,Format.openFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN_THIN,0],null,null,!1,Format.openThinFilledMarkerImage.src)), -Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],["openAsync",0],null,null,!1,Format.openAsyncFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK,1],null,null,!1,Format.blockFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK_THIN,1],null, -null,!1,Format.blockThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],["async",1],null,null,!1,Format.asyncFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OVAL,1],null,null,!1,Format.ovalFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"], -[mxConstants.ARROW_DIAMOND,1],null,null,!1,Format.diamondFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND_THIN,1],null,null,!1,Format.diamondThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC,0],null,null,!1,Format.classicMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y, -"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,0],null,null,!1,Format.classicThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK,0],null,null,!1,Format.blockMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK_THIN,0],null,null,!1,Format.blockThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y, -"",[mxConstants.STYLE_STARTARROW,"startFill"],["async",0],null,null,!1,Format.asyncMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OVAL,0],null,null,!1,Format.ovalMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND,0],null,null,!1,Format.diamondMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y, -"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND_THIN,0],null,null,!1,Format.diamondThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],["box",0],null,null,!1,Format.boxMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],["halfCircle",0],null,null,!1,Format.halfCircleMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y, -"",[mxConstants.STYLE_STARTARROW,"startFill"],["dash",0],null,null,!1,Format.dashMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],["cross",0],null,null,!1,Format.crossMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],["circlePlus",0],null,null,!1,Format.circlePlusMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW, -"startFill"],["circle",1],null,null,!1,Format.circleMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],["baseDash",0],null,null,!1,Format.baseDashMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERone",0],null,null,!1,Format.EROneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"], -["ERmandOne",0],null,null,!1,Format.ERmandOneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmany",0],null,null,!1,Format.ERmanyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERoneToMany",0],null,null,!1,Format.ERoneToManyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"], -["ERzeroToOne",0],null,null,!1,Format.ERzeroToOneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToMany",0],null,null,!1,Format.ERzeroToManyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW,"startFill"],["doubleBlock",0],null,null,!1,Format.doubleBlockMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW, -"startFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src))):this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-startblocktrans",null,!1).setAttribute("title",mxResources.get("block"));Y.div.style.width="40px";window.setTimeout(mxUtils.bind(this,function(){null!=Y.div&&mxUtils.fit(Y.div)}),0)}})),aa=this.editorUi.toolbar.addMenuFunctionInContainer(u,"geSprite-endclassic",mxResources.get("lineend"),!1, -mxUtils.bind(this,function(Y){if("connector"==d.style.shape||"flexArrow"==d.style.shape||"filledEdge"==d.style.shape){var da=this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.NONE,0],"geIcon",null,!1);da.setAttribute("title",mxResources.get("none"));var pa=document.createElement("font");pa.style.fontSize="10px";mxUtils.write(pa,mxResources.get("none"));da.firstChild.firstChild.appendChild(pa);"connector"==d.style.shape||"filledEdge"==d.style.shape?(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y, -"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,1],null,null,!1,Format.classicFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC_THIN,1],null,null,!1,Format.classicThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN,0],null,null,!1,Format.openFilledMarkerImage.src), -"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN_THIN,0],null,null,!1,Format.openThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],["openAsync",0],null,null,!1,Format.openAsyncFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"], -[mxConstants.ARROW_BLOCK,1],null,null,!1,Format.blockFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK_THIN,1],null,null,!1,Format.blockThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],["async",1],null,null,!1,Format.asyncFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y, -"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OVAL,1],null,null,!1,Format.ovalFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND,1],null,null,!1,Format.diamondFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,1],null,null,!1,Format.diamondThinFilledMarkerImage.src), -"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,0],null,null,!1,Format.classicMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC_THIN,0],null,null,!1,Format.classicThinMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"], -[mxConstants.ARROW_BLOCK,0],null,null,!1,Format.blockMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK_THIN,0],null,null,!1,Format.blockThinMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],["async",0],null,null,!1,Format.asyncMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y, -"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OVAL,0],null,null,!1,Format.ovalMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND,0],null,null,!1,Format.diamondMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,0],null,null,!1,Format.diamondThinMarkerImage.src), -"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],["box",0],null,null,!1,Format.boxMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],["halfCircle",0],null,null,!1,Format.halfCircleMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],["dash",0],null,null,!1,Format.dashMarkerImage.src), -"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],["cross",0],null,null,!1,Format.crossMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circlePlus",0],null,null,!1,Format.circlePlusMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circle",0],null,null,!1,Format.circleMarkerImage.src), -"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],["baseDash",0],null,null,!1,Format.baseDashMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERone",0],null,null,!1,Format.EROneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmandOne",0],null,null,!1,Format.ERmandOneMarkerImage.src), -"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmany",0],null,null,!1,Format.ERmanyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERoneToMany",0],null,null,!1,Format.ERoneToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToOne",0],null,null, -!1,Format.ERzeroToOneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",0],null,null,!1,Format.ERzeroToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW,"endFill"],["doubleBlock",0],null,null,!1,Format.doubleBlockMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW, -"endFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src),"scaleX(-1)")):this.editorUi.menus.edgeStyleChange(Y,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block"));Y.div.style.width="40px";window.setTimeout(mxUtils.bind(this,function(){null!=Y.div&&mxUtils.fit(Y.div)}),0)}}));R=this.addArrow(J,8);R.nextSibling.style.position="relative";R.nextSibling.style.top="-2px";R=this.addArrow(T, -10);R.nextSibling.style.position="relative";R.nextSibling.style.top="-3px";T.getElementsByTagName("img")[0].style.top="-1px";this.addArrow(Q,null,!0);this.addArrow(aa,null,!0);R=this.addArrow(m,9);R.className="geIcon";R.style.width="auto";var S=this.addArrow(r,9);S.className="geIcon";S.style.width="22px";var P=document.createElement("div");P.style.width="84px";P.style.height="1px";P.style.borderBottom="1px solid "+this.defaultStrokeColor;P.style.marginBottom="7px";R.appendChild(P);var X=document.createElement("div"); -X.style.width="23px";X.style.height="1px";X.style.borderBottom="1px solid "+this.defaultStrokeColor;X.style.marginBottom="7px";S.appendChild(X);m.style.height="15px";m.style.marginLeft="16px";r.style.height="15px";r.style.marginLeft="3px";J.style.marginLeft="10px";J.style.height="15px";T.style.marginLeft="10px";T.style.height="17px";Q.style.marginLeft="3px";Q.style.height="17px";aa.style.marginLeft="3px";aa.style.height="17px";a.appendChild(k);a.appendChild(F);a.appendChild(B);m=B.cloneNode(!1);m.style.padding= -"5px 4px 6px 0px";m.style.fontWeight="normal";r=document.createElement("div");r.style.position="absolute";r.style.marginLeft="0px";r.style.marginBottom="12px";r.style.marginTop="2px";r.style.fontWeight="normal";r.style.width="76px";mxUtils.write(r,mxResources.get("lineend"));m.appendChild(r);var ha=this.addUnitInput(m,"pt",98,52,function(){la.apply(this,arguments)}),fa=this.addUnitInput(m,"pt",30,52,function(){ba.apply(this,arguments)});mxUtils.br(m);R=document.createElement("div");R.style.height= -"8px";m.appendChild(R);r=r.cloneNode(!1);mxUtils.write(r,mxResources.get("linestart"));m.appendChild(r);var sa=this.addUnitInput(m,"pt",98,52,function(){U.apply(this,arguments)}),K=this.addUnitInput(m,"pt",30,52,function(){M.apply(this,arguments)});mxUtils.br(m);this.addLabel(m,mxResources.get("spacing"),98,52);this.addLabel(m,mxResources.get("size"),30,52);mxUtils.br(m);k=k.cloneNode(!1);k.style.fontWeight="normal";k.style.position="relative";k.style.paddingLeft="16px";k.style.marginBottom="2px"; -k.style.marginTop="6px";k.style.borderWidth="0px";k.style.paddingBottom="18px";r=document.createElement("div");r.style.position="absolute";r.style.marginLeft="3px";r.style.marginBottom="12px";r.style.marginTop="1px";r.style.fontWeight="normal";r.style.width="120px";mxUtils.write(r,mxResources.get("perimeter"));k.appendChild(r);var V=this.addUnitInput(k,"pt",30,52,function(){ra.apply(this,arguments)});d.edges.length==d.cells.length?(a.appendChild(u),a.appendChild(m)):d.vertices.length==d.cells.length&& -a.appendChild(k);var G=mxUtils.bind(this,function(Y,da,pa){function wa(Ka,Ha,ua,Ca){ua=ua.getElementsByTagName("div")[0];null!=ua&&e.updateCssForMarker(ua,Ca,d.style.shape,Ka,Ha);return ua}d=e.getSelectionState();if(pa||document.activeElement!=C)Y=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STROKEWIDTH,1)),C.value=isNaN(Y)?"":Y+" pt";if(pa||document.activeElement!=O)Y=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STROKEWIDTH,1)),O.value=isNaN(Y)?"":Y+" pt";n.style.visibility="connector"== +StyleFormatPanel.prototype.addStroke=function(a){function b(W){var da=parseFloat(C.value);da=Math.min(999,Math.max(0,isNaN(da)?1:da));da!=mxUtils.getValue(d.style,mxConstants.STYLE_STROKEWIDTH,1)&&(g.setCellStyles(mxConstants.STYLE_STROKEWIDTH,da,d.cells),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[da],"cells",d.cells)));C.value=da+" pt";mxEvent.consume(W)}function f(W){var da=parseFloat(N.value);da=Math.min(999,Math.max(0,isNaN(da)?1:da));da!=mxUtils.getValue(d.style, +mxConstants.STYLE_STROKEWIDTH,1)&&(g.setCellStyles(mxConstants.STYLE_STROKEWIDTH,da,d.cells),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[da],"cells",d.cells)));N.value=da+" pt";mxEvent.consume(W)}var e=this.editorUi,g=e.editor.graph,d=e.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var k=document.createElement("div");k.style.fontWeight="bold";d.stroke||(k.style.display="none");var n=document.createElement("select"); +n.style.position="absolute";n.style.height="22px";n.style.padding="0px";n.style.marginTop="-3px";n.style.boxSizing="border-box";n.style.left="94px";n.style.width="80px";n.style.border="1px solid rgb(160, 160, 160)";n.style.borderRadius="4px";for(var u=["sharp","rounded","curved"],m=0;m<u.length;m++){var r=document.createElement("option");r.setAttribute("value",u[m]);mxUtils.write(r,mxResources.get(u[m]));n.appendChild(r)}mxEvent.addListener(n,"change",function(W){g.getModel().beginUpdate();try{var da= +[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],sa=["0",null];"rounded"==n.value?sa=["1",null]:"curved"==n.value&&(sa=[null,"1"]);for(var ta=0;ta<da.length;ta++)g.setCellStyles(da[ta],sa[ta],d.cells);e.fireEvent(new mxEventObject("styleChanged","keys",da,"values",sa,"cells",d.cells))}finally{g.getModel().endUpdate()}mxEvent.consume(W)});mxEvent.addListener(n,"click",function(W){mxEvent.consume(W)});var x="image"==d.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR;u="image"== +d.style.shape?mxResources.get("border"):mxResources.get("line");u=this.createCellColorOption(u,x,"default",null,mxUtils.bind(this,function(W){g.setCellStyles(x,W,d.cells)}),g.shapeForegroundColor);u.appendChild(n);k.appendChild(u);var B=k.cloneNode(!1);B.style.fontWeight="normal";B.style.whiteSpace="nowrap";B.style.position="relative";B.style.paddingLeft="0px";B.style.marginBottom="2px";B.style.overflow="hidden";B.style.marginTop="2px";B.style.width="220px";B.className="geToolbarContainer";var D= +mxUtils.bind(this,function(W,da,sa,ta,Ja){W=this.editorUi.menus.styleChange(W,"",ta,Ja,"geIcon",null);ta=document.createElement("div");ta.style.width=da+"px";ta.style.height="1px";ta.style.borderBottom="1px "+sa+" "+this.defaultStrokeColor;ta.style.paddingTop="6px";W.firstChild.firstChild.style.padding="0px 4px 0px 4px";W.firstChild.firstChild.style.width=da+"px";W.firstChild.firstChild.appendChild(ta);return W});m=this.editorUi.toolbar.addMenuFunctionInContainer(B,"geSprite-orthogonal",mxResources.get("pattern"), +!1,mxUtils.bind(this,function(W){D(W,75,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));D(W,75,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));D(W,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");D(W,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN], +["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");D(W,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")}));var F=B.cloneNode(!1),I=this.editorUi.toolbar.addMenuFunctionInContainer(F,"geSprite-connection",mxResources.get("connection"),!1,mxUtils.bind(this,function(W){this.editorUi.menus.styleChange(W,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null, +null,null,null],"geIcon geSprite geSprite-connection",null,!0).setAttribute("title",mxResources.get("line"));this.editorUi.menus.styleChange(W,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["link",null,null,null],"geIcon geSprite geSprite-linkedge",null,!0).setAttribute("title",mxResources.get("link"));this.editorUi.menus.styleChange(W,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null], +"geIcon geSprite geSprite-arrow",null,!0).setAttribute("title",mxResources.get("arrow"));this.editorUi.menus.styleChange(W,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,null],"geIcon geSprite geSprite-simplearrow",null,!0).setAttribute("title",mxResources.get("simpleArrow"))}));r=this.editorUi.toolbar.addMenuFunctionInContainer(F,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(W){D(W,33,"solid",[mxConstants.STYLE_DASHED, +mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));D(W,33,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));D(W,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");D(W,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+ +" (2)");D(W,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")}));u=B.cloneNode(!1);var C=document.createElement("input");C.style.position="absolute";C.style.textAlign="right";C.style.marginTop="2px";C.style.width="52px";C.style.height="21px";C.style.left="146px";C.style.border="1px solid rgb(160, 160, 160)";C.style.borderRadius="4px";C.style.boxSizing="border-box";C.setAttribute("title",mxResources.get("linewidth")); +B.appendChild(C);var N=C.cloneNode(!0);F.appendChild(N);var R=this.createStepper(C,b,1,9);R.style.display=C.style.display;R.style.marginTop="2px";R.style.left="198px";B.appendChild(R);R=this.createStepper(N,f,1,9);R.style.display=N.style.display;R.style.marginTop="2px";N.style.position="absolute";R.style.left="198px";F.appendChild(R);mxEvent.addListener(C,"blur",b);mxEvent.addListener(C,"change",b);mxEvent.addListener(N,"blur",f);mxEvent.addListener(N,"change",f);var S=this.editorUi.toolbar.addMenuFunctionInContainer(u, +"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(W){"arrow"!=d.style.shape&&(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",null,!0).setAttribute("title",mxResources.get("straight")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal", +null,!0).setAttribute("title",mxResources.get("orthogonal")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle", +"vertical",null,null],"geIcon geSprite geSprite-verticalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED, +mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),"connector"==d.style.shape&&this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",null,!0).setAttribute("title",mxResources.get("curved")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE, +mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",null,!0).setAttribute("title",mxResources.get("entityRelation")))})),Q=this.editorUi.toolbar.addMenuFunctionInContainer(u,"geSprite-startclassic",mxResources.get("linestart"),!1,mxUtils.bind(this,function(W){if("connector"==d.style.shape||"flexArrow"==d.style.shape||"filledEdge"==d.style.shape){var da=this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW, +"startFill"],[mxConstants.NONE,0],"geIcon",null,!1);da.setAttribute("title",mxResources.get("none"));var sa=document.createElement("font");sa.style.fontSize="10px";mxUtils.write(sa,mxResources.get("none"));da.firstChild.firstChild.appendChild(sa);"connector"==d.style.shape||"filledEdge"==d.style.shape?(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC,1],null,null,!1,Format.classicFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W, +"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,1],null,null,!1,Format.classicThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN,0],null,null,!1,Format.openFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN_THIN,0],null,null,!1,Format.openThinFilledMarkerImage.src)), +Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["openAsync",0],null,null,!1,Format.openAsyncFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK,1],null,null,!1,Format.blockFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK_THIN,1],null, +null,!1,Format.blockThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["async",1],null,null,!1,Format.asyncFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OVAL,1],null,null,!1,Format.ovalFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"], +[mxConstants.ARROW_DIAMOND,1],null,null,!1,Format.diamondFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND_THIN,1],null,null,!1,Format.diamondThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC,0],null,null,!1,Format.classicMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W, +"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,0],null,null,!1,Format.classicThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK,0],null,null,!1,Format.blockMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK_THIN,0],null,null,!1,Format.blockThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W, +"",[mxConstants.STYLE_STARTARROW,"startFill"],["async",0],null,null,!1,Format.asyncMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OVAL,0],null,null,!1,Format.ovalMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND,0],null,null,!1,Format.diamondMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W, +"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND_THIN,0],null,null,!1,Format.diamondThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["box",0],null,null,!1,Format.boxMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["halfCircle",0],null,null,!1,Format.halfCircleMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W, +"",[mxConstants.STYLE_STARTARROW,"startFill"],["dash",0],null,null,!1,Format.dashMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["cross",0],null,null,!1,Format.crossMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["circlePlus",0],null,null,!1,Format.circlePlusMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW, +"startFill"],["circle",1],null,null,!1,Format.circleMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["baseDash",0],null,null,!1,Format.baseDashMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERone",0],null,null,!1,Format.EROneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"], +["ERmandOne",0],null,null,!1,Format.ERmandOneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmany",0],null,null,!1,Format.ERmanyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERoneToMany",0],null,null,!1,Format.ERoneToManyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"], +["ERzeroToOne",0],null,null,!1,Format.ERzeroToOneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToMany",0],null,null,!1,Format.ERzeroToManyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["doubleBlock",0],null,null,!1,Format.doubleBlockMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW, +"startFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src))):this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-startblocktrans",null,!1).setAttribute("title",mxResources.get("block"));W.div.style.width="40px";window.setTimeout(mxUtils.bind(this,function(){null!=W.div&&mxUtils.fit(W.div)}),0)}})),aa=this.editorUi.toolbar.addMenuFunctionInContainer(u,"geSprite-endclassic",mxResources.get("lineend"),!1, +mxUtils.bind(this,function(W){if("connector"==d.style.shape||"flexArrow"==d.style.shape||"filledEdge"==d.style.shape){var da=this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.NONE,0],"geIcon",null,!1);da.setAttribute("title",mxResources.get("none"));var sa=document.createElement("font");sa.style.fontSize="10px";mxUtils.write(sa,mxResources.get("none"));da.firstChild.firstChild.appendChild(sa);"connector"==d.style.shape||"filledEdge"==d.style.shape?(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W, +"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,1],null,null,!1,Format.classicFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC_THIN,1],null,null,!1,Format.classicThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN,0],null,null,!1,Format.openFilledMarkerImage.src), +"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN_THIN,0],null,null,!1,Format.openThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["openAsync",0],null,null,!1,Format.openAsyncFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"], +[mxConstants.ARROW_BLOCK,1],null,null,!1,Format.blockFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK_THIN,1],null,null,!1,Format.blockThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["async",1],null,null,!1,Format.asyncFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W, +"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OVAL,1],null,null,!1,Format.ovalFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND,1],null,null,!1,Format.diamondFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,1],null,null,!1,Format.diamondThinFilledMarkerImage.src), +"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,0],null,null,!1,Format.classicMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC_THIN,0],null,null,!1,Format.classicThinMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"], +[mxConstants.ARROW_BLOCK,0],null,null,!1,Format.blockMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK_THIN,0],null,null,!1,Format.blockThinMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["async",0],null,null,!1,Format.asyncMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W, +"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OVAL,0],null,null,!1,Format.ovalMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND,0],null,null,!1,Format.diamondMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,0],null,null,!1,Format.diamondThinMarkerImage.src), +"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["box",0],null,null,!1,Format.boxMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["halfCircle",0],null,null,!1,Format.halfCircleMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["dash",0],null,null,!1,Format.dashMarkerImage.src), +"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["cross",0],null,null,!1,Format.crossMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circlePlus",0],null,null,!1,Format.circlePlusMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circle",0],null,null,!1,Format.circleMarkerImage.src), +"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["baseDash",0],null,null,!1,Format.baseDashMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERone",0],null,null,!1,Format.EROneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmandOne",0],null,null,!1,Format.ERmandOneMarkerImage.src), +"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmany",0],null,null,!1,Format.ERmanyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERoneToMany",0],null,null,!1,Format.ERoneToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToOne",0],null,null, +!1,Format.ERzeroToOneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",0],null,null,!1,Format.ERzeroToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["doubleBlock",0],null,null,!1,Format.doubleBlockMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW, +"endFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src),"scaleX(-1)")):this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block"));W.div.style.width="40px";window.setTimeout(mxUtils.bind(this,function(){null!=W.div&&mxUtils.fit(W.div)}),0)}}));R=this.addArrow(I,8);R.nextSibling.style.position="relative";R.nextSibling.style.top="-2px";R=this.addArrow(S, +10);R.nextSibling.style.position="relative";R.nextSibling.style.top="-3px";S.getElementsByTagName("img")[0].style.top="-1px";this.addArrow(Q,null,!0);this.addArrow(aa,null,!0);R=this.addArrow(m,9);R.className="geIcon";R.style.width="auto";var U=this.addArrow(r,9);U.className="geIcon";U.style.width="22px";var P=document.createElement("div");P.style.width="84px";P.style.height="1px";P.style.borderBottom="1px solid "+this.defaultStrokeColor;P.style.marginBottom="7px";R.appendChild(P);var Y=document.createElement("div"); +Y.style.width="23px";Y.style.height="1px";Y.style.borderBottom="1px solid "+this.defaultStrokeColor;Y.style.marginBottom="7px";U.appendChild(Y);m.style.height="15px";m.style.marginLeft="16px";r.style.height="15px";r.style.marginLeft="3px";I.style.marginLeft="10px";I.style.height="15px";S.style.marginLeft="10px";S.style.height="17px";Q.style.marginLeft="3px";Q.style.height="17px";aa.style.marginLeft="3px";aa.style.height="17px";a.appendChild(k);a.appendChild(F);a.appendChild(B);m=B.cloneNode(!1);m.style.padding= +"5px 4px 6px 0px";m.style.fontWeight="normal";r=document.createElement("div");r.style.position="absolute";r.style.marginLeft="0px";r.style.marginBottom="12px";r.style.marginTop="2px";r.style.fontWeight="normal";r.style.width="76px";mxUtils.write(r,mxResources.get("lineend"));m.appendChild(r);var ja=this.addUnitInput(m,"pt",98,52,function(){ha.apply(this,arguments)}),fa=this.addUnitInput(m,"pt",30,52,function(){ba.apply(this,arguments)});mxUtils.br(m);R=document.createElement("div");R.style.height= +"8px";m.appendChild(R);r=r.cloneNode(!1);mxUtils.write(r,mxResources.get("linestart"));m.appendChild(r);var ra=this.addUnitInput(m,"pt",98,52,function(){J.apply(this,arguments)}),K=this.addUnitInput(m,"pt",30,52,function(){T.apply(this,arguments)});mxUtils.br(m);this.addLabel(m,mxResources.get("spacing"),98,52);this.addLabel(m,mxResources.get("size"),30,52);mxUtils.br(m);k=k.cloneNode(!1);k.style.fontWeight="normal";k.style.position="relative";k.style.paddingLeft="16px";k.style.marginBottom="2px"; +k.style.marginTop="6px";k.style.borderWidth="0px";k.style.paddingBottom="18px";r=document.createElement("div");r.style.position="absolute";r.style.marginLeft="3px";r.style.marginBottom="12px";r.style.marginTop="1px";r.style.fontWeight="normal";r.style.width="120px";mxUtils.write(r,mxResources.get("perimeter"));k.appendChild(r);var V=this.addUnitInput(k,"pt",30,52,function(){na.apply(this,arguments)});d.edges.length==d.cells.length?(a.appendChild(u),a.appendChild(m)):d.vertices.length==d.cells.length&& +a.appendChild(k);var O=mxUtils.bind(this,function(W,da,sa){function ta(Ja,Ha,ua,Aa){ua=ua.getElementsByTagName("div")[0];null!=ua&&e.updateCssForMarker(ua,Aa,d.style.shape,Ja,Ha);return ua}d=e.getSelectionState();if(sa||document.activeElement!=C)W=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STROKEWIDTH,1)),C.value=isNaN(W)?"":W+" pt";if(sa||document.activeElement!=N)W=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STROKEWIDTH,1)),N.value=isNaN(W)?"":W+" pt";n.style.visibility="connector"== d.style.shape||"filledEdge"==d.style.shape?"":"hidden";"1"==mxUtils.getValue(d.style,mxConstants.STYLE_CURVED,null)?n.value="curved":"1"==mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,null)&&(n.value="rounded");"1"==mxUtils.getValue(d.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(d.style,mxConstants.STYLE_DASH_PATTERN,null)?P.style.borderBottom="1px dashed "+this.defaultStrokeColor:P.style.borderBottom="1px dotted "+this.defaultStrokeColor:P.style.borderBottom="1px solid "+this.defaultStrokeColor; -X.style.borderBottom=P.style.borderBottom;Y=T.getElementsByTagName("div")[0];null!=Y&&(da=mxUtils.getValue(d.style,mxConstants.STYLE_EDGE,null),"1"==mxUtils.getValue(d.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(da=null),"orthogonalEdgeStyle"==da&&"1"==mxUtils.getValue(d.style,mxConstants.STYLE_CURVED,null)?Y.className="geSprite geSprite-curved":Y.className="straight"==da||"none"==da||null==da?"geSprite geSprite-straight":"entityRelationEdgeStyle"==da?"geSprite geSprite-entity":"elbowEdgeStyle"== -da?"geSprite "+("vertical"==mxUtils.getValue(d.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==da?"geSprite "+("vertical"==mxUtils.getValue(d.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal");Y=J.getElementsByTagName("div")[0];null!=Y&&(Y.className="link"==d.style.shape?"geSprite geSprite-linkedge":"flexArrow"==d.style.shape?"geSprite geSprite-arrow":"arrow"== -d.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection");d.edges.length==d.cells.length?(F.style.display="",B.style.display="none"):(F.style.display="none",B.style.display="");Graph.lineJumpsEnabled&&0<d.edges.length&&0==d.vertices.length&&d.lineJumps&&(a.style.borderBottomStyle="none");Y=wa(mxUtils.getValue(d.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(d.style,"startFill","1"),Q,"start");da=wa(mxUtils.getValue(d.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(d.style, -"endFill","1"),aa,"end");null!=Y&&null!=da&&("arrow"==d.style.shape?(Y.className="geSprite geSprite-noarrow",da.className="geSprite geSprite-endblocktrans"):"link"==d.style.shape&&(Y.className="geSprite geSprite-noarrow",da.className="geSprite geSprite-noarrow"));mxUtils.setOpacity(T,"arrow"==d.style.shape?30:100);"connector"!=d.style.shape&&"flexArrow"!=d.style.shape&&"filledEdge"!=d.style.shape?(mxUtils.setOpacity(Q,30),mxUtils.setOpacity(aa,30)):(mxUtils.setOpacity(Q,100),mxUtils.setOpacity(aa, -100));if(pa||document.activeElement!=K)Y=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),K.value=isNaN(Y)?"":Y+" pt";if(pa||document.activeElement!=sa)Y=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),sa.value=isNaN(Y)?"":Y+" pt";if(pa||document.activeElement!=fa)Y=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),fa.value=isNaN(Y)?"":Y+" pt";if(pa||document.activeElement!=sa)Y= -parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),ha.value=isNaN(Y)?"":Y+" pt";if(pa||document.activeElement!=V)Y=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_PERIMETER_SPACING,0)),V.value=isNaN(Y)?"":Y+" pt"});var M=this.installInputHandler(K,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");var U=this.installInputHandler(sa,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");var ba=this.installInputHandler(fa,mxConstants.STYLE_ENDSIZE, -mxConstants.DEFAULT_MARKERSIZE,0,999," pt");var la=this.installInputHandler(ha,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");var ra=this.installInputHandler(V,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(C,G);this.addKeyHandler(K,G);this.addKeyHandler(sa,G);this.addKeyHandler(fa,G);this.addKeyHandler(ha,G);this.addKeyHandler(V,G);g.getModel().addListener(mxEvent.CHANGE,G);this.listeners.push({destroy:function(){g.getModel().removeListener(G)}});G();return a}; +Y.style.borderBottom=P.style.borderBottom;W=S.getElementsByTagName("div")[0];null!=W&&(da=mxUtils.getValue(d.style,mxConstants.STYLE_EDGE,null),"1"==mxUtils.getValue(d.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(da=null),"orthogonalEdgeStyle"==da&&"1"==mxUtils.getValue(d.style,mxConstants.STYLE_CURVED,null)?W.className="geSprite geSprite-curved":W.className="straight"==da||"none"==da||null==da?"geSprite geSprite-straight":"entityRelationEdgeStyle"==da?"geSprite geSprite-entity":"elbowEdgeStyle"== +da?"geSprite "+("vertical"==mxUtils.getValue(d.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==da?"geSprite "+("vertical"==mxUtils.getValue(d.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal");W=I.getElementsByTagName("div")[0];null!=W&&(W.className="link"==d.style.shape?"geSprite geSprite-linkedge":"flexArrow"==d.style.shape?"geSprite geSprite-arrow":"arrow"== +d.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection");d.edges.length==d.cells.length?(F.style.display="",B.style.display="none"):(F.style.display="none",B.style.display="");Graph.lineJumpsEnabled&&0<d.edges.length&&0==d.vertices.length&&d.lineJumps&&(a.style.borderBottomStyle="none");W=ta(mxUtils.getValue(d.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(d.style,"startFill","1"),Q,"start");da=ta(mxUtils.getValue(d.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(d.style, +"endFill","1"),aa,"end");null!=W&&null!=da&&("arrow"==d.style.shape?(W.className="geSprite geSprite-noarrow",da.className="geSprite geSprite-endblocktrans"):"link"==d.style.shape&&(W.className="geSprite geSprite-noarrow",da.className="geSprite geSprite-noarrow"));mxUtils.setOpacity(S,"arrow"==d.style.shape?30:100);"connector"!=d.style.shape&&"flexArrow"!=d.style.shape&&"filledEdge"!=d.style.shape?(mxUtils.setOpacity(Q,30),mxUtils.setOpacity(aa,30)):(mxUtils.setOpacity(Q,100),mxUtils.setOpacity(aa, +100));if(sa||document.activeElement!=K)W=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),K.value=isNaN(W)?"":W+" pt";if(sa||document.activeElement!=ra)W=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),ra.value=isNaN(W)?"":W+" pt";if(sa||document.activeElement!=fa)W=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),fa.value=isNaN(W)?"":W+" pt";if(sa||document.activeElement!=ra)W= +parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),ja.value=isNaN(W)?"":W+" pt";if(sa||document.activeElement!=V)W=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_PERIMETER_SPACING,0)),V.value=isNaN(W)?"":W+" pt"});var T=this.installInputHandler(K,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");var J=this.installInputHandler(ra,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");var ba=this.installInputHandler(fa,mxConstants.STYLE_ENDSIZE, +mxConstants.DEFAULT_MARKERSIZE,0,999," pt");var ha=this.installInputHandler(ja,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");var na=this.installInputHandler(V,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(C,O);this.addKeyHandler(K,O);this.addKeyHandler(ra,O);this.addKeyHandler(fa,O);this.addKeyHandler(ja,O);this.addKeyHandler(V,O);g.getModel().addListener(mxEvent.CHANGE,O);this.listeners.push({destroy:function(){g.getModel().removeListener(O)}});O();return a}; StyleFormatPanel.prototype.addLineJumps=function(a){var b=this.editorUi,f=b.editor.graph,e=b.getSelectionState();if(Graph.lineJumpsEnabled&&0<e.edges.length&&0==e.vertices.length&&e.lineJumps){a.style.padding="2px 0px 24px 14px";var g=document.createElement("div");g.style.position="absolute";g.style.maxWidth="82px";g.style.overflow="hidden";g.style.textOverflow="ellipsis";mxUtils.write(g,mxResources.get("lineJumps"));a.appendChild(g);var d=document.createElement("select");d.style.position="absolute"; d.style.height="21px";d.style.padding="0px";d.style.marginTop="-2px";d.style.boxSizing="border-box";d.style.right="76px";d.style.width="54px";d.style.border="1px solid rgb(160, 160, 160)";d.style.borderRadius="4px";g=["none","arc","gap","sharp","line"];for(var k=0;k<g.length;k++){var n=document.createElement("option");n.setAttribute("value",g[k]);mxUtils.write(n,mxResources.get(g[k]));d.appendChild(n)}mxEvent.addListener(d,"change",function(x){f.getModel().beginUpdate();try{f.setCellStyles("jumpStyle", d.value,e.cells),b.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[d.value],"cells",e.cells))}finally{f.getModel().endUpdate()}mxEvent.consume(x)});mxEvent.addListener(d,"click",function(x){mxEvent.consume(x)});a.appendChild(d);var u=this.addUnitInput(a,"pt",16,42,function(){m.apply(this,arguments)});var m=this.installInputHandler(u,"jumpSize",Graph.defaultJumpSize,0,999," pt");var r=mxUtils.bind(this,function(x,B,D){e=b.getSelectionState();d.value=mxUtils.getValue(e.style, "jumpStyle","none");if(D||document.activeElement!=u)x=parseInt(mxUtils.getValue(e.style,"jumpSize",Graph.defaultJumpSize)),u.value=isNaN(x)?"":x+" pt"});this.addKeyHandler(u,r);f.getModel().addListener(mxEvent.CHANGE,r);this.listeners.push({destroy:function(){f.getModel().removeListener(r)}});r()}else a.style.display="none";return a}; StyleFormatPanel.prototype.addEffects=function(a){var b=this.editorUi,f=b.editor.graph,e=b.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="0px";var g=document.createElement("table");g.style.width="210px";g.style.fontWeight="bold";g.style.tableLayout="fixed";var d=document.createElement("tbody"),k=document.createElement("tr");k.style.padding="0px";var n=document.createElement("td");n.style.padding="0px";n.style.width="50%";n.setAttribute("valign","top");var u=n.cloneNode(!0);u.style.paddingLeft= -"8px";k.appendChild(n);k.appendChild(u);d.appendChild(k);g.appendChild(d);a.appendChild(g);var m=n,r=0,x=mxUtils.bind(this,function(D,F,J){D=this.createCellOption(D,F,J);D.style.width="100%";m.appendChild(D);m=m==n?u:n;r++}),B=mxUtils.bind(this,function(D,F,J){e=b.getSelectionState();n.innerText="";u.innerText="";m=n;e.rounded&&x(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);e.swimlane&&x(mxResources.get("divider"),"swimlaneLine",1);e.containsImage||x(mxResources.get("shadow"),mxConstants.STYLE_SHADOW, +"8px";k.appendChild(n);k.appendChild(u);d.appendChild(k);g.appendChild(d);a.appendChild(g);var m=n,r=0,x=mxUtils.bind(this,function(D,F,I){D=this.createCellOption(D,F,I);D.style.width="100%";m.appendChild(D);m=m==n?u:n;r++}),B=mxUtils.bind(this,function(D,F,I){e=b.getSelectionState();n.innerText="";u.innerText="";m=n;e.rounded&&x(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);e.swimlane&&x(mxResources.get("divider"),"swimlaneLine",1);e.containsImage||x(mxResources.get("shadow"),mxConstants.STYLE_SHADOW, 0);e.glass&&x(mxResources.get("glass"),mxConstants.STYLE_GLASS,0);x(mxResources.get("sketch"),"sketch",0)});f.getModel().addListener(mxEvent.CHANGE,B);this.listeners.push({destroy:function(){f.getModel().removeListener(B)}});B();return a};StyleFormatPanel.prototype.addStyleOps=function(a){a.style.paddingTop="10px";a.style.paddingBottom="10px";this.addActions(a,["setAsDefaultStyle"]);return a};DiagramStylePanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()}; mxUtils.extend(DiagramStylePanel,BaseFormatPanel);DiagramStylePanel.prototype.init=function(){var a=this.editorUi;this.darkModeChangedListener=mxUtils.bind(this,function(){this.format.cachedStyleEntries=[]});a.addListener("darkModeChanged",this.darkModeChangedListener);this.container.appendChild(this.addView(this.createPanel()))}; DiagramStylePanel.prototype.addView=function(a){var b=this.editorUi,f=b.editor.graph,e=f.getModel(),g=f.view.gridColor;a.style.whiteSpace="normal";var d=document.createElement("div");d.style.marginRight="16px";a.style.paddingTop="8px";var k=document.createElement("table");k.style.width="210px";k.style.fontWeight="bold";var n=document.createElement("tbody"),u=document.createElement("tr");u.style.padding="0px";var m=document.createElement("td");m.style.padding="0px";m.style.width="50%";m.setAttribute("valign", "middle");var r=m.cloneNode(!0);r.style.paddingLeft="8px";d.style.paddingBottom="12px";u.appendChild(m);m.appendChild(this.createOption(mxResources.get("sketch"),function(){return Editor.sketchMode},function(P){f.updateCellStyles({sketch:P?"1":null},f.getVerticesAndEdges());b.setSketchMode(!Editor.sketchMode)},null,function(P){P.style.width="auto"}));u.appendChild(r);n.appendChild(u);k.appendChild(n);r.appendChild(this.createOption(mxResources.get("rounded"),mxUtils.bind(this,function(){return this.format.rounded}), mxUtils.bind(this,function(P){this.format.rounded=P;f.updateCellStyles({rounded:P?"1":"0"},f.getVerticesAndEdges());P?(f.currentEdgeStyle.rounded="1",f.currentVertexStyle.rounded="1"):(delete f.currentEdgeStyle.rounded,delete f.currentVertexStyle.rounded)}),null,function(P){P.style.width="auto"}));m=m.cloneNode(!1);r=r.cloneNode(!1);u=u.cloneNode(!1);u.appendChild(m);u.appendChild(r);n.appendChild(u);m.appendChild(this.createOption(mxResources.get("curved"),mxUtils.bind(this,function(){return this.format.curved}), -mxUtils.bind(this,function(P){this.format.curved=P;f.updateCellStyles({curved:P?"1":null},f.getVerticesAndEdges(!1,!0));P?f.currentEdgeStyle.curved="1":delete f.currentEdgeStyle.curved}),null,function(P){P.style.width="auto"}));d.appendChild(k);a.appendChild(d);var x=["fillColor","strokeColor","fontColor","gradientColor"],B=mxUtils.bind(this,function(P,X){var ha=f.getVerticesAndEdges();e.beginUpdate();try{for(var fa=0;fa<ha.length;fa++){var sa=f.getCellStyle(ha[fa]);null!=sa.labelBackgroundColor&& -f.updateCellStyles({labelBackgroundColor:null!=X?X.background:null},[ha[fa]]);for(var K=e.isEdge(ha[fa]),V=e.getStyle(ha[fa]),G=K?f.currentEdgeStyle:f.currentVertexStyle,M=0;M<P.length;M++)if(null!=sa[P[M]]&&sa[P[M]]!=mxConstants.NONE||P[M]!=mxConstants.STYLE_FILLCOLOR&&P[M]!=mxConstants.STYLE_STROKECOLOR)V=mxUtils.setStyle(V,P[M],G[P[M]]);e.setStyle(ha[fa],V)}}finally{e.endUpdate()}}),D=mxUtils.bind(this,function(P,X,ha){if(null!=P)for(var fa=0;fa<X.length;fa++)if(null!=P[X[fa]]&&P[X[fa]]!=mxConstants.NONE|| -X[fa]!=mxConstants.STYLE_FILLCOLOR&&X[fa]!=mxConstants.STYLE_STROKECOLOR)P[X[fa]]=ha[X[fa]]}),F=mxUtils.bind(this,function(P,X,ha,fa,sa){if(null!=P){null!=ha&&null!=X.labelBackgroundColor&&(fa=null!=fa?fa.background:null,sa=null!=sa?sa:f,null==fa&&(fa=sa.background),null==fa&&(fa=sa.defaultPageBackgroundColor),X.labelBackgroundColor=fa);for(var K in P)if(null==ha||null!=X[K]&&X[K]!=mxConstants.NONE||K!=mxConstants.STYLE_FILLCOLOR&&K!=mxConstants.STYLE_STROKECOLOR)X[K]=P[K]}});m=mxUtils.button(mxResources.get("reset"), -mxUtils.bind(this,function(P){P=f.getVerticesAndEdges(!0,!0);this.format.rounded=!1;this.format.curved=!1;if(0<P.length){e.beginUpdate();try{f.updateCellStyles({sketch:null,rounded:null},P),f.updateCellStyles({curved:null,rounded:"0"},f.getVerticesAndEdges(!1,!0))}finally{e.endUpdate()}}b.clearDefaultStyle();b.setSketchMode(!1)}));m.setAttribute("title",mxResources.get("reset"));m.style.textOverflow="ellipsis";m.style.maxWidth="90px";r.appendChild(m);var J=mxUtils.bind(this,function(P,X,ha,fa,sa){var K= -document.createElement("div");K.style.position="absolute";K.style.display="inline-block";K.style.overflow="hidden";K.style.pointerEvents="none";K.style.width="100%";K.style.height="100%";sa.appendChild(K);var V=new Graph(K,null,null,f.getStylesheet());V.resetViewOnRootChange=!1;V.foldingEnabled=!1;V.gridEnabled=!1;V.autoScroll=!1;V.setTooltips(!1);V.setConnectable(!1);V.setPanning(!1);V.setEnabled(!1);V.getCellStyle=function(U,ba){ba=null!=ba?ba:!0;var la=mxUtils.clone(f.getCellStyle.apply(this,arguments)), -ra=f.stylesheet.getDefaultVertexStyle(),Y=X;e.isEdge(U)&&(ra=f.stylesheet.getDefaultEdgeStyle(),Y=ha);D(la,x,ra);F(P,la,U,fa,V);F(Y,la,U,fa,V);ba&&(la=f.postProcessCellStyle(U,la));return la};V.model.beginUpdate();try{var G=V.insertVertex(V.getDefaultParent(),null,"Shape",14,8,70,40,"strokeWidth=2;"),M=V.insertEdge(V.getDefaultParent(),null,"Connector",G,G,"edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;endSize=5;strokeWidth=2;");M.geometry.points=[new mxPoint(32,70)];M.geometry.offset= -new mxPoint(0,8)}finally{V.model.endUpdate()}}),C=document.createElement("div");C.style.position="relative";a.appendChild(C);null==this.format.cachedStyleEntries&&(this.format.cachedStyleEntries=[]);var O=mxUtils.bind(this,function(P,X,ha,fa,sa){var K=this.format.cachedStyleEntries[sa];null==K&&(K=document.createElement("div"),K.style.display="inline-block",K.style.position="relative",K.style.width="96px",K.style.height="90px",K.style.cursor="pointer",K.style.border="1px solid gray",K.style.borderRadius= -"8px",K.style.margin="2px",K.style.overflow="hidden",null!=fa&&null!=fa.background&&(K.style.backgroundColor=fa.background),J(P,X,ha,fa,K),mxEvent.addGestureListeners(K,mxUtils.bind(this,function(V){K.style.opacity=.5}),null,mxUtils.bind(this,function(V){K.style.opacity=1;f.currentVertexStyle=mxUtils.clone(f.defaultVertexStyle);f.currentEdgeStyle=mxUtils.clone(f.defaultEdgeStyle);F(P,f.currentVertexStyle);F(P,f.currentEdgeStyle);F(X,f.currentVertexStyle);F(ha,f.currentEdgeStyle);e.beginUpdate();try{var G= -x.slice(),M;for(M in P)G.push(M);B(G,fa);var U=new ChangePageSetup(b,null!=fa?fa.background:null);U.ignoreImage=!0;e.execute(U);e.execute(new ChangeGridColor(b,null!=fa&&null!=fa.gridColor?fa.gridColor:g))}finally{e.endUpdate()}})),mxEvent.addListener(K,"mouseenter",mxUtils.bind(this,function(V){var G=f.getCellStyle;V=f.background;var M=f.view.gridColor;f.background=null!=fa?fa.background:null;f.view.gridColor=null!=fa&&null!=fa.gridColor?fa.gridColor:g;f.getCellStyle=function(U,ba){ba=null!=ba?ba: -!0;var la=mxUtils.clone(G.apply(this,arguments)),ra=f.stylesheet.getDefaultVertexStyle(),Y=X;e.isEdge(U)&&(ra=f.stylesheet.getDefaultEdgeStyle(),Y=ha);D(la,x,ra);F(P,la,U,fa);F(Y,la,U,fa);ba&&(la=this.postProcessCellStyle(U,la));return la};f.refresh();f.getCellStyle=G;f.background=V;f.view.gridColor=M})),mxEvent.addListener(K,"mouseleave",mxUtils.bind(this,function(V){f.refresh()})),mxClient.IS_IE||mxClient.IS_IE11||(this.format.cachedStyleEntries[sa]=K));C.appendChild(K)}),R=Math.ceil(Editor.styles.length/ -10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var T=[],Q=mxUtils.bind(this,function(){0<T.length&&(T[this.format.currentStylePage].style.background="#84d7ff");for(var P=10*this.format.currentStylePage;P<Math.min(10*(this.format.currentStylePage+1),Editor.styles.length);P++){var X=Editor.styles[P];O(X.commonStyle,X.vertexStyle,X.edgeStyle,X.graph,P)}}),aa=mxUtils.bind(this,function(P){0<=P&&P<R&&(T[this.format.currentStylePage].style.background= -"transparent",C.innerText="",this.format.currentStylePage=P,Q())});if(1<R){d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.position="relative";d.style.textAlign="center";d.style.paddingTop="4px";d.style.width="210px";a.style.paddingBottom="8px";for(r=0;r<R;r++){var S=document.createElement("div");S.style.display="inline-block";S.style.width="6px";S.style.height="6px";S.style.marginLeft="4px";S.style.marginRight="3px";S.style.borderRadius="3px";S.style.cursor="pointer";S.style.background= -"transparent";S.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(P,X){mxEvent.addListener(S,"click",mxUtils.bind(this,function(){aa(P)}))})(r,S);d.appendChild(S);T.push(S)}a.appendChild(d);Q();15>R&&(k=function(P){mxEvent.addListener(P,"mouseenter",function(){P.style.opacity="1"});mxEvent.addListener(P,"mouseleave",function(){P.style.opacity="0.5"})},m=document.createElement("div"),m.style.className="geAdaptiveAsset",m.style.position="absolute",m.style.left="0px",m.style.top="0px",m.style.bottom= +mxUtils.bind(this,function(P){this.format.curved=P;f.updateCellStyles({curved:P?"1":null},f.getVerticesAndEdges(!1,!0));P?f.currentEdgeStyle.curved="1":delete f.currentEdgeStyle.curved}),null,function(P){P.style.width="auto"}));d.appendChild(k);a.appendChild(d);var x=["fillColor","strokeColor","fontColor","gradientColor"],B=mxUtils.bind(this,function(P,Y){var ja=f.getVerticesAndEdges();e.beginUpdate();try{for(var fa=0;fa<ja.length;fa++){var ra=f.getCellStyle(ja[fa]);null!=ra.labelBackgroundColor&& +f.updateCellStyles({labelBackgroundColor:null!=Y?Y.background:null},[ja[fa]]);for(var K=e.isEdge(ja[fa]),V=e.getStyle(ja[fa]),O=K?f.currentEdgeStyle:f.currentVertexStyle,T=0;T<P.length;T++)if(null!=ra[P[T]]&&ra[P[T]]!=mxConstants.NONE||P[T]!=mxConstants.STYLE_FILLCOLOR&&P[T]!=mxConstants.STYLE_STROKECOLOR)V=mxUtils.setStyle(V,P[T],O[P[T]]);e.setStyle(ja[fa],V)}}finally{e.endUpdate()}}),D=mxUtils.bind(this,function(P,Y,ja){if(null!=P)for(var fa=0;fa<Y.length;fa++)if(null!=P[Y[fa]]&&P[Y[fa]]!=mxConstants.NONE|| +Y[fa]!=mxConstants.STYLE_FILLCOLOR&&Y[fa]!=mxConstants.STYLE_STROKECOLOR)P[Y[fa]]=ja[Y[fa]]}),F=mxUtils.bind(this,function(P,Y,ja,fa,ra){if(null!=P){null!=ja&&null!=Y.labelBackgroundColor&&(fa=null!=fa?fa.background:null,ra=null!=ra?ra:f,null==fa&&(fa=ra.background),null==fa&&(fa=ra.defaultPageBackgroundColor),Y.labelBackgroundColor=fa);for(var K in P)if(null==ja||null!=Y[K]&&Y[K]!=mxConstants.NONE||K!=mxConstants.STYLE_FILLCOLOR&&K!=mxConstants.STYLE_STROKECOLOR)Y[K]=P[K]}});m=mxUtils.button(mxResources.get("reset"), +mxUtils.bind(this,function(P){P=f.getVerticesAndEdges(!0,!0);this.format.rounded=!1;this.format.curved=!1;if(0<P.length){e.beginUpdate();try{f.updateCellStyles({sketch:null,rounded:null},P),f.updateCellStyles({curved:null,rounded:"0"},f.getVerticesAndEdges(!1,!0))}finally{e.endUpdate()}}b.clearDefaultStyle();b.setSketchMode(!1)}));m.setAttribute("title",mxResources.get("reset"));m.style.textOverflow="ellipsis";m.style.maxWidth="90px";r.appendChild(m);var I=mxUtils.bind(this,function(P,Y,ja,fa,ra){var K= +document.createElement("div");K.style.position="absolute";K.style.display="inline-block";K.style.overflow="hidden";K.style.pointerEvents="none";K.style.width="100%";K.style.height="100%";ra.appendChild(K);var V=new Graph(K,null,null,f.getStylesheet());V.resetViewOnRootChange=!1;V.foldingEnabled=!1;V.gridEnabled=!1;V.autoScroll=!1;V.setTooltips(!1);V.setConnectable(!1);V.setPanning(!1);V.setEnabled(!1);V.getCellStyle=function(J,ba){ba=null!=ba?ba:!0;var ha=mxUtils.clone(f.getCellStyle.apply(this,arguments)), +na=f.stylesheet.getDefaultVertexStyle(),W=Y;e.isEdge(J)&&(na=f.stylesheet.getDefaultEdgeStyle(),W=ja);D(ha,x,na);F(P,ha,J,fa,V);F(W,ha,J,fa,V);ba&&(ha=f.postProcessCellStyle(J,ha));return ha};V.model.beginUpdate();try{var O=V.insertVertex(V.getDefaultParent(),null,"Shape",14,8,70,40,"strokeWidth=2;"),T=V.insertEdge(V.getDefaultParent(),null,"Connector",O,O,"edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;endSize=5;strokeWidth=2;");T.geometry.points=[new mxPoint(32,70)];T.geometry.offset= +new mxPoint(0,8)}finally{V.model.endUpdate()}}),C=document.createElement("div");C.style.position="relative";a.appendChild(C);null==this.format.cachedStyleEntries&&(this.format.cachedStyleEntries=[]);var N=mxUtils.bind(this,function(P,Y,ja,fa,ra){var K=this.format.cachedStyleEntries[ra];null==K&&(K=document.createElement("div"),K.style.display="inline-block",K.style.position="relative",K.style.width="96px",K.style.height="90px",K.style.cursor="pointer",K.style.border="1px solid gray",K.style.borderRadius= +"8px",K.style.margin="2px",K.style.overflow="hidden",null!=fa&&null!=fa.background&&(K.style.backgroundColor=fa.background),I(P,Y,ja,fa,K),mxEvent.addGestureListeners(K,mxUtils.bind(this,function(V){K.style.opacity=.5}),null,mxUtils.bind(this,function(V){K.style.opacity=1;f.currentVertexStyle=mxUtils.clone(f.defaultVertexStyle);f.currentEdgeStyle=mxUtils.clone(f.defaultEdgeStyle);F(P,f.currentVertexStyle);F(P,f.currentEdgeStyle);F(Y,f.currentVertexStyle);F(ja,f.currentEdgeStyle);e.beginUpdate();try{var O= +x.slice(),T;for(T in P)O.push(T);B(O,fa);var J=new ChangePageSetup(b,null!=fa?fa.background:null);J.ignoreImage=!0;e.execute(J);e.execute(new ChangeGridColor(b,null!=fa&&null!=fa.gridColor?fa.gridColor:g))}finally{e.endUpdate()}})),mxEvent.addListener(K,"mouseenter",mxUtils.bind(this,function(V){var O=f.getCellStyle;V=f.background;var T=f.view.gridColor;f.background=null!=fa?fa.background:null;f.view.gridColor=null!=fa&&null!=fa.gridColor?fa.gridColor:g;f.getCellStyle=function(J,ba){ba=null!=ba?ba: +!0;var ha=mxUtils.clone(O.apply(this,arguments)),na=f.stylesheet.getDefaultVertexStyle(),W=Y;e.isEdge(J)&&(na=f.stylesheet.getDefaultEdgeStyle(),W=ja);D(ha,x,na);F(P,ha,J,fa);F(W,ha,J,fa);ba&&(ha=this.postProcessCellStyle(J,ha));return ha};f.refresh();f.getCellStyle=O;f.background=V;f.view.gridColor=T})),mxEvent.addListener(K,"mouseleave",mxUtils.bind(this,function(V){f.refresh()})),mxClient.IS_IE||mxClient.IS_IE11||(this.format.cachedStyleEntries[ra]=K));C.appendChild(K)}),R=Math.ceil(Editor.styles.length/ +10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var S=[],Q=mxUtils.bind(this,function(){0<S.length&&(S[this.format.currentStylePage].style.background="#84d7ff");for(var P=10*this.format.currentStylePage;P<Math.min(10*(this.format.currentStylePage+1),Editor.styles.length);P++){var Y=Editor.styles[P];N(Y.commonStyle,Y.vertexStyle,Y.edgeStyle,Y.graph,P)}}),aa=mxUtils.bind(this,function(P){0<=P&&P<R&&(S[this.format.currentStylePage].style.background= +"transparent",C.innerText="",this.format.currentStylePage=P,Q())});if(1<R){d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.position="relative";d.style.textAlign="center";d.style.paddingTop="4px";d.style.width="210px";a.style.paddingBottom="8px";for(r=0;r<R;r++){var U=document.createElement("div");U.style.display="inline-block";U.style.width="6px";U.style.height="6px";U.style.marginLeft="4px";U.style.marginRight="3px";U.style.borderRadius="3px";U.style.cursor="pointer";U.style.background= +"transparent";U.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(P,Y){mxEvent.addListener(U,"click",mxUtils.bind(this,function(){aa(P)}))})(r,U);d.appendChild(U);S.push(U)}a.appendChild(d);Q();15>R&&(k=function(P){mxEvent.addListener(P,"mouseenter",function(){P.style.opacity="1"});mxEvent.addListener(P,"mouseleave",function(){P.style.opacity="0.5"})},m=document.createElement("div"),m.style.className="geAdaptiveAsset",m.style.position="absolute",m.style.left="0px",m.style.top="0px",m.style.bottom= "0px",m.style.width="24px",m.style.height="24px",m.style.margin="0px",m.style.cursor="pointer",m.style.opacity="0.5",m.style.backgroundRepeat="no-repeat",m.style.backgroundPosition="center center",m.style.backgroundSize="24px 24px",m.style.backgroundImage="url("+Editor.previousImage+")",r=m.cloneNode(!1),r.style.backgroundImage="url("+Editor.nextImage+")",r.style.left="",r.style.right="2px",d.appendChild(m),d.appendChild(r),mxEvent.addListener(m,"click",mxUtils.bind(this,function(){aa(mxUtils.mod(this.format.currentStylePage- 1,R))})),mxEvent.addListener(r,"click",mxUtils.bind(this,function(){aa(mxUtils.mod(this.format.currentStylePage+1,R))})),k(m),k(r))}else Q();return a};DiagramStylePanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.darkModeChangedListener&&(this.editorUi.removeListener(this.darkModeChangedListener),this.darkModeChangedListener=null)};DiagramFormatPanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};mxUtils.extend(DiagramFormatPanel,BaseFormatPanel); DiagramFormatPanel.showPageView=!0;DiagramFormatPanel.prototype.showBackgroundImageOption=!0;DiagramFormatPanel.prototype.init=function(){var a=this.editorUi.editor.graph;this.container.appendChild(this.addView(this.createPanel()));a.isEnabled()&&(this.container.appendChild(this.addOptions(this.createPanel())),this.container.appendChild(this.addPaperSize(this.createPanel())),this.container.appendChild(this.addStyleOps(this.createPanel())))}; @@ -3214,19 +3212,19 @@ DiagramFormatPanel.prototype.addDocumentProperties=function(a){a.appendChild(thi DiagramFormatPanel.prototype.addPaperSize=function(a){var b=this.editorUi,f=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("paperSize")));var e=PageSetupDialog.addPageFormatPanel(a,"formatpanel",f.pageFormat,function(d){if(null==f.pageFormat||f.pageFormat.width!=d.width||f.pageFormat.height!=d.height)d=new ChangePageSetup(b,null,null,d),d.ignoreColor=!0,d.ignoreImage=!0,f.model.execute(d)});this.addKeyHandler(e.widthInput,function(){e.set(f.pageFormat)});this.addKeyHandler(e.heightInput, function(){e.set(f.pageFormat)});var g=function(){e.set(f.pageFormat)};b.addListener("pageFormatChanged",g);this.listeners.push({destroy:function(){b.removeListener(g)}});f.getModel().addListener(mxEvent.CHANGE,g);this.listeners.push({destroy:function(){f.getModel().removeListener(g)}});return a};DiagramFormatPanel.prototype.addStyleOps=function(a){this.addActions(a,["editData"]);this.addActions(a,["clearDefaultStyle"]);return a}; DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(c,h,q){mxShape.call(this);this.line=c;this.stroke=h;this.strokewidth=null!=q?q:1;this.updateBoundsFromLine()}function b(){mxSwimlane.call(this)}function f(){mxSwimlane.call(this)}function e(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function d(){mxActor.call(this)}function k(){mxCylinder.call(this)}function n(){mxCylinder.call(this)}function u(){mxCylinder.call(this)}function m(){mxCylinder.call(this)}function r(){mxShape.call(this)}function x(){mxShape.call(this)} -function B(c,h,q,l){mxShape.call(this);this.bounds=c;this.fill=h;this.stroke=q;this.strokewidth=null!=l?l:1}function D(){mxActor.call(this)}function F(){mxCylinder.call(this)}function J(){mxCylinder.call(this)}function C(){mxActor.call(this)}function O(){mxActor.call(this)}function R(){mxActor.call(this)}function T(){mxActor.call(this)}function Q(){mxActor.call(this)}function aa(){mxActor.call(this)}function S(){mxActor.call(this)}function P(c,h){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round"); +function B(c,h,q,l){mxShape.call(this);this.bounds=c;this.fill=h;this.stroke=q;this.strokewidth=null!=l?l:1}function D(){mxActor.call(this)}function F(){mxCylinder.call(this)}function I(){mxCylinder.call(this)}function C(){mxActor.call(this)}function N(){mxActor.call(this)}function R(){mxActor.call(this)}function S(){mxActor.call(this)}function Q(){mxActor.call(this)}function aa(){mxActor.call(this)}function U(){mxActor.call(this)}function P(c,h){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round"); this.defaultVariation=h;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,P.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,P.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,P.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,P.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,P.prototype.curveTo); -this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,P.prototype.arcTo)}function X(){mxRectangleShape.call(this)}function ha(){mxRectangleShape.call(this)}function fa(){mxActor.call(this)}function sa(){mxActor.call(this)}function K(){mxActor.call(this)}function V(){mxRectangleShape.call(this)}function G(){mxRectangleShape.call(this)}function M(){mxCylinder.call(this)}function U(){mxShape.call(this)}function ba(){mxShape.call(this)}function la(){mxEllipse.call(this)}function ra(){mxShape.call(this)} -function Y(){mxShape.call(this)}function da(){mxRectangleShape.call(this)}function pa(){mxShape.call(this)}function wa(){mxShape.call(this)}function Ka(){mxShape.call(this)}function Ha(){mxShape.call(this)}function ua(){mxShape.call(this)}function Ca(){mxCylinder.call(this)}function qa(){mxCylinder.call(this)}function Da(){mxRectangleShape.call(this)}function Ua(){mxDoubleEllipse.call(this)}function db(){mxDoubleEllipse.call(this)}function Ta(){mxArrowConnector.call(this);this.spacing=0}function ab(){mxArrowConnector.call(this); -this.spacing=0}function Ya(){mxActor.call(this)}function Va(){mxRectangleShape.call(this)}function Za(){mxActor.call(this)}function kb(){mxActor.call(this)}function cb(){mxActor.call(this)}function ca(){mxActor.call(this)}function t(){mxActor.call(this)}function z(){mxActor.call(this)}function A(){mxActor.call(this)}function E(){mxActor.call(this)}function H(){mxActor.call(this)}function L(){mxActor.call(this)}function W(){mxEllipse.call(this)}function ia(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)} -function ja(){mxRhombus.call(this)}function ta(){mxEllipse.call(this)}function Aa(){mxEllipse.call(this)}function Ea(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function La(){mxActor.call(this)}function Ia(){mxActor.call(this)}function Fa(){mxActor.call(this)}function Ga(c,h,q,l){mxShape.call(this);this.bounds=c;this.fill=h;this.stroke=q;this.strokewidth=null!=l?l:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Oa(){mxConnector.call(this)} -function Pa(c,h,q,l,p,v,w,I,y,Z){w+=y;var N=l.clone();l.x-=p*(2*w+y);l.y-=v*(2*w+y);p*=w+y;v*=w+y;return function(){c.ellipse(N.x-p-w,N.y-v-w,2*w,2*w);Z?c.fillAndStroke():c.stroke()}}mxUtils.extend(a,mxShape);a.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var h=0;h<this.line.length;h++){var q=this.line[h];null!=q&&(q=new mxRectangle(q.x,q.y,this.strokewidth,this.strokewidth),null==c?c=q:c.add(q))}this.bounds=null!=c?c:new mxRectangle};a.prototype.paintVertexShape=function(c, +this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,P.prototype.arcTo)}function Y(){mxRectangleShape.call(this)}function ja(){mxRectangleShape.call(this)}function fa(){mxActor.call(this)}function ra(){mxActor.call(this)}function K(){mxActor.call(this)}function V(){mxRectangleShape.call(this)}function O(){mxRectangleShape.call(this)}function T(){mxCylinder.call(this)}function J(){mxShape.call(this)}function ba(){mxShape.call(this)}function ha(){mxEllipse.call(this)}function na(){mxShape.call(this)} +function W(){mxShape.call(this)}function da(){mxRectangleShape.call(this)}function sa(){mxShape.call(this)}function ta(){mxShape.call(this)}function Ja(){mxShape.call(this)}function Ha(){mxShape.call(this)}function ua(){mxShape.call(this)}function Aa(){mxCylinder.call(this)}function qa(){mxCylinder.call(this)}function Da(){mxRectangleShape.call(this)}function Ua(){mxDoubleEllipse.call(this)}function db(){mxDoubleEllipse.call(this)}function Ta(){mxArrowConnector.call(this);this.spacing=0}function ab(){mxArrowConnector.call(this); +this.spacing=0}function Ya(){mxActor.call(this)}function Va(){mxRectangleShape.call(this)}function Za(){mxActor.call(this)}function kb(){mxActor.call(this)}function cb(){mxActor.call(this)}function ca(){mxActor.call(this)}function t(){mxActor.call(this)}function z(){mxActor.call(this)}function A(){mxActor.call(this)}function E(){mxActor.call(this)}function G(){mxActor.call(this)}function L(){mxActor.call(this)}function X(){mxEllipse.call(this)}function ia(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)} +function ka(){mxRhombus.call(this)}function va(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function Ea(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function La(){mxActor.call(this)}function Ia(){mxActor.call(this)}function Fa(){mxActor.call(this)}function Ga(c,h,q,l){mxShape.call(this);this.bounds=c;this.fill=h;this.stroke=q;this.strokewidth=null!=l?l:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Oa(){mxConnector.call(this)} +function Pa(c,h,q,l,p,v,w,H,y,Z){w+=y;var M=l.clone();l.x-=p*(2*w+y);l.y-=v*(2*w+y);p*=w+y;v*=w+y;return function(){c.ellipse(M.x-p-w,M.y-v-w,2*w,2*w);Z?c.fillAndStroke():c.stroke()}}mxUtils.extend(a,mxShape);a.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var h=0;h<this.line.length;h++){var q=this.line[h];null!=q&&(q=new mxRectangle(q.x,q.y,this.strokewidth,this.strokewidth),null==c?c=q:c.add(q))}this.bounds=null!=c?c:new mxRectangle};a.prototype.paintVertexShape=function(c, h,q,l,p){this.paintTableLine(c,this.line,0,0)};a.prototype.paintTableLine=function(c,h,q,l){if(null!=h){var p=null;c.begin();for(var v=0;v<h.length;v++){var w=h[v];null!=w&&(null==p?c.moveTo(w.x+q,w.y+l):null!=p&&c.lineTo(w.x+q,w.y+l));p=w}c.end();c.stroke()}};a.prototype.intersectsRectangle=function(c){var h=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var q=null,l=0;l<this.line.length&&!h;l++){var p=this.line[l];null!=p&&null!=q&&(h=mxUtils.rectangleIntersectsSegment(c, -q,p));q=p}return h};mxCellRenderer.registerShape("tableLine",a);mxUtils.extend(b,mxSwimlane);b.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};b.prototype.paintVertexShape=function(c,h,q,l,p){var v=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,w=this.isHorizontal(),I=this.getTitleSize();0==I||this.outline?Ea.prototype.paintVertexShape.apply(this, -arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-h,-q));v||this.outline||!(w&&I<p||!w&&I<l)||this.paintForeground(c,h,q,l,p)};b.prototype.paintForeground=function(c,h,q,l,p){if(null!=this.state){var v=this.flipH,w=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var I=v;v=w;w=I}c.rotate(-this.getShapeRotation(),v,w,h+l/2,q+p/2);s=this.scale;h=this.bounds.x/s;q=this.bounds.y/s;l=this.bounds.width/s;p=this.bounds.height/ +q,p));q=p}return h};mxCellRenderer.registerShape("tableLine",a);mxUtils.extend(b,mxSwimlane);b.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};b.prototype.paintVertexShape=function(c,h,q,l,p){var v=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,w=this.isHorizontal(),H=this.getTitleSize();0==H||this.outline?Ea.prototype.paintVertexShape.apply(this, +arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-h,-q));v||this.outline||!(w&&H<p||!w&&H<l)||this.paintForeground(c,h,q,l,p)};b.prototype.paintForeground=function(c,h,q,l,p){if(null!=this.state){var v=this.flipH,w=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var H=v;v=w;w=H}c.rotate(-this.getShapeRotation(),v,w,h+l/2,q+p/2);s=this.scale;h=this.bounds.x/s;q=this.bounds.y/s;l=this.bounds.width/s;p=this.bounds.height/ s;this.paintTableForeground(c,h,q,l,p)}};b.prototype.paintTableForeground=function(c,h,q,l,p){l=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(p=0;p<l.length;p++)a.prototype.paintTableLine(c,l[p],h,q)};b.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table", -b);mxUtils.extend(f,b);f.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",f);mxUtils.extend(e,mxCylinder);e.prototype.size=20;e.prototype.darkOpacity=0;e.prototype.darkOpacity2=0;e.prototype.paintVertexShape=function(c,h,q,l,p){var v=Math.max(0,Math.min(l,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),w=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),I=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style, -"darkOpacity2",this.darkOpacity2))));c.translate(h,q);c.begin();c.moveTo(0,0);c.lineTo(l-v,0);c.lineTo(l,v);c.lineTo(l,p);c.lineTo(v,p);c.lineTo(0,p-v);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=w&&(c.setFillAlpha(Math.abs(w)),c.setFillColor(0>w?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(l-v,0),c.lineTo(l,v),c.lineTo(v,v),c.close(),c.fill()),0!=I&&(c.setFillAlpha(Math.abs(I)),c.setFillColor(0>I?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(v, +b);mxUtils.extend(f,b);f.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",f);mxUtils.extend(e,mxCylinder);e.prototype.size=20;e.prototype.darkOpacity=0;e.prototype.darkOpacity2=0;e.prototype.paintVertexShape=function(c,h,q,l,p){var v=Math.max(0,Math.min(l,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),w=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),H=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style, +"darkOpacity2",this.darkOpacity2))));c.translate(h,q);c.begin();c.moveTo(0,0);c.lineTo(l-v,0);c.lineTo(l,v);c.lineTo(l,p);c.lineTo(v,p);c.lineTo(0,p-v);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=w&&(c.setFillAlpha(Math.abs(w)),c.setFillColor(0>w?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(l-v,0),c.lineTo(l,v),c.lineTo(v,v),c.close(),c.fill()),0!=H&&(c.setFillAlpha(Math.abs(H)),c.setFillColor(0>H?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(v, v),c.lineTo(v,p),c.lineTo(0,p-v),c.close(),c.fill()),c.begin(),c.moveTo(v,p),c.lineTo(v,v),c.lineTo(0,0),c.moveTo(v,v),c.lineTo(l,v),c.end(),c.stroke())};e.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",e);var Na=Math.tan(mxUtils.toRadians(30)),Sa=(.5-Na)/2;mxCellRenderer.registerShape("isoRectangle",d);mxUtils.extend(g, mxCylinder);g.prototype.size=6;g.prototype.paintVertexShape=function(c,h,q,l,p){c.setFillColor(this.stroke);var v=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(h+.5*(l-v),q+.5*(p-v),v,v);c.fill();c.setFillColor(mxConstants.NONE);c.rect(h,q,l,p);c.fill()};mxCellRenderer.registerShape("waypoint",g);mxUtils.extend(d,mxActor);d.prototype.size=20;d.prototype.redrawPath=function(c,h,q,l,p){h=Math.min(l,p/Na);c.translate((l-h)/2,(p-h)/2+h/4);c.moveTo(0, .25*h);c.lineTo(.5*h,h*Sa);c.lineTo(h,.25*h);c.lineTo(.5*h,(.5-Sa)*h);c.lineTo(0,.25*h);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",d);mxUtils.extend(k,mxCylinder);k.prototype.size=20;k.prototype.redrawPath=function(c,h,q,l,p,v){h=Math.min(l,p/(.5+Na));v?(c.moveTo(0,.25*h),c.lineTo(.5*h,(.5-Sa)*h),c.lineTo(h,.25*h),c.moveTo(.5*h,(.5-Sa)*h),c.lineTo(.5*h,(1-Sa)*h)):(c.translate((l-h)/2,(p-h)/2),c.moveTo(0,.25*h),c.lineTo(.5*h,h*Sa),c.lineTo(h,.25*h),c.lineTo(h,.75*h),c.lineTo(.5* @@ -3238,72 +3236,72 @@ c.end(),c.stroke())};mxCellRenderer.registerShape("note",u);mxUtils.extend(m,u); p,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(h,q);0==v?(c.rect(0,0,l,p),c.fillAndStroke()):(c.begin(),c.moveTo(0,v),c.arcTo(.5*l,v,0,0,1,.5*l,0),c.arcTo(.5*l,v,0,0,1,l,v),c.lineTo(l,p-v),c.arcTo(.5*l,v,0,0,1,.5*l,p),c.arcTo(.5*l,v,0,0,1,0,p-v),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(l,v),c.arcTo(.5*l,v,0,0,1,.5*l,2*v),c.arcTo(.5*l,v,0,0,1,0,v),c.stroke())};mxCellRenderer.registerShape("cylinder2",x);mxUtils.extend(B,mxCylinder);B.prototype.size= 15;B.prototype.paintVertexShape=function(c,h,q,l,p){var v=Math.max(0,Math.min(.5*p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),w=mxUtils.getValue(this.style,"lid",!0);c.translate(h,q);0==v?(c.rect(0,0,l,p),c.fillAndStroke()):(c.begin(),w?(c.moveTo(0,v),c.arcTo(.5*l,v,0,0,1,.5*l,0),c.arcTo(.5*l,v,0,0,1,l,v)):(c.moveTo(0,0),c.arcTo(.5*l,v,0,0,0,.5*l,v),c.arcTo(.5*l,v,0,0,0,l,0)),c.lineTo(l,p-v),c.arcTo(.5*l,v,0,0,1,.5*l,p),c.arcTo(.5*l,v,0,0,1,0,p-v),c.close(),c.fillAndStroke(),c.setShadow(!1), w&&(c.begin(),c.moveTo(l,v),c.arcTo(.5*l,v,0,0,1,.5*l,2*v),c.arcTo(.5*l,v,0,0,1,0,v),c.stroke()))};mxCellRenderer.registerShape("cylinder3",B);mxUtils.extend(D,mxActor);D.prototype.redrawPath=function(c,h,q,l,p){c.moveTo(0,0);c.quadTo(l/2,.5*p,l,0);c.quadTo(.5*l,p/2,l,p);c.quadTo(l/2,.5*p,0,p);c.quadTo(.5*l,p/2,0,0);c.end()};mxCellRenderer.registerShape("switch",D);mxUtils.extend(F,mxCylinder);F.prototype.tabWidth=60;F.prototype.tabHeight=20;F.prototype.tabPosition="right";F.prototype.arcSize=.1; -F.prototype.paintVertexShape=function(c,h,q,l,p){c.translate(h,q);h=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));q=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var v=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),w=mxUtils.getValue(this.style,"rounded",!1),I=mxUtils.getValue(this.style,"absoluteArcSize",!1),y=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));I||(y*=Math.min(l,p)); +F.prototype.paintVertexShape=function(c,h,q,l,p){c.translate(h,q);h=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));q=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var v=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),w=mxUtils.getValue(this.style,"rounded",!1),H=mxUtils.getValue(this.style,"absoluteArcSize",!1),y=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));H||(y*=Math.min(l,p)); y=Math.min(y,.5*l,.5*(p-q));h=Math.max(h,y);h=Math.min(l-y,h);w||(y=0);c.begin();"left"==v?(c.moveTo(Math.max(y,0),q),c.lineTo(Math.max(y,0),0),c.lineTo(h,0),c.lineTo(h,q)):(c.moveTo(l-h,q),c.lineTo(l-h,0),c.lineTo(l-Math.max(y,0),0),c.lineTo(l-Math.max(y,0),q));w?(c.moveTo(0,y+q),c.arcTo(y,y,0,0,1,y,q),c.lineTo(l-y,q),c.arcTo(y,y,0,0,1,l,y+q),c.lineTo(l,p-y),c.arcTo(y,y,0,0,1,l-y,p),c.lineTo(y,p),c.arcTo(y,y,0,0,1,0,p-y)):(c.moveTo(0,q),c.lineTo(l,q),c.lineTo(l,p),c.lineTo(0,p));c.close();c.fillAndStroke(); c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(l-30,q+20),c.lineTo(l-20,q+10),c.lineTo(l-10,q+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",F);F.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var q=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;h=mxUtils.getValue(this.style, "tabHeight",15)*this.scale;var l=mxUtils.getValue(this.style,"rounded",!1),p=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));p||(v*=Math.min(c.width,c.height));v=Math.min(v,.5*c.width,.5*(c.height-h));l||(v=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(v,0,Math.min(c.width,c.width-q),Math.min(c.height,c.height-h)):new mxRectangle(Math.min(c.width,c.width-q),0,v,Math.min(c.height,c.height- -h))}return new mxRectangle(0,Math.min(c.height,h),0,0)}return null};mxUtils.extend(J,mxCylinder);J.prototype.arcSize=.1;J.prototype.paintVertexShape=function(c,h,q,l,p){c.translate(h,q);var v=mxUtils.getValue(this.style,"rounded",!1),w=mxUtils.getValue(this.style,"absoluteArcSize",!1);h=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));q=mxUtils.getValue(this.style,"umlStateConnection",null);w||(h*=Math.min(l,p));h=Math.min(h,.5*l,.5*p);v||(h=0);v=0;null!=q&&(v=10);c.begin();c.moveTo(v, +h))}return new mxRectangle(0,Math.min(c.height,h),0,0)}return null};mxUtils.extend(I,mxCylinder);I.prototype.arcSize=.1;I.prototype.paintVertexShape=function(c,h,q,l,p){c.translate(h,q);var v=mxUtils.getValue(this.style,"rounded",!1),w=mxUtils.getValue(this.style,"absoluteArcSize",!1);h=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));q=mxUtils.getValue(this.style,"umlStateConnection",null);w||(h*=Math.min(l,p));h=Math.min(h,.5*l,.5*p);v||(h=0);v=0;null!=q&&(v=10);c.begin();c.moveTo(v, h);c.arcTo(h,h,0,0,1,v+h,0);c.lineTo(l-h,0);c.arcTo(h,h,0,0,1,l,h);c.lineTo(l,p-h);c.arcTo(h,h,0,0,1,l-h,p);c.lineTo(v+h,p);c.arcTo(h,h,0,0,1,v,p-h);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(l-40,p-20,10,10,3,3),c.stroke(),c.roundrect(l-20,p-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(l-30,p-15),c.lineTo(l-20,p-15),c.stroke());"connPointRefEntry"==q?(c.ellipse(0,.5*p-10,20,20),c.fillAndStroke()):"connPointRefExit"== -q&&(c.ellipse(0,.5*p-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*p-5),c.lineTo(15,.5*p+5),c.moveTo(15,.5*p-5),c.lineTo(5,.5*p+5),c.stroke())};J.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",J);mxUtils.extend(C,mxActor);C.prototype.size=30;C.prototype.isRoundable=function(){return!0};C.prototype.redrawPath= -function(c,h,q,l,p){h=Math.max(0,Math.min(l,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(h,0),new mxPoint(l,0),new mxPoint(l,p),new mxPoint(0,p),new mxPoint(0,h)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("card",C);mxUtils.extend(O,mxActor);O.prototype.size=.4;O.prototype.redrawPath=function(c,h,q,l,p){h=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style, -"size",this.size))));c.moveTo(0,h/2);c.quadTo(l/4,1.4*h,l/2,h/2);c.quadTo(3*l/4,h*(1-1.4),l,h/2);c.lineTo(l,p-h/2);c.quadTo(3*l/4,p-1.4*h,l/2,p-h/2);c.quadTo(l/4,p-h*(1-1.4),0,p-h/2);c.lineTo(0,h/2);c.close();c.end()};O.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"size",this.size),q=c.width,l=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return h*= -l,new mxRectangle(c.x,c.y+h,q,l-2*h);h*=q;return new mxRectangle(c.x+h,c.y,q-2*h,l)}return c};mxCellRenderer.registerShape("tape",O);mxUtils.extend(R,mxActor);R.prototype.size=.3;R.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};R.prototype.redrawPath=function(c,h,q,l,p){h=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0, +q&&(c.ellipse(0,.5*p-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*p-5),c.lineTo(15,.5*p+5),c.moveTo(15,.5*p-5),c.lineTo(5,.5*p+5),c.stroke())};I.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",I);mxUtils.extend(C,mxActor);C.prototype.size=30;C.prototype.isRoundable=function(){return!0};C.prototype.redrawPath= +function(c,h,q,l,p){h=Math.max(0,Math.min(l,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(h,0),new mxPoint(l,0),new mxPoint(l,p),new mxPoint(0,p),new mxPoint(0,h)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("card",C);mxUtils.extend(N,mxActor);N.prototype.size=.4;N.prototype.redrawPath=function(c,h,q,l,p){h=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style, +"size",this.size))));c.moveTo(0,h/2);c.quadTo(l/4,1.4*h,l/2,h/2);c.quadTo(3*l/4,h*(1-1.4),l,h/2);c.lineTo(l,p-h/2);c.quadTo(3*l/4,p-1.4*h,l/2,p-h/2);c.quadTo(l/4,p-h*(1-1.4),0,p-h/2);c.lineTo(0,h/2);c.close();c.end()};N.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"size",this.size),q=c.width,l=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return h*= +l,new mxRectangle(c.x,c.y+h,q,l-2*h);h*=q;return new mxRectangle(c.x+h,c.y,q-2*h,l)}return c};mxCellRenderer.registerShape("tape",N);mxUtils.extend(R,mxActor);R.prototype.size=.3;R.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};R.prototype.redrawPath=function(c,h,q,l,p){h=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0, 0);c.lineTo(l,0);c.lineTo(l,p-h/2);c.quadTo(3*l/4,p-1.4*h,l/2,p-h/2);c.quadTo(l/4,p-h*(1-1.4),0,p-h/2);c.lineTo(0,h/2);c.close();c.end()};mxCellRenderer.registerShape("document",R);var eb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,h,q,l){var p=mxUtils.getValue(this.style,"size");return null!=p?l*Math.max(0,Math.min(1,p)):eb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=2*mxUtils.getValue(this.style, "size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*h),0,0)}return null};B.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(h/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*h*this.scale),0,Math.max(0,.3*h*this.scale))}return null};F.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style, "tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var q=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;h=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var l=mxUtils.getValue(this.style,"rounded",!1),p=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));p||(v*=Math.min(c.width,c.height));v=Math.min(v,.5*c.width,.5*(c.height-h));l||(v=0);return"left"==mxUtils.getValue(this.style,"tabPosition", -this.tabPosition)?new mxRectangle(v,0,Math.min(c.width,c.width-q),Math.min(c.height,c.height-h)):new mxRectangle(Math.min(c.width,c.width-q),0,v,Math.min(c.height,c.height-h))}return new mxRectangle(0,Math.min(c.height,h),0,0)}return null};J.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};m.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style, -"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,h*this.scale),0,Math.max(0,h*this.scale))}return null};mxUtils.extend(T,mxActor);T.prototype.size=.2;T.prototype.fixedSize=20;T.prototype.isRoundable=function(){return!0};T.prototype.redrawPath=function(c,h,q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style, -"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,p),new mxPoint(h,0),new mxPoint(l,0),new mxPoint(l-h,p)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("parallelogram",T);mxUtils.extend(Q,mxActor);Q.prototype.size=.2;Q.prototype.fixedSize=20;Q.prototype.isRoundable=function(){return!0};Q.prototype.redrawPath=function(c,h,q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5* +this.tabPosition)?new mxRectangle(v,0,Math.min(c.width,c.width-q),Math.min(c.height,c.height-h)):new mxRectangle(Math.min(c.width,c.width-q),0,v,Math.min(c.height,c.height-h))}return new mxRectangle(0,Math.min(c.height,h),0,0)}return null};I.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};m.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style, +"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,h*this.scale),0,Math.max(0,h*this.scale))}return null};mxUtils.extend(S,mxActor);S.prototype.size=.2;S.prototype.fixedSize=20;S.prototype.isRoundable=function(){return!0};S.prototype.redrawPath=function(c,h,q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style, +"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,p),new mxPoint(h,0),new mxPoint(l,0),new mxPoint(l-h,p)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("parallelogram",S);mxUtils.extend(Q,mxActor);Q.prototype.size=.2;Q.prototype.fixedSize=20;Q.prototype.isRoundable=function(){return!0};Q.prototype.redrawPath=function(c,h,q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5* l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,p),new mxPoint(h,0),new mxPoint(l-h,0),new mxPoint(l,p)],this.isRounded,q,!0)};mxCellRenderer.registerShape("trapezoid",Q);mxUtils.extend(aa,mxActor);aa.prototype.size=.5;aa.prototype.redrawPath=function(c,h,q,l,p){c.setFillColor(null); -h=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(h,0),new mxPoint(h,p/2),new mxPoint(0,p/2),new mxPoint(h,p/2),new mxPoint(h,p),new mxPoint(l,p)],this.isRounded,q,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",aa);mxUtils.extend(S,mxActor);S.prototype.redrawPath=function(c,h,q,l,p){c.setStrokeWidth(1);c.setFillColor(this.stroke); -h=l/5;c.rect(0,0,h,p);c.fillAndStroke();c.rect(2*h,0,h,p);c.fillAndStroke();c.rect(4*h,0,h,p);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",S);P.prototype.moveTo=function(c,h){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=h;this.firstX=c;this.firstY=h};P.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)}; -P.prototype.quadTo=function(c,h,q,l){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=q;this.lastY=l};P.prototype.curveTo=function(c,h,q,l,p,v){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=p;this.lastY=v};P.prototype.arcTo=function(c,h,q,l,p,v,w){this.originalArcTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=w};P.prototype.lineTo=function(c,h){if(null!=this.lastX&&null!=this.lastY){var q=function(N){return"number"===typeof N?N?0>N?-1:1:N===N?0:NaN:NaN},l=Math.abs(c- -this.lastX),p=Math.abs(h-this.lastY),v=Math.sqrt(l*l+p*p);if(2>v){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=h;return}var w=Math.round(v/10),I=this.defaultVariation;5>w&&(w=5,I/=3);var y=q(c-this.lastX)*l/w;q=q(h-this.lastY)*p/w;l/=v;p/=v;for(v=0;v<w;v++){var Z=(Math.random()-.5)*I;this.originalLineTo.call(this.canvas,y*v+this.lastX-Z*p,q*v+this.lastY-Z*l)}this.originalLineTo.call(this.canvas,c,h)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY= +h=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(h,0),new mxPoint(h,p/2),new mxPoint(0,p/2),new mxPoint(h,p/2),new mxPoint(h,p),new mxPoint(l,p)],this.isRounded,q,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",aa);mxUtils.extend(U,mxActor);U.prototype.redrawPath=function(c,h,q,l,p){c.setStrokeWidth(1);c.setFillColor(this.stroke); +h=l/5;c.rect(0,0,h,p);c.fillAndStroke();c.rect(2*h,0,h,p);c.fillAndStroke();c.rect(4*h,0,h,p);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",U);P.prototype.moveTo=function(c,h){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=h;this.firstX=c;this.firstY=h};P.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)}; +P.prototype.quadTo=function(c,h,q,l){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=q;this.lastY=l};P.prototype.curveTo=function(c,h,q,l,p,v){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=p;this.lastY=v};P.prototype.arcTo=function(c,h,q,l,p,v,w){this.originalArcTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=w};P.prototype.lineTo=function(c,h){if(null!=this.lastX&&null!=this.lastY){var q=function(M){return"number"===typeof M?M?0>M?-1:1:M===M?0:NaN:NaN},l=Math.abs(c- +this.lastX),p=Math.abs(h-this.lastY),v=Math.sqrt(l*l+p*p);if(2>v){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=h;return}var w=Math.round(v/10),H=this.defaultVariation;5>w&&(w=5,H/=3);var y=q(c-this.lastX)*l/w;q=q(h-this.lastY)*p/w;l/=v;p/=v;for(v=0;v<w;v++){var Z=(Math.random()-.5)*H;this.originalLineTo.call(this.canvas,y*v+this.lastX-Z*p,q*v+this.lastY-Z*l)}this.originalLineTo.call(this.canvas,c,h)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY= h};P.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var bb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){bb.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};var pb=mxShape.prototype.afterPaint; mxShape.prototype.afterPaint=function(c){pb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new P(c,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};mxRhombus.prototype.defaultJiggle=2;var vb=mxRectangleShape.prototype.isHtmlAllowed; mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&vb.apply(this,arguments)};var wb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,h,q,l,p){if(null==c.handJiggle||c.handJiggle.constructor!=P)wb.apply(this,arguments);else{var v=!0;null!=this.style&&(v="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS, "1"));if(v||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)v||null!=this.fill&&this.fill!=mxConstants.NONE||(c.pointerEvents=!1),c.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?v=Math.min(l/2,Math.min(p/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,v=Math.min(l* -v,p*v)),c.moveTo(h+v,q),c.lineTo(h+l-v,q),c.quadTo(h+l,q,h+l,q+v),c.lineTo(h+l,q+p-v),c.quadTo(h+l,q+p,h+l-v,q+p),c.lineTo(h+v,q+p),c.quadTo(h,q+p,h,q+p-v),c.lineTo(h,q+v),c.quadTo(h,q,h+v,q)):(c.moveTo(h,q),c.lineTo(h+l,q),c.lineTo(h+l,q+p),c.lineTo(h,q+p),c.lineTo(h,q)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(X,mxRectangleShape);X.prototype.size=.1;X.prototype.fixedSize=!1;X.prototype.isHtmlAllowed=function(){return!1};X.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style, +v,p*v)),c.moveTo(h+v,q),c.lineTo(h+l-v,q),c.quadTo(h+l,q,h+l,q+v),c.lineTo(h+l,q+p-v),c.quadTo(h+l,q+p,h+l-v,q+p),c.lineTo(h+v,q+p),c.quadTo(h,q+p,h,q+p-v),c.lineTo(h,q+v),c.quadTo(h,q,h+v,q)):(c.moveTo(h,q),c.lineTo(h+l,q),c.lineTo(h+l,q+p),c.lineTo(h,q+p),c.lineTo(h,q)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(Y,mxRectangleShape);Y.prototype.size=.1;Y.prototype.fixedSize=!1;Y.prototype.isHtmlAllowed=function(){return!1};Y.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style, mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var h=c.width,q=c.height;c=new mxRectangle(c.x,c.y,h,q);var l=h*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var p=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;l=Math.max(l,Math.min(h*p,q*p))}c.x+=Math.round(l);c.width-=Math.round(2*l);return c}return c}; -X.prototype.paintForeground=function(c,h,q,l,p){var v=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),w=parseFloat(mxUtils.getValue(this.style,"size",this.size));w=v?Math.max(0,Math.min(l,w)):l*Math.max(0,Math.min(1,w));this.isRounded&&(v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,w=Math.max(w,Math.min(l*v,p*v)));w=Math.round(w);c.begin();c.moveTo(h+w,q);c.lineTo(h+w,q+p);c.moveTo(h+l-w,q);c.lineTo(h+l-w,q+p);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this, -arguments)};mxCellRenderer.registerShape("process",X);mxCellRenderer.registerShape("process2",X);mxUtils.extend(ha,mxRectangleShape);ha.prototype.paintBackground=function(c,h,q,l,p){c.setFillColor(mxConstants.NONE);c.rect(h,q,l,p);c.fill()};ha.prototype.paintForeground=function(c,h,q,l,p){};mxCellRenderer.registerShape("transparent",ha);mxUtils.extend(fa,mxHexagon);fa.prototype.size=30;fa.prototype.position=.5;fa.prototype.position2=.5;fa.prototype.base=20;fa.prototype.getLabelMargins=function(){return new mxRectangle(0, +Y.prototype.paintForeground=function(c,h,q,l,p){var v=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),w=parseFloat(mxUtils.getValue(this.style,"size",this.size));w=v?Math.max(0,Math.min(l,w)):l*Math.max(0,Math.min(1,w));this.isRounded&&(v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,w=Math.max(w,Math.min(l*v,p*v)));w=Math.round(w);c.begin();c.moveTo(h+w,q);c.lineTo(h+w,q+p);c.moveTo(h+l-w,q);c.lineTo(h+l-w,q+p);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this, +arguments)};mxCellRenderer.registerShape("process",Y);mxCellRenderer.registerShape("process2",Y);mxUtils.extend(ja,mxRectangleShape);ja.prototype.paintBackground=function(c,h,q,l,p){c.setFillColor(mxConstants.NONE);c.rect(h,q,l,p);c.fill()};ja.prototype.paintForeground=function(c,h,q,l,p){};mxCellRenderer.registerShape("transparent",ja);mxUtils.extend(fa,mxHexagon);fa.prototype.size=30;fa.prototype.position=.5;fa.prototype.position2=.5;fa.prototype.base=20;fa.prototype.getLabelMargins=function(){return new mxRectangle(0, 0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};fa.prototype.isRoundable=function(){return!0};fa.prototype.redrawPath=function(c,h,q,l,p){h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;q=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var v=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),w=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2", -this.position2)))),I=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(l,0),new mxPoint(l,p-q),new mxPoint(Math.min(l,v+I),p-q),new mxPoint(w,p),new mxPoint(Math.max(0,v),p-q),new mxPoint(0,p-q)],this.isRounded,h,!0,[4])};mxCellRenderer.registerShape("callout",fa);mxUtils.extend(sa,mxActor);sa.prototype.size=.2;sa.prototype.fixedSize=20;sa.prototype.isRoundable=function(){return!0};sa.prototype.redrawPath=function(c,h, +this.position2)))),H=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(l,0),new mxPoint(l,p-q),new mxPoint(Math.min(l,v+H),p-q),new mxPoint(w,p),new mxPoint(Math.max(0,v),p-q),new mxPoint(0,p-q)],this.isRounded,h,!0,[4])};mxCellRenderer.registerShape("callout",fa);mxUtils.extend(ra,mxActor);ra.prototype.size=.2;ra.prototype.fixedSize=20;ra.prototype.isRoundable=function(){return!0};ra.prototype.redrawPath=function(c,h, q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(l-h,0),new mxPoint(l,p/2),new mxPoint(l-h,p),new mxPoint(0,p),new mxPoint(h,p/2)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("step", -sa);mxUtils.extend(K,mxHexagon);K.prototype.size=.25;K.prototype.fixedSize=20;K.prototype.isRoundable=function(){return!0};K.prototype.redrawPath=function(c,h,q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(h, +ra);mxUtils.extend(K,mxHexagon);K.prototype.size=.25;K.prototype.fixedSize=20;K.prototype.isRoundable=function(){return!0};K.prototype.redrawPath=function(c,h,q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(h, 0),new mxPoint(l-h,0),new mxPoint(l,.5*p),new mxPoint(l-h,p),new mxPoint(h,p),new mxPoint(0,.5*p)],this.isRounded,q,!0)};mxCellRenderer.registerShape("hexagon",K);mxUtils.extend(V,mxRectangleShape);V.prototype.isHtmlAllowed=function(){return!1};V.prototype.paintForeground=function(c,h,q,l,p){var v=Math.min(l/5,p/5)+1;c.begin();c.moveTo(h+l/2,q+v);c.lineTo(h+l/2,q+p-v);c.moveTo(h+v,q+p/2);c.lineTo(h+l-v,q+p/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus", V);var $a=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var h=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+h,c.y+h,c.width-2*h,c.height-2*h)}return c};mxRhombus.prototype.paintVertexShape=function(c,h,q,l,p){$a.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var v=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]|| -0);h+=v;q+=v;l-=2*v;p-=2*v;0<l&&0<p&&(c.setShadow(!1),$a.apply(this,[c,h,q,l,p]))}};mxUtils.extend(G,mxRectangleShape);G.prototype.isHtmlAllowed=function(){return!1};G.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var h=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+h,c.y+h,c.width-2*h,c.height-2*h)}return c};G.prototype.paintForeground=function(c,h,q,l,p){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var v= -Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);h+=v;q+=v;l-=2*v;p-=2*v;0<l&&0<p&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);v=0;do{var w=mxCellRenderer.defaultShapes[this.style["symbol"+v]];if(null!=w){var I=this.style["symbol"+v+"Align"],y=this.style["symbol"+v+"VerticalAlign"],Z=this.style["symbol"+v+"Width"],N=this.style["symbol"+v+"Height"],Ba=this.style["symbol"+v+"Spacing"]||0,Qa=this.style["symbol"+v+"VSpacing"]||Ba, -Ja=this.style["symbol"+v+"ArcSpacing"];null!=Ja&&(Ja*=this.getArcSize(l+this.strokewidth,p+this.strokewidth),Ba+=Ja,Qa+=Ja);Ja=h;var ka=q;Ja=I==mxConstants.ALIGN_CENTER?Ja+(l-Z)/2:I==mxConstants.ALIGN_RIGHT?Ja+(l-Z-Ba):Ja+Ba;ka=y==mxConstants.ALIGN_MIDDLE?ka+(p-N)/2:y==mxConstants.ALIGN_BOTTOM?ka+(p-N-Qa):ka+Qa;c.save();I=new w;I.style=this.style;w.prototype.paintVertexShape.call(I,c,Ja,ka,Z,N);c.restore()}v++}while(null!=w)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext", -G);mxUtils.extend(M,mxCylinder);M.prototype.redrawPath=function(c,h,q,l,p,v){v?(c.moveTo(0,0),c.lineTo(l/2,p/2),c.lineTo(l,0),c.end()):(c.moveTo(0,0),c.lineTo(l,0),c.lineTo(l,p),c.lineTo(0,p),c.close())};mxCellRenderer.registerShape("message",M);mxUtils.extend(U,mxShape);U.prototype.paintBackground=function(c,h,q,l,p){c.translate(h,q);c.ellipse(l/4,0,l/2,p/4);c.fillAndStroke();c.begin();c.moveTo(l/2,p/4);c.lineTo(l/2,2*p/3);c.moveTo(l/2,p/3);c.lineTo(0,p/3);c.moveTo(l/2,p/3);c.lineTo(l,p/3);c.moveTo(l/ -2,2*p/3);c.lineTo(0,p);c.moveTo(l/2,2*p/3);c.lineTo(l,p);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",U);mxUtils.extend(ba,mxShape);ba.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};ba.prototype.paintBackground=function(c,h,q,l,p){c.translate(h,q);c.begin();c.moveTo(0,p/4);c.lineTo(0,3*p/4);c.end();c.stroke();c.begin();c.moveTo(0,p/2);c.lineTo(l/6,p/2);c.end();c.stroke();c.ellipse(l/6,0,5*l/6,p);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary", -ba);mxUtils.extend(la,mxEllipse);la.prototype.paintVertexShape=function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(h+l/8,q+p);c.lineTo(h+7*l/8,q+p);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",la);mxUtils.extend(ra,mxShape);ra.prototype.paintVertexShape=function(c,h,q,l,p){c.translate(h,q);c.begin();c.moveTo(l,0);c.lineTo(0,p);c.moveTo(0,0);c.lineTo(l,p);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",ra);mxUtils.extend(Y, -mxShape);Y.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};Y.prototype.paintBackground=function(c,h,q,l,p){c.translate(h,q);c.begin();c.moveTo(3*l/8,p/8*1.1);c.lineTo(5*l/8,0);c.end();c.stroke();c.ellipse(0,p/8,l,7*p/8);c.fillAndStroke()};Y.prototype.paintForeground=function(c,h,q,l,p){c.begin();c.moveTo(3*l/8,p/8*1.1);c.lineTo(5*l/8,p/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",Y);mxUtils.extend(da,mxRectangleShape);da.prototype.size= +0);h+=v;q+=v;l-=2*v;p-=2*v;0<l&&0<p&&(c.setShadow(!1),$a.apply(this,[c,h,q,l,p]))}};mxUtils.extend(O,mxRectangleShape);O.prototype.isHtmlAllowed=function(){return!1};O.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var h=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+h,c.y+h,c.width-2*h,c.height-2*h)}return c};O.prototype.paintForeground=function(c,h,q,l,p){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var v= +Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);h+=v;q+=v;l-=2*v;p-=2*v;0<l&&0<p&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);v=0;do{var w=mxCellRenderer.defaultShapes[this.style["symbol"+v]];if(null!=w){var H=this.style["symbol"+v+"Align"],y=this.style["symbol"+v+"VerticalAlign"],Z=this.style["symbol"+v+"Width"],M=this.style["symbol"+v+"Height"],Ca=this.style["symbol"+v+"Spacing"]||0,Qa=this.style["symbol"+v+"VSpacing"]||Ca, +Ka=this.style["symbol"+v+"ArcSpacing"];null!=Ka&&(Ka*=this.getArcSize(l+this.strokewidth,p+this.strokewidth),Ca+=Ka,Qa+=Ka);Ka=h;var la=q;Ka=H==mxConstants.ALIGN_CENTER?Ka+(l-Z)/2:H==mxConstants.ALIGN_RIGHT?Ka+(l-Z-Ca):Ka+Ca;la=y==mxConstants.ALIGN_MIDDLE?la+(p-M)/2:y==mxConstants.ALIGN_BOTTOM?la+(p-M-Qa):la+Qa;c.save();H=new w;H.style=this.style;w.prototype.paintVertexShape.call(H,c,Ka,la,Z,M);c.restore()}v++}while(null!=w)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext", +O);mxUtils.extend(T,mxCylinder);T.prototype.redrawPath=function(c,h,q,l,p,v){v?(c.moveTo(0,0),c.lineTo(l/2,p/2),c.lineTo(l,0),c.end()):(c.moveTo(0,0),c.lineTo(l,0),c.lineTo(l,p),c.lineTo(0,p),c.close())};mxCellRenderer.registerShape("message",T);mxUtils.extend(J,mxShape);J.prototype.paintBackground=function(c,h,q,l,p){c.translate(h,q);c.ellipse(l/4,0,l/2,p/4);c.fillAndStroke();c.begin();c.moveTo(l/2,p/4);c.lineTo(l/2,2*p/3);c.moveTo(l/2,p/3);c.lineTo(0,p/3);c.moveTo(l/2,p/3);c.lineTo(l,p/3);c.moveTo(l/ +2,2*p/3);c.lineTo(0,p);c.moveTo(l/2,2*p/3);c.lineTo(l,p);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",J);mxUtils.extend(ba,mxShape);ba.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};ba.prototype.paintBackground=function(c,h,q,l,p){c.translate(h,q);c.begin();c.moveTo(0,p/4);c.lineTo(0,3*p/4);c.end();c.stroke();c.begin();c.moveTo(0,p/2);c.lineTo(l/6,p/2);c.end();c.stroke();c.ellipse(l/6,0,5*l/6,p);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary", +ba);mxUtils.extend(ha,mxEllipse);ha.prototype.paintVertexShape=function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(h+l/8,q+p);c.lineTo(h+7*l/8,q+p);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",ha);mxUtils.extend(na,mxShape);na.prototype.paintVertexShape=function(c,h,q,l,p){c.translate(h,q);c.begin();c.moveTo(l,0);c.lineTo(0,p);c.moveTo(0,0);c.lineTo(l,p);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",na);mxUtils.extend(W, +mxShape);W.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};W.prototype.paintBackground=function(c,h,q,l,p){c.translate(h,q);c.begin();c.moveTo(3*l/8,p/8*1.1);c.lineTo(5*l/8,0);c.end();c.stroke();c.ellipse(0,p/8,l,7*p/8);c.fillAndStroke()};W.prototype.paintForeground=function(c,h,q,l,p){c.begin();c.moveTo(3*l/8,p/8*1.1);c.lineTo(5*l/8,p/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",W);mxUtils.extend(da,mxRectangleShape);da.prototype.size= 40;da.prototype.isHtmlAllowed=function(){return!1};da.prototype.getLabelBounds=function(c){var h=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,h)};da.prototype.paintBackground=function(c,h,q,l,p){var v=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),w=mxUtils.getValue(this.style,"participant");null==w||null==this.state?mxRectangleShape.prototype.paintBackground.call(this, c,h,q,l,v):(w=this.state.view.graph.cellRenderer.getShape(w),null!=w&&w!=da&&(w=new w,w.apply(this.state),c.save(),w.paintVertexShape(c,h,q,l,v),c.restore()));v<p&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(h+l/2,q+v),c.lineTo(h+l/2,q+p),c.end(),c.stroke())};da.prototype.paintForeground=function(c,h,q,l,p){var v=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,h,q,l, -Math.min(p,v))};mxCellRenderer.registerShape("umlLifeline",da);mxUtils.extend(pa,mxShape);pa.prototype.width=60;pa.prototype.height=30;pa.prototype.corner=10;pa.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};pa.prototype.paintBackground=function(c,h,q,l,p){var v=this.corner,w=Math.min(l,Math.max(v,parseFloat(mxUtils.getValue(this.style, -"width",this.width)))),I=Math.min(p,Math.max(1.5*v,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),y=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);y!=mxConstants.NONE&&(c.setFillColor(y),c.rect(h,q,l,p),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,h,q,l,p),c.setGradient(this.fill,this.gradient,h,q,l,p,this.gradientDirection)):c.setFillColor(this.fill);c.begin(); -c.moveTo(h,q);c.lineTo(h+w,q);c.lineTo(h+w,q+Math.max(0,I-1.5*v));c.lineTo(h+Math.max(0,w-v),q+I);c.lineTo(h,q+I);c.close();c.fillAndStroke();c.begin();c.moveTo(h+w,q);c.lineTo(h+l,q);c.lineTo(h+l,q+p);c.lineTo(h,q+p);c.lineTo(h,q+I);c.stroke()};mxCellRenderer.registerShape("umlFrame",pa);mxPerimeter.CenterPerimeter=function(c,h,q,l){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,h, +Math.min(p,v))};mxCellRenderer.registerShape("umlLifeline",da);mxUtils.extend(sa,mxShape);sa.prototype.width=60;sa.prototype.height=30;sa.prototype.corner=10;sa.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};sa.prototype.paintBackground=function(c,h,q,l,p){var v=this.corner,w=Math.min(l,Math.max(v,parseFloat(mxUtils.getValue(this.style, +"width",this.width)))),H=Math.min(p,Math.max(1.5*v,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),y=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);y!=mxConstants.NONE&&(c.setFillColor(y),c.rect(h,q,l,p),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,h,q,l,p),c.setGradient(this.fill,this.gradient,h,q,l,p,this.gradientDirection)):c.setFillColor(this.fill);c.begin(); +c.moveTo(h,q);c.lineTo(h+w,q);c.lineTo(h+w,q+Math.max(0,H-1.5*v));c.lineTo(h+Math.max(0,w-v),q+H);c.lineTo(h,q+H);c.close();c.fillAndStroke();c.begin();c.moveTo(h+w,q);c.lineTo(h+l,q);c.lineTo(h+l,q+p);c.lineTo(h,q+p);c.lineTo(h,q+H);c.stroke()};mxCellRenderer.registerShape("umlFrame",sa);mxPerimeter.CenterPerimeter=function(c,h,q,l){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,h, q,l){l=da.prototype.size;null!=h&&(l=mxUtils.getValue(h.style,"size",l)*h.view.scale);h=parseFloat(h.style[mxConstants.STYLE_STROKEWIDTH]||1)*h.view.scale/2-1;q.x<c.getCenterX()&&(h=-1*(h+1));return new mxPoint(c.getCenterX()+h,Math.min(c.y+c.height,Math.max(c.y+l,q.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,h,q,l){l=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter", mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(c,h,q,l){l=parseFloat(h.style[mxConstants.STYLE_STROKEWIDTH]||1)*h.view.scale/2-1;null!=h.style.backboneSize&&(l+=parseFloat(h.style.backboneSize)*h.view.scale/2-1);if("south"==h.style[mxConstants.STYLE_DIRECTION]||"north"==h.style[mxConstants.STYLE_DIRECTION])return q.x<c.getCenterX()&&(l=-1*(l+1)),new mxPoint(c.getCenterX()+l,Math.min(c.y+c.height,Math.max(c.y,q.y)));q.y<c.getCenterY()&&(l=-1*(l+1));return new mxPoint(Math.min(c.x+ c.width,Math.max(c.x,q.x)),c.getCenterY()+l)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,h,q,l){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(h.style,"size",fa.prototype.size))*h.view.scale))),h.style),h,q,l)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c, -h,q,l){var p="0"!=mxUtils.getValue(h.style,"fixedSize","0"),v=p?T.prototype.fixedSize:T.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=c.x,I=c.y,y=c.width,Z=c.height;h=null!=h?mxUtils.getValue(h.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;h==mxConstants.DIRECTION_NORTH||h==mxConstants.DIRECTION_SOUTH?(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),I=[new mxPoint(w,I),new mxPoint(w+y,I+p),new mxPoint(w+ -y,I+Z),new mxPoint(w,I+Z-p),new mxPoint(w,I)]):(p=p?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),I=[new mxPoint(w+p,I),new mxPoint(w+y,I),new mxPoint(w+y-p,I+Z),new mxPoint(w,I+Z),new mxPoint(w+p,I)]);Z=c.getCenterX();c=c.getCenterY();c=new mxPoint(Z,c);l&&(q.x<w||q.x>w+y?c.y=q.y:c.x=q.x);return mxUtils.getPerimeterPoint(I,c,q)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,h,q,l){var p="0"!=mxUtils.getValue(h.style, -"fixedSize","0"),v=p?Q.prototype.fixedSize:Q.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=c.x,I=c.y,y=c.width,Z=c.height;h=null!=h?mxUtils.getValue(h.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;h==mxConstants.DIRECTION_EAST?(p=p?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),I=[new mxPoint(w+p,I),new mxPoint(w+y-p,I),new mxPoint(w+y,I+Z),new mxPoint(w,I+Z),new mxPoint(w+p,I)]):h==mxConstants.DIRECTION_WEST? -(p=p?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),I=[new mxPoint(w,I),new mxPoint(w+y,I),new mxPoint(w+y-p,I+Z),new mxPoint(w+p,I+Z),new mxPoint(w,I)]):h==mxConstants.DIRECTION_NORTH?(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),I=[new mxPoint(w,I+p),new mxPoint(w+y,I),new mxPoint(w+y,I+Z),new mxPoint(w,I+Z-p),new mxPoint(w,I+p)]):(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),I=[new mxPoint(w,I),new mxPoint(w+y,I+p),new mxPoint(w+y,I+Z-p),new mxPoint(w,I+Z),new mxPoint(w, -I)]);Z=c.getCenterX();c=c.getCenterY();c=new mxPoint(Z,c);l&&(q.x<w||q.x>w+y?c.y=q.y:c.x=q.x);return mxUtils.getPerimeterPoint(I,c,q)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,h,q,l){var p="0"!=mxUtils.getValue(h.style,"fixedSize","0"),v=p?sa.prototype.fixedSize:sa.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=c.x,I=c.y,y=c.width,Z=c.height,N=c.getCenterX();c=c.getCenterY();h=null!= -h?mxUtils.getValue(h.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;h==mxConstants.DIRECTION_EAST?(p=p?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),I=[new mxPoint(w,I),new mxPoint(w+y-p,I),new mxPoint(w+y,c),new mxPoint(w+y-p,I+Z),new mxPoint(w,I+Z),new mxPoint(w+p,c),new mxPoint(w,I)]):h==mxConstants.DIRECTION_WEST?(p=p?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),I=[new mxPoint(w+p,I),new mxPoint(w+y,I),new mxPoint(w+y-p,c),new mxPoint(w+ -y,I+Z),new mxPoint(w+p,I+Z),new mxPoint(w,c),new mxPoint(w+p,I)]):h==mxConstants.DIRECTION_NORTH?(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),I=[new mxPoint(w,I+p),new mxPoint(N,I),new mxPoint(w+y,I+p),new mxPoint(w+y,I+Z),new mxPoint(N,I+Z-p),new mxPoint(w,I+Z),new mxPoint(w,I+p)]):(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),I=[new mxPoint(w,I),new mxPoint(N,I+p),new mxPoint(w+y,I),new mxPoint(w+y,I+Z-p),new mxPoint(N,I+Z),new mxPoint(w,I+Z-p),new mxPoint(w,I)]);N=new mxPoint(N, -c);l&&(q.x<w||q.x>w+y?N.y=q.y:N.x=q.x);return mxUtils.getPerimeterPoint(I,N,q)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,h,q,l){var p="0"!=mxUtils.getValue(h.style,"fixedSize","0"),v=p?K.prototype.fixedSize:K.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=c.x,I=c.y,y=c.width,Z=c.height,N=c.getCenterX();c=c.getCenterY();h=null!=h?mxUtils.getValue(h.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST): -mxConstants.DIRECTION_EAST;h==mxConstants.DIRECTION_NORTH||h==mxConstants.DIRECTION_SOUTH?(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),I=[new mxPoint(N,I),new mxPoint(w+y,I+p),new mxPoint(w+y,I+Z-p),new mxPoint(N,I+Z),new mxPoint(w,I+Z-p),new mxPoint(w,I+p),new mxPoint(N,I)]):(p=p?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),I=[new mxPoint(w+p,I),new mxPoint(w+y-p,I),new mxPoint(w+y,c),new mxPoint(w+y-p,I+Z),new mxPoint(w+p,I+Z),new mxPoint(w,c),new mxPoint(w+p,I)]);N=new mxPoint(N, -c);l&&(q.x<w||q.x>w+y?N.y=q.y:N.x=q.x);return mxUtils.getPerimeterPoint(I,N,q)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(wa,mxShape);wa.prototype.size=10;wa.prototype.paintBackground=function(c,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size));c.translate(h,q);c.ellipse((l-v)/2,0,v,v);c.fillAndStroke();c.begin();c.moveTo(l/2,v);c.lineTo(l/2,p);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",wa);mxUtils.extend(Ka, -mxShape);Ka.prototype.size=10;Ka.prototype.inset=2;Ka.prototype.paintBackground=function(c,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size)),w=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(h,q);c.begin();c.moveTo(l/2,v+w);c.lineTo(l/2,p);c.end();c.stroke();c.begin();c.moveTo((l-v)/2-w,v/2);c.quadTo((l-v)/2-w,v+w,l/2,v+w);c.quadTo((l+v)/2+w,v+w,(l+v)/2+w,v/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",Ka);mxUtils.extend(Ha, +h,q,l){var p="0"!=mxUtils.getValue(h.style,"fixedSize","0"),v=p?S.prototype.fixedSize:S.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=c.x,H=c.y,y=c.width,Z=c.height;h=null!=h?mxUtils.getValue(h.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;h==mxConstants.DIRECTION_NORTH||h==mxConstants.DIRECTION_SOUTH?(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H),new mxPoint(w+y,H+p),new mxPoint(w+ +y,H+Z),new mxPoint(w,H+Z-p),new mxPoint(w,H)]):(p=p?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w+p,H),new mxPoint(w+y,H),new mxPoint(w+y-p,H+Z),new mxPoint(w,H+Z),new mxPoint(w+p,H)]);Z=c.getCenterX();c=c.getCenterY();c=new mxPoint(Z,c);l&&(q.x<w||q.x>w+y?c.y=q.y:c.x=q.x);return mxUtils.getPerimeterPoint(H,c,q)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,h,q,l){var p="0"!=mxUtils.getValue(h.style, +"fixedSize","0"),v=p?Q.prototype.fixedSize:Q.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=c.x,H=c.y,y=c.width,Z=c.height;h=null!=h?mxUtils.getValue(h.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;h==mxConstants.DIRECTION_EAST?(p=p?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w+p,H),new mxPoint(w+y-p,H),new mxPoint(w+y,H+Z),new mxPoint(w,H+Z),new mxPoint(w+p,H)]):h==mxConstants.DIRECTION_WEST? +(p=p?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H),new mxPoint(w+y,H),new mxPoint(w+y-p,H+Z),new mxPoint(w+p,H+Z),new mxPoint(w,H)]):h==mxConstants.DIRECTION_NORTH?(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H+p),new mxPoint(w+y,H),new mxPoint(w+y,H+Z),new mxPoint(w,H+Z-p),new mxPoint(w,H+p)]):(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H),new mxPoint(w+y,H+p),new mxPoint(w+y,H+Z-p),new mxPoint(w,H+Z),new mxPoint(w, +H)]);Z=c.getCenterX();c=c.getCenterY();c=new mxPoint(Z,c);l&&(q.x<w||q.x>w+y?c.y=q.y:c.x=q.x);return mxUtils.getPerimeterPoint(H,c,q)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,h,q,l){var p="0"!=mxUtils.getValue(h.style,"fixedSize","0"),v=p?ra.prototype.fixedSize:ra.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=c.x,H=c.y,y=c.width,Z=c.height,M=c.getCenterX();c=c.getCenterY();h=null!= +h?mxUtils.getValue(h.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;h==mxConstants.DIRECTION_EAST?(p=p?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H),new mxPoint(w+y-p,H),new mxPoint(w+y,c),new mxPoint(w+y-p,H+Z),new mxPoint(w,H+Z),new mxPoint(w+p,c),new mxPoint(w,H)]):h==mxConstants.DIRECTION_WEST?(p=p?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w+p,H),new mxPoint(w+y,H),new mxPoint(w+y-p,c),new mxPoint(w+ +y,H+Z),new mxPoint(w+p,H+Z),new mxPoint(w,c),new mxPoint(w+p,H)]):h==mxConstants.DIRECTION_NORTH?(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H+p),new mxPoint(M,H),new mxPoint(w+y,H+p),new mxPoint(w+y,H+Z),new mxPoint(M,H+Z-p),new mxPoint(w,H+Z),new mxPoint(w,H+p)]):(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H),new mxPoint(M,H+p),new mxPoint(w+y,H),new mxPoint(w+y,H+Z-p),new mxPoint(M,H+Z),new mxPoint(w,H+Z-p),new mxPoint(w,H)]);M=new mxPoint(M, +c);l&&(q.x<w||q.x>w+y?M.y=q.y:M.x=q.x);return mxUtils.getPerimeterPoint(H,M,q)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,h,q,l){var p="0"!=mxUtils.getValue(h.style,"fixedSize","0"),v=p?K.prototype.fixedSize:K.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=c.x,H=c.y,y=c.width,Z=c.height,M=c.getCenterX();c=c.getCenterY();h=null!=h?mxUtils.getValue(h.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST): +mxConstants.DIRECTION_EAST;h==mxConstants.DIRECTION_NORTH||h==mxConstants.DIRECTION_SOUTH?(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),H=[new mxPoint(M,H),new mxPoint(w+y,H+p),new mxPoint(w+y,H+Z-p),new mxPoint(M,H+Z),new mxPoint(w,H+Z-p),new mxPoint(w,H+p),new mxPoint(M,H)]):(p=p?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w+p,H),new mxPoint(w+y-p,H),new mxPoint(w+y,c),new mxPoint(w+y-p,H+Z),new mxPoint(w+p,H+Z),new mxPoint(w,c),new mxPoint(w+p,H)]);M=new mxPoint(M, +c);l&&(q.x<w||q.x>w+y?M.y=q.y:M.x=q.x);return mxUtils.getPerimeterPoint(H,M,q)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ta,mxShape);ta.prototype.size=10;ta.prototype.paintBackground=function(c,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size));c.translate(h,q);c.ellipse((l-v)/2,0,v,v);c.fillAndStroke();c.begin();c.moveTo(l/2,v);c.lineTo(l/2,p);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",ta);mxUtils.extend(Ja, +mxShape);Ja.prototype.size=10;Ja.prototype.inset=2;Ja.prototype.paintBackground=function(c,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size)),w=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(h,q);c.begin();c.moveTo(l/2,v+w);c.lineTo(l/2,p);c.end();c.stroke();c.begin();c.moveTo((l-v)/2-w,v/2);c.quadTo((l-v)/2-w,v+w,l/2,v+w);c.quadTo((l+v)/2+w,v+w,(l+v)/2+w,v/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",Ja);mxUtils.extend(Ha, mxShape);Ha.prototype.paintBackground=function(c,h,q,l,p){c.translate(h,q);c.begin();c.moveTo(0,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,0,p);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",Ha);mxUtils.extend(ua,mxShape);ua.prototype.inset=2;ua.prototype.paintBackground=function(c,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(h,q);c.ellipse(0,v,l-2*v,p-2*v);c.fillAndStroke();c.begin();c.moveTo(l/2,0);c.quadTo(l,0,l,p/2);c.quadTo(l, -p,l/2,p);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",ua);mxUtils.extend(Ca,mxCylinder);Ca.prototype.jettyWidth=20;Ca.prototype.jettyHeight=10;Ca.prototype.redrawPath=function(c,h,q,l,p,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));h=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));q=w/2;w=q+w/2;var I=Math.min(h,p-h),y=Math.min(I+2*h,p-h);v?(c.moveTo(q,I),c.lineTo(w,I),c.lineTo(w,I+h),c.lineTo(q,I+h),c.moveTo(q, -y),c.lineTo(w,y),c.lineTo(w,y+h),c.lineTo(q,y+h)):(c.moveTo(q,0),c.lineTo(l,0),c.lineTo(l,p),c.lineTo(q,p),c.lineTo(q,y+h),c.lineTo(0,y+h),c.lineTo(0,y),c.lineTo(q,y),c.lineTo(q,I+h),c.lineTo(0,I+h),c.lineTo(0,I),c.lineTo(q,I),c.close());c.end()};mxCellRenderer.registerShape("module",Ca);mxUtils.extend(qa,mxCylinder);qa.prototype.jettyWidth=32;qa.prototype.jettyHeight=12;qa.prototype.redrawPath=function(c,h,q,l,p,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));h=parseFloat(mxUtils.getValue(this.style, -"jettyHeight",this.jettyHeight));q=w/2;w=q+w/2;var I=.3*p-h/2,y=.7*p-h/2;v?(c.moveTo(q,I),c.lineTo(w,I),c.lineTo(w,I+h),c.lineTo(q,I+h),c.moveTo(q,y),c.lineTo(w,y),c.lineTo(w,y+h),c.lineTo(q,y+h)):(c.moveTo(q,0),c.lineTo(l,0),c.lineTo(l,p),c.lineTo(q,p),c.lineTo(q,y+h),c.lineTo(0,y+h),c.lineTo(0,y),c.lineTo(q,y),c.lineTo(q,I+h),c.lineTo(0,I+h),c.lineTo(0,I),c.lineTo(q,I),c.close());c.end()};mxCellRenderer.registerShape("component",qa);mxUtils.extend(Da,mxRectangleShape);Da.prototype.paintForeground= -function(c,h,q,l,p){var v=l/2,w=p/2,I=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(h+v,q),new mxPoint(h+l,q+w),new mxPoint(h+v,q+p),new mxPoint(h,q+w)],this.isRounded,I,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Da);mxUtils.extend(Ua,mxDoubleEllipse);Ua.prototype.outerStroke=!0;Ua.prototype.paintVertexShape=function(c,h,q,l,p){var v=Math.min(4, +p,l/2,p);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",ua);mxUtils.extend(Aa,mxCylinder);Aa.prototype.jettyWidth=20;Aa.prototype.jettyHeight=10;Aa.prototype.redrawPath=function(c,h,q,l,p,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));h=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));q=w/2;w=q+w/2;var H=Math.min(h,p-h),y=Math.min(H+2*h,p-h);v?(c.moveTo(q,H),c.lineTo(w,H),c.lineTo(w,H+h),c.lineTo(q,H+h),c.moveTo(q, +y),c.lineTo(w,y),c.lineTo(w,y+h),c.lineTo(q,y+h)):(c.moveTo(q,0),c.lineTo(l,0),c.lineTo(l,p),c.lineTo(q,p),c.lineTo(q,y+h),c.lineTo(0,y+h),c.lineTo(0,y),c.lineTo(q,y),c.lineTo(q,H+h),c.lineTo(0,H+h),c.lineTo(0,H),c.lineTo(q,H),c.close());c.end()};mxCellRenderer.registerShape("module",Aa);mxUtils.extend(qa,mxCylinder);qa.prototype.jettyWidth=32;qa.prototype.jettyHeight=12;qa.prototype.redrawPath=function(c,h,q,l,p,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));h=parseFloat(mxUtils.getValue(this.style, +"jettyHeight",this.jettyHeight));q=w/2;w=q+w/2;var H=.3*p-h/2,y=.7*p-h/2;v?(c.moveTo(q,H),c.lineTo(w,H),c.lineTo(w,H+h),c.lineTo(q,H+h),c.moveTo(q,y),c.lineTo(w,y),c.lineTo(w,y+h),c.lineTo(q,y+h)):(c.moveTo(q,0),c.lineTo(l,0),c.lineTo(l,p),c.lineTo(q,p),c.lineTo(q,y+h),c.lineTo(0,y+h),c.lineTo(0,y),c.lineTo(q,y),c.lineTo(q,H+h),c.lineTo(0,H+h),c.lineTo(0,H),c.lineTo(q,H),c.close());c.end()};mxCellRenderer.registerShape("component",qa);mxUtils.extend(Da,mxRectangleShape);Da.prototype.paintForeground= +function(c,h,q,l,p){var v=l/2,w=p/2,H=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(h+v,q),new mxPoint(h+l,q+w),new mxPoint(h+v,q+p),new mxPoint(h,q+w)],this.isRounded,H,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Da);mxUtils.extend(Ua,mxDoubleEllipse);Ua.prototype.outerStroke=!0;Ua.prototype.paintVertexShape=function(c,h,q,l,p){var v=Math.min(4, Math.min(l/5,p/5));0<l&&0<p&&(c.ellipse(h+v,q+v,l-2*v,p-2*v),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(h,q,l,p),c.stroke())};mxCellRenderer.registerShape("endState",Ua);mxUtils.extend(db,Ua);db.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",db);mxUtils.extend(Ta,mxArrowConnector);Ta.prototype.defaultWidth=4;Ta.prototype.isOpenEnded=function(){return!0};Ta.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0, this.strokewidth-1)};Ta.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",Ta);mxUtils.extend(ab,mxArrowConnector);ab.prototype.defaultWidth=10;ab.prototype.defaultArrowWidth=20;ab.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};ab.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};ab.prototype.getEdgeWidth= function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",ab);mxUtils.extend(Ya,mxActor);Ya.prototype.size=30;Ya.prototype.isRoundable=function(){return!0};Ya.prototype.redrawPath=function(c,h,q,l,p){h=Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,p),new mxPoint(0,h),new mxPoint(l, @@ -3315,15 +3313,15 @@ mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPo this.arrowWidth))));h=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));q=(p-v)/2;v=q+v;var w=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,q),new mxPoint(l-h,q),new mxPoint(l-h,0),new mxPoint(l,p/2),new mxPoint(l-h,p),new mxPoint(l-h,v),new mxPoint(0,v)],this.isRounded,w,!0);c.end()};mxCellRenderer.registerShape("singleArrow",ca);mxUtils.extend(t,mxActor);t.prototype.redrawPath=function(c, h,q,l,p){var v=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",ca.prototype.arrowWidth))));h=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ca.prototype.arrowSize))));q=(p-v)/2;v=q+v;var w=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,p/2),new mxPoint(h,0),new mxPoint(h,q),new mxPoint(l-h,q),new mxPoint(l-h,0),new mxPoint(l,p/2),new mxPoint(l-h,p),new mxPoint(l-h,v),new mxPoint(h, v),new mxPoint(h,p)],this.isRounded,w,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",t);mxUtils.extend(z,mxActor);z.prototype.size=.1;z.prototype.fixedSize=20;z.prototype.redrawPath=function(c,h,q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(h,0);c.lineTo(l,0);c.quadTo(l-2*h,p/2,l,p);c.lineTo(h,p);c.quadTo(h- -2*h,p/2,h,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",z);mxUtils.extend(A,mxActor);A.prototype.redrawPath=function(c,h,q,l,p){c.moveTo(0,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,0,p);c.close();c.end()};mxCellRenderer.registerShape("or",A);mxUtils.extend(E,mxActor);E.prototype.redrawPath=function(c,h,q,l,p){c.moveTo(0,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,0,p);c.quadTo(l/2,p/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",E);mxUtils.extend(H,mxActor);H.prototype.size=20; -H.prototype.isRoundable=function(){return!0};H.prototype.redrawPath=function(c,h,q,l,p){h=Math.min(l/2,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(h,0),new mxPoint(l-h,0),new mxPoint(l,.8*h),new mxPoint(l,p),new mxPoint(0,p),new mxPoint(0,.8*h)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("loopLimit",H);mxUtils.extend(L,mxActor);L.prototype.size= -.375;L.prototype.isRoundable=function(){return!0};L.prototype.redrawPath=function(c,h,q,l,p){h=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(l,0),new mxPoint(l,p-h),new mxPoint(l/2,p),new mxPoint(0,p-h)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",L);mxUtils.extend(W,mxEllipse);W.prototype.paintVertexShape= -function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(h+l/2,q+p);c.lineTo(h+l,q+p);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",W);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(h,q+p/2);c.lineTo(h+l,q+p/2);c.end();c.stroke();c.begin();c.moveTo(h+l/2,q);c.lineTo(h+l/2,q+p);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse", -ia);mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(h+.145*l,q+.145*p);c.lineTo(h+.855*l,q+.855*p);c.end();c.stroke();c.begin();c.moveTo(h+.855*l,q+.145*p);c.lineTo(h+.145*l,q+.855*p);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",ea);mxUtils.extend(ja,mxRhombus);ja.prototype.paintVertexShape=function(c,h,q,l,p){mxRhombus.prototype.paintVertexShape.apply(this, -arguments);c.setShadow(!1);c.begin();c.moveTo(h,q+p/2);c.lineTo(h+l,q+p/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ja);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(c,h,q,l,p){c.begin();c.moveTo(h,q);c.lineTo(h+l,q);c.lineTo(h+l/2,q+p/2);c.close();c.fillAndStroke();c.begin();c.moveTo(h,q+p);c.lineTo(h+l,q+p);c.lineTo(h+l/2,q+p/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",ta);mxUtils.extend(Aa,mxEllipse);Aa.prototype.paintVertexShape= -function(c,h,q,l,p){var v=c.state.strokeWidth/2,w=10+2*v,I=q+p-w/2;c.begin();c.moveTo(h,q);c.lineTo(h,q+p);c.moveTo(h+v,I);c.lineTo(h+v+w,I-w/2);c.moveTo(h+v,I);c.lineTo(h+v+w,I+w/2);c.moveTo(h+v,I);c.lineTo(h+l-v,I);c.moveTo(h+l,q);c.lineTo(h+l,q+p);c.moveTo(h+l-v,I);c.lineTo(h+l-w-v,I-w/2);c.moveTo(h+l-v,I);c.lineTo(h+l-w-v,I+w/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Aa);mxUtils.extend(Ea,mxEllipse);Ea.prototype.drawHidden=!0;Ea.prototype.paintVertexShape=function(c,h,q, -l,p){this.outline||c.setStrokeColor(null);if(null!=this.style){var v=c.pointerEvents,w=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||w||(c.pointerEvents=!1);var I="1"==mxUtils.getValue(this.style,"top","1"),y="1"==mxUtils.getValue(this.style,"left","1"),Z="1"==mxUtils.getValue(this.style,"right","1"),N="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||w||this.outline||I||Z||N||y?(c.rect(h,q,l,p),c.fill(),c.pointerEvents= -v,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(h,q),this.outline||I?c.lineTo(h+l,q):c.moveTo(h+l,q),this.outline||Z?c.lineTo(h+l,q+p):c.moveTo(h+l,q+p),this.outline||N?c.lineTo(h,q+p):c.moveTo(h,q+p),(this.outline||y)&&c.lineTo(h,q),c.end(),c.stroke(),c.setLineCap("flat")):c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Ea);mxUtils.extend(Ma,mxEllipse);Ma.prototype.paintVertexShape=function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this, +2*h,p/2,h,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",z);mxUtils.extend(A,mxActor);A.prototype.redrawPath=function(c,h,q,l,p){c.moveTo(0,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,0,p);c.close();c.end()};mxCellRenderer.registerShape("or",A);mxUtils.extend(E,mxActor);E.prototype.redrawPath=function(c,h,q,l,p){c.moveTo(0,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,0,p);c.quadTo(l/2,p/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",E);mxUtils.extend(G,mxActor);G.prototype.size=20; +G.prototype.isRoundable=function(){return!0};G.prototype.redrawPath=function(c,h,q,l,p){h=Math.min(l/2,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(h,0),new mxPoint(l-h,0),new mxPoint(l,.8*h),new mxPoint(l,p),new mxPoint(0,p),new mxPoint(0,.8*h)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("loopLimit",G);mxUtils.extend(L,mxActor);L.prototype.size= +.375;L.prototype.isRoundable=function(){return!0};L.prototype.redrawPath=function(c,h,q,l,p){h=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(l,0),new mxPoint(l,p-h),new mxPoint(l/2,p),new mxPoint(0,p-h)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",L);mxUtils.extend(X,mxEllipse);X.prototype.paintVertexShape= +function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(h+l/2,q+p);c.lineTo(h+l,q+p);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",X);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(h,q+p/2);c.lineTo(h+l,q+p/2);c.end();c.stroke();c.begin();c.moveTo(h+l/2,q);c.lineTo(h+l/2,q+p);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse", +ia);mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(h+.145*l,q+.145*p);c.lineTo(h+.855*l,q+.855*p);c.end();c.stroke();c.begin();c.moveTo(h+.855*l,q+.145*p);c.lineTo(h+.145*l,q+.855*p);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",ea);mxUtils.extend(ka,mxRhombus);ka.prototype.paintVertexShape=function(c,h,q,l,p){mxRhombus.prototype.paintVertexShape.apply(this, +arguments);c.setShadow(!1);c.begin();c.moveTo(h,q+p/2);c.lineTo(h+l,q+p/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ka);mxUtils.extend(va,mxEllipse);va.prototype.paintVertexShape=function(c,h,q,l,p){c.begin();c.moveTo(h,q);c.lineTo(h+l,q);c.lineTo(h+l/2,q+p/2);c.close();c.fillAndStroke();c.begin();c.moveTo(h,q+p);c.lineTo(h+l,q+p);c.lineTo(h+l/2,q+p/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",va);mxUtils.extend(Ba,mxEllipse);Ba.prototype.paintVertexShape= +function(c,h,q,l,p){var v=c.state.strokeWidth/2,w=10+2*v,H=q+p-w/2;c.begin();c.moveTo(h,q);c.lineTo(h,q+p);c.moveTo(h+v,H);c.lineTo(h+v+w,H-w/2);c.moveTo(h+v,H);c.lineTo(h+v+w,H+w/2);c.moveTo(h+v,H);c.lineTo(h+l-v,H);c.moveTo(h+l,q);c.lineTo(h+l,q+p);c.moveTo(h+l-v,H);c.lineTo(h+l-w-v,H-w/2);c.moveTo(h+l-v,H);c.lineTo(h+l-w-v,H+w/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Ba);mxUtils.extend(Ea,mxEllipse);Ea.prototype.drawHidden=!0;Ea.prototype.paintVertexShape=function(c,h,q, +l,p){this.outline||c.setStrokeColor(null);if(null!=this.style){var v=c.pointerEvents,w=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||w||(c.pointerEvents=!1);var H="1"==mxUtils.getValue(this.style,"top","1"),y="1"==mxUtils.getValue(this.style,"left","1"),Z="1"==mxUtils.getValue(this.style,"right","1"),M="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||w||this.outline||H||Z||M||y?(c.rect(h,q,l,p),c.fill(),c.pointerEvents= +v,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(h,q),this.outline||H?c.lineTo(h+l,q):c.moveTo(h+l,q),this.outline||Z?c.lineTo(h+l,q+p):c.moveTo(h+l,q+p),this.outline||M?c.lineTo(h,q+p):c.moveTo(h,q+p),(this.outline||y)&&c.lineTo(h,q),c.end(),c.stroke(),c.setLineCap("flat")):c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Ea);mxUtils.extend(Ma,mxEllipse);Ma.prototype.paintVertexShape=function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this, arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(h+l/2,q),c.lineTo(h+l/2,q+p)):(c.moveTo(h,q+p/2),c.lineTo(h+l,q+p/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Ma);mxUtils.extend(La,mxActor);La.prototype.redrawPath=function(c,h,q,l,p){h=Math.min(l,p/2);c.moveTo(0,0);c.lineTo(l-h,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,l-h,p);c.lineTo(0,p);c.close();c.end()};mxCellRenderer.registerShape("delay",La);mxUtils.extend(Ia,mxActor);Ia.prototype.size= .2;Ia.prototype.redrawPath=function(c,h,q,l,p){h=Math.min(p,l);var v=Math.max(0,Math.min(h,h*parseFloat(mxUtils.getValue(this.style,"size",this.size))));h=(p-v)/2;q=h+v;var w=(l-v)/2;v=w+v;c.moveTo(0,h);c.lineTo(w,h);c.lineTo(w,0);c.lineTo(v,0);c.lineTo(v,h);c.lineTo(l,h);c.lineTo(l,q);c.lineTo(v,q);c.lineTo(v,p);c.lineTo(w,p);c.lineTo(w,q);c.lineTo(0,q);c.close();c.end()};mxCellRenderer.registerShape("cross",Ia);mxUtils.extend(Fa,mxActor);Fa.prototype.size=.25;Fa.prototype.redrawPath=function(c, h,q,l,p){h=Math.min(l,p/2);q=Math.min(l-h,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.moveTo(0,p/2);c.lineTo(q,0);c.lineTo(l-h,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,l-h,p);c.lineTo(q,p);c.close();c.end()};mxCellRenderer.registerShape("display",Fa);mxUtils.extend(Ga,mxActor);Ga.prototype.cst={RECT2:"mxgraph.basic.rect"};Ga.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded", @@ -3331,81 +3329,81 @@ dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Ro dispName:"Inside Fill Color",type:"color",defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line", type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"}, {val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default", -enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Ga.prototype.paintVertexShape=function(c,h,q,l,p){c.translate(h,q);this.strictDrawShape(c,0,0,l,p)};Ga.prototype.strictDrawShape=function(c,h,q,l,p,v){var w=v&&v.rectStyle?v.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),I=v&&v.absoluteCornerSize?v.absoluteCornerSize:mxUtils.getValue(this.style, -"absoluteCornerSize",this.absoluteCornerSize),y=v&&v.size?v.size:Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),Z=v&&v.rectOutline?v.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),N=v&&v.indent?v.indent:Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Ba=v&&v.dashed?v.dashed:mxUtils.getValue(this.style,"dashed",!1),Qa=v&&v.dashPattern?v.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),Ja=v&& -v.relIndent?v.relIndent:Math.max(0,Math.min(50,N)),ka=v&&v.top?v.top:mxUtils.getValue(this.style,"top",!0),oa=v&&v.right?v.right:mxUtils.getValue(this.style,"right",!0),na=v&&v.bottom?v.bottom:mxUtils.getValue(this.style,"bottom",!0),ma=v&&v.left?v.left:mxUtils.getValue(this.style,"left",!0),va=v&&v.topLeftStyle?v.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),xa=v&&v.topRightStyle?v.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),ya=v&&v.bottomRightStyle? +enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Ga.prototype.paintVertexShape=function(c,h,q,l,p){c.translate(h,q);this.strictDrawShape(c,0,0,l,p)};Ga.prototype.strictDrawShape=function(c,h,q,l,p,v){var w=v&&v.rectStyle?v.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),H=v&&v.absoluteCornerSize?v.absoluteCornerSize:mxUtils.getValue(this.style, +"absoluteCornerSize",this.absoluteCornerSize),y=v&&v.size?v.size:Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),Z=v&&v.rectOutline?v.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),M=v&&v.indent?v.indent:Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Ca=v&&v.dashed?v.dashed:mxUtils.getValue(this.style,"dashed",!1),Qa=v&&v.dashPattern?v.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),Ka=v&& +v.relIndent?v.relIndent:Math.max(0,Math.min(50,M)),la=v&&v.top?v.top:mxUtils.getValue(this.style,"top",!0),pa=v&&v.right?v.right:mxUtils.getValue(this.style,"right",!0),oa=v&&v.bottom?v.bottom:mxUtils.getValue(this.style,"bottom",!0),ma=v&&v.left?v.left:mxUtils.getValue(this.style,"left",!0),wa=v&&v.topLeftStyle?v.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),xa=v&&v.topRightStyle?v.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),ya=v&&v.bottomRightStyle? v.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),za=v&&v.bottomLeftStyle?v.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Ab=v&&v.fillColor?v.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");v&&v.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Bb=v&&v.strokeWidth?v.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),xb=v&&v.fillColor2?v.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),zb=v&&v.gradientColor2? -v.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Cb=v&&v.gradientDirection2?v.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Db=v&&v.opacity?v.opacity:mxUtils.getValue(this.style,"opacity","100"),Eb=Math.max(0,Math.min(50,y));v=Ga.prototype;c.setDashed(Ba);Qa&&""!=Qa&&c.setDashPattern(Qa);c.setStrokeWidth(Bb);y=Math.min(.5*p,.5*l,y);I||(y=Eb*Math.min(l,p)/100);y=Math.min(y,.5*Math.min(l,p));I||(N=Math.min(Ja*Math.min(l,p)/100));N=Math.min(N,.5*Math.min(l, -p)-y);(ka||oa||na||ma)&&"frame"!=Z&&(c.begin(),ka?v.moveNW(c,h,q,l,p,w,va,y,ma):c.moveTo(0,0),ka&&v.paintNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,oa),oa&&v.paintNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),na&&v.paintSE(c,h,q,l,p,w,ya,y,oa),v.paintBottom(c,h,q,l,p,w,za,y,ma),ma&&v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,ka),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(xb),Ba=I=Db,"none"==xb&&(I=0),"none"==zb&&(Ba=0),c.setGradient(xb,zb,0,0,l,p,Cb,I,Ba), -c.begin(),ka?v.moveNWInner(c,h,q,l,p,w,va,y,N,ka,ma):c.moveTo(N,0),v.paintLeftInner(c,h,q,l,p,w,za,y,N,na,ma),ma&&na&&v.paintSWInner(c,h,q,l,p,w,za,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,oa,na),na&&oa&&v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,ka,oa),oa&&ka&&v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,va,y,N,ma,ka),ka&&ma&&v.paintNWInner(c,h,q,l,p,w,va,y,N),c.fill(),"none"==Ab&&(c.begin(),v.paintFolds(c,h,q,l,p,w,va,xa,ya,za,y,ka,oa,na,ma),c.stroke())); -ka||oa||na||!ma?ka||oa||!na||ma?!ka&&!oa&&na&&ma?"frame"!=Z?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,oa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,ka),"double"==Z&&(v.moveNWInner(c,h,q,l,p,w,va,y,N,ka,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,N,na,ma),v.paintSWInner(c,h,q,l,p,w,za,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,oa,na)),c.stroke()):(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,oa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c, -h,q,l,p,w,va,y,ka),v.lineNWInner(c,h,q,l,p,w,va,y,N,ka,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,N,na,ma),v.paintSWInner(c,h,q,l,p,w,za,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,oa,na),c.close(),c.fillAndStroke()):ka||!oa||na||ma?!ka&&oa&&!na&&ma?"frame"!=Z?(c.begin(),v.moveSW(c,h,q,l,p,w,va,y,na),v.paintLeft(c,h,q,l,p,w,va,y,ka),"double"==Z&&(v.moveNWInner(c,h,q,l,p,w,va,y,N,ka,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,N,na,ma)),c.stroke(),c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l, -p,w,ya,y,na),"double"==Z&&(v.moveSEInner(c,h,q,l,p,w,ya,y,N,na),v.paintRightInner(c,h,q,l,p,w,xa,y,N,ka,oa)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,va,y,na),v.paintLeft(c,h,q,l,p,w,va,y,ka),v.lineNWInner(c,h,q,l,p,w,va,y,N,ka,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,N,na,ma),c.close(),c.fillAndStroke(),c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.lineSEInner(c,h,q,l,p,w,ya,y,N,na),v.paintRightInner(c,h,q,l,p,w,xa,y,N,ka,oa),c.close(),c.fillAndStroke()):!ka&&oa&&na&& -!ma?"frame"!=Z?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,oa),v.paintBottom(c,h,q,l,p,w,za,y,ma),"double"==Z&&(v.moveSWInner(c,h,q,l,p,w,za,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,oa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,ka,oa)),c.stroke()):(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,oa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.lineSWInner(c, -h,q,l,p,w,za,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,oa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,ka,oa),c.close(),c.fillAndStroke()):!ka&&oa&&na&&ma?"frame"!=Z?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,oa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,ka),"double"==Z&&(v.moveNWInner(c,h,q,l,p,w,va,y,N,ka,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,N,na,ma), -v.paintSWInner(c,h,q,l,p,w,za,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,oa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,ka,oa)),c.stroke()):(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,oa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,ka),v.lineNWInner(c,h,q,l,p,w,va,y,N,ka,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,N,na,ma),v.paintSWInner(c,h,q,l,p,w,za,y,N,na), -v.paintBottomInner(c,h,q,l,p,w,ya,y,N,oa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,ka,oa),c.close(),c.fillAndStroke()):!ka||oa||na||ma?ka&&!oa&&!na&&ma?"frame"!=Z?(c.begin(),v.moveSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,ka),v.paintNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,oa),"double"==Z&&(v.moveNEInner(c,h,q,l,p,w,xa,y,N,oa),v.paintTopInner(c,h,q,l,p,w,va,y,N,ma,ka),v.paintNWInner(c,h,q,l,p,w,va,y,N),v.paintLeftInner(c,h,q,l,p,w,za,y,N,na, -ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,ka),v.paintNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,oa),v.lineNEInner(c,h,q,l,p,w,xa,y,N,oa),v.paintTopInner(c,h,q,l,p,w,va,y,N,ma,ka),v.paintNWInner(c,h,q,l,p,w,va,y,N),v.paintLeftInner(c,h,q,l,p,w,za,y,N,na,ma),c.close(),c.fillAndStroke()):ka&&!oa&&na&&!ma?"frame"!=Z?(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,oa),"double"==Z&&(v.moveNEInner(c,h,q,l,p,w,xa,y,N,oa),v.paintTopInner(c, -h,q,l,p,w,va,y,N,ma,ka)),c.stroke(),c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,oa),v.paintBottom(c,h,q,l,p,w,za,y,ma),"double"==Z&&(v.moveSWInner(c,h,q,l,p,w,za,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,oa,na)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,oa),v.lineNEInner(c,h,q,l,p,w,xa,y,N,oa),v.paintTopInner(c,h,q,l,p,w,va,y,N,ma,ka),c.close(),c.fillAndStroke(),c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,oa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.lineSWInner(c,h,q,l,p,w, -za,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,oa,na),c.close(),c.fillAndStroke()):ka&&!oa&&na&&ma?"frame"!=Z?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,oa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,ka),v.paintNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,oa),"double"==Z&&(v.moveNEInner(c,h,q,l,p,w,xa,y,N,oa),v.paintTopInner(c,h,q,l,p,w,va,y,N,ma,ka),v.paintNWInner(c,h,q,l,p,w,va,y,N),v.paintLeftInner(c,h,q,l,p,w,za,y,N,na,ma),v.paintSWInner(c, -h,q,l,p,w,za,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,oa,na)),c.stroke()):(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,oa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,ka),v.paintNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,oa),v.lineNEInner(c,h,q,l,p,w,xa,y,N,oa),v.paintTopInner(c,h,q,l,p,w,va,y,N,ma,ka),v.paintNWInner(c,h,q,l,p,w,va,y,N),v.paintLeftInner(c,h,q,l,p,w,za,y,N,na,ma),v.paintSWInner(c,h,q,l,p,w,za,y,N,na),v.paintBottomInner(c,h,q, -l,p,w,ya,y,N,oa,na),c.close(),c.fillAndStroke()):ka&&oa&&!na&&!ma?"frame"!=Z?(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,oa),v.paintNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),"double"==Z&&(v.moveSEInner(c,h,q,l,p,w,ya,y,N,na),v.paintRightInner(c,h,q,l,p,w,xa,y,N,ka,oa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,va,y,N,ma,ka)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,oa),v.paintNE(c,h,q,l,p,w,xa,y,ka), -v.paintRight(c,h,q,l,p,w,ya,y,na),v.lineSEInner(c,h,q,l,p,w,ya,y,N,na),v.paintRightInner(c,h,q,l,p,w,xa,y,N,ka,oa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,va,y,N,ma,ka),c.close(),c.fillAndStroke()):ka&&oa&&!na&&ma?"frame"!=Z?(c.begin(),v.moveSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,ka),v.paintNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,oa),v.paintNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),"double"==Z&&(v.moveSEInner(c,h,q,l,p,w,ya,y,N,na), -v.paintRightInner(c,h,q,l,p,w,xa,y,N,ka,oa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,va,y,N,ma,ka),v.paintNWInner(c,h,q,l,p,w,va,y,N),v.paintLeftInner(c,h,q,l,p,w,za,y,N,na,ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,ka),v.paintNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,oa),v.paintNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.lineSEInner(c,h,q,l,p,w,ya,y,N,na),v.paintRightInner(c,h,q,l,p,w,xa,y,N,ka,oa),v.paintNEInner(c, -h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,va,y,N,ma,ka),v.paintNWInner(c,h,q,l,p,w,va,y,N),v.paintLeftInner(c,h,q,l,p,w,za,y,N,na,ma),c.close(),c.fillAndStroke()):ka&&oa&&na&&!ma?"frame"!=Z?(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,oa),v.paintNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,oa),v.paintBottom(c,h,q,l,p,w,za,y,ma),"double"==Z&&(v.moveSWInner(c,h,q,l,p,w,za,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,oa,na),v.paintSEInner(c, -h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,ka,oa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,va,y,N,ma,ka)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,oa),v.paintNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,oa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.lineSWInner(c,h,q,l,p,w,za,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,oa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p, -w,xa,y,N,ka,oa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,va,y,N,ma,ka),c.close(),c.fillAndStroke()):ka&&oa&&na&&ma&&("frame"!=Z?(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,oa),v.paintNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,oa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,ka),c.close(),"double"==Z&&(v.moveSWInner(c,h,q,l,p,w,za, -y,N,ma),v.paintSWInner(c,h,q,l,p,w,za,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,oa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,ka,oa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,va,y,N,ma,ka),v.paintNWInner(c,h,q,l,p,w,va,y,N),v.paintLeftInner(c,h,q,l,p,w,za,y,N,na,ma),c.close()),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,oa),v.paintNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q, -l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,oa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,ka),c.close(),v.moveSWInner(c,h,q,l,p,w,za,y,N,ma),v.paintSWInner(c,h,q,l,p,w,za,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,oa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,ka,oa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,va,y,N,ma,ka),v.paintNWInner(c,h,q,l,p,w,va,y,N),v.paintLeftInner(c,h,q,l,p,w,za,y,N, -na,ma),c.close(),c.fillAndStroke())):"frame"!=Z?(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,oa),"double"==Z&&(v.moveNEInner(c,h,q,l,p,w,xa,y,N,oa),v.paintTopInner(c,h,q,l,p,w,va,y,N,ma,ka)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,oa),v.lineNEInner(c,h,q,l,p,w,xa,y,N,oa),v.paintTopInner(c,h,q,l,p,w,va,y,N,ma,ka),c.close(),c.fillAndStroke()):"frame"!=Z?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),"double"== -Z&&(v.moveSEInner(c,h,q,l,p,w,ya,y,N,na),v.paintRightInner(c,h,q,l,p,w,xa,y,N,ka,oa)),c.stroke()):(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.lineSEInner(c,h,q,l,p,w,ya,y,N,na),v.paintRightInner(c,h,q,l,p,w,xa,y,N,ka,oa),c.close(),c.fillAndStroke()):"frame"!=Z?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,oa),v.paintBottom(c,h,q,l,p,w,za,y,ma),"double"==Z&&(v.moveSWInner(c,h,q,l,p,w,za,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,oa,na)),c.stroke()):(c.begin(),v.moveSE(c, -h,q,l,p,w,ya,y,oa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.lineSWInner(c,h,q,l,p,w,za,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,oa,na),c.close(),c.fillAndStroke()):"frame"!=Z?(c.begin(),v.moveSW(c,h,q,l,p,w,va,y,na),v.paintLeft(c,h,q,l,p,w,va,y,ka),"double"==Z&&(v.moveNWInner(c,h,q,l,p,w,va,y,N,ka,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,N,na,ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,va,y,na),v.paintLeft(c,h,q,l,p,w,va,y,ka),v.lineNWInner(c,h,q,l,p,w,va,y,N,ka,ma),v.paintLeftInner(c,h,q,l,p, -w,za,y,N,na,ma),c.close(),c.fillAndStroke());c.begin();v.paintFolds(c,h,q,l,p,w,va,xa,ya,za,y,ka,oa,na,ma);c.stroke()};Ga.prototype.moveNW=function(c,h,q,l,p,v,w,I,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(0,0):c.moveTo(0,I)};Ga.prototype.moveNE=function(c,h,q,l,p,v,w,I,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(l,0):c.moveTo(l-I,0)};Ga.prototype.moveSE=function(c,h,q,l,p,v,w,I,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(l,p):c.moveTo(l,p-I)};Ga.prototype.moveSW= -function(c,h,q,l,p,v,w,I,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(0,p):c.moveTo(I,p)};Ga.prototype.paintNW=function(c,h,q,l,p,v,w,I,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;c.arcTo(I,I,0,0,h,I,0)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(I,0);else c.lineTo(0,0)};Ga.prototype.paintTop=function(c,h,q,l,p,v,w,I,y){"square"==w||"default"== -w&&"square"==v||!y?c.lineTo(l,0):c.lineTo(l-I,0)};Ga.prototype.paintNE=function(c,h,q,l,p,v,w,I,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;c.arcTo(I,I,0,0,h,l,I)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(l,I);else c.lineTo(l,0)};Ga.prototype.paintRight=function(c,h,q,l,p,v,w,I,y){"square"==w||"default"==w&&"square"==v||!y?c.lineTo(l,p):c.lineTo(l,p- -I)};Ga.prototype.paintLeft=function(c,h,q,l,p,v,w,I,y){"square"==w||"default"==w&&"square"==v||!y?c.lineTo(0,0):c.lineTo(0,I)};Ga.prototype.paintSE=function(c,h,q,l,p,v,w,I,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;c.arcTo(I,I,0,0,h,l-I,p)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(l-I,p);else c.lineTo(l,p)};Ga.prototype.paintBottom=function(c,h,q, -l,p,v,w,I,y){"square"==w||"default"==w&&"square"==v||!y?c.lineTo(0,p):c.lineTo(I,p)};Ga.prototype.paintSW=function(c,h,q,l,p,v,w,I,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;c.arcTo(I,I,0,0,h,0,p-I)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(0,p-I);else c.lineTo(0,p)};Ga.prototype.paintNWInner=function(c,h,q,l,p,v,w,I,y){if("rounded"==w||"default"== -w&&"rounded"==v)c.arcTo(I-.5*y,I-.5*y,0,0,0,y,.5*y+I);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(I+y,I+y,0,0,1,y,y+I);else if("snip"==w||"default"==w&&"snip"==v)c.lineTo(y,.5*y+I);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(y+I,y+I),c.lineTo(y,y+I)};Ga.prototype.paintTopInner=function(c,h,q,l,p,v,w,I,y,Z,N){Z||N?!Z&&N?c.lineTo(0,y):Z&&!N?c.lineTo(y,0):Z?"square"==w||"default"==w&&"square"==v?c.lineTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"== -v?c.lineTo(I+.5*y,y):c.lineTo(I+y,y):c.lineTo(0,y):c.lineTo(0,0)};Ga.prototype.paintNEInner=function(c,h,q,l,p,v,w,I,y){if("rounded"==w||"default"==w&&"rounded"==v)c.arcTo(I-.5*y,I-.5*y,0,0,0,l-I-.5*y,y);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(I+y,I+y,0,0,1,l-I-y,y);else if("snip"==w||"default"==w&&"snip"==v)c.lineTo(l-I-.5*y,y);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(l-I-y,I+y),c.lineTo(l-I-y,y)};Ga.prototype.paintRightInner=function(c,h,q,l,p,v,w,I,y,Z,N){Z||N?!Z&& -N?c.lineTo(l-y,0):Z&&!N?c.lineTo(l,y):Z?"square"==w||"default"==w&&"square"==v?c.lineTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(l-y,I+.5*y):c.lineTo(l-y,I+y):c.lineTo(l-y,0):c.lineTo(l,0)};Ga.prototype.paintLeftInner=function(c,h,q,l,p,v,w,I,y,Z,N){Z||N?!Z&&N?c.lineTo(y,p):Z&&!N?c.lineTo(0,p-y):Z?"square"==w||"default"==w&&"square"==v?c.lineTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(y,p-I-.5* -y):c.lineTo(y,p-I-y):c.lineTo(y,p):c.lineTo(0,p)};Ga.prototype.paintSEInner=function(c,h,q,l,p,v,w,I,y){if("rounded"==w||"default"==w&&"rounded"==v)c.arcTo(I-.5*y,I-.5*y,0,0,0,l-y,p-I-.5*y);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(I+y,I+y,0,0,1,l-y,p-I-y);else if("snip"==w||"default"==w&&"snip"==v)c.lineTo(l-y,p-I-.5*y);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(l-I-y,p-I-y),c.lineTo(l-y,p-I-y)};Ga.prototype.paintBottomInner=function(c,h,q,l,p,v,w,I,y,Z,N){Z||N?!Z&&N?c.lineTo(l, -p-y):Z&&!N?c.lineTo(l-y,p):"square"==w||"default"==w&&"square"==v||!Z?c.lineTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(l-I-.5*y,p-y):c.lineTo(l-I-y,p-y):c.lineTo(l,p)};Ga.prototype.paintSWInner=function(c,h,q,l,p,v,w,I,y,Z){if(!Z)c.lineTo(y,p);else if("square"==w||"default"==w&&"square"==v)c.lineTo(y,p-y);else if("rounded"==w||"default"==w&&"rounded"==v)c.arcTo(I-.5*y,I-.5*y,0,0,0,I+.5*y,p-y);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(I+ -y,I+y,0,0,1,I+y,p-y);else if("snip"==w||"default"==w&&"snip"==v)c.lineTo(I+.5*y,p-y);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(y+I,p-I-y),c.lineTo(y+I,p-y)};Ga.prototype.moveSWInner=function(c,h,q,l,p,v,w,I,y,Z){Z?"square"==w||"default"==w&&"square"==v?c.moveTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.moveTo(y,p-I-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(y,p-I-y):c.moveTo(0,p-y)};Ga.prototype.lineSWInner= -function(c,h,q,l,p,v,w,I,y,Z){Z?"square"==w||"default"==w&&"square"==v?c.lineTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(y,p-I-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(y,p-I-y):c.lineTo(0,p-y)};Ga.prototype.moveSEInner=function(c,h,q,l,p,v,w,I,y,Z){Z?"square"==w||"default"==w&&"square"==v?c.moveTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.moveTo(l- -y,p-I-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(l-y,p-I-y):c.moveTo(l-y,p)};Ga.prototype.lineSEInner=function(c,h,q,l,p,v,w,I,y,Z){Z?"square"==w||"default"==w&&"square"==v?c.lineTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(l-y,p-I-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(l-y,p-I-y):c.lineTo(l-y,p)};Ga.prototype.moveNEInner=function(c,h, -q,l,p,v,w,I,y,Z){Z?"square"==w||"default"==w&&"square"==v||Z?c.moveTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.moveTo(l-y,I+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(l-y,I+y):c.moveTo(l,y)};Ga.prototype.lineNEInner=function(c,h,q,l,p,v,w,I,y,Z){Z?"square"==w||"default"==w&&"square"==v||Z?c.lineTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(l-y,I+.5*y): -("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(l-y,I+y):c.lineTo(l,y)};Ga.prototype.moveNWInner=function(c,h,q,l,p,v,w,I,y,Z,N){Z||N?!Z&&N?c.moveTo(y,0):Z&&!N?c.moveTo(0,y):"square"==w||"default"==w&&"square"==v?c.moveTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.moveTo(y,I+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(y,I+y):c.moveTo(0,0)};Ga.prototype.lineNWInner= -function(c,h,q,l,p,v,w,I,y,Z,N){Z||N?!Z&&N?c.lineTo(y,0):Z&&!N?c.lineTo(0,y):"square"==w||"default"==w&&"square"==v?c.lineTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(y,I+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(y,I+y):c.lineTo(0,0)};Ga.prototype.paintFolds=function(c,h,q,l,p,v,w,I,y,Z,N,Ba,Qa,Ja,ka){if("fold"==v||"fold"==w||"fold"==I||"fold"==y||"fold"==Z)("fold"==w||"default"==w&&"fold"==v)&& -Ba&&ka&&(c.moveTo(0,N),c.lineTo(N,N),c.lineTo(N,0)),("fold"==I||"default"==I&&"fold"==v)&&Ba&&Qa&&(c.moveTo(l-N,0),c.lineTo(l-N,N),c.lineTo(l,N)),("fold"==y||"default"==y&&"fold"==v)&&Ja&&Qa&&(c.moveTo(l-N,p),c.lineTo(l-N,p-N),c.lineTo(l,p-N)),("fold"==Z||"default"==Z&&"fold"==v)&&Ja&&ka&&(c.moveTo(0,p-N),c.lineTo(N,p-N),c.lineTo(N,p))};mxCellRenderer.registerShape(Ga.prototype.cst.RECT2,Ga);Ga.prototype.constraints=null;mxUtils.extend(Oa,mxConnector);Oa.prototype.origPaintEdgeShape=Oa.prototype.paintEdgeShape; +v.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Cb=v&&v.gradientDirection2?v.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Db=v&&v.opacity?v.opacity:mxUtils.getValue(this.style,"opacity","100"),Eb=Math.max(0,Math.min(50,y));v=Ga.prototype;c.setDashed(Ca);Qa&&""!=Qa&&c.setDashPattern(Qa);c.setStrokeWidth(Bb);y=Math.min(.5*p,.5*l,y);H||(y=Eb*Math.min(l,p)/100);y=Math.min(y,.5*Math.min(l,p));H||(M=Math.min(Ka*Math.min(l,p)/100));M=Math.min(M,.5*Math.min(l, +p)-y);(la||pa||oa||ma)&&"frame"!=Z&&(c.begin(),la?v.moveNW(c,h,q,l,p,w,wa,y,ma):c.moveTo(0,0),la&&v.paintNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),pa&&v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,oa),oa&&v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),ma&&v.paintSW(c,h,q,l,p,w,za,y,oa),v.paintLeft(c,h,q,l,p,w,wa,y,la),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(xb),Ca=H=Db,"none"==xb&&(H=0),"none"==zb&&(Ca=0),c.setGradient(xb,zb,0,0,l,p,Cb,H,Ca), +c.begin(),la?v.moveNWInner(c,h,q,l,p,w,wa,y,M,la,ma):c.moveTo(M,0),v.paintLeftInner(c,h,q,l,p,w,za,y,M,oa,ma),ma&&oa&&v.paintSWInner(c,h,q,l,p,w,za,y,M,oa),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),oa&&pa&&v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),pa&&la&&v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,la),la&&ma&&v.paintNWInner(c,h,q,l,p,w,wa,y,M),c.fill(),"none"==Ab&&(c.begin(),v.paintFolds(c,h,q,l,p,w,wa,xa,ya,za,y,la,pa,oa,ma),c.stroke())); +la||pa||oa||!ma?la||pa||!oa||ma?!la&&!pa&&oa&&ma?"frame"!=Z?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,oa),v.paintLeft(c,h,q,l,p,w,wa,y,la),"double"==Z&&(v.moveNWInner(c,h,q,l,p,w,wa,y,M,la,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,oa,ma),v.paintSWInner(c,h,q,l,p,w,za,y,M,oa),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa)),c.stroke()):(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,oa),v.paintLeft(c, +h,q,l,p,w,wa,y,la),v.lineNWInner(c,h,q,l,p,w,wa,y,M,la,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,oa,ma),v.paintSWInner(c,h,q,l,p,w,za,y,M,oa),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),c.close(),c.fillAndStroke()):la||!pa||oa||ma?!la&&pa&&!oa&&ma?"frame"!=Z?(c.begin(),v.moveSW(c,h,q,l,p,w,wa,y,oa),v.paintLeft(c,h,q,l,p,w,wa,y,la),"double"==Z&&(v.moveNWInner(c,h,q,l,p,w,wa,y,M,la,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,oa,ma)),c.stroke(),c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l, +p,w,ya,y,oa),"double"==Z&&(v.moveSEInner(c,h,q,l,p,w,ya,y,M,oa),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,wa,y,oa),v.paintLeft(c,h,q,l,p,w,wa,y,la),v.lineNWInner(c,h,q,l,p,w,wa,y,M,la,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,oa,ma),c.close(),c.fillAndStroke(),c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,oa),v.lineSEInner(c,h,q,l,p,w,ya,y,M,oa),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),c.close(),c.fillAndStroke()):!la&&pa&&oa&& +!ma?"frame"!=Z?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,oa),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),"double"==Z&&(v.moveSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa)),c.stroke()):(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,oa),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.lineSWInner(c, +h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),c.close(),c.fillAndStroke()):!la&&pa&&oa&&ma?"frame"!=Z?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,oa),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,oa),v.paintLeft(c,h,q,l,p,w,wa,y,la),"double"==Z&&(v.moveNWInner(c,h,q,l,p,w,wa,y,M,la,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,oa,ma), +v.paintSWInner(c,h,q,l,p,w,za,y,M,oa),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa)),c.stroke()):(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,oa),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,oa),v.paintLeft(c,h,q,l,p,w,wa,y,la),v.lineNWInner(c,h,q,l,p,w,wa,y,M,la,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,oa,ma),v.paintSWInner(c,h,q,l,p,w,za,y,M,oa), +v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),c.close(),c.fillAndStroke()):!la||pa||oa||ma?la&&!pa&&!oa&&ma?"frame"!=Z?(c.begin(),v.moveSW(c,h,q,l,p,w,za,y,oa),v.paintLeft(c,h,q,l,p,w,wa,y,la),v.paintNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Z&&(v.moveNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,la),v.paintNWInner(c,h,q,l,p,w,wa,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,oa, +ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,za,y,oa),v.paintLeft(c,h,q,l,p,w,wa,y,la),v.paintNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,la),v.paintNWInner(c,h,q,l,p,w,wa,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,oa,ma),c.close(),c.fillAndStroke()):la&&!pa&&oa&&!ma?"frame"!=Z?(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Z&&(v.moveNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c, +h,q,l,p,w,wa,y,M,ma,la)),c.stroke(),c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),"double"==Z&&(v.moveSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,la),c.close(),c.fillAndStroke(),c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.lineSWInner(c,h,q,l,p,w, +za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),c.close(),c.fillAndStroke()):la&&!pa&&oa&&ma?"frame"!=Z?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,oa),v.paintLeft(c,h,q,l,p,w,wa,y,la),v.paintNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Z&&(v.moveNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,la),v.paintNWInner(c,h,q,l,p,w,wa,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,oa,ma),v.paintSWInner(c, +h,q,l,p,w,za,y,M,oa),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa)),c.stroke()):(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,oa),v.paintLeft(c,h,q,l,p,w,wa,y,la),v.paintNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,la),v.paintNWInner(c,h,q,l,p,w,wa,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,oa,ma),v.paintSWInner(c,h,q,l,p,w,za,y,M,oa),v.paintBottomInner(c,h,q, +l,p,w,ya,y,M,pa,oa),c.close(),c.fillAndStroke()):la&&pa&&!oa&&!ma?"frame"!=Z?(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,oa),"double"==Z&&(v.moveSEInner(c,h,q,l,p,w,ya,y,M,oa),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,la)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la), +v.paintRight(c,h,q,l,p,w,ya,y,oa),v.lineSEInner(c,h,q,l,p,w,ya,y,M,oa),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,la),c.close(),c.fillAndStroke()):la&&pa&&!oa&&ma?"frame"!=Z?(c.begin(),v.moveSW(c,h,q,l,p,w,za,y,oa),v.paintLeft(c,h,q,l,p,w,wa,y,la),v.paintNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,oa),"double"==Z&&(v.moveSEInner(c,h,q,l,p,w,ya,y,M,oa), +v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,la),v.paintNWInner(c,h,q,l,p,w,wa,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,oa,ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,za,y,oa),v.paintLeft(c,h,q,l,p,w,wa,y,la),v.paintNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,oa),v.lineSEInner(c,h,q,l,p,w,ya,y,M,oa),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c, +h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,la),v.paintNWInner(c,h,q,l,p,w,wa,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,oa,ma),c.close(),c.fillAndStroke()):la&&pa&&oa&&!ma?"frame"!=Z?(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,oa),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),"double"==Z&&(v.moveSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),v.paintSEInner(c, +h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,la)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,oa),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.lineSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p, +w,xa,y,M,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,la),c.close(),c.fillAndStroke()):la&&pa&&oa&&ma&&("frame"!=Z?(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,oa),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,oa),v.paintLeft(c,h,q,l,p,w,wa,y,la),c.close(),"double"==Z&&(v.moveSWInner(c,h,q,l,p,w,za, +y,M,ma),v.paintSWInner(c,h,q,l,p,w,za,y,M,oa),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,la),v.paintNWInner(c,h,q,l,p,w,wa,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,oa,ma),c.close()),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q, +l,p,w,ya,y,oa),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,oa),v.paintLeft(c,h,q,l,p,w,wa,y,la),c.close(),v.moveSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintSWInner(c,h,q,l,p,w,za,y,M,oa),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,la),v.paintNWInner(c,h,q,l,p,w,wa,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M, +oa,ma),c.close(),c.fillAndStroke())):"frame"!=Z?(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Z&&(v.moveNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,la)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,la),c.close(),c.fillAndStroke()):"frame"!=Z?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,oa),"double"== +Z&&(v.moveSEInner(c,h,q,l,p,w,ya,y,M,oa),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa)),c.stroke()):(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,oa),v.lineSEInner(c,h,q,l,p,w,ya,y,M,oa),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),c.close(),c.fillAndStroke()):"frame"!=Z?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),"double"==Z&&(v.moveSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa)),c.stroke()):(c.begin(),v.moveSE(c, +h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.lineSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),c.close(),c.fillAndStroke()):"frame"!=Z?(c.begin(),v.moveSW(c,h,q,l,p,w,wa,y,oa),v.paintLeft(c,h,q,l,p,w,wa,y,la),"double"==Z&&(v.moveNWInner(c,h,q,l,p,w,wa,y,M,la,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,oa,ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,wa,y,oa),v.paintLeft(c,h,q,l,p,w,wa,y,la),v.lineNWInner(c,h,q,l,p,w,wa,y,M,la,ma),v.paintLeftInner(c,h,q,l,p, +w,za,y,M,oa,ma),c.close(),c.fillAndStroke());c.begin();v.paintFolds(c,h,q,l,p,w,wa,xa,ya,za,y,la,pa,oa,ma);c.stroke()};Ga.prototype.moveNW=function(c,h,q,l,p,v,w,H,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(0,0):c.moveTo(0,H)};Ga.prototype.moveNE=function(c,h,q,l,p,v,w,H,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(l,0):c.moveTo(l-H,0)};Ga.prototype.moveSE=function(c,h,q,l,p,v,w,H,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(l,p):c.moveTo(l,p-H)};Ga.prototype.moveSW= +function(c,h,q,l,p,v,w,H,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(0,p):c.moveTo(H,p)};Ga.prototype.paintNW=function(c,h,q,l,p,v,w,H,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;c.arcTo(H,H,0,0,h,H,0)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(H,0);else c.lineTo(0,0)};Ga.prototype.paintTop=function(c,h,q,l,p,v,w,H,y){"square"==w||"default"== +w&&"square"==v||!y?c.lineTo(l,0):c.lineTo(l-H,0)};Ga.prototype.paintNE=function(c,h,q,l,p,v,w,H,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;c.arcTo(H,H,0,0,h,l,H)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(l,H);else c.lineTo(l,0)};Ga.prototype.paintRight=function(c,h,q,l,p,v,w,H,y){"square"==w||"default"==w&&"square"==v||!y?c.lineTo(l,p):c.lineTo(l,p- +H)};Ga.prototype.paintLeft=function(c,h,q,l,p,v,w,H,y){"square"==w||"default"==w&&"square"==v||!y?c.lineTo(0,0):c.lineTo(0,H)};Ga.prototype.paintSE=function(c,h,q,l,p,v,w,H,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;c.arcTo(H,H,0,0,h,l-H,p)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(l-H,p);else c.lineTo(l,p)};Ga.prototype.paintBottom=function(c,h,q, +l,p,v,w,H,y){"square"==w||"default"==w&&"square"==v||!y?c.lineTo(0,p):c.lineTo(H,p)};Ga.prototype.paintSW=function(c,h,q,l,p,v,w,H,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;c.arcTo(H,H,0,0,h,0,p-H)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(0,p-H);else c.lineTo(0,p)};Ga.prototype.paintNWInner=function(c,h,q,l,p,v,w,H,y){if("rounded"==w||"default"== +w&&"rounded"==v)c.arcTo(H-.5*y,H-.5*y,0,0,0,y,.5*y+H);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(H+y,H+y,0,0,1,y,y+H);else if("snip"==w||"default"==w&&"snip"==v)c.lineTo(y,.5*y+H);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(y+H,y+H),c.lineTo(y,y+H)};Ga.prototype.paintTopInner=function(c,h,q,l,p,v,w,H,y,Z,M){Z||M?!Z&&M?c.lineTo(0,y):Z&&!M?c.lineTo(y,0):Z?"square"==w||"default"==w&&"square"==v?c.lineTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"== +v?c.lineTo(H+.5*y,y):c.lineTo(H+y,y):c.lineTo(0,y):c.lineTo(0,0)};Ga.prototype.paintNEInner=function(c,h,q,l,p,v,w,H,y){if("rounded"==w||"default"==w&&"rounded"==v)c.arcTo(H-.5*y,H-.5*y,0,0,0,l-H-.5*y,y);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(H+y,H+y,0,0,1,l-H-y,y);else if("snip"==w||"default"==w&&"snip"==v)c.lineTo(l-H-.5*y,y);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(l-H-y,H+y),c.lineTo(l-H-y,y)};Ga.prototype.paintRightInner=function(c,h,q,l,p,v,w,H,y,Z,M){Z||M?!Z&& +M?c.lineTo(l-y,0):Z&&!M?c.lineTo(l,y):Z?"square"==w||"default"==w&&"square"==v?c.lineTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(l-y,H+.5*y):c.lineTo(l-y,H+y):c.lineTo(l-y,0):c.lineTo(l,0)};Ga.prototype.paintLeftInner=function(c,h,q,l,p,v,w,H,y,Z,M){Z||M?!Z&&M?c.lineTo(y,p):Z&&!M?c.lineTo(0,p-y):Z?"square"==w||"default"==w&&"square"==v?c.lineTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(y,p-H-.5* +y):c.lineTo(y,p-H-y):c.lineTo(y,p):c.lineTo(0,p)};Ga.prototype.paintSEInner=function(c,h,q,l,p,v,w,H,y){if("rounded"==w||"default"==w&&"rounded"==v)c.arcTo(H-.5*y,H-.5*y,0,0,0,l-y,p-H-.5*y);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(H+y,H+y,0,0,1,l-y,p-H-y);else if("snip"==w||"default"==w&&"snip"==v)c.lineTo(l-y,p-H-.5*y);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(l-H-y,p-H-y),c.lineTo(l-y,p-H-y)};Ga.prototype.paintBottomInner=function(c,h,q,l,p,v,w,H,y,Z,M){Z||M?!Z&&M?c.lineTo(l, +p-y):Z&&!M?c.lineTo(l-y,p):"square"==w||"default"==w&&"square"==v||!Z?c.lineTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(l-H-.5*y,p-y):c.lineTo(l-H-y,p-y):c.lineTo(l,p)};Ga.prototype.paintSWInner=function(c,h,q,l,p,v,w,H,y,Z){if(!Z)c.lineTo(y,p);else if("square"==w||"default"==w&&"square"==v)c.lineTo(y,p-y);else if("rounded"==w||"default"==w&&"rounded"==v)c.arcTo(H-.5*y,H-.5*y,0,0,0,H+.5*y,p-y);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(H+ +y,H+y,0,0,1,H+y,p-y);else if("snip"==w||"default"==w&&"snip"==v)c.lineTo(H+.5*y,p-y);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(y+H,p-H-y),c.lineTo(y+H,p-y)};Ga.prototype.moveSWInner=function(c,h,q,l,p,v,w,H,y,Z){Z?"square"==w||"default"==w&&"square"==v?c.moveTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.moveTo(y,p-H-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(y,p-H-y):c.moveTo(0,p-y)};Ga.prototype.lineSWInner= +function(c,h,q,l,p,v,w,H,y,Z){Z?"square"==w||"default"==w&&"square"==v?c.lineTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(y,p-H-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(y,p-H-y):c.lineTo(0,p-y)};Ga.prototype.moveSEInner=function(c,h,q,l,p,v,w,H,y,Z){Z?"square"==w||"default"==w&&"square"==v?c.moveTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.moveTo(l- +y,p-H-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(l-y,p-H-y):c.moveTo(l-y,p)};Ga.prototype.lineSEInner=function(c,h,q,l,p,v,w,H,y,Z){Z?"square"==w||"default"==w&&"square"==v?c.lineTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(l-y,p-H-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(l-y,p-H-y):c.lineTo(l-y,p)};Ga.prototype.moveNEInner=function(c,h, +q,l,p,v,w,H,y,Z){Z?"square"==w||"default"==w&&"square"==v||Z?c.moveTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.moveTo(l-y,H+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(l-y,H+y):c.moveTo(l,y)};Ga.prototype.lineNEInner=function(c,h,q,l,p,v,w,H,y,Z){Z?"square"==w||"default"==w&&"square"==v||Z?c.lineTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(l-y,H+.5*y): +("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(l-y,H+y):c.lineTo(l,y)};Ga.prototype.moveNWInner=function(c,h,q,l,p,v,w,H,y,Z,M){Z||M?!Z&&M?c.moveTo(y,0):Z&&!M?c.moveTo(0,y):"square"==w||"default"==w&&"square"==v?c.moveTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.moveTo(y,H+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(y,H+y):c.moveTo(0,0)};Ga.prototype.lineNWInner= +function(c,h,q,l,p,v,w,H,y,Z,M){Z||M?!Z&&M?c.lineTo(y,0):Z&&!M?c.lineTo(0,y):"square"==w||"default"==w&&"square"==v?c.lineTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(y,H+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(y,H+y):c.lineTo(0,0)};Ga.prototype.paintFolds=function(c,h,q,l,p,v,w,H,y,Z,M,Ca,Qa,Ka,la){if("fold"==v||"fold"==w||"fold"==H||"fold"==y||"fold"==Z)("fold"==w||"default"==w&&"fold"==v)&& +Ca&&la&&(c.moveTo(0,M),c.lineTo(M,M),c.lineTo(M,0)),("fold"==H||"default"==H&&"fold"==v)&&Ca&&Qa&&(c.moveTo(l-M,0),c.lineTo(l-M,M),c.lineTo(l,M)),("fold"==y||"default"==y&&"fold"==v)&&Ka&&Qa&&(c.moveTo(l-M,p),c.lineTo(l-M,p-M),c.lineTo(l,p-M)),("fold"==Z||"default"==Z&&"fold"==v)&&Ka&&la&&(c.moveTo(0,p-M),c.lineTo(M,p-M),c.lineTo(M,p))};mxCellRenderer.registerShape(Ga.prototype.cst.RECT2,Ga);Ga.prototype.constraints=null;mxUtils.extend(Oa,mxConnector);Oa.prototype.origPaintEdgeShape=Oa.prototype.paintEdgeShape; Oa.prototype.paintEdgeShape=function(c,h,q){for(var l=[],p=0;p<h.length;p++)l.push(mxUtils.clone(h[p]));p=c.state.dashed;var v=c.state.fixDash;Oa.prototype.origPaintEdgeShape.apply(this,[c,l,q]);3<=c.state.strokeWidth&&(l=mxUtils.getValue(this.style,"fillColor",null),null!=l&&(c.setStrokeColor(l),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(p,v),Oa.prototype.origPaintEdgeShape.apply(this,[c,h,q])))};mxCellRenderer.registerShape("filledEdge",Oa);"undefined"!==typeof StyleFormatPanel&&function(){var c= -StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var h=this.editorUi.getSelectionState(),q=c.apply(this,arguments);"umlFrame"==h.style.shape&&q.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return q}}();mxMarker.addMarker("dash",function(c,h,q,l,p,v,w,I,y,Z){var N=p*(w+y+1),Ba=v*(w+y+1);return function(){c.begin();c.moveTo(l.x-N/2-Ba/2,l.y-Ba/2+N/2);c.lineTo(l.x+Ba/2-3*N/2,l.y-3*Ba/2-N/2);c.stroke()}});mxMarker.addMarker("box", -function(c,h,q,l,p,v,w,I,y,Z){var N=p*(w+y+1),Ba=v*(w+y+1),Qa=l.x+N/2,Ja=l.y+Ba/2;l.x-=N;l.y-=Ba;return function(){c.begin();c.moveTo(Qa-N/2-Ba/2,Ja-Ba/2+N/2);c.lineTo(Qa-N/2+Ba/2,Ja-Ba/2-N/2);c.lineTo(Qa+Ba/2-3*N/2,Ja-3*Ba/2-N/2);c.lineTo(Qa-Ba/2-3*N/2,Ja-3*Ba/2+N/2);c.close();Z?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,h,q,l,p,v,w,I,y,Z){var N=p*(w+y+1),Ba=v*(w+y+1);return function(){c.begin();c.moveTo(l.x-N/2-Ba/2,l.y-Ba/2+N/2);c.lineTo(l.x+Ba/2-3*N/2,l.y-3*Ba/2-N/2); -c.moveTo(l.x-N/2+Ba/2,l.y-Ba/2-N/2);c.lineTo(l.x-Ba/2-3*N/2,l.y-3*Ba/2+N/2);c.stroke()}});mxMarker.addMarker("circle",Pa);mxMarker.addMarker("circlePlus",function(c,h,q,l,p,v,w,I,y,Z){var N=l.clone(),Ba=Pa.apply(this,arguments),Qa=p*(w+2*y),Ja=v*(w+2*y);return function(){Ba.apply(this,arguments);c.begin();c.moveTo(N.x-p*y,N.y-v*y);c.lineTo(N.x-2*Qa+p*y,N.y-2*Ja+v*y);c.moveTo(N.x-Qa-Ja+v*y,N.y-Ja+Qa-p*y);c.lineTo(N.x+Ja-Qa-v*y,N.y-Ja-Qa+p*y);c.stroke()}});mxMarker.addMarker("halfCircle",function(c, -h,q,l,p,v,w,I,y,Z){var N=p*(w+y+1),Ba=v*(w+y+1),Qa=l.clone();l.x-=N;l.y-=Ba;return function(){c.begin();c.moveTo(Qa.x-Ba,Qa.y+N);c.quadTo(l.x-Ba,l.y+N,l.x,l.y);c.quadTo(l.x+Ba,l.y-N,Qa.x+Ba,Qa.y-N);c.stroke()}});mxMarker.addMarker("async",function(c,h,q,l,p,v,w,I,y,Z){h=p*y*1.118;q=v*y*1.118;p*=w+y;v*=w+y;var N=l.clone();N.x-=h;N.y-=q;l.x+=-p-h;l.y+=-v-q;return function(){c.begin();c.moveTo(N.x,N.y);I?c.lineTo(N.x-p-v/2,N.y-v+p/2):c.lineTo(N.x+v/2-p,N.y-v-p/2);c.lineTo(N.x-p,N.y-v);c.close();Z?c.fillAndStroke(): -c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(h,q,l,p,v,w,I,y,Z,N){v*=I+Z;w*=I+Z;var Ba=p.clone();return function(){h.begin();h.moveTo(Ba.x,Ba.y);y?h.lineTo(Ba.x-v-w/c,Ba.y-w+v/c):h.lineTo(Ba.x+w/c-v,Ba.y-w-v/c);h.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var lb=function(c,h,q){return Wa(c,["width"],h,function(l,p,v,w,I){I=c.shape.getEdgeWidth()*c.view.scale+q;return new mxPoint(w.x+p*l/4+v*I/2,w.y+v*l/4-p*I/2)},function(l,p,v,w,I,y){l=Math.sqrt(mxUtils.ptSegDistSq(w.x, -w.y,I.x,I.y,y.x,y.y));c.style.width=Math.round(2*l)/c.view.scale-q})},Wa=function(c,h,q,l,p){return Ra(c,h,function(v){var w=c.absolutePoints,I=w.length-1;v=c.view.translate;var y=c.view.scale,Z=q?w[0]:w[I];w=q?w[1]:w[I-1];I=w.x-Z.x;var N=w.y-Z.y,Ba=Math.sqrt(I*I+N*N);Z=l.call(this,Ba,I/Ba,N/Ba,Z,w);return new mxPoint(Z.x/y-v.x,Z.y/y-v.y)},function(v,w,I){var y=c.absolutePoints,Z=y.length-1;v=c.view.translate;var N=c.view.scale,Ba=q?y[0]:y[Z];y=q?y[1]:y[Z-1];Z=y.x-Ba.x;var Qa=y.y-Ba.y,Ja=Math.sqrt(Z* -Z+Qa*Qa);w.x=(w.x+v.x)*N;w.y=(w.y+v.y)*N;p.call(this,Ja,Z/Ja,Qa/Ja,Ba,y,w,I)})},gb=function(c,h){return function(q){return[Wa(q,["startWidth"],!0,function(l,p,v,w,I){I=mxUtils.getNumber(q.style,"startWidth",c)*q.view.scale+h;return new mxPoint(w.x+p*l/4+v*I/2,w.y+v*l/4-p*I/2)},function(l,p,v,w,I,y){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,I.x,I.y,y.x,y.y));q.style.startWidth=Math.round(2*l)/q.view.scale-h})]}},hb=function(c){return function(h){return[Ra(h,["arrowWidth","arrowSize"],function(q){var l= +StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var h=this.editorUi.getSelectionState(),q=c.apply(this,arguments);"umlFrame"==h.style.shape&&q.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return q}}();mxMarker.addMarker("dash",function(c,h,q,l,p,v,w,H,y,Z){var M=p*(w+y+1),Ca=v*(w+y+1);return function(){c.begin();c.moveTo(l.x-M/2-Ca/2,l.y-Ca/2+M/2);c.lineTo(l.x+Ca/2-3*M/2,l.y-3*Ca/2-M/2);c.stroke()}});mxMarker.addMarker("box", +function(c,h,q,l,p,v,w,H,y,Z){var M=p*(w+y+1),Ca=v*(w+y+1),Qa=l.x+M/2,Ka=l.y+Ca/2;l.x-=M;l.y-=Ca;return function(){c.begin();c.moveTo(Qa-M/2-Ca/2,Ka-Ca/2+M/2);c.lineTo(Qa-M/2+Ca/2,Ka-Ca/2-M/2);c.lineTo(Qa+Ca/2-3*M/2,Ka-3*Ca/2-M/2);c.lineTo(Qa-Ca/2-3*M/2,Ka-3*Ca/2+M/2);c.close();Z?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,h,q,l,p,v,w,H,y,Z){var M=p*(w+y+1),Ca=v*(w+y+1);return function(){c.begin();c.moveTo(l.x-M/2-Ca/2,l.y-Ca/2+M/2);c.lineTo(l.x+Ca/2-3*M/2,l.y-3*Ca/2-M/2); +c.moveTo(l.x-M/2+Ca/2,l.y-Ca/2-M/2);c.lineTo(l.x-Ca/2-3*M/2,l.y-3*Ca/2+M/2);c.stroke()}});mxMarker.addMarker("circle",Pa);mxMarker.addMarker("circlePlus",function(c,h,q,l,p,v,w,H,y,Z){var M=l.clone(),Ca=Pa.apply(this,arguments),Qa=p*(w+2*y),Ka=v*(w+2*y);return function(){Ca.apply(this,arguments);c.begin();c.moveTo(M.x-p*y,M.y-v*y);c.lineTo(M.x-2*Qa+p*y,M.y-2*Ka+v*y);c.moveTo(M.x-Qa-Ka+v*y,M.y-Ka+Qa-p*y);c.lineTo(M.x+Ka-Qa-v*y,M.y-Ka-Qa+p*y);c.stroke()}});mxMarker.addMarker("halfCircle",function(c, +h,q,l,p,v,w,H,y,Z){var M=p*(w+y+1),Ca=v*(w+y+1),Qa=l.clone();l.x-=M;l.y-=Ca;return function(){c.begin();c.moveTo(Qa.x-Ca,Qa.y+M);c.quadTo(l.x-Ca,l.y+M,l.x,l.y);c.quadTo(l.x+Ca,l.y-M,Qa.x+Ca,Qa.y-M);c.stroke()}});mxMarker.addMarker("async",function(c,h,q,l,p,v,w,H,y,Z){h=p*y*1.118;q=v*y*1.118;p*=w+y;v*=w+y;var M=l.clone();M.x-=h;M.y-=q;l.x+=-p-h;l.y+=-v-q;return function(){c.begin();c.moveTo(M.x,M.y);H?c.lineTo(M.x-p-v/2,M.y-v+p/2):c.lineTo(M.x+v/2-p,M.y-v-p/2);c.lineTo(M.x-p,M.y-v);c.close();Z?c.fillAndStroke(): +c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(h,q,l,p,v,w,H,y,Z,M){v*=H+Z;w*=H+Z;var Ca=p.clone();return function(){h.begin();h.moveTo(Ca.x,Ca.y);y?h.lineTo(Ca.x-v-w/c,Ca.y-w+v/c):h.lineTo(Ca.x+w/c-v,Ca.y-w-v/c);h.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var lb=function(c,h,q){return Wa(c,["width"],h,function(l,p,v,w,H){H=c.shape.getEdgeWidth()*c.view.scale+q;return new mxPoint(w.x+p*l/4+v*H/2,w.y+v*l/4-p*H/2)},function(l,p,v,w,H,y){l=Math.sqrt(mxUtils.ptSegDistSq(w.x, +w.y,H.x,H.y,y.x,y.y));c.style.width=Math.round(2*l)/c.view.scale-q})},Wa=function(c,h,q,l,p){return Ra(c,h,function(v){var w=c.absolutePoints,H=w.length-1;v=c.view.translate;var y=c.view.scale,Z=q?w[0]:w[H];w=q?w[1]:w[H-1];H=w.x-Z.x;var M=w.y-Z.y,Ca=Math.sqrt(H*H+M*M);Z=l.call(this,Ca,H/Ca,M/Ca,Z,w);return new mxPoint(Z.x/y-v.x,Z.y/y-v.y)},function(v,w,H){var y=c.absolutePoints,Z=y.length-1;v=c.view.translate;var M=c.view.scale,Ca=q?y[0]:y[Z];y=q?y[1]:y[Z-1];Z=y.x-Ca.x;var Qa=y.y-Ca.y,Ka=Math.sqrt(Z* +Z+Qa*Qa);w.x=(w.x+v.x)*M;w.y=(w.y+v.y)*M;p.call(this,Ka,Z/Ka,Qa/Ka,Ca,y,w,H)})},gb=function(c,h){return function(q){return[Wa(q,["startWidth"],!0,function(l,p,v,w,H){H=mxUtils.getNumber(q.style,"startWidth",c)*q.view.scale+h;return new mxPoint(w.x+p*l/4+v*H/2,w.y+v*l/4-p*H/2)},function(l,p,v,w,H,y){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,H.x,H.y,y.x,y.y));q.style.startWidth=Math.round(2*l)/q.view.scale-h})]}},hb=function(c){return function(h){return[Ra(h,["arrowWidth","arrowSize"],function(q){var l= Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",ca.prototype.arrowWidth))),p=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",ca.prototype.arrowSize)));return new mxPoint(q.x+(1-p)*q.width,q.y+(1-l)*q.height/2)},function(q,l){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(q.y+q.height/2-l.y)/q.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(q.x+q.width-l.x)/q.width))})]}},Xa=function(c){return function(h){return[Ra(h,["size"],function(q){var l= Math.max(0,Math.min(.5*q.height,parseFloat(mxUtils.getValue(this.state.style,"size",c))));return new mxPoint(q.x,q.y+l)},function(q,l){this.state.style.size=Math.max(0,l.y-q.y)},!0)]}},sb=function(c,h,q){return function(l){var p=[Ra(l,["size"],function(v){var w=Math.max(0,Math.min(v.width,Math.min(v.height,parseFloat(mxUtils.getValue(this.state.style,"size",h)))))*c;return new mxPoint(v.x+w,v.y+w)},function(v,w){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(v.width,w.x-v.x),Math.min(v.height, -w.y-v.y)))/c)},!1)];q&&mxUtils.getValue(l.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(fb(l));return p}},qb=function(c,h,q,l,p){q=null!=q?q:.5;return function(v){var w=[Ra(v,["size"],function(I){var y=null!=p?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,Z=parseFloat(mxUtils.getValue(this.state.style,"size",y?p:c));return new mxPoint(I.x+Math.max(0,Math.min(.5*I.width,Z*(y?1:I.width))),I.getCenterY())},function(I,y,Z){I=null!=p&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")? -y.x-I.x:Math.max(0,Math.min(q,(y.x-I.x)/I.width));this.state.style.size=I},!1,l)];h&&mxUtils.getValue(v.style,mxConstants.STYLE_ROUNDED,!1)&&w.push(fb(v));return w}},ub=function(c,h,q){c=null!=c?c:.5;return function(l){var p=[Ra(l,["size"],function(v){var w=null!=q?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,I=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",w?q:h)));return new mxPoint(v.x+Math.min(.75*v.width*c,I*(w?.75:.75*v.width)),v.y+v.height/4)},function(v,w){v= +w.y-v.y)))/c)},!1)];q&&mxUtils.getValue(l.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(fb(l));return p}},qb=function(c,h,q,l,p){q=null!=q?q:.5;return function(v){var w=[Ra(v,["size"],function(H){var y=null!=p?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,Z=parseFloat(mxUtils.getValue(this.state.style,"size",y?p:c));return new mxPoint(H.x+Math.max(0,Math.min(.5*H.width,Z*(y?1:H.width))),H.getCenterY())},function(H,y,Z){H=null!=p&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")? +y.x-H.x:Math.max(0,Math.min(q,(y.x-H.x)/H.width));this.state.style.size=H},!1,l)];h&&mxUtils.getValue(v.style,mxConstants.STYLE_ROUNDED,!1)&&w.push(fb(v));return w}},ub=function(c,h,q){c=null!=c?c:.5;return function(l){var p=[Ra(l,["size"],function(v){var w=null!=q?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,H=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",w?q:h)));return new mxPoint(v.x+Math.min(.75*v.width*c,H*(w?.75:.75*v.width)),v.y+v.height/4)},function(v,w){v= null!=q&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?w.x-v.x:Math.max(0,Math.min(c,(w.x-v.x)/v.width*.75));this.state.style.size=v},!1,!0)];mxUtils.getValue(l.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(fb(l));return p}},nb=function(){return function(c){var h=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(fb(c));return h}},fb=function(c,h){return Ra(c,[mxConstants.STYLE_ARCSIZE],function(q){var l=null!=h?h:q.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE, 0)){var p=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(q.x+q.width-Math.min(q.width/2,p),q.y+l)}p=Math.max(0,parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(q.x+q.width-Math.min(Math.max(q.width/2,q.height/2),Math.min(q.width,q.height)*p),q.y+l)},function(q,l,p){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]= -Math.round(Math.max(0,Math.min(q.width,2*(q.x+q.width-l.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(q.width-l.x+q.x)/Math.min(q.width,q.height))))})},Ra=function(c,h,q,l,p,v,w){var I=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);I.execute=function(Z){for(var N=0;N<h.length;N++)this.copyStyle(h[N]);w&&w(Z)};I.getPosition=q;I.setPosition=l;I.ignoreGrid=null!=p?p:!0;if(v){var y=I.positionChanged;I.positionChanged=function(){y.apply(this, -arguments);c.view.invalidate(this.state.cell);c.view.validate()}}return I},rb={link:function(c){return[lb(c,!0,10),lb(c,!1,10)]},flexArrow:function(c){var h=c.view.graph.gridSize/c.view.scale,q=[];mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(q.push(Wa(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(l,p,v,w,I){l=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;I=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE, -mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(w.x+p*(I+c.shape.strokewidth*c.view.scale)+v*l/2,w.y+v*(I+c.shape.strokewidth*c.view.scale)-p*l/2)},function(l,p,v,w,I,y,Z){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,I.x,I.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(p-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*l)/c.view.scale;if(mxEvent.isShiftDown(Z.getEvent())||mxEvent.isControlDown(Z.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]= -c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(Z.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<h/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),q.push(Wa(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(l,p,v,w,I){l=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;I=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/ -5)*c.view.scale;return new mxPoint(w.x+p*(I+c.shape.strokewidth*c.view.scale)+v*l/2,w.y+v*(I+c.shape.strokewidth*c.view.scale)-p*l/2)},function(l,p,v,w,I,y,Z){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,I.x,I.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(p-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*l)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(Z.getEvent())||mxEvent.isControlDown(Z.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]= +Math.round(Math.max(0,Math.min(q.width,2*(q.x+q.width-l.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(q.width-l.x+q.x)/Math.min(q.width,q.height))))})},Ra=function(c,h,q,l,p,v,w){var H=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);H.execute=function(Z){for(var M=0;M<h.length;M++)this.copyStyle(h[M]);w&&w(Z)};H.getPosition=q;H.setPosition=l;H.ignoreGrid=null!=p?p:!0;if(v){var y=H.positionChanged;H.positionChanged=function(){y.apply(this, +arguments);c.view.invalidate(this.state.cell);c.view.validate()}}return H},rb={link:function(c){return[lb(c,!0,10),lb(c,!1,10)]},flexArrow:function(c){var h=c.view.graph.gridSize/c.view.scale,q=[];mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(q.push(Wa(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(l,p,v,w,H){l=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;H=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE, +mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(w.x+p*(H+c.shape.strokewidth*c.view.scale)+v*l/2,w.y+v*(H+c.shape.strokewidth*c.view.scale)-p*l/2)},function(l,p,v,w,H,y,Z){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,H.x,H.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(p-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*l)/c.view.scale;if(mxEvent.isShiftDown(Z.getEvent())||mxEvent.isControlDown(Z.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]= +c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(Z.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<h/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),q.push(Wa(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(l,p,v,w,H){l=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;H=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/ +5)*c.view.scale;return new mxPoint(w.x+p*(H+c.shape.strokewidth*c.view.scale)+v*l/2,w.y+v*(H+c.shape.strokewidth*c.view.scale)-p*l/2)},function(l,p,v,w,H,y,Z){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,H.x,H.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(p-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*l)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(Z.getEvent())||mxEvent.isControlDown(Z.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]= c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(Z.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<h/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<h&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(q.push(Wa(c, -["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(l,p,v,w,I){l=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;I=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(w.x+p*(I+c.shape.strokewidth*c.view.scale)-v*l/2,w.y+v*(I+c.shape.strokewidth*c.view.scale)+p*l/2)},function(l,p,v,w,I,y,Z){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,I.x,I.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);c.style[mxConstants.STYLE_ENDSIZE]= +["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(l,p,v,w,H){l=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;H=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(w.x+p*(H+c.shape.strokewidth*c.view.scale)-v*l/2,w.y+v*(H+c.shape.strokewidth*c.view.scale)+p*l/2)},function(l,p,v,w,H,y,Z){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,H.x,H.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);c.style[mxConstants.STYLE_ENDSIZE]= Math.round(100*(p-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*l)/c.view.scale;if(mxEvent.isShiftDown(Z.getEvent())||mxEvent.isControlDown(Z.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(Z.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<h/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),q.push(Wa(c,["startWidth","endWidth", -mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(l,p,v,w,I){l=(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;I=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(w.x+p*(I+c.shape.strokewidth*c.view.scale)-v*l/2,w.y+v*(I+c.shape.strokewidth*c.view.scale)+p*l/2)},function(l,p,v,w,I,y,Z){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,I.x,I.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);c.style[mxConstants.STYLE_ENDSIZE]= +mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(l,p,v,w,H){l=(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;H=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(w.x+p*(H+c.shape.strokewidth*c.view.scale)-v*l/2,w.y+v*(H+c.shape.strokewidth*c.view.scale)+p*l/2)},function(l,p,v,w,H,y,Z){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,H.x,H.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);c.style[mxConstants.STYLE_ENDSIZE]= Math.round(100*(p-c.shape.strokewidth)/3)/100/c.view.scale;c.style.endWidth=Math.max(0,Math.round(2*l)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(Z.getEvent())||mxEvent.isControlDown(Z.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(Z.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<h/6&&(c.style[mxConstants.STYLE_ENDSIZE]= c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-parseFloat(c.style.startWidth))<h&&(c.style.endWidth=c.style.startWidth))})));return q},swimlane:function(c){var h=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var q=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));h.push(fb(c,q/2))}h.push(Ra(c,[mxConstants.STYLE_STARTSIZE],function(l){var p=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE)); return 1==mxUtils.getValue(c.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(l.getCenterX(),l.y+Math.max(0,Math.min(l.height,p))):new mxPoint(l.x+Math.max(0,Math.min(l.width,p)),l.getCenterY())},function(l,p){c.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(l.height,p.y-l.y))):Math.round(Math.max(0,Math.min(l.width,p.x-l.x)))},!1,null,function(l){var p=c.view.graph;if(!mxEvent.isShiftDown(l.getEvent())&&!mxEvent.isControlDown(l.getEvent())&& -(p.isTableRow(c.cell)||p.isTableCell(c.cell))){l=p.getSwimlaneDirection(c.style);var v=p.model.getParent(c.cell);v=p.model.getChildCells(v,!0);for(var w=[],I=0;I<v.length;I++)v[I]!=c.cell&&p.isSwimlane(v[I])&&p.getSwimlaneDirection(p.getCurrentCellStyle(v[I]))==l&&w.push(v[I]);p.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],w)}}));return h},label:nb(),ext:nb(),rectangle:nb(),triangle:nb(),rhombus:nb(),umlLifeline:function(c){return[Ra(c,["size"],function(h){var q= -Math.max(0,Math.min(h.height,parseFloat(mxUtils.getValue(this.state.style,"size",da.prototype.size))));return new mxPoint(h.getCenterX(),h.y+q)},function(h,q){this.state.style.size=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},umlFrame:function(c){return[Ra(c,["width","height"],function(h){var q=Math.max(pa.prototype.corner,Math.min(h.width,mxUtils.getValue(this.state.style,"width",pa.prototype.width))),l=Math.max(1.5*pa.prototype.corner,Math.min(h.height,mxUtils.getValue(this.state.style, -"height",pa.prototype.height)));return new mxPoint(h.x+q,h.y+l)},function(h,q){this.state.style.width=Math.round(Math.max(pa.prototype.corner,Math.min(h.width,q.x-h.x)));this.state.style.height=Math.round(Math.max(1.5*pa.prototype.corner,Math.min(h.height,q.y-h.y)))},!1)]},process:function(c){var h=[Ra(c,["size"],function(q){var l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),p=parseFloat(mxUtils.getValue(this.state.style,"size",X.prototype.size));return l?new mxPoint(q.x+p,q.y+q.height/ +(p.isTableRow(c.cell)||p.isTableCell(c.cell))){l=p.getSwimlaneDirection(c.style);var v=p.model.getParent(c.cell);v=p.model.getChildCells(v,!0);for(var w=[],H=0;H<v.length;H++)v[H]!=c.cell&&p.isSwimlane(v[H])&&p.getSwimlaneDirection(p.getCurrentCellStyle(v[H]))==l&&w.push(v[H]);p.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],w)}}));return h},label:nb(),ext:nb(),rectangle:nb(),triangle:nb(),rhombus:nb(),umlLifeline:function(c){return[Ra(c,["size"],function(h){var q= +Math.max(0,Math.min(h.height,parseFloat(mxUtils.getValue(this.state.style,"size",da.prototype.size))));return new mxPoint(h.getCenterX(),h.y+q)},function(h,q){this.state.style.size=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},umlFrame:function(c){return[Ra(c,["width","height"],function(h){var q=Math.max(sa.prototype.corner,Math.min(h.width,mxUtils.getValue(this.state.style,"width",sa.prototype.width))),l=Math.max(1.5*sa.prototype.corner,Math.min(h.height,mxUtils.getValue(this.state.style, +"height",sa.prototype.height)));return new mxPoint(h.x+q,h.y+l)},function(h,q){this.state.style.width=Math.round(Math.max(sa.prototype.corner,Math.min(h.width,q.x-h.x)));this.state.style.height=Math.round(Math.max(1.5*sa.prototype.corner,Math.min(h.height,q.y-h.y)))},!1)]},process:function(c){var h=[Ra(c,["size"],function(q){var l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),p=parseFloat(mxUtils.getValue(this.state.style,"size",Y.prototype.size));return l?new mxPoint(q.x+p,q.y+q.height/ 4):new mxPoint(q.x+q.width*p,q.y+q.height/4)},function(q,l){q="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*q.width,l.x-q.x)):Math.max(0,Math.min(.5,(l.x-q.x)/q.width));this.state.style.size=q},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(fb(c));return h},cross:function(c){return[Ra(c,["size"],function(h){var q=Math.min(h.width,h.height);q=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Ia.prototype.size)))*q/2;return new mxPoint(h.getCenterX()- q,h.getCenterY()-q)},function(h,q){var l=Math.min(h.width,h.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,h.getCenterY()-q.y)/l*2,Math.max(0,h.getCenterX()-q.x)/l*2)))})]},note:function(c){return[Ra(c,["size"],function(h){var q=Math.max(0,Math.min(h.width,Math.min(h.height,parseFloat(mxUtils.getValue(this.state.style,"size",u.prototype.size)))));return new mxPoint(h.x+h.width-q,h.y+q)},function(h,q){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(h.width,h.x+ h.width-q.x),Math.min(h.height,q.y-h.y))))})]},note2:function(c){return[Ra(c,["size"],function(h){var q=Math.max(0,Math.min(h.width,Math.min(h.height,parseFloat(mxUtils.getValue(this.state.style,"size",m.prototype.size)))));return new mxPoint(h.x+h.width-q,h.y+q)},function(h,q){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(h.width,h.x+h.width-q.x),Math.min(h.height,q.y-h.y))))})]},manualInput:function(c){var h=[Ra(c,["size"],function(q){var l=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style, @@ -3414,20 +3412,20 @@ h.width-q.x),Math.min(h.height,q.y-h.y))))})]},note2:function(c){return[Ra(c,["s "base",fa.prototype.base);return new mxPoint(q.x+p*q.width,q.y+q.height-l)},function(q,l){mxUtils.getValue(this.state.style,"base",fa.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(q.height,q.y+q.height-l.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(l.x-q.x)/q.width)))/100},!1),Ra(c,["position2"],function(q){var l=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",fa.prototype.position2)));return new mxPoint(q.x+l*q.width,q.y+q.height)}, function(q,l){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(l.x-q.x)/q.width)))/100},!1),Ra(c,["base"],function(q){var l=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"size",fa.prototype.size))),p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",fa.prototype.position))),v=Math.max(0,Math.min(q.width,mxUtils.getValue(this.state.style,"base",fa.prototype.base)));return new mxPoint(q.x+Math.min(q.width,p*q.width+v),q.y+q.height-l)},function(q,l){var p= Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",fa.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(q.width,l.x-q.x-p*q.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(fb(c));return h},internalStorage:function(c){var h=[Ra(c,["dx","dy"],function(q){var l=Math.max(0,Math.min(q.width,mxUtils.getValue(this.state.style,"dx",Va.prototype.dx))),p=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"dy",Va.prototype.dy))); -return new mxPoint(q.x+l,q.y+p)},function(q,l){this.state.style.dx=Math.round(Math.max(0,Math.min(q.width,l.x-q.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(q.height,l.y-q.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(fb(c));return h},module:function(c){return[Ra(c,["jettyWidth","jettyHeight"],function(h){var q=Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"jettyWidth",Ca.prototype.jettyWidth))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style, -"jettyHeight",Ca.prototype.jettyHeight)));return new mxPoint(h.x+q/2,h.y+2*l)},function(h,q){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(h.width,q.x-h.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(h.height,q.y-h.y))/2)})]},corner:function(c){return[Ra(c,["dx","dy"],function(h){var q=Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"dx",Za.prototype.dx))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"dy",Za.prototype.dy)));return new mxPoint(h.x+ +return new mxPoint(q.x+l,q.y+p)},function(q,l){this.state.style.dx=Math.round(Math.max(0,Math.min(q.width,l.x-q.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(q.height,l.y-q.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(fb(c));return h},module:function(c){return[Ra(c,["jettyWidth","jettyHeight"],function(h){var q=Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"jettyWidth",Aa.prototype.jettyWidth))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style, +"jettyHeight",Aa.prototype.jettyHeight)));return new mxPoint(h.x+q/2,h.y+2*l)},function(h,q){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(h.width,q.x-h.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(h.height,q.y-h.y))/2)})]},corner:function(c){return[Ra(c,["dx","dy"],function(h){var q=Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"dx",Za.prototype.dx))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"dy",Za.prototype.dy)));return new mxPoint(h.x+ q,h.y+l)},function(h,q){this.state.style.dx=Math.round(Math.max(0,Math.min(h.width,q.x-h.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},tee:function(c){return[Ra(c,["dx","dy"],function(h){var q=Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"dx",cb.prototype.dx))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"dy",cb.prototype.dy)));return new mxPoint(h.x+(h.width+q)/2,h.y+l)},function(h,q){this.state.style.dx=Math.round(Math.max(0, 2*Math.min(h.width/2,q.x-h.x-h.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},singleArrow:hb(1),doubleArrow:hb(.5),"mxgraph.arrows2.wedgeArrow":gb(20,20),"mxgraph.arrows2.wedgeArrowDashed":gb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":gb(20,20),folder:function(c){return[Ra(c,["tabWidth","tabHeight"],function(h){var q=Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"tabWidth",F.prototype.tabWidth))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style, "tabHeight",F.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",F.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(q=h.width-q);return new mxPoint(h.x+q,h.y+l)},function(h,q){var l=Math.max(0,Math.min(h.width,q.x-h.x));mxUtils.getValue(this.state.style,"tabPosition",F.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(l=h.width-l);this.state.style.tabWidth=Math.round(l);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},document:function(c){return[Ra(c, -["size"],function(h){var q=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",R.prototype.size))));return new mxPoint(h.x+3*h.width/4,h.y+(1-q)*h.height)},function(h,q){this.state.style.size=Math.max(0,Math.min(1,(h.y+h.height-q.y)/h.height))},!1)]},tape:function(c){return[Ra(c,["size"],function(h){var q=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",O.prototype.size))));return new mxPoint(h.getCenterX(),h.y+q*h.height/2)},function(h,q){this.state.style.size= +["size"],function(h){var q=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",R.prototype.size))));return new mxPoint(h.x+3*h.width/4,h.y+(1-q)*h.height)},function(h,q){this.state.style.size=Math.max(0,Math.min(1,(h.y+h.height-q.y)/h.height))},!1)]},tape:function(c){return[Ra(c,["size"],function(h){var q=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(h.getCenterX(),h.y+q*h.height/2)},function(h,q){this.state.style.size= Math.max(0,Math.min(1,(q.y-h.y)/h.height*2))},!1)]},isoCube2:function(c){return[Ra(c,["isoAngle"],function(h){var q=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",r.isoAngle))))*Math.PI/200;return new mxPoint(h.x,h.y+Math.min(h.width*Math.tan(q),.5*h.height))},function(h,q){this.state.style.isoAngle=Math.max(0,50*(q.y-h.y)/h.height)},!0)]},cylinder2:Xa(x.prototype.size),cylinder3:Xa(B.prototype.size),offPageConnector:function(c){return[Ra(c,["size"],function(h){var q= Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",L.prototype.size))));return new mxPoint(h.getCenterX(),h.y+(1-q)*h.height)},function(h,q){this.state.style.size=Math.max(0,Math.min(1,(h.y+h.height-q.y)/h.height))},!1)]},"mxgraph.basic.rect":function(c){var h=[Graph.createHandle(c,["size"],function(q){var l=Math.max(0,Math.min(q.width/2,q.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(q.x+l,q.y+l)},function(q,l){this.state.style.size= -Math.round(100*Math.max(0,Math.min(q.height/2,q.width/2,l.x-q.x)))/100})];c=Graph.createHandle(c,["indent"],function(q){var l=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(q.x+.75*q.width,q.y+l*q.height/200)},function(q,l){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(l.y-q.y)/q.height)))/100});h.push(c);return h},step:qb(sa.prototype.size,!0,null,!0,sa.prototype.fixedSize),hexagon:qb(K.prototype.size,!0,.5,!0,K.prototype.fixedSize), -curlyBracket:qb(aa.prototype.size,!1),display:qb(Fa.prototype.size,!1),cube:sb(1,e.prototype.size,!1),card:sb(.5,C.prototype.size,!0),loopLimit:sb(.5,H.prototype.size,!0),trapezoid:ub(.5,Q.prototype.size,Q.prototype.fixedSize),parallelogram:ub(1,T.prototype.size,T.prototype.fixedSize)};Graph.createHandle=Ra;Graph.handleFactory=rb;var tb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=tb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var h= +Math.round(100*Math.max(0,Math.min(q.height/2,q.width/2,l.x-q.x)))/100})];c=Graph.createHandle(c,["indent"],function(q){var l=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(q.x+.75*q.width,q.y+l*q.height/200)},function(q,l){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(l.y-q.y)/q.height)))/100});h.push(c);return h},step:qb(ra.prototype.size,!0,null,!0,ra.prototype.fixedSize),hexagon:qb(K.prototype.size,!0,.5,!0,K.prototype.fixedSize), +curlyBracket:qb(aa.prototype.size,!1),display:qb(Fa.prototype.size,!1),cube:sb(1,e.prototype.size,!1),card:sb(.5,C.prototype.size,!0),loopLimit:sb(.5,G.prototype.size,!0),trapezoid:ub(.5,Q.prototype.size,Q.prototype.fixedSize),parallelogram:ub(1,S.prototype.size,S.prototype.fixedSize)};Graph.createHandle=Ra;Graph.handleFactory=rb;var tb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=tb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var h= this.state.style.shape;null==mxCellRenderer.defaultShapes[h]&&null==mxStencilRegistry.getStencil(h)?h=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(h=mxConstants.SHAPE_SWIMLANE);h=rb[h];null==h&&null!=this.state.shape&&this.state.shape.isRoundable()&&(h=rb[mxConstants.SHAPE_RECTANGLE]);null!=h&&(h=h(this.state),null!=h&&(c=null==c?h:c.concat(h)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&& null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);c=rb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var ib=new mxPoint(1,0),jb=new mxPoint(1,0),mb=mxUtils.toRadians(-30);ib=mxUtils.getRotatedPoint(ib,Math.cos(mb),Math.sin(mb));var ob=mxUtils.toRadians(-150);jb=mxUtils.getRotatedPoint(jb,Math.cos(ob),Math.sin(ob));mxEdgeStyle.IsometricConnector=function(c,h,q,l,p){var v=c.view;l=null!=l&&0<l.length?l[0]:null;var w=c.absolutePoints, -I=w[0];w=w[w.length-1];null!=l&&(l=v.transformControlPoint(c,l));null==I&&null!=h&&(I=new mxPoint(h.getCenterX(),h.getCenterY()));null==w&&null!=q&&(w=new mxPoint(q.getCenterX(),q.getCenterY()));var y=ib.x,Z=ib.y,N=jb.x,Ba=jb.y,Qa="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=w&&null!=I){c=function(ka,oa,na){ka-=Ja.x;var ma=oa-Ja.y;oa=(Ba*ka-N*ma)/(y*Ba-Z*N);ka=(Z*ka-y*ma)/(Z*N-y*Ba);Qa?(na&&(Ja=new mxPoint(Ja.x+y*oa,Ja.y+Z*oa),p.push(Ja)),Ja=new mxPoint(Ja.x+N*ka,Ja.y+Ba* -ka)):(na&&(Ja=new mxPoint(Ja.x+N*ka,Ja.y+Ba*ka),p.push(Ja)),Ja=new mxPoint(Ja.x+y*oa,Ja.y+Z*oa));p.push(Ja)};var Ja=I;null==l&&(l=new mxPoint(I.x+(w.x-I.x)/2,I.y+(w.y-I.y)/2));c(l.x,l.y,!0);c(w.x,w.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var yb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,h){if(h==mxEdgeStyle.IsometricConnector){var q=new mxElbowEdgeHandler(c);q.snapToTerminals=!1;return q}return yb.apply(this,arguments)}; +H=w[0];w=w[w.length-1];null!=l&&(l=v.transformControlPoint(c,l));null==H&&null!=h&&(H=new mxPoint(h.getCenterX(),h.getCenterY()));null==w&&null!=q&&(w=new mxPoint(q.getCenterX(),q.getCenterY()));var y=ib.x,Z=ib.y,M=jb.x,Ca=jb.y,Qa="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=w&&null!=H){c=function(la,pa,oa){la-=Ka.x;var ma=pa-Ka.y;pa=(Ca*la-M*ma)/(y*Ca-Z*M);la=(Z*la-y*ma)/(Z*M-y*Ca);Qa?(oa&&(Ka=new mxPoint(Ka.x+y*pa,Ka.y+Z*pa),p.push(Ka)),Ka=new mxPoint(Ka.x+M*la,Ka.y+Ca* +la)):(oa&&(Ka=new mxPoint(Ka.x+M*la,Ka.y+Ca*la),p.push(Ka)),Ka=new mxPoint(Ka.x+y*pa,Ka.y+Z*pa));p.push(Ka)};var Ka=H;null==l&&(l=new mxPoint(H.x+(w.x-H.x)/2,H.y+(w.y-H.y)/2));c(l.x,l.y,!0);c(w.x,w.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var yb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,h){if(h==mxEdgeStyle.IsometricConnector){var q=new mxElbowEdgeHandler(c);q.snapToTerminals=!1;return q}return yb.apply(this,arguments)}; d.prototype.constraints=[];k.prototype.getConstraints=function(c,h,q){c=[];var l=Math.tan(mxUtils.toRadians(30)),p=(.5-l)/2;l=Math.min(h,q/(.5+l));h=(h-l)/2;q=(q-l)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q+.25*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h+.5*l,q+l*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h+l,q+.25*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h+l,q+.75*l));c.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,h+.5*l,q+(1-p)*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q+.75*l));return c};r.prototype.getConstraints=function(c,h,q){c=[];var l=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;l=Math.min(h*Math.tan(l),.5*q);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,l));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,h,q-l));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q-l));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));return c};fa.prototype.getConstraints=function(c,h,q){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var l=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style, @@ -3447,22 +3445,22 @@ parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnect 0),!1,null,.5*l,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,p)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),p))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-.5*l,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,p)),c.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,.5*(h-l),p)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.25*(q-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*(q-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.75*(q-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null, 0,.25*(q-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(q-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(q-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Va.prototype.constraints=mxRectangleShape.prototype.constraints;z.prototype.constraints= -mxRectangleShape.prototype.constraints;W.prototype.constraints=mxEllipse.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;ea.prototype.constraints=mxEllipse.prototype.constraints;Ma.prototype.constraints=mxEllipse.prototype.constraints;Ya.prototype.constraints=mxRectangleShape.prototype.constraints;La.prototype.constraints=mxRectangleShape.prototype.constraints;Fa.prototype.getConstraints=function(c,h,q){c=[];var l=Math.min(h,q/2),p=Math.min(h-l,Math.max(0,parseFloat(mxUtils.getValue(this.style, +mxRectangleShape.prototype.constraints;X.prototype.constraints=mxEllipse.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;ea.prototype.constraints=mxEllipse.prototype.constraints;Ma.prototype.constraints=mxEllipse.prototype.constraints;Ya.prototype.constraints=mxRectangleShape.prototype.constraints;La.prototype.constraints=mxRectangleShape.prototype.constraints;Fa.prototype.getConstraints=function(c,h,q){c=[];var l=Math.min(h,q/2),p=Math.min(h-l,Math.max(0,parseFloat(mxUtils.getValue(this.style, "size",this.size)))*h);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+h-l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+h-l),q));c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,p,q));return c};Ca.prototype.getConstraints=function(c,h,q){h=parseFloat(mxUtils.getValue(c,"jettyWidth",Ca.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",Ca.prototype.jettyHeight));var l=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,h),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1, +0),!1,null,p,q));return c};Aa.prototype.getConstraints=function(c,h,q){h=parseFloat(mxUtils.getValue(c,"jettyWidth",Aa.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",Aa.prototype.jettyHeight));var l=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,h),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1, .25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,h),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(q-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(q- -.5*c,3.5*c))];q>5*c&&l.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,h));q>8*c&&l.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,h));q>15*c&&l.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,h));return l};H.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0), -new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];U.prototype.constraints= +.5*c,3.5*c))];q>5*c&&l.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,h));q>8*c&&l.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,h));q>15*c&&l.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,h));return l};G.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0), +new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];J.prototype.constraints= [new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];qa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5, 0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5, 0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];D.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0, -0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];O.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0, -.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];sa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5, +0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0, +.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];ra.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5, 1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75, -.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];wa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5, +.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ta.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5, 0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1, .5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13, -.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];T.prototype.constraints=mxRectangleShape.prototype.constraints;Q.prototype.constraints=mxRectangleShape.prototype.constraints;R.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25, +.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];S.prototype.constraints=mxRectangleShape.prototype.constraints;Q.prototype.constraints=mxRectangleShape.prototype.constraints;R.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25, 0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;cb.prototype.getConstraints=function(c,h,q){c=[];var l=Math.max(0, Math.min(h,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),p=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1, null,.75*h+.25*l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),.5*(q+p)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),q));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),.5*(q+p)));c.push(new mxConnectionConstraint(new mxPoint(0,0), @@ -3485,10 +3483,10 @@ window.openFile.setConsumer(mxUtils.bind(this,function(m,r){try{var x=mxUtils.pa null,Editor.ctrlKey+"+Shift+S").isEnabled=k;this.addAction("export...",function(){e.showDialog((new ExportDialog(e)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var m=new EditDiagramDialog(e);e.showDialog(m.container,620,420,!0,!1);m.init()});this.addAction("pageSetup...",function(){e.showDialog((new PageSetupDialog(e)).container,320,240,!0,!0)}).isEnabled=k;this.addAction("print...",function(){e.showDialog((new PrintDialog(e)).container,300,180,!0,!0)},null,"sprite-print", Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){e.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){e.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var m=null;try{m=e.copyXml(),null!=m&&d.removeCells(m,!1)}catch(r){}null==m&&mxClipboard.cut(d)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{e.copyXml()}catch(m){}try{mxClipboard.copy(d)}catch(m){e.handleError(m)}}, null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var m=!1;try{Editor.enableNativeCipboard&&(e.readGraphModelFromClipboard(function(r){if(null!=r){d.getModel().beginUpdate();try{e.pasteXml(r,!0)}finally{d.getModel().endUpdate()}}else mxClipboard.paste(d)}),m=!0)}catch(r){}m||mxClipboard.paste(d)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(m){function r(B){if(null!=B){for(var D=!0,F=0;F< -B.length&&D;F++)D=D&&d.model.isEdge(B[F]);var J=d.view.translate;F=d.view.scale;var C=J.x,O=J.y;J=null;if(1==B.length&&D){var R=d.getCellGeometry(B[0]);null!=R&&(J=R.getTerminalPoint(!0))}J=null!=J?J:d.getBoundingBoxFromGeometry(B,D);null!=J&&(D=Math.round(d.snap(d.popupMenuHandler.triggerX/F-C)),F=Math.round(d.snap(d.popupMenuHandler.triggerY/F-O)),d.cellsMoved(B,D-J.x,F-J.y))}}function x(){d.getModel().beginUpdate();try{r(mxClipboard.paste(d))}finally{d.getModel().endUpdate()}}if(d.isEnabled()&& +B.length&&D;F++)D=D&&d.model.isEdge(B[F]);var I=d.view.translate;F=d.view.scale;var C=I.x,N=I.y;I=null;if(1==B.length&&D){var R=d.getCellGeometry(B[0]);null!=R&&(I=R.getTerminalPoint(!0))}I=null!=I?I:d.getBoundingBoxFromGeometry(B,D);null!=I&&(D=Math.round(d.snap(d.popupMenuHandler.triggerX/F-C)),F=Math.round(d.snap(d.popupMenuHandler.triggerY/F-N)),d.cellsMoved(B,D-I.x,F-I.y))}}function x(){d.getModel().beginUpdate();try{r(mxClipboard.paste(d))}finally{d.getModel().endUpdate()}}if(d.isEnabled()&& !d.isCellLocked(d.getDefaultParent())){m=!1;try{Editor.enableNativeCipboard&&(e.readGraphModelFromClipboard(function(B){if(null!=B){d.getModel().beginUpdate();try{r(e.pasteXml(B,!0))}finally{d.getModel().endUpdate()}}else x()}),m=!0)}catch(B){}m||x()}});this.addAction("copySize",function(){var m=d.getSelectionCell();d.isEnabled()&&null!=m&&d.getModel().isVertex(m)&&(m=d.getCellGeometry(m),null!=m&&(e.copiedSize=new mxRectangle(m.x,m.y,m.width,m.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize", function(){if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=e.copiedSize){d.getModel().beginUpdate();try{for(var m=d.getResizableCells(d.getSelectionCells()),r=0;r<m.length;r++)if(d.getModel().isVertex(m[r])){var x=d.getCellGeometry(m[r]);null!=x&&(x=x.clone(),x.width=e.copiedSize.width,x.height=e.copiedSize.height,d.getModel().setGeometry(m[r],x))}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var m=d.getSelectionCell()||d.getModel().getRoot();d.isEnabled()&& -null!=m&&(m=m.cloneValue(),null==m||isNaN(m.nodeType)||(e.copiedValue=m))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(m,r){function x(F,J){var C=B.getValue(F);J=F.cloneValue(J);J.removeAttribute("placeholders");null==C||isNaN(C.nodeType)||J.setAttribute("placeholders",C.getAttribute("placeholders"));null!=m&&mxEvent.isShiftDown(m)||J.setAttribute("label",d.convertValueToString(F));B.setValue(F,J)}m=null!=r?r:m;var B=d.getModel();if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=e.copiedValue){B.beginUpdate(); +null!=m&&(m=m.cloneValue(),null==m||isNaN(m.nodeType)||(e.copiedValue=m))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(m,r){function x(F,I){var C=B.getValue(F);I=F.cloneValue(I);I.removeAttribute("placeholders");null==C||isNaN(C.nodeType)||I.setAttribute("placeholders",C.getAttribute("placeholders"));null!=m&&mxEvent.isShiftDown(m)||I.setAttribute("label",d.convertValueToString(F));B.setValue(F,I)}m=null!=r?r:m;var B=d.getModel();if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=e.copiedValue){B.beginUpdate(); try{var D=d.getEditableCells(d.getSelectionCells());if(0==D.length)x(B.getRoot(),e.copiedValue);else for(r=0;r<D.length;r++)x(D[r],e.copiedValue)}finally{B.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(m,r){m=null!=r?r:m;null!=m&&mxEvent.isShiftDown(m)?b():a(null!=m&&(mxEvent.isControlDown(m)||mxEvent.isMetaDown(m)||mxEvent.isAltDown(m)))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)});this.addAction("deleteLabels",function(){b()},null,null,Editor.ctrlKey+ "+Delete");this.addAction("duplicate",function(){try{d.setSelectionCells(d.duplicateCells()),d.scrollCellToVisible(d.getSelectionCell())}catch(m){e.handleError(m)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var m=e.getSelectionState();if(null!=m.mergeCell){d.getModel().beginUpdate();try{d.setCellStyles("rowspan",m.rowspan,[m.mergeCell]),d.setCellStyles("colspan",m.colspan,[m.mergeCell])}finally{d.getModel().endUpdate()}}}));this.put("unmergeCells", new Action(mxResources.get("unmerge"),function(){var m=e.getSelectionState();if(0<m.cells.length){d.getModel().beginUpdate();try{d.setCellStyles("rowspan",null,m.cells),d.setCellStyles("colspan",null,m.cells)}finally{d.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(m,r){m=null!=r?r:m;d.turnShapes(d.getResizableCells(d.getSelectionCells()),null!=m?mxEvent.isShiftDown(m):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R")); @@ -3503,7 +3501,7 @@ B)});e.showDialog(r.container,320,200,!0,!0);r.init()}},null,null,"Alt+Shift+T") null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),e.actions.get("image").funct())})).isEnabled=k;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&e.showLinkDialog("",mxResources.get("insert"),function(m,r,x){m=mxUtils.trim(m);if(0<m.length){var B=null,D=d.getLinkTitle(m);null!=r&&0<r.length&&(B=r[0].iconUrl, D=r[0].name||r[0].type,D=D.charAt(0).toUpperCase()+D.substring(1),30<D.length&&(D=D.substring(0,30)+"..."));r=new mxCell(D,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=B?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+B:"spacing=10;"));r.vertex=!0;B=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry([r],!0));r.geometry.x=B.x;r.geometry.y=B.y;d.setAttributeForCell(r,"linkTarget",x);d.setLinkForCell(r,m);d.cellSizeUpdated(r, !0);d.getModel().beginUpdate();try{r=d.addCell(r),d.fireEvent(new mxEventObject("cellsInserted","cells",[r]))}finally{d.getModel().endUpdate()}d.setSelectionCell(r);d.scrollCellToVisible(d.getSelectionCell())}},!0)})).isEnabled=k;this.addAction("link...",mxUtils.bind(this,function(){if(d.isEnabled())if(d.cellEditor.isContentEditing()){var m=d.getSelectedElement(),r=d.getParentByName(m,"A",d.cellEditor.textarea),x="";if(null==r&&null!=m&&null!=m.getElementsByTagName)for(var B=m.getElementsByTagName("a"), -D=0;D<B.length&&null==r;D++)B[D].textContent==m.textContent&&(r=B[D]);null!=r&&"A"==r.nodeName&&(x=r.getAttribute("href")||"",d.selectNode(r));var F=d.cellEditor.saveSelection();e.showLinkDialog(x,mxResources.get("apply"),mxUtils.bind(this,function(J){d.cellEditor.restoreSelection(F);null!=J&&d.insertLink(J)}))}else d.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=k;this.addAction("autosize",function(){var m=d.getSelectionCells();if(null!=m){d.getModel().beginUpdate(); +D=0;D<B.length&&null==r;D++)B[D].textContent==m.textContent&&(r=B[D]);null!=r&&"A"==r.nodeName&&(x=r.getAttribute("href")||"",d.selectNode(r));var F=d.cellEditor.saveSelection();e.showLinkDialog(x,mxResources.get("apply"),mxUtils.bind(this,function(I){d.cellEditor.restoreSelection(F);null!=I&&d.insertLink(I)}))}else d.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=k;this.addAction("autosize",function(){var m=d.getSelectionCells();if(null!=m){d.getModel().beginUpdate(); try{for(var r=0;r<m.length;r++){var x=m[r];0<d.getModel().getChildCount(x)?d.updateGroupBounds([x],0,!0):d.updateCellSize(x)}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){d.snapCellsToGrid(d.getSelectionCells(),d.gridSize)});this.addAction("formattedText",function(){d.stopEditing();var m=d.getCommonStyle(d.getSelectionCells());m="1"==mxUtils.getValue(m,"html","0")?null:"1";d.getModel().beginUpdate();try{for(var r=d.getEditableCells(d.getSelectionCells()), x=0;x<r.length;x++)if(state=d.getView().getState(r[x]),null!=state){var B=mxUtils.getValue(state.style,"html","0");if("1"==B&&null==m){var D=d.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(D=D.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var F=document.createElement("div");F.innerHTML=d.sanitizeHtml(D);D=mxUtils.extractTextWithWhitespace(F.childNodes);d.cellLabelChanged(state.cell,D);d.setCellStyles("html",m,[r[x]])}else"0"==B&&"1"==m&&(D=mxUtils.htmlEntities(d.convertValueToString(state.cell), !1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(D=D.replace(/\n/g,"<br/>")),d.cellLabelChanged(state.cell,d.sanitizeHtml(D)),d.setCellStyles("html",m,[r[x]]))}e.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=m?m:"0"],"cells",r))}finally{d.getModel().endUpdate()}});this.addAction("wordWrap",function(){var m=d.getView().getState(d.getSelectionCell()),r="wrap";d.stopEditing();null!=m&&"wrap"==m.style[mxConstants.STYLE_WHITE_SPACE]&&(r=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE, @@ -3520,7 +3518,7 @@ n.isEnabled=k;n=this.addAction("scrollbars",function(){e.setScrollbars(!e.hasScr null,"Alt+Shift+A");n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionArrowsEnabled});n=this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());e.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});n=this.addAction("copyConnect",function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget()); e.fireEvent(new mxEventObject("copyConnectChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});n.isEnabled=k;n=this.addAction("autosave",function(){e.editor.setAutosave(!e.editor.autosave)});n.setToggleAction(!0);n.setSelectedCallback(function(){return e.editor.autosave});n.isEnabled=k;n.visible=!1;this.addAction("help",function(){var m="";mxResources.isLanguageSupported(mxClient.language)&&(m="_"+mxClient.language);d.openLink(RESOURCES_PATH+ "/help"+m+".html")});var u=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){u||(e.showDialog((new AboutDialog(e)).container,320,280,!0,!0,function(){u=!1}),u=!0)}));n=mxUtils.bind(this,function(m,r,x,B){return this.addAction(m,function(){if(null!=x&&d.cellEditor.isContentEditing())x();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var D=d.getEditableCells(d.getSelectionCells());d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,r,D);(r&mxConstants.FONT_BOLD)== -mxConstants.FONT_BOLD?d.updateLabelElements(D,function(J){J.style.fontWeight=null;"B"==J.nodeName&&d.replaceElement(J)}):(r&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?d.updateLabelElements(D,function(J){J.style.fontStyle=null;"I"==J.nodeName&&d.replaceElement(J)}):(r&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(D,function(J){J.style.textDecoration=null;"U"==J.nodeName&&d.replaceElement(J)});for(var F=0;F<D.length;F++)0==d.model.getChildCount(D[F])&&d.autoSizeCell(D[F], +mxConstants.FONT_BOLD?d.updateLabelElements(D,function(I){I.style.fontWeight=null;"B"==I.nodeName&&d.replaceElement(I)}):(r&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?d.updateLabelElements(D,function(I){I.style.fontStyle=null;"I"==I.nodeName&&d.replaceElement(I)}):(r&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(D,function(I){I.style.textDecoration=null;"U"==I.nodeName&&d.replaceElement(I)});for(var F=0;F<D.length;F++)0==d.model.getChildCount(D[F])&&d.autoSizeCell(D[F], !1)}finally{d.getModel().endUpdate()}}},null,null,B)});n("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");n("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");n("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){e.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...", function(){e.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){e.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){e.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){e.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){e.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){e.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL, !0)});this.addAction("shadow",function(){e.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,null),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dashed",function(){d.getModel().beginUpdate(); @@ -3534,10 +3532,10 @@ null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function d.getModel().getParent(m),F=d.getCellGeometry(m);D=Math.round(d.snap(d.popupMenuHandler.triggerX/B-D));B=Math.round(d.snap(d.popupMenuHandler.triggerY/B-x));r.addPointAt(r.state,D,B)}}});this.addAction("removeWaypoint",function(){var m=e.actions.get("removeWaypoint");null!=m.handler&&m.handler.removePoint(m.handler.state,m.index)});this.addAction("clearWaypoints",function(m,r){m=null!=r?r:m;var x=d.getSelectionCells();if(null!=x){x=d.getEditableCells(d.addAllEdges(x));d.getModel().beginUpdate();try{for(var B= 0;B<x.length;B++){var D=x[B];if(d.getModel().isEdge(D)){var F=d.getCellGeometry(D);null!=r&&mxEvent.isShiftDown(m)?(d.setCellStyles(mxConstants.STYLE_EXIT_X,null,[D]),d.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[D]),d.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[D]),d.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[D])):null!=F&&(F=F.clone(),F.points=null,F.x=0,F.y=0,F.offset=null,d.getModel().setGeometry(D,F))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+C");n=this.addAction("subscript", mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");n=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var m=mxResources.get("image")+" ("+mxResources.get("url")+"):",r=d.getView().getState(d.getSelectionCell()), -x="",B=null;null!=r&&(x=r.style[mxConstants.STYLE_IMAGE]||x,B=r.style[mxConstants.STYLE_CLIP_PATH]||B);var D=d.cellEditor.saveSelection();e.showImageDialog(m,x,function(F,J,C,O,R,T){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(D),d.insertImage(F,J,C);else{var Q=d.getSelectionCells();if(null!=F&&(0<F.length||0<Q.length)){var aa=null;d.getModel().beginUpdate();try{if(0==Q.length){Q=[d.insertVertex(d.getDefaultParent(),null,"",0,0,J,C,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")]; -var S=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(Q,!0));Q[0].geometry.x=S.x;Q[0].geometry.y=S.y;null!=O&&f(Q[0],O,R,T,d);aa=Q;d.fireEvent(new mxEventObject("cellsInserted","cells",aa))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<F.length?F:null,Q);var P=d.getCurrentCellStyle(Q[0]);"image"!=P[mxConstants.STYLE_SHAPE]&&"label"!=P[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",Q):0==F.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,Q);null==O&&d.setCellStyles(mxConstants.STYLE_CLIP_PATH, -null,Q);if(null!=J&&null!=C)for(F=0;F<Q.length;F++){var X=Q[F];if("0"!=d.getCurrentCellStyle(X).expand){var ha=d.getModel().getGeometry(X);null!=ha&&(ha=ha.clone(),ha.width=J,ha.height=C,d.getModel().setGeometry(X,ha))}null!=O&&f(X,O,R,T,d)}}finally{d.getModel().endUpdate()}null!=aa&&(d.setSelectionCells(aa),d.scrollCellToVisible(aa[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing(),!0,B)}}).isEnabled=k;this.addAction("crop...",function(){var m=d.getSelectionCell();if(d.isEnabled()&& -!d.isCellLocked(d.getDefaultParent())&&null!=m){var r=d.getCurrentCellStyle(m),x=r[mxConstants.STYLE_IMAGE],B=r[mxConstants.STYLE_SHAPE];x&&"image"==B&&(r=new CropImageDialog(e,x,r[mxConstants.STYLE_CLIP_PATH],function(D,F,J){f(m,D,F,J,d)}),e.showDialog(r.container,300,390,!0,!0))}}).isEnabled=k;n=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(e,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show", +x="",B=null;null!=r&&(x=r.style[mxConstants.STYLE_IMAGE]||x,B=r.style[mxConstants.STYLE_CLIP_PATH]||B);var D=d.cellEditor.saveSelection();e.showImageDialog(m,x,function(F,I,C,N,R,S){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(D),d.insertImage(F,I,C);else{var Q=d.getSelectionCells();if(null!=F&&(0<F.length||0<Q.length)){var aa=null;d.getModel().beginUpdate();try{if(0==Q.length){Q=[d.insertVertex(d.getDefaultParent(),null,"",0,0,I,C,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")]; +var U=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(Q,!0));Q[0].geometry.x=U.x;Q[0].geometry.y=U.y;null!=N&&f(Q[0],N,R,S,d);aa=Q;d.fireEvent(new mxEventObject("cellsInserted","cells",aa))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<F.length?F:null,Q);var P=d.getCurrentCellStyle(Q[0]);"image"!=P[mxConstants.STYLE_SHAPE]&&"label"!=P[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",Q):0==F.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,Q);null==N&&d.setCellStyles(mxConstants.STYLE_CLIP_PATH, +null,Q);if(null!=I&&null!=C)for(F=0;F<Q.length;F++){var Y=Q[F];if("0"!=d.getCurrentCellStyle(Y).expand){var ja=d.getModel().getGeometry(Y);null!=ja&&(ja=ja.clone(),ja.width=I,ja.height=C,d.getModel().setGeometry(Y,ja))}null!=N&&f(Y,N,R,S,d)}}finally{d.getModel().endUpdate()}null!=aa&&(d.setSelectionCells(aa),d.scrollCellToVisible(aa[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing(),!0,B)}}).isEnabled=k;this.addAction("crop...",function(){var m=d.getSelectionCell();if(d.isEnabled()&& +!d.isCellLocked(d.getDefaultParent())&&null!=m){var r=d.getCurrentCellStyle(m),x=r[mxConstants.STYLE_IMAGE],B=r[mxConstants.STYLE_SHAPE];x&&"image"==B&&(r=new CropImageDialog(e,x,r[mxConstants.STYLE_CLIP_PATH],function(D,F,I){f(m,D,F,I,d)}),e.showDialog(r.container,300,390,!0,!0))}}).isEnabled=k;n=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(e,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show", mxUtils.bind(this,function(){e.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){e.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),e.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()})); n=this.addAction("formatPanel",mxUtils.bind(this,function(){e.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return 0<e.formatWidth}));n=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(e,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){e.fireEvent(new mxEventObject("outline"))})), this.outlineWindow.window.addListener("hide",function(){e.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),e.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var m= @@ -3577,13 +3575,13 @@ x&&0<x.length&&(f.scrollCellToVisible(x[0]),f.setSelectionCells(x))}),b):(n&&(b= null,"geIcon geSprite geSprite-insertcolumnafter"),b.setAttribute("title",mxResources.get("insertColumnAfter")),b=a.addItem(mxResources.get("deleteColumn"),null,mxUtils.bind(this,function(){if(null!=e)try{k?f.deleteLane(e):f.deleteTableColumn(e)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-deletecolumn"),b.setAttribute("title",mxResources.get("deleteColumn"))),u&&(b=a.addItem(mxResources.get("insertRowBefore"),null,mxUtils.bind(this,function(){try{k?f.insertLane(e,!0):f.insertTableRow(e, !0)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-insertrowbefore"),b.setAttribute("title",mxResources.get("insertRowBefore")),b=a.addItem(mxResources.get("insertRowAfter"),null,mxUtils.bind(this,function(){try{k?f.insertLane(e,!1):f.insertTableRow(e,!1)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-insertrowafter"),b.setAttribute("title",mxResources.get("insertRowAfter")),b=a.addItem(mxResources.get("deleteRow"),null,mxUtils.bind(this,function(){try{k? f.deleteLane(e):f.deleteTableRow(e)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-deleterow"),b.setAttribute("title",mxResources.get("deleteRow")),u=this.editorUi.getSelectionState(),null!=u.mergeCell?this.addMenuItem(a,"mergeCells"):(1<u.style.colspan||1<u.style.rowspan)&&this.addMenuItem(a,"unmergeCells")))}; -Menus.prototype.addInsertTableItem=function(a,b,f,e){function g(D){n=d.getParentByName(mxEvent.getSource(D),"TD");var F=!1;if(null!=n){k=d.getParentByName(n,"TR");var J=mxEvent.isMouseEvent(D)?2:4,C=x,O=Math.min(20,k.sectionRowIndex+J);J=Math.min(20,n.cellIndex+J);for(var R=C.rows.length;R<O;R++)for(var T=C.insertRow(R),Q=0;Q<C.rows[0].cells.length;Q++)T.insertCell(-1);for(R=0;R<C.rows.length;R++)for(T=C.rows[R],Q=T.cells.length;Q<J;Q++)T.insertCell(-1);B.innerHTML=n.cellIndex+1+"x"+(k.sectionRowIndex+ -1);for(C=0;C<x.rows.length;C++)for(O=x.rows[C],J=0;J<O.cells.length;J++)R=O.cells[J],C==k.sectionRowIndex&&J==n.cellIndex&&(F="blue"==R.style.backgroundColor),R.style.backgroundColor=C<=k.sectionRowIndex&&J<=n.cellIndex?"blue":"transparent"}mxEvent.consume(D);return F}e=null!=e?e:!0;b=null!=b?b:mxUtils.bind(this,function(D,F,J){var C=this.editorUi.editor.graph;if(null!=C.getParentByName(mxEvent.getSource(D),"TD")&&null!=C.cellEditor.textarea){var O=C.cellEditor.textarea.getElementsByTagName("table"); -D=[];for(var R=0;R<O.length;R++)D.push(O[R]);C.container.focus();R=C.pasteHtmlAtCaret;O=["<table>"];for(var T=0;T<F;T++){O.push("<tr>");for(var Q=0;Q<J;Q++)O.push("<td><br></td>");O.push("</tr>")}O.push("</table>");F=O.join("");R.call(C,F);F=C.cellEditor.textarea.getElementsByTagName("table");if(F.length==D.length+1)for(R=F.length-1;0<=R;R--)if(0==R||F[R]!=D[R-1]){C.selectNode(F[R].rows[0].cells[0]);break}}});var d=this.editorUi.editor.graph,k=null,n=null;null==f&&(a.div.className+=" geToolbarMenu", +Menus.prototype.addInsertTableItem=function(a,b,f,e){function g(D){n=d.getParentByName(mxEvent.getSource(D),"TD");var F=!1;if(null!=n){k=d.getParentByName(n,"TR");var I=mxEvent.isMouseEvent(D)?2:4,C=x,N=Math.min(20,k.sectionRowIndex+I);I=Math.min(20,n.cellIndex+I);for(var R=C.rows.length;R<N;R++)for(var S=C.insertRow(R),Q=0;Q<C.rows[0].cells.length;Q++)S.insertCell(-1);for(R=0;R<C.rows.length;R++)for(S=C.rows[R],Q=S.cells.length;Q<I;Q++)S.insertCell(-1);B.innerHTML=n.cellIndex+1+"x"+(k.sectionRowIndex+ +1);for(C=0;C<x.rows.length;C++)for(N=x.rows[C],I=0;I<N.cells.length;I++)R=N.cells[I],C==k.sectionRowIndex&&I==n.cellIndex&&(F="blue"==R.style.backgroundColor),R.style.backgroundColor=C<=k.sectionRowIndex&&I<=n.cellIndex?"blue":"transparent"}mxEvent.consume(D);return F}e=null!=e?e:!0;b=null!=b?b:mxUtils.bind(this,function(D,F,I){var C=this.editorUi.editor.graph;if(null!=C.getParentByName(mxEvent.getSource(D),"TD")&&null!=C.cellEditor.textarea){var N=C.cellEditor.textarea.getElementsByTagName("table"); +D=[];for(var R=0;R<N.length;R++)D.push(N[R]);C.container.focus();R=C.pasteHtmlAtCaret;N=["<table>"];for(var S=0;S<F;S++){N.push("<tr>");for(var Q=0;Q<I;Q++)N.push("<td><br></td>");N.push("</tr>")}N.push("</table>");F=N.join("");R.call(C,F);F=C.cellEditor.textarea.getElementsByTagName("table");if(F.length==D.length+1)for(R=F.length-1;0<=R;R--)if(0==R||F[R]!=D[R-1]){C.selectNode(F[R].rows[0].cells[0]);break}}});var d=this.editorUi.editor.graph,k=null,n=null;null==f&&(a.div.className+=" geToolbarMenu", a.labels=!1);a=a.addItem("",null,null,f,null,null,null,!0);a.firstChild.style.fontSize=Menus.prototype.defaultFontSize+"px";f=a.getElementsByTagName("td");1<f.length&&(f[1].style.display="none",f[2].style.display="none");a.firstChild.innerText="";var u=document.createElement("input");u.setAttribute("id","geTitleOption");u.setAttribute("type","checkbox");f=document.createElement("label");mxUtils.write(f,mxResources.get("title"));f.setAttribute("for","geTitleOption");mxEvent.addGestureListeners(f,null, null,mxUtils.bind(this,function(D){mxEvent.consume(D)}));mxEvent.addGestureListeners(u,null,null,mxUtils.bind(this,function(D){mxEvent.consume(D)}));var m=document.createElement("input");m.setAttribute("id","geContainerOption");m.setAttribute("type","checkbox");var r=document.createElement("label");mxUtils.write(r,mxResources.get("container"));r.setAttribute("for","geContainerOption");mxEvent.addGestureListeners(r,null,null,mxUtils.bind(this,function(D){mxEvent.consume(D)}));mxEvent.addGestureListeners(m, -null,null,mxUtils.bind(this,function(D){mxEvent.consume(D)}));e&&(a.firstChild.appendChild(u),a.firstChild.appendChild(f),mxUtils.br(a.firstChild),a.firstChild.appendChild(m),a.firstChild.appendChild(r),mxUtils.br(a.firstChild),mxUtils.br(a.firstChild));var x=function(D,F){var J=document.createElement("table");J.setAttribute("border","1");J.style.borderCollapse="collapse";J.style.borderStyle="solid";J.setAttribute("cellPadding","8");for(var C=0;C<D;C++)for(var O=J.insertRow(C),R=0;R<F;R++)O.insertCell(-1); -return J}(5,5);a.firstChild.appendChild(x);var B=document.createElement("div");B.style.padding="4px";B.innerHTML="1x1";a.firstChild.appendChild(B);mxEvent.addGestureListeners(x,null,null,mxUtils.bind(this,function(D){var F=g(D);null!=n&&null!=k&&F&&(b(D,k.sectionRowIndex+1,n.cellIndex+1,u.checked,m.checked),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0))}));mxEvent.addListener(x,"mouseover",g)}; +null,null,mxUtils.bind(this,function(D){mxEvent.consume(D)}));e&&(a.firstChild.appendChild(u),a.firstChild.appendChild(f),mxUtils.br(a.firstChild),a.firstChild.appendChild(m),a.firstChild.appendChild(r),mxUtils.br(a.firstChild),mxUtils.br(a.firstChild));var x=function(D,F){var I=document.createElement("table");I.setAttribute("border","1");I.style.borderCollapse="collapse";I.style.borderStyle="solid";I.setAttribute("cellPadding","8");for(var C=0;C<D;C++)for(var N=I.insertRow(C),R=0;R<F;R++)N.insertCell(-1); +return I}(5,5);a.firstChild.appendChild(x);var B=document.createElement("div");B.style.padding="4px";B.innerHTML="1x1";a.firstChild.appendChild(B);mxEvent.addGestureListeners(x,null,null,mxUtils.bind(this,function(D){var F=g(D);null!=n&&null!=k&&F&&(b(D,k.sectionRowIndex+1,n.cellIndex+1,u.checked,m.checked),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0))}));mxEvent.addListener(x,"mouseover",g)}; Menus.prototype.edgeStyleChange=function(a,b,f,e,g,d,k,n){return this.showIconOnly(a.addItem(b,n,mxUtils.bind(this,function(){var u=this.editorUi.editor.graph;u.stopEditing(!1);u.getModel().beginUpdate();try{for(var m=u.getSelectionCells(),r=[],x=0;x<m.length;x++){var B=m[x];if(u.getModel().isEdge(B)){if(k){var D=u.getCellGeometry(B);null!=D&&(D=D.clone(),D.points=null,u.getModel().setGeometry(B,D))}for(var F=0;F<f.length;F++)u.setCellStyles(f[F],e[F],[B]);r.push(B)}}this.editorUi.fireEvent(new mxEventObject("styleChanged", "keys",f,"values",e,"cells",r))}finally{u.getModel().endUpdate()}}),d,g))};Menus.prototype.showIconOnly=function(a){var b=a.getElementsByTagName("td");for(i=0;i<b.length;i++)"mxPopupMenuItem"==b[i].getAttribute("class")&&(b[i].style.display="none");return a}; Menus.prototype.styleChange=function(a,b,f,e,g,d,k,n,u){var m=this.createStyleChangeFunction(f,e);a=a.addItem(b,null,mxUtils.bind(this,function(){var r=this.editorUi.editor.graph;null!=k&&r.cellEditor.isContentEditing()?k():m(n)}),d,g);u&&this.showIconOnly(a);return a}; @@ -3659,86 +3657,86 @@ Toolbar.prototype.addButton=function(a,b,f,e){a=this.createButton(a);e=null!=e?e Toolbar.prototype.addClickHandler=function(a,b){null!=b&&(mxEvent.addListener(a,"click",function(f){a.enabled&&b(f);mxEvent.consume(f)}),mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(f){f.preventDefault()})))};Toolbar.prototype.createButton=function(a){var b=document.createElement("a");b.className="geButton";var f=document.createElement("div");null!=a&&(f.className="geSprite "+a);b.appendChild(f);return b}; Toolbar.prototype.createLabel=function(a,b){b=document.createElement("a");b.className="geLabel";mxUtils.write(b,a);return b}; Toolbar.prototype.addMenuHandler=function(a,b,f,e){if(null!=f){var g=this.editorUi.editor.graph,d=null,k=!0;mxEvent.addListener(a,"click",mxUtils.bind(this,function(n){if(k&&(null==a.enabled||a.enabled)){g.popupMenuHandler.hideMenu();d=new mxPopupMenu(f);d.div.className+=" geToolbarMenu";d.showDisabled=e;d.labels=b;d.autoExpand=!0;!b&&d.div.scrollHeight>d.div.clientHeight&&(d.div.style.width="40px");d.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(d,arguments);this.editorUi.resetCurrentMenu(); -d.destroy()});var u=mxUtils.getOffset(a);d.popup(u.x,u.y+a.offsetHeight,null,n);this.editorUi.setCurrentMenu(d,a)}k=!0;mxEvent.consume(n)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(n){k=null==d||null==d.div||null==d.div.parentNode;n.preventDefault()}))}};Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.style.maxWidth="100%";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorDialog=function(a,b,f,e){function g(){var J=k.value;/(^#?[a-zA-Z0-9]*$)/.test(J)? -("none"!=J&&"#"!=J.charAt(0)&&(J="#"+J),ColorDialog.addRecentColor("none"!=J?J.substring(1):J,12),n(J),a.hideDialog()):a.handleError({message:mxResources.get("invalidInput")})}function d(){var J=r(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);J.style.marginBottom="8px";return J}this.editorUi=a;var k=document.createElement("input");k.style.marginBottom="10px";mxClient.IS_IE&&(k.style.marginTop="10px",document.body.appendChild(k));var n=null!=f?f:this.createApplyFunction(); -this.init=function(){mxClient.IS_TOUCH||k.focus()};var u=new mxJSColor.color(k);u.pickerOnfocus=!1;u.showPicker();f=document.createElement("div");mxJSColor.picker.box.style.position="relative";mxJSColor.picker.box.style.width="230px";mxJSColor.picker.box.style.height="100px";mxJSColor.picker.box.style.paddingBottom="10px";f.appendChild(mxJSColor.picker.box);var m=document.createElement("center"),r=mxUtils.bind(this,function(J,C,O,R){C=null!=C?C:12;var T=document.createElement("table");T.style.borderCollapse= -"collapse";T.setAttribute("cellspacing","0");T.style.marginBottom="20px";T.style.cellSpacing="0px";T.style.marginLeft="1px";var Q=document.createElement("tbody");T.appendChild(Q);for(var aa=J.length/C,S=0;S<aa;S++){for(var P=document.createElement("tr"),X=0;X<C;X++)mxUtils.bind(this,function(ha){var fa=document.createElement("td");fa.style.border="0px solid black";fa.style.padding="0px";fa.style.width="16px";fa.style.height="16px";null==ha&&(ha=O);if(null!=ha){fa.style.borderWidth="1px";"none"==ha? -fa.style.background="url('"+Dialog.prototype.noColorImage+"')":fa.style.backgroundColor="#"+ha;var sa=this.colorNames[ha.toUpperCase()];null!=sa&&fa.setAttribute("title",sa)}P.appendChild(fa);null!=ha&&(fa.style.cursor="pointer",mxEvent.addListener(fa,"click",function(){"none"==ha?(u.fromString("ffffff"),k.value="none"):u.fromString(ha)}),mxEvent.addListener(fa,"dblclick",g))})(J[S*C+X]);Q.appendChild(P)}R&&(J=document.createElement("td"),J.setAttribute("title",mxResources.get("reset")),J.style.border= -"1px solid black",J.style.padding="0px",J.style.width="16px",J.style.height="16px",J.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')",J.style.backgroundPosition="center center",J.style.backgroundRepeat="no-repeat",J.style.cursor="pointer",P.appendChild(J),mxEvent.addListener(J,"click",function(){ColorDialog.resetRecentColors();T.parentNode.replaceChild(d(),T)}));m.appendChild(T);return T});f.appendChild(k);if(mxClient.IS_IE||mxClient.IS_IE11)k.style.width="216px";else{k.style.width= +d.destroy()});var u=mxUtils.getOffset(a);d.popup(u.x,u.y+a.offsetHeight,null,n);this.editorUi.setCurrentMenu(d,a)}k=!0;mxEvent.consume(n)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(n){k=null==d||null==d.div||null==d.div.parentNode;n.preventDefault()}))}};Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.style.maxWidth="100%";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorDialog=function(a,b,f,e){function g(){var I=k.value;/(^#?[a-zA-Z0-9]*$)/.test(I)? +("none"!=I&&"#"!=I.charAt(0)&&(I="#"+I),ColorDialog.addRecentColor("none"!=I?I.substring(1):I,12),n(I),a.hideDialog()):a.handleError({message:mxResources.get("invalidInput")})}function d(){var I=r(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);I.style.marginBottom="8px";return I}this.editorUi=a;var k=document.createElement("input");k.style.marginBottom="10px";mxClient.IS_IE&&(k.style.marginTop="10px",document.body.appendChild(k));var n=null!=f?f:this.createApplyFunction(); +this.init=function(){mxClient.IS_TOUCH||k.focus()};var u=new mxJSColor.color(k);u.pickerOnfocus=!1;u.showPicker();f=document.createElement("div");mxJSColor.picker.box.style.position="relative";mxJSColor.picker.box.style.width="230px";mxJSColor.picker.box.style.height="100px";mxJSColor.picker.box.style.paddingBottom="10px";f.appendChild(mxJSColor.picker.box);var m=document.createElement("center"),r=mxUtils.bind(this,function(I,C,N,R){C=null!=C?C:12;var S=document.createElement("table");S.style.borderCollapse= +"collapse";S.setAttribute("cellspacing","0");S.style.marginBottom="20px";S.style.cellSpacing="0px";S.style.marginLeft="1px";var Q=document.createElement("tbody");S.appendChild(Q);for(var aa=I.length/C,U=0;U<aa;U++){for(var P=document.createElement("tr"),Y=0;Y<C;Y++)mxUtils.bind(this,function(ja){var fa=document.createElement("td");fa.style.border="0px solid black";fa.style.padding="0px";fa.style.width="16px";fa.style.height="16px";null==ja&&(ja=N);if(null!=ja){fa.style.borderWidth="1px";"none"==ja? +fa.style.background="url('"+Dialog.prototype.noColorImage+"')":fa.style.backgroundColor="#"+ja;var ra=this.colorNames[ja.toUpperCase()];null!=ra&&fa.setAttribute("title",ra)}P.appendChild(fa);null!=ja&&(fa.style.cursor="pointer",mxEvent.addListener(fa,"click",function(){"none"==ja?(u.fromString("ffffff"),k.value="none"):u.fromString(ja)}),mxEvent.addListener(fa,"dblclick",g))})(I[U*C+Y]);Q.appendChild(P)}R&&(I=document.createElement("td"),I.setAttribute("title",mxResources.get("reset")),I.style.border= +"1px solid black",I.style.padding="0px",I.style.width="16px",I.style.height="16px",I.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')",I.style.backgroundPosition="center center",I.style.backgroundRepeat="no-repeat",I.style.cursor="pointer",P.appendChild(I),mxEvent.addListener(I,"click",function(){ColorDialog.resetRecentColors();S.parentNode.replaceChild(d(),S)}));m.appendChild(S);return S});f.appendChild(k);if(mxClient.IS_IE||mxClient.IS_IE11)k.style.width="216px";else{k.style.width= "182px";var x=document.createElement("input");x.setAttribute("type","color");x.style.visibility="hidden";x.style.width="0px";x.style.height="0px";x.style.border="none";x.style.marginLeft="2px";f.style.whiteSpace="nowrap";f.appendChild(x);f.appendChild(mxUtils.button("...",function(){document.activeElement==x?k.focus():(x.value="#"+k.value,x.click())}));mxEvent.addListener(x,"input",function(){u.fromString(x.value.substring(1))})}mxUtils.br(f);d();var B=r(this.presetColors);B.style.marginBottom="8px"; B=r(this.defaultColors);B.style.marginBottom="16px";f.appendChild(m);B=document.createElement("div");B.style.textAlign="right";B.style.whiteSpace="nowrap";var D=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=e&&e()});D.className="geBtn";a.editor.cancelFirst&&B.appendChild(D);var F=mxUtils.button(mxResources.get("apply"),g);F.className="geBtn gePrimaryBtn";B.appendChild(F);a.editor.cancelFirst||B.appendChild(D);null!=b&&("none"==b?(u.fromString("ffffff"),k.value="none"):u.fromString(b)); -f.appendChild(B);this.picker=u;this.colorInput=k;mxEvent.addListener(f,"keydown",function(J){27==J.keyCode&&(a.hideDialog(),null!=e&&e(),mxEvent.consume(J))});this.container=f};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" ");ColorDialog.prototype.colorNames={};ColorDialog.prototype.defaultColors="none FFFFFF E6E6E6 CCCCCC B3B3B3 999999 808080 666666 4D4D4D 333333 1A1A1A 000000 FFCCCC FFE6CC FFFFCC E6FFCC CCFFCC CCFFE6 CCFFFF CCE5FF CCCCFF E5CCFF FFCCFF FFCCE6 FF9999 FFCC99 FFFF99 CCFF99 99FF99 99FFCC 99FFFF 99CCFF 9999FF CC99FF FF99FF FF99CC FF6666 FFB366 FFFF66 B3FF66 66FF66 66FFB3 66FFFF 66B2FF 6666FF B266FF FF66FF FF66B3 FF3333 FF9933 FFFF33 99FF33 33FF33 33FF99 33FFFF 3399FF 3333FF 9933FF FF33FF FF3399 FF0000 FF8000 FFFF00 80FF00 00FF00 00FF80 00FFFF 007FFF 0000FF 7F00FF FF00FF FF0080 CC0000 CC6600 CCCC00 66CC00 00CC00 00CC66 00CCCC 0066CC 0000CC 6600CC CC00CC CC0066 990000 994C00 999900 4D9900 009900 00994D 009999 004C99 000099 4C0099 990099 99004D 660000 663300 666600 336600 006600 006633 006666 003366 000066 330066 660066 660033 330000 331A00 333300 1A3300 003300 00331A 003333 001933 000033 190033 330033 33001A".split(" "); +f.appendChild(B);this.picker=u;this.colorInput=k;mxEvent.addListener(f,"keydown",function(I){27==I.keyCode&&(a.hideDialog(),null!=e&&e(),mxEvent.consume(I))});this.container=f};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" ");ColorDialog.prototype.colorNames={};ColorDialog.prototype.defaultColors="none FFFFFF E6E6E6 CCCCCC B3B3B3 999999 808080 666666 4D4D4D 333333 1A1A1A 000000 FFCCCC FFE6CC FFFFCC E6FFCC CCFFCC CCFFE6 CCFFFF CCE5FF CCCCFF E5CCFF FFCCFF FFCCE6 FF9999 FFCC99 FFFF99 CCFF99 99FF99 99FFCC 99FFFF 99CCFF 9999FF CC99FF FF99FF FF99CC FF6666 FFB366 FFFF66 B3FF66 66FF66 66FFB3 66FFFF 66B2FF 6666FF B266FF FF66FF FF66B3 FF3333 FF9933 FFFF33 99FF33 33FF33 33FF99 33FFFF 3399FF 3333FF 9933FF FF33FF FF3399 FF0000 FF8000 FFFF00 80FF00 00FF00 00FF80 00FFFF 007FFF 0000FF 7F00FF FF00FF FF0080 CC0000 CC6600 CCCC00 66CC00 00CC00 00CC66 00CCCC 0066CC 0000CC 6600CC CC00CC CC0066 990000 994C00 999900 4D9900 009900 00994D 009999 004C99 000099 4C0099 990099 99004D 660000 663300 666600 336600 006600 006633 006666 003366 000066 330066 660066 660033 330000 331A00 333300 1A3300 003300 00331A 003333 001933 000033 190033 330033 33001A".split(" "); ColorDialog.prototype.createApplyFunction=function(){return mxUtils.bind(this,function(a){var b=this.editorUi.editor.graph;b.getModel().beginUpdate();try{b.setCellStyles(this.currentColorKey,a),this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[this.currentColorKey],"values",[a],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}})};ColorDialog.recentColors=[]; ColorDialog.addRecentColor=function(a,b){null!=a&&(mxUtils.remove(a,ColorDialog.recentColors),ColorDialog.recentColors.splice(0,0,a),ColorDialog.recentColors.length>=b&&ColorDialog.recentColors.pop())};ColorDialog.resetRecentColors=function(){ColorDialog.recentColors=[]}; var AboutDialog=function(a){var b=document.createElement("div");b.setAttribute("align","center");var f=document.createElement("h3");mxUtils.write(f,mxResources.get("about")+" GraphEditor");b.appendChild(f);f=document.createElement("img");f.style.border="0px";f.setAttribute("width","176");f.setAttribute("width","151");f.setAttribute("src",IMAGE_PATH+"/logo.png");b.appendChild(f);mxUtils.br(b);mxUtils.write(b,"Powered by mxGraph "+mxClient.VERSION);mxUtils.br(b);f=document.createElement("a");f.setAttribute("href", "http://www.jgraph.com/");f.setAttribute("target","_blank");mxUtils.write(f,"www.jgraph.com");b.appendChild(f);mxUtils.br(b);mxUtils.br(b);f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn gePrimaryBtn";b.appendChild(f);this.container=b},TextareaDialog=function(a,b,f,e,g,d,k,n,u,m,r,x,B,D,F){m=null!=m?m:!1;k=document.createElement("div");k.style.position="absolute";k.style.top="20px";k.style.bottom="20px";k.style.left="20px";k.style.right="20px";n=document.createElement("div"); -n.style.position="absolute";n.style.left="0px";n.style.right="0px";var J=n.cloneNode(!1),C=n.cloneNode(!1);n.style.top="0px";n.style.height="20px";J.style.top="20px";J.style.bottom="64px";C.style.bottom="0px";C.style.height="60px";C.style.textAlign="center";mxUtils.write(n,b);k.appendChild(n);k.appendChild(J);k.appendChild(C);null!=F&&n.appendChild(F);var O=document.createElement("textarea");r&&O.setAttribute("wrap","off");O.setAttribute("spellcheck","false");O.setAttribute("autocorrect","off");O.setAttribute("autocomplete", -"off");O.setAttribute("autocapitalize","off");mxUtils.write(O,f||"");O.style.resize="none";O.style.outline="none";O.style.position="absolute";O.style.boxSizing="border-box";O.style.top="0px";O.style.left="0px";O.style.height="100%";O.style.width="100%";this.textarea=O;this.init=function(){O.focus();O.scrollTop=0};J.appendChild(O);null!=B&&(b=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(B)}),b.className="geBtn",C.appendChild(b));if(null!=D)for(b=0;b<D.length;b++)(function(T, -Q,aa){T=mxUtils.button(T,function(S){Q(S,O)});null!=aa&&T.setAttribute("title",aa);T.className="geBtn";C.appendChild(T)})(D[b][0],D[b][1],D[b][2]);d=mxUtils.button(d||mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});d.setAttribute("title","Escape");d.className="geBtn";a.editor.cancelFirst&&C.appendChild(d);null!=u&&u(C,O);if(null!=e){var R=mxUtils.button(x||mxResources.get("apply"),function(){m||a.hideDialog();e(O.value)});R.setAttribute("title","Ctrl+Enter");R.className="geBtn gePrimaryBtn"; -C.appendChild(R);mxEvent.addListener(O,"keypress",function(T){13==T.keyCode&&mxEvent.isControlDown(T)&&R.click()})}a.editor.cancelFirst||C.appendChild(d);this.container=k},EditDiagramDialog=function(a){var b=document.createElement("div");b.style.textAlign="right";var f=document.createElement("textarea");f.setAttribute("wrap","off");f.setAttribute("spellcheck","false");f.setAttribute("autocorrect","off");f.setAttribute("autocomplete","off");f.setAttribute("autocapitalize","off");f.style.overflow="auto"; +n.style.position="absolute";n.style.left="0px";n.style.right="0px";var I=n.cloneNode(!1),C=n.cloneNode(!1);n.style.top="0px";n.style.height="20px";I.style.top="20px";I.style.bottom="64px";C.style.bottom="0px";C.style.height="60px";C.style.textAlign="center";mxUtils.write(n,b);k.appendChild(n);k.appendChild(I);k.appendChild(C);null!=F&&n.appendChild(F);var N=document.createElement("textarea");r&&N.setAttribute("wrap","off");N.setAttribute("spellcheck","false");N.setAttribute("autocorrect","off");N.setAttribute("autocomplete", +"off");N.setAttribute("autocapitalize","off");mxUtils.write(N,f||"");N.style.resize="none";N.style.outline="none";N.style.position="absolute";N.style.boxSizing="border-box";N.style.top="0px";N.style.left="0px";N.style.height="100%";N.style.width="100%";this.textarea=N;this.init=function(){N.focus();N.scrollTop=0};I.appendChild(N);null!=B&&(b=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(B)}),b.className="geBtn",C.appendChild(b));if(null!=D)for(b=0;b<D.length;b++)(function(S, +Q,aa){S=mxUtils.button(S,function(U){Q(U,N)});null!=aa&&S.setAttribute("title",aa);S.className="geBtn";C.appendChild(S)})(D[b][0],D[b][1],D[b][2]);d=mxUtils.button(d||mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});d.setAttribute("title","Escape");d.className="geBtn";a.editor.cancelFirst&&C.appendChild(d);null!=u&&u(C,N);if(null!=e){var R=mxUtils.button(x||mxResources.get("apply"),function(){m||a.hideDialog();e(N.value)});R.setAttribute("title","Ctrl+Enter");R.className="geBtn gePrimaryBtn"; +C.appendChild(R);mxEvent.addListener(N,"keypress",function(S){13==S.keyCode&&mxEvent.isControlDown(S)&&R.click()})}a.editor.cancelFirst||C.appendChild(d);this.container=k},EditDiagramDialog=function(a){var b=document.createElement("div");b.style.textAlign="right";var f=document.createElement("textarea");f.setAttribute("wrap","off");f.setAttribute("spellcheck","false");f.setAttribute("autocorrect","off");f.setAttribute("autocomplete","off");f.setAttribute("autocapitalize","off");f.style.overflow="auto"; f.style.resize="none";f.style.width="600px";f.style.height="360px";f.style.marginBottom="16px";f.value=mxUtils.getPrettyXml(a.editor.getGraphXml());b.appendChild(f);this.init=function(){f.focus()};Graph.fileSupport&&(f.addEventListener("dragover",function(k){k.stopPropagation();k.preventDefault()},!1),f.addEventListener("drop",function(k){k.stopPropagation();k.preventDefault();if(0<k.dataTransfer.files.length){k=k.dataTransfer.files[0];var n=new FileReader;n.onload=function(u){f.value=u.target.result}; n.readAsText(k)}else f.value=a.extractGraphModelFromEvent(k)},!1));var e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&b.appendChild(e);var g=document.createElement("select");g.style.width="180px";g.className="geBtn";if(a.editor.graph.isEnabled()){var d=document.createElement("option");d.setAttribute("value","replace");mxUtils.write(d,mxResources.get("replaceExistingDrawing"));g.appendChild(d)}d=document.createElement("option");d.setAttribute("value", "new");mxUtils.write(d,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&g.appendChild(d);a.editor.graph.isEnabled()&&(d=document.createElement("option"),d.setAttribute("value","import"),mxUtils.write(d,mxResources.get("addToExistingDrawing")),g.appendChild(d));b.appendChild(g);d=mxUtils.button(mxResources.get("ok"),function(){var k=Graph.zapGremlins(mxUtils.trim(f.value)),n=null;if("new"==g.value)a.hideDialog(),a.editor.editAsNew(k);else if("replace"==g.value){a.editor.graph.model.beginUpdate(); try{a.editor.setGraphXml(mxUtils.parseXml(k).documentElement),a.hideDialog()}catch(x){n=x}finally{a.editor.graph.model.endUpdate()}}else if("import"==g.value){a.editor.graph.model.beginUpdate();try{var u=mxUtils.parseXml(k),m=new mxGraphModel;(new mxCodec(u)).decode(u.documentElement,m);var r=m.getChildren(m.getChildAt(m.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(r));a.hideDialog()}catch(x){n=x}finally{a.editor.graph.model.endUpdate()}}null!=n&&mxUtils.alert(n.message)}); d.className="geBtn gePrimaryBtn";b.appendChild(d);a.editor.cancelFirst||b.appendChild(e);this.container=b};EditDiagramDialog.showNewWindowOption=!0; -var ExportDialog=function(a){function b(){var P=r.value,X=P.lastIndexOf(".");r.value=0<X?P.substring(0,X+1)+x.value:P+"."+x.value;"xml"===x.value?(B.setAttribute("disabled","true"),D.setAttribute("disabled","true"),F.setAttribute("disabled","true"),Q.setAttribute("disabled","true")):(B.removeAttribute("disabled"),D.removeAttribute("disabled"),F.removeAttribute("disabled"),Q.removeAttribute("disabled"));"png"===x.value||"svg"===x.value||"pdf"===x.value?R.removeAttribute("disabled"):R.setAttribute("disabled", -"disabled");"png"===x.value||"jpg"===x.value||"pdf"===x.value?T.removeAttribute("disabled"):T.setAttribute("disabled","disabled");"png"===x.value?(J.removeAttribute("disabled"),C.removeAttribute("disabled")):(J.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"))}function f(){D.style.backgroundColor=D.value*F.value>MAX_AREA||0>=D.value?"red":"";F.style.backgroundColor=D.value*F.value>MAX_AREA||0>=F.value?"red":""}var e=a.editor.graph,g=e.getGraphBounds(),d=e.view.scale,k=Math.ceil(g.width/ +var ExportDialog=function(a){function b(){var P=r.value,Y=P.lastIndexOf(".");r.value=0<Y?P.substring(0,Y+1)+x.value:P+"."+x.value;"xml"===x.value?(B.setAttribute("disabled","true"),D.setAttribute("disabled","true"),F.setAttribute("disabled","true"),Q.setAttribute("disabled","true")):(B.removeAttribute("disabled"),D.removeAttribute("disabled"),F.removeAttribute("disabled"),Q.removeAttribute("disabled"));"png"===x.value||"svg"===x.value||"pdf"===x.value?R.removeAttribute("disabled"):R.setAttribute("disabled", +"disabled");"png"===x.value||"jpg"===x.value||"pdf"===x.value?S.removeAttribute("disabled"):S.setAttribute("disabled","disabled");"png"===x.value?(I.removeAttribute("disabled"),C.removeAttribute("disabled")):(I.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"))}function f(){D.style.backgroundColor=D.value*F.value>MAX_AREA||0>=D.value?"red":"";F.style.backgroundColor=D.value*F.value>MAX_AREA||0>=F.value?"red":""}var e=a.editor.graph,g=e.getGraphBounds(),d=e.view.scale,k=Math.ceil(g.width/ d),n=Math.ceil(g.height/d);d=document.createElement("table");var u=document.createElement("tbody");d.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");g=document.createElement("tr");var m=document.createElement("td");m.style.fontSize="10pt";m.style.width="100px";mxUtils.write(m,mxResources.get("filename")+":");g.appendChild(m);var r=document.createElement("input");r.setAttribute("value",a.editor.getOrCreateFilename());r.style.width="180px";m=document.createElement("td");m.appendChild(r);g.appendChild(m); u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("format")+":");g.appendChild(m);var x=document.createElement("select");x.style.width="180px";m=document.createElement("option");m.setAttribute("value","png");mxUtils.write(m,mxResources.get("formatPng"));x.appendChild(m);m=document.createElement("option");ExportDialog.showGifOption&&(m.setAttribute("value","gif"),mxUtils.write(m,mxResources.get("formatGif")),x.appendChild(m)); m=document.createElement("option");m.setAttribute("value","jpg");mxUtils.write(m,mxResources.get("formatJpg"));x.appendChild(m);a.printPdfExport||(m=document.createElement("option"),m.setAttribute("value","pdf"),mxUtils.write(m,mxResources.get("formatPdf")),x.appendChild(m));m=document.createElement("option");m.setAttribute("value","svg");mxUtils.write(m,mxResources.get("formatSvg"));x.appendChild(m);ExportDialog.showXmlOption&&(m=document.createElement("option"),m.setAttribute("value","xml"),mxUtils.write(m, mxResources.get("formatXml")),x.appendChild(m));m=document.createElement("td");m.appendChild(x);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("zoom")+" (%):");g.appendChild(m);var B=document.createElement("input");B.setAttribute("type","number");B.setAttribute("value","100");B.style.width="180px";m=document.createElement("td");m.appendChild(B);g.appendChild(m);u.appendChild(g);g=document.createElement("tr"); m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("width")+":");g.appendChild(m);var D=document.createElement("input");D.setAttribute("value",k);D.style.width="180px";m=document.createElement("td");m.appendChild(D);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("height")+":");g.appendChild(m);var F=document.createElement("input");F.setAttribute("value",n);F.style.width= -"180px";m=document.createElement("td");m.appendChild(F);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("dpi")+":");g.appendChild(m);var J=document.createElement("select");J.style.width="180px";m=document.createElement("option");m.setAttribute("value","100");mxUtils.write(m,"100dpi");J.appendChild(m);m=document.createElement("option");m.setAttribute("value","200");mxUtils.write(m,"200dpi");J.appendChild(m); -m=document.createElement("option");m.setAttribute("value","300");mxUtils.write(m,"300dpi");J.appendChild(m);m=document.createElement("option");m.setAttribute("value","400");mxUtils.write(m,"400dpi");J.appendChild(m);m=document.createElement("option");m.setAttribute("value","custom");mxUtils.write(m,mxResources.get("custom"));J.appendChild(m);var C=document.createElement("input");C.style.width="180px";C.style.display="none";C.setAttribute("value","100");C.setAttribute("type","number");C.setAttribute("min", -"50");C.setAttribute("step","50");var O=!1;mxEvent.addListener(J,"change",function(){"custom"==this.value?(this.style.display="none",C.style.display="",C.focus()):(C.value=this.value,O||(B.value=this.value))});mxEvent.addListener(C,"change",function(){var P=parseInt(C.value);isNaN(P)||0>=P?C.style.backgroundColor="red":(C.style.backgroundColor="",O||(B.value=P))});m=document.createElement("td");m.appendChild(J);m.appendChild(C);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td"); +"180px";m=document.createElement("td");m.appendChild(F);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("dpi")+":");g.appendChild(m);var I=document.createElement("select");I.style.width="180px";m=document.createElement("option");m.setAttribute("value","100");mxUtils.write(m,"100dpi");I.appendChild(m);m=document.createElement("option");m.setAttribute("value","200");mxUtils.write(m,"200dpi");I.appendChild(m); +m=document.createElement("option");m.setAttribute("value","300");mxUtils.write(m,"300dpi");I.appendChild(m);m=document.createElement("option");m.setAttribute("value","400");mxUtils.write(m,"400dpi");I.appendChild(m);m=document.createElement("option");m.setAttribute("value","custom");mxUtils.write(m,mxResources.get("custom"));I.appendChild(m);var C=document.createElement("input");C.style.width="180px";C.style.display="none";C.setAttribute("value","100");C.setAttribute("type","number");C.setAttribute("min", +"50");C.setAttribute("step","50");var N=!1;mxEvent.addListener(I,"change",function(){"custom"==this.value?(this.style.display="none",C.style.display="",C.focus()):(C.value=this.value,N||(B.value=this.value))});mxEvent.addListener(C,"change",function(){var P=parseInt(C.value);isNaN(P)||0>=P?C.style.backgroundColor="red":(C.style.backgroundColor="",N||(B.value=P))});m=document.createElement("td");m.appendChild(I);m.appendChild(C);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td"); m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("background")+":");g.appendChild(m);var R=document.createElement("input");R.setAttribute("type","checkbox");R.checked=null==e.background||e.background==mxConstants.NONE;m=document.createElement("td");m.appendChild(R);mxUtils.write(m,mxResources.get("transparent"));g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("grid")+":");g.appendChild(m); -var T=document.createElement("input");T.setAttribute("type","checkbox");T.checked=!1;m=document.createElement("td");m.appendChild(T);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("borderWidth")+":");g.appendChild(m);var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("value",ExportDialog.lastBorderValue);Q.style.width="180px";m=document.createElement("td");m.appendChild(Q); -g.appendChild(m);u.appendChild(g);d.appendChild(u);mxEvent.addListener(x,"change",b);b();mxEvent.addListener(B,"change",function(){O=!0;var P=Math.max(0,parseFloat(B.value)||100)/100;B.value=parseFloat((100*P).toFixed(2));0<k?(D.value=Math.floor(k*P),F.value=Math.floor(n*P)):(B.value="100",D.value=k,F.value=n);f()});mxEvent.addListener(D,"change",function(){var P=parseInt(D.value)/k;0<P?(B.value=parseFloat((100*P).toFixed(2)),F.value=Math.floor(n*P)):(B.value="100",D.value=k,F.value=n);f()});mxEvent.addListener(F, -"change",function(){var P=parseInt(F.value)/n;0<P?(B.value=parseFloat((100*P).toFixed(2)),D.value=Math.floor(k*P)):(B.value="100",D.value=k,F.value=n);f()});g=document.createElement("tr");m=document.createElement("td");m.setAttribute("align","right");m.style.paddingTop="22px";m.colSpan=2;var aa=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(B.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var P=r.value,X=x.value,ha=Math.max(0,parseFloat(B.value)|| -100)/100,fa=Math.max(0,parseInt(Q.value)),sa=e.background,K=Math.max(1,parseInt(C.value));if(("svg"==X||"png"==X||"pdf"==X)&&R.checked)sa=null;else if(null==sa||sa==mxConstants.NONE)sa="#ffffff";ExportDialog.lastBorderValue=fa;ExportDialog.exportFile(a,P,X,sa,ha,fa,K,T.checked)}}));aa.className="geBtn gePrimaryBtn";var S=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});S.className="geBtn";a.editor.cancelFirst?(m.appendChild(S),m.appendChild(aa)):(m.appendChild(aa),m.appendChild(S)); +var S=document.createElement("input");S.setAttribute("type","checkbox");S.checked=!1;m=document.createElement("td");m.appendChild(S);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("borderWidth")+":");g.appendChild(m);var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("value",ExportDialog.lastBorderValue);Q.style.width="180px";m=document.createElement("td");m.appendChild(Q); +g.appendChild(m);u.appendChild(g);d.appendChild(u);mxEvent.addListener(x,"change",b);b();mxEvent.addListener(B,"change",function(){N=!0;var P=Math.max(0,parseFloat(B.value)||100)/100;B.value=parseFloat((100*P).toFixed(2));0<k?(D.value=Math.floor(k*P),F.value=Math.floor(n*P)):(B.value="100",D.value=k,F.value=n);f()});mxEvent.addListener(D,"change",function(){var P=parseInt(D.value)/k;0<P?(B.value=parseFloat((100*P).toFixed(2)),F.value=Math.floor(n*P)):(B.value="100",D.value=k,F.value=n);f()});mxEvent.addListener(F, +"change",function(){var P=parseInt(F.value)/n;0<P?(B.value=parseFloat((100*P).toFixed(2)),D.value=Math.floor(k*P)):(B.value="100",D.value=k,F.value=n);f()});g=document.createElement("tr");m=document.createElement("td");m.setAttribute("align","right");m.style.paddingTop="22px";m.colSpan=2;var aa=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(B.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var P=r.value,Y=x.value,ja=Math.max(0,parseFloat(B.value)|| +100)/100,fa=Math.max(0,parseInt(Q.value)),ra=e.background,K=Math.max(1,parseInt(C.value));if(("svg"==Y||"png"==Y||"pdf"==Y)&&R.checked)ra=null;else if(null==ra||ra==mxConstants.NONE)ra="#ffffff";ExportDialog.lastBorderValue=fa;ExportDialog.exportFile(a,P,Y,ra,ja,fa,K,S.checked)}}));aa.className="geBtn gePrimaryBtn";var U=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});U.className="geBtn";a.editor.cancelFirst?(m.appendChild(U),m.appendChild(aa)):(m.appendChild(aa),m.appendChild(U)); g.appendChild(m);u.appendChild(g);d.appendChild(u);this.container=d};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0; ExportDialog.exportFile=function(a,b,f,e,g,d,k,n){n=a.editor.graph;if("xml"==f)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),b,f);else if("svg"==f)ExportDialog.saveLocalFile(a,mxUtils.getXml(n.getSvg(e,g,d)),b,f);else{var u=n.getGraphBounds(),m=mxUtils.createXmlDocument(),r=m.createElement("output");m.appendChild(r);m=new mxXmlCanvas2D(r);m.translate(Math.floor((d/g-u.x)/n.view.scale),Math.floor((d/g-u.y)/n.view.scale));m.scale(g/n.view.scale);(new mxImageExport).drawState(n.getView().getState(n.model.root), m);r="xml="+encodeURIComponent(mxUtils.getXml(r));m=Math.ceil(u.width*g/n.view.scale+2*d);g=Math.ceil(u.height*g/n.view.scale+2*d);r.length<=MAX_REQUEST_SIZE&&m*g<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+f+"&filename="+encodeURIComponent(b)+"&bg="+(null!=e?e:"none")+"&w="+m+"&h="+g+"&"+r+"&dpi="+k)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}}; ExportDialog.saveLocalFile=function(a,b,f,e){b.length<MAX_REQUEST_SIZE?(a.hideDialog(),(new mxXmlRequest(SAVE_URL,"xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(f)+"&format="+e)).simulate(document,"_blank")):(mxUtils.alert(mxResources.get("drawingTooLarge")),mxUtils.popup(xml))}; -var EditDataDialog=function(a,b){function f(){0<T.value.length?Q.removeAttribute("disabled"):Q.setAttribute("disabled","disabled")}var e=document.createElement("div"),g=a.editor.graph,d=g.getModel().getValue(b);if(!mxUtils.isNode(d)){var k=mxUtils.createXmlDocument().createElement("object");k.setAttribute("label",d||"");d=k}var n={};try{var u=mxUtils.getValue(a.editor.graph.getCurrentCellStyle(b),"metaData",null);null!=u&&(n=JSON.parse(u))}catch(S){}var m=new mxForm("properties");m.table.style.width= -"100%";var r=d.attributes,x=[],B=[],D=0,F=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,J=function(S,P){var X=document.createElement("div");X.style.position="relative";X.style.paddingRight="20px";X.style.boxSizing="border-box";X.style.width="100%";var ha=document.createElement("a"),fa=mxUtils.createImage(Dialog.prototype.closeImage);fa.style.height="9px";fa.style.fontSize="9px";fa.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";ha.className="geButton";ha.setAttribute("title", -mxResources.get("delete"));ha.style.position="absolute";ha.style.top="4px";ha.style.right="0px";ha.style.margin="0px";ha.style.width="9px";ha.style.height="9px";ha.style.cursor="pointer";ha.appendChild(fa);P=function(sa){return function(){for(var K=0,V=0;V<x.length;V++){if(x[V]==sa){B[V]=null;m.table.deleteRow(K+(null!=F?1:0));break}null!=B[V]&&K++}}}(P);mxEvent.addListener(ha,"click",P);P=S.parentNode;X.appendChild(S);X.appendChild(ha);P.appendChild(X)};k=function(S,P,X){x[S]=P;B[S]=m.addTextarea(x[D]+ -":",X,2);B[S].style.width="100%";0<X.indexOf("\n")&&B[S].setAttribute("rows","2");J(B[S],P);null!=n[P]&&0==n[P].editable&&B[S].setAttribute("disabled","disabled")};u=[];for(var C=g.getModel().getParent(b)==g.getModel().getRoot(),O=0;O<r.length;O++)("label"!=r[O].nodeName||Graph.translateDiagram||C)&&"placeholders"!=r[O].nodeName&&u.push({name:r[O].nodeName,value:r[O].nodeValue});u.sort(function(S,P){return S.name<P.name?-1:S.name>P.name?1:0});if(null!=F){r=document.createElement("div");r.style.width= -"100%";r.style.fontSize="11px";r.style.textAlign="center";mxUtils.write(r,F);var R=m.addField(mxResources.get("id")+":",r);mxEvent.addListener(r,"dblclick",function(S){mxEvent.isShiftDown(S)&&(S=new FilenameDialog(a,F,mxResources.get("apply"),mxUtils.bind(this,function(P){null!=P&&0<P.length&&P!=F&&(null==g.getModel().getCell(P)?(g.getModel().cellRemoved(b),b.setId(P),F=P,R.innerHTML=mxUtils.htmlEntities(P),g.getModel().cellAdded(b)):a.handleError({message:mxResources.get("alreadyExst",[P])}))}), -mxResources.get("id")),a.showDialog(S.container,300,80,!0,!0),S.init())});r.setAttribute("title","Shift+Double Click to Edit ID")}for(O=0;O<u.length;O++)k(D,u[O].name,u[O].value),D++;u=document.createElement("div");u.style.position="absolute";u.style.top="30px";u.style.left="30px";u.style.right="30px";u.style.bottom="80px";u.style.overflowY="auto";u.appendChild(m.table);k=document.createElement("div");k.style.boxSizing="border-box";k.style.paddingRight="160px";k.style.whiteSpace="nowrap";k.style.marginTop= -"6px";k.style.width="100%";var T=document.createElement("input");T.setAttribute("placeholder",mxResources.get("enterPropertyName"));T.setAttribute("type","text");T.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");T.style.boxSizing="border-box";T.style.marginLeft="2px";T.style.width="100%";k.appendChild(T);u.appendChild(k);e.appendChild(u);var Q=mxUtils.button(mxResources.get("addProperty"),function(){var S=T.value;if(0<S.length&&"label"!=S&&"placeholders"!=S&&0>S.indexOf(":"))try{var P= -mxUtils.indexOf(x,S);if(0<=P&&null!=B[P])B[P].focus();else{d.cloneNode(!1).setAttribute(S,"");0<=P&&(x.splice(P,1),B.splice(P,1));x.push(S);var X=m.addTextarea(S+":","",2);X.style.width="100%";B.push(X);J(X,S);X.focus()}Q.setAttribute("disabled","disabled");T.value=""}catch(ha){mxUtils.alert(ha)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(T,"keypress",function(S){13==S.keyCode&&Q.click()});this.init=function(){0<B.length?B[0].focus():T.focus()};Q.setAttribute("title", -mxResources.get("addProperty"));Q.setAttribute("disabled","disabled");Q.style.textOverflow="ellipsis";Q.style.position="absolute";Q.style.overflow="hidden";Q.style.width="144px";Q.style.right="0px";Q.className="geBtn";k.appendChild(Q);u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});u.setAttribute("title","Escape");u.className="geBtn";var aa=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);d=d.cloneNode(!0);for(var S=!1, -P=0;P<x.length;P++)null==B[P]?d.removeAttribute(x[P]):(d.setAttribute(x[P],B[P].value),S=S||"placeholder"==x[P]&&"1"==d.getAttribute("placeholders"));S&&d.removeAttribute("label");g.getModel().setValue(b,d)}catch(X){mxUtils.alert(X)}});aa.setAttribute("title","Ctrl+Enter");aa.className="geBtn gePrimaryBtn";mxEvent.addListener(e,"keypress",function(S){13==S.keyCode&&mxEvent.isControlDown(S)&&aa.click()});mxEvent.addListener(T,"keyup",f);mxEvent.addListener(T,"change",f);k=document.createElement("div"); +var EditDataDialog=function(a,b){function f(){0<S.value.length?Q.removeAttribute("disabled"):Q.setAttribute("disabled","disabled")}var e=document.createElement("div"),g=a.editor.graph,d=g.getModel().getValue(b);if(!mxUtils.isNode(d)){var k=mxUtils.createXmlDocument().createElement("object");k.setAttribute("label",d||"");d=k}var n={};try{var u=mxUtils.getValue(a.editor.graph.getCurrentCellStyle(b),"metaData",null);null!=u&&(n=JSON.parse(u))}catch(U){}var m=new mxForm("properties");m.table.style.width= +"100%";var r=d.attributes,x=[],B=[],D=0,F=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,I=function(U,P){var Y=document.createElement("div");Y.style.position="relative";Y.style.paddingRight="20px";Y.style.boxSizing="border-box";Y.style.width="100%";var ja=document.createElement("a"),fa=mxUtils.createImage(Dialog.prototype.closeImage);fa.style.height="9px";fa.style.fontSize="9px";fa.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";ja.className="geButton";ja.setAttribute("title", +mxResources.get("delete"));ja.style.position="absolute";ja.style.top="4px";ja.style.right="0px";ja.style.margin="0px";ja.style.width="9px";ja.style.height="9px";ja.style.cursor="pointer";ja.appendChild(fa);P=function(ra){return function(){for(var K=0,V=0;V<x.length;V++){if(x[V]==ra){B[V]=null;m.table.deleteRow(K+(null!=F?1:0));break}null!=B[V]&&K++}}}(P);mxEvent.addListener(ja,"click",P);P=U.parentNode;Y.appendChild(U);Y.appendChild(ja);P.appendChild(Y)};k=function(U,P,Y){x[U]=P;B[U]=m.addTextarea(x[D]+ +":",Y,2);B[U].style.width="100%";0<Y.indexOf("\n")&&B[U].setAttribute("rows","2");I(B[U],P);null!=n[P]&&0==n[P].editable&&B[U].setAttribute("disabled","disabled")};u=[];for(var C=g.getModel().getParent(b)==g.getModel().getRoot(),N=0;N<r.length;N++)("label"!=r[N].nodeName||Graph.translateDiagram||C)&&"placeholders"!=r[N].nodeName&&u.push({name:r[N].nodeName,value:r[N].nodeValue});u.sort(function(U,P){return U.name<P.name?-1:U.name>P.name?1:0});if(null!=F){r=document.createElement("div");r.style.width= +"100%";r.style.fontSize="11px";r.style.textAlign="center";mxUtils.write(r,F);var R=m.addField(mxResources.get("id")+":",r);mxEvent.addListener(r,"dblclick",function(U){mxEvent.isShiftDown(U)&&(U=new FilenameDialog(a,F,mxResources.get("apply"),mxUtils.bind(this,function(P){null!=P&&0<P.length&&P!=F&&(null==g.getModel().getCell(P)?(g.getModel().cellRemoved(b),b.setId(P),F=P,R.innerHTML=mxUtils.htmlEntities(P),g.getModel().cellAdded(b)):a.handleError({message:mxResources.get("alreadyExst",[P])}))}), +mxResources.get("id")),a.showDialog(U.container,300,80,!0,!0),U.init())});r.setAttribute("title","Shift+Double Click to Edit ID")}for(N=0;N<u.length;N++)k(D,u[N].name,u[N].value),D++;u=document.createElement("div");u.style.position="absolute";u.style.top="30px";u.style.left="30px";u.style.right="30px";u.style.bottom="80px";u.style.overflowY="auto";u.appendChild(m.table);k=document.createElement("div");k.style.boxSizing="border-box";k.style.paddingRight="160px";k.style.whiteSpace="nowrap";k.style.marginTop= +"6px";k.style.width="100%";var S=document.createElement("input");S.setAttribute("placeholder",mxResources.get("enterPropertyName"));S.setAttribute("type","text");S.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");S.style.boxSizing="border-box";S.style.marginLeft="2px";S.style.width="100%";k.appendChild(S);u.appendChild(k);e.appendChild(u);var Q=mxUtils.button(mxResources.get("addProperty"),function(){var U=S.value;if(0<U.length&&"label"!=U&&"placeholders"!=U&&0>U.indexOf(":"))try{var P= +mxUtils.indexOf(x,U);if(0<=P&&null!=B[P])B[P].focus();else{d.cloneNode(!1).setAttribute(U,"");0<=P&&(x.splice(P,1),B.splice(P,1));x.push(U);var Y=m.addTextarea(U+":","",2);Y.style.width="100%";B.push(Y);I(Y,U);Y.focus()}Q.setAttribute("disabled","disabled");S.value=""}catch(ja){mxUtils.alert(ja)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(S,"keypress",function(U){13==U.keyCode&&Q.click()});this.init=function(){0<B.length?B[0].focus():S.focus()};Q.setAttribute("title", +mxResources.get("addProperty"));Q.setAttribute("disabled","disabled");Q.style.textOverflow="ellipsis";Q.style.position="absolute";Q.style.overflow="hidden";Q.style.width="144px";Q.style.right="0px";Q.className="geBtn";k.appendChild(Q);u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});u.setAttribute("title","Escape");u.className="geBtn";var aa=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);d=d.cloneNode(!0);for(var U=!1, +P=0;P<x.length;P++)null==B[P]?d.removeAttribute(x[P]):(d.setAttribute(x[P],B[P].value),U=U||"placeholder"==x[P]&&"1"==d.getAttribute("placeholders"));U&&d.removeAttribute("label");g.getModel().setValue(b,d)}catch(Y){mxUtils.alert(Y)}});aa.setAttribute("title","Ctrl+Enter");aa.className="geBtn gePrimaryBtn";mxEvent.addListener(e,"keypress",function(U){13==U.keyCode&&mxEvent.isControlDown(U)&&aa.click()});mxEvent.addListener(S,"keyup",f);mxEvent.addListener(S,"change",f);k=document.createElement("div"); k.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(b)||a.editor.graph.getModel().isEdge(b))r=document.createElement("span"),r.style.marginRight="10px",C=document.createElement("input"),C.setAttribute("type","checkbox"),C.style.marginRight="6px","1"==d.getAttribute("placeholders")&&(C.setAttribute("checked","checked"),C.defaultChecked=!0),mxEvent.addListener(C,"click",function(){"1"==d.getAttribute("placeholders")? -d.removeAttribute("placeholders"):d.setAttribute("placeholders","1")}),r.appendChild(C),mxUtils.write(r,mxResources.get("placeholders")),null!=EditDataDialog.placeholderHelpLink&&(C=document.createElement("a"),C.setAttribute("href",EditDataDialog.placeholderHelpLink),C.setAttribute("title",mxResources.get("help")),C.setAttribute("target","_blank"),C.style.marginLeft="8px",C.style.cursor="help",O=document.createElement("img"),mxUtils.setOpacity(O,50),O.style.height="16px",O.style.width="16px",O.setAttribute("border", -"0"),O.setAttribute("valign","middle"),O.style.marginTop=mxClient.IS_IE11?"0px":"-4px",O.setAttribute("src",Editor.helpImage),C.appendChild(O),r.appendChild(C)),k.appendChild(r);a.editor.cancelFirst?(k.appendChild(u),k.appendChild(aa)):(k.appendChild(aa),k.appendChild(u));e.appendChild(k);this.container=e};EditDataDialog.getDisplayIdForCell=function(a,b){var f=null;null!=a.editor.graph.getModel().getParent(b)&&(f=b.getId());return f};EditDataDialog.placeholderHelpLink=null; +d.removeAttribute("placeholders"):d.setAttribute("placeholders","1")}),r.appendChild(C),mxUtils.write(r,mxResources.get("placeholders")),null!=EditDataDialog.placeholderHelpLink&&(C=document.createElement("a"),C.setAttribute("href",EditDataDialog.placeholderHelpLink),C.setAttribute("title",mxResources.get("help")),C.setAttribute("target","_blank"),C.style.marginLeft="8px",C.style.cursor="help",N=document.createElement("img"),mxUtils.setOpacity(N,50),N.style.height="16px",N.style.width="16px",N.setAttribute("border", +"0"),N.setAttribute("valign","middle"),N.style.marginTop=mxClient.IS_IE11?"0px":"-4px",N.setAttribute("src",Editor.helpImage),C.appendChild(N),r.appendChild(C)),k.appendChild(r);a.editor.cancelFirst?(k.appendChild(u),k.appendChild(aa)):(k.appendChild(aa),k.appendChild(u));e.appendChild(k);this.container=e};EditDataDialog.getDisplayIdForCell=function(a,b){var f=null;null!=a.editor.graph.getModel().getParent(b)&&(f=b.getId());return f};EditDataDialog.placeholderHelpLink=null; var LinkDialog=function(a,b,f,e){var g=document.createElement("div");mxUtils.write(g,mxResources.get("editLink")+":");var d=document.createElement("div");d.className="geTitle";d.style.backgroundColor="transparent";d.style.borderColor="transparent";d.style.whiteSpace="nowrap";d.style.textOverflow="clip";d.style.cursor="default";d.style.paddingRight="20px";var k=document.createElement("input");k.setAttribute("value",b);k.setAttribute("placeholder","http://www.example.com/");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";b=document.createElement("div");b.setAttribute("title",mxResources.get("reset"));b.style.position="relative";b.style.left="-16px";b.style.width="12px";b.style.height="14px";b.style.cursor="pointer";b.style.display="inline-block";b.style.top="3px";b.style.background="url("+IMAGE_PATH+"/transparent.gif)"; mxEvent.addListener(b,"click",function(){k.value="";k.focus()});d.appendChild(k);d.appendChild(b);g.appendChild(d);this.init=function(){k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)};d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="right";mxEvent.addListener(k,"keypress",function(n){13==n.keyCode&&(a.hideDialog(),e(k.value))});b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}); b.className="geBtn";a.editor.cancelFirst&&d.appendChild(b);f=mxUtils.button(f,function(){a.hideDialog();e(k.value)});f.className="geBtn gePrimaryBtn";d.appendChild(f);a.editor.cancelFirst||d.appendChild(b);g.appendChild(d);this.container=g},OutlineWindow=function(a,b,f,e,g){var d=a.editor.graph,k=document.createElement("div");k.style.position="absolute";k.style.width="100%";k.style.height="100%";k.style.overflow="hidden";this.window=new mxWindow(mxResources.get("outline"),k,b,f,e,g,!0,!0);this.window.minimumSize= new mxRectangle(0,0,80,80);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);var n=a.createOutline(this.window);a.installResizeHandler(this,!0,function(){n.destroy()});this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit();n.setSuspended(!1)}));this.window.addListener(mxEvent.HIDE,mxUtils.bind(this,function(){n.setSuspended(!0)}));this.window.addListener(mxEvent.NORMALIZE,mxUtils.bind(this, -function(){n.setSuspended(!1)}));this.window.addListener(mxEvent.MINIMIZE,mxUtils.bind(this,function(){n.setSuspended(!0)}));n.init(k);mxEvent.addMouseWheelListener(function(u,m){for(var r=!1,x=mxEvent.getSource(u);null!=x;){if(x==n.svg){r=!0;break}x=x.parentNode}r&&(r=d.zoomFactor,null!=u.deltaY&&Math.round(u.deltaY)!=u.deltaY&&(r=1+Math.abs(u.deltaY)/20*(r-1)),d.lazyZoom(m,null,null,r),mxEvent.consume(u))})},LayersWindow=function(a,b,f,e,g){function d(X){if(u.isEnabled()&&null!=X){var ha=u.convertValueToString(X); -ha=new FilenameDialog(a,ha||mxResources.get("background"),mxResources.get("rename"),mxUtils.bind(this,function(fa){null!=fa&&u.cellLabelChanged(X,fa)}),mxResources.get("enterName"));a.showDialog(ha.container,300,100,!0,!0);ha.init()}}function k(){var X=S.get(u.getLayerForCells(u.getSelectionCells()));null!=X?X.appendChild(P):null!=P.parentNode&&P.parentNode.removeChild(P)}function n(){function X(sa,K,V,G){var M=document.createElement("div");M.className="geToolbarContainer";S.put(V,M);M.style.overflow= -"hidden";M.style.position="relative";M.style.padding="4px";M.style.height="22px";M.style.display="block";M.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";M.style.borderWidth="0px 0px 1px 0px";M.style.borderColor="#c3c3c3";M.style.borderStyle="solid";M.style.whiteSpace="nowrap";M.setAttribute("title",K);var U=document.createElement("div");U.style.display="inline-block";U.style.width="100%";U.style.textOverflow="ellipsis";U.style.overflow="hidden";mxEvent.addListener(M, -"dragover",function(ra){ra.dataTransfer.dropEffect="move";D=sa;ra.stopPropagation();ra.preventDefault()});mxEvent.addListener(M,"dragstart",function(ra){B=M;mxClient.IS_FF&&ra.dataTransfer.setData("Text","<layer/>")});mxEvent.addListener(M,"dragend",function(ra){null!=B&&null!=D&&u.addCell(V,u.model.root,D);D=B=null;ra.stopPropagation();ra.preventDefault()});var ba=document.createElement("img");ba.setAttribute("draggable","false");ba.setAttribute("align","top");ba.setAttribute("border","0");ba.style.width= -"16px";ba.style.padding="0px 6px 0 4px";ba.style.marginTop="2px";ba.style.cursor="pointer";ba.setAttribute("title",mxResources.get(u.model.isVisible(V)?"hide":"show"));u.model.isVisible(V)?(ba.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(M,75)):(ba.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(M,25));Editor.isDarkMode()&&(ba.style.filter="invert(100%)");U.appendChild(ba);mxEvent.addListener(ba,"click",function(ra){u.model.setVisible(V,!u.model.isVisible(V));mxEvent.consume(ra)}); -ba=document.createElement("img");ba.setAttribute("draggable","false");ba.setAttribute("align","top");ba.setAttribute("border","0");ba.style.width="16px";ba.style.padding="0px 6px 0 0";ba.style.marginTop="2px";ba.setAttribute("title",mxResources.get("lockUnlock"));var la=u.getCurrentCellStyle(V);"1"==mxUtils.getValue(la,"locked","0")?(ba.setAttribute("src",Editor.lockedImage),mxUtils.setOpacity(ba,75)):(ba.setAttribute("src",Editor.unlockedImage),mxUtils.setOpacity(ba,25));Editor.isDarkMode()&&(ba.style.filter= -"invert(100%)");u.isEnabled()&&(ba.style.cursor="pointer");mxEvent.addListener(ba,"click",function(ra){if(u.isEnabled()){var Y=null;u.getModel().beginUpdate();try{Y="1"==mxUtils.getValue(la,"locked","0")?null:"1",u.setCellStyles("locked",Y,[V])}finally{u.getModel().endUpdate()}"1"==Y&&u.removeSelectionCells(u.getModel().getDescendants(V));mxEvent.consume(ra)}});U.appendChild(ba);ba=document.createElement("span");mxUtils.write(ba,K);ba.style.display="block";ba.style.whiteSpace="nowrap";ba.style.overflow= -"hidden";ba.style.textOverflow="ellipsis";ba.style.position="absolute";ba.style.left="52px";ba.style.right="8px";ba.style.top="8px";U.appendChild(ba);M.appendChild(U);if(u.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)K=document.createElement("div"),K.style.display="block",K.style.textAlign="right",K.style.whiteSpace="nowrap",K.style.position="absolute",K.style.right="16px",K.style.top="6px",0<sa&&(U=document.createElement("a"),U.setAttribute("title", -mxResources.get("toBack")),U.className="geButton",U.style.cssFloat="none",U.innerHTML="▼",U.style.width="14px",U.style.height="14px",U.style.fontSize="14px",U.style.margin="0px",U.style.marginTop="-1px",K.appendChild(U),mxEvent.addListener(U,"click",function(ra){u.isEnabled()&&u.addCell(V,u.model.root,sa-1);mxEvent.consume(ra)})),0<=sa&&sa<F-1&&(U=document.createElement("a"),U.setAttribute("title",mxResources.get("toFront")),U.className="geButton",U.style.cssFloat="none",U.innerHTML="▲", -U.style.width="14px",U.style.height="14px",U.style.fontSize="14px",U.style.margin="0px",U.style.marginTop="-1px",K.appendChild(U),mxEvent.addListener(U,"click",function(ra){u.isEnabled()&&u.addCell(V,u.model.root,sa+1);mxEvent.consume(ra)})),M.appendChild(K);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&(M.setAttribute("draggable","true"),M.style.cursor="move")}mxEvent.addListener(M,"dblclick",function(ra){var Y=mxEvent.getSource(ra).nodeName;"INPUT"!=Y&&"IMG"!=Y&&(d(V),mxEvent.consume(ra))}); -u.getDefaultParent()==V&&(M.style.background=Editor.isDarkMode()?"#505759":"#e6eff8",M.style.fontWeight=u.isEnabled()?"bold":"",J=V);mxEvent.addListener(M,"click",function(ra){u.isEnabled()&&(u.setDefaultParent(G),u.view.setCurrentRoot(null),mxEvent.isShiftDown(ra)&&u.setSelectionCells(V.children),mxEvent.consume(ra))});x.appendChild(M)}F=u.model.getChildCount(u.model.root);x.innerText="";S.clear();for(var ha=F-1;0<=ha;ha--)mxUtils.bind(this,function(sa){X(ha,u.convertValueToString(sa)||mxResources.get("background"), -sa,sa)})(u.model.getChildAt(u.model.root,ha));var fa=u.convertValueToString(J)||mxResources.get("background");R.setAttribute("title",mxResources.get("removeIt",[fa]));aa.setAttribute("title",mxResources.get("duplicateIt",[fa]));u.isSelectionEmpty()&&(T.className="geButton mxDisabled");k()}var u=a.editor.graph,m=document.createElement("div");m.style.userSelect="none";m.style.background=Editor.isDarkMode()?Dialog.backdropColor:"#fff";m.style.border="1px solid whiteSmoke";m.style.height="100%";m.style.marginBottom= -"10px";m.style.overflow="auto";var r=EditorUi.compactUi?"26px":"30px",x=document.createElement("div");x.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"#fff";x.style.position="absolute";x.style.overflow="auto";x.style.left="0px";x.style.right="0px";x.style.top="0px";x.style.bottom=parseInt(r)+7+"px";m.appendChild(x);var B=null,D=null;mxEvent.addListener(m,"dragover",function(X){X.dataTransfer.dropEffect="move";D=0;X.stopPropagation();X.preventDefault()});mxEvent.addListener(m,"drop", -function(X){X.stopPropagation();X.preventDefault()});var F=null,J=null,C=document.createElement("div");C.className="geToolbarContainer";C.style.position="absolute";C.style.bottom="0px";C.style.left="0px";C.style.right="0px";C.style.height=r;C.style.overflow="hidden";C.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";C.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";C.style.borderWidth="1px 0px 0px 0px";C.style.borderColor="#c3c3c3";C.style.borderStyle="solid";C.style.display= -"block";C.style.whiteSpace="nowrap";var O=document.createElement("a");O.className="geButton";var R=O.cloneNode(!1);r=document.createElement("img");r.setAttribute("border","0");r.setAttribute("width","22");r.setAttribute("src",Editor.trashImage);r.style.opacity="0.9";Editor.isDarkMode()&&(r.style.filter="invert(100%)");R.appendChild(r);mxEvent.addListener(R,"click",function(X){if(u.isEnabled()){u.model.beginUpdate();try{var ha=u.model.root.getIndex(J);u.removeCells([J],!1);0==u.model.getChildCount(u.model.root)? -(u.model.add(u.model.root,new mxCell),u.setDefaultParent(null)):0<ha&&ha<=u.model.getChildCount(u.model.root)?u.setDefaultParent(u.model.getChildAt(u.model.root,ha-1)):u.setDefaultParent(null)}finally{u.model.endUpdate()}}mxEvent.consume(X)});u.isEnabled()||(R.className="geButton mxDisabled");C.appendChild(R);var T=O.cloneNode();T.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));r=r.cloneNode(!1);r.setAttribute("src",Editor.verticalDotsImage);T.appendChild(r);mxEvent.addListener(T, -"click",function(X){if(u.isEnabled()&&!u.isSelectionEmpty()){var ha=mxUtils.getOffset(T);a.showPopupMenu(mxUtils.bind(this,function(fa,sa){for(var K=F-1;0<=K;K--)mxUtils.bind(this,function(V){var G=fa.addItem(u.convertValueToString(V)||mxResources.get("background"),null,mxUtils.bind(this,function(){u.moveCells(u.getSelectionCells(),0,0,!1,V)}),sa);1==u.getSelectionCount()&&u.model.isAncestor(V,u.getSelectionCell())&&fa.addCheckmark(G,Editor.checkmarkImage)})(u.model.getChildAt(u.model.root,K))}), -ha.x,ha.y+T.offsetHeight,X)}});C.appendChild(T);var Q=O.cloneNode(!1);Q.setAttribute("title",mxResources.get("editData"));r=r.cloneNode(!1);r.setAttribute("src",Editor.editImage);Q.appendChild(r);mxEvent.addListener(Q,"click",function(X){u.isEnabled()&&a.showDataDialog(J);mxEvent.consume(X)});u.isEnabled()||(Q.className="geButton mxDisabled");C.appendChild(Q);var aa=O.cloneNode(!1);aa.setAttribute("title",mxResources.get("duplicate"));r=r.cloneNode(!1);r.setAttribute("src",Editor.duplicateImage); -aa.appendChild(r);mxEvent.addListener(aa,"click",function(X){if(u.isEnabled()){X=null;u.model.beginUpdate();try{X=u.cloneCell(J),u.cellLabelChanged(X,mxResources.get("untitledLayer")),X.setVisible(!0),X=u.addCell(X,u.model.root),u.setDefaultParent(X)}finally{u.model.endUpdate()}null==X||u.isCellLocked(X)||u.selectAll(X)}});u.isEnabled()||(aa.className="geButton mxDisabled");C.appendChild(aa);O=O.cloneNode(!1);O.setAttribute("title",mxResources.get("addLayer"));r=r.cloneNode(!1);r.setAttribute("src", -Editor.addImage);O.appendChild(r);mxEvent.addListener(O,"click",function(X){if(u.isEnabled()){u.model.beginUpdate();try{var ha=u.addCell(new mxCell(mxResources.get("untitledLayer")),u.model.root);u.setDefaultParent(ha)}finally{u.model.endUpdate()}}mxEvent.consume(X)});u.isEnabled()||(O.className="geButton mxDisabled");C.appendChild(O);m.appendChild(C);var S=new mxDictionary,P=document.createElement("span");P.setAttribute("title",mxResources.get("selectionOnly"));P.innerHTML="•";P.style.position= -"absolute";P.style.fontWeight="bold";P.style.fontSize="16pt";P.style.right="2px";P.style.top="2px";n();u.model.addListener(mxEvent.CHANGE,n);u.addListener("defaultParentChanged",n);u.selectionModel.addListener(mxEvent.CHANGE,function(){u.isSelectionEmpty()?T.className="geButton mxDisabled":T.className="geButton";k()});this.window=new mxWindow(mxResources.get("layers"),m,b,f,e,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,150,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1); +function(){n.setSuspended(!1)}));this.window.addListener(mxEvent.MINIMIZE,mxUtils.bind(this,function(){n.setSuspended(!0)}));n.init(k);mxEvent.addMouseWheelListener(function(u,m){for(var r=!1,x=mxEvent.getSource(u);null!=x;){if(x==n.svg){r=!0;break}x=x.parentNode}r&&(r=d.zoomFactor,null!=u.deltaY&&Math.round(u.deltaY)!=u.deltaY&&(r=1+Math.abs(u.deltaY)/20*(r-1)),d.lazyZoom(m,null,null,r),mxEvent.consume(u))})},LayersWindow=function(a,b,f,e,g){function d(Y){if(u.isEnabled()&&null!=Y){var ja=u.convertValueToString(Y); +ja=new FilenameDialog(a,ja||mxResources.get("background"),mxResources.get("rename"),mxUtils.bind(this,function(fa){null!=fa&&u.cellLabelChanged(Y,fa)}),mxResources.get("enterName"));a.showDialog(ja.container,300,100,!0,!0);ja.init()}}function k(){var Y=U.get(u.getLayerForCells(u.getSelectionCells()));null!=Y?Y.appendChild(P):null!=P.parentNode&&P.parentNode.removeChild(P)}function n(){function Y(ra,K,V,O){var T=document.createElement("div");T.className="geToolbarContainer";U.put(V,T);T.style.overflow= +"hidden";T.style.position="relative";T.style.padding="4px";T.style.height="22px";T.style.display="block";T.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";T.style.borderWidth="0px 0px 1px 0px";T.style.borderColor="#c3c3c3";T.style.borderStyle="solid";T.style.whiteSpace="nowrap";T.setAttribute("title",K);var J=document.createElement("div");J.style.display="inline-block";J.style.width="100%";J.style.textOverflow="ellipsis";J.style.overflow="hidden";mxEvent.addListener(T, +"dragover",function(na){na.dataTransfer.dropEffect="move";D=ra;na.stopPropagation();na.preventDefault()});mxEvent.addListener(T,"dragstart",function(na){B=T;mxClient.IS_FF&&na.dataTransfer.setData("Text","<layer/>")});mxEvent.addListener(T,"dragend",function(na){null!=B&&null!=D&&u.addCell(V,u.model.root,D);D=B=null;na.stopPropagation();na.preventDefault()});var ba=document.createElement("img");ba.setAttribute("draggable","false");ba.setAttribute("align","top");ba.setAttribute("border","0");ba.style.width= +"16px";ba.style.padding="0px 6px 0 4px";ba.style.marginTop="2px";ba.style.cursor="pointer";ba.setAttribute("title",mxResources.get(u.model.isVisible(V)?"hide":"show"));u.model.isVisible(V)?(ba.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(T,75)):(ba.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(T,25));Editor.isDarkMode()&&(ba.style.filter="invert(100%)");J.appendChild(ba);mxEvent.addListener(ba,"click",function(na){u.model.setVisible(V,!u.model.isVisible(V));mxEvent.consume(na)}); +ba=document.createElement("img");ba.setAttribute("draggable","false");ba.setAttribute("align","top");ba.setAttribute("border","0");ba.style.width="16px";ba.style.padding="0px 6px 0 0";ba.style.marginTop="2px";ba.setAttribute("title",mxResources.get("lockUnlock"));var ha=u.getCurrentCellStyle(V);"1"==mxUtils.getValue(ha,"locked","0")?(ba.setAttribute("src",Editor.lockedImage),mxUtils.setOpacity(ba,75)):(ba.setAttribute("src",Editor.unlockedImage),mxUtils.setOpacity(ba,25));Editor.isDarkMode()&&(ba.style.filter= +"invert(100%)");u.isEnabled()&&(ba.style.cursor="pointer");mxEvent.addListener(ba,"click",function(na){if(u.isEnabled()){var W=null;u.getModel().beginUpdate();try{W="1"==mxUtils.getValue(ha,"locked","0")?null:"1",u.setCellStyles("locked",W,[V])}finally{u.getModel().endUpdate()}"1"==W&&u.removeSelectionCells(u.getModel().getDescendants(V));mxEvent.consume(na)}});J.appendChild(ba);ba=document.createElement("span");mxUtils.write(ba,K);ba.style.display="block";ba.style.whiteSpace="nowrap";ba.style.overflow= +"hidden";ba.style.textOverflow="ellipsis";ba.style.position="absolute";ba.style.left="52px";ba.style.right="8px";ba.style.top="8px";J.appendChild(ba);T.appendChild(J);if(u.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)K=document.createElement("div"),K.style.display="block",K.style.textAlign="right",K.style.whiteSpace="nowrap",K.style.position="absolute",K.style.right="16px",K.style.top="6px",0<ra&&(J=document.createElement("a"),J.setAttribute("title", +mxResources.get("toBack")),J.className="geButton",J.style.cssFloat="none",J.innerHTML="▼",J.style.width="14px",J.style.height="14px",J.style.fontSize="14px",J.style.margin="0px",J.style.marginTop="-1px",K.appendChild(J),mxEvent.addListener(J,"click",function(na){u.isEnabled()&&u.addCell(V,u.model.root,ra-1);mxEvent.consume(na)})),0<=ra&&ra<F-1&&(J=document.createElement("a"),J.setAttribute("title",mxResources.get("toFront")),J.className="geButton",J.style.cssFloat="none",J.innerHTML="▲", +J.style.width="14px",J.style.height="14px",J.style.fontSize="14px",J.style.margin="0px",J.style.marginTop="-1px",K.appendChild(J),mxEvent.addListener(J,"click",function(na){u.isEnabled()&&u.addCell(V,u.model.root,ra+1);mxEvent.consume(na)})),T.appendChild(K);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&(T.setAttribute("draggable","true"),T.style.cursor="move")}mxEvent.addListener(T,"dblclick",function(na){var W=mxEvent.getSource(na).nodeName;"INPUT"!=W&&"IMG"!=W&&(d(V),mxEvent.consume(na))}); +u.getDefaultParent()==V&&(T.style.background=Editor.isDarkMode()?"#505759":"#e6eff8",T.style.fontWeight=u.isEnabled()?"bold":"",I=V);mxEvent.addListener(T,"click",function(na){u.isEnabled()&&(u.setDefaultParent(O),u.view.setCurrentRoot(null),mxEvent.isShiftDown(na)&&u.setSelectionCells(V.children),mxEvent.consume(na))});x.appendChild(T)}F=u.model.getChildCount(u.model.root);x.innerText="";U.clear();for(var ja=F-1;0<=ja;ja--)mxUtils.bind(this,function(ra){Y(ja,u.convertValueToString(ra)||mxResources.get("background"), +ra,ra)})(u.model.getChildAt(u.model.root,ja));var fa=u.convertValueToString(I)||mxResources.get("background");R.setAttribute("title",mxResources.get("removeIt",[fa]));aa.setAttribute("title",mxResources.get("duplicateIt",[fa]));u.isSelectionEmpty()&&(S.className="geButton mxDisabled");k()}var u=a.editor.graph,m=document.createElement("div");m.style.userSelect="none";m.style.background=Editor.isDarkMode()?Dialog.backdropColor:"#fff";m.style.border="1px solid whiteSmoke";m.style.height="100%";m.style.marginBottom= +"10px";m.style.overflow="auto";var r=EditorUi.compactUi?"26px":"30px",x=document.createElement("div");x.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"#fff";x.style.position="absolute";x.style.overflow="auto";x.style.left="0px";x.style.right="0px";x.style.top="0px";x.style.bottom=parseInt(r)+7+"px";m.appendChild(x);var B=null,D=null;mxEvent.addListener(m,"dragover",function(Y){Y.dataTransfer.dropEffect="move";D=0;Y.stopPropagation();Y.preventDefault()});mxEvent.addListener(m,"drop", +function(Y){Y.stopPropagation();Y.preventDefault()});var F=null,I=null,C=document.createElement("div");C.className="geToolbarContainer";C.style.position="absolute";C.style.bottom="0px";C.style.left="0px";C.style.right="0px";C.style.height=r;C.style.overflow="hidden";C.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";C.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";C.style.borderWidth="1px 0px 0px 0px";C.style.borderColor="#c3c3c3";C.style.borderStyle="solid";C.style.display= +"block";C.style.whiteSpace="nowrap";var N=document.createElement("a");N.className="geButton";var R=N.cloneNode(!1);r=document.createElement("img");r.setAttribute("border","0");r.setAttribute("width","22");r.setAttribute("src",Editor.trashImage);r.style.opacity="0.9";Editor.isDarkMode()&&(r.style.filter="invert(100%)");R.appendChild(r);mxEvent.addListener(R,"click",function(Y){if(u.isEnabled()){u.model.beginUpdate();try{var ja=u.model.root.getIndex(I);u.removeCells([I],!1);0==u.model.getChildCount(u.model.root)? +(u.model.add(u.model.root,new mxCell),u.setDefaultParent(null)):0<ja&&ja<=u.model.getChildCount(u.model.root)?u.setDefaultParent(u.model.getChildAt(u.model.root,ja-1)):u.setDefaultParent(null)}finally{u.model.endUpdate()}}mxEvent.consume(Y)});u.isEnabled()||(R.className="geButton mxDisabled");C.appendChild(R);var S=N.cloneNode();S.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));r=r.cloneNode(!1);r.setAttribute("src",Editor.verticalDotsImage);S.appendChild(r);mxEvent.addListener(S, +"click",function(Y){if(u.isEnabled()&&!u.isSelectionEmpty()){var ja=mxUtils.getOffset(S);a.showPopupMenu(mxUtils.bind(this,function(fa,ra){for(var K=F-1;0<=K;K--)mxUtils.bind(this,function(V){var O=fa.addItem(u.convertValueToString(V)||mxResources.get("background"),null,mxUtils.bind(this,function(){u.moveCells(u.getSelectionCells(),0,0,!1,V)}),ra);1==u.getSelectionCount()&&u.model.isAncestor(V,u.getSelectionCell())&&fa.addCheckmark(O,Editor.checkmarkImage)})(u.model.getChildAt(u.model.root,K))}), +ja.x,ja.y+S.offsetHeight,Y)}});C.appendChild(S);var Q=N.cloneNode(!1);Q.setAttribute("title",mxResources.get("editData"));r=r.cloneNode(!1);r.setAttribute("src",Editor.editImage);Q.appendChild(r);mxEvent.addListener(Q,"click",function(Y){u.isEnabled()&&a.showDataDialog(I);mxEvent.consume(Y)});u.isEnabled()||(Q.className="geButton mxDisabled");C.appendChild(Q);var aa=N.cloneNode(!1);aa.setAttribute("title",mxResources.get("duplicate"));r=r.cloneNode(!1);r.setAttribute("src",Editor.duplicateImage); +aa.appendChild(r);mxEvent.addListener(aa,"click",function(Y){if(u.isEnabled()){Y=null;u.model.beginUpdate();try{Y=u.cloneCell(I),u.cellLabelChanged(Y,mxResources.get("untitledLayer")),Y.setVisible(!0),Y=u.addCell(Y,u.model.root),u.setDefaultParent(Y)}finally{u.model.endUpdate()}null==Y||u.isCellLocked(Y)||u.selectAll(Y)}});u.isEnabled()||(aa.className="geButton mxDisabled");C.appendChild(aa);N=N.cloneNode(!1);N.setAttribute("title",mxResources.get("addLayer"));r=r.cloneNode(!1);r.setAttribute("src", +Editor.addImage);N.appendChild(r);mxEvent.addListener(N,"click",function(Y){if(u.isEnabled()){u.model.beginUpdate();try{var ja=u.addCell(new mxCell(mxResources.get("untitledLayer")),u.model.root);u.setDefaultParent(ja)}finally{u.model.endUpdate()}}mxEvent.consume(Y)});u.isEnabled()||(N.className="geButton mxDisabled");C.appendChild(N);m.appendChild(C);var U=new mxDictionary,P=document.createElement("span");P.setAttribute("title",mxResources.get("selectionOnly"));P.innerHTML="•";P.style.position= +"absolute";P.style.fontWeight="bold";P.style.fontSize="16pt";P.style.right="2px";P.style.top="2px";n();u.model.addListener(mxEvent.CHANGE,n);u.addListener("defaultParentChanged",n);u.selectionModel.addListener(mxEvent.CHANGE,function(){u.isSelectionEmpty()?S.className="geButton mxDisabled":S.className="geButton";k()});this.window=new mxWindow(mxResources.get("layers"),m,b,f,e,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,150,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1); this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.init=function(){x.scrollTop=x.scrollHeight-x.clientHeight};this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.refreshLayers=n;a.installResizeHandler(this,!0)}; (function(){Sidebar.prototype.tagIndex="5V1dV+M6sv01rDvngax0oLvveYQEaGaAziE0PW8sxVYSDbblI9uk6V9/VVWS7ST+kB0zL3etbmIn3ltlfZRKUqkU/rpRLN6MmFJym5yM/8QL/Xnw7yLceXQ03fA3JaOTyfjCQCKZehvu66tErCMW6J9E1M4jlJcFTJWIPP1VIKK1ixj/zML4VBRiTMaf9HOKx8G7/lwy71V/ZJEv8Vv8cKea9KW646tU41nk678/4tK7SZVu5FpC9oz/TDPVnkEPJlsn4wVma1lEnVemGByy6q+M+SXkSmaQ6Vv27gJeBDzyOQDMu1ma5FVEEVBEtuokgQhdyZ62Uv/9qWWoYPRltgx4A3U970/hc6BnIuD+kdI+KbGTcelGce6ec4evOBl/k0r8llGKtWBTvulF98xVKjzEvxWXDVS/M8VHF57Hk0TDpzpxJQGScC9TIoX3euXvVV/UcWWpDFkqsCYyfaM/1ly36vGfgVhv0oiasyfh7ypgyaaBaKHl5/nThqb5VeAvZEigXx8k0AolJJUkVjo7jGBOHFOm29Se3FZin6VsyRL42V+2U90z9crTOGAeIEK8Q1UCnMlGxk4CLWb/gsflKt0y/MLnbzyQccgjaIivAjgTT/Gtr4Quf9cXXWRLjRKxyRwvkBko75hHnjisPzUkP/kyESnHtwoAtQ7kkrehL7UyzUAtLrh6E5g7Nnn9iYo2SWW8ZVr1QYsTIW8gE+ll5kHWQlXGdr/Qug1Zl/RDe2O4FL+fWPBaiJSUZGoDT6HRYT3DN9Gdgy4agY3Q59gj+iIOdAOB/MmYYlHKqYp5PMLaFHMVirSSG2XYySnnZrGHNW19JdaZoiYxGV8LbGq+9DKsT0APT3Sk1ldzXaZszQvOpfzlkndUYodytAPDOEuxuocyEqlUmM+Jbm6HevkAq0sAW8+MB9BmQJs+8HQr1Wup3G2zL6uCetJZjXKofV7J+FLnUUWtxZyLTYa20FzpV1GxEgnVdxH4JOgyS0QECr4F3z3nEUHWUQfUjUi/ZUv7tjqTGaCkl0q6Wou0Ef9tdhslUBAn9Xq4GshZkG6gTmx0m8EqvuGoYzb4iwMYdDnVMcpbS2QM3TYB3mM0Sp71/0fuSVPf7lmki1d10DN3LE6x0/CKut+GuddVgGpRyFCtc/sZYS/Cm9FySdUj3sgIPlOZeZvWNAm1o0uTXH81UO3zZEEqQDkwD5q37t+zdAOqNe/RS/aJ6Tdi5purBt73xV930PiLapT8HTTXqz2Kh7JloQ26bIlVOtAl6dIY9uBPMhbeCdgtu/ZLJeEe1XdduTSPrpc6v9+TlIf64jakMpeQ9RumQFVr3YiV3vcb+eZyy9Viw4Ogl1p+nM2xmofSyNSdYgHjnSzA6m26fu+wTKtwYM30S1LXTkxPsYp0qp+nbu8yg271r4xnWM3/hoseBI+8qttygmLlSfLhZtmsS7CZUd1Kds295iT2m4dTh7aH0qLgF2QqGo5qVVdLtHiPvIp2mdDXinvvXtBgGhLRI4/1sJs09z5TqY6sRCNVqlU+2qxPDNuRuxm20MqLmqNOO3CqHRqxEGEclC3jNtATkMOLhFZpOynrH5FAc3UlcKRsbJHvy/9wD8iylUSFJHhrrfmRYBPaZCGDZ2Mu6QXolr3prFf16OdvsxOjqyqUVPXzVEngw+g2Qrur8WehCxWnqu71sE9gv/QWnrSalK00WglxllLFX+VXVaxv1TMae7yFcRrlV2059PNiNr2+wdxh60gmKamJ7trRDvIm4xsecYXqxI7z6sQ5pICWKDHp6jFiEyjpgtLioL1lU6MmSu3VHZm0QtcI1RVNeCPPjIeKHnuZLamxJzHnNIzdyIzsV2+DJm+Y22ZVlPINS35AxuFl1Bo4nQ5IJ7PIfxyW8xzGplLgaG9BGginPqsrUhn55RCZiLoxbRn4v4dAbkYubdBLFkWoRfXYs24CvPz8lGzpNZchT1XDzN8OSEkcF8ZBhnP+1cq2jJgddJORxMmOmMX7w5A96HXzILoS882Mr/IBWqAHTcjxejheKQPvJRo3kWNuP0g0msMlzn6upFoK36/o6A6R34t5fG0RKMGiNdXSwyFVJX4R6mwE9Y+GsodSb1gcv7cCTRUWmCEx1rI2SAbsPvY2+m9QmTl7mCeBdrAdKeMnTGC24X4ylMvU3qWtzY2Yf5/QdB+kwyKPB1i9agqkwEqZJqm+HLULWY27rx0Q72mUWoass8VjGOIQHihN0cRKenQVagMsqEtZ40YXPq4geB2yGWCXNjHdvWUBLwzZJqO0hL+TVEJ2va5urbACZWbCVYXEuLKywZep5bhnERlBRuANDHRa5c1HgwZlFJY2kWnipFFzIUE+znKy+EtINIQLcbvWDo8tdUmlOANNl1A7/85EXGmvHeBG00tYB81LS0AuLBVnVATUY8Ryv9DreSbjX5/Gw7BN6qTSVmRHniapOrKd1UqFa33dmLRcn4eiO68TzJgwXYga5OrAdj+l/P+s/3w5u4BXnkOdFpGwo5wOb+7Cf+7CX/0GtfRfzjCN8YfJX05g2BeQMAv9mxwCtgIWyOwr5L/o7pR+6SJ3Fe/5QLwwr4C6BIv1fKyzpToXHJTbLiG8/GQotrMJyTgA31zp7sYz07uavDfhI0+ET93fNFPKrlqZnmkCBaS85u7Qkeu8E9ciU7jYt/Oin4Cirkdwp8G3qlPh7jTYKupVrjsR5kytjqzkeYIFXRodnI/DcJL3VsvKmexWjgEoQCsdT/N5gLf5grrxeJ6vHTm4gO6UlxdM9fCJr5VdTooZGIdRDXwVSKniAK23gL3Xr/TsPT66RK06s+5MS1xeX2UqEqZDcGRYCDPKrMfWwKV89WhCtCt0umFC9cHJWKCO87lZ93ND0Yx1Ilesax5NH5/A6H4+Kc+ulmZcK+SoYJnx5BWnwRUNUOzoqJMouyS0VN6PSOkRm10jTnAgsGXKVzQTWkNVwXMVcD3cwHzgiccCc+0iwrV+eIB8vYYrzXPHQmiE1ZMQ1dCqZe8YRowhM391K5bkoGWFgTnpJC0cvypov69W1PHZKu61VvUKlrlgOFehv8dRqYiSVFVPrFeh9R+a6FKwUKF/2DYN5EtABZqrc/t6ZBF2b+Aky+I4EDDf0hE76YPlKyXWsFCNdaYrfEHqwDPaoVMBPZl25/OkuXfYh1AuGViPJI2HzBH4syPx50fiP/fFS0ErkVp1KFpUCxjqH1AdWqWlSspDr9t9mp8sRe05lZKcAbbwhWfvXCT5uaMGgh6KpJLW1xfoBw3LaFijA7pLbA/dLBaAHq0vExEoc+vIsCVvS8dsgKfzHs2zF5UcNegfdc9XQw7LtzEBEfnVuw5qsk9o/ZpU+TG0Qy5lmqJsZZKl/bKVR1cmoRI9kMKywhvIGYGrFIq+bi/73BQ0hZ97urenL6JXo5mqakobbtIVV66p/w8gNxay1cYALkHB9QnaBuTxx//OCudewXQalev3OcXoIopkah29PmH7C415oHVru0dODdPkGKapDAJyVt7oUe06YBVuotXIfZ+gJPdtaYfWuto0odAH8LSEDeELJ+eFgmTOYjMjHzutTu3jF0WpG5cTsOdrF/oO4OA7ZEqfB4GIEzsLWN3o6/CT3nipaAhKotcVWg06C0PjypdFnnW8zKDa16wc7zM8ads4WfHympGqW4QkbMBZ9BJqM5HWi99YkIFBog0Hzio7lkrk6FpEIqHNUzdS+rD2lUqc/dJZEPYVaHSDy8bczBP5mZ0nMo6LJDO2Kt7crnZYv2dpIkqO4Lj+UwiaZGA0N9XXHbZnPaKg7UVm+cmsVbpgLwQqTBDlK2QRjYqU9WGg36q1rR4EKSmgVoQS93g0qWbzMLnj/zKeThc2Ny9xdcxvW89tJ4FBZ+TrYS822IEJJ+OfG7MBproKdaU+lm6ha0k6VD5Wkg2Rn63EH5QRvWjn4LGOw95S7TY+lo3TH5bgr0x4r7qHlmhA5xdL8inC2+X+qnIjibHk+hEt7HPJHmiPr5FDKwqa25qJBIaLoGOvda+c0H4n10rRyKPrgymjDoVVMM5x8qynOBbcSwY9gDZTfidm4q9hNigH6Zq7EjwAgaEWn4CdRLdtSHCS1yLr+oE6voukO1CwEDCn2jNsm2CDCNlvtAe2HK3BYr8H2yZ1uJHuZl7so7STbMGZwqkd6+yc2C8a0q/ngU2T1/pvyFPmk83Tn/jK+AeZjy7QxdUCkrSe3NbTqNgL40jzsEOzt6u1D9tkTG81GT/skQ2ayLenp/lHp2H3zgzG+tdOZtsNHX1oJuNi99VAhH9Z9NF0P6/LNDBfboa6fZhgGdkTPhmqg3Eaf+zelGaa70Uruxfjpw7m7dWUBlIMPOJLqqEnlbYw7m/rCMN8W4EIq3yU28lRr/00O6EP07B7pPtJPgO3BzSObqMkNTPyh4nQVpli6C+Kh7umeGXIdYrzyrTE4a54V+7GdziaNakWdy8rutDfP+5Q6uGXHqZnFasiznRQXfSQERvNwMTfZtcLB/4N88lR1Bd6tC6Wmg+3UpO1nNAGReekn+dT/fCb2QYDbrLizeyyPyxWZ8bSBMBkfKP5KJTH8MncwhpdhJEJPjKZR2kWM4anfp4/4AqMtort1M9HJXJkDjXvCa99fDR7j1goZ+Ci5eNlH6zuA1JT24fiScpErMTelfGWWtwxQgHFjjzCtuJuPPlabFdZTK9hY7OU1LD5pjsLmKV+V7LRWsksxq1hcNHhDR5nYFYqnRg0I1Y7DGhmMD12qaM7njEng52y6I//yONAG9BDsy/0hb98H4T2Hv7Q9t5BMyMPDTB4Nn9XzMNV9SGpaZMwKq/cRu6MBdc0PRqMupDoGiLfYQUGNXqIoSzglobh11Ll0aDyYCql7wahxgrlvX5sEk9cZ8huDzRQKtakbzDk+1FCGCwTPmIQ6tuLe/08bRLHSBvMs1uV8of6M2tpff8UM/Pjklg8LY7ij2R0alrmSxLrke4KNjZKlWGvuIKL9jaT+K844epjeCsbzgtnkPNwXuM/X3fC4BwyjB44eY2kUW1gqzKElvowWzyKevTim5hHprYrSXGfbPU290OwgmbZRoHEXmVmBwR7emHQ9K589FG7k96B/hk0nQWuRNKy6Ee92NUl1NrCPFkWodFqXT7dWLX8EYuTjUw/LIFnGWQh/wD6BXjF5f1UsZTtMB/UxgsRVUy8uA9OYDJGlyEbZyNpS1HacBx90z06HU8knhzZ+GJAVIo1Vl/L92CjS6WtHnxx8r5FZ4xmPbZPYWNQQGbmEnRmuZ+BSxs5k2zBqQJpskiklWy1PIuQ4XrcZbGXdyOzpNmGIhLrhZhgucX6peINVyxIRreX0Gvda5tspRgFQCo8FlPjIwyemeTOGHtHJCIiCLF1sTgfj3fTib1jX+DJSDoQaa0feE+++5K/Z4mSnEGL3N11JS8SdE9HeEraqGfFD0fVEJwXKwldJ25PbrDKdG6T+y0F1RlOcDth5Q1LnHvED0S48Kx/2FCEsd33NxRhFplVkqLAB2obiywGV+ucayDaPEbVTg7QOnlfSrsfbDAhf+w3rmPInvWoA13OtB5XbLiyp9hIlxATesgqVVuZanqbKm6MJh1Y9lBCLL9k9Gl8cwW+HVN5dYJRLrKWiYZmurNPX2FH4z9mJNcfpaWJPKJ1YKpu6aZ3cv+m5HAb00cnVoSnzXdi39v8OjrjroXiW7JZiggXhh5ecLu4/2OIdA7Ih+C08S2Hz/Mi1Fqe56VEdMY8L6Zn4/H4j64J+gKCZEl0trLXXWAjGMsGJWQg26I8EcMmW9IrrmlhBZrg+JIlHLZJUsDSTda8UlJHNIXvj2Y5Dm0N7+NY9pee1o2LUIfB7vYSCPXf0b/4OxT2bsD8RsTjfKH/6Z9VXOcwfICpjK3rhMzX9DytZOyWPLfXrWCUPg9NPwImrq4cFDp2bgze3FOyVbYDpm9SprndbD67s+TRiPMDD27nJfk83rKrqZ7X5xQq0q9YDHNhWMhV5/fLowhZv+42gEJbG6qJssvEbZBSVOXSZTsKYuja+uiYEEIglnuoh940Z5eYnsnancUvHRghyGUuRsN2kzpsWYZVmcuVBAd9W77MgSF8cWI9JZs5sAeipm0DrrRhtrqDCGj+YStWogZxgwj9oEfBAkdsCZHMvHQ0uwCj1xdrQQeRMG1SSzqzI4JDRSpiZTWQ8TCDQIm6wsMEi66wv1qClVex6HKgZJe6zcRte5SqGO6zX6dWll1JmiVrIz2g68ZgQnab6IEXIcRmwh3ZYRxAHN5hGCfHMT5dGKlkiVuP1WAvj64TsOvFLGDWJOJAP/lY+rOPooctUXaFcG5CMCa1a0AHPB6LmSeMTZjfdEePpjmWiipzbiI1JJMhSCDb6SkZvNPUfwVnB0LYx541RzxuJ/k8hFT3ptWjI2OJC8b3RVLQnYF/CSf9GYYUlJRr45LCdn5cmnOM+J+nGctEOKfpC22h0DCFPGOcUCZPT0PubViEX01O6XyqRR4tbFvn7ONCdyczP8nnzoqrvnzzLNmUx3kP0PNFsKof4FFvGGqlYWNjR/bvu+xaITXs0W3mplMCaGSq9dDgslfw95VecO/809fRxfT0YkqMuRWRmxYdiWa1RIXZ4s43G5IMY9p07mxL6Mn4UtAY33ZVfdkuC2NpZQ2orngTjbcXfnaxl7EVNqU7WUX1OZLvoBYVfDWmbgulWK24yneHH1cVriJPvce4Kh95HZSwgX8Tx5T8neyLftHFIDycVUHfSFbhqFqHRluMTCF73Rk7urVIY0gLE+jEreOr5DkbiOfzMTy0c16rX25fTSgzM38k16QXl41tRaVVG+mqHQ9Kj2tRjO4N49KlY/vbrXN4V1f3WuAjOGZmozND0lk84L9yZ3zmzFEzTpQwu8YD2B2viUbXWWKDSOkmchQHFhbnzo2qkgRHQ8tEBty9dVYSnR8lzW0QZLBgZ46HuswCmA8R9ltgtcHh8HNJD3RKA4PMUdZbLlFOtrvUhnEyICPSHGYAsR3mR598eOA4RDUx91qTOIbeVNIBkpDJiqcJlB1dnsAJOg2hOSqwoxkt5cC8PixAfV9cX8Gqx8PJzjAM7N5oP9h+T2rYzFYabfWizslupwMJu8s4qIywhoDnZ+gK/DqkqPM94mMlfji1sFJxfTppGJD3YpwMzng2OOP54IyfB2f8cgzjvK6saydCejFOBmc8G5zxfHDGz4MzfunPCEXQt3+YDK4TahiP0Ak1jEfohBrGI3RCDeMROqGG8QidMBlcJ9QwHqETahiP0Ak1jEfohBrGI3RCDWMfnSDjVL6Y+cxIeMnoK67frkNzxEEetjrhb7XHe/VlzX35Z/NSCj73REj+FIdndDml9mfNO0Si1lGgL+nuK5gEjn+Du6vZ3iiMhyK1J7EeLjJ0IJ0MTApUp8xL0fUFY+1PIThD4lH4kcAc0ZZ7fsEUO87W7k3yOaX2XX9x6sksJg8y+L2461euSImrmyKhGTR4ZOeLfsTzjUylzdYYbqqzuZbvRY8OMSAUjkF3l2M7rL3GgfcSMN/nCg7P1gX0PUvjzEbVbDt124lo0ptoAFl6SwF7LF4S3QbMsrY0LjilL47hGt08fS+aQ3tDMPNvaYbHaMjVCm4278rUQudkb2+mtp+2Z3RgWoYf/YJS812Jv/v7mYQmH57QA7rd3d5cFu+VZMFuaksRSzpcr7Lp9ktr8l9M6+y/mNb5x6Y1f5j/18prJ60PLq+dtD64vHbS+uDyAhVlI6M799fdE5h8YAK31gsPt6BVaZt6RsUp69DTk3fr9ROx1h3yS5LHHaarfvARrtguLAODtUQzBeyZU8d6kM5KpOZkDlwuH5J18iGsZwOxPmOw7TcZpG2xuxs4cH33aI5Jd5J0A/u0wKZ8oZC56GjUdHaNAwVZp8aD2xqnlQ7dlXy5uknqlI8rfmfa4p+V00n/cZ2kaqGdDEA7r5a267C7hbLPjMiWvXFYo0Y/ZnPdiBUy+ToCJYpL0l6tk/j+06MLbE6e4m3OCmUMBlbBmIwYySAVIUXwCUXkNy1blzguKWaN4jE6VDljtma3rNJVX2ak5eHgFEcCGB0nG3TrWcrDQ+wrQdSQmIkm0+0tpXzFpGTTidwVMBCtiEwAsXob3RfLWCX4ypxyl0oZVL1mDXTKAh75Jk66e3WYbjBMgC8SL0vqzqOpBO7WH5vDDkAZ6haFYTV80TxG3EGhkULjQpwqMUeO68F4KirOKKgkwXBn/2FvzDVZc9pEc2C+SiA3Pgq6yskW3VGGFYeCeDJ2blwWhh1SQRGzpMmTZIdgizN+NtQNGoLctdpe2WPnJ+N/XIVx+o67L/O4wYoztyZe5jFhh4EpiyoZ6kje0SLH+OEmmkWxpN90tkyJ4zpgyWbHhcM19WsZkH6Ras0i8du55AloXNdaztzYgSmjVSMTb53tH+BUg7xhGZYONOBme6EMCujYxrX+rN3BeYD6xunkoQ3XlnTdTqBDlETN0hSK5ABzV3IzOXRyoYOyyjWjlS7C4Gzl2KFuctjgTfkpR62bf3bRrzgai5lv1GzlwbDVWPlKbkk35kykmnDxNfh7Eyk+b73cNsoi+HsbRY71qHcpDnlyBic7MhgeB3Q5TsmbJMsckqeTLbVSk+tI5EHclWjjK84IzRcv3ASRtGEiPyEv+h/61AUTSdPlpplatvIkMKP6LPiW06Ed6OhY1wfKmLYftpG+gY7Fc4RyhcXwxBznF3yQ2LXoERXmbJgl6LsIFIGoOEPugOC7tnWi/CywOxNXSxuzuPakZB7BoTLnqxhxGxNtsOAVRmUdSnF0fvb2MtDBzKimE2/MA2mNB7qTEI8873ZXiid0El/MsdYrniqHt38sni8oclZHCnqsvxCLcqZV5+t+fnro/r7m5ryWStYNhRnMYvM+Tnm60EOFmFThlPqfZeZcvRe6EzZntaWkS0wsOJ8spTa4HjHk+6Ibt48fQlPMCVXtlFkLkvG2iMbZYpnXMBwMWHzFas7yPYRn2FSxmTraXlU05nQ71NwNh5Uc4uTB2MANp7Sh5+EmdN03vFN026Vw7ud/xJ2r5Q8KdgOHyTIb+oN5bt1bHpGwXf/vNj8HUrMgLTPqDioiQ1eBf7KAoiFR2zLDcwecuIa+t7TluwWGYR+m9rzA4ghBJ5iZsdwJqknTOi4mHXJ0HtARirSFPaHPBXL1KyZjxYJaSwJh5izfLind6Vpr9KPN18QcHuVG8GizwuetHvkllLGJuoi6sGeG/eObVOI3NJkAhoY154U58DxDm/F6suBsH7TdDa8wy2tA3fQ6YlC9NOXTGgF0TuGI+bD1SyTEX3M0aAXOM1NHtJU7n0ZywCkYmwWjBz30PNV21NvJzuSeO0EfLBzLSaFI8HQybXkJbo+4tZ/tLMW0krl0QcGMLniY2CkXc+kC1c9lJPUyS1OcetH6+4SiDIMPmf4dGpT+0lgaIX3TQmvUXIL7tS5MjYlzg7gjwTfSQF3xN9z0aDhTy1PUXKarOmnpnCoJzWDUmgLFgLBZGF0hcDmELWGhtiVWVYyHIcbCnNNabPDKOwolTaRtHq1FxLnabcBlpslwVCMGezrNyo69hvxMhe7NKq2yCuzowiK1zpsqmSSnl5yFGAIM7kBRVJ1H68B2DYvgp5cBwwNf58z3A5yua4hje1NQxjHTqlC3Bed2VIAx6JNYZTRNUNy1A2UYw6GIJmxFftcFSGvDF8JELCgYOq0S75NO7UvgzpwS72R8qv8/ZWop8DTbmR5fknemaluT2kvj5fRFJLLje6ss2UCcubWuqSZOMX53Uj4XDH+0nxTziHBunKMpfIOWCGTtjU0KwgfbJPYIawXWuUKzqHiBn+9NQxjAUFssWiW8m2z0WSihRldm5Q/ElaZpXEz/6FMhmihnSOm+CF/mw3DTbBjZdrj6CLXi3E5041VrkdJWbsdN3SXA6E78nQk8jJVwWuBLIXHTLNl9S9Ec04PI8pHWKvfRbYEEcvuS8CixfoyRS1PbcJa+8F+wBL2m181vTnDqPM0v3FlG1+IX+QKnipndmk/ZksMe4W/ANBlflVJJs2W7StlP4oAHehqJJ3NiUn8MSXwN4xO/eAtQGNcsGjSN/bzqTf4DMn7D4rLAvbO91851AIa6CmB9wgvHx0e30ekd9TiPUo9cwMH+3uBFFLT571cSLcAO8roTkUFVIjoWj5N7XieKjDzA4dPtYd3b+jiPZCB+xaTSDirhaBFZnWFuWhNLdP3Sb/diemM6EMb2ms3QNzgeGsc+dOUKGM1ktsSZMgjAqTjuIn5idqksZYIGnp6A8MItr205EY/N+dkKcxzX0bLo3kLK9I8hiEr5BNFrh+KEfgwopR5JhgOTPkq5+gBK/QFjy4GFftODSX9ILqqJg5X/TGjj1R8yV3cYSdoPqRDXLMCAGUNSBtJGzhgsO/Y4jyg+xbxXE4/UhoiespQF77gOa0e7eWi0s/FkrD9WNG0CW882fBvwlNxvvFfyzRgorU/HptUVBG6zdODOGk83i2jQkJ/09x4uccbM/F6NH7EINuHhNEZktuOlMlO0SkxXYfnHZpoRBlaYybU5t2wpfL9lQyThV1L6NUm34kZThkF9C91FPjq0dLTEeyeea4Zle02yhLzFiaaEfORJyjLFIrtJa9XA0Uow6UZAnjseLcPmbjwh94VHlsZGJvFhyLlaFp2fuFnzDo/N8PQNxE4Sv5tiJNcw3WJ05d/Mzi2K0n03poX0KACac1zyGqKn2QyqF6wS7MV+zr3Ffc5W5pn9sNl7vLq9ZZrziinM8xgi12CwVt16W+ucAf8z04VDZ2xY+BrLXtdGBSPi9wrCaqp7RnE87+gFdANgfrM75R4c7dvjxeDKy9T7IFTkqpPoAXYQiJZlrB3kA4/TjEKfHyvEPMjQ8/9oogUz+xaPZ4rkdhWwV3hy27QQUIXFY31wI1PasqxWgZv0xJ31xJ13xv3QajQbpCI/82OJnMLpHwJG11x3p1i4shPunlAdMbY+mDQ74SadcT/xlUw/yfthJ12wCVtxPGJgw35XmVR1CLBmupkxBU53VCE5e4Jdu6a1N/jU1l1rz5B4AuZARroHljjTAMIHFadYVUBjqegcRrgofTqgIKykRANWm7VhSMLHsnbdtYLhX+yd4fYTuTUr3ZK8TFkk6wIn7BA84rk3y4CZBY38HByV/9CefZZqa1Lfl8YJ/XyCfkewgYfsgze+EV67KWnwCyZouIcpJvqubXp6Dx4JM7UHUTRkQsZPvlpZHKKVgpsUaIrDDQU11B6PcKoPHFdt7I03bXa7mAqW41X3yDo3lSmmJL/vwBFhASlaZ0jsXfm6MfThLpmtsXarWZdaWwJP3MEp9za1p9FUGY8NLHuHwdEZkWHpAMndYxfT4lC6Wk739fkD6OMCDguCJSBoA4IClZL1lcDRBKiPmgie8rc3xdFw+kwjeHIM+OwY8Pkx4M9dwLDLEephqUG/cXOaBJxi241gdIG+4kXW43VXMcosk0FYzgZhOR+E5fMgLF8GYfnan+USwwljIWfLACtK/kQvqslwVGfDUZ0PQTVlefBuPZhz8PpuYJkMwnI2CMv5kSxwXGOqMvSUXAmcQrK3XWhuFO41mYyfKrRZTYG1ki5oNfaSB2hC6bslXXbkMUtOTIXkCwSfOD/vaNHt0ykmoqEaniUbpOlZskEanyYLB3zLcLiXhOpJgh1RuSzNZBias2Fozoeh+TwMzZdhaL52pzEGUM0iQB1kRM61k/HD1QkeK5NuTjntucUb3rj/tprpZ8605QWTue7CtACZEpkVMuFND5kWP3MmIwfedJDpkq3XNBgIMnvlDFVLdMVZ0HaSDRPKa4knt0sAoRsm4wvsLhYye9Oj0RIfhHRISpdp4+kRO8y0lcR7L3nwnGCMOLdFAsNyFfA3490RiFWHF8OdweQFbLdrOSJxvmjOlJkv6jLjZBjmZqunZ7Og8kSzaixkPM4YUa53yfEfsR6TCvKKsRd7//4P"; Sidebar.prototype.searchIndexData="7Z1rU+M40Kh/zVbN+wEq98vHkHDbJUxeHGDrfFEpjkh0cKwc2R6G/fVHchKGKMwuRo7Usr21xQyBzUaPW62+qfuP9tkf3bM/Go0ofg2I+POP5kB+t8Rr8kdztPq54Hi9PMWcs5fodCD/QCP2Ev7RPFvGq0D8Sl389QfhMfVxcINnJJiwiMaUiV8ZzVgcs9W7XxgEdCF/ELO1eDWKOXsmj3QeL8VrjbdXhixgXLzyR6NZS/8RP5EfrTEUX182H7Jb23y73Hzb726+pfO3NWw+89t/F9DZBz/qjuRPsxK4IU+xdQK7JS/3gZghcEcXy5IjuF9bX7+lTXBGwjjdAyglYR2DIgZGMaQboeIgdgNMCL2mGQhDHAQsicXhmMwCAoRF245+2LH43wTPgZCwtDV2JMDsjo4iET1DHJbkB2chEAj9zh6EjiGzYUi5nwSYQ6GwvyU6fTMU/kxW6xO6FQVUt49hXxj6VjA0yoohtSJxOIejIVUQHYMgvCXma3Q+X5A5uiJQD09T+vKWxf5SkPDEOnDwtlns49iXkKYhHJU1tfG1dmIBBMW+MJgKQbzXFEBA2FES4JRD14py8AISzgkHHJUxJhBbEtMXhh7xawVDwhAfmqAppgEcdWHHB/NiTtdwINiJX3vil2gkKIA+Sk2JxJRTqIZVx1B4Zk9XoivG6T8sjHFgn4clkdjj8bBdlnUaavDOkGt6j6YJB2pfmQpgbhnI1DdMEJ2GURCA7Mzdyg07o1sQkPJ/dknAieAZ3hk+jXx2OktoMKfhIjo94zj0l+j70xP1yT6NNaNhTPj5DxLG0fa1OY6EDSa+kWt5okHwfo3NTk8s54PVP6X/fEjqi8jx9jufyI8oXmBJHNBQ/E/DkPjx9gOqsNv1fRO2fQA7xfMh6/QnZztuWszPw3lZgLf2gLcPjQAjwC9JSDj10e7dio69v2971Zu2uDOxqnAlSy7Kgr5eU9zkQ5vPCPrx6L7oqDv7/lbv0N8yQtpb4SAQ8h2JDxxFRYe+82F2Gr1lB/qUBMRnq1UiPjq6YklU+KO0Xts/S3uWFMsheTQZVvDNwL8PqViWWOtr4Yk3m/uK5rA08ojEhYCvpYBHabnHWhiP6yXhOIhOr8/GaIxp+MTxqvA6RynJ/CDk/x/PYLjj+EejJkiKr5NfLPN/LjSkaOC1Uke70A+mtb85PogagHowU/aSrq3Yz2Q/oNU9DGiBeSY3eL1ZaaEfiOIFd+pwH8gY+4I+i5aFfyb9/WeS2X0w+Eyoz9l6ycLCH/O9/0zVgXkoxXc1uj1nbK7JEA3m4igRjuAQ83nRn0xH8QFBbxN0x+SP/BI8F5d2DKfblRX6ifT382xNwKe852OxksI/EeWIz575NPhE1gQ/F/+JtPdd+D7kPZKE6JHx5yjGGyLFfjK99r6PAtiR9xLx3e7HhX8uyo45vPUH5rlM8SwgcdEfiHLMtwEbXlPCVzRUy2KL90g6yiMBfKrcF9+XVzYIZI/xgc4JE278Snxb9MfS2S/R+aAsG8xjeSQzdCaLPIt/vCsFwZBDw2UyhuFlGkNBJAh2z2XF5klAotN67fIcXQzZedGfiBqG/IL2eiP49kzGG4o5Po9mvdtC30YkehaL/R80DJIoDRS//XrRn1N3/5RpfmHnGHlOf8vndBEwxqun9FZTCu0pyf+LLKP2XmjsL9Hmf1D0Z9PraFsEJp7NBeXkRdYAe4T/oD7ZPh2xqV688f8U/SEpcczeFyLLJh7S/rMp/EOpO6HVvFdx2qxKdNqo4RmgttsD5XGCg91p8+t/ir49eEN5mbHwaq2ldFbLXH6c75OaizPGjxn/ZQmchwuxCPRtiP0lQaPtzwv/XNSivsw2wY6U3lPYvcvJMMBRhC7ojBM0XMpccvD2MIr+LNRTJnNCJq9nITjQWRKTeWnQK5FlW9vghon1zEvCXKkzameuJ86HuQw+LjhL1qURdjUGmTkhrwN+mcw2xtECx8LNe5WRxtoZjsgUXSWzoqNXjttWZu9OMPpl/1xuEebyGIby9TI8A+Wec3an4XjPYNdYYfumJXsS3cyn7vGeRLUPbNIfD7yy7IG2YgVlNvqP9xQ2nRhKsBMAn8rbG+o4KM1+0G1xdLxn8TC5LctTUPzhlrWzYSW+ntbbjeLfQe/rHsdj8eWrhDvdWk3m2ygpfMcdpd4je6hHh3O3XathHqFv3Xa9WfjgsnqTzKhID3yfRBGaSKqFB71/xSL7BTEt0MPC14hpZ0n0+HpF56vIb/bmRFp8R+PC89UNtWvx9Qao3S6+AddWenFkDqtrQY6ojyacyTOv+BkMJWjywZzXo8rzHarXSmMv9xTWmR1yLdbTQdH51mu61/70AI9Rs1d85azcUcp+YV8L8kPhLTi7FvLfk6LzVV1po3zPzrzCm8iqGt61HzREmBP8LIeFn7GfRSetNNs0q4rPOJ0vCl+v3tVNomghnnrCPi5BxF5t52tUkIcyNzvGIV6Ursy/aTSOPMTF57sfuWgajVwIvsKN5mmDPRou0OYSS9GRW02NDEeja3QhvhSdsl3felj8wHJ/35bLXr2kxVf+NQ3FFR2zcim0ZdSe22AeFj4Qp10Wrw/5PqTxKzr/ueYlGH2ktgqwwDttPFN0ztr9F7U4y1nSfowG/v9LKC++q6IOrTYap9vBHu4+cqFRd3Qv5euilteGpxyH0RPjq7R71a9bxNPzwld3KaPrDIu6dzIe3BU+raIWxpj1X7zxSeEJq+2/zAbxvHs08go/WbRe2+9FmP2ChRbk+7PCFyiqAxXNVtCNSFyKi9OKx5K9G7AWZBafzFnhS5mb+4yNxkVHk2nR8SpGW/aLPVp8vZtB4UOiSqcjs7W2I9lmaszmxc9wt22q4sfRGF3QoAROttKTKPswKB3OMkWF7mi4KDrlerNjUS1fcJY2QJuXp4BcGS5rVkmnXT6Enh6s1wHFoV94Za342Gavtu56qpRGtq1ejrjC4XxJgsIPSVTqyc2WzFxN0tnsRWes1NeZtfGuULPRLDzhusVj8HpYeF9QCWZkn2Gvx7fwwftuzSZf+UlDEiMv5kQOeio67Xptv07U7CWU6+8e8m7Oig5Z7bxjNFVyXfh7VIor0jV6y+d6Mi38jL6DklujZRmC8APa1WaU5HaE1eYO1xOBe7VKQrGaEmQA1UCd4SNwgkbeTdEZd21eJb6eFv4IVPWF0fjQn2ffR0UH3FAawRi1Mf4ihW9O2doX4LrRSyeCb+ErxpXrw9knw+sAvhncopgh8UfRMasFzEYNtxu6WMYvRH5Fg8KfeXa9khsWLjjBcvTXpPCliOpMNqPKYzwofDFtbz913TAqyeNh4fm2bd7gGZ/X68W/zqrdXVwLMZnTMoQqFCOuZ9QLGRMimzmsA1z86paWzXjFmETLyn47OmSxelQvQQ9b7ZlAWphpSNHD4O+iQ27rjpvRgsxmNCAlylkrCT+jBcxjr/DunnKhxGyR1vi+8MpCyYaYjdaP/y68/Kpd240G4W4Hw/JUgfcUx9qoCXdbDSk5Ll9hIuOwDNUWysUzs/qCxBELS9CQUrkOZdRCFpBfGH/elg+tSPHHRylnoFkb7pb8TKJSdPGzrKAl5oacW3KBZ/JC1PnPmITz4mtsu01AN9zbJRBvCJy7JeCsXNrpGE2wfvdjEhSdsJI6MesTfr/16mUYl6Z2wDaan/q+TteBBivhfD/R4h+Cyn1Vs27LjnbaLHHNeOENaqVRlNl7aZPBCNWLTliZSmc2rC8JNwpPeD/QYbZIYyI8b3Tty9UVm7JSy2zWmJucFT59ojTDMJvQngyRx57iF8wLH9xXSrrMTgkVnB/onLCiQ1ZLa43mAiejwk+A2Pkgu4slNaNW8mRc/MvBjX3Chg1jzmLms60fEpShCFQxL8yOqJv8fVF0vmr3cKNBjDsck1VS+HmhVodZ3pE1wSXo86kIstnpt3L0H0HeC439ZXn69Km6w6xcTzzxb9ERW22N4RH+gwpRLjpk5cKU2eqBLeS05wtnZctMmQ3KeSRGU7Yuw4zyet3meeh5hfcElXiR2aF0nneDpoSvaFgGH1Dtvmw0xOxNC9+xT6lrNtsK2Ct+vyI1hG9WfktyT0oZ5Gy2NtF7KH4eymYQY0oC4ssufeIDlyKrumu5ZSVRImnLAc6kBHd66k1FORutw5iKpRdelq1eUJtOUAlavih5P7ORuE1RHJYrLzblTt+iiTHlif9cdMIH2tjsuZdwTgpf2lnv7NfFmb3GOn0oOt9206II35/d9euFr7y3e1HnfnyJPMJp8RMjljlX6b2j8n3ASVD4085qWOihdONIzHoeD5NbmTeVn5hXiZBjw/YKr46tCvPjoGrwclS+117hx/X19gH3jQkwm5NVhHA4R+slC0l0OsSzgKSD3FdFh66UtDSzlyin9P5o1AQ/8XWSEsznKZAgQOn7Ff0hNLUnNB/tIVzg4lcbNTq6lsnR8F8xFq/LsAXUCujsyv9oz+B6Ug4tpBg4X4iXHO0RbNvmDnxZm45K+kB6oB5IGWyj/T4SjeylZUfjn77VyVMJDudaB+zBUAolBPhgvrsoh4+mzBz6QjX80R6BbLBQDvtUewJGTs9gTdg6IKeDcM7ZgoQsidCE8KgEVYX7BSzZL/tOUnJfRz7GPnpkK1x80vt2T72W2fDRRx2WA7Vq3tTbmQNwuqwnQ9lrufig9+2YeitzlEcX9F0ShjRclIF2bz9x3c9cRqTL2qOxnIBWDiWiXAHuZ44TaNOOhVFTEtFu7Bvj2ceL5wa7FLJtDzeXbTF4dCrMn9K1A85e93m3oaXBeTAdo827VLCNwJ7ixa7rSzm4a7eL0ud+xhme+ziKS4JcbTOeObOtj1z2JhGfGe16lZQSvA0dc0kXeEbjnY7ZqZxS8rch+NeDUTlh2xD26wlKbx4vWfhaTurZm2fnQN0bXpeEtnqdJXszUX3c+2UY5eDeV6azWVDkt8PzksAGoMhvSfwUsJeyAFcG02QOHeoD342n2TVsLAt5ZcpV5usE+uRLAtq+Ttm8A7oO0VlCAxm8LTp0pcHgW2sEC9QfabxEHg2oz8KtL1p0+kpHlex9SvXhV9EW08DXuDS468qFmezzx3LgHTMux2SVg7hSfJX9rr8+8Omoyg8Zg/3AKuVtEPcj/kECEi7isqTiAPidj5QL5qWJY6kJicw1nV8nHhE/4TR+PR3KXhcUXQjyLzgo/LiAltK+JXO+2duC02Iuv0Vv71Rw5KqUZ9YreSAvi3w3lJaSmVVKHrAvcUyeCVkXX4MrI4GzX1PPBXeC+bzwpBWLMHNsNg/S19+98pyUSm+dzLer8gB+w4rfo1bp75m9nXUeoG9J/ML4c2mMkpaiuDOHY/OAPrn+uzTqRPUurUj5Nv1QGuZKNZBZZ4f/SEs9U1/nPqRPlMzRZDsFIs0sF988VGacfMUaTynq8JdTTkKxILnOqJzcs98M1+c+EjrGjxl/LQlyJb/5FU9IF/kFDUhUCtg5RLHygF0S0VZof8VW1KV9xaLCd9ZWr4N/xUTU5Xw9mT6URKpzMMh1aY+pz9kLmZVDaUMA/v2qJNIN4ITcvMOm1q0c+Uxl2FL2+tkcoMtGlJz9LIvZrcSxvpJc00bOnuIXzAk6w5Fw8cvBXenHlD11nwN32XQC8zkqg3EIQZ9vqwvLIeBKCKWXuQJLH/h9SOOy6PG2km2zED7Z1BfKeGE57HEAQcLHx8eSyHdnvx+W0Uj4Rm9vMxFp3Oo8XNDi90fVno6zPfF0mAcsKXxpSr2nNIysZVcl2qRHNHomcVx4oW7rTpDUR30xRLs3KThsJWTVym4E6sOmM+FaDpdYfM4ASSlHXjKLXqO4+E3G9Z2eHPCL43KIZ+KzFt7HVFSLDdx3JEgT9ViIOo7xDEeF1zGKZZj9qo8+9an4IRpwjotf9mZfozySGRoGSVSCeLhdwzC9Vk82fSUvZHvDXfO383gpPKlS3Lrv6Hb08LYUdR9AOZoc6IdUcsA9DHAUoRZqlwS6cg88e6vxXKArHT23DSbr9eL3ae5D0DFv/Msh8rpztfNAvu+ZXuAZp35J+B80PrQi85ckJClz9hSXw5xRskTZ+03mgf1afOIgoJvvkRfj4l/RUrMX2bNzeXD3Rrcl0S9t5bKnFd43+JVw1EB3ZMViUhLyqmb/Qnw9N/TNkjAH4aSOL/9GvVqthsZJENNoz4wv+gPQbgyfywOQ3E92ZuSmdrQc+JVZWXasmhR/kOqdUil81ZWyJ/tbg3JEpOYpOnb1nLWj9Cdnf5dEzFWLMnuWKQ/cnInXVys8C8qiXkBEhMt8mloiTle/ztOScFc0jJWD9FcoDE0uH9H4clh47B0A5+gD5XGCA3RTInkHEYPf1KxXCVYL0MsBHEY87JHx5wVnybqifnzqL9smxKcDmVINcdFhK50V39owfB72rm2zDuxLId7hHE0JX9EQF741lzLCrL77sVnod3hOGZqyl+LX4jW7ipRnbr+QB3APp7nT4l/TUMeBtDIHdXPFLS8OFP7UVHRK9qKMPJA/0pMLKocKF5229rC4fGhv36PgsBXtnf36aJ6w0Rmn8xJc/tpvLZK9L3GuzG/YpoUlGqzXAcVh8VNEfd2O57nyn3IcRmvGC38LTG3TZQf7zeAWyZpezoKg+Mb5gb+fOa71Jegc+8+neO2fDiZD5K0wj9H9xEP1Wq120pS1MA8D1Ljfhx8oPDhdLON3Cw/Ik/w2WmOfhoub9LtRva0+IvFR5uzl4+f19lQOMHX2MTUPwyJySR9Skj8Qy8yDT3uLpg0YzQfGrwk03XZKpg6YTP3QE8ufzEadDeVXVO/X2rKgieIAydph8Wvxtk/Yb2dLuwxsuNNUOsgadSdZZdVIubBq1VPxEngqZJ9C1ujX3BQvC1ux0a+7yeqDiNvxWTmqtqywalesPsmq2W+0K1afZdWqWH2SVbdTa4Ln0jFvHwguLfBcPrgmYIBLBzyXj/L3BsD0wYNp1g8j2McHU4evYRofpFOODabXbNU2ofxNWP/ku3DgQnlgbScRilX/LtQPiZ2FU2vgDVC73Wuf/I0Gc7yO6Q/yNrbRBWQWHN6BdyejunXwW9GCg7tl0wDPxp7cNMRWq+j8jg58U9GCCb1lA99c7B32VjDDxgHDqN4/vCZoAk5fHFVwqVjSNAJKBy6UesvOPurX6jW4VBotS7LSl78OlUqnfVjsfWwqAsD8rStfs9aEJDRK2ap5OEPMhffJ0UT8gMS/Sp1QQ+1eCEmMLOjh34JqA+Zkwaf6LacOZIGyYAoOcYyD1yhGLXG8f3yJExIhK1vujVCjJ8zm/S7OIfm45SckaFb23xu0VgXtS9AqQL8H1GnXmifn8BC1lPmrFrWVQNRyAJGFJOJ7RB0HENU/aIdnklEfPKFGw3yY6B2hutBFgOH0zScX3+AoXm+jhp4YR1cTQLjUe+Dmc9S/o9VspLRGJAjg8vpgJJktXq0afF5Wgisf4qrXHMAFSLzqlfLKQqtZSdeHvK7nJIx3Y7XTutCPZuGW3NG7nnio1RYKyiNhJD8wVDYW4lHb8iw08H15LXh7RxUuIgvic0t+JpHMcNfQrjHg225zoD7LGrGG8B2mu0E65z9jEs5BVwdY49RotKYTdHlesfoEq2ZjMhGbsaL1SVrTcUXrs7Ravcn/VrQ+T6vSWp9j1azVO/DCnnDoVPmpf6PTaVV0fkunXcnO7+m0BZ1Jhef3ePqdKVwuVqIBOy738OXGGp+OvHoEnY61XdWRV0ig07FQS7Gh05XNtuq1Ey9gu6olOXM4imgEl5aNq7bvcfUcw9W1iqvlFi0bF9zf0eq7RatRM1++8/3WQ/V2s9beHyY6TKKYrQjf5Q4mAY6fGF/BhWfhTNyyExp/eIO877fn032IFbR/hTYeIG90BR1Zb39olYXC+w2xVru1kbGTQ2ic/aCRQCMbMcAjeCh05svMNgw7H89MhomtoTTabdTNFwRNlq+RbBz8q2lF6x55MeNY7akOScAsOACHoD5Ua4XqNmsQW5E6OxvE1gKMzcImvR96qC2LGcF7AhasDAmn02j17ie7pJ/sTMj9XTN4qKgsaK0NqjSO6hQqC5pKoho2GmjcRJvJznDpWBIkQadW4fkXPC0X6FjbWi0nhMcank6F51/wtNxQPdbwSOlpgMdjwZJ+HJyftOsNuEwsnFaSSadicsik24LLxIJqkUy6zVbVNe4QSreCsg/l4Rw1+oC3jxWVIqC0KyiHUDoVlEMo3XalaT+iUqnaQyq9SlYUKmT2Qbt65NW7NbicbGia33BqQuYESJ46FafT5fr0aoKEA9m+/NX67n2nBECENHtJXE2+iifl4b1GMVkhPx37ex76AYsSDrgcIWsyLyc8XUfw1FtWxCfqtN3gkzW893U81+ETDekZDufoYnQHXe00zMnNhLMbcVQJfXzTadT8bUR4I05g+RhUy+/5dCo+/8qn14bKp9m1zmd0U+/U0GUPDhRd7yIXKM1GjVRUDqh0KiofUllXVA6o9IDLSlYvMy8qsGXFEpV2ReWAShv4wWwBinfTaNYiUFR61nWtgNKGDcWcpOxaCg43lcHoIiA/T+o18e8IDh0bbhGdrU6vz8aoXq/Vag8DdD/xAAHRnF4uFqZBpF2rnTQa8Klk3UV6VLrtFrph/mYvRSwgaIxDvIBclpdV9+oBuhfKBcdogkPyi9FfNK74pHyaDuiZrPPJtYB0HACSNfKtBWT+U3jOcFkYVbdCKuTBDBhH1pyaLo62TKZdPcAFYlR5CCDddiUeWxo/m8LjQeMCFd9p4mg3KxzvcVTS8R5HR0pHEy4OoyftFgdg6TCNA/hmMY2jD/iUNcyiC3lytXEW7UqJ/sLRE1rj7zZcHEY92Z/NfoXj+ZSJrwE5vSUxx9tC2r+bJ40zePd5NQPw39OFagIaTprysvxgOhzsqo6hYVKs1nrG1qK5YepWmP4T07Rfg01J9YGyTk7OD1OtgvMhnG2RpNTZcNFktXPyIbPG3EfT1kkdvOhY5rM77NGYzZMAUK0tiDP/jVPxepzkwufvljzroaOxssX+7vxCU22ufUKbbXUuWwKuOY0IGrdcOOWz5kxyp9R2gVK9ZQNTddb/G5nqlP8PQvDP96zp67zItMCTyVp9qEsmCbcue8eZ+8OGNbJCaHdXfzdt/fznmsuRKRtlhBqtNarX0OXsHBBCy3ppn+C2Spr+Q+aolZL6DcsK4AHAKqL973hSN+Wth2clR4egRjjGQyLN8O39/5m8/78dmdXsAGKlWbaSA6udWqrXpJLaMuo21hWkDyD97+jufUeJSxyTF/wKr6uEfWK7SHfjBHDhi2kLfY8LoMtkAOxzJzIjFveR4HIDF4zpMIkEs5nYhRrycpmwhgac49eK0DtC/+fCe6PUrTcKVGiWN5wmZDiG00QCzgXlBE3roC/LmFfFKZW/G3VYVBogqLSAUYEhKy3Q94ks6ZW/W52SU1nT+Sle0BiL4yc6HWz/Jv5jcSBRztWg15pRGck4/0HCONq+tiPjp0EO8YKwEWM5PfFGQTljccxW735hsP0vY7ZW+aloejUlkHOIZr35+wEZ8fpuXVEObNC3QegvGf+fiswBmSFnUXRyRvCqonNIZ0QjHyqX5uGxZIyLbKxATjYB5QmezwMClVLLovRcpt0nINOxubeuSCA/PVQ0HziVxtBcr9YkCAjYA8smmwlnsOD0FR+q2bAHZ5rwGQ3BqhtjR9Z6jTmOkwiRgKzkqk/HOFwyNc9pDYz0d/fI1LLtqN36/mjUzrcrzAOSx/xnEktXYtueTawU3bJ//gEDrrnPLePpfixsyXrNeIzOpEdHYiCo6qqIQUJ1QxZAMDXaIHfiltMdDaGAUnVWI5syPzIo75lyODvPvnaXC+T0KVmQ6HT49nep2kfEx2ltyzfP5+QlDRyxgM6RtxR2FRTToX6gvjIx/LXkvNAJh4UulshbEzIHA0kVtGxK/hiQJoQ/MSG9BJo8AUSViM8Lxo0BuOHe9BNYoQLIjKSHh3AGIcUuAe4+YTCsVtX2+zdCAK0Ci3LEVmnhPeMROkE0YqdnAXshaeLtAodQAWUUo1+LFMbntfc9B0y/3lOiesB+kqzQJFmtK2T/jQx9e5NZOKFy4MRGVPwexwswGU3gvM7/L/FjONlx4LQmNIpZWMH6FCwZvqpQfQ4Vk0ktcT7CSd+AJxZj/lrB+hSs1JeuWH2KlcyisorVjhVP41QRWnAazoVCPx1uXgEK6IMSzH/js12dgHO5XV9+hIT1zuCqc1CgrjCoaAxkVNerNfbjCtUnUP2JwZ55oDhtjM8K1X+gSt9qiHZvi8bYF69BqY2BiG1MgyDN4CSBWBH9p7IaMsGqzsWvUauOyM9Qq/T+Zzk90BnHcoUVqh2qOafiHU5H8g+gUDJe/kiXkj0x+B6EvBmT0Hnat+sMcJ2QBTDb+KZwiH+QV8YFngCsgjbM51Xakt/FquUxtv12uMSr2Sa7LDPwT/L1aqNJXlcEx+k432QFF0i2IJ0ekE0cXAhIskIbdSyEZpqsZoEUpEpBbzF5a45fKxw7HGmQ+5e8yGqxX9+N2Q8pOzvNU3ZkT4TMJbOL9M9d5glN8QzO1c56raWjgjZL+zoaeS2PcbkOHKDNm4EBo6WbjwAGfRsTsV5AufGmwqhtH9F2jz1g4dVDwWRZlDYnGKj7eCoRQ4JD41jsnuj0TJg48/TsAsKjpXU8XWzXpQGEE/wcLzlLFksgSJo9rT2jjWQY4NVa+OMXAQ4XRHgOyTqAc6uuradR9OkwASeM0hZCMIgoW6hnHEglH+9wiF2zIrI7JongiAgsKOjbiMTCdpELOxG2DHsqir2SO6jzn+tALK3i9B+cZKu7kzsS0SjGIdwwKSxMaRij2om/RSesn/m7xh5AyDS0HIjcuIyS1epV0PkBJm7Ra9sFkwhBCaCwsOxWXbEIjMetsMjWi0sfxXW4uS4EBIdCw7RgXMul+UupQ2QweBNG//YrLAHl/LEdl/iY03fhem7+eh0ioXB8SCUWtpG9wal4bHhw+kR9giay92jFJGVyR+aJD8Zi6do15e6SdZxwAmnP2A5UeCR4OhGKRBavhQt0RwKCI7JJqgBBdJi3bBlmRAMSwtlEdVWnGJcZ8VWc0BvHCAgUu66QF3NMQzASYjlAvqMB63KbZSgPYm1ASNj2lR8oeZGHzWWAowgIE800db5M0LcbOaEEUPmHrejkUpZykp8bv5DL3Fs4J2EERtP2dJSKrFOVHTzflqeNZ8QS6TtP6JqgtAr27b2B8Orr7LL8eZ0HxI859VNYYCBpGnj5Y7qgP2VjRXmsC7WEpsmMRDDlS9VT2Y62/MldYcrXNATHqf+f8xHNYoK0/YDp9P19Jm1qGmy2IFTjAII0vSd2QcNQ6K+K2ReZ/bFpYAkVnfXj8YBdwDbRNPEDsDf8oAlcGrSvYH0OlremvDDdPg3g2rNcoWKzLWTpDkQ4nKMLLquonDDwMw6oy5/aHZkJgwwMH9Wwb9qlk/YGT2VKbj1FpFAdCLTOvkxla5VgGlqjgpYdWrOC9iG0TSZvImPOINV9H9YRubG7YKJST8Z+pulb+bOaLml4ckGDFTr/gdeMA7pApDfkNn9U9ycf6CwgrIBFCu+RJ39r7lIQ2jSzFf0pUV2HJzc0JGh7T3osX4VCqK/lMaZL0ebixVh8blhc9DxpPS5/hQQDasrQtYhC/NcyfjfBMZQ70o2ODRzrZLWOTof4B41fQU3kaTT3NWwmW0cu5MssyNuwnRQIGB9W2S6drjUiYBzUxh6Rrj0iULxPazIi23iA0h9aZQI6JC5xhLZj4WCg6DYsyYQk8W7yGwwaB2WAxg6WS4I5pC3S7u5HE+qmQFwxTv9hYbxVnkBw1NvKFPi6MSBFuk+pw2FCuLzGH4gPDASFGs3tm0KRzmqCtD1Uy6JjngQYu1N1TsztEC+ZrYSbR9MaYDjCUa/tA+lmur+lB0TIBWAS9Z6xjSK7ucKZRNLfb/mWLQ+mgwHedOF+f19bGDtEHrafFRKMutLspd4ytUHQCZrT8L3vDgWJXkx4i6Q2ur7VAvM2M7nC8h7Lue+nEuOjR8YrNvts0ts1bIUXIYFjtAOBI/39ish7Ilevc46ToBKUfSw39P8ldI7+JFCuDwPhckd8uubMT0vtKzR7aDYZ/80g+grNezRpvKBCskMiB1sLzbIJoHzbqBqo9fFfxPOVidbv8WzQvPMLKj4f8HlzDyo6H9CRxl4F5gMwlcb5LZrNmn6k3crWAfbJihSm0XPOpDhbyCyyhLWpVaowfYBpz2DeGocVqA9ApTZiReY0Imuclu1Hp5d8UwPo7V76Q46dJHEcvB9FCYOYXnX/2wqzx5Hf8dqMl36Hq0KzQ7MvQvQJbOMPu3SEy/HqB4D65wGjowSXK0r/RinaXHWYcGkC0Fj+rAKWEZhUV48EjAUOjNuE8BUOxYLRON2RFaYPMckuoAmnSJiYyUyYTBWmDzGJfVYh+ggRC+icPtG0D1jAIgImdAKNjpyNULF5xyadDLvbU6UHI16TjusK+0sakuj0/GfMk3SqMLC4SF2nYYS3WaZw/8fbheZJClaYBByoCQkC4Zn8I18ENHBCjScBACVjt+A2HlRMd0yIFRijCB6m7Xui7Tuib7/uE1XQPg1tVxtcIdsi+yE2Hwmi0zMMpdZImRyUrd3Pw2Y5OhjQt2vvOxT5sAyDcxLI+NCIJ1BqgJXb7xnTRvkiASUqeo00tMEk4fN2Mk569+IsXQkUNprJRl04AorwKWKCpjh8hoJEkZeuUdUylIZLOllKbKWUivhzKCxlwqEWdnZNi8xvAaFvZ4yBiUSrnLLNFTg2p0oLfRLVDVmA7SBdr9lRTuhbGnpNBwVsKvrSv17iCFC3bcVEzDZ6SBfVdjBTdcAdgJHmIeMI2mAvrbaXulAuGPfJ/GTE8VMsyLC0yGoKqGmQcme5n+nOsjadhIfYh3KTXclhWEHRgMnC8LmdttYSnz6AIhrN/ZZBZoMSksYVC+A09OzaDNFc4eBpMxZx29pz84ZA0BzYcd1MYxt04VyHckY86PNmv12IWRfzT+w/C5tt7ojoZGquo8vmr5D5zycsiSGFPtt1i5oGUjtppZlKr2cYhNwtdwQDal6n5gkydZfRJSJrktBZEjwjTxDBCyh2it7sa10qaV474fQfoWFBq9aGWXN2wtkaDRbb4mMYSKwqFFiapGXTnH27eQUpjmQ1vr2pbxxxCubwtcxjc8Igb70kHMpBYzc+sAvlgz5kzLo2gNSHVX0qOcDOFmbrv50Pj7dsxRmOwFxDVDtEWgJTFW/8O5o7xp6ggulb5pJOqYQmO/sxk7pZH3DHSHxyOFeaDo5mC0fSFok0WyCfTj0LaEZUfkDYisYuFik1jhxVDQukLnAQEWBgFCu4Xm9Y4BKwTYsgyFvLvJ+kgAGvks0CApQsrLf2lXCmiVa5gECPNF6iCfafAbWmtUplM3wCWji72dlnYjTrLltBoG9nBFJTPyXfYR5Hau9WPFIe8k9pzz09CRdAwBlRvCJitWBKatVkqlGV8otPau9uzDh5KHsJf8I+QdfhnMpeh3DuFCvGXc8mr/NwU6N9xtPqFjAy1bHpQf2G0aYnVOpGyeHs4kyHQsvqtcff0NoiOtnVkW3Kp8AQa8AjBulKieqANow6oL8BdAdpywEUIO+ZcjgqHKQITZeyQV0grIIoCUBZBTAEiq3AZPj6+2Xz2UYw5wXkIgmCk2kyIwfn2ZBROG0xGjajYjtWEwrmeAchOx5ZUQdkp25adiLx2aJTHFKhiKPTMznwvP7fMJ5oEAxZIING4n/UrKX/iNejmLNnsvtJyNLZpl8EdQD8QK6UeaWHR1q6uA9ppT8ZbFaty6vhCC81n/zBQOijAxsR4o6A9RQr4LCy1gwvVwRsF2z6fezp+LzYAn0PhfcmtKyj1A5rp45PLfE/UXIIgtZbO4XdCXmYHzg6rgvhxqArHPvCf3l1hJsiZR8Uhxwd218kDD9T4wuRV//wBt/ReY0Ziz5RJQ4Dl2KLWRCvW4aE9o/cBGbDtvDIZ+apg6B1UMRlwdb3AhY7Y1Ps9wLpWbApvBA/O6q9rGzGGM8+0ySj4rXhNSXz+Ss6+9TAdhDMOv/ZnudozJ4Ym8vun46Q0pauC7Her2Ia4jB6uwsQEFfMiW7LJjP29EQc1V2dzEejDqkRp6GsP0SPOHYpEGZTuhRmDUeYdTsWmV3gKEbpG7gBS9mUH1RhHROW+IKm3J0YmELrg2thR6T1V0ifnNH1+0GculFdf0eiGCcch7Ezel5tjmdUZ73j5YqOV8pE6rXMUcIvAlsSHMRLH3NyOgjEZwtxOpV+TObUp6Ez21NxiTIHDa/eMGgyDIXsLUlEsSvklPPSHrkoolEqezeyGXco7TTvVfztE33nQJDs6ZppeZE845iGjkADI35DzOdUrHnhTBpOiW1kNnRzJEeQF+OnJzTgxBm91wWyW4c4XiKxOle47YvdR11ITIGTv+BK2qmrWwCUF7URwU+uMOuDYcZXOHbqcFDQZa7Pyw0dFSuLnQl+q/EQa+bI+aujrpdVZOjRoWK9pmYWLy9uF3hFg1c04dgX63BG7HRTe7nhozyK0YA6GiC3B+6ShEQswNGjwd5+3bwPOp8nm/vvjvKzJnfifbg7gfR6TTknMgeG8+XWcISbKm6Zi7tzw8aiNY1x4IzEwdmoO3KuyFxPN+mVF7nr1SoJ6T/p8eDM+QrF278On4iwhFkSoRGNCHa1ct4mwbUQPfExXQEHJXNzLT5gGMkcmAyqu0IPjtil+evAteR1tw4E4F90HhJXQpxgqN0koTt3hRRo1pzYMV6tmPiZK8l9MEou1W1ppxvxQddyfgN3BaFyk8haoHiH8IbOOHbn2i00CbwjPuNzZzQfHHxhvGk1GDhzCVC7aj83eHfXjiADE3+6JQl3KXUNRtZuk5hTlwLsutcC8wL3PfRdEjgwJ8P3JEYTpwIn7Q4QkZssMV9h3xWRazeBiNxk+RqlxpxsoInXrvBTXQlrcndHFlSs3Kk8LJRgpydeQDc4XCSfmpUNAp7a+K5nLRvrMZ+KfesR/oP67tTXQUnyeAlfuNNy66BpjTVu09HIEWZg/Igpc6fbz8EI58z3XPOidh+IYzViSehMXZ2yRa3ZJI9LQgJ/iSlHA18cDRGdBcSZ6pPdhX2gGBuOYrSm/T7G2HQEo9p6w6w0hjhOZGE75s4cINrBlNt0zV+H9Weypu7kxHq6lwB0cY3xWmzHG3cuhfVsC9gYc2e8LeusCPcTZ7ysXdt/e5uRORNF0j4YdVndknWcOFPipW2O6eKaBEnMHIHV0Y2O68Ly5B+u7ER1pKLxneiF7OUpcKdFr/W96CWhM+64dlI5D1iuON0gYLniWls3TiWsVgXrc7CmURLiFXUFl5IfNo7rnuMwccVN7LQsq60H4hAs3Tt+X4a1JmwdkNMzPHt1xnxQ3MR6rZEV1yRdtSYuVwyIrm7yQ5fWcInDRdp5MXaqpkU316vNjYViwYnvEDM1kGpc1i7ICjszp0S7B7surbE7rNSWFW/fm6Tljovd1I1H5AHLlROyqRt31oaVrFauJDTUJuzGYU3InIgVU+zMoagbTNUl5i3Zi0PjXNR6WPPKawvMFf2lBnKM+0OeWG0QOFMgoVa+Zr81rAvsPqQR+ekILjUCbdzwesRiKcJ/vGNs5YwWU9zuL/S0zhWbK7qsp1vMr08tkOO8HMHVtm2NPbKVQ25RS7vRfD68XNmNLWviFeEnEr+enlG2xP9g7krBfr2m+JKZJ2h46cK/TmyIE4cChtrZbW1cS7JKL6s+Erx2FlvmU1IX2wUOgo1t4T+7kmXTbracBzSWxMhbksCdcnLrW/SC4wV1JlDd1a2+18V1hcN5QNAjjZdOdXzU7SKnzY0uluiBBTFeuHOzrWX7INij5oxZqxuRzZWaM8V1ugVQutT+ImSNRs5c/dC+h6XL69aV4nzrJsYtC0+uWUj/SW1aPKdOFaoo4y4zx2f16aHzMHZmXwKQNuStmENRRuvu5q+cLxpyFkUOodMtstZF55o2eyvn/PJsGl1iXkDX6MqlqGNXO6ytzSxmnKA7YdbG6H7tjPvUte0IKNxccaAsajWfktAnp2JFjGNBzxmrQxvZZuUazMZ4ERJX2oB2dS+Q5MCL+sLY8NnalRia9qUbfWa3iR8Q7E6xmX5QIzdkrip/C1L2SMP5SrBwhJg6qN0ksTXjcXQ6WK2XNCbYobSTbumBl65cAxn3l+5081RFLLse08R1hiMyw85syba2EtPlRUPmJ0GJGj9pE2PCI3/BwbMrwHSvd+UALEY3OAl9Rzv9tTNXsusiG+LV2qGrEor12jWuxba8HDVd21Z4PVF3ijJsWxWS14K71LFZ8SezR6+1iYXMnfoVNXeZvVw2F1yu6C/1FnTLvAJLuy7f0CdX4ojaLfu1iQV0NXMoYamdHdflJRO8aCh0fsxfkfdMZU2Go/rsC8nLY9BzRb2psmfe/H/1A4e2qnJ4Ghe2EeUxOqPOdOlU5csCsB8OiZd2NkmXFnsJl4KEc4eAImbGjVoVnKP637xCO/9JuE+jSp99ktcF5eSFMVec84POItnrpLSBRUuXVNnBkLjsxcU5EXNGhym1eHXj2n9HbELdSfbadtIlMzQMCA4dss/2Ja1jfGtessCVCT/q+Afjtqxk5Y5oabcV0ccVzlmAHcGlPTpaF9cVFvr+MqBzd0RMYdbpGGdGn505H7Wn1+QAyyHRUoKwxg/GK8ZlMZT/jKYcU1dKoqxH/q99grbGa4Xs88i8Zxw7hGzftPjKXSVdZsK0YBx5L3S1coibbRvjTxLLeKKjuIybF3/hV+xMpaJtNXZDnwj6UxyYzlxPOgiMGWc2ZjHjM1ni6UowUREz88Urv5A13ETWNK7GJtQPqe9ayzLbVRhbalMs59I7uj07xp3MPWqO7lDzFYx3OFwQvhuu5I602S4tVrg5I2+6s+K0uTH/GTlW1Kg9aSkfaHJIgkvjvOzv0XSsxCzALgW2bZdN3bEXaeO6gks5P+vGcSWhQ0lftWON+S354Agp1Zw1XkzsYRqgM4d2onaXAm1gIY0xf0UjKl6JcODaxFDbroAnPppwoB4oeUkhOcJNe0CaPrdkhpFbxdmKrBnPcXqERPjFTVpt4wEhjwRP6DJJCzSqpHAmck5HHo0nN2UymMxkpwx3dFnHtnfuPVP0Z7JaO8JrV9Bij1dA5g7Jl3pPzngSRfAia6n5HVNmfdvKbIWDjQvlVhsb+7cmvDANAvG5s8Jm3tAQyFZs5s6kIdUFML89BTGh0hhx5yhQu0GYl7KEO3QPQG1hZh7XtkjPnbTmvq2xa8togVjDFWJKVVDmYdw5EHNnQ+p3+tekNSVhSJ3pWWnbqKhCPRlgybi1I6x2sX1rLvijUylx7flB2rTEB4vSZhgVsk8iW+KApKkkh6DZbuos+9JHbln41uWMsTm6xPGScIeoWSuMiom/PB04VPOvuyWnYsEanBz1gvqZvSAdTkO8Ihy7KlPZ20TlwMpRucoej9BiRYIATZabFbpAq6Vr1mvRYqsVdrXRtVnFLlCtE4cSabqjM7RYceZMYtumTJ3/X+K7UjGnRpkzVxpqgZK2ujuDBNX4stHNlzZIdGjeg26bLB1WY2dDpV2j1vqEvbhz8tUtnnxy9DVzBZRSoZq5RkkLlOe5gslmOGFKArKW3owznnJrP071hXRhPrxc8ZabupWo+eBqOoJLmdH81l7ZNK+WK7zqILRX2xFcVnfjvXfmCKaWbjm4DqYHOicMbYKijvBSbIiW0TPxEW+ac4+xL/50xS/s6jad+CoyjsM0T5heAz1tocclEWrMGe9HCdNkPx731q8PcED5DLuSZFWH3fWz+0T541sH2CH7X20flj1OcSyCrngE9dq+C9XOHmo9FkJXvIS+dlLtWARd8Rv0o2jHIuiKK6HdNetoBDuuENzfxV/x9Y+FsOsIQvVaYCt74UreCFezRCD0XfFDtFtU5g4w9JeMu2MP6tYtHomfK9ag9pyqI/FzxhTUrTY+Ej9nDEHtQqKc+Z1R/9V3KCADzQzc8nPnANFtqncsgM6cINp5/iMBdPQIaWfPoR0JoDNniAIQjA50JpawfwhnbyaXO8AkcvUAAXACC3iOHh4N+4eHgOfowdHM3JPpGPBcOTR6+xHorxSS5UxviB0KuyidmqwrPQnPFaWnRk3tb1xJz1WtB0L0XNF62o0jjwHvhvnOzBVU6l+slx/IFt9zMkdXdLF8wa+OYFSb1lnfwxeEc1fgKTLYsR4vkFfCYp64s4mVE8R63veC8eeAPjlz/1A5RKwXEF1id8IFHe3a5iPAc8Vy1q/aPQI8ZwxnaFVrEp4rhjM8yeMsCedIeVs3YKoWjPWc2xXmM7lwF+llb2KfOz0SUJ+t3eleogZgOtYDMG65bx1oRRt/ErJ2xgJUs23WhS+l54oJqN/8JGd6N2LrxkuWRA7VvEDbv+8YuiKHbWgG4ZitydxVEbR/CWmDzxXpA1exMWYx42nVi5sEO9YzIRMs1oGD4BV5yWxF+EKI4yMn7kRVldSIdaCyWRIWUonSXuluUuxb39iez5hD+JRqXvv4CI7RGQlcie33oF3MFADRRF6KcwQguAtd3pK66xtbjwym9JyxCqGVok5x6Ir5osYE29bDqlP8kzoCD5zVMmUvaOBOQFXhZ78iQbyfH7t0DVhpX2vd+dgBdPTosF/YJufMhc7IXxua2bzB54r0dXSnsh4HnzOVHdDusG7weS4XJYCQwZUzClB13CBYMCtn9J96gxXABk78Z3eErw9O+CQ+R6WvBUDzSXzOnL5K9137zm+Kz5XKSnC3WDf4nLm7r9ygtp5I3+BzpQlgF1zINMXnSgNA9eiwfvLeh0RAQncMOzp20H7C6IEsqexe4tSdOAWilfjfDxKcDjinP2Q7/ItA1rRFjvA7mHvyFQ9ErF8LHHtB5zhyJVOu3oL7it2SA7Hbc1d45XDS5sFL7PGlI8h2MmUb2aMjvPKoa86Bl+fMlgTCiyXVlsyIrNqSmXg9EnfsCqW1knG74gwvFnjhTL2dYoYZN1zP3KlxUkXrK16SJis+Ixx5S3cGuO/r+6+1idNjRnASvyIPB+6kUjvWoTH2jAbhXNoWAg91S+aUM9O4SpNNue7Ep8OuTC9XujN8bZSLJrJoSV29JvGlWgc9XAzHaLh053aTWh78pcmHesgSzknov6Lzn/4Sh+4YaIqsGbdnh0kkFuBKJFa10b6STdbCNWIvYRRjyl0lZlzARpyGz2nMnyXi0KSumGk7X8neqTnaJkumLHHm6GxYPjrPA/JDXmt1hFdHNc2M+wLnkfjUDhFTL1J/paIjH2BIngWuUFNOAfP78o3avTOOpmKamd+aCWeOsOopVxSMB7LPf1JnQthKAMO4RXYlzFc/cQVXu2f7iLxiMXEl1qOW+tiBha7DJ8ZXTl1wUZquGz8hr1crKl6ukGVA9kvK3LmNYTvl+x5awxFobdvVUXIIhzPx624Od/U0aUVxml+SIR9HK437X7njrUVtnEQkWblCK4eeFlq0bhmaYC4Di64Qs51V2uJy5qTs5jAGJxdgrpyS1k2LiSSDvj8J8198QmeLyixsTYfOyTzam+vBEpIlPpwjuLq2I2OytMeZZKUiW8ZtMM+p1K7tOzZTKryiGI2xv6TOtKDsWY8nbrFNEu4vceQKN+t7c5qEoTNxWOsJkfu1W2Uqii7Tk6726P8D"; @@ -10677,35 +10675,35 @@ DrawioFile=function(b,f){mxEventSource.call(this);this.ui=b;this.setData(f||""); DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1; DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.errorReportsEnabled=!1;DrawioFile.prototype.ageStart=null;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0}; DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};DrawioFile.prototype.synchronizeFile=function(b,f){this.savingFile?null!=f&&f({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,function(k){this.sync.cleanup(b,f,k)}),f):this.updateFile(b,f)}; -DrawioFile.prototype.updateFile=function(b,f,k,d){null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():this.getLatestVersion(mxUtils.bind(this,function(u){try{null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[u]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():null!=u?this.mergeFile(u,b,f,d):this.reloadFile(b, -f))}catch(x){null!=f&&f(x)}}),f))}; -DrawioFile.prototype.mergeFile=function(b,f,k,d){var u=!0;try{this.stats.fileMerged++;var x=this.getShadowPages(),B=b.getShadowPages();if(null!=B&&0<B.length){var D=[this.ui.diffPages(null!=d?d:x,B)],K=this.ignorePatches(D);this.setShadowPages(B);if(K)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",K);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(x,this.ui.pages):null;d={};K={};var c=this.ui.patchPages(x,D[0]),e=this.ui.getHashValueForPages(c, -d),g=this.ui.getHashValueForPages(B,K);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",x,"pages",this.ui.pages,"patches",D,"backup",this.backupPatch,"checksum",e,"current",g,"valid",e==g,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=e&&e!=g){var q=this.compressReportData(this.getAnonymizedXmlForPages(B)),m=this.compressReportData(this.getAnonymizedXmlForPages(c)),n=this.ui.hashValue(b.getCurrentEtag()),z=this.ui.hashValue(this.getCurrentEtag()); -this.checksumError(k,D,"Shadow Details: "+JSON.stringify(d)+"\nChecksum: "+e+"\nCurrent: "+g+"\nCurrent Details: "+JSON.stringify(K)+"\nFrom: "+n+"\nTo: "+z+"\n\nFile Data:\n"+q+"\nPatched Shadow:\n"+m,null,"mergeFile",e,g,b.getCurrentRevisionId());return}if(null!=this.sync){var C=this.sync.patchRealtime(D,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==C||mxUtils.isEmptyObject(C)||D.push(C)}this.patch(D,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw u=!1,Error(mxResources.get("notADiagramFile")); -this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=f&&f()}catch(I){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(I);try{if(u)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,I);else{var v=this.getCurrentUser(),y=null!=v?v.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),y,I)}}catch(N){}}}; -DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var f=new mxCodec(mxUtils.createXmlDocument()),k=f.document.createElement("mxfile");if(null!=b)for(var d=0;d<b.length;d++){var u=f.encode(new mxGraphModel(b[d].root));"1"!=urlParams.dev&&(u=this.ui.anonymizeNode(u,!0));u.setAttribute("id",b[d].getId());b[d].viewState&&this.ui.editor.graph.saveViewState(b[d].viewState,u,!0);k.appendChild(u)}return mxUtils.getPrettyXml(k)}; +DrawioFile.prototype.updateFile=function(b,f,k,e){null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():this.getLatestVersion(mxUtils.bind(this,function(u){try{null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[u]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():null!=u?this.mergeFile(u,b,f,e):this.reloadFile(b, +f))}catch(v){null!=f&&f(v)}}),f))}; +DrawioFile.prototype.mergeFile=function(b,f,k,e){var u=!0;try{this.stats.fileMerged++;var v=this.getShadowPages(),B=b.getShadowPages();if(null!=B&&0<B.length){var E=[this.ui.diffPages(null!=e?e:v,B)],L=this.ignorePatches(E);this.setShadowPages(B);if(L)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",L);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(v,this.ui.pages):null;e={};L={};var c=this.ui.patchPages(v,E[0]),d=this.ui.getHashValueForPages(c, +e),g=this.ui.getHashValueForPages(B,L);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",v,"pages",this.ui.pages,"patches",E,"backup",this.backupPatch,"checksum",d,"current",g,"valid",d==g,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=d&&d!=g){var q=this.compressReportData(this.getAnonymizedXmlForPages(B)),m=this.compressReportData(this.getAnonymizedXmlForPages(c)),n=this.ui.hashValue(b.getCurrentEtag()),z=this.ui.hashValue(this.getCurrentEtag()); +this.checksumError(k,E,"Shadow Details: "+JSON.stringify(e)+"\nChecksum: "+d+"\nCurrent: "+g+"\nCurrent Details: "+JSON.stringify(L)+"\nFrom: "+n+"\nTo: "+z+"\n\nFile Data:\n"+q+"\nPatched Shadow:\n"+m,null,"mergeFile",d,g,b.getCurrentRevisionId());return}if(null!=this.sync){var C=this.sync.patchRealtime(E,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==C||mxUtils.isEmptyObject(C)||E.push(C)}this.patch(E,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw u=!1,Error(mxResources.get("notADiagramFile")); +this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=f&&f()}catch(I){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(I);try{if(u)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,I);else{var x=this.getCurrentUser(),y=null!=x?x.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),y,I)}}catch(N){}}}; +DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var f=new mxCodec(mxUtils.createXmlDocument()),k=f.document.createElement("mxfile");if(null!=b)for(var e=0;e<b.length;e++){var u=f.encode(new mxGraphModel(b[e].root));"1"!=urlParams.dev&&(u=this.ui.anonymizeNode(u,!0));u.setAttribute("id",b[e].getId());b[e].viewState&&this.ui.editor.graph.saveViewState(b[e].viewState,u,!0);k.appendChild(u)}return mxUtils.getPrettyXml(k)}; DrawioFile.prototype.compressReportData=function(b,f,k){f=null!=f?f:1E4;null!=k&&null!=b&&b.length>k?b=b.substring(0,k)+"[...]":null!=b&&b.length>f&&(b=Graph.compress(b)+"\n");return b}; -DrawioFile.prototype.checksumError=function(b,f,k,d,u,x,B,D){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=f)for(var K=0;K<f.length;K++)this.ui.anonymizePatch(f[K]);var c=mxUtils.bind(this,function(z){var C=this.compressReportData(JSON.stringify(f,null,2));z=null==z?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(z.data)), -25E3);this.sendErrorReport("Checksum Error in "+u+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+C+(null!=z?"\n\nRemote:\n"+z:""),null,7E4)});null==d?c(null):this.getLatestVersion(mxUtils.bind(this,function(z){null!=z&&z.getCurrentEtag()==d?c(z):c(null)}),function(){})}else{var e=this.getCurrentUser(),g=null!=e?e.id:"unknown",q=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",m=JSON.stringify(f).length,n=null;if(null!=f&&this.constructor==DriveFile&&400>m){for(K=0;K<f.length;K++)this.ui.anonymizePatch(f[K]); -n=JSON.stringify(f);n=null!=n&&250>n.length?Graph.compress(n):null}this.getLatestVersion(mxUtils.bind(this,function(z){try{var C=null!=n?"Report":"Error",v=this.ui.getHashValueForPages(z.getShadowPages());EditorUi.logError("Checksum "+C+" in "+u+" "+q,null,this.getMode()+"."+this.getId(),"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+m+"-patches_"+f.length+(null!=n?"-json_"+n:"")+"-size_"+this.getSize()+(null!=x?"-expected_"+x:"")+(null!=B?"-current_"+B:"")+(null!=D? -"-rev_"+this.ui.hashValue(D):"")+(null!=v?"-latest_"+v:"")+(null!=z?"-latestRev_"+this.ui.hashValue(z.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+q,action:u,label:"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+m+"-patches_"+f.length+"-size_"+this.getSize()})}catch(y){}}),b)}}catch(z){}}; -DrawioFile.prototype.sendErrorReport=function(b,f,k,d){try{var u=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),x=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),B=this.getCurrentUser(),D=null!=B?this.ui.hashValue(B.id):"unknown",K=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",c=this.getTitle(),e=c.lastIndexOf(".");B="xml";0<e&&(B=c.substring(e));var g=null!=k?k.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+ -":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+B+")\nUser="+D+K+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=f?"\n\n"+f: -"")+(null!=k?"\n\nError: "+k.message:"")+"\n\nStack:\n"+g+"\n\nShadow:\n"+u+"\n\nData:\n"+x,d)}catch(q){}}; -DrawioFile.prototype.reloadFile=function(b,f){try{this.ui.spinner.stop();var k=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),f);else{var d=this.ui.editor.graph,u=d.getSelectionCells(),x=d.getViewState(),B= -this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(B,x,u);null!=this.backupPatch&&this.patch([this.backupPatch]);var D=this.ui.getCurrentFile();null!=D&&(D.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),k,mxResources.get("cancel"),mxResources.get("discardChanges")): -k()}catch(d){null!=f&&f(d)}};DrawioFile.prototype.mergeLatestVersion=function(b,f,k){this.getLatestVersion(mxUtils.bind(this,function(d){this.ui.editor.graph.model.beginUpdate();try{this.ui.replaceFileData(d.getData()),null!=b&&this.patch(b)}finally{this.ui.editor.graph.model.endUpdate()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(d.getDescriptor());this.descriptorChanged();null!=f&&f()}),k)}; +DrawioFile.prototype.checksumError=function(b,f,k,e,u,v,B,E){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=f)for(var L=0;L<f.length;L++)this.ui.anonymizePatch(f[L]);var c=mxUtils.bind(this,function(z){var C=this.compressReportData(JSON.stringify(f,null,2));z=null==z?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(z.data)), +25E3);this.sendErrorReport("Checksum Error in "+u+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+C+(null!=z?"\n\nRemote:\n"+z:""),null,7E4)});null==e?c(null):this.getLatestVersion(mxUtils.bind(this,function(z){null!=z&&z.getCurrentEtag()==e?c(z):c(null)}),function(){})}else{var d=this.getCurrentUser(),g=null!=d?d.id:"unknown",q=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",m=JSON.stringify(f).length,n=null;if(null!=f&&this.constructor==DriveFile&&400>m){for(L=0;L<f.length;L++)this.ui.anonymizePatch(f[L]); +n=JSON.stringify(f);n=null!=n&&250>n.length?Graph.compress(n):null}this.getLatestVersion(mxUtils.bind(this,function(z){try{var C=null!=n?"Report":"Error",x=this.ui.getHashValueForPages(z.getShadowPages());EditorUi.logError("Checksum "+C+" in "+u+" "+q,null,this.getMode()+"."+this.getId(),"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+m+"-patches_"+f.length+(null!=n?"-json_"+n:"")+"-size_"+this.getSize()+(null!=v?"-expected_"+v:"")+(null!=B?"-current_"+B:"")+(null!=E? +"-rev_"+this.ui.hashValue(E):"")+(null!=x?"-latest_"+x:"")+(null!=z?"-latestRev_"+this.ui.hashValue(z.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+q,action:u,label:"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+m+"-patches_"+f.length+"-size_"+this.getSize()})}catch(y){}}),b)}}catch(z){}}; +DrawioFile.prototype.sendErrorReport=function(b,f,k,e){try{var u=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),v=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),B=this.getCurrentUser(),E=null!=B?this.ui.hashValue(B.id):"unknown",L=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",c=this.getTitle(),d=c.lastIndexOf(".");B="xml";0<d&&(B=c.substring(d));var g=null!=k?k.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+ +":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+B+")\nUser="+E+L+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=f?"\n\n"+f: +"")+(null!=k?"\n\nError: "+k.message:"")+"\n\nStack:\n"+g+"\n\nShadow:\n"+u+"\n\nData:\n"+v,e)}catch(q){}}; +DrawioFile.prototype.reloadFile=function(b,f){try{this.ui.spinner.stop();var k=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),f);else{var e=this.ui.editor.graph,u=e.getSelectionCells(),v=e.getViewState(),B= +this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(B,v,u);null!=this.backupPatch&&this.patch([this.backupPatch]);var E=this.ui.getCurrentFile();null!=E&&(E.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),k,mxResources.get("cancel"),mxResources.get("discardChanges")): +k()}catch(e){null!=f&&f(e)}};DrawioFile.prototype.mergeLatestVersion=function(b,f,k){this.getLatestVersion(mxUtils.bind(this,function(e){this.ui.editor.graph.model.beginUpdate();try{this.ui.replaceFileData(e.getData()),null!=b&&this.patch(b)}finally{this.ui.editor.graph.model.endUpdate()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(e.getDescriptor());this.descriptorChanged();null!=f&&f()}),k)}; DrawioFile.prototype.copyFile=function(b,f){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var f=!0;if(null!=b)for(var k=0;k<b.length&&f;k++)f=f&&mxUtils.isEmptyObject(b[k]);return f}; -DrawioFile.prototype.patch=function(b,f,k){if(null!=b){var d=this.ui.editor.undoManager,u=d.history.slice(),x=d.indexOfNextAdd,B=this.ui.editor.graph;B.container.style.visibility="hidden";var D=this.changeListenerEnabled;this.changeListenerEnabled=k;var K=B.foldingEnabled,c=B.mathEnabled,e=B.cellRenderer.redraw;B.cellRenderer.redraw=function(g){g.view.graph.isEditing(g.cell)&&(g.view.graph.scrollCellToVisible(g.cell),g.view.graph.cellEditor.resize());e.apply(this,arguments)};B.model.beginUpdate(); -try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,f,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{B.container.style.visibility="";B.model.endUpdate();B.cellRenderer.redraw=e;this.changeListenerEnabled=D;k||(d.history=u,d.indexOfNextAdd=x,d.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)c!=B.mathEnabled? -(this.ui.editor.updateGraphComponents(),B.refresh()):(K!=B.foldingEnabled?B.view.revalidate():B.view.validate(),B.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",f,"undoable",k)}return b}; -DrawioFile.prototype.save=function(b,f,k,d,u,x){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",d,"overwrite",u,"manual",x,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!u&&this.invalidChecksum)if(null!=k)k({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=f&&f();else if(null!=k)k({message:mxResources.get("readOnly")}); +DrawioFile.prototype.patch=function(b,f,k){if(null!=b){var e=this.ui.editor.undoManager,u=e.history.slice(),v=e.indexOfNextAdd,B=this.ui.editor.graph;B.container.style.visibility="hidden";var E=this.changeListenerEnabled;this.changeListenerEnabled=k;var L=B.foldingEnabled,c=B.mathEnabled,d=B.cellRenderer.redraw;B.cellRenderer.redraw=function(g){g.view.graph.isEditing(g.cell)&&(g.view.graph.scrollCellToVisible(g.cell),g.view.graph.cellEditor.resize());d.apply(this,arguments)};B.model.beginUpdate(); +try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,f,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{B.container.style.visibility="";B.model.endUpdate();B.cellRenderer.redraw=d;this.changeListenerEnabled=E;k||(e.history=u,e.indexOfNextAdd=v,e.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)c!=B.mathEnabled? +(this.ui.editor.updateGraphComponents(),B.refresh()):(L!=B.foldingEnabled?B.view.revalidate():B.view.validate(),B.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",f,"undoable",k)}return b}; +DrawioFile.prototype.save=function(b,f,k,e,u,v){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",e,"overwrite",u,"manual",v,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!u&&this.invalidChecksum)if(null!=k)k({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=f&&f();else if(null!=k)k({message:mxResources.get("readOnly")}); else throw Error(mxResources.get("readOnly"));}catch(B){if(null!=k)k(B);else throw B;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var f=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=f&&(f.viewState=this.ui.editor.graph.getViewState(),f.needsUpdate=!0)}f=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return f}; DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,f,k){}; -DrawioFile.prototype.saveFile=function(b,f,k,d){};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};DrawioFile.prototype.isAutosaveOptional=function(){return!1}; +DrawioFile.prototype.saveFile=function(b,f,k,e){};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};DrawioFile.prototype.isAutosaveOptional=function(){return!1}; DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,f,k){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,f,k){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""}; DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};DrawioFile.prototype.setData=function(b){this.data=b;EditorUi.debug("DrawioFile.setData",[this],"data",[b])};DrawioFile.prototype.getData=function(){return this.data}; -DrawioFile.prototype.open=function(){this.stats.opened++;var b=this.getData();if(null!=b){var f=function(k){for(var d=0;null!=k&&d<k.length;d++){var u=k[d];null!=u.id&&0==u.id.indexOf("extFont_")&&u.parentNode.removeChild(u)}};f(document.querySelectorAll("head > style[id]"));f(document.querySelectorAll("head > link[id]"));this.ui.setFileData(b);this.isModified()||this.setShadowPages(this.ui.clonePages(this.ui.pages))}this.installListeners();this.isSyncSupported()&&this.startSync()}; +DrawioFile.prototype.open=function(){this.stats.opened++;var b=this.getData();if(null!=b){var f=function(k){for(var e=0;null!=k&&e<k.length;e++){var u=k[e];null!=u.id&&0==u.id.indexOf("extFont_")&&u.parentNode.removeChild(u)}};f(document.querySelectorAll("head > style[id]"));f(document.querySelectorAll("head > link[id]"));this.ui.setFileData(b);this.isModified()||this.setShadowPages(this.ui.clonePages(this.ui.pages))}this.installListeners();this.isSyncSupported()&&this.startSync()}; DrawioFile.prototype.isSyncSupported=function(){return!1};DrawioFile.prototype.isRealtime=function(){return null!=this.ownPages};DrawioFile.prototype.isRealtimeSupported=function(){return!1};DrawioFile.prototype.isRealtimeEnabled=function(){return Editor.enableRealtime&&"0"!=urlParams["fast-sync"]};DrawioFile.prototype.setRealtimeEnabled=function(){};DrawioFile.prototype.isRealtimeOptional=function(){return!1}; DrawioFile.prototype.getRealtimeState=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getState():3};DrawioFile.prototype.getRealtimeError=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getLastError():null};DrawioFile.prototype.isOptimisticSync=function(){return!1};DrawioFile.prototype.isRevisionHistorySupported=function(){return!1};DrawioFile.prototype.getRevisions=function(b,f){b(null)}; DrawioFile.prototype.loadDescriptor=function(b,f){b(null)};DrawioFile.prototype.loadPatchDescriptor=function(b,f){this.loadDescriptor(mxUtils.bind(this,function(k){b(k)}),f)};DrawioFile.prototype.patchDescriptor=function(b,f){this.setDescriptorEtag(b,this.getDescriptorEtag(f));this.descriptorChanged()}; @@ -10730,438 +10728,438 @@ DrawioFile.prototype.showRefreshDialog=function(b,f,k){null==k&&(k=mxResources.g f)}),null,mxResources.get("merge"),mxUtils.bind(this,function(){this.reloadFile(b,f)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,130))}; DrawioFile.prototype.showCopyDialog=function(b,f,k){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,f)}),null,mxResources.get("overwrite"),k,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,150)}; DrawioFile.prototype.showConflictDialog=function(b,f){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),b,null,mxResources.get("merge"),f,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),380,130)}; -DrawioFile.prototype.redirectToNewApp=function(b,f){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var k=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),d=mxResources.get("redirectToNewApp");null!=f&&(d+=" ("+f+")");f=mxUtils.bind(this,function(){var u=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==k?window.location.reload():window.location.href= -k});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),u,mxResources.get("cancel"),mxResources.get("discardChanges")):u()});null!=b?this.isModified()?this.ui.confirm(d,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),f,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(d,f,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"), +DrawioFile.prototype.redirectToNewApp=function(b,f){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var k=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),e=mxResources.get("redirectToNewApp");null!=f&&(e+=" ("+f+")");f=mxUtils.bind(this,function(){var u=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==k?window.location.reload():window.location.href= +k});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),u,mxResources.get("cancel"),mxResources.get("discardChanges")):u()});null!=b?this.isModified()?this.ui.confirm(e,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),f,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(e,f,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"), f)}}; DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(EditorUi.debug("DrawioFile.handleFileSuccess",[this],"saved",b,"modified",this.isModified()),this.isModified()?this.fileChanged():b?(this.isTrashed()?this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")"):this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged= !1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))}; DrawioFile.prototype.handleFileError=function(b,f){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,f):(this.isModified()&&this.addUnsavedStatus(b),f?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||(b=this.getErrorMessage(b),null!=b&&60<b.length&&(b=b.substring(0,60)+"..."),this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+(null!=b?" ("+mxUtils.htmlEntities(b)+ ")":"")+"</div>"))))}; -DrawioFile.prototype.handleConflictError=function(b,f){var k=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(B){this.handleFileError(B,!0)}),u=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,k,d,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),x=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&& -this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,k,d,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(k,d,u):this.invalidChecksum?this.showRefreshDialog(k,d,this.getErrorMessage(b)):f?this.showConflictDialog(u,x):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument"))); -this.synchronizeFile(k,d)}),this.getErrorMessage(b))};DrawioFile.prototype.getErrorMessage=function(b){var f=null!=b?null!=b.error?b.error.message:b.message:null;null==f&&null!=b&&b.code==App.ERROR_TIMEOUT&&(f=mxResources.get("timeout"));return f};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval}; +DrawioFile.prototype.handleConflictError=function(b,f){var k=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),e=mxUtils.bind(this,function(B){this.handleFileError(B,!0)}),u=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,k,e,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),v=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&& +this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,k,e,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),e)});"none"==DrawioFile.SYNC?this.showCopyDialog(k,e,u):this.invalidChecksum?this.showRefreshDialog(k,e,this.getErrorMessage(b)):f?this.showConflictDialog(u,v):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument"))); +this.synchronizeFile(k,e)}),this.getErrorMessage(b))};DrawioFile.prototype.getErrorMessage=function(b){var f=null!=b?null!=b.error?b.error.message:b.message:null;null==f&&null!=b&&b.code==App.ERROR_TIMEOUT&&(f=mxResources.get("timeout"));return f};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval}; DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(f){this.ui.stopSanityCheck(); null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(f){this.handleFileError(f)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()}; DrawioFile.prototype.createSecret=function(b){var f=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(f):this.sync.createToken(f,mxUtils.bind(this,function(k){b(f,k)}),mxUtils.bind(this,function(){b(f)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()}; -DrawioFile.prototype.fileSaved=function(b,f,k,d,u){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var x=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(x),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=k&&k()):this.sync.fileSaved(x,f,k,d,u)}catch(K){this.invalidChecksum=this.inConflictState= -!0;this.descriptorChanged();null!=d&&d(K);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,K);else{var B=this.getCurrentUser(),D=null!=B?B.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),D,K)}}catch(c){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}; -DrawioFile.prototype.autosave=function(b,f,k,d){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<f?b:0;this.clearAutosave();var u=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==u&&(this.autosaveThread=null);EditorUi.debug("DrawioFile.autosave",[this],"thread",u,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile);if(this.isModified()&&this.isAutosaveNow()){var x=this.isAutosaveRevision(); -x&&(this.lastAutosaveRevision=(new Date).getTime());this.save(x,mxUtils.bind(this,function(B){this.autosaveCompleted();null!=k&&k(B)}),mxUtils.bind(this,function(B){null!=d&&d(B)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=k&&k(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",u,"delay",b,"saving",this.savingFile);this.autosaveThread=u};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){}; +DrawioFile.prototype.fileSaved=function(b,f,k,e,u){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var v=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(v),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=k&&k()):this.sync.fileSaved(v,f,k,e,u)}catch(L){this.invalidChecksum=this.inConflictState= +!0;this.descriptorChanged();null!=e&&e(L);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,L);else{var B=this.getCurrentUser(),E=null!=B?B.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),E,L)}}catch(c){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}; +DrawioFile.prototype.autosave=function(b,f,k,e){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<f?b:0;this.clearAutosave();var u=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==u&&(this.autosaveThread=null);EditorUi.debug("DrawioFile.autosave",[this],"thread",u,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile);if(this.isModified()&&this.isAutosaveNow()){var v=this.isAutosaveRevision(); +v&&(this.lastAutosaveRevision=(new Date).getTime());this.save(v,mxUtils.bind(this,function(B){this.autosaveCompleted();null!=k&&k(B)}),mxUtils.bind(this,function(B){null!=e&&e(B)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=k&&k(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",u,"delay",b,"saving",this.savingFile);this.autosaveThread=u};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){}; DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))}; DrawioFile.prototype.close=function(b){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,b);this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,f){if(null!=b&&null!=f){var k=b.lastIndexOf(".");b=0<k?b.substring(k):"";k=f.lastIndexOf(".");return b===(0<k?f.substring(k):"")}return b==f}; DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.clearAutosave();this.removeListeners();this.stats.destroyed++;null!=this.sync&&(this.sync.destroy(),this.sync=null)};DrawioFile.prototype.commentsSupported=function(){return!1}; -DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,f){b([])};DrawioFile.prototype.addComment=function(b,f,k){f(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,f){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,f)};LocalFile=function(b,f,k,d,u,x){DrawioFile.call(this,b,f);this.title=k;this.mode=d?null:App.MODE_DEVICE;this.fileHandle=u;this.desc=x};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title}; +DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,f){b([])};DrawioFile.prototype.addComment=function(b,f,k){f(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,f){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,f)};LocalFile=function(b,f,k,e,u,v){DrawioFile.call(this,b,f);this.title=k;this.mode=e?null:App.MODE_DEVICE;this.fileHandle=u;this.desc=v};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title}; LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,f,k){this.saveAs(this.title,f,k)};LocalFile.prototype.saveAs=function(b,f,k){this.saveFile(b,!1,f,k)};LocalFile.prototype.saveAs=function(b,f,k){this.saveFile(b,!1,f,k)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b}; LocalFile.prototype.getLatestVersion=function(b,f){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,f)}; -LocalFile.prototype.saveFile=function(b,f,k,d,u){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;u||this.updateFileData();var x=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var B=this.getData(),D=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),K=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var e=mxUtils.bind(this, -function(q){this.savingFile=!1;null!=d&&d({error:q})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(q){this.fileHandle.getFile().then(mxUtils.bind(this,function(m){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[m],"conflict",this.desc.lastModified!=m.lastModified);this.desc.lastModified==m.lastModified?q.write(x?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){q.close().then(mxUtils.bind(this, -function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(n){try{var z=this.desc;this.savingFile=!1;this.desc=n;this.fileSaved(B,z,D,e);this.removeDraft()}catch(C){e(C)}}),e)}),e)}),e):(this.inConflictState=!0,e())}),mxUtils.bind(this,function(m){this.invalidFileHandle=!0;e(m)}))}),e)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,b,x?"image/png":"text/xml",x);else if(c.length<MAX_REQUEST_SIZE){var g=b.lastIndexOf(".");g=0<g?b.substring(g+1):"xml"; -(new mxXmlRequest(SAVE_URL,"format="+g+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(b)+(x?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));D()}});x?(f=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(c){K(c)}),d,this.ui.getCurrentFile()!=this?B:null,f.scale,f.border)):K(B)}; +LocalFile.prototype.saveFile=function(b,f,k,e,u){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;u||this.updateFileData();var v=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var B=this.getData(),E=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),L=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var d=mxUtils.bind(this, +function(q){this.savingFile=!1;null!=e&&e({error:q})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(q){this.fileHandle.getFile().then(mxUtils.bind(this,function(m){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[m],"conflict",this.desc.lastModified!=m.lastModified);this.desc.lastModified==m.lastModified?q.write(v?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){q.close().then(mxUtils.bind(this, +function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(n){try{var z=this.desc;this.savingFile=!1;this.desc=n;this.fileSaved(B,z,E,d);this.removeDraft()}catch(C){d(C)}}),d)}),d)}),d):(this.inConflictState=!0,d())}),mxUtils.bind(this,function(m){this.invalidFileHandle=!0;d(m)}))}),d)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,b,v?"image/png":"text/xml",v);else if(c.length<MAX_REQUEST_SIZE){var g=b.lastIndexOf(".");g=0<g?b.substring(g+1):"xml"; +(new mxXmlRequest(SAVE_URL,"format="+g+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(b)+(v?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));E()}});v?(f=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(c){L(c)}),e,this.ui.getCurrentFile()!=this?B:null,f.scale,f.border)):L(B)}; LocalFile.prototype.rename=function(b,f,k){this.title=b;this.descriptorChanged();null!=f&&f()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};LocalLibrary=function(b,f,k){LocalFile.call(this,b,f,k)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,f,k){this.saveFile(b,!1,f,k)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,f,k){DrawioFile.call(this,b,f);this.title=k};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.autosaveDelay=2E3;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.type="F";StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};StorageFile.prototype.getTitle=function(){return this.title}; StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.save=function(b,f,k){this.saveAs(this.getTitle(),f,k)};StorageFile.prototype.saveAs=function(b,f,k){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(b,!1,f,k)}; -StorageFile.insertFile=function(b,f,k,d,u){var x=mxUtils.bind(this,function(B){var D=function(){var K=new StorageFile(b,k,f);K.saveFile(f,!1,function(){d(K)},u)};B?b.confirm(mxResources.get("replaceIt",[f]),D,u):D()});StorageFile.getFileContent(b,f,function(B){x(null!=B)},function(){x(!1)})};StorageFile.getFileContent=function(b,f,k,d){b.getDatabaseItem(f,function(u){k(null!=u?u.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(f,k):null!=d&&d()}),"files")}; -StorageFile.getFileInfo=function(b,f,k,d){b.getDatabaseItem(f,function(u){k(u)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(f,function(u){k(null!=u?{title:f}:null)}):null!=d&&d()}),"filesInfo")}; -StorageFile.prototype.saveFile=function(b,f,k,d){if(this.isEditable()){var u=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=b);try{var x=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()});this.setShadowModified(!1);var B=this.getData();this.ui.setDatabaseItem(null,[{title:this.title,size:B.length,lastModified:Date.now(),type:this.type},{title:this.title,data:B}],x,mxUtils.bind(this,function(){null==this.ui.database?this.ui.setLocalData(this.title, -B,x):null!=d&&d()}),["filesInfo","files"])}catch(D){null!=d&&d(D)}});this.isRenamable()&&"."==b.charAt(0)&&null!=d?d({message:mxResources.get("invalidName")}):StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(x){this.isRenamable()&&this.getTitle()!=b&&null!=x?this.ui.confirm(mxResources.get("replaceIt",[b]),u,d):u()}),d)}else null!=k&&k()}; -StorageFile.prototype.rename=function(b,f,k){var d=this.getTitle();d!=b?StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(u){var x=mxUtils.bind(this,function(){this.title=b;this.hasSameExtension(d,b)||this.setData(this.ui.getFileData());this.saveFile(b,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(d,f)}),k)});null!=u?this.ui.confirm(mxResources.get("replaceIt",[b]),x,k):x()}),k):f()};StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())}; +StorageFile.insertFile=function(b,f,k,e,u){var v=mxUtils.bind(this,function(B){var E=function(){var L=new StorageFile(b,k,f);L.saveFile(f,!1,function(){e(L)},u)};B?b.confirm(mxResources.get("replaceIt",[f]),E,u):E()});StorageFile.getFileContent(b,f,function(B){v(null!=B)},function(){v(!1)})};StorageFile.getFileContent=function(b,f,k,e){b.getDatabaseItem(f,function(u){k(null!=u?u.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(f,k):null!=e&&e()}),"files")}; +StorageFile.getFileInfo=function(b,f,k,e){b.getDatabaseItem(f,function(u){k(u)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(f,function(u){k(null!=u?{title:f}:null)}):null!=e&&e()}),"filesInfo")}; +StorageFile.prototype.saveFile=function(b,f,k,e){if(this.isEditable()){var u=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=b);try{var v=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()});this.setShadowModified(!1);var B=this.getData();this.ui.setDatabaseItem(null,[{title:this.title,size:B.length,lastModified:Date.now(),type:this.type},{title:this.title,data:B}],v,mxUtils.bind(this,function(){null==this.ui.database?this.ui.setLocalData(this.title, +B,v):null!=e&&e()}),["filesInfo","files"])}catch(E){null!=e&&e(E)}});this.isRenamable()&&"."==b.charAt(0)&&null!=e?e({message:mxResources.get("invalidName")}):StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(v){this.isRenamable()&&this.getTitle()!=b&&null!=v?this.ui.confirm(mxResources.get("replaceIt",[b]),u,e):u()}),e)}else null!=k&&k()}; +StorageFile.prototype.rename=function(b,f,k){var e=this.getTitle();e!=b?StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(u){var v=mxUtils.bind(this,function(){this.title=b;this.hasSameExtension(e,b)||this.setData(this.ui.getFileData());this.saveFile(b,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(e,f)}),k)});null!=u?this.ui.confirm(mxResources.get("replaceIt",[b]),v,k):v()}),k):f()};StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())}; StorageFile.prototype.getLatestVersion=function(b,f){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(k){b(new StorageFile(this.ui,k,this.title))}),f)};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)}; -StorageFile.listLocalStorageFiles=function(b){for(var f=[],k=0;k<localStorage.length;k++){var d=localStorage.key(k),u=localStorage.getItem(d);if(0<d.length&&"."!=d.charAt(0)&&0<u.length){var x=(null==b||"F"==b)&&("<mxfile "===u.substring(0,8)||"<?xml"===u.substring(0,5)||"\x3c!--[if IE]>"===u.substring(0,12)),B=(null==b||"L"==b)&&"<mxlibrary>"===u.substring(0,11);(x||B)&&f.push({title:d,type:x?"F":"L",size:u.length,lastModified:Date.now()})}}return f}; -StorageFile.migrate=function(b){var f=StorageFile.listLocalStorageFiles();f.push({title:".scratchpad",type:"L"});var k=b.transaction(["files","filesInfo"],"readwrite");b=k.objectStore("files");k=k.objectStore("filesInfo");for(var d=0;d<f.length;d++){var u=f[d],x=localStorage.getItem(u.title);b.add({title:u.title,data:x});k.add(u)}}; -StorageFile.listFiles=function(b,f,k,d){b.getDatabaseItems(function(u){var x=[];if(null!=u)for(var B=0;B<u.length;B++)"."==u[B].title.charAt(0)||null!=f&&u[B].type!=f||x.push(u[B]);k(x)},function(){null==b.database?k(StorageFile.listLocalStorageFiles(f)):null!=d&&d()},"filesInfo")};StorageFile.deleteFile=function(b,f,k,d){b.removeDatabaseItem([f,f],k,function(){null==b.database?(localStorage.removeItem(f),k()):null!=d&&d()},["files","filesInfo"])};StorageLibrary=function(b,f,k){StorageFile.call(this,b,f,k)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,f,k){this.saveFile(b,!1,f,k)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title}; +StorageFile.listLocalStorageFiles=function(b){for(var f=[],k=0;k<localStorage.length;k++){var e=localStorage.key(k),u=localStorage.getItem(e);if(0<e.length&&"."!=e.charAt(0)&&0<u.length){var v=(null==b||"F"==b)&&("<mxfile "===u.substring(0,8)||"<?xml"===u.substring(0,5)||"\x3c!--[if IE]>"===u.substring(0,12)),B=(null==b||"L"==b)&&"<mxlibrary>"===u.substring(0,11);(v||B)&&f.push({title:e,type:v?"F":"L",size:u.length,lastModified:Date.now()})}}return f}; +StorageFile.migrate=function(b){var f=StorageFile.listLocalStorageFiles();f.push({title:".scratchpad",type:"L"});var k=b.transaction(["files","filesInfo"],"readwrite");b=k.objectStore("files");k=k.objectStore("filesInfo");for(var e=0;e<f.length;e++){var u=f[e],v=localStorage.getItem(u.title);b.add({title:u.title,data:v});k.add(u)}}; +StorageFile.listFiles=function(b,f,k,e){b.getDatabaseItems(function(u){var v=[];if(null!=u)for(var B=0;B<u.length;B++)"."==u[B].title.charAt(0)||null!=f&&u[B].type!=f||v.push(u[B]);k(v)},function(){null==b.database?k(StorageFile.listLocalStorageFiles(f)):null!=e&&e()},"filesInfo")};StorageFile.deleteFile=function(b,f,k,e){b.removeDatabaseItem([f,f],k,function(){null==b.database?(localStorage.removeItem(f),k()):null!=e&&e()},["files","filesInfo"])};StorageLibrary=function(b,f,k){StorageFile.call(this,b,f,k)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,f,k){this.saveFile(b,!1,f,k)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title}; StorageLibrary.prototype.isRenamable=function(b,f,k){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,f,k){DrawioFile.call(this,b,f);this.title=k;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(b,f,k){RemoteFile.call(this,b,f,k.title);this.libObj=k};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(b,f,k){}; RemoteLibrary.prototype.saveAs=function(b,f,k){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,f,k){StorageFile.call(this,b,f,k);b=k;f=b.lastIndexOf("/");0<=f&&(b=b.substring(f+1));this.fname=b};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(b,f,k){return!1};UrlLibrary.prototype.saveAs=function(b,f,k){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,f,k){DrawioFile.call(this,b,f);this.desc=k||{};this.mode=App.MODE_EMBED};mxUtils.extend(EmbedFile,DrawioFile);EmbedFile.prototype.getMode=function(){return this.mode};EmbedFile.prototype.getTitle=function(){return this.desc.title||""};/* mxClient.IS_IOS || */ -var StorageDialog=function(b,f,k){function d(g,q,m,n,z,C){function v(){mxEvent.addListener(y,"click",null!=C?C:function(){m!=App.MODE_GOOGLE||b.isDriveDomain()?m==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(m,!0);f()})):m==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(m,!0);f()}), -function(F){b.spinner.stop();b.handleError(F)}):(b.setMode(m,!0),f()):window.location.hostname=DriveClient.prototype.newAppHostname})}D++;++B>k&&(mxUtils.br(K),B=1);var y=document.createElement("a");y.style.overflow="hidden";y.style.display="inline-block";y.className="geBaseButton";y.style.boxSizing="border-box";y.style.fontSize="11px";y.style.position="relative";y.style.margin="4px";y.style.marginTop="8px";y.style.marginBottom="0px";y.style.padding="8px 10px 8px 10px";y.style.width="88px";y.style.height= +var StorageDialog=function(b,f,k){function e(g,q,m,n,z,C){function x(){mxEvent.addListener(y,"click",null!=C?C:function(){m!=App.MODE_GOOGLE||b.isDriveDomain()?m==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(m,!0);f()})):m==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(m,!0);f()}), +function(F){b.spinner.stop();b.handleError(F)}):(b.setMode(m,!0),f()):window.location.hostname=DriveClient.prototype.newAppHostname})}E++;++B>k&&(mxUtils.br(L),B=1);var y=document.createElement("a");y.style.overflow="hidden";y.style.display="inline-block";y.className="geBaseButton";y.style.boxSizing="border-box";y.style.fontSize="11px";y.style.position="relative";y.style.margin="4px";y.style.marginTop="8px";y.style.marginBottom="0px";y.style.padding="8px 10px 8px 10px";y.style.width="88px";y.style.height= "100px";y.style.whiteSpace="nowrap";y.setAttribute("title",q);var I=document.createElement("div");I.style.textOverflow="ellipsis";I.style.overflow="hidden";I.style.position="absolute";I.style.bottom="8px";I.style.left="0px";I.style.right="0px";mxUtils.write(I,q);y.appendChild(I);if(null!=g){var N=document.createElement("img");N.setAttribute("src",g);N.setAttribute("border","0");N.setAttribute("align","absmiddle");N.style.width="60px";N.style.height="60px";N.style.paddingBottom="6px";y.appendChild(N)}else I.style.paddingTop= "5px",I.style.whiteSpace="normal",mxClient.IS_IOS?(y.style.padding="0px 10px 20px 10px",y.style.top="6px"):mxClient.IS_FF&&(I.style.paddingTop="0px",I.style.marginTop="-2px");if(null!=z)for(g=0;g<z.length;g++)mxUtils.br(I),mxUtils.write(I,z[g]);if(null!=n&&null==b[n]){N.style.visibility="hidden";mxUtils.setOpacity(I,10);var t=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});t.spin(y); -var p=window.setTimeout(function(){null==b[n]&&(t.stop(),y.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(F,J){null!=b[n]&&J.getProperty("client")==b[n]&&(window.clearTimeout(p),mxUtils.setOpacity(I,100),N.style.visibility="",t.stop(),v(),"drive"==n&&null!=c.parentNode&&c.parentNode.removeChild(c))}))}else v();K.appendChild(y)}k=null!=k?k:2;var u=document.createElement("div");u.style.textAlign="center";u.style.whiteSpace="nowrap";u.style.paddingTop="0px";u.style.paddingBottom= -"20px";var x=document.createElement("div");x.style.border="1px solid #d3d3d3";x.style.borderWidth="1px 0px 1px 0px";x.style.padding="10px 0px 20px 0px";var B=0,D=0,K=document.createElement("div");K.style.paddingTop="2px";x.appendChild(K);var c=document.createElement("p"),e=document.createElement("p");e.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(e,mxResources.get("saveDiagramsTo")+":");u.appendChild(e);u.appendChild(x);B=0;"function"===typeof window.DriveClient&& -d(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&d(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");"1"!=urlParams.noDevice&&d(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||d(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);"function"===typeof window.DropboxClient&& -d(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox");null!=b.gitHub&&d(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&d(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");x=document.createElement("span");x.style.position="absolute";x.style.cursor="pointer";x.style.bottom="27px";x.style.color="gray";x.style.userSelect="none";x.style.textAlign="center";x.style.left="50%";mxUtils.setPrefixedStyle(x.style, -"transform","translate(-50%,0)");mxUtils.write(x,mxResources.get("decideLater"));u.appendChild(x);mxEvent.addListener(x,"click",function(){b.hideDialog();var g=Editor.useLocalStorage;b.createFile(b.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=g});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==b.drive&&(c.style.padding="7px",c.style.fontSize="9pt",c.style.marginTop="-14px", +var p=window.setTimeout(function(){null==b[n]&&(t.stop(),y.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(F,K){null!=b[n]&&K.getProperty("client")==b[n]&&(window.clearTimeout(p),mxUtils.setOpacity(I,100),N.style.visibility="",t.stop(),x(),"drive"==n&&null!=c.parentNode&&c.parentNode.removeChild(c))}))}else x();L.appendChild(y)}k=null!=k?k:2;var u=document.createElement("div");u.style.textAlign="center";u.style.whiteSpace="nowrap";u.style.paddingTop="0px";u.style.paddingBottom= +"20px";var v=document.createElement("div");v.style.border="1px solid #d3d3d3";v.style.borderWidth="1px 0px 1px 0px";v.style.padding="10px 0px 20px 0px";var B=0,E=0,L=document.createElement("div");L.style.paddingTop="2px";v.appendChild(L);var c=document.createElement("p"),d=document.createElement("p");d.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(d,mxResources.get("saveDiagramsTo")+":");u.appendChild(d);u.appendChild(v);B=0;"function"===typeof window.DriveClient&& +e(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&e(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");"1"!=urlParams.noDevice&&e(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||e(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);"function"===typeof window.DropboxClient&& +e(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox");null!=b.gitHub&&e(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&e(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");v=document.createElement("span");v.style.position="absolute";v.style.cursor="pointer";v.style.bottom="27px";v.style.color="gray";v.style.userSelect="none";v.style.textAlign="center";v.style.left="50%";mxUtils.setPrefixedStyle(v.style, +"transform","translate(-50%,0)");mxUtils.write(v,mxResources.get("decideLater"));u.appendChild(v);mxEvent.addListener(v,"click",function(){b.hideDialog();var g=Editor.useLocalStorage;b.createFile(b.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=g});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==b.drive&&(c.style.padding="7px",c.style.fontSize="9pt",c.style.marginTop="-14px", c.innerHTML='<a style="background-color:#dcdcdc;padding:6px;color:black;text-decoration:none;" href="https://desk.draw.io/a/solutions/articles/16000074659" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",u.appendChild(c))},5E3);this.container=u},SplashDialog=function(b){var f=document.createElement("div");f.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var k= -b.addLanguageMenu(f,!0,"28px");null!=k&&(k.style.bottom="19px")}var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.width="32px";d.style.height="32px";d.style.marginRight="8px";d.style.marginTop="-4px";var u=document.createElement("div");u.style.margin="8px 0px 0px 0px";u.style.padding="18px 0px 24px 0px";k="";b.mode==App.MODE_GOOGLE?(d.src=IMAGE_PATH+"/google-drive-logo.svg",k=mxResources.get("googleDrive")):b.mode==App.MODE_DROPBOX?(d.src= -IMAGE_PATH+"/dropbox-logo.svg",k=mxResources.get("dropbox")):b.mode==App.MODE_ONEDRIVE?(d.src=IMAGE_PATH+"/onedrive-logo.svg",k=mxResources.get("oneDrive")):b.mode==App.MODE_GITHUB?(d.src=IMAGE_PATH+"/github-logo.svg",k=mxResources.get("github")):b.mode==App.MODE_GITLAB?(d.src=IMAGE_PATH+"/gitlab-logo.svg",k=mxResources.get("gitlab")):b.mode==App.MODE_BROWSER?(d.src=IMAGE_PATH+"/osa_database.png",k=mxResources.get("browser")):b.mode==App.MODE_TRELLO?(d.src=IMAGE_PATH+"/trello-logo.svg",k=mxResources.get("trello")): -(d.src=IMAGE_PATH+"/osa_drive-harddisk.png",u.style.paddingBottom="10px",u.style.paddingTop="30px",k=mxResources.get("device"));var x=document.createElement("button");x.className="geBigButton";x.style.marginBottom="8px";x.style.fontSize="18px";x.style.padding="10px";x.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)u.style.padding="42px 0px 10px 0px",x.style.marginBottom="12px";else{u.style.border="1px solid #d3d3d3";u.style.borderWidth="1px 0px 1px 0px";var B=document.createElement("table"), -D=document.createElement("tbody"),K=document.createElement("tr"),c=document.createElement("td"),e=document.createElement("td");B.setAttribute("align","center");c.appendChild(d);d=document.createElement("div");d.style.fontSize="22px";d.style.paddingBottom="6px";d.style.color="gray";mxUtils.write(d,k);e.style.textAlign="left";e.appendChild(d);K.appendChild(c);K.appendChild(e);D.appendChild(K);B.appendChild(D);f.appendChild(B);k=document.createElement("span");k.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;"; -mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,0)");mxUtils.write(k,mxResources.get("changeStorage"));mxEvent.addListener(k,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});f.appendChild(k)}mxUtils.write(x,mxResources.get("createNewDiagram"));mxEvent.addListener(x,"click",function(){b.hideDialog();b.actions.get("new").funct()});u.appendChild(x);mxUtils.br(u);x=document.createElement("button");x.className="geBigButton";x.style.marginBottom="22px";x.style.fontSize= -"18px";x.style.padding="10px";x.style.width="340px";mxUtils.write(x,mxResources.get("openExistingDiagram"));mxEvent.addListener(x,"click",function(){b.actions.get("open").funct()});u.appendChild(x);b.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):b.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):b.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):b.mode==App.MODE_GITHUB?mxResources.get("github"):b.mode==App.MODE_GITLAB?mxResources.get("gitlab"):b.mode==App.MODE_TRELLO?mxResources.get("trello"): -b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(k=function(m){x.style.marginBottom="24px";var n=document.createElement("a");n.style.display="inline-block";n.style.color="gray";n.style.cursor="pointer";n.style.marginTop="6px";mxUtils.write(n,mxResources.get("signOut"));x.style.marginBottom="16px";u.style.paddingBottom="18px";mxEvent.addListener(n,"click",function(){b.confirm(mxResources.get("areYouSure"), -function(){m()})});u.appendChild(n)},b.mode==App.MODE_GOOGLE&&null!=b.drive){var g=b.drive.getUsersList();if(0<g.length){d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+":");x.style.marginBottom="16px";u.style.paddingBottom="18px";u.appendChild(d);var q=document.createElement("select");q.style.marginLeft="4px";q.style.width="140px";for(k=0;k<g.length;k++)B=document.createElement("option"),mxUtils.write(B,g[k].displayName),B.value=k,q.appendChild(B), +b.addLanguageMenu(f,!1,"28px");null!=k&&(k.style.bottom="24px")}var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("align","absmiddle");e.style.width="32px";e.style.height="32px";e.style.marginRight="8px";e.style.marginTop="-4px";var u=document.createElement("div");u.style.margin="8px 0px 0px 0px";u.style.padding="18px 0px 24px 0px";k="";b.mode==App.MODE_GOOGLE?(e.src=IMAGE_PATH+"/google-drive-logo.svg",k=mxResources.get("googleDrive")):b.mode==App.MODE_DROPBOX?(e.src= +IMAGE_PATH+"/dropbox-logo.svg",k=mxResources.get("dropbox")):b.mode==App.MODE_ONEDRIVE?(e.src=IMAGE_PATH+"/onedrive-logo.svg",k=mxResources.get("oneDrive")):b.mode==App.MODE_GITHUB?(e.src=IMAGE_PATH+"/github-logo.svg",k=mxResources.get("github")):b.mode==App.MODE_GITLAB?(e.src=IMAGE_PATH+"/gitlab-logo.svg",k=mxResources.get("gitlab")):b.mode==App.MODE_BROWSER?(e.src=IMAGE_PATH+"/osa_database.png",k=mxResources.get("browser")):b.mode==App.MODE_TRELLO?(e.src=IMAGE_PATH+"/trello-logo.svg",k=mxResources.get("trello")): +(e.src=IMAGE_PATH+"/osa_drive-harddisk.png",u.style.paddingBottom="10px",u.style.paddingTop="30px",k=mxResources.get("device"));var v=document.createElement("button");v.className="geBigButton";v.style.marginBottom="8px";v.style.fontSize="18px";v.style.padding="10px";v.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)u.style.padding="42px 0px 10px 0px",v.style.marginBottom="12px";else{u.style.border="1px solid #d3d3d3";u.style.borderWidth="1px 0px 1px 0px";var B=document.createElement("table"), +E=document.createElement("tbody"),L=document.createElement("tr"),c=document.createElement("td"),d=document.createElement("td");B.setAttribute("align","center");c.appendChild(e);e=document.createElement("div");e.style.fontSize="22px";e.style.paddingBottom="6px";e.style.color="gray";mxUtils.write(e,k);d.style.textAlign="left";d.appendChild(e);L.appendChild(c);L.appendChild(d);E.appendChild(L);B.appendChild(E);f.appendChild(B);k=document.createElement("span");k.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;"; +mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,0)");mxUtils.write(k,mxResources.get("changeStorage"));mxEvent.addListener(k,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});f.appendChild(k)}mxUtils.write(v,mxResources.get("createNewDiagram"));mxEvent.addListener(v,"click",function(){b.hideDialog();b.actions.get("new").funct()});u.appendChild(v);mxUtils.br(u);v=document.createElement("button");v.className="geBigButton";v.style.marginBottom="22px";v.style.fontSize= +"18px";v.style.padding="10px";v.style.width="340px";mxUtils.write(v,mxResources.get("openExistingDiagram"));mxEvent.addListener(v,"click",function(){b.actions.get("open").funct()});u.appendChild(v);b.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):b.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):b.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):b.mode==App.MODE_GITHUB?mxResources.get("github"):b.mode==App.MODE_GITLAB?mxResources.get("gitlab"):b.mode==App.MODE_TRELLO?mxResources.get("trello"): +b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(k=function(m){v.style.marginBottom="24px";var n=document.createElement("a");n.style.display="inline-block";n.style.color="gray";n.style.cursor="pointer";n.style.marginTop="6px";mxUtils.write(n,mxResources.get("signOut"));v.style.marginBottom="16px";u.style.paddingBottom="18px";mxEvent.addListener(n,"click",function(){b.confirm(mxResources.get("areYouSure"), +function(){m()})});u.appendChild(n)},b.mode==App.MODE_GOOGLE&&null!=b.drive){var g=b.drive.getUsersList();if(0<g.length){e=document.createElement("span");e.style.marginTop="6px";mxUtils.write(e,mxResources.get("changeUser")+":");v.style.marginBottom="16px";u.style.paddingBottom="18px";u.appendChild(e);var q=document.createElement("select");q.style.marginLeft="4px";q.style.width="140px";for(k=0;k<g.length;k++)B=document.createElement("option"),mxUtils.write(B,g[k].displayName),B.value=k,q.appendChild(B), B=document.createElement("option"),B.innerHTML=" ",mxUtils.write(B,"<"+g[k].email+">"),B.setAttribute("disabled","disabled"),q.appendChild(B);B=document.createElement("option");mxUtils.write(B,mxResources.get("addAccount"));B.value=g.length;q.appendChild(B);mxEvent.addListener(q,"change",function(){var m=q.value,n=g.length!=m;n&&b.drive.setUser(g[m]);b.drive.authorize(n,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(z){b.handleError(z,null,function(){b.hideDialog(); b.showSplash()})},!0)});u.appendChild(q)}else k(function(){b.drive.logout()})}else b.mode!=App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?k(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?k(function(){b.gitLab.logout();b.openLink(DRAWIO_GITLAB_URL+"/users/sign_out")}):b.mode==App.MODE_TRELLO&&null!=b.trello?b.trello.isAuthorized()&&k(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&& -null!=b.dropbox&&k(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):k(function(){b.oneDrive.logout()});f.appendChild(u);this.container=f},EmbedDialog=function(b,f,k,d,u,x,B,D,K){B=null!=B?B:"Check out the diagram I made using @drawio";d=document.createElement("div");var c=/^https?:\/\//.test(f)||/^mailto:\/\//.test(f);null!=x?mxUtils.write(d,x):mxUtils.write(d,mxResources.get(5E5>f.length?c?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(d);x=document.createElement("div"); -x.style.position="absolute";x.style.top="30px";x.style.right="30px";x.style.color="gray";mxUtils.write(x,b.formatFileSize(f.length));d.appendChild(x);var e=document.createElement("textarea");e.setAttribute("autocomplete","off");e.setAttribute("autocorrect","off");e.setAttribute("autocapitalize","off");e.setAttribute("spellcheck","false");e.style.fontFamily="monospace";e.style.wordBreak="break-all";e.style.marginTop="10px";e.style.resize="none";e.style.height="150px";e.style.width="440px";e.style.border= -"1px solid gray";e.value=mxResources.get("updatingDocument");d.appendChild(e);mxUtils.br(d);this.init=function(){window.setTimeout(function(){5E5>f.length?(e.value=f,e.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?e.select():document.execCommand("selectAll",!1,null)):(e.setAttribute("readonly","true"),e.value=mxResources.get("tooLargeUseDownload"))},0)};x=document.createElement("div");x.style.position="absolute";x.style.bottom="36px";x.style.right="32px";var g=null;!EmbedDialog.showPreviewOption|| -mxClient.IS_CHROMEAPP&&!c||navigator.standalone||!(c||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(g=mxUtils.button(null!=D?D:mxResources.get(5E5>f.length?"preview":"openInNewWindow"),function(){var m=5E5>f.length?e.value:f;if(null!=u)u(m);else if(c)try{var n=b.openLink(m);null!=n&&(null==k||0<k)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=n&&null!=n.location.href&&n.location.href.substring(0,8)!=m.substring(0,8)&&(n.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(C){}}), -k||500)}catch(C){b.handleError({message:C.message||mxResources.get("drawingTooLarge")})}else{var z=window.open();z=null!=z?z.document:null;null!=z?(z.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+f+"</body></html>"),z.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),g.className="geBtn",x.appendChild(g));if(!c||7500<f.length)D=mxUtils.button(mxResources.get("download"),function(){b.hideDialog(); -b.saveData(null!=K?K:"embed.txt","txt",f,"text/plain")}),D.className="geBtn",x.appendChild(D);if(c&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>f.length){var q=mxUtils.button("",function(){try{var m="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(e.value);b.openLink(m)}catch(n){b.handleError({message:n.message||mxResources.get("drawingTooLarge")})}});D=document.createElement("img");D.setAttribute("src",Editor.facebookImage);D.setAttribute("width","18");D.setAttribute("height", -"18");D.setAttribute("border","0");q.appendChild(D);q.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");q.style.verticalAlign="bottom";q.style.paddingTop="4px";q.style.minWidth="46px";q.className="geBtn";x.appendChild(q)}7168>f.length&&(q=mxUtils.button("",function(){try{var m="https://twitter.com/intent/tweet?text="+encodeURIComponent(B)+"&url="+encodeURIComponent(e.value);b.openLink(m)}catch(n){b.handleError({message:n.message||mxResources.get("drawingTooLarge")})}}), -D=document.createElement("img"),D.setAttribute("src",Editor.tweetImage),D.setAttribute("width","18"),D.setAttribute("height","18"),D.setAttribute("border","0"),D.style.marginBottom="5px",q.appendChild(D),q.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+" max)"),q.style.verticalAlign="bottom",q.style.paddingTop="4px",q.style.minWidth="46px",q.className="geBtn",x.appendChild(q))}!b.isOffline()&&5E5>f.length&&(q=mxUtils.button("",function(){try{var m="mailto:?subject="+encodeURIComponent(K|| -b.defaultFilename)+"&body="+encodeURIComponent(e.value);b.openLink(m)}catch(n){b.handleError({message:n.message||mxResources.get("drawingTooLarge")})}}),D=document.createElement("img"),D.className="geAdaptiveAsset",D.setAttribute("src",Editor.mailImage),D.setAttribute("width","18"),D.setAttribute("height","18"),D.setAttribute("border","0"),D.style.marginBottom="5px",q.appendChild(D),q.style.verticalAlign="bottom",q.style.paddingTop="4px",q.style.minWidth="46px",q.className="geBtn",x.appendChild(q)); -D=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});x.appendChild(D);q=mxUtils.button(mxResources.get("copy"),function(){e.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?e.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>f.length?mxClient.IS_SF||null!=document.documentMode?D.className="geBtn gePrimaryBtn":(x.appendChild(q),q.className="geBtn gePrimaryBtn",D.className="geBtn"):(x.appendChild(g), -D.className="geBtn",g.className="geBtn gePrimaryBtn");d.appendChild(x);this.container=d};EmbedDialog.showPreviewOption=!0; -var GoogleSitesDialog=function(b,f){function k(){var F=null!=p&&null!=p.getTitle()?p.getTitle():this.defaultFilename;if(N.checked&&""!=q.value){var J="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(q.value));null!=F&&(J+="&title="+encodeURIComponent(F));0<t.length&&(J+="&s="+t);""!=m.value&&"0"!=m.value&&(J+="&border="+m.value);""!=g.value&&(J+="&height="+g.value);J+="&pan="+(n.checked?"1":"0");J+="&zoom="+(z.checked?"1":"0");J+="&fit="+(I.checked?"1":"0"); -J+="&resize="+(y.checked?"1":"0");J+="&x0="+Number(e.value);J+="&y0="+K;u.mathEnabled&&(J+="&math=1");v.checked?J+="&edit=_blank":C.checked&&(J+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));c.value=J}else p.constructor==DriveFile||p.constructor==DropboxFile?(J="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=q.value?J+=encodeURIComponent(mxUtils.htmlEntities(q.value))+"&type=3":(J+=p.getHash().substring(1),J=p.constructor==DropboxFile?J+"&type=2":J+"&type=1"),null!= -F&&(J+="&title="+encodeURIComponent(F)),""!=g.value&&(F=parseInt(g.value)+parseInt(e.value),J+="&height="+F),c.value=J):c.value=""}var d=document.createElement("div"),u=b.editor.graph,x=u.getGraphBounds(),B=u.view.scale,D=Math.floor(x.x/B-u.view.translate.x),K=Math.floor(x.y/B-u.view.translate.y);mxUtils.write(d,mxResources.get("googleGadget")+":");mxUtils.br(d);var c=document.createElement("input");c.setAttribute("type","text");c.style.marginBottom="8px";c.style.marginTop="2px";c.style.width="410px"; -d.appendChild(c);mxUtils.br(d);this.init=function(){c.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?c.select():document.execCommand("selectAll",!1,null)};mxUtils.write(d,mxResources.get("top")+":");var e=document.createElement("input");e.setAttribute("type","text");e.setAttribute("size","4");e.style.marginRight="16px";e.style.marginLeft="4px";e.value=D;d.appendChild(e);mxUtils.write(d,mxResources.get("height")+":");var g=document.createElement("input");g.setAttribute("type","text"); -g.setAttribute("size","4");g.style.marginLeft="4px";g.value=Math.ceil(x.height/B);d.appendChild(g);mxUtils.br(d);x=document.createElement("hr");x.setAttribute("size","1");x.style.marginBottom="16px";x.style.marginTop="16px";d.appendChild(x);mxUtils.write(d,mxResources.get("publicDiagramUrl")+":");mxUtils.br(d);var q=document.createElement("input");q.setAttribute("type","text");q.setAttribute("size","28");q.style.marginBottom="8px";q.style.marginTop="2px";q.style.width="410px";q.value=f||"";d.appendChild(q); -mxUtils.br(d);mxUtils.write(d,mxResources.get("borderWidth")+":");var m=document.createElement("input");m.setAttribute("type","text");m.setAttribute("size","3");m.style.marginBottom="8px";m.style.marginLeft="4px";m.value="0";d.appendChild(m);mxUtils.br(d);var n=document.createElement("input");n.setAttribute("type","checkbox");n.setAttribute("checked","checked");n.defaultChecked=!0;n.style.marginLeft="16px";d.appendChild(n);mxUtils.write(d,mxResources.get("pan")+" ");var z=document.createElement("input"); -z.setAttribute("type","checkbox");z.setAttribute("checked","checked");z.defaultChecked=!0;z.style.marginLeft="8px";d.appendChild(z);mxUtils.write(d,mxResources.get("zoom")+" ");var C=document.createElement("input");C.setAttribute("type","checkbox");C.style.marginLeft="8px";C.setAttribute("title",window.location.href);d.appendChild(C);mxUtils.write(d,mxResources.get("edit")+" ");var v=document.createElement("input");v.setAttribute("type","checkbox");v.style.marginLeft="8px";d.appendChild(v);mxUtils.write(d, -mxResources.get("asNew")+" ");mxUtils.br(d);var y=document.createElement("input");y.setAttribute("type","checkbox");y.setAttribute("checked","checked");y.defaultChecked=!0;y.style.marginLeft="16px";d.appendChild(y);mxUtils.write(d,mxResources.get("resize")+" ");var I=document.createElement("input");I.setAttribute("type","checkbox");I.style.marginLeft="8px";d.appendChild(I);mxUtils.write(d,mxResources.get("fit")+" ");var N=document.createElement("input");N.setAttribute("type","checkbox");N.style.marginLeft= -"8px";d.appendChild(N);mxUtils.write(d,mxResources.get("embed")+" ");var t=b.getBasenames().join(";"),p=b.getCurrentFile();mxEvent.addListener(n,"change",k);mxEvent.addListener(z,"change",k);mxEvent.addListener(y,"change",k);mxEvent.addListener(I,"change",k);mxEvent.addListener(C,"change",k);mxEvent.addListener(v,"change",k);mxEvent.addListener(N,"change",k);mxEvent.addListener(g,"change",k);mxEvent.addListener(e,"change",k);mxEvent.addListener(m,"change",k);mxEvent.addListener(q,"change",k);k(); -mxEvent.addListener(c,"click",function(){c.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?c.select():document.execCommand("selectAll",!1,null)});f=document.createElement("div");f.style.paddingTop="12px";f.style.textAlign="right";x=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});x.className="geBtn gePrimaryBtn";f.appendChild(x);d.appendChild(f);this.container=d},CreateGraphDialog=function(b,f,k){var d=document.createElement("div");d.style.textAlign="right";this.init= -function(){var u=document.createElement("div");u.style.position="relative";u.style.border="1px solid gray";u.style.width="100%";u.style.height="360px";u.style.overflow="hidden";u.style.marginBottom="16px";mxEvent.disableContextMenu(u);d.appendChild(u);var x=new Graph(u);x.setCellsCloneable(!0);x.setPanning(!0);x.setAllowDanglingEdges(!1);x.connectionHandler.select=!1;x.view.setTranslate(20,20);x.border=20;x.panningHandler.useLeftButtonForPanning=!0;var B="curved=1;";x.cellRenderer.installCellOverlayListeners= -function(z,C,v){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(v.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(y){C.fireEvent(new mxEventObject("pointerdown","event",y,"state",z))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(v.node,"touchstart",function(y){C.fireEvent(new mxEventObject("pointerdown","event",y,"state",z))})};x.getAllConnectionConstraints=function(){return null};x.connectionHandler.marker.highlight.keepOnTop= -!1;x.connectionHandler.createEdgeState=function(z){z=x.createEdge(null,null,null,null,null,B);return new mxCellState(this.graph.view,z,this.graph.getCellStyle(z))};var D=x.getDefaultParent(),K=mxUtils.bind(this,function(z){var C=new mxCellOverlay(this.connectImage,"Add outgoing");C.cursor="hand";C.addListener(mxEvent.CLICK,function(v,y){x.connectionHandler.reset();x.clearSelection();var I=x.getCellGeometry(z),N;g(function(){N=x.insertVertex(D,null,"Entry",I.x,I.y,80,30,"rounded=1;");K(N);x.view.refresh(N); -x.insertEdge(D,null,"",z,N,B)},function(){x.scrollCellToVisible(N)})});C.addListener("pointerdown",function(v,y){v=y.getProperty("event");y=y.getProperty("state");x.popupMenuHandler.hideMenu();x.stopEditing(!1);var I=mxUtils.convertPoint(x.container,mxEvent.getClientX(v),mxEvent.getClientY(v));x.connectionHandler.start(y,I.x,I.y);x.isMouseDown=!0;x.isMouseTrigger=mxEvent.isMouseEvent(v);mxEvent.consume(v)});x.addCellOverlay(z,C)});x.getModel().beginUpdate();try{var c=x.insertVertex(D,null,"Start", -0,0,80,30,"ellipse");K(c)}finally{x.getModel().endUpdate()}if("horizontalTree"==k){var e=new mxCompactTreeLayout(x);e.edgeRouting=!1;e.levelDistance=30;B="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==k?(e=new mxCompactTreeLayout(x,!1),e.edgeRouting=!1,e.levelDistance=30,B="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==k?(e=new mxRadialTreeLayout(x,!1),e.edgeRouting=!1,e.levelDistance=80):"verticalFlow"==k?e=new mxHierarchicalLayout(x,mxConstants.DIRECTION_NORTH):"horizontalFlow"== -k?e=new mxHierarchicalLayout(x,mxConstants.DIRECTION_WEST):"organic"==k?(e=new mxFastOrganicLayout(x,!1),e.forceConstant=80):"circle"==k&&(e=new mxCircleLayout(x));if(null!=e){var g=function(z,C){x.getModel().beginUpdate();try{null!=z&&z(),e.execute(x.getDefaultParent(),c)}catch(v){throw v;}finally{z=new mxMorphing(x),z.addListener(mxEvent.DONE,mxUtils.bind(this,function(){x.getModel().endUpdate();null!=C&&C()})),z.startAnimation()}},q=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect= -function(z,C,v,y,I){q.apply(this,arguments);g()};x.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);g()};x.connectionHandler.addListener(mxEvent.CONNECT,function(){g()})}var m=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=u.parentNode&&(x.destroy(),u.parentNode.removeChild(u));b.hideDialog()})});m.className="geBtn";b.editor.cancelFirst&&d.appendChild(m);var n=mxUtils.button(mxResources.get("insert"),function(z){x.clearCellOverlays(); -var C=x.getModel().getChildren(x.getDefaultParent());z=mxEvent.isAltDown(z)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(x.getBoundingBoxFromGeometry(C,!0));C=b.editor.graph.importCells(C,z.x,z.y);z=b.editor.graph.view;var v=z.getBounds(C);v.x-=z.translate.x;v.y-=z.translate.y;b.editor.graph.scrollRectToVisible(v);b.editor.graph.setSelectionCells(C);null!=u.parentNode&&(x.destroy(),u.parentNode.removeChild(u));b.hideDialog()});d.appendChild(n);n.className="geBtn gePrimaryBtn"; -b.editor.cancelFirst||d.appendChild(m)};this.container=d}; +null!=b.dropbox&&k(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):k(function(){b.oneDrive.logout()});f.appendChild(u);this.container=f},EmbedDialog=function(b,f,k,e,u,v,B,E,L){B=null!=B?B:"Check out the diagram I made using @drawio";e=document.createElement("div");var c=/^https?:\/\//.test(f)||/^mailto:\/\//.test(f);null!=v?mxUtils.write(e,v):mxUtils.write(e,mxResources.get(5E5>f.length?c?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(e);v=document.createElement("div"); +v.style.position="absolute";v.style.top="30px";v.style.right="30px";v.style.color="gray";mxUtils.write(v,b.formatFileSize(f.length));e.appendChild(v);var d=document.createElement("textarea");d.setAttribute("autocomplete","off");d.setAttribute("autocorrect","off");d.setAttribute("autocapitalize","off");d.setAttribute("spellcheck","false");d.style.fontFamily="monospace";d.style.wordBreak="break-all";d.style.marginTop="10px";d.style.resize="none";d.style.height="150px";d.style.width="440px";d.style.border= +"1px solid gray";d.value=mxResources.get("updatingDocument");e.appendChild(d);mxUtils.br(e);this.init=function(){window.setTimeout(function(){5E5>f.length?(d.value=f,d.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?d.select():document.execCommand("selectAll",!1,null)):(d.setAttribute("readonly","true"),d.value=mxResources.get("tooLargeUseDownload"))},0)};v=document.createElement("div");v.style.position="absolute";v.style.bottom="36px";v.style.right="32px";var g=null;!EmbedDialog.showPreviewOption|| +mxClient.IS_CHROMEAPP&&!c||navigator.standalone||!(c||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(g=mxUtils.button(null!=E?E:mxResources.get(5E5>f.length?"preview":"openInNewWindow"),function(){var m=5E5>f.length?d.value:f;if(null!=u)u(m);else if(c)try{var n=b.openLink(m);null!=n&&(null==k||0<k)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=n&&null!=n.location.href&&n.location.href.substring(0,8)!=m.substring(0,8)&&(n.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(C){}}), +k||500)}catch(C){b.handleError({message:C.message||mxResources.get("drawingTooLarge")})}else{var z=window.open();z=null!=z?z.document:null;null!=z?(z.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+f+"</body></html>"),z.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),g.className="geBtn",v.appendChild(g));if(!c||7500<f.length)E=mxUtils.button(mxResources.get("download"),function(){b.hideDialog(); +b.saveData(null!=L?L:"embed.txt","txt",f,"text/plain")}),E.className="geBtn",v.appendChild(E);if(c&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>f.length){var q=mxUtils.button("",function(){try{var m="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(d.value);b.openLink(m)}catch(n){b.handleError({message:n.message||mxResources.get("drawingTooLarge")})}});E=document.createElement("img");E.setAttribute("src",Editor.facebookImage);E.setAttribute("width","18");E.setAttribute("height", +"18");E.setAttribute("border","0");q.appendChild(E);q.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");q.style.verticalAlign="bottom";q.style.paddingTop="4px";q.style.minWidth="46px";q.className="geBtn";v.appendChild(q)}7168>f.length&&(q=mxUtils.button("",function(){try{var m="https://twitter.com/intent/tweet?text="+encodeURIComponent(B)+"&url="+encodeURIComponent(d.value);b.openLink(m)}catch(n){b.handleError({message:n.message||mxResources.get("drawingTooLarge")})}}), +E=document.createElement("img"),E.setAttribute("src",Editor.tweetImage),E.setAttribute("width","18"),E.setAttribute("height","18"),E.setAttribute("border","0"),E.style.marginBottom="5px",q.appendChild(E),q.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+" max)"),q.style.verticalAlign="bottom",q.style.paddingTop="4px",q.style.minWidth="46px",q.className="geBtn",v.appendChild(q))}!b.isOffline()&&5E5>f.length&&(q=mxUtils.button("",function(){try{var m="mailto:?subject="+encodeURIComponent(L|| +b.defaultFilename)+"&body="+encodeURIComponent(d.value);b.openLink(m)}catch(n){b.handleError({message:n.message||mxResources.get("drawingTooLarge")})}}),E=document.createElement("img"),E.className="geAdaptiveAsset",E.setAttribute("src",Editor.mailImage),E.setAttribute("width","18"),E.setAttribute("height","18"),E.setAttribute("border","0"),E.style.marginBottom="5px",q.appendChild(E),q.style.verticalAlign="bottom",q.style.paddingTop="4px",q.style.minWidth="46px",q.className="geBtn",v.appendChild(q)); +E=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});v.appendChild(E);q=mxUtils.button(mxResources.get("copy"),function(){d.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?d.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>f.length?mxClient.IS_SF||null!=document.documentMode?E.className="geBtn gePrimaryBtn":(v.appendChild(q),q.className="geBtn gePrimaryBtn",E.className="geBtn"):(v.appendChild(g), +E.className="geBtn",g.className="geBtn gePrimaryBtn");e.appendChild(v);this.container=e};EmbedDialog.showPreviewOption=!0; +var GoogleSitesDialog=function(b,f){function k(){var F=null!=p&&null!=p.getTitle()?p.getTitle():this.defaultFilename;if(N.checked&&""!=q.value){var K="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(q.value));null!=F&&(K+="&title="+encodeURIComponent(F));0<t.length&&(K+="&s="+t);""!=m.value&&"0"!=m.value&&(K+="&border="+m.value);""!=g.value&&(K+="&height="+g.value);K+="&pan="+(n.checked?"1":"0");K+="&zoom="+(z.checked?"1":"0");K+="&fit="+(I.checked?"1":"0"); +K+="&resize="+(y.checked?"1":"0");K+="&x0="+Number(d.value);K+="&y0="+L;u.mathEnabled&&(K+="&math=1");x.checked?K+="&edit=_blank":C.checked&&(K+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));c.value=K}else p.constructor==DriveFile||p.constructor==DropboxFile?(K="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=q.value?K+=encodeURIComponent(mxUtils.htmlEntities(q.value))+"&type=3":(K+=p.getHash().substring(1),K=p.constructor==DropboxFile?K+"&type=2":K+"&type=1"),null!= +F&&(K+="&title="+encodeURIComponent(F)),""!=g.value&&(F=parseInt(g.value)+parseInt(d.value),K+="&height="+F),c.value=K):c.value=""}var e=document.createElement("div"),u=b.editor.graph,v=u.getGraphBounds(),B=u.view.scale,E=Math.floor(v.x/B-u.view.translate.x),L=Math.floor(v.y/B-u.view.translate.y);mxUtils.write(e,mxResources.get("googleGadget")+":");mxUtils.br(e);var c=document.createElement("input");c.setAttribute("type","text");c.style.marginBottom="8px";c.style.marginTop="2px";c.style.width="410px"; +e.appendChild(c);mxUtils.br(e);this.init=function(){c.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?c.select():document.execCommand("selectAll",!1,null)};mxUtils.write(e,mxResources.get("top")+":");var d=document.createElement("input");d.setAttribute("type","text");d.setAttribute("size","4");d.style.marginRight="16px";d.style.marginLeft="4px";d.value=E;e.appendChild(d);mxUtils.write(e,mxResources.get("height")+":");var g=document.createElement("input");g.setAttribute("type","text"); +g.setAttribute("size","4");g.style.marginLeft="4px";g.value=Math.ceil(v.height/B);e.appendChild(g);mxUtils.br(e);v=document.createElement("hr");v.setAttribute("size","1");v.style.marginBottom="16px";v.style.marginTop="16px";e.appendChild(v);mxUtils.write(e,mxResources.get("publicDiagramUrl")+":");mxUtils.br(e);var q=document.createElement("input");q.setAttribute("type","text");q.setAttribute("size","28");q.style.marginBottom="8px";q.style.marginTop="2px";q.style.width="410px";q.value=f||"";e.appendChild(q); +mxUtils.br(e);mxUtils.write(e,mxResources.get("borderWidth")+":");var m=document.createElement("input");m.setAttribute("type","text");m.setAttribute("size","3");m.style.marginBottom="8px";m.style.marginLeft="4px";m.value="0";e.appendChild(m);mxUtils.br(e);var n=document.createElement("input");n.setAttribute("type","checkbox");n.setAttribute("checked","checked");n.defaultChecked=!0;n.style.marginLeft="16px";e.appendChild(n);mxUtils.write(e,mxResources.get("pan")+" ");var z=document.createElement("input"); +z.setAttribute("type","checkbox");z.setAttribute("checked","checked");z.defaultChecked=!0;z.style.marginLeft="8px";e.appendChild(z);mxUtils.write(e,mxResources.get("zoom")+" ");var C=document.createElement("input");C.setAttribute("type","checkbox");C.style.marginLeft="8px";C.setAttribute("title",window.location.href);e.appendChild(C);mxUtils.write(e,mxResources.get("edit")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";e.appendChild(x);mxUtils.write(e, +mxResources.get("asNew")+" ");mxUtils.br(e);var y=document.createElement("input");y.setAttribute("type","checkbox");y.setAttribute("checked","checked");y.defaultChecked=!0;y.style.marginLeft="16px";e.appendChild(y);mxUtils.write(e,mxResources.get("resize")+" ");var I=document.createElement("input");I.setAttribute("type","checkbox");I.style.marginLeft="8px";e.appendChild(I);mxUtils.write(e,mxResources.get("fit")+" ");var N=document.createElement("input");N.setAttribute("type","checkbox");N.style.marginLeft= +"8px";e.appendChild(N);mxUtils.write(e,mxResources.get("embed")+" ");var t=b.getBasenames().join(";"),p=b.getCurrentFile();mxEvent.addListener(n,"change",k);mxEvent.addListener(z,"change",k);mxEvent.addListener(y,"change",k);mxEvent.addListener(I,"change",k);mxEvent.addListener(C,"change",k);mxEvent.addListener(x,"change",k);mxEvent.addListener(N,"change",k);mxEvent.addListener(g,"change",k);mxEvent.addListener(d,"change",k);mxEvent.addListener(m,"change",k);mxEvent.addListener(q,"change",k);k(); +mxEvent.addListener(c,"click",function(){c.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?c.select():document.execCommand("selectAll",!1,null)});f=document.createElement("div");f.style.paddingTop="12px";f.style.textAlign="right";v=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});v.className="geBtn gePrimaryBtn";f.appendChild(v);e.appendChild(f);this.container=e},CreateGraphDialog=function(b,f,k){var e=document.createElement("div");e.style.textAlign="right";this.init= +function(){var u=document.createElement("div");u.style.position="relative";u.style.border="1px solid gray";u.style.width="100%";u.style.height="360px";u.style.overflow="hidden";u.style.marginBottom="16px";mxEvent.disableContextMenu(u);e.appendChild(u);var v=new Graph(u);v.setCellsCloneable(!0);v.setPanning(!0);v.setAllowDanglingEdges(!1);v.connectionHandler.select=!1;v.view.setTranslate(20,20);v.border=20;v.panningHandler.useLeftButtonForPanning=!0;var B="curved=1;";v.cellRenderer.installCellOverlayListeners= +function(z,C,x){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(x.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(y){C.fireEvent(new mxEventObject("pointerdown","event",y,"state",z))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(x.node,"touchstart",function(y){C.fireEvent(new mxEventObject("pointerdown","event",y,"state",z))})};v.getAllConnectionConstraints=function(){return null};v.connectionHandler.marker.highlight.keepOnTop= +!1;v.connectionHandler.createEdgeState=function(z){z=v.createEdge(null,null,null,null,null,B);return new mxCellState(this.graph.view,z,this.graph.getCellStyle(z))};var E=v.getDefaultParent(),L=mxUtils.bind(this,function(z){var C=new mxCellOverlay(this.connectImage,"Add outgoing");C.cursor="hand";C.addListener(mxEvent.CLICK,function(x,y){v.connectionHandler.reset();v.clearSelection();var I=v.getCellGeometry(z),N;g(function(){N=v.insertVertex(E,null,"Entry",I.x,I.y,80,30,"rounded=1;");L(N);v.view.refresh(N); +v.insertEdge(E,null,"",z,N,B)},function(){v.scrollCellToVisible(N)})});C.addListener("pointerdown",function(x,y){x=y.getProperty("event");y=y.getProperty("state");v.popupMenuHandler.hideMenu();v.stopEditing(!1);var I=mxUtils.convertPoint(v.container,mxEvent.getClientX(x),mxEvent.getClientY(x));v.connectionHandler.start(y,I.x,I.y);v.isMouseDown=!0;v.isMouseTrigger=mxEvent.isMouseEvent(x);mxEvent.consume(x)});v.addCellOverlay(z,C)});v.getModel().beginUpdate();try{var c=v.insertVertex(E,null,"Start", +0,0,80,30,"ellipse");L(c)}finally{v.getModel().endUpdate()}if("horizontalTree"==k){var d=new mxCompactTreeLayout(v);d.edgeRouting=!1;d.levelDistance=30;B="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==k?(d=new mxCompactTreeLayout(v,!1),d.edgeRouting=!1,d.levelDistance=30,B="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==k?(d=new mxRadialTreeLayout(v,!1),d.edgeRouting=!1,d.levelDistance=80):"verticalFlow"==k?d=new mxHierarchicalLayout(v,mxConstants.DIRECTION_NORTH):"horizontalFlow"== +k?d=new mxHierarchicalLayout(v,mxConstants.DIRECTION_WEST):"circle"==k?d=new mxCircleLayout(v):(d=new mxFastOrganicLayout(v,!1),d.forceConstant=80);if(null!=d){var g=function(z,C){v.getModel().beginUpdate();try{null!=z&&z(),d.execute(v.getDefaultParent(),c)}catch(x){throw x;}finally{z=new mxMorphing(v),z.addListener(mxEvent.DONE,mxUtils.bind(this,function(){v.getModel().endUpdate();null!=C&&C()})),z.startAnimation()}},q=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(z,C, +x,y,I){q.apply(this,arguments);g()};v.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);g()};v.connectionHandler.addListener(mxEvent.CONNECT,function(){g()})}var m=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=u.parentNode&&(v.destroy(),u.parentNode.removeChild(u));b.hideDialog()})});m.className="geBtn";b.editor.cancelFirst&&e.appendChild(m);var n=mxUtils.button(mxResources.get("insert"),function(z){v.clearCellOverlays(); +var C=v.getModel().getChildren(v.getDefaultParent());z=mxEvent.isAltDown(z)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(v.getBoundingBoxFromGeometry(C,!0));C=b.editor.graph.importCells(C,z.x,z.y);z=b.editor.graph.view;var x=z.getBounds(C);x.x-=z.translate.x;x.y-=z.translate.y;b.editor.graph.scrollRectToVisible(x);b.editor.graph.setSelectionCells(C);null!=u.parentNode&&(v.destroy(),u.parentNode.removeChild(u));b.hideDialog()});e.appendChild(n);n.className="geBtn gePrimaryBtn"; +b.editor.cancelFirst||e.appendChild(m)};this.container=e}; CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":IMAGE_PATH+ "/handle-connect.png",26,26); -var BackgroundImageDialog=function(b,f,k){var d=document.createElement("div");d.style.whiteSpace="nowrap";var u=document.createElement("h2");mxUtils.write(u,mxResources.get("backgroundImage"));u.style.marginTop="0px";d.appendChild(u);var x=null!=k&&null!=k.originalSrc;u=!1;var B=document.createElement("input");B.style.cssText="margin-right:8px;margin-bottom:8px;";B.setAttribute("value","url");B.setAttribute("type","radio");B.setAttribute("name","geBackgroundImageDialogOption");var D=document.createElement("input"); -D.style.cssText="margin-right:8px;margin-bottom:8px;";D.setAttribute("value","url");D.setAttribute("type","radio");D.setAttribute("name","geBackgroundImageDialogOption");var K=document.createElement("input");K.setAttribute("type","text");K.style.marginBottom="8px";K.style.width="360px";K.value=x||null==k?"":k.src;var c=document.createElement("select");c.style.width="360px";if(null!=b.pages)for(var e=0;e<b.pages.length;e++){var g=document.createElement("option");mxUtils.write(g,b.pages[e].getName()|| -mxResources.get("pageWithNumber",[e+1]));g.setAttribute("value","data:page/id,"+b.pages[e].getId());b.pages[e]==b.currentPage&&g.setAttribute("disabled","disabled");null!=k&&k.originalSrc==g.getAttribute("value")&&(g.setAttribute("selected","selected"),u=!0);c.appendChild(g)}x||null!=b.pages&&1!=b.pages.length||(B.style.display="none",D.style.display="none",c.style.display="none");var q=document.createElement("option"),m=!1,n=!1,z=function(N,t){m||null!=N&&n||(D.checked?null!=t&&t(q.selected?null: -c.value):""==K.value||b.isOffline()?(v.value="",y.value="",null!=t&&t("")):(K.value=mxUtils.trim(K.value),b.loadImage(K.value,function(p){v.value=p.width;y.value=p.height;null!=t&&t(K.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));v.value="";y.value="";null!=t&&t(null)})))},C=mxUtils.bind(this,function(N){b.importFiles(N,0,0,b.maxBackgroundSize,function(t,p,F,J,M,H){K.value=t;z();K.focus()},function(){},function(t){return"image/"==t.type.substring(0, -6)},function(t){for(var p=0;p<t.length;p++)t[p]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){x?c.focus():K.focus();mxEvent.addListener(c,"focus",function(){B.removeAttribute("checked");D.setAttribute("checked","checked");D.checked=!0});mxEvent.addListener(K,"focus",function(){D.removeAttribute("checked");B.setAttribute("checked","checked");B.checked=!0});if(Graph.fileSupport){K.setAttribute("placeholder",mxResources.get("dragImagesHere"));var N=d.parentNode,t=null;mxEvent.addListener(N, +var BackgroundImageDialog=function(b,f,k){var e=document.createElement("div");e.style.whiteSpace="nowrap";var u=document.createElement("h2");mxUtils.write(u,mxResources.get("backgroundImage"));u.style.marginTop="0px";e.appendChild(u);var v=null!=k&&null!=k.originalSrc;u=!1;var B=document.createElement("input");B.style.cssText="margin-right:8px;margin-bottom:8px;";B.setAttribute("value","url");B.setAttribute("type","radio");B.setAttribute("name","geBackgroundImageDialogOption");var E=document.createElement("input"); +E.style.cssText="margin-right:8px;margin-bottom:8px;";E.setAttribute("value","url");E.setAttribute("type","radio");E.setAttribute("name","geBackgroundImageDialogOption");var L=document.createElement("input");L.setAttribute("type","text");L.style.marginBottom="8px";L.style.width="360px";L.value=v||null==k?"":k.src;var c=document.createElement("select");c.style.width="360px";if(null!=b.pages)for(var d=0;d<b.pages.length;d++){var g=document.createElement("option");mxUtils.write(g,b.pages[d].getName()|| +mxResources.get("pageWithNumber",[d+1]));g.setAttribute("value","data:page/id,"+b.pages[d].getId());b.pages[d]==b.currentPage&&g.setAttribute("disabled","disabled");null!=k&&k.originalSrc==g.getAttribute("value")&&(g.setAttribute("selected","selected"),u=!0);c.appendChild(g)}v||null!=b.pages&&1!=b.pages.length||(B.style.display="none",E.style.display="none",c.style.display="none");var q=document.createElement("option"),m=!1,n=!1,z=function(N,t){m||null!=N&&n||(E.checked?null!=t&&t(q.selected?null: +c.value):""==L.value||b.isOffline()?(x.value="",y.value="",null!=t&&t("")):(L.value=mxUtils.trim(L.value),b.loadImage(L.value,function(p){x.value=p.width;y.value=p.height;null!=t&&t(L.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));x.value="";y.value="";null!=t&&t(null)})))},C=mxUtils.bind(this,function(N){b.importFiles(N,0,0,b.maxBackgroundSize,function(t,p,F,K,D,H){L.value=t;z();L.focus()},function(){},function(t){return"image/"==t.type.substring(0, +6)},function(t){for(var p=0;p<t.length;p++)t[p]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){v?c.focus():L.focus();mxEvent.addListener(c,"focus",function(){B.removeAttribute("checked");E.setAttribute("checked","checked");E.checked=!0});mxEvent.addListener(L,"focus",function(){E.removeAttribute("checked");B.setAttribute("checked","checked");B.checked=!0});if(Graph.fileSupport){L.setAttribute("placeholder",mxResources.get("dragImagesHere"));var N=e.parentNode,t=null;mxEvent.addListener(N, "dragleave",function(p){null!=t&&(t.parentNode.removeChild(t),t=null);p.stopPropagation();p.preventDefault()});mxEvent.addListener(N,"dragover",mxUtils.bind(this,function(p){null==t&&(!mxClient.IS_IE||10<document.documentMode)&&(t=b.highlightElement(N));p.stopPropagation();p.preventDefault()}));mxEvent.addListener(N,"drop",mxUtils.bind(this,function(p){null!=t&&(t.parentNode.removeChild(t),t=null);if(0<p.dataTransfer.files.length)C(p.dataTransfer.files);else if(0<=mxUtils.indexOf(p.dataTransfer.types, -"text/uri-list")){var F=p.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(F)&&(K.value=decodeURIComponent(F),z())}p.stopPropagation();p.preventDefault()}),!1)}};d.appendChild(B);d.appendChild(K);mxUtils.br(d);e=document.createElement("span");e.style.marginLeft="30px";mxUtils.write(e,mxResources.get("width")+":");d.appendChild(e);var v=document.createElement("input");v.setAttribute("type","text");v.style.width="60px";v.style.marginLeft="8px";v.style.marginRight="16px"; -v.value=null==k||x?"":k.width;d.appendChild(v);mxUtils.write(d,mxResources.get("height")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.width="60px";y.style.marginLeft="8px";y.style.marginRight="16px";y.value=null==k||x?"":k.height;d.appendChild(y);mxUtils.br(d);mxUtils.br(d);mxEvent.addListener(K,"change",z);ImageDialog.filePicked=function(N){N.action==google.picker.Action.PICKED&&null!=N.docs[0].thumbnails&&(N=N.docs[0].thumbnails[N.docs[0].thumbnails.length-1], -null!=N&&(K.value=N.url,z()));K.focus()};d.appendChild(D);d.appendChild(c);mxUtils.br(d);x?(D.setAttribute("checked","checked"),D.checked=!0):(B.setAttribute("checked","checked"),B.checked=!0);!u&&D.checked&&(mxUtils.write(q,mxResources.get("pageNotFound")),q.setAttribute("disabled","disabled"),q.setAttribute("selected","selected"),q.setAttribute("value","pageNotFound"),c.appendChild(q),mxEvent.addListener(c,"change",function(){null==q.parentNode||q.selected||q.parentNode.removeChild(q)}));k=document.createElement("div"); -k.style.marginTop="30px";k.style.textAlign="right";u=mxUtils.button(mxResources.get("cancel"),function(){m=!0;b.hideDialog()});u.className="geBtn";b.editor.cancelFirst&&k.appendChild(u);e=mxUtils.button(mxResources.get("reset"),function(){K.value="";v.value="";y.value="";B.checked=!0;m=!1});mxEvent.addGestureListeners(e,function(){m=!0});e.className="geBtn";e.width="100";k.appendChild(e);if(Graph.fileSupport){var I=document.createElement("input");I.setAttribute("multiple","multiple");I.setAttribute("type", -"file");mxEvent.addListener(I,"change",function(N){null!=I.files&&(C(I.files),I.type="",I.type="file",I.value="")});I.style.display="none";d.appendChild(I);e=mxUtils.button(mxResources.get("open"),function(){I.click()});e.className="geBtn";k.appendChild(e)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();z(null,function(N){f(""!=N&&null!=N?new mxImage(N,v.value,y.value):null,null==N)})});mxEvent.addGestureListeners(applyBtn,function(){n=!0});applyBtn.className="geBtn gePrimaryBtn"; -k.appendChild(applyBtn);b.editor.cancelFirst||k.appendChild(u);d.appendChild(k);this.container=d},ParseDialog=function(b,f,k){function d(m,n,z){var C=m.split("\n");if("plantUmlPng"==n||"plantUmlSvg"==n||"plantUmlTxt"==n){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var v=function(T,W,U,V,l){x=mxEvent.isAltDown(z)?x:y.getCenterInsertPoint(new mxRectangle(0,0,V,l));var A=null;y.getModel().beginUpdate();try{A="txt"==W?b.insertAsPreText(U,x.x,x.y):y.insertVertex(null,null,null,x.x,x.y, +"text/uri-list")){var F=p.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(F)&&(L.value=decodeURIComponent(F),z())}p.stopPropagation();p.preventDefault()}),!1)}};e.appendChild(B);e.appendChild(L);mxUtils.br(e);d=document.createElement("span");d.style.marginLeft="30px";mxUtils.write(d,mxResources.get("width")+":");e.appendChild(d);var x=document.createElement("input");x.setAttribute("type","text");x.style.width="60px";x.style.marginLeft="8px";x.style.marginRight="16px"; +x.value=null==k||v?"":k.width;e.appendChild(x);mxUtils.write(e,mxResources.get("height")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.width="60px";y.style.marginLeft="8px";y.style.marginRight="16px";y.value=null==k||v?"":k.height;e.appendChild(y);mxUtils.br(e);mxUtils.br(e);mxEvent.addListener(L,"change",z);ImageDialog.filePicked=function(N){N.action==google.picker.Action.PICKED&&null!=N.docs[0].thumbnails&&(N=N.docs[0].thumbnails[N.docs[0].thumbnails.length-1], +null!=N&&(L.value=N.url,z()));L.focus()};e.appendChild(E);e.appendChild(c);mxUtils.br(e);v?(E.setAttribute("checked","checked"),E.checked=!0):(B.setAttribute("checked","checked"),B.checked=!0);!u&&E.checked&&(mxUtils.write(q,mxResources.get("pageNotFound")),q.setAttribute("disabled","disabled"),q.setAttribute("selected","selected"),q.setAttribute("value","pageNotFound"),c.appendChild(q),mxEvent.addListener(c,"change",function(){null==q.parentNode||q.selected||q.parentNode.removeChild(q)}));k=document.createElement("div"); +k.style.marginTop="30px";k.style.textAlign="right";u=mxUtils.button(mxResources.get("cancel"),function(){m=!0;b.hideDialog()});u.className="geBtn";b.editor.cancelFirst&&k.appendChild(u);d=mxUtils.button(mxResources.get("reset"),function(){L.value="";x.value="";y.value="";B.checked=!0;m=!1});mxEvent.addGestureListeners(d,function(){m=!0});d.className="geBtn";d.width="100";k.appendChild(d);if(Graph.fileSupport){var I=document.createElement("input");I.setAttribute("multiple","multiple");I.setAttribute("type", +"file");mxEvent.addListener(I,"change",function(N){null!=I.files&&(C(I.files),I.type="",I.type="file",I.value="")});I.style.display="none";e.appendChild(I);d=mxUtils.button(mxResources.get("open"),function(){I.click()});d.className="geBtn";k.appendChild(d)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();z(null,function(N){f(""!=N&&null!=N?new mxImage(N,x.value,y.value):null,null==N)})});mxEvent.addGestureListeners(applyBtn,function(){n=!0});applyBtn.className="geBtn gePrimaryBtn"; +k.appendChild(applyBtn);b.editor.cancelFirst||k.appendChild(u);e.appendChild(k);this.container=e},ParseDialog=function(b,f,k){function e(m,n,z){var C=m.split("\n");if("plantUmlPng"==n||"plantUmlSvg"==n||"plantUmlTxt"==n){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var x=function(T,W,U,V,l){v=mxEvent.isAltDown(z)?v:y.getCenterInsertPoint(new mxRectangle(0,0,V,l));var A=null;y.getModel().beginUpdate();try{A="txt"==W?b.insertAsPreText(U,v.x,v.y):y.insertVertex(null,null,null,v.x,v.y, V,l,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(U)+";"),y.setAttributeForCell(A,"plantUmlData",JSON.stringify({data:T,format:W},null,2))}finally{y.getModel().endUpdate()}null!=A&&(y.setSelectionCell(A),y.scrollCellToVisible(A))},y=b.editor.graph,I="plantUmlTxt"==n?"txt":"plantUmlPng"==n?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"== -m&&"svg"==I?window.setTimeout(function(){b.spinner.stop();v(m,I,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=", -295,212)},200):b.generatePlantUmlImage(m,I,function(T,W,U){b.spinner.stop();v(m,I,T,W,U)},function(T){b.handleError(T)})}}else if("mermaid"==n)b.spinner.spin(document.body,mxResources.get("inserting"))&&(y=b.editor.graph,b.generateMermaidImage(m,I,function(T,W,U){x=mxEvent.isAltDown(z)?x:y.getCenterInsertPoint(new mxRectangle(0,0,W,U));b.spinner.stop();var V=null;y.getModel().beginUpdate();try{V=y.insertVertex(null,null,null,x.x,x.y,W,U,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+ -T+";"),y.setAttributeForCell(V,"mermaidData",JSON.stringify({data:m,config:EditorUi.defaultMermaidConfig},null,2))}finally{y.getModel().endUpdate()}null!=V&&(y.setSelectionCell(V),y.scrollCellToVisible(V))},function(T){b.handleError(T)}));else if("table"==n){n=null;for(var N=[],t=0,p={},F=0;F<C.length;F++){var J=mxUtils.trim(C[F]);if("primary key"==J.substring(0,11).toLowerCase()){var M=J.match(/\((.+)\)/);M&&M[1]&&(p[M[1]]=!0);C.splice(F,1)}else 0<J.toLowerCase().indexOf("primary key")&&(p[J.split(" ")[0]]= -!0,C[F]=mxUtils.trim(J.replace(/primary key/i,"")))}for(F=0;F<C.length;F++)if(J=mxUtils.trim(C[F]),"create table"==J.substring(0,12).toLowerCase())J=mxUtils.trim(J.substring(12)),"("==J.charAt(J.length-1)&&(J=mxUtils.trim(J.substring(0,J.length-1))),n=new mxCell(J,new mxGeometry(t,0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),n.vertex=!0,N.push(n),J=b.editor.graph.getPreferredSizeForCell(H),null!= -J&&(n.geometry.width=J.width+10);else if(null!=n&&")"==J.charAt(0))t+=n.geometry.width+40,n=null;else if("("!=J&&null!=n){J=J.substring(0,","==J.charAt(J.length-1)?J.length-1:J.length);M=p[J.split(" ")[0]];var H=new mxCell("",new mxGeometry(0,0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(M?"1":"0")+";");H.vertex=!0;var G=new mxCell(M?"PK":"", -new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(M?"fontStyle=1;":""));G.vertex=!0;H.insert(G);J=new mxCell(J,new mxGeometry(30,0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(M?"fontStyle=5;":""));J.vertex=!0;H.insert(J);J=b.editor.graph.getPreferredSizeForCell(J);null!=J&&n.geometry.width<J.width+30&&(n.geometry.width=Math.min(320, -Math.max(n.geometry.width,J.width+30)));n.insert(H,M?0:null);n.geometry.height+=30}0<N.length&&(y=b.editor.graph,x=mxEvent.isAltDown(z)?x:y.getCenterInsertPoint(y.getBoundingBoxFromGeometry(N,!0)),y.setSelectionCells(y.importCells(N,x.x,x.y)),y.scrollCellToVisible(y.getSelectionCell()))}else if("list"==n){if(0<C.length){y=b.editor.graph;H=null;N=[];for(F=n=0;F<C.length;F++)";"!=C[F].charAt(0)&&(0==C[F].length?H=null:null==H?(H=new mxCell(C[F],new mxGeometry(n,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"), -H.vertex=!0,N.push(H),J=y.getPreferredSizeForCell(H),null!=J&&H.geometry.width<J.width+10&&(H.geometry.width=J.width+10),n+=H.geometry.width+40):"--"==C[F]?(J=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;"),J.vertex=!0,H.geometry.height+=J.geometry.height,H.insert(J)):0<C[F].length&&(t=new mxCell(C[F],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"), -t.vertex=!0,J=y.getPreferredSizeForCell(t),null!=J&&t.geometry.width<J.width&&(t.geometry.width=J.width),H.geometry.width=Math.max(H.geometry.width,t.geometry.width),H.geometry.height+=t.geometry.height,H.insert(t)));if(0<N.length){x=mxEvent.isAltDown(z)?x:y.getCenterInsertPoint(y.getBoundingBoxFromGeometry(N,!0));y.getModel().beginUpdate();try{N=y.importCells(N,x.x,x.y);J=[];for(F=0;F<N.length;F++)J.push(N[F]),J=J.concat(N[F].children);y.fireEvent(new mxEventObject("cellsInserted","cells",J))}finally{y.getModel().endUpdate()}y.setSelectionCells(N); -y.scrollCellToVisible(y.getSelectionCell())}}}else{H=function(T){var W=E[T];null==W&&(W=new mxCell(T,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),W.vertex=!0,E[T]=W,N.push(W));return W};var E={};N=[];for(F=0;F<C.length;F++)if(";"!=C[F].charAt(0)){var P=C[F].split("->");2<=P.length&&(M=H(P[0]),G=H(P[P.length-1]),P=new mxCell(2<P.length?P[1]:"",new mxGeometry),P.edge=!0,M.insertEdge(P,!0),G.insertEdge(P,!1),N.push(P))}if(0<N.length){C=document.createElement("div");C.style.visibility="hidden"; -document.body.appendChild(C);y=new Graph(C);y.getModel().beginUpdate();try{N=y.importCells(N);for(F=0;F<N.length;F++)y.getModel().isVertex(N[F])&&(J=y.getPreferredSizeForCell(N[F]),N[F].geometry.width=Math.max(N[F].geometry.width,J.width),N[F].geometry.height=Math.max(N[F].geometry.height,J.height));F=!0;"horizontalFlow"==n||"verticalFlow"==n?((new mxHierarchicalLayout(y,"horizontalFlow"==n?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(y.getDefaultParent(),N),F=!1):"circle"==n? -(new mxCircleLayout(y)).execute(y.getDefaultParent()):(t=new mxFastOrganicLayout(y),t.disableEdgeStyle=!1,t.forceConstant=180,t.execute(y.getDefaultParent()));F&&(p=new mxParallelEdgeLayout(y),p.spacing=30,p.execute(y.getDefaultParent()))}finally{y.getModel().endUpdate()}y.clearCellOverlays();J=[];b.editor.graph.getModel().beginUpdate();try{N=y.getModel().getChildren(y.getDefaultParent()),x=mxEvent.isAltDown(z)?x:b.editor.graph.getCenterInsertPoint(y.getBoundingBoxFromGeometry(N,!0)),J=b.editor.graph.importCells(N, -x.x,x.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",J))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(J);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());y.destroy();C.parentNode.removeChild(C)}}}function u(){return"list"==D.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==D.value? -"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==D.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==D.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"==D.value||"plantUmlTxt"==D.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var x=b.editor.graph.getFreeInsertPoint();f=document.createElement("div");f.style.textAlign="right";var B=document.createElement("textarea");B.style.boxSizing="border-box";B.style.resize= -"none";B.style.width="100%";B.style.height="354px";B.style.marginBottom="16px";var D=document.createElement("select");if("formatSql"==k||"mermaid"==k)D.style.display="none";var K=document.createElement("option");K.setAttribute("value","list");mxUtils.write(K,mxResources.get("list"));"plantUml"!=k&&D.appendChild(K);null!=k&&"fromText"!=k||K.setAttribute("selected","selected");K=document.createElement("option");K.setAttribute("value","table");mxUtils.write(K,mxResources.get("formatSql"));"formatSql"== -k&&(D.appendChild(K),K.setAttribute("selected","selected"));K=document.createElement("option");K.setAttribute("value","mermaid");mxUtils.write(K,mxResources.get("formatSql"));"mermaid"==k&&(D.appendChild(K),K.setAttribute("selected","selected"));K=document.createElement("option");K.setAttribute("value","diagram");mxUtils.write(K,mxResources.get("diagram"));var c=document.createElement("option");c.setAttribute("value","circle");mxUtils.write(c,mxResources.get("circle"));var e=document.createElement("option"); -e.setAttribute("value","horizontalFlow");mxUtils.write(e,mxResources.get("horizontalFlow"));var g=document.createElement("option");g.setAttribute("value","verticalFlow");mxUtils.write(g,mxResources.get("verticalFlow"));"plantUml"!=k&&(D.appendChild(K),D.appendChild(c),D.appendChild(e),D.appendChild(g));K=document.createElement("option");K.setAttribute("value","plantUmlSvg");mxUtils.write(K,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==k&&K.setAttribute("selected", -"selected");c=document.createElement("option");c.setAttribute("value","plantUmlPng");mxUtils.write(c,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");e=document.createElement("option");e.setAttribute("value","plantUmlTxt");mxUtils.write(e,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==k&&(D.appendChild(K),D.appendChild(c),D.appendChild(e));var q=u();B.value=q;f.appendChild(B);this.init=function(){B.focus()}; -Graph.fileSupport&&(B.addEventListener("dragover",function(m){m.stopPropagation();m.preventDefault()},!1),B.addEventListener("drop",function(m){m.stopPropagation();m.preventDefault();if(0<m.dataTransfer.files.length){m=m.dataTransfer.files[0];var n=new FileReader;n.onload=function(z){B.value=z.target.result};n.readAsText(m)}},!1));f.appendChild(D);mxEvent.addListener(D,"change",function(){var m=u();if(0==B.value.length||B.value==q)q=m,B.value=q});b.isOffline()||"mermaid"!=k&&"plantUml"!=k||(K=mxUtils.button(mxResources.get("help"), -function(){b.openLink("mermaid"==k?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),K.className="geBtn",f.appendChild(K));K=mxUtils.button(mxResources.get("close"),function(){B.value==q?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});K.className="geBtn";b.editor.cancelFirst&&f.appendChild(K);c=mxUtils.button(mxResources.get("insert"),function(m){b.hideDialog();d(B.value,D.value,m)});f.appendChild(c);c.className="geBtn gePrimaryBtn";b.editor.cancelFirst|| -f.appendChild(K);this.container=f},NewDialog=function(b,f,k,d,u,x,B,D,K,c,e,g,q,m,n,z,C,v){function y(ja){null!=ja&&(Da=Ea=ja?135:140);ja=!0;if(null!=Ba)for(;E<Ba.length&&(ja||0!=mxUtils.mod(E,30));){var xa=Ba[E++];xa=t(xa.url,xa.libs,xa.title,xa.tooltip?xa.tooltip:xa.title,xa.select,xa.imgUrl,xa.info,xa.onClick,xa.preview,xa.noImg,xa.clibs);ja&&xa.click();ja=!1}}function I(){if(aa&&null!=m)k||b.hideDialog(),m(aa,Z,G.value);else if(d)k||b.hideDialog(),d(S,G.value,Y,O);else{var ja=G.value;null!=ja&& -0<ja.length&&b.pickFolder(b.mode,function(xa){b.createFile(ja,S,null!=O&&0<O.length?O:null,null,function(){b.hideDialog()},null,xa,null,null!=R&&0<R.length?R:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function N(ja,xa,sa,da,ba,na,ea){null!=X&&(X.style.backgroundColor="transparent",X.style.border="1px solid transparent");T.removeAttribute("disabled");S=xa;O=sa;R=na;X=ja;aa=da;Y=ea;Z=ba;X.style.backgroundColor=D;X.style.border=K}function t(ja,xa,sa,da,ba,na,ea,ha, -oa,ma,va){function Ca(Ka,Ta){null==Ha?(Ma=Ka,Ma=/^https?:\/\//.test(Ma)&&!b.editor.isCorsEnabledForUrl(Ma)?PROXY_URL+"?url="+encodeURIComponent(Ma):TEMPLATE_PATH+"/"+Ma,mxUtils.get(Ma,mxUtils.bind(this,function(Va){200<=Va.getStatus()&&299>=Va.getStatus()&&(Ha=Va.getText());Ta(Ha,Ma)}))):Ta(Ha,Ma)}function ya(Ka,Ta,Va){if(null!=Ka&&mxUtils.isAncestorNode(document.body,pa)){Ka=mxUtils.parseXml(Ka);Ka=Editor.parseDiagramNode(Ka.documentElement);var Wa=new mxCodec(Ka.ownerDocument),$a=new mxGraphModel; -Wa.decode(Ka,$a);Ka=$a.root.getChildAt(0).children;b.sidebar.createTooltip(pa,Ka,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=sa?mxResources.get(sa,null,sa):null,!0,new mxPoint(Ta,Va),!0,function(){Ua=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;N(pa,null,null,ja,ea,va)},!0,!1)}}function ta(Ka,Ta){null==ja||Ra|| -b.sidebar.currentElt==pa?b.sidebar.hideTooltip():(b.sidebar.hideTooltip(),null!=Ja?(Ta='<mxfile><diagram id="d" name="n">'+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+Ja.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+Ja.naturalWidth+'" height="'+Ja.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>",ya(Ta,mxEvent.getClientX(Ka),mxEvent.getClientY(Ka))):(b.sidebar.currentElt= -pa,Ra=!0,Ca(ja,function(Va){Ra&&b.sidebar.currentElt==pa&&ya(Va,mxEvent.getClientX(Ka),mxEvent.getClientY(Ka));Ra=!1})))}var pa=document.createElement("div");pa.className="geTemplate geAdaptiveAsset";pa.style.position="relative";pa.style.height=Da+"px";pa.style.width=Ea+"px";var Ha=null,Ma=ja;null!=sa?pa.setAttribute("title",mxResources.get(sa,null,sa)):null!=da&&0<da.length&&pa.setAttribute("title",da);var Ra=!1,Ja=null;if(null!=na){pa.style.display="inline-flex";pa.style.justifyContent="center"; -pa.style.alignItems="center";ba=document.createElement("img");ba.setAttribute("src",na);ba.setAttribute("alt",da);ba.style.maxWidth=Da+"px";ba.style.maxHeight=Ea+"px";Ja=ba;var Pa=na.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");pa.appendChild(ba);ba.onerror=function(){this.src!=Pa?this.src=Pa:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(pa,mxUtils.bind(this,function(Ka){N(pa,null,null,ja,ea,va)}),null,null);mxEvent.addListener(pa,"dblclick",function(Ka){I(); -mxEvent.consume(Ka)})}else if(!ma&&null!=ja&&0<ja.length){var Qa=function(Ka){T.setAttribute("disabled","disabled");pa.style.backgroundColor="transparent";pa.style.border="1px solid transparent";P.spin(ca);Ca(ja,function(Ta,Va){P.stop();null!=Ta&&(N(pa,Ta,xa,null,null,va,Va),Ka&&I())})};ba=oa||TEMPLATE_PATH+"/"+ja.substring(0,ja.length-4)+".png";pa.style.backgroundImage="url("+ba+")";pa.style.backgroundPosition="center center";pa.style.backgroundRepeat="no-repeat";if(null!=sa){da=document.createElement("table"); -da.setAttribute("width","100%");da.setAttribute("height","100%");da.style.background=Editor.isDarkMode()?"transparent":"rgba(255,255,255,0.85)";da.style.lineHeight="1.3em";da.style.border="inherit";na=document.createElement("tbody");oa=document.createElement("tr");ma=document.createElement("td");ma.setAttribute("align","center");ma.setAttribute("valign","middle");var Na=document.createElement("span");Na.style.display="inline-block";Na.style.padding="4px 8px 4px 8px";Na.style.userSelect="none";Na.style.borderRadius= -"3px";Na.style.background="rgba(255,255,255,0.85)";Na.style.overflow="hidden";Na.style.textOverflow="ellipsis";Na.style.maxWidth=Da-34+"px";mxUtils.write(Na,mxResources.get(sa,null,sa));ma.appendChild(Na);oa.appendChild(ma);na.appendChild(oa);da.appendChild(na);pa.appendChild(da)}mxEvent.addGestureListeners(pa,mxUtils.bind(this,function(Ka){Qa()}),null,null);mxEvent.addListener(pa,"dblclick",function(Ka){Qa(!0);mxEvent.consume(Ka)})}else da=document.createElement("table"),da.setAttribute("width", -"100%"),da.setAttribute("height","100%"),da.style.lineHeight="1.3em",na=document.createElement("tbody"),oa=document.createElement("tr"),ma=document.createElement("td"),ma.setAttribute("align","center"),ma.setAttribute("valign","middle"),Na=document.createElement("span"),Na.style.display="inline-block",Na.style.padding="4px 8px 4px 8px",Na.style.userSelect="none",Na.style.borderRadius="3px",Na.style.background="#ffffff",Na.style.overflow="hidden",Na.style.textOverflow="ellipsis",Na.style.maxWidth= -Da-34+"px",mxUtils.write(Na,mxResources.get(sa,null,sa)),ma.appendChild(Na),oa.appendChild(ma),na.appendChild(oa),da.appendChild(na),pa.appendChild(da),ba&&N(pa),mxEvent.addGestureListeners(pa,mxUtils.bind(this,function(Ka){N(pa,null,null,ja,ea)}),null,null),null!=ha?mxEvent.addListener(pa,"click",ha):(mxEvent.addListener(pa,"click",function(Ka){N(pa,null,null,ja,ea)}),mxEvent.addListener(pa,"dblclick",function(Ka){I();mxEvent.consume(Ka)}));if(null!=ja){var Sa=document.createElement("img");Sa.setAttribute("src", -Sidebar.prototype.searchImage);Sa.setAttribute("title",mxResources.get("preview"));Sa.className="geActiveButton";Sa.style.position="absolute";Sa.style.cursor="default";Sa.style.padding="8px";Sa.style.right="0px";Sa.style.top="0px";pa.appendChild(Sa);var Ua=!1;mxEvent.addGestureListeners(Sa,mxUtils.bind(this,function(Ka){Ua=b.sidebar.currentElt==pa}),null,null);mxEvent.addListener(Sa,"click",mxUtils.bind(this,function(Ka){Ua||ta(Ka,Sa);mxEvent.consume(Ka)}))}ca.appendChild(pa);return pa}function p(){function ja(ta, -pa){var Ha=mxResources.get(ta);null==Ha&&(Ha=ta.substring(0,1).toUpperCase()+ta.substring(1));18<Ha.length&&(Ha=Ha.substring(0,18)+"…");return Ha+" ("+pa.length+")"}function xa(ta,pa,Ha){mxEvent.addListener(pa,"click",function(){ra!=pa&&(ra.style.backgroundColor="",ra=pa,ra.style.backgroundColor=B,ca.scrollTop=0,ca.innerText="",E=0,Ba=Ha?Oa[ta][Ha]:za[ta],U=null,y(!1))})}Ia&&(Ia=!1,mxEvent.addListener(ca,"scroll",function(ta){ca.scrollTop+ca.clientHeight>=ca.scrollHeight&&(y(),mxEvent.consume(ta))})); -if(0<Ga){var sa=document.createElement("div");sa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(sa,mxResources.get("custom"));ka.appendChild(sa);for(var da in Aa){var ba=document.createElement("div"),na=da;sa=Aa[da];18<na.length&&(na=na.substring(0,18)+"…");ba.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";ba.setAttribute("title", -na+" ("+sa.length+")");mxUtils.write(ba,ba.getAttribute("title"));null!=c&&(ba.style.padding=c);ka.appendChild(ba);(function(ta,pa){mxEvent.addListener(ba,"click",function(){ra!=pa&&(ra.style.backgroundColor="",ra=pa,ra.style.backgroundColor=B,ca.scrollTop=0,ca.innerText="",E=0,Ba=Aa[ta],U=null,y(!1))})})(da,ba)}sa=document.createElement("div");sa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(sa,"draw.io");ka.appendChild(sa)}for(da in za){na= -Oa[da];var ea=ba=document.createElement(na?"ul":"div");sa=za[da];var ha=ja(da,sa);if(null!=na){var oa=document.createElement("li"),ma=document.createElement("div");ma.className="geTempTreeCaret";ma.setAttribute("title",ha);mxUtils.write(ma,ha);ea=ma;oa.appendChild(ma);ha=document.createElement("ul");ha.className="geTempTreeNested";ha.style.visibility="hidden";for(var va in na){var Ca=document.createElement("li"),ya=ja(va,na[va]);Ca.setAttribute("title",ya);mxUtils.write(Ca,ya);xa(da,Ca,va);ha.appendChild(Ca)}oa.appendChild(ha); -ba.className="geTempTree";ba.appendChild(oa);(function(ta,pa){mxEvent.addListener(pa,"click",function(){ta.style.visibility="visible";ta.classList.toggle("geTempTreeActive");ta.classList.toggle("geTempTreeNested")&&setTimeout(function(){ta.style.visibility="hidden"},550);pa.classList.toggle("geTempTreeCaret-down")})})(ha,ma)}else ba.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;", -ba.setAttribute("title",ha),mxUtils.write(ba,ha);null!=c&&(ba.style.padding=c);ka.appendChild(ba);null==ra&&0<sa.length&&(ra=ba,ra.style.backgroundColor=B,Ba=sa);xa(da,ea)}y(!1)}var F=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);k=null!=k?k:!0;u=null!=u?u:!1;B=null!=B?B:"#ebf2f9";D=null!=D?D:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";K=null!=K?K:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";e=null!=e?e:EditorUi.templateFile;var J=document.createElement("div"); -J.style.userSelect="none";J.style.height="100%";var M=document.createElement("div");M.style.whiteSpace="nowrap";M.style.height="46px";k&&J.appendChild(M);var H=document.createElement("img");H.setAttribute("border","0");H.setAttribute("align","absmiddle");H.style.width="40px";H.style.height="40px";H.style.marginRight="10px";H.style.paddingBottom="4px";H.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE? -IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";f||F||!k||M.appendChild(H);k&&mxUtils.write(M,(F?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");H=".drawio"; -b.mode==App.MODE_GOOGLE&&null!=b.drive?H=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?H=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?H=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?H=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?H=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(H=b.trello.extension);var G=document.createElement("input");G.setAttribute("value",b.defaultFilename+H);G.style.marginLeft="10px";G.style.width=f|| -F?"144px":"244px";this.init=function(){k&&(G.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?G.select():document.execCommand("selectAll",!1,null));null!=ca.parentNode&&null!=ca.parentNode.parentNode&&mxEvent.addGestureListeners(ca.parentNode.parentNode,mxUtils.bind(this,function(ja){b.sidebar.hideTooltip()}),null,null)};k&&(M.appendChild(G),v?G.style.width=f||F?"350px":"450px":(null!=b.editor.diagramFileTypes&&(v=FilenameDialog.createFileTypes(b,G,b.editor.diagramFileTypes),v.style.marginLeft= -"6px",v.style.width=f||F?"80px":"180px",M.appendChild(v)),null!=b.editor.fileExtensions&&(F=FilenameDialog.createTypeHint(b,G,b.editor.fileExtensions),F.style.marginTop="12px",M.appendChild(F))));M=!1;var E=0,P=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),T=mxUtils.button(z||mxResources.get("create"),function(){T.setAttribute("disabled","disabled");I();T.removeAttribute("disabled")});T.className="geBtn gePrimaryBtn"; -if(g||q){var W=[],U=null,V=null,l=null,A=function(ja){T.setAttribute("disabled","disabled");for(var xa=0;xa<W.length;xa++)W[xa].className=xa==ja?"geBtn gePrimaryBtn":"geBtn"};M=!0;z=document.createElement("div");z.style.whiteSpace="nowrap";z.style.height="30px";J.appendChild(z);F=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){ka.style.display="";fa.style.display="";ca.style.left="160px";A(0);ca.scrollTop=0;ca.innerText="";E=0;U!=Ba&&(Ba=U,za=V,Ga=l,ka.innerText="",p(),U=null)}); -W.push(F);z.appendChild(F);var L=function(ja){ka.style.display="none";fa.style.display="none";ca.style.left="30px";A(ja?-1:1);null==U&&(U=Ba);ca.scrollTop=0;ca.innerText="";P.spin(ca);var xa=function(sa,da,ba){E=0;P.stop();Ba=sa;ba=ba||{};var na=0,ea;for(ea in ba)na+=ba[ea].length;if(da)ca.innerText=da;else if(0==sa.length&&0==na)ca.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(ca.innerText="",0<na){ka.style.display="";ca.style.left="160px";ka.innerText="";Ga=0;za={"draw.io":sa}; -for(ea in ba)za[ea]=ba[ea];p()}else y(!0)};ja?q(Q.value,xa):g(xa)};g&&(F=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){L()}),z.appendChild(F),W.push(F));if(q){F=document.createElement("span");F.style.marginLeft="10px";F.innerText=mxResources.get("search")+":";z.appendChild(F);var Q=document.createElement("input");Q.style.marginRight="10px";Q.style.marginLeft="10px";Q.style.width="220px";mxEvent.addListener(Q,"keypress",function(ja){13==ja.keyCode&&L(!0)});z.appendChild(Q);F=mxUtils.button(mxResources.get("search"), -function(){L(!0)});F.className="geBtn";z.appendChild(F)}A(0)}var O=null,R=null,S=null,X=null,aa=null,Y=null,Z=null,ca=document.createElement("div");ca.style.border="1px solid #d3d3d3";ca.style.position="absolute";ca.style.left="160px";ca.style.right="34px";z=(k?72:40)+(M?30:0);ca.style.top=z+"px";ca.style.bottom="68px";ca.style.margin="6px 0 0 -1px";ca.style.padding="6px";ca.style.overflow="auto";var fa=document.createElement("div");fa.style.cssText="position:absolute;left:30px;width:128px;top:"+ -z+"px;height:22px;margin-top: 6px;white-space: nowrap";var la=document.createElement("input");la.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";la.setAttribute("placeholder",mxResources.get("search"));la.setAttribute("type","text");fa.appendChild(la);var ia=document.createElement("img"),qa="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";ia.setAttribute("src",qa);ia.setAttribute("title",mxResources.get("search")); -ia.style.position="relative";ia.style.left="-18px";ia.style.top="1px";ia.style.background="url('"+b.editor.transparentImage+"')";fa.appendChild(ia);mxEvent.addListener(ia,"click",function(){ia.getAttribute("src")==Dialog.prototype.closeImage&&(ia.setAttribute("src",qa),ia.setAttribute("title",mxResources.get("search")),la.value="",null!=ua&&(ua.click(),ua=null));la.focus()});mxEvent.addListener(la,"keydown",mxUtils.bind(this,function(ja){if(13==ja.keyCode){var xa=la.value;if(""==xa)null!=ua&&(ua.click(), -ua=null);else{if(null==NewDialog.tagsList[e]){var sa={};for(va in za)for(var da=za[va],ba=0;ba<da.length;ba++){var na=da[ba];if(null!=na.tags)for(var ea=na.tags.toLowerCase().split(";"),ha=0;ha<ea.length;ha++)null==sa[ea[ha]]&&(sa[ea[ha]]=[]),sa[ea[ha]].push(na)}NewDialog.tagsList[e]=sa}var oa=xa.toLowerCase().split(" ");sa=NewDialog.tagsList[e];if(0<Ga&&null==sa.__tagsList__){for(va in Aa)for(da=Aa[va],ba=0;ba<da.length;ba++)for(na=da[ba],ea=na.title.split(" "),ea.push(va),ha=0;ha<ea.length;ha++){var ma= -ea[ha].toLowerCase();null==sa[ma]&&(sa[ma]=[]);sa[ma].push(na)}sa.__tagsList__=!0}var va=[];da={};for(ba=ea=0;ba<oa.length;ba++)if(0<oa[ba].length){ma=sa[oa[ba]];var Ca={};va=[];if(null!=ma)for(ha=0;ha<ma.length;ha++)na=ma[ha],0==ea==(null==da[na.url])&&(Ca[na.url]=!0,va.push(na));da=Ca;ea++}ca.scrollTop=0;ca.innerText="";E=0;sa=document.createElement("div");sa.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";mxUtils.write(sa,mxResources.get(0==va.length?"noResultsFor": -"resultsFor",[xa]));ca.appendChild(sa);null!=ra&&null==ua&&(ra.style.backgroundColor="",ua=ra,ra=sa);Ba=va;U=null;y(!1)}mxEvent.consume(ja)}}));mxEvent.addListener(la,"keyup",mxUtils.bind(this,function(ja){""==la.value?(ia.setAttribute("src",qa),ia.setAttribute("title",mxResources.get("search"))):(ia.setAttribute("src",Dialog.prototype.closeImage),ia.setAttribute("title",mxResources.get("reset")))}));z+=23;var ka=document.createElement("div");ka.style.cssText="position:absolute;left:30px;width:128px;top:"+ -z+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(ca,"scroll",function(){b.sidebar.hideTooltip()});var Da=140,Ea=140,za={},Oa={},Aa={},Ga=0,Ia=!0,ra=null,ua=null;za.basic=[{title:"blankDiagram",select:!0}];var Ba=za.basic;if(!f){var Fa=function(){mxUtils.get(La,function(ja){if(!wa){wa=!0;ja=ja.getXml().documentElement.firstChild;for(var xa={};null!=ja;){if("undefined"!==typeof ja.getAttribute)if("clibs"==ja.nodeName){for(var sa=ja.getAttribute("name"),da= -ja.getElementsByTagName("add"),ba=[],na=0;na<da.length;na++)ba.push(encodeURIComponent(mxUtils.getTextContent(da[na])));null!=sa&&0<ba.length&&(xa[sa]=ba.join(";"))}else if(ba=ja.getAttribute("url"),null!=ba){da=ja.getAttribute("section");sa=ja.getAttribute("subsection");if(null==da&&(na=ba.indexOf("/"),da=ba.substring(0,na),null==sa)){var ea=ba.indexOf("/",na+1);-1<ea&&(sa=ba.substring(na+1,ea))}na=za[da];null==na&&(na=[],za[da]=na);ba=ja.getAttribute("clibs");null!=xa[ba]&&(ba=xa[ba]);ba={url:ja.getAttribute("url"), -libs:ja.getAttribute("libs"),title:ja.getAttribute("title"),tooltip:ja.getAttribute("name")||ja.getAttribute("url"),preview:ja.getAttribute("preview"),clibs:ba,tags:ja.getAttribute("tags")};na.push(ba);null!=sa&&(na=Oa[da],null==na&&(na={},Oa[da]=na),da=na[sa],null==da&&(da=[],na[sa]=da),da.push(ba))}ja=ja.nextSibling}P.stop();p()}})};J.appendChild(fa);J.appendChild(ka);J.appendChild(ca);var wa=!1,La=e;/^https?:\/\//.test(La)&&!b.editor.isCorsEnabledForUrl(La)&&(La=PROXY_URL+"?url="+encodeURIComponent(La)); -P.spin(ca);null!=C?C(function(ja,xa){Aa=ja;l=Ga=xa;Fa()},Fa):Fa();V=za}mxEvent.addListener(G,"keypress",function(ja){b.dialog.container.firstChild==J&&13==ja.keyCode&&I()});C=document.createElement("div");C.style.marginTop=f?"4px":"16px";C.style.textAlign="right";C.style.position="absolute";C.style.left="40px";C.style.bottom="24px";C.style.right="40px";f||b.isOffline()||!k||null!=d||u||(z=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}), -z.className="geBtn",C.appendChild(z));z=mxUtils.button(mxResources.get("cancel"),function(){null!=x&&x();b.hideDialog(!0)});z.className="geBtn";!b.editor.cancelFirst||u&&null==x||C.appendChild(z);f||"1"==urlParams.embed||u||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(f=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var ja=new FilenameDialog(b,"",mxResources.get("create"),function(xa){null!=xa&&0<xa.length&&b.editor.loadUrl(b.editor.getProxiedUrl(xa),function(sa){S= -sa;O=null;templateRealURl=xa;b.hideDialog();I()},function(sa){b.handleError(sa)})},mxResources.get("url"),null,null,null,!1);b.showDialog(ja.container,300,80,!0,!0);ja.init()}),f.className="geBtn",C.appendChild(f));Graph.fileSupport&&n&&(n=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var ja=document.createElement("input");ja.setAttribute("multiple","multiple");ja.setAttribute("type","file");mxEvent.addListener(ja,"change",function(xa){b.openFiles(ja.files,!0); -ja.value=""});ja.style.display="none";document.body.appendChild(ja);b.newDlgFileInputElt=ja}b.newDlgFileInputElt.click()}),n.className="geBtn",C.appendChild(n));C.appendChild(T);b.editor.cancelFirst||null!=d||u&&null==x||C.appendChild(z);J.appendChild(C);this.container=J};NewDialog.tagsList={}; -var CreateDialog=function(b,f,k,d,u,x,B,D,K,c,e,g,q,m,n,z,C){function v(M,H,G,E){function P(){mxEvent.addListener(T,"click",function(){var A=G;if(B){var L=N.value,Q=L.lastIndexOf(".");if(0>f.lastIndexOf(".")&&0>Q){A=null!=A?A:J.value;var O="";A==App.MODE_GOOGLE?O=b.drive.extension:A==App.MODE_GITHUB?O=b.gitHub.extension:A==App.MODE_GITLAB?O=b.gitLab.extension:A==App.MODE_TRELLO?O=b.trello.extension:A==App.MODE_DROPBOX?O=b.dropbox.extension:A==App.MODE_ONEDRIVE?O=b.oneDrive.extension:A==App.MODE_DEVICE&& -(O=".drawio");0<=Q&&(L=L.substring(0,Q));N.value=L+O}}y(G)})}var T=document.createElement("a");T.style.overflow="hidden";var W=document.createElement("img");W.src=M;W.setAttribute("border","0");W.setAttribute("align","absmiddle");W.style.width="60px";W.style.height="60px";W.style.paddingBottom="6px";T.style.display="inline-block";T.className="geBaseButton";T.style.position="relative";T.style.margin="4px";T.style.padding="8px 8px 10px 8px";T.style.whiteSpace="nowrap";T.appendChild(W);T.style.color= -"gray";T.style.fontSize="11px";var U=document.createElement("div");T.appendChild(U);mxUtils.write(U,H);if(null!=E&&null==b[E]){W.style.visibility="hidden";mxUtils.setOpacity(U,10);var V=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});V.spin(T);var l=window.setTimeout(function(){null==b[E]&&(V.stop(),T.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[E]&&(window.clearTimeout(l), -mxUtils.setOpacity(U,100),W.style.visibility="",V.stop(),P())}))}else P();p.appendChild(T);++F==g&&(mxUtils.br(p),F=0)}function y(M){var H=N.value;if(null==M||null!=H&&0<H.length)C&&b.hideDialog(),k(H,M,N)}e="1"==urlParams.noDevice?!1:e;B=null!=B?B:!0;D=null!=D?D:!0;g=null!=g?g:4;C=null!=C?C:!0;x=document.createElement("div");x.style.whiteSpace="nowrap";null==d&&b.addLanguageMenu(x);var I=document.createElement("h2");mxUtils.write(I,u||mxResources.get("create"));I.style.marginTop="0px";I.style.marginBottom= -"24px";x.appendChild(I);mxUtils.write(x,mxResources.get("filename")+":");var N=document.createElement("input");N.setAttribute("value",f);N.style.width="200px";N.style.marginLeft="10px";N.style.marginBottom="20px";N.style.maxWidth="70%";this.init=function(){N.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?N.select():document.execCommand("selectAll",!1,null)};x.appendChild(N);null!=z&&(null!=b.editor.diagramFileTypes&&(u=FilenameDialog.createFileTypes(b,N,b.editor.diagramFileTypes), -u.style.marginLeft="6px",u.style.width="90px",x.appendChild(u)),x.appendChild(FilenameDialog.createTypeHint(b,N,z)));z=null;if("1"!=urlParams.noDevice&&null!=q&&null!=m&&"image/"==m.substring(0,6)&&("image/svg"!=m.substring(0,9)||mxClient.IS_SVG)){N.style.width="160px";u=document.createElement("img");var t=n?q:btoa(unescape(encodeURIComponent(q)));u.setAttribute("src","data:"+m+";base64,"+t);u.style.position="absolute";u.style.top="70px";u.style.right="100px";u.style.maxWidth="120px";u.style.maxHeight= -"80px";mxUtils.setPrefixedStyle(u.style,"transform","translate(50%,-50%)");x.appendChild(u);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=m||(z=mxUtils.button(mxResources.get("copy"),function(M){M=b.base64ToBlob(t,"image/png");M=new ClipboardItem({"image/png":M,"text/html":new Blob(['<img src="data:'+m+";base64,"+t+'">'],{type:"text/html"})});navigator.clipboard.write([M]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(H){b.handleError(H)}))}), -z.style.marginTop="6px",z.className="geBtn");K&&Editor.popupsAllowed&&(u.style.cursor="pointer",mxEvent.addGestureListeners(u,null,null,function(M){mxEvent.isPopupTrigger(M)||y("_blank")}))}mxUtils.br(x);var p=document.createElement("div");p.style.textAlign="center";var F=0;p.style.marginTop="6px";x.appendChild(p);var J=document.createElement("select");J.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(q=document.createElement("option"),q.setAttribute("value", -App.MODE_GOOGLE),mxUtils.write(q,mxResources.get("googleDrive")),J.appendChild(q),v(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(q,mxResources.get("oneDrive")),J.appendChild(q),b.mode==App.MODE_ONEDRIVE&&q.setAttribute("selected","selected"),v(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE, -"oneDrive")),"function"===typeof window.DropboxClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(q,mxResources.get("dropbox")),J.appendChild(q),b.mode==App.MODE_DROPBOX&&q.setAttribute("selected","selected"),v(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_GITHUB),mxUtils.write(q,mxResources.get("github")),J.appendChild(q),v(IMAGE_PATH+ -"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_GITLAB),mxUtils.write(q,mxResources.get("gitlab")),J.appendChild(q),v(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_TRELLO),mxUtils.write(q,mxResources.get("trello")),J.appendChild(q),v(IMAGE_PATH+"/trello-logo.svg", -mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)q=document.createElement("option"),q.setAttribute("value",App.MODE_DEVICE),mxUtils.write(q,mxResources.get("device")),J.appendChild(q),b.mode!=App.MODE_DEVICE&&D||q.setAttribute("selected","selected"),e&&v(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);D&&isLocalStorage&&"0"!=urlParams.browser&&(D=document.createElement("option"), -D.setAttribute("value",App.MODE_BROWSER),mxUtils.write(D,mxResources.get("browser")),J.appendChild(D),b.mode==App.MODE_BROWSER&&D.setAttribute("selected","selected"),v(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));D=document.createElement("div");D.style.marginTop="26px";D.style.textAlign="center";null!=c&&(e=mxUtils.button(mxResources.get("help"),function(){b.openLink(c)}),e.className="geBtn",D.appendChild(e));e=mxUtils.button(mxResources.get(null!=d?"close":"cancel"), -function(){null!=d?d():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});e.className="geBtn";b.editor.cancelFirst&&null==d&&D.appendChild(e);null==d&&(q=mxUtils.button(mxResources.get("decideLater"),function(){y(null)}),q.className="geBtn",D.appendChild(q));K&&Editor.popupsAllowed&&(K=mxUtils.button(mxResources.get("openInNewWindow"),function(){y("_blank")}),K.className="geBtn",D.appendChild(K));CreateDialog.showDownloadButton&&(K=mxUtils.button(mxResources.get("download"), -function(){y("download")}),K.className="geBtn",D.appendChild(K),null!=z&&(K.style.marginTop="6px",D.style.marginTop="6px"));null!=z&&(mxUtils.br(D),D.appendChild(z));b.editor.cancelFirst&&null==d||D.appendChild(e);mxEvent.addListener(N,"keypress",function(M){13==M.keyCode?y(App.MODE_DEVICE):27==M.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});x.appendChild(D);this.container=x};CreateDialog.showDownloadButton="1"!=urlParams.noDevice; -var PopupDialog=function(b,f,k,d,u){u=null!=u?u:!0;var x=document.createElement("div");x.style.textAlign="left";x.style.height="100%";mxUtils.write(x,mxResources.get("fileOpenLocation"));mxUtils.br(x);mxUtils.br(x);var B=mxUtils.button(mxResources.get("openInThisWindow"),function(){u&&b.hideDialog();null!=d&&d()});B.className="geBtn";B.style.marginBottom="8px";B.style.width="280px";x.appendChild(B);mxUtils.br(x);var D=mxUtils.button(mxResources.get("openInNewWindow"),function(){u&&b.hideDialog(); -null!=k&&k();b.openLink(f,null,!0)});D.className="geBtn gePrimaryBtn";D.style.width=B.style.width;x.appendChild(D);mxUtils.br(x);mxUtils.br(x);mxUtils.write(x,mxResources.get("allowPopups"));this.container=x},ImageDialog=function(b,f,k,d,u,x,B,D){function K(){0<g.value.length?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")}x=null!=x?x:!0;var c=b.editor.graph,e=document.createElement("div");mxUtils.write(e,f);f=document.createElement("div");f.className="geTitle";f.style.backgroundColor= +m&&"svg"==I?window.setTimeout(function(){b.spinner.stop();x(m,I,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=", +295,212)},200):b.generatePlantUmlImage(m,I,function(T,W,U){b.spinner.stop();x(m,I,T,W,U)},function(T){b.handleError(T)})}}else if("mermaid"==n)b.spinner.spin(document.body,mxResources.get("inserting"))&&(y=b.editor.graph,b.generateMermaidImage(m,I,function(T,W,U){v=mxEvent.isAltDown(z)?v:y.getCenterInsertPoint(new mxRectangle(0,0,W,U));b.spinner.stop();var V=null;y.getModel().beginUpdate();try{V=y.insertVertex(null,null,null,v.x,v.y,W,U,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+ +T+";"),y.setAttributeForCell(V,"mermaidData",JSON.stringify({data:m,config:EditorUi.defaultMermaidConfig},null,2))}finally{y.getModel().endUpdate()}null!=V&&(y.setSelectionCell(V),y.scrollCellToVisible(V))},function(T){b.handleError(T)}));else if("table"==n){n=null;for(var N=[],t=0,p={},F=0;F<C.length;F++){var K=mxUtils.trim(C[F]);if("primary key"==K.substring(0,11).toLowerCase()){var D=K.match(/\((.+)\)/);D&&D[1]&&(p[D[1]]=!0);C.splice(F,1)}else 0<K.toLowerCase().indexOf("primary key")&&(p[K.split(" ")[0]]= +!0,C[F]=mxUtils.trim(K.replace(/primary key/i,"")))}for(F=0;F<C.length;F++)if(K=mxUtils.trim(C[F]),"create table"==K.substring(0,12).toLowerCase())K=mxUtils.trim(K.substring(12)),"("==K.charAt(K.length-1)&&(K=mxUtils.trim(K.substring(0,K.length-1))),n=new mxCell(K,new mxGeometry(t,0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),n.vertex=!0,N.push(n),K=b.editor.graph.getPreferredSizeForCell(H),null!= +K&&(n.geometry.width=K.width+10);else if(null!=n&&")"==K.charAt(0))t+=n.geometry.width+40,n=null;else if("("!=K&&null!=n){K=K.substring(0,","==K.charAt(K.length-1)?K.length-1:K.length);D=p[K.split(" ")[0]];var H=new mxCell("",new mxGeometry(0,0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(D?"1":"0")+";");H.vertex=!0;var J=new mxCell(D?"PK":"", +new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(D?"fontStyle=1;":""));J.vertex=!0;H.insert(J);K=new mxCell(K,new mxGeometry(30,0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(D?"fontStyle=5;":""));K.vertex=!0;H.insert(K);K=b.editor.graph.getPreferredSizeForCell(K);null!=K&&n.geometry.width<K.width+30&&(n.geometry.width=Math.min(320, +Math.max(n.geometry.width,K.width+30)));n.insert(H,D?0:null);n.geometry.height+=30}0<N.length&&(y=b.editor.graph,v=mxEvent.isAltDown(z)?v:y.getCenterInsertPoint(y.getBoundingBoxFromGeometry(N,!0)),y.setSelectionCells(y.importCells(N,v.x,v.y)),y.scrollCellToVisible(y.getSelectionCell()))}else if("list"==n){if(0<C.length){y=b.editor.graph;H=null;N=[];for(F=n=0;F<C.length;F++)";"!=C[F].charAt(0)&&(0==C[F].length?H=null:null==H?(H=new mxCell(C[F],new mxGeometry(n,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"), +H.vertex=!0,N.push(H),K=y.getPreferredSizeForCell(H),null!=K&&H.geometry.width<K.width+10&&(H.geometry.width=K.width+10),n+=H.geometry.width+40):"--"==C[F]?(K=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;"),K.vertex=!0,H.geometry.height+=K.geometry.height,H.insert(K)):0<C[F].length&&(t=new mxCell(C[F],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"), +t.vertex=!0,K=y.getPreferredSizeForCell(t),null!=K&&t.geometry.width<K.width&&(t.geometry.width=K.width),H.geometry.width=Math.max(H.geometry.width,t.geometry.width),H.geometry.height+=t.geometry.height,H.insert(t)));if(0<N.length){v=mxEvent.isAltDown(z)?v:y.getCenterInsertPoint(y.getBoundingBoxFromGeometry(N,!0));y.getModel().beginUpdate();try{N=y.importCells(N,v.x,v.y);K=[];for(F=0;F<N.length;F++)K.push(N[F]),K=K.concat(N[F].children);y.fireEvent(new mxEventObject("cellsInserted","cells",K))}finally{y.getModel().endUpdate()}y.setSelectionCells(N); +y.scrollCellToVisible(y.getSelectionCell())}}}else{H=function(T){var W=G[T];null==W&&(W=new mxCell(T,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),W.vertex=!0,G[T]=W,N.push(W));return W};var G={};N=[];for(F=0;F<C.length;F++)if(";"!=C[F].charAt(0)){var P=C[F].split("->");2<=P.length&&(D=H(P[0]),J=H(P[P.length-1]),P=new mxCell(2<P.length?P[1]:"",new mxGeometry),P.edge=!0,D.insertEdge(P,!0),J.insertEdge(P,!1),N.push(P))}if(0<N.length){C=document.createElement("div");C.style.visibility="hidden"; +document.body.appendChild(C);y=new Graph(C);y.getModel().beginUpdate();try{N=y.importCells(N);for(F=0;F<N.length;F++)y.getModel().isVertex(N[F])&&(K=y.getPreferredSizeForCell(N[F]),N[F].geometry.width=Math.max(N[F].geometry.width,K.width),N[F].geometry.height=Math.max(N[F].geometry.height,K.height));F=!0;"horizontalFlow"==n||"verticalFlow"==n?((new mxHierarchicalLayout(y,"horizontalFlow"==n?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(y.getDefaultParent(),N),F=!1):"circle"==n? +(new mxCircleLayout(y)).execute(y.getDefaultParent()):(t=new mxFastOrganicLayout(y),t.disableEdgeStyle=!1,t.forceConstant=180,t.execute(y.getDefaultParent()));F&&(p=new mxParallelEdgeLayout(y),p.spacing=30,p.execute(y.getDefaultParent()))}finally{y.getModel().endUpdate()}y.clearCellOverlays();K=[];b.editor.graph.getModel().beginUpdate();try{N=y.getModel().getChildren(y.getDefaultParent()),v=mxEvent.isAltDown(z)?v:b.editor.graph.getCenterInsertPoint(y.getBoundingBoxFromGeometry(N,!0)),K=b.editor.graph.importCells(N, +v.x,v.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",K))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(K);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());y.destroy();C.parentNode.removeChild(C)}}}function u(){return"list"==E.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==E.value? +"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==E.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==E.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"==E.value||"plantUmlTxt"==E.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var v=b.editor.graph.getFreeInsertPoint();f=document.createElement("div");f.style.textAlign="right";var B=document.createElement("textarea");B.style.boxSizing="border-box";B.style.resize= +"none";B.style.width="100%";B.style.height="354px";B.style.marginBottom="16px";var E=document.createElement("select");if("formatSql"==k||"mermaid"==k)E.style.display="none";var L=document.createElement("option");L.setAttribute("value","list");mxUtils.write(L,mxResources.get("list"));"plantUml"!=k&&E.appendChild(L);null!=k&&"fromText"!=k||L.setAttribute("selected","selected");L=document.createElement("option");L.setAttribute("value","table");mxUtils.write(L,mxResources.get("formatSql"));"formatSql"== +k&&(E.appendChild(L),L.setAttribute("selected","selected"));L=document.createElement("option");L.setAttribute("value","mermaid");mxUtils.write(L,mxResources.get("formatSql"));"mermaid"==k&&(E.appendChild(L),L.setAttribute("selected","selected"));L=document.createElement("option");L.setAttribute("value","diagram");mxUtils.write(L,mxResources.get("diagram"));var c=document.createElement("option");c.setAttribute("value","circle");mxUtils.write(c,mxResources.get("circle"));var d=document.createElement("option"); +d.setAttribute("value","horizontalFlow");mxUtils.write(d,mxResources.get("horizontalFlow"));var g=document.createElement("option");g.setAttribute("value","verticalFlow");mxUtils.write(g,mxResources.get("verticalFlow"));"plantUml"!=k&&(E.appendChild(L),E.appendChild(c),E.appendChild(d),E.appendChild(g));L=document.createElement("option");L.setAttribute("value","plantUmlSvg");mxUtils.write(L,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==k&&L.setAttribute("selected", +"selected");c=document.createElement("option");c.setAttribute("value","plantUmlPng");mxUtils.write(c,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");d=document.createElement("option");d.setAttribute("value","plantUmlTxt");mxUtils.write(d,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==k&&(E.appendChild(L),E.appendChild(c),E.appendChild(d));var q=u();B.value=q;f.appendChild(B);this.init=function(){B.focus()}; +Graph.fileSupport&&(B.addEventListener("dragover",function(m){m.stopPropagation();m.preventDefault()},!1),B.addEventListener("drop",function(m){m.stopPropagation();m.preventDefault();if(0<m.dataTransfer.files.length){m=m.dataTransfer.files[0];var n=new FileReader;n.onload=function(z){B.value=z.target.result};n.readAsText(m)}},!1));f.appendChild(E);mxEvent.addListener(E,"change",function(){var m=u();if(0==B.value.length||B.value==q)q=m,B.value=q});b.isOffline()||"mermaid"!=k&&"plantUml"!=k||(L=mxUtils.button(mxResources.get("help"), +function(){b.openLink("mermaid"==k?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),L.className="geBtn",f.appendChild(L));L=mxUtils.button(mxResources.get("close"),function(){B.value==q?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});L.className="geBtn";b.editor.cancelFirst&&f.appendChild(L);c=mxUtils.button(mxResources.get("insert"),function(m){b.hideDialog();e(B.value,E.value,m)});f.appendChild(c);c.className="geBtn gePrimaryBtn";b.editor.cancelFirst|| +f.appendChild(L);this.container=f},NewDialog=function(b,f,k,e,u,v,B,E,L,c,d,g,q,m,n,z,C,x){function y(ka){null!=ka&&(Ca=Da=ka?135:140);ka=!0;if(null!=na)for(;G<na.length&&(ka||0!=mxUtils.mod(G,30));){var ua=na[G++];ua=t(ua.url,ua.libs,ua.title,ua.tooltip?ua.tooltip:ua.title,ua.select,ua.imgUrl,ua.info,ua.onClick,ua.preview,ua.noImg,ua.clibs);ka&&ua.click();ka=!1}}function I(){if(aa&&null!=m)k||b.hideDialog(),m(aa,Z,J.value);else if(e)k||b.hideDialog(),e(S,J.value,Y,O);else{var ka=J.value;null!=ka&& +0<ka.length&&b.pickFolder(b.mode,function(ua){b.createFile(ka,S,null!=O&&0<O.length?O:null,null,function(){b.hideDialog()},null,ua,null,null!=R&&0<R.length?R:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function N(ka,ua,sa,va,ca,ea,da){null!=X&&(X.style.backgroundColor="transparent",X.style.border="1px solid transparent");T.removeAttribute("disabled");S=ua;O=sa;R=ea;X=ka;aa=va;Y=da;Z=ca;X.style.backgroundColor=E;X.style.border=L}function t(ka,ua,sa,va,ca,ea,da,fa, +ja,ra,oa){function Aa(Ka,Ta){null==Ha?(Ma=Ka,Ma=/^https?:\/\//.test(Ma)&&!b.editor.isCorsEnabledForUrl(Ma)?PROXY_URL+"?url="+encodeURIComponent(Ma):TEMPLATE_PATH+"/"+Ma,mxUtils.get(Ma,mxUtils.bind(this,function(Va){200<=Va.getStatus()&&299>=Va.getStatus()&&(Ha=Va.getText());Ta(Ha,Ma)}))):Ta(Ha,Ma)}function xa(Ka,Ta,Va){if(null!=Ka&&mxUtils.isAncestorNode(document.body,pa)){Ka=mxUtils.parseXml(Ka);Ka=Editor.parseDiagramNode(Ka.documentElement);var Wa=new mxCodec(Ka.ownerDocument),$a=new mxGraphModel; +Wa.decode(Ka,$a);Ka=$a.root.getChildAt(0).children;b.sidebar.createTooltip(pa,Ka,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=sa?mxResources.get(sa,null,sa):null,!0,new mxPoint(Ta,Va),!0,function(){Ua=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;N(pa,null,null,ka,da,oa)},!0,!1)}}function ta(Ka,Ta){null==ka||Ra|| +b.sidebar.currentElt==pa?b.sidebar.hideTooltip():(b.sidebar.hideTooltip(),null!=Ja?(Ta='<mxfile><diagram id="d" name="n">'+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+Ja.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+Ja.naturalWidth+'" height="'+Ja.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>",xa(Ta,mxEvent.getClientX(Ka),mxEvent.getClientY(Ka))):(b.sidebar.currentElt= +pa,Ra=!0,Aa(ka,function(Va){Ra&&b.sidebar.currentElt==pa&&xa(Va,mxEvent.getClientX(Ka),mxEvent.getClientY(Ka));Ra=!1})))}var pa=document.createElement("div");pa.className="geTemplate geAdaptiveAsset";pa.style.position="relative";pa.style.height=Ca+"px";pa.style.width=Da+"px";var Ha=null,Ma=ka;null!=sa?pa.setAttribute("title",mxResources.get(sa,null,sa)):null!=va&&0<va.length&&pa.setAttribute("title",va);var Ra=!1,Ja=null;if(null!=ea){pa.style.display="inline-flex";pa.style.justifyContent="center"; +pa.style.alignItems="center";ca=document.createElement("img");ca.setAttribute("src",ea);ca.setAttribute("alt",va);ca.style.maxWidth=Ca+"px";ca.style.maxHeight=Da+"px";Ja=ca;var Oa=ea.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");pa.appendChild(ca);ca.onerror=function(){this.src!=Oa?this.src=Oa:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(pa,mxUtils.bind(this,function(Ka){N(pa,null,null,ka,da,oa)}),null,null);mxEvent.addListener(pa,"dblclick",function(Ka){I(); +mxEvent.consume(Ka)})}else if(!ra&&null!=ka&&0<ka.length){var Qa=function(Ka){T.setAttribute("disabled","disabled");pa.style.backgroundColor="transparent";pa.style.border="1px solid transparent";P.spin(ba);Aa(ka,function(Ta,Va){P.stop();null!=Ta&&(N(pa,Ta,ua,null,null,oa,Va),Ka&&I())})};ca=ja||TEMPLATE_PATH+"/"+ka.substring(0,ka.length-4)+".png";pa.style.backgroundImage="url("+ca+")";pa.style.backgroundPosition="center center";pa.style.backgroundRepeat="no-repeat";if(null!=sa){va=document.createElement("table"); +va.setAttribute("width","100%");va.setAttribute("height","100%");va.style.background=Editor.isDarkMode()?"transparent":"rgba(255,255,255,0.85)";va.style.lineHeight="1.3em";va.style.border="inherit";ea=document.createElement("tbody");ja=document.createElement("tr");ra=document.createElement("td");ra.setAttribute("align","center");ra.setAttribute("valign","middle");var Na=document.createElement("span");Na.style.display="inline-block";Na.style.padding="4px 8px 4px 8px";Na.style.userSelect="none";Na.style.borderRadius= +"3px";Na.style.background="rgba(255,255,255,0.85)";Na.style.overflow="hidden";Na.style.textOverflow="ellipsis";Na.style.maxWidth=Ca-34+"px";mxUtils.write(Na,mxResources.get(sa,null,sa));ra.appendChild(Na);ja.appendChild(ra);ea.appendChild(ja);va.appendChild(ea);pa.appendChild(va)}mxEvent.addGestureListeners(pa,mxUtils.bind(this,function(Ka){Qa()}),null,null);mxEvent.addListener(pa,"dblclick",function(Ka){Qa(!0);mxEvent.consume(Ka)})}else va=document.createElement("table"),va.setAttribute("width", +"100%"),va.setAttribute("height","100%"),va.style.lineHeight="1.3em",ea=document.createElement("tbody"),ja=document.createElement("tr"),ra=document.createElement("td"),ra.setAttribute("align","center"),ra.setAttribute("valign","middle"),Na=document.createElement("span"),Na.style.display="inline-block",Na.style.padding="4px 8px 4px 8px",Na.style.userSelect="none",Na.style.borderRadius="3px",Na.style.background="#ffffff",Na.style.overflow="hidden",Na.style.textOverflow="ellipsis",Na.style.maxWidth= +Ca-34+"px",mxUtils.write(Na,mxResources.get(sa,null,sa)),ra.appendChild(Na),ja.appendChild(ra),ea.appendChild(ja),va.appendChild(ea),pa.appendChild(va),ca&&N(pa),mxEvent.addGestureListeners(pa,mxUtils.bind(this,function(Ka){N(pa,null,null,ka,da)}),null,null),null!=fa?mxEvent.addListener(pa,"click",fa):(mxEvent.addListener(pa,"click",function(Ka){N(pa,null,null,ka,da)}),mxEvent.addListener(pa,"dblclick",function(Ka){I();mxEvent.consume(Ka)}));if(null!=ka){var Sa=document.createElement("img");Sa.setAttribute("src", +Sidebar.prototype.searchImage);Sa.setAttribute("title",mxResources.get("preview"));Sa.className="geActiveButton";Sa.style.position="absolute";Sa.style.cursor="default";Sa.style.padding="8px";Sa.style.right="0px";Sa.style.top="0px";pa.appendChild(Sa);var Ua=!1;mxEvent.addGestureListeners(Sa,mxUtils.bind(this,function(Ka){Ua=b.sidebar.currentElt==pa}),null,null);mxEvent.addListener(Sa,"click",mxUtils.bind(this,function(Ka){Ua||ta(Ka,Sa);mxEvent.consume(Ka)}))}ba.appendChild(pa);return pa}function p(){function ka(ta, +pa){var Ha=mxResources.get(ta);null==Ha&&(Ha=ta.substring(0,1).toUpperCase()+ta.substring(1));18<Ha.length&&(Ha=Ha.substring(0,18)+"…");return Ha+" ("+pa.length+")"}function ua(ta,pa,Ha){mxEvent.addListener(pa,"click",function(){Ba!=pa&&(Ba.style.backgroundColor="",Ba=pa,Ba.style.backgroundColor=B,ba.scrollTop=0,ba.innerText="",G=0,na=Ha?Pa[ta][Ha]:ya[ta],U=null,y(!1))})}Ia&&(Ia=!1,mxEvent.addListener(ba,"scroll",function(ta){ba.scrollTop+ba.clientHeight>=ba.scrollHeight&&(y(),mxEvent.consume(ta))})); +if(0<Fa){var sa=document.createElement("div");sa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(sa,mxResources.get("custom"));la.appendChild(sa);for(var va in za){var ca=document.createElement("div"),ea=va;sa=za[va];18<ea.length&&(ea=ea.substring(0,18)+"…");ca.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";ca.setAttribute("title", +ea+" ("+sa.length+")");mxUtils.write(ca,ca.getAttribute("title"));null!=c&&(ca.style.padding=c);la.appendChild(ca);(function(ta,pa){mxEvent.addListener(ca,"click",function(){Ba!=pa&&(Ba.style.backgroundColor="",Ba=pa,Ba.style.backgroundColor=B,ba.scrollTop=0,ba.innerText="",G=0,na=za[ta],U=null,y(!1))})})(va,ca)}sa=document.createElement("div");sa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(sa,"draw.io");la.appendChild(sa)}for(va in ya){ea= +Pa[va];var da=ca=document.createElement(ea?"ul":"div");sa=ya[va];var fa=ka(va,sa);if(null!=ea){var ja=document.createElement("li"),ra=document.createElement("div");ra.className="geTempTreeCaret";ra.setAttribute("title",fa);mxUtils.write(ra,fa);da=ra;ja.appendChild(ra);fa=document.createElement("ul");fa.className="geTempTreeNested";fa.style.visibility="hidden";for(var oa in ea){var Aa=document.createElement("li"),xa=ka(oa,ea[oa]);Aa.setAttribute("title",xa);mxUtils.write(Aa,xa);ua(va,Aa,oa);fa.appendChild(Aa)}ja.appendChild(fa); +ca.className="geTempTree";ca.appendChild(ja);(function(ta,pa){mxEvent.addListener(pa,"click",function(){ta.style.visibility="visible";ta.classList.toggle("geTempTreeActive");ta.classList.toggle("geTempTreeNested")&&setTimeout(function(){ta.style.visibility="hidden"},550);pa.classList.toggle("geTempTreeCaret-down")})})(fa,ra)}else ca.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;", +ca.setAttribute("title",fa),mxUtils.write(ca,fa);null!=c&&(ca.style.padding=c);la.appendChild(ca);null==Ba&&0<sa.length&&(Ba=ca,Ba.style.backgroundColor=B,na=sa);ua(va,da)}y(!1)}var F=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);k=null!=k?k:!0;u=null!=u?u:!1;B=null!=B?B:"#ebf2f9";E=null!=E?E:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";L=null!=L?L:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";d=null!=d?d:EditorUi.templateFile;var K=document.createElement("div"); +K.style.userSelect="none";K.style.height="100%";var D=document.createElement("div");D.style.whiteSpace="nowrap";D.style.height="46px";k&&K.appendChild(D);var H=document.createElement("img");H.setAttribute("border","0");H.setAttribute("align","absmiddle");H.style.width="40px";H.style.height="40px";H.style.marginRight="10px";H.style.paddingBottom="4px";H.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE? +IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";f||F||!k||D.appendChild(H);k&&mxUtils.write(D,(F?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");H=".drawio"; +b.mode==App.MODE_GOOGLE&&null!=b.drive?H=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?H=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?H=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?H=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?H=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(H=b.trello.extension);var J=document.createElement("input");J.setAttribute("value",b.defaultFilename+H);J.style.marginLeft="10px";J.style.width=f|| +F?"144px":"244px";this.init=function(){k&&(J.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?J.select():document.execCommand("selectAll",!1,null));null!=ba.parentNode&&null!=ba.parentNode.parentNode&&mxEvent.addGestureListeners(ba.parentNode.parentNode,mxUtils.bind(this,function(ka){b.sidebar.hideTooltip()}),null,null)};k&&(D.appendChild(J),x?J.style.width=f||F?"350px":"450px":(null!=b.editor.diagramFileTypes&&(x=FilenameDialog.createFileTypes(b,J,b.editor.diagramFileTypes),x.style.marginLeft= +"6px",x.style.width=f||F?"80px":"180px",D.appendChild(x)),null!=b.editor.fileExtensions&&(F=FilenameDialog.createTypeHint(b,J,b.editor.fileExtensions),F.style.marginTop="12px",D.appendChild(F))));D=!1;var G=0,P=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),T=mxUtils.button(z||mxResources.get("create"),function(){T.setAttribute("disabled","disabled");I();T.removeAttribute("disabled")});T.className="geBtn gePrimaryBtn"; +if(g||q){var W=[],U=null,V=null,l=null,A=function(ka){T.setAttribute("disabled","disabled");for(var ua=0;ua<W.length;ua++)W[ua].className=ua==ka?"geBtn gePrimaryBtn":"geBtn"};D=!0;z=document.createElement("div");z.style.whiteSpace="nowrap";z.style.height="30px";K.appendChild(z);F=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){la.style.display="";ha.style.display="";ba.style.left="160px";A(0);ba.scrollTop=0;ba.innerText="";G=0;U!=na&&(na=U,ya=V,Fa=l,la.innerText="",p(),U=null)}); +W.push(F);z.appendChild(F);var M=function(ka){la.style.display="none";ha.style.display="none";ba.style.left="30px";A(ka?-1:1);null==U&&(U=na);ba.scrollTop=0;ba.innerText="";P.spin(ba);var ua=function(sa,va,ca){G=0;P.stop();na=sa;ca=ca||{};var ea=0,da;for(da in ca)ea+=ca[da].length;if(va)ba.innerText=va;else if(0==sa.length&&0==ea)ba.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(ba.innerText="",0<ea){la.style.display="";ba.style.left="160px";la.innerText="";Fa=0;ya={"draw.io":sa}; +for(da in ca)ya[da]=ca[da];p()}else y(!0)};ka?q(Q.value,ua):g(ua)};g&&(F=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){M()}),z.appendChild(F),W.push(F));if(q){F=document.createElement("span");F.style.marginLeft="10px";F.innerText=mxResources.get("search")+":";z.appendChild(F);var Q=document.createElement("input");Q.style.marginRight="10px";Q.style.marginLeft="10px";Q.style.width="220px";mxEvent.addListener(Q,"keypress",function(ka){13==ka.keyCode&&M(!0)});z.appendChild(Q);F=mxUtils.button(mxResources.get("search"), +function(){M(!0)});F.className="geBtn";z.appendChild(F)}A(0)}var O=null,R=null,S=null,X=null,aa=null,Y=null,Z=null,ba=document.createElement("div");ba.style.border="1px solid #d3d3d3";ba.style.position="absolute";ba.style.left="160px";ba.style.right="34px";z=(k?72:40)+(D?30:0);ba.style.top=z+"px";ba.style.bottom="68px";ba.style.margin="6px 0 0 -1px";ba.style.padding="6px";ba.style.overflow="auto";var ha=document.createElement("div");ha.style.cssText="position:absolute;left:30px;width:128px;top:"+ +z+"px;height:22px;margin-top: 6px;white-space: nowrap";var ma=document.createElement("input");ma.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";ma.setAttribute("placeholder",mxResources.get("search"));ma.setAttribute("type","text");ha.appendChild(ma);var ia=document.createElement("img"),qa="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";ia.setAttribute("src",qa);ia.setAttribute("title",mxResources.get("search")); +ia.style.position="relative";ia.style.left="-18px";ia.style.top="1px";ia.style.background="url('"+b.editor.transparentImage+"')";ha.appendChild(ia);mxEvent.addListener(ia,"click",function(){ia.getAttribute("src")==Dialog.prototype.closeImage&&(ia.setAttribute("src",qa),ia.setAttribute("title",mxResources.get("search")),ma.value="",null!=Ga&&(Ga.click(),Ga=null));ma.focus()});mxEvent.addListener(ma,"keydown",mxUtils.bind(this,function(ka){if(13==ka.keyCode){var ua=ma.value;if(""==ua)null!=Ga&&(Ga.click(), +Ga=null);else{if(null==NewDialog.tagsList[d]){var sa={};for(oa in ya)for(var va=ya[oa],ca=0;ca<va.length;ca++){var ea=va[ca];if(null!=ea.tags)for(var da=ea.tags.toLowerCase().split(";"),fa=0;fa<da.length;fa++)null==sa[da[fa]]&&(sa[da[fa]]=[]),sa[da[fa]].push(ea)}NewDialog.tagsList[d]=sa}var ja=ua.toLowerCase().split(" ");sa=NewDialog.tagsList[d];if(0<Fa&&null==sa.__tagsList__){for(oa in za)for(va=za[oa],ca=0;ca<va.length;ca++)for(ea=va[ca],da=ea.title.split(" "),da.push(oa),fa=0;fa<da.length;fa++){var ra= +da[fa].toLowerCase();null==sa[ra]&&(sa[ra]=[]);sa[ra].push(ea)}sa.__tagsList__=!0}var oa=[];va={};for(ca=da=0;ca<ja.length;ca++)if(0<ja[ca].length){ra=sa[ja[ca]];var Aa={};oa=[];if(null!=ra)for(fa=0;fa<ra.length;fa++)ea=ra[fa],0==da==(null==va[ea.url])&&(Aa[ea.url]=!0,oa.push(ea));va=Aa;da++}ba.scrollTop=0;ba.innerText="";G=0;sa=document.createElement("div");sa.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";mxUtils.write(sa,mxResources.get(0==oa.length?"noResultsFor": +"resultsFor",[ua]));ba.appendChild(sa);null!=Ba&&null==Ga&&(Ba.style.backgroundColor="",Ga=Ba,Ba=sa);na=oa;U=null;y(!1)}mxEvent.consume(ka)}}));mxEvent.addListener(ma,"keyup",mxUtils.bind(this,function(ka){""==ma.value?(ia.setAttribute("src",qa),ia.setAttribute("title",mxResources.get("search"))):(ia.setAttribute("src",Dialog.prototype.closeImage),ia.setAttribute("title",mxResources.get("reset")))}));z+=23;var la=document.createElement("div");la.style.cssText="position:absolute;left:30px;width:128px;top:"+ +z+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(ba,"scroll",function(){b.sidebar.hideTooltip()});var Ca=140,Da=140,ya={},Pa={},za={},Fa=0,Ia=!0,Ba=null,Ga=null;ya.basic=[{title:"blankDiagram",select:!0}];var na=ya.basic;if(!f){var Ea=function(){mxUtils.get(La,function(ka){if(!wa){wa=!0;ka=ka.getXml().documentElement.firstChild;for(var ua={};null!=ka;){if("undefined"!==typeof ka.getAttribute)if("clibs"==ka.nodeName){for(var sa=ka.getAttribute("name"),va= +ka.getElementsByTagName("add"),ca=[],ea=0;ea<va.length;ea++)ca.push(encodeURIComponent(mxUtils.getTextContent(va[ea])));null!=sa&&0<ca.length&&(ua[sa]=ca.join(";"))}else if(ca=ka.getAttribute("url"),null!=ca){va=ka.getAttribute("section");sa=ka.getAttribute("subsection");if(null==va&&(ea=ca.indexOf("/"),va=ca.substring(0,ea),null==sa)){var da=ca.indexOf("/",ea+1);-1<da&&(sa=ca.substring(ea+1,da))}ea=ya[va];null==ea&&(ea=[],ya[va]=ea);ca=ka.getAttribute("clibs");null!=ua[ca]&&(ca=ua[ca]);ca={url:ka.getAttribute("url"), +libs:ka.getAttribute("libs"),title:ka.getAttribute("title"),tooltip:ka.getAttribute("name")||ka.getAttribute("url"),preview:ka.getAttribute("preview"),clibs:ca,tags:ka.getAttribute("tags")};ea.push(ca);null!=sa&&(ea=Pa[va],null==ea&&(ea={},Pa[va]=ea),va=ea[sa],null==va&&(va=[],ea[sa]=va),va.push(ca))}ka=ka.nextSibling}P.stop();p()}})};K.appendChild(ha);K.appendChild(la);K.appendChild(ba);var wa=!1,La=d;/^https?:\/\//.test(La)&&!b.editor.isCorsEnabledForUrl(La)&&(La=PROXY_URL+"?url="+encodeURIComponent(La)); +P.spin(ba);null!=C?C(function(ka,ua){za=ka;l=Fa=ua;Ea()},Ea):Ea();V=ya}mxEvent.addListener(J,"keypress",function(ka){b.dialog.container.firstChild==K&&13==ka.keyCode&&I()});C=document.createElement("div");C.style.marginTop=f?"4px":"16px";C.style.textAlign="right";C.style.position="absolute";C.style.left="40px";C.style.bottom="24px";C.style.right="40px";f||b.isOffline()||!k||null!=e||u||(z=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}), +z.className="geBtn",C.appendChild(z));z=mxUtils.button(mxResources.get("cancel"),function(){null!=v&&v();b.hideDialog(!0)});z.className="geBtn";!b.editor.cancelFirst||u&&null==v||C.appendChild(z);f||"1"==urlParams.embed||u||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(f=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var ka=new FilenameDialog(b,"",mxResources.get("create"),function(ua){null!=ua&&0<ua.length&&b.editor.loadUrl(b.editor.getProxiedUrl(ua),function(sa){S= +sa;O=null;templateRealURl=ua;b.hideDialog();I()},function(sa){b.handleError(sa)})},mxResources.get("url"),null,null,null,!1);b.showDialog(ka.container,300,80,!0,!0);ka.init()}),f.className="geBtn",C.appendChild(f));Graph.fileSupport&&n&&(n=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var ka=document.createElement("input");ka.setAttribute("multiple","multiple");ka.setAttribute("type","file");mxEvent.addListener(ka,"change",function(ua){b.openFiles(ka.files,!0); +ka.value=""});ka.style.display="none";document.body.appendChild(ka);b.newDlgFileInputElt=ka}b.newDlgFileInputElt.click()}),n.className="geBtn",C.appendChild(n));C.appendChild(T);b.editor.cancelFirst||null!=e||u&&null==v||C.appendChild(z);K.appendChild(C);this.container=K};NewDialog.tagsList={}; +var CreateDialog=function(b,f,k,e,u,v,B,E,L,c,d,g,q,m,n,z,C){function x(D,H,J,G){function P(){mxEvent.addListener(T,"click",function(){var A=J;if(B){var M=N.value,Q=M.lastIndexOf(".");if(0>f.lastIndexOf(".")&&0>Q){A=null!=A?A:K.value;var O="";A==App.MODE_GOOGLE?O=b.drive.extension:A==App.MODE_GITHUB?O=b.gitHub.extension:A==App.MODE_GITLAB?O=b.gitLab.extension:A==App.MODE_TRELLO?O=b.trello.extension:A==App.MODE_DROPBOX?O=b.dropbox.extension:A==App.MODE_ONEDRIVE?O=b.oneDrive.extension:A==App.MODE_DEVICE&& +(O=".drawio");0<=Q&&(M=M.substring(0,Q));N.value=M+O}}y(J)})}var T=document.createElement("a");T.style.overflow="hidden";var W=document.createElement("img");W.src=D;W.setAttribute("border","0");W.setAttribute("align","absmiddle");W.style.width="60px";W.style.height="60px";W.style.paddingBottom="6px";T.style.display="inline-block";T.className="geBaseButton";T.style.position="relative";T.style.margin="4px";T.style.padding="8px 8px 10px 8px";T.style.whiteSpace="nowrap";T.appendChild(W);T.style.color= +"gray";T.style.fontSize="11px";var U=document.createElement("div");T.appendChild(U);mxUtils.write(U,H);if(null!=G&&null==b[G]){W.style.visibility="hidden";mxUtils.setOpacity(U,10);var V=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});V.spin(T);var l=window.setTimeout(function(){null==b[G]&&(V.stop(),T.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[G]&&(window.clearTimeout(l), +mxUtils.setOpacity(U,100),W.style.visibility="",V.stop(),P())}))}else P();p.appendChild(T);++F==g&&(mxUtils.br(p),F=0)}function y(D){var H=N.value;if(null==D||null!=H&&0<H.length)C&&b.hideDialog(),k(H,D,N)}d="1"==urlParams.noDevice?!1:d;B=null!=B?B:!0;E=null!=E?E:!0;g=null!=g?g:4;C=null!=C?C:!0;v=document.createElement("div");v.style.whiteSpace="nowrap";null==e&&b.addLanguageMenu(v);var I=document.createElement("h2");mxUtils.write(I,u||mxResources.get("create"));I.style.marginTop="0px";I.style.marginBottom= +"24px";v.appendChild(I);mxUtils.write(v,mxResources.get("filename")+":");var N=document.createElement("input");N.setAttribute("value",f);N.style.width="200px";N.style.marginLeft="10px";N.style.marginBottom="20px";N.style.maxWidth="70%";this.init=function(){N.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?N.select():document.execCommand("selectAll",!1,null)};v.appendChild(N);null!=z&&(null!=b.editor.diagramFileTypes&&(u=FilenameDialog.createFileTypes(b,N,b.editor.diagramFileTypes), +u.style.marginLeft="6px",u.style.width="90px",v.appendChild(u)),v.appendChild(FilenameDialog.createTypeHint(b,N,z)));z=null;if("1"!=urlParams.noDevice&&null!=q&&null!=m&&"image/"==m.substring(0,6)&&("image/svg"!=m.substring(0,9)||mxClient.IS_SVG)){N.style.width="160px";u=document.createElement("img");var t=n?q:btoa(unescape(encodeURIComponent(q)));u.setAttribute("src","data:"+m+";base64,"+t);u.style.position="absolute";u.style.top="70px";u.style.right="100px";u.style.maxWidth="120px";u.style.maxHeight= +"80px";mxUtils.setPrefixedStyle(u.style,"transform","translate(50%,-50%)");v.appendChild(u);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=m||(z=mxUtils.button(mxResources.get("copy"),function(D){D=b.base64ToBlob(t,"image/png");D=new ClipboardItem({"image/png":D,"text/html":new Blob(['<img src="data:'+m+";base64,"+t+'">'],{type:"text/html"})});navigator.clipboard.write([D]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(H){b.handleError(H)}))}), +z.style.marginTop="6px",z.className="geBtn");L&&Editor.popupsAllowed&&(u.style.cursor="pointer",mxEvent.addGestureListeners(u,null,null,function(D){mxEvent.isPopupTrigger(D)||y("_blank")}))}mxUtils.br(v);var p=document.createElement("div");p.style.textAlign="center";var F=0;p.style.marginTop="6px";v.appendChild(p);var K=document.createElement("select");K.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(q=document.createElement("option"),q.setAttribute("value", +App.MODE_GOOGLE),mxUtils.write(q,mxResources.get("googleDrive")),K.appendChild(q),x(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(q,mxResources.get("oneDrive")),K.appendChild(q),b.mode==App.MODE_ONEDRIVE&&q.setAttribute("selected","selected"),x(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE, +"oneDrive")),"function"===typeof window.DropboxClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(q,mxResources.get("dropbox")),K.appendChild(q),b.mode==App.MODE_DROPBOX&&q.setAttribute("selected","selected"),x(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_GITHUB),mxUtils.write(q,mxResources.get("github")),K.appendChild(q),x(IMAGE_PATH+ +"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_GITLAB),mxUtils.write(q,mxResources.get("gitlab")),K.appendChild(q),x(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_TRELLO),mxUtils.write(q,mxResources.get("trello")),K.appendChild(q),x(IMAGE_PATH+"/trello-logo.svg", +mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)q=document.createElement("option"),q.setAttribute("value",App.MODE_DEVICE),mxUtils.write(q,mxResources.get("device")),K.appendChild(q),b.mode!=App.MODE_DEVICE&&E||q.setAttribute("selected","selected"),d&&x(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);E&&isLocalStorage&&"0"!=urlParams.browser&&(E=document.createElement("option"), +E.setAttribute("value",App.MODE_BROWSER),mxUtils.write(E,mxResources.get("browser")),K.appendChild(E),b.mode==App.MODE_BROWSER&&E.setAttribute("selected","selected"),x(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));E=document.createElement("div");E.style.marginTop="26px";E.style.textAlign="center";null!=c&&(d=mxUtils.button(mxResources.get("help"),function(){b.openLink(c)}),d.className="geBtn",E.appendChild(d));d=mxUtils.button(mxResources.get(null!=e?"close":"cancel"), +function(){null!=e?e():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});d.className="geBtn";b.editor.cancelFirst&&null==e&&E.appendChild(d);null==e&&(q=mxUtils.button(mxResources.get("decideLater"),function(){y(null)}),q.className="geBtn",E.appendChild(q));L&&Editor.popupsAllowed&&(L=mxUtils.button(mxResources.get("openInNewWindow"),function(){y("_blank")}),L.className="geBtn",E.appendChild(L));CreateDialog.showDownloadButton&&(L=mxUtils.button(mxResources.get("download"), +function(){y("download")}),L.className="geBtn",E.appendChild(L),null!=z&&(L.style.marginTop="6px",E.style.marginTop="6px"));null!=z&&(mxUtils.br(E),E.appendChild(z));b.editor.cancelFirst&&null==e||E.appendChild(d);mxEvent.addListener(N,"keypress",function(D){13==D.keyCode?y(App.MODE_DEVICE):27==D.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});v.appendChild(E);this.container=v};CreateDialog.showDownloadButton="1"!=urlParams.noDevice; +var PopupDialog=function(b,f,k,e,u){u=null!=u?u:!0;var v=document.createElement("div");v.style.textAlign="left";v.style.height="100%";mxUtils.write(v,mxResources.get("fileOpenLocation"));mxUtils.br(v);mxUtils.br(v);var B=mxUtils.button(mxResources.get("openInThisWindow"),function(){u&&b.hideDialog();null!=e&&e()});B.className="geBtn";B.style.marginBottom="8px";B.style.width="280px";v.appendChild(B);mxUtils.br(v);var E=mxUtils.button(mxResources.get("openInNewWindow"),function(){u&&b.hideDialog(); +null!=k&&k();b.openLink(f,null,!0)});E.className="geBtn gePrimaryBtn";E.style.width=B.style.width;v.appendChild(E);mxUtils.br(v);mxUtils.br(v);mxUtils.write(v,mxResources.get("allowPopups"));this.container=v},ImageDialog=function(b,f,k,e,u,v,B,E){function L(){0<g.value.length?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")}v=null!=v?v:!0;var c=b.editor.graph,d=document.createElement("div");mxUtils.write(d,f);f=document.createElement("div");f.className="geTitle";f.style.backgroundColor= "transparent";f.style.borderColor="transparent";f.style.whiteSpace="nowrap";f.style.textOverflow="clip";f.style.cursor="default";f.style.paddingRight="20px";var g=document.createElement("input");g.setAttribute("value",k);g.setAttribute("type","text");g.setAttribute("spellcheck","false");g.setAttribute("autocorrect","off");g.setAttribute("autocomplete","off");g.setAttribute("autocapitalize","off");g.style.marginTop="6px";g.style.width=(Graph.fileSupport?460:340)-20+"px";g.style.backgroundImage="url('"+ Dialog.prototype.clearImage+"')";g.style.backgroundRepeat="no-repeat";g.style.backgroundPosition="100% 50%";g.style.paddingRight="14px";k=document.createElement("div");k.setAttribute("title",mxResources.get("reset"));k.style.position="relative";k.style.left="-16px";k.style.width="12px";k.style.height="14px";k.style.cursor="pointer";k.style.display="inline-block";k.style.top="3px";k.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(k,"click",function(){g.value="";g.focus()}); -f.appendChild(g);f.appendChild(k);e.appendChild(f);var q=D,m,n,z=function(I,N,t,p){var F="data:"==I.substring(0,5);!b.isOffline()||F&&"undefined"===typeof chrome?0<I.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(I,function(J){b.spinner.stop();b.hideDialog();var M=!1===p?1:null!=N&&null!=t?Math.max(N/J.width,t/J.height):Math.min(1,Math.min(520/J.width,520/J.height));x&&(I=b.convertDataUri(I));d(I,Math.round(Number(J.width)*M),Math.round(Number(J.height)*M),q,m,n)}, -function(){b.spinner.stop();d(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),d(I,null,null,q,m,n)):(I=b.convertDataUri(I),N=null==N?120:N,t=null==t?100:t,b.hideDialog(),d(I,N,t,q,m,n))},C=function(I,N){if(null!=I){var t=u?null:c.getModel().getGeometry(c.getSelectionCell());null!=t?z(I,t.width,t.height,N):z(I,null,null,N)}else b.hideDialog(),d(null)};this.init=function(){g.focus();if(Graph.fileSupport){g.setAttribute("placeholder", -mxResources.get("dragImagesHere"));var I=e.parentNode,N=null;mxEvent.addListener(I,"dragleave",function(t){null!=N&&(N.parentNode.removeChild(N),N=null);t.stopPropagation();t.preventDefault()});mxEvent.addListener(I,"dragover",mxUtils.bind(this,function(t){null==N&&(!mxClient.IS_IE||10<document.documentMode)&&(N=b.highlightElement(I));t.stopPropagation();t.preventDefault()}));mxEvent.addListener(I,"drop",mxUtils.bind(this,function(t){null!=N&&(N.parentNode.removeChild(N),N=null);if(0<t.dataTransfer.files.length)b.importFiles(t.dataTransfer.files, -0,0,b.maxImageSize,function(F,J,M,H,G,E,P,T){C(F,T)},function(){},function(F){return"image/"==F.type.substring(0,6)},function(F){for(var J=0;J<F.length;J++)F[J]()},!mxEvent.isControlDown(t),null,null,!0);else if(0<=mxUtils.indexOf(t.dataTransfer.types,"text/uri-list")){var p=t.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(p)&&C(decodeURIComponent(p))}t.stopPropagation();t.preventDefault()}),!1)}};D=document.createElement("div");D.style.marginTop="14px";D.style.textAlign= -"center";k=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});k.className="geBtn";b.editor.cancelFirst&&D.appendChild(k);ImageDialog.filePicked=function(I){I.action==google.picker.Action.PICKED&&null!=I.docs[0].thumbnails&&(I=I.docs[0].thumbnails[I.docs[0].thumbnails.length-1],null!=I&&(g.value=I.url));g.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var v=document.createElement("input");v.setAttribute("multiple","multiple");v.setAttribute("type", -"file");mxEvent.addListener(v,"change",function(I){null!=v.files&&(b.importFiles(v.files,0,0,b.maxImageSize,function(N,t,p,F,J,M){C(N)},function(){},function(N){return"image/"==N.type.substring(0,6)},function(N){for(var t=0;t<N.length;t++)N[t]()},!0),v.type="",v.type="file",v.value="")});v.style.display="none";document.body.appendChild(v);b.imgDlgFileInputElt=v}f=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});f.className="geBtn";D.appendChild(f)}mxEvent.addListener(g, -"keypress",function(I){13==I.keyCode&&C(g.value)});var y=mxUtils.button(mxResources.get("crop"),function(){var I=new CropImageDialog(b,g.value,q,function(N,t,p){q=N;m=t;n=p});b.showDialog(I.container,300,390,!0,!0)});B&&(y.className="geBtn",D.appendChild(y));mxEvent.addListener(g,"change",function(I){q=null;K()});K();B=mxUtils.button(mxResources.get("apply"),function(){C(g.value)});B.className="geBtn gePrimaryBtn";D.appendChild(B);b.editor.cancelFirst||D.appendChild(k);Graph.fileSupport&&(D.style.marginTop= -"120px",e.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",e.style.backgroundPosition="center 65%",e.style.backgroundRepeat="no-repeat",B=document.createElement("div"),B.style.position="absolute",B.style.width="420px",B.style.top="58%",B.style.textAlign="center",B.style.fontSize="18px",B.style.color="#a0c3ff",mxUtils.write(B,mxResources.get("dragImagesHere")),e.appendChild(B));e.appendChild(D);this.container=e},LinkDialog=function(b,f,k,d,u,x,B){function D(I,N,t){t=mxUtils.button("",t); -t.className="geBtn";t.setAttribute("title",N);N=document.createElement("img");N.style.height="26px";N.style.width="26px";N.setAttribute("src",I);t.style.minWidth="42px";t.style.verticalAlign="middle";t.appendChild(N);y.appendChild(t)}var K=document.createElement("div");K.style.height="100%";mxUtils.write(K,mxResources.get("editLink")+":");var c=document.createElement("div");c.className="geTitle";c.style.backgroundColor="transparent";c.style.borderColor="transparent";c.style.whiteSpace="nowrap";c.style.textOverflow= -"clip";c.style.cursor="default";c.style.paddingRight="20px";var e=document.createElement("input");e.setAttribute("placeholder",mxResources.get("dragUrlsHere"));e.setAttribute("type","text");e.style.marginTop="6px";e.style.width="97%";e.style.boxSizing="border-box";e.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";e.style.backgroundRepeat="no-repeat";e.style.backgroundPosition="100% 50%";e.style.paddingRight="14px";e.style.marginBottom="4px";var g=document.createElement("div");g.setAttribute("title", -mxResources.get("reset"));g.style.position="relative";g.style.left="-16px";g.style.width="12px";g.style.height="14px";g.style.cursor="pointer";g.style.display="inline-block";g.style.top="3px";g.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(g,"click",function(){e.value="";e.focus()});var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","url");q.setAttribute("type","radio");q.setAttribute("name","geLinkDialogOption"); -var m=document.createElement("input");m.style.cssText="margin-right:8px;margin-bottom:8px;";m.setAttribute("value","url");m.setAttribute("type","radio");m.setAttribute("name","geLinkDialogOption");var n=document.createElement("select");n.style.width="520px";var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.margin="0 6p 0 6px";null!=B&&(z.setAttribute("checked","checked"),z.defaultChecked=!0);B=null!=B?B:"_blank";z.setAttribute("title",B);x&&(e.style.width="340px");if(u&& -null!=b.pages){null!=f&&Graph.isPageLink(f)?(m.setAttribute("checked","checked"),m.defaultChecked=!0):(e.setAttribute("value",f),q.setAttribute("checked","checked"),q.defaultChecked=!0);c.appendChild(q);c.appendChild(e);c.appendChild(g);x&&(c.appendChild(z),mxUtils.write(c,mxResources.get("openInNewWindow")));mxUtils.br(c);c.appendChild(m);u=!1;for(x=0;x<b.pages.length;x++)g=document.createElement("option"),mxUtils.write(g,b.pages[x].getName()||mxResources.get("pageWithNumber",[x+1])),g.setAttribute("value", -"data:page/id,"+b.pages[x].getId()),f==g.getAttribute("value")&&(g.setAttribute("selected","selected"),u=!0),n.appendChild(g);if(!u&&m.checked){var C=document.createElement("option");mxUtils.write(C,mxResources.get("pageNotFound"));C.setAttribute("disabled","disabled");C.setAttribute("selected","selected");C.setAttribute("value","pageNotFound");n.appendChild(C);mxEvent.addListener(n,"change",function(){null==C.parentNode||C.selected||C.parentNode.removeChild(C)})}c.appendChild(n)}else e.setAttribute("value", -f),c.appendChild(e),c.appendChild(g);K.appendChild(c);var v=mxUtils.button(k,function(){b.hideDialog();d(m.checked?"pageNotFound"!==n.value?n.value:f:e.value,LinkDialog.selectedDocs,z.checked?B:null)});v.style.verticalAlign="middle";v.className="geBtn gePrimaryBtn";this.init=function(){m.checked?n.focus():(e.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?e.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(n,"focus",function(){q.removeAttribute("checked");m.setAttribute("checked", -"checked");m.checked=!0});mxEvent.addListener(e,"focus",function(){m.removeAttribute("checked");q.setAttribute("checked","checked");q.checked=!0});if(Graph.fileSupport){var I=K.parentNode,N=null;mxEvent.addListener(I,"dragleave",function(t){null!=N&&(N.parentNode.removeChild(N),N=null);t.stopPropagation();t.preventDefault()});mxEvent.addListener(I,"dragover",mxUtils.bind(this,function(t){null==N&&(!mxClient.IS_IE||10<document.documentMode)&&(N=b.highlightElement(I));t.stopPropagation();t.preventDefault()})); -mxEvent.addListener(I,"drop",mxUtils.bind(this,function(t){null!=N&&(N.parentNode.removeChild(N),N=null);0<=mxUtils.indexOf(t.dataTransfer.types,"text/uri-list")&&(e.value=decodeURIComponent(t.dataTransfer.getData("text/uri-list")),q.setAttribute("checked","checked"),q.checked=!0,v.click());t.stopPropagation();t.preventDefault()}),!1)}};var y=document.createElement("div");y.style.marginTop="18px";y.style.textAlign="center";k=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/custom-links")}); +f.appendChild(g);f.appendChild(k);d.appendChild(f);var q=E,m,n,z=function(I,N,t,p){var F="data:"==I.substring(0,5);!b.isOffline()||F&&"undefined"===typeof chrome?0<I.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(I,function(K){b.spinner.stop();b.hideDialog();var D=!1===p?1:null!=N&&null!=t?Math.max(N/K.width,t/K.height):Math.min(1,Math.min(520/K.width,520/K.height));v&&(I=b.convertDataUri(I));e(I,Math.round(Number(K.width)*D),Math.round(Number(K.height)*D),q,m,n)}, +function(){b.spinner.stop();e(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),e(I,null,null,q,m,n)):(I=b.convertDataUri(I),N=null==N?120:N,t=null==t?100:t,b.hideDialog(),e(I,N,t,q,m,n))},C=function(I,N){if(null!=I){var t=u?null:c.getModel().getGeometry(c.getSelectionCell());null!=t?z(I,t.width,t.height,N):z(I,null,null,N)}else b.hideDialog(),e(null)};this.init=function(){g.focus();if(Graph.fileSupport){g.setAttribute("placeholder", +mxResources.get("dragImagesHere"));var I=d.parentNode,N=null;mxEvent.addListener(I,"dragleave",function(t){null!=N&&(N.parentNode.removeChild(N),N=null);t.stopPropagation();t.preventDefault()});mxEvent.addListener(I,"dragover",mxUtils.bind(this,function(t){null==N&&(!mxClient.IS_IE||10<document.documentMode)&&(N=b.highlightElement(I));t.stopPropagation();t.preventDefault()}));mxEvent.addListener(I,"drop",mxUtils.bind(this,function(t){null!=N&&(N.parentNode.removeChild(N),N=null);if(0<t.dataTransfer.files.length)b.importFiles(t.dataTransfer.files, +0,0,b.maxImageSize,function(F,K,D,H,J,G,P,T){C(F,T)},function(){},function(F){return"image/"==F.type.substring(0,6)},function(F){for(var K=0;K<F.length;K++)F[K]()},!mxEvent.isControlDown(t),null,null,!0);else if(0<=mxUtils.indexOf(t.dataTransfer.types,"text/uri-list")){var p=t.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(p)&&C(decodeURIComponent(p))}t.stopPropagation();t.preventDefault()}),!1)}};E=document.createElement("div");E.style.marginTop="14px";E.style.textAlign= +"center";k=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});k.className="geBtn";b.editor.cancelFirst&&E.appendChild(k);ImageDialog.filePicked=function(I){I.action==google.picker.Action.PICKED&&null!=I.docs[0].thumbnails&&(I=I.docs[0].thumbnails[I.docs[0].thumbnails.length-1],null!=I&&(g.value=I.url));g.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var x=document.createElement("input");x.setAttribute("multiple","multiple");x.setAttribute("type", +"file");mxEvent.addListener(x,"change",function(I){null!=x.files&&(b.importFiles(x.files,0,0,b.maxImageSize,function(N,t,p,F,K,D){C(N)},function(){},function(N){return"image/"==N.type.substring(0,6)},function(N){for(var t=0;t<N.length;t++)N[t]()},!0),x.type="",x.type="file",x.value="")});x.style.display="none";document.body.appendChild(x);b.imgDlgFileInputElt=x}f=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});f.className="geBtn";E.appendChild(f)}mxEvent.addListener(g, +"keypress",function(I){13==I.keyCode&&C(g.value)});var y=mxUtils.button(mxResources.get("crop"),function(){var I=new CropImageDialog(b,g.value,q,function(N,t,p){q=N;m=t;n=p});b.showDialog(I.container,300,390,!0,!0)});B&&(y.className="geBtn",E.appendChild(y));mxEvent.addListener(g,"change",function(I){q=null;L()});L();B=mxUtils.button(mxResources.get("apply"),function(){C(g.value)});B.className="geBtn gePrimaryBtn";E.appendChild(B);b.editor.cancelFirst||E.appendChild(k);Graph.fileSupport&&(E.style.marginTop= +"120px",d.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",d.style.backgroundPosition="center 65%",d.style.backgroundRepeat="no-repeat",B=document.createElement("div"),B.style.position="absolute",B.style.width="420px",B.style.top="58%",B.style.textAlign="center",B.style.fontSize="18px",B.style.color="#a0c3ff",mxUtils.write(B,mxResources.get("dragImagesHere")),d.appendChild(B));d.appendChild(E);this.container=d},LinkDialog=function(b,f,k,e,u,v,B){function E(I,N,t){t=mxUtils.button("",t); +t.className="geBtn";t.setAttribute("title",N);N=document.createElement("img");N.style.height="26px";N.style.width="26px";N.setAttribute("src",I);t.style.minWidth="42px";t.style.verticalAlign="middle";t.appendChild(N);y.appendChild(t)}var L=document.createElement("div");L.style.height="100%";mxUtils.write(L,mxResources.get("editLink")+":");var c=document.createElement("div");c.className="geTitle";c.style.backgroundColor="transparent";c.style.borderColor="transparent";c.style.whiteSpace="nowrap";c.style.textOverflow= +"clip";c.style.cursor="default";c.style.paddingRight="20px";var d=document.createElement("input");d.setAttribute("placeholder",mxResources.get("dragUrlsHere"));d.setAttribute("type","text");d.style.marginTop="6px";d.style.width="97%";d.style.boxSizing="border-box";d.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";d.style.backgroundRepeat="no-repeat";d.style.backgroundPosition="100% 50%";d.style.paddingRight="14px";d.style.marginBottom="4px";var g=document.createElement("div");g.setAttribute("title", +mxResources.get("reset"));g.style.position="relative";g.style.left="-16px";g.style.width="12px";g.style.height="14px";g.style.cursor="pointer";g.style.display="inline-block";g.style.top="3px";g.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(g,"click",function(){d.value="";d.focus()});var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","url");q.setAttribute("type","radio");q.setAttribute("name","geLinkDialogOption"); +var m=document.createElement("input");m.style.cssText="margin-right:8px;margin-bottom:8px;";m.setAttribute("value","url");m.setAttribute("type","radio");m.setAttribute("name","geLinkDialogOption");var n=document.createElement("select");n.style.width="520px";var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.margin="0 6p 0 6px";null!=B&&(z.setAttribute("checked","checked"),z.defaultChecked=!0);B=null!=B?B:"_blank";z.setAttribute("title",B);v&&(d.style.width="340px");if(u&& +null!=b.pages){null!=f&&Graph.isPageLink(f)?(m.setAttribute("checked","checked"),m.defaultChecked=!0):(d.setAttribute("value",f),q.setAttribute("checked","checked"),q.defaultChecked=!0);c.appendChild(q);c.appendChild(d);c.appendChild(g);v&&(c.appendChild(z),mxUtils.write(c,mxResources.get("openInNewWindow")));mxUtils.br(c);c.appendChild(m);u=!1;for(v=0;v<b.pages.length;v++)g=document.createElement("option"),mxUtils.write(g,b.pages[v].getName()||mxResources.get("pageWithNumber",[v+1])),g.setAttribute("value", +"data:page/id,"+b.pages[v].getId()),f==g.getAttribute("value")&&(g.setAttribute("selected","selected"),u=!0),n.appendChild(g);if(!u&&m.checked){var C=document.createElement("option");mxUtils.write(C,mxResources.get("pageNotFound"));C.setAttribute("disabled","disabled");C.setAttribute("selected","selected");C.setAttribute("value","pageNotFound");n.appendChild(C);mxEvent.addListener(n,"change",function(){null==C.parentNode||C.selected||C.parentNode.removeChild(C)})}c.appendChild(n)}else d.setAttribute("value", +f),c.appendChild(d),c.appendChild(g);L.appendChild(c);var x=mxUtils.button(k,function(){b.hideDialog();e(m.checked?"pageNotFound"!==n.value?n.value:f:d.value,LinkDialog.selectedDocs,z.checked?B:null)});x.style.verticalAlign="middle";x.className="geBtn gePrimaryBtn";this.init=function(){m.checked?n.focus():(d.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?d.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(n,"focus",function(){q.removeAttribute("checked");m.setAttribute("checked", +"checked");m.checked=!0});mxEvent.addListener(d,"focus",function(){m.removeAttribute("checked");q.setAttribute("checked","checked");q.checked=!0});if(Graph.fileSupport){var I=L.parentNode,N=null;mxEvent.addListener(I,"dragleave",function(t){null!=N&&(N.parentNode.removeChild(N),N=null);t.stopPropagation();t.preventDefault()});mxEvent.addListener(I,"dragover",mxUtils.bind(this,function(t){null==N&&(!mxClient.IS_IE||10<document.documentMode)&&(N=b.highlightElement(I));t.stopPropagation();t.preventDefault()})); +mxEvent.addListener(I,"drop",mxUtils.bind(this,function(t){null!=N&&(N.parentNode.removeChild(N),N=null);0<=mxUtils.indexOf(t.dataTransfer.types,"text/uri-list")&&(d.value=decodeURIComponent(t.dataTransfer.getData("text/uri-list")),q.setAttribute("checked","checked"),q.checked=!0,x.click());t.stopPropagation();t.preventDefault()}),!1)}};var y=document.createElement("div");y.style.marginTop="18px";y.style.textAlign="center";k=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/custom-links")}); k.style.verticalAlign="middle";k.className="geBtn";y.appendChild(k);b.isOffline()&&!mxClient.IS_CHROMEAPP&&(k.style.display="none");k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});k.style.verticalAlign="middle";k.className="geBtn";b.editor.cancelFirst&&y.appendChild(k);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(I){if(I.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=I.docs;var N=I.docs[0].url;"application/mxe"==I.docs[0].mimeType||null!=I.docs[0].mimeType&& -"application/vnd.jgraph."==I.docs[0].mimeType.substring(0,23)?N="https://www.draw.io/#G"+I.docs[0].id:"application/vnd.google-apps.folder"==I.docs[0].mimeType&&(N="https://drive.google.com/#folders/"+I.docs[0].id);e.value=N;e.focus()}else LinkDialog.selectedDocs=null;e.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&D(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this, -function(){b.spinner.stop();if(null==b.linkPicker){var I=b.drive.createLinkPicker();b.linkPicker=I.setCallback(function(N){LinkDialog.filePicked(N)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&D(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(I){e.value=I[0].link;e.focus()}})});null!=b.oneDrive&&D(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"), -function(){b.oneDrive.pickFile(function(I,N){e.value=N.value[0].webUrl;e.focus()},!0)});null!=b.gitHub&&D(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){b.gitHub.pickFile(function(I){if(null!=I){I=I.split("/");var N=I[0],t=I[1],p=I[2];I=I.slice(3,I.length).join("/");e.value="https://github.com/"+N+"/"+t+"/blob/"+p+"/"+I;e.focus()}})});null!=b.gitLab&&D(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){b.gitLab.pickFile(function(I){if(null!=I){I=I.split("/");var N= -I[0],t=I[1],p=I[2];I=I.slice(3,I.length).join("/");e.value=DRAWIO_GITLAB_URL+"/"+N+"/"+t+"/blob/"+p+"/"+I;e.focus()}})});mxEvent.addListener(e,"keypress",function(I){13==I.keyCode&&(b.hideDialog(),d(m.checked?n.value:e.value,LinkDialog.selectedDocs))});y.appendChild(v);b.editor.cancelFirst||y.appendChild(k);K.appendChild(y);this.container=K},FeedbackDialog=function(b,f,k,d){var u=document.createElement("div"),x=document.createElement("div");mxUtils.write(x,mxResources.get("sendYourFeedback"));x.style.fontSize= -"18px";x.style.marginBottom="18px";u.appendChild(x);x=document.createElement("div");mxUtils.write(x,mxResources.get("yourEmailAddress")+(k?"":" ("+mxResources.get("required")+")"));u.appendChild(x);var B=document.createElement("input");B.setAttribute("type","text");B.style.marginTop="6px";B.style.width="600px";var D=mxUtils.button(mxResources.get("sendMessage"),function(){var g=e.value+(c.checked?"\nDiagram:\n"+(null!=d?d:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+ +"application/vnd.jgraph."==I.docs[0].mimeType.substring(0,23)?N="https://www.draw.io/#G"+I.docs[0].id:"application/vnd.google-apps.folder"==I.docs[0].mimeType&&(N="https://drive.google.com/#folders/"+I.docs[0].id);d.value=N;d.focus()}else LinkDialog.selectedDocs=null;d.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&E(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this, +function(){b.spinner.stop();if(null==b.linkPicker){var I=b.drive.createLinkPicker();b.linkPicker=I.setCallback(function(N){LinkDialog.filePicked(N)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&E(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(I){d.value=I[0].link;d.focus()}})});null!=b.oneDrive&&E(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"), +function(){b.oneDrive.pickFile(function(I,N){d.value=N.value[0].webUrl;d.focus()},!0)});null!=b.gitHub&&E(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){b.gitHub.pickFile(function(I){if(null!=I){I=I.split("/");var N=I[0],t=I[1],p=I[2];I=I.slice(3,I.length).join("/");d.value="https://github.com/"+N+"/"+t+"/blob/"+p+"/"+I;d.focus()}})});null!=b.gitLab&&E(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){b.gitLab.pickFile(function(I){if(null!=I){I=I.split("/");var N= +I[0],t=I[1],p=I[2];I=I.slice(3,I.length).join("/");d.value=DRAWIO_GITLAB_URL+"/"+N+"/"+t+"/blob/"+p+"/"+I;d.focus()}})});mxEvent.addListener(d,"keypress",function(I){13==I.keyCode&&(b.hideDialog(),e(m.checked?n.value:d.value,LinkDialog.selectedDocs))});y.appendChild(x);b.editor.cancelFirst||y.appendChild(k);L.appendChild(y);this.container=L},FeedbackDialog=function(b,f,k,e){var u=document.createElement("div"),v=document.createElement("div");mxUtils.write(v,mxResources.get("sendYourFeedback"));v.style.fontSize= +"18px";v.style.marginBottom="18px";u.appendChild(v);v=document.createElement("div");mxUtils.write(v,mxResources.get("yourEmailAddress")+(k?"":" ("+mxResources.get("required")+")"));u.appendChild(v);var B=document.createElement("input");B.setAttribute("type","text");B.style.marginTop="6px";B.style.width="600px";var E=mxUtils.button(mxResources.get("sendMessage"),function(){var g=d.value+(c.checked?"\nDiagram:\n"+(null!=e?e:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+ "\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;g.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(B.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=f?f:"Feedback")+ -":\n"+g),function(q){b.spinner.stop();200<=q.getStatus()&&299>=q.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});D.className="geBtn gePrimaryBtn";if(!k){D.setAttribute("disabled","disabled");var K=/^(([^<>()[\]\\.,;:\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(B, -"change",function(){0<B.value.length&&0<K.test(B.value)?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled")});mxEvent.addListener(B,"keyup",function(){0<B.value.length&&K.test(B.value)?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled")})}u.appendChild(B);this.init=function(){B.focus()};var c=document.createElement("input");c.setAttribute("type","checkbox");c.setAttribute("checked","checked");c.defaultChecked=!0;k=document.createElement("p");k.style.marginTop="14px"; -k.appendChild(c);x=document.createElement("span");mxUtils.write(x," "+mxResources.get("includeCopyOfMyDiagram"));k.appendChild(x);mxEvent.addListener(x,"click",function(g){c.checked=!c.checked;mxEvent.consume(g)});u.appendChild(k);x=document.createElement("div");mxUtils.write(x,mxResources.get("feedback"));u.appendChild(x);var e=document.createElement("textarea");e.style.resize="none";e.style.width="600px";e.style.height="140px";e.style.marginTop="6px";e.setAttribute("placeholder",mxResources.get("comments")); -u.appendChild(e);k=document.createElement("div");k.style.marginTop="26px";k.style.textAlign="right";x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";b.editor.cancelFirst?(k.appendChild(x),k.appendChild(D)):(k.appendChild(D),k.appendChild(x));u.appendChild(k);this.container=u};FeedbackDialog.maxAttachmentSize=1E6; -var RevisionDialog=function(b,f,k){var d=document.createElement("div"),u=document.createElement("h3");u.style.marginTop="0px";mxUtils.write(u,mxResources.get("revisionHistory"));d.appendChild(u);u=document.createElement("div");u.style.position="absolute";u.style.overflow="auto";u.style.width="170px";u.style.height="378px";d.appendChild(u);var x=document.createElement("div");x.style.position="absolute";x.style.border="1px solid lightGray";x.style.left="199px";x.style.width="470px";x.style.height="376px"; -x.style.overflow="hidden";var B=document.createElement("div");B.style.cssText="position:absolute;left:0;right:0;top:0;bottom:20px;text-align:center;transform:translate(0,50%);pointer-events:none;";x.appendChild(B);mxEvent.disableContextMenu(x);d.appendChild(x);var D=new Graph(x);D.setTooltips(!1);D.setEnabled(!1);D.setPanning(!0);D.panningHandler.ignoreCell=!0;D.panningHandler.useLeftButtonForPanning=!0;D.minFitScale=null;D.maxFitScale=null;D.centerZoom=!0;var K=0,c=null,e=0,g=D.getGlobalVariable; -D.getGlobalVariable=function(X){return"page"==X&&null!=c&&null!=c[e]?c[e].getAttribute("name"):"pagenumber"==X?e+1:"pagecount"==X?null!=c?c.length:1:g.apply(this,arguments)};D.getLinkForCell=function(){return null};Editor.MathJaxRender&&D.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(X,aa){b.editor.graph.mathEnabled&&Editor.MathJaxRender(D.container)}));var q={lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.4,trail:60, -shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"},m=new Spinner(q),n=b.getCurrentFile(),z=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),C={};for(q=0;q<z.length;q++)C[z[q].getAttribute("id")]=z[q];var v=null,y=null,I=null,N=null,t=mxUtils.button("",function(){null!=I&&D.zoomIn()});t.className="geSprite geSprite-zoomin";t.setAttribute("title",mxResources.get("zoomIn"));t.style.outline="none";t.style.border="none";t.style.margin="2px";t.setAttribute("disabled","disabled"); -mxUtils.setOpacity(t,20);var p=mxUtils.button("",function(){null!=I&&D.zoomOut()});p.className="geSprite geSprite-zoomout";p.setAttribute("title",mxResources.get("zoomOut"));p.style.outline="none";p.style.border="none";p.style.margin="2px";p.setAttribute("disabled","disabled");mxUtils.setOpacity(p,20);var F=mxUtils.button("",function(){null!=I&&(D.maxFitScale=8,D.fit(8),D.center())});F.className="geSprite geSprite-fit";F.setAttribute("title",mxResources.get("fit"));F.style.outline="none";F.style.border= -"none";F.style.margin="2px";F.setAttribute("disabled","disabled");mxUtils.setOpacity(F,20);var J=mxUtils.button("",function(){null!=I&&(D.zoomActual(),D.center())});J.className="geSprite geSprite-actualsize";J.setAttribute("title",mxResources.get("actualSize"));J.style.outline="none";J.style.border="none";J.style.margin="2px";J.setAttribute("disabled","disabled");mxUtils.setOpacity(J,20);var M=mxUtils.button("",function(){});M.className="geSprite geSprite-middle";M.setAttribute("title",mxResources.get("compare")); -M.style.outline="none";M.style.border="none";M.style.margin="2px";mxUtils.setOpacity(M,60);var H=x.cloneNode(!1);H.style.pointerEvent="none";x.parentNode.appendChild(H);var G=new Graph(H);G.setTooltips(!1);G.setEnabled(!1);G.setPanning(!0);G.panningHandler.ignoreCell=!0;G.panningHandler.useLeftButtonForPanning=!0;G.minFitScale=null;G.maxFitScale=null;G.centerZoom=!0;mxEvent.addGestureListeners(M,function(X){X=C[c[K].getAttribute("id")];mxUtils.setOpacity(M,20);B.innerText="";null==X?mxUtils.write(B, -mxResources.get("pageNotFound")):(E.style.display="none",x.style.display="none",H.style.display="",H.style.backgroundColor=x.style.backgroundColor,X=Editor.parseDiagramNode(X),(new mxCodec(X.ownerDocument)).decode(X,G.getModel()),G.view.scaleAndTranslate(D.view.scale,D.view.translate.x,D.view.translate.y))},null,function(){mxUtils.setOpacity(M,60);B.innerText="";"none"==x.style.display&&(E.style.display="",x.style.display="",H.style.display="none")});var E=document.createElement("div");E.style.position= -"absolute";E.style.textAlign="right";E.style.color="gray";E.style.marginTop="10px";E.style.backgroundColor="transparent";E.style.top="440px";E.style.right="32px";E.style.maxWidth="380px";E.style.cursor="default";var P=mxUtils.button(mxResources.get("download"),function(){if(null!=I){var X=mxUtils.getXml(I.documentElement),aa=b.getBaseFilename()+".drawio";b.isLocalFileSave()?b.saveLocalFile(X,aa,"text/xml"):(X="undefined"===typeof pako?"&xml="+encodeURIComponent(X):"&data="+encodeURIComponent(Graph.compress(X)), +":\n"+g),function(q){b.spinner.stop();200<=q.getStatus()&&299>=q.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});E.className="geBtn gePrimaryBtn";if(!k){E.setAttribute("disabled","disabled");var L=/^(([^<>()[\]\\.,;:\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(B, +"change",function(){0<B.value.length&&0<L.test(B.value)?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled")});mxEvent.addListener(B,"keyup",function(){0<B.value.length&&L.test(B.value)?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled")})}u.appendChild(B);this.init=function(){B.focus()};var c=document.createElement("input");c.setAttribute("type","checkbox");c.setAttribute("checked","checked");c.defaultChecked=!0;k=document.createElement("p");k.style.marginTop="14px"; +k.appendChild(c);v=document.createElement("span");mxUtils.write(v," "+mxResources.get("includeCopyOfMyDiagram"));k.appendChild(v);mxEvent.addListener(v,"click",function(g){c.checked=!c.checked;mxEvent.consume(g)});u.appendChild(k);v=document.createElement("div");mxUtils.write(v,mxResources.get("feedback"));u.appendChild(v);var d=document.createElement("textarea");d.style.resize="none";d.style.width="600px";d.style.height="140px";d.style.marginTop="6px";d.setAttribute("placeholder",mxResources.get("comments")); +u.appendChild(d);k=document.createElement("div");k.style.marginTop="26px";k.style.textAlign="right";v=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});v.className="geBtn";b.editor.cancelFirst?(k.appendChild(v),k.appendChild(E)):(k.appendChild(E),k.appendChild(v));u.appendChild(k);this.container=u};FeedbackDialog.maxAttachmentSize=1E6; +var RevisionDialog=function(b,f,k){var e=document.createElement("div"),u=document.createElement("h3");u.style.marginTop="0px";mxUtils.write(u,mxResources.get("revisionHistory"));e.appendChild(u);u=document.createElement("div");u.style.position="absolute";u.style.overflow="auto";u.style.width="170px";u.style.height="378px";e.appendChild(u);var v=document.createElement("div");v.style.position="absolute";v.style.border="1px solid lightGray";v.style.left="199px";v.style.width="470px";v.style.height="376px"; +v.style.overflow="hidden";var B=document.createElement("div");B.style.cssText="position:absolute;left:0;right:0;top:0;bottom:20px;text-align:center;transform:translate(0,50%);pointer-events:none;";v.appendChild(B);mxEvent.disableContextMenu(v);e.appendChild(v);var E=new Graph(v);E.setTooltips(!1);E.setEnabled(!1);E.setPanning(!0);E.panningHandler.ignoreCell=!0;E.panningHandler.useLeftButtonForPanning=!0;E.minFitScale=null;E.maxFitScale=null;E.centerZoom=!0;var L=0,c=null,d=0,g=E.getGlobalVariable; +E.getGlobalVariable=function(X){return"page"==X&&null!=c&&null!=c[d]?c[d].getAttribute("name"):"pagenumber"==X?d+1:"pagecount"==X?null!=c?c.length:1:g.apply(this,arguments)};E.getLinkForCell=function(){return null};Editor.MathJaxRender&&E.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(X,aa){b.editor.graph.mathEnabled&&Editor.MathJaxRender(E.container)}));var q={lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.4,trail:60, +shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"},m=new Spinner(q),n=b.getCurrentFile(),z=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),C={};for(q=0;q<z.length;q++)C[z[q].getAttribute("id")]=z[q];var x=null,y=null,I=null,N=null,t=mxUtils.button("",function(){null!=I&&E.zoomIn()});t.className="geSprite geSprite-zoomin";t.setAttribute("title",mxResources.get("zoomIn"));t.style.outline="none";t.style.border="none";t.style.margin="2px";t.setAttribute("disabled","disabled"); +mxUtils.setOpacity(t,20);var p=mxUtils.button("",function(){null!=I&&E.zoomOut()});p.className="geSprite geSprite-zoomout";p.setAttribute("title",mxResources.get("zoomOut"));p.style.outline="none";p.style.border="none";p.style.margin="2px";p.setAttribute("disabled","disabled");mxUtils.setOpacity(p,20);var F=mxUtils.button("",function(){null!=I&&(E.maxFitScale=8,E.fit(8),E.center())});F.className="geSprite geSprite-fit";F.setAttribute("title",mxResources.get("fit"));F.style.outline="none";F.style.border= +"none";F.style.margin="2px";F.setAttribute("disabled","disabled");mxUtils.setOpacity(F,20);var K=mxUtils.button("",function(){null!=I&&(E.zoomActual(),E.center())});K.className="geSprite geSprite-actualsize";K.setAttribute("title",mxResources.get("actualSize"));K.style.outline="none";K.style.border="none";K.style.margin="2px";K.setAttribute("disabled","disabled");mxUtils.setOpacity(K,20);var D=mxUtils.button("",function(){});D.className="geSprite geSprite-middle";D.setAttribute("title",mxResources.get("compare")); +D.style.outline="none";D.style.border="none";D.style.margin="2px";mxUtils.setOpacity(D,60);var H=v.cloneNode(!1);H.style.pointerEvent="none";v.parentNode.appendChild(H);var J=new Graph(H);J.setTooltips(!1);J.setEnabled(!1);J.setPanning(!0);J.panningHandler.ignoreCell=!0;J.panningHandler.useLeftButtonForPanning=!0;J.minFitScale=null;J.maxFitScale=null;J.centerZoom=!0;mxEvent.addGestureListeners(D,function(X){X=C[c[L].getAttribute("id")];mxUtils.setOpacity(D,20);B.innerText="";null==X?mxUtils.write(B, +mxResources.get("pageNotFound")):(G.style.display="none",v.style.display="none",H.style.display="",H.style.backgroundColor=v.style.backgroundColor,X=Editor.parseDiagramNode(X),(new mxCodec(X.ownerDocument)).decode(X,J.getModel()),J.view.scaleAndTranslate(E.view.scale,E.view.translate.x,E.view.translate.y))},null,function(){mxUtils.setOpacity(D,60);B.innerText="";"none"==v.style.display&&(G.style.display="",v.style.display="",H.style.display="none")});var G=document.createElement("div");G.style.position= +"absolute";G.style.textAlign="right";G.style.color="gray";G.style.marginTop="10px";G.style.backgroundColor="transparent";G.style.top="440px";G.style.right="32px";G.style.maxWidth="380px";G.style.cursor="default";var P=mxUtils.button(mxResources.get("download"),function(){if(null!=I){var X=mxUtils.getXml(I.documentElement),aa=b.getBaseFilename()+".drawio";b.isLocalFileSave()?b.saveLocalFile(X,aa,"text/xml"):(X="undefined"===typeof pako?"&xml="+encodeURIComponent(X):"&data="+encodeURIComponent(Graph.compress(X)), (new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(aa)+"&format=xml"+X)).simulate(document,"_blank"))}});P.className="geBtn";P.setAttribute("disabled","disabled");var T=mxUtils.button(mxResources.get("restore"),function(X){null!=I&&null!=N&&(mxEvent.isShiftDown(X)?null!=I&&(X=b.getPagesForNode(I.documentElement),X=b.diffPages(b.pages,X),X=new TextareaDialog(b,mxResources.get("compare"),JSON.stringify(X,null,2),function(aa){if(0<aa.length)try{b.confirm(mxResources.get("areYouSure"),function(){n.patch([JSON.parse(aa)], null,!0);b.hideDialog();b.hideDialog()})}catch(Y){b.handleError(Y)}},null,null,null,null,null,!0,null,mxResources.get("merge")),b.showDialog(X.container,620,460,!0,!0),X.init()):b.confirm(mxResources.get("areYouSure"),function(){null!=k?k(N):b.spinner.spin(document.body,mxResources.get("restoring"))&&n.save(!0,function(aa){b.spinner.stop();b.replaceFileData(N);b.hideDialog()},function(aa){b.spinner.stop();b.editor.setStatus("");b.handleError(aa,null!=aa?mxResources.get("errorSavingFile"):null)})}))}); T.className="geBtn";T.setAttribute("disabled","disabled");T.setAttribute("title","Shift+Click for Diff");var W=document.createElement("select");W.setAttribute("disabled","disabled");W.style.maxWidth="80px";W.style.position="relative";W.style.top="-2px";W.style.verticalAlign="bottom";W.style.marginRight="6px";W.style.display="none";var U=null;mxEvent.addListener(W,"change",function(X){null!=U&&(U(X),mxEvent.consume(X))});var V=mxUtils.button(mxResources.get("edit"),function(){null!=I&&(window.openFile= new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(I.documentElement)),b.openLink(b.getUrl(),null,!0))});V.className="geBtn";V.setAttribute("disabled","disabled");null!=k&&(V.style.display="none");var l=mxUtils.button(mxResources.get("show"),function(){null!=y&&b.openLink(y.getUrl(W.selectedIndex))});l.className="geBtn gePrimaryBtn";l.setAttribute("disabled","disabled");null!=k&&(l.style.display="none",T.className="geBtn gePrimaryBtn");z=document.createElement("div"); -z.style.position="absolute";z.style.top="482px";z.style.width="640px";z.style.textAlign="right";var A=document.createElement("div");A.className="geToolbarContainer";A.style.backgroundColor="transparent";A.style.padding="2px";A.style.border="none";A.style.left="199px";A.style.top="442px";var L=null;if(null!=f&&0<f.length){x.style.cursor="move";var Q=document.createElement("table");Q.style.border="1px solid lightGray";Q.style.borderCollapse="collapse";Q.style.borderSpacing="0px";Q.style.width="100%"; -var O=document.createElement("tbody"),R=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(K=mxUtils.indexOf(b.pages,b.currentPage));for(q=f.length-1;0<=q;q--){var S=function(X){var aa=new Date(X.modifiedDate),Y=null;if(0<=aa.getTime()){var Z=function(fa){m.stop();B.innerText="";var la=mxUtils.parseXml(fa),ia=b.editor.extractGraphModel(la.documentElement,!0);if(null!=ia){var qa=function(Da){null!=Da&&(Da=ka(Editor.parseDiagramNode(Da)));return Da},ka=function(Da){var Ea=Da.getAttribute("background"); -if(null==Ea||""==Ea||Ea==mxConstants.NONE)Ea=D.defaultPageBackgroundColor;x.style.backgroundColor=Ea;(new mxCodec(Da.ownerDocument)).decode(Da,D.getModel());D.maxFitScale=1;D.fit(8);D.center();return Da};W.style.display="none";W.innerText="";I=la;N=fa;c=parseSelectFunction=null;e=0;if("mxfile"==ia.nodeName){la=ia.getElementsByTagName("diagram");c=[];for(fa=0;fa<la.length;fa++)c.push(la[fa]);e=Math.min(K,c.length-1);0<c.length&&qa(c[e]);if(1<c.length)for(W.removeAttribute("disabled"),W.style.display= -"",fa=0;fa<c.length;fa++)la=document.createElement("option"),mxUtils.write(la,c[fa].getAttribute("name")||mxResources.get("pageWithNumber",[fa+1])),la.setAttribute("value",fa),fa==e&&la.setAttribute("selected","selected"),W.appendChild(la);U=function(){try{var Da=parseInt(W.value);e=K=Da;qa(c[Da])}catch(Ea){W.value=K,b.handleError(Ea)}}}else ka(ia);fa=X.lastModifyingUserName;null!=fa&&20<fa.length&&(fa=fa.substring(0,20)+"...");E.innerText="";mxUtils.write(E,(null!=fa?fa+" ":"")+aa.toLocaleDateString()+ -" "+aa.toLocaleTimeString());E.setAttribute("title",Y.getAttribute("title"));t.removeAttribute("disabled");p.removeAttribute("disabled");F.removeAttribute("disabled");J.removeAttribute("disabled");M.removeAttribute("disabled");null!=n&&n.isRestricted()||(b.editor.graph.isEnabled()&&T.removeAttribute("disabled"),P.removeAttribute("disabled"),l.removeAttribute("disabled"),V.removeAttribute("disabled"));mxUtils.setOpacity(t,60);mxUtils.setOpacity(p,60);mxUtils.setOpacity(F,60);mxUtils.setOpacity(J,60); -mxUtils.setOpacity(M,60)}else W.style.display="none",W.innerText="",E.innerText="",mxUtils.write(E,mxResources.get("errorLoadingFile")),mxUtils.write(B,mxResources.get("errorLoadingFile"))};Y=document.createElement("tr");Y.style.borderBottom="1px solid lightGray";Y.style.fontSize="12px";Y.style.cursor="pointer";var ca=document.createElement("td");ca.style.padding="6px";ca.style.whiteSpace="nowrap";X==f[f.length-1]?mxUtils.write(ca,mxResources.get("current")):aa.toDateString()===R?mxUtils.write(ca, -aa.toLocaleTimeString()):mxUtils.write(ca,aa.toLocaleDateString()+" "+aa.toLocaleTimeString());Y.appendChild(ca);Y.setAttribute("title",aa.toLocaleDateString()+" "+aa.toLocaleTimeString()+(null!=X.fileSize?" "+b.formatFileSize(parseInt(X.fileSize)):"")+(null!=X.lastModifyingUserName?" "+X.lastModifyingUserName:""));mxEvent.addListener(Y,"click",function(fa){y!=X&&(m.stop(),null!=v&&(v.style.backgroundColor=""),y=X,v=Y,v.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",N=I=null,E.removeAttribute("title"), -E.innerText=mxResources.get("loading")+"...",x.style.backgroundColor=D.defaultPageBackgroundColor,B.innerText="",D.getModel().clear(),T.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"),p.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"),V.setAttribute("disabled","disabled"),l.setAttribute("disabled","disabled"),W.setAttribute("disabled", -"disabled"),mxUtils.setOpacity(t,20),mxUtils.setOpacity(p,20),mxUtils.setOpacity(F,20),mxUtils.setOpacity(J,20),mxUtils.setOpacity(M,20),m.spin(x),X.getXml(function(la){if(y==X)try{Z(la)}catch(ia){E.innerText=mxResources.get("error")+": "+ia.message}},function(la){m.stop();W.style.display="none";W.innerText="";E.innerText="";mxUtils.write(E,mxResources.get("errorLoadingFile"));mxUtils.write(B,mxResources.get("errorLoadingFile"))}),mxEvent.consume(fa))});mxEvent.addListener(Y,"dblclick",function(fa){l.click(); -window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(fa)},!1);O.appendChild(Y)}return Y}(f[q]);null!=S&&q==f.length-1&&(L=S)}Q.appendChild(O);u.appendChild(Q)}else null==n||null==b.drive&&n.constructor==window.DriveFile||null==b.dropbox&&n.constructor==window.DropboxFile?(x.style.display="none",A.style.display="none",mxUtils.write(u,mxResources.get("notAvailable"))):(x.style.display="none",A.style.display="none",mxUtils.write(u, -mxResources.get("noRevisions")));this.init=function(){null!=L&&L.click()};u=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});u.className="geBtn";A.appendChild(W);A.appendChild(t);A.appendChild(p);A.appendChild(J);A.appendChild(F);A.appendChild(M);b.editor.cancelFirst?(z.appendChild(u),z.appendChild(P),z.appendChild(V),z.appendChild(T),z.appendChild(l)):(z.appendChild(P),z.appendChild(V),z.appendChild(T),z.appendChild(l),z.appendChild(u));d.appendChild(z);d.appendChild(A);d.appendChild(E); -this.container=d},DraftDialog=function(b,f,k,d,u,x,B,D,K){var c=document.createElement("div"),e=document.createElement("div");e.style.marginTop="0px";e.style.whiteSpace="nowrap";e.style.overflow="auto";e.style.lineHeight="normal";mxUtils.write(e,f);c.appendChild(e);var g=document.createElement("select"),q=mxUtils.bind(this,function(){y=mxUtils.parseXml(K[g.value].data);I=b.editor.extractGraphModel(y.documentElement,!0);N=0;this.init()});if(null!=K){g.style.marginLeft="4px";for(f=0;f<K.length;f++){var m= -document.createElement("option");m.setAttribute("value",f);var n=new Date(K[f].created),z=new Date(K[f].modified);mxUtils.write(m,n.toLocaleDateString()+" "+n.toLocaleTimeString()+" - "+(n.toDateString(),z.toDateString(),z.toLocaleDateString())+" "+z.toLocaleTimeString());g.appendChild(m)}e.appendChild(g);mxEvent.addListener(g,"change",q)}null==k&&(k=K[0].data);var C=document.createElement("div");C.style.position="absolute";C.style.border="1px solid lightGray";C.style.marginTop="10px";C.style.left= -"40px";C.style.right="40px";C.style.top="46px";C.style.bottom="74px";C.style.overflow="hidden";mxEvent.disableContextMenu(C);c.appendChild(C);var v=new Graph(C);v.setEnabled(!1);v.setPanning(!0);v.panningHandler.ignoreCell=!0;v.panningHandler.useLeftButtonForPanning=!0;v.minFitScale=null;v.maxFitScale=null;v.centerZoom=!0;var y=mxUtils.parseXml(k),I=b.editor.extractGraphModel(y.documentElement,!0),N=0,t=null,p=v.getGlobalVariable;v.getGlobalVariable=function(J){return"page"==J&&null!=t&&null!=t[N]? -t[N].getAttribute("name"):"pagenumber"==J?N+1:"pagecount"==J?null!=t?t.length:1:p.apply(this,arguments)};v.getLinkForCell=function(){return null};k=mxUtils.button("",function(){v.zoomIn()});k.className="geSprite geSprite-zoomin";k.setAttribute("title",mxResources.get("zoomIn"));k.style.outline="none";k.style.border="none";k.style.margin="2px";mxUtils.setOpacity(k,60);e=mxUtils.button("",function(){v.zoomOut()});e.className="geSprite geSprite-zoomout";e.setAttribute("title",mxResources.get("zoomOut")); -e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,60);f=mxUtils.button("",function(){v.maxFitScale=8;v.fit(8);v.center()});f.className="geSprite geSprite-fit";f.setAttribute("title",mxResources.get("fit"));f.style.outline="none";f.style.border="none";f.style.margin="2px";mxUtils.setOpacity(f,60);m=mxUtils.button("",function(){v.zoomActual();v.center()});m.className="geSprite geSprite-actualsize";m.setAttribute("title",mxResources.get("actualSize"));m.style.outline= +z.style.position="absolute";z.style.top="482px";z.style.width="640px";z.style.textAlign="right";var A=document.createElement("div");A.className="geToolbarContainer";A.style.backgroundColor="transparent";A.style.padding="2px";A.style.border="none";A.style.left="199px";A.style.top="442px";var M=null;if(null!=f&&0<f.length){v.style.cursor="move";var Q=document.createElement("table");Q.style.border="1px solid lightGray";Q.style.borderCollapse="collapse";Q.style.borderSpacing="0px";Q.style.width="100%"; +var O=document.createElement("tbody"),R=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(L=mxUtils.indexOf(b.pages,b.currentPage));for(q=f.length-1;0<=q;q--){var S=function(X){var aa=new Date(X.modifiedDate),Y=null;if(0<=aa.getTime()){var Z=function(ha){m.stop();B.innerText="";var ma=mxUtils.parseXml(ha),ia=b.editor.extractGraphModel(ma.documentElement,!0);if(null!=ia){var qa=function(Ca){null!=Ca&&(Ca=la(Editor.parseDiagramNode(Ca)));return Ca},la=function(Ca){var Da=Ca.getAttribute("background"); +if(null==Da||""==Da||Da==mxConstants.NONE)Da=E.defaultPageBackgroundColor;v.style.backgroundColor=Da;(new mxCodec(Ca.ownerDocument)).decode(Ca,E.getModel());E.maxFitScale=1;E.fit(8);E.center();return Ca};W.style.display="none";W.innerText="";I=ma;N=ha;c=parseSelectFunction=null;d=0;if("mxfile"==ia.nodeName){ma=ia.getElementsByTagName("diagram");c=[];for(ha=0;ha<ma.length;ha++)c.push(ma[ha]);d=Math.min(L,c.length-1);0<c.length&&qa(c[d]);if(1<c.length)for(W.removeAttribute("disabled"),W.style.display= +"",ha=0;ha<c.length;ha++)ma=document.createElement("option"),mxUtils.write(ma,c[ha].getAttribute("name")||mxResources.get("pageWithNumber",[ha+1])),ma.setAttribute("value",ha),ha==d&&ma.setAttribute("selected","selected"),W.appendChild(ma);U=function(){try{var Ca=parseInt(W.value);d=L=Ca;qa(c[Ca])}catch(Da){W.value=L,b.handleError(Da)}}}else la(ia);ha=X.lastModifyingUserName;null!=ha&&20<ha.length&&(ha=ha.substring(0,20)+"...");G.innerText="";mxUtils.write(G,(null!=ha?ha+" ":"")+aa.toLocaleDateString()+ +" "+aa.toLocaleTimeString());G.setAttribute("title",Y.getAttribute("title"));t.removeAttribute("disabled");p.removeAttribute("disabled");F.removeAttribute("disabled");K.removeAttribute("disabled");D.removeAttribute("disabled");null!=n&&n.isRestricted()||(b.editor.graph.isEnabled()&&T.removeAttribute("disabled"),P.removeAttribute("disabled"),l.removeAttribute("disabled"),V.removeAttribute("disabled"));mxUtils.setOpacity(t,60);mxUtils.setOpacity(p,60);mxUtils.setOpacity(F,60);mxUtils.setOpacity(K,60); +mxUtils.setOpacity(D,60)}else W.style.display="none",W.innerText="",G.innerText="",mxUtils.write(G,mxResources.get("errorLoadingFile")),mxUtils.write(B,mxResources.get("errorLoadingFile"))};Y=document.createElement("tr");Y.style.borderBottom="1px solid lightGray";Y.style.fontSize="12px";Y.style.cursor="pointer";var ba=document.createElement("td");ba.style.padding="6px";ba.style.whiteSpace="nowrap";X==f[f.length-1]?mxUtils.write(ba,mxResources.get("current")):aa.toDateString()===R?mxUtils.write(ba, +aa.toLocaleTimeString()):mxUtils.write(ba,aa.toLocaleDateString()+" "+aa.toLocaleTimeString());Y.appendChild(ba);Y.setAttribute("title",aa.toLocaleDateString()+" "+aa.toLocaleTimeString()+(null!=X.fileSize?" "+b.formatFileSize(parseInt(X.fileSize)):"")+(null!=X.lastModifyingUserName?" "+X.lastModifyingUserName:""));mxEvent.addListener(Y,"click",function(ha){y!=X&&(m.stop(),null!=x&&(x.style.backgroundColor=""),y=X,x=Y,x.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",N=I=null,G.removeAttribute("title"), +G.innerText=mxResources.get("loading")+"...",v.style.backgroundColor=E.defaultPageBackgroundColor,B.innerText="",E.getModel().clear(),T.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"),p.setAttribute("disabled","disabled"),K.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),V.setAttribute("disabled","disabled"),l.setAttribute("disabled","disabled"),W.setAttribute("disabled", +"disabled"),mxUtils.setOpacity(t,20),mxUtils.setOpacity(p,20),mxUtils.setOpacity(F,20),mxUtils.setOpacity(K,20),mxUtils.setOpacity(D,20),m.spin(v),X.getXml(function(ma){if(y==X)try{Z(ma)}catch(ia){G.innerText=mxResources.get("error")+": "+ia.message}},function(ma){m.stop();W.style.display="none";W.innerText="";G.innerText="";mxUtils.write(G,mxResources.get("errorLoadingFile"));mxUtils.write(B,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ha))});mxEvent.addListener(Y,"dblclick",function(ha){l.click(); +window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ha)},!1);O.appendChild(Y)}return Y}(f[q]);null!=S&&q==f.length-1&&(M=S)}Q.appendChild(O);u.appendChild(Q)}else null==n||null==b.drive&&n.constructor==window.DriveFile||null==b.dropbox&&n.constructor==window.DropboxFile?(v.style.display="none",A.style.display="none",mxUtils.write(u,mxResources.get("notAvailable"))):(v.style.display="none",A.style.display="none",mxUtils.write(u, +mxResources.get("noRevisions")));this.init=function(){null!=M&&M.click()};u=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});u.className="geBtn";A.appendChild(W);A.appendChild(t);A.appendChild(p);A.appendChild(K);A.appendChild(F);A.appendChild(D);b.editor.cancelFirst?(z.appendChild(u),z.appendChild(P),z.appendChild(V),z.appendChild(T),z.appendChild(l)):(z.appendChild(P),z.appendChild(V),z.appendChild(T),z.appendChild(l),z.appendChild(u));e.appendChild(z);e.appendChild(A);e.appendChild(G); +this.container=e},DraftDialog=function(b,f,k,e,u,v,B,E,L){var c=document.createElement("div"),d=document.createElement("div");d.style.marginTop="0px";d.style.whiteSpace="nowrap";d.style.overflow="auto";d.style.lineHeight="normal";mxUtils.write(d,f);c.appendChild(d);var g=document.createElement("select"),q=mxUtils.bind(this,function(){y=mxUtils.parseXml(L[g.value].data);I=b.editor.extractGraphModel(y.documentElement,!0);N=0;this.init()});if(null!=L){g.style.marginLeft="4px";for(f=0;f<L.length;f++){var m= +document.createElement("option");m.setAttribute("value",f);var n=new Date(L[f].created),z=new Date(L[f].modified);mxUtils.write(m,n.toLocaleDateString()+" "+n.toLocaleTimeString()+" - "+(n.toDateString(),z.toDateString(),z.toLocaleDateString())+" "+z.toLocaleTimeString());g.appendChild(m)}d.appendChild(g);mxEvent.addListener(g,"change",q)}null==k&&(k=L[0].data);var C=document.createElement("div");C.style.position="absolute";C.style.border="1px solid lightGray";C.style.marginTop="10px";C.style.left= +"40px";C.style.right="40px";C.style.top="46px";C.style.bottom="74px";C.style.overflow="hidden";mxEvent.disableContextMenu(C);c.appendChild(C);var x=new Graph(C);x.setEnabled(!1);x.setPanning(!0);x.panningHandler.ignoreCell=!0;x.panningHandler.useLeftButtonForPanning=!0;x.minFitScale=null;x.maxFitScale=null;x.centerZoom=!0;var y=mxUtils.parseXml(k),I=b.editor.extractGraphModel(y.documentElement,!0),N=0,t=null,p=x.getGlobalVariable;x.getGlobalVariable=function(K){return"page"==K&&null!=t&&null!=t[N]? +t[N].getAttribute("name"):"pagenumber"==K?N+1:"pagecount"==K?null!=t?t.length:1:p.apply(this,arguments)};x.getLinkForCell=function(){return null};k=mxUtils.button("",function(){x.zoomIn()});k.className="geSprite geSprite-zoomin";k.setAttribute("title",mxResources.get("zoomIn"));k.style.outline="none";k.style.border="none";k.style.margin="2px";mxUtils.setOpacity(k,60);d=mxUtils.button("",function(){x.zoomOut()});d.className="geSprite geSprite-zoomout";d.setAttribute("title",mxResources.get("zoomOut")); +d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);f=mxUtils.button("",function(){x.maxFitScale=8;x.fit(8);x.center()});f.className="geSprite geSprite-fit";f.setAttribute("title",mxResources.get("fit"));f.style.outline="none";f.style.border="none";f.style.margin="2px";mxUtils.setOpacity(f,60);m=mxUtils.button("",function(){x.zoomActual();x.center()});m.className="geSprite geSprite-actualsize";m.setAttribute("title",mxResources.get("actualSize"));m.style.outline= "none";m.style.border="none";m.style.margin="2px";mxUtils.setOpacity(m,60);B=mxUtils.button(B||mxResources.get("discard"),function(){u.apply(this,[g.value,mxUtils.bind(this,function(){null!=g.parentNode&&(g.options[g.selectedIndex].parentNode.removeChild(g.options[g.selectedIndex]),0<g.options.length?(g.value=g.options[0].value,q()):b.hideDialog(!0))})])});B.className="geBtn";var F=document.createElement("select");F.style.maxWidth="80px";F.style.position="relative";F.style.top="-2px";F.style.verticalAlign= -"bottom";F.style.marginRight="6px";F.style.display="none";x=mxUtils.button(x||mxResources.get("edit"),function(){d.apply(this,[g.value])});x.className="geBtn gePrimaryBtn";n=document.createElement("div");n.style.position="absolute";n.style.bottom="30px";n.style.right="40px";n.style.textAlign="right";z=document.createElement("div");z.className="geToolbarContainer";z.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init= -function(){function J(E){if(null!=E){var P=E.getAttribute("background");if(null==P||""==P||P==mxConstants.NONE)P=Editor.isDarkMode()?"transparent":"#ffffff";C.style.backgroundColor=P;(new mxCodec(E.ownerDocument)).decode(E,v.getModel());v.maxFitScale=1;v.fit(8);v.center()}return E}function M(E){null!=E&&(E=J(Editor.parseDiagramNode(E)));return E}mxEvent.addListener(F,"change",function(E){N=parseInt(F.value);M(t[N]);mxEvent.consume(E)});if("mxfile"==I.nodeName){var H=I.getElementsByTagName("diagram"); -t=[];for(var G=0;G<H.length;G++)t.push(H[G]);0<t.length&&M(t[N]);F.innerText="";if(1<t.length)for(F.style.display="",G=0;G<t.length;G++)H=document.createElement("option"),mxUtils.write(H,t[G].getAttribute("name")||mxResources.get("pageWithNumber",[G+1])),H.setAttribute("value",G),G==N&&H.setAttribute("selected","selected"),F.appendChild(H);else F.style.display="none"}else J(I)};z.appendChild(F);z.appendChild(k);z.appendChild(e);z.appendChild(m);z.appendChild(f);k=mxUtils.button(mxResources.get("cancel"), -function(){b.hideDialog(!0)});k.className="geBtn";D=null!=D?mxUtils.button(mxResources.get("ignore"),D):null;null!=D&&(D.className="geBtn");b.editor.cancelFirst?(n.appendChild(k),null!=D&&n.appendChild(D),n.appendChild(B),n.appendChild(x)):(n.appendChild(x),n.appendChild(B),null!=D&&n.appendChild(D),n.appendChild(k));c.appendChild(n);c.appendChild(z);this.container=c},FindWindow=function(b,f,k,d,u,x){function B(U,V,l,A){if("object"===typeof V.value&&null!=V.value.attributes){V=V.value.attributes; -for(var L=0;L<V.length;L++)if("label"!=V[L].nodeName){var Q=mxUtils.trim(V[L].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==U&&(A&&0<=Q.indexOf(l)||!A&&Q.substring(0,l.length)===l)||null!=U&&U.test(Q))return!0}}return!1}function D(){m&&t.value?(P.removeAttribute("disabled"),T.removeAttribute("disabled")):(P.setAttribute("disabled","disabled"),T.setAttribute("disabled","disabled"));t.value&&N.value?W.removeAttribute("disabled"):W.setAttribute("disabled","disabled")}function K(U, -V,l){G.innerText="";var A=e.model.getDescendants(e.model.getRoot()),L=N.value.toLowerCase(),Q=p.checked?new RegExp(L):null,O=null;z=null;g!=L&&(g=L,q=null,n=!1);var R=null==q;if(0<L.length){if(n){n=!1;for(var S,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){S=X;break}U=(S+1)%b.pages.length;q=null;do n=!1,A=b.pages[U],e=b.createTemporaryGraph(e.getStylesheet()),b.updatePageRoot(A),e.model.setRoot(A.root),U=(U+1)%b.pages.length;while(!K(!0,V,l)&&U!=S);q&&(q=null,l?b.editor.graph.model.execute(new SelectPage(b, -A)):b.selectPage(A));n=!1;e=b.editor.graph;return K(!0,V,l)}for(X=0;X<A.length;X++){S=e.view.getState(A[X]);V&&null!=Q&&(R=R||S==q);if(null!=S&&null!=S.cell.value&&(R||null==O)&&(e.model.isVertex(S.cell)||e.model.isEdge(S.cell))){null!=S.style&&"1"==S.style.html?(J.innerHTML=e.sanitizeHtml(e.getLabel(S.cell)),label=mxUtils.extractTextWithWhitespace([J])):label=e.getLabel(S.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var aa=0;V&&x&&null!=Q&&S==q&&(label=label.substr(C), -aa=C);var Y=""==t.value,Z=Y;if(null==Q&&(Z&&0<=label.indexOf(L)||!Z&&label.substring(0,L.length)===L||Y&&B(Q,S.cell,L,Z))||null!=Q&&(Q.test(label)||Y&&B(Q,S.cell,L,Z)))if(x&&(null!=Q?(Y=label.match(Q),null!=Y&&0<Y.length&&(z=Y[0].toLowerCase(),C=aa+Y.index+z.length)):(z=L,C=z.length)),R){O=S;break}else null==O&&(O=S)}R=R||S==q}}if(null!=O){if(X==A.length&&F.checked)return q=null,n=!0,K(!0,V,l);q=O;e.scrollCellToVisible(q.cell);e.isEnabled()&&!e.isCellLocked(q.cell)?l||e.getSelectionCell()==q.cell&& -1==e.getSelectionCount()||e.setSelectionCell(q.cell):e.highlightCell(q.cell)}else{if(!U&&F.checked)return n=!0,K(!0,V,l);e.isEnabled()&&!l&&e.clearSelection()}m=null!=O;x&&!U&&D();return 0==L.length||null!=O}var c=b.actions.get("findReplace"),e=b.editor.graph,g=null,q=null,m=!1,n=!1,z=null,C=0,v=1,y=document.createElement("div");y.style.userSelect="none";y.style.overflow="hidden";y.style.padding="10px";y.style.height="100%";var I=x?"260px":"200px",N=document.createElement("input");N.setAttribute("placeholder", -mxResources.get("find"));N.setAttribute("type","text");N.style.marginTop="4px";N.style.marginBottom="6px";N.style.width=I;N.style.fontSize="12px";N.style.borderRadius="4px";N.style.padding="6px";y.appendChild(N);mxUtils.br(y);if(x){var t=document.createElement("input");t.setAttribute("placeholder",mxResources.get("replaceWith"));t.setAttribute("type","text");t.style.marginTop="4px";t.style.marginBottom="6px";t.style.width=I;t.style.fontSize="12px";t.style.borderRadius="4px";t.style.padding="6px"; -y.appendChild(t);mxUtils.br(y);mxEvent.addListener(t,"input",D)}var p=document.createElement("input");p.setAttribute("id","geFindWinRegExChck");p.setAttribute("type","checkbox");p.style.marginRight="4px";y.appendChild(p);I=document.createElement("label");I.setAttribute("for","geFindWinRegExChck");y.appendChild(I);mxUtils.write(I,mxResources.get("regularExpression"));y.appendChild(I);I=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");I.style.position="relative";I.style.marginLeft= -"6px";I.style.top="-1px";y.appendChild(I);mxUtils.br(y);var F=document.createElement("input");F.setAttribute("id","geFindWinAllPagesChck");F.setAttribute("type","checkbox");F.style.marginRight="4px";y.appendChild(F);I=document.createElement("label");I.setAttribute("for","geFindWinAllPagesChck");y.appendChild(I);mxUtils.write(I,mxResources.get("allPages"));y.appendChild(I);var J=document.createElement("div");mxUtils.br(y);I=document.createElement("div");I.style.left="0px";I.style.right="0px";I.style.marginTop= -"6px";I.style.padding="0 6px 0 6px";I.style.textAlign="center";y.appendChild(I);var M=mxUtils.button(mxResources.get("reset"),function(){G.innerText="";N.value="";N.style.backgroundColor="";x&&(t.value="",D());g=q=null;n=!1;N.focus()});M.setAttribute("title",mxResources.get("reset"));M.style.float="none";M.style.width="120px";M.style.marginTop="6px";M.style.marginLeft="8px";M.style.overflow="hidden";M.style.textOverflow="ellipsis";M.className="geBtn";x||I.appendChild(M);var H=mxUtils.button(mxResources.get("find"), -function(){try{N.style.backgroundColor=K()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(U){b.handleError(U)}});H.setAttribute("title",mxResources.get("find")+" (Enter)");H.style.float="none";H.style.width="120px";H.style.marginTop="6px";H.style.marginLeft="8px";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.className="geBtn gePrimaryBtn";I.appendChild(H);var G=document.createElement("div");G.style.marginTop="10px";if(x){var E=function(U,V,l,A,L){if(null==L||"1"!=L.html)return A=U.toLowerCase().indexOf(V, -A),0>A?U:U.substr(0,A)+l+U.substr(A+V.length);var Q=U;V=mxUtils.htmlEntities(V);L=[];var O=-1;for(U=U.replace(/<br>/ig,"\n");-1<(O=U.indexOf("<",O+1));)L.push(O);O=U.match(/<[^>]*>/g);U=U.replace(/<[^>]*>/g,"");A=U.toLowerCase().indexOf(V,A);if(0>A)return Q;Q=A+V.length;l=mxUtils.htmlEntities(l);U=U.substr(0,A)+l+U.substr(Q);for(var R=0,S=0;S<L.length;S++){if(L[S]-R<A)U=U.substr(0,L[S])+O[S]+U.substr(L[S]);else{var X=L[S]-R<Q?A+R:L[S]+(l.length-V.length);U=U.substr(0,X)+O[S]+U.substr(X)}R+=O[S].length}return U.replace(/\n/g, -"<br>")},P=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=z&&null!=q&&t.value){var U=q.cell,V=e.getLabel(U);e.isCellEditable(U)&&e.model.setValue(U,E(V,z,t.value,C-z.length,e.getCurrentCellStyle(U)));N.style.backgroundColor=K(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(l){b.handleError(l)}});P.setAttribute("title",mxResources.get("replFind"));P.style.float="none";P.style.width="120px";P.style.marginTop="6px";P.style.marginLeft="8px";P.style.overflow="hidden";P.style.textOverflow= -"ellipsis";P.className="geBtn gePrimaryBtn";P.setAttribute("disabled","disabled");I.appendChild(P);mxUtils.br(I);var T=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=z&&null!=q&&t.value){var U=q.cell,V=e.getLabel(U);e.model.setValue(U,E(V,z,t.value,C-z.length,e.getCurrentCellStyle(U)));P.setAttribute("disabled","disabled");T.setAttribute("disabled","disabled")}}catch(l){b.handleError(l)}});T.setAttribute("title",mxResources.get("replace"));T.style.float="none";T.style.width="120px"; -T.style.marginTop="6px";T.style.marginLeft="8px";T.style.overflow="hidden";T.style.textOverflow="ellipsis";T.className="geBtn gePrimaryBtn";T.setAttribute("disabled","disabled");I.appendChild(T);var W=mxUtils.button(mxResources.get("replaceAll"),function(){G.innerText="";if(t.value){g=null;var U=b.currentPage,V=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;e.getModel().beginUpdate();try{for(var l=0,A={};K(!1,!0,!0)&&100>l;){var L=q.cell,Q=e.getLabel(L),O=A[L.id];if(O&&O.replAllMrk== -v&&O.replAllPos>=C)break;A[L.id]={replAllMrk:v,replAllPos:C};e.isCellEditable(L)&&(e.model.setValue(L,E(Q,z,t.value,C-z.length,e.getCurrentCellStyle(L))),l++)}U!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,U));mxUtils.write(G,mxResources.get("matchesRepl",[l]))}catch(R){b.handleError(R)}finally{e.getModel().endUpdate(),b.editor.graph.setSelectionCells(V),b.editor.graph.rendering=!0}v++}});W.setAttribute("title",mxResources.get("replaceAll"));W.style.float="none";W.style.width="120px"; -W.style.marginTop="6px";W.style.marginLeft="8px";W.style.overflow="hidden";W.style.textOverflow="ellipsis";W.className="geBtn gePrimaryBtn";W.setAttribute("disabled","disabled");I.appendChild(W);mxUtils.br(I);I.appendChild(M);M=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));M.setAttribute("title",mxResources.get("close"));M.style.float="none";M.style.width="120px";M.style.marginTop="6px";M.style.marginLeft="8px";M.style.overflow="hidden";M.style.textOverflow= -"ellipsis";M.className="geBtn";I.appendChild(M);mxUtils.br(I);I.appendChild(G)}else M.style.width="90px",H.style.width="90px";mxEvent.addListener(N,"keyup",function(U){if(91==U.keyCode||93==U.keyCode||17==U.keyCode)mxEvent.consume(U);else if(27==U.keyCode)c.funct();else if(g!=N.value.toLowerCase()||13==U.keyCode)try{N.style.backgroundColor=K()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(V){N.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(y,"keydown",function(U){70== -U.keyCode&&b.keyHandler.isControlDown(U)&&!mxEvent.isShiftDown(U)&&(c.funct(),mxEvent.consume(U))});this.window=new mxWindow(mxResources.get("find")+(x?"/"+mxResources.get("replace"):""),y,f,k,d,u,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(N.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?N.select(): -document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?F.removeAttribute("disabled"):(F.checked=!1,F.setAttribute("disabled","disabled"))):e.container.focus()}));b.installResizeHandler(this,!1)},FreehandWindow=function(b,f,k,d,u,x){var B=b.editor.graph,D=document.createElement("div");D.style.textAlign="center";D.style.userSelect="none";D.style.overflow="hidden";D.style.height="100%";if(x){var K=document.createElement("input");K.setAttribute("id","geFreehandBrush");K.setAttribute("type", -"checkbox");K.checked=B.freehand.isPerfectFreehandMode();K.style.margin="10px 5px 0px 10px";K.style.float="left";D.appendChild(K);var c=document.createElement("label");c.setAttribute("for","geFreehandBrush");c.style.float="left";c.style.marginTop="10px";D.appendChild(c);mxUtils.write(c,mxResources.get("brush"));D.appendChild(c);mxUtils.br(D);var e=document.createElement("input");e.setAttribute("type","range");e.setAttribute("min","2");e.setAttribute("max","30");e.setAttribute("value",B.freehand.getBrushSize()); -e.style.width="90%";e.style.visibility="hidden";D.appendChild(e);mxUtils.br(D);c=function(){B.freehand.setPerfectFreehandMode(K.checked);e.style.visibility=K.checked?"visible":"hidden"};mxEvent.addListener(K,"change",c);c();mxEvent.addListener(e,"change",function(){B.freehand.setBrushSize(parseInt(this.value))})}var g=mxUtils.button(mxResources.get("startDrawing"),function(){B.freehand.isDrawing()?B.freehand.stopDrawing():B.freehand.startDrawing()});g.setAttribute("title",mxResources.get("startDrawing")); -g.style.marginTop=x?"5px":"10px";g.style.width="90%";g.style.boxSizing="border-box";g.style.overflow="hidden";g.style.textOverflow="ellipsis";g.style.textAlign="center";g.className="geBtn gePrimaryBtn";D.appendChild(g);this.window=new mxWindow(mxResources.get("freehand"),D,f,k,d,u,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);B.addListener("freehandStateChanged",mxUtils.bind(this,function(){g.innerText="";mxUtils.write(g, -mxResources.get(B.freehand.isDrawing()?"stopDrawing":"startDrawing"));g.setAttribute("title",mxResources.get(B.freehand.isDrawing()?"stopDrawing":"startDrawing"));g.className="geBtn"+(B.freehand.isDrawing()?"":" gePrimaryBtn")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){B.freehand.isDrawing()&&B.freehand.stopDrawing()}));b.installResizeHandler(this,!1)},TagsWindow=function(b,f,k,d,u){var x=b.editor.graph, -B=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(K,c){if(x.isEnabled()){var e=new FilenameDialog(b,"",mxResources.get("add"),function(g){b.hideDialog();if(null!=g&&0<g.length){g=g.split(" ");for(var q=[],m=0;m<g.length;m++){var n=mxUtils.trim(g[m]);""!=n&&0>mxUtils.indexOf(K,n)&&q.push(n)}0<q.length&&(x.isSelectionEmpty()?c(K.concat(q)):x.addTagsForCells(x.getSelectionCells(),q))}},mxResources.get("enterValue")+" ("+mxResources.get("tags")+ -")");b.showDialog(e.container,300,80,!0,!0);e.init()}}),D=B.div;this.window=new mxWindow(mxResources.get("tags"),D,f,k,d,u,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){B.refresh();this.window.fit()}));b.installResizeHandler(this,!0)},AuthDialog=function(b,f,k,d){var u=document.createElement("div");u.style.textAlign= -"center";var x=document.createElement("p");x.style.fontSize="16pt";x.style.padding="0px";x.style.margin="0px";x.style.color="gray";mxUtils.write(x,mxResources.get("authorizationRequired"));var B="Unknown",D=document.createElement("img");D.setAttribute("border","0");D.setAttribute("align","absmiddle");D.style.marginRight="10px";f==b.drive?(B=mxResources.get("googleDrive"),D.src=IMAGE_PATH+"/google-drive-logo-white.svg"):f==b.dropbox?(B=mxResources.get("dropbox"),D.src=IMAGE_PATH+"/dropbox-logo-white.svg"): -f==b.oneDrive?(B=mxResources.get("oneDrive"),D.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(B=mxResources.get("github"),D.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?(B=mxResources.get("gitlab"),D.src=IMAGE_PATH+"/gitlab-logo.svg",D.style.width="32px"):f==b.trello&&(B=mxResources.get("trello"),D.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[B]));var K=document.createElement("input");K.setAttribute("type", -"checkbox");B=mxUtils.button(mxResources.get("authorize"),function(){d(K.checked)});B.insertBefore(D,B.firstChild);B.style.marginTop="6px";B.className="geBigButton";B.style.fontSize="18px";B.style.padding="14px";u.appendChild(x);u.appendChild(b);u.appendChild(B);k&&(k=document.createElement("p"),k.style.marginTop="20px",k.appendChild(K),x=document.createElement("span"),mxUtils.write(x," "+mxResources.get("rememberMe")),k.appendChild(x),u.appendChild(k),K.checked=!0,K.defaultChecked=!0,mxEvent.addListener(x, -"click",function(c){K.checked=!K.checked;mxEvent.consume(c)}));this.container=u},MoreShapesDialog=function(b,f,k){k=null!=k?k:b.sidebar.entries;var d=document.createElement("div"),u=[];if(null!=b.sidebar.customEntries)for(var x=0;x<b.sidebar.customEntries.length;x++){for(var B=b.sidebar.customEntries[x],D={title:b.getResource(B.title),entries:[]},K=0;K<B.entries.length;K++){var c=B.entries[K];D.entries.push({id:c.id,title:b.getResource(c.title),desc:b.getResource(c.desc),image:c.preview})}u.push(D)}for(x= -0;x<k.length;x++)if(null==b.sidebar.enabledLibraries)u.push(k[x]);else{D={title:k[x].title,entries:[]};for(K=0;K<k[x].entries.length;K++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,k[x].entries[K].id)&&D.entries.push(k[x].entries[K]);0<D.entries.length&&u.push(D)}k=u;if(f){x=mxUtils.bind(this,function(p){for(var F=0;F<p.length;F++)(function(J){var M=n.cloneNode(!1);M.style.fontWeight="bold";M.style.backgroundColor=Editor.isDarkMode()?"#505759":"#e5e5e5";M.style.padding="6px 0px 6px 20px";mxUtils.write(M, -J.title);e.appendChild(M);for(var H=0;H<J.entries.length;H++)(function(G){var E=n.cloneNode(!1);E.style.cursor="pointer";E.style.padding="4px 0px 4px 20px";E.style.whiteSpace="nowrap";E.style.overflow="hidden";E.style.textOverflow="ellipsis";E.setAttribute("title",G.title+" ("+G.id+")");var P=document.createElement("input");P.setAttribute("type","checkbox");P.checked=b.sidebar.isEntryVisible(G.id);P.defaultChecked=P.checked;E.appendChild(P);mxUtils.write(E," "+G.title);e.appendChild(E);var T=function(W){if(null== -W||"INPUT"!=mxEvent.getSource(W).nodeName){g.style.textAlign="center";g.style.padding="0px";g.style.color="";g.innerText="";if(null!=G.desc){var U=document.createElement("pre");U.style.boxSizing="border-box";U.style.fontFamily="inherit";U.style.margin="20px";U.style.right="0px";U.style.textAlign="left";mxUtils.write(U,G.desc);g.appendChild(U)}null!=G.imageCallback?G.imageCallback(g):null!=G.image?g.innerHTML+='<img border="0" src="'+G.image+'"/>':null==G.desc&&(g.style.padding="20px",g.style.color= -"rgb(179, 179, 179)",mxUtils.write(g,mxResources.get("noPreview")));null!=q&&(q.style.backgroundColor="");q=E;q.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=W&&mxEvent.consume(W)}};mxEvent.addListener(E,"click",T);mxEvent.addListener(E,"dblclick",function(W){P.checked=!P.checked;mxEvent.consume(W)});m.push(function(){return P.checked?G.id:null});0==F&&0==H&&T()})(J.entries[H])})(p[F])});K=document.createElement("div");K.className="geDialogTitle";mxUtils.write(K,mxResources.get("shapes")); -K.style.position="absolute";K.style.top="0px";K.style.left="0px";K.style.lineHeight="40px";K.style.height="40px";K.style.right="0px";var e=document.createElement("div"),g=document.createElement("div");e.style.position="absolute";e.style.top="40px";e.style.left="0px";e.style.width="202px";e.style.bottom="60px";e.style.overflow="auto";g.style.position="absolute";g.style.left="202px";g.style.right="0px";g.style.top="40px";g.style.bottom="60px";g.style.overflow="auto";g.style.borderLeft="1px solid rgb(211, 211, 211)"; -g.style.textAlign="center";var q=null,m=[],n=document.createElement("div");n.style.position="relative";n.style.left="0px";n.style.right="0px";x(k);d.style.padding="30px";d.appendChild(K);d.appendChild(e);d.appendChild(g);k=document.createElement("div");k.className="geDialogFooter";k.style.position="absolute";k.style.paddingRight="16px";k.style.color="gray";k.style.left="0px";k.style.right="0px";k.style.bottom="0px";k.style.height="60px";k.style.lineHeight="52px";var z=document.createElement("input"); -z.setAttribute("type","checkbox");z.style.position="relative";z.style.top="1px";z.checked=b.sidebar.sidebarTitles;z.defaultChecked=z.checked;k.appendChild(z);x=document.createElement("span");mxUtils.write(x," "+mxResources.get("labels"));x.style.paddingRight="20px";k.appendChild(x);mxEvent.addListener(x,"click",function(p){z.checked=!z.checked;mxEvent.consume(p)});var C=document.createElement("input");C.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)x=document.createElement("span"), -x.style.paddingRight="20px",x.appendChild(C),mxUtils.write(x," "+mxResources.get("rememberThisSetting")),C.style.position="relative",C.style.top="1px",C.checked=!0,C.defaultChecked=!0,mxEvent.addListener(x,"click",function(p){mxEvent.getSource(p)!=C&&(C.checked=!C.checked,mxEvent.consume(p))}),k.appendChild(x);x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";K=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var p=[],F=0;F<m.length;F++){var J= -m[F].apply(this,arguments);null!=J&&p.push(J)}"1"==urlParams.sketch&&b.isSettingsEnabled()&&(F=mxUtils.indexOf(p,".scratchpad"),null!=b.scratchpad!=(0<=F&&0<p.splice(F,1).length)&&b.toggleScratchpad(),F=mxUtils.indexOf(p,"search"),mxSettings.settings.search=0<=F&&0<p.splice(F,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),C.checked&&mxSettings.save());b.sidebar.showEntries(p.join(";"),C.checked,!0);b.setSidebarTitles(z.checked,C.checked)});K.className="geBtn gePrimaryBtn"}else{var v= -document.createElement("table");x=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";K=document.createElement("tr");v.style.width="100%";f=document.createElement("td");u=document.createElement("td");B=document.createElement("td");var y=mxUtils.bind(this,function(p,F,J){var M=document.createElement("input");M.type="checkbox";v.appendChild(M);M.checked=b.sidebar.isEntryVisible(J);var H=document.createElement("span");mxUtils.write(H,F);F=document.createElement("div");F.style.display= -"block";F.appendChild(M);F.appendChild(H);mxEvent.addListener(H,"click",function(G){M.checked=!M.checked;mxEvent.consume(G)});p.appendChild(F);return function(){return M.checked?J:null}});K.appendChild(f);K.appendChild(u);K.appendChild(B);x.appendChild(K);v.appendChild(x);m=[];var I=0;for(x=0;x<k.length;x++)for(K=0;K<k[x].entries.length;K++)I++;var N=[f,u,B],t=0;for(x=0;x<k.length;x++)(function(p){for(var F=0;F<p.entries.length;F++){var J=p.entries[F];m.push(y(N[Math.floor(t/(I/3))],J.title,J.id)); -t++}})(k[x]);d.appendChild(v);k=document.createElement("div");k.style.marginTop="18px";k.style.textAlign="center";C=document.createElement("input");isLocalStorage&&(C.setAttribute("type","checkbox"),C.checked=!0,C.defaultChecked=!0,k.appendChild(C),x=document.createElement("span"),mxUtils.write(x," "+mxResources.get("rememberThisSetting")),k.appendChild(x),mxEvent.addListener(x,"click",function(p){C.checked=!C.checked;mxEvent.consume(p)}));d.appendChild(k);x=mxUtils.button(mxResources.get("cancel"), -function(){b.hideDialog()});x.className="geBtn";K=mxUtils.button(mxResources.get("apply"),function(){for(var p=["search"],F=0;F<m.length;F++){var J=m[F].apply(this,arguments);null!=J&&p.push(J)}b.sidebar.showEntries(0<p.length?p.join(";"):"",C.checked);b.hideDialog()});K.className="geBtn gePrimaryBtn";k=document.createElement("div");k.style.marginTop="26px";k.style.textAlign="right"}b.editor.cancelFirst?(k.appendChild(x),k.appendChild(K)):(k.appendChild(K),k.appendChild(x));d.appendChild(k);this.container= -d},PluginsDialog=function(b,f,k,d){function u(){K=!0;if(0==D.length)B.innerText=mxResources.get("noPlugins");else{B.innerText="";for(var n=0;n<D.length;n++){var z=document.createElement("span");z.style.whiteSpace="nowrap";var C=document.createElement("span");C.className="geSprite geSprite-delete";C.style.position="relative";C.style.cursor="pointer";C.style.top="5px";C.style.marginRight="4px";C.style.display="inline-block";z.appendChild(C);mxUtils.write(z,D[n]);B.appendChild(z);mxUtils.br(B);mxEvent.addListener(C, -"click",function(v){return function(){b.confirm(mxResources.get("delete")+' "'+D[v]+'"?',function(){null!=k&&k(D[v]);D.splice(v,1);u()})}}(n))}}}var x=document.createElement("div"),B=document.createElement("div");B.style.height="180px";B.style.overflow="auto";var D=mxSettings.getPlugins().slice(),K=!1;x.appendChild(B);u();K=!1;var c=mxUtils.button(mxResources.get("add"),null!=f?function(){f(function(n){n&&0>mxUtils.indexOf(D,n)&&D.push(n);u()})}:function(){var n=document.createElement("div"),z=document.createElement("span"); -z.style.marginTop="6px";mxUtils.write(z,mxResources.get("builtinPlugins")+": ");n.appendChild(z);var C=document.createElement("select");C.style.width="150px";for(z=0;z<App.publicPlugin.length;z++){var v=document.createElement("option");mxUtils.write(v,App.publicPlugin[z]);v.value=App.publicPlugin[z];C.appendChild(v)}n.appendChild(C);mxUtils.br(n);mxUtils.br(n);z=mxUtils.button(mxResources.get("custom")+"...",function(){var y=new FilenameDialog(b,"",mxResources.get("add"),function(I){b.hideDialog(); -if(null!=I&&0<I.length){I=I.split(";");for(var N=0;N<I.length;N++){var t=I[N],p=App.pluginRegistry[t];null!=p&&(t=p);0<t.length&&0>mxUtils.indexOf(D,t)&&D.push(t)}u()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(y.container,300,80,!0,!0);y.init()});z.className="geBtn";n=new CustomDialog(b,n,mxUtils.bind(this,function(){var y=App.pluginRegistry[C.value];0>mxUtils.indexOf(D,y)&&(D.push(y),u())}),null,null,null,z);b.showDialog(n.container,300,100,!0,!0)});c.className= -"geBtn";var e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});e.className="geBtn";var g=mxUtils.button(d?mxResources.get("close"):mxResources.get("apply"),function(){K?(mxSettings.setPlugins(D),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});g.className="geBtn gePrimaryBtn";var q=document.createElement("div");q.style.marginTop="14px";q.style.textAlign="right";var m=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/plugins")}); -m.className="geBtn";b.isOffline()&&!mxClient.IS_CHROMEAPP&&(m.style.display="none");q.appendChild(m);b.editor.cancelFirst?(d||q.appendChild(e),q.appendChild(c),q.appendChild(g)):(q.appendChild(c),q.appendChild(g),d||q.appendChild(e));x.appendChild(q);this.container=x},CropImageDialog=function(b,f,k,d){function u(){var p=C.checked,F=v.checked,J=m.geometry,M=K.width,H=K.height,G=(300-M)/2,E=(300-H)/2;J.x<G?(J.width-=G-J.x,J.x=G):J.x+J.width>G+M&&(J.width=G+M-J.x,J.x=Math.min(J.x,G+M));J.y<E?(J.height-= -E-J.y,J.y=E):J.y+J.height>E+H&&(J.height=E+H-J.y,J.y=Math.min(J.y,E+H));var P=(J.x-G)/M*100;M=100-(J.x+J.width-G)/M*100;G=(J.y-E)/H*100;J=100-(J.y+J.height-E)/H*100;return"inset("+mxUtils.format(G)+"% "+mxUtils.format(M)+"% "+mxUtils.format(J)+"% "+mxUtils.format(P)+"%"+(p?" round "+q+"%":F?" round 50%":"")+")"}function x(p){null!=e&&(!0!==p&&(e.model.setGeometry(m,g.clone()),q=5,I.value=q),e.model.setStyle(m,n+u()),e.selectAll(),y.style.visibility=C.checked?"visible":"hidden")}var B=document.createElement("div"), -D=document.createElement("div");D.style.height="300px";D.style.width="300px";D.style.display="inline-flex";D.style.justifyContent="center";D.style.alignItems="center";D.style.position="absolute";var K=document.createElement("img");K.onload=function(){function p(){e.model.setStyle(m,n+u())}e=new Graph(c);e.autoExtend=!1;e.autoScroll=!1;e.setGridEnabled(!1);e.setEnabled(!0);e.setPanning(!1);e.setConnectable(!1);e.getRubberband().setEnabled(!1);e.graphHandler.allowLivePreview=!1;var F=e.createVertexHandler; -e.createVertexHandler=function(){var Q=F.apply(this,arguments);Q.livePreview=!1;return Q};if(null!=k)try{if("inset"==k.substring(0,5)){var J=m.geometry,M=K.width,H=K.height,G=(300-M)/2,E=(300-H)/2,P=k.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),T=parseFloat(P[0]),W=parseFloat(P[1]),U=parseFloat(P[2]),V=parseFloat(P[3]);isFinite(T)&&isFinite(W)&&isFinite(U)&&isFinite(V)?(J.x=V/100*M+G,J.y=T/100*H+E,J.width=(100-W)/100*M+G-J.x,J.height=(100-U)/100*H+E-J.y,"round"==P[4]?"50%"==P[5]?v.setAttribute("checked", -"checked"):(q=parseInt(P[5]),I.value=q,C.setAttribute("checked","checked"),y.style.visibility="visible"):z.setAttribute("checked","checked")):k=null}else k=null}catch(Q){}m.style=n+(k?k:u());m.vertex=!0;e.addCell(m,null,null,null,null);e.selectAll();e.addListener(mxEvent.CELLS_MOVED,p);e.addListener(mxEvent.CELLS_RESIZED,p);var l=e.graphHandler.mouseUp,A=e.graphHandler.mouseDown;e.graphHandler.mouseUp=function(){l.apply(this,arguments);c.style.backgroundColor="#fff9"};e.graphHandler.mouseDown=function(){A.apply(this, -arguments);c.style.backgroundColor=""};e.dblClick=function(){};var L=e.getSelectionModel().changeSelection;e.getSelectionModel().changeSelection=function(){L.call(this,[m],[m])}};K.onerror=function(){K.onload=null;K.src=Editor.errorImage};K.setAttribute("src",f);K.style.maxWidth="300px";K.style.maxHeight="300px";D.appendChild(K);B.appendChild(D);var c=document.createElement("div");c.style.width="300px";c.style.height="300px";c.style.overflow="hidden";c.style.backgroundColor="#fff9";B.appendChild(c); -var e=null,g=new mxGeometry(100,100,100,100),q=5,m=new mxCell("",g.clone(),""),n="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+f.replace(";base64","")+";clipPath=",z=document.createElement("input");z.setAttribute("type","radio");z.setAttribute("id","croppingRect");z.setAttribute("name","croppingShape");z.setAttribute("checked","checked");z.style.margin="5px";B.appendChild(z);f=document.createElement("label");f.setAttribute("for","croppingRect");mxUtils.write(f,mxResources.get("rectangle")); -B.appendChild(f);var C=document.createElement("input");C.setAttribute("type","radio");C.setAttribute("id","croppingRounded");C.setAttribute("name","croppingShape");C.style.margin="5px";B.appendChild(C);f=document.createElement("label");f.setAttribute("for","croppingRounded");mxUtils.write(f,mxResources.get("rounded"));B.appendChild(f);var v=document.createElement("input");v.setAttribute("type","radio");v.setAttribute("id","croppingEllipse");v.setAttribute("name","croppingShape");v.style.margin="5px"; -B.appendChild(v);f=document.createElement("label");f.setAttribute("for","croppingEllipse");mxUtils.write(f,mxResources.get("ellipse"));B.appendChild(f);mxEvent.addListener(z,"change",x);mxEvent.addListener(C,"change",x);mxEvent.addListener(v,"change",x);var y=document.createElement("div");y.style.textAlign="center";y.style.visibility="hidden";var I=document.createElement("input");I.setAttribute("type","range");I.setAttribute("min","1");I.setAttribute("max","49");I.setAttribute("value",q);I.setAttribute("title", -mxResources.get("arcSize"));y.appendChild(I);B.appendChild(y);mxEvent.addListener(I,"change",function(){q=this.value;x(!0)});f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";D=mxUtils.button(mxResources.get("apply"),function(){d(u(),m.geometry.width,m.geometry.height);b.hideDialog()});D.className="geBtn gePrimaryBtn";var N=mxUtils.button(mxResources.get("reset"),function(){d(null,K.width,K.height);b.hideDialog()});N.className="geBtn";var t=document.createElement("div"); -t.style.marginTop="10px";t.style.textAlign="right";b.editor.cancelFirst?(t.appendChild(f),t.appendChild(N),t.appendChild(D)):(t.appendChild(N),t.appendChild(D),t.appendChild(f));B.appendChild(t);this.container=B},EditGeometryDialog=function(b,f){var k=b.editor.graph,d=1==f.length?k.getCellGeometry(f[0]):null,u=document.createElement("div"),x=document.createElement("table"),B=document.createElement("tbody"),D=document.createElement("tr"),K=document.createElement("td"),c=document.createElement("td"); -x.style.paddingLeft="6px";mxUtils.write(K,mxResources.get("relative")+":");var e=document.createElement("input");e.setAttribute("type","checkbox");null!=d&&d.relative&&(e.setAttribute("checked","checked"),e.defaultChecked=!0);this.init=function(){e.focus()};c.appendChild(e);D.appendChild(K);D.appendChild(c);B.appendChild(D);D=document.createElement("tr");K=document.createElement("td");c=document.createElement("td");mxUtils.write(K,mxResources.get("left")+":");var g=document.createElement("input"); -g.setAttribute("type","text");g.style.width="100px";g.value=null!=d?d.x:"";c.appendChild(g);D.appendChild(K);D.appendChild(c);B.appendChild(D);D=document.createElement("tr");K=document.createElement("td");c=document.createElement("td");mxUtils.write(K,mxResources.get("top")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=d?d.y:"";c.appendChild(q);D.appendChild(K);D.appendChild(c);B.appendChild(D);D=document.createElement("tr");K=document.createElement("td"); -c=document.createElement("td");mxUtils.write(K,mxResources.get("dx")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.width="100px";m.value=null!=d&&null!=d.offset?d.offset.x:"";c.appendChild(m);D.appendChild(K);D.appendChild(c);B.appendChild(D);D=document.createElement("tr");K=document.createElement("td");c=document.createElement("td");mxUtils.write(K,mxResources.get("dy")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px"; -n.value=null!=d&&null!=d.offset?d.offset.y:"";c.appendChild(n);D.appendChild(K);D.appendChild(c);B.appendChild(D);D=document.createElement("tr");K=document.createElement("td");c=document.createElement("td");mxUtils.write(K,mxResources.get("width")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.width="100px";z.value=null!=d?d.width:"";c.appendChild(z);D.appendChild(K);D.appendChild(c);B.appendChild(D);D=document.createElement("tr");K=document.createElement("td");c= -document.createElement("td");mxUtils.write(K,mxResources.get("height")+":");var C=document.createElement("input");C.setAttribute("type","text");C.style.width="100px";C.value=null!=d?d.height:"";c.appendChild(C);D.appendChild(K);D.appendChild(c);B.appendChild(D);D=document.createElement("tr");K=document.createElement("td");c=document.createElement("td");mxUtils.write(K,mxResources.get("rotation")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value= -1==f.length?mxUtils.getValue(k.getCellStyle(f[0]),mxConstants.STYLE_ROTATION,0):"";c.appendChild(v);D.appendChild(K);D.appendChild(c);B.appendChild(D);x.appendChild(B);u.appendChild(x);d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.className="geBtn";var y=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();k.getModel().beginUpdate();try{for(var I=0;I<f.length;I++){var N=k.getCellGeometry(f[I]);null!=N&&(N=N.clone(),k.isCellMovable(f[I])&&(N.relative=e.checked, -0<mxUtils.trim(g.value).length&&(N.x=Number(g.value)),0<mxUtils.trim(q.value).length&&(N.y=Number(q.value)),0<mxUtils.trim(m.value).length&&(null==N.offset&&(N.offset=new mxPoint),N.offset.x=Number(m.value)),0<mxUtils.trim(n.value).length&&(null==N.offset&&(N.offset=new mxPoint),N.offset.y=Number(n.value))),k.isCellResizable(f[I])&&(0<mxUtils.trim(z.value).length&&(N.width=Number(z.value)),0<mxUtils.trim(C.value).length&&(N.height=Number(C.value))),k.getModel().setGeometry(f[I],N));0<mxUtils.trim(v.value).length&& -k.setCellStyles(mxConstants.STYLE_ROTATION,Number(v.value),[f[I]])}}finally{k.getModel().endUpdate()}});y.className="geBtn gePrimaryBtn";mxEvent.addListener(u,"keypress",function(I){13==I.keyCode&&y.click()});x=document.createElement("div");x.style.marginTop="20px";x.style.textAlign="right";b.editor.cancelFirst?(x.appendChild(d),x.appendChild(y)):(x.appendChild(y),x.appendChild(d));u.appendChild(x);this.container=u},LibraryDialog=function(b,f,k,d,u,x){function B(F){for(F=document.elementFromPoint(F.clientX, -F.clientY);null!=F&&F.parentNode!=m;)F=F.parentNode;var J=null;if(null!=F){var M=m.firstChild;for(J=0;null!=M&&M!=F;)M=M.nextSibling,J++}return J}function D(F,J,M,H,G,E,P,T,W){try{if(b.spinner.stop(),null==J||"image/"==J.substring(0,6))if(null==F&&null!=P||null==z[F]){var U=function(){S.innerText="";S.style.cursor="pointer";S.style.whiteSpace="nowrap";S.style.textOverflow="ellipsis";mxUtils.write(S,null!=X.title&&0<X.title.length?X.title:mxResources.get("untitled"));S.style.color=null==X.title||0== -X.title.length?"#d0d0d0":""};m.style.backgroundImage="";n.style.display="none";var V=G,l=E;if(G>b.maxImageSize||E>b.maxImageSize){var A=Math.min(1,Math.min(b.maxImageSize/Math.max(1,G)),b.maxImageSize/Math.max(1,E));G*=A;E*=A}V>l?(l=Math.round(100*l/V),V=100):(V=Math.round(100*V/l),l=100);var L=document.createElement("div");L.setAttribute("draggable","true");L.style.display="inline-block";L.style.position="relative";L.style.padding="0 12px";L.style.cursor="move";mxUtils.setPrefixedStyle(L.style,"transition", -"transform .1s ease-in-out");if(null!=F){var Q=document.createElement("img");Q.setAttribute("src",I.convert(F));Q.style.width=V+"px";Q.style.height=l+"px";Q.style.margin="10px";Q.style.paddingBottom=Math.floor((100-l)/2)+"px";Q.style.paddingLeft=Math.floor((100-V)/2)+"px";L.appendChild(Q)}else if(null!=P){var O=b.stringToCells(Graph.decompress(P.xml));0<O.length&&(b.sidebar.createThumb(O,100,100,L,null,!0,!1),L.firstChild.style.display="inline-block",L.firstChild.style.cursor="")}var R=document.createElement("img"); -R.setAttribute("src",Editor.closeBlackImage);R.setAttribute("border","0");R.setAttribute("title",mxResources.get("delete"));R.setAttribute("align","top");R.style.paddingTop="4px";R.style.position="absolute";R.style.marginLeft="-12px";R.style.zIndex="1";R.style.cursor="pointer";mxEvent.addListener(R,"dragstart",function(ca){mxEvent.consume(ca)});(function(ca,fa,la){mxEvent.addListener(R,"click",function(ia){z[fa]=null;for(var qa=0;qa<e.length;qa++)if(null!=e[qa].data&&e[qa].data==fa||null!=e[qa].xml&& -null!=la&&e[qa].xml==la.xml){e.splice(qa,1);break}L.parentNode.removeChild(ca);0==e.length&&(m.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",n.style.display="");mxEvent.consume(ia)});mxEvent.addListener(R,"dblclick",function(ia){mxEvent.consume(ia)})})(L,F,P);L.appendChild(R);L.style.marginBottom="30px";var S=document.createElement("div");S.style.position="absolute";S.style.boxSizing="border-box";S.style.bottom="-18px";S.style.left="10px";S.style.right="10px";S.style.backgroundColor= -Editor.isDarkMode()?Editor.darkColor:"#ffffff";S.style.overflow="hidden";S.style.textAlign="center";var X=null;null!=F?(X={data:F,w:G,h:E,title:W},null!=T&&(X.aspect=T),z[F]=Q,e.push(X)):null!=P&&(P.aspect="fixed",e.push(P),X=P);mxEvent.addListener(S,"keydown",function(ca){13==ca.keyCode&&null!=y&&(y(),y=null,mxEvent.consume(ca))});U();L.appendChild(S);mxEvent.addListener(S,"mousedown",function(ca){"true"!=S.getAttribute("contentEditable")&&mxEvent.consume(ca)});O=function(ca){if(mxClient.IS_IOS|| -mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var fa=new FilenameDialog(b,X.title||"",mxResources.get("ok"),function(la){null!=la&&(X.title=la,U())},mxResources.get("enterValue"));b.showDialog(fa.container,300,80,!0,!0);fa.init();mxEvent.consume(ca)}else if("true"!=S.getAttribute("contentEditable")){null!=y&&(y(),y=null);if(null==X.title||0==X.title.length)S.innerText="";S.style.textOverflow="";S.style.whiteSpace="";S.style.cursor="text";S.style.color="";S.setAttribute("contentEditable", -"true");mxUtils.setPrefixedStyle(S.style,"user-select","text");S.focus();document.execCommand("selectAll",!1,null);y=function(){S.removeAttribute("contentEditable");S.style.cursor="pointer";X.title=S.innerHTML;U()};mxEvent.consume(ca)}};mxEvent.addListener(S,"click",O);mxEvent.addListener(L,"dblclick",O);m.appendChild(L);mxEvent.addListener(L,"dragstart",function(ca){null==F&&null!=P&&(R.style.visibility="hidden",S.style.visibility="hidden");mxClient.IS_FF&&null!=P.xml&&ca.dataTransfer.setData("Text", -P.xml);C=B(ca);mxClient.IS_GC&&(L.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(L.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(L,30);R.style.visibility="";S.style.visibility=""},0)});mxEvent.addListener(L,"dragend",function(ca){"hidden"==R.style.visibility&&(R.style.visibility="",S.style.visibility="");C=null;mxUtils.setOpacity(L,100);mxUtils.setPrefixedStyle(L.style,"transform",null)})}else N||(N=!0,b.handleError({message:mxResources.get("fileExists")}));else{G= -!1;try{if(V=mxUtils.parseXml(F),"mxlibrary"==V.documentElement.nodeName){l=JSON.parse(mxUtils.getTextContent(V.documentElement));if(null!=l&&0<l.length)for(var aa=0;aa<l.length;aa++)null!=l[aa].xml?D(null,null,0,0,0,0,l[aa]):D(l[aa].data,null,0,0,l[aa].w,l[aa].h,null,"fixed",l[aa].title);G=!0}else if("mxfile"==V.documentElement.nodeName){var Y=V.documentElement.getElementsByTagName("diagram");for(aa=0;aa<Y.length;aa++){l=mxUtils.getTextContent(Y[aa]);O=b.stringToCells(Graph.decompress(l));var Z=b.editor.graph.getBoundingBoxFromGeometry(O); -D(null,null,0,0,0,0,{xml:l,w:Z.width,h:Z.height})}G=!0}}catch(ca){}G||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ca){}return null}function K(F){F.dataTransfer.dropEffect=null!=C?"move":"copy";F.stopPropagation();F.preventDefault()}function c(F){F.stopPropagation();F.preventDefault();N=!1;v=B(F);if(null!=C)null!=v&&v<m.children.length?(e.splice(v>C?v-1:v,0,e.splice(C,1)[0]),m.insertBefore(m.children[C],m.children[v])):(e.push(e.splice(C,1)[0]),m.appendChild(m.children[C])); -else if(0<F.dataTransfer.files.length)b.importFiles(F.dataTransfer.files,0,0,b.maxImageSize,t(F));else if(0<=mxUtils.indexOf(F.dataTransfer.types,"text/uri-list")){var J=decodeURIComponent(F.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(J)||/(\.png)($|\?)/i.test(J)||/(\.gif)($|\?)/i.test(J)||/(\.svg)($|\?)/i.test(J))&&b.loadImage(J,function(M){D(J,null,0,0,M.width,M.height);m.scrollTop=m.scrollHeight})}F.stopPropagation();F.preventDefault()}var e=[];k=document.createElement("div"); +"bottom";F.style.marginRight="6px";F.style.display="none";v=mxUtils.button(v||mxResources.get("edit"),function(){e.apply(this,[g.value])});v.className="geBtn gePrimaryBtn";n=document.createElement("div");n.style.position="absolute";n.style.bottom="30px";n.style.right="40px";n.style.textAlign="right";z=document.createElement("div");z.className="geToolbarContainer";z.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init= +function(){function K(G){if(null!=G){var P=G.getAttribute("background");if(null==P||""==P||P==mxConstants.NONE)P=Editor.isDarkMode()?"transparent":"#ffffff";C.style.backgroundColor=P;(new mxCodec(G.ownerDocument)).decode(G,x.getModel());x.maxFitScale=1;x.fit(8);x.center()}return G}function D(G){null!=G&&(G=K(Editor.parseDiagramNode(G)));return G}mxEvent.addListener(F,"change",function(G){N=parseInt(F.value);D(t[N]);mxEvent.consume(G)});if("mxfile"==I.nodeName){var H=I.getElementsByTagName("diagram"); +t=[];for(var J=0;J<H.length;J++)t.push(H[J]);0<t.length&&D(t[N]);F.innerText="";if(1<t.length)for(F.style.display="",J=0;J<t.length;J++)H=document.createElement("option"),mxUtils.write(H,t[J].getAttribute("name")||mxResources.get("pageWithNumber",[J+1])),H.setAttribute("value",J),J==N&&H.setAttribute("selected","selected"),F.appendChild(H);else F.style.display="none"}else K(I)};z.appendChild(F);z.appendChild(k);z.appendChild(d);z.appendChild(m);z.appendChild(f);k=mxUtils.button(mxResources.get("cancel"), +function(){b.hideDialog(!0)});k.className="geBtn";E=null!=E?mxUtils.button(mxResources.get("ignore"),E):null;null!=E&&(E.className="geBtn");b.editor.cancelFirst?(n.appendChild(k),null!=E&&n.appendChild(E),n.appendChild(B),n.appendChild(v)):(n.appendChild(v),n.appendChild(B),null!=E&&n.appendChild(E),n.appendChild(k));c.appendChild(n);c.appendChild(z);this.container=c},FindWindow=function(b,f,k,e,u,v){function B(U,V,l,A){if("object"===typeof V.value&&null!=V.value.attributes){V=V.value.attributes; +for(var M=0;M<V.length;M++)if("label"!=V[M].nodeName){var Q=mxUtils.trim(V[M].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==U&&(A&&0<=Q.indexOf(l)||!A&&Q.substring(0,l.length)===l)||null!=U&&U.test(Q))return!0}}return!1}function E(){m&&t.value?(P.removeAttribute("disabled"),T.removeAttribute("disabled")):(P.setAttribute("disabled","disabled"),T.setAttribute("disabled","disabled"));t.value&&N.value?W.removeAttribute("disabled"):W.setAttribute("disabled","disabled")}function L(U, +V,l){J.innerText="";var A=d.model.getDescendants(d.model.getRoot()),M=N.value.toLowerCase(),Q=p.checked?new RegExp(M):null,O=null;z=null;g!=M&&(g=M,q=null,n=!1);var R=null==q;if(0<M.length){if(n){n=!1;for(var S,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){S=X;break}U=(S+1)%b.pages.length;q=null;do n=!1,A=b.pages[U],d=b.createTemporaryGraph(d.getStylesheet()),b.updatePageRoot(A),d.model.setRoot(A.root),U=(U+1)%b.pages.length;while(!L(!0,V,l)&&U!=S);q&&(q=null,l?b.editor.graph.model.execute(new SelectPage(b, +A)):b.selectPage(A));n=!1;d=b.editor.graph;return L(!0,V,l)}for(X=0;X<A.length;X++){S=d.view.getState(A[X]);V&&null!=Q&&(R=R||S==q);if(null!=S&&null!=S.cell.value&&(R||null==O)&&(d.model.isVertex(S.cell)||d.model.isEdge(S.cell))){null!=S.style&&"1"==S.style.html?(K.innerHTML=d.sanitizeHtml(d.getLabel(S.cell)),label=mxUtils.extractTextWithWhitespace([K])):label=d.getLabel(S.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var aa=0;V&&v&&null!=Q&&S==q&&(label=label.substr(C), +aa=C);var Y=""==t.value,Z=Y;if(null==Q&&(Z&&0<=label.indexOf(M)||!Z&&label.substring(0,M.length)===M||Y&&B(Q,S.cell,M,Z))||null!=Q&&(Q.test(label)||Y&&B(Q,S.cell,M,Z)))if(v&&(null!=Q?(Y=label.match(Q),null!=Y&&0<Y.length&&(z=Y[0].toLowerCase(),C=aa+Y.index+z.length)):(z=M,C=z.length)),R){O=S;break}else null==O&&(O=S)}R=R||S==q}}if(null!=O){if(X==A.length&&F.checked)return q=null,n=!0,L(!0,V,l);q=O;d.scrollCellToVisible(q.cell);d.isEnabled()&&!d.isCellLocked(q.cell)?l||d.getSelectionCell()==q.cell&& +1==d.getSelectionCount()||d.setSelectionCell(q.cell):d.highlightCell(q.cell)}else{if(!U&&F.checked)return n=!0,L(!0,V,l);d.isEnabled()&&!l&&d.clearSelection()}m=null!=O;v&&!U&&E();return 0==M.length||null!=O}var c=b.actions.get("findReplace"),d=b.editor.graph,g=null,q=null,m=!1,n=!1,z=null,C=0,x=1,y=document.createElement("div");y.style.userSelect="none";y.style.overflow="hidden";y.style.padding="10px";y.style.height="100%";var I=v?"260px":"200px",N=document.createElement("input");N.setAttribute("placeholder", +mxResources.get("find"));N.setAttribute("type","text");N.style.marginTop="4px";N.style.marginBottom="6px";N.style.width=I;N.style.fontSize="12px";N.style.borderRadius="4px";N.style.padding="6px";y.appendChild(N);mxUtils.br(y);if(v){var t=document.createElement("input");t.setAttribute("placeholder",mxResources.get("replaceWith"));t.setAttribute("type","text");t.style.marginTop="4px";t.style.marginBottom="6px";t.style.width=I;t.style.fontSize="12px";t.style.borderRadius="4px";t.style.padding="6px"; +y.appendChild(t);mxUtils.br(y);mxEvent.addListener(t,"input",E)}var p=document.createElement("input");p.setAttribute("id","geFindWinRegExChck");p.setAttribute("type","checkbox");p.style.marginRight="4px";y.appendChild(p);I=document.createElement("label");I.setAttribute("for","geFindWinRegExChck");y.appendChild(I);mxUtils.write(I,mxResources.get("regularExpression"));y.appendChild(I);I=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");I.style.position="relative";I.style.marginLeft= +"6px";I.style.top="-1px";y.appendChild(I);mxUtils.br(y);var F=document.createElement("input");F.setAttribute("id","geFindWinAllPagesChck");F.setAttribute("type","checkbox");F.style.marginRight="4px";y.appendChild(F);I=document.createElement("label");I.setAttribute("for","geFindWinAllPagesChck");y.appendChild(I);mxUtils.write(I,mxResources.get("allPages"));y.appendChild(I);var K=document.createElement("div");mxUtils.br(y);I=document.createElement("div");I.style.left="0px";I.style.right="0px";I.style.marginTop= +"6px";I.style.padding="0 6px 0 6px";I.style.textAlign="center";y.appendChild(I);var D=mxUtils.button(mxResources.get("reset"),function(){J.innerText="";N.value="";N.style.backgroundColor="";v&&(t.value="",E());g=q=null;n=!1;N.focus()});D.setAttribute("title",mxResources.get("reset"));D.style.float="none";D.style.width="120px";D.style.marginTop="6px";D.style.marginLeft="8px";D.style.overflow="hidden";D.style.textOverflow="ellipsis";D.className="geBtn";v||I.appendChild(D);var H=mxUtils.button(mxResources.get("find"), +function(){try{N.style.backgroundColor=L()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(U){b.handleError(U)}});H.setAttribute("title",mxResources.get("find")+" (Enter)");H.style.float="none";H.style.width="120px";H.style.marginTop="6px";H.style.marginLeft="8px";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.className="geBtn gePrimaryBtn";I.appendChild(H);var J=document.createElement("div");J.style.marginTop="10px";if(v){var G=function(U,V,l,A,M){if(null==M||"1"!=M.html)return A=U.toLowerCase().indexOf(V, +A),0>A?U:U.substr(0,A)+l+U.substr(A+V.length);var Q=U;V=mxUtils.htmlEntities(V);M=[];var O=-1;for(U=U.replace(/<br>/ig,"\n");-1<(O=U.indexOf("<",O+1));)M.push(O);O=U.match(/<[^>]*>/g);U=U.replace(/<[^>]*>/g,"");A=U.toLowerCase().indexOf(V,A);if(0>A)return Q;Q=A+V.length;l=mxUtils.htmlEntities(l);U=U.substr(0,A)+l+U.substr(Q);for(var R=0,S=0;S<M.length;S++){if(M[S]-R<A)U=U.substr(0,M[S])+O[S]+U.substr(M[S]);else{var X=M[S]-R<Q?A+R:M[S]+(l.length-V.length);U=U.substr(0,X)+O[S]+U.substr(X)}R+=O[S].length}return U.replace(/\n/g, +"<br>")},P=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=z&&null!=q&&t.value){var U=q.cell,V=d.getLabel(U);d.isCellEditable(U)&&d.model.setValue(U,G(V,z,t.value,C-z.length,d.getCurrentCellStyle(U)));N.style.backgroundColor=L(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(l){b.handleError(l)}});P.setAttribute("title",mxResources.get("replFind"));P.style.float="none";P.style.width="120px";P.style.marginTop="6px";P.style.marginLeft="8px";P.style.overflow="hidden";P.style.textOverflow= +"ellipsis";P.className="geBtn gePrimaryBtn";P.setAttribute("disabled","disabled");I.appendChild(P);mxUtils.br(I);var T=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=z&&null!=q&&t.value){var U=q.cell,V=d.getLabel(U);d.model.setValue(U,G(V,z,t.value,C-z.length,d.getCurrentCellStyle(U)));P.setAttribute("disabled","disabled");T.setAttribute("disabled","disabled")}}catch(l){b.handleError(l)}});T.setAttribute("title",mxResources.get("replace"));T.style.float="none";T.style.width="120px"; +T.style.marginTop="6px";T.style.marginLeft="8px";T.style.overflow="hidden";T.style.textOverflow="ellipsis";T.className="geBtn gePrimaryBtn";T.setAttribute("disabled","disabled");I.appendChild(T);var W=mxUtils.button(mxResources.get("replaceAll"),function(){J.innerText="";if(t.value){g=null;var U=b.currentPage,V=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;d.getModel().beginUpdate();try{for(var l=0,A={};L(!1,!0,!0)&&100>l;){var M=q.cell,Q=d.getLabel(M),O=A[M.id];if(O&&O.replAllMrk== +x&&O.replAllPos>=C)break;A[M.id]={replAllMrk:x,replAllPos:C};d.isCellEditable(M)&&(d.model.setValue(M,G(Q,z,t.value,C-z.length,d.getCurrentCellStyle(M))),l++)}U!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,U));mxUtils.write(J,mxResources.get("matchesRepl",[l]))}catch(R){b.handleError(R)}finally{d.getModel().endUpdate(),b.editor.graph.setSelectionCells(V),b.editor.graph.rendering=!0}x++}});W.setAttribute("title",mxResources.get("replaceAll"));W.style.float="none";W.style.width="120px"; +W.style.marginTop="6px";W.style.marginLeft="8px";W.style.overflow="hidden";W.style.textOverflow="ellipsis";W.className="geBtn gePrimaryBtn";W.setAttribute("disabled","disabled");I.appendChild(W);mxUtils.br(I);I.appendChild(D);D=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));D.setAttribute("title",mxResources.get("close"));D.style.float="none";D.style.width="120px";D.style.marginTop="6px";D.style.marginLeft="8px";D.style.overflow="hidden";D.style.textOverflow= +"ellipsis";D.className="geBtn";I.appendChild(D);mxUtils.br(I);I.appendChild(J)}else D.style.width="90px",H.style.width="90px";mxEvent.addListener(N,"keyup",function(U){if(91==U.keyCode||93==U.keyCode||17==U.keyCode)mxEvent.consume(U);else if(27==U.keyCode)c.funct();else if(g!=N.value.toLowerCase()||13==U.keyCode)try{N.style.backgroundColor=L()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(V){N.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(y,"keydown",function(U){70== +U.keyCode&&b.keyHandler.isControlDown(U)&&!mxEvent.isShiftDown(U)&&(c.funct(),mxEvent.consume(U))});this.window=new mxWindow(mxResources.get("find")+(v?"/"+mxResources.get("replace"):""),y,f,k,e,u,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(N.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?N.select(): +document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?F.removeAttribute("disabled"):(F.checked=!1,F.setAttribute("disabled","disabled"))):d.container.focus()}));b.installResizeHandler(this,!1)},FreehandWindow=function(b,f,k,e,u,v){var B=b.editor.graph,E=document.createElement("div");E.style.textAlign="center";E.style.userSelect="none";E.style.overflow="hidden";E.style.height="100%";if(v){var L=document.createElement("input");L.setAttribute("id","geFreehandBrush");L.setAttribute("type", +"checkbox");L.checked=B.freehand.isPerfectFreehandMode();L.style.margin="10px 5px 0px 10px";L.style.float="left";E.appendChild(L);var c=document.createElement("label");c.setAttribute("for","geFreehandBrush");c.style.float="left";c.style.marginTop="10px";E.appendChild(c);mxUtils.write(c,mxResources.get("brush"));E.appendChild(c);mxUtils.br(E);var d=document.createElement("input");d.setAttribute("type","range");d.setAttribute("min","2");d.setAttribute("max","30");d.setAttribute("value",B.freehand.getBrushSize()); +d.style.width="90%";d.style.visibility="hidden";E.appendChild(d);mxUtils.br(E);c=function(){B.freehand.setPerfectFreehandMode(L.checked);d.style.visibility=L.checked?"visible":"hidden"};mxEvent.addListener(L,"change",c);c();mxEvent.addListener(d,"change",function(){B.freehand.setBrushSize(parseInt(this.value))})}var g=mxUtils.button(mxResources.get("startDrawing"),function(){B.freehand.isDrawing()?B.freehand.stopDrawing():B.freehand.startDrawing()});g.setAttribute("title",mxResources.get("startDrawing")); +g.style.marginTop=v?"5px":"10px";g.style.width="90%";g.style.boxSizing="border-box";g.style.overflow="hidden";g.style.textOverflow="ellipsis";g.style.textAlign="center";g.className="geBtn gePrimaryBtn";E.appendChild(g);this.window=new mxWindow(mxResources.get("freehand"),E,f,k,e,u,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);B.addListener("freehandStateChanged",mxUtils.bind(this,function(){g.innerText="";mxUtils.write(g, +mxResources.get(B.freehand.isDrawing()?"stopDrawing":"startDrawing"));g.setAttribute("title",mxResources.get(B.freehand.isDrawing()?"stopDrawing":"startDrawing"));g.className="geBtn"+(B.freehand.isDrawing()?"":" gePrimaryBtn")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){B.freehand.isDrawing()&&B.freehand.stopDrawing()}));b.installResizeHandler(this,!1)},TagsWindow=function(b,f,k,e,u){var v=b.editor.graph, +B=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(L,c){if(v.isEnabled()){var d=new FilenameDialog(b,"",mxResources.get("add"),function(g){b.hideDialog();if(null!=g&&0<g.length){g=g.split(" ");for(var q=[],m=0;m<g.length;m++){var n=mxUtils.trim(g[m]);""!=n&&0>mxUtils.indexOf(L,n)&&q.push(n)}0<q.length&&(v.isSelectionEmpty()?c(L.concat(q)):v.addTagsForCells(v.getSelectionCells(),q))}},mxResources.get("enterValue")+" ("+mxResources.get("tags")+ +")");b.showDialog(d.container,300,80,!0,!0);d.init()}}),E=B.div;this.window=new mxWindow(mxResources.get("tags"),E,f,k,e,u,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){B.refresh();this.window.fit()}));b.installResizeHandler(this,!0)},AuthDialog=function(b,f,k,e){var u=document.createElement("div");u.style.textAlign= +"center";var v=document.createElement("p");v.style.fontSize="16pt";v.style.padding="0px";v.style.margin="0px";v.style.color="gray";mxUtils.write(v,mxResources.get("authorizationRequired"));var B="Unknown",E=document.createElement("img");E.setAttribute("border","0");E.setAttribute("align","absmiddle");E.style.marginRight="10px";f==b.drive?(B=mxResources.get("googleDrive"),E.src=IMAGE_PATH+"/google-drive-logo-white.svg"):f==b.dropbox?(B=mxResources.get("dropbox"),E.src=IMAGE_PATH+"/dropbox-logo-white.svg"): +f==b.oneDrive?(B=mxResources.get("oneDrive"),E.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(B=mxResources.get("github"),E.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?(B=mxResources.get("gitlab"),E.src=IMAGE_PATH+"/gitlab-logo.svg",E.style.width="32px"):f==b.trello&&(B=mxResources.get("trello"),E.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[B]));var L=document.createElement("input");L.setAttribute("type", +"checkbox");B=mxUtils.button(mxResources.get("authorize"),function(){e(L.checked)});B.insertBefore(E,B.firstChild);B.style.marginTop="6px";B.className="geBigButton";B.style.fontSize="18px";B.style.padding="14px";u.appendChild(v);u.appendChild(b);u.appendChild(B);k&&(k=document.createElement("p"),k.style.marginTop="20px",k.appendChild(L),v=document.createElement("span"),mxUtils.write(v," "+mxResources.get("rememberMe")),k.appendChild(v),u.appendChild(k),L.checked=!0,L.defaultChecked=!0,mxEvent.addListener(v, +"click",function(c){L.checked=!L.checked;mxEvent.consume(c)}));this.container=u},MoreShapesDialog=function(b,f,k){k=null!=k?k:b.sidebar.entries;var e=document.createElement("div"),u=[];if(null!=b.sidebar.customEntries)for(var v=0;v<b.sidebar.customEntries.length;v++){for(var B=b.sidebar.customEntries[v],E={title:b.getResource(B.title),entries:[]},L=0;L<B.entries.length;L++){var c=B.entries[L];E.entries.push({id:c.id,title:b.getResource(c.title),desc:b.getResource(c.desc),image:c.preview})}u.push(E)}for(v= +0;v<k.length;v++)if(null==b.sidebar.enabledLibraries)u.push(k[v]);else{E={title:k[v].title,entries:[]};for(L=0;L<k[v].entries.length;L++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,k[v].entries[L].id)&&E.entries.push(k[v].entries[L]);0<E.entries.length&&u.push(E)}k=u;if(f){v=mxUtils.bind(this,function(p){for(var F=0;F<p.length;F++)(function(K){var D=n.cloneNode(!1);D.style.fontWeight="bold";D.style.backgroundColor=Editor.isDarkMode()?"#505759":"#e5e5e5";D.style.padding="6px 0px 6px 20px";mxUtils.write(D, +K.title);d.appendChild(D);for(var H=0;H<K.entries.length;H++)(function(J){var G=n.cloneNode(!1);G.style.cursor="pointer";G.style.padding="4px 0px 4px 20px";G.style.whiteSpace="nowrap";G.style.overflow="hidden";G.style.textOverflow="ellipsis";G.setAttribute("title",J.title+" ("+J.id+")");var P=document.createElement("input");P.setAttribute("type","checkbox");P.checked=b.sidebar.isEntryVisible(J.id);P.defaultChecked=P.checked;G.appendChild(P);mxUtils.write(G," "+J.title);d.appendChild(G);var T=function(W){if(null== +W||"INPUT"!=mxEvent.getSource(W).nodeName){g.style.textAlign="center";g.style.padding="0px";g.style.color="";g.innerText="";if(null!=J.desc){var U=document.createElement("pre");U.style.boxSizing="border-box";U.style.fontFamily="inherit";U.style.margin="20px";U.style.right="0px";U.style.textAlign="left";mxUtils.write(U,J.desc);g.appendChild(U)}null!=J.imageCallback?J.imageCallback(g):null!=J.image?g.innerHTML+='<img border="0" src="'+J.image+'"/>':null==J.desc&&(g.style.padding="20px",g.style.color= +"rgb(179, 179, 179)",mxUtils.write(g,mxResources.get("noPreview")));null!=q&&(q.style.backgroundColor="");q=G;q.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=W&&mxEvent.consume(W)}};mxEvent.addListener(G,"click",T);mxEvent.addListener(G,"dblclick",function(W){P.checked=!P.checked;mxEvent.consume(W)});m.push(function(){return P.checked?J.id:null});0==F&&0==H&&T()})(K.entries[H])})(p[F])});L=document.createElement("div");L.className="geDialogTitle";mxUtils.write(L,mxResources.get("shapes")); +L.style.position="absolute";L.style.top="0px";L.style.left="0px";L.style.lineHeight="40px";L.style.height="40px";L.style.right="0px";var d=document.createElement("div"),g=document.createElement("div");d.style.position="absolute";d.style.top="40px";d.style.left="0px";d.style.width="202px";d.style.bottom="60px";d.style.overflow="auto";g.style.position="absolute";g.style.left="202px";g.style.right="0px";g.style.top="40px";g.style.bottom="60px";g.style.overflow="auto";g.style.borderLeft="1px solid rgb(211, 211, 211)"; +g.style.textAlign="center";var q=null,m=[],n=document.createElement("div");n.style.position="relative";n.style.left="0px";n.style.right="0px";v(k);e.style.padding="30px";e.appendChild(L);e.appendChild(d);e.appendChild(g);k=document.createElement("div");k.className="geDialogFooter";k.style.position="absolute";k.style.paddingRight="16px";k.style.color="gray";k.style.left="0px";k.style.right="0px";k.style.bottom="0px";k.style.height="60px";k.style.lineHeight="52px";var z=document.createElement("input"); +z.setAttribute("type","checkbox");z.style.position="relative";z.style.top="1px";z.checked=b.sidebar.sidebarTitles;z.defaultChecked=z.checked;k.appendChild(z);v=document.createElement("span");mxUtils.write(v," "+mxResources.get("labels"));v.style.paddingRight="20px";k.appendChild(v);mxEvent.addListener(v,"click",function(p){z.checked=!z.checked;mxEvent.consume(p)});var C=document.createElement("input");C.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)v=document.createElement("span"), +v.style.paddingRight="20px",v.appendChild(C),mxUtils.write(v," "+mxResources.get("rememberThisSetting")),C.style.position="relative",C.style.top="1px",C.checked=!0,C.defaultChecked=!0,mxEvent.addListener(v,"click",function(p){mxEvent.getSource(p)!=C&&(C.checked=!C.checked,mxEvent.consume(p))}),k.appendChild(v);v=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});v.className="geBtn";L=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var p=[],F=0;F<m.length;F++){var K= +m[F].apply(this,arguments);null!=K&&p.push(K)}"1"==urlParams.sketch&&b.isSettingsEnabled()&&(F=mxUtils.indexOf(p,".scratchpad"),null!=b.scratchpad!=(0<=F&&0<p.splice(F,1).length)&&b.toggleScratchpad(),F=mxUtils.indexOf(p,"search"),mxSettings.settings.search=0<=F&&0<p.splice(F,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),C.checked&&mxSettings.save());b.sidebar.showEntries(p.join(";"),C.checked,!0);b.setSidebarTitles(z.checked,C.checked)});L.className="geBtn gePrimaryBtn"}else{var x= +document.createElement("table");v=document.createElement("tbody");e.style.height="100%";e.style.overflow="auto";L=document.createElement("tr");x.style.width="100%";f=document.createElement("td");u=document.createElement("td");B=document.createElement("td");var y=mxUtils.bind(this,function(p,F,K){var D=document.createElement("input");D.type="checkbox";x.appendChild(D);D.checked=b.sidebar.isEntryVisible(K);var H=document.createElement("span");mxUtils.write(H,F);F=document.createElement("div");F.style.display= +"block";F.appendChild(D);F.appendChild(H);mxEvent.addListener(H,"click",function(J){D.checked=!D.checked;mxEvent.consume(J)});p.appendChild(F);return function(){return D.checked?K:null}});L.appendChild(f);L.appendChild(u);L.appendChild(B);v.appendChild(L);x.appendChild(v);m=[];var I=0;for(v=0;v<k.length;v++)for(L=0;L<k[v].entries.length;L++)I++;var N=[f,u,B],t=0;for(v=0;v<k.length;v++)(function(p){for(var F=0;F<p.entries.length;F++){var K=p.entries[F];m.push(y(N[Math.floor(t/(I/3))],K.title,K.id)); +t++}})(k[v]);e.appendChild(x);k=document.createElement("div");k.style.marginTop="18px";k.style.textAlign="center";C=document.createElement("input");isLocalStorage&&(C.setAttribute("type","checkbox"),C.checked=!0,C.defaultChecked=!0,k.appendChild(C),v=document.createElement("span"),mxUtils.write(v," "+mxResources.get("rememberThisSetting")),k.appendChild(v),mxEvent.addListener(v,"click",function(p){C.checked=!C.checked;mxEvent.consume(p)}));e.appendChild(k);v=mxUtils.button(mxResources.get("cancel"), +function(){b.hideDialog()});v.className="geBtn";L=mxUtils.button(mxResources.get("apply"),function(){for(var p=["search"],F=0;F<m.length;F++){var K=m[F].apply(this,arguments);null!=K&&p.push(K)}b.sidebar.showEntries(0<p.length?p.join(";"):"",C.checked);b.hideDialog()});L.className="geBtn gePrimaryBtn";k=document.createElement("div");k.style.marginTop="26px";k.style.textAlign="right"}b.editor.cancelFirst?(k.appendChild(v),k.appendChild(L)):(k.appendChild(L),k.appendChild(v));e.appendChild(k);this.container= +e},PluginsDialog=function(b,f,k,e){function u(){L=!0;if(0==E.length)B.innerText=mxResources.get("noPlugins");else{B.innerText="";for(var n=0;n<E.length;n++){var z=document.createElement("span");z.style.whiteSpace="nowrap";var C=document.createElement("span");C.className="geSprite geSprite-delete";C.style.position="relative";C.style.cursor="pointer";C.style.top="5px";C.style.marginRight="4px";C.style.display="inline-block";z.appendChild(C);mxUtils.write(z,E[n]);B.appendChild(z);mxUtils.br(B);mxEvent.addListener(C, +"click",function(x){return function(){b.confirm(mxResources.get("delete")+' "'+E[x]+'"?',function(){null!=k&&k(E[x]);E.splice(x,1);u()})}}(n))}}}var v=document.createElement("div"),B=document.createElement("div");B.style.height="180px";B.style.overflow="auto";var E=mxSettings.getPlugins().slice(),L=!1;v.appendChild(B);u();L=!1;var c=mxUtils.button(mxResources.get("add"),null!=f?function(){f(function(n){n&&0>mxUtils.indexOf(E,n)&&E.push(n);u()})}:function(){var n=document.createElement("div"),z=document.createElement("span"); +z.style.marginTop="6px";mxUtils.write(z,mxResources.get("builtinPlugins")+": ");n.appendChild(z);var C=document.createElement("select");C.style.width="150px";for(z=0;z<App.publicPlugin.length;z++){var x=document.createElement("option");mxUtils.write(x,App.publicPlugin[z]);x.value=App.publicPlugin[z];C.appendChild(x)}n.appendChild(C);mxUtils.br(n);mxUtils.br(n);z=mxUtils.button(mxResources.get("custom")+"...",function(){var y=new FilenameDialog(b,"",mxResources.get("add"),function(I){b.hideDialog(); +if(null!=I&&0<I.length){I=I.split(";");for(var N=0;N<I.length;N++){var t=I[N],p=App.pluginRegistry[t];null!=p&&(t=p);0<t.length&&0>mxUtils.indexOf(E,t)&&E.push(t)}u()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(y.container,300,80,!0,!0);y.init()});z.className="geBtn";n=new CustomDialog(b,n,mxUtils.bind(this,function(){var y=App.pluginRegistry[C.value];0>mxUtils.indexOf(E,y)&&(E.push(y),u())}),null,null,null,z);b.showDialog(n.container,360,100,!0,!0)});c.className= +"geBtn";var d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.className="geBtn";var g=mxUtils.button(e?mxResources.get("close"):mxResources.get("apply"),function(){L?(mxSettings.setPlugins(E),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});g.className="geBtn gePrimaryBtn";var q=document.createElement("div");q.style.marginTop="14px";q.style.textAlign="right";var m=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/plugins")}); +m.className="geBtn";b.isOffline()&&!mxClient.IS_CHROMEAPP&&(m.style.display="none");q.appendChild(m);b.editor.cancelFirst?(e||q.appendChild(d),q.appendChild(c),q.appendChild(g)):(q.appendChild(c),q.appendChild(g),e||q.appendChild(d));v.appendChild(q);this.container=v},CropImageDialog=function(b,f,k,e){function u(){var p=C.checked,F=x.checked,K=m.geometry,D=L.width,H=L.height,J=(300-D)/2,G=(300-H)/2;K.x<J?(K.width-=J-K.x,K.x=J):K.x+K.width>J+D&&(K.width=J+D-K.x,K.x=Math.min(K.x,J+D));K.y<G?(K.height-= +G-K.y,K.y=G):K.y+K.height>G+H&&(K.height=G+H-K.y,K.y=Math.min(K.y,G+H));var P=(K.x-J)/D*100;D=100-(K.x+K.width-J)/D*100;J=(K.y-G)/H*100;K=100-(K.y+K.height-G)/H*100;return"inset("+mxUtils.format(J)+"% "+mxUtils.format(D)+"% "+mxUtils.format(K)+"% "+mxUtils.format(P)+"%"+(p?" round "+q+"%":F?" round 50%":"")+")"}function v(p){null!=d&&(!0!==p&&(d.model.setGeometry(m,g.clone()),q=5,I.value=q),d.model.setStyle(m,n+u()),d.selectAll(),y.style.visibility=C.checked?"visible":"hidden")}var B=document.createElement("div"), +E=document.createElement("div");E.style.height="300px";E.style.width="300px";E.style.display="inline-flex";E.style.justifyContent="center";E.style.alignItems="center";E.style.position="absolute";var L=document.createElement("img");L.onload=function(){function p(){d.model.setStyle(m,n+u())}d=new Graph(c);d.autoExtend=!1;d.autoScroll=!1;d.setGridEnabled(!1);d.setEnabled(!0);d.setPanning(!1);d.setConnectable(!1);d.getRubberband().setEnabled(!1);d.graphHandler.allowLivePreview=!1;var F=d.createVertexHandler; +d.createVertexHandler=function(){var Q=F.apply(this,arguments);Q.livePreview=!1;return Q};if(null!=k)try{if("inset"==k.substring(0,5)){var K=m.geometry,D=L.width,H=L.height,J=(300-D)/2,G=(300-H)/2,P=k.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),T=parseFloat(P[0]),W=parseFloat(P[1]),U=parseFloat(P[2]),V=parseFloat(P[3]);isFinite(T)&&isFinite(W)&&isFinite(U)&&isFinite(V)?(K.x=V/100*D+J,K.y=T/100*H+G,K.width=(100-W)/100*D+J-K.x,K.height=(100-U)/100*H+G-K.y,"round"==P[4]?"50%"==P[5]?x.setAttribute("checked", +"checked"):(q=parseInt(P[5]),I.value=q,C.setAttribute("checked","checked"),y.style.visibility="visible"):z.setAttribute("checked","checked")):k=null}else k=null}catch(Q){}m.style=n+(k?k:u());m.vertex=!0;d.addCell(m,null,null,null,null);d.selectAll();d.addListener(mxEvent.CELLS_MOVED,p);d.addListener(mxEvent.CELLS_RESIZED,p);var l=d.graphHandler.mouseUp,A=d.graphHandler.mouseDown;d.graphHandler.mouseUp=function(){l.apply(this,arguments);c.style.backgroundColor="#fff9"};d.graphHandler.mouseDown=function(){A.apply(this, +arguments);c.style.backgroundColor=""};d.dblClick=function(){};var M=d.getSelectionModel().changeSelection;d.getSelectionModel().changeSelection=function(){M.call(this,[m],[m])}};L.onerror=function(){L.onload=null;L.src=Editor.errorImage};L.setAttribute("src",f);L.style.maxWidth="300px";L.style.maxHeight="300px";E.appendChild(L);B.appendChild(E);var c=document.createElement("div");c.style.width="300px";c.style.height="300px";c.style.overflow="hidden";c.style.backgroundColor="#fff9";B.appendChild(c); +var d=null,g=new mxGeometry(100,100,100,100),q=5,m=new mxCell("",g.clone(),""),n="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+f.replace(";base64","")+";clipPath=",z=document.createElement("input");z.setAttribute("type","radio");z.setAttribute("id","croppingRect");z.setAttribute("name","croppingShape");z.setAttribute("checked","checked");z.style.margin="5px";B.appendChild(z);f=document.createElement("label");f.setAttribute("for","croppingRect");mxUtils.write(f,mxResources.get("rectangle")); +B.appendChild(f);var C=document.createElement("input");C.setAttribute("type","radio");C.setAttribute("id","croppingRounded");C.setAttribute("name","croppingShape");C.style.margin="5px";B.appendChild(C);f=document.createElement("label");f.setAttribute("for","croppingRounded");mxUtils.write(f,mxResources.get("rounded"));B.appendChild(f);var x=document.createElement("input");x.setAttribute("type","radio");x.setAttribute("id","croppingEllipse");x.setAttribute("name","croppingShape");x.style.margin="5px"; +B.appendChild(x);f=document.createElement("label");f.setAttribute("for","croppingEllipse");mxUtils.write(f,mxResources.get("ellipse"));B.appendChild(f);mxEvent.addListener(z,"change",v);mxEvent.addListener(C,"change",v);mxEvent.addListener(x,"change",v);var y=document.createElement("div");y.style.textAlign="center";y.style.visibility="hidden";var I=document.createElement("input");I.setAttribute("type","range");I.setAttribute("min","1");I.setAttribute("max","49");I.setAttribute("value",q);I.setAttribute("title", +mxResources.get("arcSize"));y.appendChild(I);B.appendChild(y);mxEvent.addListener(I,"change",function(){q=this.value;v(!0)});f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";E=mxUtils.button(mxResources.get("apply"),function(){e(u(),m.geometry.width,m.geometry.height);b.hideDialog()});E.className="geBtn gePrimaryBtn";var N=mxUtils.button(mxResources.get("reset"),function(){e(null,L.width,L.height);b.hideDialog()});N.className="geBtn";var t=document.createElement("div"); +t.style.marginTop="10px";t.style.textAlign="right";b.editor.cancelFirst?(t.appendChild(f),t.appendChild(N),t.appendChild(E)):(t.appendChild(N),t.appendChild(E),t.appendChild(f));B.appendChild(t);this.container=B},EditGeometryDialog=function(b,f){var k=b.editor.graph,e=1==f.length?k.getCellGeometry(f[0]):null,u=document.createElement("div"),v=document.createElement("table"),B=document.createElement("tbody"),E=document.createElement("tr"),L=document.createElement("td"),c=document.createElement("td"); +v.style.paddingLeft="6px";mxUtils.write(L,mxResources.get("relative")+":");var d=document.createElement("input");d.setAttribute("type","checkbox");null!=e&&e.relative&&(d.setAttribute("checked","checked"),d.defaultChecked=!0);this.init=function(){d.focus()};c.appendChild(d);E.appendChild(L);E.appendChild(c);B.appendChild(E);E=document.createElement("tr");L=document.createElement("td");c=document.createElement("td");mxUtils.write(L,mxResources.get("left")+":");var g=document.createElement("input"); +g.setAttribute("type","text");g.style.width="100px";g.value=null!=e?e.x:"";c.appendChild(g);E.appendChild(L);E.appendChild(c);B.appendChild(E);E=document.createElement("tr");L=document.createElement("td");c=document.createElement("td");mxUtils.write(L,mxResources.get("top")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=e?e.y:"";c.appendChild(q);E.appendChild(L);E.appendChild(c);B.appendChild(E);E=document.createElement("tr");L=document.createElement("td"); +c=document.createElement("td");mxUtils.write(L,mxResources.get("dx")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.width="100px";m.value=null!=e&&null!=e.offset?e.offset.x:"";c.appendChild(m);E.appendChild(L);E.appendChild(c);B.appendChild(E);E=document.createElement("tr");L=document.createElement("td");c=document.createElement("td");mxUtils.write(L,mxResources.get("dy")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px"; +n.value=null!=e&&null!=e.offset?e.offset.y:"";c.appendChild(n);E.appendChild(L);E.appendChild(c);B.appendChild(E);E=document.createElement("tr");L=document.createElement("td");c=document.createElement("td");mxUtils.write(L,mxResources.get("width")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.width="100px";z.value=null!=e?e.width:"";c.appendChild(z);E.appendChild(L);E.appendChild(c);B.appendChild(E);E=document.createElement("tr");L=document.createElement("td");c= +document.createElement("td");mxUtils.write(L,mxResources.get("height")+":");var C=document.createElement("input");C.setAttribute("type","text");C.style.width="100px";C.value=null!=e?e.height:"";c.appendChild(C);E.appendChild(L);E.appendChild(c);B.appendChild(E);E=document.createElement("tr");L=document.createElement("td");c=document.createElement("td");mxUtils.write(L,mxResources.get("rotation")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.width="100px";x.value= +1==f.length?mxUtils.getValue(k.getCellStyle(f[0]),mxConstants.STYLE_ROTATION,0):"";c.appendChild(x);E.appendChild(L);E.appendChild(c);B.appendChild(E);v.appendChild(B);u.appendChild(v);e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});e.className="geBtn";var y=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();k.getModel().beginUpdate();try{for(var I=0;I<f.length;I++){var N=k.getCellGeometry(f[I]);null!=N&&(N=N.clone(),k.isCellMovable(f[I])&&(N.relative=d.checked, +0<mxUtils.trim(g.value).length&&(N.x=Number(g.value)),0<mxUtils.trim(q.value).length&&(N.y=Number(q.value)),0<mxUtils.trim(m.value).length&&(null==N.offset&&(N.offset=new mxPoint),N.offset.x=Number(m.value)),0<mxUtils.trim(n.value).length&&(null==N.offset&&(N.offset=new mxPoint),N.offset.y=Number(n.value))),k.isCellResizable(f[I])&&(0<mxUtils.trim(z.value).length&&(N.width=Number(z.value)),0<mxUtils.trim(C.value).length&&(N.height=Number(C.value))),k.getModel().setGeometry(f[I],N));0<mxUtils.trim(x.value).length&& +k.setCellStyles(mxConstants.STYLE_ROTATION,Number(x.value),[f[I]])}}finally{k.getModel().endUpdate()}});y.className="geBtn gePrimaryBtn";mxEvent.addListener(u,"keypress",function(I){13==I.keyCode&&y.click()});v=document.createElement("div");v.style.marginTop="20px";v.style.textAlign="right";b.editor.cancelFirst?(v.appendChild(e),v.appendChild(y)):(v.appendChild(y),v.appendChild(e));u.appendChild(v);this.container=u},LibraryDialog=function(b,f,k,e,u,v){function B(F){for(F=document.elementFromPoint(F.clientX, +F.clientY);null!=F&&F.parentNode!=m;)F=F.parentNode;var K=null;if(null!=F){var D=m.firstChild;for(K=0;null!=D&&D!=F;)D=D.nextSibling,K++}return K}function E(F,K,D,H,J,G,P,T,W){try{if(b.spinner.stop(),null==K||"image/"==K.substring(0,6))if(null==F&&null!=P||null==z[F]){var U=function(){S.innerText="";S.style.cursor="pointer";S.style.whiteSpace="nowrap";S.style.textOverflow="ellipsis";mxUtils.write(S,null!=X.title&&0<X.title.length?X.title:mxResources.get("untitled"));S.style.color=null==X.title||0== +X.title.length?"#d0d0d0":""};m.style.backgroundImage="";n.style.display="none";var V=J,l=G;if(J>b.maxImageSize||G>b.maxImageSize){var A=Math.min(1,Math.min(b.maxImageSize/Math.max(1,J)),b.maxImageSize/Math.max(1,G));J*=A;G*=A}V>l?(l=Math.round(100*l/V),V=100):(V=Math.round(100*V/l),l=100);var M=document.createElement("div");M.setAttribute("draggable","true");M.style.display="inline-block";M.style.position="relative";M.style.padding="0 12px";M.style.cursor="move";mxUtils.setPrefixedStyle(M.style,"transition", +"transform .1s ease-in-out");if(null!=F){var Q=document.createElement("img");Q.setAttribute("src",I.convert(F));Q.style.width=V+"px";Q.style.height=l+"px";Q.style.margin="10px";Q.style.paddingBottom=Math.floor((100-l)/2)+"px";Q.style.paddingLeft=Math.floor((100-V)/2)+"px";M.appendChild(Q)}else if(null!=P){var O=b.stringToCells(Graph.decompress(P.xml));0<O.length&&(b.sidebar.createThumb(O,100,100,M,null,!0,!1),M.firstChild.style.display="inline-block",M.firstChild.style.cursor="")}var R=document.createElement("img"); +R.setAttribute("src",Editor.closeBlackImage);R.setAttribute("border","0");R.setAttribute("title",mxResources.get("delete"));R.setAttribute("align","top");R.style.paddingTop="4px";R.style.position="absolute";R.style.marginLeft="-12px";R.style.zIndex="1";R.style.cursor="pointer";mxEvent.addListener(R,"dragstart",function(ba){mxEvent.consume(ba)});(function(ba,ha,ma){mxEvent.addListener(R,"click",function(ia){z[ha]=null;for(var qa=0;qa<d.length;qa++)if(null!=d[qa].data&&d[qa].data==ha||null!=d[qa].xml&& +null!=ma&&d[qa].xml==ma.xml){d.splice(qa,1);break}M.parentNode.removeChild(ba);0==d.length&&(m.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",n.style.display="");mxEvent.consume(ia)});mxEvent.addListener(R,"dblclick",function(ia){mxEvent.consume(ia)})})(M,F,P);M.appendChild(R);M.style.marginBottom="30px";var S=document.createElement("div");S.style.position="absolute";S.style.boxSizing="border-box";S.style.bottom="-18px";S.style.left="10px";S.style.right="10px";S.style.backgroundColor= +Editor.isDarkMode()?Editor.darkColor:"#ffffff";S.style.overflow="hidden";S.style.textAlign="center";var X=null;null!=F?(X={data:F,w:J,h:G,title:W},null!=T&&(X.aspect=T),z[F]=Q,d.push(X)):null!=P&&(P.aspect="fixed",d.push(P),X=P);mxEvent.addListener(S,"keydown",function(ba){13==ba.keyCode&&null!=y&&(y(),y=null,mxEvent.consume(ba))});U();M.appendChild(S);mxEvent.addListener(S,"mousedown",function(ba){"true"!=S.getAttribute("contentEditable")&&mxEvent.consume(ba)});O=function(ba){if(mxClient.IS_IOS|| +mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var ha=new FilenameDialog(b,X.title||"",mxResources.get("ok"),function(ma){null!=ma&&(X.title=ma,U())},mxResources.get("enterValue"));b.showDialog(ha.container,300,80,!0,!0);ha.init();mxEvent.consume(ba)}else if("true"!=S.getAttribute("contentEditable")){null!=y&&(y(),y=null);if(null==X.title||0==X.title.length)S.innerText="";S.style.textOverflow="";S.style.whiteSpace="";S.style.cursor="text";S.style.color="";S.setAttribute("contentEditable", +"true");mxUtils.setPrefixedStyle(S.style,"user-select","text");S.focus();document.execCommand("selectAll",!1,null);y=function(){S.removeAttribute("contentEditable");S.style.cursor="pointer";X.title=S.innerHTML;U()};mxEvent.consume(ba)}};mxEvent.addListener(S,"click",O);mxEvent.addListener(M,"dblclick",O);m.appendChild(M);mxEvent.addListener(M,"dragstart",function(ba){null==F&&null!=P&&(R.style.visibility="hidden",S.style.visibility="hidden");mxClient.IS_FF&&null!=P.xml&&ba.dataTransfer.setData("Text", +P.xml);C=B(ba);mxClient.IS_GC&&(M.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(M.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(M,30);R.style.visibility="";S.style.visibility=""},0)});mxEvent.addListener(M,"dragend",function(ba){"hidden"==R.style.visibility&&(R.style.visibility="",S.style.visibility="");C=null;mxUtils.setOpacity(M,100);mxUtils.setPrefixedStyle(M.style,"transform",null)})}else N||(N=!0,b.handleError({message:mxResources.get("fileExists")}));else{J= +!1;try{if(V=mxUtils.parseXml(F),"mxlibrary"==V.documentElement.nodeName){l=JSON.parse(mxUtils.getTextContent(V.documentElement));if(null!=l&&0<l.length)for(var aa=0;aa<l.length;aa++)null!=l[aa].xml?E(null,null,0,0,0,0,l[aa]):E(l[aa].data,null,0,0,l[aa].w,l[aa].h,null,"fixed",l[aa].title);J=!0}else if("mxfile"==V.documentElement.nodeName){var Y=V.documentElement.getElementsByTagName("diagram");for(aa=0;aa<Y.length;aa++){l=mxUtils.getTextContent(Y[aa]);O=b.stringToCells(Graph.decompress(l));var Z=b.editor.graph.getBoundingBoxFromGeometry(O); +E(null,null,0,0,0,0,{xml:l,w:Z.width,h:Z.height})}J=!0}}catch(ba){}J||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ba){}return null}function L(F){F.dataTransfer.dropEffect=null!=C?"move":"copy";F.stopPropagation();F.preventDefault()}function c(F){F.stopPropagation();F.preventDefault();N=!1;x=B(F);if(null!=C)null!=x&&x<m.children.length?(d.splice(x>C?x-1:x,0,d.splice(C,1)[0]),m.insertBefore(m.children[C],m.children[x])):(d.push(d.splice(C,1)[0]),m.appendChild(m.children[C])); +else if(0<F.dataTransfer.files.length)b.importFiles(F.dataTransfer.files,0,0,b.maxImageSize,t(F));else if(0<=mxUtils.indexOf(F.dataTransfer.types,"text/uri-list")){var K=decodeURIComponent(F.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(K)||/(\.png)($|\?)/i.test(K)||/(\.gif)($|\?)/i.test(K)||/(\.svg)($|\?)/i.test(K))&&b.loadImage(K,function(D){E(K,null,0,0,D.width,D.height);m.scrollTop=m.scrollHeight})}F.stopPropagation();F.preventDefault()}var d=[];k=document.createElement("div"); k.style.height="100%";var g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.height="40px";k.appendChild(g);mxUtils.write(g,mxResources.get("filename")+":");null==f&&(f=b.defaultLibraryName+".xml");var q=document.createElement("input");q.setAttribute("value",f);q.style.marginRight="20px";q.style.marginLeft="10px";q.style.width="500px";null==u||u.isRenamable()||q.setAttribute("disabled","true");this.init=function(){if(null==u||u.isRenamable())q.focus(),mxClient.IS_GC||mxClient.IS_FF|| -5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)};g.appendChild(q);var m=document.createElement("div");m.style.borderWidth="1px 0px 1px 0px";m.style.borderColor="#d3d3d3";m.style.borderStyle="solid";m.style.marginTop="6px";m.style.overflow="auto";m.style.height="340px";m.style.backgroundPosition="center center";m.style.backgroundRepeat="no-repeat";0==e.length&&Graph.fileSupport&&(m.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var n=document.createElement("div"); -n.style.position="absolute";n.style.width="640px";n.style.top="260px";n.style.textAlign="center";n.style.fontSize="22px";n.style.color="#a0c3ff";mxUtils.write(n,mxResources.get("dragImagesHere"));k.appendChild(n);var z={},C=null,v=null,y=null;f=function(F){"true"!=mxEvent.getSource(F).getAttribute("contentEditable")&&null!=y&&(y(),y=null,mxEvent.consume(F))};mxEvent.addListener(m,"mousedown",f);mxEvent.addListener(m,"pointerdown",f);mxEvent.addListener(m,"touchstart",f);var I=new mxUrlConverter,N= -!1;if(null!=d)for(f=0;f<d.length;f++)g=d[f],D(g.data,null,0,0,g.w,g.h,g,g.aspect,g.title);mxEvent.addListener(m,"dragleave",function(F){n.style.cursor="";for(var J=mxEvent.getSource(F);null!=J;){if(J==m||J==n){F.stopPropagation();F.preventDefault();break}J=J.parentNode}});var t=function(F){return function(J,M,H,G,E,P,T,W,U){null!=U&&(/(\.v(dx|sdx?))($|\?)/i.test(U.name)||/(\.vs(x|sx?))($|\?)/i.test(U.name))?b.importVisio(U,mxUtils.bind(this,function(V){D(V,M,H,G,E,P,T,"fixed",mxEvent.isAltDown(F)? -null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," "))})):null!=U&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(J,U.name)?b.isExternalDataComms()?b.parseFile(U,mxUtils.bind(this,function(V){4==V.readyState&&(b.spinner.stop(),200<=V.status&&299>=V.status&&(D(V.responseText,M,H,G,E,P,T,"fixed",mxEvent.isAltDown(F)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),m.scrollTop=m.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))): -(D(J,M,H,G,E,P,T,"fixed",mxEvent.isAltDown(F)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),m.scrollTop=m.scrollHeight)}};mxEvent.addListener(m,"dragover",K);mxEvent.addListener(m,"drop",c);mxEvent.addListener(n,"dragover",K);mxEvent.addListener(n,"drop",c);k.appendChild(m);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});f.setAttribute("id","btnCancel");f.className="geBtn";b.editor.cancelFirst&& -d.appendChild(f);"draw.io"!=b.getServiceName()||null==u||u.constructor!=DriveLibrary&&u.constructor!=GitHubLibrary||(g=mxUtils.button(mxResources.get("link"),function(){b.spinner.spin(document.body,mxResources.get("loading"))&&u.getPublicUrl(function(F){b.spinner.stop();if(null!=F){var J=b.getSearch("create title mode url drive splash state clibs ui".split(" "));J+=(0==J.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(F);F=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+ -"/"+J,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(F.container,450,240,!0);F.init()}else u.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(u.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),g.className="geBtn",d.appendChild(g));g=mxUtils.button(mxResources.get("export"), -function(){var F=b.createLibraryDataFromImages(e),J=q.value;/(\.xml)$/i.test(J)||(J+=".xml");b.isLocalFileSave()?b.saveLocalFile(F,J,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(J)+"&format=xml&xml="+encodeURIComponent(F))).simulate(document,"_blank")});g.setAttribute("id","btnDownload");g.className="geBtn";d.appendChild(g);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var p=document.createElement("input");p.setAttribute("multiple","multiple"); -p.setAttribute("type","file");mxEvent.addListener(p,"change",function(F){N=!1;b.importFiles(p.files,0,0,b.maxImageSize,function(J,M,H,G,E,P,T,W,U){null!=p.files&&(t(F)(J,M,H,G,E,P,T,W,U),p.type="",p.type="file",p.value="")});m.scrollTop=m.scrollHeight});p.style.display="none";document.body.appendChild(p);b.libDlgFileInputElt=p}g=mxUtils.button(mxResources.get("import"),function(){null!=y&&(y(),y=null);b.libDlgFileInputElt.click()});g.setAttribute("id","btnAddImage");g.className="geBtn";d.appendChild(g)}g= -mxUtils.button(mxResources.get("addImages"),function(){null!=y&&(y(),y=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(F,J,M){N=!1;if(null!=F){if("data:image/"==F.substring(0,11)){var H=F.indexOf(",");0<H&&(F=F.substring(0,H)+";base64,"+F.substring(H+1))}D(F,null,0,0,J,M);m.scrollTop=m.scrollHeight}})});g.setAttribute("id","btnAddImageUrl");g.className="geBtn";d.appendChild(g);this.saveBtnClickHandler=function(F,J,M,H){b.saveLibrary(F,J,M,H)};g=mxUtils.button(mxResources.get("save"), -mxUtils.bind(this,function(){null!=y&&(y(),y=null);this.saveBtnClickHandler(q.value,e,u,x)}));g.setAttribute("id","btnSave");g.className="geBtn gePrimaryBtn";d.appendChild(g);b.editor.cancelFirst||d.appendChild(f);k.appendChild(d);this.container=k},EditShapeDialog=function(b,f,k,d,u){d=null!=d?d:300;u=null!=u?u:120;var x=document.createElement("table"),B=document.createElement("tbody");x.style.cellPadding="4px";var D=document.createElement("tr");var K=document.createElement("td");K.setAttribute("colspan", -"2");K.style.fontSize="10pt";mxUtils.write(K,k);D.appendChild(K);B.appendChild(D);D=document.createElement("tr");K=document.createElement("td");var c=document.createElement("textarea");c.style.outline="none";c.style.resize="none";c.style.width=d-200+"px";c.style.height=u+"px";this.textarea=c;this.init=function(){c.focus();c.scrollTop=0};K.appendChild(c);D.appendChild(K);K=document.createElement("td");k=document.createElement("div");k.style.position="relative";k.style.border="1px solid gray";k.style.top= -"6px";k.style.width="200px";k.style.height=u+4+"px";k.style.overflow="hidden";k.style.marginBottom="16px";mxEvent.disableContextMenu(k);K.appendChild(k);var e=new Graph(k);e.setEnabled(!1);var g=b.editor.graph.cloneCell(f);e.addCells([g]);k=e.view.getState(g);var q="";null!=k.shape&&null!=k.shape.stencil&&(q=mxUtils.getPrettyXml(k.shape.stencil.desc));mxUtils.write(c,q||"");k=e.getGraphBounds();u=Math.min(160/k.width,(u-40)/k.height);e.view.scaleAndTranslate(u,20/u-k.x,20/u-k.y);D.appendChild(K); -B.appendChild(D);D=document.createElement("tr");K=document.createElement("td");K.setAttribute("colspan","2");K.style.paddingTop="2px";K.style.whiteSpace="nowrap";K.setAttribute("align","right");b.isOffline()||(u=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/shape-complex-create-edit")}),u.className="geBtn",K.appendChild(u));u=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});u.className="geBtn";b.editor.cancelFirst&&K.appendChild(u); -var m=function(n,z,C){var v=c.value,y=mxUtils.parseXml(v);v=mxUtils.getPrettyXml(y.documentElement);y=y.documentElement.getElementsByTagName("parsererror");if(null!=y&&0<y.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(C&&b.hideDialog(),y=!n.model.contains(z),!C||y||v!=q){v=Graph.compress(v);n.getModel().beginUpdate();try{if(y){var I=b.editor.graph.getFreeInsertPoint();z.geometry.x=I.x;z.geometry.y=I.y;n.addCell(z)}n.setCellStyles(mxConstants.STYLE_SHAPE, -"stencil("+v+")",[z])}catch(N){throw N;}finally{n.getModel().endUpdate()}y&&(n.setSelectionCell(z),n.scrollCellToVisible(z))}};k=mxUtils.button(mxResources.get("preview"),function(){m(e,g,!1)});k.className="geBtn";K.appendChild(k);k=mxUtils.button(mxResources.get("apply"),function(){m(b.editor.graph,f,!0)});k.className="geBtn gePrimaryBtn";K.appendChild(k);b.editor.cancelFirst||K.appendChild(u);D.appendChild(K);B.appendChild(D);x.appendChild(B);this.container=x},CustomDialog=function(b,f,k,d,u,x, -B,D,K,c,e){var g=document.createElement("div");g.appendChild(f);var q=document.createElement("div");q.style.marginTop="30px";q.style.textAlign="center";null!=B&&q.appendChild(B);b.isOffline()||null==x||(f=mxUtils.button(mxResources.get("help"),function(){b.openLink(x)}),f.className="geBtn",q.appendChild(f));K=mxUtils.button(K||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});K.className="geBtn";D&&(K.style.display="none");b.editor.cancelFirst&&q.appendChild(K);u=mxUtils.button(u|| -mxResources.get("ok"),mxUtils.bind(this,function(){c||b.hideDialog(null,null,this.container);if(null!=k){var m=k();if("string"===typeof m){b.showError(mxResources.get("error"),m);return}}c&&b.hideDialog(null,null,this.container)}));q.appendChild(u);u.className="geBtn gePrimaryBtn";b.editor.cancelFirst||q.appendChild(K);if(null!=e)for(D=0;D<e.length;D++)(function(m,n,z){m=mxUtils.button(m,function(C){n(C)});null!=z&&m.setAttribute("title",z);m.className="geBtn";q.appendChild(m)})(e[D][0],e[D][1],e[D][2]); -g.appendChild(q);this.cancelBtn=K;this.okButton=u;this.container=g},TemplatesDialog=function(b,f,k,d,u,x,B,D,K,c,e,g,q,m,n){function z(ea){Ia.innerText=ea;Ia.style.display="block";setTimeout(function(){Ia.style.display="none"},4E3)}function C(){null!=l&&(l.style.fontWeight="normal",l.style.textDecoration="none",A=l,l=null)}function v(ea,ha,oa,ma,va,Ca,ya){if(-1<ea.className.indexOf("geTempDlgRadioBtnActive"))return!1;ea.className+=" geTempDlgRadioBtnActive";W.querySelector(".geTempDlgRadioBtn[data-id="+ -ma+"]").className="geTempDlgRadioBtn "+(ya?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");W.querySelector("."+ha).src="/images/"+oa+"-sel.svg";W.querySelector("."+va).src="/images/"+Ca+".svg";return!0}function y(ea,ha,oa,ma){function va(pa,Ha){null==ya?(pa=/^https?:\/\//.test(pa)&&!b.editor.isCorsEnabledForUrl(pa)?PROXY_URL+"?url="+encodeURIComponent(pa):TEMPLATE_PATH+"/"+pa,mxUtils.get(pa,mxUtils.bind(this,function(Ma){200<=Ma.getStatus()&&299>=Ma.getStatus()&&(ya=Ma.getText());Ha(ya)}))):Ha(ya)} -function Ca(pa,Ha,Ma){if(null!=pa&&mxUtils.isAncestorNode(document.body,ha)&&(pa=mxUtils.parseXml(pa),pa=Editor.extractGraphModel(pa.documentElement,!0),null!=pa)){"mxfile"==pa.nodeName&&(pa=Editor.parseDiagramNode(pa.getElementsByTagName("diagram")[0]));var Ra=new mxCodec(pa.ownerDocument),Ja=new mxGraphModel;Ra.decode(pa,Ja);pa=Ja.root.getChildAt(0).children||[];b.sidebar.createTooltip(ha,pa,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight|| -document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=ea.title?mxResources.get(ea.title,null,ea.title):null,!0,new mxPoint(Ha,Ma),!0,null,!0);var Pa=document.createElement("div");Pa.className="geTempDlgDialogMask";W.appendChild(Pa);var Qa=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Pa&&(W.removeChild(Pa),Pa=null,Qa.apply(this,arguments),b.sidebar.hideTooltip=Qa)};mxEvent.addListener(Pa,"click",function(){b.sidebar.hideTooltip()})}}var ya=null;if(ua||b.sidebar.currentElt== -ha)b.sidebar.hideTooltip();else{var ta=function(pa){ua&&b.sidebar.currentElt==ha&&Ca(pa,mxEvent.getClientX(ma),mxEvent.getClientY(ma));ua=!1;oa.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=ha;ua=!0;oa.src="/images/aui-wait.gif";ea.isExt?K(ea,ta,function(){z(mxResources.get("cantLoadPrev"));ua=!1;oa.src="/images/icon-search.svg"}):va(ea.url,ta)}}function I(ea,ha,oa){if(null!=L){for(var ma=L.className.split(" "),va=0;va<ma.length;va++)if(-1<ma[va].indexOf("Active")){ma.splice(va, -1);break}L.className=ma.join(" ")}null!=ea?(L=ea,L.className+=" "+ha,Q=oa,Oa.className="geTempDlgCreateBtn"):(Q=L=null,Oa.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function N(ea,ha){if(null!=Q){var oa=function(ta){ya.isExternal?K(ya,function(pa){ma(pa,ta)},va):ya.url?mxUtils.get(TEMPLATE_PATH+"/"+ya.url,mxUtils.bind(this,function(pa){200<=pa.getStatus()&&299>=pa.getStatus()?ma(pa.getText(),ta):va()})):ma(b.emptyDiagramXml,ta)},ma=function(ta,pa){n||b.hideDialog(!0);f(ta,pa,ya,ha)},va=function(){z(mxResources.get("cannotLoad")); -Ca()},Ca=function(){Q=ya;Oa.className="geTempDlgCreateBtn";ha&&(Aa.className="geTempDlgOpenBtn")},ya=Q;Q=null;"boolean"!==typeof ha&&(ha=ya.isExternal&&g);1==ea?c(ya.url,ya):ha?(Aa.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",oa()):(Oa.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ea=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),ea=new FilenameDialog(b,b.defaultFilename+".drawio", -mxResources.get("ok"),oa,ea,function(ta){var pa=null!=ta&&0<ta.length;return pa&&n?(oa(ta),!1):pa},null,null,null,Ca,m?null:[]),b.showDialog(ea.container,350,80,!0,!0),ea.init())}}function t(ea){Oa.innerText=mxResources.get(ca||ea?"create":"copy");ea=ea?"none":"";g&&(Aa.style.display=ea);for(var ha=W.querySelectorAll(".geTempDlgLinkToDiagram"),oa=0;oa<ha.length;oa++)ha[oa].style.display=ea}function p(ea,ha,oa,ma,va){va||(la.innerText="",I(),X=ea,aa=ma);var Ca=null;if(oa){Ca=document.createElement("table"); -Ca.className="geTempDlgDiagramsListGrid";var ya=document.createElement("tr"),ta=document.createElement("th");ta.style.width="50%";ta.innerText=mxResources.get("diagram");ya.appendChild(ta);ta=document.createElement("th");ta.style.width="25%";ta.innerText=mxResources.get("changedBy");ya.appendChild(ta);ta=document.createElement("th");ta.style.width="25%";ta.innerText=mxResources.get("lastModifiedOn");ya.appendChild(ta);Ca.appendChild(ya);la.appendChild(Ca)}for(ya=0;ya<ea.length;ya++){ea[ya].isExternal= -!ha;var pa=ea[ya].url,Ha=(ta=mxUtils.htmlEntities(ha?mxResources.get(ea[ya].title,null,ea[ya].title):ea[ya].title))||ea[ya].url,Ma=ea[ya].imgUrl,Ra=ea[ya].changedBy||"",Ja="";ea[ya].lastModifiedOn&&(Ja=b.timeSince(new Date(ea[ya].lastModifiedOn)),null==Ja&&(Ja=mxResources.get("lessThanAMinute")),Ja=mxResources.get("timeAgo",[Ja],"{1} ago"));Ma||(Ma=TEMPLATE_PATH+"/"+pa.substring(0,pa.length-4)+".png");pa=oa?50:15;null!=ta&&ta.length>pa&&(ta=ta.substring(0,pa)+"…");if(oa){var Pa=document.createElement("tr"); -Ma=document.createElement("td");var Qa=document.createElement("img");Qa.src="/images/icon-search.svg";Qa.className="geTempDlgDiagramListPreviewBtn";Qa.setAttribute("title",mxResources.get("preview"));va||Ma.appendChild(Qa);Ha=document.createElement("span");Ha.className="geTempDlgDiagramTitle";Ha.innerHTML=ta;Ma.appendChild(Ha);Pa.appendChild(Ma);Ma=document.createElement("td");Ma.innerText=Ra;Pa.appendChild(Ma);Ma=document.createElement("td");Ma.innerText=Ja;Pa.appendChild(Ma);Ca.appendChild(Pa); -null==L&&(t(ha),I(Pa,"geTempDlgDiagramsListGridActive",ea[ya]));(function(Ka,Ta,Va){mxEvent.addListener(Pa,"click",function(){L!=Ta&&(t(ha),I(Ta,"geTempDlgDiagramsListGridActive",Ka))});mxEvent.addListener(Pa,"dblclick",N);mxEvent.addListener(Qa,"click",function(Wa){y(Ka,Ta,Va,Wa)})})(ea[ya],Pa,Qa)}else{var Na=document.createElement("div");Na.className="geTempDlgDiagramTile";Na.setAttribute("title",Ha);null==L&&(t(ha),I(Na,"geTempDlgDiagramTileActive",ea[ya]));Ra=document.createElement("div");Ra.className= +5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)};g.appendChild(q);var m=document.createElement("div");m.style.borderWidth="1px 0px 1px 0px";m.style.borderColor="#d3d3d3";m.style.borderStyle="solid";m.style.marginTop="6px";m.style.overflow="auto";m.style.height="340px";m.style.backgroundPosition="center center";m.style.backgroundRepeat="no-repeat";0==d.length&&Graph.fileSupport&&(m.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var n=document.createElement("div"); +n.style.position="absolute";n.style.width="640px";n.style.top="260px";n.style.textAlign="center";n.style.fontSize="22px";n.style.color="#a0c3ff";mxUtils.write(n,mxResources.get("dragImagesHere"));k.appendChild(n);var z={},C=null,x=null,y=null;f=function(F){"true"!=mxEvent.getSource(F).getAttribute("contentEditable")&&null!=y&&(y(),y=null,mxEvent.consume(F))};mxEvent.addListener(m,"mousedown",f);mxEvent.addListener(m,"pointerdown",f);mxEvent.addListener(m,"touchstart",f);var I=new mxUrlConverter,N= +!1;if(null!=e)for(f=0;f<e.length;f++)g=e[f],E(g.data,null,0,0,g.w,g.h,g,g.aspect,g.title);mxEvent.addListener(m,"dragleave",function(F){n.style.cursor="";for(var K=mxEvent.getSource(F);null!=K;){if(K==m||K==n){F.stopPropagation();F.preventDefault();break}K=K.parentNode}});var t=function(F){return function(K,D,H,J,G,P,T,W,U){null!=U&&(/(\.v(dx|sdx?))($|\?)/i.test(U.name)||/(\.vs(x|sx?))($|\?)/i.test(U.name))?b.importVisio(U,mxUtils.bind(this,function(V){E(V,D,H,J,G,P,T,"fixed",mxEvent.isAltDown(F)? +null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," "))})):null!=U&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(K,U.name)?b.isExternalDataComms()?b.parseFile(U,mxUtils.bind(this,function(V){4==V.readyState&&(b.spinner.stop(),200<=V.status&&299>=V.status&&(E(V.responseText,D,H,J,G,P,T,"fixed",mxEvent.isAltDown(F)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),m.scrollTop=m.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))): +(E(K,D,H,J,G,P,T,"fixed",mxEvent.isAltDown(F)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),m.scrollTop=m.scrollHeight)}};mxEvent.addListener(m,"dragover",L);mxEvent.addListener(m,"drop",c);mxEvent.addListener(n,"dragover",L);mxEvent.addListener(n,"drop",c);k.appendChild(m);e=document.createElement("div");e.style.textAlign="right";e.style.marginTop="20px";f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});f.setAttribute("id","btnCancel");f.className="geBtn";b.editor.cancelFirst&& +e.appendChild(f);"draw.io"!=b.getServiceName()||null==u||u.constructor!=DriveLibrary&&u.constructor!=GitHubLibrary||(g=mxUtils.button(mxResources.get("link"),function(){b.spinner.spin(document.body,mxResources.get("loading"))&&u.getPublicUrl(function(F){b.spinner.stop();if(null!=F){var K=b.getSearch("create title mode url drive splash state clibs ui".split(" "));K+=(0==K.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(F);F=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+ +"/"+K,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(F.container,450,240,!0);F.init()}else u.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(u.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),g.className="geBtn",e.appendChild(g));g=mxUtils.button(mxResources.get("export"), +function(){var F=b.createLibraryDataFromImages(d),K=q.value;/(\.xml)$/i.test(K)||(K+=".xml");b.isLocalFileSave()?b.saveLocalFile(F,K,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(K)+"&format=xml&xml="+encodeURIComponent(F))).simulate(document,"_blank")});g.setAttribute("id","btnDownload");g.className="geBtn";e.appendChild(g);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var p=document.createElement("input");p.setAttribute("multiple","multiple"); +p.setAttribute("type","file");mxEvent.addListener(p,"change",function(F){N=!1;b.importFiles(p.files,0,0,b.maxImageSize,function(K,D,H,J,G,P,T,W,U){null!=p.files&&(t(F)(K,D,H,J,G,P,T,W,U),p.type="",p.type="file",p.value="")});m.scrollTop=m.scrollHeight});p.style.display="none";document.body.appendChild(p);b.libDlgFileInputElt=p}g=mxUtils.button(mxResources.get("import"),function(){null!=y&&(y(),y=null);b.libDlgFileInputElt.click()});g.setAttribute("id","btnAddImage");g.className="geBtn";e.appendChild(g)}g= +mxUtils.button(mxResources.get("addImages"),function(){null!=y&&(y(),y=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(F,K,D){N=!1;if(null!=F){if("data:image/"==F.substring(0,11)){var H=F.indexOf(",");0<H&&(F=F.substring(0,H)+";base64,"+F.substring(H+1))}E(F,null,0,0,K,D);m.scrollTop=m.scrollHeight}})});g.setAttribute("id","btnAddImageUrl");g.className="geBtn";e.appendChild(g);this.saveBtnClickHandler=function(F,K,D,H){b.saveLibrary(F,K,D,H)};g=mxUtils.button(mxResources.get("save"), +mxUtils.bind(this,function(){null!=y&&(y(),y=null);this.saveBtnClickHandler(q.value,d,u,v)}));g.setAttribute("id","btnSave");g.className="geBtn gePrimaryBtn";e.appendChild(g);b.editor.cancelFirst||e.appendChild(f);k.appendChild(e);this.container=k},EditShapeDialog=function(b,f,k,e,u){e=null!=e?e:300;u=null!=u?u:120;var v=document.createElement("table"),B=document.createElement("tbody");v.style.cellPadding="4px";var E=document.createElement("tr");var L=document.createElement("td");L.setAttribute("colspan", +"2");L.style.fontSize="10pt";mxUtils.write(L,k);E.appendChild(L);B.appendChild(E);E=document.createElement("tr");L=document.createElement("td");var c=document.createElement("textarea");c.style.outline="none";c.style.resize="none";c.style.width=e-200+"px";c.style.height=u+"px";this.textarea=c;this.init=function(){c.focus();c.scrollTop=0};L.appendChild(c);E.appendChild(L);L=document.createElement("td");k=document.createElement("div");k.style.position="relative";k.style.border="1px solid gray";k.style.top= +"6px";k.style.width="200px";k.style.height=u+4+"px";k.style.overflow="hidden";k.style.marginBottom="16px";mxEvent.disableContextMenu(k);L.appendChild(k);var d=new Graph(k);d.setEnabled(!1);var g=b.editor.graph.cloneCell(f);d.addCells([g]);k=d.view.getState(g);var q="";null!=k.shape&&null!=k.shape.stencil&&(q=mxUtils.getPrettyXml(k.shape.stencil.desc));mxUtils.write(c,q||"");k=d.getGraphBounds();u=Math.min(160/k.width,(u-40)/k.height);d.view.scaleAndTranslate(u,20/u-k.x,20/u-k.y);E.appendChild(L); +B.appendChild(E);E=document.createElement("tr");L=document.createElement("td");L.setAttribute("colspan","2");L.style.paddingTop="2px";L.style.whiteSpace="nowrap";L.setAttribute("align","right");b.isOffline()||(u=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/shape-complex-create-edit")}),u.className="geBtn",L.appendChild(u));u=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});u.className="geBtn";b.editor.cancelFirst&&L.appendChild(u); +var m=function(n,z,C){var x=c.value,y=mxUtils.parseXml(x);x=mxUtils.getPrettyXml(y.documentElement);y=y.documentElement.getElementsByTagName("parsererror");if(null!=y&&0<y.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(C&&b.hideDialog(),y=!n.model.contains(z),!C||y||x!=q){x=Graph.compress(x);n.getModel().beginUpdate();try{if(y){var I=b.editor.graph.getFreeInsertPoint();z.geometry.x=I.x;z.geometry.y=I.y;n.addCell(z)}n.setCellStyles(mxConstants.STYLE_SHAPE, +"stencil("+x+")",[z])}catch(N){throw N;}finally{n.getModel().endUpdate()}y&&(n.setSelectionCell(z),n.scrollCellToVisible(z))}};k=mxUtils.button(mxResources.get("preview"),function(){m(d,g,!1)});k.className="geBtn";L.appendChild(k);k=mxUtils.button(mxResources.get("apply"),function(){m(b.editor.graph,f,!0)});k.className="geBtn gePrimaryBtn";L.appendChild(k);b.editor.cancelFirst||L.appendChild(u);E.appendChild(L);B.appendChild(E);v.appendChild(B);this.container=v},CustomDialog=function(b,f,k,e,u,v, +B,E,L,c,d){var g=document.createElement("div");g.appendChild(f);var q=document.createElement("div");q.style.marginTop="30px";q.style.textAlign="center";null!=B&&q.appendChild(B);b.isOffline()||null==v||(f=mxUtils.button(mxResources.get("help"),function(){b.openLink(v)}),f.className="geBtn",q.appendChild(f));L=mxUtils.button(L||mxResources.get("cancel"),function(){b.hideDialog();null!=e&&e()});L.className="geBtn";E&&(L.style.display="none");b.editor.cancelFirst&&q.appendChild(L);u=mxUtils.button(u|| +mxResources.get("ok"),mxUtils.bind(this,function(){c||b.hideDialog(null,null,this.container);if(null!=k){var m=k();if("string"===typeof m){b.showError(mxResources.get("error"),m);return}}c&&b.hideDialog(null,null,this.container)}));q.appendChild(u);u.className="geBtn gePrimaryBtn";b.editor.cancelFirst||q.appendChild(L);if(null!=d)for(E=0;E<d.length;E++)(function(m,n,z){m=mxUtils.button(m,function(C){n(C)});null!=z&&m.setAttribute("title",z);m.className="geBtn";q.appendChild(m)})(d[E][0],d[E][1],d[E][2]); +g.appendChild(q);this.cancelBtn=L;this.okButton=u;this.container=g},TemplatesDialog=function(b,f,k,e,u,v,B,E,L,c,d,g,q,m,n){function z(da){Ia.innerText=da;Ia.style.display="block";setTimeout(function(){Ia.style.display="none"},4E3)}function C(){null!=l&&(l.style.fontWeight="normal",l.style.textDecoration="none",A=l,l=null)}function x(da,fa,ja,ra,oa,Aa,xa){if(-1<da.className.indexOf("geTempDlgRadioBtnActive"))return!1;da.className+=" geTempDlgRadioBtnActive";W.querySelector(".geTempDlgRadioBtn[data-id="+ +ra+"]").className="geTempDlgRadioBtn "+(xa?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");W.querySelector("."+fa).src="/images/"+ja+"-sel.svg";W.querySelector("."+oa).src="/images/"+Aa+".svg";return!0}function y(da,fa,ja,ra){function oa(pa,Ha){null==xa?(pa=/^https?:\/\//.test(pa)&&!b.editor.isCorsEnabledForUrl(pa)?PROXY_URL+"?url="+encodeURIComponent(pa):TEMPLATE_PATH+"/"+pa,mxUtils.get(pa,mxUtils.bind(this,function(Ma){200<=Ma.getStatus()&&299>=Ma.getStatus()&&(xa=Ma.getText());Ha(xa)}))):Ha(xa)} +function Aa(pa,Ha,Ma){if(null!=pa&&mxUtils.isAncestorNode(document.body,fa)&&(pa=mxUtils.parseXml(pa),pa=Editor.extractGraphModel(pa.documentElement,!0),null!=pa)){"mxfile"==pa.nodeName&&(pa=Editor.parseDiagramNode(pa.getElementsByTagName("diagram")[0]));var Ra=new mxCodec(pa.ownerDocument),Ja=new mxGraphModel;Ra.decode(pa,Ja);pa=Ja.root.getChildAt(0).children||[];b.sidebar.createTooltip(fa,pa,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight|| +document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=da.title?mxResources.get(da.title,null,da.title):null,!0,new mxPoint(Ha,Ma),!0,null,!0);var Oa=document.createElement("div");Oa.className="geTempDlgDialogMask";W.appendChild(Oa);var Qa=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Oa&&(W.removeChild(Oa),Oa=null,Qa.apply(this,arguments),b.sidebar.hideTooltip=Qa)};mxEvent.addListener(Oa,"click",function(){b.sidebar.hideTooltip()})}}var xa=null;if(Ga||b.sidebar.currentElt== +fa)b.sidebar.hideTooltip();else{var ta=function(pa){Ga&&b.sidebar.currentElt==fa&&Aa(pa,mxEvent.getClientX(ra),mxEvent.getClientY(ra));Ga=!1;ja.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=fa;Ga=!0;ja.src="/images/aui-wait.gif";da.isExt?L(da,ta,function(){z(mxResources.get("cantLoadPrev"));Ga=!1;ja.src="/images/icon-search.svg"}):oa(da.url,ta)}}function I(da,fa,ja){if(null!=M){for(var ra=M.className.split(" "),oa=0;oa<ra.length;oa++)if(-1<ra[oa].indexOf("Active")){ra.splice(oa, +1);break}M.className=ra.join(" ")}null!=da?(M=da,M.className+=" "+fa,Q=ja,Pa.className="geTempDlgCreateBtn"):(Q=M=null,Pa.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function N(da,fa){if(null!=Q){var ja=function(ta){xa.isExternal?L(xa,function(pa){ra(pa,ta)},oa):xa.url?mxUtils.get(TEMPLATE_PATH+"/"+xa.url,mxUtils.bind(this,function(pa){200<=pa.getStatus()&&299>=pa.getStatus()?ra(pa.getText(),ta):oa()})):ra(b.emptyDiagramXml,ta)},ra=function(ta,pa){n||b.hideDialog(!0);f(ta,pa,xa,fa)},oa=function(){z(mxResources.get("cannotLoad")); +Aa()},Aa=function(){Q=xa;Pa.className="geTempDlgCreateBtn";fa&&(za.className="geTempDlgOpenBtn")},xa=Q;Q=null;"boolean"!==typeof fa&&(fa=xa.isExternal&&g);1==da?c(xa.url,xa):fa?(za.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ja()):(Pa.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",da=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),da=new FilenameDialog(b,b.defaultFilename+".drawio", +mxResources.get("ok"),ja,da,function(ta){var pa=null!=ta&&0<ta.length;return pa&&n?(ja(ta),!1):pa},null,null,null,Aa,m?null:[]),b.showDialog(da.container,350,80,!0,!0),da.init())}}function t(da){Pa.innerText=mxResources.get(ba||da?"create":"copy");da=da?"none":"";g&&(za.style.display=da);for(var fa=W.querySelectorAll(".geTempDlgLinkToDiagram"),ja=0;ja<fa.length;ja++)fa[ja].style.display=da}function p(da,fa,ja,ra,oa){oa||(ma.innerText="",I(),X=da,aa=ra);var Aa=null;if(ja){Aa=document.createElement("table"); +Aa.className="geTempDlgDiagramsListGrid";var xa=document.createElement("tr"),ta=document.createElement("th");ta.style.width="50%";ta.innerText=mxResources.get("diagram");xa.appendChild(ta);ta=document.createElement("th");ta.style.width="25%";ta.innerText=mxResources.get("changedBy");xa.appendChild(ta);ta=document.createElement("th");ta.style.width="25%";ta.innerText=mxResources.get("lastModifiedOn");xa.appendChild(ta);Aa.appendChild(xa);ma.appendChild(Aa)}for(xa=0;xa<da.length;xa++){da[xa].isExternal= +!fa;var pa=da[xa].url,Ha=(ta=mxUtils.htmlEntities(fa?mxResources.get(da[xa].title,null,da[xa].title):da[xa].title))||da[xa].url,Ma=da[xa].imgUrl,Ra=da[xa].changedBy||"",Ja="";da[xa].lastModifiedOn&&(Ja=b.timeSince(new Date(da[xa].lastModifiedOn)),null==Ja&&(Ja=mxResources.get("lessThanAMinute")),Ja=mxResources.get("timeAgo",[Ja],"{1} ago"));Ma||(Ma=TEMPLATE_PATH+"/"+pa.substring(0,pa.length-4)+".png");pa=ja?50:15;null!=ta&&ta.length>pa&&(ta=ta.substring(0,pa)+"…");if(ja){var Oa=document.createElement("tr"); +Ma=document.createElement("td");var Qa=document.createElement("img");Qa.src="/images/icon-search.svg";Qa.className="geTempDlgDiagramListPreviewBtn";Qa.setAttribute("title",mxResources.get("preview"));oa||Ma.appendChild(Qa);Ha=document.createElement("span");Ha.className="geTempDlgDiagramTitle";Ha.innerHTML=ta;Ma.appendChild(Ha);Oa.appendChild(Ma);Ma=document.createElement("td");Ma.innerText=Ra;Oa.appendChild(Ma);Ma=document.createElement("td");Ma.innerText=Ja;Oa.appendChild(Ma);Aa.appendChild(Oa); +null==M&&(t(fa),I(Oa,"geTempDlgDiagramsListGridActive",da[xa]));(function(Ka,Ta,Va){mxEvent.addListener(Oa,"click",function(){M!=Ta&&(t(fa),I(Ta,"geTempDlgDiagramsListGridActive",Ka))});mxEvent.addListener(Oa,"dblclick",N);mxEvent.addListener(Qa,"click",function(Wa){y(Ka,Ta,Va,Wa)})})(da[xa],Oa,Qa)}else{var Na=document.createElement("div");Na.className="geTempDlgDiagramTile";Na.setAttribute("title",Ha);null==M&&(t(fa),I(Na,"geTempDlgDiagramTileActive",da[xa]));Ra=document.createElement("div");Ra.className= "geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var Sa=document.createElement("img");Sa.style.display="none";(function(Ka,Ta,Va){Sa.onload=function(){Ta.className="geTempDlgDiagramTileImg";Ka.style.display=""};Sa.onerror=function(){this.src!=Va?this.src=Va:Ta.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(Sa,Ra,Ma?Ma.replace(".drawio.xml","").replace(".drawio","").replace(".xml",""):"");Sa.src=Ma;Ra.appendChild(Sa);Na.appendChild(Ra);Ra=document.createElement("div"); -Ra.className="geTempDlgDiagramTileLbl";Ra.innerHTML=null!=ta?ta:"";Na.appendChild(Ra);Qa=document.createElement("img");Qa.src="/images/icon-search.svg";Qa.className="geTempDlgDiagramPreviewBtn";Qa.setAttribute("title",mxResources.get("preview"));va||Na.appendChild(Qa);(function(Ka,Ta,Va){mxEvent.addListener(Na,"click",function(){L!=Ta&&(t(ha),I(Ta,"geTempDlgDiagramTileActive",Ka))});mxEvent.addListener(Na,"dblclick",N);mxEvent.addListener(Qa,"click",function(Wa){y(Ka,Ta,Va,Wa)})})(ea[ya],Na,Qa);la.appendChild(Na)}}for(var Ua in ma)ea= -ma[Ua],0<ea.length&&(va=document.createElement("div"),va.className="geTempDlgImportCat",va.innerText=mxResources.get(Ua,null,Ua),la.appendChild(va),p(ea,ha,oa,null,!0))}function F(ea,ha){za.innerText="";I();var oa=Math.floor(za.offsetWidth/150)-1;ha=!ha&&ea.length>oa?oa:ea.length;for(var ma=0;ma<ha;ma++){var va=ea[ma];va.isCategory=!0;var Ca=document.createElement("div"),ya=mxResources.get(va.title);null==ya&&(ya=va.title.substring(0,1).toUpperCase()+va.title.substring(1));Ca.className="geTempDlgNewDiagramCatItem"; -Ca.setAttribute("title",ya);ya=mxUtils.htmlEntities(ya);15<ya.length&&(ya=ya.substring(0,15)+"…");null==L&&(t(!0),I(Ca,"geTempDlgNewDiagramCatItemActive",va));var ta=document.createElement("div");ta.className="geTempDlgNewDiagramCatItemImg";var pa=document.createElement("img");pa.src=NEW_DIAGRAM_CATS_PATH+"/"+va.img;ta.appendChild(pa);Ca.appendChild(ta);ta=document.createElement("div");ta.className="geTempDlgNewDiagramCatItemLbl";ta.innerHTML=ya;Ca.appendChild(ta);za.appendChild(Ca);(function(Ha, -Ma){mxEvent.addListener(Ca,"click",function(){L!=Ma&&(t(!0),I(Ma,"geTempDlgNewDiagramCatItemActive",Ha))});mxEvent.addListener(Ca,"dblclick",N)})(va,Ca)}Ca=document.createElement("div");Ca.className="geTempDlgNewDiagramCatItem";ya=mxResources.get("showAllTemps");Ca.setAttribute("title",ya);ta=document.createElement("div");ta.className="geTempDlgNewDiagramCatItemImg";ta.innerText="...";ta.style.fontSize="32px";Ca.appendChild(ta);ta=document.createElement("div");ta.className="geTempDlgNewDiagramCatItemLbl"; -ta.innerText=ya;Ca.appendChild(ta);za.appendChild(Ca);mxEvent.addListener(Ca,"click",function(){function Ha(){var Ra=Ma.querySelector(".geTemplateDrawioCatLink");null!=Ra?Ra.click():setTimeout(Ha,200)}ca=!0;var Ma=W.querySelector(".geTemplatesList");Ma.style.display="block";ka.style.width="";Ga.style.display="";Ga.value="";Y=null;Ha()});fa.style.display=ea.length<=oa?"none":""}function J(ea,ha,oa){function ma(Sa,Ua){var Ka=mxResources.get(Sa);null==Ka&&(Ka=Sa.substring(0,1).toUpperCase()+Sa.substring(1)); -Sa=Ka+" ("+Ua.length+")";var Ta=Ka=mxUtils.htmlEntities(Ka);15<Ka.length&&(Ka=Ka.substring(0,15)+"…");return{lbl:Ka+" ("+Ua.length+")",fullLbl:Sa,lblOnly:Ta}}function va(Sa,Ua,Ka,Ta,Va){mxEvent.addListener(Ka,"click",function(){l!=Ka&&(null!=l?(l.style.fontWeight="normal",l.style.textDecoration="none"):(Ea.style.display="none",Da.style.minHeight="100%"),l=Ka,l.style.fontWeight="bold",l.style.textDecoration="underline",ka.scrollTop=0,U&&(V=!0),ia.innerHTML=Ua,qa.style.display="none",p(Va?ha[Sa]: -Ta?La[Sa][Ta]:ea[Sa],Va?!1:!0))})}var Ca=W.querySelector(".geTemplatesList");if(0<oa){oa=document.createElement("div");oa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(oa,mxResources.get("custom"));Ca.appendChild(oa);for(var ya in ha){oa=document.createElement("div");var ta=ha[ya];ta=ma(ya,ta);oa.className="geTemplateCatLink";oa.setAttribute("title",ta.fullLbl);oa.innerHTML=ta.lbl;Ca.appendChild(oa);va(ya,ta.lblOnly,oa, -null,!0)}oa=document.createElement("div");oa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(oa,"draw.io");Ca.appendChild(oa)}for(ya in ea){var pa=La[ya],Ha=oa=document.createElement(pa?"ul":"div");ta=ea[ya];ta=ma(ya,ta);if(null!=pa){var Ma=document.createElement("li"),Ra=document.createElement("div");Ra.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";Ra.style.padding="0";Ra.setAttribute("title",ta.fullLbl); -Ra.innerHTML=ta.lbl;Ha=Ra;Ma.appendChild(Ra);var Ja=document.createElement("ul");Ja.className="geTempTreeNested";Ja.style.visibility="hidden";for(var Pa in pa){var Qa=document.createElement("li"),Na=ma(Pa,pa[Pa]);Qa.setAttribute("title",Na.fullLbl);Qa.innerHTML=Na.lbl;Qa.className="geTemplateCatLink";Qa.style.padding="0";Qa.style.margin="0";va(ya,Na.lblOnly,Qa,Pa);Ja.appendChild(Qa)}Ma.appendChild(Ja);oa.className="geTempTree";oa.appendChild(Ma);(function(Sa,Ua){mxEvent.addListener(Ua,"click",function(){for(var Ka= -Sa.querySelectorAll("li"),Ta=0;Ta<Ka.length;Ta++)Ka[Ta].style.margin="";Sa.style.visibility="visible";Sa.classList.toggle("geTempTreeActive");Sa.classList.toggle("geTempTreeNested")&&setTimeout(function(){for(var Va=0;Va<Ka.length;Va++)Ka[Va].style.margin="0";Sa.style.visibility="hidden"},250);Ua.classList.toggle("geTempTreeCaret-down")})})(Ja,Ra)}else oa.className="geTemplateCatLink geTemplateDrawioCatLink",oa.setAttribute("title",ta.fullLbl),oa.innerHTML=ta.lbl;Ca.appendChild(oa);va(ya,ta.lblOnly, -Ha)}}function M(){mxUtils.get(d,function(ea){if(!Ba){Ba=!0;ea=ea.getXml().documentElement.firstChild;for(var ha={};null!=ea;){if("undefined"!==typeof ea.getAttribute)if("clibs"==ea.nodeName){for(var oa=ea.getAttribute("name"),ma=ea.getElementsByTagName("add"),va=[],Ca=0;Ca<ma.length;Ca++)va.push(encodeURIComponent(mxUtils.getTextContent(ma[Ca])));null!=oa&&0<va.length&&(ha[oa]=va.join(";"))}else if(va=ea.getAttribute("url"),null!=va){ma=ea.getAttribute("section");oa=ea.getAttribute("subsection"); -if(null==ma&&(Ca=va.indexOf("/"),ma=va.substring(0,Ca),null==oa)){var ya=va.indexOf("/",Ca+1);-1<ya&&(oa=va.substring(Ca+1,ya))}Ca=wa[ma];null==Ca&&(sa++,Ca=[],wa[ma]=Ca);va=ea.getAttribute("clibs");null!=ha[va]&&(va=ha[va]);va={url:ea.getAttribute("url"),libs:ea.getAttribute("libs"),title:ea.getAttribute("title")||ea.getAttribute("name"),preview:ea.getAttribute("preview"),clibs:va,tags:ea.getAttribute("tags")};Ca.push(va);null!=oa&&(Ca=La[ma],null==Ca&&(Ca={},La[ma]=Ca),ma=Ca[oa],null==ma&&(ma=[], -Ca[oa]=ma),ma.push(va))}ea=ea.nextSibling}J(wa,ja,da)}})}function H(ea){B&&(ka.scrollTop=0,la.innerText="",ra.spin(la),V=!1,U=!0,ia.innerText=mxResources.get("recentDiag"),Y=null,B(ba,function(){z(mxResources.get("cannotLoad"));ba([])},ea?null:x))}function G(ea){if(""==ea)null!=A&&(A.click(),A=null);else{if(null==TemplatesDialog.tagsList[d]){var ha={};for(Ha in wa)for(var oa=wa[Ha],ma=0;ma<oa.length;ma++){var va=oa[ma];if(null!=va.tags)for(var Ca=va.tags.toLowerCase().split(";"),ya=0;ya<Ca.length;ya++)null== -ha[Ca[ya]]&&(ha[Ca[ya]]=[]),ha[Ca[ya]].push(va)}TemplatesDialog.tagsList[d]=ha}var ta=ea.toLowerCase().split(" ");ha=TemplatesDialog.tagsList[d];if(0<da&&null==ha.__tagsList__){for(Ha in ja)for(oa=ja[Ha],ma=0;ma<oa.length;ma++)for(va=oa[ma],Ca=va.title.split(" "),Ca.push(Ha),ya=0;ya<Ca.length;ya++){var pa=Ca[ya].toLowerCase();null==ha[pa]&&(ha[pa]=[]);ha[pa].push(va)}ha.__tagsList__=!0}var Ha=[];oa={};for(ma=Ca=0;ma<ta.length;ma++)if(0<ta[ma].length){pa=ha[ta[ma]];var Ma={};Ha=[];if(null!=pa)for(ya= -0;ya<pa.length;ya++)va=pa[ya],0==Ca==(null==oa[va.url])&&(Ma[va.url]=!0,Ha.push(va));oa=Ma;Ca++}0==Ha.length?ia.innerText=mxResources.get("noResultsFor",[ea]):p(Ha,!0)}}function E(ea){if(Y!=ea||R!=Z)C(),ka.scrollTop=0,la.innerText="",ia.innerText=mxResources.get("searchResults")+' "'+ea+'"',na=null,ca?G(ea):D&&(ea?(ra.spin(la),V=!1,U=!0,D(ea,ba,function(){z(mxResources.get("searchFailed"));ba([])},R?null:x)):H(R)),Y=ea,Z=R}function P(ea){null!=na&&clearTimeout(na);13==ea.keyCode?E(Ga.value):na=setTimeout(function(){E(Ga.value)}, -1E3)}var T='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(D?"":'style="display: none"')+' placeholder="'+mxResources.get("search")+'"></div><div class="geTemplatesList" style="display: none"><div class="geTempDlgBack">< '+mxResources.get("back")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+mxResources.get("templates")+'</div></div><div class="geTempDlgContent" style="width: 100%"><div class="geTempDlgNewDiagramCat"><div class="geTempDlgNewDiagramCatLbl">'+ +Ra.className="geTempDlgDiagramTileLbl";Ra.innerHTML=null!=ta?ta:"";Na.appendChild(Ra);Qa=document.createElement("img");Qa.src="/images/icon-search.svg";Qa.className="geTempDlgDiagramPreviewBtn";Qa.setAttribute("title",mxResources.get("preview"));oa||Na.appendChild(Qa);(function(Ka,Ta,Va){mxEvent.addListener(Na,"click",function(){M!=Ta&&(t(fa),I(Ta,"geTempDlgDiagramTileActive",Ka))});mxEvent.addListener(Na,"dblclick",N);mxEvent.addListener(Qa,"click",function(Wa){y(Ka,Ta,Va,Wa)})})(da[xa],Na,Qa);ma.appendChild(Na)}}for(var Ua in ra)da= +ra[Ua],0<da.length&&(oa=document.createElement("div"),oa.className="geTempDlgImportCat",oa.innerText=mxResources.get(Ua,null,Ua),ma.appendChild(oa),p(da,fa,ja,null,!0))}function F(da,fa){ya.innerText="";I();var ja=Math.floor(ya.offsetWidth/150)-1;fa=!fa&&da.length>ja?ja:da.length;for(var ra=0;ra<fa;ra++){var oa=da[ra];oa.isCategory=!0;var Aa=document.createElement("div"),xa=mxResources.get(oa.title);null==xa&&(xa=oa.title.substring(0,1).toUpperCase()+oa.title.substring(1));Aa.className="geTempDlgNewDiagramCatItem"; +Aa.setAttribute("title",xa);xa=mxUtils.htmlEntities(xa);15<xa.length&&(xa=xa.substring(0,15)+"…");null==M&&(t(!0),I(Aa,"geTempDlgNewDiagramCatItemActive",oa));var ta=document.createElement("div");ta.className="geTempDlgNewDiagramCatItemImg";var pa=document.createElement("img");pa.src=NEW_DIAGRAM_CATS_PATH+"/"+oa.img;ta.appendChild(pa);Aa.appendChild(ta);ta=document.createElement("div");ta.className="geTempDlgNewDiagramCatItemLbl";ta.innerHTML=xa;Aa.appendChild(ta);ya.appendChild(Aa);(function(Ha, +Ma){mxEvent.addListener(Aa,"click",function(){M!=Ma&&(t(!0),I(Ma,"geTempDlgNewDiagramCatItemActive",Ha))});mxEvent.addListener(Aa,"dblclick",N)})(oa,Aa)}Aa=document.createElement("div");Aa.className="geTempDlgNewDiagramCatItem";xa=mxResources.get("showAllTemps");Aa.setAttribute("title",xa);ta=document.createElement("div");ta.className="geTempDlgNewDiagramCatItemImg";ta.innerText="...";ta.style.fontSize="32px";Aa.appendChild(ta);ta=document.createElement("div");ta.className="geTempDlgNewDiagramCatItemLbl"; +ta.innerText=xa;Aa.appendChild(ta);ya.appendChild(Aa);mxEvent.addListener(Aa,"click",function(){function Ha(){var Ra=Ma.querySelector(".geTemplateDrawioCatLink");null!=Ra?Ra.click():setTimeout(Ha,200)}ba=!0;var Ma=W.querySelector(".geTemplatesList");Ma.style.display="block";la.style.width="";Fa.style.display="";Fa.value="";Y=null;Ha()});ha.style.display=da.length<=ja?"none":""}function K(da,fa,ja){function ra(Sa,Ua){var Ka=mxResources.get(Sa);null==Ka&&(Ka=Sa.substring(0,1).toUpperCase()+Sa.substring(1)); +Sa=Ka+" ("+Ua.length+")";var Ta=Ka=mxUtils.htmlEntities(Ka);15<Ka.length&&(Ka=Ka.substring(0,15)+"…");return{lbl:Ka+" ("+Ua.length+")",fullLbl:Sa,lblOnly:Ta}}function oa(Sa,Ua,Ka,Ta,Va){mxEvent.addListener(Ka,"click",function(){l!=Ka&&(null!=l?(l.style.fontWeight="normal",l.style.textDecoration="none"):(Da.style.display="none",Ca.style.minHeight="100%"),l=Ka,l.style.fontWeight="bold",l.style.textDecoration="underline",la.scrollTop=0,U&&(V=!0),ia.innerHTML=Ua,qa.style.display="none",p(Va?fa[Sa]: +Ta?La[Sa][Ta]:da[Sa],Va?!1:!0))})}var Aa=W.querySelector(".geTemplatesList");if(0<ja){ja=document.createElement("div");ja.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(ja,mxResources.get("custom"));Aa.appendChild(ja);for(var xa in fa){ja=document.createElement("div");var ta=fa[xa];ta=ra(xa,ta);ja.className="geTemplateCatLink";ja.setAttribute("title",ta.fullLbl);ja.innerHTML=ta.lbl;Aa.appendChild(ja);oa(xa,ta.lblOnly,ja, +null,!0)}ja=document.createElement("div");ja.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(ja,"draw.io");Aa.appendChild(ja)}for(xa in da){var pa=La[xa],Ha=ja=document.createElement(pa?"ul":"div");ta=da[xa];ta=ra(xa,ta);if(null!=pa){var Ma=document.createElement("li"),Ra=document.createElement("div");Ra.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";Ra.style.padding="0";Ra.setAttribute("title",ta.fullLbl); +Ra.innerHTML=ta.lbl;Ha=Ra;Ma.appendChild(Ra);var Ja=document.createElement("ul");Ja.className="geTempTreeNested";Ja.style.visibility="hidden";for(var Oa in pa){var Qa=document.createElement("li"),Na=ra(Oa,pa[Oa]);Qa.setAttribute("title",Na.fullLbl);Qa.innerHTML=Na.lbl;Qa.className="geTemplateCatLink";Qa.style.padding="0";Qa.style.margin="0";oa(xa,Na.lblOnly,Qa,Oa);Ja.appendChild(Qa)}Ma.appendChild(Ja);ja.className="geTempTree";ja.appendChild(Ma);(function(Sa,Ua){mxEvent.addListener(Ua,"click",function(){for(var Ka= +Sa.querySelectorAll("li"),Ta=0;Ta<Ka.length;Ta++)Ka[Ta].style.margin="";Sa.style.visibility="visible";Sa.classList.toggle("geTempTreeActive");Sa.classList.toggle("geTempTreeNested")&&setTimeout(function(){for(var Va=0;Va<Ka.length;Va++)Ka[Va].style.margin="0";Sa.style.visibility="hidden"},250);Ua.classList.toggle("geTempTreeCaret-down")})})(Ja,Ra)}else ja.className="geTemplateCatLink geTemplateDrawioCatLink",ja.setAttribute("title",ta.fullLbl),ja.innerHTML=ta.lbl;Aa.appendChild(ja);oa(xa,ta.lblOnly, +Ha)}}function D(){mxUtils.get(e,function(da){if(!na){na=!0;da=da.getXml().documentElement.firstChild;for(var fa={};null!=da;){if("undefined"!==typeof da.getAttribute)if("clibs"==da.nodeName){for(var ja=da.getAttribute("name"),ra=da.getElementsByTagName("add"),oa=[],Aa=0;Aa<ra.length;Aa++)oa.push(encodeURIComponent(mxUtils.getTextContent(ra[Aa])));null!=ja&&0<oa.length&&(fa[ja]=oa.join(";"))}else if(oa=da.getAttribute("url"),null!=oa){ra=da.getAttribute("section");ja=da.getAttribute("subsection"); +if(null==ra&&(Aa=oa.indexOf("/"),ra=oa.substring(0,Aa),null==ja)){var xa=oa.indexOf("/",Aa+1);-1<xa&&(ja=oa.substring(Aa+1,xa))}Aa=wa[ra];null==Aa&&(sa++,Aa=[],wa[ra]=Aa);oa=da.getAttribute("clibs");null!=fa[oa]&&(oa=fa[oa]);oa={url:da.getAttribute("url"),libs:da.getAttribute("libs"),title:da.getAttribute("title")||da.getAttribute("name"),preview:da.getAttribute("preview"),clibs:oa,tags:da.getAttribute("tags")};Aa.push(oa);null!=ja&&(Aa=La[ra],null==Aa&&(Aa={},La[ra]=Aa),ra=Aa[ja],null==ra&&(ra=[], +Aa[ja]=ra),ra.push(oa))}da=da.nextSibling}K(wa,ka,va)}})}function H(da){B&&(la.scrollTop=0,ma.innerText="",Ba.spin(ma),V=!1,U=!0,ia.innerText=mxResources.get("recentDiag"),Y=null,B(ca,function(){z(mxResources.get("cannotLoad"));ca([])},da?null:v))}function J(da){if(""==da)null!=A&&(A.click(),A=null);else{if(null==TemplatesDialog.tagsList[e]){var fa={};for(Ha in wa)for(var ja=wa[Ha],ra=0;ra<ja.length;ra++){var oa=ja[ra];if(null!=oa.tags)for(var Aa=oa.tags.toLowerCase().split(";"),xa=0;xa<Aa.length;xa++)null== +fa[Aa[xa]]&&(fa[Aa[xa]]=[]),fa[Aa[xa]].push(oa)}TemplatesDialog.tagsList[e]=fa}var ta=da.toLowerCase().split(" ");fa=TemplatesDialog.tagsList[e];if(0<va&&null==fa.__tagsList__){for(Ha in ka)for(ja=ka[Ha],ra=0;ra<ja.length;ra++)for(oa=ja[ra],Aa=oa.title.split(" "),Aa.push(Ha),xa=0;xa<Aa.length;xa++){var pa=Aa[xa].toLowerCase();null==fa[pa]&&(fa[pa]=[]);fa[pa].push(oa)}fa.__tagsList__=!0}var Ha=[];ja={};for(ra=Aa=0;ra<ta.length;ra++)if(0<ta[ra].length){pa=fa[ta[ra]];var Ma={};Ha=[];if(null!=pa)for(xa= +0;xa<pa.length;xa++)oa=pa[xa],0==Aa==(null==ja[oa.url])&&(Ma[oa.url]=!0,Ha.push(oa));ja=Ma;Aa++}0==Ha.length?ia.innerText=mxResources.get("noResultsFor",[da]):p(Ha,!0)}}function G(da){if(Y!=da||R!=Z)C(),la.scrollTop=0,ma.innerText="",ia.innerText=mxResources.get("searchResults")+' "'+da+'"',ea=null,ba?J(da):E&&(da?(Ba.spin(ma),V=!1,U=!0,E(da,ca,function(){z(mxResources.get("searchFailed"));ca([])},R?null:v)):H(R)),Y=da,Z=R}function P(da){null!=ea&&clearTimeout(ea);13==da.keyCode?G(Fa.value):ea=setTimeout(function(){G(Fa.value)}, +1E3)}var T='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(E?"":'style="display: none"')+' placeholder="'+mxResources.get("search")+'"></div><div class="geTemplatesList" style="display: none"><div class="geTempDlgBack">< '+mxResources.get("back")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+mxResources.get("templates")+'</div></div><div class="geTempDlgContent" style="width: 100%"><div class="geTempDlgNewDiagramCat"><div class="geTempDlgNewDiagramCatLbl">'+ mxResources.get("newDiagram")+'</div><div class="geTempDlgNewDiagramCatList"></div><div class="geTempDlgNewDiagramCatFooter"><div class="geTempDlgShowAllBtn">'+mxResources.get("showMore")+'</div></div></div><div class="geTempDlgDiagramsList"><div class="geTempDlgDiagramsListHeader"><div class="geTempDlgDiagramsListTitle"></div><div class="geTempDlgDiagramsListBtns"><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge" data-id="myDiagramsBtn"><img src="/images/my-diagrams.svg" class="geTempDlgMyDiagramsBtnImg"> <span>'+ mxResources.get("myDiagrams")+'</span></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge geTempDlgRadioBtnActive" data-id="allDiagramsBtn"><img src="/images/all-diagrams-sel.svg" class="geTempDlgAllDiagramsBtnImg"> <span>'+mxResources.get("allDiagrams")+'</span></div><div class="geTempDlgSpacer"> </div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall geTempDlgRadioBtnActive" data-id="tilesBtn"><img src="/images/tiles-sel.svg" class="geTempDlgTilesBtnImg"></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall" data-id="listBtn"><img src="/images/list.svg" class="geTempDlgListBtnImg"></div></div></div><div class="geTempDlgDiagramsTiles"></div></div></div><br style="clear:both;"/><div class="geTempDlgFooter"><div class="geTempDlgErrMsg"></div>'+ (q?'<span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">'+mxResources.get("linkToDiagramHint")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram")+"</button>":"")+(g?'<div class="geTempDlgOpenBtn">'+mxResources.get("open")+"</div>":"")+'<div class="geTempDlgCreateBtn">'+mxResources.get("create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel")+"</div></div>",W=document.createElement("div");W.innerHTML=T;W.className= -"geTemplateDlg";this.container=W;d=null!=d?d:TEMPLATE_PATH+"/index.xml";u=null!=u?u:NEW_DIAGRAM_CATS_PATH+"/index.xml";var U=!1,V=!1,l=null,A=null,L=null,Q=null,O=!1,R=!0,S=!1,X=[],aa=null,Y,Z,ca=!1,fa=W.querySelector(".geTempDlgShowAllBtn"),la=W.querySelector(".geTempDlgDiagramsTiles"),ia=W.querySelector(".geTempDlgDiagramsListTitle"),qa=W.querySelector(".geTempDlgDiagramsListBtns"),ka=W.querySelector(".geTempDlgContent"),Da=W.querySelector(".geTempDlgDiagramsList"),Ea=W.querySelector(".geTempDlgNewDiagramCat"), -za=W.querySelector(".geTempDlgNewDiagramCatList"),Oa=W.querySelector(".geTempDlgCreateBtn"),Aa=W.querySelector(".geTempDlgOpenBtn"),Ga=W.querySelector(".geTempDlgSearchBox"),Ia=W.querySelector(".geTempDlgErrMsg"),ra=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(W.querySelector(".geTempDlgBack"),"click",function(){C();ca=!1;W.querySelector(".geTemplatesList").style.display="none";ka.style.width= -"100%";Ea.style.display="";Da.style.minHeight="calc(100% - 280px)";Ga.style.display=D?"":"none";Ga.value="";Y=null;H(R)});mxEvent.addListener(W.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){v(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(R=!0,null==Y?H(R):E(Y))});mxEvent.addListener(W.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){v(this,"geTempDlgMyDiagramsBtnImg","my-diagrams", -"allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(R=!1,null==Y?H(R):E(Y))});mxEvent.addListener(W.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){v(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(S=!0,p(X,!1,S,aa))});mxEvent.addListener(W.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){v(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(S=!1,p(X,!1,S,aa))});var ua=!1; -mxEvent.addListener(fa,"click",function(){O?(Ea.style.height="280px",za.style.height="190px",fa.innerText=mxResources.get("showMore"),F(xa)):(Ea.style.height="440px",za.style.height="355px",fa.innerText=mxResources.get("showLess"),F(xa,!0));O=!O});var Ba=!1,Fa=!1,wa={},La={},ja={},xa=[],sa=1,da=0;null!=e?e(function(ea,ha){ja=ea;da=ha;M()},M):M();mxUtils.get(u,function(ea){if(!Fa){Fa=!0;for(ea=ea.getXml().documentElement.firstChild;null!=ea;)"undefined"!==typeof ea.getAttribute&&null!=ea.getAttribute("title")&& -xa.push({img:ea.getAttribute("img"),libs:ea.getAttribute("libs"),clibs:ea.getAttribute("clibs"),title:ea.getAttribute("title")}),ea=ea.nextSibling;F(xa)}});var ba=function(ea,ha,oa){qa.style.display="";ra.stop();U=!1;if(V)V=!1;else if(ha)la.innerText=ha;else{oa=oa||{};ha=0;for(var ma in oa)ha+=oa[ma].length;0==ea.length&&0==ha?la.innerText=mxResources.get("noDiagrams"):p(ea,!1,S,0==ha?null:oa)}};H(R);var na=null;mxEvent.addListener(Ga,"keyup",P);mxEvent.addListener(Ga,"search",P);mxEvent.addListener(Ga, -"input",P);mxEvent.addListener(Oa,"click",function(ea){N(!1,!1)});g&&mxEvent.addListener(Aa,"click",function(ea){N(!1,!0)});q&&mxEvent.addListener(W.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(ea){N(!0)});mxEvent.addListener(W.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=k&&k();n||b.hideDialog(!0)})};TemplatesDialog.tagsList={}; -var BtnDialog=function(b,f,k,d){var u=document.createElement("div");u.style.textAlign="center";var x=document.createElement("p");x.style.fontSize="16pt";x.style.padding="0px";x.style.margin="0px";x.style.color="gray";mxUtils.write(x,mxResources.get("done"));var B="Unknown",D=document.createElement("img");D.setAttribute("border","0");D.setAttribute("align","absmiddle");D.style.marginRight="10px";f==b.drive?(B=mxResources.get("googleDrive"),D.src=IMAGE_PATH+"/google-drive-logo-white.svg"):f==b.dropbox? -(B=mxResources.get("dropbox"),D.src=IMAGE_PATH+"/dropbox-logo-white.svg"):f==b.oneDrive?(B=mxResources.get("oneDrive"),D.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(B=mxResources.get("github"),D.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?(B=mxResources.get("gitlab"),D.src=IMAGE_PATH+"/gitlab-logo.svg"):f==b.trello&&(B=mxResources.get("trello"),D.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[B],"You are now authorized in {1}")); -k=mxUtils.button(k,d);k.insertBefore(D,k.firstChild);k.style.marginTop="6px";k.className="geBigButton";k.style.fontSize="18px";k.style.padding="14px";u.appendChild(x);u.appendChild(b);u.appendChild(k);this.container=u},FontDialog=function(b,f,k,d,u){function x(I){this.style.border="";13==I.keyCode&&y.click()}var B=document.createElement("table"),D=document.createElement("tbody");B.style.marginTop="8px";var K=document.createElement("tr");var c=document.createElement("td");c.colSpan=2;c.style.whiteSpace= -"nowrap";c.style.fontSize="10pt";c.style.fontWeight="bold";var e=document.createElement("input");e.style.cssText="margin-right:8px;margin-bottom:8px;";e.setAttribute("value","sysfonts");e.setAttribute("type","radio");e.setAttribute("name","current-fontdialog");e.setAttribute("id","fontdialog-sysfonts");c.appendChild(e);var g=document.createElement("label");g.setAttribute("for","fontdialog-sysfonts");mxUtils.write(g,mxResources.get("sysFonts",null,"System Fonts"));c.appendChild(g);K.appendChild(c); -D.appendChild(K);K=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.width="120px";c.style.paddingLeft="15px";mxUtils.write(c,mxResources.get("fontname",null,"Font Name")+":");K.appendChild(c);var q=document.createElement("input");"s"==d&&q.setAttribute("value",f);q.style.marginLeft="4px";q.style.width="250px";q.className="dlg_fontName_s";c=document.createElement("td");c.appendChild(q);K.appendChild(c);D.appendChild(K);K=document.createElement("tr"); +"geTemplateDlg";this.container=W;e=null!=e?e:TEMPLATE_PATH+"/index.xml";u=null!=u?u:NEW_DIAGRAM_CATS_PATH+"/index.xml";var U=!1,V=!1,l=null,A=null,M=null,Q=null,O=!1,R=!0,S=!1,X=[],aa=null,Y,Z,ba=!1,ha=W.querySelector(".geTempDlgShowAllBtn"),ma=W.querySelector(".geTempDlgDiagramsTiles"),ia=W.querySelector(".geTempDlgDiagramsListTitle"),qa=W.querySelector(".geTempDlgDiagramsListBtns"),la=W.querySelector(".geTempDlgContent"),Ca=W.querySelector(".geTempDlgDiagramsList"),Da=W.querySelector(".geTempDlgNewDiagramCat"), +ya=W.querySelector(".geTempDlgNewDiagramCatList"),Pa=W.querySelector(".geTempDlgCreateBtn"),za=W.querySelector(".geTempDlgOpenBtn"),Fa=W.querySelector(".geTempDlgSearchBox"),Ia=W.querySelector(".geTempDlgErrMsg"),Ba=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(W.querySelector(".geTempDlgBack"),"click",function(){C();ba=!1;W.querySelector(".geTemplatesList").style.display="none";la.style.width= +"100%";Da.style.display="";Ca.style.minHeight="calc(100% - 280px)";Fa.style.display=E?"":"none";Fa.value="";Y=null;H(R)});mxEvent.addListener(W.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){x(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(R=!0,null==Y?H(R):G(Y))});mxEvent.addListener(W.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){x(this,"geTempDlgMyDiagramsBtnImg","my-diagrams", +"allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(R=!1,null==Y?H(R):G(Y))});mxEvent.addListener(W.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){x(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(S=!0,p(X,!1,S,aa))});mxEvent.addListener(W.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){x(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(S=!1,p(X,!1,S,aa))});var Ga=!1; +mxEvent.addListener(ha,"click",function(){O?(Da.style.height="280px",ya.style.height="190px",ha.innerText=mxResources.get("showMore"),F(ua)):(Da.style.height="440px",ya.style.height="355px",ha.innerText=mxResources.get("showLess"),F(ua,!0));O=!O});var na=!1,Ea=!1,wa={},La={},ka={},ua=[],sa=1,va=0;null!=d?d(function(da,fa){ka=da;va=fa;D()},D):D();mxUtils.get(u,function(da){if(!Ea){Ea=!0;for(da=da.getXml().documentElement.firstChild;null!=da;)"undefined"!==typeof da.getAttribute&&null!=da.getAttribute("title")&& +ua.push({img:da.getAttribute("img"),libs:da.getAttribute("libs"),clibs:da.getAttribute("clibs"),title:da.getAttribute("title")}),da=da.nextSibling;F(ua)}});var ca=function(da,fa,ja){qa.style.display="";Ba.stop();U=!1;if(V)V=!1;else if(fa)ma.innerText=fa;else{ja=ja||{};fa=0;for(var ra in ja)fa+=ja[ra].length;0==da.length&&0==fa?ma.innerText=mxResources.get("noDiagrams"):p(da,!1,S,0==fa?null:ja)}};H(R);var ea=null;mxEvent.addListener(Fa,"keyup",P);mxEvent.addListener(Fa,"search",P);mxEvent.addListener(Fa, +"input",P);mxEvent.addListener(Pa,"click",function(da){N(!1,!1)});g&&mxEvent.addListener(za,"click",function(da){N(!1,!0)});q&&mxEvent.addListener(W.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(da){N(!0)});mxEvent.addListener(W.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=k&&k();n||b.hideDialog(!0)})};TemplatesDialog.tagsList={}; +var BtnDialog=function(b,f,k,e){var u=document.createElement("div");u.style.textAlign="center";var v=document.createElement("p");v.style.fontSize="16pt";v.style.padding="0px";v.style.margin="0px";v.style.color="gray";mxUtils.write(v,mxResources.get("done"));var B="Unknown",E=document.createElement("img");E.setAttribute("border","0");E.setAttribute("align","absmiddle");E.style.marginRight="10px";f==b.drive?(B=mxResources.get("googleDrive"),E.src=IMAGE_PATH+"/google-drive-logo-white.svg"):f==b.dropbox? +(B=mxResources.get("dropbox"),E.src=IMAGE_PATH+"/dropbox-logo-white.svg"):f==b.oneDrive?(B=mxResources.get("oneDrive"),E.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(B=mxResources.get("github"),E.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?(B=mxResources.get("gitlab"),E.src=IMAGE_PATH+"/gitlab-logo.svg"):f==b.trello&&(B=mxResources.get("trello"),E.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[B],"You are now authorized in {1}")); +k=mxUtils.button(k,e);k.insertBefore(E,k.firstChild);k.style.marginTop="6px";k.className="geBigButton";k.style.fontSize="18px";k.style.padding="14px";u.appendChild(v);u.appendChild(b);u.appendChild(k);this.container=u},FontDialog=function(b,f,k,e,u){function v(I){this.style.border="";13==I.keyCode&&y.click()}var B=document.createElement("table"),E=document.createElement("tbody");B.style.marginTop="8px";var L=document.createElement("tr");var c=document.createElement("td");c.colSpan=2;c.style.whiteSpace= +"nowrap";c.style.fontSize="10pt";c.style.fontWeight="bold";var d=document.createElement("input");d.style.cssText="margin-right:8px;margin-bottom:8px;";d.setAttribute("value","sysfonts");d.setAttribute("type","radio");d.setAttribute("name","current-fontdialog");d.setAttribute("id","fontdialog-sysfonts");c.appendChild(d);var g=document.createElement("label");g.setAttribute("for","fontdialog-sysfonts");mxUtils.write(g,mxResources.get("sysFonts",null,"System Fonts"));c.appendChild(g);L.appendChild(c); +E.appendChild(L);L=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.width="120px";c.style.paddingLeft="15px";mxUtils.write(c,mxResources.get("fontname",null,"Font Name")+":");L.appendChild(c);var q=document.createElement("input");"s"==e&&q.setAttribute("value",f);q.style.marginLeft="4px";q.style.width="250px";q.className="dlg_fontName_s";c=document.createElement("td");c.appendChild(q);L.appendChild(c);E.appendChild(L);L=document.createElement("tr"); c=document.createElement("td");c.colSpan=2;c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.fontWeight="bold";var m=document.createElement("input");m.style.cssText="margin-right:8px;margin-bottom:8px;";m.setAttribute("value","googlefonts");m.setAttribute("type","radio");m.setAttribute("name","current-fontdialog");m.setAttribute("id","fontdialog-googlefonts");c.appendChild(m);g=document.createElement("label");g.setAttribute("for","fontdialog-googlefonts");mxUtils.write(g,mxResources.get("googleFonts", -null,"Google Fonts"));c.appendChild(g);mxClient.IS_CHROMEAPP||b.isOffline()&&!EditorUi.isElectronApp||(g=b.menus.createHelpLink("https://fonts.google.com/"),g.getElementsByTagName("img")[0].setAttribute("valign","middle"),c.appendChild(g));K.appendChild(c);D.appendChild(K);K=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.width="120px";c.style.paddingLeft="15px";mxUtils.write(c,mxResources.get("fontname",null,"Font Name")+":"); -K.appendChild(c);var n=document.createElement("input");"g"==d&&n.setAttribute("value",f);n.style.marginLeft="4px";n.style.width="250px";n.className="dlg_fontName_g";c=document.createElement("td");c.appendChild(n);K.appendChild(c);D.appendChild(K);K=document.createElement("tr");c=document.createElement("td");c.colSpan=2;c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.fontWeight="bold";var z=document.createElement("input");z.style.cssText="margin-right:8px;margin-bottom:8px;";z.setAttribute("value", -"webfonts");z.setAttribute("type","radio");z.setAttribute("name","current-fontdialog");z.setAttribute("id","fontdialog-webfonts");c.appendChild(z);g=document.createElement("label");g.setAttribute("for","fontdialog-webfonts");mxUtils.write(g,mxResources.get("webfonts",null,"Web Fonts"));c.appendChild(g);K.appendChild(c);Editor.enableWebFonts&&D.appendChild(K);K=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.width="120px";c.style.paddingLeft= -"15px";mxUtils.write(c,mxResources.get("fontname",null,"Font Name")+":");K.appendChild(c);var C=document.createElement("input");"w"==d&&(Editor.enableWebFonts?C.setAttribute("value",f):q.setAttribute("value",f));C.style.marginLeft="4px";C.style.width="250px";C.className="dlg_fontName_w";c=document.createElement("td");c.appendChild(C);K.appendChild(c);Editor.enableWebFonts&&D.appendChild(K);K=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt"; -c.style.width="120px";c.style.paddingLeft="15px";mxUtils.write(c,mxResources.get("fontUrl",null,"Font URL")+":");K.appendChild(c);var v=document.createElement("input");v.setAttribute("value",k||"");v.style.marginLeft="4px";v.style.width="250px";v.className="dlg_fontUrl";c=document.createElement("td");c.appendChild(v);K.appendChild(c);Editor.enableWebFonts&&D.appendChild(K);this.init=function(){var I=q;"g"==d?I=n:"w"==d&&Editor.enableWebFonts&&(I=C);I.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode? -I.select():document.execCommand("selectAll",!1,null)};K=document.createElement("tr");c=document.createElement("td");c.colSpan=2;c.style.paddingTop="20px";c.style.whiteSpace="nowrap";c.setAttribute("align","right");b.isOffline()||(f=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/blog/external-fonts")}),f.className="geBtn",c.appendChild(f));f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();u()});f.className="geBtn";b.editor.cancelFirst&&c.appendChild(f); -var y=mxUtils.button(mxResources.get("apply"),function(){if(e.checked){var I=q.value;var N="s"}else if(m.checked){I=n.value;var t=Editor.GOOGLE_FONTS+encodeURIComponent(I).replace(/%20/g,"+");N="g"}else z.checked&&(I=C.value,t=v.value,N="w");var p=t;var F=N,J=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==I||0==I.length?(B.querySelector(".dlg_fontName_"+F).style.border="1px solid red",p=!1):"w"!=F||J.test(p)?p=!0:(B.querySelector(".dlg_fontUrl").style.border= -"1px solid red",p=!1);p&&(u(I,t,N),b.hideDialog())});y.className="geBtn gePrimaryBtn";mxEvent.addListener(q,"keypress",x);mxEvent.addListener(n,"keypress",x);mxEvent.addListener(C,"keypress",x);mxEvent.addListener(v,"keypress",x);mxEvent.addListener(q,"focus",function(){e.setAttribute("checked","checked");e.checked=!0});mxEvent.addListener(n,"focus",function(){m.setAttribute("checked","checked");m.checked=!0});mxEvent.addListener(C,"focus",function(){z.setAttribute("checked","checked");z.checked= -!0});mxEvent.addListener(v,"focus",function(){z.setAttribute("checked","checked");z.checked=!0});c.appendChild(y);b.editor.cancelFirst||c.appendChild(f);K.appendChild(c);D.appendChild(K);B.appendChild(D);this.container=B}; -function AspectDialog(b,f,k,d,u){this.aspect={pageId:f||(b.pages?b.pages[0].getId():null),layerIds:k||[]};f=document.createElement("div");var x=document.createElement("h5");x.style.margin="0 0 10px";mxUtils.write(x,mxResources.get("pages"));f.appendChild(x);k=document.createElement("div");k.className="geAspectDlgList";f.appendChild(k);x=document.createElement("h5");x.style.margin="0 0 10px";mxUtils.write(x,mxResources.get("layers"));f.appendChild(x);x=document.createElement("div");x.className="geAspectDlgList"; -f.appendChild(x);this.pagesContainer=k;this.layersContainer=x;this.ui=b;k=document.createElement("div");k.style.marginTop="16px";k.style.textAlign="center";x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=u&&u()});x.className="geBtn";b.editor.cancelFirst&&k.appendChild(x);var B=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();d({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));k.appendChild(B);B.className="geBtn gePrimaryBtn"; -b.editor.cancelFirst||k.appendChild(x);B.setAttribute("disabled","disabled");this.okBtn=B;f.appendChild(k);this.container=f}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var f=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(f.getId(),f.getName(),f.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)}; -AspectDialog.prototype.createViewer=function(b,f,k,d){mxEvent.disableContextMenu(b);b.style.userSelect="none";var u=new Graph(b);u.setTooltips(!1);u.setEnabled(!1);u.setPanning(!1);u.minFitScale=null;u.maxFitScale=null;u.centerZoom=!0;f="mxGraphModel"==f.nodeName?f:Editor.parseDiagramNode(f);if(null!=f){var x=f.getAttribute("background");if(null==x||""==x||x==mxConstants.NONE)x=null!=d?d:"#ffffff";b.style.backgroundColor=x;d=new mxCodec(f.ownerDocument);b=u.getModel();d.decode(f,b);f=b.getChildCount(b.root); -d=null==k;for(x=0;x<f;x++){var B=b.getChildAt(b.root,x);b.setVisible(B,d||k==B.id)}u.maxFitScale=1;u.fit(0);u.center()}return u}; -AspectDialog.prototype.createPageItem=function(b,f,k){var d=document.createElement("div");d.className="geAspectDlgListItem";d.setAttribute("data-page-id",b);d.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(f)+"</div>";this.pagesContainer.appendChild(d);var u=this.createViewer(d.childNodes[0],k);f=mxUtils.bind(this,function(){null!=this.selectedItem&&(this.selectedItem.className="geAspectDlgListItem");this.selectedItem=d; -this.selectedPage=b;d.className+=" geAspectDlgListItemSelected";this.layersContainer.innerText="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var x=u.model;x=x.getChildCells(x.getRoot());for(var B=0;B<x.length;B++)this.createLayerItem(x[B],b,u,k)});mxEvent.addListener(d,"click",f);this.aspect.pageId==b&&f()}; -AspectDialog.prototype.createLayerItem=function(b,f,k,d){f=k.convertValueToString(b)||mxResources.get("background")||"Background";var u=document.createElement("div");u.setAttribute("data-layer-id",b.id);u.className="geAspectDlgListItem";u.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(f)+"</div>";this.layersContainer.appendChild(u);this.createViewer(u.childNodes[0],d,b.id);d=mxUtils.bind(this,function(){0<=u.className.indexOf("geAspectDlgListItemSelected")? -(u.className="geAspectDlgListItem",delete this.selectedLayers[b.id],mxUtils.isEmptyObject(this.selectedLayers)&&this.okBtn.setAttribute("disabled","disabled")):(u.className+=" geAspectDlgListItemSelected",this.selectedLayers[b.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(u,"click",d);-1!=this.aspect.layerIds.indexOf(b.id)&&d()}; -var FilePropertiesDialog=function(b){var f=document.createElement("table"),k=document.createElement("tbody");f.style.width="100%";f.style.marginTop="8px";var d=b.getCurrentFile();var u=null!=d&&null!=d.getTitle()?d.getTitle():b.defaultFilename;var x=function(){};if(/(\.png)$/i.test(u)){x=1;var B=0;u=b.fileNode;null!=u&&(u.hasAttribute("scale")&&(x=parseFloat(u.getAttribute("scale"))),u.hasAttribute("border")&&(B=parseInt(u.getAttribute("border"))));u=document.createElement("tr");var D=document.createElement("td"); -D.style.whiteSpace="nowrap";D.style.fontSize="10pt";D.style.width="120px";mxUtils.write(D,mxResources.get("zoom")+":");u.appendChild(D);var K=document.createElement("input");K.setAttribute("value",100*x+"%");K.style.marginLeft="4px";K.style.width="180px";D=document.createElement("td");D.style.whiteSpace="nowrap";D.appendChild(K);u.appendChild(D);k.appendChild(u);u=document.createElement("tr");D=document.createElement("td");D.style.whiteSpace="nowrap";D.style.fontSize="10pt";D.style.width="120px"; -mxUtils.write(D,mxResources.get("borderWidth")+":");u.appendChild(D);var c=document.createElement("input");c.setAttribute("value",B);c.style.marginLeft="4px";c.style.width="180px";D=document.createElement("td");D.style.whiteSpace="nowrap";D.appendChild(c);u.appendChild(D);k.appendChild(u);this.init=function(){K.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?K.select():document.execCommand("selectAll",!1,null)};x=function(){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0, -parseInt(K.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(c.value))),null!=d&&d.fileChanged());b.hideDialog()}}else if(!/(\.html)$/i.test(u)&&!/(\.svg)$/i.test(u)){var e=null!=d?d.isCompressed():Editor.compressXml;u=document.createElement("tr");D=document.createElement("td");D.style.whiteSpace="nowrap";D.style.fontSize="10pt";D.style.width="120px";mxUtils.write(D,mxResources.get("compressed")+":");u.appendChild(D);var g=document.createElement("input");g.setAttribute("type","checkbox"); -e&&(g.setAttribute("checked","checked"),g.defaultChecked=!0);D=document.createElement("td");D.style.whiteSpace="nowrap";D.appendChild(g);u.appendChild(D);k.appendChild(u);this.init=function(){g.focus()};x=function(){null!=b.fileNode&&e!=g.checked&&(b.fileNode.setAttribute("compressed",g.checked?"true":"false"),null!=d&&d.fileChanged());b.hideDialog()}}if(null!=d&&d.isRealtimeOptional()){u=document.createElement("tr");D=document.createElement("td");D.style.whiteSpace="nowrap";D.style.fontSize="10pt"; -D.style.width="120px";mxUtils.write(D,mxResources.get("realtimeCollaboration")+":");u.appendChild(D);var q=document.createElement("input");q.setAttribute("type","checkbox");var m=d.isRealtimeEnabled();if(m="disabled"!=b.drive.getCustomProperty(d.desc,"collaboration"))q.setAttribute("checked","checked"),q.defaultChecked=!0;prevApply=x;x=function(){prevApply();b.hideDialog();q.checked!=m&&b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&d.setRealtimeEnabled(q.checked,mxUtils.bind(this, -function(n){b.spinner.stop()}),mxUtils.bind(this,function(n){b.spinner.stop();b.showError(mxResources.get("error"),null!=n&&null!=n.error?n.error.message:mxResources.get("unknownError"),mxResources.get("ok"))}))};this.init=null!=this.init?this.init:function(){q.focus()};D=document.createElement("td");D.style.whiteSpace="nowrap";D.appendChild(q);D.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));u.appendChild(D);k.appendChild(u)}this.init=null!=this.init?this.init: -function(){};x=mxUtils.button(mxResources.get("apply"),x);x.className="geBtn gePrimaryBtn";u=document.createElement("tr");D=document.createElement("td");D.colSpan=2;D.style.paddingTop="20px";D.style.whiteSpace="nowrap";D.setAttribute("align","center");B=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});B.className="geBtn";b.editor.cancelFirst&&D.appendChild(B);D.appendChild(x);b.editor.cancelFirst||D.appendChild(B);u.appendChild(D);k.appendChild(u);f.appendChild(k);this.container= -f},ConnectionPointsDialog=function(b,f){function k(){null!=u&&u.destroy()}var d=document.createElement("div");d.style.userSelect="none";var u=null;this.init=function(){function x(G,E){G=new mxCell("",new mxGeometry(G,E,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");G.vertex=!0;G.cp=!0;return g.addCell(G)}function B(G){G=g.getSelectionCells();g.deleteCells(G)}function D(){var G=parseInt(F.value)||0;G=0>G?0:100<G?100:G; -F.value=G;var E=parseInt(M.value)||0;E=0>E?0:100<E?100:E;M.value=E;var P=parseInt(J.value)||0,T=parseInt(H.value)||0;G=g.getConnectionPoint(n,new mxConnectionConstraint(new mxPoint(G/100,E/100),!1,null,P,T));E=g.getSelectionCell();if(null!=E){P=E.geometry.clone();T=g.view.scale;var W=g.view.translate;P.x=(G.x-3*T)/T-W.x;P.y=(G.y-3*T)/T-W.y;g.model.setGeometry(E,P)}}function K(G){var E=0,P=0,T=q.geometry,W=mxUtils.format((G.geometry.x+3-T.x)/T.width);G=mxUtils.format((G.geometry.y+3-T.y)/T.height); -0>W?(E=W*T.width,W=0):1<W&&(E=(W-1)*T.width,W=1);0>G?(P=G*T.height,G=0):1<G&&(P=(G-1)*T.height,G=1);return{x:W,y:G,dx:parseInt(E),dy:parseInt(P)}}function c(){if(1==g.getSelectionCount()){var G=g.getSelectionCell();G=K(G);F.value=100*G.x;M.value=100*G.y;J.value=G.dx;H.value=G.dy;p.style.visibility=""}else p.style.visibility="hidden"}var e=document.createElement("div");e.style.width="350px";e.style.height="350px";e.style.overflow="hidden";e.style.border="1px solid lightGray";e.style.boxSizing="border-box"; -mxEvent.disableContextMenu(e);d.appendChild(e);var g=new Graph(e);g.autoExtend=!1;g.autoScroll=!1;g.setGridEnabled(!1);g.setEnabled(!0);g.setPanning(!0);g.setConnectable(!1);g.setTooltips(!1);g.minFitScale=null;g.maxFitScale=null;g.centerZoom=!0;g.maxFitScale=2;e=f.geometry;var q=new mxCell(f.value,new mxGeometry(0,0,e.width,e.height),f.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;");q.vertex=!0;g.addCell(q);g.dblClick=function(G,E){if(null!=E&&E!=q)g.setSelectionCell(E);else{E= -mxUtils.convertPoint(g.container,mxEvent.getClientX(G),mxEvent.getClientY(G));mxEvent.consume(G);G=g.view.scale;var P=g.view.translate;g.setSelectionCell(x((E.x-3*G)/G-P.x,(E.y-3*G)/G-P.y))}};u=new mxKeyHandler(g);u.bindKey(46,B);u.bindKey(8,B);g.getRubberband().isForceRubberbandEvent=function(G){return 0==G.evt.button&&(null==G.getCell()||G.getCell()==q)};g.panningHandler.isForcePanningEvent=function(G){return 2==G.evt.button};var m=g.isCellSelectable;g.isCellSelectable=function(G){return G==q?!1: -m.apply(this,arguments)};g.getLinkForCell=function(){return null};var n=g.view.getState(q);e=g.getAllConnectionConstraints(n);for(var z=0;null!=e&&z<e.length;z++){var C=g.getConnectionPoint(n,e[z]);x(C.x-3,C.y-3)}g.fit(8);g.center();z=mxUtils.button("",function(){g.zoomIn()});z.className="geSprite geSprite-zoomin";z.setAttribute("title",mxResources.get("zoomIn"));z.style.position="relative";z.style.outline="none";z.style.border="none";z.style.margin="2px";z.style.cursor="pointer";z.style.top=mxClient.IS_FF? -"-6px":"0px";mxUtils.setOpacity(z,60);C=mxUtils.button("",function(){g.zoomOut()});C.className="geSprite geSprite-zoomout";C.setAttribute("title",mxResources.get("zoomOut"));C.style.position="relative";C.style.outline="none";C.style.border="none";C.style.margin="2px";C.style.cursor="pointer";C.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(C,60);var v=mxUtils.button("",function(){g.fit(8);g.center()});v.className="geSprite geSprite-fit";v.setAttribute("title",mxResources.get("fit"));v.style.position= -"relative";v.style.outline="none";v.style.border="none";v.style.margin="2px";v.style.cursor="pointer";v.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(v,60);var y=mxUtils.button("",function(){g.zoomActual();g.center()});y.className="geSprite geSprite-actualsize";y.setAttribute("title",mxResources.get("actualSize"));y.style.position="relative";y.style.outline="none";y.style.border="none";y.style.margin="2px";y.style.cursor="pointer";y.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(y, -60);var I=mxUtils.button("",B);I.className="geSprite geSprite-delete";I.setAttribute("title",mxResources.get("delete"));I.style.position="relative";I.style.outline="none";I.style.border="none";I.style.margin="2px";I.style.float="right";I.style.cursor="pointer";mxUtils.setOpacity(I,10);e=document.createElement("div");e.appendChild(z);e.appendChild(C);e.appendChild(y);e.appendChild(v);e.appendChild(I);d.appendChild(e);var N=document.createElement("input");N.setAttribute("type","number");N.setAttribute("min", -"1");N.setAttribute("value","1");N.style.width="45px";N.style.position="relative";N.style.top=mxClient.IS_FF?"0px":"-4px";N.style.margin="0 4px 0 4px";e.appendChild(N);var t=document.createElement("select");t.style.position="relative";t.style.top=mxClient.IS_FF?"0px":"-4px";C=["left","right","top","bottom"];for(z=0;z<C.length;z++)v=C[z],y=document.createElement("option"),mxUtils.write(y,mxResources.get(v)),y.value=v,t.appendChild(y);e.appendChild(t);z=mxUtils.button(mxResources.get("add"),function(){var G= -parseInt(N.value);G=1>G?1:100<G?100:G;N.value=G;for(var E=t.value,P=q.geometry,T=[],W=0;W<G;W++){switch(E){case "left":var U=P.x;var V=P.y+(W+1)*P.height/(G+1);break;case "right":U=P.x+P.width;V=P.y+(W+1)*P.height/(G+1);break;case "top":U=P.x+(W+1)*P.width/(G+1);V=P.y;break;case "bottom":U=P.x+(W+1)*P.width/(G+1),V=P.y+P.height}T.push(x(U-3,V-3))}g.setSelectionCells(T)});z.style.position="relative";z.style.marginLeft="8px";z.style.top=mxClient.IS_FF?"0px":"-4px";e.appendChild(z);var p=document.createElement("div"); -p.style.margin="4px 0px 8px 0px";p.style.whiteSpace="nowrap";p.style.height="24px";e=document.createElement("span");mxUtils.write(e,mxResources.get("dx"));p.appendChild(e);var F=document.createElement("input");F.setAttribute("type","number");F.setAttribute("min","0");F.setAttribute("max","100");F.style.width="45px";F.style.margin="0 4px 0 4px";p.appendChild(F);mxUtils.write(p,"%");var J=document.createElement("input");J.setAttribute("type","number");J.style.width="45px";J.style.margin="0 4px 0 4px"; -p.appendChild(J);mxUtils.write(p,"pt");e=document.createElement("span");mxUtils.write(e,mxResources.get("dy"));e.style.marginLeft="12px";p.appendChild(e);var M=document.createElement("input");M.setAttribute("type","number");M.setAttribute("min","0");M.setAttribute("max","100");M.style.width="45px";M.style.margin="0 4px 0 4px";p.appendChild(M);mxUtils.write(p,"%");var H=document.createElement("input");H.setAttribute("type","number");H.style.width="45px";H.style.margin="0 4px 0 4px";p.appendChild(H); -mxUtils.write(p,"pt");d.appendChild(p);c();g.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<g.getSelectionCount()?mxUtils.setOpacity(I,60):mxUtils.setOpacity(I,10);c()});g.addListener(mxEvent.CELLS_MOVED,c);mxEvent.addListener(F,"change",D);mxEvent.addListener(M,"change",D);mxEvent.addListener(J,"change",D);mxEvent.addListener(H,"change",D);e=mxUtils.button(mxResources.get("cancel"),function(){k();b.hideDialog()});e.className="geBtn";z=mxUtils.button(mxResources.get("apply"),function(){var G= -g.model.cells,E=[],P=[],T;for(T in G){var W=G[T];W.cp&&P.push(K(W))}P.sort(function(U,V){return U.x!=V.x?U.x-V.x:U.y!=V.y?U.y-V.y:U.dx!=V.dx?U.dx-V.dx:U.dy-V.dy});for(G=0;G<P.length;G++)0<G&&P[G].x==P[G-1].x&&P[G].y==P[G-1].y&&P[G].dx==P[G-1].dx&&P[G].dy==P[G-1].dy||E.push("["+P[G].x+","+P[G].y+",0,"+P[G].dx+","+P[G].dy+"]");b.editor.graph.setCellStyles("points","["+E.join(",")+"]",[f]);k();b.hideDialog()});z.className="geBtn gePrimaryBtn";C=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points", -null,[f]);k();b.hideDialog()});C.className="geBtn";v=document.createElement("div");v.style.marginTop="10px";v.style.textAlign="right";b.editor.cancelFirst?(v.appendChild(e),v.appendChild(C),v.appendChild(z)):(v.appendChild(C),v.appendChild(z),v.appendChild(e));d.appendChild(v)};this.destroy=k;this.container=d};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"}, +null,"Google Fonts"));c.appendChild(g);mxClient.IS_CHROMEAPP||b.isOffline()&&!EditorUi.isElectronApp||(g=b.menus.createHelpLink("https://fonts.google.com/"),g.getElementsByTagName("img")[0].setAttribute("valign","middle"),c.appendChild(g));L.appendChild(c);E.appendChild(L);L=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.width="120px";c.style.paddingLeft="15px";mxUtils.write(c,mxResources.get("fontname",null,"Font Name")+":"); +L.appendChild(c);var n=document.createElement("input");"g"==e&&n.setAttribute("value",f);n.style.marginLeft="4px";n.style.width="250px";n.className="dlg_fontName_g";c=document.createElement("td");c.appendChild(n);L.appendChild(c);E.appendChild(L);L=document.createElement("tr");c=document.createElement("td");c.colSpan=2;c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.fontWeight="bold";var z=document.createElement("input");z.style.cssText="margin-right:8px;margin-bottom:8px;";z.setAttribute("value", +"webfonts");z.setAttribute("type","radio");z.setAttribute("name","current-fontdialog");z.setAttribute("id","fontdialog-webfonts");c.appendChild(z);g=document.createElement("label");g.setAttribute("for","fontdialog-webfonts");mxUtils.write(g,mxResources.get("webfonts",null,"Web Fonts"));c.appendChild(g);L.appendChild(c);Editor.enableWebFonts&&E.appendChild(L);L=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.width="120px";c.style.paddingLeft= +"15px";mxUtils.write(c,mxResources.get("fontname",null,"Font Name")+":");L.appendChild(c);var C=document.createElement("input");"w"==e&&(Editor.enableWebFonts?C.setAttribute("value",f):q.setAttribute("value",f));C.style.marginLeft="4px";C.style.width="250px";C.className="dlg_fontName_w";c=document.createElement("td");c.appendChild(C);L.appendChild(c);Editor.enableWebFonts&&E.appendChild(L);L=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt"; +c.style.width="120px";c.style.paddingLeft="15px";mxUtils.write(c,mxResources.get("fontUrl",null,"Font URL")+":");L.appendChild(c);var x=document.createElement("input");x.setAttribute("value",k||"");x.style.marginLeft="4px";x.style.width="250px";x.className="dlg_fontUrl";c=document.createElement("td");c.appendChild(x);L.appendChild(c);Editor.enableWebFonts&&E.appendChild(L);this.init=function(){var I=q;"g"==e?I=n:"w"==e&&Editor.enableWebFonts&&(I=C);I.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode? +I.select():document.execCommand("selectAll",!1,null)};L=document.createElement("tr");c=document.createElement("td");c.colSpan=2;c.style.paddingTop="20px";c.style.whiteSpace="nowrap";c.setAttribute("align","right");b.isOffline()||(f=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/blog/external-fonts")}),f.className="geBtn",c.appendChild(f));f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();u()});f.className="geBtn";b.editor.cancelFirst&&c.appendChild(f); +var y=mxUtils.button(mxResources.get("apply"),function(){if(d.checked){var I=q.value;var N="s"}else if(m.checked){I=n.value;var t=Editor.GOOGLE_FONTS+encodeURIComponent(I).replace(/%20/g,"+");N="g"}else z.checked&&(I=C.value,t=x.value,N="w");var p=t;var F=N,K=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==I||0==I.length?(B.querySelector(".dlg_fontName_"+F).style.border="1px solid red",p=!1):"w"!=F||K.test(p)?p=!0:(B.querySelector(".dlg_fontUrl").style.border= +"1px solid red",p=!1);p&&(u(I,t,N),b.hideDialog())});y.className="geBtn gePrimaryBtn";mxEvent.addListener(q,"keypress",v);mxEvent.addListener(n,"keypress",v);mxEvent.addListener(C,"keypress",v);mxEvent.addListener(x,"keypress",v);mxEvent.addListener(q,"focus",function(){d.setAttribute("checked","checked");d.checked=!0});mxEvent.addListener(n,"focus",function(){m.setAttribute("checked","checked");m.checked=!0});mxEvent.addListener(C,"focus",function(){z.setAttribute("checked","checked");z.checked= +!0});mxEvent.addListener(x,"focus",function(){z.setAttribute("checked","checked");z.checked=!0});c.appendChild(y);b.editor.cancelFirst||c.appendChild(f);L.appendChild(c);E.appendChild(L);B.appendChild(E);this.container=B}; +function AspectDialog(b,f,k,e,u){this.aspect={pageId:f||(b.pages?b.pages[0].getId():null),layerIds:k||[]};f=document.createElement("div");var v=document.createElement("h5");v.style.margin="0 0 10px";mxUtils.write(v,mxResources.get("pages"));f.appendChild(v);k=document.createElement("div");k.className="geAspectDlgList";f.appendChild(k);v=document.createElement("h5");v.style.margin="0 0 10px";mxUtils.write(v,mxResources.get("layers"));f.appendChild(v);v=document.createElement("div");v.className="geAspectDlgList"; +f.appendChild(v);this.pagesContainer=k;this.layersContainer=v;this.ui=b;k=document.createElement("div");k.style.marginTop="16px";k.style.textAlign="center";v=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=u&&u()});v.className="geBtn";b.editor.cancelFirst&&k.appendChild(v);var B=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();e({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));k.appendChild(B);B.className="geBtn gePrimaryBtn"; +b.editor.cancelFirst||k.appendChild(v);B.setAttribute("disabled","disabled");this.okBtn=B;f.appendChild(k);this.container=f}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var f=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(f.getId(),f.getName(),f.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)}; +AspectDialog.prototype.createViewer=function(b,f,k,e){mxEvent.disableContextMenu(b);b.style.userSelect="none";var u=new Graph(b);u.setTooltips(!1);u.setEnabled(!1);u.setPanning(!1);u.minFitScale=null;u.maxFitScale=null;u.centerZoom=!0;f="mxGraphModel"==f.nodeName?f:Editor.parseDiagramNode(f);if(null!=f){var v=f.getAttribute("background");if(null==v||""==v||v==mxConstants.NONE)v=null!=e?e:"#ffffff";b.style.backgroundColor=v;e=new mxCodec(f.ownerDocument);b=u.getModel();e.decode(f,b);f=b.getChildCount(b.root); +e=null==k;for(v=0;v<f;v++){var B=b.getChildAt(b.root,v);b.setVisible(B,e||k==B.id)}u.maxFitScale=1;u.fit(0);u.center()}return u}; +AspectDialog.prototype.createPageItem=function(b,f,k){var e=document.createElement("div");e.className="geAspectDlgListItem";e.setAttribute("data-page-id",b);e.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(f)+"</div>";this.pagesContainer.appendChild(e);var u=this.createViewer(e.childNodes[0],k);f=mxUtils.bind(this,function(){null!=this.selectedItem&&(this.selectedItem.className="geAspectDlgListItem");this.selectedItem=e; +this.selectedPage=b;e.className+=" geAspectDlgListItemSelected";this.layersContainer.innerText="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var v=u.model;v=v.getChildCells(v.getRoot());for(var B=0;B<v.length;B++)this.createLayerItem(v[B],b,u,k)});mxEvent.addListener(e,"click",f);this.aspect.pageId==b&&f()}; +AspectDialog.prototype.createLayerItem=function(b,f,k,e){f=k.convertValueToString(b)||mxResources.get("background")||"Background";var u=document.createElement("div");u.setAttribute("data-layer-id",b.id);u.className="geAspectDlgListItem";u.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(f)+"</div>";this.layersContainer.appendChild(u);this.createViewer(u.childNodes[0],e,b.id);e=mxUtils.bind(this,function(){0<=u.className.indexOf("geAspectDlgListItemSelected")? +(u.className="geAspectDlgListItem",delete this.selectedLayers[b.id],mxUtils.isEmptyObject(this.selectedLayers)&&this.okBtn.setAttribute("disabled","disabled")):(u.className+=" geAspectDlgListItemSelected",this.selectedLayers[b.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(u,"click",e);-1!=this.aspect.layerIds.indexOf(b.id)&&e()}; +var FilePropertiesDialog=function(b){var f=document.createElement("table"),k=document.createElement("tbody");f.style.width="100%";f.style.marginTop="8px";var e=b.getCurrentFile();var u=null!=e&&null!=e.getTitle()?e.getTitle():b.defaultFilename;var v=function(){};if(/(\.png)$/i.test(u)){v=1;var B=0;u=b.fileNode;null!=u&&(u.hasAttribute("scale")&&(v=parseFloat(u.getAttribute("scale"))),u.hasAttribute("border")&&(B=parseInt(u.getAttribute("border"))));u=document.createElement("tr");var E=document.createElement("td"); +E.style.whiteSpace="nowrap";E.style.fontSize="10pt";E.style.width="120px";mxUtils.write(E,mxResources.get("zoom")+":");u.appendChild(E);var L=document.createElement("input");L.setAttribute("value",100*v+"%");L.style.marginLeft="4px";L.style.width="180px";E=document.createElement("td");E.style.whiteSpace="nowrap";E.appendChild(L);u.appendChild(E);k.appendChild(u);u=document.createElement("tr");E=document.createElement("td");E.style.whiteSpace="nowrap";E.style.fontSize="10pt";E.style.width="120px"; +mxUtils.write(E,mxResources.get("borderWidth")+":");u.appendChild(E);var c=document.createElement("input");c.setAttribute("value",B);c.style.marginLeft="4px";c.style.width="180px";E=document.createElement("td");E.style.whiteSpace="nowrap";E.appendChild(c);u.appendChild(E);k.appendChild(u);this.init=function(){L.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?L.select():document.execCommand("selectAll",!1,null)};v=function(){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0, +parseInt(L.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(c.value))),null!=e&&e.fileChanged());b.hideDialog()}}else if(!/(\.html)$/i.test(u)&&!/(\.svg)$/i.test(u)){var d=null!=e?e.isCompressed():Editor.compressXml;u=document.createElement("tr");E=document.createElement("td");E.style.whiteSpace="nowrap";E.style.fontSize="10pt";E.style.width="120px";mxUtils.write(E,mxResources.get("compressed")+":");u.appendChild(E);var g=document.createElement("input");g.setAttribute("type","checkbox"); +d&&(g.setAttribute("checked","checked"),g.defaultChecked=!0);E=document.createElement("td");E.style.whiteSpace="nowrap";E.appendChild(g);u.appendChild(E);k.appendChild(u);this.init=function(){g.focus()};v=function(){null!=b.fileNode&&d!=g.checked&&(b.fileNode.setAttribute("compressed",g.checked?"true":"false"),null!=e&&e.fileChanged());b.hideDialog()}}if(null!=e&&e.isRealtimeOptional()){u=document.createElement("tr");E=document.createElement("td");E.style.whiteSpace="nowrap";E.style.fontSize="10pt"; +E.style.width="120px";mxUtils.write(E,mxResources.get("realtimeCollaboration")+":");u.appendChild(E);var q=document.createElement("input");q.setAttribute("type","checkbox");var m=e.isRealtimeEnabled();if(m="disabled"!=b.drive.getCustomProperty(e.desc,"collaboration"))q.setAttribute("checked","checked"),q.defaultChecked=!0;prevApply=v;v=function(){prevApply();b.hideDialog();q.checked!=m&&b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&e.setRealtimeEnabled(q.checked,mxUtils.bind(this, +function(n){b.spinner.stop()}),mxUtils.bind(this,function(n){b.spinner.stop();b.showError(mxResources.get("error"),null!=n&&null!=n.error?n.error.message:mxResources.get("unknownError"),mxResources.get("ok"))}))};this.init=null!=this.init?this.init:function(){q.focus()};E=document.createElement("td");E.style.whiteSpace="nowrap";E.appendChild(q);E.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));u.appendChild(E);k.appendChild(u)}this.init=null!=this.init?this.init: +function(){};v=mxUtils.button(mxResources.get("apply"),v);v.className="geBtn gePrimaryBtn";u=document.createElement("tr");E=document.createElement("td");E.colSpan=2;E.style.paddingTop="20px";E.style.whiteSpace="nowrap";E.setAttribute("align","center");B=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});B.className="geBtn";b.editor.cancelFirst&&E.appendChild(B);E.appendChild(v);b.editor.cancelFirst||E.appendChild(B);u.appendChild(E);k.appendChild(u);f.appendChild(k);this.container= +f},ConnectionPointsDialog=function(b,f){function k(){null!=u&&u.destroy()}var e=document.createElement("div");e.style.userSelect="none";var u=null;this.init=function(){function v(J,G){J=new mxCell("",new mxGeometry(J,G,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");J.vertex=!0;J.cp=!0;return g.addCell(J)}function B(J){J=g.getSelectionCells();g.deleteCells(J)}function E(){var J=parseInt(F.value)||0;J=0>J?0:100<J?100:J; +F.value=J;var G=parseInt(D.value)||0;G=0>G?0:100<G?100:G;D.value=G;var P=parseInt(K.value)||0,T=parseInt(H.value)||0;J=g.getConnectionPoint(n,new mxConnectionConstraint(new mxPoint(J/100,G/100),!1,null,P,T));G=g.getSelectionCell();if(null!=G){P=G.geometry.clone();T=g.view.scale;var W=g.view.translate;P.x=(J.x-3*T)/T-W.x;P.y=(J.y-3*T)/T-W.y;g.model.setGeometry(G,P)}}function L(J){var G=0,P=0,T=q.geometry,W=mxUtils.format((J.geometry.x+3-T.x)/T.width);J=mxUtils.format((J.geometry.y+3-T.y)/T.height); +0>W?(G=W*T.width,W=0):1<W&&(G=(W-1)*T.width,W=1);0>J?(P=J*T.height,J=0):1<J&&(P=(J-1)*T.height,J=1);return{x:W,y:J,dx:parseInt(G),dy:parseInt(P)}}function c(){if(1==g.getSelectionCount()){var J=g.getSelectionCell();J=L(J);F.value=100*J.x;D.value=100*J.y;K.value=J.dx;H.value=J.dy;p.style.visibility=""}else p.style.visibility="hidden"}var d=document.createElement("div");d.style.width="350px";d.style.height="350px";d.style.overflow="hidden";d.style.border="1px solid lightGray";d.style.boxSizing="border-box"; +mxEvent.disableContextMenu(d);e.appendChild(d);var g=new Graph(d);g.autoExtend=!1;g.autoScroll=!1;g.setGridEnabled(!1);g.setEnabled(!0);g.setPanning(!0);g.setConnectable(!1);g.setTooltips(!1);g.minFitScale=null;g.maxFitScale=null;g.centerZoom=!0;g.maxFitScale=2;d=f.geometry;var q=new mxCell(f.value,new mxGeometry(0,0,d.width,d.height),f.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;");q.vertex=!0;g.addCell(q);g.dblClick=function(J,G){if(null!=G&&G!=q)g.setSelectionCell(G);else{G= +mxUtils.convertPoint(g.container,mxEvent.getClientX(J),mxEvent.getClientY(J));mxEvent.consume(J);J=g.view.scale;var P=g.view.translate;g.setSelectionCell(v((G.x-3*J)/J-P.x,(G.y-3*J)/J-P.y))}};u=new mxKeyHandler(g);u.bindKey(46,B);u.bindKey(8,B);g.getRubberband().isForceRubberbandEvent=function(J){return 0==J.evt.button&&(null==J.getCell()||J.getCell()==q)};g.panningHandler.isForcePanningEvent=function(J){return 2==J.evt.button};var m=g.isCellSelectable;g.isCellSelectable=function(J){return J==q?!1: +m.apply(this,arguments)};g.getLinkForCell=function(){return null};var n=g.view.getState(q);d=g.getAllConnectionConstraints(n);for(var z=0;null!=d&&z<d.length;z++){var C=g.getConnectionPoint(n,d[z]);v(C.x-3,C.y-3)}g.fit(8);g.center();z=mxUtils.button("",function(){g.zoomIn()});z.className="geSprite geSprite-zoomin";z.setAttribute("title",mxResources.get("zoomIn"));z.style.position="relative";z.style.outline="none";z.style.border="none";z.style.margin="2px";z.style.cursor="pointer";z.style.top=mxClient.IS_FF? +"-6px":"0px";mxUtils.setOpacity(z,60);C=mxUtils.button("",function(){g.zoomOut()});C.className="geSprite geSprite-zoomout";C.setAttribute("title",mxResources.get("zoomOut"));C.style.position="relative";C.style.outline="none";C.style.border="none";C.style.margin="2px";C.style.cursor="pointer";C.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(C,60);var x=mxUtils.button("",function(){g.fit(8);g.center()});x.className="geSprite geSprite-fit";x.setAttribute("title",mxResources.get("fit"));x.style.position= +"relative";x.style.outline="none";x.style.border="none";x.style.margin="2px";x.style.cursor="pointer";x.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(x,60);var y=mxUtils.button("",function(){g.zoomActual();g.center()});y.className="geSprite geSprite-actualsize";y.setAttribute("title",mxResources.get("actualSize"));y.style.position="relative";y.style.outline="none";y.style.border="none";y.style.margin="2px";y.style.cursor="pointer";y.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(y, +60);var I=mxUtils.button("",B);I.className="geSprite geSprite-delete";I.setAttribute("title",mxResources.get("delete"));I.style.position="relative";I.style.outline="none";I.style.border="none";I.style.margin="2px";I.style.float="right";I.style.cursor="pointer";mxUtils.setOpacity(I,10);d=document.createElement("div");d.appendChild(z);d.appendChild(C);d.appendChild(y);d.appendChild(x);d.appendChild(I);e.appendChild(d);var N=document.createElement("input");N.setAttribute("type","number");N.setAttribute("min", +"1");N.setAttribute("value","1");N.style.width="45px";N.style.position="relative";N.style.top=mxClient.IS_FF?"0px":"-4px";N.style.margin="0 4px 0 4px";d.appendChild(N);var t=document.createElement("select");t.style.position="relative";t.style.top=mxClient.IS_FF?"0px":"-4px";C=["left","right","top","bottom"];for(z=0;z<C.length;z++)x=C[z],y=document.createElement("option"),mxUtils.write(y,mxResources.get(x)),y.value=x,t.appendChild(y);d.appendChild(t);z=mxUtils.button(mxResources.get("add"),function(){var J= +parseInt(N.value);J=1>J?1:100<J?100:J;N.value=J;for(var G=t.value,P=q.geometry,T=[],W=0;W<J;W++){switch(G){case "left":var U=P.x;var V=P.y+(W+1)*P.height/(J+1);break;case "right":U=P.x+P.width;V=P.y+(W+1)*P.height/(J+1);break;case "top":U=P.x+(W+1)*P.width/(J+1);V=P.y;break;case "bottom":U=P.x+(W+1)*P.width/(J+1),V=P.y+P.height}T.push(v(U-3,V-3))}g.setSelectionCells(T)});z.style.position="relative";z.style.marginLeft="8px";z.style.top=mxClient.IS_FF?"0px":"-4px";d.appendChild(z);var p=document.createElement("div"); +p.style.margin="4px 0px 8px 0px";p.style.whiteSpace="nowrap";p.style.height="24px";d=document.createElement("span");mxUtils.write(d,mxResources.get("dx"));p.appendChild(d);var F=document.createElement("input");F.setAttribute("type","number");F.setAttribute("min","0");F.setAttribute("max","100");F.style.width="45px";F.style.margin="0 4px 0 4px";p.appendChild(F);mxUtils.write(p,"%");var K=document.createElement("input");K.setAttribute("type","number");K.style.width="45px";K.style.margin="0 4px 0 4px"; +p.appendChild(K);mxUtils.write(p,"pt");d=document.createElement("span");mxUtils.write(d,mxResources.get("dy"));d.style.marginLeft="12px";p.appendChild(d);var D=document.createElement("input");D.setAttribute("type","number");D.setAttribute("min","0");D.setAttribute("max","100");D.style.width="45px";D.style.margin="0 4px 0 4px";p.appendChild(D);mxUtils.write(p,"%");var H=document.createElement("input");H.setAttribute("type","number");H.style.width="45px";H.style.margin="0 4px 0 4px";p.appendChild(H); +mxUtils.write(p,"pt");e.appendChild(p);c();g.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<g.getSelectionCount()?mxUtils.setOpacity(I,60):mxUtils.setOpacity(I,10);c()});g.addListener(mxEvent.CELLS_MOVED,c);mxEvent.addListener(F,"change",E);mxEvent.addListener(D,"change",E);mxEvent.addListener(K,"change",E);mxEvent.addListener(H,"change",E);d=mxUtils.button(mxResources.get("cancel"),function(){k();b.hideDialog()});d.className="geBtn";z=mxUtils.button(mxResources.get("apply"),function(){var J= +g.model.cells,G=[],P=[],T;for(T in J){var W=J[T];W.cp&&P.push(L(W))}P.sort(function(U,V){return U.x!=V.x?U.x-V.x:U.y!=V.y?U.y-V.y:U.dx!=V.dx?U.dx-V.dx:U.dy-V.dy});for(J=0;J<P.length;J++)0<J&&P[J].x==P[J-1].x&&P[J].y==P[J-1].y&&P[J].dx==P[J-1].dx&&P[J].dy==P[J-1].dy||G.push("["+P[J].x+","+P[J].y+",0,"+P[J].dx+","+P[J].dy+"]");b.editor.graph.setCellStyles("points","["+G.join(",")+"]",[f]);k();b.hideDialog()});z.className="geBtn gePrimaryBtn";C=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points", +null,[f]);k();b.hideDialog()});C.className="geBtn";x=document.createElement("div");x.style.marginTop="10px";x.style.textAlign="right";b.editor.cancelFirst?(x.appendChild(d),x.appendChild(C),x.appendChild(z)):(x.appendChild(C),x.appendChild(z),x.appendChild(d));e.appendChild(x)};this.destroy=k;this.container=e};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"}, {description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}}, {commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"}, graph:{background:"#DAD2D8",gridColor:"#ABA4A9"}},{commonStyle:{fontColor:"#FEFAE0",strokeColor:"#DDA15E",fillColor:"#BC6C25"},graph:{background:"#283618",gridColor:"#48632C"}},{commonStyle:{fontColor:"#E4FDE1",strokeColor:"#028090",fillColor:"#F45B69"},graph:{background:"#114B5F",gridColor:"#0B3240"}},{},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#FAD9D5"},edgeStyle:{strokeColor:"#09555B"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#09555B",fontColor:"#EEEEEE"}, @@ -11173,7 +11171,6 @@ Editor.commentImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53M Editor.shareImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTggMTYuMDhjLS43NiAwLTEuNDQuMy0xLjk2Ljc3TDguOTEgMTIuN2MuMDUtLjIzLjA5LS40Ni4wOS0uN3MtLjA0LS40Ny0uMDktLjdsNy4wNS00LjExYy41NC41IDEuMjUuODEgMi4wNC44MSAxLjY2IDAgMy0xLjM0IDMtM3MtMS4zNC0zLTMtMy0zIDEuMzQtMyAzYzAgLjI0LjA0LjQ3LjA5LjdMOC4wNCA5LjgxQzcuNSA5LjMxIDYuNzkgOSA2IDljLTEuNjYgMC0zIDEuMzQtMyAzczEuMzQgMyAzIDNjLjc5IDAgMS41LS4zMSAyLjA0LS44MWw3LjEyIDQuMTZjLS4wNS4yMS0uMDguNDMtLjA4LjY1IDAgMS42MSAxLjMxIDIuOTIgMi45MiAyLjkyIDEuNjEgMCAyLjkyLTEuMzEgMi45Mi0yLjkycy0xLjMxLTIuOTItMi45Mi0yLjkyeiIvPjwvc3ZnPg=="; Editor.syncImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgNFYxTDggNWw0IDRWNmMzLjMxIDAgNiAyLjY5IDYgNiAwIDEuMDEtLjI1IDEuOTctLjcgMi44bDEuNDYgMS40NkMxOS41NCAxNS4wMyAyMCAxMy41NyAyMCAxMmMwLTQuNDItMy41OC04LTgtOHptMCAxNGMtMy4zMSAwLTYtMi42OS02LTYgMC0xLjAxLjI1LTEuOTcuNy0yLjhMNS4yNCA3Ljc0QzQuNDYgOC45NyA0IDEwLjQzIDQgMTJjMCA0LjQyIDMuNTggOCA4IDh2M2w0LTQtNC00djN6Ii8+PC9zdmc+";Editor.cloudImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEyIDZjMi42MiAwIDQuODggMS44NiA1LjM5IDQuNDNsLjMgMS41IDEuNTMuMTFjMS41Ni4xIDIuNzggMS40MSAyLjc4IDIuOTYgMCAxLjY1LTEuMzUgMy0zIDNINmMtMi4yMSAwLTQtMS43OS00LTQgMC0yLjA1IDEuNTMtMy43NiAzLjU2LTMuOTdsMS4wNy0uMTEuNS0uOTVDOC4wOCA3LjE0IDkuOTQgNiAxMiA2bTAtMkM5LjExIDQgNi42IDUuNjQgNS4zNSA4LjA0IDIuMzQgOC4zNiAwIDEwLjkxIDAgMTRjMCAzLjMxIDIuNjkgNiA2IDZoMTNjMi43NiAwIDUtMi4yNCA1LTUgMC0yLjY0LTIuMDUtNC43OC00LjY1LTQuOTZDMTguNjcgNi41OSAxNS42NCA0IDEyIDR6Ii8+PC9zdmc+"; Editor.cloudOffImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTI0IDE1YzAtMi42NC0yLjA1LTQuNzgtNC42NS00Ljk2QzE4LjY3IDYuNTkgMTUuNjQgNCAxMiA0Yy0xLjMzIDAtMi41Ny4zNi0zLjY1Ljk3bDEuNDkgMS40OUMxMC41MSA2LjE3IDExLjIzIDYgMTIgNmMzLjA0IDAgNS41IDIuNDYgNS41IDUuNXYuNUgxOWMxLjY2IDAgMyAxLjM0IDMgMyAwIC45OS0uNDggMS44NS0xLjIxIDIuNGwxLjQxIDEuNDFjMS4wOS0uOTIgMS44LTIuMjcgMS44LTMuODF6TTQuNDEgMy44NkwzIDUuMjdsMi43NyAyLjc3aC0uNDJDMi4zNCA4LjM2IDAgMTAuOTEgMCAxNGMwIDMuMzEgMi42OSA2IDYgNmgxMS43M2wyIDIgMS40MS0xLjQxTDQuNDEgMy44NnpNNiAxOGMtMi4yMSAwLTQtMS43OS00LTRzMS43OS00IDQtNGgxLjczbDggOEg2eiIvPjwvc3ZnPg=="; -Editor.syncDisabledImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTAgNi4zNVY0LjI2Yy0uOC4yMS0xLjU1LjU0LTIuMjMuOTZsMS40NiAxLjQ2Yy4yNS0uMTIuNS0uMjQuNzctLjMzem0tNy4xNC0uOTRsMi4zNiAyLjM2QzQuNDUgOC45OSA0IDEwLjQ0IDQgMTJjMCAyLjIxLjkxIDQuMiAyLjM2IDUuNjRMNCAyMGg2di02bC0yLjI0IDIuMjRDNi42OCAxNS4xNSA2IDEzLjY2IDYgMTJjMC0xIC4yNS0xLjk0LjY4LTIuNzdsOC4wOCA4LjA4Yy0uMjUuMTMtLjUuMjUtLjc3LjM0djIuMDljLjgtLjIxIDEuNTUtLjU0IDIuMjMtLjk2bDIuMzYgMi4zNiAxLjI3LTEuMjdMNC4xNCA0LjE0IDIuODYgNS40MXpNMjAgNGgtNnY2bDIuMjQtMi4yNEMxNy4zMiA4Ljg1IDE4IDEwLjM0IDE4IDEyYzAgMS0uMjUgMS45NC0uNjggMi43N2wxLjQ2IDEuNDZDMTkuNTUgMTUuMDEgMjAgMTMuNTYgMjAgMTJjMC0yLjIxLS45MS00LjItMi4zNi01LjY0TDIwIDR6Ii8+PC9zdmc+"; Editor.calendarImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48cGF0aCBkPSJNMjAsNEg0QzIuOSw0LDIsNC45LDIsNnYxMmMwLDEuMSwwLjksMiwyLDJoMTZjMS4xLDAsMi0wLjksMi0yVjZDMjIsNC45LDIxLjEsNCwyMCw0eiBNOCwxMUg0VjZoNFYxMXogTTE0LDExaC00VjZoNFYxMXogTTIwLDExaC00VjZoNFYxMXogTTgsMThINHYtNWg0VjE4eiBNMTQsMThoLTR2LTVoNFYxOHogTTIwLDE4aC00di01aDRWMTh6Ii8+PC9nPjwvc3ZnPg=="; Editor.syncProblemImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyAxMmMwIDIuMjEuOTEgNC4yIDIuMzYgNS42NEwzIDIwaDZ2LTZsLTIuMjQgMi4yNEM1LjY4IDE1LjE1IDUgMTMuNjYgNSAxMmMwLTIuNjEgMS42Ny00LjgzIDQtNS42NVY0LjI2QzUuNTUgNS4xNSAzIDguMjcgMyAxMnptOCA1aDJ2LTJoLTJ2MnpNMjEgNGgtNnY2bDIuMjQtMi4yNEMxOC4zMiA4Ljg1IDE5IDEwLjM0IDE5IDEyYzAgMi42MS0xLjY3IDQuODMtNCA1LjY1djIuMDljMy40NS0uODkgNi00LjAxIDYtNy43NCAwLTIuMjEtLjkxLTQuMi0yLjM2LTUuNjRMMjEgNHptLTEwIDloMlY3aC0ydjZ6Ii8+PC9zdmc+"; Editor.tailSpin="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9Ii0yIC0yIDQ0IDQ0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogICAgPGRlZnM+CiAgICAgICAgPGxpbmVhckdyYWRpZW50IHgxPSI4LjA0MiUiIHkxPSIwJSIgeDI9IjY1LjY4MiUiIHkyPSIyMy44NjUlIiBpZD0iYSI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiM4MDgwODAiIHN0b3Atb3BhY2l0eT0iMCIgb2Zmc2V0PSIwJSIvPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjODA4MDgwIiBzdG9wLW9wYWNpdHk9Ii42MzEiIG9mZnNldD0iNjMuMTQ2JSIvPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjODA4MDgwIiBvZmZzZXQ9IjEwMCUiLz4KICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPC9kZWZzPgogICAgPGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxIDEpIj4KICAgICAgICAgICAgPHBhdGggZD0iTTM2IDE4YzAtOS45NC04LjA2LTE4LTE4LTE4IiBzdHJva2U9InVybCgjYSkiIHN0cm9rZS13aWR0aD0iNiI+CiAgICAgICAgICAgICAgICA8YW5pbWF0ZVRyYW5zZm9ybQogICAgICAgICAgICAgICAgICAgIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIKICAgICAgICAgICAgICAgICAgICB0eXBlPSJyb3RhdGUiCiAgICAgICAgICAgICAgICAgICAgZnJvbT0iMCAxOCAxOCIKICAgICAgICAgICAgICAgICAgICB0bz0iMzYwIDE4IDE4IgogICAgICAgICAgICAgICAgICAgIGR1cj0iMC45cyIKICAgICAgICAgICAgICAgICAgICByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgLz4KICAgICAgICAgICAgPC9wYXRoPgogICAgICAgICAgICA8Y2lyY2xlIGZpbGw9IiM4MDgwODAiIGN4PSIzNiIgY3k9IjE4IiByPSIxIj4KICAgICAgICAgICAgICAgIDxhbmltYXRlVHJhbnNmb3JtCiAgICAgICAgICAgICAgICAgICAgYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIgogICAgICAgICAgICAgICAgICAgIHR5cGU9InJvdGF0ZSIKICAgICAgICAgICAgICAgICAgICBmcm9tPSIwIDE4IDE4IgogICAgICAgICAgICAgICAgICAgIHRvPSIzNjAgMTggMTgiCiAgICAgICAgICAgICAgICAgICAgZHVyPSIwLjlzIgogICAgICAgICAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPgogICAgICAgICAgICA8L2NpcmNsZT4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPgo="; @@ -11205,15 +11202,15 @@ defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumL defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(l,A){return A.editorUi.editor.graph.isCellConnectable(0<l.vertices.length&&0==l.edges.length?l.vertices[0]:null)},isVisible:function(l,A){return 0<l.vertices.length&&0==l.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"}, {val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"}, {val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(l,A){return 1==l.vertices.length&&0==l.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(l,A){l=1==l.vertices.length&&0==l.edges.length?l.vertices[0]:null;A=A.editorUi.editor.graph;return null!=l&&(A.isSwimlane(l)||0<A.model.getChildCount(l))}, -isVisible:function(l,A){return 1==l.vertices.length&&0==l.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(l,A){var L=1==l.vertices.length&&0==l.edges.length?l.vertices[0]:null;A=A.editorUi.editor.graph;return null!=L&&(A.isContainer(L)&&"0"!=l.style.collapsible||!A.isContainer(L)&&"1"==l.style.collapsible)},isVisible:function(l,A){return 1==l.vertices.length&&0==l.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0, +isVisible:function(l,A){return 1==l.vertices.length&&0==l.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(l,A){var M=1==l.vertices.length&&0==l.edges.length?l.vertices[0]:null;A=A.editorUi.editor.graph;return null!=M&&(A.isContainer(M)&&"0"!=l.style.collapsible||!A.isContainer(M)&&"1"==l.style.collapsible)},isVisible:function(l,A){return 1==l.vertices.length&&0==l.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0, isVisible:function(l,A){return 1==l.vertices.length&&0==l.edges.length&&!A.editorUi.editor.graph.isSwimlane(l.vertices[0])&&null==mxUtils.getValue(l.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(l,A){A=A.editorUi.editor.graph.model;return 0<l.vertices.length?A.isVertex(A.getParent(l.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog", type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(l,A){l=0<l.vertices.length?A.editorUi.editor.graph.getCellGeometry(l.vertices[0]):null;return null!=l&&!l.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable", dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents", -dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(l,A){var L=mxUtils.getValue(l.style,mxConstants.STYLE_FILLCOLOR,null);return A.editorUi.editor.graph.isSwimlane(l.vertices[0])||null==L||L==mxConstants.NONE||0==mxUtils.getValue(l.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(l.style,mxConstants.STYLE_OPACITY,100)||null!=l.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(l,A){return 0<l.vertices.length&& +dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(l,A){var M=mxUtils.getValue(l.style,mxConstants.STYLE_FILLCOLOR,null);return A.editorUi.editor.graph.isSwimlane(l.vertices[0])||null==M||M==mxConstants.NONE||0==mxUtils.getValue(l.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(l.style,mxConstants.STYLE_OPACITY,100)||null!=l.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(l,A){return 0<l.vertices.length&& A.editorUi.editor.graph.isContainer(l.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n'; -Editor.createRoughCanvas=function(l){var A=rough.canvas({getContext:function(){return l}});A.draw=function(L){var Q=L.sets||[];L=L.options||this.getDefaultOptions();for(var O=0;O<Q.length;O++){var R=Q[O];switch(R.type){case "path":null!=L.stroke&&this._drawToContext(l,R,L);break;case "fillPath":this._drawToContext(l,R,L);break;case "fillSketch":this.fillSketch(l,R,L)}}};A.fillSketch=function(L,Q,O){var R=l.state.strokeColor,S=l.state.strokeWidth,X=l.state.strokeAlpha,aa=l.state.dashed,Y=O.fillWeight; -0>Y&&(Y=O.strokeWidth/2);l.setStrokeAlpha(l.state.fillAlpha);l.setStrokeColor(O.fill||"");l.setStrokeWidth(Y);l.setDashed(!1);this._drawToContext(L,Q,O);l.setDashed(aa);l.setStrokeWidth(S);l.setStrokeColor(R);l.setStrokeAlpha(X)};A._drawToContext=function(L,Q,O){L.begin();for(var R=0;R<Q.ops.length;R++){var S=Q.ops[R],X=S.data;switch(S.op){case "move":L.moveTo(X[0],X[1]);break;case "bcurveTo":L.curveTo(X[0],X[1],X[2],X[3],X[4],X[5]);break;case "lineTo":L.lineTo(X[0],X[1])}}L.end();"fillPath"===Q.type&& -O.filled?L.fill():L.stroke()};return A};(function(){function l(R,S,X){this.canvas=R;this.rc=S;this.shape=X;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,l.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,l.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,l.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect= +Editor.createRoughCanvas=function(l){var A=rough.canvas({getContext:function(){return l}});A.draw=function(M){var Q=M.sets||[];M=M.options||this.getDefaultOptions();for(var O=0;O<Q.length;O++){var R=Q[O];switch(R.type){case "path":null!=M.stroke&&this._drawToContext(l,R,M);break;case "fillPath":this._drawToContext(l,R,M);break;case "fillSketch":this.fillSketch(l,R,M)}}};A.fillSketch=function(M,Q,O){var R=l.state.strokeColor,S=l.state.strokeWidth,X=l.state.strokeAlpha,aa=l.state.dashed,Y=O.fillWeight; +0>Y&&(Y=O.strokeWidth/2);l.setStrokeAlpha(l.state.fillAlpha);l.setStrokeColor(O.fill||"");l.setStrokeWidth(Y);l.setDashed(!1);this._drawToContext(M,Q,O);l.setDashed(aa);l.setStrokeWidth(S);l.setStrokeColor(R);l.setStrokeAlpha(X)};A._drawToContext=function(M,Q,O){M.begin();for(var R=0;R<Q.ops.length;R++){var S=Q.ops[R],X=S.data;switch(S.op){case "move":M.moveTo(X[0],X[1]);break;case "bcurveTo":M.curveTo(X[0],X[1],X[2],X[3],X[4],X[5]);break;case "lineTo":M.lineTo(X[0],X[1])}}M.end();"fillPath"===Q.type&& +O.filled?M.fill():M.stroke()};return A};(function(){function l(R,S,X){this.canvas=R;this.rc=S;this.shape=X;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,l.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,l.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,l.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect= mxUtils.bind(this,l.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,l.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,l.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,l.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,l.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this, l.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,l.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,l.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,l.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,l.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,l.prototype.fillAndStroke); this.path=[];this.passThrough=!1}l.prototype.moveOp="M";l.prototype.lineOp="L";l.prototype.quadOp="Q";l.prototype.curveOp="C";l.prototype.closeOp="Z";l.prototype.getStyle=function(R,S){var X=1;if(null!=this.shape.state){var aa=this.shape.state.cell.id;if(null!=aa)for(var Y=0;Y<aa.length;Y++)X=(X<<5)-X+aa.charCodeAt(Y)<<0}X={strokeWidth:this.canvas.state.strokeWidth,seed:X,preserveVertices:!0};aa=this.rc.getDefaultOptions();X.stroke=R?this.canvas.state.strokeColor===mxConstants.NONE?"transparent": @@ -11222,75 +11219,75 @@ this.canvas.state.strokeColor:mxConstants.NONE;R=null;(X.filled=S)?(X.fill=this. "dashOffset",S);X.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",S);S=mxUtils.getValue(this.shape.style,"fillWeight",-1);X.fillWeight="auto"==S?-1:S;S=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==S&&(S=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),S=null!=X.fill&&(null!=R||null!=S&&X.fill==S)?"solid":aa.fillStyle);X.fillStyle=S;return X};l.prototype.begin=function(){this.passThrough? this.originalBegin.apply(this.canvas,arguments):this.path=[]};l.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};l.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var R=2;R<arguments.length;R+=2)this.lastX=arguments[R-1],this.lastY=arguments[R],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};l.prototype.lineTo=function(R,S){this.passThrough?this.originalLineTo.apply(this.canvas, arguments):(this.addOp(this.lineOp,R,S),this.lastX=R,this.lastY=S)};l.prototype.moveTo=function(R,S){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,R,S),this.lastX=R,this.lastY=S,this.firstX=R,this.firstY=S)};l.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};l.prototype.quadTo=function(R,S,X,aa){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,R, -S,X,aa),this.lastX=X,this.lastY=aa)};l.prototype.curveTo=function(R,S,X,aa,Y,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,R,S,X,aa,Y,Z),this.lastX=Y,this.lastY=Z)};l.prototype.arcTo=function(R,S,X,aa,Y,Z,ca){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var fa=mxUtils.arcToCurves(this.lastX,this.lastY,R,S,X,aa,Y,Z,ca);if(null!=fa)for(var la=0;la<fa.length;la+=6)this.curveTo(fa[la],fa[la+1],fa[la+2],fa[la+3],fa[la+4],fa[la+ -5]);this.lastX=Z;this.lastY=ca}};l.prototype.rect=function(R,S,X,aa){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(R,S,X,aa,this.getStyle(!0,!0)))};l.prototype.ellipse=function(R,S,X,aa){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(R+X/2,S+aa/2,X,aa,this.getStyle(!0,!0)))};l.prototype.roundrect=function(R,S,X,aa,Y,Z){this.passThrough?this.originalRoundrect.apply(this.canvas, +S,X,aa),this.lastX=X,this.lastY=aa)};l.prototype.curveTo=function(R,S,X,aa,Y,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,R,S,X,aa,Y,Z),this.lastX=Y,this.lastY=Z)};l.prototype.arcTo=function(R,S,X,aa,Y,Z,ba){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var ha=mxUtils.arcToCurves(this.lastX,this.lastY,R,S,X,aa,Y,Z,ba);if(null!=ha)for(var ma=0;ma<ha.length;ma+=6)this.curveTo(ha[ma],ha[ma+1],ha[ma+2],ha[ma+3],ha[ma+4],ha[ma+ +5]);this.lastX=Z;this.lastY=ba}};l.prototype.rect=function(R,S,X,aa){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(R,S,X,aa,this.getStyle(!0,!0)))};l.prototype.ellipse=function(R,S,X,aa){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(R+X/2,S+aa/2,X,aa,this.getStyle(!0,!0)))};l.prototype.roundrect=function(R,S,X,aa,Y,Z){this.passThrough?this.originalRoundrect.apply(this.canvas, arguments):(this.begin(),this.moveTo(R+Y,S),this.lineTo(R+X-Y,S),this.quadTo(R+X,S,R+X,S+Z),this.lineTo(R+X,S+aa-Z),this.quadTo(R+X,S+aa,R+X-Y,S+aa),this.lineTo(R+Y,S+aa),this.quadTo(R,S+aa,R,S+aa-Z),this.lineTo(R,S+Z),this.quadTo(R,S,R+Y,S))};l.prototype.drawPath=function(R){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),R)}catch(X){}this.passThrough=!1}else if(null!=this.nextShape){for(var S in R)this.nextShape.options[S]=R[S];R.stroke!=mxConstants.NONE&&null!=R.stroke|| delete this.nextShape.options.stroke;R.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};l.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};l.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};l.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas, arguments):this.drawPath(this.getStyle(!0,!0))};l.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin; this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(R){return new l(R,Editor.createRoughCanvas(R),this)};var A=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(R){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?A.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle", -"rough")?this.createComicCanvas(R):this.createRoughCanvas(R)};var L=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(R,S,X,aa,Y){null!=R.handJiggle&&R.handJiggle.passThrough||L.apply(this,arguments)};var Q=mxShape.prototype.paint;mxShape.prototype.paint=function(R){var S=R.addTolerance,X=!0;null!=this.style&&(X="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=R.handJiggle&&R.handJiggle.constructor==l&&!this.outline){R.save(); -var aa=this.fill,Y=this.stroke;this.stroke=this.fill=null;var Z=this.configurePointerEvents,ca=R.setStrokeColor;R.setStrokeColor=function(){};var fa=R.setFillColor;R.setFillColor=function(){};X||null==aa||(this.configurePointerEvents=function(){});R.handJiggle.passThrough=!0;Q.apply(this,arguments);R.handJiggle.passThrough=!1;R.setFillColor=fa;R.setStrokeColor=ca;this.configurePointerEvents=Z;this.stroke=Y;this.fill=aa;R.restore();X&&null!=aa&&(R.addTolerance=function(){})}Q.apply(this,arguments); +"rough")?this.createComicCanvas(R):this.createRoughCanvas(R)};var M=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(R,S,X,aa,Y){null!=R.handJiggle&&R.handJiggle.passThrough||M.apply(this,arguments)};var Q=mxShape.prototype.paint;mxShape.prototype.paint=function(R){var S=R.addTolerance,X=!0;null!=this.style&&(X="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=R.handJiggle&&R.handJiggle.constructor==l&&!this.outline){R.save(); +var aa=this.fill,Y=this.stroke;this.stroke=this.fill=null;var Z=this.configurePointerEvents,ba=R.setStrokeColor;R.setStrokeColor=function(){};var ha=R.setFillColor;R.setFillColor=function(){};X||null==aa||(this.configurePointerEvents=function(){});R.handJiggle.passThrough=!0;Q.apply(this,arguments);R.handJiggle.passThrough=!1;R.setFillColor=ha;R.setStrokeColor=ba;this.configurePointerEvents=Z;this.stroke=Y;this.fill=aa;R.restore();X&&null!=aa&&(R.addTolerance=function(){})}Q.apply(this,arguments); R.addTolerance=S};var O=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(R,S,X,aa,Y,Z){null!=R.handJiggle&&R.handJiggle.constructor==l?(R.handJiggle.passThrough=!0,O.apply(this,arguments),R.handJiggle.passThrough=!1):O.apply(this,arguments)}})();Editor.fastCompress=function(l){return null==l||0==l.length||"undefined"===typeof pako?l:Graph.arrayBufferToString(pako.deflateRaw(l))};Editor.fastDecompress=function(l){return null==l||0==l.length||"undefined"===typeof pako? -l:pako.inflateRaw(Graph.stringToArrayBuffer(atob(l)),{to:"string"})};Editor.extractGraphModel=function(l,A,L){if(null!=l&&"undefined"!==typeof pako){var Q=l.ownerDocument.getElementsByTagName("div"),O=[];if(null!=Q&&0<Q.length)for(var R=0;R<Q.length;R++)if("mxgraph"==Q[R].getAttribute("class")){O.push(Q[R]);break}0<O.length&&(Q=O[0].getAttribute("data-mxgraph"),null!=Q?(O=JSON.parse(Q),null!=O&&null!=O.xml&&(l=mxUtils.parseXml(O.xml),l=l.documentElement)):(O=O[0].getElementsByTagName("div"),0<O.length&& -(Q=mxUtils.getTextContent(O[0]),Q=Graph.decompress(Q,null,L),0<Q.length&&(l=mxUtils.parseXml(Q),l=l.documentElement))))}if(null!=l&&"svg"==l.nodeName)if(Q=l.getAttribute("content"),null!=Q&&"<"!=Q.charAt(0)&&"%"!=Q.charAt(0)&&(Q=unescape(window.atob?atob(Q):Base64.decode(cont,Q))),null!=Q&&"%"==Q.charAt(0)&&(Q=decodeURIComponent(Q)),null!=Q&&0<Q.length)l=mxUtils.parseXml(Q).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==l||A||(O=null,"diagram"==l.nodeName?O=l:"mxfile"== -l.nodeName&&(Q=l.getElementsByTagName("diagram"),0<Q.length&&(O=Q[Math.max(0,Math.min(Q.length-1,urlParams.page||0))])),null!=O&&(l=Editor.parseDiagramNode(O,L)));null==l||"mxGraphModel"==l.nodeName||A&&"mxfile"==l.nodeName||(l=null);return l};Editor.parseDiagramNode=function(l,A){var L=mxUtils.trim(mxUtils.getTextContent(l)),Q=null;0<L.length?(l=Graph.decompress(L,null,A),null!=l&&0<l.length&&(Q=mxUtils.parseXml(l).documentElement)):(l=mxUtils.getChildNodes(l),0<l.length&&(Q=mxUtils.createXmlDocument(), -Q.appendChild(Q.importNode(l[0],!0)),Q=Q.documentElement));return Q};Editor.getDiagramNodeXml=function(l){var A=mxUtils.getTextContent(l),L=null;0<A.length?L=Graph.decompress(A):null!=l.firstChild&&(L=mxUtils.getXml(l.firstChild));return L};Editor.extractGraphModelFromPdf=function(l){l=l.substring(l.indexOf(",")+1);l=window.atob&&!mxClient.IS_SF?atob(l):Base64.decode(l,!0);if("%PDF-1.7"==l.substring(0,8)){var A=l.indexOf("EmbeddedFile");if(-1<A){var L=l.indexOf("stream",A)+9;if(0<l.substring(A,L).indexOf("application#2Fvnd.jgraph.mxfile"))return A= -l.indexOf("endstream",L-1),pako.inflateRaw(Graph.stringToArrayBuffer(l.substring(L,A)),{to:"string"})}return null}L=null;A="";for(var Q=0,O=0,R=[],S=null;O<l.length;){var X=l.charCodeAt(O);O+=1;10!=X&&(A+=String.fromCharCode(X));X=="/Subject (%3Cmxfile".charCodeAt(Q)?Q++:Q=0;if(19==Q){var aa=l.indexOf("%3C%2Fmxfile%3E)",O)+15;O-=9;if(aa>O){L=l.substring(O,aa);break}}10==X&&("endobj"==A?S=null:"obj"==A.substring(A.length-3,A.length)||"xref"==A||"trailer"==A?(S=[],R[A.split(" ")[0]]=S):null!=S&&S.push(A), -A="")}null==L&&(L=Editor.extractGraphModelFromXref(R));null!=L&&(L=decodeURIComponent(L.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return L};Editor.extractGraphModelFromXref=function(l){var A=l.trailer,L=null;null!=A&&(A=/.* \/Info (\d+) (\d+) R/g.exec(A.join("\n")),null!=A&&0<A.length&&(A=l[A[1]],null!=A&&(A=/.* \/Subject (\d+) (\d+) R/g.exec(A.join("\n")),null!=A&&0<A.length&&(l=l[A[1]],null!=l&&(l=l.join("\n"),L=l.substring(1,l.length-1))))));return L};Editor.extractParserError=function(l,A){var L= -null;l=null!=l?l.getElementsByTagName("parsererror"):null;null!=l&&0<l.length&&(L=A||mxResources.get("invalidChars"),A=l[0].getElementsByTagName("div"),0<A.length&&(L=mxUtils.getTextContent(A[0])));return null!=L?mxUtils.trim(L):L};Editor.addRetryToError=function(l,A){null!=l&&(l=null!=l.error?l.error:l,null==l.retry&&(l.retry=A))};Editor.configure=function(l,A){if(null!=l){Editor.config=l;Editor.configVersion=l.version;Menus.prototype.defaultFonts=l.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors= +l:pako.inflateRaw(Graph.stringToArrayBuffer(atob(l)),{to:"string"})};Editor.extractGraphModel=function(l,A,M){if(null!=l&&"undefined"!==typeof pako){var Q=l.ownerDocument.getElementsByTagName("div"),O=[];if(null!=Q&&0<Q.length)for(var R=0;R<Q.length;R++)if("mxgraph"==Q[R].getAttribute("class")){O.push(Q[R]);break}0<O.length&&(Q=O[0].getAttribute("data-mxgraph"),null!=Q?(O=JSON.parse(Q),null!=O&&null!=O.xml&&(l=mxUtils.parseXml(O.xml),l=l.documentElement)):(O=O[0].getElementsByTagName("div"),0<O.length&& +(Q=mxUtils.getTextContent(O[0]),Q=Graph.decompress(Q,null,M),0<Q.length&&(l=mxUtils.parseXml(Q),l=l.documentElement))))}if(null!=l&&"svg"==l.nodeName)if(Q=l.getAttribute("content"),null!=Q&&"<"!=Q.charAt(0)&&"%"!=Q.charAt(0)&&(Q=unescape(window.atob?atob(Q):Base64.decode(cont,Q))),null!=Q&&"%"==Q.charAt(0)&&(Q=decodeURIComponent(Q)),null!=Q&&0<Q.length)l=mxUtils.parseXml(Q).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==l||A||(O=null,"diagram"==l.nodeName?O=l:"mxfile"== +l.nodeName&&(Q=l.getElementsByTagName("diagram"),0<Q.length&&(O=Q[Math.max(0,Math.min(Q.length-1,urlParams.page||0))])),null!=O&&(l=Editor.parseDiagramNode(O,M)));null==l||"mxGraphModel"==l.nodeName||A&&"mxfile"==l.nodeName||(l=null);return l};Editor.parseDiagramNode=function(l,A){var M=mxUtils.trim(mxUtils.getTextContent(l)),Q=null;0<M.length?(l=Graph.decompress(M,null,A),null!=l&&0<l.length&&(Q=mxUtils.parseXml(l).documentElement)):(l=mxUtils.getChildNodes(l),0<l.length&&(Q=mxUtils.createXmlDocument(), +Q.appendChild(Q.importNode(l[0],!0)),Q=Q.documentElement));return Q};Editor.getDiagramNodeXml=function(l){var A=mxUtils.getTextContent(l),M=null;0<A.length?M=Graph.decompress(A):null!=l.firstChild&&(M=mxUtils.getXml(l.firstChild));return M};Editor.extractGraphModelFromPdf=function(l){l=l.substring(l.indexOf(",")+1);l=window.atob&&!mxClient.IS_SF?atob(l):Base64.decode(l,!0);if("%PDF-1.7"==l.substring(0,8)){var A=l.indexOf("EmbeddedFile");if(-1<A){var M=l.indexOf("stream",A)+9;if(0<l.substring(A,M).indexOf("application#2Fvnd.jgraph.mxfile"))return A= +l.indexOf("endstream",M-1),pako.inflateRaw(Graph.stringToArrayBuffer(l.substring(M,A)),{to:"string"})}return null}M=null;A="";for(var Q=0,O=0,R=[],S=null;O<l.length;){var X=l.charCodeAt(O);O+=1;10!=X&&(A+=String.fromCharCode(X));X=="/Subject (%3Cmxfile".charCodeAt(Q)?Q++:Q=0;if(19==Q){var aa=l.indexOf("%3C%2Fmxfile%3E)",O)+15;O-=9;if(aa>O){M=l.substring(O,aa);break}}10==X&&("endobj"==A?S=null:"obj"==A.substring(A.length-3,A.length)||"xref"==A||"trailer"==A?(S=[],R[A.split(" ")[0]]=S):null!=S&&S.push(A), +A="")}null==M&&(M=Editor.extractGraphModelFromXref(R));null!=M&&(M=decodeURIComponent(M.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return M};Editor.extractGraphModelFromXref=function(l){var A=l.trailer,M=null;null!=A&&(A=/.* \/Info (\d+) (\d+) R/g.exec(A.join("\n")),null!=A&&0<A.length&&(A=l[A[1]],null!=A&&(A=/.* \/Subject (\d+) (\d+) R/g.exec(A.join("\n")),null!=A&&0<A.length&&(l=l[A[1]],null!=l&&(l=l.join("\n"),M=l.substring(1,l.length-1))))));return M};Editor.extractParserError=function(l,A){var M= +null;l=null!=l?l.getElementsByTagName("parsererror"):null;null!=l&&0<l.length&&(M=A||mxResources.get("invalidChars"),A=l[0].getElementsByTagName("div"),0<A.length&&(M=mxUtils.getTextContent(A[0])));return null!=M?mxUtils.trim(M):M};Editor.addRetryToError=function(l,A){null!=l&&(l=null!=l.error?l.error:l,null==l.retry&&(l.retry=A))};Editor.configure=function(l){if(null!=l){Editor.config=l;Editor.configVersion=l.version;Menus.prototype.defaultFonts=l.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors= l.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=l.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=l.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=l.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=l.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=l.autosaveDelay||DrawioFile.prototype.autosaveDelay; l.debug&&(urlParams.test="1");null!=l.templateFile&&(EditorUi.templateFile=l.templateFile);null!=l.styles&&(Array.isArray(l.styles)?Editor.styles=l.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=l.globalVars&&(Editor.globalVars=l.globalVars);null!=l.compressXml&&(Editor.compressXml=l.compressXml);null!=l.includeDiagram&&(Editor.defaultIncludeDiagram=l.includeDiagram);null!=l.simpleLabels&&(Editor.simpleLabels=l.simpleLabels);null!=l.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker= l.oneDriveInlinePicker);null!=l.darkColor&&(Editor.darkColor=l.darkColor);null!=l.lightColor&&(Editor.lightColor=l.lightColor);null!=l.settingsName&&(Editor.configurationKey="."+l.settingsName+"-configuration",Editor.settingsKey="."+l.settingsName+"-config",mxSettings.key=Editor.settingsKey);l.customFonts&&(Menus.prototype.defaultFonts=l.customFonts.concat(Menus.prototype.defaultFonts));l.customPresetColors&&(ColorDialog.prototype.presetColors=l.customPresetColors.concat(ColorDialog.prototype.presetColors)); -null!=l.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=l.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=l.css){var L=document.createElement("style");L.setAttribute("type","text/css");L.appendChild(document.createTextNode(l.css));var Q=document.getElementsByTagName("script")[0];Q.parentNode.insertBefore(L,Q)}null!=l.libraries&&(Sidebar.prototype.customEntries=l.libraries);null!=l.enabledLibraries&&(Array.isArray(l.enabledLibraries)?Sidebar.prototype.enabledLibraries= +null!=l.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=l.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=l.css){var A=document.createElement("style");A.setAttribute("type","text/css");A.appendChild(document.createTextNode(l.css));var M=document.getElementsByTagName("script")[0];M.parentNode.insertBefore(A,M)}null!=l.libraries&&(Sidebar.prototype.customEntries=l.libraries);null!=l.enabledLibraries&&(Array.isArray(l.enabledLibraries)?Sidebar.prototype.enabledLibraries= l.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=l.defaultLibraries&&(Sidebar.prototype.defaultEntries=l.defaultLibraries);null!=l.defaultCustomLibraries&&(Editor.defaultCustomLibraries=l.defaultCustomLibraries);null!=l.enableCustomLibraries&&(Editor.enableCustomLibraries=l.enableCustomLibraries);null!=l.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=l.defaultVertexStyle);null!=l.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=l.defaultEdgeStyle); -null!=l.defaultPageVisible&&(Graph.prototype.defaultPageVisible=l.defaultPageVisible);null!=l.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=l.defaultGridEnabled);null!=l.zoomWheel&&(Graph.zoomWheel=l.zoomWheel);null!=l.zoomFactor&&(L=parseFloat(l.zoomFactor),!isNaN(L)&&1<L?Graph.prototype.zoomFactor=L:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=l.gridSteps&&(L=parseInt(l.gridSteps),!isNaN(L)&&0<L?mxGraphView.prototype.gridSteps=L:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps")); -null!=l.pageFormat&&(L=parseInt(l.pageFormat.width),Q=parseInt(l.pageFormat.height),!isNaN(L)&&0<L&&!isNaN(Q)&&0<Q?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,L,Q),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));l.thumbWidth&&(Sidebar.prototype.thumbWidth=l.thumbWidth);l.thumbHeight&&(Sidebar.prototype.thumbHeight=l.thumbHeight);l.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml= -l.emptyLibraryXml);l.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=l.emptyDiagramXml);l.sidebarWidth&&(EditorUi.prototype.hsplitPosition=l.sidebarWidth);l.sidebarTitles&&(Sidebar.prototype.sidebarTitles=l.sidebarTitles);l.sidebarTitleSize&&(L=parseInt(l.sidebarTitleSize),!isNaN(L)&&0<L?Sidebar.prototype.sidebarTitleSize=L:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));l.fontCss&&("string"===typeof l.fontCss?Editor.configureFontCss(l.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss")); -null!=l.autosaveDelay&&(L=parseInt(l.autosaveDelay),!isNaN(L)&&0<L?DrawioFile.prototype.autosaveDelay=L:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));if(null!=l.plugins&&!A)for(App.initPluginCallback(),A=0;A<l.plugins.length;A++)mxscript(l.plugins[A]);null!=l.maxImageBytes&&(EditorUi.prototype.maxImageBytes=l.maxImageBytes);null!=l.maxImageSize&&(EditorUi.prototype.maxImageSize=l.maxImageSize);null!=l.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=l.shareCursorPosition); -null!=l.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=l.showRemoteCursors)}};Editor.configureFontCss=function(l){if(null!=l){Editor.prototype.fontCss=l;var A=document.getElementsByTagName("script")[0];if(null!=A&&null!=A.parentNode){var L=document.createElement("style");L.setAttribute("type","text/css");L.appendChild(document.createTextNode(l));A.parentNode.insertBefore(L,A);l=l.split("url(");for(L=1;L<l.length;L++){var Q=l[L].indexOf(")");Q=Editor.trimCssUrl(l[L].substring(0,Q));var O= -document.createElement("link");O.setAttribute("rel","preload");O.setAttribute("href",Q);O.setAttribute("as","font");O.setAttribute("crossorigin","");A.parentNode.insertBefore(O,A)}}}};Editor.trimCssUrl=function(l){return l.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(l){l=null!= -l?l:Editor.GUID_LENGTH;for(var A=[],L=0;L<l;L++)A.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return A.join("")};Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(l){l=null!=l&&"mxlibrary"!=l.nodeName?this.extractGraphModel(l):null;if(null!=l){var A=Editor.extractParserError(l, -mxResources.get("invalidOrMissingFile"));if(A)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[l],"cause",[A]),Error(mxResources.get("notADiagramFile")+" ("+A+")");if("mxGraphModel"==l.nodeName){A=l.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=A&&""!=A)A!=this.graph.currentStyle&&(L=null!=this.graph.themes?this.graph.themes[A]:mxUtils.load(STYLE_PATH+"/"+A+".xml").getDocumentElement(),null!=L&&(Q=new mxCodec(L.ownerDocument),Q.decode(L,this.graph.getStylesheet()))); -else{var L=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=L){var Q=new mxCodec(L.ownerDocument);Q.decode(L,this.graph.getStylesheet())}}this.graph.currentStyle=A;this.graph.mathEnabled="1"==urlParams.math||"1"==l.getAttribute("math");A=l.getAttribute("backgroundImage");null!=A?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(A)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&& -this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==l.getAttribute("shadow"),!1);if(A=l.getAttribute("extFonts"))try{for(A=A.split("|").map(function(O){O=O.split("^");return{name:O[0],url:O[1]}}),L=0;L<A.length;L++)this.graph.addExtFont(A[L].name,A[L].url)}catch(O){console.log("ExtFonts format error: "+O.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")|| -"Invalid data",toString:function(){return this.message}};};var f=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(l,A){l=null!=l?l:!0;var L=f.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&L.setAttribute("style",this.graph.currentStyle);var Q=this.graph.getBackgroundImageObject(this.graph.backgroundImage,A);null!=Q&&L.setAttribute("backgroundImage",JSON.stringify(Q));L.setAttribute("math",this.graph.mathEnabled?"1":"0");L.setAttribute("shadow", -this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(Q=this.graph.extFonts.map(function(O){return O.name+"^"+O.url}),L.setAttribute("extFonts",Q.join("|")));return L};Editor.prototype.isDataSvg=function(l){try{var A=mxUtils.parseXml(l).documentElement.getAttribute("content");if(null!=A&&(null!=A&&"<"!=A.charAt(0)&&"%"!=A.charAt(0)&&(A=unescape(window.atob?atob(A):Base64.decode(cont,A))),null!=A&&"%"==A.charAt(0)&&(A=decodeURIComponent(A)),null!=A&&0<A.length)){var L= -mxUtils.parseXml(A).documentElement;return"mxfile"==L.nodeName||"mxGraphModel"==L.nodeName}}catch(Q){}return!1};Editor.prototype.extractGraphModel=function(l,A,L){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform(); -k.apply(this,arguments)};var d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){d.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(l,A){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){l=null!=l?l:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(O){try{MathJax.typesetClear([O]), -MathJax.typeset([O]),Editor.onMathJaxDone()}catch(R){MathJax.typesetClear([O]),null!=R.retry?R.retry.then(function(){MathJax.typesetPromise([O]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+R.toString())}};window.MathJax=null!=A?A:{options:{skipHtmlTags:{"[+]":["text"]}},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath"]},startup:{pageReady:function(){for(var O=0;O<Editor.mathJaxQueue.length;O++)Editor.doMathJaxRender(Editor.mathJaxQueue[O])}}}; -Editor.MathJaxRender=function(O){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(O):Editor.mathJaxQueue.push(O)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var L=Editor.prototype.init;Editor.prototype.init=function(){L.apply(this,arguments);var O=mxUtils.bind(this,function(R,S){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE, -O);this.graph.addListener(mxEvent.REFRESH,O)};A=document.getElementsByTagName("script");if(null!=A&&0<A.length){var Q=document.createElement("script");Q.setAttribute("type","text/javascript");Q.setAttribute("src",l);A[0].parentNode.appendChild(Q)}}};Editor.prototype.csvToArray=function(l){if(0<l.length){var A="",L=[""],Q=0,O=!0,R;l=$jscomp.makeIterator(l);for(R=l.next();!R.done;R=l.next())R=R.value,'"'===R?(O&&R===A&&(L[Q]+=R),O=!O):","===R&&O?R=L[++Q]="":L[Q]+=R,A=R;return L}return[]};Editor.prototype.getProxiedUrl= -function(l){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(l)){var A=/(\.v(dx|sdx?))($|\?)/i.test(l)||/(\.vs(x|sx?))($|\?)/i.test(l);A=/\.png$/i.test(l)||/\.pdf$/i.test(l)||A;var L="t="+(new Date).getTime();l=PROXY_URL+"?url="+encodeURIComponent(l)+"&"+L+(A?"&base64=1":"")}return l};Editor.prototype.isCorsEnabledForUrl=function(l){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||l.substring(0,window.location.origin.length)== -window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(l)||"https://raw.githubusercontent.com/"===l.substring(0,34)||"https://fonts.googleapis.com/"===l.substring(0,29)||"https://fonts.gstatic.com/"===l.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var l=new mxUrlConverter;l.updateBaseUrl();var A=l.convert,L=this;l.convert=function(Q){if(null!= -Q){var O="http://"==Q.substring(0,7)||"https://"==Q.substring(0,8);O&&!navigator.onLine?Q=Editor.svgBrokenImage.src:!O||Q.substring(0,l.baseUrl.length)==l.baseUrl||L.crossOriginImages&&L.isCorsEnabledForUrl(Q)?"chrome-extension://"==Q.substring(0,19)||mxClient.IS_CHROMEAPP||(Q=A.apply(this,arguments)):Q=PROXY_URL+"?url="+encodeURIComponent(Q)}return Q};return l};Editor.createSvgDataUri=function(l){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(l)))};Editor.prototype.convertImageToDataUri= -function(l,A){try{var L=!0,Q=window.setTimeout(mxUtils.bind(this,function(){L=!1;A(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(l))mxUtils.get(l,mxUtils.bind(this,function(R){window.clearTimeout(Q);L&&A(Editor.createSvgDataUri(R.getText()))}),function(){window.clearTimeout(Q);L&&A(Editor.svgBrokenImage.src)});else{var O=new Image;this.crossOriginImages&&(O.crossOrigin="anonymous");O.onload=function(){window.clearTimeout(Q);if(L)try{var R=document.createElement("canvas"),S=R.getContext("2d"); -R.height=O.height;R.width=O.width;S.drawImage(O,0,0);A(R.toDataURL())}catch(X){A(Editor.svgBrokenImage.src)}};O.onerror=function(){window.clearTimeout(Q);L&&A(Editor.svgBrokenImage.src)};O.src=l}}catch(R){A(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(l,A,L,Q){null==Q&&(Q=this.createImageUrlConverter());var O=0,R=L||{};L=mxUtils.bind(this,function(S,X){S=l.getElementsByTagName(S);for(var aa=0;aa<S.length;aa++)mxUtils.bind(this,function(Y){try{if(null!=Y){var Z=Q.convert(Y.getAttribute(X)); -if(null!=Z&&"data:"!=Z.substring(0,5)){var ca=R[Z];null==ca?(O++,this.convertImageToDataUri(Z,function(fa){null!=fa&&(R[Z]=fa,Y.setAttribute(X,fa));O--;0==O&&A(l)})):Y.setAttribute(X,ca)}else null!=Z&&Y.setAttribute(X,Z)}}catch(fa){}})(S[aa])});L("image","xlink:href");L("img","src");0==O&&A(l)};Editor.base64Encode=function(l){for(var A="",L=0,Q=l.length,O,R,S;L<Q;){O=l.charCodeAt(L++)&255;if(L==Q){A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O& -3)<<4);A+="==";break}R=l.charCodeAt(L++);if(L==Q){A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4|(R&240)>>4);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&15)<<2);A+="=";break}S=l.charCodeAt(L++);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O& -3)<<4|(R&240)>>4);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&15)<<2|(S&192)>>6);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return A};Editor.prototype.loadUrl=function(l,A,L,Q,O,R,S,X){try{var aa=!S&&(Q||/(\.png)($|\?)/i.test(l)||/(\.jpe?g)($|\?)/i.test(l)||/(\.gif)($|\?)/i.test(l)||/(\.pdf)($|\?)/i.test(l));O=null!=O?O:!0;var Y=mxUtils.bind(this,function(){mxUtils.get(l,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&& -299>=Z.getStatus()){if(null!=A){var ca=Z.getText();if(aa){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();ca=Array(Z.length);for(var fa=0;fa<Z.length;fa++)ca[fa]=String.fromCharCode(Z[fa]);ca=ca.join("")}R=null!=R?R:"data:image/png;base64,";ca=R+Editor.base64Encode(ca)}A(ca)}}else null!=L&&(0==Z.getStatus()?L({message:mxResources.get("accessDenied")},Z):404==Z.getStatus()?L({code:Z.getStatus()}, -Z):L({message:mxResources.get("error")+" "+Z.getStatus()},Z))}),function(Z){null!=L&&L({message:mxResources.get("error")+" "+Z.getStatus()})},aa,this.timeout,function(){O&&null!=L&&L({code:App.ERROR_TIMEOUT,retry:Y})},X)});Y()}catch(Z){null!=L&&L(Z)}};Editor.prototype.absoluteCssFonts=function(l){var A=null;if(null!=l){var L=l.split("url(");if(0<L.length){A=[L[0]];l=window.location.pathname;var Q=null!=l?l.lastIndexOf("/"):-1;0<=Q&&(l=l.substring(0,Q+1));Q=document.getElementsByTagName("base");var O= -null;null!=Q&&0<Q.length&&(O=Q[0].getAttribute("href"));for(var R=1;R<L.length;R++)if(Q=L[R].indexOf(")"),0<Q){var S=Editor.trimCssUrl(L[R].substring(0,Q));this.graph.isRelativeUrl(S)&&(S=null!=O?O+S:window.location.protocol+"//"+window.location.hostname+("/"==S.charAt(0)?"":l)+S);A.push('url("'+S+'"'+L[R].substring(Q))}else A.push(L[R])}else A=[l]}return null!=A?A.join(""):null};Editor.prototype.mapFontUrl=function(l,A,L){/^https?:\/\//.test(A)&&!this.isCorsEnabledForUrl(A)&&(A=PROXY_URL+"?url="+ -encodeURIComponent(A));L(l,A)};Editor.prototype.embedCssFonts=function(l,A){var L=l.split("url("),Q=0;null==this.cachedFonts&&(this.cachedFonts={});var O=mxUtils.bind(this,function(){if(0==Q){for(var aa=[L[0]],Y=1;Y<L.length;Y++){var Z=L[Y].indexOf(")");aa.push('url("');aa.push(this.cachedFonts[Editor.trimCssUrl(L[Y].substring(0,Z))]);aa.push('"'+L[Y].substring(Z))}A(aa.join(""))}});if(0<L.length){for(l=1;l<L.length;l++){var R=L[l].indexOf(")"),S=null,X=L[l].indexOf("format(",R);0<X&&(S=Editor.trimCssUrl(L[l].substring(X+ -7,L[l].indexOf(")",X))));mxUtils.bind(this,function(aa){if(null==this.cachedFonts[aa]){this.cachedFonts[aa]=aa;Q++;var Y="application/x-font-ttf";if("svg"==S||/(\.svg)($|\?)/i.test(aa))Y="image/svg+xml";else if("otf"==S||"embedded-opentype"==S||/(\.otf)($|\?)/i.test(aa))Y="application/x-font-opentype";else if("woff"==S||/(\.woff)($|\?)/i.test(aa))Y="application/font-woff";else if("woff2"==S||/(\.woff2)($|\?)/i.test(aa))Y="application/font-woff2";else if("eot"==S||/(\.eot)($|\?)/i.test(aa))Y="application/vnd.ms-fontobject"; -else if("sfnt"==S||/(\.sfnt)($|\?)/i.test(aa))Y="application/font-sfnt";this.mapFontUrl(Y,aa,mxUtils.bind(this,function(Z,ca){this.loadUrl(ca,mxUtils.bind(this,function(fa){this.cachedFonts[aa]=fa;Q--;O()}),mxUtils.bind(this,function(fa){Q--;O()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(L[l].substring(0,R)),S)}O()}else A(l)};Editor.prototype.loadFonts=function(l){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(A){this.resolvedFontCss= -A;null!=l&&l()})):null!=l&&l()};Editor.prototype.createGoogleFontCache=function(){var l={},A;for(A in Graph.fontMapping)Graph.isCssFontUrl(A)&&(l[A]=Graph.fontMapping[A]);return l};Editor.prototype.embedExtFonts=function(l){var A=this.graph.getCustomFonts();if(0<A.length){var L=[],Q=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var O=mxUtils.bind(this,function(){0==Q&&this.embedCssFonts(L.join(""),l)}),R=0;R<A.length;R++)mxUtils.bind(this,function(S,X){Graph.isCssFontUrl(X)? -null==this.cachedGoogleFonts[X]?(Q++,this.loadUrl(X,mxUtils.bind(this,function(aa){this.cachedGoogleFonts[X]=aa;L.push(aa+"\n");Q--;O()}),mxUtils.bind(this,function(aa){Q--;L.push("@import url("+X+");\n");O()}))):L.push(this.cachedGoogleFonts[X]+"\n"):L.push('@font-face {font-family: "'+S+'";src: url("'+X+'")}\n')})(A[R].name,A[R].url);O()}else l()};Editor.prototype.addMathCss=function(l){l=l.getElementsByTagName("defs");if(null!=l&&0<l.length)for(var A=document.getElementsByTagName("style"),L=0;L< -A.length;L++){var Q=mxUtils.getTextContent(A[L]);0>Q.indexOf("mxPageSelector")&&0<Q.indexOf("MathJax")&&l[0].appendChild(A[L].cloneNode(!0))}};Editor.prototype.addFontCss=function(l,A){A=null!=A?A:this.absoluteCssFonts(this.fontCss);if(null!=A){var L=l.getElementsByTagName("defs"),Q=l.ownerDocument;0==L.length?(L=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,"defs"):Q.createElement("defs"),null!=l.firstChild?l.insertBefore(L,l.firstChild):l.appendChild(L)):L=L[0];l=null!=Q.createElementNS? -Q.createElementNS(mxConstants.NS_SVG,"style"):Q.createElement("style");l.setAttribute("type","text/css");mxUtils.setTextContent(l,A);L.appendChild(l)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(l,A,L){var Q=mxClient.IS_FF?8192:16384;return Math.min(L,Math.min(Q/l,Q/A))};Editor.prototype.exportToCanvas=function(l,A,L,Q,O,R,S,X,aa,Y,Z,ca,fa,la,ia,qa,ka,Da){try{R=null!=R?R:!0;S=null!=S?S:!0;ca=null!= -ca?ca:this.graph;fa=null!=fa?fa:0;var Ea=aa?null:ca.background;Ea==mxConstants.NONE&&(Ea=null);null==Ea&&(Ea=Q);null==Ea&&0==aa&&(Ea=qa?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(ca.getSvg(null,null,fa,la,null,S,null,null,null,Y,null,qa,ka,Da),mxUtils.bind(this,function(za){try{var Oa=new Image;Oa.onload=mxUtils.bind(this,function(){try{var Ga=function(){mxClient.IS_SF?window.setTimeout(function(){Ba.drawImage(Oa,0,0);l(Ia,za)},0):(Ba.drawImage(Oa,0,0),l(Ia,za))},Ia=document.createElement("canvas"), -ra=parseInt(za.getAttribute("width")),ua=parseInt(za.getAttribute("height"));X=null!=X?X:1;null!=A&&(X=R?Math.min(1,Math.min(3*A/(4*ua),A/ra)):A/ra);X=this.getMaxCanvasScale(ra,ua,X);ra=Math.ceil(X*ra);ua=Math.ceil(X*ua);Ia.setAttribute("width",ra);Ia.setAttribute("height",ua);var Ba=Ia.getContext("2d");null!=Ea&&(Ba.beginPath(),Ba.rect(0,0,ra,ua),Ba.fillStyle=Ea,Ba.fill());1!=X&&Ba.scale(X,X);if(ia){var Fa=ca.view,wa=Fa.scale;Fa.scale=1;var La=btoa(unescape(encodeURIComponent(Fa.createSvgGrid(Fa.gridColor)))); -Fa.scale=wa;La="data:image/svg+xml;base64,"+La;var ja=ca.gridSize*Fa.gridSteps*X,xa=ca.getGraphBounds(),sa=Fa.translate.x*wa,da=Fa.translate.y*wa,ba=sa+(xa.x-sa)/wa-fa,na=da+(xa.y-da)/wa-fa,ea=new Image;ea.onload=function(){try{for(var ha=-Math.round(ja-mxUtils.mod((sa-ba)*X,ja)),oa=-Math.round(ja-mxUtils.mod((da-na)*X,ja));ha<ra;ha+=ja)for(var ma=oa;ma<ua;ma+=ja)Ba.drawImage(ea,ha/X,ma/X);Ga()}catch(va){null!=O&&O(va)}};ea.onerror=function(ha){null!=O&&O(ha)};ea.src=La}else Ga()}catch(ha){null!= -O&&O(ha)}});Oa.onerror=function(Ga){null!=O&&O(Ga)};Y&&this.graph.addSvgShadow(za);this.graph.mathEnabled&&this.addMathCss(za);var Aa=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(za,this.resolvedFontCss),Oa.src=Editor.createSvgDataUri(mxUtils.getXml(za))}catch(Ga){null!=O&&O(Ga)}});this.embedExtFonts(mxUtils.bind(this,function(Ga){try{null!=Ga&&this.addFontCss(za,Ga),this.loadFonts(Aa)}catch(Ia){null!=O&&O(Ia)}}))}catch(Ga){null!=O&&O(Ga)}}),L,Z)}catch(za){null!=O&& -O(za)}};Editor.crcTable=[];for(var u=0;256>u;u++)for(var x=u,B=0;8>B;B++)x=1==(x&1)?3988292384^x>>>1:x>>>1,Editor.crcTable[u]=x;Editor.updateCRC=function(l,A,L,Q){for(var O=0;O<Q;O++)l=Editor.crcTable[(l^A.charCodeAt(L+O))&255]^l>>>8;return l};Editor.crc32=function(l){for(var A=-1,L=0;L<l.length;L++)A=A>>>8^Editor.crcTable[(A^l.charCodeAt(L))&255];return(A^-1)>>>0};Editor.writeGraphModelToPng=function(l,A,L,Q,O){function R(Z,ca){var fa=aa;aa+=ca;return Z.substring(fa,aa)}function S(Z){Z=R(Z,4);return Z.charCodeAt(3)+ -(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function X(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}l=l.substring(l.indexOf(",")+1);l=window.atob?atob(l):Base64.decode(l,!0);var aa=0;if(R(l,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=O&&O();else if(R(l,4),"IHDR"!=R(l,4))null!=O&&O();else{R(l,17);O=l.substring(0,aa);do{var Y=S(l);if("IDAT"==R(l,4)){O=l.substring(0,aa-8);"pHYs"==A&&"dpi"==L?(L=Math.round(Q/.0254),L=X(L)+X(L)+String.fromCharCode(1)): -L=L+String.fromCharCode(0)+("zTXt"==A?String.fromCharCode(0):"")+Q;Q=4294967295;Q=Editor.updateCRC(Q,A,0,4);Q=Editor.updateCRC(Q,L,0,L.length);O+=X(L.length)+A+L+X(Q^4294967295);O+=l.substring(aa-8,l.length);break}O+=l.substring(aa-8,aa-4+Y);R(l,Y);R(l,4)}while(Y);return"data:image/png;base64,"+(window.btoa?btoa(O):Base64.encode(O,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var D=ColorDialog.addRecentColor;ColorDialog.addRecentColor= -function(l,A){D.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var K=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){K.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(l,A){var L=null;null!=l.editor.graph.getModel().getParent(A)?L=A.getId():null!=l.currentPage&&(L=l.currentPage.getId());return L});if(null!=window.StyleFormatPanel){var c= -Format.prototype.init;Format.prototype.init=function(){c.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var e=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?e.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var l=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=l&&l.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible= -function(l){return!1};var g=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(l){l=g.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var A=this.editorUi,L=A.editor.graph,Q=this.createOption(mxResources.get("shadow"),function(){return L.shadowVisible},function(O){var R=new ChangePageSetup(A);R.ignoreColor=!0;R.ignoreImage=!0;R.shadowVisible=O;L.model.execute(R)},{install:function(O){this.listener=function(){O(L.shadowVisible)}; -A.addListener("shadowVisibleChanged",this.listener)},destroy:function(){A.removeListener(this.listener)}});Editor.enableShadowOption||(Q.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(Q,60));l.appendChild(Q)}return l};var q=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(l){l=q.apply(this,arguments);var A=this.editorUi,L=A.editor.graph;if(L.isEnabled()){var Q=A.getCurrentFile();if(null!=Q&&Q.isAutosaveOptional()){var O= -this.createOption(mxResources.get("autosave"),function(){return A.editor.autosave},function(S){A.editor.setAutosave(S);A.editor.autosave&&Q.isModified()&&Q.fileChanged()},{install:function(S){this.listener=function(){S(A.editor.autosave)};A.editor.addListener("autosaveChanged",this.listener)},destroy:function(){A.editor.removeListener(this.listener)}});l.appendChild(O)}}if(this.isMathOptionVisible()&&L.isEnabled()&&"undefined"!==typeof MathJax){O=this.createOption(mxResources.get("mathematicalTypesetting"), -function(){return L.mathEnabled},function(S){A.actions.get("mathematicalTypesetting").funct()},{install:function(S){this.listener=function(){S(L.mathEnabled)};A.addListener("mathEnabledChanged",this.listener)},destroy:function(){A.removeListener(this.listener)}});O.style.paddingTop="5px";l.appendChild(O);var R=A.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");R.style.position="relative";R.style.marginLeft="6px";R.style.top="2px";O.appendChild(R)}return l};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties= +null!=l.defaultPageVisible&&(Graph.prototype.defaultPageVisible=l.defaultPageVisible);null!=l.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=l.defaultGridEnabled);null!=l.zoomWheel&&(Graph.zoomWheel=l.zoomWheel);null!=l.zoomFactor&&(A=parseFloat(l.zoomFactor),!isNaN(A)&&1<A?Graph.prototype.zoomFactor=A:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=l.gridSteps&&(A=parseInt(l.gridSteps),!isNaN(A)&&0<A?mxGraphView.prototype.gridSteps=A:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps")); +null!=l.pageFormat&&(A=parseInt(l.pageFormat.width),M=parseInt(l.pageFormat.height),!isNaN(A)&&0<A&&!isNaN(M)&&0<M?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,A,M),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));l.thumbWidth&&(Sidebar.prototype.thumbWidth=l.thumbWidth);l.thumbHeight&&(Sidebar.prototype.thumbHeight=l.thumbHeight);l.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml= +l.emptyLibraryXml);l.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=l.emptyDiagramXml);l.sidebarWidth&&(EditorUi.prototype.hsplitPosition=l.sidebarWidth);l.sidebarTitles&&(Sidebar.prototype.sidebarTitles=l.sidebarTitles);l.sidebarTitleSize&&(A=parseInt(l.sidebarTitleSize),!isNaN(A)&&0<A?Sidebar.prototype.sidebarTitleSize=A:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));l.fontCss&&("string"===typeof l.fontCss?Editor.configureFontCss(l.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss")); +null!=l.autosaveDelay&&(A=parseInt(l.autosaveDelay),!isNaN(A)&&0<A?DrawioFile.prototype.autosaveDelay=A:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=l.maxImageBytes&&(EditorUi.prototype.maxImageBytes=l.maxImageBytes);null!=l.maxImageSize&&(EditorUi.prototype.maxImageSize=l.maxImageSize);null!=l.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=l.shareCursorPosition);null!=l.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=l.showRemoteCursors)}}; +Editor.configureFontCss=function(l){if(null!=l){Editor.prototype.fontCss=l;var A=document.getElementsByTagName("script")[0];if(null!=A&&null!=A.parentNode){var M=document.createElement("style");M.setAttribute("type","text/css");M.appendChild(document.createTextNode(l));A.parentNode.insertBefore(M,A);l=l.split("url(");for(M=1;M<l.length;M++){var Q=l[M].indexOf(")");Q=Editor.trimCssUrl(l[M].substring(0,Q));var O=document.createElement("link");O.setAttribute("rel","preload");O.setAttribute("href",Q); +O.setAttribute("as","font");O.setAttribute("crossorigin","");A.parentNode.insertBefore(O,A)}}}};Editor.trimCssUrl=function(l){return l.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(l){l=null!=l?l:Editor.GUID_LENGTH;for(var A=[],M=0;M<l;M++)A.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()* +Editor.GUID_ALPHABET.length)));return A.join("")};Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(l){l=null!=l&&"mxlibrary"!=l.nodeName?this.extractGraphModel(l):null;if(null!=l){var A=Editor.extractParserError(l,mxResources.get("invalidOrMissingFile"));if(A)throw EditorUi.debug("Editor.setGraphXml ParserError", +[this],"node",[l],"cause",[A]),Error(mxResources.get("notADiagramFile")+" ("+A+")");if("mxGraphModel"==l.nodeName){A=l.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=A&&""!=A)A!=this.graph.currentStyle&&(M=null!=this.graph.themes?this.graph.themes[A]:mxUtils.load(STYLE_PATH+"/"+A+".xml").getDocumentElement(),null!=M&&(Q=new mxCodec(M.ownerDocument),Q.decode(M,this.graph.getStylesheet())));else{var M=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+ +"/default-old.xml").getDocumentElement();if(null!=M){var Q=new mxCodec(M.ownerDocument);Q.decode(M,this.graph.getStylesheet())}}this.graph.currentStyle=A;this.graph.mathEnabled="1"==urlParams.math||"1"==l.getAttribute("math");A=l.getAttribute("backgroundImage");null!=A?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(A)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform(); +this.graph.setShadowVisible("1"==l.getAttribute("shadow"),!1);if(A=l.getAttribute("extFonts"))try{for(A=A.split("|").map(function(O){O=O.split("^");return{name:O[0],url:O[1]}}),M=0;M<A.length;M++)this.graph.addExtFont(A[M].name,A[M].url)}catch(O){console.log("ExtFonts format error: "+O.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}}; +};var f=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(l,A){l=null!=l?l:!0;var M=f.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&M.setAttribute("style",this.graph.currentStyle);var Q=this.graph.getBackgroundImageObject(this.graph.backgroundImage,A);null!=Q&&M.setAttribute("backgroundImage",JSON.stringify(Q));M.setAttribute("math",this.graph.mathEnabled?"1":"0");M.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&& +0<this.graph.extFonts.length&&(Q=this.graph.extFonts.map(function(O){return O.name+"^"+O.url}),M.setAttribute("extFonts",Q.join("|")));return M};Editor.prototype.isDataSvg=function(l){try{var A=mxUtils.parseXml(l).documentElement.getAttribute("content");if(null!=A&&(null!=A&&"<"!=A.charAt(0)&&"%"!=A.charAt(0)&&(A=unescape(window.atob?atob(A):Base64.decode(cont,A))),null!=A&&"%"==A.charAt(0)&&(A=decodeURIComponent(A)),null!=A&&0<A.length)){var M=mxUtils.parseXml(A).documentElement;return"mxfile"== +M.nodeName||"mxGraphModel"==M.nodeName}}catch(Q){}return!1};Editor.prototype.extractGraphModel=function(l,A,M){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();k.apply(this,arguments)};var e= +Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){e.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(l,A){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){l=null!=l?l:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(O){try{MathJax.typesetClear([O]),MathJax.typeset([O]), +Editor.onMathJaxDone()}catch(R){MathJax.typesetClear([O]),null!=R.retry?R.retry.then(function(){MathJax.typesetPromise([O]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+R.toString())}};window.MathJax=null!=A?A:{options:{skipHtmlTags:{"[+]":["text"]}},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath"]},startup:{pageReady:function(){for(var O=0;O<Editor.mathJaxQueue.length;O++)Editor.doMathJaxRender(Editor.mathJaxQueue[O])}}}; +Editor.MathJaxRender=function(O){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(O):Editor.mathJaxQueue.push(O)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var M=Editor.prototype.init;Editor.prototype.init=function(){M.apply(this,arguments);var O=mxUtils.bind(this,function(R,S){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE, +O);this.graph.addListener(mxEvent.REFRESH,O)};A=document.getElementsByTagName("script");if(null!=A&&0<A.length){var Q=document.createElement("script");Q.setAttribute("type","text/javascript");Q.setAttribute("src",l);A[0].parentNode.appendChild(Q)}}};Editor.prototype.csvToArray=function(l){if(0<l.length){var A="",M=[""],Q=0,O=!0,R;l=$jscomp.makeIterator(l);for(R=l.next();!R.done;R=l.next())R=R.value,'"'===R?(O&&R===A&&(M[Q]+=R),O=!O):","===R&&O?R=M[++Q]="":M[Q]+=R,A=R;return M}return[]};Editor.prototype.getProxiedUrl= +function(l){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(l)){var A=/(\.v(dx|sdx?))($|\?)/i.test(l)||/(\.vs(x|sx?))($|\?)/i.test(l);A=/\.png$/i.test(l)||/\.pdf$/i.test(l)||A;var M="t="+(new Date).getTime();l=PROXY_URL+"?url="+encodeURIComponent(l)+"&"+M+(A?"&base64=1":"")}return l};Editor.prototype.isCorsEnabledForUrl=function(l){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||l.substring(0,window.location.origin.length)== +window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(l)||"https://raw.githubusercontent.com/"===l.substring(0,34)||"https://fonts.googleapis.com/"===l.substring(0,29)||"https://fonts.gstatic.com/"===l.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var l=new mxUrlConverter;l.updateBaseUrl();var A=l.convert,M=this;l.convert=function(Q){if(null!= +Q){var O="http://"==Q.substring(0,7)||"https://"==Q.substring(0,8);O&&!navigator.onLine?Q=Editor.svgBrokenImage.src:!O||Q.substring(0,l.baseUrl.length)==l.baseUrl||M.crossOriginImages&&M.isCorsEnabledForUrl(Q)?"chrome-extension://"==Q.substring(0,19)||mxClient.IS_CHROMEAPP||(Q=A.apply(this,arguments)):Q=PROXY_URL+"?url="+encodeURIComponent(Q)}return Q};return l};Editor.createSvgDataUri=function(l){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(l)))};Editor.prototype.convertImageToDataUri= +function(l,A){try{var M=!0,Q=window.setTimeout(mxUtils.bind(this,function(){M=!1;A(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(l))mxUtils.get(l,mxUtils.bind(this,function(R){window.clearTimeout(Q);M&&A(Editor.createSvgDataUri(R.getText()))}),function(){window.clearTimeout(Q);M&&A(Editor.svgBrokenImage.src)});else{var O=new Image;this.crossOriginImages&&(O.crossOrigin="anonymous");O.onload=function(){window.clearTimeout(Q);if(M)try{var R=document.createElement("canvas"),S=R.getContext("2d"); +R.height=O.height;R.width=O.width;S.drawImage(O,0,0);A(R.toDataURL())}catch(X){A(Editor.svgBrokenImage.src)}};O.onerror=function(){window.clearTimeout(Q);M&&A(Editor.svgBrokenImage.src)};O.src=l}}catch(R){A(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(l,A,M,Q){null==Q&&(Q=this.createImageUrlConverter());var O=0,R=M||{};M=mxUtils.bind(this,function(S,X){S=l.getElementsByTagName(S);for(var aa=0;aa<S.length;aa++)mxUtils.bind(this,function(Y){try{if(null!=Y){var Z=Q.convert(Y.getAttribute(X)); +if(null!=Z&&"data:"!=Z.substring(0,5)){var ba=R[Z];null==ba?(O++,this.convertImageToDataUri(Z,function(ha){null!=ha&&(R[Z]=ha,Y.setAttribute(X,ha));O--;0==O&&A(l)})):Y.setAttribute(X,ba)}else null!=Z&&Y.setAttribute(X,Z)}}catch(ha){}})(S[aa])});M("image","xlink:href");M("img","src");0==O&&A(l)};Editor.base64Encode=function(l){for(var A="",M=0,Q=l.length,O,R,S;M<Q;){O=l.charCodeAt(M++)&255;if(M==Q){A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O& +3)<<4);A+="==";break}R=l.charCodeAt(M++);if(M==Q){A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4|(R&240)>>4);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&15)<<2);A+="=";break}S=l.charCodeAt(M++);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O& +3)<<4|(R&240)>>4);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&15)<<2|(S&192)>>6);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return A};Editor.prototype.loadUrl=function(l,A,M,Q,O,R,S,X){try{var aa=!S&&(Q||/(\.png)($|\?)/i.test(l)||/(\.jpe?g)($|\?)/i.test(l)||/(\.gif)($|\?)/i.test(l)||/(\.pdf)($|\?)/i.test(l));O=null!=O?O:!0;var Y=mxUtils.bind(this,function(){mxUtils.get(l,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&& +299>=Z.getStatus()){if(null!=A){var ba=Z.getText();if(aa){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();ba=Array(Z.length);for(var ha=0;ha<Z.length;ha++)ba[ha]=String.fromCharCode(Z[ha]);ba=ba.join("")}R=null!=R?R:"data:image/png;base64,";ba=R+Editor.base64Encode(ba)}A(ba)}}else null!=M&&(0==Z.getStatus()?M({message:mxResources.get("accessDenied")},Z):404==Z.getStatus()?M({code:Z.getStatus()}, +Z):M({message:mxResources.get("error")+" "+Z.getStatus()},Z))}),function(Z){null!=M&&M({message:mxResources.get("error")+" "+Z.getStatus()})},aa,this.timeout,function(){O&&null!=M&&M({code:App.ERROR_TIMEOUT,retry:Y})},X)});Y()}catch(Z){null!=M&&M(Z)}};Editor.prototype.absoluteCssFonts=function(l){var A=null;if(null!=l){var M=l.split("url(");if(0<M.length){A=[M[0]];l=window.location.pathname;var Q=null!=l?l.lastIndexOf("/"):-1;0<=Q&&(l=l.substring(0,Q+1));Q=document.getElementsByTagName("base");var O= +null;null!=Q&&0<Q.length&&(O=Q[0].getAttribute("href"));for(var R=1;R<M.length;R++)if(Q=M[R].indexOf(")"),0<Q){var S=Editor.trimCssUrl(M[R].substring(0,Q));this.graph.isRelativeUrl(S)&&(S=null!=O?O+S:window.location.protocol+"//"+window.location.hostname+("/"==S.charAt(0)?"":l)+S);A.push('url("'+S+'"'+M[R].substring(Q))}else A.push(M[R])}else A=[l]}return null!=A?A.join(""):null};Editor.prototype.mapFontUrl=function(l,A,M){/^https?:\/\//.test(A)&&!this.isCorsEnabledForUrl(A)&&(A=PROXY_URL+"?url="+ +encodeURIComponent(A));M(l,A)};Editor.prototype.embedCssFonts=function(l,A){var M=l.split("url("),Q=0;null==this.cachedFonts&&(this.cachedFonts={});var O=mxUtils.bind(this,function(){if(0==Q){for(var aa=[M[0]],Y=1;Y<M.length;Y++){var Z=M[Y].indexOf(")");aa.push('url("');aa.push(this.cachedFonts[Editor.trimCssUrl(M[Y].substring(0,Z))]);aa.push('"'+M[Y].substring(Z))}A(aa.join(""))}});if(0<M.length){for(l=1;l<M.length;l++){var R=M[l].indexOf(")"),S=null,X=M[l].indexOf("format(",R);0<X&&(S=Editor.trimCssUrl(M[l].substring(X+ +7,M[l].indexOf(")",X))));mxUtils.bind(this,function(aa){if(null==this.cachedFonts[aa]){this.cachedFonts[aa]=aa;Q++;var Y="application/x-font-ttf";if("svg"==S||/(\.svg)($|\?)/i.test(aa))Y="image/svg+xml";else if("otf"==S||"embedded-opentype"==S||/(\.otf)($|\?)/i.test(aa))Y="application/x-font-opentype";else if("woff"==S||/(\.woff)($|\?)/i.test(aa))Y="application/font-woff";else if("woff2"==S||/(\.woff2)($|\?)/i.test(aa))Y="application/font-woff2";else if("eot"==S||/(\.eot)($|\?)/i.test(aa))Y="application/vnd.ms-fontobject"; +else if("sfnt"==S||/(\.sfnt)($|\?)/i.test(aa))Y="application/font-sfnt";this.mapFontUrl(Y,aa,mxUtils.bind(this,function(Z,ba){this.loadUrl(ba,mxUtils.bind(this,function(ha){this.cachedFonts[aa]=ha;Q--;O()}),mxUtils.bind(this,function(ha){Q--;O()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(M[l].substring(0,R)),S)}O()}else A(l)};Editor.prototype.loadFonts=function(l){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(A){this.resolvedFontCss= +A;null!=l&&l()})):null!=l&&l()};Editor.prototype.createGoogleFontCache=function(){var l={},A;for(A in Graph.fontMapping)Graph.isCssFontUrl(A)&&(l[A]=Graph.fontMapping[A]);return l};Editor.prototype.embedExtFonts=function(l){var A=this.graph.getCustomFonts();if(0<A.length){var M=[],Q=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var O=mxUtils.bind(this,function(){0==Q&&this.embedCssFonts(M.join(""),l)}),R=0;R<A.length;R++)mxUtils.bind(this,function(S,X){Graph.isCssFontUrl(X)? +null==this.cachedGoogleFonts[X]?(Q++,this.loadUrl(X,mxUtils.bind(this,function(aa){this.cachedGoogleFonts[X]=aa;M.push(aa+"\n");Q--;O()}),mxUtils.bind(this,function(aa){Q--;M.push("@import url("+X+");\n");O()}))):M.push(this.cachedGoogleFonts[X]+"\n"):M.push('@font-face {font-family: "'+S+'";src: url("'+X+'")}\n')})(A[R].name,A[R].url);O()}else l()};Editor.prototype.addMathCss=function(l){l=l.getElementsByTagName("defs");if(null!=l&&0<l.length)for(var A=document.getElementsByTagName("style"),M=0;M< +A.length;M++){var Q=mxUtils.getTextContent(A[M]);0>Q.indexOf("mxPageSelector")&&0<Q.indexOf("MathJax")&&l[0].appendChild(A[M].cloneNode(!0))}};Editor.prototype.addFontCss=function(l,A){A=null!=A?A:this.absoluteCssFonts(this.fontCss);if(null!=A){var M=l.getElementsByTagName("defs"),Q=l.ownerDocument;0==M.length?(M=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,"defs"):Q.createElement("defs"),null!=l.firstChild?l.insertBefore(M,l.firstChild):l.appendChild(M)):M=M[0];l=null!=Q.createElementNS? +Q.createElementNS(mxConstants.NS_SVG,"style"):Q.createElement("style");l.setAttribute("type","text/css");mxUtils.setTextContent(l,A);M.appendChild(l)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(l,A,M){var Q=mxClient.IS_FF?8192:16384;return Math.min(M,Math.min(Q/l,Q/A))};Editor.prototype.exportToCanvas=function(l,A,M,Q,O,R,S,X,aa,Y,Z,ba,ha,ma,ia,qa,la,Ca){try{R=null!=R?R:!0;S=null!=S?S:!0;ba=null!= +ba?ba:this.graph;ha=null!=ha?ha:0;var Da=aa?null:ba.background;Da==mxConstants.NONE&&(Da=null);null==Da&&(Da=Q);null==Da&&0==aa&&(Da=qa?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(ba.getSvg(null,null,ha,ma,null,S,null,null,null,Y,null,qa,la,Ca),mxUtils.bind(this,function(ya){try{var Pa=new Image;Pa.onload=mxUtils.bind(this,function(){try{var Fa=function(){mxClient.IS_SF?window.setTimeout(function(){na.drawImage(Pa,0,0);l(Ia,ya)},0):(na.drawImage(Pa,0,0),l(Ia,ya))},Ia=document.createElement("canvas"), +Ba=parseInt(ya.getAttribute("width")),Ga=parseInt(ya.getAttribute("height"));X=null!=X?X:1;null!=A&&(X=R?Math.min(1,Math.min(3*A/(4*Ga),A/Ba)):A/Ba);X=this.getMaxCanvasScale(Ba,Ga,X);Ba=Math.ceil(X*Ba);Ga=Math.ceil(X*Ga);Ia.setAttribute("width",Ba);Ia.setAttribute("height",Ga);var na=Ia.getContext("2d");null!=Da&&(na.beginPath(),na.rect(0,0,Ba,Ga),na.fillStyle=Da,na.fill());1!=X&&na.scale(X,X);if(ia){var Ea=ba.view,wa=Ea.scale;Ea.scale=1;var La=btoa(unescape(encodeURIComponent(Ea.createSvgGrid(Ea.gridColor)))); +Ea.scale=wa;La="data:image/svg+xml;base64,"+La;var ka=ba.gridSize*Ea.gridSteps*X,ua=ba.getGraphBounds(),sa=Ea.translate.x*wa,va=Ea.translate.y*wa,ca=sa+(ua.x-sa)/wa-ha,ea=va+(ua.y-va)/wa-ha,da=new Image;da.onload=function(){try{for(var fa=-Math.round(ka-mxUtils.mod((sa-ca)*X,ka)),ja=-Math.round(ka-mxUtils.mod((va-ea)*X,ka));fa<Ba;fa+=ka)for(var ra=ja;ra<Ga;ra+=ka)na.drawImage(da,fa/X,ra/X);Fa()}catch(oa){null!=O&&O(oa)}};da.onerror=function(fa){null!=O&&O(fa)};da.src=La}else Fa()}catch(fa){null!= +O&&O(fa)}});Pa.onerror=function(Fa){null!=O&&O(Fa)};Y&&this.graph.addSvgShadow(ya);this.graph.mathEnabled&&this.addMathCss(ya);var za=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(ya,this.resolvedFontCss),Pa.src=Editor.createSvgDataUri(mxUtils.getXml(ya))}catch(Fa){null!=O&&O(Fa)}});this.embedExtFonts(mxUtils.bind(this,function(Fa){try{null!=Fa&&this.addFontCss(ya,Fa),this.loadFonts(za)}catch(Ia){null!=O&&O(Ia)}}))}catch(Fa){null!=O&&O(Fa)}}),M,Z)}catch(ya){null!=O&& +O(ya)}};Editor.crcTable=[];for(var u=0;256>u;u++)for(var v=u,B=0;8>B;B++)v=1==(v&1)?3988292384^v>>>1:v>>>1,Editor.crcTable[u]=v;Editor.updateCRC=function(l,A,M,Q){for(var O=0;O<Q;O++)l=Editor.crcTable[(l^A.charCodeAt(M+O))&255]^l>>>8;return l};Editor.crc32=function(l){for(var A=-1,M=0;M<l.length;M++)A=A>>>8^Editor.crcTable[(A^l.charCodeAt(M))&255];return(A^-1)>>>0};Editor.writeGraphModelToPng=function(l,A,M,Q,O){function R(Z,ba){var ha=aa;aa+=ba;return Z.substring(ha,aa)}function S(Z){Z=R(Z,4);return Z.charCodeAt(3)+ +(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function X(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}l=l.substring(l.indexOf(",")+1);l=window.atob?atob(l):Base64.decode(l,!0);var aa=0;if(R(l,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=O&&O();else if(R(l,4),"IHDR"!=R(l,4))null!=O&&O();else{R(l,17);O=l.substring(0,aa);do{var Y=S(l);if("IDAT"==R(l,4)){O=l.substring(0,aa-8);"pHYs"==A&&"dpi"==M?(M=Math.round(Q/.0254),M=X(M)+X(M)+String.fromCharCode(1)): +M=M+String.fromCharCode(0)+("zTXt"==A?String.fromCharCode(0):"")+Q;Q=4294967295;Q=Editor.updateCRC(Q,A,0,4);Q=Editor.updateCRC(Q,M,0,M.length);O+=X(M.length)+A+M+X(Q^4294967295);O+=l.substring(aa-8,l.length);break}O+=l.substring(aa-8,aa-4+Y);R(l,Y);R(l,4)}while(Y);return"data:image/png;base64,"+(window.btoa?btoa(O):Base64.encode(O,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var E=ColorDialog.addRecentColor;ColorDialog.addRecentColor= +function(l,A){E.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var L=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){L.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(l,A){var M=null;null!=l.editor.graph.getModel().getParent(A)?M=A.getId():null!=l.currentPage&&(M=l.currentPage.getId());return M});if(null!=window.StyleFormatPanel){var c= +Format.prototype.init;Format.prototype.init=function(){c.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var d=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?d.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var l=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=l&&l.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible= +function(l){return!1};var g=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(l){l=g.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var A=this.editorUi,M=A.editor.graph,Q=this.createOption(mxResources.get("shadow"),function(){return M.shadowVisible},function(O){var R=new ChangePageSetup(A);R.ignoreColor=!0;R.ignoreImage=!0;R.shadowVisible=O;M.model.execute(R)},{install:function(O){this.listener=function(){O(M.shadowVisible)}; +A.addListener("shadowVisibleChanged",this.listener)},destroy:function(){A.removeListener(this.listener)}});Editor.enableShadowOption||(Q.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(Q,60));l.appendChild(Q)}return l};var q=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(l){l=q.apply(this,arguments);var A=this.editorUi,M=A.editor.graph;if(M.isEnabled()){var Q=A.getCurrentFile();if(null!=Q&&Q.isAutosaveOptional()){var O= +this.createOption(mxResources.get("autosave"),function(){return A.editor.autosave},function(S){A.editor.setAutosave(S);A.editor.autosave&&Q.isModified()&&Q.fileChanged()},{install:function(S){this.listener=function(){S(A.editor.autosave)};A.editor.addListener("autosaveChanged",this.listener)},destroy:function(){A.editor.removeListener(this.listener)}});l.appendChild(O)}}if(this.isMathOptionVisible()&&M.isEnabled()&&"undefined"!==typeof MathJax){O=this.createOption(mxResources.get("mathematicalTypesetting"), +function(){return M.mathEnabled},function(S){A.actions.get("mathematicalTypesetting").funct()},{install:function(S){this.listener=function(){S(M.mathEnabled)};A.addListener("mathEnabledChanged",this.listener)},destroy:function(){A.removeListener(this.listener)}});O.style.paddingTop="5px";l.appendChild(O);var R=A.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");R.style.position="relative";R.style.marginLeft="6px";R.style.top="2px";O.appendChild(R)}return l};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties= [{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth", dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line", type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize", @@ -11313,92 +11310,92 @@ defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00", font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"}, {fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties= -function(l,A,L){if(null!=A){var Q=function(R){if(null!=R)if(L)for(var S=0;S<R.length;S++)A[R[S].name]=R[S];else for(var X in A){var aa=!1;for(S=0;S<R.length;S++)if(R[S].name==X&&R[S].type==A[X].type){aa=!0;break}aa||delete A[X]}},O=this.editorUi.editor.graph.view.getState(l);null!=O&&null!=O.shape&&(O.shape.commonCustomPropAdded||(O.shape.commonCustomPropAdded=!0,O.shape.customProperties=O.shape.customProperties||[],O.cell.vertex?Array.prototype.push.apply(O.shape.customProperties,Editor.commonVertexProperties): +function(l,A,M){if(null!=A){var Q=function(R){if(null!=R)if(M)for(var S=0;S<R.length;S++)A[R[S].name]=R[S];else for(var X in A){var aa=!1;for(S=0;S<R.length;S++)if(R[S].name==X&&R[S].type==A[X].type){aa=!0;break}aa||delete A[X]}},O=this.editorUi.editor.graph.view.getState(l);null!=O&&null!=O.shape&&(O.shape.commonCustomPropAdded||(O.shape.commonCustomPropAdded=!0,O.shape.customProperties=O.shape.customProperties||[],O.cell.vertex?Array.prototype.push.apply(O.shape.customProperties,Editor.commonVertexProperties): Array.prototype.push.apply(O.shape.customProperties,Editor.commonEdgeProperties)),Q(O.shape.customProperties));l=l.getAttribute("customProperties");if(null!=l)try{Q(JSON.parse(l))}catch(R){}}};var m=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var l=this.editorUi.getSelectionState();"image"!=l.style.shape&&!l.containsLabel&&0<l.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));m.apply(this,arguments);if(Editor.enableCustomProperties){for(var A= -{},L=l.vertices,Q=l.edges,O=0;O<L.length;O++)this.findCommonProperties(L[O],A,0==O);for(O=0;O<Q.length;O++)this.findCommonProperties(Q[O],A,0==L.length&&0==O);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(A).length&&this.container.appendChild(this.addProperties(this.createPanel(),A,l))}};var n=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(l){this.addActions(l,["copyStyle","pasteStyle"]);return n.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed= -!0;StyleFormatPanel.prototype.addProperties=function(l,A,L){function Q(Ba,Fa,wa,La){ca.getModel().beginUpdate();try{var ja=[],xa=[];if(null!=wa.index){for(var sa=[],da=wa.parentRow.nextSibling;da&&da.getAttribute("data-pName")==Ba;)sa.push(da.getAttribute("data-pValue")),da=da.nextSibling;wa.index<sa.length?null!=La?sa.splice(La,1):sa[wa.index]=Fa:sa.push(Fa);null!=wa.size&&sa.length>wa.size&&(sa=sa.slice(0,wa.size));Fa=sa.join(",");null!=wa.countProperty&&(ca.setCellStyles(wa.countProperty,sa.length, -ca.getSelectionCells()),ja.push(wa.countProperty),xa.push(sa.length))}ca.setCellStyles(Ba,Fa,ca.getSelectionCells());ja.push(Ba);xa.push(Fa);if(null!=wa.dependentProps)for(Ba=0;Ba<wa.dependentProps.length;Ba++){var ba=wa.dependentPropsDefVal[Ba],na=wa.dependentPropsVals[Ba];if(na.length>Fa)na=na.slice(0,Fa);else for(var ea=na.length;ea<Fa;ea++)na.push(ba);na=na.join(",");ca.setCellStyles(wa.dependentProps[Ba],na,ca.getSelectionCells());ja.push(wa.dependentProps[Ba]);xa.push(na)}if("function"==typeof wa.onChange)wa.onChange(ca, -Fa);Z.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ja,"values",xa,"cells",ca.getSelectionCells()))}finally{ca.getModel().endUpdate()}}function O(Ba,Fa,wa){var La=mxUtils.getOffset(l,!0),ja=mxUtils.getOffset(Ba,!0);Fa.style.position="absolute";Fa.style.left=ja.x-La.x+"px";Fa.style.top=ja.y-La.y+"px";Fa.style.width=Ba.offsetWidth+"px";Fa.style.height=Ba.offsetHeight-(wa?4:0)+"px";Fa.style.zIndex=5}function R(Ba,Fa,wa){var La=document.createElement("div");La.style.width="32px";La.style.height= -"4px";La.style.margin="2px";La.style.border="1px solid black";La.style.background=Fa&&"none"!=Fa?Fa:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(Z,function(ja){this.editorUi.pickColor(Fa,function(xa){La.style.background="none"==xa?"url('"+Dialog.prototype.noColorImage+"')":xa;Q(Ba,xa,wa)});mxEvent.consume(ja)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(La);return btn}function S(Ba,Fa,wa,La,ja,xa,sa){null!=Fa&&(Fa=Fa.split(","), -fa.push({name:Ba,values:Fa,type:wa,defVal:La,countProperty:ja,parentRow:xa,isDeletable:!0,flipBkg:sa}));btn=mxUtils.button("+",mxUtils.bind(Z,function(da){for(var ba=xa,na=0;null!=ba.nextSibling;)if(ba.nextSibling.getAttribute("data-pName")==Ba)ba=ba.nextSibling,na++;else break;var ea={type:wa,parentRow:xa,index:na,isDeletable:!0,defVal:La,countProperty:ja};na=Y(Ba,"",ea,0==na%2,sa);Q(Ba,La,ea);ba.parentNode.insertBefore(na,ba.nextSibling);mxEvent.consume(da)}));btn.style.height="16px";btn.style.width= -"25px";btn.className="geColorBtn";return btn}function X(Ba,Fa,wa,La,ja,xa,sa){if(0<ja){var da=Array(ja);Fa=null!=Fa?Fa.split(","):[];for(var ba=0;ba<ja;ba++)da[ba]=null!=Fa[ba]?Fa[ba]:null!=La?La:"";fa.push({name:Ba,values:da,type:wa,defVal:La,parentRow:xa,flipBkg:sa,size:ja})}return document.createElement("div")}function aa(Ba,Fa,wa){var La=document.createElement("input");La.type="checkbox";La.checked="1"==Fa;mxEvent.addListener(La,"change",function(){Q(Ba,La.checked?"1":"0",wa)});return La}function Y(Ba, -Fa,wa,La,ja){var xa=wa.dispName,sa=wa.type,da=document.createElement("tr");da.className="gePropRow"+(ja?"Dark":"")+(La?"Alt":"")+" gePropNonHeaderRow";da.setAttribute("data-pName",Ba);da.setAttribute("data-pValue",Fa);La=!1;null!=wa.index&&(da.setAttribute("data-index",wa.index),xa=(null!=xa?xa:"")+"["+wa.index+"]",La=!0);var ba=document.createElement("td");ba.className="gePropRowCell";xa=mxResources.get(xa,null,xa);mxUtils.write(ba,xa);ba.setAttribute("title",xa);La&&(ba.style.textAlign="right"); -da.appendChild(ba);ba=document.createElement("td");ba.className="gePropRowCell";if("color"==sa)ba.appendChild(R(Ba,Fa,wa));else if("bool"==sa||"boolean"==sa)ba.appendChild(aa(Ba,Fa,wa));else if("enum"==sa){var na=wa.enumList;for(ja=0;ja<na.length;ja++)if(xa=na[ja],xa.val==Fa){mxUtils.write(ba,mxResources.get(xa.dispName,null,xa.dispName));break}mxEvent.addListener(ba,"click",mxUtils.bind(Z,function(){var ea=document.createElement("select");O(ba,ea);for(var ha=0;ha<na.length;ha++){var oa=na[ha],ma= -document.createElement("option");ma.value=mxUtils.htmlEntities(oa.val);mxUtils.write(ma,mxResources.get(oa.dispName,null,oa.dispName));ea.appendChild(ma)}ea.value=Fa;l.appendChild(ea);mxEvent.addListener(ea,"change",function(){var va=mxUtils.htmlEntities(ea.value);Q(Ba,va,wa)});ea.focus();mxEvent.addListener(ea,"blur",function(){l.removeChild(ea)})}))}else"dynamicArr"==sa?ba.appendChild(S(Ba,Fa,wa.subType,wa.subDefVal,wa.countProperty,da,ja)):"staticArr"==sa?ba.appendChild(X(Ba,Fa,wa.subType,wa.subDefVal, -wa.size,da,ja)):"readOnly"==sa?(ja=document.createElement("input"),ja.setAttribute("readonly",""),ja.value=Fa,ja.style.width="96px",ja.style.borderWidth="0px",ba.appendChild(ja)):(ba.innerHTML=mxUtils.htmlEntities(decodeURIComponent(Fa)),mxEvent.addListener(ba,"click",mxUtils.bind(Z,function(){function ea(){var oa=ha.value;oa=0==oa.length&&"string"!=sa?0:oa;wa.allowAuto&&(null!=oa.trim&&"auto"==oa.trim().toLowerCase()?(oa="auto",sa="string"):(oa=parseFloat(oa),oa=isNaN(oa)?0:oa));null!=wa.min&&oa< -wa.min?oa=wa.min:null!=wa.max&&oa>wa.max&&(oa=wa.max);oa=encodeURIComponent(("int"==sa?parseInt(oa):oa)+"");Q(Ba,oa,wa)}var ha=document.createElement("input");O(ba,ha,!0);ha.value=decodeURIComponent(Fa);ha.className="gePropEditor";"int"!=sa&&"float"!=sa||wa.allowAuto||(ha.type="number",ha.step="int"==sa?"1":"any",null!=wa.min&&(ha.min=parseFloat(wa.min)),null!=wa.max&&(ha.max=parseFloat(wa.max)));l.appendChild(ha);mxEvent.addListener(ha,"keypress",function(oa){13==oa.keyCode&&ea()});ha.focus();mxEvent.addListener(ha, -"blur",function(){ea()})})));wa.isDeletable&&(ja=mxUtils.button("-",mxUtils.bind(Z,function(ea){Q(Ba,"",wa,wa.index);mxEvent.consume(ea)})),ja.style.height="16px",ja.style.width="25px",ja.style.float="right",ja.className="geColorBtn",ba.appendChild(ja));da.appendChild(ba);return da}var Z=this,ca=this.editorUi.editor.graph,fa=[];l.style.position="relative";l.style.padding="0";var la=document.createElement("table");la.className="geProperties";la.style.whiteSpace="nowrap";la.style.width="100%";var ia= -document.createElement("tr");ia.className="gePropHeader";var qa=document.createElement("th");qa.className="gePropHeaderCell";var ka=document.createElement("img");ka.src=Sidebar.prototype.expandedImage;ka.style.verticalAlign="middle";qa.appendChild(ka);mxUtils.write(qa,mxResources.get("property"));ia.style.cursor="pointer";var Da=function(){var Ba=la.querySelectorAll(".gePropNonHeaderRow");if(Z.editorUi.propertiesCollapsed){ka.src=Sidebar.prototype.collapsedImage;var Fa="none";for(var wa=l.childNodes.length- -1;0<=wa;wa--)try{var La=l.childNodes[wa],ja=La.nodeName.toUpperCase();"INPUT"!=ja&&"SELECT"!=ja||l.removeChild(La)}catch(xa){}}else ka.src=Sidebar.prototype.expandedImage,Fa="";for(wa=0;wa<Ba.length;wa++)Ba[wa].style.display=Fa};mxEvent.addListener(ia,"click",function(){Z.editorUi.propertiesCollapsed=!Z.editorUi.propertiesCollapsed;Da()});ia.appendChild(qa);qa=document.createElement("th");qa.className="gePropHeaderCell";qa.innerHTML=mxResources.get("value");ia.appendChild(qa);la.appendChild(ia);var Ea= -!1,za=!1;ia=null;1==L.vertices.length&&0==L.edges.length?ia=L.vertices[0].id:0==L.vertices.length&&1==L.edges.length&&(ia=L.edges[0].id);null!=ia&&la.appendChild(Y("id",mxUtils.htmlEntities(ia),{dispName:"ID",type:"readOnly"},!0,!1));for(var Oa in A)if(ia=A[Oa],"function"!=typeof ia.isVisible||ia.isVisible(L,this)){var Aa=null!=L.style[Oa]?mxUtils.htmlEntities(L.style[Oa]+""):null!=ia.getDefaultValue?ia.getDefaultValue(L,this):ia.defVal;if("separator"==ia.type)za=!za;else{if("staticArr"==ia.type)ia.size= -parseInt(L.style[ia.sizeProperty]||A[ia.sizeProperty].defVal)||0;else if(null!=ia.dependentProps){var Ga=ia.dependentProps,Ia=[],ra=[];for(qa=0;qa<Ga.length;qa++){var ua=L.style[Ga[qa]];ra.push(A[Ga[qa]].subDefVal);Ia.push(null!=ua?ua.split(","):[])}ia.dependentPropsDefVal=ra;ia.dependentPropsVals=Ia}la.appendChild(Y(Oa,Aa,ia,Ea,za));Ea=!Ea}}for(qa=0;qa<fa.length;qa++)for(ia=fa[qa],A=ia.parentRow,L=0;L<ia.values.length;L++)Oa=Y(ia.name,ia.values[L],{type:ia.type,parentRow:ia.parentRow,isDeletable:ia.isDeletable, -index:L,defVal:ia.defVal,countProperty:ia.countProperty,size:ia.size},0==L%2,ia.flipBkg),A.parentNode.insertBefore(Oa,A.nextSibling),A=Oa;l.appendChild(la);Da();return l};StyleFormatPanel.prototype.addStyles=function(l){function A(ia){mxEvent.addListener(ia,"mouseenter",function(){ia.style.opacity="1"});mxEvent.addListener(ia,"mouseleave",function(){ia.style.opacity="0.5"})}var L=this.editorUi,Q=L.editor.graph,O=document.createElement("div");O.style.whiteSpace="nowrap";O.style.paddingLeft="24px"; +{},M=l.vertices,Q=l.edges,O=0;O<M.length;O++)this.findCommonProperties(M[O],A,0==O);for(O=0;O<Q.length;O++)this.findCommonProperties(Q[O],A,0==M.length&&0==O);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(A).length&&this.container.appendChild(this.addProperties(this.createPanel(),A,l))}};var n=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(l){this.addActions(l,["copyStyle","pasteStyle"]);return n.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed= +!0;StyleFormatPanel.prototype.addProperties=function(l,A,M){function Q(na,Ea,wa,La){ba.getModel().beginUpdate();try{var ka=[],ua=[];if(null!=wa.index){for(var sa=[],va=wa.parentRow.nextSibling;va&&va.getAttribute("data-pName")==na;)sa.push(va.getAttribute("data-pValue")),va=va.nextSibling;wa.index<sa.length?null!=La?sa.splice(La,1):sa[wa.index]=Ea:sa.push(Ea);null!=wa.size&&sa.length>wa.size&&(sa=sa.slice(0,wa.size));Ea=sa.join(",");null!=wa.countProperty&&(ba.setCellStyles(wa.countProperty,sa.length, +ba.getSelectionCells()),ka.push(wa.countProperty),ua.push(sa.length))}ba.setCellStyles(na,Ea,ba.getSelectionCells());ka.push(na);ua.push(Ea);if(null!=wa.dependentProps)for(na=0;na<wa.dependentProps.length;na++){var ca=wa.dependentPropsDefVal[na],ea=wa.dependentPropsVals[na];if(ea.length>Ea)ea=ea.slice(0,Ea);else for(var da=ea.length;da<Ea;da++)ea.push(ca);ea=ea.join(",");ba.setCellStyles(wa.dependentProps[na],ea,ba.getSelectionCells());ka.push(wa.dependentProps[na]);ua.push(ea)}if("function"==typeof wa.onChange)wa.onChange(ba, +Ea);Z.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ka,"values",ua,"cells",ba.getSelectionCells()))}finally{ba.getModel().endUpdate()}}function O(na,Ea,wa){var La=mxUtils.getOffset(l,!0),ka=mxUtils.getOffset(na,!0);Ea.style.position="absolute";Ea.style.left=ka.x-La.x+"px";Ea.style.top=ka.y-La.y+"px";Ea.style.width=na.offsetWidth+"px";Ea.style.height=na.offsetHeight-(wa?4:0)+"px";Ea.style.zIndex=5}function R(na,Ea,wa){var La=document.createElement("div");La.style.width="32px";La.style.height= +"4px";La.style.margin="2px";La.style.border="1px solid black";La.style.background=Ea&&"none"!=Ea?Ea:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(Z,function(ka){this.editorUi.pickColor(Ea,function(ua){La.style.background="none"==ua?"url('"+Dialog.prototype.noColorImage+"')":ua;Q(na,ua,wa)});mxEvent.consume(ka)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(La);return btn}function S(na,Ea,wa,La,ka,ua,sa){null!=Ea&&(Ea=Ea.split(","), +ha.push({name:na,values:Ea,type:wa,defVal:La,countProperty:ka,parentRow:ua,isDeletable:!0,flipBkg:sa}));btn=mxUtils.button("+",mxUtils.bind(Z,function(va){for(var ca=ua,ea=0;null!=ca.nextSibling;)if(ca.nextSibling.getAttribute("data-pName")==na)ca=ca.nextSibling,ea++;else break;var da={type:wa,parentRow:ua,index:ea,isDeletable:!0,defVal:La,countProperty:ka};ea=Y(na,"",da,0==ea%2,sa);Q(na,La,da);ca.parentNode.insertBefore(ea,ca.nextSibling);mxEvent.consume(va)}));btn.style.height="16px";btn.style.width= +"25px";btn.className="geColorBtn";return btn}function X(na,Ea,wa,La,ka,ua,sa){if(0<ka){var va=Array(ka);Ea=null!=Ea?Ea.split(","):[];for(var ca=0;ca<ka;ca++)va[ca]=null!=Ea[ca]?Ea[ca]:null!=La?La:"";ha.push({name:na,values:va,type:wa,defVal:La,parentRow:ua,flipBkg:sa,size:ka})}return document.createElement("div")}function aa(na,Ea,wa){var La=document.createElement("input");La.type="checkbox";La.checked="1"==Ea;mxEvent.addListener(La,"change",function(){Q(na,La.checked?"1":"0",wa)});return La}function Y(na, +Ea,wa,La,ka){var ua=wa.dispName,sa=wa.type,va=document.createElement("tr");va.className="gePropRow"+(ka?"Dark":"")+(La?"Alt":"")+" gePropNonHeaderRow";va.setAttribute("data-pName",na);va.setAttribute("data-pValue",Ea);La=!1;null!=wa.index&&(va.setAttribute("data-index",wa.index),ua=(null!=ua?ua:"")+"["+wa.index+"]",La=!0);var ca=document.createElement("td");ca.className="gePropRowCell";ua=mxResources.get(ua,null,ua);mxUtils.write(ca,ua);ca.setAttribute("title",ua);La&&(ca.style.textAlign="right"); +va.appendChild(ca);ca=document.createElement("td");ca.className="gePropRowCell";if("color"==sa)ca.appendChild(R(na,Ea,wa));else if("bool"==sa||"boolean"==sa)ca.appendChild(aa(na,Ea,wa));else if("enum"==sa){var ea=wa.enumList;for(ka=0;ka<ea.length;ka++)if(ua=ea[ka],ua.val==Ea){mxUtils.write(ca,mxResources.get(ua.dispName,null,ua.dispName));break}mxEvent.addListener(ca,"click",mxUtils.bind(Z,function(){var da=document.createElement("select");O(ca,da);for(var fa=0;fa<ea.length;fa++){var ja=ea[fa],ra= +document.createElement("option");ra.value=mxUtils.htmlEntities(ja.val);mxUtils.write(ra,mxResources.get(ja.dispName,null,ja.dispName));da.appendChild(ra)}da.value=Ea;l.appendChild(da);mxEvent.addListener(da,"change",function(){var oa=mxUtils.htmlEntities(da.value);Q(na,oa,wa)});da.focus();mxEvent.addListener(da,"blur",function(){l.removeChild(da)})}))}else"dynamicArr"==sa?ca.appendChild(S(na,Ea,wa.subType,wa.subDefVal,wa.countProperty,va,ka)):"staticArr"==sa?ca.appendChild(X(na,Ea,wa.subType,wa.subDefVal, +wa.size,va,ka)):"readOnly"==sa?(ka=document.createElement("input"),ka.setAttribute("readonly",""),ka.value=Ea,ka.style.width="96px",ka.style.borderWidth="0px",ca.appendChild(ka)):(ca.innerHTML=mxUtils.htmlEntities(decodeURIComponent(Ea)),mxEvent.addListener(ca,"click",mxUtils.bind(Z,function(){function da(){var ja=fa.value;ja=0==ja.length&&"string"!=sa?0:ja;wa.allowAuto&&(null!=ja.trim&&"auto"==ja.trim().toLowerCase()?(ja="auto",sa="string"):(ja=parseFloat(ja),ja=isNaN(ja)?0:ja));null!=wa.min&&ja< +wa.min?ja=wa.min:null!=wa.max&&ja>wa.max&&(ja=wa.max);ja=encodeURIComponent(("int"==sa?parseInt(ja):ja)+"");Q(na,ja,wa)}var fa=document.createElement("input");O(ca,fa,!0);fa.value=decodeURIComponent(Ea);fa.className="gePropEditor";"int"!=sa&&"float"!=sa||wa.allowAuto||(fa.type="number",fa.step="int"==sa?"1":"any",null!=wa.min&&(fa.min=parseFloat(wa.min)),null!=wa.max&&(fa.max=parseFloat(wa.max)));l.appendChild(fa);mxEvent.addListener(fa,"keypress",function(ja){13==ja.keyCode&&da()});fa.focus();mxEvent.addListener(fa, +"blur",function(){da()})})));wa.isDeletable&&(ka=mxUtils.button("-",mxUtils.bind(Z,function(da){Q(na,"",wa,wa.index);mxEvent.consume(da)})),ka.style.height="16px",ka.style.width="25px",ka.style.float="right",ka.className="geColorBtn",ca.appendChild(ka));va.appendChild(ca);return va}var Z=this,ba=this.editorUi.editor.graph,ha=[];l.style.position="relative";l.style.padding="0";var ma=document.createElement("table");ma.className="geProperties";ma.style.whiteSpace="nowrap";ma.style.width="100%";var ia= +document.createElement("tr");ia.className="gePropHeader";var qa=document.createElement("th");qa.className="gePropHeaderCell";var la=document.createElement("img");la.src=Sidebar.prototype.expandedImage;la.style.verticalAlign="middle";qa.appendChild(la);mxUtils.write(qa,mxResources.get("property"));ia.style.cursor="pointer";var Ca=function(){var na=ma.querySelectorAll(".gePropNonHeaderRow");if(Z.editorUi.propertiesCollapsed){la.src=Sidebar.prototype.collapsedImage;var Ea="none";for(var wa=l.childNodes.length- +1;0<=wa;wa--)try{var La=l.childNodes[wa],ka=La.nodeName.toUpperCase();"INPUT"!=ka&&"SELECT"!=ka||l.removeChild(La)}catch(ua){}}else la.src=Sidebar.prototype.expandedImage,Ea="";for(wa=0;wa<na.length;wa++)na[wa].style.display=Ea};mxEvent.addListener(ia,"click",function(){Z.editorUi.propertiesCollapsed=!Z.editorUi.propertiesCollapsed;Ca()});ia.appendChild(qa);qa=document.createElement("th");qa.className="gePropHeaderCell";qa.innerHTML=mxResources.get("value");ia.appendChild(qa);ma.appendChild(ia);var Da= +!1,ya=!1;ia=null;1==M.vertices.length&&0==M.edges.length?ia=M.vertices[0].id:0==M.vertices.length&&1==M.edges.length&&(ia=M.edges[0].id);null!=ia&&ma.appendChild(Y("id",mxUtils.htmlEntities(ia),{dispName:"ID",type:"readOnly"},!0,!1));for(var Pa in A)if(ia=A[Pa],"function"!=typeof ia.isVisible||ia.isVisible(M,this)){var za=null!=M.style[Pa]?mxUtils.htmlEntities(M.style[Pa]+""):null!=ia.getDefaultValue?ia.getDefaultValue(M,this):ia.defVal;if("separator"==ia.type)ya=!ya;else{if("staticArr"==ia.type)ia.size= +parseInt(M.style[ia.sizeProperty]||A[ia.sizeProperty].defVal)||0;else if(null!=ia.dependentProps){var Fa=ia.dependentProps,Ia=[],Ba=[];for(qa=0;qa<Fa.length;qa++){var Ga=M.style[Fa[qa]];Ba.push(A[Fa[qa]].subDefVal);Ia.push(null!=Ga?Ga.split(","):[])}ia.dependentPropsDefVal=Ba;ia.dependentPropsVals=Ia}ma.appendChild(Y(Pa,za,ia,Da,ya));Da=!Da}}for(qa=0;qa<ha.length;qa++)for(ia=ha[qa],A=ia.parentRow,M=0;M<ia.values.length;M++)Pa=Y(ia.name,ia.values[M],{type:ia.type,parentRow:ia.parentRow,isDeletable:ia.isDeletable, +index:M,defVal:ia.defVal,countProperty:ia.countProperty,size:ia.size},0==M%2,ia.flipBkg),A.parentNode.insertBefore(Pa,A.nextSibling),A=Pa;l.appendChild(ma);Ca();return l};StyleFormatPanel.prototype.addStyles=function(l){function A(ia){mxEvent.addListener(ia,"mouseenter",function(){ia.style.opacity="1"});mxEvent.addListener(ia,"mouseleave",function(){ia.style.opacity="0.5"})}var M=this.editorUi,Q=M.editor.graph,O=document.createElement("div");O.style.whiteSpace="nowrap";O.style.paddingLeft="24px"; O.style.paddingRight="20px";l.style.paddingLeft="16px";l.style.paddingBottom="6px";l.style.position="relative";l.appendChild(O);var R="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),S=document.createElement("div");S.style.whiteSpace="nowrap";S.style.position="relative";S.style.textAlign="center";S.style.width="210px";for(var X=[],aa=0;aa<this.defaultColorSchemes.length;aa++){var Y= document.createElement("div");Y.style.display="inline-block";Y.style.width="6px";Y.style.height="6px";Y.style.marginLeft="4px";Y.style.marginRight="3px";Y.style.borderRadius="3px";Y.style.cursor="pointer";Y.style.background="transparent";Y.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ia){mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){Z(ia)}))})(aa);X.push(Y);S.appendChild(Y)}var Z=mxUtils.bind(this,function(ia){null!=X[ia]&&(null!=this.format.currentScheme&&null!=X[this.format.currentScheme]&& -(X[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ia,ca(this.defaultColorSchemes[this.format.currentScheme]),X[this.format.currentScheme].style.background="#84d7ff")}),ca=mxUtils.bind(this,function(ia){var qa=mxUtils.bind(this,function(Da){var Ea=mxUtils.button("",mxUtils.bind(this,function(Aa){Q.getModel().beginUpdate();try{for(var Ga=L.getSelectionState().cells,Ia=0;Ia<Ga.length;Ia++){for(var ra=Q.getModel().getStyle(Ga[Ia]),ua=0;ua<R.length;ua++)ra=mxUtils.removeStylename(ra, -R[ua]);var Ba=Q.getModel().isVertex(Ga[Ia])?Q.defaultVertexStyle:Q.defaultEdgeStyle;null!=Da?(mxEvent.isShiftDown(Aa)||(ra=""==Da.fill?mxUtils.setStyle(ra,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(ra,mxConstants.STYLE_FILLCOLOR,Da.fill||mxUtils.getValue(Ba,mxConstants.STYLE_FILLCOLOR,null)),ra=mxUtils.setStyle(ra,mxConstants.STYLE_GRADIENTCOLOR,Da.gradient||mxUtils.getValue(Ba,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(Aa)||mxClient.IS_MAC&&mxEvent.isMetaDown(Aa)||!Q.getModel().isVertex(Ga[Ia])|| -(ra=mxUtils.setStyle(ra,mxConstants.STYLE_FONTCOLOR,Da.font||mxUtils.getValue(Ba,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(Aa)||(ra=""==Da.stroke?mxUtils.setStyle(ra,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(ra,mxConstants.STYLE_STROKECOLOR,Da.stroke||mxUtils.getValue(Ba,mxConstants.STYLE_STROKECOLOR,null)))):(ra=mxUtils.setStyle(ra,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(Ba,mxConstants.STYLE_FILLCOLOR,"#ffffff")),ra=mxUtils.setStyle(ra,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(Ba, -mxConstants.STYLE_STROKECOLOR,"#000000")),ra=mxUtils.setStyle(ra,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(Ba,mxConstants.STYLE_GRADIENTCOLOR,null)),Q.getModel().isVertex(Ga[Ia])&&(ra=mxUtils.setStyle(ra,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(Ba,mxConstants.STYLE_FONTCOLOR,null))));Q.getModel().setStyle(Ga[Ia],ra)}}finally{Q.getModel().endUpdate()}}));Ea.className="geStyleButton";Ea.style.width="36px";Ea.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ea.style.margin="0px 6px 6px 0px"; -if(null!=Da){var za="1"==urlParams.sketch?"2px solid":"1px solid";null!=Da.border&&(za=Da.border);null!=Da.gradient?mxClient.IS_IE&&10>document.documentMode?Ea.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Da.fill+"', EndColorStr='"+Da.gradient+"', GradientType=0)":Ea.style.backgroundImage="linear-gradient("+Da.fill+" 0px,"+Da.gradient+" 100%)":Da.fill==mxConstants.NONE?Ea.style.background="url('"+Dialog.prototype.noColorImage+"')":Ea.style.backgroundColor=""==Da.fill? -mxUtils.getValue(Q.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Da.fill||mxUtils.getValue(Q.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Ea.style.border=Da.stroke==mxConstants.NONE?za+" transparent":""==Da.stroke?za+" "+mxUtils.getValue(Q.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):za+" "+(Da.stroke||mxUtils.getValue(Q.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR, -Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Da.title&&Ea.setAttribute("title",Da.title)}else{za=mxUtils.getValue(Q.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Oa=mxUtils.getValue(Q.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Ea.style.backgroundColor=za;Ea.style.border="1px solid "+Oa}Ea.style.borderRadius="0";O.appendChild(Ea)});O.innerText="";for(var ka=0;ka<ia.length;ka++)0<ka&&0==mxUtils.mod(ka,4)&&mxUtils.br(O),qa(ia[ka])});null==this.format.currentScheme? -Z(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):Z(this.format.currentScheme);aa=10>=this.defaultColorSchemes.length?28:8;var fa=document.createElement("div");fa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+aa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);"; -mxEvent.addListener(fa,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var la=document.createElement("div");la.style.cssText="position:absolute;left:202px;top:8px;bottom:"+aa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);"; -1<this.defaultColorSchemes.length&&(l.appendChild(fa),l.appendChild(la));mxEvent.addListener(la,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));A(fa);A(la);ca(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&l.appendChild(S);return l};StyleFormatPanel.prototype.addEditOps=function(l){var A=this.editorUi.getSelectionState(),L=this.editorUi.editor.graph,Q=null;1==A.cells.length&&(Q=mxUtils.button(mxResources.get("editStyle"), -mxUtils.bind(this,function(O){this.editorUi.actions.get("editStyle").funct()})),Q.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),Q.style.width="210px",Q.style.marginBottom="2px",l.appendChild(Q));L=1==A.cells.length?L.view.getState(A.cells[0]):null;null!=L&&null!=L.shape&&null!=L.shape.stencil?(A=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(O){this.editorUi.actions.get("editShape").funct()})),A.setAttribute("title", +(X[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ia,ba(this.defaultColorSchemes[this.format.currentScheme]),X[this.format.currentScheme].style.background="#84d7ff")}),ba=mxUtils.bind(this,function(ia){var qa=mxUtils.bind(this,function(Ca){var Da=mxUtils.button("",mxUtils.bind(this,function(za){Q.getModel().beginUpdate();try{for(var Fa=M.getSelectionState().cells,Ia=0;Ia<Fa.length;Ia++){for(var Ba=Q.getModel().getStyle(Fa[Ia]),Ga=0;Ga<R.length;Ga++)Ba=mxUtils.removeStylename(Ba, +R[Ga]);var na=Q.getModel().isVertex(Fa[Ia])?Q.defaultVertexStyle:Q.defaultEdgeStyle;null!=Ca?(mxEvent.isShiftDown(za)||(Ba=""==Ca.fill?mxUtils.setStyle(Ba,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(Ba,mxConstants.STYLE_FILLCOLOR,Ca.fill||mxUtils.getValue(na,mxConstants.STYLE_FILLCOLOR,null)),Ba=mxUtils.setStyle(Ba,mxConstants.STYLE_GRADIENTCOLOR,Ca.gradient||mxUtils.getValue(na,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(za)||mxClient.IS_MAC&&mxEvent.isMetaDown(za)||!Q.getModel().isVertex(Fa[Ia])|| +(Ba=mxUtils.setStyle(Ba,mxConstants.STYLE_FONTCOLOR,Ca.font||mxUtils.getValue(na,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(za)||(Ba=""==Ca.stroke?mxUtils.setStyle(Ba,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(Ba,mxConstants.STYLE_STROKECOLOR,Ca.stroke||mxUtils.getValue(na,mxConstants.STYLE_STROKECOLOR,null)))):(Ba=mxUtils.setStyle(Ba,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(na,mxConstants.STYLE_FILLCOLOR,"#ffffff")),Ba=mxUtils.setStyle(Ba,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(na, +mxConstants.STYLE_STROKECOLOR,"#000000")),Ba=mxUtils.setStyle(Ba,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(na,mxConstants.STYLE_GRADIENTCOLOR,null)),Q.getModel().isVertex(Fa[Ia])&&(Ba=mxUtils.setStyle(Ba,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(na,mxConstants.STYLE_FONTCOLOR,null))));Q.getModel().setStyle(Fa[Ia],Ba)}}finally{Q.getModel().endUpdate()}}));Da.className="geStyleButton";Da.style.width="36px";Da.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Da.style.margin="0px 6px 6px 0px"; +if(null!=Ca){var ya="1"==urlParams.sketch?"2px solid":"1px solid";null!=Ca.border&&(ya=Ca.border);null!=Ca.gradient?mxClient.IS_IE&&10>document.documentMode?Da.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Ca.fill+"', EndColorStr='"+Ca.gradient+"', GradientType=0)":Da.style.backgroundImage="linear-gradient("+Ca.fill+" 0px,"+Ca.gradient+" 100%)":Ca.fill==mxConstants.NONE?Da.style.background="url('"+Dialog.prototype.noColorImage+"')":Da.style.backgroundColor=""==Ca.fill? +mxUtils.getValue(Q.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Ca.fill||mxUtils.getValue(Q.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Da.style.border=Ca.stroke==mxConstants.NONE?ya+" transparent":""==Ca.stroke?ya+" "+mxUtils.getValue(Q.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):ya+" "+(Ca.stroke||mxUtils.getValue(Q.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR, +Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Ca.title&&Da.setAttribute("title",Ca.title)}else{ya=mxUtils.getValue(Q.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Pa=mxUtils.getValue(Q.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Da.style.backgroundColor=ya;Da.style.border="1px solid "+Pa}Da.style.borderRadius="0";O.appendChild(Da)});O.innerText="";for(var la=0;la<ia.length;la++)0<la&&0==mxUtils.mod(la,4)&&mxUtils.br(O),qa(ia[la])});null==this.format.currentScheme? +Z(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):Z(this.format.currentScheme);aa=10>=this.defaultColorSchemes.length?28:8;var ha=document.createElement("div");ha.style.cssText="position:absolute;left:10px;top:8px;bottom:"+aa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);"; +mxEvent.addListener(ha,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var ma=document.createElement("div");ma.style.cssText="position:absolute;left:202px;top:8px;bottom:"+aa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);"; +1<this.defaultColorSchemes.length&&(l.appendChild(ha),l.appendChild(ma));mxEvent.addListener(ma,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));A(ha);A(ma);ba(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&l.appendChild(S);return l};StyleFormatPanel.prototype.addEditOps=function(l){var A=this.editorUi.getSelectionState(),M=this.editorUi.editor.graph,Q=null;1==A.cells.length&&(Q=mxUtils.button(mxResources.get("editStyle"), +mxUtils.bind(this,function(O){this.editorUi.actions.get("editStyle").funct()})),Q.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),Q.style.width="210px",Q.style.marginBottom="2px",l.appendChild(Q));M=1==A.cells.length?M.view.getState(A.cells[0]):null;null!=M&&null!=M.shape&&null!=M.shape.stencil?(A=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(O){this.editorUi.actions.get("editShape").funct()})),A.setAttribute("title", mxResources.get("editShape")),A.style.marginBottom="2px",null==Q?A.style.width="210px":(Q.style.width="104px",A.style.width="104px",A.style.marginLeft="2px"),l.appendChild(A)):A.image&&0<A.cells.length&&(A=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(O){this.editorUi.actions.get("image").funct()})),A.setAttribute("title",mxResources.get("editImage")),A.style.marginBottom="2px",null==Q?A.style.width="210px":(Q.style.width="104px",A.style.width="104px",A.style.marginLeft="2px"), l.appendChild(A));return l}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(l){return l.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(l){return Graph.isGoogleFontUrl(l)};Graph.createFontElement=function(l, -A){var L=Graph.fontMapping[A];null==L&&Graph.isCssFontUrl(A)?(l=document.createElement("link"),l.setAttribute("rel","stylesheet"),l.setAttribute("type","text/css"),l.setAttribute("charset","UTF-8"),l.setAttribute("href",A)):(null==L&&(L='@font-face {\nfont-family: "'+l+'";\nsrc: url("'+A+'");\n}'),l=document.createElement("style"),mxUtils.write(l,L));return l};Graph.addFont=function(l,A,L){if(null!=l&&0<l.length&&null!=A&&0<A.length){var Q=l.toLowerCase();if("helvetica"!=Q&&"arial"!=l&&"sans-serif"!= -Q){var O=Graph.customFontElements[Q];null!=O&&O.url!=A&&(O.elt.parentNode.removeChild(O.elt),O=null);null==O?(O=A,"http:"==A.substring(0,5)&&(O=PROXY_URL+"?url="+encodeURIComponent(A)),O={name:l,url:A,elt:Graph.createFontElement(l,O)},Graph.customFontElements[Q]=O,Graph.recentCustomFonts[Q]=O,A=document.getElementsByTagName("head")[0],null!=L&&("link"==O.elt.nodeName.toLowerCase()?(O.elt.onload=L,O.elt.onerror=L):L()),null!=A&&A.appendChild(O.elt)):null!=L&&L()}else null!=L&&L()}else null!=L&&L(); -return l};Graph.getFontUrl=function(l,A){l=Graph.customFontElements[l.toLowerCase()];null!=l&&(A=l.url);return A};Graph.processFontAttributes=function(l){l=l.getElementsByTagName("*");for(var A=0;A<l.length;A++){var L=l[A].getAttribute("data-font-src");if(null!=L){var Q="FONT"==l[A].nodeName?l[A].getAttribute("face"):l[A].style.fontFamily;null!=Q&&Graph.addFont(Q,L)}}};Graph.processFontStyle=function(l){if(null!=l){var A=mxUtils.getValue(l,"fontSource",null);if(null!=A){var L=mxUtils.getValue(l,mxConstants.STYLE_FONTFAMILY, -null);null!=L&&Graph.addFont(L,decodeURIComponent(A))}}return l};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!= -urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var z=Graph.prototype.init;Graph.prototype.init=function(){function l(O){A=O}z.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var A=null;mxEvent.addListener(this.container,"mouseenter",l);mxEvent.addListener(this.container,"mousemove",l);mxEvent.addListener(this.container,"mouseleave",function(O){A=null});this.isMouseInsertPoint=function(){return null!=A};var L=this.getInsertPoint; -this.getInsertPoint=function(){return null!=A?this.getPointForEvent(A):L.apply(this,arguments)};var Q=this.layoutManager.getLayout;this.layoutManager.getLayout=function(O){var R=this.graph.getCellStyle(O);if(null!=R&&"rack"==R.childLayout){var S=new mxStackLayout(this.graph,!1);S.gridSize=null!=R.rackUnitSize?parseFloat(R.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;S.marginLeft=R.marginLeft||0;S.marginRight=R.marginRight||0;S.marginTop=R.marginTop||0;S.marginBottom= -R.marginBottom||0;S.allowGaps=R.allowGaps||0;S.horizontal="1"==mxUtils.getValue(R,"horizontalRack","0");S.resizeParent=!1;S.fill=!0;return S}return Q.apply(this,arguments)};this.updateGlobalUrlVariables()};var C=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(l,A){return Graph.processFontStyle(C.apply(this,arguments))};var v=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(l,A,L,Q,O,R,S,X,aa,Y,Z){v.apply(this,arguments);Graph.processFontAttributes(Z)}; -var y=mxText.prototype.redraw;mxText.prototype.redraw=function(){y.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(l,A,L){function Q(){for(var ia=S.getSelectionCells(),qa=[],ka=0;ka<ia.length;ka++)S.isCellVisible(ia[ka])&&qa.push(ia[ka]);S.setSelectionCells(qa)}function O(ia){S.setHiddenTags(ia?[]:X.slice());Q();S.refresh()}function R(ia,qa){Y.innerText="";if(0<ia.length){var ka=document.createElement("table"); -ka.setAttribute("cellpadding","2");ka.style.boxSizing="border-box";ka.style.tableLayout="fixed";ka.style.width="100%";var Da=document.createElement("tbody");if(null!=ia&&0<ia.length)for(var Ea=0;Ea<ia.length;Ea++)(function(za){var Oa=0>mxUtils.indexOf(S.hiddenTags,za),Aa=document.createElement("tr"),Ga=document.createElement("td");Ga.style.align="center";Ga.style.width="16px";var Ia=document.createElement("img");Ia.setAttribute("src",Oa?Editor.visibleImage:Editor.hiddenImage);Ia.setAttribute("title", -mxResources.get(Oa?"hideIt":"show",[za]));mxUtils.setOpacity(Ia,Oa?75:25);Ia.style.verticalAlign="middle";Ia.style.cursor="pointer";Ia.style.width="16px";if(A||Editor.isDarkMode())Ia.style.filter="invert(100%)";Ga.appendChild(Ia);mxEvent.addListener(Ia,"click",function(ua){mxEvent.isShiftDown(ua)?O(0<=mxUtils.indexOf(S.hiddenTags,za)):(S.toggleHiddenTag(za),Q(),S.refresh());mxEvent.consume(ua)});Aa.appendChild(Ga);Ga=document.createElement("td");Ga.style.overflow="hidden";Ga.style.whiteSpace="nowrap"; -Ga.style.textOverflow="ellipsis";Ga.style.verticalAlign="middle";Ga.style.cursor="pointer";Ga.setAttribute("title",za);a=document.createElement("a");mxUtils.write(a,za);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Oa?100:40);Ga.appendChild(a);mxEvent.addListener(Ga,"click",function(ua){if(mxEvent.isShiftDown(ua)){O(!0);var Ba=S.getCellsForTags([za],null,null,!0);S.isEnabled()?S.setSelectionCells(Ba):S.highlightCells(Ba)}else if(Oa&&0<S.hiddenTags.length)O(!0);else{Ba= -X.slice();var Fa=mxUtils.indexOf(Ba,za);Ba.splice(Fa,1);S.setHiddenTags(Ba);Q();S.refresh()}mxEvent.consume(ua)});Aa.appendChild(Ga);if(S.isEnabled()){Ga=document.createElement("td");Ga.style.verticalAlign="middle";Ga.style.textAlign="center";Ga.style.width="18px";if(null==qa){Ga.style.align="center";Ga.style.width="16px";Ia=document.createElement("img");Ia.setAttribute("src",Editor.crossImage);Ia.setAttribute("title",mxResources.get("removeIt",[za]));mxUtils.setOpacity(Ia,Oa?75:25);Ia.style.verticalAlign= -"middle";Ia.style.cursor="pointer";Ia.style.width="16px";if(A||Editor.isDarkMode())Ia.style.filter="invert(100%)";mxEvent.addListener(Ia,"click",function(ua){var Ba=mxUtils.indexOf(X,za);0<=Ba&&X.splice(Ba,1);S.removeTagsForCells(S.model.getDescendants(S.model.getRoot()),[za]);S.refresh();mxEvent.consume(ua)});Ga.appendChild(Ia)}else{var ra=document.createElement("input");ra.setAttribute("type","checkbox");ra.style.margin="0px";ra.defaultChecked=null!=qa&&0<=mxUtils.indexOf(qa,za);ra.checked=ra.defaultChecked; -ra.style.background="transparent";ra.setAttribute("title",mxResources.get(ra.defaultChecked?"removeIt":"add",[za]));mxEvent.addListener(ra,"change",function(ua){ra.checked?S.addTagsForCells(S.getSelectionCells(),[za]):S.removeTagsForCells(S.getSelectionCells(),[za]);mxEvent.consume(ua)});Ga.appendChild(ra)}Aa.appendChild(Ga)}Da.appendChild(Aa)})(ia[Ea]);ka.appendChild(Da);Y.appendChild(ka)}}var S=this,X=S.hiddenTags.slice(),aa=document.createElement("div");aa.style.userSelect="none";aa.style.overflow= +A){var M=Graph.fontMapping[A];null==M&&Graph.isCssFontUrl(A)?(l=document.createElement("link"),l.setAttribute("rel","stylesheet"),l.setAttribute("type","text/css"),l.setAttribute("charset","UTF-8"),l.setAttribute("href",A)):(null==M&&(M='@font-face {\nfont-family: "'+l+'";\nsrc: url("'+A+'");\n}'),l=document.createElement("style"),mxUtils.write(l,M));return l};Graph.addFont=function(l,A,M){if(null!=l&&0<l.length&&null!=A&&0<A.length){var Q=l.toLowerCase();if("helvetica"!=Q&&"arial"!=l&&"sans-serif"!= +Q){var O=Graph.customFontElements[Q];null!=O&&O.url!=A&&(O.elt.parentNode.removeChild(O.elt),O=null);null==O?(O=A,"http:"==A.substring(0,5)&&(O=PROXY_URL+"?url="+encodeURIComponent(A)),O={name:l,url:A,elt:Graph.createFontElement(l,O)},Graph.customFontElements[Q]=O,Graph.recentCustomFonts[Q]=O,A=document.getElementsByTagName("head")[0],null!=M&&("link"==O.elt.nodeName.toLowerCase()?(O.elt.onload=M,O.elt.onerror=M):M()),null!=A&&A.appendChild(O.elt)):null!=M&&M()}else null!=M&&M()}else null!=M&&M(); +return l};Graph.getFontUrl=function(l,A){l=Graph.customFontElements[l.toLowerCase()];null!=l&&(A=l.url);return A};Graph.processFontAttributes=function(l){l=l.getElementsByTagName("*");for(var A=0;A<l.length;A++){var M=l[A].getAttribute("data-font-src");if(null!=M){var Q="FONT"==l[A].nodeName?l[A].getAttribute("face"):l[A].style.fontFamily;null!=Q&&Graph.addFont(Q,M)}}};Graph.processFontStyle=function(l){if(null!=l){var A=mxUtils.getValue(l,"fontSource",null);if(null!=A){var M=mxUtils.getValue(l,mxConstants.STYLE_FONTFAMILY, +null);null!=M&&Graph.addFont(M,decodeURIComponent(A))}}return l};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!= +urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var z=Graph.prototype.init;Graph.prototype.init=function(){function l(O){A=O}z.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var A=null;mxEvent.addListener(this.container,"mouseenter",l);mxEvent.addListener(this.container,"mousemove",l);mxEvent.addListener(this.container,"mouseleave",function(O){A=null});this.isMouseInsertPoint=function(){return null!=A};var M=this.getInsertPoint; +this.getInsertPoint=function(){return null!=A?this.getPointForEvent(A):M.apply(this,arguments)};var Q=this.layoutManager.getLayout;this.layoutManager.getLayout=function(O){var R=this.graph.getCellStyle(O);if(null!=R&&"rack"==R.childLayout){var S=new mxStackLayout(this.graph,!1);S.gridSize=null!=R.rackUnitSize?parseFloat(R.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;S.marginLeft=R.marginLeft||0;S.marginRight=R.marginRight||0;S.marginTop=R.marginTop||0;S.marginBottom= +R.marginBottom||0;S.allowGaps=R.allowGaps||0;S.horizontal="1"==mxUtils.getValue(R,"horizontalRack","0");S.resizeParent=!1;S.fill=!0;return S}return Q.apply(this,arguments)};this.updateGlobalUrlVariables()};var C=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(l,A){return Graph.processFontStyle(C.apply(this,arguments))};var x=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(l,A,M,Q,O,R,S,X,aa,Y,Z){x.apply(this,arguments);Graph.processFontAttributes(Z)}; +var y=mxText.prototype.redraw;mxText.prototype.redraw=function(){y.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(l,A,M){function Q(){for(var ia=S.getSelectionCells(),qa=[],la=0;la<ia.length;la++)S.isCellVisible(ia[la])&&qa.push(ia[la]);S.setSelectionCells(qa)}function O(ia){S.setHiddenTags(ia?[]:X.slice());Q();S.refresh()}function R(ia,qa){Y.innerText="";if(0<ia.length){var la=document.createElement("table"); +la.setAttribute("cellpadding","2");la.style.boxSizing="border-box";la.style.tableLayout="fixed";la.style.width="100%";var Ca=document.createElement("tbody");if(null!=ia&&0<ia.length)for(var Da=0;Da<ia.length;Da++)(function(ya){var Pa=0>mxUtils.indexOf(S.hiddenTags,ya),za=document.createElement("tr"),Fa=document.createElement("td");Fa.style.align="center";Fa.style.width="16px";var Ia=document.createElement("img");Ia.setAttribute("src",Pa?Editor.visibleImage:Editor.hiddenImage);Ia.setAttribute("title", +mxResources.get(Pa?"hideIt":"show",[ya]));mxUtils.setOpacity(Ia,Pa?75:25);Ia.style.verticalAlign="middle";Ia.style.cursor="pointer";Ia.style.width="16px";if(A||Editor.isDarkMode())Ia.style.filter="invert(100%)";Fa.appendChild(Ia);mxEvent.addListener(Ia,"click",function(Ga){mxEvent.isShiftDown(Ga)?O(0<=mxUtils.indexOf(S.hiddenTags,ya)):(S.toggleHiddenTag(ya),Q(),S.refresh());mxEvent.consume(Ga)});za.appendChild(Fa);Fa=document.createElement("td");Fa.style.overflow="hidden";Fa.style.whiteSpace="nowrap"; +Fa.style.textOverflow="ellipsis";Fa.style.verticalAlign="middle";Fa.style.cursor="pointer";Fa.setAttribute("title",ya);a=document.createElement("a");mxUtils.write(a,ya);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Pa?100:40);Fa.appendChild(a);mxEvent.addListener(Fa,"click",function(Ga){if(mxEvent.isShiftDown(Ga)){O(!0);var na=S.getCellsForTags([ya],null,null,!0);S.isEnabled()?S.setSelectionCells(na):S.highlightCells(na)}else if(Pa&&0<S.hiddenTags.length)O(!0);else{na= +X.slice();var Ea=mxUtils.indexOf(na,ya);na.splice(Ea,1);S.setHiddenTags(na);Q();S.refresh()}mxEvent.consume(Ga)});za.appendChild(Fa);if(S.isEnabled()){Fa=document.createElement("td");Fa.style.verticalAlign="middle";Fa.style.textAlign="center";Fa.style.width="18px";if(null==qa){Fa.style.align="center";Fa.style.width="16px";Ia=document.createElement("img");Ia.setAttribute("src",Editor.crossImage);Ia.setAttribute("title",mxResources.get("removeIt",[ya]));mxUtils.setOpacity(Ia,Pa?75:25);Ia.style.verticalAlign= +"middle";Ia.style.cursor="pointer";Ia.style.width="16px";if(A||Editor.isDarkMode())Ia.style.filter="invert(100%)";mxEvent.addListener(Ia,"click",function(Ga){var na=mxUtils.indexOf(X,ya);0<=na&&X.splice(na,1);S.removeTagsForCells(S.model.getDescendants(S.model.getRoot()),[ya]);S.refresh();mxEvent.consume(Ga)});Fa.appendChild(Ia)}else{var Ba=document.createElement("input");Ba.setAttribute("type","checkbox");Ba.style.margin="0px";Ba.defaultChecked=null!=qa&&0<=mxUtils.indexOf(qa,ya);Ba.checked=Ba.defaultChecked; +Ba.style.background="transparent";Ba.setAttribute("title",mxResources.get(Ba.defaultChecked?"removeIt":"add",[ya]));mxEvent.addListener(Ba,"change",function(Ga){Ba.checked?S.addTagsForCells(S.getSelectionCells(),[ya]):S.removeTagsForCells(S.getSelectionCells(),[ya]);mxEvent.consume(Ga)});Fa.appendChild(Ba)}za.appendChild(Fa)}Ca.appendChild(za)})(ia[Da]);la.appendChild(Ca);Y.appendChild(la)}}var S=this,X=S.hiddenTags.slice(),aa=document.createElement("div");aa.style.userSelect="none";aa.style.overflow= "hidden";aa.style.padding="10px";aa.style.height="100%";var Y=document.createElement("div");Y.style.boxSizing="border-box";Y.style.borderRadius="4px";Y.style.userSelect="none";Y.style.overflow="auto";Y.style.position="absolute";Y.style.left="10px";Y.style.right="10px";Y.style.top="10px";Y.style.border=S.isEnabled()?"1px solid #808080":"none";Y.style.bottom=S.isEnabled()?"48px":"10px";aa.appendChild(Y);var Z=mxUtils.button(mxResources.get("reset"),function(ia){S.setHiddenTags([]);mxEvent.isShiftDown(ia)|| -(X=S.hiddenTags.slice());Q();S.refresh()});Z.setAttribute("title",mxResources.get("reset"));Z.className="geBtn";Z.style.margin="0 4px 0 0";var ca=mxUtils.button(mxResources.get("add"),function(){null!=L&&L(X,function(ia){X=ia;fa()})});ca.setAttribute("title",mxResources.get("add"));ca.className="geBtn";ca.style.margin="0";S.addListener(mxEvent.ROOT,function(){X=S.hiddenTags.slice()});var fa=mxUtils.bind(this,function(ia,qa){if(l()){ia=S.getAllTags();for(qa=0;qa<ia.length;qa++)0>mxUtils.indexOf(X, -ia[qa])&&X.push(ia[qa]);X.sort();S.isSelectionEmpty()?R(X):R(X,S.getCommonTagsForCells(S.getSelectionCells()))}});S.selectionModel.addListener(mxEvent.CHANGE,fa);S.model.addListener(mxEvent.CHANGE,fa);S.addListener(mxEvent.REFRESH,fa);var la=document.createElement("div");la.style.boxSizing="border-box";la.style.whiteSpace="nowrap";la.style.position="absolute";la.style.overflow="hidden";la.style.bottom="0px";la.style.height="42px";la.style.right="10px";la.style.left="10px";S.isEnabled()&&(la.appendChild(Z), -la.appendChild(ca),aa.appendChild(la));return{div:aa,refresh:fa}};Graph.prototype.getCustomFonts=function(){var l=this.extFonts;l=null!=l?l.slice():[];for(var A in Graph.customFontElements){var L=Graph.customFontElements[A];l.push({name:L.name,url:L.url})}return l};Graph.prototype.setFont=function(l,A){Graph.addFont(l,A);document.execCommand("fontname",!1,l);if(null!=A){var L=this.cellEditor.textarea.getElementsByTagName("font");A=Graph.getFontUrl(l,A);for(var Q=0;Q<L.length;Q++)L[Q].getAttribute("face")== -l&&L[Q].getAttribute("data-font-src")!=A&&L[Q].setAttribute("data-font-src",A)}};var I=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return I.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var l=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=l)for(var A in l)this.globalVars[A]= -l[A]}catch(L){null!=window.console&&console.log("Error in vars URL parameter: "+L)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var N=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(l){var A=N.apply(this,arguments);null==A&&null!=this.globalVars&&(A=this.globalVars[l]);return A};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var l=this.themes["default-style2"];this.defaultStylesheet= -(new mxCodec(l.ownerDocument)).decode(l)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var t=Graph.prototype.getSvg;Graph.prototype.getSvg=function(l,A,L,Q,O,R,S,X,aa,Y,Z,ca,fa,la){var ia=null,qa=null,ka=null;ca||null==this.themes||"darkTheme"!=this.defaultThemeName||(ia=this.stylesheet,qa=this.shapeForegroundColor,ka=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor= -"darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Da=t.apply(this,arguments),Ea=this.getCustomFonts();if(Z&&0<Ea.length){var za=Da.ownerDocument,Oa=null!=za.createElementNS?za.createElementNS(mxConstants.NS_SVG,"style"):za.createElement("style");null!=za.setAttributeNS?Oa.setAttributeNS("type","text/css"):Oa.setAttribute("type","text/css");for(var Aa="",Ga="",Ia=0;Ia<Ea.length;Ia++){var ra=Ea[Ia].name,ua=Ea[Ia].url;Graph.isCssFontUrl(ua)? -Aa+="@import url("+ua+");\n":Ga+='@font-face {\nfont-family: "'+ra+'";\nsrc: url("'+ua+'");\n}\n'}Oa.appendChild(za.createTextNode(Aa+Ga));Da.getElementsByTagName("defs")[0].appendChild(Oa)}this.mathEnabled&&(document.body.appendChild(Da),Editor.MathJaxRender(Da),Da.parentNode.removeChild(Da));null!=ia&&(this.shapeBackgroundColor=ka,this.shapeForegroundColor=qa,this.stylesheet=ia,this.refresh());return Da};var p=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(l){p.apply(this, -arguments);null!=l.secondLabel&&(l.secondLabel.destroy(),l.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(l){return[l.shape,l.text,l.secondLabel,l.control]};var F=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){F.apply(this,arguments);this.enumerationState=0};var J=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(l){null!=l.shape&&this.redrawEnumerationState(l);return J.apply(this,arguments)}; +(X=S.hiddenTags.slice());Q();S.refresh()});Z.setAttribute("title",mxResources.get("reset"));Z.className="geBtn";Z.style.margin="0 4px 0 0";var ba=mxUtils.button(mxResources.get("add"),function(){null!=M&&M(X,function(ia){X=ia;ha()})});ba.setAttribute("title",mxResources.get("add"));ba.className="geBtn";ba.style.margin="0";S.addListener(mxEvent.ROOT,function(){X=S.hiddenTags.slice()});var ha=mxUtils.bind(this,function(ia,qa){if(l()){ia=S.getAllTags();for(qa=0;qa<ia.length;qa++)0>mxUtils.indexOf(X, +ia[qa])&&X.push(ia[qa]);X.sort();S.isSelectionEmpty()?R(X):R(X,S.getCommonTagsForCells(S.getSelectionCells()))}});S.selectionModel.addListener(mxEvent.CHANGE,ha);S.model.addListener(mxEvent.CHANGE,ha);S.addListener(mxEvent.REFRESH,ha);var ma=document.createElement("div");ma.style.boxSizing="border-box";ma.style.whiteSpace="nowrap";ma.style.position="absolute";ma.style.overflow="hidden";ma.style.bottom="0px";ma.style.height="42px";ma.style.right="10px";ma.style.left="10px";S.isEnabled()&&(ma.appendChild(Z), +ma.appendChild(ba),aa.appendChild(ma));return{div:aa,refresh:ha}};Graph.prototype.getCustomFonts=function(){var l=this.extFonts;l=null!=l?l.slice():[];for(var A in Graph.customFontElements){var M=Graph.customFontElements[A];l.push({name:M.name,url:M.url})}return l};Graph.prototype.setFont=function(l,A){Graph.addFont(l,A);document.execCommand("fontname",!1,l);if(null!=A){var M=this.cellEditor.textarea.getElementsByTagName("font");A=Graph.getFontUrl(l,A);for(var Q=0;Q<M.length;Q++)M[Q].getAttribute("face")== +l&&M[Q].getAttribute("data-font-src")!=A&&M[Q].setAttribute("data-font-src",A)}};var I=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return I.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var l=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=l)for(var A in l)this.globalVars[A]= +l[A]}catch(M){null!=window.console&&console.log("Error in vars URL parameter: "+M)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var N=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(l){var A=N.apply(this,arguments);null==A&&null!=this.globalVars&&(A=this.globalVars[l]);return A};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var l=this.themes["default-style2"];this.defaultStylesheet= +(new mxCodec(l.ownerDocument)).decode(l)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var t=Graph.prototype.getSvg;Graph.prototype.getSvg=function(l,A,M,Q,O,R,S,X,aa,Y,Z,ba,ha,ma){var ia=null,qa=null,la=null;ba||null==this.themes||"darkTheme"!=this.defaultThemeName||(ia=this.stylesheet,qa=this.shapeForegroundColor,la=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor= +"darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Ca=t.apply(this,arguments),Da=this.getCustomFonts();if(Z&&0<Da.length){var ya=Ca.ownerDocument,Pa=null!=ya.createElementNS?ya.createElementNS(mxConstants.NS_SVG,"style"):ya.createElement("style");null!=ya.setAttributeNS?Pa.setAttributeNS("type","text/css"):Pa.setAttribute("type","text/css");for(var za="",Fa="",Ia=0;Ia<Da.length;Ia++){var Ba=Da[Ia].name,Ga=Da[Ia].url;Graph.isCssFontUrl(Ga)? +za+="@import url("+Ga+");\n":Fa+='@font-face {\nfont-family: "'+Ba+'";\nsrc: url("'+Ga+'");\n}\n'}Pa.appendChild(ya.createTextNode(za+Fa));Ca.getElementsByTagName("defs")[0].appendChild(Pa)}this.mathEnabled&&(document.body.appendChild(Ca),Editor.MathJaxRender(Ca),Ca.parentNode.removeChild(Ca));null!=ia&&(this.shapeBackgroundColor=la,this.shapeForegroundColor=qa,this.stylesheet=ia,this.refresh());return Ca};var p=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(l){p.apply(this, +arguments);null!=l.secondLabel&&(l.secondLabel.destroy(),l.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(l){return[l.shape,l.text,l.secondLabel,l.control]};var F=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){F.apply(this,arguments);this.enumerationState=0};var K=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(l){null!=l.shape&&this.redrawEnumerationState(l);return K.apply(this,arguments)}; mxGraphView.prototype.createEnumerationValue=function(l){l=decodeURIComponent(mxUtils.getValue(l.style,"enumerateValue",""));""==l&&(l=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(l)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(l){var A="1"==mxUtils.getValue(l.style,"enumerate",0);A&&null==l.secondLabel?(l.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM), -l.secondLabel.size=12,l.secondLabel.state=l,l.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(l,l.secondLabel)):A||null==l.secondLabel||(l.secondLabel.destroy(),l.secondLabel=null);A=l.secondLabel;if(null!=A){var L=l.view.scale,Q=this.createEnumerationValue(l);l=this.graph.model.isVertex(l.cell)?new mxRectangle(l.x+l.width-4*L,l.y+4*L,0,0):mxRectangle.fromPoint(l.view.getPoint(l));A.bounds.equals(l)&&A.value==Q&&A.scale==L||(A.bounds=l,A.value=Q,A.scale= -L,A.redraw())}};var M=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){M.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var l=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName|| +l.secondLabel.size=12,l.secondLabel.state=l,l.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(l,l.secondLabel)):A||null==l.secondLabel||(l.secondLabel.destroy(),l.secondLabel=null);A=l.secondLabel;if(null!=A){var M=l.view.scale,Q=this.createEnumerationValue(l);l=this.graph.model.isVertex(l.cell)?new mxRectangle(l.x+l.width-4*M,l.y+4*M,0,0):mxRectangle.fromPoint(l.view.getPoint(l));A.bounds.equals(l)&&A.value==Q&&A.scale==M||(A.bounds=l,A.value=Q,A.scale= +M,A.redraw())}};var D=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){D.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var l=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName|| this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",l.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,l.ownerSVGElement))}};var H=Graph.prototype.refresh;Graph.prototype.refresh=function(){H.apply(this, -arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var G=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){G.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(l){"data:action/json,"==l.substring(0,17)&&(l=JSON.parse(l.substring(17)),null!= -l.actions&&this.executeCustomActions(l.actions))};Graph.prototype.executeCustomActions=function(l,A){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var L=!1,Q=0,O=0,R=mxUtils.bind(this,function(){L||(L=!0,this.model.beginUpdate())}),S=mxUtils.bind(this, -function(){L&&(L=!1,this.model.endUpdate())}),X=mxUtils.bind(this,function(){0<Q&&Q--;0==Q&&aa()}),aa=mxUtils.bind(this,function(){if(O<l.length){var Y=this.stoppingCustomActions,Z=l[O++],ca=[];if(null!=Z.open)if(S(),this.isCustomLink(Z.open)){if(!this.customLinkClicked(Z.open))return}else this.openLink(Z.open);null==Z.wait||Y||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;X()}),Q++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction, -""!=Z.wait?parseInt(Z.wait):1E3),S());null!=Z.opacity&&null!=Z.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Z.opacity,!0)),Z.opacity.value);null!=Z.fadeIn&&(Q++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeIn,!0)),0,1,X,Y?0:Z.fadeIn.delay));null!=Z.fadeOut&&(Q++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeOut,!0)),1,0,X,Y?0:Z.fadeOut.delay));null!=Z.wipeIn&&(ca=ca.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeIn, -!0),!0)));null!=Z.wipeOut&&(ca=ca.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeOut,!0),!1)));null!=Z.toggle&&(R(),this.toggleCells(this.getCellsForAction(Z.toggle,!0)));if(null!=Z.show){R();var fa=this.getCellsForAction(Z.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(fa),1);this.setCellsVisible(fa,!0)}null!=Z.hide&&(R(),fa=this.getCellsForAction(Z.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(fa),0),this.setCellsVisible(fa,!1));null!=Z.toggleStyle&&null!=Z.toggleStyle.key&& -(R(),this.toggleCellStyles(Z.toggleStyle.key,null!=Z.toggleStyle.defaultValue?Z.toggleStyle.defaultValue:"0",this.getCellsForAction(Z.toggleStyle,!0)));null!=Z.style&&null!=Z.style.key&&(R(),this.setCellStyles(Z.style.key,Z.style.value,this.getCellsForAction(Z.style,!0)));fa=[];null!=Z.select&&this.isEnabled()&&(fa=this.getCellsForAction(Z.select),this.setSelectionCells(fa));null!=Z.highlight&&(fa=this.getCellsForAction(Z.highlight),this.highlightCells(fa,Z.highlight.color,Z.highlight.duration,Z.highlight.opacity)); -null!=Z.scroll&&(fa=this.getCellsForAction(Z.scroll));null!=Z.viewbox&&this.fitWindow(Z.viewbox,Z.viewbox.border);0<fa.length&&this.scrollCellToVisible(fa[0]);if(null!=Z.tags){fa=[];null!=Z.tags.hidden&&(fa=fa.concat(Z.tags.hidden));if(null!=Z.tags.visible)for(var la=this.getAllTags(),ia=0;ia<la.length;ia++)0>mxUtils.indexOf(Z.tags.visible,la[ia])&&0>mxUtils.indexOf(fa,la[ia])&&fa.push(la[ia]);this.setHiddenTags(fa);this.refresh()}0<ca.length&&(Q++,this.executeAnimations(ca,X,Y?1:Z.steps,Y?0:Z.delay)); -0==Q?aa():S()}else this.stoppingCustomActions=this.executingCustomActions=!1,S(),null!=A&&A()});aa()}};Graph.prototype.doUpdateCustomLinksForCell=function(l,A){var L=this.getLinkForCell(A);null!=L&&"data:action/json,"==L.substring(0,17)&&this.setLinkForCell(A,this.updateCustomLink(l,L));if(this.isHtmlLabel(A)){var Q=document.createElement("div");Q.innerHTML=this.sanitizeHtml(this.getLabel(A));for(var O=Q.getElementsByTagName("a"),R=!1,S=0;S<O.length;S++)L=O[S].getAttribute("href"),null!=L&&"data:action/json,"== -L.substring(0,17)&&(O[S].setAttribute("href",this.updateCustomLink(l,L)),R=!0);R&&this.labelChanged(A,Q.innerHTML)}};Graph.prototype.updateCustomLink=function(l,A){if("data:action/json,"==A.substring(0,17))try{var L=JSON.parse(A.substring(17));null!=L.actions&&(this.updateCustomLinkActions(l,L.actions),A="data:action/json,"+JSON.stringify(L))}catch(Q){}return A};Graph.prototype.updateCustomLinkActions=function(l,A){for(var L=0;L<A.length;L++){var Q=A[L],O;for(O in Q)this.updateCustomLinkAction(l, -Q[O],"cells"),this.updateCustomLinkAction(l,Q[O],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(l,A,L){if(null!=A&&null!=A[L]){for(var Q=[],O=0;O<A[L].length;O++)if("*"==A[L][O])Q.push(A[L][O]);else{var R=l[A[L][O]];null!=R?""!=R&&Q.push(R):Q.push(A[L][O])}A[L]=Q}};Graph.prototype.getCellsForAction=function(l,A){A=this.getCellsById(l.cells).concat(this.getCellsForTags(l.tags,null,A));if(null!=l.excludeCells){for(var L=[],Q=0;Q<A.length;Q++)0>l.excludeCells.indexOf(A[Q].id)&&L.push(A[Q]); -A=L}return A};Graph.prototype.getCellsById=function(l){var A=[];if(null!=l)for(var L=0;L<l.length;L++)if("*"==l[L]){var Q=this.model.getRoot();A=A.concat(this.model.filterDescendants(function(R){return R!=Q},Q))}else{var O=this.model.getCell(l[L]);null!=O&&A.push(O)}return A};var E=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(l){return E.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(l))};Graph.prototype.setHiddenTags=function(l){this.hiddenTags=l;this.fireEvent(new mxEventObject("hiddenTagsChanged"))}; -Graph.prototype.toggleHiddenTag=function(l){var A=mxUtils.indexOf(this.hiddenTags,l);0>A?this.hiddenTags.push(l):0<=A&&this.hiddenTags.splice(A,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(l){if(null==l||0==l.length||0==this.hiddenTags.length)return!1;l=l.split(" ");if(l.length>this.hiddenTags.length)return!1;for(var A=0;A<l.length;A++)if(0>mxUtils.indexOf(this.hiddenTags,l[A]))return!1;return!0};Graph.prototype.getCellsForTags=function(l,A,L, -Q){var O=[];if(null!=l){A=null!=A?A:this.model.getDescendants(this.model.getRoot());for(var R=0,S={},X=0;X<l.length;X++)0<l[X].length&&(S[l[X]]=!0,R++);for(X=0;X<A.length;X++)if(L&&this.model.getParent(A[X])==this.model.root||this.model.isVertex(A[X])||this.model.isEdge(A[X])){var aa=this.getTagsForCell(A[X]),Y=!1;if(0<aa.length&&(aa=aa.split(" "),aa.length>=l.length)){for(var Z=Y=0;Z<aa.length&&Y<R;Z++)null!=S[aa[Z]]&&Y++;Y=Y==R}Y&&(1!=Q||this.isCellVisible(A[X]))&&O.push(A[X])}}return O};Graph.prototype.getAllTags= -function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(l){for(var A=null,L=[],Q=0;Q<l.length;Q++){var O=this.getTagsForCell(l[Q]);L=[];if(0<O.length){O=O.split(" ");for(var R={},S=0;S<O.length;S++)if(null==A||null!=A[O[S]])R[O[S]]=!0,L.push(O[S]);A=R}else return[]}return L};Graph.prototype.getTagsForCells=function(l){for(var A=[],L={},Q=0;Q<l.length;Q++){var O=this.getTagsForCell(l[Q]);if(0<O.length){O=O.split(" ");for(var R= -0;R<O.length;R++)null==L[O[R]]&&(L[O[R]]=!0,A.push(O[R]))}}return A};Graph.prototype.getTagsForCell=function(l){return this.getAttributeForCell(l,"tags","")};Graph.prototype.addTagsForCells=function(l,A){if(0<l.length&&0<A.length){this.model.beginUpdate();try{for(var L=0;L<l.length;L++){for(var Q=this.getTagsForCell(l[L]),O=Q.split(" "),R=!1,S=0;S<A.length;S++){var X=mxUtils.trim(A[S]);""!=X&&0>mxUtils.indexOf(O,X)&&(Q=0<Q.length?Q+" "+X:X,R=!0)}R&&this.setAttributeForCell(l[L],"tags",Q)}}finally{this.model.endUpdate()}}}; -Graph.prototype.removeTagsForCells=function(l,A){if(0<l.length&&0<A.length){this.model.beginUpdate();try{for(var L=0;L<l.length;L++){var Q=this.getTagsForCell(l[L]);if(0<Q.length){for(var O=Q.split(" "),R=!1,S=0;S<A.length;S++){var X=mxUtils.indexOf(O,A[S]);0<=X&&(O.splice(X,1),R=!0)}R&&this.setAttributeForCell(l[L],"tags",O.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(l){this.model.beginUpdate();try{for(var A=0;A<l.length;A++)this.model.setVisible(l[A],!this.model.isVisible(l[A]))}finally{this.model.endUpdate()}}; -Graph.prototype.setCellsVisible=function(l,A){this.model.beginUpdate();try{for(var L=0;L<l.length;L++)this.model.setVisible(l[L],A)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(l,A,L,Q){for(var O=0;O<l.length;O++)this.highlightCell(l[O],A,L,Q)};Graph.prototype.highlightCell=function(l,A,L,Q,O){A=null!=A?A:mxConstants.DEFAULT_VALID_COLOR;L=null!=L?L:1E3;l=this.view.getState(l);var R=null;null!=l&&(O=null!=O?O:4,O=Math.max(O+1,mxUtils.getValue(l.style,mxConstants.STYLE_STROKEWIDTH, -1)+O),R=new mxCellHighlight(this,A,O,!1),null!=Q&&(R.opacity=Q),R.highlight(l),window.setTimeout(function(){null!=R.shape&&(mxUtils.setPrefixedStyle(R.shape.node.style,"transition","all 1200ms ease-in-out"),R.shape.node.style.opacity=0);window.setTimeout(function(){R.destroy()},1200)},L));return R};Graph.prototype.addSvgShadow=function(l,A,L,Q){L=null!=L?L:!1;Q=null!=Q?Q:!0;var O=l.ownerDocument,R=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"filter"):O.createElement("filter");R.setAttribute("id", +arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var J=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){J.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(l){"data:action/json,"==l.substring(0,17)&&(l=JSON.parse(l.substring(17)),null!= +l.actions&&this.executeCustomActions(l.actions))};Graph.prototype.executeCustomActions=function(l,A){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var M=!1,Q=0,O=0,R=mxUtils.bind(this,function(){M||(M=!0,this.model.beginUpdate())}),S=mxUtils.bind(this, +function(){M&&(M=!1,this.model.endUpdate())}),X=mxUtils.bind(this,function(){0<Q&&Q--;0==Q&&aa()}),aa=mxUtils.bind(this,function(){if(O<l.length){var Y=this.stoppingCustomActions,Z=l[O++],ba=[];if(null!=Z.open)if(S(),this.isCustomLink(Z.open)){if(!this.customLinkClicked(Z.open))return}else this.openLink(Z.open);null==Z.wait||Y||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;X()}),Q++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction, +""!=Z.wait?parseInt(Z.wait):1E3),S());null!=Z.opacity&&null!=Z.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Z.opacity,!0)),Z.opacity.value);null!=Z.fadeIn&&(Q++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeIn,!0)),0,1,X,Y?0:Z.fadeIn.delay));null!=Z.fadeOut&&(Q++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeOut,!0)),1,0,X,Y?0:Z.fadeOut.delay));null!=Z.wipeIn&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeIn, +!0),!0)));null!=Z.wipeOut&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeOut,!0),!1)));null!=Z.toggle&&(R(),this.toggleCells(this.getCellsForAction(Z.toggle,!0)));if(null!=Z.show){R();var ha=this.getCellsForAction(Z.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(ha),1);this.setCellsVisible(ha,!0)}null!=Z.hide&&(R(),ha=this.getCellsForAction(Z.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(ha),0),this.setCellsVisible(ha,!1));null!=Z.toggleStyle&&null!=Z.toggleStyle.key&& +(R(),this.toggleCellStyles(Z.toggleStyle.key,null!=Z.toggleStyle.defaultValue?Z.toggleStyle.defaultValue:"0",this.getCellsForAction(Z.toggleStyle,!0)));null!=Z.style&&null!=Z.style.key&&(R(),this.setCellStyles(Z.style.key,Z.style.value,this.getCellsForAction(Z.style,!0)));ha=[];null!=Z.select&&this.isEnabled()&&(ha=this.getCellsForAction(Z.select),this.setSelectionCells(ha));null!=Z.highlight&&(ha=this.getCellsForAction(Z.highlight),this.highlightCells(ha,Z.highlight.color,Z.highlight.duration,Z.highlight.opacity)); +null!=Z.scroll&&(ha=this.getCellsForAction(Z.scroll));null!=Z.viewbox&&this.fitWindow(Z.viewbox,Z.viewbox.border);0<ha.length&&this.scrollCellToVisible(ha[0]);if(null!=Z.tags){ha=[];null!=Z.tags.hidden&&(ha=ha.concat(Z.tags.hidden));if(null!=Z.tags.visible)for(var ma=this.getAllTags(),ia=0;ia<ma.length;ia++)0>mxUtils.indexOf(Z.tags.visible,ma[ia])&&0>mxUtils.indexOf(ha,ma[ia])&&ha.push(ma[ia]);this.setHiddenTags(ha);this.refresh()}0<ba.length&&(Q++,this.executeAnimations(ba,X,Y?1:Z.steps,Y?0:Z.delay)); +0==Q?aa():S()}else this.stoppingCustomActions=this.executingCustomActions=!1,S(),null!=A&&A()});aa()}};Graph.prototype.doUpdateCustomLinksForCell=function(l,A){var M=this.getLinkForCell(A);null!=M&&"data:action/json,"==M.substring(0,17)&&this.setLinkForCell(A,this.updateCustomLink(l,M));if(this.isHtmlLabel(A)){var Q=document.createElement("div");Q.innerHTML=this.sanitizeHtml(this.getLabel(A));for(var O=Q.getElementsByTagName("a"),R=!1,S=0;S<O.length;S++)M=O[S].getAttribute("href"),null!=M&&"data:action/json,"== +M.substring(0,17)&&(O[S].setAttribute("href",this.updateCustomLink(l,M)),R=!0);R&&this.labelChanged(A,Q.innerHTML)}};Graph.prototype.updateCustomLink=function(l,A){if("data:action/json,"==A.substring(0,17))try{var M=JSON.parse(A.substring(17));null!=M.actions&&(this.updateCustomLinkActions(l,M.actions),A="data:action/json,"+JSON.stringify(M))}catch(Q){}return A};Graph.prototype.updateCustomLinkActions=function(l,A){for(var M=0;M<A.length;M++){var Q=A[M],O;for(O in Q)this.updateCustomLinkAction(l, +Q[O],"cells"),this.updateCustomLinkAction(l,Q[O],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(l,A,M){if(null!=A&&null!=A[M]){for(var Q=[],O=0;O<A[M].length;O++)if("*"==A[M][O])Q.push(A[M][O]);else{var R=l[A[M][O]];null!=R?""!=R&&Q.push(R):Q.push(A[M][O])}A[M]=Q}};Graph.prototype.getCellsForAction=function(l,A){A=this.getCellsById(l.cells).concat(this.getCellsForTags(l.tags,null,A));if(null!=l.excludeCells){for(var M=[],Q=0;Q<A.length;Q++)0>l.excludeCells.indexOf(A[Q].id)&&M.push(A[Q]); +A=M}return A};Graph.prototype.getCellsById=function(l){var A=[];if(null!=l)for(var M=0;M<l.length;M++)if("*"==l[M]){var Q=this.model.getRoot();A=A.concat(this.model.filterDescendants(function(R){return R!=Q},Q))}else{var O=this.model.getCell(l[M]);null!=O&&A.push(O)}return A};var G=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(l){return G.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(l))};Graph.prototype.setHiddenTags=function(l){this.hiddenTags=l;this.fireEvent(new mxEventObject("hiddenTagsChanged"))}; +Graph.prototype.toggleHiddenTag=function(l){var A=mxUtils.indexOf(this.hiddenTags,l);0>A?this.hiddenTags.push(l):0<=A&&this.hiddenTags.splice(A,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(l){if(null==l||0==l.length||0==this.hiddenTags.length)return!1;l=l.split(" ");if(l.length>this.hiddenTags.length)return!1;for(var A=0;A<l.length;A++)if(0>mxUtils.indexOf(this.hiddenTags,l[A]))return!1;return!0};Graph.prototype.getCellsForTags=function(l,A,M, +Q){var O=[];if(null!=l){A=null!=A?A:this.model.getDescendants(this.model.getRoot());for(var R=0,S={},X=0;X<l.length;X++)0<l[X].length&&(S[l[X]]=!0,R++);for(X=0;X<A.length;X++)if(M&&this.model.getParent(A[X])==this.model.root||this.model.isVertex(A[X])||this.model.isEdge(A[X])){var aa=this.getTagsForCell(A[X]),Y=!1;if(0<aa.length&&(aa=aa.split(" "),aa.length>=l.length)){for(var Z=Y=0;Z<aa.length&&Y<R;Z++)null!=S[aa[Z]]&&Y++;Y=Y==R}Y&&(1!=Q||this.isCellVisible(A[X]))&&O.push(A[X])}}return O};Graph.prototype.getAllTags= +function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(l){for(var A=null,M=[],Q=0;Q<l.length;Q++){var O=this.getTagsForCell(l[Q]);M=[];if(0<O.length){O=O.split(" ");for(var R={},S=0;S<O.length;S++)if(null==A||null!=A[O[S]])R[O[S]]=!0,M.push(O[S]);A=R}else return[]}return M};Graph.prototype.getTagsForCells=function(l){for(var A=[],M={},Q=0;Q<l.length;Q++){var O=this.getTagsForCell(l[Q]);if(0<O.length){O=O.split(" ");for(var R= +0;R<O.length;R++)null==M[O[R]]&&(M[O[R]]=!0,A.push(O[R]))}}return A};Graph.prototype.getTagsForCell=function(l){return this.getAttributeForCell(l,"tags","")};Graph.prototype.addTagsForCells=function(l,A){if(0<l.length&&0<A.length){this.model.beginUpdate();try{for(var M=0;M<l.length;M++){for(var Q=this.getTagsForCell(l[M]),O=Q.split(" "),R=!1,S=0;S<A.length;S++){var X=mxUtils.trim(A[S]);""!=X&&0>mxUtils.indexOf(O,X)&&(Q=0<Q.length?Q+" "+X:X,R=!0)}R&&this.setAttributeForCell(l[M],"tags",Q)}}finally{this.model.endUpdate()}}}; +Graph.prototype.removeTagsForCells=function(l,A){if(0<l.length&&0<A.length){this.model.beginUpdate();try{for(var M=0;M<l.length;M++){var Q=this.getTagsForCell(l[M]);if(0<Q.length){for(var O=Q.split(" "),R=!1,S=0;S<A.length;S++){var X=mxUtils.indexOf(O,A[S]);0<=X&&(O.splice(X,1),R=!0)}R&&this.setAttributeForCell(l[M],"tags",O.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(l){this.model.beginUpdate();try{for(var A=0;A<l.length;A++)this.model.setVisible(l[A],!this.model.isVisible(l[A]))}finally{this.model.endUpdate()}}; +Graph.prototype.setCellsVisible=function(l,A){this.model.beginUpdate();try{for(var M=0;M<l.length;M++)this.model.setVisible(l[M],A)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(l,A,M,Q){for(var O=0;O<l.length;O++)this.highlightCell(l[O],A,M,Q)};Graph.prototype.highlightCell=function(l,A,M,Q,O){A=null!=A?A:mxConstants.DEFAULT_VALID_COLOR;M=null!=M?M:1E3;l=this.view.getState(l);var R=null;null!=l&&(O=null!=O?O:4,O=Math.max(O+1,mxUtils.getValue(l.style,mxConstants.STYLE_STROKEWIDTH, +1)+O),R=new mxCellHighlight(this,A,O,!1),null!=Q&&(R.opacity=Q),R.highlight(l),window.setTimeout(function(){null!=R.shape&&(mxUtils.setPrefixedStyle(R.shape.node.style,"transition","all 1200ms ease-in-out"),R.shape.node.style.opacity=0);window.setTimeout(function(){R.destroy()},1200)},M));return R};Graph.prototype.addSvgShadow=function(l,A,M,Q){M=null!=M?M:!1;Q=null!=Q?Q:!0;var O=l.ownerDocument,R=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"filter"):O.createElement("filter");R.setAttribute("id", this.shadowId);var S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):O.createElement("feGaussianBlur");S.setAttribute("in","SourceAlpha");S.setAttribute("stdDeviation",this.svgShadowBlur);S.setAttribute("result","blur");R.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feOffset"):O.createElement("feOffset");S.setAttribute("in","blur");S.setAttribute("dx",this.svgShadowSize);S.setAttribute("dy",this.svgShadowSize);S.setAttribute("result", "offsetBlur");R.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feFlood"):O.createElement("feFlood");S.setAttribute("flood-color",this.svgShadowColor);S.setAttribute("flood-opacity",this.svgShadowOpacity);S.setAttribute("result","offsetColor");R.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feComposite"):O.createElement("feComposite");S.setAttribute("in","offsetColor");S.setAttribute("in2","offsetBlur");S.setAttribute("operator","in"); -S.setAttribute("result","offsetBlur");R.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feBlend"):O.createElement("feBlend");S.setAttribute("in","SourceGraphic");S.setAttribute("in2","offsetBlur");R.appendChild(S);S=l.getElementsByTagName("defs");0==S.length?(O=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"defs"):O.createElement("defs"),null!=l.firstChild?l.insertBefore(O,l.firstChild):l.appendChild(O)):O=S[0];O.appendChild(R);L||(A=null!=A?A:l.getElementsByTagName("g")[0], +S.setAttribute("result","offsetBlur");R.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feBlend"):O.createElement("feBlend");S.setAttribute("in","SourceGraphic");S.setAttribute("in2","offsetBlur");R.appendChild(S);S=l.getElementsByTagName("defs");0==S.length?(O=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"defs"):O.createElement("defs"),null!=l.firstChild?l.insertBefore(O,l.firstChild):l.appendChild(O)):O=S[0];O.appendChild(R);M||(A=null!=A?A:l.getElementsByTagName("g")[0], null!=A&&(A.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(l.getAttribute("width")))&&Q&&(l.setAttribute("width",parseInt(l.getAttribute("width"))+6),l.setAttribute("height",parseInt(l.getAttribute("height"))+6),A=l.getAttribute("viewBox"),null!=A&&0<A.length&&(A=A.split(" "),3<A.length&&(w=parseFloat(A[2])+6,h=parseFloat(A[3])+6,l.setAttribute("viewBox",A[0]+" "+A[1]+" "+w+" "+h))))));return R};Graph.prototype.setShadowVisible=function(l,A){mxClient.IS_SVG&&!mxClient.IS_SF&&(A= -null!=A?A:!0,(this.shadowVisible=l)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),A&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var l=this.model.getChildCount(this.model.root),A=0;do var L=this.model.getChildAt(this.model.root,A);while(A++<l&&"1"==mxUtils.getValue(this.getCellStyle(L),"locked","0"));null!=L&&this.setDefaultParent(L)}}; +null!=A?A:!0,(this.shadowVisible=l)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),A&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var l=this.model.getChildCount(this.model.root),A=0;do var M=this.model.getChildAt(this.model.root,A);while(A++<l&&"1"==mxUtils.getValue(this.getCellStyle(M),"locked","0"));null!=M&&this.setDefaultParent(M)}}; mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4= [SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml", STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=[SHAPES_PATH+"/mxKubernetes.js",STENCIL_PATH+"/kubernetes.xml"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral= @@ -11410,319 +11407,328 @@ mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupN "/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.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.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam= [STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors= -[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(l){var A=null;null!=l&&0<l.length&&("ER"==l.substring(0,2)?A="mxgraph.er":"sysML"==l.substring(0,5)&&(A="mxgraph.sysml"));return A};var P=mxMarker.createMarker;mxMarker.createMarker=function(l,A,L,Q,O,R,S,X,aa,Y){if(null!=L&&null==mxMarker.markers[L]){var Z=this.getPackageForType(L);null!=Z&&mxStencilRegistry.getStencil(Z)}return P.apply(this,arguments)};var T=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(l, -A,L,Q,O,R){"1"==mxUtils.getValue(A.style,"lineShape",null)&&l.setFillColor(mxUtils.getValue(A.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return T.apply(this,arguments)};PrintDialog.prototype.create=function(l,A){function L(){fa.value=Math.max(1,Math.min(X,Math.max(parseInt(fa.value),parseInt(ca.value))));ca.value=Math.max(1,Math.min(X,Math.min(parseInt(fa.value),parseInt(ca.value))))}function Q(xa){function sa(Ja,Pa,Qa){var Na=Ja.useCssTransforms,Sa=Ja.currentTranslate,Ua=Ja.currentScale,Ka= -Ja.view.translate,Ta=Ja.view.scale;Ja.useCssTransforms&&(Ja.useCssTransforms=!1,Ja.currentTranslate=new mxPoint(0,0),Ja.currentScale=1,Ja.view.translate=new mxPoint(0,0),Ja.view.scale=1);var Va=Ja.getGraphBounds(),Wa=0,$a=0,Xa=La.get(),ab=1/Ja.pageScale,Za=Da.checked;if(Za){ab=parseInt(Fa.value);var gb=parseInt(wa.value);ab=Math.min(Xa.height*gb/(Va.height/Ja.view.scale),Xa.width*ab/(Va.width/Ja.view.scale))}else ab=parseInt(ka.value)/(100*Ja.pageScale),isNaN(ab)&&(da=1/Ja.pageScale,ka.value="100 %"); -Xa=mxRectangle.fromRectangle(Xa);Xa.width=Math.ceil(Xa.width*da);Xa.height=Math.ceil(Xa.height*da);ab*=da;!Za&&Ja.pageVisible?(Va=Ja.getPageLayout(),Wa-=Va.x*Xa.width,$a-=Va.y*Xa.height):Za=!0;if(null==Pa){Pa=PrintDialog.createPrintPreview(Ja,ab,Xa,0,Wa,$a,Za);Pa.pageSelector=!1;Pa.mathEnabled=!1;la.checked&&(Pa.isCellVisible=function(Ya){return Ja.isCellSelected(Ya)});Wa=l.getCurrentFile();null!=Wa&&(Pa.title=Wa.getTitle());var hb=Pa.writeHead;Pa.writeHead=function(Ya){hb.apply(this,arguments);mxClient.IS_GC&& +[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(l){var A=null;null!=l&&0<l.length&&("ER"==l.substring(0,2)?A="mxgraph.er":"sysML"==l.substring(0,5)&&(A="mxgraph.sysml"));return A};var P=mxMarker.createMarker;mxMarker.createMarker=function(l,A,M,Q,O,R,S,X,aa,Y){if(null!=M&&null==mxMarker.markers[M]){var Z=this.getPackageForType(M);null!=Z&&mxStencilRegistry.getStencil(Z)}return P.apply(this,arguments)};var T=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(l, +A,M,Q,O,R){"1"==mxUtils.getValue(A.style,"lineShape",null)&&l.setFillColor(mxUtils.getValue(A.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return T.apply(this,arguments)};PrintDialog.prototype.create=function(l,A){function M(){ha.value=Math.max(1,Math.min(X,Math.max(parseInt(ha.value),parseInt(ba.value))));ba.value=Math.max(1,Math.min(X,Math.min(parseInt(ha.value),parseInt(ba.value))))}function Q(ua){function sa(Ja,Oa,Qa){var Na=Ja.useCssTransforms,Sa=Ja.currentTranslate,Ua=Ja.currentScale,Ka= +Ja.view.translate,Ta=Ja.view.scale;Ja.useCssTransforms&&(Ja.useCssTransforms=!1,Ja.currentTranslate=new mxPoint(0,0),Ja.currentScale=1,Ja.view.translate=new mxPoint(0,0),Ja.view.scale=1);var Va=Ja.getGraphBounds(),Wa=0,$a=0,Xa=La.get(),ab=1/Ja.pageScale,Za=Ca.checked;if(Za){ab=parseInt(Ea.value);var gb=parseInt(wa.value);ab=Math.min(Xa.height*gb/(Va.height/Ja.view.scale),Xa.width*ab/(Va.width/Ja.view.scale))}else ab=parseInt(la.value)/(100*Ja.pageScale),isNaN(ab)&&(va=1/Ja.pageScale,la.value="100 %"); +Xa=mxRectangle.fromRectangle(Xa);Xa.width=Math.ceil(Xa.width*va);Xa.height=Math.ceil(Xa.height*va);ab*=va;!Za&&Ja.pageVisible?(Va=Ja.getPageLayout(),Wa-=Va.x*Xa.width,$a-=Va.y*Xa.height):Za=!0;if(null==Oa){Oa=PrintDialog.createPrintPreview(Ja,ab,Xa,0,Wa,$a,Za);Oa.pageSelector=!1;Oa.mathEnabled=!1;ma.checked&&(Oa.isCellVisible=function(Ya){return Ja.isCellSelected(Ya)});Wa=l.getCurrentFile();null!=Wa&&(Oa.title=Wa.getTitle());var hb=Oa.writeHead;Oa.writeHead=function(Ya){hb.apply(this,arguments);mxClient.IS_GC&& (Ya.writeln('<style type="text/css">'),Ya.writeln("@media print {"),Ya.writeln(".MathJax svg { shape-rendering: crispEdges; }"),Ya.writeln("}"),Ya.writeln("</style>"));null!=l.editor.fontCss&&(Ya.writeln('<style type="text/css">'),Ya.writeln(l.editor.fontCss),Ya.writeln("</style>"));for(var cb=Ja.getCustomFonts(),bb=0;bb<cb.length;bb++){var eb=cb[bb].name,db=cb[bb].url;Graph.isCssFontUrl(db)?Ya.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(db)+'" charset="UTF-8" type="text/css">'): -(Ya.writeln('<style type="text/css">'),Ya.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(eb)+'";\nsrc: url("'+mxUtils.htmlEntities(db)+'");\n}'),Ya.writeln("</style>"))}};if("undefined"!==typeof MathJax){var ib=Pa.renderPage;Pa.renderPage=function(Ya,cb,bb,eb,db,kb){var jb=mxClient.NO_FO,fb=ib.apply(this,arguments);mxClient.NO_FO=jb;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:fb.className="geDisableMathJax";return fb}}Wa=null;$a=O.shapeForegroundColor;Za=O.shapeBackgroundColor; -Xa=O.enableFlowAnimation;O.enableFlowAnimation=!1;null!=O.themes&&"darkTheme"==O.defaultThemeName&&(Wa=O.stylesheet,O.stylesheet=O.getDefaultStylesheet(),O.shapeForegroundColor="#000000",O.shapeBackgroundColor="#ffffff",O.refresh());Pa.open(null,null,Qa,!0);O.enableFlowAnimation=Xa;null!=Wa&&(O.shapeForegroundColor=$a,O.shapeBackgroundColor=Za,O.stylesheet=Wa,O.refresh())}else{Xa=Ja.background;if(null==Xa||""==Xa||Xa==mxConstants.NONE)Xa="#ffffff";Pa.backgroundColor=Xa;Pa.autoOrigin=Za;Pa.appendGraph(Ja, -ab,Wa,$a,Qa,!0);Qa=Ja.getCustomFonts();if(null!=Pa.wnd)for(Wa=0;Wa<Qa.length;Wa++)$a=Qa[Wa].name,Za=Qa[Wa].url,Graph.isCssFontUrl(Za)?Pa.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Za)+'" charset="UTF-8" type="text/css">'):(Pa.wnd.document.writeln('<style type="text/css">'),Pa.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities($a)+'";\nsrc: url("'+mxUtils.htmlEntities(Za)+'");\n}'),Pa.wnd.document.writeln("</style>"))}Na&&(Ja.useCssTransforms=Na, -Ja.currentTranslate=Sa,Ja.currentScale=Ua,Ja.view.translate=Ka,Ja.view.scale=Ta);return Pa}var da=parseInt(ja.value)/100;isNaN(da)&&(da=1,ja.value="100 %");da*=.75;var ba=null,na=O.shapeForegroundColor,ea=O.shapeBackgroundColor;null!=O.themes&&"darkTheme"==O.defaultThemeName&&(ba=O.stylesheet,O.stylesheet=O.getDefaultStylesheet(),O.shapeForegroundColor="#000000",O.shapeBackgroundColor="#ffffff",O.refresh());var ha=ca.value,oa=fa.value,ma=!Y.checked,va=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(l, -Y.checked,ha,oa,Da.checked,Fa.value,wa.value,parseInt(ka.value)/100,parseInt(ja.value)/100,La.get());else{ma&&(ma=la.checked||ha==aa&&oa==aa);if(!ma&&null!=l.pages&&l.pages.length){var Ca=0;ma=l.pages.length-1;Y.checked||(Ca=parseInt(ha)-1,ma=parseInt(oa)-1);for(var ya=Ca;ya<=ma;ya++){var ta=l.pages[ya];ha=ta==l.currentPage?O:null;if(null==ha){ha=l.createTemporaryGraph(O.stylesheet);ha.shapeForegroundColor=O.shapeForegroundColor;ha.shapeBackgroundColor=O.shapeBackgroundColor;oa=!0;Ca=!1;var pa=null, -Ha=null;null==ta.viewState&&null==ta.root&&l.updatePageRoot(ta);null!=ta.viewState&&(oa=ta.viewState.pageVisible,Ca=ta.viewState.mathEnabled,pa=ta.viewState.background,Ha=ta.viewState.backgroundImage,ha.extFonts=ta.viewState.extFonts);null!=Ha&&null!=Ha.originalSrc&&(Ha=l.createImageForPageLink(Ha.originalSrc,ta));ha.background=pa;ha.backgroundImage=null!=Ha?new mxImage(Ha.src,Ha.width,Ha.height,Ha.x,Ha.y):null;ha.pageVisible=oa;ha.mathEnabled=Ca;var Ma=ha.getGraphBounds;ha.getGraphBounds=function(){var Ja= -Ma.apply(this,arguments),Pa=this.backgroundImage;if(null!=Pa&&null!=Pa.width&&null!=Pa.height){var Qa=this.view.translate,Na=this.view.scale;Ja=mxRectangle.fromRectangle(Ja);Ja.add(new mxRectangle((Qa.x+Pa.x)*Na,(Qa.y+Pa.y)*Na,Pa.width*Na,Pa.height*Na))}return Ja};var Ra=ha.getGlobalVariable;ha.getGlobalVariable=function(Ja){return"page"==Ja?ta.getName():"pagenumber"==Ja?ya+1:"pagecount"==Ja?null!=l.pages?l.pages.length:1:Ra.apply(this,arguments)};document.body.appendChild(ha.container);l.updatePageRoot(ta); -ha.model.setRoot(ta.root)}va=sa(ha,va,ya!=ma);ha!=O&&ha.container.parentNode.removeChild(ha.container)}}else va=sa(O);null==va?l.handleError({message:mxResources.get("errorUpdatingPreview")}):(va.mathEnabled&&(ma=va.wnd.document,xa&&(va.wnd.IMMEDIATE_PRINT=!0),ma.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),va.closeDocument(),!va.mathEnabled&&xa&&PrintDialog.printPreview(va));null!=ba&&(O.shapeForegroundColor=na,O.shapeBackgroundColor=ea,O.stylesheet= -ba,O.refresh())}}var O=l.editor.graph,R=document.createElement("div"),S=document.createElement("h3");S.style.width="100%";S.style.textAlign="center";S.style.marginTop="0px";mxUtils.write(S,A||mxResources.get("print"));R.appendChild(S);var X=1,aa=1;S=document.createElement("div");S.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var Y=document.createElement("input");Y.style.cssText="margin-right:8px;margin-bottom:8px;";Y.setAttribute("value","all");Y.setAttribute("type", -"radio");Y.setAttribute("name","pages-printdialog");S.appendChild(Y);A=document.createElement("span");mxUtils.write(A,mxResources.get("printAllPages"));S.appendChild(A);mxUtils.br(S);var Z=Y.cloneNode(!0);Y.setAttribute("checked","checked");Z.setAttribute("value","range");S.appendChild(Z);A=document.createElement("span");mxUtils.write(A,mxResources.get("pages")+":");S.appendChild(A);var ca=document.createElement("input");ca.style.cssText="margin:0 8px 0 8px;";ca.setAttribute("value","1");ca.setAttribute("type", -"number");ca.setAttribute("min","1");ca.style.width="50px";S.appendChild(ca);A=document.createElement("span");mxUtils.write(A,mxResources.get("to"));S.appendChild(A);var fa=ca.cloneNode(!0);S.appendChild(fa);mxEvent.addListener(ca,"focus",function(){Z.checked=!0});mxEvent.addListener(fa,"focus",function(){Z.checked=!0});mxEvent.addListener(ca,"change",L);mxEvent.addListener(fa,"change",L);if(null!=l.pages&&(X=l.pages.length,null!=l.currentPage))for(A=0;A<l.pages.length;A++)if(l.currentPage==l.pages[A]){aa= -A+1;ca.value=aa;fa.value=aa;break}ca.setAttribute("max",X);fa.setAttribute("max",X);l.isPagesEnabled()?1<X&&(R.appendChild(S),Z.checked=!0):Z.checked=!0;mxUtils.br(S);var la=document.createElement("input");la.setAttribute("value","all");la.setAttribute("type","radio");la.style.marginRight="8px";O.isSelectionEmpty()&&la.setAttribute("disabled","disabled");var ia=document.createElement("div");ia.style.marginBottom="10px";1==X?(la.setAttribute("type","checkbox"),la.style.marginBottom="12px",ia.appendChild(la)): -(la.setAttribute("name","pages-printdialog"),la.style.marginBottom="8px",S.appendChild(la));A=document.createElement("span");mxUtils.write(A,mxResources.get("selectionOnly"));la.parentNode.appendChild(A);1==X&&mxUtils.br(la.parentNode);var qa=document.createElement("input");qa.style.marginRight="8px";qa.setAttribute("value","adjust");qa.setAttribute("type","radio");qa.setAttribute("name","printZoom");ia.appendChild(qa);A=document.createElement("span");mxUtils.write(A,mxResources.get("adjustTo")); -ia.appendChild(A);var ka=document.createElement("input");ka.style.cssText="margin:0 8px 0 8px;";ka.setAttribute("value","100 %");ka.style.width="50px";ia.appendChild(ka);mxEvent.addListener(ka,"focus",function(){qa.checked=!0});R.appendChild(ia);S=S.cloneNode(!1);var Da=qa.cloneNode(!0);Da.setAttribute("value","fit");qa.setAttribute("checked","checked");A=document.createElement("div");A.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";A.appendChild(Da);S.appendChild(A);ia= -document.createElement("table");ia.style.display="inline-block";var Ea=document.createElement("tbody"),za=document.createElement("tr"),Oa=za.cloneNode(!0),Aa=document.createElement("td"),Ga=Aa.cloneNode(!0),Ia=Aa.cloneNode(!0),ra=Aa.cloneNode(!0),ua=Aa.cloneNode(!0),Ba=Aa.cloneNode(!0);Aa.style.textAlign="right";ra.style.textAlign="right";mxUtils.write(Aa,mxResources.get("fitTo"));var Fa=document.createElement("input");Fa.style.cssText="margin:0 8px 0 8px;";Fa.setAttribute("value","1");Fa.setAttribute("min", -"1");Fa.setAttribute("type","number");Fa.style.width="40px";Ga.appendChild(Fa);A=document.createElement("span");mxUtils.write(A,mxResources.get("fitToSheetsAcross"));Ia.appendChild(A);mxUtils.write(ra,mxResources.get("fitToBy"));var wa=Fa.cloneNode(!0);ua.appendChild(wa);mxEvent.addListener(Fa,"focus",function(){Da.checked=!0});mxEvent.addListener(wa,"focus",function(){Da.checked=!0});A=document.createElement("span");mxUtils.write(A,mxResources.get("fitToSheetsDown"));Ba.appendChild(A);za.appendChild(Aa); -za.appendChild(Ga);za.appendChild(Ia);Oa.appendChild(ra);Oa.appendChild(ua);Oa.appendChild(Ba);Ea.appendChild(za);Ea.appendChild(Oa);ia.appendChild(Ea);S.appendChild(ia);R.appendChild(S);S=document.createElement("div");A=document.createElement("div");A.style.fontWeight="bold";A.style.marginBottom="12px";mxUtils.write(A,mxResources.get("paperSize"));S.appendChild(A);A=document.createElement("div");A.style.marginBottom="12px";var La=PageSetupDialog.addPageFormatPanel(A,"printdialog",l.editor.graph.pageFormat|| -mxConstants.PAGE_FORMAT_A4_PORTRAIT);S.appendChild(A);A=document.createElement("span");mxUtils.write(A,mxResources.get("pageScale"));S.appendChild(A);var ja=document.createElement("input");ja.style.cssText="margin:0 8px 0 8px;";ja.setAttribute("value","100 %");ja.style.width="60px";S.appendChild(ja);R.appendChild(S);A=document.createElement("div");A.style.cssText="text-align:right;margin:48px 0 0 0;";S=mxUtils.button(mxResources.get("cancel"),function(){l.hideDialog()});S.className="geBtn";l.editor.cancelFirst&& +(Ya.writeln('<style type="text/css">'),Ya.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(eb)+'";\nsrc: url("'+mxUtils.htmlEntities(db)+'");\n}'),Ya.writeln("</style>"))}};if("undefined"!==typeof MathJax){var ib=Oa.renderPage;Oa.renderPage=function(Ya,cb,bb,eb,db,kb){var jb=mxClient.NO_FO,fb=ib.apply(this,arguments);mxClient.NO_FO=jb;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:fb.className="geDisableMathJax";return fb}}Wa=null;$a=O.shapeForegroundColor;Za=O.shapeBackgroundColor; +Xa=O.enableFlowAnimation;O.enableFlowAnimation=!1;null!=O.themes&&"darkTheme"==O.defaultThemeName&&(Wa=O.stylesheet,O.stylesheet=O.getDefaultStylesheet(),O.shapeForegroundColor="#000000",O.shapeBackgroundColor="#ffffff",O.refresh());Oa.open(null,null,Qa,!0);O.enableFlowAnimation=Xa;null!=Wa&&(O.shapeForegroundColor=$a,O.shapeBackgroundColor=Za,O.stylesheet=Wa,O.refresh())}else{Xa=Ja.background;if(null==Xa||""==Xa||Xa==mxConstants.NONE)Xa="#ffffff";Oa.backgroundColor=Xa;Oa.autoOrigin=Za;Oa.appendGraph(Ja, +ab,Wa,$a,Qa,!0);Qa=Ja.getCustomFonts();if(null!=Oa.wnd)for(Wa=0;Wa<Qa.length;Wa++)$a=Qa[Wa].name,Za=Qa[Wa].url,Graph.isCssFontUrl(Za)?Oa.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Za)+'" charset="UTF-8" type="text/css">'):(Oa.wnd.document.writeln('<style type="text/css">'),Oa.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities($a)+'";\nsrc: url("'+mxUtils.htmlEntities(Za)+'");\n}'),Oa.wnd.document.writeln("</style>"))}Na&&(Ja.useCssTransforms=Na, +Ja.currentTranslate=Sa,Ja.currentScale=Ua,Ja.view.translate=Ka,Ja.view.scale=Ta);return Oa}var va=parseInt(ka.value)/100;isNaN(va)&&(va=1,ka.value="100 %");va*=.75;var ca=null,ea=O.shapeForegroundColor,da=O.shapeBackgroundColor;null!=O.themes&&"darkTheme"==O.defaultThemeName&&(ca=O.stylesheet,O.stylesheet=O.getDefaultStylesheet(),O.shapeForegroundColor="#000000",O.shapeBackgroundColor="#ffffff",O.refresh());var fa=ba.value,ja=ha.value,ra=!Y.checked,oa=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(l, +Y.checked,fa,ja,Ca.checked,Ea.value,wa.value,parseInt(la.value)/100,parseInt(ka.value)/100,La.get());else{ra&&(ra=ma.checked||fa==aa&&ja==aa);if(!ra&&null!=l.pages&&l.pages.length){var Aa=0;ra=l.pages.length-1;Y.checked||(Aa=parseInt(fa)-1,ra=parseInt(ja)-1);for(var xa=Aa;xa<=ra;xa++){var ta=l.pages[xa];fa=ta==l.currentPage?O:null;if(null==fa){fa=l.createTemporaryGraph(O.stylesheet);fa.shapeForegroundColor=O.shapeForegroundColor;fa.shapeBackgroundColor=O.shapeBackgroundColor;ja=!0;Aa=!1;var pa=null, +Ha=null;null==ta.viewState&&null==ta.root&&l.updatePageRoot(ta);null!=ta.viewState&&(ja=ta.viewState.pageVisible,Aa=ta.viewState.mathEnabled,pa=ta.viewState.background,Ha=ta.viewState.backgroundImage,fa.extFonts=ta.viewState.extFonts);null!=Ha&&null!=Ha.originalSrc&&(Ha=l.createImageForPageLink(Ha.originalSrc,ta));fa.background=pa;fa.backgroundImage=null!=Ha?new mxImage(Ha.src,Ha.width,Ha.height,Ha.x,Ha.y):null;fa.pageVisible=ja;fa.mathEnabled=Aa;var Ma=fa.getGraphBounds;fa.getGraphBounds=function(){var Ja= +Ma.apply(this,arguments),Oa=this.backgroundImage;if(null!=Oa&&null!=Oa.width&&null!=Oa.height){var Qa=this.view.translate,Na=this.view.scale;Ja=mxRectangle.fromRectangle(Ja);Ja.add(new mxRectangle((Qa.x+Oa.x)*Na,(Qa.y+Oa.y)*Na,Oa.width*Na,Oa.height*Na))}return Ja};var Ra=fa.getGlobalVariable;fa.getGlobalVariable=function(Ja){return"page"==Ja?ta.getName():"pagenumber"==Ja?xa+1:"pagecount"==Ja?null!=l.pages?l.pages.length:1:Ra.apply(this,arguments)};document.body.appendChild(fa.container);l.updatePageRoot(ta); +fa.model.setRoot(ta.root)}oa=sa(fa,oa,xa!=ra);fa!=O&&fa.container.parentNode.removeChild(fa.container)}}else oa=sa(O);null==oa?l.handleError({message:mxResources.get("errorUpdatingPreview")}):(oa.mathEnabled&&(ra=oa.wnd.document,ua&&(oa.wnd.IMMEDIATE_PRINT=!0),ra.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),oa.closeDocument(),!oa.mathEnabled&&ua&&PrintDialog.printPreview(oa));null!=ca&&(O.shapeForegroundColor=ea,O.shapeBackgroundColor=da,O.stylesheet= +ca,O.refresh())}}var O=l.editor.graph,R=document.createElement("div"),S=document.createElement("h3");S.style.width="100%";S.style.textAlign="center";S.style.marginTop="0px";mxUtils.write(S,A||mxResources.get("print"));R.appendChild(S);var X=1,aa=1;S=document.createElement("div");S.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var Y=document.createElement("input");Y.style.cssText="margin-right:8px;margin-bottom:8px;";Y.setAttribute("value","all");Y.setAttribute("type", +"radio");Y.setAttribute("name","pages-printdialog");S.appendChild(Y);A=document.createElement("span");mxUtils.write(A,mxResources.get("printAllPages"));S.appendChild(A);mxUtils.br(S);var Z=Y.cloneNode(!0);Y.setAttribute("checked","checked");Z.setAttribute("value","range");S.appendChild(Z);A=document.createElement("span");mxUtils.write(A,mxResources.get("pages")+":");S.appendChild(A);var ba=document.createElement("input");ba.style.cssText="margin:0 8px 0 8px;";ba.setAttribute("value","1");ba.setAttribute("type", +"number");ba.setAttribute("min","1");ba.style.width="50px";S.appendChild(ba);A=document.createElement("span");mxUtils.write(A,mxResources.get("to"));S.appendChild(A);var ha=ba.cloneNode(!0);S.appendChild(ha);mxEvent.addListener(ba,"focus",function(){Z.checked=!0});mxEvent.addListener(ha,"focus",function(){Z.checked=!0});mxEvent.addListener(ba,"change",M);mxEvent.addListener(ha,"change",M);if(null!=l.pages&&(X=l.pages.length,null!=l.currentPage))for(A=0;A<l.pages.length;A++)if(l.currentPage==l.pages[A]){aa= +A+1;ba.value=aa;ha.value=aa;break}ba.setAttribute("max",X);ha.setAttribute("max",X);l.isPagesEnabled()?1<X&&(R.appendChild(S),Z.checked=!0):Z.checked=!0;mxUtils.br(S);var ma=document.createElement("input");ma.setAttribute("value","all");ma.setAttribute("type","radio");ma.style.marginRight="8px";O.isSelectionEmpty()&&ma.setAttribute("disabled","disabled");var ia=document.createElement("div");ia.style.marginBottom="10px";1==X?(ma.setAttribute("type","checkbox"),ma.style.marginBottom="12px",ia.appendChild(ma)): +(ma.setAttribute("name","pages-printdialog"),ma.style.marginBottom="8px",S.appendChild(ma));A=document.createElement("span");mxUtils.write(A,mxResources.get("selectionOnly"));ma.parentNode.appendChild(A);1==X&&mxUtils.br(ma.parentNode);var qa=document.createElement("input");qa.style.marginRight="8px";qa.setAttribute("value","adjust");qa.setAttribute("type","radio");qa.setAttribute("name","printZoom");ia.appendChild(qa);A=document.createElement("span");mxUtils.write(A,mxResources.get("adjustTo")); +ia.appendChild(A);var la=document.createElement("input");la.style.cssText="margin:0 8px 0 8px;";la.setAttribute("value","100 %");la.style.width="50px";ia.appendChild(la);mxEvent.addListener(la,"focus",function(){qa.checked=!0});R.appendChild(ia);S=S.cloneNode(!1);var Ca=qa.cloneNode(!0);Ca.setAttribute("value","fit");qa.setAttribute("checked","checked");A=document.createElement("div");A.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";A.appendChild(Ca);S.appendChild(A);ia= +document.createElement("table");ia.style.display="inline-block";var Da=document.createElement("tbody"),ya=document.createElement("tr"),Pa=ya.cloneNode(!0),za=document.createElement("td"),Fa=za.cloneNode(!0),Ia=za.cloneNode(!0),Ba=za.cloneNode(!0),Ga=za.cloneNode(!0),na=za.cloneNode(!0);za.style.textAlign="right";Ba.style.textAlign="right";mxUtils.write(za,mxResources.get("fitTo"));var Ea=document.createElement("input");Ea.style.cssText="margin:0 8px 0 8px;";Ea.setAttribute("value","1");Ea.setAttribute("min", +"1");Ea.setAttribute("type","number");Ea.style.width="40px";Fa.appendChild(Ea);A=document.createElement("span");mxUtils.write(A,mxResources.get("fitToSheetsAcross"));Ia.appendChild(A);mxUtils.write(Ba,mxResources.get("fitToBy"));var wa=Ea.cloneNode(!0);Ga.appendChild(wa);mxEvent.addListener(Ea,"focus",function(){Ca.checked=!0});mxEvent.addListener(wa,"focus",function(){Ca.checked=!0});A=document.createElement("span");mxUtils.write(A,mxResources.get("fitToSheetsDown"));na.appendChild(A);ya.appendChild(za); +ya.appendChild(Fa);ya.appendChild(Ia);Pa.appendChild(Ba);Pa.appendChild(Ga);Pa.appendChild(na);Da.appendChild(ya);Da.appendChild(Pa);ia.appendChild(Da);S.appendChild(ia);R.appendChild(S);S=document.createElement("div");A=document.createElement("div");A.style.fontWeight="bold";A.style.marginBottom="12px";mxUtils.write(A,mxResources.get("paperSize"));S.appendChild(A);A=document.createElement("div");A.style.marginBottom="12px";var La=PageSetupDialog.addPageFormatPanel(A,"printdialog",l.editor.graph.pageFormat|| +mxConstants.PAGE_FORMAT_A4_PORTRAIT);S.appendChild(A);A=document.createElement("span");mxUtils.write(A,mxResources.get("pageScale"));S.appendChild(A);var ka=document.createElement("input");ka.style.cssText="margin:0 8px 0 8px;";ka.setAttribute("value","100 %");ka.style.width="60px";S.appendChild(ka);R.appendChild(S);A=document.createElement("div");A.style.cssText="text-align:right;margin:48px 0 0 0;";S=mxUtils.button(mxResources.get("cancel"),function(){l.hideDialog()});S.className="geBtn";l.editor.cancelFirst&& A.appendChild(S);l.isOffline()||(ia=mxUtils.button(mxResources.get("help"),function(){O.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),ia.className="geBtn",A.appendChild(ia));PrintDialog.previewEnabled&&(ia=mxUtils.button(mxResources.get("preview"),function(){l.hideDialog();Q(!1)}),ia.className="geBtn",A.appendChild(ia));ia=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){l.hideDialog();Q(!0)});ia.className="geBtn gePrimaryBtn";A.appendChild(ia);l.editor.cancelFirst|| A.appendChild(S);R.appendChild(A);this.container=R};var W=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var l=this.image;null!=l&&null!=l.src&&Graph.isPageLink(l.src)&&(l={originalSrc:l.src});this.page.viewState.backgroundImage=l}null!=this.format&&(this.page.viewState.pageFormat= this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else W.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible= !this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var U=document.createElement("canvas"),V=new Image;V.onload=function(){try{U.getContext("2d").drawImage(V,0,0);var l=U.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=l&&6<l.length}catch(A){}};V.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(l){}Editor.prototype.useCanvasForExport= -!1})();(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(f,k,d){d.ui=f.ui;return k};b.afterDecode=function(f,k,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(b)})(); -(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(f,k,d){d.ui=f.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.2.8";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage= +!1})();(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(f,k,e){e.ui=f.ui;return k};b.afterDecode=function(f,k,e){e.previousColor=e.color;e.previousImage=e.image;e.previousFormat=e.format;null!=e.foldingEnabled&&(e.foldingEnabled=!e.foldingEnabled);null!=e.mathEnabled&&(e.mathEnabled=!e.mathEnabled);null!=e.shadowVisible&&(e.shadowVisible=!e.shadowVisible);return e};mxCodecRegistry.register(b)})(); +(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(f,k,e){e.ui=f.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.3.0";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage= null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&& "1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35, -mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(c,e,g,q,m,n,z){n=null!=n?n:0<=c.indexOf("NetworkError")||0<=c.indexOf("SecurityError")||0<=c.indexOf("NS_ERROR_FAILURE")||0<=c.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&& -"1"!=urlParams.dev)try{if(c!=EditorUi.lastErrorMessage&&(null==c||null==e||-1==c.indexOf("Script error")&&-1==c.indexOf("extension"))&&null!=c&&0>c.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=c;var C=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";m=null!=m?m:Error(c);(new Image).src=C+"/log?severity="+n+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=q?":colno:"+ -encodeURIComponent(q):"")+(null!=m&&null!=m.stack?"&stack="+encodeURIComponent(m.stack):"")}}catch(v){}try{z||null==window.console||console.error(n,c,e,g,q,m)}catch(v){}};EditorUi.logEvent=function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi.enableLogging)try{var e=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=e+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(g){}};EditorUi.sendReport= -function(c,e){if("1"==urlParams.dev)EditorUi.debug("sendReport",c);else if(EditorUi.enableLogging)try{e=null!=e?e:5E4,c.length>e&&(c=c.substring(0,e)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],e=0;e<arguments.length;e++)c.push(arguments[e]);console.log.apply(console, +mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(c,d,g,q,m,n,z){n=null!=n?n:0<=c.indexOf("NetworkError")||0<=c.indexOf("SecurityError")||0<=c.indexOf("NS_ERROR_FAILURE")||0<=c.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&& +"1"!=urlParams.dev)try{if(c!=EditorUi.lastErrorMessage&&(null==c||null==d||-1==c.indexOf("Script error")&&-1==c.indexOf("extension"))&&null!=c&&0>c.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=c;var C=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";m=null!=m?m:Error(c);(new Image).src=C+"/log?severity="+n+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=q?":colno:"+ +encodeURIComponent(q):"")+(null!=m&&null!=m.stack?"&stack="+encodeURIComponent(m.stack):"")}}catch(x){}try{z||null==window.console||console.error(n,c,d,g,q,m)}catch(x){}};EditorUi.logEvent=function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi.enableLogging)try{var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=d+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(g){}};EditorUi.sendReport= +function(c,d){if("1"==urlParams.dev)EditorUi.debug("sendReport",c);else if(EditorUi.enableLogging)try{d=null!=d?d:5E4,c.length>d&&(c=c.substring(0,d)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],d=0;d<arguments.length;d++)c.push(arguments[d]);console.log.apply(console, c)}}catch(g){}};EditorUi.removeChildNodes=function(c){for(;null!=c.firstChild;)c.removeChild(c.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;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.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad= -!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var c=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!c.getContext||!c.getContext("2d"))}catch(m){}try{var e=document.createElement("canvas"),g=new Image;g.onload=function(){try{e.getContext("2d").drawImage(g,0,0);var m= -e.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=m&&6<m.length}catch(n){}};g.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(m){}try{e=document.createElement("canvas");e.width=e.height=1;var q=e.toDataURL("image/jpeg"); -EditorUi.prototype.jpgSupported=null!==q.match("image/jpeg")}catch(m){}})();EditorUi.prototype.openLink=function(c,e,g){return this.editor.graph.openLink(c,e,g)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalData=function(c,e){e(localStorage.getItem(c))};EditorUi.prototype.setLocalData=function(c,e,g){localStorage.setItem(c,e);null!=g&&g()};EditorUi.prototype.removeLocalData=function(c,e){localStorage.removeItem(c);e()};EditorUi.prototype.setShareCursorPosition=function(c){this.shareCursorPosition= +!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var c=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!c.getContext||!c.getContext("2d"))}catch(m){}try{var d=document.createElement("canvas"),g=new Image;g.onload=function(){try{d.getContext("2d").drawImage(g,0,0);var m= +d.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=m&&6<m.length}catch(n){}};g.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(m){}try{d=document.createElement("canvas");d.width=d.height=1;var q=d.toDataURL("image/jpeg"); +EditorUi.prototype.jpgSupported=null!==q.match("image/jpeg")}catch(m){}})();EditorUi.prototype.openLink=function(c,d,g){return this.editor.graph.openLink(c,d,g)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalData=function(c,d){d(localStorage.getItem(c))};EditorUi.prototype.setLocalData=function(c,d,g){localStorage.setItem(c,d);null!=g&&g()};EditorUi.prototype.removeLocalData=function(c,d){localStorage.removeItem(c);d()};EditorUi.prototype.setShareCursorPosition=function(c){this.shareCursorPosition= c;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(c){this.showRemoteCursors=c;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(c){this.editor.graph.mathEnabled=c;this.editor.updateGraphComponents();this.editor.graph.refresh(); this.editor.graph.defaultMathEnabled=c;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(c){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()}; -EditorUi.prototype.createSpinner=function(c,e,g){var q=null==c||null==e;g=null!=g?g:24;var m=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),n=m.spin;m.spin=function(C,v){var y=!1;this.active||(n.call(this,C),this.active=!0,null!=v&&(q&&(e=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2),y=document.createElement("div"), -y.style.position="absolute",y.style.whiteSpace="nowrap",y.style.background="#4B4243",y.style.color="white",y.style.fontFamily=Editor.defaultHtmlFont,y.style.fontSize="9pt",y.style.padding="6px",y.style.paddingLeft="10px",y.style.paddingRight="10px",y.style.zIndex=2E9,y.style.left=Math.max(0,c)+"px",y.style.top=Math.max(0,e+70)+"px",mxUtils.setPrefixedStyle(y.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(y.style, -"boxShadow","2px 2px 3px 0px #ddd"),"..."!=v.substring(v.length-3,v.length)&&"!"!=v.charAt(v.length-1)&&(v+="..."),y.innerHTML=v,C.appendChild(y),m.status=y),this.pause=mxUtils.bind(this,function(){var I=function(){};this.active&&(I=mxUtils.bind(this,function(){this.spin(C,v)}));this.stop();return I}),y=!0);return y};var z=m.stop;m.stop=function(){z.call(this);this.active=!1;null!=m.status&&null!=m.status.parentNode&&m.status.parentNode.removeChild(m.status);m.status=null};m.pause=function(){return function(){}}; -return m};EditorUi.prototype.isCompatibleString=function(c){try{var e=mxUtils.parseXml(c),g=this.editor.extractGraphModel(e.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(q){}return!1};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&& +EditorUi.prototype.createSpinner=function(c,d,g){var q=null==c||null==d;g=null!=g?g:24;var m=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),n=m.spin;m.spin=function(C,x){var y=!1;this.active||(n.call(this,C),this.active=!0,null!=x&&(q&&(d=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2),y=document.createElement("div"), +y.style.position="absolute",y.style.whiteSpace="nowrap",y.style.background="#4B4243",y.style.color="white",y.style.fontFamily=Editor.defaultHtmlFont,y.style.fontSize="9pt",y.style.padding="6px",y.style.paddingLeft="10px",y.style.paddingRight="10px",y.style.zIndex=2E9,y.style.left=Math.max(0,c)+"px",y.style.top=Math.max(0,d+70)+"px",mxUtils.setPrefixedStyle(y.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(y.style, +"boxShadow","2px 2px 3px 0px #ddd"),"..."!=x.substring(x.length-3,x.length)&&"!"!=x.charAt(x.length-1)&&(x+="..."),y.innerHTML=x,C.appendChild(y),m.status=y),this.pause=mxUtils.bind(this,function(){var I=function(){};this.active&&(I=mxUtils.bind(this,function(){this.spin(C,x)}));this.stop();return I}),y=!0);return y};var z=m.stop;m.stop=function(){z.call(this);this.active=!1;null!=m.status&&null!=m.status.parentNode&&m.status.parentNode.removeChild(m.status);m.status=null};m.pause=function(){return function(){}}; +return m};EditorUi.prototype.isCompatibleString=function(c){try{var d=mxUtils.parseXml(c),g=this.editor.extractGraphModel(d.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(q){}return!1};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&& 3==c.charCodeAt(2)&&4==c.charCodeAt(3)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&6==c.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler; -EditorUi.prototype.createKeyHandler=function(c){var e=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=e.getFunction,q=this.editor.graph,m=this;e.getFunction=function(n){if(q.isSelectionEmpty()&&null!=m.pages&&0<m.pages.length){var z=m.getSelectedPageIndex();if(mxEvent.isShiftDown(n)){if(37==n.keyCode)return function(){0<z&&m.movePage(z,z-1)};if(38==n.keyCode)return function(){0<z&&m.movePage(z,0)};if(39==n.keyCode)return function(){z<m.pages.length-1&&m.movePage(z, +EditorUi.prototype.createKeyHandler=function(c){var d=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=d.getFunction,q=this.editor.graph,m=this;d.getFunction=function(n){if(q.isSelectionEmpty()&&null!=m.pages&&0<m.pages.length){var z=m.getSelectedPageIndex();if(mxEvent.isShiftDown(n)){if(37==n.keyCode)return function(){0<z&&m.movePage(z,z-1)};if(38==n.keyCode)return function(){0<z&&m.movePage(z,0)};if(39==n.keyCode)return function(){z<m.pages.length-1&&m.movePage(z, z+1)};if(40==n.keyCode)return function(){z<m.pages.length-1&&m.movePage(z,m.pages.length-1)}}else if(mxEvent.isControlDown(n)||mxClient.IS_MAC&&mxEvent.isMetaDown(n)){if(37==n.keyCode)return function(){0<z&&m.selectNextPage(!1)};if(38==n.keyCode)return function(){0<z&&m.selectPage(m.pages[0])};if(39==n.keyCode)return function(){z<m.pages.length-1&&m.selectNextPage(!0)};if(40==n.keyCode)return function(){z<m.pages.length-1&&m.selectPage(m.pages[m.pages.length-1])}}}return!(65<=n.keyCode&&90>=n.keyCode)|| -q.isSelectionEmpty()||mxEvent.isAltDown(n)||mxEvent.isShiftDown(n)||mxEvent.isControlDown(n)||mxClient.IS_MAC&&mxEvent.isMetaDown(n)?g.apply(this,arguments):null}}return e};var f=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var e=f.apply(this,arguments);if(null==e)try{var g=c.indexOf("<mxfile ");if(0<=g){var q=c.lastIndexOf("</mxfile>");q>g&&(e=c.substring(g,q+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g, -""))}else{var m=mxUtils.parseXml(c),n=this.editor.extractGraphModel(m.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);e=null!=n?mxUtils.getXml(n):""}}catch(z){}return e};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var e=c.indexOf('<meta charset="utf-8">');0<=e&&(c=c.slice(0,e)+'<meta charset="utf-8"/>'+c.slice(e+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c){c=this.validateFileData(c); -c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var e=null!=c?this.editor.extractGraphModel(c,!0):null;null!=e&&(c=e);if(null!=c){e=this.editor.graph;e.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,q=c.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<q.length||1==q.length&&q[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var m=q.length-1;0<=m;m--){var n=this.updatePageRoot(new DiagramPage(q[m]));null==n.getName()&& -n.setName(mxResources.get("pageWithNumber",[m+1]));e.model.execute(new ChangePage(this,n,0==m?n:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),e.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root); -if(null!=g)for(m=0;m<g.length;m++)e.model.execute(new ChangePage(this,g[m],null))}finally{e.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,e,g,q,m,n,z,C,v,y,I){e=null!=e?e:this.editor.graph;m=null!=m?m:!1;v=null!=v?v:!0;var N=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var t="_blank";else N=t=q;if(null==c)return"";var p=c;if("mxfile"!=p.nodeName.toLowerCase()){if(I){var F=c.ownerDocument.createElement("diagram");F.setAttribute("id",Editor.guid()); +q.isSelectionEmpty()||mxEvent.isAltDown(n)||mxEvent.isShiftDown(n)||mxEvent.isControlDown(n)||mxClient.IS_MAC&&mxEvent.isMetaDown(n)?g.apply(this,arguments):null}}return d};var f=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var d=f.apply(this,arguments);if(null==d)try{var g=c.indexOf("<mxfile ");if(0<=g){var q=c.lastIndexOf("</mxfile>");q>g&&(d=c.substring(g,q+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g, +""))}else{var m=mxUtils.parseXml(c),n=this.editor.extractGraphModel(m.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);d=null!=n?mxUtils.getXml(n):""}}catch(z){}return d};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var d=c.indexOf('<meta charset="utf-8">');0<=d&&(c=c.slice(0,d)+'<meta charset="utf-8"/>'+c.slice(d+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c){c=this.validateFileData(c); +c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var d=null!=c?this.editor.extractGraphModel(c,!0):null;null!=d&&(c=d);if(null!=c){d=this.editor.graph;d.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,q=c.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<q.length||1==q.length&&q[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var m=q.length-1;0<=m;m--){var n=this.updatePageRoot(new DiagramPage(q[m]));null==n.getName()&& +n.setName(mxResources.get("pageWithNumber",[m+1]));d.model.execute(new ChangePage(this,n,0==m?n:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),d.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root); +if(null!=g)for(m=0;m<g.length;m++)d.model.execute(new ChangePage(this,g[m],null))}finally{d.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,d,g,q,m,n,z,C,x,y,I){d=null!=d?d:this.editor.graph;m=null!=m?m:!1;x=null!=x?x:!0;var N=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var t="_blank";else N=t=q;if(null==c)return"";var p=c;if("mxfile"!=p.nodeName.toLowerCase()){if(I){var F=c.ownerDocument.createElement("diagram");F.setAttribute("id",Editor.guid()); F.appendChild(c)}else{F=Graph.zapGremlins(mxUtils.getXml(c));p=Graph.compress(F);if(Graph.decompress(p)!=F)return F;F=c.ownerDocument.createElement("diagram");F.setAttribute("id",Editor.guid());mxUtils.setTextContent(F,p)}p=c.ownerDocument.createElement("mxfile");p.appendChild(F)}y?(p=p.cloneNode(!0),p.removeAttribute("modified"),p.removeAttribute("host"),p.removeAttribute("agent"),p.removeAttribute("etag"),p.removeAttribute("userAgent"),p.removeAttribute("version"),p.removeAttribute("editor"),p.removeAttribute("type")): (p.removeAttribute("userAgent"),p.removeAttribute("version"),p.removeAttribute("editor"),p.removeAttribute("pages"),p.removeAttribute("type"),mxClient.IS_CHROMEAPP?p.setAttribute("host","Chrome"):EditorUi.isElectronApp?p.setAttribute("host","Electron"):p.setAttribute("host",window.location.hostname),p.setAttribute("modified",(new Date).toISOString()),p.setAttribute("agent",navigator.appVersion),p.setAttribute("version",EditorUi.VERSION),p.setAttribute("etag",Editor.guid()),c=null!=g?g.getMode():this.mode, -null!=c&&p.setAttribute("type",c),1<p.getElementsByTagName("diagram").length&&null!=this.pages&&p.setAttribute("pages",this.pages.length));I=I?mxUtils.getPrettyXml(p):mxUtils.getXml(p);if(!n&&!m&&(z||null!=g&&/(\.html)$/i.test(g.getTitle())))I=this.getHtml2(mxUtils.getXml(p),e,null!=g?g.getTitle():null,t,N);else if(n||!m&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(q=null),I=this.getEmbeddedSvg(I,e,q,null,C,v,N);return I};EditorUi.prototype.getXmlFileData= -function(c,e,g,q){c=null!=c?c:!0;e=null!=e?e:!1;g=null!=g?g:!Editor.compressXml;var m=this.editor.getGraphXml(c,q);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(v){var y=v.getElementsByTagName("mxGraphModel");y=0<y.length?y[0]:null;null==y&&g?(y=mxUtils.trim(mxUtils.getTextContent(v)),v=v.cloneNode(!1),0<y.length&&(y=Graph.decompress(y),null!=y&&0<y.length&&v.appendChild(mxUtils.parseXml(y).documentElement))):null==y||g?v=v.cloneNode(!0):(v=v.cloneNode(!1),mxUtils.setTextContent(v, -Graph.compressNode(y)));m.appendChild(v)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(m)),m=this.fileNode.cloneNode(!1),e)c(this.currentPage.node);else for(e=0;e<this.pages.length;e++){var n=this.pages[e],z=n.node;if(n!=this.currentPage)if(n.needsUpdate){var C=new mxCodec(mxUtils.createXmlDocument());C=C.encode(new mxGraphModel(n.root));this.editor.graph.saveViewState(n.viewState,C,null,q);EditorUi.removeChildNodes(z);mxUtils.setTextContent(z, +null!=c&&p.setAttribute("type",c),1<p.getElementsByTagName("diagram").length&&null!=this.pages&&p.setAttribute("pages",this.pages.length));I=I?mxUtils.getPrettyXml(p):mxUtils.getXml(p);if(!n&&!m&&(z||null!=g&&/(\.html)$/i.test(g.getTitle())))I=this.getHtml2(mxUtils.getXml(p),d,null!=g?g.getTitle():null,t,N);else if(n||!m&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(q=null),I=this.getEmbeddedSvg(I,d,q,null,C,x,N);return I};EditorUi.prototype.getXmlFileData= +function(c,d,g,q){c=null!=c?c:!0;d=null!=d?d:!1;g=null!=g?g:!Editor.compressXml;var m=this.editor.getGraphXml(c,q);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(x){var y=x.getElementsByTagName("mxGraphModel");y=0<y.length?y[0]:null;null==y&&g?(y=mxUtils.trim(mxUtils.getTextContent(x)),x=x.cloneNode(!1),0<y.length&&(y=Graph.decompress(y),null!=y&&0<y.length&&x.appendChild(mxUtils.parseXml(y).documentElement))):null==y||g?x=x.cloneNode(!0):(x=x.cloneNode(!1),mxUtils.setTextContent(x, +Graph.compressNode(y)));m.appendChild(x)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(m)),m=this.fileNode.cloneNode(!1),d)c(this.currentPage.node);else for(d=0;d<this.pages.length;d++){var n=this.pages[d],z=n.node;if(n!=this.currentPage)if(n.needsUpdate){var C=new mxCodec(mxUtils.createXmlDocument());C=C.encode(new mxGraphModel(n.root));this.editor.graph.saveViewState(n.viewState,C,null,q);EditorUi.removeChildNodes(z);mxUtils.setTextContent(z, Graph.compressNode(C));delete n.needsUpdate}else q&&(this.updatePageRoot(n),null!=n.viewState.backgroundImage&&(null!=n.viewState.backgroundImage.originalSrc?n.viewState.backgroundImage=this.createImageForPageLink(n.viewState.backgroundImage.originalSrc,n):Graph.isPageLink(n.viewState.backgroundImage.src)&&(n.viewState.backgroundImage=this.createImageForPageLink(n.viewState.backgroundImage.src,n))),null!=n.viewState.backgroundImage&&null!=n.viewState.backgroundImage.originalSrc&&(C=new mxCodec(mxUtils.createXmlDocument()), -C=C.encode(new mxGraphModel(n.root)),this.editor.graph.saveViewState(n.viewState,C,null,q),z=z.cloneNode(!1),mxUtils.setTextContent(z,Graph.compressNode(C))));c(z)}return m};EditorUi.prototype.anonymizeString=function(c,e){for(var g=[],q=0;q<c.length;q++){var m=c.charAt(q);0<=EditorUi.ignoredAnonymizedChars.indexOf(m)?g.push(m):isNaN(parseInt(m))?m.toLowerCase()!=m?g.push(String.fromCharCode(65+Math.round(25*Math.random()))):m.toUpperCase()!=m?g.push(String.fromCharCode(97+Math.round(25*Math.random()))): -/\s/.test(m)?g.push(" "):g.push("?"):g.push(e?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=function(c){if(null!=c[EditorUi.DIFF_INSERT])for(var e=0;e<c[EditorUi.DIFF_INSERT].length;e++)try{var g=mxUtils.parseXml(c[EditorUi.DIFF_INSERT][e].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name")));c[EditorUi.DIFF_INSERT][e].data=mxUtils.getXml(g)}catch(n){c[EditorUi.DIFF_INSERT][e].data= -n.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var q in c[EditorUi.DIFF_UPDATE]){var m=c[EditorUi.DIFF_UPDATE][q];null!=m.name&&(m.name=this.anonymizeString(m.name));null!=m.cells&&(e=mxUtils.bind(this,function(n){var z=m.cells[n];if(null!=z){for(var C in z)null!=z[C].value&&(z[C].value="["+z[C].value.length+"]"),null!=z[C].xmlValue&&(z[C].xmlValue="["+z[C].xmlValue.length+"]"),null!=z[C].style&&(z[C].style="["+z[C].style.length+"]"),mxUtils.isEmptyObject(z[C])&&delete z[C];mxUtils.isEmptyObject(z)&& -delete m.cells[n]}}),e(EditorUi.DIFF_INSERT),e(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(m.cells)&&delete m.cells);mxUtils.isEmptyObject(m)&&delete c[EditorUi.DIFF_UPDATE][q]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,e){if(null!=c.attributes)for(var g=0;g<c.attributes.length;g++)"as"!=c.attributes[g].name&&c.setAttribute(c.attributes[g].name,this.anonymizeString(c.attributes[g].value,e));if(null!=c.childNodes)for(g= -0;g<c.childNodes.length;g++)this.anonymizeAttributes(c.childNodes[g],e)};EditorUi.prototype.anonymizeNode=function(c,e){e=c.getElementsByTagName("mxCell");for(var g=0;g<e.length;g++)null!=e[g].getAttribute("value")&&e[g].setAttribute("value","["+e[g].getAttribute("value").length+"]"),null!=e[g].getAttribute("xmlValue")&&e[g].setAttribute("xmlValue","["+e[g].getAttribute("xmlValue").length+"]"),null!=e[g].getAttribute("style")&&e[g].setAttribute("style","["+e[g].getAttribute("style").length+"]"),null!= -e[g].parentNode&&"root"!=e[g].parentNode.nodeName&&null!=e[g].parentNode.parentNode&&(e[g].setAttribute("id",e[g].parentNode.getAttribute("id")),e[g].parentNode.parentNode.replaceChild(e[g],e[g].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var e=this.getCurrentFile();null!=e&&(e.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&e.invalidChecksum?e.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(e.clearAutosave(), -this.editor.setStatus(""),c?e.reloadFile(mxUtils.bind(this,function(){e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){e.handleFileError(g,!0)})):e.synchronizeFile(mxUtils.bind(this,function(){e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){e.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(c,e,g,q,m,n,z,C,v,y,I){m=null!=m?m:!0;n=null!=n?n:!1;var N=this.editor.graph;if(e||!c&&null!=v&&/(\.svg)$/i.test(v.getTitle())){var t= +C=C.encode(new mxGraphModel(n.root)),this.editor.graph.saveViewState(n.viewState,C,null,q),z=z.cloneNode(!1),mxUtils.setTextContent(z,Graph.compressNode(C))));c(z)}return m};EditorUi.prototype.anonymizeString=function(c,d){for(var g=[],q=0;q<c.length;q++){var m=c.charAt(q);0<=EditorUi.ignoredAnonymizedChars.indexOf(m)?g.push(m):isNaN(parseInt(m))?m.toLowerCase()!=m?g.push(String.fromCharCode(65+Math.round(25*Math.random()))):m.toUpperCase()!=m?g.push(String.fromCharCode(97+Math.round(25*Math.random()))): +/\s/.test(m)?g.push(" "):g.push("?"):g.push(d?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=function(c){if(null!=c[EditorUi.DIFF_INSERT])for(var d=0;d<c[EditorUi.DIFF_INSERT].length;d++)try{var g=mxUtils.parseXml(c[EditorUi.DIFF_INSERT][d].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name")));c[EditorUi.DIFF_INSERT][d].data=mxUtils.getXml(g)}catch(n){c[EditorUi.DIFF_INSERT][d].data= +n.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var q in c[EditorUi.DIFF_UPDATE]){var m=c[EditorUi.DIFF_UPDATE][q];null!=m.name&&(m.name=this.anonymizeString(m.name));null!=m.cells&&(d=mxUtils.bind(this,function(n){var z=m.cells[n];if(null!=z){for(var C in z)null!=z[C].value&&(z[C].value="["+z[C].value.length+"]"),null!=z[C].xmlValue&&(z[C].xmlValue="["+z[C].xmlValue.length+"]"),null!=z[C].style&&(z[C].style="["+z[C].style.length+"]"),mxUtils.isEmptyObject(z[C])&&delete z[C];mxUtils.isEmptyObject(z)&& +delete m.cells[n]}}),d(EditorUi.DIFF_INSERT),d(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(m.cells)&&delete m.cells);mxUtils.isEmptyObject(m)&&delete c[EditorUi.DIFF_UPDATE][q]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,d){if(null!=c.attributes)for(var g=0;g<c.attributes.length;g++)"as"!=c.attributes[g].name&&c.setAttribute(c.attributes[g].name,this.anonymizeString(c.attributes[g].value,d));if(null!=c.childNodes)for(g= +0;g<c.childNodes.length;g++)this.anonymizeAttributes(c.childNodes[g],d)};EditorUi.prototype.anonymizeNode=function(c,d){d=c.getElementsByTagName("mxCell");for(var g=0;g<d.length;g++)null!=d[g].getAttribute("value")&&d[g].setAttribute("value","["+d[g].getAttribute("value").length+"]"),null!=d[g].getAttribute("xmlValue")&&d[g].setAttribute("xmlValue","["+d[g].getAttribute("xmlValue").length+"]"),null!=d[g].getAttribute("style")&&d[g].setAttribute("style","["+d[g].getAttribute("style").length+"]"),null!= +d[g].parentNode&&"root"!=d[g].parentNode.nodeName&&null!=d[g].parentNode.parentNode&&(d[g].setAttribute("id",d[g].parentNode.getAttribute("id")),d[g].parentNode.parentNode.replaceChild(d[g],d[g].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var d=this.getCurrentFile();null!=d&&(d.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&d.invalidChecksum?d.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(d.clearAutosave(), +this.editor.setStatus(""),c?d.reloadFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){d.handleFileError(g,!0)})):d.synchronizeFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){d.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(c,d,g,q,m,n,z,C,x,y,I){m=null!=m?m:!0;n=null!=n?n:!1;var N=this.editor.graph;if(d||!c&&null!=x&&/(\.svg)$/i.test(x.getTitle())){var t= null!=N.themes&&"darkTheme"==N.defaultThemeName;y=!1;if(t||null!=this.pages&&this.currentPage!=this.pages[0]){var p=N.getGlobalVariable;N=this.createTemporaryGraph(t?N.getDefaultStylesheet():N.getStylesheet());N.setBackgroundImage=this.editor.graph.setBackgroundImage;N.background=this.editor.graph.background;var F=this.pages[0];this.currentPage==F?N.setBackgroundImage(this.editor.graph.backgroundImage):null!=F.viewState&&null!=F.viewState&&N.setBackgroundImage(F.viewState.backgroundImage);N.getGlobalVariable= -function(J){return"page"==J?F.getName():"pagenumber"==J?1:p.apply(this,arguments)};document.body.appendChild(N.container);N.model.setRoot(F.root)}}z=null!=z?z:this.getXmlFileData(m,n,y,I);v=null!=v?v:this.getCurrentFile();c=this.createFileData(z,N,v,window.location.href,c,e,g,q,m,C,y);N!=this.editor.graph&&N.container.parentNode.removeChild(N.container);return c};EditorUi.prototype.getHtml=function(c,e,g,q,m,n){n=null!=n?n:!0;var z=null,C=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=e){z= -n?e.getGraphBounds():e.getBoundingBox(e.getSelectionCells());var v=e.view.scale;n=Math.floor(z.x/v-e.view.translate.x);v=Math.floor(z.y/v-e.view.translate.y);z=e.background;null==m&&(e=this.getBasenames().join(";"),0<e.length&&(C=EditorUi.drawHost+"/embed.js?s="+e));c.setAttribute("x0",n);c.setAttribute("y0",v)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=q&&c.setAttribute("edit", +function(K){return"page"==K?F.getName():"pagenumber"==K?1:p.apply(this,arguments)};document.body.appendChild(N.container);N.model.setRoot(F.root)}}z=null!=z?z:this.getXmlFileData(m,n,y,I);x=null!=x?x:this.getCurrentFile();c=this.createFileData(z,N,x,window.location.href,c,d,g,q,m,C,y);N!=this.editor.graph&&N.container.parentNode.removeChild(N.container);return c};EditorUi.prototype.getHtml=function(c,d,g,q,m,n){n=null!=n?n:!0;var z=null,C=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=d){z= +n?d.getGraphBounds():d.getBoundingBox(d.getSelectionCells());var x=d.view.scale;n=Math.floor(z.x/x-d.view.translate.x);x=Math.floor(z.y/x-d.view.translate.y);z=d.background;null==m&&(d=this.getBasenames().join(";"),0<d.length&&(C=EditorUi.drawHost+"/embed.js?s="+d));c.setAttribute("x0",n);c.setAttribute("y0",x)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=q&&c.setAttribute("edit", q));null!=m&&(m=m.replace(/&/g,"&"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";q=Graph.compress(c);Graph.decompress(q)!=c&&(q=encodeURIComponent(c));return(null==m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=m?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==m?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=m?'<meta http-equiv="refresh" content="0;URL=\''+ m+"'\"/>\n":"")+"</head>\n<body"+(null==m&&null!=z&&z!=mxConstants.NONE?' style="background-color:'+z+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+q+"</div>\n</div>\n"+(null==m?'<script type="text/javascript" src="'+C+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+m+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+ -"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(c,e,g,q,m){e=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=m&&(m=m.replace(/&/g,"&"));c={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(c),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n': +"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(c,d,g,q,m){d=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=m&&(m=m.replace(/&/g,"&"));c={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(c),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n': "")+"<!DOCTYPE html>\n<html"+(null!=m?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==m?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=m?'<meta http-equiv="refresh" content="0;URL=\''+m+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>\n'+(null==m?'<script type="text/javascript" src="'+ -e+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+m+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(c){c=this.validateFileData(c);this.pages=this.fileNode=this.currentPage=null;var e=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,g=Editor.extractParserError(e,mxResources.get("invalidOrMissingFile"));if(g)throw EditorUi.debug("EditorUi.setFileData ParserError", -[this],"data",[c],"node",[e],"cause",[g]),Error(mxResources.get("notADiagramFile")+" ("+g+")");c=null!=e?this.editor.extractGraphModel(e,!0):null;null!=c&&(e=c);if(null!=e&&"mxfile"==e.nodeName&&(c=e.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name"))){g=null;this.fileNode=e;this.pages=[];for(var q=0;q<c.length;q++)null==c[q].getAttribute("id")&&c[q].setAttribute("id",q),e=new DiagramPage(c[q]),null==e.getName()&&e.setName(mxResources.get("pageWithNumber", -[q+1])),this.pages.push(e),null!=urlParams["page-id"]&&e.getId()==urlParams["page-id"]&&(g=e);this.currentPage=null!=g?g:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];e=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=e&&(this.fileNode=e.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(e.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(e); -null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var m=urlParams["layer-ids"].split(" ");e={};for(q=0;q<m.length;q++)e[m[q]]=!0;var n=this.editor.graph.getModel(),z=n.getChildren(n.root);for(q=0;q<z.length;q++){var C=z[q];n.setVisible(C,e[C.id]||!1)}}catch(v){}};EditorUi.prototype.getBaseFilename=function(c){var e=this.getCurrentFile();e=null!=e&&null!=e.getTitle()?e.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(e)||/(\.html)$/i.test(e)|| -/(\.svg)$/i.test(e)||/(\.png)$/i.test(e))e=e.substring(0,e.lastIndexOf("."));/(\.drawio)$/i.test(e)&&(e=e.substring(0,e.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(e=e+"-"+this.currentPage.getName());return e};EditorUi.prototype.downloadFile=function(c,e,g,q,m,n,z,C,v,y,I,N){try{q=null!=q?q:this.editor.graph.isSelectionEmpty();var t=this.getBaseFilename("remoteSvg"==c? -!1:!m),p=t+("xml"==c||"pdf"==c&&I?".drawio":"")+"."+c;if("xml"==c){var F=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,q,m,null,null,null,e);this.saveData(p,c,F,"text/xml")}else if("html"==c)F=this.getHtml2(this.getFileData(!0),this.editor.graph,t),this.saveData(p,c,F,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==c)p=t+".png";else if("jpeg"==c)p=t+".jpg";else if("remoteSvg"==c){p=t+".svg";c="svg";var J=parseInt(v); -"string"===typeof C&&0<C.indexOf("%")&&(C=parseInt(C)/100);if(0<J){var M=this.editor.graph,H=M.getGraphBounds();var G=Math.ceil(H.width*C/M.view.scale+2*J);var E=Math.ceil(H.height*C/M.view.scale+2*J)}}this.saveRequest(p,c,mxUtils.bind(this,function(V,l){try{var A=this.editor.graph.pageVisible;0==n&&(this.editor.graph.pageVisible=n);var L=this.createDownloadRequest(V,c,q,l,z,m,C,v,y,I,N,G,E);this.editor.graph.pageVisible=A;return L}catch(Q){this.handleError(Q)}}))}else{var P=null,T=mxUtils.bind(this, +d+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+m+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(c){c=this.validateFileData(c);this.pages=this.fileNode=this.currentPage=null;var d=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,g=Editor.extractParserError(d,mxResources.get("invalidOrMissingFile"));if(g)throw EditorUi.debug("EditorUi.setFileData ParserError", +[this],"data",[c],"node",[d],"cause",[g]),Error(mxResources.get("notADiagramFile")+" ("+g+")");c=null!=d?this.editor.extractGraphModel(d,!0):null;null!=c&&(d=c);if(null!=d&&"mxfile"==d.nodeName&&(c=d.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name"))){g=null;this.fileNode=d;this.pages=[];for(var q=0;q<c.length;q++)null==c[q].getAttribute("id")&&c[q].setAttribute("id",q),d=new DiagramPage(c[q]),null==d.getName()&&d.setName(mxResources.get("pageWithNumber", +[q+1])),this.pages.push(d),null!=urlParams["page-id"]&&d.getId()==urlParams["page-id"]&&(g=d);this.currentPage=null!=g?g:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];d=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=d&&(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(d); +null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var m=urlParams["layer-ids"].split(" ");d={};for(q=0;q<m.length;q++)d[m[q]]=!0;var n=this.editor.graph.getModel(),z=n.getChildren(n.root);for(q=0;q<z.length;q++){var C=z[q];n.setVisible(C,d[C.id]||!1)}}catch(x){}};EditorUi.prototype.getBaseFilename=function(c){var d=this.getCurrentFile();d=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(d)||/(\.html)$/i.test(d)|| +/(\.svg)$/i.test(d)||/(\.png)$/i.test(d))d=d.substring(0,d.lastIndexOf("."));/(\.drawio)$/i.test(d)&&(d=d.substring(0,d.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(d=d+"-"+this.currentPage.getName());return d};EditorUi.prototype.downloadFile=function(c,d,g,q,m,n,z,C,x,y,I,N){try{q=null!=q?q:this.editor.graph.isSelectionEmpty();var t=this.getBaseFilename("remoteSvg"==c? +!1:!m),p=t+("xml"==c||"pdf"==c&&I?".drawio":"")+"."+c;if("xml"==c){var F=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,q,m,null,null,null,d);this.saveData(p,c,F,"text/xml")}else if("html"==c)F=this.getHtml2(this.getFileData(!0),this.editor.graph,t),this.saveData(p,c,F,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==c)p=t+".png";else if("jpeg"==c)p=t+".jpg";else if("remoteSvg"==c){p=t+".svg";c="svg";var K=parseInt(x); +"string"===typeof C&&0<C.indexOf("%")&&(C=parseInt(C)/100);if(0<K){var D=this.editor.graph,H=D.getGraphBounds();var J=Math.ceil(H.width*C/D.view.scale+2*K);var G=Math.ceil(H.height*C/D.view.scale+2*K)}}this.saveRequest(p,c,mxUtils.bind(this,function(V,l){try{var A=this.editor.graph.pageVisible;0==n&&(this.editor.graph.pageVisible=n);var M=this.createDownloadRequest(V,c,q,l,z,m,C,x,y,I,N,J,G);this.editor.graph.pageVisible=A;return M}catch(Q){this.handleError(Q)}}))}else{var P=null,T=mxUtils.bind(this, function(V){V.length<=MAX_REQUEST_SIZE?this.saveData(p,"svg",V,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(P)}))});if("svg"==c){var W=this.editor.graph.background;if(z||W==mxConstants.NONE)W=null;var U=this.editor.graph.getSvg(W,null,null,null,null,q);g&&this.editor.graph.addSvgShadow(U);this.editor.convertImages(U,mxUtils.bind(this,mxUtils.bind(this,function(V){this.spinner.stop();T(Graph.xmlDeclaration+ -"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(V))})))}else p=t+".svg",P=this.getFileData(!1,!0,null,mxUtils.bind(this,function(V){this.spinner.stop();T(V)}),q)}}catch(V){this.handleError(V)}};EditorUi.prototype.createDownloadRequest=function(c,e,g,q,m,n,z,C,v,y,I,N,t){var p=this.editor.graph,F=p.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==n?!1:"xmlpng"!=e,null,null,null,!1,"pdf"==e);var J="",M="";if(F.width*F.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")}; -y=y?"1":"0";"pdf"==e&&(null!=I?M="&from="+I.from+"&to="+I.to:0==n&&(M="&allPages=1"));"xmlpng"==e&&(y="1",e="png");if(("xmlpng"==e||"svg"==e)&&null!=this.pages&&null!=this.currentPage)for(n=0;n<this.pages.length;n++)if(this.pages[n]==this.currentPage){J="&from="+n;break}n=p.background;"png"!=e&&"pdf"!=e&&"svg"!=e||!m?m||null!=n&&n!=mxConstants.NONE||(n="#ffffff"):n=mxConstants.NONE;m={globalVars:p.getExportVariables()};v&&(m.grid={size:p.gridSize,steps:p.view.gridSteps,color:p.view.gridColor});Graph.translateDiagram&& -(m.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+e+J+M+"&bg="+(null!=n?n:mxConstants.NONE)+"&base64="+q+"&embedXml="+y+"&xml="+encodeURIComponent(g)+(null!=c?"&filename="+encodeURIComponent(c):"")+"&extras="+encodeURIComponent(JSON.stringify(m))+(null!=z?"&scale="+z:"")+(null!=C?"&border="+C:"")+(N&&isFinite(N)?"&w="+N:"")+(t&&isFinite(t)?"&h="+t:""))};EditorUi.prototype.setMode=function(c,e){this.mode=c};EditorUi.prototype.loadDescriptor=function(c,e,g){var q= -window.location.hash,m=mxUtils.bind(this,function(z){var C=null!=c.data?c.data:"";null!=z&&0<z.length&&(0<C.length&&(C+="\n"),C+=z);z=new LocalFile(this,"csv"!=c.format&&0<C.length?C:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);z.getHash=function(){return q};this.fileLoaded(z);"csv"==c.format&&this.importCsv(C,mxUtils.bind(this,function(t){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var v= +"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(V))})))}else p=t+".svg",P=this.getFileData(!1,!0,null,mxUtils.bind(this,function(V){this.spinner.stop();T(V)}),q)}}catch(V){this.handleError(V)}};EditorUi.prototype.createDownloadRequest=function(c,d,g,q,m,n,z,C,x,y,I,N,t){var p=this.editor.graph,F=p.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==n?!1:"xmlpng"!=d,null,null,null,!1,"pdf"==d);var K="",D="";if(F.width*F.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")}; +y=y?"1":"0";"pdf"==d&&(null!=I?D="&from="+I.from+"&to="+I.to:0==n&&(D="&allPages=1"));"xmlpng"==d&&(y="1",d="png");if(("xmlpng"==d||"svg"==d)&&null!=this.pages&&null!=this.currentPage)for(n=0;n<this.pages.length;n++)if(this.pages[n]==this.currentPage){K="&from="+n;break}n=p.background;"png"!=d&&"pdf"!=d&&"svg"!=d||!m?m||null!=n&&n!=mxConstants.NONE||(n="#ffffff"):n=mxConstants.NONE;m={globalVars:p.getExportVariables()};x&&(m.grid={size:p.gridSize,steps:p.view.gridSteps,color:p.view.gridColor});Graph.translateDiagram&& +(m.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+d+K+D+"&bg="+(null!=n?n:mxConstants.NONE)+"&base64="+q+"&embedXml="+y+"&xml="+encodeURIComponent(g)+(null!=c?"&filename="+encodeURIComponent(c):"")+"&extras="+encodeURIComponent(JSON.stringify(m))+(null!=z?"&scale="+z:"")+(null!=C?"&border="+C:"")+(N&&isFinite(N)?"&w="+N:"")+(t&&isFinite(t)?"&h="+t:""))};EditorUi.prototype.setMode=function(c,d){this.mode=c};EditorUi.prototype.loadDescriptor=function(c,d,g){var q= +window.location.hash,m=mxUtils.bind(this,function(z){var C=null!=c.data?c.data:"";null!=z&&0<z.length&&(0<C.length&&(C+="\n"),C+=z);z=new LocalFile(this,"csv"!=c.format&&0<C.length?C:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);z.getHash=function(){return q};this.fileLoaded(z);"csv"==c.format&&this.importCsv(C,mxUtils.bind(this,function(t){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var x= null!=c.interval?parseInt(c.interval):6E4,y=null,I=mxUtils.bind(this,function(){var t=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(p){t===this.currentPage&&(200<=p.getStatus()&&300>=p.getStatus()?(this.updateDiagram(p.getText()),N()):this.handleError({message:mxResources.get("error")+" "+p.getStatus()}))}),mxUtils.bind(this,function(p){this.handleError(p)}))}),N=mxUtils.bind(this,function(){window.clearTimeout(y); -y=window.setTimeout(I,v)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){N();I()}));N();I()}null!=e&&e()});if(null!=c.url&&0<c.url.length){var n=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(n,mxUtils.bind(this,function(z){m(z)}),mxUtils.bind(this,function(z){null!=g&&g(z)}))}else m("")};EditorUi.prototype.updateDiagram=function(c){function e(E){var P=new mxCellOverlay(E.image||m.warningImage,E.tooltip,E.align,E.valign,E.offset);P.addListener(mxEvent.CLICK,function(T, -W){q.alert(E.tooltip)});return P}var g=null,q=this;if(null!=c&&0<c.length&&(g=mxUtils.parseXml(c),c=null!=g?g.documentElement:null,null!=c&&"updates"==c.nodeName)){var m=this.editor.graph,n=m.getModel();n.beginUpdate();var z=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var C=n.getCell(c.getAttribute("id"));if(null!=C){try{var v=c.getAttribute("value");if(null!=v){var y=mxUtils.parseXml(v).documentElement;if(null!=y)if("1"==y.getAttribute("replace-value"))n.setValue(C,y);else for(var I= -y.attributes,N=0;N<I.length;N++)m.setAttributeForCell(C,I[N].nodeName,0<I[N].nodeValue.length?I[N].nodeValue:null)}}catch(E){null!=window.console&&console.log("Error in value for "+C.id+": "+E)}try{var t=c.getAttribute("style");null!=t&&m.model.setStyle(C,t)}catch(E){null!=window.console&&console.log("Error in style for "+C.id+": "+E)}try{var p=c.getAttribute("icon");if(null!=p){var F=0<p.length?JSON.parse(p):null;null!=F&&F.append||m.removeCellOverlays(C);null!=F&&m.addCellOverlay(C,e(F))}}catch(E){null!= -window.console&&console.log("Error in icon for "+C.id+": "+E)}try{var J=c.getAttribute("geometry");if(null!=J){J=JSON.parse(J);var M=m.getCellGeometry(C);if(null!=M){M=M.clone();for(key in J){var H=parseFloat(J[key]);"dx"==key?M.x+=H:"dy"==key?M.y+=H:"dw"==key?M.width+=H:"dh"==key?M.height+=H:M[key]=parseFloat(J[key])}m.model.setGeometry(C,M)}}}catch(E){null!=window.console&&console.log("Error in icon for "+C.id+": "+E)}}}else if("model"==c.nodeName){for(var G=c.firstChild;null!=G&&G.nodeType!=mxConstants.NODETYPE_ELEMENT;)G= -G.nextSibling;null!=G&&(new mxCodec(c.firstChild)).decode(G,n)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(m.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))m.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(z=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{n.endUpdate()}null!=z&&this.chromelessResize&&this.chromelessResize(!0, -z)}return g};EditorUi.prototype.getCopyFilename=function(c,e){var g=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var q=g.lastIndexOf(".");0<=q&&(c=g.substring(q),g=g.substring(0,q));if(e){e=g;var m=new Date;g=m.getFullYear();q=m.getMonth()+1;var n=m.getDate(),z=m.getHours(),C=m.getMinutes();m=m.getSeconds();g=e+(" "+(g+"-"+q+"-"+n+"-"+z+"-"+C+"-"+m))}return g=mxResources.get("copyOf",[g])+c};EditorUi.prototype.fileLoaded=function(c,e){var g=this.getCurrentFile();this.fileEditable= -this.fileLoadedError=null;this.setCurrentFile(null);var q=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var m=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=g&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!e&&null!=window.location.hash&&0<window.location.hash.length&& -(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();e||this.showSplash()});if(null!=c)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(c);c.addListener("descriptorChanged",this.descriptorChangedListener);c.addListener("contentChanged",this.descriptorChangedListener);c.open(); +y=window.setTimeout(I,x)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){N();I()}));N();I()}null!=d&&d()});if(null!=c.url&&0<c.url.length){var n=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(n,mxUtils.bind(this,function(z){m(z)}),mxUtils.bind(this,function(z){null!=g&&g(z)}))}else m("")};EditorUi.prototype.updateDiagram=function(c){function d(G){var P=new mxCellOverlay(G.image||m.warningImage,G.tooltip,G.align,G.valign,G.offset);P.addListener(mxEvent.CLICK,function(T, +W){q.alert(G.tooltip)});return P}var g=null,q=this;if(null!=c&&0<c.length&&(g=mxUtils.parseXml(c),c=null!=g?g.documentElement:null,null!=c&&"updates"==c.nodeName)){var m=this.editor.graph,n=m.getModel();n.beginUpdate();var z=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var C=n.getCell(c.getAttribute("id"));if(null!=C){try{var x=c.getAttribute("value");if(null!=x){var y=mxUtils.parseXml(x).documentElement;if(null!=y)if("1"==y.getAttribute("replace-value"))n.setValue(C,y);else for(var I= +y.attributes,N=0;N<I.length;N++)m.setAttributeForCell(C,I[N].nodeName,0<I[N].nodeValue.length?I[N].nodeValue:null)}}catch(G){null!=window.console&&console.log("Error in value for "+C.id+": "+G)}try{var t=c.getAttribute("style");null!=t&&m.model.setStyle(C,t)}catch(G){null!=window.console&&console.log("Error in style for "+C.id+": "+G)}try{var p=c.getAttribute("icon");if(null!=p){var F=0<p.length?JSON.parse(p):null;null!=F&&F.append||m.removeCellOverlays(C);null!=F&&m.addCellOverlay(C,d(F))}}catch(G){null!= +window.console&&console.log("Error in icon for "+C.id+": "+G)}try{var K=c.getAttribute("geometry");if(null!=K){K=JSON.parse(K);var D=m.getCellGeometry(C);if(null!=D){D=D.clone();for(key in K){var H=parseFloat(K[key]);"dx"==key?D.x+=H:"dy"==key?D.y+=H:"dw"==key?D.width+=H:"dh"==key?D.height+=H:D[key]=parseFloat(K[key])}m.model.setGeometry(C,D)}}}catch(G){null!=window.console&&console.log("Error in icon for "+C.id+": "+G)}}}else if("model"==c.nodeName){for(var J=c.firstChild;null!=J&&J.nodeType!=mxConstants.NODETYPE_ELEMENT;)J= +J.nextSibling;null!=J&&(new mxCodec(c.firstChild)).decode(J,n)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(m.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))m.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(z=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{n.endUpdate()}null!=z&&this.chromelessResize&&this.chromelessResize(!0, +z)}return g};EditorUi.prototype.getCopyFilename=function(c,d){var g=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var q=g.lastIndexOf(".");0<=q&&(c=g.substring(q),g=g.substring(0,q));if(d){d=g;var m=new Date;g=m.getFullYear();q=m.getMonth()+1;var n=m.getDate(),z=m.getHours(),C=m.getMinutes();m=m.getSeconds();g=d+(" "+(g+"-"+q+"-"+n+"-"+z+"-"+C+"-"+m))}return g=mxResources.get("copyOf",[g])+c};EditorUi.prototype.fileLoaded=function(c,d){var g=this.getCurrentFile();this.fileEditable= +this.fileLoadedError=null;this.setCurrentFile(null);var q=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var m=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=g&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!d&&null!=window.location.hash&&0<window.location.hash.length&& +(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();d||this.showSplash()});if(null!=c)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(c);c.addListener("descriptorChanged",this.descriptorChangedListener);c.addListener("contentChanged",this.descriptorChangedListener);c.open(); delete this.openingFile;this.setGraphEnabled(!0);this.setMode(c.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();c.isEditable()?c.isModified()?(c.addUnsavedStatus(),null!=c.backupPatch&&c.patch([c.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(), this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));q=!0;if(!this.isOffline()&&null!=c.getMode()){var n="1"==urlParams.sketch?"sketch":uiTheme;if(null==n)n="default";else if("sketch"==n||"min"==n)n+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:c.getMode().toUpperCase()+"-OPEN-FILE-"+c.getHash(), action:"size_"+c.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+n})}EditorUi.debug("File.opened",[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(z){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(z){}}catch(z){this.fileLoadedError= -z;if(null!=c)try{c.close()}catch(C){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=c?c.getHash():"none"),action:"message_"+z.message,label:"stack_"+z.stack})}catch(C){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||m():m()});e?c():this.handleError(z,mxResources.get("errorLoadingFile"),c,!0,null,null, -!0)}else m();return q};EditorUi.prototype.getHashValueForPages=function(c,e){var g=0,q=new mxGraphModel,m=new mxCodec;null!=e&&(e.byteCount=0,e.attrCount=0,e.eltCount=0,e.nodeCount=0);for(var n=0;n<c.length;n++){this.updatePageRoot(c[n]);var z=c[n].node.cloneNode(!1);z.removeAttribute("name");q.root=c[n].root;var C=m.encode(q);this.editor.graph.saveViewState(c[n].viewState,C,!0);C.removeAttribute("pageWidth");C.removeAttribute("pageHeight");z.appendChild(C);null!=e&&(e.eltCount+=z.getElementsByTagName("*").length, -e.nodeCount+=z.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(z,function(v,y,I,N){return!N||"mxGeometry"!=v.nodeName&&"mxPoint"!=v.nodeName||"x"!=y&&"y"!=y&&"width"!=y&&"height"!=y?N&&"mxCell"==v.nodeName&&"previous"==y?null:I:Math.round(I)},e)<<0}return g};EditorUi.prototype.hashValue=function(c,e,g){var q=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(q^=this.hashValue(c.nodeName, -e,g));if(null!=c.attributes){null!=g&&(g.attrCount+=c.attributes.length);for(var m=0;m<c.attributes.length;m++){var n=c.attributes[m].name,z=null!=e?e(c,n,c.attributes[m].value,!0):c.attributes[m].value;null!=z&&(q^=this.hashValue(n,e,g)+this.hashValue(z,e,g))}}if(null!=c.childNodes)for(m=0;m<c.childNodes.length;m++)q=(q<<5)-q+this.hashValue(c.childNodes[m],e,g)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);e=0;null!=g&&(g.byteCount+=c.length);for(m=0;m<c.length;m++)e=(e<<5)-e+c.charCodeAt(m)<< -0;q^=e}return q};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,e,g,q,m,n,z){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this, -c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(c){var e=mxUtils.createXmlDocument(),g=e.createElement("mxlibrary");mxUtils.setTextContent(g,JSON.stringify(c));e.appendChild(g);return mxUtils.getXml(e)};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),".scratchpad"==c.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar= -function(c){var e=this.sidebar.palettes[c];if(null!=e){for(var g=0;g<e.length;g++)e[g].parentNode.removeChild(e[g]);delete this.sidebar.palettes[c]}};EditorUi.prototype.repositionLibrary=function(c){var e=this.sidebar.container;if(null==c){var g=this.sidebar.palettes["L.scratchpad"];null==g&&(g=this.sidebar.palettes.search);null!=g&&(c=g[g.length-1].nextSibling)}c=null!=c?c:e.firstChild.nextSibling.nextSibling;g=e.lastChild;var q=g.previousSibling;e.insertBefore(g,c);e.insertBefore(q,g)};EditorUi.prototype.loadLibrary= -function(c,e){var g=mxUtils.parseXml(c.getData());if("mxlibrary"==g.documentElement.nodeName){var q=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(c,q,g.documentElement.getAttribute("title"),e)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(c){return""};EditorUi.prototype.libraryLoaded=function(c,e,g,q){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());".scratchpad"==c.title&& -(this.scratchpad=c);var m=this.sidebar.palettes[c.getHash()];m=null!=m?m[m.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var n=null,z=mxUtils.bind(this,function(G,E){0==G.length&&c.isEditable()?(null==n&&(n=document.createElement("div"),n.className="geDropTarget",mxUtils.write(n,mxResources.get("dragElementsHere"))),E.appendChild(n)):this.addLibraryEntries(G,E)});null!=this.sidebar&&null!=e&&this.sidebar.addEntries(e);null==g&&(g=c.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0, -g.lastIndexOf("."))));var C=this.sidebar.addPalette(c.getHash(),g,null!=q?q:!0,mxUtils.bind(this,function(G){z(e,G)}));this.repositionLibrary(m);var v=C.parentNode.previousSibling;q=v.getAttribute("title");null!=q&&0<q.length&&".scratchpad"!=c.title&&v.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+q);var y=document.createElement("div");y.style.position="absolute";y.style.right="0px";y.style.top="0px";y.style.padding="8px";y.style.backgroundColor="inherit";v.style.position="relative";var I= -document.createElement("img");I.className="geAdaptiveAsset";I.setAttribute("src",Editor.crossImage);I.setAttribute("title",mxResources.get("close"));I.setAttribute("valign","absmiddle");I.setAttribute("border","0");I.style.position="relative";I.style.top="2px";I.style.width="14px";I.style.cursor="pointer";I.style.margin="0 3px";var N=null;if(".scratchpad"!=c.title||this.closableScratchpad)y.appendChild(I),mxEvent.addListener(I,"click",mxUtils.bind(this,function(G){if(!mxEvent.isConsumed(G)){var E= -mxUtils.bind(this,function(){this.closeLibrary(c)});null!=N?this.confirm(mxResources.get("allChangesLost"),null,E,mxResources.get("cancel"),mxResources.get("discardChanges")):E();mxEvent.consume(G)}}));if(c.isEditable()){var t=this.editor.graph,p=null,F=mxUtils.bind(this,function(G){this.showLibraryDialog(c.getTitle(),C,e,c,c.getMode());mxEvent.consume(G)}),J=mxUtils.bind(this,function(G){c.setModified(!0);c.isAutosave()?(null!=p&&null!=p.parentNode&&p.parentNode.removeChild(p),p=I.cloneNode(!1), -p.setAttribute("src",Editor.spinImage),p.setAttribute("title",mxResources.get("saving")),p.style.cursor="default",p.style.marginRight="2px",p.style.marginTop="-2px",y.insertBefore(p,y.firstChild),v.style.paddingRight=18*y.childNodes.length+"px",this.saveLibrary(c.getTitle(),e,c,c.getMode(),!0,!0,function(){null!=p&&null!=p.parentNode&&(p.parentNode.removeChild(p),v.style.paddingRight=18*y.childNodes.length+"px")})):null==N&&(N=I.cloneNode(!1),N.setAttribute("src",Editor.saveImage),N.setAttribute("title", -mxResources.get("save")),y.insertBefore(N,y.firstChild),mxEvent.addListener(N,"click",mxUtils.bind(this,function(E){this.saveLibrary(c.getTitle(),e,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==N||c.isModified()||(v.style.paddingRight=18*y.childNodes.length+"px",N.parentNode.removeChild(N),N=null)});mxEvent.consume(E)})),v.style.paddingRight=18*y.childNodes.length+"px")}),M=mxUtils.bind(this,function(G,E,P,T){G=t.cloneCells(mxUtils.sortCells(t.model.getTopmostCells(G)));for(var W= -0;W<G.length;W++){var U=t.getCellGeometry(G[W]);null!=U&&U.translate(-E.x,-E.y)}C.appendChild(this.sidebar.createVertexTemplateFromCells(G,E.width,E.height,T||"",!0,null,!1));G={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(G))),w:E.width,h:E.height};null!=T&&(G.title=T);e.push(G);J(P);null!=n&&null!=n.parentNode&&0<e.length&&(n.parentNode.removeChild(n),n=null)}),H=mxUtils.bind(this,function(G){if(t.isSelectionEmpty())t.getRubberband().isActive()?(t.getRubberband().execute(G),t.getRubberband().reset()): -this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var E=t.getSelectionCells(),P=t.view.getBounds(E),T=t.view.scale;P.x/=T;P.y/=T;P.width/=T;P.height/=T;P.x-=t.view.translate.x;P.y-=t.view.translate.y;M(E,P)}mxEvent.consume(G)});mxEvent.addGestureListeners(C,function(){},mxUtils.bind(this,function(G){t.isMouseDown&&null!=t.panningManager&&null!=t.graphHandler.first&&(t.graphHandler.suspend(),null!=t.graphHandler.hint&&(t.graphHandler.hint.style.visibility= -"hidden"),C.style.backgroundColor="#f1f3f4",C.style.cursor="copy",t.panningManager.stop(),t.autoScroll=!1,mxEvent.consume(G))}),mxUtils.bind(this,function(G){t.isMouseDown&&null!=t.panningManager&&null!=t.graphHandler&&(C.style.backgroundColor="",C.style.cursor="default",this.sidebar.showTooltips=!0,t.panningManager.stop(),t.graphHandler.reset(),t.isMouseDown=!1,t.autoScroll=!0,H(G),mxEvent.consume(G))}));mxEvent.addListener(C,"mouseleave",mxUtils.bind(this,function(G){t.isMouseDown&&null!=t.graphHandler.first&& -(t.graphHandler.resume(),null!=t.graphHandler.hint&&(t.graphHandler.hint.style.visibility="visible"),C.style.backgroundColor="",C.style.cursor="",t.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(G){C.style.backgroundColor="#f1f3f4";G.dataTransfer.dropEffect="copy";C.style.cursor="copy";this.sidebar.hideTooltip();G.stopPropagation();G.preventDefault()})),mxEvent.addListener(C,"drop",mxUtils.bind(this,function(G){C.style.cursor="";C.style.backgroundColor= -"";0<G.dataTransfer.files.length&&this.importFiles(G.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(E,P,T,W,U,V,l,A,L){if(null!=E&&"image/"==P.substring(0,6))E="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(E),E=[new mxCell("",new mxGeometry(0,0,U,V),E)],E[0].vertex=!0,M(E,new mxRectangle(0,0,U,V),G,mxEvent.isAltDown(G)?null:l.substring(0,l.lastIndexOf(".")).replace(/_/g," ")),null!=n&&null!=n.parentNode&&0<e.length&& -(n.parentNode.removeChild(n),n=null);else{var Q=!1,O=mxUtils.bind(this,function(R,S){null!=R&&"application/pdf"==S&&(S=Editor.extractGraphModelFromPdf(R),null!=S&&0<S.length&&(R=S));if(null!=R)if(R=mxUtils.parseXml(R),"mxlibrary"==R.documentElement.nodeName)try{var X=JSON.parse(mxUtils.getTextContent(R.documentElement));z(X,C);e=e.concat(X);J(G);this.spinner.stop();Q=!0}catch(ca){}else if("mxfile"==R.documentElement.nodeName)try{var aa=R.documentElement.getElementsByTagName("diagram");for(X=0;X<aa.length;X++){var Y= -this.stringToCells(Editor.getDiagramNodeXml(aa[X])),Z=this.editor.graph.getBoundingBoxFromGeometry(Y);M(Y,new mxRectangle(0,0,Z.width,Z.height),G)}Q=!0}catch(ca){null!=window.console&&console.log("error in drop handler:",ca)}Q||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=n&&null!=n.parentNode&&0<e.length&&(n.parentNode.removeChild(n),n=null)});null!=L&&null!=l&&(/(\.v(dx|sdx?))($|\?)/i.test(l)||/(\.vs(x|sx?))($|\?)/i.test(l))?this.importVisio(L,function(R){O(R, -"text/xml")},null,l):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(E,l)&&null!=L?this.isExternalDataComms()?this.parseFile(L,mxUtils.bind(this,function(R){4==R.readyState&&(this.spinner.stop(),200<=R.status&&299>=R.status?O(R.responseText,"text/xml"):this.handleError({message:mxResources.get(413==R.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):O(E,P)}})); -G.stopPropagation();G.preventDefault()})),mxEvent.addListener(C,"dragleave",function(G){C.style.cursor="";C.style.backgroundColor="";G.stopPropagation();G.preventDefault()}));I=I.cloneNode(!1);I.setAttribute("src",Editor.editImage);I.setAttribute("title",mxResources.get("edit"));y.insertBefore(I,y.firstChild);mxEvent.addListener(I,"click",F);mxEvent.addListener(C,"dblclick",function(G){mxEvent.getSource(G)==C&&F(G)});q=I.cloneNode(!1);q.setAttribute("src",Editor.plusImage);q.setAttribute("title", -mxResources.get("add"));y.insertBefore(q,y.firstChild);mxEvent.addListener(q,"click",H);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(q=document.createElement("span"),q.setAttribute("title",mxResources.get("help")),q.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(q,"?"),mxEvent.addGestureListeners(q,mxUtils.bind(this,function(G){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(G)})),y.insertBefore(q,y.firstChild))}v.appendChild(y); -v.style.paddingRight=18*y.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(c,e){for(var g=0;g<c.length;g++){var q=c[g],m=q.data;if(null!=m){m=this.convertDataUri(m);var n="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==q.aspect&&(n+="aspect=fixed;");e.appendChild(this.sidebar.createVertexTemplate(n+"image="+m,q.w,q.h,"",q.title||"",!1,null,!0))}else null!=q.xml&&(m=this.stringToCells(Graph.decompress(q.xml)),0<m.length&&e.appendChild(this.sidebar.createVertexTemplateFromCells(m, +z;if(null!=c)try{c.close()}catch(C){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=c?c.getHash():"none"),action:"message_"+z.message,label:"stack_"+z.stack})}catch(C){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||m():m()});d?c():this.handleError(z,mxResources.get("errorLoadingFile"),c,!0,null,null, +!0)}else m();return q};EditorUi.prototype.getHashValueForPages=function(c,d){var g=0,q=new mxGraphModel,m=new mxCodec;null!=d&&(d.byteCount=0,d.attrCount=0,d.eltCount=0,d.nodeCount=0);for(var n=0;n<c.length;n++){this.updatePageRoot(c[n]);var z=c[n].node.cloneNode(!1);z.removeAttribute("name");q.root=c[n].root;var C=m.encode(q);this.editor.graph.saveViewState(c[n].viewState,C,!0);C.removeAttribute("pageWidth");C.removeAttribute("pageHeight");z.appendChild(C);null!=d&&(d.eltCount+=z.getElementsByTagName("*").length, +d.nodeCount+=z.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(z,function(x,y,I,N){return!N||"mxGeometry"!=x.nodeName&&"mxPoint"!=x.nodeName||"x"!=y&&"y"!=y&&"width"!=y&&"height"!=y?N&&"mxCell"==x.nodeName&&"previous"==y?null:I:Math.round(I)},d)<<0}return g};EditorUi.prototype.hashValue=function(c,d,g){var q=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(q^=this.hashValue(c.nodeName, +d,g));if(null!=c.attributes){null!=g&&(g.attrCount+=c.attributes.length);for(var m=0;m<c.attributes.length;m++){var n=c.attributes[m].name,z=null!=d?d(c,n,c.attributes[m].value,!0):c.attributes[m].value;null!=z&&(q^=this.hashValue(n,d,g)+this.hashValue(z,d,g))}}if(null!=c.childNodes)for(m=0;m<c.childNodes.length;m++)q=(q<<5)-q+this.hashValue(c.childNodes[m],d,g)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);d=0;null!=g&&(g.byteCount+=c.length);for(m=0;m<c.length;m++)d=(d<<5)-d+c.charCodeAt(m)<< +0;q^=d}return q};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,d,g,q,m,n,z){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this, +c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(c){var d=mxUtils.createXmlDocument(),g=d.createElement("mxlibrary");mxUtils.setTextContent(g,JSON.stringify(c));d.appendChild(g);return mxUtils.getXml(d)};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),".scratchpad"==c.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar= +function(c){var d=this.sidebar.palettes[c];if(null!=d){for(var g=0;g<d.length;g++)d[g].parentNode.removeChild(d[g]);delete this.sidebar.palettes[c]}};EditorUi.prototype.repositionLibrary=function(c){var d=this.sidebar.container;if(null==c){var g=this.sidebar.palettes["L.scratchpad"];null==g&&(g=this.sidebar.palettes.search);null!=g&&(c=g[g.length-1].nextSibling)}c=null!=c?c:d.firstChild.nextSibling.nextSibling;g=d.lastChild;var q=g.previousSibling;d.insertBefore(g,c);d.insertBefore(q,g)};EditorUi.prototype.loadLibrary= +function(c,d){var g=mxUtils.parseXml(c.getData());if("mxlibrary"==g.documentElement.nodeName){var q=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(c,q,g.documentElement.getAttribute("title"),d)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(c){return""};EditorUi.prototype.libraryLoaded=function(c,d,g,q){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());".scratchpad"==c.title&& +(this.scratchpad=c);var m=this.sidebar.palettes[c.getHash()];m=null!=m?m[m.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var n=null,z=mxUtils.bind(this,function(J,G){0==J.length&&c.isEditable()?(null==n&&(n=document.createElement("div"),n.className="geDropTarget",mxUtils.write(n,mxResources.get("dragElementsHere"))),G.appendChild(n)):this.addLibraryEntries(J,G)});null!=this.sidebar&&null!=d&&this.sidebar.addEntries(d);null==g&&(g=c.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0, +g.lastIndexOf("."))));var C=this.sidebar.addPalette(c.getHash(),g,null!=q?q:!0,mxUtils.bind(this,function(J){z(d,J)}));this.repositionLibrary(m);var x=C.parentNode.previousSibling;q=x.getAttribute("title");null!=q&&0<q.length&&".scratchpad"!=c.title&&x.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+q);var y=document.createElement("div");y.style.position="absolute";y.style.right="0px";y.style.top="0px";y.style.padding="8px";y.style.backgroundColor="inherit";x.style.position="relative";var I= +document.createElement("img");I.className="geAdaptiveAsset";I.setAttribute("src",Editor.crossImage);I.setAttribute("title",mxResources.get("close"));I.setAttribute("valign","absmiddle");I.setAttribute("border","0");I.style.position="relative";I.style.top="2px";I.style.width="14px";I.style.cursor="pointer";I.style.margin="0 3px";var N=null;if(".scratchpad"!=c.title||this.closableScratchpad)y.appendChild(I),mxEvent.addListener(I,"click",mxUtils.bind(this,function(J){if(!mxEvent.isConsumed(J)){var G= +mxUtils.bind(this,function(){this.closeLibrary(c)});null!=N?this.confirm(mxResources.get("allChangesLost"),null,G,mxResources.get("cancel"),mxResources.get("discardChanges")):G();mxEvent.consume(J)}}));if(c.isEditable()){var t=this.editor.graph,p=null,F=mxUtils.bind(this,function(J){this.showLibraryDialog(c.getTitle(),C,d,c,c.getMode());mxEvent.consume(J)}),K=mxUtils.bind(this,function(J){c.setModified(!0);c.isAutosave()?(null!=p&&null!=p.parentNode&&p.parentNode.removeChild(p),p=I.cloneNode(!1), +p.setAttribute("src",Editor.spinImage),p.setAttribute("title",mxResources.get("saving")),p.style.cursor="default",p.style.marginRight="2px",p.style.marginTop="-2px",y.insertBefore(p,y.firstChild),x.style.paddingRight=18*y.childNodes.length+"px",this.saveLibrary(c.getTitle(),d,c,c.getMode(),!0,!0,function(){null!=p&&null!=p.parentNode&&(p.parentNode.removeChild(p),x.style.paddingRight=18*y.childNodes.length+"px")})):null==N&&(N=I.cloneNode(!1),N.setAttribute("src",Editor.saveImage),N.setAttribute("title", +mxResources.get("save")),y.insertBefore(N,y.firstChild),mxEvent.addListener(N,"click",mxUtils.bind(this,function(G){this.saveLibrary(c.getTitle(),d,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==N||c.isModified()||(x.style.paddingRight=18*y.childNodes.length+"px",N.parentNode.removeChild(N),N=null)});mxEvent.consume(G)})),x.style.paddingRight=18*y.childNodes.length+"px")}),D=mxUtils.bind(this,function(J,G,P,T){J=t.cloneCells(mxUtils.sortCells(t.model.getTopmostCells(J)));for(var W= +0;W<J.length;W++){var U=t.getCellGeometry(J[W]);null!=U&&U.translate(-G.x,-G.y)}C.appendChild(this.sidebar.createVertexTemplateFromCells(J,G.width,G.height,T||"",!0,null,!1));J={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(J))),w:G.width,h:G.height};null!=T&&(J.title=T);d.push(J);K(P);null!=n&&null!=n.parentNode&&0<d.length&&(n.parentNode.removeChild(n),n=null)}),H=mxUtils.bind(this,function(J){if(t.isSelectionEmpty())t.getRubberband().isActive()?(t.getRubberband().execute(J),t.getRubberband().reset()): +this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var G=t.getSelectionCells(),P=t.view.getBounds(G),T=t.view.scale;P.x/=T;P.y/=T;P.width/=T;P.height/=T;P.x-=t.view.translate.x;P.y-=t.view.translate.y;D(G,P)}mxEvent.consume(J)});mxEvent.addGestureListeners(C,function(){},mxUtils.bind(this,function(J){t.isMouseDown&&null!=t.panningManager&&null!=t.graphHandler.first&&(t.graphHandler.suspend(),null!=t.graphHandler.hint&&(t.graphHandler.hint.style.visibility= +"hidden"),C.style.backgroundColor="#f1f3f4",C.style.cursor="copy",t.panningManager.stop(),t.autoScroll=!1,mxEvent.consume(J))}),mxUtils.bind(this,function(J){t.isMouseDown&&null!=t.panningManager&&null!=t.graphHandler&&(C.style.backgroundColor="",C.style.cursor="default",this.sidebar.showTooltips=!0,t.panningManager.stop(),t.graphHandler.reset(),t.isMouseDown=!1,t.autoScroll=!0,H(J),mxEvent.consume(J))}));mxEvent.addListener(C,"mouseleave",mxUtils.bind(this,function(J){t.isMouseDown&&null!=t.graphHandler.first&& +(t.graphHandler.resume(),null!=t.graphHandler.hint&&(t.graphHandler.hint.style.visibility="visible"),C.style.backgroundColor="",C.style.cursor="",t.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(J){C.style.backgroundColor="#f1f3f4";J.dataTransfer.dropEffect="copy";C.style.cursor="copy";this.sidebar.hideTooltip();J.stopPropagation();J.preventDefault()})),mxEvent.addListener(C,"drop",mxUtils.bind(this,function(J){C.style.cursor="";C.style.backgroundColor= +"";0<J.dataTransfer.files.length&&this.importFiles(J.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(G,P,T,W,U,V,l,A,M){if(null!=G&&"image/"==P.substring(0,6))G="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(G),G=[new mxCell("",new mxGeometry(0,0,U,V),G)],G[0].vertex=!0,D(G,new mxRectangle(0,0,U,V),J,mxEvent.isAltDown(J)?null:l.substring(0,l.lastIndexOf(".")).replace(/_/g," ")),null!=n&&null!=n.parentNode&&0<d.length&& +(n.parentNode.removeChild(n),n=null);else{var Q=!1,O=mxUtils.bind(this,function(R,S){null!=R&&"application/pdf"==S&&(S=Editor.extractGraphModelFromPdf(R),null!=S&&0<S.length&&(R=S));if(null!=R)if(R=mxUtils.parseXml(R),"mxlibrary"==R.documentElement.nodeName)try{var X=JSON.parse(mxUtils.getTextContent(R.documentElement));z(X,C);d=d.concat(X);K(J);this.spinner.stop();Q=!0}catch(ba){}else if("mxfile"==R.documentElement.nodeName)try{var aa=R.documentElement.getElementsByTagName("diagram");for(X=0;X<aa.length;X++){var Y= +this.stringToCells(Editor.getDiagramNodeXml(aa[X])),Z=this.editor.graph.getBoundingBoxFromGeometry(Y);D(Y,new mxRectangle(0,0,Z.width,Z.height),J)}Q=!0}catch(ba){null!=window.console&&console.log("error in drop handler:",ba)}Q||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=n&&null!=n.parentNode&&0<d.length&&(n.parentNode.removeChild(n),n=null)});null!=M&&null!=l&&(/(\.v(dx|sdx?))($|\?)/i.test(l)||/(\.vs(x|sx?))($|\?)/i.test(l))?this.importVisio(M,function(R){O(R, +"text/xml")},null,l):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(G,l)&&null!=M?this.isExternalDataComms()?this.parseFile(M,mxUtils.bind(this,function(R){4==R.readyState&&(this.spinner.stop(),200<=R.status&&299>=R.status?O(R.responseText,"text/xml"):this.handleError({message:mxResources.get(413==R.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):O(G,P)}})); +J.stopPropagation();J.preventDefault()})),mxEvent.addListener(C,"dragleave",function(J){C.style.cursor="";C.style.backgroundColor="";J.stopPropagation();J.preventDefault()}));I=I.cloneNode(!1);I.setAttribute("src",Editor.editImage);I.setAttribute("title",mxResources.get("edit"));y.insertBefore(I,y.firstChild);mxEvent.addListener(I,"click",F);mxEvent.addListener(C,"dblclick",function(J){mxEvent.getSource(J)==C&&F(J)});q=I.cloneNode(!1);q.setAttribute("src",Editor.plusImage);q.setAttribute("title", +mxResources.get("add"));y.insertBefore(q,y.firstChild);mxEvent.addListener(q,"click",H);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(q=document.createElement("span"),q.setAttribute("title",mxResources.get("help")),q.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(q,"?"),mxEvent.addGestureListeners(q,mxUtils.bind(this,function(J){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(J)})),y.insertBefore(q,y.firstChild))}x.appendChild(y); +x.style.paddingRight=18*y.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(c,d){for(var g=0;g<c.length;g++){var q=c[g],m=q.data;if(null!=m){m=this.convertDataUri(m);var n="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==q.aspect&&(n+="aspect=fixed;");d.appendChild(this.sidebar.createVertexTemplate(n+"image="+m,q.w,q.h,"",q.title||"",!1,null,!0))}else null!=q.xml&&(m=this.stringToCells(Graph.decompress(q.xml)),0<m.length&&d.appendChild(this.sidebar.createVertexTemplateFromCells(m, q.w,q.h,q.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="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):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor=Editor.darkColor,Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.shapeBackgroundColor=Editor.darkColor,Graph.prototype.shapeForegroundColor=Editor.lightColor,Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultPageBorderColor= "#505759",BaseFormatPanel.prototype.buttonBackgroundColor=Editor.darkColor,mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];"1"==urlParams.sketch&&("undefined"!== typeof Menus&&(Menus.prototype.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts)),Graph.prototype.defaultVertexStyle={hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid, -Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,e,g,q,m,n,z){c=new ImageDialog(this,c,e,g,q,m,n,z);this.showDialog(c.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,e){c=null!=c?c:mxUtils.bind(this,function(g,q){q||(g=new ChangePageSetup(this,null,g), -g.ignoreColor=!0,this.editor.graph.model.execute(g))});c=new BackgroundImageDialog(this,c,e);this.showDialog(c.container,400,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,e,g,q,m){c=new LibraryDialog(this,c,e,g,q,m);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(n){n&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var e=k.apply(this,arguments); -this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&e.refresh()}));return e};EditorUi.prototype.createSidebarFooterContainer=function(){var c=this.createDiv("geSidebarContainer geSidebarFooter");c.style.position="absolute";c.style.overflow="hidden";var e=document.createElement("a");e.className="geTitle";e.style.color="#DF6C0C";e.style.fontWeight="bold";e.style.height="100%";e.style.paddingTop="9px";e.innerHTML="<span>+</span>";var g= -e.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(e,mxResources.get("moreShapes")+"...");mxEvent.addListener(e,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(q){q.preventDefault()}));mxEvent.addListener(e,"click",mxUtils.bind(this,function(q){this.actions.get("shapes").funct();mxEvent.consume(q)}));c.appendChild(e);return c};EditorUi.prototype.handleError=function(c,e,g,q,m,n,z){var C=null!=this.spinner&&null!=this.spinner.pause? -this.spinner.pause():function(){},v=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{z?null!=window.console&&console.error("EditorUi.handleError:",c):EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO")}catch(p){}if(null!=v||null!=e){z=mxUtils.htmlEntities(mxResources.get("unknownError"));var y=mxResources.get("ok"),I=null;e=null!=e?e:mxResources.get("error");if(null!=v){null!= -v.retry&&(y=mxResources.get("cancel"),I=function(){C();v.retry()});if(404==v.code||404==v.status||403==v.code){z=403==v.code?null!=v.message?mxUtils.htmlEntities(v.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=m?m:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var N=null!=m?null:null!=n?n:window.location.hash;if(null!=N&&("#G"==N.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"== -N.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==v.code||404==v.status)){N="#U"==N.substring(0,2)?N.substring(45,N.lastIndexOf("%26ex")):N.substring(2);this.showError(e,z,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+N);this.handleError(c,e,g,q,m)}), -I,mxResources.get("changeUser"),mxUtils.bind(this,function(){function p(){H.innerText="";for(var G=0;G<F.length;G++){var E=document.createElement("option");mxUtils.write(E,F[G].displayName);E.value=G;H.appendChild(E);E=document.createElement("option");E.innerHTML=" ";mxUtils.write(E,"<"+F[G].email+">");E.setAttribute("disabled","disabled");H.appendChild(E)}E=document.createElement("option");mxUtils.write(E,mxResources.get("addAccount"));E.value=F.length;H.appendChild(E)}var F=this.drive.getUsersList(), -J=document.createElement("div"),M=document.createElement("span");M.style.marginTop="6px";mxUtils.write(M,mxResources.get("changeUser")+": ");J.appendChild(M);var H=document.createElement("select");H.style.width="200px";p();mxEvent.addListener(H,"change",mxUtils.bind(this,function(){var G=H.value,E=F.length!=G;E&&this.drive.setUser(F[G]);this.drive.authorize(E,mxUtils.bind(this,function(){E||(F=this.drive.getUsersList(),p())}),mxUtils.bind(this,function(P){this.handleError(P)}),!0)}));J.appendChild(H); -J=new CustomDialog(this,J,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(J.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=v.message?z=""==v.message&&null!=v.name?mxUtils.htmlEntities(v.name):mxUtils.htmlEntities(v.message):null!=v.response&&null!=v.response.error?z=mxUtils.htmlEntities(v.response.error):"undefined"!==typeof window.App&&(v.code==App.ERROR_TIMEOUT? -z=mxUtils.htmlEntities(mxResources.get("timeout")):v.code==App.ERROR_BUSY?z=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof v&&0<v.length&&(z=mxUtils.htmlEntities(v)))}var t=n=null;null!=v&&null!=v.helpLink?(n=mxResources.get("help"),t=mxUtils.bind(this,function(){return this.editor.graph.openLink(v.helpLink)})):null!=v&&null!=v.ownerEmail&&(n=mxResources.get("contactOwner"),z+=mxUtils.htmlEntities(" ("+n+": "+v.ownerEmail+")"),t=mxUtils.bind(this,function(){return this.openLink("mailto:"+ -mxUtils.htmlEntities(v.ownerEmail))}));this.showError(e,z,y,g,I,null,null,n,t,null,null,null,q?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(c,e,g){c=new ErrorDialog(this,null,c,mxResources.get("ok"),e);this.showDialog(c.container,g||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,e,g,q,m,n){var z=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},C=Math.min(200,28*Math.ceil(c.length/50));c=new ConfirmDialog(this,c,function(){z();null!=e&& -e()},function(){z();null!=g&&g()},q,m,null,null,null,null,C);this.showDialog(c.container,340,46+C,!0,n);c.init()};EditorUi.prototype.showBanner=function(c,e,g,q){var m=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){var n=document.createElement("div");n.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+ +Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,d,g,q,m,n,z){c=new ImageDialog(this,c,d,g,q,m,n,z);this.showDialog(c.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,d){c=null!=c?c:mxUtils.bind(this,function(g,q){q||(g=new ChangePageSetup(this,null,g), +g.ignoreColor=!0,this.editor.graph.model.execute(g))});c=new BackgroundImageDialog(this,c,d);this.showDialog(c.container,400,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,d,g,q,m){c=new LibraryDialog(this,c,d,g,q,m);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(n){n&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var d=k.apply(this,arguments); +this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&d.refresh()}));return d};EditorUi.prototype.createSidebarFooterContainer=function(){var c=this.createDiv("geSidebarContainer geSidebarFooter");c.style.position="absolute";c.style.overflow="hidden";var d=document.createElement("a");d.className="geTitle";d.style.color="#DF6C0C";d.style.fontWeight="bold";d.style.height="100%";d.style.paddingTop="9px";d.innerHTML="<span>+</span>";var g= +d.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(d,mxResources.get("moreShapes")+"...");mxEvent.addListener(d,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(q){q.preventDefault()}));mxEvent.addListener(d,"click",mxUtils.bind(this,function(q){this.actions.get("shapes").funct();mxEvent.consume(q)}));c.appendChild(d);return c};EditorUi.prototype.handleError=function(c,d,g,q,m,n,z){var C=null!=this.spinner&&null!=this.spinner.pause? +this.spinner.pause():function(){},x=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{z?null!=window.console&&console.error("EditorUi.handleError:",c):EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO")}catch(p){}if(null!=x||null!=d){z=mxUtils.htmlEntities(mxResources.get("unknownError"));var y=mxResources.get("ok"),I=null;d=null!=d?d:mxResources.get("error");if(null!=x){null!= +x.retry&&(y=mxResources.get("cancel"),I=function(){C();x.retry()});if(404==x.code||404==x.status||403==x.code){z=403==x.code?null!=x.message?mxUtils.htmlEntities(x.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=m?m:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var N=null!=m?null:null!=n?n:window.location.hash;if(null!=N&&("#G"==N.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"== +N.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==x.code||404==x.status)){N="#U"==N.substring(0,2)?N.substring(45,N.lastIndexOf("%26ex")):N.substring(2);this.showError(d,z,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+N);this.handleError(c,d,g,q,m)}), +I,mxResources.get("changeUser"),mxUtils.bind(this,function(){function p(){H.innerText="";for(var J=0;J<F.length;J++){var G=document.createElement("option");mxUtils.write(G,F[J].displayName);G.value=J;H.appendChild(G);G=document.createElement("option");G.innerHTML=" ";mxUtils.write(G,"<"+F[J].email+">");G.setAttribute("disabled","disabled");H.appendChild(G)}G=document.createElement("option");mxUtils.write(G,mxResources.get("addAccount"));G.value=F.length;H.appendChild(G)}var F=this.drive.getUsersList(), +K=document.createElement("div"),D=document.createElement("span");D.style.marginTop="6px";mxUtils.write(D,mxResources.get("changeUser")+": ");K.appendChild(D);var H=document.createElement("select");H.style.width="200px";p();mxEvent.addListener(H,"change",mxUtils.bind(this,function(){var J=H.value,G=F.length!=J;G&&this.drive.setUser(F[J]);this.drive.authorize(G,mxUtils.bind(this,function(){G||(F=this.drive.getUsersList(),p())}),mxUtils.bind(this,function(P){this.handleError(P)}),!0)}));K.appendChild(H); +K=new CustomDialog(this,K,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(K.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=x.message?z=""==x.message&&null!=x.name?mxUtils.htmlEntities(x.name):mxUtils.htmlEntities(x.message):null!=x.response&&null!=x.response.error?z=mxUtils.htmlEntities(x.response.error):"undefined"!==typeof window.App&&(x.code==App.ERROR_TIMEOUT? +z=mxUtils.htmlEntities(mxResources.get("timeout")):x.code==App.ERROR_BUSY?z=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof x&&0<x.length&&(z=mxUtils.htmlEntities(x)))}var t=n=null;null!=x&&null!=x.helpLink?(n=mxResources.get("help"),t=mxUtils.bind(this,function(){return this.editor.graph.openLink(x.helpLink)})):null!=x&&null!=x.ownerEmail&&(n=mxResources.get("contactOwner"),z+=mxUtils.htmlEntities(" ("+n+": "+x.ownerEmail+")"),t=mxUtils.bind(this,function(){return this.openLink("mailto:"+ +mxUtils.htmlEntities(x.ownerEmail))}));this.showError(d,z,y,g,I,null,null,n,t,null,null,null,q?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(c,d,g){c=new ErrorDialog(this,null,c,mxResources.get("ok"),d);this.showDialog(c.container,g||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,d,g,q,m,n){var z=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},C=Math.min(200,28*Math.ceil(c.length/50));c=new ConfirmDialog(this,c,function(){z();null!=d&& +d()},function(){z();null!=g&&g()},q,m,null,null,null,null,C);this.showDialog(c.container,340,46+C,!0,n);c.init()};EditorUi.prototype.showBanner=function(c,d,g,q){var m=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){var n=document.createElement("div");n.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+ mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(n.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(n.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(n.style,"transition","all 1s ease");n.className="geBtn gePrimaryBtn";m=document.createElement("img");m.setAttribute("src",IMAGE_PATH+"/logo.png");m.setAttribute("border","0");m.setAttribute("align","absmiddle");m.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";n.appendChild(m); -m=document.createElement("img");m.setAttribute("src",Dialog.prototype.closeImage);m.setAttribute("title",mxResources.get(q?"doNotShowAgain":"close"));m.setAttribute("border","0");m.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";n.appendChild(m);mxUtils.write(n,e);document.body.appendChild(n);this.bannerShowing=!0;e=document.createElement("div");e.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var z=document.createElement("input"); -z.setAttribute("type","checkbox");z.setAttribute("id","geDoNotShowAgainCheckbox");z.style.marginRight="6px";if(!q){e.appendChild(z);var C=document.createElement("label");C.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(C,mxResources.get("doNotShowAgain"));e.appendChild(C);n.style.paddingBottom="30px";n.appendChild(e)}var v=mxUtils.bind(this,function(){null!=n.parentNode&&(n.parentNode.removeChild(n),this.bannerShowing=!1,z.checked||q)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!= -mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});mxEvent.addListener(m,"click",mxUtils.bind(this,function(I){mxEvent.consume(I);v()}));var y=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(n.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){v()}),1E3)});mxEvent.addListener(n,"click",mxUtils.bind(this,function(I){var N=mxEvent.getSource(I);N!=z&&N!=C?(null!=g&&g(),v(),mxEvent.consume(I)):y()}));window.setTimeout(mxUtils.bind(this, -function(){mxUtils.setPrefixedStyle(n.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(y,3E4);m=!0}return m};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(c,e,g,q){c=c.toDataURL("image/"+g);if(null!=c&&6<c.length)null!=e&&(c=Editor.writeGraphModelToPng(c, -"tEXt","mxfile",encodeURIComponent(e))),0<q&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",q));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,e,g,q,m){var n="jpeg"==g?"jpg":g;q=this.getBaseFilename(q)+(null!=e?".drawio":"")+"."+n;c=this.createImageDataUri(c,e,g,m);this.saveData(q,n,c.substring(c.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&& -"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(c,e){c=new TextareaDialog(this,c,e,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,e,g,q,m,n){"text/xml"!=g||/(\.drawio)$/i.test(e)||/(\.xml)$/i.test(e)||/(\.svg)$/i.test(e)|| -/(\.html)$/i.test(e)||(e=e+"."+(null!=n?n:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=q?this.base64ToBlob(c,g):new Blob([c],{type:g}),navigator.msSaveOrOpenBlob(c,e);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(c,!0):(g.document.write(c),g.document.close(),g.document.execCommand("SaveAs",!0,e),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(e+":",c):this.openInNewWindow(c, -g,q);else{var z=document.createElement("a");n=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof z.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var C=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);n=65==(C?parseInt(C[2],10):!1)?!1:n}if(n||this.isOffline()){z.href=URL.createObjectURL(q?this.base64ToBlob(c,g):new Blob([c],{type:g}));n?z.download=e:z.setAttribute("target","_blank");document.body.appendChild(z);try{window.setTimeout(function(){URL.revokeObjectURL(z.href)}, -2E4),z.click(),z.parentNode.removeChild(z)}catch(v){}}else this.createEchoRequest(c,e,g,q,m).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,e,g,q,m,n){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=g?"&mime="+g:"")+(null!=m?"&format="+m:"")+(null!=n?"&base64="+n:"")+(null!=e?"&filename="+encodeURIComponent(e):"")+(q?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(c,e){e=e||"";c=atob(c);for(var g=c.length,q=Math.ceil(g/1024),m=Array(q), -n=0;n<q;++n){for(var z=1024*n,C=Math.min(z+1024,g),v=Array(C-z),y=0;z<C;++y,++z)v[y]=c[z].charCodeAt(0);m[n]=new Uint8Array(v)}return new Blob(m,{type:e})};EditorUi.prototype.saveLocalFile=function(c,e,g,q,m,n,z,C){n=null!=n?n:!1;z=null!=z?z:"vsdx"!=m&&(!mxClient.IS_IOS||!navigator.standalone);m=this.getServiceCount(n);isLocalStorage&&m++;var v=4>=m?2:6<m?4:3;e=new CreateDialog(this,e,mxUtils.bind(this,function(y,I){try{if("_blank"==I)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(c, +m=document.createElement("img");m.setAttribute("src",Dialog.prototype.closeImage);m.setAttribute("title",mxResources.get(q?"doNotShowAgain":"close"));m.setAttribute("border","0");m.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";n.appendChild(m);mxUtils.write(n,d);document.body.appendChild(n);this.bannerShowing=!0;d=document.createElement("div");d.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var z=document.createElement("input"); +z.setAttribute("type","checkbox");z.setAttribute("id","geDoNotShowAgainCheckbox");z.style.marginRight="6px";if(!q){d.appendChild(z);var C=document.createElement("label");C.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(C,mxResources.get("doNotShowAgain"));d.appendChild(C);n.style.paddingBottom="30px";n.appendChild(d)}var x=mxUtils.bind(this,function(){null!=n.parentNode&&(n.parentNode.removeChild(n),this.bannerShowing=!1,z.checked||q)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!= +mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});mxEvent.addListener(m,"click",mxUtils.bind(this,function(I){mxEvent.consume(I);x()}));var y=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(n.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){x()}),1E3)});mxEvent.addListener(n,"click",mxUtils.bind(this,function(I){var N=mxEvent.getSource(I);N!=z&&N!=C?(null!=g&&g(),x(),mxEvent.consume(I)):y()}));window.setTimeout(mxUtils.bind(this, +function(){mxUtils.setPrefixedStyle(n.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(y,3E4);m=!0}return m};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(c,d,g,q){c=c.toDataURL("image/"+g);if(null!=c&&6<c.length)null!=d&&(c=Editor.writeGraphModelToPng(c, +"tEXt","mxfile",encodeURIComponent(d))),0<q&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",q));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,d,g,q,m){var n="jpeg"==g?"jpg":g;q=this.getBaseFilename(q)+(null!=d?".drawio":"")+"."+n;c=this.createImageDataUri(c,d,g,m);this.saveData(q,n,c.substring(c.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&& +"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(c,d){c=new TextareaDialog(this,c,d,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,d,g,q,m,n){"text/xml"!=g||/(\.drawio)$/i.test(d)||/(\.xml)$/i.test(d)||/(\.svg)$/i.test(d)|| +/(\.html)$/i.test(d)||(d=d+"."+(null!=n?n:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=q?this.base64ToBlob(c,g):new Blob([c],{type:g}),navigator.msSaveOrOpenBlob(c,d);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(c,!0):(g.document.write(c),g.document.close(),g.document.execCommand("SaveAs",!0,d),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(d+":",c):this.openInNewWindow(c, +g,q);else{var z=document.createElement("a");n=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof z.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var C=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);n=65==(C?parseInt(C[2],10):!1)?!1:n}if(n||this.isOffline()){z.href=URL.createObjectURL(q?this.base64ToBlob(c,g):new Blob([c],{type:g}));n?z.download=d:z.setAttribute("target","_blank");document.body.appendChild(z);try{window.setTimeout(function(){URL.revokeObjectURL(z.href)}, +2E4),z.click(),z.parentNode.removeChild(z)}catch(x){}}else this.createEchoRequest(c,d,g,q,m).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,d,g,q,m,n){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=g?"&mime="+g:"")+(null!=m?"&format="+m:"")+(null!=n?"&base64="+n:"")+(null!=d?"&filename="+encodeURIComponent(d):"")+(q?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(c,d){d=d||"";c=atob(c);for(var g=c.length,q=Math.ceil(g/1024),m=Array(q), +n=0;n<q;++n){for(var z=1024*n,C=Math.min(z+1024,g),x=Array(C-z),y=0;z<C;++y,++z)x[y]=c[z].charCodeAt(0);m[n]=new Uint8Array(x)}return new Blob(m,{type:d})};EditorUi.prototype.saveLocalFile=function(c,d,g,q,m,n,z,C){n=null!=n?n:!1;z=null!=z?z:"vsdx"!=m&&(!mxClient.IS_IOS||!navigator.standalone);m=this.getServiceCount(n);isLocalStorage&&m++;var x=4>=m?2:6<m?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(y,I){try{if("_blank"==I)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(c, g,q);else if(null!=g&&"text/html"==g.substring(0,9)){var N=new EmbedDialog(this,c);this.showDialog(N.container,450,240,!0,!0);N.init()}else{var t=window.open("about:blank");null==t?mxUtils.popup(c,!0):(t.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),t.document.close())}else I==App.MODE_DEVICE||"download"==I?this.doSaveLocalFile(c,y,g,q,null,C):null!=y&&0<y.length&&this.pickFolder(I,mxUtils.bind(this,function(p){try{this.exportFile(c,y,g,q,I,p)}catch(F){this.handleError(F)}}))}catch(p){this.handleError(p)}}), -mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,n,z,null,1<m,v,c,g,q);n=this.isServices(m)?m>v?390:280:160;this.showDialog(e.container,420,n,!0,!0);e.init()};EditorUi.prototype.openInNewWindow=function(c,e,g){var q=window.open("about:blank");null==q||null==q.document?mxUtils.popup(c,!0):("image/svg+xml"!=e||mxClient.IS_SVG?"image/svg+xml"!=e||g?(c=g?c:btoa(unescape(encodeURIComponent(c))),q.document.write('<html><img style="max-width:100%;" src="data:'+ -e+";base64,"+c+'"/></html>')):q.document.write("<html>"+c+"</html>"):q.document.write("<html><pre>"+mxUtils.htmlEntities(c,!1)+"</pre></html>"),q.document.close())};var d=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(c){if(null!=urlParams.tags){this.tagsDialog= -this.tagsComponent=null;var e=c(mxUtils.bind(this,function(q){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding= +mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,n,z,null,1<m,x,c,g,q);n=this.isServices(m)?m>x?390:280:160;this.showDialog(d.container,420,n,!0,!0);d.init()};EditorUi.prototype.openInNewWindow=function(c,d,g){var q=window.open("about:blank");null==q||null==q.document?mxUtils.popup(c,!0):("image/svg+xml"!=d||mxClient.IS_SVG?"image/svg+xml"!=d||g?(c=g?c:btoa(unescape(encodeURIComponent(c))),q.document.write('<html><img style="max-width:100%;" src="data:'+ +d+";base64,"+c+'"/></html>')):q.document.write("<html>"+c+"</html>"):q.document.write("<html><pre>"+mxUtils.htmlEntities(c,!1)+"</pre></html>"),q.document.close())};var e=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(c){if(null!=urlParams.tags){this.tagsDialog= +this.tagsComponent=null;var d=c(mxUtils.bind(this,function(q){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding= "4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor="#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div, -80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var m=e.getBoundingClientRect();this.tagsDialog.style.left=m.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+ -4+"px";m=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=m.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(q)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var q=this.editor.graph.getAllTags();e.style.display=0<q.length?"":"none"}))}d.apply(this,arguments);this.editor.addListener("tagsDialogShown", +80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var m=d.getBoundingClientRect();this.tagsDialog.style.left=m.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+ +4+"px";m=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=m.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(q)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var q=this.editor.graph.getAllTags();d.style.display=0<q.length?"":"none"}))}e.apply(this,arguments);this.editor.addListener("tagsDialogShown", mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&& (this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var g=c(mxUtils.bind(this, function(q){var m=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",m);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)m.apply(this);else{this.exportDialog=document.createElement("div");var n=g.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center"; this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=n.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";n=mxUtils.getCurrentStyle(this.editor.graph.container); -this.exportDialog.style.zIndex=n.zIndex;var z=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});z.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(C){z.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var v=this.createImageDataUri(C,null,"png");C=document.createElement("img");C.style.maxWidth="140px";C.style.maxHeight= -"140px";C.style.cursor="pointer";C.style.backgroundColor="white";C.setAttribute("title",mxResources.get("openInNewWindow"));C.setAttribute("border","0");C.setAttribute("src",v);this.exportDialog.appendChild(C);mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.openInNewWindow(v.substring(v.indexOf(",")+1),"image/png",!0);m.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),null,null,null,null,null,null,null, -Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",m);document.body.appendChild(this.exportDialog)}mxEvent.consume(q)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,e,g,q,m){this.isLocalFileSave()?this.saveLocalFile(g,c,q,m,e):this.saveRequest(c,e,mxUtils.bind(this,function(n,z){return this.createEchoRequest(g,n,q,m,e,z)}),g,m,q)};EditorUi.prototype.saveRequest=function(c,e,g,q,m,n,z){z=null!=z?z:!mxClient.IS_IOS||!navigator.standalone; -var C=this.getServiceCount(!1);isLocalStorage&&C++;var v=4>=C?2:6<C?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(y,I){if("_blank"==I||null!=y&&0<y.length){var N=g("_blank"==I?null:y,I==App.MODE_DEVICE||"download"==I||null==I||"_blank"==I?"0":"1");null!=N&&(I==App.MODE_DEVICE||"download"==I||"_blank"==I?N.simulate(document,"_blank"):this.pickFolder(I,mxUtils.bind(this,function(t){n=null!=n?n:"pdf"==e?"application/pdf":"image/"+e;if(null!=q)try{this.exportFile(q,y,n,!0,I,t)}catch(p){this.handleError(p)}else this.spinner.spin(document.body, -mxResources.get("saving"))&&N.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=N.getStatus()&&299>=N.getStatus())try{this.exportFile(N.getText(),y,n,!0,I,t)}catch(p){this.handleError(p)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(p){this.spinner.stop();this.handleError(p)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,z,null,1<C,v,q,n,m);C=this.isServices(C)?4<C?390:280:160;this.showDialog(c.container, -420,C,!0,!0);c.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,e,g,q,m,n){};EditorUi.prototype.pickFolder=function(c,e,g){e(null)};EditorUi.prototype.exportSvg=function(c,e,g,q,m,n,z,C,v,y,I,N,t,p){if(this.spinner.spin(document.body,mxResources.get("export")))try{var F=this.editor.graph.isSelectionEmpty();g=null!=g?g:F;var J=e?null:this.editor.graph.background;J==mxConstants.NONE&& -(J=null);null==J&&0==e&&(J=I?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var M=this.editor.graph.getSvg(J,c,z,C,null,g,null,null,"blank"==y?"_blank":"self"==y?"_top":null,null,!t,I,N);q&&this.editor.graph.addSvgShadow(M);var H=this.getBaseFilename()+(m?".drawio":"")+".svg";p=null!=p?p:mxUtils.bind(this,function(P){this.isLocalFileSave()||P.length<=MAX_REQUEST_SIZE?this.saveData(H,"svg",P,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"), -mxUtils.bind(this,function(){mxUtils.popup(P)}))});var G=mxUtils.bind(this,function(P){this.spinner.stop();m&&P.setAttribute("content",this.getFileData(!0,null,null,null,g,v,null,null,null,!1));p(Graph.xmlDeclaration+"\n"+(m?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(P))});this.editor.graph.mathEnabled&&this.editor.addMathCss(M);var E=mxUtils.bind(this,function(P){n?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(P,G,this.thumbImageCache)): -G(P)});t?this.embedFonts(M,E):(this.editor.addFontCss(M),E(M))}catch(P){this.handleError(P)}};EditorUi.prototype.addRadiobox=function(c,e,g,q,m,n,z){return this.addCheckbox(c,g,q,m,n,z,!0,e)};EditorUi.prototype.addCheckbox=function(c,e,g,q,m,n,z,C){n=null!=n?n:!0;var v=document.createElement("input");v.style.marginRight="8px";v.style.marginTop="16px";v.setAttribute("type",z?"radio":"checkbox");z="geCheckbox-"+Editor.guid();v.id=z;null!=C&&v.setAttribute("name",C);g&&(v.setAttribute("checked","checked"), -v.defaultChecked=!0);q&&v.setAttribute("disabled","disabled");n&&(c.appendChild(v),g=document.createElement("label"),mxUtils.write(g,e),g.setAttribute("for",z),c.appendChild(g),m||mxUtils.br(c));return v};EditorUi.prototype.addEditButton=function(c,e){var g=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var q=this.getCurrentFile(),m="";null!=q&&q.getMode()!=App.MODE_DEVICE&&q.getMode()!=App.MODE_BROWSER&&(m=window.location.href);var n=document.createElement("select"); +this.exportDialog.style.zIndex=n.zIndex;var z=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});z.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(C){z.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var x=this.createImageDataUri(C,null,"png");C=document.createElement("img");C.style.maxWidth="140px";C.style.maxHeight= +"140px";C.style.cursor="pointer";C.style.backgroundColor="white";C.setAttribute("title",mxResources.get("openInNewWindow"));C.setAttribute("border","0");C.setAttribute("src",x);this.exportDialog.appendChild(C);mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.openInNewWindow(x.substring(x.indexOf(",")+1),"image/png",!0);m.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),null,null,null,null,null,null,null, +Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",m);document.body.appendChild(this.exportDialog)}mxEvent.consume(q)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,d,g,q,m){this.isLocalFileSave()?this.saveLocalFile(g,c,q,m,d):this.saveRequest(c,d,mxUtils.bind(this,function(n,z){return this.createEchoRequest(g,n,q,m,d,z)}),g,m,q)};EditorUi.prototype.saveRequest=function(c,d,g,q,m,n,z){z=null!=z?z:!mxClient.IS_IOS||!navigator.standalone; +var C=this.getServiceCount(!1);isLocalStorage&&C++;var x=4>=C?2:6<C?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(y,I){if("_blank"==I||null!=y&&0<y.length){var N=g("_blank"==I?null:y,I==App.MODE_DEVICE||"download"==I||null==I||"_blank"==I?"0":"1");null!=N&&(I==App.MODE_DEVICE||"download"==I||"_blank"==I?N.simulate(document,"_blank"):this.pickFolder(I,mxUtils.bind(this,function(t){n=null!=n?n:"pdf"==d?"application/pdf":"image/"+d;if(null!=q)try{this.exportFile(q,y,n,!0,I,t)}catch(p){this.handleError(p)}else this.spinner.spin(document.body, +mxResources.get("saving"))&&N.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=N.getStatus()&&299>=N.getStatus())try{this.exportFile(N.getText(),y,n,!0,I,t)}catch(p){this.handleError(p)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(p){this.spinner.stop();this.handleError(p)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,z,null,1<C,x,q,n,m);C=this.isServices(C)?4<C?390:280:160;this.showDialog(c.container, +420,C,!0,!0);c.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,d,g,q,m,n){};EditorUi.prototype.pickFolder=function(c,d,g){d(null)};EditorUi.prototype.exportSvg=function(c,d,g,q,m,n,z,C,x,y,I,N,t,p){if(this.spinner.spin(document.body,mxResources.get("export")))try{var F=this.editor.graph.isSelectionEmpty();g=null!=g?g:F;var K=d?null:this.editor.graph.background;K==mxConstants.NONE&& +(K=null);null==K&&0==d&&(K=I?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var D=this.editor.graph.getSvg(K,c,z,C,null,g,null,null,"blank"==y?"_blank":"self"==y?"_top":null,null,!t,I,N);q&&this.editor.graph.addSvgShadow(D);var H=this.getBaseFilename()+(m?".drawio":"")+".svg";p=null!=p?p:mxUtils.bind(this,function(P){this.isLocalFileSave()||P.length<=MAX_REQUEST_SIZE?this.saveData(H,"svg",P,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"), +mxUtils.bind(this,function(){mxUtils.popup(P)}))});var J=mxUtils.bind(this,function(P){this.spinner.stop();m&&P.setAttribute("content",this.getFileData(!0,null,null,null,g,x,null,null,null,!1));p(Graph.xmlDeclaration+"\n"+(m?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(P))});this.editor.graph.mathEnabled&&this.editor.addMathCss(D);var G=mxUtils.bind(this,function(P){n?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(P,J,this.thumbImageCache)): +J(P)});t?this.embedFonts(D,G):(this.editor.addFontCss(D),G(D))}catch(P){this.handleError(P)}};EditorUi.prototype.addRadiobox=function(c,d,g,q,m,n,z){return this.addCheckbox(c,g,q,m,n,z,!0,d)};EditorUi.prototype.addCheckbox=function(c,d,g,q,m,n,z,C){n=null!=n?n:!0;var x=document.createElement("input");x.style.marginRight="8px";x.style.marginTop="16px";x.setAttribute("type",z?"radio":"checkbox");z="geCheckbox-"+Editor.guid();x.id=z;null!=C&&x.setAttribute("name",C);g&&(x.setAttribute("checked","checked"), +x.defaultChecked=!0);q&&x.setAttribute("disabled","disabled");n&&(c.appendChild(x),g=document.createElement("label"),mxUtils.write(g,d),g.setAttribute("for",z),c.appendChild(g),m||mxUtils.br(c));return x};EditorUi.prototype.addEditButton=function(c,d){var g=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var q=this.getCurrentFile(),m="";null!=q&&q.getMode()!=App.MODE_DEVICE&&q.getMode()!=App.MODE_BROWSER&&(m=window.location.href);var n=document.createElement("select"); n.style.maxWidth="200px";n.style.width="auto";n.style.marginLeft="8px";n.style.marginRight="10px";n.className="geBtn";q=document.createElement("option");q.setAttribute("value","blank");mxUtils.write(q,mxResources.get("makeCopy"));n.appendChild(q);q=document.createElement("option");q.setAttribute("value","custom");mxUtils.write(q,mxResources.get("custom")+"...");n.appendChild(q);c.appendChild(n);mxEvent.addListener(n,"change",mxUtils.bind(this,function(){if("custom"==n.value){var z=new FilenameDialog(this, -m,mxResources.get("ok"),function(C){null!=C?m=C:n.value="blank"},mxResources.get("url"),null,null,null,null,function(){n.value="blank"});this.showDialog(z.container,300,80,!0,!1);z.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,function(){g.checked&&(null==e||e.checked)?n.removeAttribute("disabled"):n.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return g.checked?"blank"===n.value?"_blank":m:null},getEditInput:function(){return g},getEditSelect:function(){return n}}}; -EditorUi.prototype.addLinkSection=function(c,e){function g(){var C=document.createElement("div");C.style.width="100%";C.style.height="100%";C.style.boxSizing="border-box";null!=n&&n!=mxConstants.NONE?(C.style.border="1px solid black",C.style.backgroundColor=n):(C.style.backgroundPosition="center center",C.style.backgroundRepeat="no-repeat",C.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");z.innerText="";z.appendChild(C)}mxUtils.write(c,mxResources.get("links")+":");var q=document.createElement("select"); +m,mxResources.get("ok"),function(C){null!=C?m=C:n.value="blank"},mxResources.get("url"),null,null,null,null,function(){n.value="blank"});this.showDialog(z.container,300,80,!0,!1);z.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,function(){g.checked&&(null==d||d.checked)?n.removeAttribute("disabled"):n.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return g.checked?"blank"===n.value?"_blank":m:null},getEditInput:function(){return g},getEditSelect:function(){return n}}}; +EditorUi.prototype.addLinkSection=function(c,d){function g(){var C=document.createElement("div");C.style.width="100%";C.style.height="100%";C.style.boxSizing="border-box";null!=n&&n!=mxConstants.NONE?(C.style.border="1px solid black",C.style.backgroundColor=n):(C.style.backgroundPosition="center center",C.style.backgroundRepeat="no-repeat",C.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");z.innerText="";z.appendChild(C)}mxUtils.write(c,mxResources.get("links")+":");var q=document.createElement("select"); q.style.width="100px";q.style.padding="0px";q.style.marginLeft="8px";q.style.marginRight="10px";q.className="geBtn";var m=document.createElement("option");m.setAttribute("value","auto");mxUtils.write(m,mxResources.get("automatic"));q.appendChild(m);m=document.createElement("option");m.setAttribute("value","blank");mxUtils.write(m,mxResources.get("openInNewWindow"));q.appendChild(m);m=document.createElement("option");m.setAttribute("value","self");mxUtils.write(m,mxResources.get("openInThisWindow")); -q.appendChild(m);e&&(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),q.appendChild(e));c.appendChild(q);mxUtils.write(c,mxResources.get("borderColor")+":");var n="#0000ff",z=null;z=mxUtils.button("",mxUtils.bind(this,function(C){this.pickColor(n||"none",function(v){n=v;g()});mxEvent.consume(C)}));g();z.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";z.style.marginLeft="4px";z.style.height= -"22px";z.style.width="22px";z.style.position="relative";z.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";z.className="geColorBtn";c.appendChild(z);mxUtils.br(c);return{getColor:function(){return n},getTarget:function(){return q.value},focus:function(){q.focus()}}};EditorUi.prototype.createUrlParameters=function(c,e,g,q,m,n,z){z=null!=z?z:[];q&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||z.push("lightbox=1"),"auto"!=c&&z.push("target="+c),null!= -e&&e!=mxConstants.NONE&&z.push("highlight="+("#"==e.charAt(0)?e.substring(1):e)),null!=m&&0<m.length&&z.push("edit="+encodeURIComponent(m)),n&&z.push("layers=1"),this.editor.graph.foldingEnabled&&z.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&z.push("page-id="+this.currentPage.getId());return z};EditorUi.prototype.createLink=function(c,e,g,q,m,n,z,C,v,y){v=this.createUrlParameters(c,e,g,q,m,n,v);c=this.getCurrentFile();e=!0;null!=z?g="#U"+encodeURIComponent(z): -(c=this.getCurrentFile(),C||null==c||c.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+c.getHash(),e=!1));e&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&v.push("title="+encodeURIComponent(c.getTitle()));y&&1<g.length&&(v.push("open="+g.substring(1)),g="");return(q&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp|| -!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<v.length?"?"+v.join("&"):"")+g};EditorUi.prototype.createHtml=function(c,e,g,q,m,n,z,C,v,y,I,N){this.getBasenames();var t={};""!=m&&m!=mxConstants.NONE&&(t.highlight=m);"auto"!==q&&(t.target=q);y||(t.lightbox=!1);t.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(t.zoom=g/100);g=[];z&&(g.push("pages"),t.resize=!0,null!=this.pages&&null!=this.currentPage&&(t.page=mxUtils.indexOf(this.pages, -this.currentPage)));e&&(g.push("zoom"),t.resize=!0);C&&g.push("layers");v&&g.push("tags");0<g.length&&(y&&g.push("lightbox"),t.toolbar=g.join(" "));null!=I&&0<I.length&&(t.edit=I);null!=c?t.url=c:t.xml=this.getFileData(!0,null,null,null,null,!z);e='<div class="mxgraph" style="'+(n?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(t))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";N(e,'<script type="text/javascript" src="'+ -(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,e,g,q){var m=document.createElement("div");m.style.whiteSpace="nowrap";var n=document.createElement("h3");mxUtils.write(n,mxResources.get("html"));n.style.cssText= -"width:100%;text-align:center;margin-top:0px;margin-bottom:12px";m.appendChild(n);var z=document.createElement("div");z.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var C=document.createElement("input");C.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";C.setAttribute("value","url");C.setAttribute("type","radio");C.setAttribute("name","type-embedhtmldialog");n=C.cloneNode(!0);n.setAttribute("value","copy");z.appendChild(n);var v=document.createElement("span"); -mxUtils.write(v,mxResources.get("includeCopyOfMyDiagram"));z.appendChild(v);mxUtils.br(z);z.appendChild(C);v=document.createElement("span");mxUtils.write(v,mxResources.get("publicDiagramUrl"));z.appendChild(v);var y=this.getCurrentFile();null==g&&null!=y&&y.constructor==window.DriveFile&&(v=document.createElement("a"),v.style.paddingLeft="12px",v.style.color="gray",v.style.cursor="pointer",mxUtils.write(v,mxResources.get("share")),z.appendChild(v),mxEvent.addListener(v,"click",mxUtils.bind(this,function(){this.hideDialog(); +q.appendChild(m);d&&(d=document.createElement("option"),d.setAttribute("value","frame"),mxUtils.write(d,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),q.appendChild(d));c.appendChild(q);mxUtils.write(c,mxResources.get("borderColor")+":");var n="#0000ff",z=null;z=mxUtils.button("",mxUtils.bind(this,function(C){this.pickColor(n||"none",function(x){n=x;g()});mxEvent.consume(C)}));g();z.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";z.style.marginLeft="4px";z.style.height= +"22px";z.style.width="22px";z.style.position="relative";z.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";z.className="geColorBtn";c.appendChild(z);mxUtils.br(c);return{getColor:function(){return n},getTarget:function(){return q.value},focus:function(){q.focus()}}};EditorUi.prototype.createUrlParameters=function(c,d,g,q,m,n,z){z=null!=z?z:[];q&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||z.push("lightbox=1"),"auto"!=c&&z.push("target="+c),null!= +d&&d!=mxConstants.NONE&&z.push("highlight="+("#"==d.charAt(0)?d.substring(1):d)),null!=m&&0<m.length&&z.push("edit="+encodeURIComponent(m)),n&&z.push("layers=1"),this.editor.graph.foldingEnabled&&z.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&z.push("page-id="+this.currentPage.getId());return z};EditorUi.prototype.createLink=function(c,d,g,q,m,n,z,C,x,y){x=this.createUrlParameters(c,d,g,q,m,n,x);c=this.getCurrentFile();d=!0;null!=z?g="#U"+encodeURIComponent(z): +(c=this.getCurrentFile(),C||null==c||c.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+c.getHash(),d=!1));d&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&x.push("title="+encodeURIComponent(c.getTitle()));y&&1<g.length&&(x.push("open="+g.substring(1)),g="");return(q&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp|| +!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<x.length?"?"+x.join("&"):"")+g};EditorUi.prototype.createHtml=function(c,d,g,q,m,n,z,C,x,y,I,N){this.getBasenames();var t={};""!=m&&m!=mxConstants.NONE&&(t.highlight=m);"auto"!==q&&(t.target=q);y||(t.lightbox=!1);t.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(t.zoom=g/100);g=[];z&&(g.push("pages"),t.resize=!0,null!=this.pages&&null!=this.currentPage&&(t.page=mxUtils.indexOf(this.pages, +this.currentPage)));d&&(g.push("zoom"),t.resize=!0);C&&g.push("layers");x&&g.push("tags");0<g.length&&(y&&g.push("lightbox"),t.toolbar=g.join(" "));null!=I&&0<I.length&&(t.edit=I);null!=c?t.url=c:t.xml=this.getFileData(!0,null,null,null,null,!z);d='<div class="mxgraph" style="'+(n?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(t))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";N(d,'<script type="text/javascript" src="'+ +(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,d,g,q){var m=document.createElement("div");m.style.whiteSpace="nowrap";var n=document.createElement("h3");mxUtils.write(n,mxResources.get("html"));n.style.cssText= +"width:100%;text-align:center;margin-top:0px;margin-bottom:12px";m.appendChild(n);var z=document.createElement("div");z.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var C=document.createElement("input");C.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";C.setAttribute("value","url");C.setAttribute("type","radio");C.setAttribute("name","type-embedhtmldialog");n=C.cloneNode(!0);n.setAttribute("value","copy");z.appendChild(n);var x=document.createElement("span"); +mxUtils.write(x,mxResources.get("includeCopyOfMyDiagram"));z.appendChild(x);mxUtils.br(z);z.appendChild(C);x=document.createElement("span");mxUtils.write(x,mxResources.get("publicDiagramUrl"));z.appendChild(x);var y=this.getCurrentFile();null==g&&null!=y&&y.constructor==window.DriveFile&&(x=document.createElement("a"),x.style.paddingLeft="12px",x.style.color="gray",x.style.cursor="pointer",mxUtils.write(x,mxResources.get("share")),z.appendChild(x),mxEvent.addListener(x,"click",mxUtils.bind(this,function(){this.hideDialog(); this.drive.showPermissions(y.getId())})));n.setAttribute("checked","checked");null==g&&C.setAttribute("disabled","disabled");m.appendChild(z);var I=this.addLinkSection(m),N=this.addCheckbox(m,mxResources.get("zoom"),!0,null,!0);mxUtils.write(m,":");var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.style.marginRight="12px";t.value="100%";m.appendChild(t);var p=this.addCheckbox(m,mxResources.get("fit"),!0); -z=null!=this.pages&&1<this.pages.length;var F=F=this.addCheckbox(m,mxResources.get("allPages"),z,!z),J=this.addCheckbox(m,mxResources.get("layers"),!0),M=this.addCheckbox(m,mxResources.get("tags"),!0),H=this.addCheckbox(m,mxResources.get("lightbox"),!0),G=null;z=380;if(EditorUi.enableHtmlEditOption){G=this.addEditButton(m,H);var E=G.getEditInput();E.style.marginBottom="16px";z+=50;mxEvent.addListener(H,"change",function(){H.checked?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled"); -E.checked&&H.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,m,mxUtils.bind(this,function(){q(C.checked?g:null,N.checked,t.value,I.getTarget(),I.getColor(),p.checked,F.checked,J.checked,M.checked,H.checked,null!=G?G.getLink():null)}),null,c,e);this.showDialog(c.container,340,z,!0,!0);n.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,e,g,q,m,n,z,C){var v=document.createElement("div");v.style.whiteSpace= -"nowrap";var y=document.createElement("h3");mxUtils.write(y,c||mxResources.get("link"));y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";v.appendChild(y);var I=this.getCurrentFile();c=0;if(null==I||I.constructor!=window.DriveFile||e)z=null!=z?z:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{c=80;z=null!=z?z:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";y=document.createElement("div");y.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"));y.appendChild(N);N=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(I.getId())}));N.style.marginTop="12px";N.className="geBtn";y.appendChild(N);v.appendChild(y);N=document.createElement("a");N.style.paddingLeft="12px";N.style.color="gray";N.style.fontSize="11px";N.style.cursor="pointer";mxUtils.write(N,mxResources.get("check"));y.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(T){this.spinner.stop();T=new ErrorDialog(this,null,mxResources.get(null!=T?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(T.container,300,80,!0,!1);T.init()}))}))}var t=null,p=null;if(null!=g||null!=q)c+=30,mxUtils.write(v,mxResources.get("width")+":"),t=document.createElement("input"), -t.setAttribute("type","text"),t.style.marginRight="16px",t.style.width="50px",t.style.marginLeft="6px",t.style.marginRight="16px",t.style.marginBottom="10px",t.value="100%",v.appendChild(t),mxUtils.write(v,mxResources.get("height")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.width="50px",p.style.marginLeft="6px",p.style.marginBottom="10px",p.value=q+"px",v.appendChild(p),mxUtils.br(v);var F=this.addLinkSection(v,n);g=null!=this.pages&&1<this.pages.length;var J=null; -if(null==I||I.constructor!=window.DriveFile||e)J=this.addCheckbox(v,mxResources.get("allPages"),g,!g);var M=this.addCheckbox(v,mxResources.get("lightbox"),!0,null,null,!n),H=this.addEditButton(v,M),G=H.getEditInput();n&&(G.style.marginLeft=M.style.marginLeft,M.style.display="none",c-=20);var E=this.addCheckbox(v,mxResources.get("layers"),!0);E.style.marginLeft=G.style.marginLeft;E.style.marginTop="8px";var P=this.addCheckbox(v,mxResources.get("tags"),!0);P.style.marginLeft=G.style.marginLeft;P.style.marginBottom= -"16px";P.style.marginTop="16px";mxEvent.addListener(M,"change",function(){M.checked?(E.removeAttribute("disabled"),G.removeAttribute("disabled")):(E.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"));G.checked&&M.checked?H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled","disabled")});e=new CustomDialog(this,v,mxUtils.bind(this,function(){m(F.getTarget(),F.getColor(),null==J?!0:J.checked,M.checked,H.getLink(),E.checked,null!=t?t.value:null, -null!=p?p.value:null,P.checked)}),null,mxResources.get("create"),z,C);this.showDialog(e.container,340,300+c,!0,!0);null!=t?(t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?t.select():document.execCommand("selectAll",!1,null)):F.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,e,g,q,m){var n=document.createElement("div");n.style.whiteSpace="nowrap";var z=document.createElement("h3");mxUtils.write(z,mxResources.get("image"));z.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+ -(m?"10":"4")+"px";n.appendChild(z);if(m){mxUtils.write(n,mxResources.get("zoom")+":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";C.style.marginLeft="4px";C.style.marginRight="12px";C.value=this.lastExportZoom||"100%";n.appendChild(C);mxUtils.write(n,mxResources.get("borderWidth")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.marginRight="16px";v.style.width="60px";v.style.marginLeft="4px";v.value= -this.lastExportBorder||"0";n.appendChild(v);mxUtils.br(n)}var y=this.addCheckbox(n,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),I=q?null:this.addCheckbox(n,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);z=this.editor.graph;var N=q?null:this.addCheckbox(n,mxResources.get("transparentBackground"),z.background==mxConstants.NONE||null==z.background);null!=N&&(N.style.marginBottom="16px");c=new CustomDialog(this,n,mxUtils.bind(this,function(){var t= -parseInt(C.value)/100||1,p=parseInt(v.value)||0;g(!y.checked,null!=I?I.checked:!1,null!=N?N.checked:!1,t,p)}),null,c,e);this.showDialog(c.container,300,(m?25:0)+(q?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,e,g,q,m,n,z,C,v){z=null!=z?z:Editor.defaultIncludeDiagram;var y=document.createElement("div");y.style.whiteSpace="nowrap";var I=this.editor.graph,N="jpeg"==C?220:300,t=document.createElement("h3");mxUtils.write(t,c);t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px"; +z=null!=this.pages&&1<this.pages.length;var F=F=this.addCheckbox(m,mxResources.get("allPages"),z,!z),K=this.addCheckbox(m,mxResources.get("layers"),!0),D=this.addCheckbox(m,mxResources.get("tags"),!0),H=this.addCheckbox(m,mxResources.get("lightbox"),!0),J=null;z=380;if(EditorUi.enableHtmlEditOption){J=this.addEditButton(m,H);var G=J.getEditInput();G.style.marginBottom="16px";z+=50;mxEvent.addListener(H,"change",function(){H.checked?G.removeAttribute("disabled"):G.setAttribute("disabled","disabled"); +G.checked&&H.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,m,mxUtils.bind(this,function(){q(C.checked?g:null,N.checked,t.value,I.getTarget(),I.getColor(),p.checked,F.checked,K.checked,D.checked,H.checked,null!=J?J.getLink():null)}),null,c,d);this.showDialog(c.container,340,z,!0,!0);n.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,d,g,q,m,n,z,C){var x=document.createElement("div");x.style.whiteSpace= +"nowrap";var y=document.createElement("h3");mxUtils.write(y,c||mxResources.get("link"));y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";x.appendChild(y);var I=this.getCurrentFile();c=0;if(null==I||I.constructor!=window.DriveFile||d)z=null!=z?z:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{c=80;z=null!=z?z:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";y=document.createElement("div");y.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"));y.appendChild(N);N=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(I.getId())}));N.style.marginTop="12px";N.className="geBtn";y.appendChild(N);x.appendChild(y);N=document.createElement("a");N.style.paddingLeft="12px";N.style.color="gray";N.style.fontSize="11px";N.style.cursor="pointer";mxUtils.write(N,mxResources.get("check"));y.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(T){this.spinner.stop();T=new ErrorDialog(this,null,mxResources.get(null!=T?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(T.container,300,80,!0,!1);T.init()}))}))}var t=null,p=null;if(null!=g||null!=q)c+=30,mxUtils.write(x,mxResources.get("width")+":"),t=document.createElement("input"), +t.setAttribute("type","text"),t.style.marginRight="16px",t.style.width="50px",t.style.marginLeft="6px",t.style.marginRight="16px",t.style.marginBottom="10px",t.value="100%",x.appendChild(t),mxUtils.write(x,mxResources.get("height")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.width="50px",p.style.marginLeft="6px",p.style.marginBottom="10px",p.value=q+"px",x.appendChild(p),mxUtils.br(x);var F=this.addLinkSection(x,n);g=null!=this.pages&&1<this.pages.length;var K=null; +if(null==I||I.constructor!=window.DriveFile||d)K=this.addCheckbox(x,mxResources.get("allPages"),g,!g);var D=this.addCheckbox(x,mxResources.get("lightbox"),!0,null,null,!n),H=this.addEditButton(x,D),J=H.getEditInput();n&&(J.style.marginLeft=D.style.marginLeft,D.style.display="none",c-=20);var G=this.addCheckbox(x,mxResources.get("layers"),!0);G.style.marginLeft=J.style.marginLeft;G.style.marginTop="8px";var P=this.addCheckbox(x,mxResources.get("tags"),!0);P.style.marginLeft=J.style.marginLeft;P.style.marginBottom= +"16px";P.style.marginTop="16px";mxEvent.addListener(D,"change",function(){D.checked?(G.removeAttribute("disabled"),J.removeAttribute("disabled")):(G.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"));J.checked&&D.checked?H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled","disabled")});d=new CustomDialog(this,x,mxUtils.bind(this,function(){m(F.getTarget(),F.getColor(),null==K?!0:K.checked,D.checked,H.getLink(),G.checked,null!=t?t.value:null, +null!=p?p.value:null,P.checked)}),null,mxResources.get("create"),z,C);this.showDialog(d.container,340,300+c,!0,!0);null!=t?(t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?t.select():document.execCommand("selectAll",!1,null)):F.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,d,g,q,m){var n=document.createElement("div");n.style.whiteSpace="nowrap";var z=document.createElement("h3");mxUtils.write(z,mxResources.get("image"));z.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+ +(m?"10":"4")+"px";n.appendChild(z);if(m){mxUtils.write(n,mxResources.get("zoom")+":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";C.style.marginLeft="4px";C.style.marginRight="12px";C.value=this.lastExportZoom||"100%";n.appendChild(C);mxUtils.write(n,mxResources.get("borderWidth")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.marginRight="16px";x.style.width="60px";x.style.marginLeft="4px";x.value= +this.lastExportBorder||"0";n.appendChild(x);mxUtils.br(n)}var y=this.addCheckbox(n,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),I=q?null:this.addCheckbox(n,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);z=this.editor.graph;var N=q?null:this.addCheckbox(n,mxResources.get("transparentBackground"),z.background==mxConstants.NONE||null==z.background);null!=N&&(N.style.marginBottom="16px");c=new CustomDialog(this,n,mxUtils.bind(this,function(){var t= +parseInt(C.value)/100||1,p=parseInt(x.value)||0;g(!y.checked,null!=I?I.checked:!1,null!=N?N.checked:!1,t,p)}),null,c,d);this.showDialog(c.container,300,(m?25:0)+(q?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,d,g,q,m,n,z,C,x){z=null!=z?z:Editor.defaultIncludeDiagram;var y=document.createElement("div");y.style.whiteSpace="nowrap";var I=this.editor.graph,N="jpeg"==C?220:300,t=document.createElement("h3");mxUtils.write(t,c);t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px"; y.appendChild(t);mxUtils.write(y,mxResources.get("zoom")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.style.marginRight="12px";p.value=this.lastExportZoom||"100%";y.appendChild(p);mxUtils.write(y,mxResources.get("borderWidth")+":");var F=document.createElement("input");F.setAttribute("type","text");F.style.marginRight="16px";F.style.width="60px";F.style.marginLeft="4px";F.value=this.lastExportBorder|| -"0";y.appendChild(F);mxUtils.br(y);var J=this.addCheckbox(y,mxResources.get("selectionOnly"),!1,I.isSelectionEmpty()),M=document.createElement("input");M.style.marginTop="16px";M.style.marginRight="8px";M.style.marginLeft="24px";M.setAttribute("disabled","disabled");M.setAttribute("type","checkbox");var H=document.createElement("select");H.style.marginTop="16px";H.style.marginLeft="8px";c=["selectionOnly","diagram","page"];var G={};for(t=0;t<c.length;t++)if(!I.isSelectionEmpty()||"selectionOnly"!= -c[t]){var E=document.createElement("option");mxUtils.write(E,mxResources.get(c[t]));E.setAttribute("value",c[t]);H.appendChild(E);G[c[t]]=E}v?(mxUtils.write(y,mxResources.get("size")+":"),y.appendChild(H),mxUtils.br(y),N+=26,mxEvent.addListener(H,"change",function(){"selectionOnly"==H.value&&(J.checked=!0)})):n&&(y.appendChild(M),mxUtils.write(y,mxResources.get("crop")),mxUtils.br(y),N+=30,mxEvent.addListener(J,"change",function(){J.checked?M.removeAttribute("disabled"):M.setAttribute("disabled", -"disabled")}));I.isSelectionEmpty()?v&&(J.style.display="none",J.nextSibling.style.display="none",J.nextSibling.nextSibling.style.display="none",N-=30):(H.value="diagram",M.setAttribute("checked","checked"),M.defaultChecked=!0,mxEvent.addListener(J,"change",function(){H.value=J.checked?"selectionOnly":"diagram"}));var P=this.addCheckbox(y,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=C),T=null;Editor.isDarkMode()&&(T=this.addCheckbox(y,mxResources.get("dark"),!0),N+=26);var W=this.addCheckbox(y, +"0";y.appendChild(F);mxUtils.br(y);var K=this.addCheckbox(y,mxResources.get("selectionOnly"),!1,I.isSelectionEmpty()),D=document.createElement("input");D.style.marginTop="16px";D.style.marginRight="8px";D.style.marginLeft="24px";D.setAttribute("disabled","disabled");D.setAttribute("type","checkbox");var H=document.createElement("select");H.style.marginTop="16px";H.style.marginLeft="8px";c=["selectionOnly","diagram","page"];var J={};for(t=0;t<c.length;t++)if(!I.isSelectionEmpty()||"selectionOnly"!= +c[t]){var G=document.createElement("option");mxUtils.write(G,mxResources.get(c[t]));G.setAttribute("value",c[t]);H.appendChild(G);J[c[t]]=G}x?(mxUtils.write(y,mxResources.get("size")+":"),y.appendChild(H),mxUtils.br(y),N+=26,mxEvent.addListener(H,"change",function(){"selectionOnly"==H.value&&(K.checked=!0)})):n&&(y.appendChild(D),mxUtils.write(y,mxResources.get("crop")),mxUtils.br(y),N+=30,mxEvent.addListener(K,"change",function(){K.checked?D.removeAttribute("disabled"):D.setAttribute("disabled", +"disabled")}));I.isSelectionEmpty()?x&&(K.style.display="none",K.nextSibling.style.display="none",K.nextSibling.nextSibling.style.display="none",N-=30):(H.value="diagram",D.setAttribute("checked","checked"),D.defaultChecked=!0,mxEvent.addListener(K,"change",function(){H.value=K.checked?"selectionOnly":"diagram"}));var P=this.addCheckbox(y,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=C),T=null;Editor.isDarkMode()&&(T=this.addCheckbox(y,mxResources.get("dark"),!0),N+=26);var W=this.addCheckbox(y, mxResources.get("shadow"),I.shadowVisible),U=null;if("png"==C||"jpeg"==C)U=this.addCheckbox(y,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),N+=30;var V=this.addCheckbox(y,mxResources.get("includeCopyOfMyDiagram"),z,null,null,"jpeg"!=C);V.style.marginBottom="16px";var l=document.createElement("input");l.style.marginBottom="16px";l.style.marginRight="8px";l.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||l.setAttribute("disabled","disabled");var A= document.createElement("select");A.style.maxWidth="260px";A.style.marginLeft="8px";A.style.marginRight="10px";A.style.marginBottom="16px";A.className="geBtn";n=document.createElement("option");n.setAttribute("value","none");mxUtils.write(n,mxResources.get("noChange"));A.appendChild(n);n=document.createElement("option");n.setAttribute("value","embedFonts");mxUtils.write(n,mxResources.get("embedFonts"));A.appendChild(n);n=document.createElement("option");n.setAttribute("value","lblToSvg");mxUtils.write(n, -mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||A.appendChild(n);mxEvent.addListener(A,"change",mxUtils.bind(this,function(){"lblToSvg"==A.value?(l.checked=!0,l.setAttribute("disabled","disabled"),G.page.style.display="none","page"==H.value&&(H.value="diagram"),W.checked=!1,W.setAttribute("disabled","disabled"),Q.style.display="inline-block",L.style.display="none"):"disabled"==l.getAttribute("disabled")&&(l.checked=!1,l.removeAttribute("disabled"),W.removeAttribute("disabled"), -G.page.style.display="",Q.style.display="none",L.style.display="")}));e&&(y.appendChild(l),mxUtils.write(y,mxResources.get("embedImages")),mxUtils.br(y),mxUtils.write(y,mxResources.get("txtSettings")+":"),y.appendChild(A),mxUtils.br(y),N+=60);var L=document.createElement("select");L.style.maxWidth="260px";L.style.marginLeft="8px";L.style.marginRight="10px";L.className="geBtn";e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));L.appendChild(e); -e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));L.appendChild(e);e=document.createElement("option");e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));L.appendChild(e);var Q=document.createElement("div");mxUtils.write(Q,mxResources.get("LinksLost"));Q.style.margin="7px";Q.style.display="none";"svg"==C&&(mxUtils.write(y,mxResources.get("links")+":"),y.appendChild(L),y.appendChild(Q),mxUtils.br(y), -mxUtils.br(y),N+=50);g=new CustomDialog(this,y,mxUtils.bind(this,function(){this.lastExportBorder=F.value;this.lastExportZoom=p.value;m(p.value,P.checked,!J.checked,W.checked,V.checked,l.checked,F.value,M.checked,!1,L.value,null!=U?U.checked:null,null!=T?T.checked:null,H.value,"embedFonts"==A.value,"lblToSvg"==A.value)}),null,g,q);this.showDialog(g.container,340,N,!0,!0,null,null,null,null,!0);p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?p.select():document.execCommand("selectAll", -!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,e,g,q,m){var n=document.createElement("div");n.style.whiteSpace="nowrap";var z=this.editor.graph;if(null!=e){var C=document.createElement("h3");mxUtils.write(C,e);C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";n.appendChild(C)}var v=this.addCheckbox(n,mxResources.get("fit"),!0),y=this.addCheckbox(n,mxResources.get("shadow"),z.shadowVisible&&q,!q),I=this.addCheckbox(n,g),N=this.addCheckbox(n,mxResources.get("lightbox"), -!0),t=this.addEditButton(n,N),p=t.getEditInput(),F=1<z.model.getChildCount(z.model.getRoot()),J=this.addCheckbox(n,mxResources.get("layers"),F,!F);J.style.marginLeft=p.style.marginLeft;J.style.marginBottom="12px";J.style.marginTop="8px";mxEvent.addListener(N,"change",function(){N.checked?(F&&J.removeAttribute("disabled"),p.removeAttribute("disabled")):(J.setAttribute("disabled","disabled"),p.setAttribute("disabled","disabled"));p.checked&&N.checked?t.getEditSelect().removeAttribute("disabled"):t.getEditSelect().setAttribute("disabled", -"disabled")});e=new CustomDialog(this,n,mxUtils.bind(this,function(){c(v.checked,y.checked,I.checked,N.checked,t.getLink(),J.checked)}),null,mxResources.get("embed"),m);this.showDialog(e.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,e,g,q,m,n,z,C){function v(p){var F=" ",J="";q&&(F=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+ -EditorUi.lightboxHost+"/?client=1"+(null!=I?"&page="+I:"")+(m?"&edit=_blank":"")+(n?"&layers=1":"")+"');}})(this);\"",J+="cursor:pointer;");c&&(J+="max-width:100%;");var M="";g&&(M=' width="'+Math.round(y.width)+'" height="'+Math.round(y.height)+'"');z('<img src="'+p+'"'+M+(""!=J?' style="'+J+'"':"")+F+"/>")}var y=this.editor.graph.getGraphBounds(),I=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(p){var F=q?this.getFileData(!0):null;p= -this.createImageDataUri(p,F,"png");v(p)}),null,null,null,mxUtils.bind(this,function(p){C({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,e,null,null,Editor.defaultBorder);else if(e=this.getFileData(!0),y.width*y.height<=MAX_AREA&&e.length<=MAX_REQUEST_SIZE){var N="";g&&(N="&w="+Math.round(2*y.width)+"&h="+Math.round(2*y.height));var t=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(q?"1":"0")+N+"&xml="+encodeURIComponent(e));t.send(mxUtils.bind(this,function(){200<=t.getStatus()&& -299>=t.getStatus()?v("data:image/png;base64,"+t.getText()):C({message:mxResources.get("unknownError")})}))}else C({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,e,g,q,m,n,z){var C=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),v=C.getElementsByTagName("a");if(null!=v)for(var y=0;y<v.length;y++){var I=v[y].getAttribute("href");null!=I&&"#"==I.charAt(0)&&"_blank"==v[y].getAttribute("target")&&v[y].removeAttribute("target")}q&& -C.setAttribute("content",this.getFileData(!0));e&&this.editor.graph.addSvgShadow(C);if(g){var N=" ",t="";q&&(N="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(m?"&edit=_blank":"")+(n?"&layers=1": -"")+"');}})(this);\"",t+="cursor:pointer;");c&&(t+="max-width:100%;");this.editor.convertImages(C,mxUtils.bind(this,function(p){z('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(p))+'"'+(""!=t?' style="'+t+'"':"")+N+"/>")}))}else t="",q&&(e=this.getSelectedPageIndex(),C.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+ -EditorUi.lightboxHost+"/?client=1"+(null!=e?"&page="+e:"")+(m?"&edit=_blank":"")+(n?"&layers=1":"")+"');}}})(this);"),t+="cursor:pointer;"),c&&(c=parseInt(C.getAttribute("width")),m=parseInt(C.getAttribute("height")),C.setAttribute("viewBox","-0.5 -0.5 "+c+" "+m),t+="max-width:100%;max-height:"+m+"px;",C.removeAttribute("height")),""!=t&&C.setAttribute("style",t),this.editor.addFontCss(C),this.editor.graph.mathEnabled&&this.editor.addMathCss(C),z(mxUtils.getXml(C))};EditorUi.prototype.timeSince=function(c){c= -Math.floor((new Date-c)/1E3);var e=Math.floor(c/31536E3);if(1<e)return e+" "+mxResources.get("years");e=Math.floor(c/2592E3);if(1<e)return e+" "+mxResources.get("months");e=Math.floor(c/86400);if(1<e)return e+" "+mxResources.get("days");e=Math.floor(c/3600);if(1<e)return e+" "+mxResources.get("hours");e=Math.floor(c/60);return 1<e?e+" "+mxResources.get("minutes"):1==e?e+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,e){if(null!=c){var g=null;if("diagram"==c.nodeName)g= -c;else if("mxfile"==c.nodeName){var q=c.getElementsByTagName("diagram");if(0<q.length){g=q[0];var m=e.getGlobalVariable;e.getGlobalVariable=function(n){return"page"==n?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==n?1:m.apply(this,arguments)}}}null!=g&&(c=Editor.parseDiagramNode(g))}q=this.editor.graph;try{this.editor.graph=e,this.editor.setGraphXml(c)}catch(n){}finally{this.editor.graph=q}return c};EditorUi.prototype.getPngFileProperties=function(c){var e=1,g=0;if(null!= -c){if(c.hasAttribute("scale")){var q=parseFloat(c.getAttribute("scale"));!isNaN(q)&&0<q&&(e=q)}c.hasAttribute("border")&&(q=parseInt(c.getAttribute("border")),!isNaN(q)&&0<q&&(g=q))}return{scale:e,border:g}};EditorUi.prototype.getEmbeddedPng=function(c,e,g,q,m){try{var n=this.editor.graph,z=null!=n.themes&&"darkTheme"==n.defaultThemeName,C=null;if(null!=g&&0<g.length)n=this.createTemporaryGraph(z?n.getDefaultStylesheet():n.getStylesheet()),document.body.appendChild(n.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement, -!0),n),C=g;else if(z||null!=this.pages&&this.currentPage!=this.pages[0]){n=this.createTemporaryGraph(z?n.getDefaultStylesheet():n.getStylesheet());var v=n.getGlobalVariable;n.setBackgroundImage=this.editor.graph.setBackgroundImage;var y=this.pages[0];this.currentPage==y?n.setBackgroundImage(this.editor.graph.backgroundImage):null!=y.viewState&&null!=y.viewState&&n.setBackgroundImage(y.viewState.backgroundImage);n.getGlobalVariable=function(I){return"page"==I?y.getName():"pagenumber"==I?1:v.apply(this, -arguments)};document.body.appendChild(n.container);n.model.setRoot(y.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(I){try{null==C&&(C=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var N=I.toDataURL("image/png");N=Editor.writeGraphModelToPng(N,"tEXt","mxfile",encodeURIComponent(C));c(N.substring(N.lastIndexOf(",")+1));n!=this.editor.graph&&n.container.parentNode.removeChild(n.container)}catch(t){null!=e&&e(t)}}),null,null,null,mxUtils.bind(this,function(I){null!=e&& -e(I)}),null,null,q,null,n.shadowVisible,null,n,m,null,null,null,"diagram",null)}catch(I){null!=e&&e(I)}};EditorUi.prototype.getEmbeddedSvg=function(c,e,g,q,m,n,z,C,v,y,I,N,t){C=null!=C?C:!0;I=null!=I?I:0;z=null!=v?v:e.background;z==mxConstants.NONE&&(z=null);n=e.getSvg(z,y,I,null,null,n,null,null,null,e.shadowVisible||N,null,t,"diagram");(e.shadowVisible||N)&&e.addSvgShadow(n,null,null,0==I);null!=c&&n.setAttribute("content",c);null!=g&&n.setAttribute("resource",g);var p=mxUtils.bind(this,function(F){F= -(q?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(F);null!=m&&m(F);return F});e.mathEnabled&&this.editor.addMathCss(n);if(null!=m)this.embedFonts(n,mxUtils.bind(this,function(F){C?this.editor.convertImages(F,mxUtils.bind(this,function(J){p(J)})):p(F)}));else return p(n)};EditorUi.prototype.embedFonts=function(c,e){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss), -this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(c,g),e(c)}catch(q){e(c)}}))}catch(g){e(c)}}))};EditorUi.prototype.exportImage=function(c,e,g,q,m,n,z,C,v,y,I,N,t){v=null!=v?v:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var p=this.editor.graph.isSelectionEmpty();g=null!=g?g:p;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(F){this.spinner.stop();try{this.saveCanvas(F, -m?this.getFileData(!0,null,null,null,g,C):null,v,null==this.pages||0==this.pages.length,I)}catch(J){this.handleError(J)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(F){this.spinner.stop();this.handleError(F)}),null,g,c||1,e,q,null,null,n,z,y,N,t)}catch(F){this.spinner.stop(),this.handleError(F)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.importXml=function(c,e,g,q,m,n,z){e=null!=e?e:0;g=null!=g?g:0;var C=[];try{var v= -this.editor.graph;if(null!=c&&0<c.length){v.model.beginUpdate();try{var y=mxUtils.parseXml(c);c={};var I=this.editor.extractGraphModel(y.documentElement,null!=this.pages);if(null!=I&&"mxfile"==I.nodeName&&null!=this.pages){var N=I.getElementsByTagName("diagram");if(1==N.length&&!n){if(I=Editor.parseDiagramNode(N[0]),null!=this.currentPage&&(c[N[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var t=N[0].getAttribute("name");null!=t&&""!=t&&this.editor.graph.model.execute(new RenamePage(this, -this.currentPage,t))}}else if(0<N.length){n=[];var p=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[N[0].getAttribute("id")]=this.pages[0].getId(),I=Editor.parseDiagramNode(N[0]),q=!1,p=1);for(;p<N.length;p++){var F=N[p].getAttribute("id");N[p].removeAttribute("id");var J=this.updatePageRoot(new DiagramPage(N[p]));c[F]=N[p].getAttribute("id");var M=this.pages.length;null==J.getName()&&J.setName(mxResources.get("pageWithNumber",[M+1]));v.model.execute(new ChangePage(this,J,J,M, -!0));n.push(J)}this.updatePageLinks(c,n)}}if(null!=I&&"mxGraphModel"===I.nodeName){C=v.importGraphModel(I,e,g,q);if(null!=C)for(p=0;p<C.length;p++)this.updatePageLinksForCell(c,C[p]);var H=v.parseBackgroundImage(I.getAttribute("backgroundImage"));if(null!=H&&null!=H.originalSrc){this.updateBackgroundPageLink(c,H);var G=new ChangePageSetup(this,null,H);G.ignoreColor=!0;v.model.execute(G)}}z&&this.insertHandler(C,null,null,v.defaultVertexStyle,v.defaultEdgeStyle,!1,!0)}finally{v.model.endUpdate()}}}catch(E){if(m)throw E; -this.handleError(E)}return C};EditorUi.prototype.updatePageLinks=function(c,e){for(var g=0;g<e.length;g++)this.updatePageLinksForCell(c,e[g].root),null!=e[g].viewState&&this.updateBackgroundPageLink(c,e[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,e){try{if(null!=e&&Graph.isPageLink(e.originalSrc)){var g=c[e.originalSrc.substring(e.originalSrc.indexOf(",")+1)];null!=g&&(e.originalSrc="data:page/id,"+g)}}catch(q){}};EditorUi.prototype.updatePageLinksForCell= -function(c,e){var g=document.createElement("div"),q=this.editor.graph,m=q.getLinkForCell(e);null!=m&&q.setLinkForCell(e,this.updatePageLink(c,m));if(q.isHtmlLabel(e)){g.innerHTML=q.sanitizeHtml(q.getLabel(e));for(var n=g.getElementsByTagName("a"),z=!1,C=0;C<n.length;C++)m=n[C].getAttribute("href"),null!=m&&(n[C].setAttribute("href",this.updatePageLink(c,m)),z=!0);z&&q.labelChanged(e,g.innerHTML)}for(C=0;C<q.model.getChildCount(e);C++)this.updatePageLinksForCell(c,q.model.getChildAt(e,C))};EditorUi.prototype.updatePageLink= -function(c,e){if(Graph.isPageLink(e)){var g=c[e.substring(e.indexOf(",")+1)];e=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==e.substring(0,17))try{var q=JSON.parse(e.substring(17));if(null!=q.actions){for(var m=0;m<q.actions.length;m++){var n=q.actions[m];if(null!=n.open&&Graph.isPageLink(n.open)){var z=n.open.substring(n.open.indexOf(",")+1);g=c[z];null!=g?n.open="data:page/id,"+g:null==this.getPageById(z)&&delete n.open}}e="data:action/json,"+JSON.stringify(q)}}catch(C){}return e}; -EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,e,g,q,m){q=null!=q?q:c.name;g=null!=g?g:mxUtils.bind(this,function(z){this.handleError(z)});var n=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var z=this.isRemoteVisioFormat(q);try{var C="UNKNOWN-VISIO",v=q.lastIndexOf(".");if(0<=v&&v<q.length)C=q.substring(v+1).toUpperCase();else{var y=q.lastIndexOf("/");0<= +mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||A.appendChild(n);mxEvent.addListener(A,"change",mxUtils.bind(this,function(){"lblToSvg"==A.value?(l.checked=!0,l.setAttribute("disabled","disabled"),J.page.style.display="none","page"==H.value&&(H.value="diagram"),W.checked=!1,W.setAttribute("disabled","disabled"),Q.style.display="inline-block",M.style.display="none"):"disabled"==l.getAttribute("disabled")&&(l.checked=!1,l.removeAttribute("disabled"),W.removeAttribute("disabled"), +J.page.style.display="",Q.style.display="none",M.style.display="")}));d&&(y.appendChild(l),mxUtils.write(y,mxResources.get("embedImages")),mxUtils.br(y),mxUtils.write(y,mxResources.get("txtSettings")+":"),y.appendChild(A),mxUtils.br(y),N+=60);var M=document.createElement("select");M.style.maxWidth="260px";M.style.marginLeft="8px";M.style.marginRight="10px";M.className="geBtn";d=document.createElement("option");d.setAttribute("value","auto");mxUtils.write(d,mxResources.get("automatic"));M.appendChild(d); +d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("openInNewWindow"));M.appendChild(d);d=document.createElement("option");d.setAttribute("value","self");mxUtils.write(d,mxResources.get("openInThisWindow"));M.appendChild(d);var Q=document.createElement("div");mxUtils.write(Q,mxResources.get("LinksLost"));Q.style.margin="7px";Q.style.display="none";"svg"==C&&(mxUtils.write(y,mxResources.get("links")+":"),y.appendChild(M),y.appendChild(Q),mxUtils.br(y), +mxUtils.br(y),N+=50);g=new CustomDialog(this,y,mxUtils.bind(this,function(){this.lastExportBorder=F.value;this.lastExportZoom=p.value;m(p.value,P.checked,!K.checked,W.checked,V.checked,l.checked,F.value,D.checked,!1,M.value,null!=U?U.checked:null,null!=T?T.checked:null,H.value,"embedFonts"==A.value,"lblToSvg"==A.value)}),null,g,q);this.showDialog(g.container,340,N,!0,!0,null,null,null,null,!0);p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?p.select():document.execCommand("selectAll", +!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,d,g,q,m){var n=document.createElement("div");n.style.whiteSpace="nowrap";var z=this.editor.graph;if(null!=d){var C=document.createElement("h3");mxUtils.write(C,d);C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";n.appendChild(C)}var x=this.addCheckbox(n,mxResources.get("fit"),!0),y=this.addCheckbox(n,mxResources.get("shadow"),z.shadowVisible&&q,!q),I=this.addCheckbox(n,g),N=this.addCheckbox(n,mxResources.get("lightbox"), +!0),t=this.addEditButton(n,N),p=t.getEditInput(),F=1<z.model.getChildCount(z.model.getRoot()),K=this.addCheckbox(n,mxResources.get("layers"),F,!F);K.style.marginLeft=p.style.marginLeft;K.style.marginBottom="12px";K.style.marginTop="8px";mxEvent.addListener(N,"change",function(){N.checked?(F&&K.removeAttribute("disabled"),p.removeAttribute("disabled")):(K.setAttribute("disabled","disabled"),p.setAttribute("disabled","disabled"));p.checked&&N.checked?t.getEditSelect().removeAttribute("disabled"):t.getEditSelect().setAttribute("disabled", +"disabled")});d=new CustomDialog(this,n,mxUtils.bind(this,function(){c(x.checked,y.checked,I.checked,N.checked,t.getLink(),K.checked)}),null,mxResources.get("embed"),m);this.showDialog(d.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,d,g,q,m,n,z,C){function x(p){var F=" ",K="";q&&(F=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+ +EditorUi.lightboxHost+"/?client=1"+(null!=I?"&page="+I:"")+(m?"&edit=_blank":"")+(n?"&layers=1":"")+"');}})(this);\"",K+="cursor:pointer;");c&&(K+="max-width:100%;");var D="";g&&(D=' width="'+Math.round(y.width)+'" height="'+Math.round(y.height)+'"');z('<img src="'+p+'"'+D+(""!=K?' style="'+K+'"':"")+F+"/>")}var y=this.editor.graph.getGraphBounds(),I=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(p){var F=q?this.getFileData(!0):null;p= +this.createImageDataUri(p,F,"png");x(p)}),null,null,null,mxUtils.bind(this,function(p){C({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,d,null,null,Editor.defaultBorder);else if(d=this.getFileData(!0),y.width*y.height<=MAX_AREA&&d.length<=MAX_REQUEST_SIZE){var N="";g&&(N="&w="+Math.round(2*y.width)+"&h="+Math.round(2*y.height));var t=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(q?"1":"0")+N+"&xml="+encodeURIComponent(d));t.send(mxUtils.bind(this,function(){200<=t.getStatus()&& +299>=t.getStatus()?x("data:image/png;base64,"+t.getText()):C({message:mxResources.get("unknownError")})}))}else C({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,d,g,q,m,n,z){var C=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),x=C.getElementsByTagName("a");if(null!=x)for(var y=0;y<x.length;y++){var I=x[y].getAttribute("href");null!=I&&"#"==I.charAt(0)&&"_blank"==x[y].getAttribute("target")&&x[y].removeAttribute("target")}q&& +C.setAttribute("content",this.getFileData(!0));d&&this.editor.graph.addSvgShadow(C);if(g){var N=" ",t="";q&&(N="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(m?"&edit=_blank":"")+(n?"&layers=1": +"")+"');}})(this);\"",t+="cursor:pointer;");c&&(t+="max-width:100%;");this.editor.convertImages(C,mxUtils.bind(this,function(p){z('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(p))+'"'+(""!=t?' style="'+t+'"':"")+N+"/>")}))}else t="",q&&(d=this.getSelectedPageIndex(),C.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+ +EditorUi.lightboxHost+"/?client=1"+(null!=d?"&page="+d:"")+(m?"&edit=_blank":"")+(n?"&layers=1":"")+"');}}})(this);"),t+="cursor:pointer;"),c&&(c=parseInt(C.getAttribute("width")),m=parseInt(C.getAttribute("height")),C.setAttribute("viewBox","-0.5 -0.5 "+c+" "+m),t+="max-width:100%;max-height:"+m+"px;",C.removeAttribute("height")),""!=t&&C.setAttribute("style",t),this.editor.addFontCss(C),this.editor.graph.mathEnabled&&this.editor.addMathCss(C),z(mxUtils.getXml(C))};EditorUi.prototype.timeSince=function(c){c= +Math.floor((new Date-c)/1E3);var d=Math.floor(c/31536E3);if(1<d)return d+" "+mxResources.get("years");d=Math.floor(c/2592E3);if(1<d)return d+" "+mxResources.get("months");d=Math.floor(c/86400);if(1<d)return d+" "+mxResources.get("days");d=Math.floor(c/3600);if(1<d)return d+" "+mxResources.get("hours");d=Math.floor(c/60);return 1<d?d+" "+mxResources.get("minutes"):1==d?d+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,d){if(null!=c){var g=null;if("diagram"==c.nodeName)g= +c;else if("mxfile"==c.nodeName){var q=c.getElementsByTagName("diagram");if(0<q.length){g=q[0];var m=d.getGlobalVariable;d.getGlobalVariable=function(n){return"page"==n?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==n?1:m.apply(this,arguments)}}}null!=g&&(c=Editor.parseDiagramNode(g))}q=this.editor.graph;try{this.editor.graph=d,this.editor.setGraphXml(c)}catch(n){}finally{this.editor.graph=q}return c};EditorUi.prototype.getPngFileProperties=function(c){var d=1,g=0;if(null!= +c){if(c.hasAttribute("scale")){var q=parseFloat(c.getAttribute("scale"));!isNaN(q)&&0<q&&(d=q)}c.hasAttribute("border")&&(q=parseInt(c.getAttribute("border")),!isNaN(q)&&0<q&&(g=q))}return{scale:d,border:g}};EditorUi.prototype.getEmbeddedPng=function(c,d,g,q,m){try{var n=this.editor.graph,z=null!=n.themes&&"darkTheme"==n.defaultThemeName,C=null;if(null!=g&&0<g.length)n=this.createTemporaryGraph(z?n.getDefaultStylesheet():n.getStylesheet()),document.body.appendChild(n.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement, +!0),n),C=g;else if(z||null!=this.pages&&this.currentPage!=this.pages[0]){n=this.createTemporaryGraph(z?n.getDefaultStylesheet():n.getStylesheet());var x=n.getGlobalVariable;n.setBackgroundImage=this.editor.graph.setBackgroundImage;var y=this.pages[0];this.currentPage==y?n.setBackgroundImage(this.editor.graph.backgroundImage):null!=y.viewState&&null!=y.viewState&&n.setBackgroundImage(y.viewState.backgroundImage);n.getGlobalVariable=function(I){return"page"==I?y.getName():"pagenumber"==I?1:x.apply(this, +arguments)};document.body.appendChild(n.container);n.model.setRoot(y.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(I){try{null==C&&(C=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var N=I.toDataURL("image/png");N=Editor.writeGraphModelToPng(N,"tEXt","mxfile",encodeURIComponent(C));c(N.substring(N.lastIndexOf(",")+1));n!=this.editor.graph&&n.container.parentNode.removeChild(n.container)}catch(t){null!=d&&d(t)}}),null,null,null,mxUtils.bind(this,function(I){null!=d&& +d(I)}),null,null,q,null,n.shadowVisible,null,n,m,null,null,null,"diagram",null)}catch(I){null!=d&&d(I)}};EditorUi.prototype.getEmbeddedSvg=function(c,d,g,q,m,n,z,C,x,y,I,N,t){C=null!=C?C:!0;I=null!=I?I:0;z=null!=x?x:d.background;z==mxConstants.NONE&&(z=null);n=d.getSvg(z,y,I,null,null,n,null,null,null,d.shadowVisible||N,null,t,"diagram");(d.shadowVisible||N)&&d.addSvgShadow(n,null,null,0==I);null!=c&&n.setAttribute("content",c);null!=g&&n.setAttribute("resource",g);var p=mxUtils.bind(this,function(F){F= +(q?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(F);null!=m&&m(F);return F});d.mathEnabled&&this.editor.addMathCss(n);if(null!=m)this.embedFonts(n,mxUtils.bind(this,function(F){C?this.editor.convertImages(F,mxUtils.bind(this,function(K){p(K)})):p(F)}));else return p(n)};EditorUi.prototype.embedFonts=function(c,d){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss), +this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(c,g),d(c)}catch(q){d(c)}}))}catch(g){d(c)}}))};EditorUi.prototype.exportImage=function(c,d,g,q,m,n,z,C,x,y,I,N,t){x=null!=x?x:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var p=this.editor.graph.isSelectionEmpty();g=null!=g?g:p;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(F){this.spinner.stop();try{this.saveCanvas(F, +m?this.getFileData(!0,null,null,null,g,C):null,x,null==this.pages||0==this.pages.length,I)}catch(K){this.handleError(K)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(F){this.spinner.stop();this.handleError(F)}),null,g,c||1,d,q,null,null,n,z,y,N,t)}catch(F){this.spinner.stop(),this.handleError(F)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.importXml=function(c,d,g,q,m,n,z){d=null!=d?d:0;g=null!=g?g:0;var C=[];try{var x= +this.editor.graph;if(null!=c&&0<c.length){x.model.beginUpdate();try{var y=mxUtils.parseXml(c);c={};var I=this.editor.extractGraphModel(y.documentElement,null!=this.pages);if(null!=I&&"mxfile"==I.nodeName&&null!=this.pages){var N=I.getElementsByTagName("diagram");if(1==N.length&&!n){if(I=Editor.parseDiagramNode(N[0]),null!=this.currentPage&&(c[N[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var t=N[0].getAttribute("name");null!=t&&""!=t&&this.editor.graph.model.execute(new RenamePage(this, +this.currentPage,t))}}else if(0<N.length){n=[];var p=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[N[0].getAttribute("id")]=this.pages[0].getId(),I=Editor.parseDiagramNode(N[0]),q=!1,p=1);for(;p<N.length;p++){var F=N[p].getAttribute("id");N[p].removeAttribute("id");var K=this.updatePageRoot(new DiagramPage(N[p]));c[F]=N[p].getAttribute("id");var D=this.pages.length;null==K.getName()&&K.setName(mxResources.get("pageWithNumber",[D+1]));x.model.execute(new ChangePage(this,K,K,D, +!0));n.push(K)}this.updatePageLinks(c,n)}}if(null!=I&&"mxGraphModel"===I.nodeName){C=x.importGraphModel(I,d,g,q);if(null!=C)for(p=0;p<C.length;p++)this.updatePageLinksForCell(c,C[p]);var H=x.parseBackgroundImage(I.getAttribute("backgroundImage"));if(null!=H&&null!=H.originalSrc){this.updateBackgroundPageLink(c,H);var J=new ChangePageSetup(this,null,H);J.ignoreColor=!0;x.model.execute(J)}}z&&this.insertHandler(C,null,null,x.defaultVertexStyle,x.defaultEdgeStyle,!1,!0)}finally{x.model.endUpdate()}}}catch(G){if(m)throw G; +this.handleError(G)}return C};EditorUi.prototype.updatePageLinks=function(c,d){for(var g=0;g<d.length;g++)this.updatePageLinksForCell(c,d[g].root),null!=d[g].viewState&&this.updateBackgroundPageLink(c,d[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,d){try{if(null!=d&&Graph.isPageLink(d.originalSrc)){var g=c[d.originalSrc.substring(d.originalSrc.indexOf(",")+1)];null!=g&&(d.originalSrc="data:page/id,"+g)}}catch(q){}};EditorUi.prototype.updatePageLinksForCell= +function(c,d){var g=document.createElement("div"),q=this.editor.graph,m=q.getLinkForCell(d);null!=m&&q.setLinkForCell(d,this.updatePageLink(c,m));if(q.isHtmlLabel(d)){g.innerHTML=q.sanitizeHtml(q.getLabel(d));for(var n=g.getElementsByTagName("a"),z=!1,C=0;C<n.length;C++)m=n[C].getAttribute("href"),null!=m&&(n[C].setAttribute("href",this.updatePageLink(c,m)),z=!0);z&&q.labelChanged(d,g.innerHTML)}for(C=0;C<q.model.getChildCount(d);C++)this.updatePageLinksForCell(c,q.model.getChildAt(d,C))};EditorUi.prototype.updatePageLink= +function(c,d){if(Graph.isPageLink(d)){var g=c[d.substring(d.indexOf(",")+1)];d=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==d.substring(0,17))try{var q=JSON.parse(d.substring(17));if(null!=q.actions){for(var m=0;m<q.actions.length;m++){var n=q.actions[m];if(null!=n.open&&Graph.isPageLink(n.open)){var z=n.open.substring(n.open.indexOf(",")+1);g=c[z];null!=g?n.open="data:page/id,"+g:null==this.getPageById(z)&&delete n.open}}d="data:action/json,"+JSON.stringify(q)}}catch(C){}return d}; +EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,d,g,q,m){q=null!=q?q:c.name;g=null!=g?g:mxUtils.bind(this,function(z){this.handleError(z)});var n=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var z=this.isRemoteVisioFormat(q);try{var C="UNKNOWN-VISIO",x=q.lastIndexOf(".");if(0<=x&&x<q.length)C=q.substring(x+1).toUpperCase();else{var y=q.lastIndexOf("/");0<= y&&y<q.length&&(q=q.substring(y+1))}EditorUi.logEvent({category:C+"-MS-IMPORT-FILE",action:"filename_"+q,label:z?"remote":"local"})}catch(N){}if(z)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{z=new FormData;z.append("file1",c,q);var I=new XMLHttpRequest;I.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(q)?"?stencil=1":""));I.responseType="blob";this.addRemoteServiceSecurityCheck(I); -null!=m&&I.setRequestHeader("x-convert-custom",m);I.onreadystatechange=mxUtils.bind(this,function(){if(4==I.readyState)if(200<=I.status&&299>=I.status)try{var N=I.response;if("text/xml"==N.type){var t=new FileReader;t.onload=mxUtils.bind(this,function(p){try{e(p.target.result)}catch(F){g({message:mxResources.get("errorLoadingFile")})}});t.readAsText(N)}else this.doImportVisio(N,e,g,q)}catch(p){g(p)}else try{""==I.responseType||"text"==I.responseType?g({message:I.responseText}):(t=new FileReader,t.onload= -function(){g({message:JSON.parse(t.result).Message})},t.readAsText(I.response))}catch(p){g({})}});I.send(z)}else try{this.doImportVisio(c,e,g,q)}catch(N){g(N)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?n():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",n))};EditorUi.prototype.importGraphML=function(c,e,g){g=null!=g?g:mxUtils.bind(this,function(m){this.handleError(m)}); -var q=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(c,e,g)}catch(m){g(m)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",q))};EditorUi.prototype.exportVisio=function(c){var e=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(c)|| -this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.convertLucidChart=function(c,e,g){var q=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var m= -JSON.parse(c);e(LucidImporter.importState(m));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+c.length}),null!=window.console&&"1"==urlParams.test){var n=[(new Date).toISOString(),"convertLucidChart",m];null!=m.state&&n.push(JSON.parse(m.state));if(null!=m.svgThumbs)for(var z=0;z<m.svgThumbs.length;z++)n.push(Editor.createSvgDataUri(m.svgThumbs[z]));null!=m.thumb&&n.push(m.thumb);console.log.apply(console,n)}}catch(C){}}catch(C){null!=window.console&&console.error(C),g(C)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})}); +null!=m&&I.setRequestHeader("x-convert-custom",m);I.onreadystatechange=mxUtils.bind(this,function(){if(4==I.readyState)if(200<=I.status&&299>=I.status)try{var N=I.response;if("text/xml"==N.type){var t=new FileReader;t.onload=mxUtils.bind(this,function(p){try{d(p.target.result)}catch(F){g({message:mxResources.get("errorLoadingFile")})}});t.readAsText(N)}else this.doImportVisio(N,d,g,q)}catch(p){g(p)}else try{""==I.responseType||"text"==I.responseType?g({message:I.responseText}):(t=new FileReader,t.onload= +function(){g({message:JSON.parse(t.result).Message})},t.readAsText(I.response))}catch(p){g({})}});I.send(z)}else try{this.doImportVisio(c,d,g,q)}catch(N){g(N)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?n():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",n))};EditorUi.prototype.importGraphML=function(c,d,g){g=null!=g?g:mxUtils.bind(this,function(m){this.handleError(m)}); +var q=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(c,d,g)}catch(m){g(m)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",q))};EditorUi.prototype.exportVisio=function(c){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(c)|| +this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.convertLucidChart=function(c,d,g){var q=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var m= +JSON.parse(c);d(LucidImporter.importState(m));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+c.length}),null!=window.console&&"1"==urlParams.test){var n=[(new Date).toISOString(),"convertLucidChart",m];null!=m.state&&n.push(JSON.parse(m.state));if(null!=m.svgThumbs)for(var z=0;z<m.svgThumbs.length;z++)n.push(Editor.createSvgDataUri(m.svgThumbs[z]));null!=m.thumb&&n.push(m.thumb);console.log.apply(console,n)}}catch(C){}}catch(C){null!=window.console&&console.error(C),g(C)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})}); "undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(q,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",q)})})})}):mxscript("js/extensions.min.js",q))};EditorUi.prototype.generateMermaidImage=function(c, -e,g,q){var m=this,n=function(){try{this.loadingMermaid=!1,e=null!=e?e:mxUtils.clone(EditorUi.defaultMermaidConfig),e.securityLevel="strict",e.startOnLoad=!1,Editor.isDarkMode()&&(e.theme="dark"),mermaid.mermaidAPI.initialize(e),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c,function(z){try{if(mxClient.IS_IE||mxClient.IS_IE11)z=z.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var C=mxUtils.parseXml(z).getElementsByTagName("svg"); -if(0<C.length){var v=parseFloat(C[0].getAttribute("width")),y=parseFloat(C[0].getAttribute("height"));if(isNaN(v)||isNaN(y))try{var I=C[0].getAttribute("viewBox").split(/\s+/);v=parseFloat(I[2]);y=parseFloat(I[3])}catch(N){v=v||100,y=y||100}g(m.convertDataUri(Editor.createSvgDataUri(z)),v,y)}else q({message:mxResources.get("invalidInput")})}catch(N){q(N)}})}catch(z){q(z)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?n():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js", -n):mxscript("js/extensions.min.js",n))};EditorUi.prototype.generatePlantUmlImage=function(c,e,g,q){function m(C,v,y){c1=C>>2;c2=(C&3)<<4|v>>4;c3=(v&15)<<2|y>>6;c4=y&63;r="";r+=n(c1&63);r+=n(c2&63);r+=n(c3&63);return r+=n(c4&63)}function n(C){if(10>C)return String.fromCharCode(48+C);C-=10;if(26>C)return String.fromCharCode(65+C);C-=26;if(26>C)return String.fromCharCode(97+C);C-=26;return 0==C?"-":1==C?"_":"?"}var z=new XMLHttpRequest;z.open("GET",("txt"==e?PLANT_URL+"/txt/":"png"==e?PLANT_URL+"/png/": -PLANT_URL+"/svg/")+function(C){r="";for(i=0;i<C.length;i+=3)r=i+2==C.length?r+m(C.charCodeAt(i),C.charCodeAt(i+1),0):i+1==C.length?r+m(C.charCodeAt(i),0,0):r+m(C.charCodeAt(i),C.charCodeAt(i+1),C.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=e&&(z.responseType="blob");z.onload=function(C){if(200<=this.status&&300>this.status)if("txt"==e)g(this.response);else{var v=new FileReader;v.readAsDataURL(this.response);v.onloadend=function(y){var I=new Image;I.onload= -function(){try{var N=I.width,t=I.height;if(0==N&&0==t){var p=v.result,F=p.indexOf(","),J=decodeURIComponent(escape(atob(p.substring(F+1)))),M=mxUtils.parseXml(J).getElementsByTagName("svg");0<M.length&&(N=parseFloat(M[0].getAttribute("width")),t=parseFloat(M[0].getAttribute("height")))}g(v.result,N,t)}catch(H){q(H)}};I.src=v.result};v.onerror=function(y){q(y)}}else q(C)};z.onerror=function(C){q(C)};z.send()};EditorUi.prototype.insertAsPreText=function(c,e,g){var q=this.editor.graph,m=null;q.getModel().beginUpdate(); -try{m=q.insertVertex(null,null,"<pre>"+c+"</pre>",e,g,1,1,"text;html=1;align=left;verticalAlign=top;"),q.updateCellSize(m,!0)}finally{q.getModel().endUpdate()}return m};EditorUi.prototype.insertTextAt=function(c,e,g,q,m,n,z,C){n=null!=n?n:!0;z=null!=z?z:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(t){4== -t.readyState&&200<=t.status&&299>=t.status&&this.editor.graph.setSelectionCells(this.insertTextAt(t.responseText,e,g,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(m||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var v=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var y=Editor.extractGraphModelFromPdf(c);if(null!=y&&0<y.length)return this.importXml(y,e,g,n,!0,C)}if(Editor.isPngDataUrl(c)&&(y=Editor.extractGraphModelFromPng(c),null!=y&&0<y.length))return this.importXml(y, -e,g,n,!0,C);if("data:image/svg+xml;"==c.substring(0,19))try{y=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(y=c.substring(c.indexOf(",")+1),y=window.atob&&!mxClient.IS_SF?atob(y):Base64.decode(y,!0)):y=decodeURIComponent(c.substring(c.indexOf(",")+1));var I=this.importXml(y,e,g,n,!0,C);if(0<I.length)return I}catch(t){}this.loadImage(c,mxUtils.bind(this,function(t){if("data:"==c.substring(0,5))this.resizeImage(t,c,mxUtils.bind(this,function(J,M,H){v.setSelectionCell(v.insertVertex(null,null, -"",v.snap(e),v.snap(g),M,H,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(J)+";"))}),z,this.maxImageSize);else{var p=Math.min(1,Math.min(this.maxImageSize/t.width,this.maxImageSize/t.height)),F=Math.round(t.width*p);t=Math.round(t.height*p);v.setSelectionCell(v.insertVertex(null,null,"",v.snap(e),v.snap(g),F,t,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+ -c+";"))}}),mxUtils.bind(this,function(){var t=null;v.getModel().beginUpdate();try{t=v.insertVertex(v.getDefaultParent(),null,c,v.snap(e),v.snap(g),1,1,"text;"+(q?"html=1;":"")),v.updateCellSize(t),v.fireEvent(new mxEventObject("textInserted","cells",[t]))}finally{v.getModel().endUpdate()}v.setSelectionCell(t)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,e,g,n,null,C);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this, -function(t){this.editor.graph.setSelectionCells(this.importXml(t,e,g,n,null,C))}),mxUtils.bind(this,function(t){this.handleError(t)}));else{v=this.editor.graph;m=null;v.getModel().beginUpdate();try{m=v.insertVertex(v.getDefaultParent(),null,"",v.snap(e),v.snap(g),1,1,"text;whiteSpace=wrap;"+(q?"html=1;":""));v.fireEvent(new mxEventObject("textInserted","cells",[m]));"<"==c.charAt(0)&&c.indexOf(">")==c.length-1&&(c=mxUtils.htmlEntities(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+ -"...");m.value=c;v.updateCellSize(m);if(0<this.maxTextWidth&&m.geometry.width>this.maxTextWidth){var N=v.getPreferredSizeForCell(m,this.maxTextWidth);m.geometry.width=N.width;m.geometry.height=N.height}Graph.isLink(m.value)&&v.setLinkForCell(m,m.value);m.geometry.width+=v.gridSize;m.geometry.height+=v.gridSize}finally{v.getModel().endUpdate()}return[m]}}return[]};EditorUi.prototype.formatFileSize=function(c){var e=-1;do c/=1024,e++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[e]}; -EditorUi.prototype.convertDataUri=function(c){if("data:"==c.substring(0,5)){var e=c.indexOf(";");0<e&&(c=c.substring(0,e)+c.substring(c.indexOf(",",e+1)))}return c};EditorUi.prototype.isRemoteFileFormat=function(c,e){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,e){if(c&&Graph.fileSupport){if(null== +d,g,q){var m=this,n=function(){try{this.loadingMermaid=!1,d=null!=d?d:mxUtils.clone(EditorUi.defaultMermaidConfig),d.securityLevel="strict",d.startOnLoad=!1,Editor.isDarkMode()&&(d.theme="dark"),mermaid.mermaidAPI.initialize(d),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c,function(z){try{if(mxClient.IS_IE||mxClient.IS_IE11)z=z.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var C=mxUtils.parseXml(z).getElementsByTagName("svg"); +if(0<C.length){var x=parseFloat(C[0].getAttribute("width")),y=parseFloat(C[0].getAttribute("height"));if(isNaN(x)||isNaN(y))try{var I=C[0].getAttribute("viewBox").split(/\s+/);x=parseFloat(I[2]);y=parseFloat(I[3])}catch(N){x=x||100,y=y||100}g(m.convertDataUri(Editor.createSvgDataUri(z)),x,y)}else q({message:mxResources.get("invalidInput")})}catch(N){q(N)}})}catch(z){q(z)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?n():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js", +n):mxscript("js/extensions.min.js",n))};EditorUi.prototype.generatePlantUmlImage=function(c,d,g,q){function m(C,x,y){c1=C>>2;c2=(C&3)<<4|x>>4;c3=(x&15)<<2|y>>6;c4=y&63;r="";r+=n(c1&63);r+=n(c2&63);r+=n(c3&63);return r+=n(c4&63)}function n(C){if(10>C)return String.fromCharCode(48+C);C-=10;if(26>C)return String.fromCharCode(65+C);C-=26;if(26>C)return String.fromCharCode(97+C);C-=26;return 0==C?"-":1==C?"_":"?"}var z=new XMLHttpRequest;z.open("GET",("txt"==d?PLANT_URL+"/txt/":"png"==d?PLANT_URL+"/png/": +PLANT_URL+"/svg/")+function(C){r="";for(i=0;i<C.length;i+=3)r=i+2==C.length?r+m(C.charCodeAt(i),C.charCodeAt(i+1),0):i+1==C.length?r+m(C.charCodeAt(i),0,0):r+m(C.charCodeAt(i),C.charCodeAt(i+1),C.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=d&&(z.responseType="blob");z.onload=function(C){if(200<=this.status&&300>this.status)if("txt"==d)g(this.response);else{var x=new FileReader;x.readAsDataURL(this.response);x.onloadend=function(y){var I=new Image;I.onload= +function(){try{var N=I.width,t=I.height;if(0==N&&0==t){var p=x.result,F=p.indexOf(","),K=decodeURIComponent(escape(atob(p.substring(F+1)))),D=mxUtils.parseXml(K).getElementsByTagName("svg");0<D.length&&(N=parseFloat(D[0].getAttribute("width")),t=parseFloat(D[0].getAttribute("height")))}g(x.result,N,t)}catch(H){q(H)}};I.src=x.result};x.onerror=function(y){q(y)}}else q(C)};z.onerror=function(C){q(C)};z.send()};EditorUi.prototype.insertAsPreText=function(c,d,g){var q=this.editor.graph,m=null;q.getModel().beginUpdate(); +try{m=q.insertVertex(null,null,"<pre>"+c+"</pre>",d,g,1,1,"text;html=1;align=left;verticalAlign=top;"),q.updateCellSize(m,!0)}finally{q.getModel().endUpdate()}return m};EditorUi.prototype.insertTextAt=function(c,d,g,q,m,n,z,C){n=null!=n?n:!0;z=null!=z?z:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(t){4== +t.readyState&&200<=t.status&&299>=t.status&&this.editor.graph.setSelectionCells(this.insertTextAt(t.responseText,d,g,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(m||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var x=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var y=Editor.extractGraphModelFromPdf(c);if(null!=y&&0<y.length)return this.importXml(y,d,g,n,!0,C)}if(Editor.isPngDataUrl(c)&&(y=Editor.extractGraphModelFromPng(c),null!=y&&0<y.length))return this.importXml(y, +d,g,n,!0,C);if("data:image/svg+xml;"==c.substring(0,19))try{y=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(y=c.substring(c.indexOf(",")+1),y=window.atob&&!mxClient.IS_SF?atob(y):Base64.decode(y,!0)):y=decodeURIComponent(c.substring(c.indexOf(",")+1));var I=this.importXml(y,d,g,n,!0,C);if(0<I.length)return I}catch(t){}this.loadImage(c,mxUtils.bind(this,function(t){if("data:"==c.substring(0,5))this.resizeImage(t,c,mxUtils.bind(this,function(K,D,H){x.setSelectionCell(x.insertVertex(null,null, +"",x.snap(d),x.snap(g),D,H,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(K)+";"))}),z,this.maxImageSize);else{var p=Math.min(1,Math.min(this.maxImageSize/t.width,this.maxImageSize/t.height)),F=Math.round(t.width*p);t=Math.round(t.height*p);x.setSelectionCell(x.insertVertex(null,null,"",x.snap(d),x.snap(g),F,t,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+ +c+";"))}}),mxUtils.bind(this,function(){var t=null;x.getModel().beginUpdate();try{t=x.insertVertex(x.getDefaultParent(),null,c,x.snap(d),x.snap(g),1,1,"text;"+(q?"html=1;":"")),x.updateCellSize(t),x.fireEvent(new mxEventObject("textInserted","cells",[t]))}finally{x.getModel().endUpdate()}x.setSelectionCell(t)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,d,g,n,null,C);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this, +function(t){this.editor.graph.setSelectionCells(this.importXml(t,d,g,n,null,C))}),mxUtils.bind(this,function(t){this.handleError(t)}));else{x=this.editor.graph;m=null;x.getModel().beginUpdate();try{m=x.insertVertex(x.getDefaultParent(),null,"",x.snap(d),x.snap(g),1,1,"text;whiteSpace=wrap;"+(q?"html=1;":""));x.fireEvent(new mxEventObject("textInserted","cells",[m]));"<"==c.charAt(0)&&c.indexOf(">")==c.length-1&&(c=mxUtils.htmlEntities(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+ +"...");m.value=c;x.updateCellSize(m);if(0<this.maxTextWidth&&m.geometry.width>this.maxTextWidth){var N=x.getPreferredSizeForCell(m,this.maxTextWidth);m.geometry.width=N.width;m.geometry.height=N.height}Graph.isLink(m.value)&&x.setLinkForCell(m,m.value);m.geometry.width+=x.gridSize;m.geometry.height+=x.gridSize}finally{x.getModel().endUpdate()}return[m]}}return[]};EditorUi.prototype.formatFileSize=function(c){var d=-1;do c/=1024,d++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[d]}; +EditorUi.prototype.convertDataUri=function(c){if("data:"==c.substring(0,5)){var d=c.indexOf(";");0<d&&(c=c.substring(0,d)+c.substring(c.indexOf(",",d+1)))}return c};EditorUi.prototype.isRemoteFileFormat=function(c,d){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,d){if(c&&Graph.fileSupport){if(null== this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display="none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(z,C){StorageFile.listFiles(this, -"F",z,C)});window.openBrowserFile=mxUtils.bind(this,function(z,C,v){StorageFile.getFileContent(this,z,C,v)});window.deleteBrowserFile=mxUtils.bind(this,function(z,C,v){StorageFile.deleteFile(this,z,C,v)});if(!e){var q=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(z){this.hideDialog(z)}));window.openFile.setConsumer(mxUtils.bind(this,function(z,C){null!=C&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(C)?(z=new Blob([z],{type:"application/octet-stream"}), -this.importVisio(z,mxUtils.bind(this,function(v){this.importXml(v,0,0,!0)}),null,C)):this.editor.graph.setSelectionCells(this.importXml(z,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!e){var m=this.dialog,n=m.close;this.dialog.close=mxUtils.bind(this,function(z){Editor.useLocalStorage=q;n.apply(m,arguments);z&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}}; -EditorUi.prototype.importZipFile=function(c,e,g){var q=this,m=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(n){if(mxUtils.isEmptyObject(n.files))g();else{var z=0,C,v=!1;n.forEach(function(y,I){y=I.name.toLowerCase();"diagram/diagram.xml"==y?(v=!0,I.async("string").then(function(N){0==N.indexOf("<mxfile ")?e(N):g()})):0==y.indexOf("versions/")&&(y=parseInt(y.substr(9)),y>z&&(z=y,C=I))});0<z?C.async("string").then(function(y){(new XMLHttpRequest).upload&& -q.isRemoteFileFormat(y,c.name)?q.isOffline()?q.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):q.parseFileData(y,mxUtils.bind(this,function(I){4==I.readyState&&(200<=I.status&&299>=I.status?e(I.responseText):g())}),c.name):g()}):v||g()}},function(n){g(n)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?m():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",m))};EditorUi.prototype.importFile=function(c,e,g,q,m,n,z,C,v,y,I,N){y=null!= -y?y:!0;var t=!1,p=null,F=mxUtils.bind(this,function(J){var M=null;null!=J&&"<mxlibrary"==J.substring(0,10)?this.loadLibrary(new LocalLibrary(this,J,z)):M=this.importXml(J,g,q,y,null,null!=N?mxEvent.isControlDown(N):null);null!=C&&C(M)});"image"==e.substring(0,5)?(v=!1,"image/png"==e.substring(0,9)&&(e=I?null:this.extractGraphModelFromPng(c),null!=e&&0<e.length&&(p=this.importXml(e,g,q,y,null,null!=N?mxEvent.isControlDown(N):null),v=!0)),v||(e=this.editor.graph,v=c.indexOf(";"),0<v&&(c=c.substring(0, -v)+c.substring(c.indexOf(",",v+1))),y&&e.isGridEnabled()&&(g=e.snap(g),q=e.snap(q)),p=[e.insertVertex(null,null,"",g,q,m,n,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";")])):/(\.*<graphml )/.test(c)?(t=!0,this.importGraphML(c,F)):null!=v&&null!=z&&(/(\.v(dx|sdx?))($|\?)/i.test(z)||/(\.vs(x|sx?))($|\?)/i.test(z))?(t=!0,this.importVisio(v,F)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,z)?this.isOffline()? -this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(t=!0,m=mxUtils.bind(this,function(J){4==J.readyState&&(200<=J.status&&299>=J.status?F(J.responseText):null!=C&&C(null))}),null!=c?this.parseFileData(c,m,z):this.parseFile(v,m,z)):0==c.indexOf("PK")&&null!=v?(t=!0,this.importZipFile(v,F,mxUtils.bind(this,function(){p=this.insertTextAt(this.validateFileData(c),g,q,!0,null,y);C(p)}))):/(\.v(sd|dx))($|\?)/i.test(z)||/(\.vs(s|x))($|\?)/i.test(z)||(p=this.insertTextAt(this.validateFileData(c), -g,q,!0,null,y,null,null!=N?mxEvent.isControlDown(N):null));t||null==C||C(p);return p};EditorUi.prototype.importFiles=function(c,e,g,q,m,n,z,C,v,y,I,N,t){q=null!=q?q:this.maxImageSize;y=null!=y?y:this.maxImageBytes;var p=null!=e&&null!=g,F=!0;e=null!=e?e:0;g=null!=g?g:0;var J=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var M=I||this.resampleThreshold,H=0;H<c.length;H++)if("image/svg"!==c[H].type.substring(0,9)&&"image/"===c[H].type.substring(0,6)&&c[H].size>M){J=!0;break}var G=mxUtils.bind(this,function(){var E= -this.editor.graph,P=E.gridSize;m=null!=m?m:mxUtils.bind(this,function(A,L,Q,O,R,S,X,aa,Y){try{return null!=A&&"<mxlibrary"==A.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,A,X)),null):this.isCompatibleString(A)&&1==c.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,A,X,!0)),null):this.importFile(A,L,Q,O,R,S,X,aa,Y,p,N,t)}catch(Z){return this.handleError(Z),null}});n=null!=n?n:mxUtils.bind(this,function(A){E.setSelectionCells(A)}); -if(this.spinner.spin(document.body,mxResources.get("loading")))for(var T=c.length,W=T,U=[],V=mxUtils.bind(this,function(A,L){U[A]=L;if(0==--W){this.spinner.stop();if(null!=C)C(U);else{var Q=[];E.getModel().beginUpdate();try{for(A=0;A<U.length;A++){var O=U[A]();null!=O&&(Q=Q.concat(O))}}finally{E.getModel().endUpdate()}}n(Q)}}),l=0;l<T;l++)mxUtils.bind(this,function(A){var L=c[A];if(null!=L){var Q=new FileReader;Q.onload=mxUtils.bind(this,function(O){if(null==z||z(L))if("image/"==L.type.substring(0, -6))if("image/svg"==L.type.substring(0,9)){var R=Graph.clipSvgDataUri(O.target.result),S=R.indexOf(",");S=decodeURIComponent(escape(atob(R.substring(S+1))));var X=mxUtils.parseXml(S);S=X.getElementsByTagName("svg");if(0<S.length){S=S[0];var aa=N?null:S.getAttribute("content");null!=aa&&"<"!=aa.charAt(0)&&"%"!=aa.charAt(0)&&(aa=unescape(window.atob?atob(aa):Base64.decode(aa,!0)));null!=aa&&"%"==aa.charAt(0)&&(aa=decodeURIComponent(aa));null==aa||"<mxfile "!==aa.substring(0,8)&&"<mxGraphModel "!==aa.substring(0, -14)?V(A,mxUtils.bind(this,function(){try{if(null!=X){var ca=X.getElementsByTagName("svg");if(0<ca.length){var fa=ca[0],la=fa.getAttribute("width"),ia=fa.getAttribute("height");la=null!=la&&"%"!=la.charAt(la.length-1)?parseFloat(la):NaN;ia=null!=ia&&"%"!=ia.charAt(ia.length-1)?parseFloat(ia):NaN;var qa=fa.getAttribute("viewBox");if(null==qa||0==qa.length)fa.setAttribute("viewBox","0 0 "+la+" "+ia);else if(isNaN(la)||isNaN(ia)){var ka=qa.split(" ");3<ka.length&&(la=parseFloat(ka[2]),ia=parseFloat(ka[3]))}R= -Editor.createSvgDataUri(mxUtils.getXml(fa));var Da=Math.min(1,Math.min(q/Math.max(1,la)),q/Math.max(1,ia)),Ea=m(R,L.type,e+A*P,g+A*P,Math.max(1,Math.round(la*Da)),Math.max(1,Math.round(ia*Da)),L.name);if(isNaN(la)||isNaN(ia)){var za=new Image;za.onload=mxUtils.bind(this,function(){la=Math.max(1,za.width);ia=Math.max(1,za.height);Ea[0].geometry.width=la;Ea[0].geometry.height=ia;fa.setAttribute("viewBox","0 0 "+la+" "+ia);R=Editor.createSvgDataUri(mxUtils.getXml(fa));var Oa=R.indexOf(";");0<Oa&&(R= -R.substring(0,Oa)+R.substring(R.indexOf(",",Oa+1)));E.setCellStyles("image",R,[Ea[0]])});za.src=Editor.createSvgDataUri(mxUtils.getXml(fa))}return Ea}}}catch(Oa){}return null})):V(A,mxUtils.bind(this,function(){return m(aa,"text/xml",e+A*P,g+A*P,0,0,L.name)}))}else V(A,mxUtils.bind(this,function(){return null}))}else{S=!1;if("image/png"==L.type){var Y=N?null:this.extractGraphModelFromPng(O.target.result);if(null!=Y&&0<Y.length){var Z=new Image;Z.src=O.target.result;V(A,mxUtils.bind(this,function(){return m(Y, -"text/xml",e+A*P,g+A*P,Z.width,Z.height,L.name)}));S=!0}}S||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(O.target.result,mxUtils.bind(this,function(ca){this.resizeImage(ca,O.target.result,mxUtils.bind(this,function(fa,la,ia){V(A,mxUtils.bind(this,function(){if(null!= -fa&&fa.length<y){var qa=F&&this.isResampleImageSize(L.size,I)?Math.min(1,Math.min(q/la,q/ia)):1;return m(fa,L.type,e+A*P,g+A*P,Math.round(la*qa),Math.round(ia*qa),L.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),F,q,I,L.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else R=O.target.result,m(R,L.type,e+A*P,g+A*P,240,160,L.name,function(ca){V(A,function(){return ca})},L)});/(\.v(dx|sdx?))($|\?)/i.test(L.name)|| -/(\.vs(x|sx?))($|\?)/i.test(L.name)?m(null,L.type,e+A*P,g+A*P,240,160,L.name,function(O){V(A,function(){return O})},L):"image"==L.type.substring(0,5)||"application/pdf"==L.type?Q.readAsDataURL(L):Q.readAsText(L)}})(l)});if(J){J=[];for(H=0;H<c.length;H++)J.push(c[H]);c=J;this.confirmImageResize(function(E){F=E;G()},v)}else G()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber", -[1])};EditorUi.prototype.confirmImageResize=function(c,e){e=null!=e?e:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},q=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,m=function(n,z){if(n||e)mxSettings.setResizeImages(n?z:null),mxSettings.save();g();c(z)};null==q||e?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(n){m(n,!0)},function(n){m(n,!1)},mxResources.get("resize"),mxResources.get("actualSize"), -'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):m(!1,q)};EditorUi.prototype.parseFile=function(c,e,g){g=null!=g?g:c.name;var q=new FileReader;q.onload=mxUtils.bind(this,function(){this.parseFileData(q.result,e,g)});q.readAsText(c)};EditorUi.prototype.parseFileData=function(c,e,g){var q=new XMLHttpRequest;q.open("POST", -OPEN_URL);q.setRequestHeader("Content-Type","application/x-www-form-urlencoded");q.onreadystatechange=function(){e(q)};q.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(m){}};EditorUi.prototype.isResampleImageSize=function(c,e){e=null!=e?e:this.resampleThreshold;return c>e};EditorUi.prototype.resizeImage=function(c,e,g,q,m,n,z){m=null!=m?m:this.maxImageSize;var C=Math.max(1,c.width), -v=Math.max(1,c.height);if(q&&this.isResampleImageSize(null!=z?z:e.length,n))try{var y=Math.max(C/m,v/m);if(1<y){var I=Math.round(C/y),N=Math.round(v/y),t=document.createElement("canvas");t.width=I;t.height=N;t.getContext("2d").drawImage(c,0,0,I,N);var p=t.toDataURL();if(p.length<e.length){var F=document.createElement("canvas");F.width=I;F.height=N;var J=F.toDataURL();p!==J&&(e=p,C=I,v=N)}}}catch(M){}g(e,C,v)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)}; -EditorUi.prototype.loadImage=function(c,e,g){try{var q=new Image;q.onload=function(){q.width=0<q.width?q.width:120;q.height=0<q.height?q.height:120;e(q)};null!=g&&(q.onerror=g);q.src=c}catch(m){if(null!=g)g(m);else throw m;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:c)};var u=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&& -!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var c=this,e=this.editor.graph;Graph.touchStyle&&(e.panningHandler.isPanningTrigger=function(M){var H=M.getEvent();return null==M.getState()&& -!mxEvent.isMouseEvent(H)&&!e.freehand.isDrawing()||mxEvent.isPopupTrigger(H)&&(null==M.getState()||mxEvent.isControlDown(H)||mxEvent.isShiftDown(H))});e.cellEditor.editPlantUmlData=function(M,H,G){var E=JSON.parse(G);H=new TextareaDialog(c,mxResources.get("plantUml")+":",E.data,function(P){null!=P&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(P,E.format,function(T,W,U){c.spinner.stop();e.getModel().beginUpdate();try{if("txt"==E.format)e.labelChanged(M,"<pre>"+ -T+"</pre>"),e.updateCellSize(M,!0);else{e.setCellStyles("image",c.convertDataUri(T),[M]);var V=e.model.getGeometry(M);null!=V&&(V=V.clone(),V.width=W,V.height=U,e.cellsResized([M],[V],!1))}e.setAttributeForCell(M,"plantUmlData",JSON.stringify({data:P,format:E.format}))}finally{e.getModel().endUpdate()}},function(T){c.handleError(T)})},null,null,400,220);c.showDialog(H.container,420,300,!0,!0);H.init()};e.cellEditor.editMermaidData=function(M,H,G){var E=JSON.parse(G);H=new TextareaDialog(c,mxResources.get("mermaid")+ -":",E.data,function(P){null!=P&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(P,E.config,function(T,W,U){c.spinner.stop();e.getModel().beginUpdate();try{e.setCellStyles("image",T,[M]);var V=e.model.getGeometry(M);null!=V&&(V=V.clone(),V.width=Math.max(V.width,W),V.height=Math.max(V.height,U),e.cellsResized([M],[V],!1));e.setAttributeForCell(M,"mermaidData",JSON.stringify({data:P,config:E.config},null,2))}finally{e.getModel().endUpdate()}},function(T){c.handleError(T)})}, -null,null,400,220);c.showDialog(H.container,420,300,!0,!0);H.init()};var g=e.cellEditor.startEditing;e.cellEditor.startEditing=function(M,H){try{var G=this.graph.getAttributeForCell(M,"plantUmlData");if(null!=G)this.editPlantUmlData(M,H,G);else if(G=this.graph.getAttributeForCell(M,"mermaidData"),null!=G)this.editMermaidData(M,H,G);else{var E=e.getCellStyle(M);"1"==mxUtils.getValue(E,"metaEdit","0")?c.showDataDialog(M):g.apply(this,arguments)}}catch(P){c.handleError(P)}};e.getLinkTitle=function(M){return c.getLinkTitle(M)}; -e.customLinkClicked=function(M){var H=!1;try{c.handleCustomLink(M),H=!0}catch(G){c.handleError(G)}return H};var q=e.parseBackgroundImage;e.parseBackgroundImage=function(M){var H=q.apply(this,arguments);null!=H&&null!=H.src&&Graph.isPageLink(H.src)&&(H={originalSrc:H.src});return H};var m=e.setBackgroundImage;e.setBackgroundImage=function(M){null!=M&&null!=M.originalSrc&&(M=c.createImageForPageLink(M.originalSrc,c.currentPage,this));m.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this, -function(){e.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){e.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(M,H){M=null!=e.backgroundImage?e.backgroundImage.originalSrc:null;if(null!=M){var G=M.indexOf(",");if(0<G)for(M=M.substring(G+1),H=H.getProperty("patches"),G=0;G<H.length;G++)if(null!=H[G][EditorUi.DIFF_UPDATE]&&null!=H[G][EditorUi.DIFF_UPDATE][M]||null!=H[G][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(H[G][EditorUi.DIFF_REMOVE], -M)){e.refreshBackgroundImage();break}}}));var n=e.getBackgroundImageObject;e.getBackgroundImageObject=function(M,H){var G=n.apply(this,arguments);if(null!=G&&null!=G.originalSrc)if(!H)G={src:G.originalSrc};else if(H&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var E=this.stylesheet,P=this.shapeForegroundColor,T=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";G=c.createImageForPageLink(G.originalSrc); -this.shapeBackgroundColor=T;this.shapeForegroundColor=P;this.stylesheet=E}return G};var z=this.clearDefaultStyle;this.clearDefaultStyle=function(){z.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var C= -c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(M){M=null!=M?M:"";"1"==urlParams.dev&&(M+=(0<M.length?"&":"?")+"dev=1");return C.apply(this,arguments)};var v=e.addClickHandler;e.addClickHandler=function(M,H,G){var E=H;H=function(P,T){if(null==T){var W=mxEvent.getSource(P);"a"==W.nodeName.toLowerCase()&&(T=W.getAttribute("href"))}null!=T&&e.isCustomLink(T)&&(mxEvent.isTouchEvent(P)||!mxEvent.isPopupTrigger(P))&&e.customLinkClicked(T)&&mxEvent.consume(P);null!=E&&E(P,T)};v.call(this,M, -H,G)};u.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(e.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var y=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(M,H,G){c.editor.graph.isSelectionEmpty()?y.apply(this,arguments):c.menus.addMenuItems(M,"delete - cut copy copyAsImage - duplicate".split(" "),null,G)}}c.actions.get("print").funct=function(){c.showDialog((new PrintDialog(c)).container,360,null!=c.pages&&1<c.pages.length?470:390, -!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var I=e.getExportVariables;e.getExportVariables=function(){var M=I.apply(this,arguments),H=c.getCurrentFile();null!=H&&(M.filename=H.getTitle());M.pagecount=null!=c.pages?c.pages.length:1;M.page=null!=c.currentPage?c.currentPage.getName():"";M.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return M};var N=e.getGlobalVariable;e.getGlobalVariable=function(M){var H=c.getCurrentFile();return"filename"== -M&&null!=H?H.getTitle():"page"==M&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==M?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==M?null!=c.pages?c.pages.length:1:N.apply(this,arguments)};var t=e.labelLinkClicked;e.labelLinkClicked=function(M,H,G){var E=H.getAttribute("href");if(null==E||!e.isCustomLink(E)||!mxEvent.isTouchEvent(G)&&mxEvent.isPopupTrigger(G))t.apply(this,arguments);else{if(!e.isEnabled()||null!=M&&e.isCellLocked(M.cell))e.customLinkClicked(E), -e.getRubberband().reset();mxEvent.consume(G)}};this.editor.getOrCreateFilename=function(){var M=c.defaultFilename,H=c.getCurrentFile();null!=H&&(M=null!=H.getTitle()?H.getTitle():M);return M};var p=this.actions.get("print");p.setEnabled(!mxClient.IS_IOS||!navigator.standalone);p.visible=p.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77, +"F",z,C)});window.openBrowserFile=mxUtils.bind(this,function(z,C,x){StorageFile.getFileContent(this,z,C,x)});window.deleteBrowserFile=mxUtils.bind(this,function(z,C,x){StorageFile.deleteFile(this,z,C,x)});if(!d){var q=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(z){this.hideDialog(z)}));window.openFile.setConsumer(mxUtils.bind(this,function(z,C){null!=C&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(C)?(z=new Blob([z],{type:"application/octet-stream"}), +this.importVisio(z,mxUtils.bind(this,function(x){this.importXml(x,0,0,!0)}),null,C)):this.editor.graph.setSelectionCells(this.importXml(z,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!d){var m=this.dialog,n=m.close;this.dialog.close=mxUtils.bind(this,function(z){Editor.useLocalStorage=q;n.apply(m,arguments);z&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}}; +EditorUi.prototype.importZipFile=function(c,d,g){var q=this,m=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(n){if(mxUtils.isEmptyObject(n.files))g();else{var z=0,C,x=!1;n.forEach(function(y,I){y=I.name.toLowerCase();"diagram/diagram.xml"==y?(x=!0,I.async("string").then(function(N){0==N.indexOf("<mxfile ")?d(N):g()})):0==y.indexOf("versions/")&&(y=parseInt(y.substr(9)),y>z&&(z=y,C=I))});0<z?C.async("string").then(function(y){(new XMLHttpRequest).upload&& +q.isRemoteFileFormat(y,c.name)?q.isOffline()?q.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):q.parseFileData(y,mxUtils.bind(this,function(I){4==I.readyState&&(200<=I.status&&299>=I.status?d(I.responseText):g())}),c.name):g()}):x||g()}},function(n){g(n)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?m():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",m))};EditorUi.prototype.importFile=function(c,d,g,q,m,n,z,C,x,y,I,N){y=null!= +y?y:!0;var t=!1,p=null,F=mxUtils.bind(this,function(K){var D=null;null!=K&&"<mxlibrary"==K.substring(0,10)?this.loadLibrary(new LocalLibrary(this,K,z)):D=this.importXml(K,g,q,y,null,null!=N?mxEvent.isControlDown(N):null);null!=C&&C(D)});"image"==d.substring(0,5)?(x=!1,"image/png"==d.substring(0,9)&&(d=I?null:this.extractGraphModelFromPng(c),null!=d&&0<d.length&&(p=this.importXml(d,g,q,y,null,null!=N?mxEvent.isControlDown(N):null),x=!0)),x||(d=this.editor.graph,x=c.indexOf(";"),0<x&&(c=c.substring(0, +x)+c.substring(c.indexOf(",",x+1))),y&&d.isGridEnabled()&&(g=d.snap(g),q=d.snap(q)),p=[d.insertVertex(null,null,"",g,q,m,n,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";")])):/(\.*<graphml )/.test(c)?(t=!0,this.importGraphML(c,F)):null!=x&&null!=z&&(/(\.v(dx|sdx?))($|\?)/i.test(z)||/(\.vs(x|sx?))($|\?)/i.test(z))?(t=!0,this.importVisio(x,F)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,z)?this.isOffline()? +this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(t=!0,m=mxUtils.bind(this,function(K){4==K.readyState&&(200<=K.status&&299>=K.status?F(K.responseText):null!=C&&C(null))}),null!=c?this.parseFileData(c,m,z):this.parseFile(x,m,z)):0==c.indexOf("PK")&&null!=x?(t=!0,this.importZipFile(x,F,mxUtils.bind(this,function(){p=this.insertTextAt(this.validateFileData(c),g,q,!0,null,y);C(p)}))):/(\.v(sd|dx))($|\?)/i.test(z)||/(\.vs(s|x))($|\?)/i.test(z)||(p=this.insertTextAt(this.validateFileData(c), +g,q,!0,null,y,null,null!=N?mxEvent.isControlDown(N):null));t||null==C||C(p);return p};EditorUi.prototype.importFiles=function(c,d,g,q,m,n,z,C,x,y,I,N,t){q=null!=q?q:this.maxImageSize;y=null!=y?y:this.maxImageBytes;var p=null!=d&&null!=g,F=!0;d=null!=d?d:0;g=null!=g?g:0;var K=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var D=I||this.resampleThreshold,H=0;H<c.length;H++)if("image/svg"!==c[H].type.substring(0,9)&&"image/"===c[H].type.substring(0,6)&&c[H].size>D){K=!0;break}var J=mxUtils.bind(this,function(){var G= +this.editor.graph,P=G.gridSize;m=null!=m?m:mxUtils.bind(this,function(A,M,Q,O,R,S,X,aa,Y){try{return null!=A&&"<mxlibrary"==A.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,A,X)),null):this.isCompatibleString(A)&&1==c.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,A,X,!0)),null):this.importFile(A,M,Q,O,R,S,X,aa,Y,p,N,t)}catch(Z){return this.handleError(Z),null}});n=null!=n?n:mxUtils.bind(this,function(A){G.setSelectionCells(A)}); +if(this.spinner.spin(document.body,mxResources.get("loading")))for(var T=c.length,W=T,U=[],V=mxUtils.bind(this,function(A,M){U[A]=M;if(0==--W){this.spinner.stop();if(null!=C)C(U);else{var Q=[];G.getModel().beginUpdate();try{for(A=0;A<U.length;A++){var O=U[A]();null!=O&&(Q=Q.concat(O))}}finally{G.getModel().endUpdate()}}n(Q)}}),l=0;l<T;l++)mxUtils.bind(this,function(A){var M=c[A];if(null!=M){var Q=new FileReader;Q.onload=mxUtils.bind(this,function(O){if(null==z||z(M))if("image/"==M.type.substring(0, +6))if("image/svg"==M.type.substring(0,9)){var R=Graph.clipSvgDataUri(O.target.result),S=R.indexOf(",");S=decodeURIComponent(escape(atob(R.substring(S+1))));var X=mxUtils.parseXml(S);S=X.getElementsByTagName("svg");if(0<S.length){S=S[0];var aa=N?null:S.getAttribute("content");null!=aa&&"<"!=aa.charAt(0)&&"%"!=aa.charAt(0)&&(aa=unescape(window.atob?atob(aa):Base64.decode(aa,!0)));null!=aa&&"%"==aa.charAt(0)&&(aa=decodeURIComponent(aa));null==aa||"<mxfile "!==aa.substring(0,8)&&"<mxGraphModel "!==aa.substring(0, +14)?V(A,mxUtils.bind(this,function(){try{if(null!=X){var ba=X.getElementsByTagName("svg");if(0<ba.length){var ha=ba[0],ma=ha.getAttribute("width"),ia=ha.getAttribute("height");ma=null!=ma&&"%"!=ma.charAt(ma.length-1)?parseFloat(ma):NaN;ia=null!=ia&&"%"!=ia.charAt(ia.length-1)?parseFloat(ia):NaN;var qa=ha.getAttribute("viewBox");if(null==qa||0==qa.length)ha.setAttribute("viewBox","0 0 "+ma+" "+ia);else if(isNaN(ma)||isNaN(ia)){var la=qa.split(" ");3<la.length&&(ma=parseFloat(la[2]),ia=parseFloat(la[3]))}R= +Editor.createSvgDataUri(mxUtils.getXml(ha));var Ca=Math.min(1,Math.min(q/Math.max(1,ma)),q/Math.max(1,ia)),Da=m(R,M.type,d+A*P,g+A*P,Math.max(1,Math.round(ma*Ca)),Math.max(1,Math.round(ia*Ca)),M.name);if(isNaN(ma)||isNaN(ia)){var ya=new Image;ya.onload=mxUtils.bind(this,function(){ma=Math.max(1,ya.width);ia=Math.max(1,ya.height);Da[0].geometry.width=ma;Da[0].geometry.height=ia;ha.setAttribute("viewBox","0 0 "+ma+" "+ia);R=Editor.createSvgDataUri(mxUtils.getXml(ha));var Pa=R.indexOf(";");0<Pa&&(R= +R.substring(0,Pa)+R.substring(R.indexOf(",",Pa+1)));G.setCellStyles("image",R,[Da[0]])});ya.src=Editor.createSvgDataUri(mxUtils.getXml(ha))}return Da}}}catch(Pa){}return null})):V(A,mxUtils.bind(this,function(){return m(aa,"text/xml",d+A*P,g+A*P,0,0,M.name)}))}else V(A,mxUtils.bind(this,function(){return null}))}else{S=!1;if("image/png"==M.type){var Y=N?null:this.extractGraphModelFromPng(O.target.result);if(null!=Y&&0<Y.length){var Z=new Image;Z.src=O.target.result;V(A,mxUtils.bind(this,function(){return m(Y, +"text/xml",d+A*P,g+A*P,Z.width,Z.height,M.name)}));S=!0}}S||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(O.target.result,mxUtils.bind(this,function(ba){this.resizeImage(ba,O.target.result,mxUtils.bind(this,function(ha,ma,ia){V(A,mxUtils.bind(this,function(){if(null!= +ha&&ha.length<y){var qa=F&&this.isResampleImageSize(M.size,I)?Math.min(1,Math.min(q/ma,q/ia)):1;return m(ha,M.type,d+A*P,g+A*P,Math.round(ma*qa),Math.round(ia*qa),M.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),F,q,I,M.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else R=O.target.result,m(R,M.type,d+A*P,g+A*P,240,160,M.name,function(ba){V(A,function(){return ba})},M)});/(\.v(dx|sdx?))($|\?)/i.test(M.name)|| +/(\.vs(x|sx?))($|\?)/i.test(M.name)?m(null,M.type,d+A*P,g+A*P,240,160,M.name,function(O){V(A,function(){return O})},M):"image"==M.type.substring(0,5)||"application/pdf"==M.type?Q.readAsDataURL(M):Q.readAsText(M)}})(l)});if(K){K=[];for(H=0;H<c.length;H++)K.push(c[H]);c=K;this.confirmImageResize(function(G){F=G;J()},x)}else J()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber", +[1])};EditorUi.prototype.confirmImageResize=function(c,d){d=null!=d?d:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},q=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,m=function(n,z){if(n||d)mxSettings.setResizeImages(n?z:null),mxSettings.save();g();c(z)};null==q||d?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(n){m(n,!0)},function(n){m(n,!1)},mxResources.get("resize"),mxResources.get("actualSize"), +'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):m(!1,q)};EditorUi.prototype.parseFile=function(c,d,g){g=null!=g?g:c.name;var q=new FileReader;q.onload=mxUtils.bind(this,function(){this.parseFileData(q.result,d,g)});q.readAsText(c)};EditorUi.prototype.parseFileData=function(c,d,g){var q=new XMLHttpRequest;q.open("POST", +OPEN_URL);q.setRequestHeader("Content-Type","application/x-www-form-urlencoded");q.onreadystatechange=function(){d(q)};q.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(m){}};EditorUi.prototype.isResampleImageSize=function(c,d){d=null!=d?d:this.resampleThreshold;return c>d};EditorUi.prototype.resizeImage=function(c,d,g,q,m,n,z){m=null!=m?m:this.maxImageSize;var C=Math.max(1,c.width), +x=Math.max(1,c.height);if(q&&this.isResampleImageSize(null!=z?z:d.length,n))try{var y=Math.max(C/m,x/m);if(1<y){var I=Math.round(C/y),N=Math.round(x/y),t=document.createElement("canvas");t.width=I;t.height=N;t.getContext("2d").drawImage(c,0,0,I,N);var p=t.toDataURL();if(p.length<d.length){var F=document.createElement("canvas");F.width=I;F.height=N;var K=F.toDataURL();p!==K&&(d=p,C=I,x=N)}}}catch(D){}g(d,C,x)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)}; +EditorUi.prototype.loadImage=function(c,d,g){try{var q=new Image;q.onload=function(){q.width=0<q.width?q.width:120;q.height=0<q.height?q.height:120;d(q)};null!=g&&(q.onerror=g);q.src=c}catch(m){if(null!=g)g(m);else throw m;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:c)};var u=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&& +!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var c=this,d=this.editor.graph;Graph.touchStyle&&(d.panningHandler.isPanningTrigger=function(D){var H=D.getEvent();return null==D.getState()&& +!mxEvent.isMouseEvent(H)&&!d.freehand.isDrawing()||mxEvent.isPopupTrigger(H)&&(null==D.getState()||mxEvent.isControlDown(H)||mxEvent.isShiftDown(H))});d.cellEditor.editPlantUmlData=function(D,H,J){var G=JSON.parse(J);H=new TextareaDialog(c,mxResources.get("plantUml")+":",G.data,function(P){null!=P&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(P,G.format,function(T,W,U){c.spinner.stop();d.getModel().beginUpdate();try{if("txt"==G.format)d.labelChanged(D,"<pre>"+ +T+"</pre>"),d.updateCellSize(D,!0);else{d.setCellStyles("image",c.convertDataUri(T),[D]);var V=d.model.getGeometry(D);null!=V&&(V=V.clone(),V.width=W,V.height=U,d.cellsResized([D],[V],!1))}d.setAttributeForCell(D,"plantUmlData",JSON.stringify({data:P,format:G.format}))}finally{d.getModel().endUpdate()}},function(T){c.handleError(T)})},null,null,400,220);c.showDialog(H.container,420,300,!0,!0);H.init()};d.cellEditor.editMermaidData=function(D,H,J){var G=JSON.parse(J);H=new TextareaDialog(c,mxResources.get("mermaid")+ +":",G.data,function(P){null!=P&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(P,G.config,function(T,W,U){c.spinner.stop();d.getModel().beginUpdate();try{d.setCellStyles("image",T,[D]);var V=d.model.getGeometry(D);null!=V&&(V=V.clone(),V.width=Math.max(V.width,W),V.height=Math.max(V.height,U),d.cellsResized([D],[V],!1));d.setAttributeForCell(D,"mermaidData",JSON.stringify({data:P,config:G.config},null,2))}finally{d.getModel().endUpdate()}},function(T){c.handleError(T)})}, +null,null,400,220);c.showDialog(H.container,420,300,!0,!0);H.init()};var g=d.cellEditor.startEditing;d.cellEditor.startEditing=function(D,H){try{var J=this.graph.getAttributeForCell(D,"plantUmlData");if(null!=J)this.editPlantUmlData(D,H,J);else if(J=this.graph.getAttributeForCell(D,"mermaidData"),null!=J)this.editMermaidData(D,H,J);else{var G=d.getCellStyle(D);"1"==mxUtils.getValue(G,"metaEdit","0")?c.showDataDialog(D):g.apply(this,arguments)}}catch(P){c.handleError(P)}};d.getLinkTitle=function(D){return c.getLinkTitle(D)}; +d.customLinkClicked=function(D){var H=!1;try{c.handleCustomLink(D),H=!0}catch(J){c.handleError(J)}return H};var q=d.parseBackgroundImage;d.parseBackgroundImage=function(D){var H=q.apply(this,arguments);null!=H&&null!=H.src&&Graph.isPageLink(H.src)&&(H={originalSrc:H.src});return H};var m=d.setBackgroundImage;d.setBackgroundImage=function(D){null!=D&&null!=D.originalSrc&&(D=c.createImageForPageLink(D.originalSrc,c.currentPage,this));m.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this, +function(){d.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){d.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(D,H){D=null!=d.backgroundImage?d.backgroundImage.originalSrc:null;if(null!=D){var J=D.indexOf(",");if(0<J)for(D=D.substring(J+1),H=H.getProperty("patches"),J=0;J<H.length;J++)if(null!=H[J][EditorUi.DIFF_UPDATE]&&null!=H[J][EditorUi.DIFF_UPDATE][D]||null!=H[J][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(H[J][EditorUi.DIFF_REMOVE], +D)){d.refreshBackgroundImage();break}}}));var n=d.getBackgroundImageObject;d.getBackgroundImageObject=function(D,H){var J=n.apply(this,arguments);if(null!=J&&null!=J.originalSrc)if(!H)J={src:J.originalSrc};else if(H&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var G=this.stylesheet,P=this.shapeForegroundColor,T=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";J=c.createImageForPageLink(J.originalSrc); +this.shapeBackgroundColor=T;this.shapeForegroundColor=P;this.stylesheet=G}return J};var z=this.clearDefaultStyle;this.clearDefaultStyle=function(){z.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var C= +c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(D){D=null!=D?D:"";"1"==urlParams.dev&&(D+=(0<D.length?"&":"?")+"dev=1");return C.apply(this,arguments)};var x=d.addClickHandler;d.addClickHandler=function(D,H,J){var G=H;H=function(P,T){if(null==T){var W=mxEvent.getSource(P);"a"==W.nodeName.toLowerCase()&&(T=W.getAttribute("href"))}null!=T&&d.isCustomLink(T)&&(mxEvent.isTouchEvent(P)||!mxEvent.isPopupTrigger(P))&&d.customLinkClicked(T)&&mxEvent.consume(P);null!=G&&G(P,T)};x.call(this,D, +H,J)};u.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(d.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var y=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(D,H,J){c.editor.graph.isSelectionEmpty()?y.apply(this,arguments):c.menus.addMenuItems(D,"delete - cut copy copyAsImage - duplicate".split(" "),null,J)}}c.actions.get("print").funct=function(){c.showDialog((new PrintDialog(c)).container,360,null!=c.pages&&1<c.pages.length?470:390, +!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var I=d.getExportVariables;d.getExportVariables=function(){var D=I.apply(this,arguments),H=c.getCurrentFile();null!=H&&(D.filename=H.getTitle());D.pagecount=null!=c.pages?c.pages.length:1;D.page=null!=c.currentPage?c.currentPage.getName():"";D.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return D};var N=d.getGlobalVariable;d.getGlobalVariable=function(D){var H=c.getCurrentFile();return"filename"== +D&&null!=H?H.getTitle():"page"==D&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==D?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==D?null!=c.pages?c.pages.length:1:N.apply(this,arguments)};var t=d.labelLinkClicked;d.labelLinkClicked=function(D,H,J){var G=H.getAttribute("href");if(null==G||!d.isCustomLink(G)||!mxEvent.isTouchEvent(J)&&mxEvent.isPopupTrigger(J))t.apply(this,arguments);else{if(!d.isEnabled()||null!=D&&d.isCellLocked(D.cell))d.customLinkClicked(G), +d.getRubberband().reset();mxEvent.consume(J)}};this.editor.getOrCreateFilename=function(){var D=c.defaultFilename,H=c.getCurrentFile();null!=H&&(D=null!=H.getTitle()?H.getTitle():D);return D};var p=this.actions.get("print");p.setEnabled(!mxClient.IS_IOS||!navigator.standalone);p.visible=p.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77, !0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler(); -this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&e.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(M){var H=e.cellEditor.text2,G=null;null!=H&&(mxEvent.addListener(H,"dragleave",function(E){null!=G&&(G.parentNode.removeChild(G),G=null);E.stopPropagation();E.preventDefault()}),mxEvent.addListener(H,"dragover",mxUtils.bind(this,function(E){null==G&&(!mxClient.IS_IE||10<document.documentMode)&& -(G=this.highlightElement(H));E.stopPropagation();E.preventDefault()})),mxEvent.addListener(H,"drop",mxUtils.bind(this,function(E){null!=G&&(G.parentNode.removeChild(G),G=null);if(0<E.dataTransfer.files.length)this.importFiles(E.dataTransfer.files,0,0,this.maxImageSize,function(T,W,U,V,l,A){e.insertImage(T,l,A)},function(){},function(T){return"image/"==T.type.substring(0,6)},function(T){for(var W=0;W<T.length;W++)T[W]()},mxEvent.isControlDown(E));else if(0<=mxUtils.indexOf(E.dataTransfer.types,"text/uri-list")){var P= -E.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(P)?this.loadImage(decodeURIComponent(P),mxUtils.bind(this,function(T){var W=Math.max(1,T.width);T=Math.max(1,T.height);var U=this.maxImageSize;U=Math.min(1,Math.min(U/Math.max(1,W)),U/Math.max(1,T));e.insertImage(decodeURIComponent(P),W*U,T*U)})):document.execCommand("insertHTML",!1,E.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(E.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,E.dataTransfer.getData("text/html")): -0<=mxUtils.indexOf(E.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,E.dataTransfer.getData("text/plain"));E.stopPropagation();E.preventDefault()})))}));this.isSettingsEnabled()&&(p=this.editor.graph.view,p.setUnit(mxSettings.getUnit()),p.addListener("unitChanged",function(M,H){mxSettings.setUnit(H.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&& +this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&d.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(D){var H=d.cellEditor.text2,J=null;null!=H&&(mxEvent.addListener(H,"dragleave",function(G){null!=J&&(J.parentNode.removeChild(J),J=null);G.stopPropagation();G.preventDefault()}),mxEvent.addListener(H,"dragover",mxUtils.bind(this,function(G){null==J&&(!mxClient.IS_IE||10<document.documentMode)&& +(J=this.highlightElement(H));G.stopPropagation();G.preventDefault()})),mxEvent.addListener(H,"drop",mxUtils.bind(this,function(G){null!=J&&(J.parentNode.removeChild(J),J=null);if(0<G.dataTransfer.files.length)this.importFiles(G.dataTransfer.files,0,0,this.maxImageSize,function(T,W,U,V,l,A){d.insertImage(T,l,A)},function(){},function(T){return"image/"==T.type.substring(0,6)},function(T){for(var W=0;W<T.length;W++)T[W]()},mxEvent.isControlDown(G));else if(0<=mxUtils.indexOf(G.dataTransfer.types,"text/uri-list")){var P= +G.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(P)?this.loadImage(decodeURIComponent(P),mxUtils.bind(this,function(T){var W=Math.max(1,T.width);T=Math.max(1,T.height);var U=this.maxImageSize;U=Math.min(1,Math.min(U/Math.max(1,W)),U/Math.max(1,T));d.insertImage(decodeURIComponent(P),W*U,T*U)})):document.execCommand("insertHTML",!1,G.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(G.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,G.dataTransfer.getData("text/html")): +0<=mxUtils.indexOf(G.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,G.dataTransfer.getData("text/plain"));G.stopPropagation();G.preventDefault()})))}));this.isSettingsEnabled()&&(p=this.editor.graph.view,p.setUnit(mxSettings.getUnit()),p.addListener("unitChanged",function(D,H){mxSettings.setUnit(H.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&& !this.editor.editable?null:new mxDualRuler(this,p.unit),this.refresh());if("1"==urlParams.styledev){p=document.getElementById("geFooter");null!=p&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change", -mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),p.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(M,H){0<this.editor.graph.getSelectionCount()?(M=this.editor.graph.getSelectionCell(),M=this.editor.graph.getModel().getStyle(M),this.styleInput.value=M||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var F= -this.isSelectionAllowed;this.isSelectionAllowed=function(M){return mxEvent.getSource(M)==this.styleInput?!0:F.apply(this,arguments)}}p=document.getElementById("geInfo");null!=p&&p.parentNode.removeChild(p);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var J=null;mxEvent.addListener(e.container,"dragleave",function(M){e.isEnabled()&&(null!=J&&(J.parentNode.removeChild(J),J=null),M.stopPropagation(),M.preventDefault())});mxEvent.addListener(e.container,"dragover",mxUtils.bind(this, -function(M){null==J&&(!mxClient.IS_IE||10<document.documentMode)&&(J=this.highlightElement(e.container));null!=this.sidebar&&this.sidebar.hideTooltip();M.stopPropagation();M.preventDefault()}));mxEvent.addListener(e.container,"drop",mxUtils.bind(this,function(M){null!=J&&(J.parentNode.removeChild(J),J=null);if(e.isEnabled()){var H=mxUtils.convertPoint(e.container,mxEvent.getClientX(M),mxEvent.getClientY(M)),G=M.dataTransfer.files,E=e.view.translate,P=e.view.scale,T=H.x/P-E.x,W=H.y/P-E.y;if(0<G.length)"1"!= -urlParams.embed&&mxEvent.isShiftDown(M)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(G,!0)):(mxEvent.isAltDown(M)&&(W=T=null),this.importFiles(G,T,W,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(M),null,null,mxEvent.isShiftDown(M),M));else{mxEvent.isAltDown(M)&&(W=T=0);var U=0<=mxUtils.indexOf(M.dataTransfer.types,"text/uri-list")?M.dataTransfer.getData("text/uri-list"):null;H=this.extractGraphModelFromEvent(M,null!=this.pages); -if(null!=H)e.setSelectionCells(this.importXml(H,T,W,!0));else if(0<=mxUtils.indexOf(M.dataTransfer.types,"text/html")){var V=M.dataTransfer.getData("text/html");H=document.createElement("div");H.innerHTML=e.sanitizeHtml(V);var l=null;G=H.getElementsByTagName("img");null!=G&&1==G.length?(V=G[0].getAttribute("src"),null==V&&(V=G[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)||(l=!0)):(G=H.getElementsByTagName("a"),null!=G&&1==G.length?V=G[0].getAttribute("href"):(H=H.getElementsByTagName("pre"), -null!=H&&1==H.length&&(V=mxUtils.getTextContent(H[0]))));var A=!0,L=mxUtils.bind(this,function(){e.setSelectionCells(this.insertTextAt(V,T,W,!0,l,null,A,mxEvent.isControlDown(M)))});l&&null!=V&&V.length>this.resampleThreshold?this.confirmImageResize(function(Q){A=Q;L()},mxEvent.isControlDown(M)):L()}else null!=U&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(U)?this.loadImage(decodeURIComponent(U),mxUtils.bind(this,function(Q){var O=Math.max(1,Q.width);Q=Math.max(1,Q.height);var R=this.maxImageSize;R=Math.min(1, -Math.min(R/Math.max(1,O)),R/Math.max(1,Q));e.setSelectionCell(e.insertVertex(null,null,"",T,W,O*R,Q*R,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+U+";"))}),mxUtils.bind(this,function(Q){e.setSelectionCells(this.insertTextAt(U,T,W,!0))})):0<=mxUtils.indexOf(M.dataTransfer.types,"text/plain")&&e.setSelectionCells(this.insertTextAt(M.dataTransfer.getData("text/plain"),T,W,!0))}}M.stopPropagation();M.preventDefault()}),!1)}e.enableFlowAnimation= -!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();p=mxUtils.bind(this,function(){e.refresh();e.view.validateBackground();this.updateTabContainer()});this.addListener("darkModeChanged",p);this.addListener("sketchModeChanged",p);"dark"==uiTheme?(this.doSetDarkMode(!0),this.fireEvent(new mxEventObject("darkModeChanged"))):"min"==uiTheme&&"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode? -mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(e){if(!mxEvent.isConsumed(e))try{for(var g=e.clipboardData||e.originalEvent.clipboardData,q=!1,m=0;m<g.types.length;m++)if("text/"===g.types[m].substring(0,5)){q=!0;break}if(!q){var n=g.items;for(index in n){var z= -n[index];if("file"===z.kind){if(c.isEditing())this.importFiles([z.getAsFile()],0,0,this.maxImageSize,function(v,y,I,N,t,p){c.insertImage(v,t,p)},function(){},function(v){return"image/"==v.type.substring(0,6)},function(v){for(var y=0;y<v.length;y++)v[y]()});else{var C=this.editor.graph.getInsertPoint();this.importFiles([z.getAsFile()],C.x,C.y,this.maxImageSize);mxEvent.consume(e)}break}}}}catch(v){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){g.innerHTML= -" ";g.focus();document.execCommand("selectAll",!1,null)},0)}var e=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow= -"hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML=" ";var q=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(n){var z=mxEvent.getSource(n);null==e.container||!e.isEnabled()||e.isMouseDown|| -e.isEditing()||null!=this.dialog||"INPUT"==z.nodeName||"TEXTAREA"==z.nodeName||224!=n.keyCode&&(mxClient.IS_MAC||17!=n.keyCode)&&(!mxClient.IS_MAC||91!=n.keyCode&&93!=n.keyCode)||q||(g.style.left=e.container.scrollLeft+10+"px",g.style.top=e.container.scrollTop+10+"px",e.container.appendChild(g),q=!0,g.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(n){var z=n.keyCode;window.setTimeout(mxUtils.bind(this,function(){!q||224!=z&&17!= -z&&91!=z&&93!=z||(q=!1,e.isEditing()||null!=this.dialog||null==e.container||e.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(n){if(e.isEnabled())try{mxClipboard.copy(e),this.copyCells(g),c()}catch(z){this.handleError(z)}}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(n){if(e.isEnabled())try{mxClipboard.copy(e),this.copyCells(g,!0),c()}catch(z){this.handleError(z)}}));mxEvent.addListener(g, -"paste",mxUtils.bind(this,function(n){e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&(g.innerHTML=" ",g.focus(),null!=n.clipboardData&&this.pasteCells(n,g,!0,!0),mxEvent.isConsumed(n)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(n,g,!1,!0)}),0))}),!0);var m=this.isSelectionAllowed;this.isSelectionAllowed=function(n){return mxEvent.getSource(n)==g?!0:m.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(c,e){mxSettings.setUi(c);this.doSetCurrentTheme(c); -this.fireEvent(new mxEventObject("currentThemeChanged"));e||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.doSetCurrentTheme=function(c){Editor.currentTheme!=c&&(Editor.currentTheme=c)};EditorUi.prototype.setSketchMode=function(c){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(c);null==urlParams.rough&&(mxSettings.settings.sketchMode=c,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}), -0)};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }": +mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),p.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(D,H){0<this.editor.graph.getSelectionCount()?(D=this.editor.graph.getSelectionCell(),D=this.editor.graph.getModel().getStyle(D),this.styleInput.value=D||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var F= +this.isSelectionAllowed;this.isSelectionAllowed=function(D){return mxEvent.getSource(D)==this.styleInput?!0:F.apply(this,arguments)}}p=document.getElementById("geInfo");null!=p&&p.parentNode.removeChild(p);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var K=null;mxEvent.addListener(d.container,"dragleave",function(D){d.isEnabled()&&(null!=K&&(K.parentNode.removeChild(K),K=null),D.stopPropagation(),D.preventDefault())});mxEvent.addListener(d.container,"dragover",mxUtils.bind(this, +function(D){null==K&&(!mxClient.IS_IE||10<document.documentMode)&&(K=this.highlightElement(d.container));null!=this.sidebar&&this.sidebar.hideTooltip();D.stopPropagation();D.preventDefault()}));mxEvent.addListener(d.container,"drop",mxUtils.bind(this,function(D){null!=K&&(K.parentNode.removeChild(K),K=null);if(d.isEnabled()){var H=mxUtils.convertPoint(d.container,mxEvent.getClientX(D),mxEvent.getClientY(D)),J=D.dataTransfer.files,G=d.view.translate,P=d.view.scale,T=H.x/P-G.x,W=H.y/P-G.y;if(0<J.length)"1"!= +urlParams.embed&&mxEvent.isShiftDown(D)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(J,!0)):(mxEvent.isAltDown(D)&&(W=T=null),this.importFiles(J,T,W,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(D),null,null,mxEvent.isShiftDown(D),D));else{mxEvent.isAltDown(D)&&(W=T=0);var U=0<=mxUtils.indexOf(D.dataTransfer.types,"text/uri-list")?D.dataTransfer.getData("text/uri-list"):null;H=this.extractGraphModelFromEvent(D,null!=this.pages); +if(null!=H)d.setSelectionCells(this.importXml(H,T,W,!0));else if(0<=mxUtils.indexOf(D.dataTransfer.types,"text/html")){var V=D.dataTransfer.getData("text/html");H=document.createElement("div");H.innerHTML=d.sanitizeHtml(V);var l=null;J=H.getElementsByTagName("img");null!=J&&1==J.length?(V=J[0].getAttribute("src"),null==V&&(V=J[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)||(l=!0)):(J=H.getElementsByTagName("a"),null!=J&&1==J.length?V=J[0].getAttribute("href"):(H=H.getElementsByTagName("pre"), +null!=H&&1==H.length&&(V=mxUtils.getTextContent(H[0]))));var A=!0,M=mxUtils.bind(this,function(){d.setSelectionCells(this.insertTextAt(V,T,W,!0,l,null,A,mxEvent.isControlDown(D)))});l&&null!=V&&V.length>this.resampleThreshold?this.confirmImageResize(function(Q){A=Q;M()},mxEvent.isControlDown(D)):M()}else null!=U&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(U)?this.loadImage(decodeURIComponent(U),mxUtils.bind(this,function(Q){var O=Math.max(1,Q.width);Q=Math.max(1,Q.height);var R=this.maxImageSize;R=Math.min(1, +Math.min(R/Math.max(1,O)),R/Math.max(1,Q));d.setSelectionCell(d.insertVertex(null,null,"",T,W,O*R,Q*R,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+U+";"))}),mxUtils.bind(this,function(Q){d.setSelectionCells(this.insertTextAt(U,T,W,!0))})):0<=mxUtils.indexOf(D.dataTransfer.types,"text/plain")&&d.setSelectionCells(this.insertTextAt(D.dataTransfer.getData("text/plain"),T,W,!0))}}D.stopPropagation();D.preventDefault()}),!1)}d.enableFlowAnimation= +!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();p=mxUtils.bind(this,function(){d.refresh();d.view.validateBackground();this.updateTabContainer()});this.addListener("darkModeChanged",p);this.addListener("sketchModeChanged",p);"dark"==uiTheme?(this.doSetDarkMode(!0),this.fireEvent(new mxEventObject("darkModeChanged"))):"min"==uiTheme&&"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode? +mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d))try{for(var g=d.clipboardData||d.originalEvent.clipboardData,q=!1,m=0;m<g.types.length;m++)if("text/"===g.types[m].substring(0,5)){q=!0;break}if(!q){var n=g.items;for(index in n){var z= +n[index];if("file"===z.kind){if(c.isEditing())this.importFiles([z.getAsFile()],0,0,this.maxImageSize,function(x,y,I,N,t,p){c.insertImage(x,t,p)},function(){},function(x){return"image/"==x.type.substring(0,6)},function(x){for(var y=0;y<x.length;y++)x[y]()});else{var C=this.editor.graph.getInsertPoint();this.importFiles([z.getAsFile()],C.x,C.y,this.maxImageSize);mxEvent.consume(d)}break}}}}catch(x){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){g.innerHTML= +" ";g.focus();document.execCommand("selectAll",!1,null)},0)}var d=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow= +"hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML=" ";var q=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(n){var z=mxEvent.getSource(n);null==d.container||!d.isEnabled()||d.isMouseDown|| +d.isEditing()||null!=this.dialog||"INPUT"==z.nodeName||"TEXTAREA"==z.nodeName||224!=n.keyCode&&(mxClient.IS_MAC||17!=n.keyCode)&&(!mxClient.IS_MAC||91!=n.keyCode&&93!=n.keyCode)||q||(g.style.left=d.container.scrollLeft+10+"px",g.style.top=d.container.scrollTop+10+"px",d.container.appendChild(g),q=!0,g.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(n){var z=n.keyCode;window.setTimeout(mxUtils.bind(this,function(){!q||224!=z&&17!= +z&&91!=z&&93!=z||(q=!1,d.isEditing()||null!=this.dialog||null==d.container||d.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(n){if(d.isEnabled())try{mxClipboard.copy(d),this.copyCells(g),c()}catch(z){this.handleError(z)}}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(n){if(d.isEnabled())try{mxClipboard.copy(d),this.copyCells(g,!0),c()}catch(z){this.handleError(z)}}));mxEvent.addListener(g, +"paste",mxUtils.bind(this,function(n){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(g.innerHTML=" ",g.focus(),null!=n.clipboardData&&this.pasteCells(n,g,!0,!0),mxEvent.isConsumed(n)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(n,g,!1,!0)}),0))}),!0);var m=this.isSelectionAllowed;this.isSelectionAllowed=function(n){return mxEvent.getSource(n)==g?!0:m.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(c,d){mxSettings.setUi(c);d=d||this.doSetCurrentTheme(c); +this.fireEvent(new mxEventObject("currentThemeChanged"));d||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.doSetCurrentTheme=function(c){var d=Editor.currentTheme,g=!1;if(d!=c){if("1"==urlParams["live-ui"]){var q=function(m){return null==m||""==m||"dark"==m||"kennedy"==m};console.log("doSetCurrentTheme",d,c);c=q(c)?"default":c;d=q(d)?"default":d;"sketch"==d&&"default"==c?(this.sidebarFooterContainer.style.display="block",this.menubarContainer.style.display="block",this.toolbarContainer.style.display= +"block",this.sidebarContainer.style.display="block",this.tabContainer.style.display="block",this.hsplit.style.display="block",this.hsplitPosition=EditorUi.prototype.hsplitPosition,this.menubarHeight=App.prototype.menubarHeight,this.formatWidth=EditorUi.prototype.formatWidth,g=!0):"default"==d&&"sketch"==c&&(this.sidebarFooterContainer.style.display="none",this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.sidebarContainer.style.display="none",this.tabContainer.style.display= +"none",this.hsplit.style.display="none",this.formatWidth=this.menubarHeight=this.hsplitPosition=0,g=!0);this.switchTheme(c)}Editor.currentTheme=c}return g};EditorUi.prototype.switchTheme=function(c){this.createMenubarForTheme(c);this.switchCssForTheme(c);"sketch"==c?(this.refresh(),this.createFormatWindow(),this.formatContainer.style.left="0px",this.formatContainer.style.top="0px",this.formatContainer.style.width=""):"default"==c&&(null!=this.formatContainer&&(this.formatContainer.style.left="",null!= +this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null)),this.refresh())};EditorUi.prototype.switchCssForTheme=function(c){"sketch"==c?null==this.sketchStyleElt&&(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=Editor.createMinimalCss(), +document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),this.sketchStyleElt=null)};EditorUi.prototype.createMenubarForTheme=function(c){"sketch"==c?null==this.sketchMenubarElt&&(this.sketchMenubarElt=document.createElement("div"),this.sketchMenubarElt.className="geToolbarContainer",this.sketchMenubarElt.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;padding:6px;border:1px solid #c0c0c0;overflow:hidden;text-align:right;white-space:nowrap;user-select:none;", +null!=this.switchThemeElt&&(this.switchThemeElt.style.position="relative",this.switchThemeElt.style.width="22px",this.switchThemeElt.style.height="22px",this.switchThemeElt.style.top="0px",this.switchThemeElt.style.right="6px",this.sketchMenubarElt.appendChild(this.switchThemeElt)),this.diagramContainer.parentNode.appendChild(this.sketchMenubarElt)):(null!=this.switchThemeElt&&(this.switchThemeElt.style.position="absolute",this.switchThemeElt.style.width="19px",this.switchThemeElt.style.height="19px", +this.switchThemeElt.style.top="0px",this.switchThemeElt.style.right="17px",document.body.appendChild(this.switchThemeElt)),null!=this.sketchMenubarElt&&(this.sketchMenubarElt.parentNode.removeChild(this.sketchMenubarElt),this.sketchMenubarElt=null))};EditorUi.prototype.addMenuToMenubar=function(c,d,g,q){var m=this.menus.get(d);c=c.addMenu(mxResources.get(d),m.funct);c.className=g;c.style.display="inline-block";c.style.boxSizing="border-box";c.style.top="6px";c.style.marginRight="6px";c.style.height= +"30px";c.style.paddingTop="6px";c.style.paddingBottom="6px";c.style.cursor="pointer";c.setAttribute("title",mxResources.get(d));this.menus.menuCreated(m,c,"geMenuItem");null!=q&&(c.style.backgroundImage="url("+q+")",c.style.backgroundPosition="center center",c.style.backgroundRepeat="no-repeat",c.style.backgroundSize="24px 24px",c.style.width="34px",c.innerText="");return c};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var c="1"==urlParams.sketch?Math.max(10,this.diagramContainer.clientWidth- +241):Math.max(10,this.diagramContainer.clientWidth-248),d="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60,g="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),c,d,240,g,mxUtils.bind(this,function(q){q.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));this.formatWindow.window.minimumSize= +new mxRectangle(0,0,240,80)}};EditorUi.prototype.setSketchMode=function(c){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(c);null==urlParams.rough&&(mxSettings.settings.sketchMode=c,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+ +(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }": "html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body .geSidebarContainer *:not(svg *) { font-size:9pt; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }html body .geMenubarContainer .geStatus { margin-top: 0px !important; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+ (Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; border: none !important; }html body .geToolbarContainer a div { color: "+(Editor.isDarkMode()?"#707070":Editor.darkColor)+" }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: "+(Editor.isDarkMode()? "#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } html body div.geToolbarContainer a.geColorBtn { margin: 2px; } html body .mxWindow td.mxWindowPane input, html body .mxWindow td.mxWindowPane select, html body .mxWindow td.mxWindowPane textarea, html body .mxWindow td.mxWindowPane radio { padding: 0px; box-sizing: border-box; }.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); "+ @@ -11730,200 +11736,200 @@ this.fireEvent(new mxEventObject("currentThemeChanged"));e||this.alert(mxResourc (Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow *:not(svg *) { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: "+ (Editor.isDarkMode()?Editor.darkColor:"rgb(249, 249, 249)")+" !important; color: #A0A0A0 !important; } html div.geActivePage { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; "+(Editor.isDarkMode()?"":"color: #353535 !important; } ")+"html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: "+ (Editor.isDarkMode()?"#cccccc":"#353535")+"; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: "+(Editor.isDarkMode()?"#000000":"#29b6f2")+"; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: "+(Editor.isDarkMode()?"#cccccc":"#ffffff")+" !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }html body td.mxWindowTitle { padding-right: 14px; }html td.mxWindowTitle div { top: 0px !important; }"+ -(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};EditorUi.prototype.setDarkMode=function(c){this.doSetDarkMode(c);null==urlParams.dark&&(mxSettings.settings.darkMode=c,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))};var x=document.createElement("link");x.setAttribute("rel","stylesheet");x.setAttribute("href",STYLE_PATH+"/dark.css"); -x.setAttribute("charset","UTF-8");x.setAttribute("type","text/css");EditorUi.prototype.doSetDarkMode=function(c){if(Editor.darkMode!=c){var e=this.editor.graph;Editor.darkMode=c;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";e.view.defaultGridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultDarkGridColor:mxGraphView.prototype.defaultGridColor;e.view.gridColor=e.view.defaultGridColor;e.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor: -"#ffffff";e.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";e.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"#ffffff";e.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";e.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";e.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";e.loadStylesheet();null!=this.actions.layersWindow&& -(c=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,c&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=e.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor= -e.defaultPageBorderColor;Graph.prototype.shapeBackgroundColor=e.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=e.shapeForegroundColor;Graph.prototype.defaultThemeName=e.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor: -"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;null!=Editor.styleElt&&(Editor.styleElt.innerHTML=Editor.createMinimalCss());Editor.isDarkMode()?null==x.parentNode&&document.getElementsByTagName("head")[0].appendChild(x):null!=x.parentNode&&x.parentNode.removeChild(x)}}; -EditorUi.prototype.setPagesVisible=function(c){Editor.pagesVisible!=c&&(Editor.pagesVisible=c,mxSettings.settings.pagesVisible=c,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(c,e){this.sidebar.sidebarTitles!=c&&(this.sidebar.sidebarTitles=c,this.sidebar.refresh(),this.isSettingsEnabled()&&e&&(mxSettings.settings.sidebarTitles=c,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen= -function(c){Editor.inlineFullscreen!=c&&(Editor.inlineFullscreen=c,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(c){if(Editor.sketchMode!=c){var e=function(q,m,n){null== -q[m]&&(q[m]=n)},g=this.editor.graph;Editor.sketchMode=c;this.menus.defaultFontSize=c?20:16;g.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);e(g.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);g.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);e(g.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);e(g.defaultEdgeStyle,"edgeStyle","none");e(g.defaultEdgeStyle,"rounded","0");e(g.defaultEdgeStyle,"curved","1");e(g.defaultEdgeStyle,"jettySize","auto"); -e(g.defaultEdgeStyle,"orthogonalLoop","1");e(g.defaultEdgeStyle,"endArrow","open");e(g.defaultEdgeStyle,"endSize","14");e(g.defaultEdgeStyle,"startSize","14");c&&(e(g.defaultVertexStyle,"fontFamily",Editor.sketchFontFamily),e(g.defaultVertexStyle,"fontSource",Editor.sketchFontSource),e(g.defaultVertexStyle,"hachureGap","4"),e(g.defaultVertexStyle,"sketch","1"),e(g.defaultEdgeStyle,"fontFamily",Editor.sketchFontFamily),e(g.defaultEdgeStyle,"fontSource",Editor.sketchFontSource),e(g.defaultEdgeStyle, -"sketch","1"),e(g.defaultEdgeStyle,"hachureGap","4"),e(g.defaultEdgeStyle,"sourcePerimeterSpacing","8"),e(g.defaultEdgeStyle,"targetPerimeterSpacing","8"));g.currentVertexStyle=mxUtils.clone(g.defaultVertexStyle);g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=function(c){var e=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(c)){var g=c.indexOf(",");0<g&&(e=this.getPageById(c.substring(g+1)),e=null!=e?e.getName(): -mxResources.get("pageNotFound"))}else"data:"==c.substring(0,5)&&(e=mxResources.get("action"));return e};EditorUi.prototype.handleCustomLink=function(c){if(Graph.isPageLink(c)){var e=c.indexOf(",");if(c=this.getPageById(c.substring(e+1)))this.selectPage(c);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(c)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)}; +(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};EditorUi.prototype.setDarkMode=function(c){this.doSetDarkMode(c);null==urlParams.dark&&(mxSettings.settings.darkMode=c,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))};var v=document.createElement("link");v.setAttribute("rel","stylesheet");v.setAttribute("href",STYLE_PATH+"/dark.css"); +v.setAttribute("charset","UTF-8");v.setAttribute("type","text/css");EditorUi.prototype.doSetDarkMode=function(c){if(Editor.darkMode!=c){var d=this.editor.graph;Editor.darkMode=c;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";d.view.defaultGridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultDarkGridColor:mxGraphView.prototype.defaultGridColor;d.view.gridColor=d.view.defaultGridColor;d.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor: +"#ffffff";d.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";d.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"#ffffff";d.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";d.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";d.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";d.loadStylesheet();null!=this.actions.layersWindow&& +(c=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,c&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=d.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor= +d.defaultPageBorderColor;Graph.prototype.shapeBackgroundColor=d.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=d.shapeForegroundColor;Graph.prototype.defaultThemeName=d.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor: +"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;null!=Editor.styleElt&&(Editor.styleElt.innerHTML=Editor.createMinimalCss());Editor.isDarkMode()?null==v.parentNode&&document.getElementsByTagName("head")[0].appendChild(v):null!=v.parentNode&&v.parentNode.removeChild(v)}}; +EditorUi.prototype.setPagesVisible=function(c){Editor.pagesVisible!=c&&(Editor.pagesVisible=c,mxSettings.settings.pagesVisible=c,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(c,d){this.sidebar.sidebarTitles!=c&&(this.sidebar.sidebarTitles=c,this.sidebar.refresh(),this.isSettingsEnabled()&&d&&(mxSettings.settings.sidebarTitles=c,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen= +function(c){Editor.inlineFullscreen!=c&&(Editor.inlineFullscreen=c,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(c){if(Editor.sketchMode!=c){var d=function(q,m,n){null== +q[m]&&(q[m]=n)},g=this.editor.graph;Editor.sketchMode=c;this.menus.defaultFontSize=c?20:16;g.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);d(g.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);g.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);d(g.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);d(g.defaultEdgeStyle,"edgeStyle","none");d(g.defaultEdgeStyle,"rounded","0");d(g.defaultEdgeStyle,"curved","1");d(g.defaultEdgeStyle,"jettySize","auto"); +d(g.defaultEdgeStyle,"orthogonalLoop","1");d(g.defaultEdgeStyle,"endArrow","open");d(g.defaultEdgeStyle,"endSize","14");d(g.defaultEdgeStyle,"startSize","14");c&&(d(g.defaultVertexStyle,"fontFamily",Editor.sketchFontFamily),d(g.defaultVertexStyle,"fontSource",Editor.sketchFontSource),d(g.defaultVertexStyle,"hachureGap","4"),d(g.defaultVertexStyle,"sketch","1"),d(g.defaultEdgeStyle,"fontFamily",Editor.sketchFontFamily),d(g.defaultEdgeStyle,"fontSource",Editor.sketchFontSource),d(g.defaultEdgeStyle, +"sketch","1"),d(g.defaultEdgeStyle,"hachureGap","4"),d(g.defaultEdgeStyle,"sourcePerimeterSpacing","8"),d(g.defaultEdgeStyle,"targetPerimeterSpacing","8"));g.currentVertexStyle=mxUtils.clone(g.defaultVertexStyle);g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=function(c){var d=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(c)){var g=c.indexOf(",");0<g&&(d=this.getPageById(c.substring(g+1)),d=null!=d?d.getName(): +mxResources.get("pageNotFound"))}else"data:"==c.substring(0,5)&&(d=mxResources.get("action"));return d};EditorUi.prototype.handleCustomLink=function(c){if(Graph.isPageLink(c)){var d=c.indexOf(",");if(c=this.getPageById(c.substring(d+1)))this.selectPage(c);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(c)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)}; EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(c){c.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(c){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[], -"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(c,e){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(c=e.getProperty("customFonts"),this.menus.customFonts=c,mxSettings.setCustomFonts(c));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this, -function(c,e){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(c,e){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor= -mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",mxUtils.bind(this,function(c,e){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(c,e){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!= +"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(c,d){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(c=d.getProperty("customFonts"),this.menus.customFonts=c,mxSettings.setCustomFonts(c));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this, +function(c,d){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(c,d){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor= +mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",mxUtils.bind(this,function(c,d){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(c,d){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!= this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth); -mxSettings.save()})}};EditorUi.prototype.copyImage=function(c,e,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(q,m){try{this.spinner.stop();var n=this.createImageDataUri(q,e,"png"),z=parseInt(m.getAttribute("width")),C=parseInt(m.getAttribute("height"));this.writeImageToClipboard(n,z,C,mxUtils.bind(this,function(v){this.handleError(v)}))}catch(v){this.handleError(v)}}),null,null,null,mxUtils.bind(this, -function(q){this.spinner.stop();this.handleError(q)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<c.length?c:null)}catch(q){this.handleError(q)}};EditorUi.prototype.writeImageToClipboard=function(c,e,g,q){var m=this.base64ToBlob(c.substring(c.indexOf(",")+1),"image/png");c=new ClipboardItem({"image/png":m,"text/html":new Blob(['<img src="'+c+'" width="'+e+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([c])["catch"](q)}; -EditorUi.prototype.copyCells=function(c,e){var g=this.editor.graph;if(g.isSelectionEmpty())c.innerText="";else{var q=mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),m=mxUtils.getXml(g.encodeCells(q));mxUtils.setTextContent(c,encodeURIComponent(m));e?(g.removeCells(q,!1),g.lastPasteXml=null):(g.lastPasteXml=m,g.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var c=null;if(Editor.enableNativeCipboard){var e=this.editor.graph; -e.isSelectionEmpty()||(c=mxUtils.sortCells(e.getExportableCells(e.model.getTopmostCells(e.getSelectionCells()))),e=mxUtils.getXml(e.encodeCells(c)),navigator.clipboard.writeText(e))}return c};EditorUi.prototype.pasteXml=function(c,e,g,q){var m=this.editor.graph,n=null;m.lastPasteXml==c?m.pasteCounter++:(m.lastPasteXml=c,m.pasteCounter=0);var z=m.pasteCounter*m.gridSize;if(g||this.isCompatibleString(c))n=this.importXml(c,z,z),m.setSelectionCells(n);else if(e&&1==m.getSelectionCount()){z=m.getStartEditingCell(m.getSelectionCell(), +mxSettings.save()})}};EditorUi.prototype.copyImage=function(c,d,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(q,m){try{this.spinner.stop();var n=this.createImageDataUri(q,d,"png"),z=parseInt(m.getAttribute("width")),C=parseInt(m.getAttribute("height"));this.writeImageToClipboard(n,z,C,mxUtils.bind(this,function(x){this.handleError(x)}))}catch(x){this.handleError(x)}}),null,null,null,mxUtils.bind(this, +function(q){this.spinner.stop();this.handleError(q)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<c.length?c:null)}catch(q){this.handleError(q)}};EditorUi.prototype.writeImageToClipboard=function(c,d,g,q){var m=this.base64ToBlob(c.substring(c.indexOf(",")+1),"image/png");c=new ClipboardItem({"image/png":m,"text/html":new Blob(['<img src="'+c+'" width="'+d+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([c])["catch"](q)}; +EditorUi.prototype.copyCells=function(c,d){var g=this.editor.graph;if(g.isSelectionEmpty())c.innerText="";else{var q=mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),m=mxUtils.getXml(g.encodeCells(q));mxUtils.setTextContent(c,encodeURIComponent(m));d?(g.removeCells(q,!1),g.lastPasteXml=null):(g.lastPasteXml=m,g.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var c=null;if(Editor.enableNativeCipboard){var d=this.editor.graph; +d.isSelectionEmpty()||(c=mxUtils.sortCells(d.getExportableCells(d.model.getTopmostCells(d.getSelectionCells()))),d=mxUtils.getXml(d.encodeCells(c)),navigator.clipboard.writeText(d))}return c};EditorUi.prototype.pasteXml=function(c,d,g,q){var m=this.editor.graph,n=null;m.lastPasteXml==c?m.pasteCounter++:(m.lastPasteXml=c,m.pasteCounter=0);var z=m.pasteCounter*m.gridSize;if(g||this.isCompatibleString(c))n=this.importXml(c,z,z),m.setSelectionCells(n);else if(d&&1==m.getSelectionCount()){z=m.getStartEditingCell(m.getSelectionCell(), q);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==m.getCurrentCellStyle(z)[mxConstants.STYLE_SHAPE])m.setCellStyles(mxConstants.STYLE_IMAGE,c,[z]);else{m.model.beginUpdate();try{m.labelChanged(z,c),Graph.isLink(c)&&m.setLinkForCell(z,c)}finally{m.model.endUpdate()}}m.setSelectionCell(z)}else n=m.getInsertPoint(),m.isMouseInsertPoint()&&(z=0,m.lastPasteXml==c&&0<m.pasteCounter&&m.pasteCounter--),n=this.insertTextAt(c,n.x+z,n.y+z,!0),m.setSelectionCells(n);m.isSelectionEmpty()||(m.scrollCellToVisible(m.getSelectionCell()), -null!=this.hoverIcons&&this.hoverIcons.update(m.view.getState(m.getSelectionCell())));return n};EditorUi.prototype.pasteCells=function(c,e,g,q){if(!mxEvent.isConsumed(c)){var m=e,n=!1;if(g&&null!=c.clipboardData&&c.clipboardData.getData){var z=c.clipboardData.getData("text/plain"),C=!1;if(null!=z&&0<z.length&&"%3CmxGraphModel%3E"==z.substring(0,18))try{var v=decodeURIComponent(z);this.isCompatibleString(v)&&(C=!0,z=v)}catch(F){}C=C?null:c.clipboardData.getData("text/html");null!=C&&0<C.length?(m= -this.parseHtmlData(C),n="text/plain"!=m.getAttribute("data-type")):null!=z&&0<z.length&&(m=document.createElement("div"),mxUtils.setTextContent(m,C))}z=m.getElementsByTagName("span");if(null!=z&&0<z.length&&"application/vnd.lucid.chart.objects"===z[0].getAttribute("data-lucid-type"))g=z[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(F){var J=this.editor.graph;J.lastPasteXml==F?J.pasteCounter++:(J.lastPasteXml=F,J.pasteCounter=0);var M= -J.pasteCounter*J.gridSize;J.setSelectionCells(this.importXml(F,M,M));J.scrollCellToVisible(J.getSelectionCell())}),mxUtils.bind(this,function(F){this.handleError(F)})),mxEvent.consume(c));else{var y=n?m.innerHTML:mxUtils.trim(null==m.innerText?mxUtils.getTextContent(m):m.innerText),I=!1;try{var N=y.lastIndexOf("%3E");0<=N&&N<y.length-3&&(y=y.substring(0,N+3))}catch(F){}try{z=m.getElementsByTagName("span"),(v=null!=z&&0<z.length?mxUtils.trim(decodeURIComponent(z[0].textContent)):decodeURIComponent(y))&& -(this.isCompatibleString(v)||0==v.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(I=!0,y=v)}catch(F){}try{if(null!=y&&0<y.length){if(0==y.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var t=mxUtils.bind(this,function(){try{y=(new MiroImporter).importMiroJson(JSON.parse(y)),this.pasteXml(y,q,I,c)}catch(F){console.log("Miro import error:",F)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",t):t()}else this.pasteXml(y,q,I,c);try{mxEvent.consume(c)}catch(F){}}else if(!g){var p= -this.editor.graph;p.lastPasteXml=null;p.pasteCounter=0}}catch(F){this.handleError(F)}}}e.innerHTML=" "};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var e=null,g=0;g<c.length;g++)mxEvent.addListener(c[g],"dragleave",function(q){null!=e&&(e.parentNode.removeChild(e),e=null);q.stopPropagation();q.preventDefault()}),mxEvent.addListener(c[g],"dragover",mxUtils.bind(this,function(q){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==e&&(!mxClient.IS_IE||10< -document.documentMode&&12>document.documentMode)&&(e=this.highlightElement());q.stopPropagation();q.preventDefault()})),mxEvent.addListener(c[g],"drop",mxUtils.bind(this,function(q){null!=e&&(e.parentNode.removeChild(e),e=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<q.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(q.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(q)&&!mxEvent.isShiftDown(q)):this.openFiles(q.dataTransfer.files, +null!=this.hoverIcons&&this.hoverIcons.update(m.view.getState(m.getSelectionCell())));return n};EditorUi.prototype.pasteCells=function(c,d,g,q){if(!mxEvent.isConsumed(c)){var m=d,n=!1;if(g&&null!=c.clipboardData&&c.clipboardData.getData){var z=c.clipboardData.getData("text/plain"),C=!1;if(null!=z&&0<z.length&&"%3CmxGraphModel%3E"==z.substring(0,18))try{var x=decodeURIComponent(z);this.isCompatibleString(x)&&(C=!0,z=x)}catch(F){}C=C?null:c.clipboardData.getData("text/html");null!=C&&0<C.length?(m= +this.parseHtmlData(C),n="text/plain"!=m.getAttribute("data-type")):null!=z&&0<z.length&&(m=document.createElement("div"),mxUtils.setTextContent(m,C))}z=m.getElementsByTagName("span");if(null!=z&&0<z.length&&"application/vnd.lucid.chart.objects"===z[0].getAttribute("data-lucid-type"))g=z[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(F){var K=this.editor.graph;K.lastPasteXml==F?K.pasteCounter++:(K.lastPasteXml=F,K.pasteCounter=0);var D= +K.pasteCounter*K.gridSize;K.setSelectionCells(this.importXml(F,D,D));K.scrollCellToVisible(K.getSelectionCell())}),mxUtils.bind(this,function(F){this.handleError(F)})),mxEvent.consume(c));else{var y=n?m.innerHTML:mxUtils.trim(null==m.innerText?mxUtils.getTextContent(m):m.innerText),I=!1;try{var N=y.lastIndexOf("%3E");0<=N&&N<y.length-3&&(y=y.substring(0,N+3))}catch(F){}try{z=m.getElementsByTagName("span"),(x=null!=z&&0<z.length?mxUtils.trim(decodeURIComponent(z[0].textContent)):decodeURIComponent(y))&& +(this.isCompatibleString(x)||0==x.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(I=!0,y=x)}catch(F){}try{if(null!=y&&0<y.length){if(0==y.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var t=mxUtils.bind(this,function(){try{y=(new MiroImporter).importMiroJson(JSON.parse(y)),this.pasteXml(y,q,I,c)}catch(F){console.log("Miro import error:",F)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",t):t()}else this.pasteXml(y,q,I,c);try{mxEvent.consume(c)}catch(F){}}else if(!g){var p= +this.editor.graph;p.lastPasteXml=null;p.pasteCounter=0}}catch(F){this.handleError(F)}}}d.innerHTML=" "};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var d=null,g=0;g<c.length;g++)mxEvent.addListener(c[g],"dragleave",function(q){null!=d&&(d.parentNode.removeChild(d),d=null);q.stopPropagation();q.preventDefault()}),mxEvent.addListener(c[g],"dragover",mxUtils.bind(this,function(q){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==d&&(!mxClient.IS_IE||10< +document.documentMode&&12>document.documentMode)&&(d=this.highlightElement());q.stopPropagation();q.preventDefault()})),mxEvent.addListener(c[g],"drop",mxUtils.bind(this,function(q){null!=d&&(d.parentNode.removeChild(d),d=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<q.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(q.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(q)&&!mxEvent.isShiftDown(q)):this.openFiles(q.dataTransfer.files, !0);else{var m=this.extractGraphModelFromEvent(q);if(null==m){var n=null!=q.dataTransfer?q.dataTransfer:q.clipboardData;null!=n&&(10==document.documentMode||11==document.documentMode?m=n.getData("Text"):(m=null,m=0<=mxUtils.indexOf(n.types,"text/uri-list")?q.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(n.types,"text/html")?n.getData("text/html"):null,null!=m&&0<m.length?(n=document.createElement("div"),n.innerHTML=this.editor.graph.sanitizeHtml(m),n=n.getElementsByTagName("img"),0<n.length&& (m=n[0].getAttribute("src"))):0<=mxUtils.indexOf(n.types,"text/plain")&&(m=n.getData("text/plain"))),null!=m&&(Editor.isPngDataUrl(m)?(m=Editor.extractGraphModelFromPng(m),null!=m&&0<m.length&&this.openLocalFile(m,null,!0)):this.isRemoteFileFormat(m)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(m))).send(mxUtils.bind(this,function(z){200<=z.getStatus()&&299>=z.getStatus()&&this.openLocalFile(z.getText(), -null,!0)})):/^https?:\/\//.test(m)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(m):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(m)))))}else this.openLocalFile(m,null,!0)}q.stopPropagation();q.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var e=0,g=0;if(null==c){var q=document.body;var m=document.documentElement;var n=(q.clientWidth||m.clientWidth)-3;q= -Math.max(q.clientHeight||0,m.clientHeight)-3}else e=c.offsetTop,g=c.offsetLeft,n=c.clientWidth,q=c.clientHeight;m=document.createElement("div");m.style.zIndex=mxPopupMenu.prototype.zIndex+2;m.style.border="3px dotted rgb(254, 137, 12)";m.style.pointerEvents="none";m.style.position="absolute";m.style.top=e+"px";m.style.left=g+"px";m.style.width=Math.max(0,n-3)+"px";m.style.height=Math.max(0,q-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(m):document.body.appendChild(m); -return m};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var e=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=e){var g=new mxCodec(e.ownerDocument),q=new mxGraphModel;g.decode(e,q);e=q.getChildAt(q.getRoot(),0);for(g=0;g<q.getChildCount(e);g++)c.push(q.getChildAt(e,g))}return c};EditorUi.prototype.openFileHandle=function(c,e,g,q,m){if(null!=e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)?e=e.substring(0,e.length-4)+".drawio":/(\.pdf)$/i.test(e)&&(e= -e.substring(0,e.length-4)+".drawio");var n=mxUtils.bind(this,function(C){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".drawio":e+".drawio";if("<mxlibrary"==C.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,q);try{this.loadLibrary(new LocalLibrary(this,C,e))}catch(v){this.handleError(v,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(C,e,q)});if(/(\.v(dx|sdx?))($|\?)/i.test(e)||/(\.vs(x|sx?))($|\?)/i.test(e))this.importVisio(g, -mxUtils.bind(this,function(C){this.spinner.stop();n(C)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(C){this.spinner.stop();n(C)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,e))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(C){4==C.readyState&&(this.spinner.stop(),200<=C.status&&299>=C.status?n(C.responseText):this.handleError({message:mxResources.get(413== -C.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(C){this.spinner.stop();this.openLocalFile(C,e,q)}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}));else if("<mxlibrary"==c.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml, -this.defaultFilename,q);try{this.loadLibrary(new LocalLibrary(this,c,g.name))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}else if(0==c.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(C){this.spinner.stop();n(C)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,e,q)}));else{if("image/png"==g.type.substring(0,9))c=this.extractGraphModelFromPng(c);else if("application/pdf"==g.type){var z=Editor.extractGraphModelFromPdf(c);null!=z&&(m=null,q=!0, -c=z)}this.spinner.stop();this.openLocalFile(c,e,q,m,null!=m?g:null)}}};EditorUi.prototype.openFiles=function(c,e){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<c.length;g++)mxUtils.bind(this,function(q){var m=new FileReader;m.onload=mxUtils.bind(this,function(n){try{this.openFileHandle(n.target.result,q.name,q,e)}catch(z){this.handleError(z)}});m.onerror=mxUtils.bind(this,function(n){this.spinner.stop();this.handleError(n);window.openFile=null});"image"!==q.type.substring(0, -5)&&"application/pdf"!==q.type||"image/svg"===q.type.substring(0,9)?m.readAsText(q):m.readAsDataURL(q)})(c[g])};EditorUi.prototype.openLocalFile=function(c,e,g,q,m){var n=this.getCurrentFile(),z=mxUtils.bind(this,function(){window.openFile=null;if(null==e&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var C=mxUtils.parseXml(c);null!=C&&(this.editor.setGraphXml(C.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,c,e||this.defaultFilename,g,q,m))});if(null!= -c&&0<c.length)null==n||!n.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=q)?z():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=q)&&null!=n&&n.isModified()?this.confirm(mxResources.get("allChangesLost"),null,z,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,e),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=n&&n.isModified()?this.confirm(mxResources.get("allChangesLost"), -null,z,mxResources.get("cancel"),mxResources.get("discardChanges")):z()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var e=0;e<this.pages.length;e++)this.updatePageRoot(this.pages[e]),this.addBasenamesForCell(this.pages[e].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);e=[];for(var g in c)e.push(g);return e};EditorUi.prototype.addBasenamesForCell=function(c,e){function g(z){if(null!= -z){var C=z.lastIndexOf(".");0<C&&(z=z.substring(C+1,z.length));null==e[z]&&(e[z]=!0)}}var q=this.editor.graph,m=q.getCellStyle(c);g(mxStencilRegistry.getBasenameForStencil(m[mxConstants.STYLE_SHAPE]));q.model.isEdge(c)&&(g(mxMarker.getPackageForType(m[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(m[mxConstants.STYLE_ENDARROW])));m=q.model.getChildCount(c);for(var n=0;n<m;n++)this.addBasenamesForCell(q.model.getChildAt(c,n),e)};EditorUi.prototype.setGraphEnabled=function(c){this.diagramContainer.style.visibility= +null,!0)})):/^https?:\/\//.test(m)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(m):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(m)))))}else this.openLocalFile(m,null,!0)}q.stopPropagation();q.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var d=0,g=0;if(null==c){var q=document.body;var m=document.documentElement;var n=(q.clientWidth||m.clientWidth)-3;q= +Math.max(q.clientHeight||0,m.clientHeight)-3}else d=c.offsetTop,g=c.offsetLeft,n=c.clientWidth,q=c.clientHeight;m=document.createElement("div");m.style.zIndex=mxPopupMenu.prototype.zIndex+2;m.style.border="3px dotted rgb(254, 137, 12)";m.style.pointerEvents="none";m.style.position="absolute";m.style.top=d+"px";m.style.left=g+"px";m.style.width=Math.max(0,n-3)+"px";m.style.height=Math.max(0,q-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(m):document.body.appendChild(m); +return m};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var d=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=d){var g=new mxCodec(d.ownerDocument),q=new mxGraphModel;g.decode(d,q);d=q.getChildAt(q.getRoot(),0);for(g=0;g<q.getChildCount(d);g++)c.push(q.getChildAt(d,g))}return c};EditorUi.prototype.openFileHandle=function(c,d,g,q,m){if(null!=d&&0<d.length){!this.useCanvasForExport&&/(\.png)$/i.test(d)?d=d.substring(0,d.length-4)+".drawio":/(\.pdf)$/i.test(d)&&(d= +d.substring(0,d.length-4)+".drawio");var n=mxUtils.bind(this,function(C){d=0<=d.lastIndexOf(".")?d.substring(0,d.lastIndexOf("."))+".drawio":d+".drawio";if("<mxlibrary"==C.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,q);try{this.loadLibrary(new LocalLibrary(this,C,d))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(C,d,q)});if(/(\.v(dx|sdx?))($|\?)/i.test(d)||/(\.vs(x|sx?))($|\?)/i.test(d))this.importVisio(g, +mxUtils.bind(this,function(C){this.spinner.stop();n(C)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(C){this.spinner.stop();n(C)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,d))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(C){4==C.readyState&&(this.spinner.stop(),200<=C.status&&299>=C.status?n(C.responseText):this.handleError({message:mxResources.get(413== +C.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(d)&&(d=d.substring(0,d.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(C){this.spinner.stop();this.openLocalFile(C,d,q)}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}));else if("<mxlibrary"==c.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml, +this.defaultFilename,q);try{this.loadLibrary(new LocalLibrary(this,c,g.name))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}else if(0==c.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(C){this.spinner.stop();n(C)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,d,q)}));else{if("image/png"==g.type.substring(0,9))c=this.extractGraphModelFromPng(c);else if("application/pdf"==g.type){var z=Editor.extractGraphModelFromPdf(c);null!=z&&(m=null,q=!0, +c=z)}this.spinner.stop();this.openLocalFile(c,d,q,m,null!=m?g:null)}}};EditorUi.prototype.openFiles=function(c,d){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<c.length;g++)mxUtils.bind(this,function(q){var m=new FileReader;m.onload=mxUtils.bind(this,function(n){try{this.openFileHandle(n.target.result,q.name,q,d)}catch(z){this.handleError(z)}});m.onerror=mxUtils.bind(this,function(n){this.spinner.stop();this.handleError(n);window.openFile=null});"image"!==q.type.substring(0, +5)&&"application/pdf"!==q.type||"image/svg"===q.type.substring(0,9)?m.readAsText(q):m.readAsDataURL(q)})(c[g])};EditorUi.prototype.openLocalFile=function(c,d,g,q,m){var n=this.getCurrentFile(),z=mxUtils.bind(this,function(){window.openFile=null;if(null==d&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var C=mxUtils.parseXml(c);null!=C&&(this.editor.setGraphXml(C.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,c,d||this.defaultFilename,g,q,m))});if(null!= +c&&0<c.length)null==n||!n.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=q)?z():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=q)&&null!=n&&n.isModified()?this.confirm(mxResources.get("allChangesLost"),null,z,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,d),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=n&&n.isModified()?this.confirm(mxResources.get("allChangesLost"), +null,z,mxResources.get("cancel"),mxResources.get("discardChanges")):z()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var d=0;d<this.pages.length;d++)this.updatePageRoot(this.pages[d]),this.addBasenamesForCell(this.pages[d].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);d=[];for(var g in c)d.push(g);return d};EditorUi.prototype.addBasenamesForCell=function(c,d){function g(z){if(null!= +z){var C=z.lastIndexOf(".");0<C&&(z=z.substring(C+1,z.length));null==d[z]&&(d[z]=!0)}}var q=this.editor.graph,m=q.getCellStyle(c);g(mxStencilRegistry.getBasenameForStencil(m[mxConstants.STYLE_SHAPE]));q.model.isEdge(c)&&(g(mxMarker.getPackageForType(m[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(m[mxConstants.STYLE_ENDARROW])));m=q.model.getChildCount(c);for(var n=0;n<m;n++)this.addBasenamesForCell(q.model.getChildAt(c,n),d)};EditorUi.prototype.setGraphEnabled=function(c){this.diagramContainer.style.visibility= c?"":"hidden";this.formatContainer.style.visibility=c?"":"hidden";this.sidebarFooterContainer.style.display=c?"":"none";this.sidebarContainer.style.display=c?"":"none";this.hsplit.style.display=c?"":"none";this.editor.graph.setEnabled(c);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=c?"":"hidden",this.ruler.vRuler.container.style.visibility=c?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=c?"":"hidden");c||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1), null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var c= -!1;this.installMessageHandler(mxUtils.bind(this,function(e,g,q,m){c||(c=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==e||0==e.length)e=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,e,{}));this.mode=App.MODE_EMBED;this.setFileData(e);if(m)try{var n=this.editor.graph;n.setGridEnabled(!1);n.pageVisible=!1;var z=n.model.cells,C;for(C in z){var v=z[C];null!=v&&null!=v.style&&(v.style+=";sketch=1;"+(-1==v.style.indexOf("fontFamily=")||-1<v.style.indexOf("fontFamily=Helvetica;")? +!1;this.installMessageHandler(mxUtils.bind(this,function(d,g,q,m){c||(c=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==d||0==d.length)d=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,d,{}));this.mode=App.MODE_EMBED;this.setFileData(d);if(m)try{var n=this.editor.graph;n.setGridEnabled(!1);n.pageVisible=!1;var z=n.model.cells,C;for(C in z){var x=z[C];null!=x&&null!=x.style&&(x.style+=";sketch=1;"+(-1==x.style.indexOf("fontFamily=")||-1<x.style.indexOf("fontFamily=Helvetica;")? "fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(y){console.log(y)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=q?q:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog= -function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(c,e){null!=c?c.getPublicUrl(e):e(null)};EditorUi.prototype.createLoadMessage=function(c){var e=this.editor.graph;return{event:c,pageVisible:e.pageVisible,translate:e.view.translate,bounds:e.getGraphBounds(),currentPage:this.getSelectedPageIndex(), -scale:e.view.scale,page:e.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){var e=this.editor.graph;e.isEditing()&&e.stopEditing(!e.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var q=e.background;if(null==q||q==mxConstants.NONE)q=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),e,null,!0,mxUtils.bind(this,function(m){g.postMessage(JSON.stringify({event:"export", -point:this.embedExitPoint,exit:null!=c?!c:!0,data:Editor.createSvgDataUri(m)}),"*")}),null,null,!0,q,1,this.embedExportBorder)}else c||g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,e.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler= -function(c){var e=null,g=!1,q=!1,m=null,n=mxUtils.bind(this,function(v,y){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,n);mxEvent.addListener(window,"message",mxUtils.bind(this,function(v){if(v.source==(window.opener||window.parent)){var y=v.data,I=null,N=mxUtils.bind(this,function(Y){if(null!=Y&&"function"===typeof Y.charAt&& -"<"!=Y.charAt(0))try{Editor.isPngDataUrl(Y)?Y=Editor.extractGraphModelFromPng(Y):"data:image/svg+xml;base64,"==Y.substring(0,26)?Y=atob(Y.substring(26)):"data:image/svg+xml;utf8,"==Y.substring(0,24)&&(Y=Y.substring(24)),null!=Y&&("%"==Y.charAt(0)?Y=decodeURIComponent(Y):"<"!=Y.charAt(0)&&(Y=Graph.decompress(Y)))}catch(Z){}return Y});if("json"==urlParams.proto){var t=!1;try{y=JSON.parse(y),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[v],"data",[y])}catch(Y){y=null}try{if(null==y)return; +function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(c,d){null!=c?c.getPublicUrl(d):d(null)};EditorUi.prototype.createLoadMessage=function(c){var d=this.editor.graph;return{event:c,pageVisible:d.pageVisible,translate:d.view.translate,bounds:d.getGraphBounds(),currentPage:this.getSelectedPageIndex(), +scale:d.view.scale,page:d.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){var d=this.editor.graph;d.isEditing()&&d.stopEditing(!d.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var q=d.background;if(null==q||q==mxConstants.NONE)q=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),d,null,!0,mxUtils.bind(this,function(m){g.postMessage(JSON.stringify({event:"export", +point:this.embedExitPoint,exit:null!=c?!c:!0,data:Editor.createSvgDataUri(m)}),"*")}),null,null,!0,q,1,this.embedExportBorder)}else c||g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,d.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler= +function(c){var d=null,g=!1,q=!1,m=null,n=mxUtils.bind(this,function(x,y){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,n);mxEvent.addListener(window,"message",mxUtils.bind(this,function(x){if(x.source==(window.opener||window.parent)){var y=x.data,I=null,N=mxUtils.bind(this,function(Y){if(null!=Y&&"function"===typeof Y.charAt&& +"<"!=Y.charAt(0))try{Editor.isPngDataUrl(Y)?Y=Editor.extractGraphModelFromPng(Y):"data:image/svg+xml;base64,"==Y.substring(0,26)?Y=atob(Y.substring(26)):"data:image/svg+xml;utf8,"==Y.substring(0,24)&&(Y=Y.substring(24)),null!=Y&&("%"==Y.charAt(0)?Y=decodeURIComponent(Y):"<"!=Y.charAt(0)&&(Y=Graph.decompress(Y)))}catch(Z){}return Y});if("json"==urlParams.proto){var t=!1;try{y=JSON.parse(y),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[x],"data",[y])}catch(Y){y=null}try{if(null==y)return; if("dialog"==y.action){this.showError(null!=y.titleKey?mxResources.get(y.titleKey):y.title,null!=y.messageKey?mxResources.get(y.messageKey):y.message,null!=y.buttonKey?mxResources.get(y.buttonKey):y.button);null!=y.modified&&(this.editor.modified=y.modified);return}if("layout"==y.action){this.executeLayouts(this.editor.graph.createLayouts(y.layouts));return}if("prompt"==y.action){this.spinner.stop();var p=new FilenameDialog(this,y.defaultValue||"",null!=y.okKey?mxResources.get(y.okKey):y.ok,function(Y){null!= Y?z.postMessage(JSON.stringify({event:"prompt",value:Y,message:y}),"*"):z.postMessage(JSON.stringify({event:"prompt-cancel",message:y}),"*")},null!=y.titleKey?mxResources.get(y.titleKey):y.title);this.showDialog(p.container,300,80,!0,!1);p.init();return}if("draft"==y.action){var F=N(y.xml);this.spinner.stop();p=new DraftDialog(this,mxResources.get("draftFound",[y.name||this.defaultFilename]),F,mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"edit", message:y}),"*")}),mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"discard",message:y}),"*")}),y.editKey?mxResources.get(y.editKey):null,y.discardKey?mxResources.get(y.discardKey):null,y.ignore?mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"ignore",message:y}),"*")}):null);this.showDialog(p.container,640,480,!0,!1,mxUtils.bind(this,function(Y){Y&&this.actions.get("exit").funct()}));try{p.init()}catch(Y){z.postMessage(JSON.stringify({event:"draft", -error:Y.toString(),message:y}),"*")}return}if("template"==y.action){this.spinner.stop();var J=1==y.enableRecent,M=1==y.enableSearch,H=1==y.enableCustomTemp;if("1"==urlParams.newTempDlg&&!y.templatesOnly&&null!=y.callback){var G=this.getCurrentUser(),E=new TemplatesDialog(this,function(Y,Z,ca){Y=Y||this.emptyDiagramXml;z.postMessage(JSON.stringify({event:"template",xml:Y,blank:Y==this.emptyDiagramXml,name:Z,tempUrl:ca.url,libs:ca.libs,builtIn:null!=ca.info&&null!=ca.info.custContentId,message:y}), -"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=G?G.id:null,J?mxUtils.bind(this,function(Y,Z,ca){this.remoteInvoke("getRecentDiagrams",[ca],null,Y,Z)}):null,M?mxUtils.bind(this,function(Y,Z,ca,fa){this.remoteInvoke("searchDiagrams",[Y,fa],null,Z,ca)}):null,mxUtils.bind(this,function(Y,Z,ca){this.remoteInvoke("getFileContent",[Y.url],null,Z,ca)}),null,H?mxUtils.bind(this,function(Y){this.remoteInvoke("getCustomTemplates",null,null,Y,function(){Y({},0)})}):null, -!1,!1,!0,!0);this.showDialog(E.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}p=new NewDialog(this,!1,y.templatesOnly?!1:null!=y.callback,mxUtils.bind(this,function(Y,Z,ca,fa){Y=Y||this.emptyDiagramXml;null!=y.callback?z.postMessage(JSON.stringify({event:"template",xml:Y,blank:Y==this.emptyDiagramXml,name:Z,tempUrl:ca,libs:fa,builtIn:!0,message:y}),"*"):(c(Y,v,Y!=this.emptyDiagramXml,y.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null, -null,J?mxUtils.bind(this,function(Y){this.remoteInvoke("getRecentDiagrams",[null],null,Y,function(){Y(null,"Network Error!")})}):null,M?mxUtils.bind(this,function(Y,Z){this.remoteInvoke("searchDiagrams",[Y,null],null,Z,function(){Z(null,"Network Error!")})}):null,mxUtils.bind(this,function(Y,Z,ca){z.postMessage(JSON.stringify({event:"template",docUrl:Y,info:Z,name:ca}),"*")}),null,null,H?mxUtils.bind(this,function(Y){this.remoteInvoke("getCustomTemplates",null,null,Y,function(){Y({},0)})}):null,1== +error:Y.toString(),message:y}),"*")}return}if("template"==y.action){this.spinner.stop();var K=1==y.enableRecent,D=1==y.enableSearch,H=1==y.enableCustomTemp;if("1"==urlParams.newTempDlg&&!y.templatesOnly&&null!=y.callback){var J=this.getCurrentUser(),G=new TemplatesDialog(this,function(Y,Z,ba){Y=Y||this.emptyDiagramXml;z.postMessage(JSON.stringify({event:"template",xml:Y,blank:Y==this.emptyDiagramXml,name:Z,tempUrl:ba.url,libs:ba.libs,builtIn:null!=ba.info&&null!=ba.info.custContentId,message:y}), +"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=J?J.id:null,K?mxUtils.bind(this,function(Y,Z,ba){this.remoteInvoke("getRecentDiagrams",[ba],null,Y,Z)}):null,D?mxUtils.bind(this,function(Y,Z,ba,ha){this.remoteInvoke("searchDiagrams",[Y,ha],null,Z,ba)}):null,mxUtils.bind(this,function(Y,Z,ba){this.remoteInvoke("getFileContent",[Y.url],null,Z,ba)}),null,H?mxUtils.bind(this,function(Y){this.remoteInvoke("getCustomTemplates",null,null,Y,function(){Y({},0)})}):null, +!1,!1,!0,!0);this.showDialog(G.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}p=new NewDialog(this,!1,y.templatesOnly?!1:null!=y.callback,mxUtils.bind(this,function(Y,Z,ba,ha){Y=Y||this.emptyDiagramXml;null!=y.callback?z.postMessage(JSON.stringify({event:"template",xml:Y,blank:Y==this.emptyDiagramXml,name:Z,tempUrl:ba,libs:ha,builtIn:!0,message:y}),"*"):(c(Y,x,Y!=this.emptyDiagramXml,y.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null, +null,K?mxUtils.bind(this,function(Y){this.remoteInvoke("getRecentDiagrams",[null],null,Y,function(){Y(null,"Network Error!")})}):null,D?mxUtils.bind(this,function(Y,Z){this.remoteInvoke("searchDiagrams",[Y,null],null,Z,function(){Z(null,"Network Error!")})}):null,mxUtils.bind(this,function(Y,Z,ba){z.postMessage(JSON.stringify({event:"template",docUrl:Y,info:Z,name:ba}),"*")}),null,null,H?mxUtils.bind(this,function(Y){this.remoteInvoke("getCustomTemplates",null,null,Y,function(){Y({},0)})}):null,1== y.withoutType);this.showDialog(p.container,620,460,!0,!1,mxUtils.bind(this,function(Y){this.sidebar.hideTooltip();Y&&this.actions.get("exit").funct()}));p.init();return}if("textContent"==y.action){var P=this.getDiagramTextContent();z.postMessage(JSON.stringify({event:"textContent",data:P,message:y}),"*");return}if("status"==y.action){null!=y.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(y.messageKey))):null!=y.message&&this.editor.setStatus(mxUtils.htmlEntities(y.message)); null!=y.modified&&(this.editor.modified=y.modified);return}if("spinner"==y.action){var T=null!=y.messageKey?mxResources.get(y.messageKey):y.message;null==y.show||y.show?this.spinner.spin(document.body,T):this.spinner.stop();return}if("exit"==y.action){this.actions.get("exit").funct();return}if("viewport"==y.action){null!=y.viewport&&(this.embedViewport=y.viewport);return}if("snapshot"==y.action){this.sendEmbeddedSvgExport(!0);return}if("export"==y.action){if("png"==y.format||"xmlpng"==y.format){if(null== y.spin&&null==y.spinKey||this.spinner.spin(document.body,null!=y.spinKey?mxResources.get(y.spinKey):y.spin)){var W=null!=y.xml?y.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var U=this.editor.graph,V=mxUtils.bind(this,function(Y){this.editor.graph.setEnabled(!0);this.spinner.stop();var Z=this.createLoadMessage("export");Z.format=y.format;Z.message=y;Z.data=Y;Z.xml=W;z.postMessage(JSON.stringify(Z),"*")}),l=mxUtils.bind(this,function(Y){null==Y&&(Y=Editor.blankImage);"xmlpng"==y.format&& -(Y=Editor.writeGraphModelToPng(Y,"tEXt","mxfile",encodeURIComponent(W)));U!=this.editor.graph&&U.container.parentNode.removeChild(U.container);V(Y)}),A=y.pageId||(null!=this.pages?y.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var L=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=A){var Y=U.getGlobalVariable;U=this.createTemporaryGraph(U.getStylesheet());for(var Z,ca=0;ca<this.pages.length;ca++)if(this.pages[ca].getId()== -A){Z=this.updatePageRoot(this.pages[ca]);break}null==Z&&(Z=this.currentPage);U.getGlobalVariable=function(qa){return"page"==qa?Z.getName():"pagenumber"==qa?1:Y.apply(this,arguments)};document.body.appendChild(U.container);U.model.setRoot(Z.root)}if(null!=y.layerIds){var fa=U.model,la=fa.getChildCells(fa.getRoot()),ia={};for(ca=0;ca<y.layerIds.length;ca++)ia[y.layerIds[ca]]=!0;for(ca=0;ca<la.length;ca++)fa.setVisible(la[ca],ia[la[ca].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(qa){l(qa.toDataURL("image/png"))}), -y.width,null,y.background,mxUtils.bind(this,function(){l(null)}),null,null,y.scale,y.transparent,y.shadow,null,U,y.border,null,y.grid,y.keepTheme)});null!=y.xml&&0<y.xml.length&&(g=!0,this.setFileData(W),g=!1);L()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==y.format?"1":"0")+(null!=A?"&pageId="+A:"")+(null!=y.layerIds&&0<y.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:y.layerIds})):"")+(null!=y.scale?"&scale="+y.scale:"")+"&base64=1&xml="+encodeURIComponent(W))).send(mxUtils.bind(this, -function(Y){200<=Y.getStatus()&&299>=Y.getStatus()?V("data:image/png;base64,"+Y.getText()):l(null)}),mxUtils.bind(this,function(){l(null)}))}}else if(L=mxUtils.bind(this,function(){var Y=this.createLoadMessage("export");Y.message=y;if("html2"==y.format||"html"==y.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Z=this.getXmlFileData();Y.xml=mxUtils.getXml(Z);Y.data=this.getFileData(null,null,!0,null,null,null,Z);Y.format=y.format}else if("html"==y.format)Z=this.editor.getGraphXml(), -Y.data=this.getHtml(Z,this.editor.graph),Y.xml=mxUtils.getXml(Z),Y.format=y.format;else{mxSvgCanvas2D.prototype.foAltText=null;Z=null!=y.background?y.background:this.editor.graph.background;Z==mxConstants.NONE&&(Z=null);Y.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);Y.format="svg";var ca=mxUtils.bind(this,function(fa){this.editor.graph.setEnabled(!0);this.spinner.stop();Y.data=Editor.createSvgDataUri(fa);z.postMessage(JSON.stringify(Y),"*")});if("xmlsvg"==y.format)(null==y.spin&& -null==y.spinKey||this.spinner.spin(document.body,null!=y.spinKey?mxResources.get(y.spinKey):y.spin))&&this.getEmbeddedSvg(Y.xml,this.editor.graph,null,!0,ca,null,null,y.embedImages,Z,y.scale,y.border,y.shadow,y.keepTheme);else if(null==y.spin&&null==y.spinKey||this.spinner.spin(document.body,null!=y.spinKey?mxResources.get(y.spinKey):y.spin))this.editor.graph.setEnabled(!1),Z=this.editor.graph.getSvg(Z,y.scale,y.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||y.shadow,null,y.keepTheme), -(this.editor.graph.shadowVisible||y.shadow)&&this.editor.graph.addSvgShadow(Z),this.embedFonts(Z,mxUtils.bind(this,function(fa){y.embedImages||null==y.embedImages?this.editor.convertImages(fa,mxUtils.bind(this,function(la){ca(mxUtils.getXml(la))})):ca(mxUtils.getXml(fa))}));return}z.postMessage(JSON.stringify(Y),"*")}),null!=y.xml&&0<y.xml.length){if(this.editor.graph.mathEnabled){var Q=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){Q.apply(this,arguments);L()}}g=!0;this.setFileData(y.xml); -g=!1;this.editor.graph.mathEnabled||L()}else L();return}if("load"==y.action){t=y.toSketch;q=1==y.autosave;this.hideDialog();null!=y.modified&&null==urlParams.modified&&(urlParams.modified=y.modified);null!=y.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=y.saveAndExit);null!=y.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=y.noSaveBtn);if(null!=y.rough){var O=Editor.sketchMode;this.doSetSketchMode(y.rough);O!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!= +(Y=Editor.writeGraphModelToPng(Y,"tEXt","mxfile",encodeURIComponent(W)));U!=this.editor.graph&&U.container.parentNode.removeChild(U.container);V(Y)}),A=y.pageId||(null!=this.pages?y.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var M=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=A){var Y=U.getGlobalVariable;U=this.createTemporaryGraph(U.getStylesheet());for(var Z,ba=0;ba<this.pages.length;ba++)if(this.pages[ba].getId()== +A){Z=this.updatePageRoot(this.pages[ba]);break}null==Z&&(Z=this.currentPage);U.getGlobalVariable=function(qa){return"page"==qa?Z.getName():"pagenumber"==qa?1:Y.apply(this,arguments)};document.body.appendChild(U.container);U.model.setRoot(Z.root)}if(null!=y.layerIds){var ha=U.model,ma=ha.getChildCells(ha.getRoot()),ia={};for(ba=0;ba<y.layerIds.length;ba++)ia[y.layerIds[ba]]=!0;for(ba=0;ba<ma.length;ba++)ha.setVisible(ma[ba],ia[ma[ba].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(qa){l(qa.toDataURL("image/png"))}), +y.width,null,y.background,mxUtils.bind(this,function(){l(null)}),null,null,y.scale,y.transparent,y.shadow,null,U,y.border,null,y.grid,y.keepTheme)});null!=y.xml&&0<y.xml.length&&(g=!0,this.setFileData(W),g=!1);M()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==y.format?"1":"0")+(null!=A?"&pageId="+A:"")+(null!=y.layerIds&&0<y.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:y.layerIds})):"")+(null!=y.scale?"&scale="+y.scale:"")+"&base64=1&xml="+encodeURIComponent(W))).send(mxUtils.bind(this, +function(Y){200<=Y.getStatus()&&299>=Y.getStatus()?V("data:image/png;base64,"+Y.getText()):l(null)}),mxUtils.bind(this,function(){l(null)}))}}else if(M=mxUtils.bind(this,function(){var Y=this.createLoadMessage("export");Y.message=y;if("html2"==y.format||"html"==y.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Z=this.getXmlFileData();Y.xml=mxUtils.getXml(Z);Y.data=this.getFileData(null,null,!0,null,null,null,Z);Y.format=y.format}else if("html"==y.format)Z=this.editor.getGraphXml(), +Y.data=this.getHtml(Z,this.editor.graph),Y.xml=mxUtils.getXml(Z),Y.format=y.format;else{mxSvgCanvas2D.prototype.foAltText=null;Z=null!=y.background?y.background:this.editor.graph.background;Z==mxConstants.NONE&&(Z=null);Y.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);Y.format="svg";var ba=mxUtils.bind(this,function(ha){this.editor.graph.setEnabled(!0);this.spinner.stop();Y.data=Editor.createSvgDataUri(ha);z.postMessage(JSON.stringify(Y),"*")});if("xmlsvg"==y.format)(null==y.spin&& +null==y.spinKey||this.spinner.spin(document.body,null!=y.spinKey?mxResources.get(y.spinKey):y.spin))&&this.getEmbeddedSvg(Y.xml,this.editor.graph,null,!0,ba,null,null,y.embedImages,Z,y.scale,y.border,y.shadow,y.keepTheme);else if(null==y.spin&&null==y.spinKey||this.spinner.spin(document.body,null!=y.spinKey?mxResources.get(y.spinKey):y.spin))this.editor.graph.setEnabled(!1),Z=this.editor.graph.getSvg(Z,y.scale,y.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||y.shadow,null,y.keepTheme), +(this.editor.graph.shadowVisible||y.shadow)&&this.editor.graph.addSvgShadow(Z),this.embedFonts(Z,mxUtils.bind(this,function(ha){y.embedImages||null==y.embedImages?this.editor.convertImages(ha,mxUtils.bind(this,function(ma){ba(mxUtils.getXml(ma))})):ba(mxUtils.getXml(ha))}));return}z.postMessage(JSON.stringify(Y),"*")}),null!=y.xml&&0<y.xml.length){if(this.editor.graph.mathEnabled){var Q=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){Q.apply(this,arguments);M()}}g=!0;this.setFileData(y.xml); +g=!1;this.editor.graph.mathEnabled||M()}else M();return}if("load"==y.action){t=y.toSketch;q=1==y.autosave;this.hideDialog();null!=y.modified&&null==urlParams.modified&&(urlParams.modified=y.modified);null!=y.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=y.saveAndExit);null!=y.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=y.noSaveBtn);if(null!=y.rough){var O=Editor.sketchMode;this.doSetSketchMode(y.rough);O!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!= y.dark&&(O=Editor.darkMode,this.doSetDarkMode(y.dark),O!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=y.border&&(this.embedExportBorder=y.border);null!=y.background&&(this.embedExportBackground=y.background);null!=y.viewport&&(this.embedViewport=y.viewport);this.embedExitPoint=null;if(null!=y.rect){var R=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=y.rect.top+"px";this.diagramContainer.style.left=y.rect.left+ "px";this.diagramContainer.style.height=y.rect.height+"px";this.diagramContainer.style.width=y.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";I=mxUtils.bind(this,function(){var Y=this.editor.graph,Z=Y.maxFitScale;Y.maxFitScale=y.maxFitScale;Y.fit(2*R);Y.maxFitScale=Z;Y.container.scrollTop-=2*R;Y.container.scrollLeft-=2*R;this.fireEvent(new mxEventObject("editInlineStart","data",[y]))})}null!=y.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=y.noExitBtn); null!=y.title&&null!=this.buttonContainer&&(F=document.createElement("span"),mxUtils.write(F,y.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(F),this.embedFilenameSpan=F);try{y.libs&&this.sidebar.showEntries(y.libs)}catch(Y){}y=null!=y.xmlpng?this.extractGraphModelFromPng(y.xmlpng):null!=y.descriptor?y.descriptor:y.xml}else{if("merge"==y.action){var S=this.getCurrentFile();null!=S&&(F=N(y.xml),null!=F&&""!= -F&&S.mergeFile(new LocalFile(this,F),function(){z.postMessage(JSON.stringify({event:"merge",message:y}),"*")},function(Y){z.postMessage(JSON.stringify({event:"merge",message:y,error:Y}),"*")}))}else"remoteInvokeReady"==y.action?this.handleRemoteInvokeReady(z):"remoteInvoke"==y.action?this.handleRemoteInvoke(y,v.origin):"remoteInvokeResponse"==y.action?this.handleRemoteInvokeResponse(y):z.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(y)}),"*");return}}catch(Y){this.handleError(Y)}}var X= -mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),aa=mxUtils.bind(this,function(Y,Z){g=!0;try{c(Y,Z,null,t)}catch(ca){this.handleError(ca)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");m=X();q&&null==e&&(e=mxUtils.bind(this,function(ca,fa){ca=X();ca==m||g||(fa=this.createLoadMessage("autosave"),fa.xml=ca,(window.opener||window.parent).postMessage(JSON.stringify(fa),"*"));m=ca}), -this.editor.graph.model.addListener(mxEvent.CHANGE,e),this.editor.graph.addListener("gridSizeChanged",e),this.editor.graph.addListener("shadowVisibleChanged",e),this.addListener("pageFormatChanged",e),this.addListener("pageScaleChanged",e),this.addListener("backgroundColorChanged",e),this.addListener("backgroundImageChanged",e),this.addListener("foldingEnabledChanged",e),this.addListener("mathEnabledChanged",e),this.addListener("gridEnabledChanged",e),this.addListener("guidesEnabledChanged",e),this.addListener("pageViewChanged", -e));if("1"==urlParams.returnbounds||"json"==urlParams.proto)Z=this.createLoadMessage("load"),Z.xml=Y,z.postMessage(JSON.stringify(Z),"*");null!=I&&I()});null!=y&&"function"===typeof y.substring&&"data:application/vnd.visio;base64,"==y.substring(0,34)?(N="0M8R4KGxGuE"==y.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(y.substring(y.indexOf(",")+1)),function(Y){aa(Y,v)},mxUtils.bind(this,function(Y){this.handleError(Y)}),N)):null!=y&&"function"===typeof y.substring&&(new XMLHttpRequest).upload&& -this.isRemoteFileFormat(y,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(y,mxUtils.bind(this,function(Y){4==Y.readyState&&200<=Y.status&&299>=Y.status&&"<mxGraphModel"==Y.responseText.substring(0,13)&&aa(Y.responseText,v)}),""):null!=y&&"function"===typeof y.substring&&this.isLucidChartData(y)?this.convertLucidChart(y,mxUtils.bind(this,function(Y){aa(Y)}),mxUtils.bind(this,function(Y){this.handleError(Y)})):null==y||"object"!==typeof y|| -null==y.format||null==y.data&&null==y.url?(y=N(y),aa(y,v)):this.loadDescriptor(y,mxUtils.bind(this,function(Y){aa(X(),v)}),mxUtils.bind(this,function(Y){this.handleError(Y,mxResources.get("errorLoadingFile"))}))}}));var z=window.opener||window.parent;n="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";z.postMessage(n,"*");if("json"==urlParams.proto){var C=this.editor.graph.openLink;this.editor.graph.openLink=function(v,y,I){C.apply(this,arguments);z.postMessage(JSON.stringify({event:"openLink", -href:v,target:y,allowOpener:I}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var c=document.createElement("div");c.style.display="inline-block";c.style.position="absolute";c.style.paddingTop="2px";c.style.paddingLeft="8px";c.style.paddingBottom="2px";var e=document.createElement("button");e.className="geBigButton";var g=e;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var q="1"==urlParams.publishClose?mxResources.get("publish"): -mxResources.get("saveAndExit");mxUtils.write(e,q);e.setAttribute("title",q);mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));c.appendChild(e)}}else mxUtils.write(e,mxResources.get("save")),e.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),c.appendChild(e),"1"==urlParams.saveAndExit&&(e=document.createElement("a"),mxUtils.write(e, -mxResources.get("saveAndExit")),e.setAttribute("title",mxResources.get("saveAndExit")),e.className="geBigButton geBigStandardButton",e.style.marginLeft="6px",mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),c.appendChild(e),g=e);"1"!=urlParams.noExitBtn&&(e=document.createElement("a"),g="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(e,g),e.setAttribute("title",g),e.className="geBigButton geBigStandardButton", -e.style.marginLeft="6px",mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),c.appendChild(e),g=e);g.style.marginRight="20px";this.toolbar.container.appendChild(c);this.toolbar.staticElements.push(c);c.style.right="atlas"==uiTheme||"1"==urlParams.atlas?"62px":"72px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this, -function(c){this.importCsv(c)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(c){var e=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();c()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?e():this.spinner.spin(document.body, -mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",e)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",e))};EditorUi.prototype.importCsv=function(c,e){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,e)}))};EditorUi.prototype.doImportCsv=function(c, -e){try{var g=c.split("\n"),q=[],m=[],n=[],z={};if(0<g.length){var C={},v=this.editor.graph,y=null,I=null,N=null,t=null,p=null,F=null,J=null,M="whiteSpace=wrap;html=1;",H=null,G=null,E="",P="auto",T="auto",W=!1,U=null,V=null,l=40,A=40,L=100,Q=0,O=mxUtils.bind(this,function(){null!=e?e(xa):(v.setSelectionCells(xa),v.scrollCellToVisible(v.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),R=v.getFreeInsertPoint(),S=R.x,X= -R.y;R=X;var aa=null,Y="auto";G=null;for(var Z=[],ca=null,fa=null,la=0;la<g.length&&"#"==g[la].charAt(0);){c=g[la].replace(/\r$/,"");for(la++;la<g.length&&"\\"==c.charAt(c.length-1)&&"#"==g[la].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(g[la].substring(1)),la++;if("#"!=c.charAt(1)){var ia=c.indexOf(":");if(0<ia){var qa=mxUtils.trim(c.substring(1,ia)),ka=mxUtils.trim(c.substring(ia+1));"label"==qa?aa=v.sanitizeHtml(ka):"labelname"==qa&&0<ka.length&&"-"!=ka?p=ka:"labels"==qa&&0<ka.length&&"-"!= -ka?J=JSON.parse(ka):"style"==qa?I=ka:"parentstyle"==qa?M=ka:"unknownStyle"==qa&&"-"!=ka?F=ka:"stylename"==qa&&0<ka.length&&"-"!=ka?t=ka:"styles"==qa&&0<ka.length&&"-"!=ka?N=JSON.parse(ka):"vars"==qa&&0<ka.length&&"-"!=ka?y=JSON.parse(ka):"identity"==qa&&0<ka.length&&"-"!=ka?H=ka:"parent"==qa&&0<ka.length&&"-"!=ka?G=ka:"namespace"==qa&&0<ka.length&&"-"!=ka?E=ka:"width"==qa?P=ka:"height"==qa?T=ka:"collapsed"==qa&&"-"!=ka?W="true"==ka:"left"==qa&&0<ka.length?U=ka:"top"==qa&&0<ka.length?V=ka:"ignore"== -qa?fa=ka.split(","):"connect"==qa?Z.push(JSON.parse(ka)):"link"==qa?ca=ka:"padding"==qa?Q=parseFloat(ka):"edgespacing"==qa?l=parseFloat(ka):"nodespacing"==qa?A=parseFloat(ka):"levelspacing"==qa?L=parseFloat(ka):"layout"==qa&&(Y=ka)}}}if(null==g[la])throw Error(mxResources.get("invalidOrMissingFile"));var Da=this.editor.csvToArray(g[la].replace(/\r$/,""));ia=c=null;qa=[];for(ka=0;ka<Da.length;ka++)H==Da[ka]&&(c=ka),G==Da[ka]&&(ia=ka),qa.push(mxUtils.trim(Da[ka]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/, -"").replace(/_+$/,""));null==aa&&(aa="%"+qa[0]+"%");if(null!=Z)for(var Ea=0;Ea<Z.length;Ea++)null==C[Z[Ea].to]&&(C[Z[Ea].to]={});H=[];for(ka=la+1;ka<g.length;ka++){var za=this.editor.csvToArray(g[ka].replace(/\r$/,""));if(null==za){var Oa=40<g[ka].length?g[ka].substring(0,40)+"...":g[ka];throw Error(Oa+" ("+ka+"):\n"+mxResources.get("containsValidationErrors"));}0<za.length&&H.push(za)}v.model.beginUpdate();try{for(ka=0;ka<H.length;ka++){za=H[ka];var Aa=null,Ga=null!=c?E+za[c]:null;g=!1;null!=Ga&& -(Aa=v.model.getCell(Ga),g=null==Aa||0<=mxUtils.indexOf(q,Aa));var Ia=new mxCell(aa,new mxGeometry(S,R,0,0),I||"whiteSpace=wrap;html=1;");Ia.collapsed=W;Ia.vertex=!0;Ia.id=Ga;null==Aa||g||v.model.setCollapsed(Aa,W);for(var ra=0;ra<za.length;ra++)v.setAttributeForCell(Ia,qa[ra],za[ra]),null==Aa||g||v.setAttributeForCell(Aa,qa[ra],za[ra]);if(null!=p&&null!=J){var ua=J[Ia.getAttribute(p)];null!=ua&&(v.labelChanged(Ia,ua),null==Aa||g||v.cellLabelChanged(Aa,ua))}if(null!=t&&null!=N){var Ba=N[Ia.getAttribute(t)]; -null!=Ba&&(Ia.style=Ba)}v.setAttributeForCell(Ia,"placeholders","1");Ia.style=v.replacePlaceholders(Ia,Ia.style,y);null==Aa||g?v.fireEvent(new mxEventObject("cellsInserted","cells",[Ia])):(v.model.setStyle(Aa,Ia.style),0>mxUtils.indexOf(n,Aa)&&n.push(Aa),v.fireEvent(new mxEventObject("cellsInserted","cells",[Aa])));g=null!=Aa;Aa=Ia;if(!g)for(Ea=0;Ea<Z.length;Ea++)C[Z[Ea].to][Aa.getAttribute(Z[Ea].to)]=Aa;null!=ca&&"link"!=ca&&(v.setLinkForCell(Aa,Aa.getAttribute(ca)),v.setAttributeForCell(Aa,ca,null)); -var Fa=this.editor.graph.getPreferredSizeForCell(Aa);G=null!=ia?v.model.getCell(E+za[ia]):null;if(Aa.vertex){Oa=null!=G?0:S;la=null!=G?0:X;null!=U&&null!=Aa.getAttribute(U)&&(Aa.geometry.x=Oa+parseFloat(Aa.getAttribute(U)));null!=V&&null!=Aa.getAttribute(V)&&(Aa.geometry.y=la+parseFloat(Aa.getAttribute(V)));var wa="@"==P.charAt(0)?Aa.getAttribute(P.substring(1)):null;Aa.geometry.width=null!=wa&&"auto"!=wa?parseFloat(Aa.getAttribute(P.substring(1))):"auto"==P||"auto"==wa?Fa.width+Q:parseFloat(P);var La= -"@"==T.charAt(0)?Aa.getAttribute(T.substring(1)):null;Aa.geometry.height=null!=La&&"auto"!=La?parseFloat(La):"auto"==T||"auto"==La?Fa.height+Q:parseFloat(T);R+=Aa.geometry.height+A}g?(null==z[Ga]&&(z[Ga]=[]),z[Ga].push(Aa)):(q.push(Aa),null!=G?(G.style=v.replacePlaceholders(G,M,y),v.addCell(Aa,G),m.push(G)):n.push(v.addCell(Aa)))}for(ka=0;ka<m.length;ka++)wa="@"==P.charAt(0)?m[ka].getAttribute(P.substring(1)):null,La="@"==T.charAt(0)?m[ka].getAttribute(T.substring(1)):null,"auto"!=P&&"auto"!=wa|| -"auto"!=T&&"auto"!=La||v.updateGroupBounds([m[ka]],Q,!0);var ja=n.slice(),xa=n.slice();for(Ea=0;Ea<Z.length;Ea++){var sa=Z[Ea];for(ka=0;ka<q.length;ka++){Aa=q[ka];var da=mxUtils.bind(this,function(Ha,Ma,Ra){var Ja=Ma.getAttribute(Ra.from);if(null!=Ja&&""!=Ja){Ja=Ja.split(",");for(var Pa=0;Pa<Ja.length;Pa++){var Qa=C[Ra.to][Ja[Pa]];if(null==Qa&&null!=F){Qa=new mxCell(Ja[Pa],new mxGeometry(S,X,0,0),F);Qa.style=v.replacePlaceholders(Ma,Qa.style,y);var Na=this.editor.graph.getPreferredSizeForCell(Qa); -Qa.geometry.width=Na.width+Q;Qa.geometry.height=Na.height+Q;C[Ra.to][Ja[Pa]]=Qa;Qa.vertex=!0;Qa.id=Ja[Pa];n.push(v.addCell(Qa))}if(null!=Qa){Na=Ra.label;null!=Ra.fromlabel&&(Na=(Ma.getAttribute(Ra.fromlabel)||"")+(Na||""));null!=Ra.sourcelabel&&(Na=v.replacePlaceholders(Ma,Ra.sourcelabel,y)+(Na||""));null!=Ra.tolabel&&(Na=(Na||"")+(Qa.getAttribute(Ra.tolabel)||""));null!=Ra.targetlabel&&(Na=(Na||"")+v.replacePlaceholders(Qa,Ra.targetlabel,y));var Sa="target"==Ra.placeholders==!Ra.invert?Qa:Ha;Sa= -null!=Ra.style?v.replacePlaceholders(Sa,Ra.style,y):v.createCurrentEdgeStyle();Na=v.insertEdge(null,null,Na||"",Ra.invert?Qa:Ha,Ra.invert?Ha:Qa,Sa);if(null!=Ra.labels)for(Sa=0;Sa<Ra.labels.length;Sa++){var Ua=Ra.labels[Sa],Ka=new mxCell(Ua.label||Sa,new mxGeometry(null!=Ua.x?Ua.x:0,null!=Ua.y?Ua.y:0,0,0),"resizable=0;html=1;");Ka.vertex=!0;Ka.connectable=!1;Ka.geometry.relative=!0;null!=Ua.placeholders&&(Ka.value=v.replacePlaceholders("target"==Ua.placeholders==!Ra.invert?Qa:Ha,Ka.value,y));if(null!= -Ua.dx||null!=Ua.dy)Ka.geometry.offset=new mxPoint(null!=Ua.dx?Ua.dx:0,null!=Ua.dy?Ua.dy:0);Na.insert(Ka)}xa.push(Na);mxUtils.remove(Ra.invert?Ha:Qa,ja)}}}});da(Aa,Aa,sa);if(null!=z[Aa.id])for(ra=0;ra<z[Aa.id].length;ra++)da(Aa,z[Aa.id][ra],sa)}}if(null!=fa)for(ka=0;ka<q.length;ka++)for(Aa=q[ka],ra=0;ra<fa.length;ra++)v.setAttributeForCell(Aa,mxUtils.trim(fa[ra]),null);if(0<n.length){var ba=new mxParallelEdgeLayout(v);ba.spacing=l;ba.checkOverlap=!0;var na=function(){0<ba.spacing&&ba.execute(v.getDefaultParent()); -for(var Ha=0;Ha<n.length;Ha++){var Ma=v.getCellGeometry(n[Ha]);Ma.x=Math.round(v.snap(Ma.x));Ma.y=Math.round(v.snap(Ma.y));"auto"==P&&(Ma.width=Math.round(v.snap(Ma.width)));"auto"==T&&(Ma.height=Math.round(v.snap(Ma.height)))}};if("["==Y.charAt(0)){var ea=O;v.view.validate();this.executeLayouts(v.createLayouts(JSON.parse(Y)),function(){na();ea()});O=null}else if("circle"==Y){var ha=new mxCircleLayout(v);ha.disableEdgeStyle=!1;ha.resetEdges=!1;var oa=ha.isVertexIgnored;ha.isVertexIgnored=function(Ha){return oa.apply(this, -arguments)||0>mxUtils.indexOf(n,Ha)};this.executeLayout(function(){ha.execute(v.getDefaultParent());na()},!0,O);O=null}else if("horizontaltree"==Y||"verticaltree"==Y||"auto"==Y&&xa.length==2*n.length-1&&1==ja.length){v.view.validate();var ma=new mxCompactTreeLayout(v,"horizontaltree"==Y);ma.levelDistance=A;ma.edgeRouting=!1;ma.resetEdges=!1;this.executeLayout(function(){ma.execute(v.getDefaultParent(),0<ja.length?ja[0]:null)},!0,O);O=null}else if("horizontalflow"==Y||"verticalflow"==Y||"auto"==Y&& -1==ja.length){v.view.validate();var va=new mxHierarchicalLayout(v,"horizontalflow"==Y?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);va.intraCellSpacing=A;va.parallelEdgeSpacing=l;va.interRankCellSpacing=L;va.disableEdgeStyle=!1;this.executeLayout(function(){va.execute(v.getDefaultParent(),xa);v.moveCells(xa,S,X)},!0,O);O=null}else if("orgchart"==Y){v.view.validate();var Ca=new mxOrgChartLayout(v,2,L,A),ya=Ca.isVertexIgnored;Ca.isVertexIgnored=function(Ha){return ya.apply(this,arguments)|| -0>mxUtils.indexOf(n,Ha)};this.executeLayout(function(){Ca.execute(v.getDefaultParent());na()},!0,O);O=null}else if("organic"==Y||"auto"==Y&&xa.length>n.length){v.view.validate();var ta=new mxFastOrganicLayout(v);ta.forceConstant=3*A;ta.disableEdgeStyle=!1;ta.resetEdges=!1;var pa=ta.isVertexIgnored;ta.isVertexIgnored=function(Ha){return pa.apply(this,arguments)||0>mxUtils.indexOf(n,Ha)};this.executeLayout(function(){ta.execute(v.getDefaultParent());na()},!0,O);O=null}}this.hideDialog()}finally{v.model.endUpdate()}null!= -O&&O()}}catch(Ha){this.handleError(Ha)}};EditorUi.prototype.getSearch=function(c){var e="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var g="?",q;for(q in urlParams)0>mxUtils.indexOf(c,q)&&null!=urlParams[q]&&(e+=g+q+"="+urlParams[q],g="&")}else e=window.location.search;return e};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var e=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "), -q;for(q in urlParams)0>mxUtils.indexOf(g,q)&&(c=0==e?c+"?":c+"&",null!=urlParams[q]&&(c+=q+"="+urlParams[q],e++))}return c};EditorUi.prototype.showLinkDialog=function(c,e,g,q,m){c=new LinkDialog(this,c,e,g,!0,q,m);this.showDialog(c.container,560,130,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var e=1;null==this.drive&&"function"!==typeof window.DriveClient||e++;null==this.dropbox&&"function"!==typeof window.DropboxClient||e++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient|| -e++;null!=this.gitHub&&e++;null!=this.gitLab&&e++;c&&isLocalStorage&&"1"==urlParams.browser&&e++;return e};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),e=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(e);this.menus.get("viewZoom").setEnabled(e);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==c||c.isRestricted());this.actions.get("makeCopy").setEnabled(!g); -this.actions.get("print").setEnabled(!g);this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));c="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=c&&c.isEditable();this.actions.get("image").setEnabled(e);this.actions.get("zoomIn").setEnabled(e);this.actions.get("zoomOut").setEnabled(e); -this.actions.get("resetView").setEnabled(e);this.actions.get("undo").setEnabled(this.canUndo()&&c);this.actions.get("redo").setEnabled(this.canRedo()&&c);this.menus.get("edit").setEnabled(e);this.menus.get("view").setEnabled(e);this.menus.get("importFrom").setEnabled(c);this.menus.get("arrange").setEnabled(c);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(c),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(c));this.updateUserElement()}; -EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var c=this.getCurrentFile();return null!=c&&c.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var B=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=function(c){var e=B.apply(this,arguments);this.addListener("darkModeChanged", -mxUtils.bind(this,function(){e.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){e.refresh()}));return e};var D=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){D.apply(this,arguments);var c=this.editor.graph,e=this.getCurrentFile(),g=this.getSelectionState(),q=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(q);this.actions.get("autosave").setEnabled(null!=e&&e.isEditable()&&e.isAutosaveOptional());this.actions.get("guides").setEnabled(q); -this.actions.get("editData").setEnabled(c.isEnabled());this.actions.get("shadowVisible").setEnabled(q);this.actions.get("connectionArrows").setEnabled(q);this.actions.get("connectionPoints").setEnabled(q);this.actions.get("copyStyle").setEnabled(q&&!c.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(q&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(q);this.actions.get("createRevision").setEnabled(q);this.actions.get("moveToFolder").setEnabled(null!= -e);this.actions.get("makeCopy").setEnabled(null!=e&&!e.isRestricted());this.actions.get("editDiagram").setEnabled(q&&(null==e||!e.isRestricted()));this.actions.get("publishLink").setEnabled(null!=e&&!e.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!= -e&&e.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=e);this.menus.get("publish").setEnabled(null!=e&&!e.isRestricted());e=this.actions.get("findReplace");e.setEnabled("hidden"!=this.diagramContainer.style.visibility);e.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(q&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var K=EditorUi.prototype.destroy;EditorUi.prototype.destroy= -function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);K.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,e,g,q,m,n,z,C){var v=c.editor.graph;if("xml"==g)c.hideDialog(),c.saveData(e,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==g)c.hideDialog(),c.saveData(e,"svg",mxUtils.getXml(v.getSvg(q,m,n)),"image/svg+xml"); -else{var y=c.getFileData(!0,null,null,null,null,!0),I=v.getGraphBounds(),N=Math.floor(I.width*m/v.view.scale),t=Math.floor(I.height*m/v.view.scale);if(y.length<=MAX_REQUEST_SIZE&&N*t<MAX_AREA)if(c.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!c.isExportToCanvas()){var p={globalVars:v.getExportVariables()};C&&(p.grid={size:v.gridSize,steps:v.view.gridSteps,color:v.view.gridColor});c.saveRequest(e,g,function(F,J){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(J||"0")+(null!=F?"&filename="+ -encodeURIComponent(F):"")+"&extras="+encodeURIComponent(JSON.stringify(p))+(0<z?"&dpi="+z:"")+"&bg="+(null!=q?q:"none")+"&w="+N+"&h="+t+"&border="+n+"&xml="+encodeURIComponent(y))})}else"png"==g?c.exportImage(m,null==q||"none"==q,!0,!1,!1,n,!0,!1,null,C,z):c.exportImage(m,!1,!0,!1,!1,n,!0,!1,"jpeg",C);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,e="";if(null!=this.pages)for(var g= -0;g<this.pages.length;g++){var q=c;this.currentPage!=this.pages[g]&&(q=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[g]),q.model.setRoot(this.pages[g].root));e+=this.pages[g].getName()+" "+q.getIndexableText()+" "}else e=c.getIndexableText();this.editor.graph.setEnabled(!0);return e};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var e={},g=document.createElement("div");g.style.whiteSpace="nowrap";var q=document.createElement("h3");mxUtils.write(q,mxUtils.htmlEntities(c)); -q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(q);var m=document.createElement("div");m.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";m.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var n={};try{var z=mxSettings.getCustomLibraries();for(c=0;c<z.length;c++){var C=z[c];if("R"==C.substring(0,1)){var v=JSON.parse(decodeURIComponent(C.substring(1)));n[v[0]]={id:v[0],title:v[1],downloadUrl:v[2]}}}}catch(y){}this.remoteInvoke("getCustomLibraries", -null,null,function(y){m.innerText="";if(0==y.length)m.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var I=0;I<y.length;I++){var N=y[I];n[N.id]&&(e[N.id]=N);var t=this.addCheckbox(m,N.title,n[N.id]);(function(p,F){mxEvent.addListener(F,"change",function(){this.checked?e[p.id]=p:delete e[p.id]})})(N,t)}},mxUtils.bind(this,function(y){m.innerText="";var I=document.createElement("div");I.style.padding="8px"; -I.style.textAlign="center";mxUtils.write(I,mxResources.get("error")+": ");mxUtils.write(I,null!=y&&null!=y.message?y.message:mxResources.get("unknownError"));m.appendChild(I)}));g.appendChild(m);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var y=0,I;for(I in e)null==n[I]&&(y++,mxUtils.bind(this,function(N){this.remoteInvoke("getFileContent",[N.downloadUrl],null,mxUtils.bind(this,function(t){y--;0==y&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this, -t,N))}catch(p){this.handleError(p,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){y--;0==y&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(e[I]));for(I in n)e[I]||this.closeLibrary(new RemoteLibrary(this,null,n[I]));0==y&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(g.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1}, -getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(c){this.remoteWin=c;for(var e=0;e<this.remoteInvokeQueue.length;e++)c.postMessage(this.remoteInvokeQueue[e],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse= -function(c){var e=c.msgMarkers,g=this.remoteInvokeCallbacks[e.callbackId];if(null==g)throw Error("No callback for "+(null!=e?e.callbackId:"null"));c.error?g.error&&g.error(c.error.errResp):g.callback&&g.callback.apply(this,c.resp);this.remoteInvokeCallbacks[e.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,e,g,q,m){var n=!0,z=window.setTimeout(mxUtils.bind(this,function(){n=!1;m({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),C=mxUtils.bind(this,function(){window.clearTimeout(z); -n&&q.apply(this,arguments)}),v=mxUtils.bind(this,function(){window.clearTimeout(z);n&&m.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:C,error:v});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:e,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,e){var g=mxUtils.bind(this,function(y,I){var N={event:"remoteInvokeResponse", -msgMarkers:c.msgMarkers};null!=I?N.error={errResp:I}:null!=y&&(N.resp=y);this.remoteWin.postMessage(JSON.stringify(N),"*")});try{var q=c.funtionName,m=this.remoteInvokableFns[q];if(null!=m&&"function"===typeof this[q]){if(m.allowedDomains){for(var n=!1,z=0;z<m.allowedDomains.length;z++)if(e=="https://"+m.allowedDomains[z]){n=!0;break}if(!n){g(null,"Invalid Call: "+q+" is not allowed.");return}}var C=c.functionArgs;Array.isArray(C)||(C=[]);if(m.isAsync)C.push(function(){g(Array.prototype.slice.apply(arguments))}), -C.push(function(y){g(null,y||"Unkown Error")}),this[q].apply(this,C);else{var v=this[q].apply(this,C);g([v])}}else g(null,"Invalid Call: "+q+" is not found.")}catch(y){g(null,"Invalid Call: An error occurred, "+y.message)}};EditorUi.prototype.openDatabase=function(c,e){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var q=g.open("database",2);q.onupgradeneeded=function(m){try{var n=q.result;1>m.oldVersion&&n.createObjectStore("objects",{keyPath:"key"}); -2>m.oldVersion&&(n.createObjectStore("files",{keyPath:"title"}),n.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(z){null!=e&&e(z)}};q.onsuccess=mxUtils.bind(this,function(m){var n=q.result;this.database=n;EditorUi.migrateStorageFiles&&(StorageFile.migrate(n),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(z){if(!z|| -"1"==urlParams.forceMigration){var C=document.createElement("iframe");C.style.display="none";C.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(C);var v=!0,y=!1,I,N=0,t=mxUtils.bind(this,function(){y=!0;this.setDatabaseItem(".drawioMigrated3",!0);C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),p=mxUtils.bind(this,function(){N++;F()}),F=mxUtils.bind(this,function(){try{if(N>= -I.length)t();else{var M=I[N];StorageFile.getFileContent(this,M,mxUtils.bind(this,function(H){null==H||".scratchpad"==M&&H==this.emptyLibraryXml?C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[M]}),"*"):p()}),p)}}catch(H){console.log(H)}}),J=mxUtils.bind(this,function(M){try{this.setDatabaseItem(null,[{title:M.title,size:M.data.length,lastModified:Date.now(),type:M.isLib?"L":"F"},{title:M.title,data:M.data}],p,p,["filesInfo","files"])}catch(H){console.log(H)}}); -z=mxUtils.bind(this,function(M){try{if(M.source==C.contentWindow){var H={};try{H=JSON.parse(M.data)}catch(G){}"init"==H.event?(C.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=H.event||y||(v?null!=H.resp&&0<H.resp.length&&null!=H.resp[0]?(I=H.resp[0],v=!1,F()):t():null!=H.resp&&0<H.resp.length&&null!=H.resp[0]?J(H.resp[0]):p())}}catch(G){console.log(G)}}); -window.addEventListener("message",z)}})));c(n);n.onversionchange=function(){n.close()}});q.onerror=e;q.onblocked=function(){}}catch(m){null!=e&&e(m)}else null!=e&&e()}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,e,g,q,m){this.openDatabase(mxUtils.bind(this,function(n){try{m=m||"objects";Array.isArray(m)||(m=[m],c=[c],e=[e]);var z=n.transaction(m,"readwrite");z.oncomplete=g;z.onerror=q;for(n=0;n<m.length;n++)z.objectStore(m[n]).put(null!=c&&null!=c[n]?{key:c[n],data:e[n]}:e[n])}catch(C){null!= -q&&q(C)}}),q)};EditorUi.prototype.removeDatabaseItem=function(c,e,g,q){this.openDatabase(mxUtils.bind(this,function(m){q=q||"objects";Array.isArray(q)||(q=[q],c=[c]);m=m.transaction(q,"readwrite");m.oncomplete=e;m.onerror=g;for(var n=0;n<q.length;n++)m.objectStore(q[n]).delete(c[n])}),g)};EditorUi.prototype.getDatabaseItem=function(c,e,g,q){this.openDatabase(mxUtils.bind(this,function(m){try{q=q||"objects";var n=m.transaction([q],"readonly").objectStore(q).get(c);n.onsuccess=function(){e(n.result)}; -n.onerror=g}catch(z){null!=g&&g(z)}}),g)};EditorUi.prototype.getDatabaseItems=function(c,e,g){this.openDatabase(mxUtils.bind(this,function(q){try{g=g||"objects";var m=q.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),n=[];m.onsuccess=function(z){null==z.target.result?c(n):(n.push(z.target.result.value),z.target.result.continue())};m.onerror=e}catch(z){null!=e&&e(z)}}),e)};EditorUi.prototype.getDatabaseItemKeys=function(c,e,g){this.openDatabase(mxUtils.bind(this,function(q){try{g= -g||"objects";var m=q.transaction([g],"readonly").objectStore(g).getAllKeys();m.onsuccess=function(){c(m.result)};m.onerror=e}catch(n){null!=e&&e(n)}}),e)};EditorUi.prototype.commentsSupported=function(){var c=this.getCurrentFile();return null!=c?c.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsSaveNeeded(): -!1};EditorUi.prototype.getComments=function(c,e){var g=this.getCurrentFile();null!=g?g.getComments(c,e):c([])};EditorUi.prototype.addComment=function(c,e,g){var q=this.getCurrentFile();null!=q?q.addComment(c,e,g):e(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var c=this.getCurrentFile();return null!=c?c.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,e){var g=this.getCurrentFile(); -return null!=g?g.newComment(c,e):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,e)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,e){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(c,e):e({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor== -DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,e,g,q,m,n,z,C){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(c,e,g,q,m,n,z,C)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)}; -EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,e)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,e,g,q,m,n,z,C,v,y,I,N,t,p,F,J){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas"); -return this.editor.exportToCanvas(c,e,g,q,m,n,z,C,v,y,I,N,t,p,F,J)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,e,g,q){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,e,g,q)};EditorUi.prototype.convertImageToDataUri=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri"); -return this.editor.convertImageToDataUri(c,e)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,e,g,q){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,e,g,q)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,e,g,q,m){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng"); -return Editor.writeGraphModelToPng(c,e,g,q,m)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],e=0;e<localStorage.length;e++){var g=localStorage.key(e),q=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<q.length){var m="<mxfile "===q.substring(0,8)||"<?xml"===q.substring(0,5)||"\x3c!--[if IE]>"===q.substring(0,12);q="<mxlibrary>"===q.substring(0,11);(m|| -q)&&c.push(g)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var e=localStorage.getItem(c);return{title:c,data:e,isLib:"<mxlibrary>"===e.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})(); -var CommentsWindow=function(b,f,k,d,u,x){function B(){for(var M=y.getElementsByTagName("div"),H=0,G=0;G<M.length;G++)"none"!=M[G].style.display&&M[G].parentNode==y&&H++;I.style.display=0==H?"block":"none"}function D(M,H,G,E){function P(){H.removeChild(U);H.removeChild(V);W.style.display="block";T.style.display="block"}z={div:H,comment:M,saveCallback:G,deleteOnCancel:E};var T=H.querySelector(".geCommentTxt"),W=H.querySelector(".geCommentActionsList"),U=document.createElement("textarea");U.className= -"geCommentEditTxtArea";U.style.minHeight=T.offsetHeight+"px";U.value=M.content;H.insertBefore(U,T);var V=document.createElement("div");V.className="geCommentEditBtns";var l=mxUtils.button(mxResources.get("cancel"),function(){E?(H.parentNode.removeChild(H),B()):P();z=null});l.className="geCommentEditBtn";V.appendChild(l);var A=mxUtils.button(mxResources.get("save"),function(){T.innerText="";M.content=U.value;mxUtils.write(T,M.content);P();G(M);z=null});mxEvent.addListener(U,"keydown",mxUtils.bind(this, -function(L){mxEvent.isConsumed(L)||((mxEvent.isControlDown(L)||mxClient.IS_MAC&&mxEvent.isMetaDown(L))&&13==L.keyCode?(A.click(),mxEvent.consume(L)):27==L.keyCode&&(l.click(),mxEvent.consume(L)))}));A.focus();A.className="geCommentEditBtn gePrimaryBtn";V.appendChild(A);H.insertBefore(V,T);W.style.display="none";T.style.display="none";U.focus()}function K(M,H){H.innerText="";M=new Date(M.modifiedDate);var G=b.timeSince(M);null==G&&(G=mxResources.get("lessThanAMinute"));mxUtils.write(H,mxResources.get("timeAgo", -[G],"{1} ago"));H.setAttribute("title",M.toLocaleDateString()+" "+M.toLocaleTimeString())}function c(M){var H=document.createElement("img");H.className="geCommentBusyImg";H.src=IMAGE_PATH+"/spin.gif";M.appendChild(H);M.busyImg=H}function e(M){M.style.border="1px solid red";M.removeChild(M.busyImg)}function g(M){M.style.border="";M.removeChild(M.busyImg)}function q(M,H,G,E,P){function T(O,R,S){var X=document.createElement("li");X.className="geCommentAction";var aa=document.createElement("a");aa.className= -"geCommentActionLnk";mxUtils.write(aa,O);X.appendChild(aa);mxEvent.addListener(aa,"click",function(Y){R(Y,M);Y.preventDefault();mxEvent.consume(Y)});Q.appendChild(X);S&&(X.style.display="none")}function W(){function O(X){R.push(S);if(null!=X.replies)for(var aa=0;aa<X.replies.length;aa++)S=S.nextSibling,O(X.replies[aa])}var R=[],S=V;O(M);return{pdiv:S,replies:R}}function U(O,R,S,X,aa){function Y(){c(la);M.addReply(fa,function(ia){fa.id=ia;M.replies.push(fa);g(la);S&&S()},function(ia){Z();e(la);b.handleError(ia, -null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},X,aa)}function Z(){D(fa,la,function(ia){Y()},!0)}var ca=W().pdiv,fa=b.newComment(O,b.getCurrentUser());fa.pCommentId=M.id;null==M.replies&&(M.replies=[]);var la=q(fa,M.replies,ca,E+1);R?Z():Y()}if(P||!M.isResolved){I.style.display="none";var V=document.createElement("div");V.className="geCommentContainer";V.setAttribute("data-commentId",M.id);V.style.marginLeft=20*E+5+"px";M.isResolved&&!Editor.isDarkMode()&&(V.style.backgroundColor= -"ghostWhite");var l=document.createElement("div");l.className="geCommentHeader";var A=document.createElement("img");A.className="geCommentUserImg";A.src=M.user.pictureUrl||Editor.userImage;l.appendChild(A);A=document.createElement("div");A.className="geCommentHeaderTxt";l.appendChild(A);var L=document.createElement("div");L.className="geCommentUsername";mxUtils.write(L,M.user.displayName||"");A.appendChild(L);L=document.createElement("div");L.className="geCommentDate";L.setAttribute("data-commentId", -M.id);K(M,L);A.appendChild(L);V.appendChild(l);l=document.createElement("div");l.className="geCommentTxt";mxUtils.write(l,M.content||"");V.appendChild(l);M.isLocked&&(V.style.opacity="0.5");l=document.createElement("div");l.className="geCommentActions";var Q=document.createElement("ul");Q.className="geCommentActionsList";l.appendChild(Q);m||M.isLocked||0!=E&&!n||T(mxResources.get("reply"),function(){U("",!0)},M.isResolved);A=b.getCurrentUser();null==A||A.id!=M.user.id||m||M.isLocked||(T(mxResources.get("edit"), -function(){function O(){D(M,V,function(){c(V);M.editComment(M.content,function(){g(V)},function(R){e(V);O();b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}O()},M.isResolved),T(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){c(V);M.deleteComment(function(O){if(!0===O){O=V.querySelector(".geCommentTxt");O.innerText="";mxUtils.write(O,mxResources.get("msgDeleted"));var R=V.querySelectorAll(".geCommentAction");for(O= -0;O<R.length;O++)R[O].parentNode.removeChild(R[O]);g(V);V.style.opacity="0.5"}else{R=W(M).replies;for(O=0;O<R.length;O++)y.removeChild(R[O]);for(O=0;O<H.length;O++)if(H[O]==M){H.splice(O,1);break}I.style.display=0==y.getElementsByTagName("div").length?"block":"none"}},function(O){e(V);b.handleError(O,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},M.isResolved));m||M.isLocked||0!=E||T(M.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(O){function R(){var S= -O.target;S.innerText="";M.isResolved=!M.isResolved;mxUtils.write(S,M.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var X=M.isResolved?"none":"",aa=W(M).replies,Y=Editor.isDarkMode()?"transparent":M.isResolved?"ghostWhite":"white",Z=0;Z<aa.length;Z++){aa[Z].style.backgroundColor=Y;for(var ca=aa[Z].querySelectorAll(".geCommentAction"),fa=0;fa<ca.length;fa++)ca[fa]!=S.parentNode&&(ca[fa].style.display=X);p||(aa[Z].style.display="none")}B()}M.isResolved?U(mxResources.get("reOpened")+ -": ",!0,R,!1,!0):U(mxResources.get("markedAsResolved"),!1,R,!0)});V.appendChild(l);null!=G?y.insertBefore(V,G.nextSibling):y.appendChild(V);for(G=0;null!=M.replies&&G<M.replies.length;G++)l=M.replies[G],l.isResolved=M.isResolved,q(l,M.replies,null,E+1,P);null!=z&&(z.comment.id==M.id?(P=M.content,M.content=z.comment.content,D(M,V,z.saveCallback,z.deleteOnCancel),M.content=P):null==z.comment.id&&z.comment.pCommentId==M.id&&(y.appendChild(z.div),D(z.comment,z.div,z.saveCallback,z.deleteOnCancel)));return V}} -var m=!b.canComment(),n=b.canReplyToReplies(),z=null,C=document.createElement("div");C.className="geCommentsWin";C.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var v=EditorUi.compactUi?"26px":"30px",y=document.createElement("div");y.className="geCommentsList";y.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";y.style.bottom=parseInt(v)+7+"px";C.appendChild(y);var I=document.createElement("span");I.style.cssText="display:none;padding-top:10px;text-align:center;"; -mxUtils.write(I,mxResources.get("noCommentsFound"));var N=document.createElement("div");N.className="geToolbarContainer geCommentsToolbar";N.style.height=v;N.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";N.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";v=document.createElement("a");v.className="geButton";if(!m){var t=v.cloneNode();t.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';t.setAttribute("title",mxResources.get("create")+ -"...");mxEvent.addListener(t,"click",function(M){function H(){D(G,E,function(P){c(E);b.addComment(P,function(T){P.id=T;F.push(P);g(E)},function(T){e(E);H();b.handleError(T,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var G=b.newComment("",b.getCurrentUser()),E=q(G,F,null,0);H();M.preventDefault();mxEvent.consume(M)});N.appendChild(t)}t=v.cloneNode();t.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';t.setAttribute("title",mxResources.get("showResolved")); -t.className="geAdaptiveAsset";var p=!1;mxEvent.addListener(t,"click",function(M){this.className=(p=!p)?"geButton geCheckedBtn":"geButton";J();M.preventDefault();mxEvent.consume(M)});N.appendChild(t);b.commentsRefreshNeeded()&&(t=v.cloneNode(),t.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',t.setAttribute("title",mxResources.get("refresh")),t.className="geAdaptiveAsset",mxEvent.addListener(t,"click",function(M){J();M.preventDefault();mxEvent.consume(M)}),N.appendChild(t)); -b.commentsSaveNeeded()&&(v=v.cloneNode(),v.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',v.setAttribute("title",mxResources.get("save")),v.className="geAdaptiveAsset",mxEvent.addListener(v,"click",function(M){x();M.preventDefault();mxEvent.consume(M)}),N.appendChild(v));C.appendChild(N);var F=[],J=mxUtils.bind(this,function(){this.hasError=!1;if(null!=z)try{z.div=z.div.cloneNode(!0);var M=z.div.querySelector(".geCommentEditTxtArea"),H=z.div.querySelector(".geCommentEditBtns"); -z.comment.content=M.value;M.parentNode.removeChild(M);H.parentNode.removeChild(H)}catch(G){b.handleError(G)}y.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";n=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(G){function E(P){if(null!=P){P.sort(function(W,U){return new Date(W.modifiedDate)-new Date(U.modifiedDate)});for(var T=0;T<P.length;T++)E(P[T].replies)}} -G.sort(function(P,T){return new Date(P.modifiedDate)-new Date(T.modifiedDate)});y.innerText="";y.appendChild(I);I.style.display="block";F=G;for(G=0;G<F.length;G++)E(F[G].replies),q(F[G],F,null,0,p);null!=z&&null==z.comment.id&&null==z.comment.pCommentId&&(y.appendChild(z.div),D(z.comment,z.div,z.saveCallback,z.deleteOnCancel))},mxUtils.bind(this,function(G){y.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(G&&G.message?": "+G.message:""));this.hasError=!0})):y.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))}); -J();this.refreshComments=J;N=mxUtils.bind(this,function(){function M(T){var W=G[T.id];if(null!=W)for(K(T,W),W=0;null!=T.replies&&W<T.replies.length;W++)M(T.replies[W])}if(this.window.isVisible()){for(var H=y.querySelectorAll(".geCommentDate"),G={},E=0;E<H.length;E++){var P=H[E];G[P.getAttribute("data-commentId")]=P}for(E=0;E<F.length;E++)M(F[E])}});setInterval(N,6E4);this.refreshCommentsTime=N;this.window=new mxWindow(mxResources.get("comments"),C,f,k,d,u,!0,!0);this.window.minimumSize=new mxRectangle(0, -0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,f,k,d,u,x,B,D,K,c,e){var g=document.createElement("div");g.style.textAlign="center";e=null!=e?e:44;var q=document.createElement("div");q.style.padding="6px";q.style.overflow="auto";q.style.maxHeight=e+ -"px";q.style.lineHeight="1.2em";mxUtils.write(q,f);g.appendChild(q);null!=c&&(q=document.createElement("div"),q.style.padding="6px 0 6px 0",f=document.createElement("img"),f.setAttribute("src",c),q.appendChild(f),g.appendChild(q));c=document.createElement("div");c.style.textAlign="center";c.style.whiteSpace="nowrap";var m=document.createElement("input");m.setAttribute("type","checkbox");x=mxUtils.button(x||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d(m.checked)});x.className="geBtn"; -null!=D&&(x.innerHTML=D+"<br>"+x.innerHTML,x.style.paddingBottom="8px",x.style.paddingTop="8px",x.style.height="auto",x.style.width="40%");b.editor.cancelFirst&&c.appendChild(x);var n=mxUtils.button(u||mxResources.get("ok"),function(){b.hideDialog();null!=k&&k(m.checked)});c.appendChild(n);null!=B?(n.innerHTML=B+"<br>"+n.innerHTML+"<br>",n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.className="geBtn",n.style.width="40%"):n.className="geBtn gePrimaryBtn";b.editor.cancelFirst|| -c.appendChild(x);g.appendChild(c);K?(c.style.marginTop="10px",q=document.createElement("p"),q.style.marginTop="20px",q.style.marginBottom="0px",q.appendChild(m),u=document.createElement("span"),mxUtils.write(u," "+mxResources.get("rememberThisSetting")),q.appendChild(u),g.appendChild(q),mxEvent.addListener(u,"click",function(z){m.checked=!m.checked;mxEvent.consume(z)})):c.style.marginTop="12px";this.init=function(){n.focus()};this.container=g};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0}; -EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,overlays:!0,mxObjectId:!0,mxTransient:!0};EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.applyPatches=function(b,f,k,d,u){if(null!=f)for(var x=0;x<f.length;x++)null!=f[x]&&(b=this.patchPages(b,f[x],k,d,u));return b}; -EditorUi.prototype.patchPages=function(b,f,k,d,u){var x={},B=[],D={},K={},c={},e={};if(null!=d&&null!=d[EditorUi.DIFF_UPDATE])for(var g in d[EditorUi.DIFF_UPDATE])x[g]=d[EditorUi.DIFF_UPDATE][g];if(null!=f[EditorUi.DIFF_REMOVE])for(d=0;d<f[EditorUi.DIFF_REMOVE].length;d++)K[f[EditorUi.DIFF_REMOVE][d]]=!0;if(null!=f[EditorUi.DIFF_INSERT])for(d=0;d<f[EditorUi.DIFF_INSERT].length;d++)D[f[EditorUi.DIFF_INSERT][d].previous]=f[EditorUi.DIFF_INSERT][d];if(null!=f[EditorUi.DIFF_UPDATE])for(g in f[EditorUi.DIFF_UPDATE])d= -f[EditorUi.DIFF_UPDATE][g],null!=d.previous&&(e[d.previous]=g);if(null!=b){var q="";for(d=0;d<b.length;d++){var m=b[d].getId();c[m]=b[d];null!=e[q]||K[m]||null!=f[EditorUi.DIFF_UPDATE]&&null!=f[EditorUi.DIFF_UPDATE][m]&&null!=f[EditorUi.DIFF_UPDATE][m].previous||(e[q]=m);q=m}}var n={},z=mxUtils.bind(this,function(v){var y=null!=v?v.getId():"";if(null!=v&&!n[y]){n[y]=!0;B.push(v);var I=null!=f[EditorUi.DIFF_UPDATE]?f[EditorUi.DIFF_UPDATE][y]:null;null!=I&&(this.updatePageRoot(v),null!=I.name&&v.setName(I.name), -null!=I.view&&this.patchViewState(v,I.view),null!=I.cells&&this.patchPage(v,I.cells,x[v.getId()],u),!k||null==I.cells&&null==I.view||(v.needsUpdate=!0))}v=e[y];null!=v&&(delete e[y],z(c[v]));v=D[y];null!=v&&(delete D[y],C(v))}),C=mxUtils.bind(this,function(v){v=mxUtils.parseXml(v.data).documentElement;v=new DiagramPage(v);this.updatePageRoot(v);var y=c[v.getId()];null==y?z(v):(this.patchPage(y,this.diffPages([y],[v]),x[y.getId()],u),k&&(y.needsUpdate=!0))});z();for(g in e)z(c[e[g]]),delete e[g];for(g in D)C(D[g]), -delete D[g];return B};EditorUi.prototype.patchViewState=function(b,f){if(null!=b.viewState&&null!=f){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var k in f)try{this.patchViewStateProperty(b,f,k)}catch(d){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,f,k){b.viewState[k]=JSON.parse(f[k])}; -EditorUi.prototype.createParentLookup=function(b,f){function k(c){var e=d[c];null==e&&(e={inserted:[],moved:{}},d[c]=e);return e}var d={};if(null!=f[EditorUi.DIFF_INSERT])for(var u=0;u<f[EditorUi.DIFF_INSERT].length;u++){var x=f[EditorUi.DIFF_INSERT][u],B=null!=x.parent?x.parent:"",D=null!=x.previous?x.previous:"";k(B).inserted[D]=x}if(null!=f[EditorUi.DIFF_UPDATE])for(var K in f[EditorUi.DIFF_UPDATE])x=f[EditorUi.DIFF_UPDATE][K],null!=x.previous&&(B=x.parent,null==B&&(u=b.getCell(K),null!=u&&(u= -b.getParent(u),null!=u&&(B=u.getId()))),null!=B&&(k(B).moved[x.previous]=K));return d}; -EditorUi.prototype.patchPage=function(b,f,k,d){var u=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),x=this.createParentLookup(u,f);u.beginUpdate();try{var B=u.updateEdgeParent,D=new mxDictionary,K=[];u.updateEdgeParent=function(C,v){!D.get(C)&&d&&(D.put(C,!0),K.push(C))};var c=x[""],e=null!=c&&null!=c.inserted?c.inserted[""]:null,g=null;null!=e&&(g=this.getCellForJson(e));if(null==g){var q=null!=c&&null!=c.moved?c.moved[""]:null;null!=q&&(g=u.getCell(q))}null!=g&&(u.setRoot(g), -b.root=g);this.patchCellRecursive(b,u,u.root,x,f);if(null!=f[EditorUi.DIFF_REMOVE])for(var m=0;m<f[EditorUi.DIFF_REMOVE].length;m++){var n=u.getCell(f[EditorUi.DIFF_REMOVE][m]);null!=n&&u.remove(n)}if(null!=f[EditorUi.DIFF_UPDATE]){var z=null!=k&&null!=k.cells?k.cells[EditorUi.DIFF_UPDATE]:null;for(q in f[EditorUi.DIFF_UPDATE])this.patchCell(u,u.getCell(q),f[EditorUi.DIFF_UPDATE][q],null!=z?z[q]:null)}if(null!=f[EditorUi.DIFF_INSERT])for(m=0;m<f[EditorUi.DIFF_INSERT].length;m++)e=f[EditorUi.DIFF_INSERT][m], -n=u.getCell(e.id),null!=n&&(u.setTerminal(n,u.getCell(e.source),!0),u.setTerminal(n,u.getCell(e.target),!1));u.updateEdgeParent=B;if(d&&0<K.length)for(m=0;m<K.length;m++)u.contains(K[m])&&u.updateEdgeParent(K[m])}finally{u.endUpdate()}}; -EditorUi.prototype.patchCellRecursive=function(b,f,k,d,u){if(null!=k){var x=d[k.getId()],B=null!=x&&null!=x.inserted?x.inserted:{};x=null!=x&&null!=x.moved?x.moved:{};for(var D=0,K=f.getChildCount(k),c="",e=0;e<K;e++){var g=f.getChildAt(k,e).getId();null==x[c]&&(null==u[EditorUi.DIFF_UPDATE]||null==u[EditorUi.DIFF_UPDATE][g]||null==u[EditorUi.DIFF_UPDATE][g].previous&&null==u[EditorUi.DIFF_UPDATE][g].parent)&&(x[c]=g);c=g}K=mxUtils.bind(this,function(q,m){var n=null!=q?q.getId():"";null!=q&&m&&(m= -f.getCell(n),null!=m&&m!=q&&(q=null));null!=q&&(f.getChildAt(k,D)!=q&&f.add(k,q,D),this.patchCellRecursive(b,f,q,d,u),D++);return n});for(c=[null];0<c.length;)if(e=c.shift(),e=K(null!=e?e.child:null,null!=e?e.insert:!1),g=x[e],null!=g&&(delete x[e],c.push({child:f.getCell(g)})),g=B[e],null!=g&&(delete B[e],c.push({child:this.getCellForJson(g),insert:!0})),0==c.length){for(e in x)c.push({child:f.getCell(x[e])}),delete x[e];for(e in B)c.push({child:this.getCellForJson(B[e]),insert:!0}),delete B[e]}}}; -EditorUi.prototype.patchCell=function(b,f,k,d){if(null!=f&&null!=k){if(null==d||null==d.xmlValue&&(null==d.value||""==d.value))"value"in k?b.setValue(f,k.value):null!=k.xmlValue&&b.setValue(f,mxUtils.parseXml(k.xmlValue).documentElement);null!=d&&null!=d.style||null==k.style||b.setStyle(f,k.style);null!=k.visible&&b.setVisible(f,1==k.visible);null!=k.collapsed&&b.setCollapsed(f,1==k.collapsed);null!=k.vertex&&(f.vertex=1==k.vertex);null!=k.edge&&(f.edge=1==k.edge);null!=k.connectable&&(f.connectable= +F&&S.mergeFile(new LocalFile(this,F),function(){z.postMessage(JSON.stringify({event:"merge",message:y}),"*")},function(Y){z.postMessage(JSON.stringify({event:"merge",message:y,error:Y}),"*")}))}else"remoteInvokeReady"==y.action?this.handleRemoteInvokeReady(z):"remoteInvoke"==y.action?this.handleRemoteInvoke(y,x.origin):"remoteInvokeResponse"==y.action?this.handleRemoteInvokeResponse(y):z.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(y)}),"*");return}}catch(Y){this.handleError(Y)}}var X= +mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),aa=mxUtils.bind(this,function(Y,Z){g=!0;try{c(Y,Z,null,t)}catch(ba){this.handleError(ba)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");m=X();q&&null==d&&(d=mxUtils.bind(this,function(ba,ha){ba=X();ba==m||g||(ha=this.createLoadMessage("autosave"),ha.xml=ba,(window.opener||window.parent).postMessage(JSON.stringify(ha),"*"));m=ba}), +this.editor.graph.model.addListener(mxEvent.CHANGE,d),this.editor.graph.addListener("gridSizeChanged",d),this.editor.graph.addListener("shadowVisibleChanged",d),this.addListener("pageFormatChanged",d),this.addListener("pageScaleChanged",d),this.addListener("backgroundColorChanged",d),this.addListener("backgroundImageChanged",d),this.addListener("foldingEnabledChanged",d),this.addListener("mathEnabledChanged",d),this.addListener("gridEnabledChanged",d),this.addListener("guidesEnabledChanged",d),this.addListener("pageViewChanged", +d));if("1"==urlParams.returnbounds||"json"==urlParams.proto)Z=this.createLoadMessage("load"),Z.xml=Y,z.postMessage(JSON.stringify(Z),"*");null!=I&&I()});null!=y&&"function"===typeof y.substring&&"data:application/vnd.visio;base64,"==y.substring(0,34)?(N="0M8R4KGxGuE"==y.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(y.substring(y.indexOf(",")+1)),function(Y){aa(Y,x)},mxUtils.bind(this,function(Y){this.handleError(Y)}),N)):null!=y&&"function"===typeof y.substring&&(new XMLHttpRequest).upload&& +this.isRemoteFileFormat(y,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(y,mxUtils.bind(this,function(Y){4==Y.readyState&&200<=Y.status&&299>=Y.status&&"<mxGraphModel"==Y.responseText.substring(0,13)&&aa(Y.responseText,x)}),""):null!=y&&"function"===typeof y.substring&&this.isLucidChartData(y)?this.convertLucidChart(y,mxUtils.bind(this,function(Y){aa(Y)}),mxUtils.bind(this,function(Y){this.handleError(Y)})):null==y||"object"!==typeof y|| +null==y.format||null==y.data&&null==y.url?(y=N(y),aa(y,x)):this.loadDescriptor(y,mxUtils.bind(this,function(Y){aa(X(),x)}),mxUtils.bind(this,function(Y){this.handleError(Y,mxResources.get("errorLoadingFile"))}))}}));var z=window.opener||window.parent;n="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";z.postMessage(n,"*");if("json"==urlParams.proto){var C=this.editor.graph.openLink;this.editor.graph.openLink=function(x,y,I){C.apply(this,arguments);z.postMessage(JSON.stringify({event:"openLink", +href:x,target:y,allowOpener:I}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var c=document.createElement("div");c.style.display="inline-block";c.style.position="absolute";c.style.paddingTop="2px";c.style.paddingLeft="8px";c.style.paddingBottom="2px";c.style.marginRight="12px";c.style.right="atlas"==uiTheme||"1"==urlParams.atlas||"1"==urlParams["live-ui"]?"52px":"72px";var d=document.createElement("button");d.className="geBigButton";if("1"== +urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var g="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(d,g);d.setAttribute("title",g);mxEvent.addListener(d,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));c.appendChild(d)}}else mxUtils.write(d,mxResources.get("save")),d.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(d,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})), +c.appendChild(d),"1"==urlParams.saveAndExit&&(d=document.createElement("a"),mxUtils.write(d,mxResources.get("saveAndExit")),d.setAttribute("title",mxResources.get("saveAndExit")),d.className="geBigButton geBigStandardButton",d.style.marginLeft="6px",mxEvent.addListener(d,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),c.appendChild(d));"1"!=urlParams.noExitBtn&&(d=document.createElement("a"),g="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"), +mxUtils.write(d,g),d.setAttribute("title",g),d.className="geBigButton geBigStandardButton",d.style.marginLeft="6px",mxEvent.addListener(d,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),c.appendChild(d));this.toolbar.container.appendChild(c);this.toolbar.staticElements.push(c)}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(c){this.importCsv(c)}), +null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(c){var d=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();c()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?d():this.spinner.spin(document.body,mxResources.get("loading"))&& +(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",d)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",d))};EditorUi.prototype.importCsv=function(c,d){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,d)}))};EditorUi.prototype.doImportCsv=function(c,d){try{var g=c.split("\n"), +q=[],m=[],n=[],z={};if(0<g.length){var C={},x=this.editor.graph,y=null,I=null,N=null,t=null,p=null,F=null,K=null,D="whiteSpace=wrap;html=1;",H=null,J=null,G="",P="auto",T="auto",W=!1,U=null,V=null,l=40,A=40,M=100,Q=0,O=mxUtils.bind(this,function(){null!=d?d(ua):(x.setSelectionCells(ua),x.scrollCellToVisible(x.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),R=x.getFreeInsertPoint(),S=R.x,X=R.y;R=X;var aa=null,Y="auto"; +J=null;for(var Z=[],ba=null,ha=null,ma=0;ma<g.length&&"#"==g[ma].charAt(0);){c=g[ma].replace(/\r$/,"");for(ma++;ma<g.length&&"\\"==c.charAt(c.length-1)&&"#"==g[ma].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(g[ma].substring(1)),ma++;if("#"!=c.charAt(1)){var ia=c.indexOf(":");if(0<ia){var qa=mxUtils.trim(c.substring(1,ia)),la=mxUtils.trim(c.substring(ia+1));"label"==qa?aa=x.sanitizeHtml(la):"labelname"==qa&&0<la.length&&"-"!=la?p=la:"labels"==qa&&0<la.length&&"-"!=la?K=JSON.parse(la):"style"== +qa?I=la:"parentstyle"==qa?D=la:"unknownStyle"==qa&&"-"!=la?F=la:"stylename"==qa&&0<la.length&&"-"!=la?t=la:"styles"==qa&&0<la.length&&"-"!=la?N=JSON.parse(la):"vars"==qa&&0<la.length&&"-"!=la?y=JSON.parse(la):"identity"==qa&&0<la.length&&"-"!=la?H=la:"parent"==qa&&0<la.length&&"-"!=la?J=la:"namespace"==qa&&0<la.length&&"-"!=la?G=la:"width"==qa?P=la:"height"==qa?T=la:"collapsed"==qa&&"-"!=la?W="true"==la:"left"==qa&&0<la.length?U=la:"top"==qa&&0<la.length?V=la:"ignore"==qa?ha=la.split(","):"connect"== +qa?Z.push(JSON.parse(la)):"link"==qa?ba=la:"padding"==qa?Q=parseFloat(la):"edgespacing"==qa?l=parseFloat(la):"nodespacing"==qa?A=parseFloat(la):"levelspacing"==qa?M=parseFloat(la):"layout"==qa&&(Y=la)}}}if(null==g[ma])throw Error(mxResources.get("invalidOrMissingFile"));var Ca=this.editor.csvToArray(g[ma].replace(/\r$/,""));ia=c=null;qa=[];for(la=0;la<Ca.length;la++)H==Ca[la]&&(c=la),J==Ca[la]&&(ia=la),qa.push(mxUtils.trim(Ca[la]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,"")); +null==aa&&(aa="%"+qa[0]+"%");if(null!=Z)for(var Da=0;Da<Z.length;Da++)null==C[Z[Da].to]&&(C[Z[Da].to]={});H=[];for(la=ma+1;la<g.length;la++){var ya=this.editor.csvToArray(g[la].replace(/\r$/,""));if(null==ya){var Pa=40<g[la].length?g[la].substring(0,40)+"...":g[la];throw Error(Pa+" ("+la+"):\n"+mxResources.get("containsValidationErrors"));}0<ya.length&&H.push(ya)}x.model.beginUpdate();try{for(la=0;la<H.length;la++){ya=H[la];var za=null,Fa=null!=c?G+ya[c]:null;g=!1;null!=Fa&&(za=x.model.getCell(Fa), +g=null==za||0<=mxUtils.indexOf(q,za));var Ia=new mxCell(aa,new mxGeometry(S,R,0,0),I||"whiteSpace=wrap;html=1;");Ia.collapsed=W;Ia.vertex=!0;Ia.id=Fa;null==za||g||x.model.setCollapsed(za,W);for(var Ba=0;Ba<ya.length;Ba++)x.setAttributeForCell(Ia,qa[Ba],ya[Ba]),null==za||g||x.setAttributeForCell(za,qa[Ba],ya[Ba]);if(null!=p&&null!=K){var Ga=K[Ia.getAttribute(p)];null!=Ga&&(x.labelChanged(Ia,Ga),null==za||g||x.cellLabelChanged(za,Ga))}if(null!=t&&null!=N){var na=N[Ia.getAttribute(t)];null!=na&&(Ia.style= +na)}x.setAttributeForCell(Ia,"placeholders","1");Ia.style=x.replacePlaceholders(Ia,Ia.style,y);null==za||g?x.fireEvent(new mxEventObject("cellsInserted","cells",[Ia])):(x.model.setStyle(za,Ia.style),0>mxUtils.indexOf(n,za)&&n.push(za),x.fireEvent(new mxEventObject("cellsInserted","cells",[za])));g=null!=za;za=Ia;if(!g)for(Da=0;Da<Z.length;Da++)C[Z[Da].to][za.getAttribute(Z[Da].to)]=za;null!=ba&&"link"!=ba&&(x.setLinkForCell(za,za.getAttribute(ba)),x.setAttributeForCell(za,ba,null));var Ea=this.editor.graph.getPreferredSizeForCell(za); +J=null!=ia?x.model.getCell(G+ya[ia]):null;if(za.vertex){Pa=null!=J?0:S;ma=null!=J?0:X;null!=U&&null!=za.getAttribute(U)&&(za.geometry.x=Pa+parseFloat(za.getAttribute(U)));null!=V&&null!=za.getAttribute(V)&&(za.geometry.y=ma+parseFloat(za.getAttribute(V)));var wa="@"==P.charAt(0)?za.getAttribute(P.substring(1)):null;za.geometry.width=null!=wa&&"auto"!=wa?parseFloat(za.getAttribute(P.substring(1))):"auto"==P||"auto"==wa?Ea.width+Q:parseFloat(P);var La="@"==T.charAt(0)?za.getAttribute(T.substring(1)): +null;za.geometry.height=null!=La&&"auto"!=La?parseFloat(La):"auto"==T||"auto"==La?Ea.height+Q:parseFloat(T);R+=za.geometry.height+A}g?(null==z[Fa]&&(z[Fa]=[]),z[Fa].push(za)):(q.push(za),null!=J?(J.style=x.replacePlaceholders(J,D,y),x.addCell(za,J),m.push(J)):n.push(x.addCell(za)))}for(la=0;la<m.length;la++)wa="@"==P.charAt(0)?m[la].getAttribute(P.substring(1)):null,La="@"==T.charAt(0)?m[la].getAttribute(T.substring(1)):null,"auto"!=P&&"auto"!=wa||"auto"!=T&&"auto"!=La||x.updateGroupBounds([m[la]], +Q,!0);var ka=n.slice(),ua=n.slice();for(Da=0;Da<Z.length;Da++){var sa=Z[Da];for(la=0;la<q.length;la++){za=q[la];var va=mxUtils.bind(this,function(Ha,Ma,Ra){var Ja=Ma.getAttribute(Ra.from);if(null!=Ja&&""!=Ja){Ja=Ja.split(",");for(var Oa=0;Oa<Ja.length;Oa++){var Qa=C[Ra.to][Ja[Oa]];if(null==Qa&&null!=F){Qa=new mxCell(Ja[Oa],new mxGeometry(S,X,0,0),F);Qa.style=x.replacePlaceholders(Ma,Qa.style,y);var Na=this.editor.graph.getPreferredSizeForCell(Qa);Qa.geometry.width=Na.width+Q;Qa.geometry.height=Na.height+ +Q;C[Ra.to][Ja[Oa]]=Qa;Qa.vertex=!0;Qa.id=Ja[Oa];n.push(x.addCell(Qa))}if(null!=Qa){Na=Ra.label;null!=Ra.fromlabel&&(Na=(Ma.getAttribute(Ra.fromlabel)||"")+(Na||""));null!=Ra.sourcelabel&&(Na=x.replacePlaceholders(Ma,Ra.sourcelabel,y)+(Na||""));null!=Ra.tolabel&&(Na=(Na||"")+(Qa.getAttribute(Ra.tolabel)||""));null!=Ra.targetlabel&&(Na=(Na||"")+x.replacePlaceholders(Qa,Ra.targetlabel,y));var Sa="target"==Ra.placeholders==!Ra.invert?Qa:Ha;Sa=null!=Ra.style?x.replacePlaceholders(Sa,Ra.style,y):x.createCurrentEdgeStyle(); +Na=x.insertEdge(null,null,Na||"",Ra.invert?Qa:Ha,Ra.invert?Ha:Qa,Sa);if(null!=Ra.labels)for(Sa=0;Sa<Ra.labels.length;Sa++){var Ua=Ra.labels[Sa],Ka=new mxCell(Ua.label||Sa,new mxGeometry(null!=Ua.x?Ua.x:0,null!=Ua.y?Ua.y:0,0,0),"resizable=0;html=1;");Ka.vertex=!0;Ka.connectable=!1;Ka.geometry.relative=!0;null!=Ua.placeholders&&(Ka.value=x.replacePlaceholders("target"==Ua.placeholders==!Ra.invert?Qa:Ha,Ka.value,y));if(null!=Ua.dx||null!=Ua.dy)Ka.geometry.offset=new mxPoint(null!=Ua.dx?Ua.dx:0,null!= +Ua.dy?Ua.dy:0);Na.insert(Ka)}ua.push(Na);mxUtils.remove(Ra.invert?Ha:Qa,ka)}}}});va(za,za,sa);if(null!=z[za.id])for(Ba=0;Ba<z[za.id].length;Ba++)va(za,z[za.id][Ba],sa)}}if(null!=ha)for(la=0;la<q.length;la++)for(za=q[la],Ba=0;Ba<ha.length;Ba++)x.setAttributeForCell(za,mxUtils.trim(ha[Ba]),null);if(0<n.length){var ca=new mxParallelEdgeLayout(x);ca.spacing=l;ca.checkOverlap=!0;var ea=function(){0<ca.spacing&&ca.execute(x.getDefaultParent());for(var Ha=0;Ha<n.length;Ha++){var Ma=x.getCellGeometry(n[Ha]); +Ma.x=Math.round(x.snap(Ma.x));Ma.y=Math.round(x.snap(Ma.y));"auto"==P&&(Ma.width=Math.round(x.snap(Ma.width)));"auto"==T&&(Ma.height=Math.round(x.snap(Ma.height)))}};if("["==Y.charAt(0)){var da=O;x.view.validate();this.executeLayouts(x.createLayouts(JSON.parse(Y)),function(){ea();da()});O=null}else if("circle"==Y){var fa=new mxCircleLayout(x);fa.disableEdgeStyle=!1;fa.resetEdges=!1;var ja=fa.isVertexIgnored;fa.isVertexIgnored=function(Ha){return ja.apply(this,arguments)||0>mxUtils.indexOf(n,Ha)}; +this.executeLayout(function(){fa.execute(x.getDefaultParent());ea()},!0,O);O=null}else if("horizontaltree"==Y||"verticaltree"==Y||"auto"==Y&&ua.length==2*n.length-1&&1==ka.length){x.view.validate();var ra=new mxCompactTreeLayout(x,"horizontaltree"==Y);ra.levelDistance=A;ra.edgeRouting=!1;ra.resetEdges=!1;this.executeLayout(function(){ra.execute(x.getDefaultParent(),0<ka.length?ka[0]:null)},!0,O);O=null}else if("horizontalflow"==Y||"verticalflow"==Y||"auto"==Y&&1==ka.length){x.view.validate();var oa= +new mxHierarchicalLayout(x,"horizontalflow"==Y?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);oa.intraCellSpacing=A;oa.parallelEdgeSpacing=l;oa.interRankCellSpacing=M;oa.disableEdgeStyle=!1;this.executeLayout(function(){oa.execute(x.getDefaultParent(),ua);x.moveCells(ua,S,X)},!0,O);O=null}else if("orgchart"==Y){x.view.validate();var Aa=new mxOrgChartLayout(x,2,M,A),xa=Aa.isVertexIgnored;Aa.isVertexIgnored=function(Ha){return xa.apply(this,arguments)||0>mxUtils.indexOf(n,Ha)};this.executeLayout(function(){Aa.execute(x.getDefaultParent()); +ea()},!0,O);O=null}else if("organic"==Y||"auto"==Y&&ua.length>n.length){x.view.validate();var ta=new mxFastOrganicLayout(x);ta.forceConstant=3*A;ta.disableEdgeStyle=!1;ta.resetEdges=!1;var pa=ta.isVertexIgnored;ta.isVertexIgnored=function(Ha){return pa.apply(this,arguments)||0>mxUtils.indexOf(n,Ha)};this.executeLayout(function(){ta.execute(x.getDefaultParent());ea()},!0,O);O=null}}this.hideDialog()}finally{x.model.endUpdate()}null!=O&&O()}}catch(Ha){this.handleError(Ha)}};EditorUi.prototype.getSearch= +function(c){var d="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var g="?",q;for(q in urlParams)0>mxUtils.indexOf(c,q)&&null!=urlParams[q]&&(d+=g+q+"="+urlParams[q],g="&")}else d=window.location.search;return d};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var d=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "), +q;for(q in urlParams)0>mxUtils.indexOf(g,q)&&(c=0==d?c+"?":c+"&",null!=urlParams[q]&&(c+=q+"="+urlParams[q],d++))}return c};EditorUi.prototype.showLinkDialog=function(c,d,g,q,m){c=new LinkDialog(this,c,d,g,!0,q,m);this.showDialog(c.container,560,130,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var d=1;null==this.drive&&"function"!==typeof window.DriveClient||d++;null==this.dropbox&&"function"!==typeof window.DropboxClient||d++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient|| +d++;null!=this.gitHub&&d++;null!=this.gitLab&&d++;c&&isLocalStorage&&"1"==urlParams.browser&&d++;return d};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),d=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(d);this.menus.get("viewZoom").setEnabled(d);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==c||c.isRestricted());this.actions.get("makeCopy").setEnabled(!g); +this.actions.get("print").setEnabled(!g);this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));c="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=c&&c.isEditable();this.actions.get("image").setEnabled(d);this.actions.get("zoomIn").setEnabled(d);this.actions.get("zoomOut").setEnabled(d); +this.actions.get("resetView").setEnabled(d);this.actions.get("toggleDarkMode").setEnabled("atlas"!=uiTheme);this.actions.get("undo").setEnabled(this.canUndo()&&c);this.actions.get("redo").setEnabled(this.canRedo()&&c);this.menus.get("edit").setEnabled(d);this.menus.get("view").setEnabled(d);this.menus.get("importFrom").setEnabled(c);this.menus.get("arrange").setEnabled(c);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(c),null!=this.toolbar.edgeStyleMenu&& +this.toolbar.edgeStyleMenu.setEnabled(c));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var c=this.getCurrentFile();return null!=c&&c.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var B=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar= +function(c){var d=B.apply(this,arguments);this.addListener("darkModeChanged",mxUtils.bind(this,function(){d.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){d.refresh()}));return d};var E=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){E.apply(this,arguments);var c=this.editor.graph,d=this.getCurrentFile(),g=this.getSelectionState(),q=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(q);this.actions.get("autosave").setEnabled(null!= +d&&d.isEditable()&&d.isAutosaveOptional());this.actions.get("guides").setEnabled(q);this.actions.get("editData").setEnabled(c.isEnabled());this.actions.get("shadowVisible").setEnabled(q);this.actions.get("connectionArrows").setEnabled(q);this.actions.get("connectionPoints").setEnabled(q);this.actions.get("copyStyle").setEnabled(q&&!c.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(q&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(q); +this.actions.get("createRevision").setEnabled(q);this.actions.get("moveToFolder").setEnabled(null!=d);this.actions.get("makeCopy").setEnabled(null!=d&&!d.isRestricted());this.actions.get("editDiagram").setEnabled(q&&(null==d||!d.isRestricted()));this.actions.get("publishLink").setEnabled(null!=d&&!d.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!= +this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=d&&d.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=d);this.menus.get("publish").setEnabled(null!=d&&!d.isRestricted());d=this.actions.get("findReplace");d.setEnabled("hidden"!=this.diagramContainer.style.visibility);d.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(q&&null!= +c&&null!=c.shape&&null!=c.shape.stencil)};var L=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);L.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,d,g,q,m,n,z,C){var x=c.editor.graph;if("xml"==g)c.hideDialog(),c.saveData(d,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml"); +else if("svg"==g)c.hideDialog(),c.saveData(d,"svg",mxUtils.getXml(x.getSvg(q,m,n)),"image/svg+xml");else{var y=c.getFileData(!0,null,null,null,null,!0),I=x.getGraphBounds(),N=Math.floor(I.width*m/x.view.scale),t=Math.floor(I.height*m/x.view.scale);if(y.length<=MAX_REQUEST_SIZE&&N*t<MAX_AREA)if(c.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!c.isExportToCanvas()){var p={globalVars:x.getExportVariables()};C&&(p.grid={size:x.gridSize,steps:x.view.gridSteps,color:x.view.gridColor});c.saveRequest(d,g,function(F, +K){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(K||"0")+(null!=F?"&filename="+encodeURIComponent(F):"")+"&extras="+encodeURIComponent(JSON.stringify(p))+(0<z?"&dpi="+z:"")+"&bg="+(null!=q?q:"none")+"&w="+N+"&h="+t+"&border="+n+"&xml="+encodeURIComponent(y))})}else"png"==g?c.exportImage(m,null==q||"none"==q,!0,!1,!1,n,!0,!1,null,C,z):c.exportImage(m,!1,!0,!1,!1,n,!0,!1,"jpeg",C);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1); +var c=this.editor.graph,d="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var q=c;this.currentPage!=this.pages[g]&&(q=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[g]),q.model.setRoot(this.pages[g].root));d+=this.pages[g].getName()+" "+q.getIndexableText()+" "}else d=c.getIndexableText();this.editor.graph.setEnabled(!0);return d};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var d={},g=document.createElement("div");g.style.whiteSpace="nowrap";var q= +document.createElement("h3");mxUtils.write(q,mxUtils.htmlEntities(c));q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(q);var m=document.createElement("div");m.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";m.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var n={};try{var z=mxSettings.getCustomLibraries();for(c=0;c<z.length;c++){var C=z[c];if("R"==C.substring(0,1)){var x=JSON.parse(decodeURIComponent(C.substring(1))); +n[x[0]]={id:x[0],title:x[1],downloadUrl:x[2]}}}}catch(y){}this.remoteInvoke("getCustomLibraries",null,null,function(y){m.innerText="";if(0==y.length)m.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var I=0;I<y.length;I++){var N=y[I];n[N.id]&&(d[N.id]=N);var t=this.addCheckbox(m,N.title,n[N.id]);(function(p,F){mxEvent.addListener(F,"change",function(){this.checked?d[p.id]=p:delete d[p.id]})})(N,t)}},mxUtils.bind(this, +function(y){m.innerText="";var I=document.createElement("div");I.style.padding="8px";I.style.textAlign="center";mxUtils.write(I,mxResources.get("error")+": ");mxUtils.write(I,null!=y&&null!=y.message?y.message:mxResources.get("unknownError"));m.appendChild(I)}));g.appendChild(m);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var y=0,I;for(I in d)null==n[I]&&(y++,mxUtils.bind(this,function(N){this.remoteInvoke("getFileContent",[N.downloadUrl], +null,mxUtils.bind(this,function(t){y--;0==y&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,t,N))}catch(p){this.handleError(p,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){y--;0==y&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(d[I]));for(I in n)d[I]||this.closeLibrary(new RemoteLibrary(this,null,n[I]));0==y&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(g.container, +340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(c){this.remoteWin=c;for(var d=0;d<this.remoteInvokeQueue.length;d++)c.postMessage(this.remoteInvokeQueue[d], +"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var d=c.msgMarkers,g=this.remoteInvokeCallbacks[d.callbackId];if(null==g)throw Error("No callback for "+(null!=d?d.callbackId:"null"));c.error?g.error&&g.error(c.error.errResp):g.callback&&g.callback.apply(this,c.resp);this.remoteInvokeCallbacks[d.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,d,g,q,m){var n=!0,z=window.setTimeout(mxUtils.bind(this,function(){n=!1;m({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}), +this.timeout),C=mxUtils.bind(this,function(){window.clearTimeout(z);n&&q.apply(this,arguments)}),x=mxUtils.bind(this,function(){window.clearTimeout(z);n&&m.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:C,error:x});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:d,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c, +d){var g=mxUtils.bind(this,function(y,I){var N={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=I?N.error={errResp:I}:null!=y&&(N.resp=y);this.remoteWin.postMessage(JSON.stringify(N),"*")});try{var q=c.funtionName,m=this.remoteInvokableFns[q];if(null!=m&&"function"===typeof this[q]){if(m.allowedDomains){for(var n=!1,z=0;z<m.allowedDomains.length;z++)if(d=="https://"+m.allowedDomains[z]){n=!0;break}if(!n){g(null,"Invalid Call: "+q+" is not allowed.");return}}var C=c.functionArgs;Array.isArray(C)|| +(C=[]);if(m.isAsync)C.push(function(){g(Array.prototype.slice.apply(arguments))}),C.push(function(y){g(null,y||"Unkown Error")}),this[q].apply(this,C);else{var x=this[q].apply(this,C);g([x])}}else g(null,"Invalid Call: "+q+" is not found.")}catch(y){g(null,"Invalid Call: An error occurred, "+y.message)}};EditorUi.prototype.openDatabase=function(c,d){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var q=g.open("database",2);q.onupgradeneeded= +function(m){try{var n=q.result;1>m.oldVersion&&n.createObjectStore("objects",{keyPath:"key"});2>m.oldVersion&&(n.createObjectStore("files",{keyPath:"title"}),n.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(z){null!=d&&d(z)}};q.onsuccess=mxUtils.bind(this,function(m){var n=q.result;this.database=n;EditorUi.migrateStorageFiles&&(StorageFile.migrate(n),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted|| +(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(z){if(!z||"1"==urlParams.forceMigration){var C=document.createElement("iframe");C.style.display="none";C.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(C);var x=!0,y=!1,I,N=0,t=mxUtils.bind(this,function(){y=!0;this.setDatabaseItem(".drawioMigrated3",!0);C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke", +funtionName:"setMigratedFlag"}),"*")}),p=mxUtils.bind(this,function(){N++;F()}),F=mxUtils.bind(this,function(){try{if(N>=I.length)t();else{var D=I[N];StorageFile.getFileContent(this,D,mxUtils.bind(this,function(H){null==H||".scratchpad"==D&&H==this.emptyLibraryXml?C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[D]}),"*"):p()}),p)}}catch(H){console.log(H)}}),K=mxUtils.bind(this,function(D){try{this.setDatabaseItem(null,[{title:D.title, +size:D.data.length,lastModified:Date.now(),type:D.isLib?"L":"F"},{title:D.title,data:D.data}],p,p,["filesInfo","files"])}catch(H){console.log(H)}});z=mxUtils.bind(this,function(D){try{if(D.source==C.contentWindow){var H={};try{H=JSON.parse(D.data)}catch(J){}"init"==H.event?(C.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=H.event||y|| +(x?null!=H.resp&&0<H.resp.length&&null!=H.resp[0]?(I=H.resp[0],x=!1,F()):t():null!=H.resp&&0<H.resp.length&&null!=H.resp[0]?K(H.resp[0]):p())}}catch(J){console.log(J)}});window.addEventListener("message",z)}})));c(n);n.onversionchange=function(){n.close()}});q.onerror=d;q.onblocked=function(){}}catch(m){null!=d&&d(m)}else null!=d&&d()}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,d,g,q,m){this.openDatabase(mxUtils.bind(this,function(n){try{m=m||"objects";Array.isArray(m)||(m= +[m],c=[c],d=[d]);var z=n.transaction(m,"readwrite");z.oncomplete=g;z.onerror=q;for(n=0;n<m.length;n++)z.objectStore(m[n]).put(null!=c&&null!=c[n]?{key:c[n],data:d[n]}:d[n])}catch(C){null!=q&&q(C)}}),q)};EditorUi.prototype.removeDatabaseItem=function(c,d,g,q){this.openDatabase(mxUtils.bind(this,function(m){q=q||"objects";Array.isArray(q)||(q=[q],c=[c]);m=m.transaction(q,"readwrite");m.oncomplete=d;m.onerror=g;for(var n=0;n<q.length;n++)m.objectStore(q[n]).delete(c[n])}),g)};EditorUi.prototype.getDatabaseItem= +function(c,d,g,q){this.openDatabase(mxUtils.bind(this,function(m){try{q=q||"objects";var n=m.transaction([q],"readonly").objectStore(q).get(c);n.onsuccess=function(){d(n.result)};n.onerror=g}catch(z){null!=g&&g(z)}}),g)};EditorUi.prototype.getDatabaseItems=function(c,d,g){this.openDatabase(mxUtils.bind(this,function(q){try{g=g||"objects";var m=q.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),n=[];m.onsuccess=function(z){null==z.target.result?c(n):(n.push(z.target.result.value), +z.target.result.continue())};m.onerror=d}catch(z){null!=d&&d(z)}}),d)};EditorUi.prototype.getDatabaseItemKeys=function(c,d,g){this.openDatabase(mxUtils.bind(this,function(q){try{g=g||"objects";var m=q.transaction([g],"readonly").objectStore(g).getAllKeys();m.onsuccess=function(){c(m.result)};m.onerror=d}catch(n){null!=d&&d(n)}}),d)};EditorUi.prototype.commentsSupported=function(){var c=this.getCurrentFile();return null!=c?c.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var c= +this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(c,d){var g=this.getCurrentFile();null!=g?g.getComments(c,d):c([])};EditorUi.prototype.addComment=function(c,d,g){var q=this.getCurrentFile();null!=q?q.addComment(c,d,g):d(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var c=this.getCurrentFile();return null!=c? +c.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,d){var g=this.getCurrentFile();return null!=g?g.newComment(c,d):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,d)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,d){var g=this.getCurrentFile();null!= +g&&g.getRevisions?g.getRevisions(c,d):d({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,d,g,q,m,n,z,C){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl"); +return this.editor.loadUrl(c,d,g,q,m,n,z,C)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,d)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts"); +return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,d,g,q,m,n,z,C,x,y,I,N,t,p,F,K){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,d,g,q,m,n,z,C,x,y,I,N,t,p,F,K)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,d,g,q){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages"); +return this.editor.convertImages(c,d,g,q)};EditorUi.prototype.convertImageToDataUri=function(c,d){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,d)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,d,g,q){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,d,g,q)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32"); +return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,d,g,q,m){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,d,g,q,m)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],d=0;d<localStorage.length;d++){var g=localStorage.key(d),q=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<q.length){var m= +"<mxfile "===q.substring(0,8)||"<?xml"===q.substring(0,5)||"\x3c!--[if IE]>"===q.substring(0,12);q="<mxlibrary>"===q.substring(0,11);(m||q)&&c.push(g)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var d=localStorage.getItem(c);return{title:c,data:d,isLib:"<mxlibrary>"===d.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})(); +var CommentsWindow=function(b,f,k,e,u,v){function B(){for(var D=y.getElementsByTagName("div"),H=0,J=0;J<D.length;J++)"none"!=D[J].style.display&&D[J].parentNode==y&&H++;I.style.display=0==H?"block":"none"}function E(D,H,J,G){function P(){H.removeChild(U);H.removeChild(V);W.style.display="block";T.style.display="block"}z={div:H,comment:D,saveCallback:J,deleteOnCancel:G};var T=H.querySelector(".geCommentTxt"),W=H.querySelector(".geCommentActionsList"),U=document.createElement("textarea");U.className= +"geCommentEditTxtArea";U.style.minHeight=T.offsetHeight+"px";U.value=D.content;H.insertBefore(U,T);var V=document.createElement("div");V.className="geCommentEditBtns";var l=mxUtils.button(mxResources.get("cancel"),function(){G?(H.parentNode.removeChild(H),B()):P();z=null});l.className="geCommentEditBtn";V.appendChild(l);var A=mxUtils.button(mxResources.get("save"),function(){T.innerText="";D.content=U.value;mxUtils.write(T,D.content);P();J(D);z=null});mxEvent.addListener(U,"keydown",mxUtils.bind(this, +function(M){mxEvent.isConsumed(M)||((mxEvent.isControlDown(M)||mxClient.IS_MAC&&mxEvent.isMetaDown(M))&&13==M.keyCode?(A.click(),mxEvent.consume(M)):27==M.keyCode&&(l.click(),mxEvent.consume(M)))}));A.focus();A.className="geCommentEditBtn gePrimaryBtn";V.appendChild(A);H.insertBefore(V,T);W.style.display="none";T.style.display="none";U.focus()}function L(D,H){H.innerText="";D=new Date(D.modifiedDate);var J=b.timeSince(D);null==J&&(J=mxResources.get("lessThanAMinute"));mxUtils.write(H,mxResources.get("timeAgo", +[J],"{1} ago"));H.setAttribute("title",D.toLocaleDateString()+" "+D.toLocaleTimeString())}function c(D){var H=document.createElement("img");H.className="geCommentBusyImg";H.src=IMAGE_PATH+"/spin.gif";D.appendChild(H);D.busyImg=H}function d(D){D.style.border="1px solid red";D.removeChild(D.busyImg)}function g(D){D.style.border="";D.removeChild(D.busyImg)}function q(D,H,J,G,P){function T(O,R,S){var X=document.createElement("li");X.className="geCommentAction";var aa=document.createElement("a");aa.className= +"geCommentActionLnk";mxUtils.write(aa,O);X.appendChild(aa);mxEvent.addListener(aa,"click",function(Y){R(Y,D);Y.preventDefault();mxEvent.consume(Y)});Q.appendChild(X);S&&(X.style.display="none")}function W(){function O(X){R.push(S);if(null!=X.replies)for(var aa=0;aa<X.replies.length;aa++)S=S.nextSibling,O(X.replies[aa])}var R=[],S=V;O(D);return{pdiv:S,replies:R}}function U(O,R,S,X,aa){function Y(){c(ma);D.addReply(ha,function(ia){ha.id=ia;D.replies.push(ha);g(ma);S&&S()},function(ia){Z();d(ma);b.handleError(ia, +null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},X,aa)}function Z(){E(ha,ma,function(ia){Y()},!0)}var ba=W().pdiv,ha=b.newComment(O,b.getCurrentUser());ha.pCommentId=D.id;null==D.replies&&(D.replies=[]);var ma=q(ha,D.replies,ba,G+1);R?Z():Y()}if(P||!D.isResolved){I.style.display="none";var V=document.createElement("div");V.className="geCommentContainer";V.setAttribute("data-commentId",D.id);V.style.marginLeft=20*G+5+"px";D.isResolved&&!Editor.isDarkMode()&&(V.style.backgroundColor= +"ghostWhite");var l=document.createElement("div");l.className="geCommentHeader";var A=document.createElement("img");A.className="geCommentUserImg";A.src=D.user.pictureUrl||Editor.userImage;l.appendChild(A);A=document.createElement("div");A.className="geCommentHeaderTxt";l.appendChild(A);var M=document.createElement("div");M.className="geCommentUsername";mxUtils.write(M,D.user.displayName||"");A.appendChild(M);M=document.createElement("div");M.className="geCommentDate";M.setAttribute("data-commentId", +D.id);L(D,M);A.appendChild(M);V.appendChild(l);l=document.createElement("div");l.className="geCommentTxt";mxUtils.write(l,D.content||"");V.appendChild(l);D.isLocked&&(V.style.opacity="0.5");l=document.createElement("div");l.className="geCommentActions";var Q=document.createElement("ul");Q.className="geCommentActionsList";l.appendChild(Q);m||D.isLocked||0!=G&&!n||T(mxResources.get("reply"),function(){U("",!0)},D.isResolved);A=b.getCurrentUser();null==A||A.id!=D.user.id||m||D.isLocked||(T(mxResources.get("edit"), +function(){function O(){E(D,V,function(){c(V);D.editComment(D.content,function(){g(V)},function(R){d(V);O();b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}O()},D.isResolved),T(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){c(V);D.deleteComment(function(O){if(!0===O){O=V.querySelector(".geCommentTxt");O.innerText="";mxUtils.write(O,mxResources.get("msgDeleted"));var R=V.querySelectorAll(".geCommentAction");for(O= +0;O<R.length;O++)R[O].parentNode.removeChild(R[O]);g(V);V.style.opacity="0.5"}else{R=W(D).replies;for(O=0;O<R.length;O++)y.removeChild(R[O]);for(O=0;O<H.length;O++)if(H[O]==D){H.splice(O,1);break}I.style.display=0==y.getElementsByTagName("div").length?"block":"none"}},function(O){d(V);b.handleError(O,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},D.isResolved));m||D.isLocked||0!=G||T(D.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(O){function R(){var S= +O.target;S.innerText="";D.isResolved=!D.isResolved;mxUtils.write(S,D.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var X=D.isResolved?"none":"",aa=W(D).replies,Y=Editor.isDarkMode()?"transparent":D.isResolved?"ghostWhite":"white",Z=0;Z<aa.length;Z++){aa[Z].style.backgroundColor=Y;for(var ba=aa[Z].querySelectorAll(".geCommentAction"),ha=0;ha<ba.length;ha++)ba[ha]!=S.parentNode&&(ba[ha].style.display=X);p||(aa[Z].style.display="none")}B()}D.isResolved?U(mxResources.get("reOpened")+ +": ",!0,R,!1,!0):U(mxResources.get("markedAsResolved"),!1,R,!0)});V.appendChild(l);null!=J?y.insertBefore(V,J.nextSibling):y.appendChild(V);for(J=0;null!=D.replies&&J<D.replies.length;J++)l=D.replies[J],l.isResolved=D.isResolved,q(l,D.replies,null,G+1,P);null!=z&&(z.comment.id==D.id?(P=D.content,D.content=z.comment.content,E(D,V,z.saveCallback,z.deleteOnCancel),D.content=P):null==z.comment.id&&z.comment.pCommentId==D.id&&(y.appendChild(z.div),E(z.comment,z.div,z.saveCallback,z.deleteOnCancel)));return V}} +var m=!b.canComment(),n=b.canReplyToReplies(),z=null,C=document.createElement("div");C.className="geCommentsWin";C.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var x=EditorUi.compactUi?"26px":"30px",y=document.createElement("div");y.className="geCommentsList";y.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";y.style.bottom=parseInt(x)+7+"px";C.appendChild(y);var I=document.createElement("span");I.style.cssText="display:none;padding-top:10px;text-align:center;"; +mxUtils.write(I,mxResources.get("noCommentsFound"));var N=document.createElement("div");N.className="geToolbarContainer geCommentsToolbar";N.style.height=x;N.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";N.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";x=document.createElement("a");x.className="geButton";if(!m){var t=x.cloneNode();t.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';t.setAttribute("title",mxResources.get("create")+ +"...");mxEvent.addListener(t,"click",function(D){function H(){E(J,G,function(P){c(G);b.addComment(P,function(T){P.id=T;F.push(P);g(G)},function(T){d(G);H();b.handleError(T,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var J=b.newComment("",b.getCurrentUser()),G=q(J,F,null,0);H();D.preventDefault();mxEvent.consume(D)});N.appendChild(t)}t=x.cloneNode();t.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';t.setAttribute("title",mxResources.get("showResolved")); +t.className="geAdaptiveAsset";var p=!1;mxEvent.addListener(t,"click",function(D){this.className=(p=!p)?"geButton geCheckedBtn":"geButton";K();D.preventDefault();mxEvent.consume(D)});N.appendChild(t);b.commentsRefreshNeeded()&&(t=x.cloneNode(),t.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',t.setAttribute("title",mxResources.get("refresh")),t.className="geAdaptiveAsset",mxEvent.addListener(t,"click",function(D){K();D.preventDefault();mxEvent.consume(D)}),N.appendChild(t)); +b.commentsSaveNeeded()&&(x=x.cloneNode(),x.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',x.setAttribute("title",mxResources.get("save")),x.className="geAdaptiveAsset",mxEvent.addListener(x,"click",function(D){v();D.preventDefault();mxEvent.consume(D)}),N.appendChild(x));C.appendChild(N);var F=[],K=mxUtils.bind(this,function(){this.hasError=!1;if(null!=z)try{z.div=z.div.cloneNode(!0);var D=z.div.querySelector(".geCommentEditTxtArea"),H=z.div.querySelector(".geCommentEditBtns"); +z.comment.content=D.value;D.parentNode.removeChild(D);H.parentNode.removeChild(H)}catch(J){b.handleError(J)}y.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";n=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(J){function G(P){if(null!=P){P.sort(function(W,U){return new Date(W.modifiedDate)-new Date(U.modifiedDate)});for(var T=0;T<P.length;T++)G(P[T].replies)}} +J.sort(function(P,T){return new Date(P.modifiedDate)-new Date(T.modifiedDate)});y.innerText="";y.appendChild(I);I.style.display="block";F=J;for(J=0;J<F.length;J++)G(F[J].replies),q(F[J],F,null,0,p);null!=z&&null==z.comment.id&&null==z.comment.pCommentId&&(y.appendChild(z.div),E(z.comment,z.div,z.saveCallback,z.deleteOnCancel))},mxUtils.bind(this,function(J){y.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(J&&J.message?": "+J.message:""));this.hasError=!0})):y.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))}); +K();this.refreshComments=K;N=mxUtils.bind(this,function(){function D(T){var W=J[T.id];if(null!=W)for(L(T,W),W=0;null!=T.replies&&W<T.replies.length;W++)D(T.replies[W])}if(this.window.isVisible()){for(var H=y.querySelectorAll(".geCommentDate"),J={},G=0;G<H.length;G++){var P=H[G];J[P.getAttribute("data-commentId")]=P}for(G=0;G<F.length;G++)D(F[G])}});setInterval(N,6E4);this.refreshCommentsTime=N;this.window=new mxWindow(mxResources.get("comments"),C,f,k,e,u,!0,!0);this.window.minimumSize=new mxRectangle(0, +0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,f,k,e,u,v,B,E,L,c,d){var g=document.createElement("div");g.style.textAlign="center";d=null!=d?d:44;var q=document.createElement("div");q.style.padding="6px";q.style.overflow="auto";q.style.maxHeight=d+ +"px";q.style.lineHeight="1.2em";mxUtils.write(q,f);g.appendChild(q);null!=c&&(q=document.createElement("div"),q.style.padding="6px 0 6px 0",f=document.createElement("img"),f.setAttribute("src",c),q.appendChild(f),g.appendChild(q));c=document.createElement("div");c.style.textAlign="center";c.style.whiteSpace="nowrap";var m=document.createElement("input");m.setAttribute("type","checkbox");v=mxUtils.button(v||mxResources.get("cancel"),function(){b.hideDialog();null!=e&&e(m.checked)});v.className="geBtn"; +null!=E&&(v.innerHTML=E+"<br>"+v.innerHTML,v.style.paddingBottom="8px",v.style.paddingTop="8px",v.style.height="auto",v.style.width="40%");b.editor.cancelFirst&&c.appendChild(v);var n=mxUtils.button(u||mxResources.get("ok"),function(){b.hideDialog();null!=k&&k(m.checked)});c.appendChild(n);null!=B?(n.innerHTML=B+"<br>"+n.innerHTML+"<br>",n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.className="geBtn",n.style.width="40%"):n.className="geBtn gePrimaryBtn";b.editor.cancelFirst|| +c.appendChild(v);g.appendChild(c);L?(c.style.marginTop="10px",q=document.createElement("p"),q.style.marginTop="20px",q.style.marginBottom="0px",q.appendChild(m),u=document.createElement("span"),mxUtils.write(u," "+mxResources.get("rememberThisSetting")),q.appendChild(u),g.appendChild(q),mxEvent.addListener(u,"click",function(z){m.checked=!m.checked;mxEvent.consume(z)})):c.style.marginTop="12px";this.init=function(){n.focus()};this.container=g};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0}; +EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,overlays:!0,mxObjectId:!0,mxTransient:!0};EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.applyPatches=function(b,f,k,e,u){if(null!=f)for(var v=0;v<f.length;v++)null!=f[v]&&(b=this.patchPages(b,f[v],k,e,u));return b}; +EditorUi.prototype.patchPages=function(b,f,k,e,u){var v={},B=[],E={},L={},c={},d={};if(null!=e&&null!=e[EditorUi.DIFF_UPDATE])for(var g in e[EditorUi.DIFF_UPDATE])v[g]=e[EditorUi.DIFF_UPDATE][g];if(null!=f[EditorUi.DIFF_REMOVE])for(e=0;e<f[EditorUi.DIFF_REMOVE].length;e++)L[f[EditorUi.DIFF_REMOVE][e]]=!0;if(null!=f[EditorUi.DIFF_INSERT])for(e=0;e<f[EditorUi.DIFF_INSERT].length;e++)E[f[EditorUi.DIFF_INSERT][e].previous]=f[EditorUi.DIFF_INSERT][e];if(null!=f[EditorUi.DIFF_UPDATE])for(g in f[EditorUi.DIFF_UPDATE])e= +f[EditorUi.DIFF_UPDATE][g],null!=e.previous&&(d[e.previous]=g);if(null!=b){var q="";for(e=0;e<b.length;e++){var m=b[e].getId();c[m]=b[e];null!=d[q]||L[m]||null!=f[EditorUi.DIFF_UPDATE]&&null!=f[EditorUi.DIFF_UPDATE][m]&&null!=f[EditorUi.DIFF_UPDATE][m].previous||(d[q]=m);q=m}}var n={},z=mxUtils.bind(this,function(x){var y=null!=x?x.getId():"";if(null!=x&&!n[y]){n[y]=!0;B.push(x);var I=null!=f[EditorUi.DIFF_UPDATE]?f[EditorUi.DIFF_UPDATE][y]:null;null!=I&&(this.updatePageRoot(x),null!=I.name&&x.setName(I.name), +null!=I.view&&this.patchViewState(x,I.view),null!=I.cells&&this.patchPage(x,I.cells,v[x.getId()],u),!k||null==I.cells&&null==I.view||(x.needsUpdate=!0))}x=d[y];null!=x&&(delete d[y],z(c[x]));x=E[y];null!=x&&(delete E[y],C(x))}),C=mxUtils.bind(this,function(x){x=mxUtils.parseXml(x.data).documentElement;x=new DiagramPage(x);this.updatePageRoot(x);var y=c[x.getId()];null==y?z(x):(this.patchPage(y,this.diffPages([y],[x]),v[y.getId()],u),k&&(y.needsUpdate=!0))});z();for(g in d)z(c[d[g]]),delete d[g];for(g in E)C(E[g]), +delete E[g];return B};EditorUi.prototype.patchViewState=function(b,f){if(null!=b.viewState&&null!=f){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var k in f)try{this.patchViewStateProperty(b,f,k)}catch(e){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,f,k){b.viewState[k]=JSON.parse(f[k])}; +EditorUi.prototype.createParentLookup=function(b,f){function k(c){var d=e[c];null==d&&(d={inserted:[],moved:{}},e[c]=d);return d}var e={};if(null!=f[EditorUi.DIFF_INSERT])for(var u=0;u<f[EditorUi.DIFF_INSERT].length;u++){var v=f[EditorUi.DIFF_INSERT][u],B=null!=v.parent?v.parent:"",E=null!=v.previous?v.previous:"";k(B).inserted[E]=v}if(null!=f[EditorUi.DIFF_UPDATE])for(var L in f[EditorUi.DIFF_UPDATE])v=f[EditorUi.DIFF_UPDATE][L],null!=v.previous&&(B=v.parent,null==B&&(u=b.getCell(L),null!=u&&(u= +b.getParent(u),null!=u&&(B=u.getId()))),null!=B&&(k(B).moved[v.previous]=L));return e}; +EditorUi.prototype.patchPage=function(b,f,k,e){var u=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),v=this.createParentLookup(u,f);u.beginUpdate();try{var B=u.updateEdgeParent,E=new mxDictionary,L=[];u.updateEdgeParent=function(C,x){!E.get(C)&&e&&(E.put(C,!0),L.push(C))};var c=v[""],d=null!=c&&null!=c.inserted?c.inserted[""]:null,g=null;null!=d&&(g=this.getCellForJson(d));if(null==g){var q=null!=c&&null!=c.moved?c.moved[""]:null;null!=q&&(g=u.getCell(q))}null!=g&&(u.setRoot(g), +b.root=g);this.patchCellRecursive(b,u,u.root,v,f);if(null!=f[EditorUi.DIFF_REMOVE])for(var m=0;m<f[EditorUi.DIFF_REMOVE].length;m++){var n=u.getCell(f[EditorUi.DIFF_REMOVE][m]);null!=n&&u.remove(n)}if(null!=f[EditorUi.DIFF_UPDATE]){var z=null!=k&&null!=k.cells?k.cells[EditorUi.DIFF_UPDATE]:null;for(q in f[EditorUi.DIFF_UPDATE])this.patchCell(u,u.getCell(q),f[EditorUi.DIFF_UPDATE][q],null!=z?z[q]:null)}if(null!=f[EditorUi.DIFF_INSERT])for(m=0;m<f[EditorUi.DIFF_INSERT].length;m++)d=f[EditorUi.DIFF_INSERT][m], +n=u.getCell(d.id),null!=n&&(u.setTerminal(n,u.getCell(d.source),!0),u.setTerminal(n,u.getCell(d.target),!1));u.updateEdgeParent=B;if(e&&0<L.length)for(m=0;m<L.length;m++)u.contains(L[m])&&u.updateEdgeParent(L[m])}finally{u.endUpdate()}}; +EditorUi.prototype.patchCellRecursive=function(b,f,k,e,u){if(null!=k){var v=e[k.getId()],B=null!=v&&null!=v.inserted?v.inserted:{};v=null!=v&&null!=v.moved?v.moved:{};for(var E=0,L=f.getChildCount(k),c="",d=0;d<L;d++){var g=f.getChildAt(k,d).getId();null==v[c]&&(null==u[EditorUi.DIFF_UPDATE]||null==u[EditorUi.DIFF_UPDATE][g]||null==u[EditorUi.DIFF_UPDATE][g].previous&&null==u[EditorUi.DIFF_UPDATE][g].parent)&&(v[c]=g);c=g}L=mxUtils.bind(this,function(q,m){var n=null!=q?q.getId():"";null!=q&&m&&(m= +f.getCell(n),null!=m&&m!=q&&(q=null));null!=q&&(f.getChildAt(k,E)!=q&&f.add(k,q,E),this.patchCellRecursive(b,f,q,e,u),E++);return n});for(c=[null];0<c.length;)if(d=c.shift(),d=L(null!=d?d.child:null,null!=d?d.insert:!1),g=v[d],null!=g&&(delete v[d],c.push({child:f.getCell(g)})),g=B[d],null!=g&&(delete B[d],c.push({child:this.getCellForJson(g),insert:!0})),0==c.length){for(d in v)c.push({child:f.getCell(v[d])}),delete v[d];for(d in B)c.push({child:this.getCellForJson(B[d]),insert:!0}),delete B[d]}}}; +EditorUi.prototype.patchCell=function(b,f,k,e){if(null!=f&&null!=k){if(null==e||null==e.xmlValue&&(null==e.value||""==e.value))"value"in k?b.setValue(f,k.value):null!=k.xmlValue&&b.setValue(f,mxUtils.parseXml(k.xmlValue).documentElement);null!=e&&null!=e.style||null==k.style||b.setStyle(f,k.style);null!=k.visible&&b.setVisible(f,1==k.visible);null!=k.collapsed&&b.setCollapsed(f,1==k.collapsed);null!=k.vertex&&(f.vertex=1==k.vertex);null!=k.edge&&(f.edge=1==k.edge);null!=k.connectable&&(f.connectable= 1==k.connectable);null!=k.geometry&&b.setGeometry(f,this.codec.decode(mxUtils.parseXml(k.geometry).documentElement));null!=k.source&&b.setTerminal(f,b.getCell(k.source),!0);null!=k.target&&b.setTerminal(f,b.getCell(k.target),!1);for(var u in k)this.cellProperties[u]||(f[u]=k[u])}};EditorUi.prototype.getXmlForPages=function(b){b=this.getNodeForPages(b);var f=null;null!=b&&(f=mxUtils.getXml(b));return f}; -EditorUi.prototype.getNodeForPages=function(b){var f=null;if(null!=this.fileNode&&null!=b){f=this.fileNode.cloneNode(!1);for(var k=0;k<b.length;k++){var d=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b[k].root));this.editor.graph.saveViewState(b[k].viewState,d);var u=b[k].node.cloneNode(!1);u.appendChild(d);f.appendChild(u)}}return f};EditorUi.prototype.getPagesForXml=function(b){b=mxUtils.parseXml(b);return this.getPagesForNode(b.documentElement)}; -EditorUi.prototype.getPagesForNode=function(b,f){var k=this.editor.extractGraphModel(b,!0,!0);null!=k&&(b=k);f=b.getElementsByTagName(f||"diagram");k=[];if(0<f.length)for(b=0;b<f.length;b++){var d=new DiagramPage(f[b]);this.updatePageRoot(d,!0);k.push(d)}else"mxGraphModel"==b.nodeName&&(d=new DiagramPage(b.ownerDocument.createElement("diagram")),d.setName(mxResources.get("pageWithNumber",[1])),mxUtils.setTextContent(d.node,Graph.compressNode(b,!0)),k.push(d));return k}; -EditorUi.prototype.diffPages=function(b,f){var k=[],d=[],u={},x={},B={},D=null;if(null!=b&&null!=f){for(var K=0;K<f.length;K++)x[f[K].getId()]={page:f[K],prev:D},D=f[K];D=null;for(K=0;K<b.length;K++){var c=b[K].getId();f=x[c];if(null==f)d.push(c);else{var e=this.diffPage(b[K],f.page),g={};mxUtils.isEmptyObject(e)||(g.cells=e);e=this.diffViewState(b[K],f.page);mxUtils.isEmptyObject(e)||(g.view=e);if((null!=f.prev?null==D:null!=D)||null!=D&&null!=f.prev&&D.getId()!=f.prev.getId())g.previous=null!=f.prev? -f.prev.getId():"";null!=f.page.getName()&&b[K].getName()!=f.page.getName()&&(g.name=f.page.getName());mxUtils.isEmptyObject(g)||(B[c]=g)}delete x[b[K].getId()];D=b[K]}for(c in x)f=x[c],k.push({data:mxUtils.getXml(f.page.node),previous:null!=f.prev?f.prev.getId():""});mxUtils.isEmptyObject(B)||(u[EditorUi.DIFF_UPDATE]=B);0<d.length&&(u[EditorUi.DIFF_REMOVE]=d);0<k.length&&(u[EditorUi.DIFF_INSERT]=k)}return u}; -EditorUi.prototype.createCellLookup=function(b,f,k){k=null!=k?k:{};k[b.getId()]={cell:b,prev:f};var d=b.getChildCount();f=null;for(var u=0;u<d;u++){var x=b.getChildAt(u);this.createCellLookup(x,f,k);f=x}return k}; -EditorUi.prototype.diffCellRecursive=function(b,f,k,d,u){d=null!=d?d:{};var x=k[b.getId()];delete k[b.getId()];if(null==x)u.push(b.getId());else{var B=this.diffCell(b,x.cell);if(null!=B.parent||(null!=x.prev?null==f:null!=f)||null!=f&&null!=x.prev&&f.getId()!=x.prev.getId())B.previous=null!=x.prev?x.prev.getId():"";mxUtils.isEmptyObject(B)||(d[b.getId()]=B)}x=b.getChildCount();f=null;for(B=0;B<x;B++){var D=b.getChildAt(B);this.diffCellRecursive(D,f,k,d,u);f=D}return d}; -EditorUi.prototype.diffPage=function(b,f){var k=[],d=[],u={};this.updatePageRoot(b);this.updatePageRoot(f);f=this.createCellLookup(f.root);var x=this.diffCellRecursive(b.root,null,f,x,d),B;for(B in f)b=f[B],k.push(this.getJsonForCell(b.cell,b.prev));mxUtils.isEmptyObject(x)||(u[EditorUi.DIFF_UPDATE]=x);0<d.length&&(u[EditorUi.DIFF_REMOVE]=d);0<k.length&&(u[EditorUi.DIFF_INSERT]=k);return u}; -EditorUi.prototype.diffViewState=function(b,f){b=b.viewState;var k=f.viewState,d={};f==this.currentPage&&(k=this.editor.graph.getViewState());if(null!=b&&null!=k)for(var u in this.viewStateProperties)this.diffViewStateProperty(b,k,u,d);return d};EditorUi.prototype.diffViewStateProperty=function(b,f,k,d){b=JSON.stringify(this.getViewStateProperty(b,k));f=JSON.stringify(this.getViewStateProperty(f,k));b!=f&&(d[k]=f)}; +EditorUi.prototype.getNodeForPages=function(b){var f=null;if(null!=this.fileNode&&null!=b){f=this.fileNode.cloneNode(!1);for(var k=0;k<b.length;k++){var e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b[k].root));this.editor.graph.saveViewState(b[k].viewState,e);var u=b[k].node.cloneNode(!1);u.appendChild(e);f.appendChild(u)}}return f};EditorUi.prototype.getPagesForXml=function(b){b=mxUtils.parseXml(b);return this.getPagesForNode(b.documentElement)}; +EditorUi.prototype.getPagesForNode=function(b,f){var k=this.editor.extractGraphModel(b,!0,!0);null!=k&&(b=k);f=b.getElementsByTagName(f||"diagram");k=[];if(0<f.length)for(b=0;b<f.length;b++){var e=new DiagramPage(f[b]);this.updatePageRoot(e,!0);k.push(e)}else"mxGraphModel"==b.nodeName&&(e=new DiagramPage(b.ownerDocument.createElement("diagram")),e.setName(mxResources.get("pageWithNumber",[1])),mxUtils.setTextContent(e.node,Graph.compressNode(b,!0)),k.push(e));return k}; +EditorUi.prototype.diffPages=function(b,f){var k=[],e=[],u={},v={},B={},E=null;if(null!=b&&null!=f){for(var L=0;L<f.length;L++)v[f[L].getId()]={page:f[L],prev:E},E=f[L];E=null;for(L=0;L<b.length;L++){var c=b[L].getId();f=v[c];if(null==f)e.push(c);else{var d=this.diffPage(b[L],f.page),g={};mxUtils.isEmptyObject(d)||(g.cells=d);d=this.diffViewState(b[L],f.page);mxUtils.isEmptyObject(d)||(g.view=d);if((null!=f.prev?null==E:null!=E)||null!=E&&null!=f.prev&&E.getId()!=f.prev.getId())g.previous=null!=f.prev? +f.prev.getId():"";null!=f.page.getName()&&b[L].getName()!=f.page.getName()&&(g.name=f.page.getName());mxUtils.isEmptyObject(g)||(B[c]=g)}delete v[b[L].getId()];E=b[L]}for(c in v)f=v[c],k.push({data:mxUtils.getXml(f.page.node),previous:null!=f.prev?f.prev.getId():""});mxUtils.isEmptyObject(B)||(u[EditorUi.DIFF_UPDATE]=B);0<e.length&&(u[EditorUi.DIFF_REMOVE]=e);0<k.length&&(u[EditorUi.DIFF_INSERT]=k)}return u}; +EditorUi.prototype.createCellLookup=function(b,f,k){k=null!=k?k:{};k[b.getId()]={cell:b,prev:f};var e=b.getChildCount();f=null;for(var u=0;u<e;u++){var v=b.getChildAt(u);this.createCellLookup(v,f,k);f=v}return k}; +EditorUi.prototype.diffCellRecursive=function(b,f,k,e,u){e=null!=e?e:{};var v=k[b.getId()];delete k[b.getId()];if(null==v)u.push(b.getId());else{var B=this.diffCell(b,v.cell);if(null!=B.parent||(null!=v.prev?null==f:null!=f)||null!=f&&null!=v.prev&&f.getId()!=v.prev.getId())B.previous=null!=v.prev?v.prev.getId():"";mxUtils.isEmptyObject(B)||(e[b.getId()]=B)}v=b.getChildCount();f=null;for(B=0;B<v;B++){var E=b.getChildAt(B);this.diffCellRecursive(E,f,k,e,u);f=E}return e}; +EditorUi.prototype.diffPage=function(b,f){var k=[],e=[],u={};this.updatePageRoot(b);this.updatePageRoot(f);f=this.createCellLookup(f.root);var v=this.diffCellRecursive(b.root,null,f,v,e),B;for(B in f)b=f[B],k.push(this.getJsonForCell(b.cell,b.prev));mxUtils.isEmptyObject(v)||(u[EditorUi.DIFF_UPDATE]=v);0<e.length&&(u[EditorUi.DIFF_REMOVE]=e);0<k.length&&(u[EditorUi.DIFF_INSERT]=k);return u}; +EditorUi.prototype.diffViewState=function(b,f){b=b.viewState;var k=f.viewState,e={};f==this.currentPage&&(k=this.editor.graph.getViewState());if(null!=b&&null!=k)for(var u in this.viewStateProperties)this.diffViewStateProperty(b,k,u,e);return e};EditorUi.prototype.diffViewStateProperty=function(b,f,k,e){b=JSON.stringify(this.getViewStateProperty(b,k));f=JSON.stringify(this.getViewStateProperty(f,k));b!=f&&(e[k]=f)}; EditorUi.prototype.getViewStateProperty=function(b,f){b=b[f];"backgroundImage"==f&&null!=b&&null!=b.originalSrc?delete b.src:"extFonts"==f&&null==b&&(b=[]);return b}; -EditorUi.prototype.getCellForJson=function(b){var f=null!=b.geometry?this.codec.decode(mxUtils.parseXml(b.geometry).documentElement):null,k=b.value;null!=b.xmlValue&&(k=mxUtils.parseXml(b.xmlValue).documentElement);f=new mxCell(k,f,b.style);f.connectable=0!=b.connectable;f.collapsed=1==b.collapsed;f.visible=0!=b.visible;f.vertex=1==b.vertex;f.edge=1==b.edge;f.id=b.id;for(var d in b)this.cellProperties[d]||(f[d]=b[d]);return f}; +EditorUi.prototype.getCellForJson=function(b){var f=null!=b.geometry?this.codec.decode(mxUtils.parseXml(b.geometry).documentElement):null,k=b.value;null!=b.xmlValue&&(k=mxUtils.parseXml(b.xmlValue).documentElement);f=new mxCell(k,f,b.style);f.connectable=0!=b.connectable;f.collapsed=1==b.collapsed;f.visible=0!=b.visible;f.vertex=1==b.vertex;f.edge=1==b.edge;f.id=b.id;for(var e in b)this.cellProperties[e]||(f[e]=b[e]);return f}; EditorUi.prototype.getJsonForCell=function(b,f){var k={id:b.getId()};b.vertex&&(k.vertex=1);b.edge&&(k.edge=1);b.connectable||(k.connectable=0);null!=b.parent&&(k.parent=b.parent.getId());null!=f&&(k.previous=f.getId());null!=b.source&&(k.source=b.source.getId());null!=b.target&&(k.target=b.target.getId());null!=b.style&&(k.style=b.style);null!=b.geometry&&(k.geometry=mxUtils.getXml(this.codec.encode(b.geometry)));b.collapsed&&(k.collapsed=1);b.visible||(k.visible=0);null!=b.value&&("object"===typeof b.value&& -"number"===typeof b.value.nodeType&&"string"===typeof b.value.nodeName&&"function"===typeof b.value.getAttribute?k.xmlValue=mxUtils.getXml(b.value):k.value=b.value);for(var d in b)this.cellProperties[d]||"function"===typeof b[d]||(k[d]=b[d]);return k}; -EditorUi.prototype.diffCell=function(b,f){function k(B){return null!=B&&"object"===typeof B&&"number"===typeof B.nodeType&&"string"===typeof B.nodeName&&"function"===typeof B.getAttribute}var d={};b.vertex!=f.vertex&&(d.vertex=f.vertex?1:0);b.edge!=f.edge&&(d.edge=f.edge?1:0);b.connectable!=f.connectable&&(d.connectable=f.connectable?1:0);if((null!=b.parent?null==f.parent:null!=f.parent)||null!=b.parent&&null!=f.parent&&b.parent.getId()!=f.parent.getId())d.parent=null!=f.parent?f.parent.getId():""; -if((null!=b.source?null==f.source:null!=f.source)||null!=b.source&&null!=f.source&&b.source.getId()!=f.source.getId())d.source=null!=f.source?f.source.getId():"";if((null!=b.target?null==f.target:null!=f.target)||null!=b.target&&null!=f.target&&b.target.getId()!=f.target.getId())d.target=null!=f.target?f.target.getId():"";k(b.value)&&k(f.value)?b.value.isEqualNode(f.value)||(d.xmlValue=mxUtils.getXml(f.value)):b.value!=f.value&&(k(f.value)?d.xmlValue=mxUtils.getXml(f.value):d.value=null!=f.value? -f.value:null);b.style!=f.style&&(d.style=f.style);b.visible!=f.visible&&(d.visible=f.visible?1:0);b.collapsed!=f.collapsed&&(d.collapsed=f.collapsed?1:0);if(!this.isObjectEqual(b.geometry,f.geometry,new mxGeometry)){var u=this.codec.encode(f.geometry);null!=u&&(d.geometry=mxUtils.getXml(u))}for(var x in b)this.cellProperties[x]||"function"===typeof b[x]||"function"===typeof f[x]||b[x]==f[x]||(d[x]=void 0===f[x]?null:f[x]);for(x in f)x in b||this.cellProperties[x]||"function"===typeof b[x]||"function"=== -typeof f[x]||b[x]==f[x]||(d[x]=void 0===f[x]?null:f[x]);return d};EditorUi.prototype.isObjectEqual=function(b,f,k){if(null==b&&null==f)return!0;if(null!=b?null==f:null!=f)return!1;var d=function(u,x){return null==k||k[u]!=x?!0===x?1:x:void 0};return JSON.stringify(b,d)==JSON.stringify(f,d)};var mxSettings={currentVersion:18,defaultFormatWidth:600>screen.width?"0":"240",key:Editor.settingsKey,getLanguage:function(){return mxSettings.settings.language},setLanguage:function(b){mxSettings.settings.language=b},isMainSettings:function(){return".drawio-config"==mxSettings.key},getMainSettings:function(){var b=localStorage.getItem(".drawio-config");null==b?(b=mxSettings.getDefaults(),delete b.isNew):(b=JSON.parse(b),b.version=mxSettings.currentVersion);return b},getUi:function(){return mxSettings.isMainSettings()? +"number"===typeof b.value.nodeType&&"string"===typeof b.value.nodeName&&"function"===typeof b.value.getAttribute?k.xmlValue=mxUtils.getXml(b.value):k.value=b.value);for(var e in b)this.cellProperties[e]||"function"===typeof b[e]||(k[e]=b[e]);return k}; +EditorUi.prototype.diffCell=function(b,f){function k(B){return null!=B&&"object"===typeof B&&"number"===typeof B.nodeType&&"string"===typeof B.nodeName&&"function"===typeof B.getAttribute}var e={};b.vertex!=f.vertex&&(e.vertex=f.vertex?1:0);b.edge!=f.edge&&(e.edge=f.edge?1:0);b.connectable!=f.connectable&&(e.connectable=f.connectable?1:0);if((null!=b.parent?null==f.parent:null!=f.parent)||null!=b.parent&&null!=f.parent&&b.parent.getId()!=f.parent.getId())e.parent=null!=f.parent?f.parent.getId():""; +if((null!=b.source?null==f.source:null!=f.source)||null!=b.source&&null!=f.source&&b.source.getId()!=f.source.getId())e.source=null!=f.source?f.source.getId():"";if((null!=b.target?null==f.target:null!=f.target)||null!=b.target&&null!=f.target&&b.target.getId()!=f.target.getId())e.target=null!=f.target?f.target.getId():"";k(b.value)&&k(f.value)?b.value.isEqualNode(f.value)||(e.xmlValue=mxUtils.getXml(f.value)):b.value!=f.value&&(k(f.value)?e.xmlValue=mxUtils.getXml(f.value):e.value=null!=f.value? +f.value:null);b.style!=f.style&&(e.style=f.style);b.visible!=f.visible&&(e.visible=f.visible?1:0);b.collapsed!=f.collapsed&&(e.collapsed=f.collapsed?1:0);if(!this.isObjectEqual(b.geometry,f.geometry,new mxGeometry)){var u=this.codec.encode(f.geometry);null!=u&&(e.geometry=mxUtils.getXml(u))}for(var v in b)this.cellProperties[v]||"function"===typeof b[v]||"function"===typeof f[v]||b[v]==f[v]||(e[v]=void 0===f[v]?null:f[v]);for(v in f)v in b||this.cellProperties[v]||"function"===typeof b[v]||"function"=== +typeof f[v]||b[v]==f[v]||(e[v]=void 0===f[v]?null:f[v]);return e};EditorUi.prototype.isObjectEqual=function(b,f,k){if(null==b&&null==f)return!0;if(null!=b?null==f:null!=f)return!1;var e=function(u,v){return null==k||k[u]!=v?!0===v?1:v:void 0};return JSON.stringify(b,e)==JSON.stringify(f,e)};var mxSettings={currentVersion:18,defaultFormatWidth:600>screen.width?"0":"240",key:Editor.settingsKey,getLanguage:function(){return mxSettings.settings.language},setLanguage:function(b){mxSettings.settings.language=b},isMainSettings:function(){return".drawio-config"==mxSettings.key},getMainSettings:function(){var b=localStorage.getItem(".drawio-config");null==b?(b=mxSettings.getDefaults(),delete b.isNew):(b=JSON.parse(b),b.version=mxSettings.currentVersion);return b},getUi:function(){return mxSettings.isMainSettings()? mxSettings.settings.ui:mxSettings.getMainSettings().ui},setUi:function(b){if(mxSettings.isMainSettings()){mxSettings.settings.ui=b;if("kennedy"==b||""==b)mxSettings.settings.darkMode=!1;mxSettings.save()}else{var f=mxSettings.getMainSettings();f.ui=b;"kennedy"==b&&(f.darkMode=!1);localStorage.setItem(".drawio-config",JSON.stringify(f))}},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(b){mxSettings.settings.showStartScreen=b},getGridColor:function(b){return b? mxSettings.settings.darkGridColor:mxSettings.settings.gridColor},setGridColor:function(b,f){f?mxSettings.settings.darkGridColor=b:mxSettings.settings.gridColor=b},getAutosave:function(){return mxSettings.settings.autosave},setAutosave:function(b){mxSettings.settings.autosave=b},getResizeImages:function(){return mxSettings.settings.resizeImages},setResizeImages:function(b){mxSettings.settings.resizeImages=b},getOpenCounter:function(){return mxSettings.settings.openCounter},setOpenCounter:function(b){mxSettings.settings.openCounter= b},setCustomFonts:function(b){mxSettings.settings.customFonts=b},getCustomFonts:function(){for(var b=mxSettings.settings.customFonts||[],f=0;f<b.length;f++)"string"===typeof b[f]&&(b[f]={name:b[f],url:null});return b},getLibraries:function(){return mxSettings.settings.libraries},setLibraries:function(b){mxSettings.settings.libraries=b},addCustomLibrary:function(b){mxSettings.load();Array.isArray(mxSettings.settings.customLibraries)||(mxSettings.settings.customLibraries=[]);0>mxUtils.indexOf(mxSettings.settings.customLibraries, @@ -11939,7 +11945,7 @@ null==mxSettings.settings.ui&&(mxSettings.settings.ui=""),null==mxSettings.setti this.ui.editor.addListener("autosaveChanged",this.autosaveListener);this.visibleListener=mxUtils.bind(this,function(){"hidden"==document.visibilityState?this.isConnected()&&this.stop():this.start()});mxEvent.addListener(document,"visibilitychange",this.visibleListener);this.activityListener=mxUtils.bind(this,function(f){this.lastActivity=Date.now();this.start()});mxEvent.addListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.activityListener);mxEvent.addListener(document,"keypress", this.activityListener);mxEvent.addListener(window,"focus",this.activityListener);!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.addListener(document,"touchstart",this.activityListener),mxEvent.addListener(document,"touchmove",this.activityListener));this.file.addListener("realtimeMessage",this.activityListener);this.pusherErrorListener=mxUtils.bind(this,function(f){null!=f.error&&null!=f.error.data&&4004===f.error.data.code&&EditorUi.logError("Error: Pusher Limit",null,this.file.getId())});this.connectionListener= mxUtils.bind(this,function(){this.updateOnlineState();this.updateStatus();if(this.isConnected())if(this.announced)this.fileChangedNotify();else{var f=this.file.getCurrentUser(),k={a:"join"};null!=f&&(k.name=encodeURIComponent(f.displayName),k.uid=f.id);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(this.objectToString(this.createMessage(k))));this.file.stats.msgSent++;this.announced=!0}});this.changeListener=mxUtils.bind(this,function(f){this.file.stats.msgReceived++; -this.lastActivity=Date.now();if(this.enabled&&!this.file.inConflictState&&!this.file.redirectDialogShowing)try{var k=this.stringToObject(f);null!=k&&(EditorUi.debug("DrawioFileSync.message",[this],k,f.length,"bytes"),k.v>DrawioFileSync.PROTOCOL?this.file.redirectToNewApp(mxUtils.bind(this,function(){})):k.v===DrawioFileSync.PROTOCOL&&null!=k.d&&this.handleMessageData(k.d))}catch(d){this.isConnected()&&this.fileChangedNotify()}})};DrawioFileSync.PROTOCOL=6;DrawioFileSync.ENABLE_SOCKETS="0"!=urlParams.sockets; +this.lastActivity=Date.now();if(this.enabled&&!this.file.inConflictState&&!this.file.redirectDialogShowing)try{var k=this.stringToObject(f);null!=k&&(EditorUi.debug("DrawioFileSync.message",[this],k,f.length,"bytes"),k.v>DrawioFileSync.PROTOCOL?this.file.redirectToNewApp(mxUtils.bind(this,function(){})):k.v===DrawioFileSync.PROTOCOL&&null!=k.d&&this.handleMessageData(k.d))}catch(e){this.isConnected()&&this.fileChangedNotify()}})};DrawioFileSync.PROTOCOL=6;DrawioFileSync.ENABLE_SOCKETS="0"!=urlParams.sockets; mxUtils.extend(DrawioFileSync,mxEventSource);DrawioFileSync.prototype.maxCacheEntrySize=1E6;DrawioFileSync.prototype.maxSyncMessageSize=9E3;DrawioFileSync.prototype.syncSendMessageDelay=300;DrawioFileSync.prototype.syncReceiveMessageDelay=50;DrawioFileSync.prototype.cleanupDelay=12E3;DrawioFileSync.prototype.syncChangeCounter=0;DrawioFileSync.prototype.enabled=!0;DrawioFileSync.prototype.updateStatusInterval=1E4;DrawioFileSync.prototype.channelId=null;DrawioFileSync.prototype.channel=null; DrawioFileSync.prototype.catchupRetryCount=0;DrawioFileSync.prototype.maxCatchupRetries=15;DrawioFileSync.prototype.maxCacheReadyRetries=1;DrawioFileSync.prototype.cacheReadyDelay=700;DrawioFileSync.prototype.maxOptimisticRetries=6;DrawioFileSync.prototype.inactivityTimeoutSeconds=1800;DrawioFileSync.prototype.lastActivity=null; DrawioFileSync.prototype.start=function(){null==this.channelId&&(this.channelId=this.file.getChannelId());null==this.key&&(this.key=this.file.getChannelKey());if(null==this.pusher&&null!=this.channelId&&"hidden"!=document.visibilityState){this.pusher=this.ui.getPusher();if(null!=this.pusher){try{null!=this.pusher.connection&&this.pusher.connection.bind("error",this.pusherErrorListener)}catch(b){}try{this.pusher.connect(),this.channel=this.pusher.subscribe(this.channelId),EditorUi.debug("DrawioFileSync.start", @@ -11947,114 +11953,115 @@ DrawioFileSync.prototype.start=function(){null==this.channelId&&(this.channelId= DrawioFileSync.prototype.updateRealtime=function(){this.isValidState()&&(this.file.isRealtimeEnabled()&&this.file.isRealtimeSupported()&&this.isRealtimeActive()?this.file.isRealtime()||this.initRealtime():this.file.isRealtime()&&this.resetRealtime(),DrawioFileSync.ENABLE_SOCKETS&&this.file.isRealtime()&&null==this.p2pCollab&&null!=this.channelId?(this.p2pCollab=new P2PCollab(this.ui,this,this.channelId),this.p2pCollab.joinFile()):this.file.isRealtime()||null==this.p2pCollab||(this.p2pCollab.destroy(), this.p2pCollab=null))};DrawioFileSync.prototype.initRealtime=function(){this.file.theirPages=this.ui.clonePages(this.ui.pages);this.file.ownPages=this.ui.clonePages(this.ui.pages);this.snapshot=this.file.ownPages};DrawioFileSync.prototype.resetRealtime=function(){var b=this.file.getShadowPages();null!=b&&(b=this.ui.diffPages(b,this.file.ownPages),this.file.patch([b]));this.sendLocalChanges();this.cleanup();this.file.theirPages=null;this.snapshot=this.file.ownPages=null}; DrawioFileSync.prototype.isConnected=function(){return null!=this.pusher&&null!=this.pusher.connection?"connected"==this.pusher.connection.state:!1}; -DrawioFileSync.prototype.updateOnlineState=function(){if("1"!=urlParams.embedRT){var b=mxUtils.bind(this,function(d){mxEvent.addListener(d,"click",mxUtils.bind(this,function(u){if(this.file.isRealtimeEnabled()&&this.file.isRealtimeSupported()){u=this.file.getRealtimeState();var x=mxResources.get("disconnected");this.file.invalidChecksum?x=mxResources.get("error")+": "+mxResources.get("checksum"):this.ui.isOffline(!0)||!this.isConnected()?x=mxResources.get("offline"):1==u&&(x=mxResources.get("online")); -this.ui.showError(mxResources.get("realtimeCollaboration"),mxUtils.htmlEntities(x))}else this.enabled=!this.enabled,this.ui.updateButtonContainer(),this.resetUpdateStatusThread(),this.updateOnlineState(),this.updateStatus(),!this.file.inConflictState&&this.enabled&&this.fileChangedNotify()}))});if(null!=this.ui.toolbarContainer&&null==this.collaboratorsElement){var f=document.createElement("a");f.className="geButton geAdaptiveAsset";f.style.position="absolute";f.style.display="inline-block";f.style.verticalAlign= -"bottom";f.style.color="#666";f.style.top="6px";f.style.right="atlas"!=uiTheme?"90px":"50px";f.style.padding="2px";f.style.fontSize="8pt";f.style.verticalAlign="middle";f.style.textDecoration="none";f.style.backgroundPosition="center center";f.style.backgroundRepeat="no-repeat";f.style.backgroundSize="16px 16px";f.style.width="16px";f.style.height="16px";mxUtils.setOpacity(f,60);mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(d){d.preventDefault()})); -b(f);this.ui.toolbarContainer.appendChild(f);this.collaboratorsElement=f}if(null!=this.collaboratorsElement){this.collaboratorsElement.style.display="inline-block";var k=Editor.cloudImage;b="";this.enabled?this.file.invalidChecksum?(b=mxResources.get("error")+": "+mxResources.get("checksum"),k=Editor.syncProblemImage):this.ui.isOffline(!0)||!this.isConnected()?(b=mxResources.get("offline"),k=Editor.cloudOffImage):(b=mxResources.get("online"),this.file.isRealtimeEnabled()&&this.file.isRealtimeSupported()&& -(f=this.file.getRealtimeError(),k=this.file.getRealtimeState(),b=mxResources.get("realtimeCollaboration"),1==k?(this.collaboratorsElement.style.display="none",k=Editor.syncImage):(k=Editor.syncProblemImage,b=null!=f&&null!=f.message?b+(" ("+f.message+")"):b+(" ("+mxResources.get("disconnected")+")")))):(b=mxResources.get("disconnected"),k=Editor.cloudOffImage);this.collaboratorsElement.setAttribute("title",b);this.collaboratorsElement.style.backgroundImage="url("+k+")"}}}; -DrawioFileSync.prototype.updateStatus=function(){this.isConnected()&&null!=this.lastActivity&&(Date.now()-this.lastActivity)/1E3>this.inactivityTimeoutSeconds&&this.stop();if(!(this.file.isModified()||this.file.inConflictState||null!=this.file.autosaveThread||this.file.savingFile||this.file.redirectDialogShowing))if(this.enabled&&null!=this.ui.statusContainer){var b=this.ui.timeSince(new Date(this.lastModified));null==b&&(b=mxResources.get("lessThanAMinute"));var f=this.file.isRevisionHistorySupported(), -k=this.lastMessage;this.lastMessage=null;null!=k&&40<k.length&&(k=k.substring(0,40)+"...");b=mxResources.get("lastChange",[b]);this.ui.editor.setStatus('<div title="'+mxUtils.htmlEntities(b)+'">'+mxUtils.htmlEntities(b)+"</div>"+(this.file.isEditable()?"":'<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>")+(this.isConnected()?"":'<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("disconnected"))+"</div>")+(null!=k?' <span title="'+mxUtils.htmlEntities(k)+ -'">('+mxUtils.htmlEntities(k)+")</span>":""));k=this.ui.statusContainer.getElementsByTagName("div");0<k.length&&f&&(k[0].style.display="inline-block",f&&(k[0].style.cursor="pointer",k[0].style.textDecoration="underline",mxEvent.addListener(k[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()}))));f=this.ui.statusContainer.getElementsByTagName("span");if(0<f.length){var d=f[0];d.style.opacity="0";mxUtils.setPrefixedStyle(d.style,"transition","all 0.2s ease");window.setTimeout(mxUtils.bind(this, -function(){mxUtils.setOpacity(d,100);mxUtils.setPrefixedStyle(d.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(d,0);window.setTimeout(mxUtils.bind(this,function(){this.updateStatus()}),1E3)}),this.updateStatusInterval/2)}),0)}this.resetUpdateStatusThread()}else this.file.addAllSavedStatus()}; +DrawioFileSync.prototype.updateOnlineState=function(){if("1"!=urlParams.embedRT){var b=mxUtils.bind(this,function(e){mxEvent.addListener(e,"click",mxUtils.bind(this,function(u){if(this.file.isRealtimeEnabled()&&this.file.isRealtimeSupported()){u=this.file.getRealtimeState();var v=mxResources.get("disconnected");this.file.invalidChecksum?v=mxResources.get("error")+": "+mxResources.get("checksum"):this.ui.isOffline(!0)||!this.isConnected()?v=mxResources.get("offline"):1==u&&(v=mxResources.get("online")); +this.ui.showError(mxResources.get("realtimeCollaboration"),mxUtils.htmlEntities(v))}else this.enabled=!this.enabled,this.ui.updateButtonContainer(),this.resetUpdateStatusThread(),this.updateOnlineState(),this.updateStatus(),!this.file.inConflictState&&this.enabled&&this.fileChangedNotify()}))});if(null!=this.ui.toolbarContainer&&null==this.collaboratorsElement){var f=document.createElement("a");f.className="geButton geAdaptiveAsset";f.style.position="absolute";f.style.display="inline-block";f.style.verticalAlign= +"bottom";f.style.color="#666";f.style.top="6px";f.style.right="atlas"!=uiTheme?"1"!=urlParams["live-ui"]?"90px":"70px":"50px";f.style.padding="2px";f.style.fontSize="8pt";f.style.verticalAlign="middle";f.style.textDecoration="none";f.style.backgroundPosition="center center";f.style.backgroundRepeat="no-repeat";f.style.backgroundSize="16px 16px";f.style.width="16px";f.style.height="16px";mxUtils.setOpacity(f,60);mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this, +function(e){e.preventDefault()}));b(f);this.ui.toolbarContainer.appendChild(f);this.collaboratorsElement=f}if(null!=this.collaboratorsElement){this.collaboratorsElement.style.display="inline-block";var k=Editor.cloudImage;b="";this.enabled?this.file.invalidChecksum?(b=mxResources.get("error")+": "+mxResources.get("checksum"),k=Editor.syncProblemImage):this.ui.isOffline(!0)||!this.isConnected()?(b=mxResources.get("offline"),k=Editor.cloudOffImage):(b=mxResources.get("online"),this.file.isRealtimeEnabled()&& +this.file.isRealtimeSupported()&&(f=this.file.getRealtimeError(),k=this.file.getRealtimeState(),b=mxResources.get("realtimeCollaboration"),1==k?(this.collaboratorsElement.style.display="none",k=Editor.syncImage):(k=Editor.syncProblemImage,b=null!=f&&null!=f.message?b+(" ("+f.message+")"):b+(" ("+mxResources.get("disconnected")+")")))):(b=mxResources.get("disconnected"),k=Editor.cloudOffImage);this.collaboratorsElement.setAttribute("title",b);this.collaboratorsElement.style.backgroundImage="url("+ +k+")"}}}; +DrawioFileSync.prototype.updateStatus=function(){this.isConnected()&&null!=this.lastActivity&&(Date.now()-this.lastActivity)/1E3>this.inactivityTimeoutSeconds&&this.stop();if(!(this.file.isModified()||this.file.inConflictState||null!=this.file.autosaveThread||this.file.savingFile||this.file.redirectDialogShowing))if(this.enabled&&null!=this.ui.statusContainer){var b=this.ui.timeSince(new Date(this.lastModified));null==b&&(b=mxResources.get("lessThanAMinute"));var f=this.file.isRevisionHistorySupported(),k= +this.lastMessage;this.lastMessage=null;null!=k&&40<k.length&&(k=k.substring(0,40)+"...");b=mxResources.get("lastChange",[b]);this.ui.editor.setStatus('<div title="'+mxUtils.htmlEntities(b)+'">'+mxUtils.htmlEntities(b)+"</div>"+(this.file.isEditable()?"":'<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>")+(this.isConnected()?"":'<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("disconnected"))+"</div>")+(null!=k?' <span title="'+mxUtils.htmlEntities(k)+ +'">('+mxUtils.htmlEntities(k)+")</span>":""));k=this.ui.statusContainer.getElementsByTagName("div");0<k.length&&f&&(k[0].style.display="inline-block",f&&(k[0].style.cursor="pointer",k[0].style.textDecoration="underline",mxEvent.addListener(k[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()}))));f=this.ui.statusContainer.getElementsByTagName("span");if(0<f.length){var e=f[0];e.style.opacity="0";mxUtils.setPrefixedStyle(e.style,"transition","all 0.2s ease");window.setTimeout(mxUtils.bind(this, +function(){mxUtils.setOpacity(e,100);mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,0);window.setTimeout(mxUtils.bind(this,function(){this.updateStatus()}),1E3)}),this.updateStatusInterval/2)}),0)}this.resetUpdateStatusThread()}else this.file.addAllSavedStatus()}; DrawioFileSync.prototype.resetUpdateStatusThread=function(){null!=this.updateStatusThread&&window.clearInterval(this.updateStatusThread);null!=this.channel&&(this.updateStatusThread=window.setInterval(mxUtils.bind(this,function(){this.updateStatus()}),this.updateStatusInterval))};DrawioFileSync.prototype.installListeners=function(){null!=this.pusher&&null!=this.pusher.connection&&this.pusher.connection.bind("state_change",this.connectionListener);null!=this.channel&&this.channel.bind("changed",this.changeListener)}; DrawioFileSync.prototype.handleMessageData=function(b){if("desc"==b.a)this.file.savingFile||this.reloadDescriptor();else if("join"==b.a||"leave"==b.a)"join"==b.a&&this.file.stats.joined++,null!=b.name&&(this.lastMessage=mxResources.get("join"==b.a?"userJoined":"userLeft",[decodeURIComponent(b.name)]),this.resetUpdateStatusThread(),this.updateStatus());else if("change"==b.a)this.receiveRemoteChanges(b);else if(null!=b.m){var f=new Date(b.m);if(null==this.lastMessageModified||this.lastMessageModified< f)this.lastMessageModified=f,this.fileChangedNotify(b)}};DrawioFileSync.prototype.isValidState=function(){return this.ui.getCurrentFile()==this.file&&this.file.sync==this&&!this.file.invalidChecksum&&!this.file.redirectDialogShowing}; -DrawioFileSync.prototype.optimisticSync=function(b){null==this.reloadThread&&(b=null!=b?b:0,b<this.maxOptimisticRetries&&(this.reloadThread=window.setTimeout(mxUtils.bind(this,function(){this.file.getLatestVersion(mxUtils.bind(this,function(f){this.reloadThread=null;if(null!=f){var k=this.file.getCurrentRevisionId(),d=f.getCurrentRevisionId();k==d?this.optimisticSync(b+1):this.file.mergeFile(f,mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus()}))}}), +DrawioFileSync.prototype.optimisticSync=function(b){null==this.reloadThread&&(b=null!=b?b:0,b<this.maxOptimisticRetries&&(this.reloadThread=window.setTimeout(mxUtils.bind(this,function(){this.file.getLatestVersion(mxUtils.bind(this,function(f){this.reloadThread=null;if(null!=f){var k=this.file.getCurrentRevisionId(),e=f.getCurrentRevisionId();k==e?this.optimisticSync(b+1):this.file.mergeFile(f,mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus()}))}}), mxUtils.bind(this,function(){this.reloadThread=null}))}),(b+1)*this.file.optimisticSyncDelay)),EditorUi.debug("DrawioFileSync.optimisticSync",[this],"attempt",b,"of",this.maxOptimisticRetries))}; DrawioFileSync.prototype.fileChangedNotify=function(b){if(this.isValidState())if(this.file.savingFile)this.remoteFileChanged=!0;else if(null!=b&&"optimistic"==b.type)this.optimisticSync();else var f=this.fileChanged(mxUtils.bind(this,function(k){this.updateStatus()}),mxUtils.bind(this,function(k){this.file.handleFileError(k)}),mxUtils.bind(this,function(){return!this.file.savingFile&&this.notifyThread!=f}),!0)}; DrawioFileSync.prototype.localFileChanged=function(){this.file.isRealtime()&&(window.clearTimeout(this.triggerSendThread),this.localFileWasChanged=!0,this.scheduleCleanup(!0),this.triggerSendThread=window.setTimeout(mxUtils.bind(this,function(){this.sendLocalChanges()}),Math.min(this.file.autosaveDelay,this.syncSendMessageDelay-20)))}; DrawioFileSync.prototype.doSendLocalChanges=function(b){if(!this.file.ignorePatches(b)){var f=this.clientId+"."+this.syncChangeCounter++,k=this.createMessage({a:"change",c:b,id:f,t:Date.now()});f=!1;null!=this.p2pCollab?this.p2pCollab.sendDiff(k):"1"==urlParams.dev?(k=encodeURIComponent(this.objectToString(k)),0==this.maxSyncMessageSize||k.length<this.maxSyncMessageSize?mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+k):f=!0):f=!0;EditorUi.debug("DrawioFileSync.doSendLocalChanges",[this], "changes",b,f?"(skipped)":"")}}; -DrawioFileSync.prototype.receiveRemoteChanges=function(b){this.file.ignorePatches(b.c)||(null==this.receivedData?(this.receivedData=[b],window.setTimeout(mxUtils.bind(this,function(){if(this.ui.getCurrentFile()==this.file)if(1==this.receivedData.length)this.doReceiveRemoteChanges(this.receivedData[0].c);else{this.receivedData.sort(function(u,x){return u.id<x.id?-1:u.id>x.id?1:0});for(var f=null,k=0;k<this.receivedData.length;k++){var d=JSON.stringify(this.receivedData[k].c);d!=f&&this.doReceiveRemoteChanges(this.receivedData[k].c); -f=d}}this.receivedData=null}),this.syncReceiveMessageDelay)):this.receivedData.push(b))};DrawioFileSync.prototype.scheduleCleanup=function(b){b?null!=this.cleanupThread&&this.scheduleCleanup():(window.clearTimeout(this.cleanupThread),this.cleanupThread=window.setTimeout(mxUtils.bind(this,function(){this.cleanupThread=null;this.cleanup(null,mxUtils.bind(this,function(f){this.file.handleFileError(f)}))}),this.cleanupDelay))}; -DrawioFileSync.prototype.cleanup=function(b,f,k){window.clearTimeout(this.cleanupThread);if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()&&!this.file.isModified()){var d=[this.ui.diffPages(this.ui.pages,this.file.ownPages)];this.file.theirPages=this.ui.clonePages(this.file.ownPages);this.file.ignorePatches(d)||this.file.patch(d);EditorUi.debug("DrawioFileSync.cleanup",[this],"patches",d,"checkFile",k);k?this.file.getLatestVersion(mxUtils.bind(this,function(u){try{if(this.isValidState()&& -!this.file.inConflictState&&this.file.isRealtime()){var x=this.ui.getPagesForXml(u.data);d=[this.ui.diffPages(this.ui.pages,x),this.ui.diffPages(x,this.file.ownPages)];this.file.ignorePatches(d)||this.file.patch(d);EditorUi.debug("DrawioFileSync.cleanup",[this],"newFile",u,"patches",d)}null!=b&&b()}catch(B){null!=f&&f(B)}}),f):null!=b&&b()}else null!=b&&(b(),EditorUi.debug("DrawioFileSync.cleanup",[this],"checkFile",k,"modified",this.file.isModified()))}; +DrawioFileSync.prototype.receiveRemoteChanges=function(b){this.file.ignorePatches(b.c)||(null==this.receivedData?(this.receivedData=[b],window.setTimeout(mxUtils.bind(this,function(){if(this.ui.getCurrentFile()==this.file)if(1==this.receivedData.length)this.doReceiveRemoteChanges(this.receivedData[0].c);else{this.receivedData.sort(function(u,v){return u.id<v.id?-1:u.id>v.id?1:0});for(var f=null,k=0;k<this.receivedData.length;k++){var e=JSON.stringify(this.receivedData[k].c);e!=f&&this.doReceiveRemoteChanges(this.receivedData[k].c); +f=e}}this.receivedData=null}),this.syncReceiveMessageDelay)):this.receivedData.push(b))};DrawioFileSync.prototype.scheduleCleanup=function(b){b?null!=this.cleanupThread&&this.scheduleCleanup():(window.clearTimeout(this.cleanupThread),this.cleanupThread=window.setTimeout(mxUtils.bind(this,function(){this.cleanupThread=null;this.cleanup(null,mxUtils.bind(this,function(f){this.file.handleFileError(f)}))}),this.cleanupDelay))}; +DrawioFileSync.prototype.cleanup=function(b,f,k){window.clearTimeout(this.cleanupThread);if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()&&!this.file.isModified()){var e=[this.ui.diffPages(this.ui.pages,this.file.ownPages)];this.file.theirPages=this.ui.clonePages(this.file.ownPages);this.file.ignorePatches(e)||this.file.patch(e);EditorUi.debug("DrawioFileSync.cleanup",[this],"patches",e,"checkFile",k);k?this.file.getLatestVersion(mxUtils.bind(this,function(u){try{if(this.isValidState()&& +!this.file.inConflictState&&this.file.isRealtime()){var v=this.ui.getPagesForXml(u.data);e=[this.ui.diffPages(this.ui.pages,v),this.ui.diffPages(v,this.file.ownPages)];this.file.ignorePatches(e)||this.file.patch(e);EditorUi.debug("DrawioFileSync.cleanup",[this],"newFile",u,"patches",e)}null!=b&&b()}catch(B){null!=f&&f(B)}}),f):null!=b&&b()}else null!=b&&(b(),EditorUi.debug("DrawioFileSync.cleanup",[this],"checkFile",k,"modified",this.file.isModified()))}; DrawioFileSync.prototype.extractLocal=function(b){return mxUtils.isEmptyObject(b)?{}:this.ui.diffPages(this.file.theirPages,this.ui.patchPages(this.ui.clonePages(this.file.theirPages),b))}; -DrawioFileSync.prototype.extractRemove=function(b){var f={};null!=b[EditorUi.DIFF_REMOVE]&&(f[EditorUi.DIFF_REMOVE]=b[EditorUi.DIFF_REMOVE]);if(null!=b[EditorUi.DIFF_UPDATE])for(var k in b[EditorUi.DIFF_UPDATE]){var d=b[EditorUi.DIFF_UPDATE][k];if(null!=d.cells&&null!=d.cells[EditorUi.DIFF_REMOVE]){null==f[EditorUi.DIFF_UPDATE]&&(f[EditorUi.DIFF_UPDATE]={});f[EditorUi.DIFF_UPDATE][k]={};var u=f[EditorUi.DIFF_UPDATE][k];u.cells={};u.cells[EditorUi.DIFF_REMOVE]=d.cells[EditorUi.DIFF_REMOVE]}}return f}; -DrawioFileSync.prototype.patchRealtime=function(b,f,k){var d=null;if(this.file.isRealtime()){d=this.extractRemove(this.ui.diffPages(this.file.getShadowPages(),this.ui.pages));var u=this.extractRemove(this.extractLocal(d)),x=(null==k?b:b.concat(k)).concat([u]);this.file.ownPages=this.ui.applyPatches(this.file.ownPages,x,!0,f);mxUtils.isEmptyObject(u)?this.scheduleCleanup():this.file.fileChanged(!1);EditorUi.debug("DrawioFileSync.patchRealtime",[this],"patches",b,"backup",f,"own",k,"all",d,"local", -u,"applied",x)}return d};DrawioFileSync.prototype.isRealtimeActive=function(){return this.ui.editor.autosave}; +DrawioFileSync.prototype.extractRemove=function(b){var f={};null!=b[EditorUi.DIFF_REMOVE]&&(f[EditorUi.DIFF_REMOVE]=b[EditorUi.DIFF_REMOVE]);if(null!=b[EditorUi.DIFF_UPDATE])for(var k in b[EditorUi.DIFF_UPDATE]){var e=b[EditorUi.DIFF_UPDATE][k];if(null!=e.cells&&null!=e.cells[EditorUi.DIFF_REMOVE]){null==f[EditorUi.DIFF_UPDATE]&&(f[EditorUi.DIFF_UPDATE]={});f[EditorUi.DIFF_UPDATE][k]={};var u=f[EditorUi.DIFF_UPDATE][k];u.cells={};u.cells[EditorUi.DIFF_REMOVE]=e.cells[EditorUi.DIFF_REMOVE]}}return f}; +DrawioFileSync.prototype.patchRealtime=function(b,f,k){var e=null;if(this.file.isRealtime()){e=this.extractRemove(this.ui.diffPages(this.file.getShadowPages(),this.ui.pages));var u=this.extractRemove(this.extractLocal(e)),v=(null==k?b:b.concat(k)).concat([u]);this.file.ownPages=this.ui.applyPatches(this.file.ownPages,v,!0,f);mxUtils.isEmptyObject(u)?this.scheduleCleanup():this.file.fileChanged(!1);EditorUi.debug("DrawioFileSync.patchRealtime",[this],"patches",b,"backup",f,"own",k,"all",e,"local", +u,"applied",v)}return e};DrawioFileSync.prototype.isRealtimeActive=function(){return this.ui.editor.autosave}; DrawioFileSync.prototype.sendLocalChanges=function(){try{if(this.file.isRealtime()&&this.localFileWasChanged){var b=this.ui.clonePages(this.ui.pages),f=this.ui.diffPages(this.snapshot,b);this.file.ownPages=this.ui.patchPages(this.file.ownPages,f,!0);this.snapshot=b;this.isRealtimeActive()&&this.doSendLocalChanges([f])}this.localFileWasChanged=!1}catch(k){b=this.file.getCurrentUser(),b=null!=b?b.id:"unknown",EditorUi.logError("Error in sendLocalChanges",null,this.file.getMode()+"."+this.file.getId(), b,k)}};DrawioFileSync.prototype.doReceiveRemoteChanges=function(b){this.file.isRealtime()&&this.isRealtimeActive()&&(this.sendLocalChanges(),this.file.patch(b),this.file.theirPages=this.ui.applyPatches(this.file.theirPages,b),this.scheduleCleanup(),EditorUi.debug("DrawioFileSync.doReceiveRemoteChanges",[this],"changes",b))}; -DrawioFileSync.prototype.merge=function(b,f,k,d,u,x){try{this.file.stats.merged++;this.lastModified=new Date;var B=this.file.getDescriptorRevisionId(k);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var D=this.file.getShadowPages();this.file.backupPatch=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(D,this.ui.pages):null;var K=this.file.isRealtime()?this.ui.diffPages(D,this.file.ownPages):null;D=this.ui.applyPatches(D,b);var c=null==f?null:this.ui.getHashValueForPages(D); -this.file.setShadowPages(D);EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"backup",this.file.backupPatch,"pending",K,"checksum",f,"current",c,"valid",f==c,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",B,"etag",this.file.getDescriptorEtag(k));if(null!=f&&f!=c){var e=this.ui.hashValue(B),g=this.ui.hashValue(this.file.getCurrentRevisionId());this.file.checksumError(u,b,"From: "+g+"\nTo: "+e+"\nChecksum: "+f+"\nCurrent: "+c,B,"merge", -f,c,B);"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.merge.checksumError",[this],"data",[this.file.data,this.file.createData(),this.ui.getXmlForPages(D)]);return}null==this.patchRealtime(b,null,K)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),k);this.file.backupPatch=null;null!=d&&d(!0)}catch(n){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged(); -null!=u&&u(n);try{if(this.file.errorReportsEnabled)g=this.ui.hashValue(this.file.getCurrentRevisionId()),e=this.ui.hashValue(B),this.file.sendErrorReport("Error in merge","From: "+g+"\nTo: "+e+"\nChecksum: "+f+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(b,null,2)),n);else{var q=this.file.getCurrentUser(),m=null!=q?q.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),m,n)}}catch(z){}}}; -DrawioFileSync.prototype.fileChanged=function(b,f,k,d){var u=window.setTimeout(mxUtils.bind(this,function(){null!=k&&k()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",d,"valid",this.isValidState()),this.isValidState()?this.file.loadPatchDescriptor(mxUtils.bind(this,function(x){null!=k&&k()||(this.isValidState()?this.catchup(x,b,f,k):null!=f&&f())}),f):null!=f&&f())}),d?this.cacheReadyDelay:0);return this.notifyThread=u}; +DrawioFileSync.prototype.merge=function(b,f,k,e,u,v){try{this.file.stats.merged++;this.lastModified=new Date;var B=this.file.getDescriptorRevisionId(k);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var E=this.file.getShadowPages();this.file.backupPatch=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(E,this.ui.pages):null;var L=this.file.isRealtime()?this.ui.diffPages(E,this.file.ownPages):null;E=this.ui.applyPatches(E,b);var c=null==f?null:this.ui.getHashValueForPages(E); +this.file.setShadowPages(E);EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"backup",this.file.backupPatch,"pending",L,"checksum",f,"current",c,"valid",f==c,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",B,"etag",this.file.getDescriptorEtag(k));if(null!=f&&f!=c){var d=this.ui.hashValue(B),g=this.ui.hashValue(this.file.getCurrentRevisionId());this.file.checksumError(u,b,"From: "+g+"\nTo: "+d+"\nChecksum: "+f+"\nCurrent: "+c,B,"merge", +f,c,B);"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.merge.checksumError",[this],"data",[this.file.data,this.file.createData(),this.ui.getXmlForPages(E)]);return}null==this.patchRealtime(b,null,L)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),k);this.file.backupPatch=null;null!=e&&e(!0)}catch(n){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged(); +null!=u&&u(n);try{if(this.file.errorReportsEnabled)g=this.ui.hashValue(this.file.getCurrentRevisionId()),d=this.ui.hashValue(B),this.file.sendErrorReport("Error in merge","From: "+g+"\nTo: "+d+"\nChecksum: "+f+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(b,null,2)),n);else{var q=this.file.getCurrentUser(),m=null!=q?q.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),m,n)}}catch(z){}}}; +DrawioFileSync.prototype.fileChanged=function(b,f,k,e){var u=window.setTimeout(mxUtils.bind(this,function(){null!=k&&k()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",e,"valid",this.isValidState()),this.isValidState()?this.file.loadPatchDescriptor(mxUtils.bind(this,function(v){null!=k&&k()||(this.isValidState()?this.catchup(v,b,f,k):null!=f&&f())}),f):null!=f&&f())}),e?this.cacheReadyDelay:0);return this.notifyThread=u}; DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(b){null!=b?(this.file.setDescriptorRevisionId(b,this.file.getCurrentRevisionId()),this.updateDescriptor(b),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(b){this.file.inConflictState=!0;this.file.handleFileError(b)}))}; DrawioFileSync.prototype.updateDescriptor=function(b){this.file.setDescriptor(b);this.file.descriptorChanged();this.start()}; -DrawioFileSync.prototype.catchup=function(b,f,k,d){if(null!=b&&(null==d||!d())){var u=this.file.getCurrentRevisionId(),x=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",u,"to",x,"valid",this.isValidState());if(u==x)this.file.patchDescriptor(this.file.getDescriptor(),b),null!=f&&f(!0);else if(this.isValidState()){var B=this.file.getDescriptorSecret(b);if(null==B||"1"==urlParams.lockdown)this.reload(f,k,d);else{var D=0,K=!1,c=mxUtils.bind(this,function(){if(null== -d||!d())if(u!=this.file.getCurrentRevisionId())null!=f&&f(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var e=!0,g=window.setTimeout(mxUtils.bind(this,function(){e=!1;this.reload(f,k,d)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(u)+"&to="+encodeURIComponent(x)+(null!=B?"&secret="+encodeURIComponent(B):""),mxUtils.bind(this,function(q){this.file.stats.bytesReceived+=q.getText().length;window.clearTimeout(g);if(e&& -(null==d||!d()))if(u!=this.file.getCurrentRevisionId())null!=f&&f(!0);else if(this.isValidState()){var m=null,n=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"req",[q],"status",q.getStatus(),"cacheReadyRetryCount",D,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=q.getStatus()&&299>=q.getStatus()&&0<q.getText().length)try{var z=JSON.parse(q.getText());if(null!=z&&0<z.length)for(var C=0;C<z.length;C++){var v=this.stringToObject(z[C]);if(v.v>DrawioFileSync.PROTOCOL){K=!0;n=[];break}else if(v.v=== -DrawioFileSync.PROTOCOL&&null!=v.d)m=v.d.checksum,n.push(v.d.patch);else{K=!0;n=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[z],"failed",K,"temp",n,"checksum",m)}catch(y){n=[],null!=window.console&&"1"==urlParams.test&&console.log(y)}try{0<n.length?(this.file.stats.cacheHits++,this.merge(n,m,b,f,k,d)):D<=this.maxCacheReadyRetries-1&&!K&&401!=q.getStatus()&&503!=q.getStatus()&&410!=q.getStatus()?(D++,this.file.stats.cacheMiss++,window.setTimeout(c,(D+1)*this.cacheReadyDelay)): -(this.file.stats.cacheFail++,this.reload(f,k,d))}catch(y){null!=k&&k(y)}}else null!=k&&k()}))}else null!=k&&k()});window.setTimeout(c,this.cacheReadyDelay)}}else null!=k&&k()}};DrawioFileSync.prototype.reload=function(b,f,k,d){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(u){null!=f&&f(u)}),k,d)}; -DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var f=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),k=this.file.getCurrentRevisionId(),d=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(k)+"&msg="+encodeURIComponent(f)+"&data="+encodeURIComponent(d));this.file.stats.bytesSent+=d.length;this.file.stats.msgSent++; +DrawioFileSync.prototype.catchup=function(b,f,k,e){if(null!=b&&(null==e||!e())){var u=this.file.getCurrentRevisionId(),v=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",u,"to",v,"valid",this.isValidState());if(u==v)this.file.patchDescriptor(this.file.getDescriptor(),b),null!=f&&f(!0);else if(this.isValidState()){var B=this.file.getDescriptorSecret(b);if(null==B||"1"==urlParams.lockdown)this.reload(f,k,e);else{var E=0,L=!1,c=mxUtils.bind(this,function(){if(null== +e||!e())if(u!=this.file.getCurrentRevisionId())null!=f&&f(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;this.reload(f,k,e)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(u)+"&to="+encodeURIComponent(v)+(null!=B?"&secret="+encodeURIComponent(B):""),mxUtils.bind(this,function(q){this.file.stats.bytesReceived+=q.getText().length;window.clearTimeout(g);if(d&& +(null==e||!e()))if(u!=this.file.getCurrentRevisionId())null!=f&&f(!0);else if(this.isValidState()){var m=null,n=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"req",[q],"status",q.getStatus(),"cacheReadyRetryCount",E,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=q.getStatus()&&299>=q.getStatus()&&0<q.getText().length)try{var z=JSON.parse(q.getText());if(null!=z&&0<z.length)for(var C=0;C<z.length;C++){var x=this.stringToObject(z[C]);if(x.v>DrawioFileSync.PROTOCOL){L=!0;n=[];break}else if(x.v=== +DrawioFileSync.PROTOCOL&&null!=x.d)m=x.d.checksum,n.push(x.d.patch);else{L=!0;n=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[z],"failed",L,"temp",n,"checksum",m)}catch(y){n=[],null!=window.console&&"1"==urlParams.test&&console.log(y)}try{0<n.length?(this.file.stats.cacheHits++,this.merge(n,m,b,f,k,e)):E<=this.maxCacheReadyRetries-1&&!L&&401!=q.getStatus()&&503!=q.getStatus()&&410!=q.getStatus()?(E++,this.file.stats.cacheMiss++,window.setTimeout(c,(E+1)*this.cacheReadyDelay)): +(this.file.stats.cacheFail++,this.reload(f,k,e))}catch(y){null!=k&&k(y)}}else null!=k&&k()}))}else null!=k&&k()});window.setTimeout(c,this.cacheReadyDelay)}}else null!=k&&k()}};DrawioFileSync.prototype.reload=function(b,f,k,e){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(u){null!=f&&f(u)}),k,e)}; +DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var f=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),k=this.file.getCurrentRevisionId(),e=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(k)+"&msg="+encodeURIComponent(f)+"&data="+encodeURIComponent(e));this.file.stats.bytesSent+=e.length;this.file.stats.msgSent++; EditorUi.debug("DrawioFileSync.descriptorChanged",[this],"from",b,"to",k)}this.updateStatus()};DrawioFileSync.prototype.objectToString=function(b){b=Graph.compress(JSON.stringify(b));null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.encrypt(b,this.key).toString());return b};DrawioFileSync.prototype.stringToObject=function(b){null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.decrypt(b,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(b))}; -DrawioFileSync.prototype.createToken=function(b,f,k){var d=!0,u=window.setTimeout(mxUtils.bind(this,function(){d=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(x){window.clearTimeout(u);d&&(200<=x.getStatus()&&299>=x.getStatus()?f(x.getText()):k({code:x.getStatus(),message:"Token Error "+x.getStatus()}))}))}; +DrawioFileSync.prototype.createToken=function(b,f,k){var e=!0,u=window.setTimeout(mxUtils.bind(this,function(){e=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(v){window.clearTimeout(u);e&&(200<=v.getStatus()&&299>=v.getStatus()?f(v.getText()):k({code:v.getStatus(),message:"Token Error "+v.getStatus()}))}))}; DrawioFileSync.prototype.fileSaving=function(){if(this.file.isOptimisticSync()){var b=this.objectToString(this.createMessage({m:(new Date).getTime(),type:"optimistic"}));mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(b),function(){})}EditorUi.debug("DrawioFileSync.fileSaving",[this],"optimistic",this.file.isOptimisticSync())};DrawioFileSync.prototype.fileDataUpdated=function(){this.scheduleCleanup(!0);EditorUi.debug("DrawioFileSync.fileDataUpdated",[this])}; -DrawioFileSync.prototype.fileSaved=function(b,f,k,d,u){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var x=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),B=this.file.getDescriptorSecret(this.file.getDescriptor()),D=this.file.getDescriptorRevisionId(f),K=this.file.getCurrentRevisionId();if(null== -B||null==u||"1"==urlParams.lockdown)this.file.stats.msgSent++,mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(x),function(){}),null!=k&&k(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",D,"to",K,"etag",this.file.getCurrentEtag());else{var c=this.ui.diffPages(this.file.getShadowPages(),b);f=this.file.getDescriptorSecret(f);var e=this.ui.getHashValueForPages(b),g=this.objectToString(this.createMessage({patch:c,checksum:e}));this.file.stats.bytesSent+=g.length; -this.file.stats.msgSent++;var q=!0,m=window.setTimeout(mxUtils.bind(this,function(){q=!1;d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(D)+"&to="+encodeURIComponent(K)+"&msg="+encodeURIComponent(x)+(null!=B?"&secret="+encodeURIComponent(B):"")+(null!=f?"&last-secret="+encodeURIComponent(f):"")+(g.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(g):"")+(null!=u?"&token="+encodeURIComponent(u): -""),mxUtils.bind(this,function(n){window.clearTimeout(m);q&&(200<=n.getStatus()&&299>=n.getStatus()?null!=k&&k():d({code:n.getStatus(),message:n.getStatus()}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"diff",c,g.length,"bytes","from",D,"to",K,"etag",this.file.getCurrentEtag(),"checksum",e)}}this.file.setShadowPages(b);this.scheduleCleanup()}; +DrawioFileSync.prototype.fileSaved=function(b,f,k,e,u){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var v=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),B=this.file.getDescriptorSecret(this.file.getDescriptor()),E=this.file.getDescriptorRevisionId(f),L=this.file.getCurrentRevisionId();if(null== +B||null==u||"1"==urlParams.lockdown)this.file.stats.msgSent++,mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(v),function(){}),null!=k&&k(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",E,"to",L,"etag",this.file.getCurrentEtag());else{var c=this.ui.diffPages(this.file.getShadowPages(),b);f=this.file.getDescriptorSecret(f);var d=this.ui.getHashValueForPages(b),g=this.objectToString(this.createMessage({patch:c,checksum:d}));this.file.stats.bytesSent+=g.length; +this.file.stats.msgSent++;var q=!0,m=window.setTimeout(mxUtils.bind(this,function(){q=!1;e({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(E)+"&to="+encodeURIComponent(L)+"&msg="+encodeURIComponent(v)+(null!=B?"&secret="+encodeURIComponent(B):"")+(null!=f?"&last-secret="+encodeURIComponent(f):"")+(g.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(g):"")+(null!=u?"&token="+encodeURIComponent(u): +""),mxUtils.bind(this,function(n){window.clearTimeout(m);q&&(200<=n.getStatus()&&299>=n.getStatus()?null!=k&&k():e({code:n.getStatus(),message:n.getStatus()}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"diff",c,g.length,"bytes","from",E,"to",L,"etag",this.file.getCurrentEtag(),"checksum",d)}}this.file.setShadowPages(b);this.scheduleCleanup()}; DrawioFileSync.prototype.getIdParameters=function(){var b="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&null!=this.pusher.connection.socket_id&&(b+="&sid="+this.pusher.connection.socket_id);return b};DrawioFileSync.prototype.createMessage=function(b){return{v:DrawioFileSync.PROTOCOL,d:b,c:this.clientId}}; DrawioFileSync.prototype.fileConflict=function(b,f,k){this.catchupRetryCount++;EditorUi.debug("DrawioFileSync.fileConflict",[this],"desc",[b],"catchupRetryCount",this.catchupRetryCount,"maxCatchupRetries",this.maxCatchupRetries);this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=b?this.catchup(b,f,k):this.fileChanged(f,k)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=k&&k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")}))}; DrawioFileSync.prototype.stop=function(){null!=this.pusher&&(EditorUi.debug("DrawioFileSync.stop",[this]),null!=this.pusher.connection&&(this.pusher.connection.unbind("state_change",this.connectionListener),this.pusher.connection.unbind("error",this.pusherErrorListener)),null!=this.channel&&(this.channel.unbind("changed",this.changeListener),this.channel=null),this.pusher.disconnect(),this.pusher=null,null!=this.p2pCollab&&(this.p2pCollab.destroy(),this.p2pCollab=null));this.updateOnlineState();this.updateStatus()}; DrawioFileSync.prototype.destroy=function(){if(null!=this.channelId){var b=this.file.getCurrentUser(),f={a:"leave"};null!=b&&(f.name=encodeURIComponent(b.displayName),f.uid=b.id);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(this.objectToString(this.createMessage(f))));this.file.stats.msgSent++}this.stop();null!=this.onlineListener&&(mxEvent.removeListener(window,"online",this.onlineListener),this.onlineListener=null);null!=this.autosaveListener&&(this.ui.editor.addListener("autosaveChanged", this.autosaveListener),this.autosaveListener=null);null!=this.visibleListener&&(mxEvent.removeListener(document,"visibilitychange",this.visibleListener),this.visibleListener=null);null!=this.activityListener&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.activityListener),mxEvent.removeListener(document,"keypress",this.activityListener),mxEvent.removeListener(window,"focus",this.activityListener),!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.removeListener(document, -"touchstart",this.activityListener),mxEvent.removeListener(document,"touchmove",this.activityListener)),this.activityListener=null);null!=this.collaboratorsElement&&(this.collaboratorsElement.parentNode.removeChild(this.collaboratorsElement),this.collaboratorsElement=null);null!=this.p2pCollab&&this.p2pCollab.destroy()};App=function(b,f,k){EditorUi.call(this,b,f,null!=k?k:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var d=this.getCurrentFile();if(null!=d&&d.isModified()){var u={category:"DISCARD-FILE-"+d.getHash(),action:(d.savingFile?"saving":"")+(d.savingFile&&null!=d.savingFileTime?"_"+Math.round((Date.now()-d.savingFileTime.getTime())/1E3):"")+(null!=d.saveLevel?"-sl_"+d.saveLevel:"")+"-age_"+(null!= -d.ageStart?Math.round((Date.now()-d.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(d.isAutosave()?"":"-noauto")+"-open_"+(null!=d.opened?Math.round((Date.now()-d.opened.getTime())/1E3):"x")+"-save_"+(null!=d.lastSaved?Math.round((Date.now()-d.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=d.lastChanged?Math.round((Date.now()-d.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=d.sync?"client_"+d.sync.clientId:"nosync"}; -d.constructor==DriveFile&&null!=d.desc&&null!=this.drive&&(u.label+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+d.desc.headRevisionId+"-mod_"+d.desc.modifiedDate+"-size_"+d.getSize()+"-mime_"+d.desc.mimeType);EditorUi.logEvent(u)}}));this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var d=this.getCurrentFile();null!=d&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+d.getHash(),action:"changed",label:"autosave_"+(this.editor.autosave? +"touchstart",this.activityListener),mxEvent.removeListener(document,"touchmove",this.activityListener)),this.activityListener=null);null!=this.collaboratorsElement&&(this.collaboratorsElement.parentNode.removeChild(this.collaboratorsElement),this.collaboratorsElement=null);null!=this.p2pCollab&&this.p2pCollab.destroy()};App=function(b,f,k){EditorUi.call(this,b,f,null!=k?k:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var e=this.getCurrentFile();if(null!=e&&e.isModified()){var u={category:"DISCARD-FILE-"+e.getHash(),action:(e.savingFile?"saving":"")+(e.savingFile&&null!=e.savingFileTime?"_"+Math.round((Date.now()-e.savingFileTime.getTime())/1E3):"")+(null!=e.saveLevel?"-sl_"+e.saveLevel:"")+"-age_"+(null!= +e.ageStart?Math.round((Date.now()-e.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(e.isAutosave()?"":"-noauto")+"-open_"+(null!=e.opened?Math.round((Date.now()-e.opened.getTime())/1E3):"x")+"-save_"+(null!=e.lastSaved?Math.round((Date.now()-e.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=e.lastChanged?Math.round((Date.now()-e.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=e.sync?"client_"+e.sync.clientId:"nosync"}; +e.constructor==DriveFile&&null!=e.desc&&null!=this.drive&&(u.label+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+e.desc.headRevisionId+"-mod_"+e.desc.modifiedDate+"-size_"+e.getSize()+"-mime_"+e.desc.mimeType);EditorUi.logEvent(u)}}));this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var e=this.getCurrentFile();null!=e&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+e.getHash(),action:"changed",label:"autosave_"+(this.editor.autosave? "on":"off")})}));mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=": -(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(d,u,x){if("1"==urlParams.openInSameWin||navigator.standalone)x();else{var B=null;try{B=window.open(d)}catch(D){}null==B||void 0===B?this.showDialog((new PopupDialog(this,d,u,x)).container,320,140,!0,!0):null!=u&&u()}});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(d){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(d)});this.editor.chromeless&& -!this.editor.editable||this.addFileDropHandler([document]);if(null!=App.DrawPlugins){for(b=0;b<App.DrawPlugins.length;b++)try{App.DrawPlugins[b](this)}catch(d){null!=window.console&&console.log("Plugin Error:",d,App.DrawPlugins[b])}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}window.Draw.loadPlugin=mxUtils.bind(this,function(d){try{d(this)}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}});setTimeout(mxUtils.bind(this,function(){0<App.embedModePluginsCount&&(App.embedModePluginsCount= +(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(e,u,v){if("1"==urlParams.openInSameWin||navigator.standalone)v();else{var B=null;try{B=window.open(e)}catch(E){}null==B||void 0===B?this.showDialog((new PopupDialog(this,e,u,v)).container,320,140,!0,!0):null!=u&&u()}});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(e){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(e)});this.editor.chromeless&& +!this.editor.editable||this.addFileDropHandler([document]);if(null!=App.DrawPlugins){for(b=0;b<App.DrawPlugins.length;b++)try{App.DrawPlugins[b](this)}catch(e){null!=window.console&&console.log("Plugin Error:",e,App.DrawPlugins[b])}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}window.Draw.loadPlugin=mxUtils.bind(this,function(e){try{e(this)}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}});setTimeout(mxUtils.bind(this,function(){0<App.embedModePluginsCount&&(App.embedModePluginsCount= 0,this.initializeEmbedMode())}),5E3)}this.load()};App.ERROR_TIMEOUT="timeout";App.ERROR_BUSY="busy";App.ERROR_UNKNOWN="unknown";App.MODE_GOOGLE="google";App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive";App.MODE_GITHUB="github";App.MODE_GITLAB="gitlab";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.MODE_TRELLO="trello";App.MODE_EMBED="embed";App.MODE_ATLAS="atlas";App.DROPBOX_APPKEY=window.DRAWIO_DROPBOX_ID;App.DROPBOX_URL=window.DRAWIO_BASE_URL+"/js/dropbox/Dropbox-sdk.min.js"; App.DROPINS_URL="https://www.dropbox.com/static/api/2/dropins.js";App.ONEDRIVE_URL=mxClient.IS_IE11?"https://js.live.net/v7.2/OneDrive.js":window.DRAWIO_BASE_URL+"/js/onedrive/OneDrive.js";App.TRELLO_URL="https://api.trello.com/1/client.js";App.TRELLO_JQUERY_URL=window.DRAWIO_BASE_URL+"/js/jquery/jquery-3.6.0.min.js";App.PUSHER_KEY="1e756b07a690c5bdb054";App.PUSHER_CLUSTER="eu";App.PUSHER_URL="https://js.pusher.com/7.0.3/pusher.min.js";App.SIMPLE_PEER_URL=window.DRAWIO_BASE_URL+"/js/simplepeer/simplepeer9.10.0.min.js"; App.GOOGLE_APIS="drive-share";App.startTime=new Date; App.pluginRegistry={"4xAKTrabTpTzahoLthkwPNUn":"plugins/explore.js",ex:"plugins/explore.js",p1:"plugins/p1.js",ac:"plugins/connect.js",acj:"plugins/connectJira.js",ac148:"plugins/cConf-1-4-8.js",ac148cmnt:"plugins/cConf-comments.js",voice:"plugins/voice.js",tips:"plugins/tooltips.js",svgdata:"plugins/svgdata.js",electron:"plugins/electron.js",number:"plugins/number.js",sql:"plugins/sql.js",props:"plugins/props.js",text:"plugins/text.js",anim:"plugins/animation.js",update:"plugins/update.js",trees:"plugins/trees/trees.js", "import":"plugins/import.js",replay:"plugins/replay.js",anon:"plugins/anonymize.js",tr:"plugins/trello.js",f5:"plugins/rackF5.js",tickets:"plugins/tickets.js",flow:"plugins/flow.js",webcola:"plugins/webcola/webcola.js",rnd:"plugins/random.js",page:"plugins/page.js",gd:"plugins/googledrive.js",tags:"plugins/tags.js"};App.publicPlugin="ex voice tips svgdata number sql props text anim update trees replay anon tickets flow webcola tags".split(" "); -App.loadScripts=function(b,f){for(var k=b.length,d=0;d<b.length;d++)mxscript(b[d],function(){0==--k&&null!=f&&f()})}; -App.getStoredMode=function(){var b=null;null==b&&isLocalStorage&&(b=localStorage.getItem(".mode"));if(null==b&&"undefined"!=typeof Storage){for(var f=document.cookie.split(";"),k=0;k<f.length;k++){var d=mxUtils.trim(f[k]);if("MODE="==d.substring(0,5)){b=d.substring(5);break}}null!=b&&isLocalStorage&&(f=new Date,f.setYear(f.getFullYear()-1),document.cookie="MODE=; expires="+f.toUTCString(),localStorage.setItem(".mode",b))}return b}; +App.loadScripts=function(b,f){for(var k=b.length,e=0;e<b.length;e++)mxscript(b[e],function(){0==--k&&null!=f&&f()})}; +App.getStoredMode=function(){var b=null;null==b&&isLocalStorage&&(b=localStorage.getItem(".mode"));if(null==b&&"undefined"!=typeof Storage){for(var f=document.cookie.split(";"),k=0;k<f.length;k++){var e=mxUtils.trim(f[k]);if("MODE="==e.substring(0,5)){b=e.substring(5);break}}null!=b&&isLocalStorage&&(f=new Date,f.setYear(f.getFullYear()-1),document.cookie="MODE=; expires="+f.toUTCString(),localStorage.setItem(".mode",b))}return b}; (function(){mxClient.IS_CHROMEAPP||("1"!=urlParams.offline&&("db.draw.io"==window.location.hostname&&null==urlParams.mode&&(urlParams.mode="dropbox"),App.mode=urlParams.mode),null==App.mode&&(App.mode=App.getStoredMode()),null!=window.mxscript&&"1"!=urlParams.embed&&("function"===typeof window.DriveClient&&("0"!=urlParams.gapi&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_GOOGLE||null!=urlParams.state&&""==window.location.hash||null!=window.location.hash&& "#G"==window.location.hash.substring(0,2)?mxscript("https://apis.google.com/js/api.js"):"0"!=urlParams.chrome||null!=window.location.hash&&"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"===window.location.hash.substring(0,45)||(window.DriveClient=null):window.DriveClient=null),"function"===typeof window.DropboxClient&&("0"!=urlParams.db&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?App.mode==App.MODE_DROPBOX||null!=window.location.hash&&"#D"==window.location.hash.substring(0, 2)?mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,null,"dropboxjs",App.DROPBOX_APPKEY,!0)}):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript(App.ONEDRIVE_URL):"0"==urlParams.chrome&&(window.OneDriveClient= null):window.OneDriveClient=null),"function"===typeof window.TrelloClient&&("1"==urlParams.tr&&isSvgBrowser&&!mxClient.IS_IE11&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_TRELLO||null!=window.location.hash&&"#T"==window.location.hash.substring(0,2)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL)}):"0"==urlParams.chrome&&(window.TrelloClient=null):window.TrelloClient=null)))})(); -App.clearServiceWorker=function(b,f){navigator.serviceWorker.getRegistrations().then(function(k){if(null!=k&&0<k.length){for(var d=0;d<k.length;d++)k[d].unregister();null!=b&&b()}})["catch"](function(){null!=f&&f()})}; -App.main=function(b,f){function k(e){mxUtils.getAll("1"!=urlParams.dev?[e]:[e,STYLE_PATH+"/default.xml"],function(g){function q(){var I=null!=f?f():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode|| +App.clearServiceWorker=function(b,f){navigator.serviceWorker.getRegistrations().then(function(k){if(null!=k&&0<k.length){for(var e=0;e<k.length;e++)k[e].unregister();null!=b&&b()}})["catch"](function(){null!=f&&f()})};App.isSameDomain=function(b){var f=document.createElement("a");f.href=b;return f.protocol===window.location.protocol||f.host===window.location.host};App.isBuiltInPlugin=function(b){for(var f in App.pluginRegistry)if(App.pluginRegistry[f]==b)return!0;return!1}; +App.main=function(b,f){function k(c){mxUtils.getAll("1"!=urlParams.dev?[c]:[c,STYLE_PATH+"/default.xml"],function(d){function g(){var C=null!=f?f():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode|| 9<document.documentMode))mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)});else if("undefined"===typeof window.Dropbox||"undefined"===typeof window.Dropbox.choose)window.DropboxClient=null;"function"===typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(null==navigator.userAgent|| 0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null);"function"===typeof window.TrelloClient&&!mxClient.IS_IE11&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&"1"==urlParams.tr&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL, -function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=b&&b(I);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[I,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}mxResources.parse(g[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var m=function(I){if(null!=I)for(var N=0;N<I.length;N++)if(!n[I[N]])throw Error(mxResources.get("invalidInput")+ -' "'+I[N])+'"';return!0},n={},z;for(z in App.pluginRegistry)n[App.pluginRegistry[z]]=!0;var C=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=C&&m(C.plugins)){EditorUi.debug("Setting configuration",JSON.stringify(C));if(null!=C.merge){var v=localStorage.getItem(Editor.configurationKey);if(null!=v)try{var y=JSON.parse(v);for(z in C.merge)y[z]=C.merge[z];C=y}catch(I){window.location.hash="",alert(I)}else C=C.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&& -(localStorage.setItem(Editor.configurationKey,JSON.stringify(C)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(I){window.location.hash="",alert(I)}1<g.length&&(Graph.prototype.defaultThemes["default-style2"]=g[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=g[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?q():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"], -q))},function(g){g=document.getElementById("geStatus");null!=g&&(g.innerHTML="Error loading page. <a>Please try refreshing.</a>",g.getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";k(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})}function d(){try{if(null!=mxSettings.settings){document.body.style.backgroundColor="atlas"!=uiTheme&&"kennedy"!=uiTheme&&(Editor.isDarkMode()||mxSettings.settings.darkMode)?Editor.darkColor: -"#ffffff";if(null!=mxSettings.settings.autosaveDelay){var e=parseInt(mxSettings.settings.autosaveDelay);!isNaN(e)&&0<e?(DrawioFile.prototype.autosaveDelay=e,EditorUi.debug("Setting autosaveDelay",e)):EditorUi.debug("Invalid autosaveDelay",e)}null!=mxSettings.settings.defaultEdgeLength&&(e=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(e)&&0<e?(Graph.prototype.defaultEdgeLength=e,EditorUi.debug("Using defaultEdgeLength",e)):EditorUi.debug("Invalid defaultEdgeLength",e))}}catch(q){null!=window.console&& -console.error(q)}if(null!=Menus.prototype.defaultFonts)for(e=0;e<Menus.prototype.defaultFonts.length;e++){var g=Menus.prototype.defaultFonts[e];"string"!==typeof g&&null!=g.fontFamily&&null!=g.fontUrl&&Graph.addFont(g.fontFamily,g.fontUrl)}mxResources.loadDefaultBundle=!1;k(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(e,g,q,m,n){EditorUi.logError("Global: "+(null!=e?e:""),g,q,m,n,null,!0)};if(window.top!=window.self|| -"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&"aj.draw.io"!==window.location.hostname){if("1"==urlParams.embed||"1"==urlParams.lightbox){var u=document.getElementById("geInfo");null!=u&&u.parentNode.removeChild(u)}null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){if("1"==urlParams.dev&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&& -null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){u=document.getElementsByTagName("script");if(null!=u&&0<u.length){var x=mxUtils.getTextContent(u[0]);"1f536e2400baaa30261b8c3976d6fe06"!=CryptoJS.MD5(x).toString()&&(console.log("Change bootstrap script MD5 in the previous line:",CryptoJS.MD5(x).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}null!=u&&1<u.length&&(x=mxUtils.getTextContent(u[u.length-1]),"d53805dd6f0bbba2da4966491ca0a505"!=CryptoJS.MD5(x).toString()&& -(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(x).toString()),alert("[Dev] Main script change requires update of CSP")))}try{Editor.enableServiceWorker&&("0"==urlParams.offline||/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"==urlParams.dev)?App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")}):Editor.enableServiceWorker&&navigator.serviceWorker.register("service-worker.js")}catch(e){null!=window.console&&console.error(e)}!("ArrayBuffer"in -window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&"1"!=urlParams.embedRT||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=urlParams.rt||"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){u=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var B= -JSON.parse(localStorage.getItem(mxSettings.key));null!=B&&(u=B.plugins)}catch(e){}B=urlParams.p;App.initPluginCallback();null!=B&&App.loadPlugins(B.split(";"));if(null!=u&&0<u.length&&"0"!=urlParams.plugins){B=window.location.protocol+"//"+window.location.host;x=!0;for(var D=0;D<u.length&&x;D++)"/"!=u[D].charAt(0)&&u[D].substring(0,B.length)!=B&&(x=!1);if(x||mxUtils.confirm(mxResources.replacePlaceholders("The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n", -[u.join("\n")]).replace(/\\n/g,"\n")))for(D=0;D<u.length;D++)try{null==App.pluginsLoaded[u[D]]&&(App.pluginsLoaded[u[D]]=!0,App.embedModePluginsCount++,"/"==u[D].charAt(0)&&(u[D]=PLUGINS_BASE_PATH+u[D]),mxscript(u[D]))}catch(e){}}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback", -null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var K=window.opener||window.parent,c=function(e){if(e.source==K)try{var g=JSON.parse(e.data);null!=g&&"configure"==g.action&&(mxEvent.removeListener(window,"message",c),Editor.configure(g.config,!0),mxSettings.load(),g.colorSchemeMeta&&mxmeta("color-scheme","dark light"),d())}catch(q){null!=window.console&&console.log("Error in configure message: "+ -q,e.data)}};mxEvent.addListener(window,"message",c);K.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),mxSettings.load()}catch(e){null!=window.console&&console.error(e)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&(u=localStorage.getItem(Editor.configurationKey),null!=u))try{u=JSON.parse(u),null!=u&&(EditorUi.debug("Using local configuration", -u),Editor.configure(u),mxSettings.load())}catch(e){null!=window.console&&console.error(e)}}d()}}else document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'};mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture=IMAGE_PATH+"/default-user.jpg";App.prototype.shareImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMjU2NzdEMTcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMjU2NzdEMDcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNjgwMTE3NDA3MjA2ODExODcxRkM4MUY1OTFDMjQ5OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrM/fs0AAADgSURBVHjaYmDAA/7//88MwgzkAKDGFiD+BsQ/QWxSNaf9RwN37twpI8WAS+gGfP78+RpQSoRYA36iG/D379+vQClNdLVMOMz4gi7w79+/n0CKg1gD9qELvH379hzIHGK9oA508ieY8//8+fO5rq4uFCilRKwL1JmYmNhhHEZGRiZ+fn6Q2meEbDYG4u3/cYCfP38uA7kOm0ZOIJ7zn0jw48ePPiDFhmzArv8kgi9fvuwB+w5qwH9ykjswbFSZyM4sEMDPBDTlL5BxkFSd7969OwZ2BZKYGhDzkmjOJ4AAAwBhpRqGnEFb8QAAAABJRU5ErkJggg=="; +function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=b&&b(C);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[C,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}mxResources.parse(d[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var q=JSON.parse(Graph.decompress(window.location.hash.substring(9))); +if(null!=q){EditorUi.debug("Setting configuration",JSON.stringify(q));if(null!=q.merge){var m=localStorage.getItem(Editor.configurationKey);if(null!=m)try{var n=JSON.parse(m),z;for(z in q.merge)n[z]=q.merge[z];q=n}catch(C){window.location.hash="",alert(C)}else q=q.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(q)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(C){window.location.hash= +"",alert(C)}1<d.length&&(Graph.prototype.defaultThemes["default-style2"]=d[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=d[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?g():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],g))},function(d){d=document.getElementById("geStatus");null!=d&&(d.innerHTML="Error loading page. <a>Please try refreshing.</a>",d.getElementsByTagName("a")[0].onclick= +function(){mxLanguage="en";k(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})}function e(){try{if(null!=mxSettings.settings){document.body.style.backgroundColor="atlas"!=uiTheme&&"kennedy"!=uiTheme&&(Editor.isDarkMode()||mxSettings.settings.darkMode)?Editor.darkColor:"#ffffff";if(null!=mxSettings.settings.autosaveDelay){var c=parseInt(mxSettings.settings.autosaveDelay);!isNaN(c)&&0<c?(DrawioFile.prototype.autosaveDelay=c,EditorUi.debug("Setting autosaveDelay", +c)):EditorUi.debug("Invalid autosaveDelay",c)}null!=mxSettings.settings.defaultEdgeLength&&(c=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(c)&&0<c?(Graph.prototype.defaultEdgeLength=c,EditorUi.debug("Using defaultEdgeLength",c)):EditorUi.debug("Invalid defaultEdgeLength",c))}}catch(g){null!=window.console&&console.error(g)}if(null!=Menus.prototype.defaultFonts)for(c=0;c<Menus.prototype.defaultFonts.length;c++){var d=Menus.prototype.defaultFonts[c];"string"!==typeof d&&null!=d.fontFamily&& +null!=d.fontUrl&&Graph.addFont(d.fontFamily,d.fontUrl)}mxResources.loadDefaultBundle=!1;k(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(c,d,g,q,m){EditorUi.logError("Global: "+(null!=c?c:""),d,g,q,m,null,!0)};if(window.top!=window.self||"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&"aj.draw.io"!==window.location.hostname){if("1"==urlParams.embed||"1"==urlParams.lightbox){var u= +document.getElementById("geInfo");null!=u&&u.parentNode.removeChild(u)}null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){if("1"==urlParams.dev&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){u=document.getElementsByTagName("script");if(null!=u&&0<u.length){var v=mxUtils.getTextContent(u[0]);"1f536e2400baaa30261b8c3976d6fe06"!= +CryptoJS.MD5(v).toString()&&(console.log("Change bootstrap script MD5 in the previous line:",CryptoJS.MD5(v).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}null!=u&&1<u.length&&(v=mxUtils.getTextContent(u[u.length-1]),"d53805dd6f0bbba2da4966491ca0a505"!=CryptoJS.MD5(v).toString()&&(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(v).toString()),alert("[Dev] Main script change requires update of CSP")))}try{Editor.enableServiceWorker&&("0"==urlParams.offline|| +/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"==urlParams.dev)?App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")}):Editor.enableServiceWorker&&navigator.serviceWorker.register("service-worker.js")}catch(c){null!=window.console&&console.error(c)}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&"1"!=urlParams.embedRT||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!= +urlParams.rt||"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){u=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var B=JSON.parse(localStorage.getItem(mxSettings.key));null!=B&&(u=B.plugins)}catch(c){}B=urlParams.p;App.initPluginCallback();null!=B&&App.loadPlugins(B.split(";"));if(null!= +u&&0<u.length&&"0"!=urlParams.plugins)for(B=0;B<u.length;B++)try{("/"==u[B].charAt(0)&&(u[B]=PLUGINS_BASE_PATH+u[B]),App.isSameDomain(u[B]))?ALLOW_CUSTOM_PLUGINS||App.isBuiltInPlugin(u[B])?null==App.pluginsLoaded[u[B]]&&(App.pluginsLoaded[u[B]]=!0,App.embedModePluginsCount++,mxscript(u[B])):null!=window.console&&console.log("Unknown plugin:",u[B]):null!=window.console&&console.log("Blocked plugin:",u[B])}catch(c){}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&& +"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var E=window.opener||window.parent,L=function(c){if(c.source==E)try{var d=JSON.parse(c.data);null!=d&&"configure"== +d.action&&(mxEvent.removeListener(window,"message",L),Editor.configure(d.config),mxSettings.load(),d.colorSchemeMeta&&mxmeta("color-scheme","dark light"),e())}catch(g){null!=window.console&&console.log("Error in configure message: "+g,c.data)}};mxEvent.addListener(window,"message",L);E.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG), +mxSettings.load()}catch(c){null!=window.console&&console.error(c)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&(B=localStorage.getItem(Editor.configurationKey),null!=B))try{B=JSON.parse(B),null!=B&&(EditorUi.debug("Using local configuration",B),Editor.configure(B),mxSettings.load())}catch(c){null!=window.console&&console.error(c)}}e()}}else document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'}; +mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture=IMAGE_PATH+"/default-user.jpg";App.prototype.shareImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMjU2NzdEMTcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMjU2NzdEMDcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNjgwMTE3NDA3MjA2ODExODcxRkM4MUY1OTFDMjQ5OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrM/fs0AAADgSURBVHjaYmDAA/7//88MwgzkAKDGFiD+BsQ/QWxSNaf9RwN37twpI8WAS+gGfP78+RpQSoRYA36iG/D379+vQClNdLVMOMz4gi7w79+/n0CKg1gD9qELvH379hzIHGK9oA508ieY8//8+fO5rq4uFCilRKwL1JmYmNhhHEZGRiZ+fn6Q2meEbDYG4u3/cYCfP38uA7kOm0ZOIJ7zn0jw48ePPiDFhmzArv8kgi9fvuwB+w5qwH9ykjswbFSZyM4sEMDPBDTlL5BxkFSd7969OwZ2BZKYGhDzkmjOJ4AAAwBhpRqGnEFb8QAAAABJRU5ErkJggg=="; App.prototype.chevronUpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUY1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NjA1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1RDUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1RTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pg+qUokAAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAAL0lEQVR42mJgRgMMRAswMKAKMDDARBjg8lARBoR6KImkH0wTbygT6YaS4DmAAAMAYPkClOEDDD0AAAAASUVORK5CYII="; App.prototype.chevronDownImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUI1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NUM1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1OTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1QTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsCtve8AAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAALUlEQVR42mJgRgMMRAkwQEXBNAOcBSPhclB1cNVwfcxI+vEZykSpoSR6DiDAAF23ApT99bZ+AAAAAElFTkSuQmCC"; App.prototype.formatShowImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODdCREY5REY1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODdCREY5RTA1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4N0JERjlERDU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4N0JERjlERTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PlnMQ/8AAAAJUExURQAAAP///3FxcTfTiAsAAAACdFJOU/8A5bcwSgAAACFJREFUeNpiYEQDDEQJMMABTAAixcQ00ALoDiPRcwABBgB6DADly9Yx8wAAAABJRU5ErkJggg=="; App.prototype.formatHideImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODdCREY5REI1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODdCREY5REM1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4N0JERjlEOTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4N0JERjlEQTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PqjT9SMAAAAGUExURQAAAP///6XZn90AAAACdFJOU/8A5bcwSgAAAB9JREFUeNpiYEQDDEQJMMABTAAmNdAC6A4j0XMAAQYAcbwA1Xvj1CgAAAAASUVORK5CYII="; App.prototype.warnInterval=3E5;App.prototype.compactMode=!1;App.prototype.fullscreenMode=!1;"1"!=urlParams.embed?App.prototype.menubarHeight=64:App.prototype.footerHeight=0;App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(b){App.DrawPlugins.push(b)})};App.pluginsLoaded={};App.embedModePluginsCount=0; -App.loadPlugins=function(b,f){EditorUi.debug("Loading plugins",b);for(var k=0;k<b.length;k++)if(null!=b[k]&&0<b[k].length)try{var d=PLUGINS_BASE_PATH+App.pluginRegistry[b[k]];null!=d?null==App.pluginsLoaded[d]&&(App.pluginsLoaded[d]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?f?mxinclude(d):mxscript(d):f?mxinclude(d):mxscript(drawDevUrl+d)):null!=window.console&&console.log("Unknown plugin:",b[k])}catch(u){null!=window.console&&console.log("Error loading plugin:",b[k],u)}}; -App.prototype.initializeEmbedMode=function(){"1"==urlParams.embed&&("app.diagrams.net"==window.location.hostname&&this.showBanner("EmbedDeprecationFooter","app.diagrams.net will stop working for embed mode. Please use embed.diagrams.net."),0<App.embedModePluginsCount||this.initEmbedDone||(this.initEmbedDone=!0,EditorUi.prototype.initializeEmbedMode.apply(this,arguments)))}; +App.loadPlugins=function(b,f){EditorUi.debug("Loading plugins",b);for(var k=0;k<b.length;k++)if(null!=b[k]&&0<b[k].length)try{if(null!=App.pluginRegistry[b[k]]){var e=PLUGINS_BASE_PATH+App.pluginRegistry[b[k]];null==App.pluginsLoaded[e]&&(App.pluginsLoaded[e]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?f?mxinclude(e):mxscript(e):f?mxinclude(e):mxscript(drawDevUrl+e))}else null!=window.console&&console.log("Unknown plugin:",b[k])}catch(u){null!=window.console&&console.log("Error loading plugin:", +b[k],u)}};App.prototype.initializeEmbedMode=function(){"1"==urlParams.embed&&("app.diagrams.net"==window.location.hostname&&this.showBanner("EmbedDeprecationFooter","app.diagrams.net will stop working for embed mode. Please use embed.diagrams.net."),0<App.embedModePluginsCount||this.initEmbedDone||(this.initEmbedDone=!0,EditorUi.prototype.initializeEmbedMode.apply(this,arguments)))}; App.prototype.initializeViewerMode=function(){var b=window.opener||window.parent;null!=b&&this.editor.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(){b.postMessage(JSON.stringify(this.createLoadMessage("size")),"*")}))}; App.prototype.init=function(){EditorUi.prototype.init.apply(this,arguments);this.defaultLibraryName=mxResources.get("untitledLibrary");this.descriptorChangedListener=mxUtils.bind(this,this.descriptorChanged);this.gitHub=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gh||"1"==urlParams.embed&&"1"!=urlParams.gh?null:new GitHubClient(this);null!=this.gitHub&&this.gitHub.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})); this.gitLab=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gl||"1"==urlParams.embed&&"1"!=urlParams.gl?null:new GitLabClient(this);null!=this.gitLab&&this.gitLab.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()}));if("1"!=urlParams.embed||"1"==urlParams.od){var b=mxUtils.bind(this,function(){"undefined"!==typeof OneDrive?(this.oneDrive=new OneDriveClient(this),this.oneDrive.addListener("userChanged", mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.oneDrive))):null==window.DrawOneDriveClientCallback&&(window.DrawOneDriveClientCallback=b)});b()}if("1"!=urlParams.embed||"1"==urlParams.tr){var f=mxUtils.bind(this,function(){if("undefined"!==typeof window.Trello)try{this.trello=new TrelloClient(this),this.trello.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})), -this.fireEvent(new mxEventObject("clientLoaded","client",this.trello))}catch(x){null!=window.console&&console.error(x)}else null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=f)});f()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var k=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var x=mxUtils.bind(this,function(){this.drive=new DriveClient(this);this.drive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries();this.checkLicense()})); -this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))});null!=window.DrawGapiClientCallback?(gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,x),window.DrawGapiClientCallback=null):x()}else null==window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=k)});k()}if("1"!=urlParams.embed||"1"==urlParams.db){var d=mxUtils.bind(this,function(){if("function"===typeof Dropbox&&"undefined"!==typeof Dropbox.choose){window.DrawDropboxClientCallback=null;try{this.dropbox=new DropboxClient(this), -this.dropbox.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.dropbox))}catch(x){null!=window.console&&console.error(x)}}else null==window.DrawDropboxClientCallback&&(window.DrawDropboxClientCallback=d)});d()}if("1"!=urlParams.embed){if(this.bg=this.createBackground(),document.body.appendChild(this.bg),this.diagramContainer.style.visibility="hidden",this.formatContainer.style.visibility= -"hidden",this.hsplit.style.display="none",this.sidebarContainer.style.display="none",this.sidebarFooterContainer.style.display="none","1"==urlParams.local?this.setMode(App.MODE_DEVICE):this.mode=App.mode,"serviceWorker"in navigator&&!this.editor.isChromelessView()&&(mxClient.IS_ANDROID||mxClient.IS_IOS)&&window.addEventListener("beforeinstallprompt",mxUtils.bind(this,function(x){this.showBanner("AddToHomeScreenFooter",mxResources.get("installApp"),function(){x.prompt()})})),mxClient.IS_CHROMEAPP|| -EditorUi.isElectronApp||this.isOffline()||mxClient.IS_ANDROID||mxClient.IS_IOS||null!=urlParams.open||this.editor.chromeless&&!this.editor.editable||this.editor.addListener("fileLoaded",mxUtils.bind(this,function(){var x=this.getCurrentFile();x=null!=x?x.getMode():null;"1"==urlParams.extAuth||x!=App.MODE_DEVICE&&x!=App.MODE_BROWSER?"1"!=urlParams.embed&&this.getServiceName():this.showDownloadDesktopBanner()})),!(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"1"==urlParams.embed||"auto"!=DrawioFile.SYNC|| -"1"==urlParams.local||"1"==urlParams.stealth||this.isOffline()||this.editor.chromeless&&!this.editor.editable)){var u=window.setTimeout(mxUtils.bind(this,function(){DrawioFile.SYNC="manual";var x=this.getCurrentFile();null!=x&&null!=x.sync&&(x.sync.destroy(),x.sync=null,x=mxUtils.htmlEntities(mxResources.get("timeout")),this.editor.setStatus('<div title="'+x+'" class="geStatusAlert">'+x+"</div>"));EditorUi.logEvent({category:"TIMEOUT-CACHE-CHECK",action:"timeout",label:408})}),Editor.cacheTimeout); -(new Date).getTime();mxUtils.get(EditorUi.cacheUrl+"?alive",mxUtils.bind(this,function(x){window.clearTimeout(u)}))}}else null!=this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader();null!=this.menubar&&(this.buttonContainer=document.createElement("div"),this.buttonContainer.style.display="inline-block",this.buttonContainer.style.paddingRight="48px",this.buttonContainer.style.position="absolute",this.buttonContainer.style.right="0px",this.menubar.container.appendChild(this.buttonContainer)); -"atlas"!=uiTheme&&"1"!=urlParams.atlas||null==this.menubar||(null!=this.toggleElement&&(this.toggleElement.click(),this.toggleElement.style.display="none"),this.icon=document.createElement("img"),this.icon.setAttribute("src",IMAGE_PATH+"/logo-flat-small.png"),this.icon.setAttribute("title",mxResources.get("draw.io")),this.icon.style.padding="1"==urlParams.atlas?"7px":"6px",this.icon.style.cursor="pointer",mxEvent.addListener(this.icon,"click",mxUtils.bind(this,function(x){this.appIconClicked(x)})), +this.fireEvent(new mxEventObject("clientLoaded","client",this.trello))}catch(v){null!=window.console&&console.error(v)}else null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=f)});f()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var k=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var v=mxUtils.bind(this,function(){this.drive=new DriveClient(this);this.drive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries();this.checkLicense()})); +this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))});null!=window.DrawGapiClientCallback?(gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,v),window.DrawGapiClientCallback=null):v()}else null==window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=k)});k()}if("1"!=urlParams.embed||"1"==urlParams.db){var e=mxUtils.bind(this,function(){if("function"===typeof Dropbox&&"undefined"!==typeof Dropbox.choose){window.DrawDropboxClientCallback=null;try{this.dropbox=new DropboxClient(this), +this.dropbox.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.dropbox))}catch(v){null!=window.console&&console.error(v)}}else null==window.DrawDropboxClientCallback&&(window.DrawDropboxClientCallback=e)});e()}if("1"!=urlParams.embed){if(this.bg=this.createBackground(),document.body.appendChild(this.bg),this.diagramContainer.style.visibility="hidden",this.formatContainer.style.visibility= +"hidden",this.hsplit.style.display="none",this.sidebarContainer.style.display="none",this.sidebarFooterContainer.style.display="none","1"==urlParams.local?this.setMode(App.MODE_DEVICE):this.mode=App.mode,"serviceWorker"in navigator&&!this.editor.isChromelessView()&&(mxClient.IS_ANDROID||mxClient.IS_IOS)&&window.addEventListener("beforeinstallprompt",mxUtils.bind(this,function(v){this.showBanner("AddToHomeScreenFooter",mxResources.get("installApp"),function(){v.prompt()})})),mxClient.IS_CHROMEAPP|| +EditorUi.isElectronApp||this.isOffline()||mxClient.IS_ANDROID||mxClient.IS_IOS||null!=urlParams.open||this.editor.chromeless&&!this.editor.editable||this.editor.addListener("fileLoaded",mxUtils.bind(this,function(){var v=this.getCurrentFile();v=null!=v?v.getMode():null;"1"==urlParams.extAuth||v!=App.MODE_DEVICE&&v!=App.MODE_BROWSER?"1"!=urlParams.embed&&this.getServiceName():this.showDownloadDesktopBanner()})),!(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"1"==urlParams.embed||"auto"!=DrawioFile.SYNC|| +"1"==urlParams.local||"1"==urlParams.stealth||this.isOffline()||this.editor.chromeless&&!this.editor.editable)){var u=window.setTimeout(mxUtils.bind(this,function(){DrawioFile.SYNC="manual";var v=this.getCurrentFile();null!=v&&null!=v.sync&&(v.sync.destroy(),v.sync=null,v=mxUtils.htmlEntities(mxResources.get("timeout")),this.editor.setStatus('<div title="'+v+'" class="geStatusAlert">'+v+"</div>"));EditorUi.logEvent({category:"TIMEOUT-CACHE-CHECK",action:"timeout",label:408})}),Editor.cacheTimeout); +(new Date).getTime();mxUtils.get(EditorUi.cacheUrl+"?alive",mxUtils.bind(this,function(v){window.clearTimeout(u)}))}}else null!=this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader();null!=this.menubar&&(this.buttonContainer=document.createElement("div"),this.buttonContainer.style.display="inline-block",this.buttonContainer.style.paddingRight="48px",this.buttonContainer.style.position="absolute",this.buttonContainer.style.right="0px",this.menubar.container.appendChild(this.buttonContainer)); +"atlas"!=uiTheme&&"1"!=urlParams.atlas||null==this.menubar||(null!=this.toggleElement&&(this.toggleElement.click(),this.toggleElement.style.display="none"),this.icon=document.createElement("img"),this.icon.setAttribute("src",IMAGE_PATH+"/logo-flat-small.png"),this.icon.setAttribute("title",mxResources.get("draw.io")),this.icon.style.padding="1"==urlParams.atlas?"7px":"6px",this.icon.style.cursor="pointer",mxEvent.addListener(this.icon,"click",mxUtils.bind(this,function(v){this.appIconClicked(v)})), this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild));this.editor.graph.isViewer()&&this.initializeViewerMode()};App.prototype.scheduleSanityCheck=function(){mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=this.sanityCheckThread||(this.sanityCheckThread=window.setTimeout(mxUtils.bind(this,function(){this.sanityCheckThread=null;this.sanityCheck()}),this.warnInterval))}; App.prototype.stopSanityCheck=function(){null!=this.sanityCheckThread&&(window.clearTimeout(this.sanityCheckThread),this.sanityCheckThread=null)}; App.prototype.sanityCheck=function(){var b=this.getCurrentFile();if(null!=b&&b.isModified()&&b.isAutosave()&&b.isOverdue()){var f={category:"WARN-FILE-"+b.getHash(),action:(b.savingFile?"saving":"")+(b.savingFile&&null!=b.savingFileTime?"_"+Math.round((Date.now()-b.savingFileTime.getTime())/1E3):"")+(null!=b.saveLevel?"-sl_"+b.saveLevel:"")+"-age_"+(null!=b.ageStart?Math.round((Date.now()-b.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(b.isAutosave()?"":"-noauto")+"-open_"+(null!= @@ -12066,32 +12073,32 @@ App.prototype.showNameConfBanner=function(){this.showBanner("ConfFooter","Try dr App.prototype.showRatingBanner=function(){if(!(this.bannerShowing||this.hideBannerratingFooter||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings.closeratingFooter)){var b=document.createElement("div");b.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(b.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(b.style, "transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(b.style,"transition","all 1s ease");b.className="geBtn gePrimaryBtn";var f=document.createElement("img");f.setAttribute("src",Dialog.prototype.closeImage);f.setAttribute("title",mxResources.get("close"));f.setAttribute("border","0");f.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";b.appendChild(f);mxUtils.write(b,"Please rate us");document.body.appendChild(b);var k=document.createElement("img"); k.setAttribute("border","0");k.setAttribute("align","absmiddle");k.setAttribute("title","1 star");k.setAttribute("style","margin-top:-6px;cursor:pointer;margin-left:8px;");k.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg=="); -b.appendChild(k);var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.setAttribute("title","2 star");d.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");d.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg=="); -b.appendChild(d);var u=document.createElement("img");u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.setAttribute("title","3 star");u.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");u.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg=="); -b.appendChild(u);var x=document.createElement("img");x.setAttribute("border","0");x.setAttribute("align","absmiddle");x.setAttribute("title","4 star");x.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");x.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg=="); -b.appendChild(x);this.bannerShowing=!0;var B=mxUtils.bind(this,function(){null!=b.parentNode&&(b.parentNode.removeChild(b),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))});mxEvent.addListener(f,"click",mxUtils.bind(this,function(D){mxEvent.consume(D);B()}));mxEvent.addListener(k,"click",mxUtils.bind(this,function(D){mxEvent.consume(D);B()}));mxEvent.addListener(d,"click",mxUtils.bind(this, -function(D){mxEvent.consume(D);B()}));mxEvent.addListener(u,"click",mxUtils.bind(this,function(D){mxEvent.consume(D);B()}));mxEvent.addListener(x,"click",mxUtils.bind(this,function(D){mxEvent.consume(D);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");B()}));f=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){B()}),1E3)});window.setTimeout(mxUtils.bind(this, +b.appendChild(k);var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("align","absmiddle");e.setAttribute("title","2 star");e.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");e.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg=="); +b.appendChild(e);var u=document.createElement("img");u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.setAttribute("title","3 star");u.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");u.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg=="); +b.appendChild(u);var v=document.createElement("img");v.setAttribute("border","0");v.setAttribute("align","absmiddle");v.setAttribute("title","4 star");v.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");v.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg=="); +b.appendChild(v);this.bannerShowing=!0;var B=mxUtils.bind(this,function(){null!=b.parentNode&&(b.parentNode.removeChild(b),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))});mxEvent.addListener(f,"click",mxUtils.bind(this,function(E){mxEvent.consume(E);B()}));mxEvent.addListener(k,"click",mxUtils.bind(this,function(E){mxEvent.consume(E);B()}));mxEvent.addListener(e,"click",mxUtils.bind(this, +function(E){mxEvent.consume(E);B()}));mxEvent.addListener(u,"click",mxUtils.bind(this,function(E){mxEvent.consume(E);B()}));mxEvent.addListener(v,"click",mxUtils.bind(this,function(E){mxEvent.consume(E);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");B()}));f=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){B()}),1E3)});window.setTimeout(mxUtils.bind(this, function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(f,6E4)}}; -App.prototype.checkLicense=function(){var b=this.drive.getUser(),f=null!=b?b.email:null;if(!this.isOffline()&&!this.editor.chromeless&&null!=f&&null!=b.id){var k=f.lastIndexOf("@"),d=0<=k?f.substring(k+1):"";b=Editor.crc32(b.id);mxUtils.post("/license","domain="+encodeURIComponent(d)+"&id="+encodeURIComponent(b)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(u){try{if(200<=u.getStatus()&&299>=u.getStatus()){var x=u.getText();if(0<x.length){var B=JSON.parse(x);null!=B&&this.handleLicense(B, -d)}}}catch(D){}}))}};App.prototype.handleLicense=function(b,f){null!=b&&null!=b.plugins&&App.loadPlugins(b.plugins.split(";"),!0)};App.prototype.getEditBlankXml=function(){var b=this.getCurrentFile();return null!=b&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?b.getData():this.getFileData(!0)};App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);this.actions.get("revisionHistory").setEnabled(this.isRevisionHistoryEnabled())}; +App.prototype.checkLicense=function(){var b=this.drive.getUser(),f=null!=b?b.email:null;if(!this.isOffline()&&!this.editor.chromeless&&null!=f&&null!=b.id){var k=f.lastIndexOf("@"),e=0<=k?f.substring(k+1):"";b=Editor.crc32(b.id);mxUtils.post("/license","domain="+encodeURIComponent(e)+"&id="+encodeURIComponent(b)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(u){try{if(200<=u.getStatus()&&299>=u.getStatus()){var v=u.getText();if(0<v.length){var B=JSON.parse(v);null!=B&&this.handleLicense(B, +e)}}}catch(E){}}))}};App.prototype.handleLicense=function(b,f){};App.prototype.getEditBlankXml=function(){var b=this.getCurrentFile();return null!=b&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?b.getData():this.getFileData(!0)};App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);this.actions.get("revisionHistory").setEnabled(this.isRevisionHistoryEnabled())}; App.prototype.addRecent=function(b){if(isLocalStorage&&null!=localStorage){var f=this.getRecent();if(null==f)f=[];else for(var k=0;k<f.length;k++)f[k].id==b.id&&f.splice(k,1);null!=f&&(f.unshift(b),f=f.slice(0,10),localStorage.setItem(".recent",JSON.stringify(f)))}};App.prototype.getRecent=function(){if(isLocalStorage&&null!=localStorage){try{var b=localStorage.getItem(".recent");if(null!=b)return JSON.parse(b)}catch(f){}return null}}; App.prototype.resetRecent=function(b){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent")}catch(f){}}; App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");var b=this.getCurrentFile();if(null!=b)if(b.constructor!=LocalFile||""!=b.getHash()||b.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()||null!=b.fileHandle){if(b.isModified())return mxResources.get("allChangesLost");b.close(!0)}else return mxResources.get("ensureDataSaved")}; App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var b=this.editor.appName,f=this.getCurrentFile();this.isOfflineApp()&&(b+=" app");null!=f&&(b=(null!=f.getTitle()?f.getTitle():this.defaultFilename)+" - "+b);document.title!=b&&(document.title=b,b=this.editor.graph,b.invalidateDescendantsWithPlaceholders(b.model.getRoot()),b.view.validate())}}; -App.prototype.getThumbnail=function(b,f){var k=!1;try{var d=!0,u=window.setTimeout(mxUtils.bind(this,function(){d=!1;f(null)}),this.timeout),x=mxUtils.bind(this,function(J){window.clearTimeout(u);d&&f(J)});null==this.thumbImageCache&&(this.thumbImageCache={});var B=this.editor.graph,D=B.backgroundImage,K=null!=B.themes&&"darkTheme"==B.defaultThemeName;if(null!=this.pages&&(K||this.currentPage!=this.pages[0])){var c=B.getGlobalVariable;B=this.createTemporaryGraph(B.getStylesheet());B.setBackgroundImage= -this.editor.graph.setBackgroundImage;var e=this.pages[0];this.currentPage==e?B.setBackgroundImage(D):null!=e.viewState&&null!=e.viewState&&(D=e.viewState.backgroundImage,B.setBackgroundImage(D));B.getGlobalVariable=function(J){return"page"==J?e.getName():"pagenumber"==J?1:c.apply(this,arguments)};B.getGlobalVariable=c;document.body.appendChild(B.container);B.model.setRoot(e.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(J){try{B!=this.editor.graph&& -null!=B.container.parentNode&&B.container.parentNode.removeChild(B.container)}catch(M){J=null}x(J)}),b,this.thumbImageCache,"#ffffff",function(){x()},null,null,null,null,null,null,B,null,null,null,null,"diagram",null),k=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var g=document.createElement("canvas"),q=B.getGraphBounds(),m=B.view.translate,n=B.view.scale;null!=D&&(q=mxRectangle.fromRectangle(q),q.add(new mxRectangle((m.x+D.x)*n,(m.y+D.y)*n,D.width*n,D.height*n)));var z=b/q.width; -z=Math.min(1,Math.min(3*b/(4*q.height),z));var C=Math.floor(q.x),v=Math.floor(q.y);g.setAttribute("width",Math.ceil(z*(q.width+4)));g.setAttribute("height",Math.ceil(z*(q.height+4)));var y=g.getContext("2d");y.scale(z,z);y.translate(-C,-v);var I=B.background;if(null==I||""==I||I==mxConstants.NONE)I="#ffffff";y.save();y.fillStyle=I;y.fillRect(C,v,Math.ceil(q.width+4),Math.ceil(q.height+4));y.restore();if(null!=D){var N=new Image;N.src=D.src;y.drawImage(N,D.x*z,D.y*z,D.width*z,D.height*z)}var t=new mxJsCanvas(g), -p=new mxAsyncCanvas(this.thumbImageCache);t.images=this.thumbImageCache.images;var F=new mxImageExport;F.drawShape=function(J,M){J.shape instanceof mxShape&&J.shape.checkBounds()&&(M.save(),M.translate(.5,.5),J.shape.paint(M),M.translate(-.5,-.5),M.restore())};F.drawText=function(J,M){};F.drawState(B.getView().getState(B.model.root),p);p.finish(mxUtils.bind(this,function(){try{F.drawState(B.getView().getState(B.model.root),t),B!=this.editor.graph&&null!=B.container.parentNode&&B.container.parentNode.removeChild(B.container)}catch(J){g= -null}x(g)}));k=!0}}catch(J){k=!1,null!=B&&B!=this.editor.graph&&null!=B.container.parentNode&&B.container.parentNode.removeChild(B.container)}k||window.clearTimeout(u);return k};App.prototype.createBackground=function(){var b=this.createDiv("background");b.style.position="absolute";b.style.background="white";b.style.left="0px";b.style.top="0px";b.style.bottom="0px";b.style.right="0px";mxUtils.setOpacity(b,100);return b}; -(function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(f,k){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var d=this.getCurrentFile();f=null!=d?d.getMode():f;f==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):f==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])), -this.appIcon.style.cursor="pointer"):f==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor=f==App.MODE_DEVICE?"pointer":"default")}if(k)try{if(isLocalStorage)localStorage.setItem(".mode",f);else if("undefined"!=typeof Storage){var u=new Date;u.setYear(u.getFullYear()+1);document.cookie="MODE="+f+"; expires="+u.toUTCString()}}catch(x){}}})(); +App.prototype.getThumbnail=function(b,f){var k=!1;try{var e=!0,u=window.setTimeout(mxUtils.bind(this,function(){e=!1;f(null)}),this.timeout),v=mxUtils.bind(this,function(K){window.clearTimeout(u);e&&f(K)});null==this.thumbImageCache&&(this.thumbImageCache={});var B=this.editor.graph,E=B.backgroundImage,L=null!=B.themes&&"darkTheme"==B.defaultThemeName;if(null!=this.pages&&(L||this.currentPage!=this.pages[0])){var c=B.getGlobalVariable;B=this.createTemporaryGraph(B.getStylesheet());B.setBackgroundImage= +this.editor.graph.setBackgroundImage;var d=this.pages[0];this.currentPage==d?B.setBackgroundImage(E):null!=d.viewState&&null!=d.viewState&&(E=d.viewState.backgroundImage,B.setBackgroundImage(E));B.getGlobalVariable=function(K){return"page"==K?d.getName():"pagenumber"==K?1:c.apply(this,arguments)};B.getGlobalVariable=c;document.body.appendChild(B.container);B.model.setRoot(d.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(K){try{B!=this.editor.graph&& +null!=B.container.parentNode&&B.container.parentNode.removeChild(B.container)}catch(D){K=null}v(K)}),b,this.thumbImageCache,"#ffffff",function(){v()},null,null,null,null,null,null,B,null,null,null,null,"diagram",null),k=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var g=document.createElement("canvas"),q=B.getGraphBounds(),m=B.view.translate,n=B.view.scale;null!=E&&(q=mxRectangle.fromRectangle(q),q.add(new mxRectangle((m.x+E.x)*n,(m.y+E.y)*n,E.width*n,E.height*n)));var z=b/q.width; +z=Math.min(1,Math.min(3*b/(4*q.height),z));var C=Math.floor(q.x),x=Math.floor(q.y);g.setAttribute("width",Math.ceil(z*(q.width+4)));g.setAttribute("height",Math.ceil(z*(q.height+4)));var y=g.getContext("2d");y.scale(z,z);y.translate(-C,-x);var I=B.background;if(null==I||""==I||I==mxConstants.NONE)I="#ffffff";y.save();y.fillStyle=I;y.fillRect(C,x,Math.ceil(q.width+4),Math.ceil(q.height+4));y.restore();if(null!=E){var N=new Image;N.src=E.src;y.drawImage(N,E.x*z,E.y*z,E.width*z,E.height*z)}var t=new mxJsCanvas(g), +p=new mxAsyncCanvas(this.thumbImageCache);t.images=this.thumbImageCache.images;var F=new mxImageExport;F.drawShape=function(K,D){K.shape instanceof mxShape&&K.shape.checkBounds()&&(D.save(),D.translate(.5,.5),K.shape.paint(D),D.translate(-.5,-.5),D.restore())};F.drawText=function(K,D){};F.drawState(B.getView().getState(B.model.root),p);p.finish(mxUtils.bind(this,function(){try{F.drawState(B.getView().getState(B.model.root),t),B!=this.editor.graph&&null!=B.container.parentNode&&B.container.parentNode.removeChild(B.container)}catch(K){g= +null}v(g)}));k=!0}}catch(K){k=!1,null!=B&&B!=this.editor.graph&&null!=B.container.parentNode&&B.container.parentNode.removeChild(B.container)}k||window.clearTimeout(u);return k};App.prototype.createBackground=function(){var b=this.createDiv("background");b.style.position="absolute";b.style.background="white";b.style.left="0px";b.style.top="0px";b.style.bottom="0px";b.style.right="0px";mxUtils.setOpacity(b,100);return b}; +(function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(f,k){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var e=this.getCurrentFile();f=null!=e?e.getMode():f;f==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):f==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])), +this.appIcon.style.cursor="pointer"):f==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor=f==App.MODE_DEVICE?"pointer":"default")}if(k)try{if(isLocalStorage)localStorage.setItem(".mode",f);else if("undefined"!=typeof Storage){var u=new Date;u.setYear(u.getFullYear()+1);document.cookie="MODE="+f+"; expires="+u.toUTCString()}}catch(v){}}})(); App.prototype.appIconClicked=function(b){if(mxEvent.isAltDown(b))this.showSplash(!0);else{var f=this.getCurrentFile(),k=null!=f?f.getMode():null;k==App.MODE_GOOGLE?null!=f&&null!=f.desc&&null!=f.desc.parents&&0<f.desc.parents.length&&!mxEvent.isShiftDown(b)?this.openLink("https://drive.google.com/drive/folders/"+f.desc.parents[0].id):null!=f&&null!=f.getId()?this.openLink("https://drive.google.com/open?id="+f.getId()):this.openLink("https://drive.google.com/?authuser=0"):k==App.MODE_ONEDRIVE?null!= f&&null!=f.meta&&null!=f.meta.webUrl?(k=f.meta.webUrl,f=encodeURIComponent(f.meta.name),k.substring(k.length-f.length,k.length)==f&&(k=k.substring(0,k.length-f.length)),this.openLink(k)):this.openLink("https://onedrive.live.com/"):k==App.MODE_DROPBOX?null!=f&&null!=f.stat&&null!=f.stat.path_display?(k="https://www.dropbox.com/home/Apps/drawio"+f.stat.path_display,mxEvent.isShiftDown(b)||(k=k.substring(0,k.length-f.stat.name.length)),this.openLink(k)):this.openLink("https://www.dropbox.com/"):k==App.MODE_TRELLO? this.openLink("https://trello.com/"):k==App.MODE_GITHUB?null!=f&&f.constructor==GitHubFile?this.openLink(f.meta.html_url):this.openLink("https://github.com/"):k==App.MODE_GITLAB?null!=f&&f.constructor==GitLabFile?this.openLink(f.meta.html_url):this.openLink(DRAWIO_GITLAB_URL):k==App.MODE_DEVICE&&this.openLink("https://get.draw.io/")}mxEvent.consume(b)}; App.prototype.clearMode=function(){if(isLocalStorage)localStorage.removeItem(".mode");else if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()-1);document.cookie="MODE=; expires="+b.toUTCString()}};App.prototype.getDiagramId=function(){var b=window.location.hash;null!=b&&0<b.length&&(b=b.substring(1));if(null!=b&&1<b.length&&"T"==b.charAt(0)){var f=b.indexOf("#");0<f&&(b=b.substring(0,f))}return b}; -App.prototype.open=function(){try{if(null!=window.opener){var b=urlParams.create;null!=b&&(b=decodeURIComponent(b));if(null!=b&&0<b.length&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)){var f=mxUtils.parseXml(window.opener[b]);this.editor.setGraphXml(f.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(k,d,u){this.spinner.stop();null==d&&(d=urlParams.title,u=!0,d=null!=d?decodeURIComponent(d):this.defaultFilename);0<(this.useCanvasForExport? --1:".png"==d.substring(d.length-4))&&(d=d.substring(0,d.length-4)+".drawio");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,k,d):new LocalFile(this,k,d,u))}))}}catch(k){}};App.prototype.loadGapi=function(b){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,b)}; +App.prototype.open=function(){try{if(null!=window.opener){var b=urlParams.create;null!=b&&(b=decodeURIComponent(b));if(null!=b&&0<b.length&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)){var f=mxUtils.parseXml(window.opener[b]);this.editor.setGraphXml(f.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(k,e,u){this.spinner.stop();null==e&&(e=urlParams.title,u=!0,e=null!=e?decodeURIComponent(e):this.defaultFilename);0<(this.useCanvasForExport? +-1:".png"==e.substring(e.length-4))&&(e=e.substring(0,e.length-4)+".drawio");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,k,e):new LocalFile(this,k,e,u))}))}}catch(k){}};App.prototype.loadGapi=function(b){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,b)}; App.prototype.load=function(){if("1"!=urlParams.embed){if(this.spinner.spin(document.body,mxResources.get("starting"))){try{this.stateArg=null!=urlParams.state&&null!=this.drive?JSON.parse(decodeURIComponent(urlParams.state)):null}catch(b){}this.editor.graph.setEnabled(null!=this.getCurrentFile());null!=window.location.hash&&0!=window.location.hash.length||null==this.drive||null==this.stateArg||null==this.stateArg.userId||this.drive.setUserId(this.stateArg.userId);null!=urlParams.fileId?(window.location.hash= "G"+urlParams.fileId,window.location.search=this.getSearch(["fileId"])):null==this.drive?(this.mode==App.MODE_GOOGLE&&(this.mode=null),this.start()):this.loadGapi(mxUtils.bind(this,function(){this.start()}))}}else this.restoreLibraries(),"1"==urlParams.gapi&&this.loadGapi(function(){})}; App.prototype.showRefreshDialog=function(b,f){this.showingRefreshDialog||(this.showingRefreshDialog=!0,this.showError(b||mxResources.get("externalChanges"),f||mxResources.get("redirectToNewApp"),mxResources.get("refresh"),mxUtils.bind(this,function(){var k=this.getCurrentFile();null!=k&&k.setModified(!1);this.spinner.spin(document.body,mxResources.get("connecting"));this.editor.graph.setEnabled(!1);window.location.reload()}),null,null,null,null,null,340,180),null!=this.dialog&&null!=this.dialog.container&& @@ -12099,133 +12106,131 @@ App.prototype.showRefreshDialog=function(b,f){this.showingRefreshDialog||(this.s App.prototype.showAlert=function(b){if(null!=b&&0<b.length){var f=document.createElement("div");f.className="geAlert";f.style.zIndex=2E9;f.style.left="50%";f.style.top="-100%";f.style.maxWidth="80%";f.style.width="max-content";f.style.whiteSpace="pre-wrap";mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(f.style,"transition","all 1s ease");f.innerHTML=b;b=document.createElement("a");b.className="geAlertLink";b.style.textAlign="right";b.style.marginTop="20px"; b.style.display="block";b.setAttribute("title",mxResources.get("close"));b.innerHTML=mxResources.get("close");f.appendChild(b);mxEvent.addListener(b,"click",function(k){null!=f.parentNode&&(f.parentNode.removeChild(f),mxEvent.consume(k))});document.body.appendChild(f);window.setTimeout(function(){f.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(f.style,"transition","all 2s ease");f.style.opacity="0";window.setTimeout(function(){null!=f.parentNode&&f.parentNode.removeChild(f)}, 2E3)},15E3)}}; -App.prototype.start=function(){null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{var b=this;window.onerror=function(x,B,D,K,c){"ResizeObserver loop limit exceeded"!=x&&(EditorUi.logError("Uncaught: "+(null!=x?x:""),B,D,K,c,null,!0),b.handleError({message:x},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this, -function(x){var B=this.getCurrentFile();EditorUi.debug("storage event",[x],[B]);null!=B&&".draft-alive-check"==x.key&&null!=x.newValue&&null!=B.draftId&&(this.draftAliveCheck=x.newValue,B.saveDraft())})),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()||null!=urlParams.open||!/www\.draw\.io$/.test(window.location.hostname)||this.editor.chromeless&&!this.editor.editable||this.showNameChangeBanner()}catch(x){}mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(x){try{this.hideDialog(); -var B=this.getDiagramId(),D=this.getCurrentFile();null!=D&&D.getHash()==B||this.loadFile(B,!0)}catch(K){null!=document.body&&this.handleError(K,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var c=this.getCurrentFile();window.location.hash=null!=c?c.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(x){this.handleError(x,mxResources.get("errorLoadingFile"))}))}catch(x){this.handleError(x, -mxResources.get("errorLoadingFile"))}else if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var f=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var x=mxUtils.bind(this,function(K){Editor.isPngDataUrl(K)&&(K=Editor.extractGraphModelFromPng(K));var c=urlParams.title;c=null!=c?decodeURIComponent(c): -this.defaultFilename;K=new LocalFile(this,K,c,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(K.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(K);this.getCurrentFile().setModified(!this.editor.chromeless)}),B=window.opener||window.parent;if(B!=window){var D=urlParams.create;null!=D?x(B[decodeURIComponent(D)]):(D=urlParams.data,null!=D?x(decodeURIComponent(D)):this.installMessageHandler(mxUtils.bind(this,function(K,c){c.source==B&&x(K)})))}}else if(null== -this.dialog)if("1"==urlParams.demo)D=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=D;else{D=!1;try{D=null!=window.opener&&null!=window.opener.openFile}catch(K){}D?this.spinner.spin(document.body,mxResources.get("loading")):(D=this.getDiagramId(),!EditorUi.enableDrafts||null!=urlParams.mode||"draw.io"!=this.getServiceName()||null!=D&&0!=D.length||this.editor.isChromelessView()?null!=D&&0<D.length?this.loadFile(D,null,null,mxUtils.bind(this, -function(){var K=decodeURIComponent(urlParams.viewbox||"");if(""!=K)try{var c=JSON.parse(K);this.editor.graph.fitWindow(c,c.border)}catch(e){console.error(e)}})):"0"!=urlParams.splash||null!=urlParams.mode?this.loadFile():EditorUi.isElectronApp||this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0):this.checkDrafts())}}),k=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=k&&0<k.length&&this.spinner.spin(document.body, -mxResources.get("loading"))){var d=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),u=mxUtils.bind(this,function(x){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,x,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var B=urlParams.title;B=null!=B?decodeURIComponent(B):this.defaultFilename;x=this.getServiceCount(!0);isLocalStorage&&x++;var D=4>= -x?2:6<x?4:3;B=new CreateDialog(this,B,mxUtils.bind(this,function(K,c){if(null==c){this.hideDialog();var e=Editor.useLocalStorage;this.createFile(0<K.length?K:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=e}else this.pickFolder(c,mxUtils.bind(this,function(g){this.createFile(K,this.getFileData(!0),null,c,null,!0,g)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,D,null,null,null,this.editor.fileExtensions);this.showDialog(B.container,420,x>D? -390:280,!0,!1,mxUtils.bind(this,function(K){K&&null==this.getCurrentFile()&&this.showSplash()}));B.init()}});k=decodeURIComponent(k);if("http://"!=k.substring(0,7)&&"https://"!=k.substring(0,8))try{null!=window.opener&&null!=window.opener[k]?u(window.opener[k]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}else this.loadTemplate(k,function(x){u(x)},mxUtils.bind(this,function(x){this.handleError(x,mxResources.get("errorLoadingFile"), -d)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action?null!=this.stateArg.ids&&(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),window.location.hash="G"+this.stateArg.ids[0]):(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(window.history&& +App.prototype.start=function(){null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{var b=this;window.onerror=function(v,B,E,L,c){"ResizeObserver loop limit exceeded"!=v&&(EditorUi.logError("Uncaught: "+(null!=v?v:""),B,E,L,c,null,!0),b.handleError({message:v},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this, +function(v){var B=this.getCurrentFile();EditorUi.debug("storage event",[v],[B]);null!=B&&".draft-alive-check"==v.key&&null!=v.newValue&&null!=B.draftId&&(this.draftAliveCheck=v.newValue,B.saveDraft())})),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()||null!=urlParams.open||!/www\.draw\.io$/.test(window.location.hostname)||this.editor.chromeless&&!this.editor.editable||this.showNameChangeBanner()}catch(v){}mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(v){try{this.hideDialog(); +var B=this.getDiagramId(),E=this.getCurrentFile();null!=E&&E.getHash()==B||this.loadFile(B,!0)}catch(L){null!=document.body&&this.handleError(L,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var c=this.getCurrentFile();window.location.hash=null!=c?c.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(v){this.handleError(v,mxResources.get("errorLoadingFile"))}))}catch(v){this.handleError(v, +mxResources.get("errorLoadingFile"))}else if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var f=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var v=mxUtils.bind(this,function(L){Editor.isPngDataUrl(L)&&(L=Editor.extractGraphModelFromPng(L));var c=urlParams.title;c=null!=c?decodeURIComponent(c): +this.defaultFilename;L=new LocalFile(this,L,c,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(L.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(L);this.getCurrentFile().setModified(!this.editor.chromeless)}),B=window.opener||window.parent;if(B!=window){var E=urlParams.create;null!=E?v(B[decodeURIComponent(E)]):(E=urlParams.data,null!=E?v(decodeURIComponent(E)):this.installMessageHandler(mxUtils.bind(this,function(L,c){c.source==B&&v(L)})))}}else if(null== +this.dialog)if("1"==urlParams.demo)E=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=E;else{E=!1;try{E=null!=window.opener&&null!=window.opener.openFile}catch(L){}E?this.spinner.spin(document.body,mxResources.get("loading")):(E=this.getDiagramId(),!EditorUi.enableDrafts||null!=urlParams.mode||"draw.io"!=this.getServiceName()||null!=E&&0!=E.length||this.editor.isChromelessView()?null!=E&&0<E.length?this.loadFile(E,null,null,mxUtils.bind(this, +function(){var L=decodeURIComponent(urlParams.viewbox||"");if(""!=L)try{var c=JSON.parse(L);this.editor.graph.fitWindow(c,c.border)}catch(d){console.error(d)}})):"0"!=urlParams.splash||null!=urlParams.mode?this.loadFile():EditorUi.isElectronApp||this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0):this.checkDrafts())}}),k=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=k&&0<k.length&&this.spinner.spin(document.body, +mxResources.get("loading"))){var e=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),u=mxUtils.bind(this,function(v){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,v,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var B=urlParams.title;B=null!=B?decodeURIComponent(B):this.defaultFilename;v=this.getServiceCount(!0);isLocalStorage&&v++;var E=4>= +v?2:6<v?4:3;B=new CreateDialog(this,B,mxUtils.bind(this,function(L,c){if(null==c){this.hideDialog();var d=Editor.useLocalStorage;this.createFile(0<L.length?L:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=d}else this.pickFolder(c,mxUtils.bind(this,function(g){this.createFile(L,this.getFileData(!0),null,c,null,!0,g)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,E,null,null,null,this.editor.fileExtensions);this.showDialog(B.container,420,v>E? +390:280,!0,!1,mxUtils.bind(this,function(L){L&&null==this.getCurrentFile()&&this.showSplash()}));B.init()}});k=decodeURIComponent(k);if("http://"!=k.substring(0,7)&&"https://"!=k.substring(0,8))try{null!=window.opener&&null!=window.opener[k]?u(window.opener[k]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(v){this.handleError(v,mxResources.get("errorLoadingFile"))}else this.loadTemplate(k,function(v){u(v)},mxUtils.bind(this,function(v){this.handleError(v,mxResources.get("errorLoadingFile"), +e)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action?null!=this.stateArg.ids&&(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),window.location.hash="G"+this.stateArg.ids[0]):(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(window.history&& window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),this.setMode(App.MODE_GOOGLE),"0"==urlParams.splash?this.createFile(null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename):this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open","sketch"])),window.location.hash=urlParams.open), -f())}}catch(x){this.handleError(x)}};App.prototype.loadDraft=function(b,f){this.createFile(this.defaultFilename,b,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var k=this.getCurrentFile();null!=k&&(k.fileChanged(),null!=f&&f())}),0)}),null,null,!0)}; -App.prototype.filterDrafts=function(b,f,k){function d(){k(u)}var u=[];try{this.getDatabaseItems(mxUtils.bind(this,function(x){EditorUi.debug("App.filterDrafts",[this],"items",x);for(var B=0;B<x.length;B++)try{var D=x[B].key;if(null!=D&&".draft_"==D.substring(0,7)){var K=JSON.parse(x[B].data);null!=K&&"draft"==K.type&&K.aliveCheck!=f&&(null==b&&null==K.fileObject||null!=K.fileObject&&K.fileObject.path==b)&&(K.key=D,u.push(K))}}catch(c){}d()},d))}catch(x){d()}}; +f())}}catch(v){this.handleError(v)}};App.prototype.loadDraft=function(b,f){this.createFile(this.defaultFilename,b,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var k=this.getCurrentFile();null!=k&&(k.fileChanged(),null!=f&&f())}),0)}),null,null,!0)}; +App.prototype.filterDrafts=function(b,f,k){function e(){k(u)}var u=[];try{this.getDatabaseItems(mxUtils.bind(this,function(v){EditorUi.debug("App.filterDrafts",[this],"items",v);for(var B=0;B<v.length;B++)try{var E=v[B].key;if(null!=E&&".draft_"==E.substring(0,7)){var L=JSON.parse(v[B].data);null!=L&&"draft"==L.type&&L.aliveCheck!=f&&(null==b&&null==L.fileObject||null!=L.fileObject&&L.fileObject.path==b)&&(L.key=E,u.push(L))}}catch(c){}e()},e))}catch(v){e()}}; App.prototype.checkDrafts=function(){try{var b=Editor.guid();localStorage.setItem(".draft-alive-check",b);window.setTimeout(mxUtils.bind(this,function(){localStorage.removeItem(".draft-alive-check");this.filterDrafts(null,b,mxUtils.bind(this,function(f){if(1==f.length)this.loadDraft(f[0].data,mxUtils.bind(this,function(){this.removeDatabaseItem(f[0].key)}));else if(1<f.length){var k=new Date(f[0].modified);k=new DraftDialog(this,1<f.length?mxResources.get("selectDraft"):mxResources.get("draftFound", -[k.toLocaleDateString()+" "+k.toLocaleTimeString()]),1<f.length?null:f[0].data,mxUtils.bind(this,function(d){this.hideDialog();d=""!=d?d:0;this.loadDraft(f[d].data,mxUtils.bind(this,function(){this.removeDatabaseItem(f[d].key)}))}),mxUtils.bind(this,function(d,u){d=""!=d?d:0;this.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){this.removeDatabaseItem(f[d].key);null!=u&&u()}),mxResources.get("no"),mxResources.get("yes"))}),null,null,null,1<f.length?f:null);this.showDialog(k.container, -640,480,!0,!1,mxUtils.bind(this,function(d){"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}));k.init()}else"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(f){}}; -App.prototype.showSplash=function(b){if("1"!=urlParams.noFileMenu){var f=this.getServiceCount(!0),k=mxUtils.bind(this,function(){var u=new SplashDialog(this);this.showDialog(u.container,340,mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:230,!0,!0,mxUtils.bind(this,function(x){x&&!mxClient.IS_CHROMEAPP&&(x=Editor.useLocalStorage,this.createFile(this.defaultFilename+(EditorUi.isElectronApp?".drawio":""),null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=x)}),!0)});if(this.editor.isChromelessView())this.handleError({message:mxResources.get("noFileSelected")}, -mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(mxClient.IS_CHROMEAPP||null!=this.mode&&!b)null==urlParams.create&&k();else{b=4==f?2:3;var d=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();k()}),b);this.showDialog(d.container,3>b?200:300,3<f?320:210,!0,!1)}}}; -App.prototype.addLanguageMenu=function(b,f,k){var d=null;null!=this.menus.get("language")&&(d=document.createElement("div"),d.setAttribute("title",mxResources.get("language")),d.className="atlas"!=uiTheme?"geIcon geAdaptiveAsset":"",d.style.backgroundImage="url("+Editor.globeImage+")",d.style.backgroundPosition="right center",d.style.backgroundRepeat="no-repeat",d.style.backgroundSize="19px 19px",d.style.width="19px",d.style.height="19px",mxUtils.setOpacity(d,40),d.style.position="absolute",d.style.cursor= -"pointer",d.style.bottom="20px",d.style.right=null!=k?k:"22px",f&&(d.style.direction="rtl",d.style.textAlign="right",d.style.right=null!=k?k:"24px",f=document.createElement("span"),f.style.display="inline-block",f.style.fontSize="12px",f.style.margin="2px 24px 0 0",f.style.userSelect="none",mxUtils.write(f,mxResources.get("language")),d.appendChild(f),f.className="atlas"!=uiTheme?"geAdaptiveAsset":""),mxEvent.addListener(d,"click",mxUtils.bind(this,function(u){this.editor.graph.popupMenuHandler.hideMenu(); -var x=new mxPopupMenu(this.menus.get("language").funct);x.div.className+=" geMenubarMenu";x.smartSeparators=!0;x.showDisabled=!0;x.autoExpand=!0;x.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(x,arguments);x.destroy()});var B=mxUtils.getOffset(d);x.popup(B.x,B.y+d.offsetHeight,null,u);this.setCurrentMenu(x)})),b.appendChild(d));return d}; -App.prototype.loadFileSystemEntry=function(b,f,k){k=null!=k?k:mxUtils.bind(this,function(d){this.handleError(d)});try{b.getFile().then(mxUtils.bind(this,function(d){var u=new FileReader;u.onload=mxUtils.bind(this,function(x){try{if(null!=f){var B=x.target.result;"image/png"==d.type&&(B=this.extractGraphModelFromPng(B));f(new LocalFile(this,B,d.name,null,b,d))}else this.openFileHandle(x.target.result,d.name,d,!1,b)}catch(D){k(D)}});u.onerror=k;"image"!==d.type.substring(0,5)&&"application/pdf"!==d.type|| -"image/svg"===d.type.substring(0,9)?u.readAsText(d):u.readAsDataURL(d)}),k)}catch(d){k(d)}}; -App.prototype.createFileSystemOptions=function(b){var f=[],k=null;if(null!=b){var d=b.lastIndexOf(".");0<d&&(k=b.substring(d+1))}for(d=0;d<this.editor.diagramFileTypes.length;d++){var u={description:mxResources.get(this.editor.diagramFileTypes[d].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[d].extension+")":""),accept:{}};u.accept[this.editor.diagramFileTypes[d].mimeType]=["."+this.editor.diagramFileTypes[d].extension];this.editor.diagramFileTypes[d].extension==k?f.splice(0,0, -u):this.editor.diagramFileTypes[d].extension==k?f.splice(0,0,u):f.push(u)}return{types:f,fileName:b}};App.prototype.showSaveFilePicker=function(b,f,k){f=null!=f?f:mxUtils.bind(this,function(d){"AbortError"!=d.name&&this.handleError(d)});k=null!=k?k:this.createFileSystemOptions();window.showSaveFilePicker(k).then(mxUtils.bind(this,function(d){null!=d&&d.getFile().then(mxUtils.bind(this,function(u){b(d,u)}),f)}),f)}; +[k.toLocaleDateString()+" "+k.toLocaleTimeString()]),1<f.length?null:f[0].data,mxUtils.bind(this,function(e){this.hideDialog();e=""!=e?e:0;this.loadDraft(f[e].data,mxUtils.bind(this,function(){this.removeDatabaseItem(f[e].key)}))}),mxUtils.bind(this,function(e,u){e=""!=e?e:0;this.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){this.removeDatabaseItem(f[e].key);null!=u&&u()}),mxResources.get("no"),mxResources.get("yes"))}),null,null,null,1<f.length?f:null);this.showDialog(k.container, +640,480,!0,!1,mxUtils.bind(this,function(e){"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}));k.init()}else"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(f){}}; +App.prototype.showSplash=function(b){if("1"!=urlParams.noFileMenu){var f=this.getServiceCount(!0),k=mxUtils.bind(this,function(){var u=new SplashDialog(this);this.showDialog(u.container,340,mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:230,!0,!0,mxUtils.bind(this,function(v){v&&!mxClient.IS_CHROMEAPP&&(v=Editor.useLocalStorage,this.createFile(this.defaultFilename+(EditorUi.isElectronApp?".drawio":""),null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=v)}),!0)});if(this.editor.isChromelessView())this.handleError({message:mxResources.get("noFileSelected")}, +mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(mxClient.IS_CHROMEAPP||null!=this.mode&&!b)null==urlParams.create&&k();else{b=4==f?2:3;var e=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();k()}),b);this.showDialog(e.container,3>b?200:300,3<f?320:210,!0,!1)}}}; +App.prototype.addLanguageMenu=function(b,f,k){var e=null;null!=this.menus.get("language")&&(e=document.createElement("div"),e.setAttribute("title",mxResources.get("language")),e.className="atlas"!=uiTheme?"geIcon geAdaptiveAsset":"",e.style.backgroundImage="url("+Editor.globeImage+")",e.style.backgroundPosition="right center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="19px 19px",e.style.width="19px",e.style.height="19px",mxUtils.setOpacity(e,40),e.style.position="absolute",e.style.cursor= +"pointer",e.style.bottom="20px",e.style.right=null!=k?k:"22px",f&&(e.style.direction="rtl",e.style.textAlign="right",e.style.right=null!=k?k:"24px",f=document.createElement("span"),f.style.display="inline-block",f.style.fontSize="12px",f.style.margin="2px 24px 0 0",f.style.userSelect="none",mxUtils.write(f,mxResources.get("language")),e.appendChild(f),f.className="atlas"!=uiTheme?"geAdaptiveAsset":""),mxEvent.addListener(e,"click",mxUtils.bind(this,function(u){this.editor.graph.popupMenuHandler.hideMenu(); +var v=new mxPopupMenu(this.menus.get("language").funct);v.div.className+=" geMenubarMenu";v.smartSeparators=!0;v.showDisabled=!0;v.autoExpand=!0;v.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(v,arguments);v.destroy()});var B=mxUtils.getOffset(e);v.popup(B.x,B.y+e.offsetHeight,null,u);this.setCurrentMenu(v)})),b.appendChild(e));return e}; +App.prototype.loadFileSystemEntry=function(b,f,k){k=null!=k?k:mxUtils.bind(this,function(e){this.handleError(e)});try{b.getFile().then(mxUtils.bind(this,function(e){var u=new FileReader;u.onload=mxUtils.bind(this,function(v){try{if(null!=f){var B=v.target.result;"image/png"==e.type&&(B=this.extractGraphModelFromPng(B));f(new LocalFile(this,B,e.name,null,b,e))}else this.openFileHandle(v.target.result,e.name,e,!1,b)}catch(E){k(E)}});u.onerror=k;"image"!==e.type.substring(0,5)&&"application/pdf"!==e.type|| +"image/svg"===e.type.substring(0,9)?u.readAsText(e):u.readAsDataURL(e)}),k)}catch(e){k(e)}}; +App.prototype.createFileSystemOptions=function(b){var f=[],k=null;if(null!=b){var e=b.lastIndexOf(".");0<e&&(k=b.substring(e+1))}for(e=0;e<this.editor.diagramFileTypes.length;e++){var u={description:mxResources.get(this.editor.diagramFileTypes[e].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[e].extension+")":""),accept:{}};u.accept[this.editor.diagramFileTypes[e].mimeType]=["."+this.editor.diagramFileTypes[e].extension];this.editor.diagramFileTypes[e].extension==k?f.splice(0,0, +u):this.editor.diagramFileTypes[e].extension==k?f.splice(0,0,u):f.push(u)}return{types:f,fileName:b}};App.prototype.showSaveFilePicker=function(b,f,k){f=null!=f?f:mxUtils.bind(this,function(e){"AbortError"!=e.name&&this.handleError(e)});k=null!=k?k:this.createFileSystemOptions();window.showSaveFilePicker(k).then(mxUtils.bind(this,function(e){null!=e&&e.getFile().then(mxUtils.bind(this,function(u){b(e,u)}),f)}),f)}; App.prototype.pickFile=function(b){try{if(b=null!=b?b:this.mode,b==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var f=this.getPeerForMode(b);if(null!=f)f.pickFile();else if(b==App.MODE_DEVICE&&EditorUi.nativeFileSupport)window.showOpenFilePicker().then(mxUtils.bind(this,function(B){null!=B&&0<B.length&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.loadFileSystemEntry(B[0])}), mxUtils.bind(this,function(B){"AbortError"!=B.name&&this.handleError(B)}));else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.openFileInputElt){var k=document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){null!=k.files&&(this.openFiles(k.files),k.type="",k.type="file",k.value="")}));k.style.display="none";document.body.appendChild(k);this.openFileInputElt=k}this.openFileInputElt.click()}else{this.hideDialog();window.openNew= -null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(B,D){StorageFile.listFiles(this,"F",B,D)});window.openBrowserFile=mxUtils.bind(this,function(B,D,K){StorageFile.getFileContent(this,B,D,K)});window.deleteBrowserFile=mxUtils.bind(this,function(B,D,K){StorageFile.deleteFile(this,B,D,K)});var d=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this, -function(B,D){var K=mxUtils.bind(this,function(){this.useCanvasForExport||".png"!=D.substring(D.length-4)||(D=D.substring(0,D.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,B,D):new LocalFile(this,B,D))}),c=this.getCurrentFile();null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,K,mxResources.get("cancel"),mxResources.get("discardChanges")):K()}));var u=this.dialog,x=u.close;this.dialog.close=mxUtils.bind(this,function(B){Editor.useLocalStorage= -d;x.apply(u,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(B){this.handleError(B)}}; -App.prototype.pickLibrary=function(b){b=null!=b?b:this.mode;if(b==App.MODE_GOOGLE||b==App.MODE_DROPBOX||b==App.MODE_ONEDRIVE||b==App.MODE_GITHUB||b==App.MODE_GITLAB||b==App.MODE_TRELLO){var f=b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:this.dropbox;null!=f&&f.pickLibrary(mxUtils.bind(this,function(u,x){if(null!=x)try{this.loadLibrary(x)}catch(B){this.handleError(B,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body, -mxResources.get("loading"))&&f.getLibrary(u,mxUtils.bind(this,function(B){this.spinner.stop();try{this.loadLibrary(B)}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(B){this.handleError(B,null!=B?mxResources.get("errorLoadingFile"):null)}))}))}else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var k=document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){if(null!= -k.files){for(var u=0;u<k.files.length;u++)mxUtils.bind(this,function(x){var B=new FileReader;B.onload=mxUtils.bind(this,function(D){try{this.loadLibrary(new LocalLibrary(this,D.target.result,x.name))}catch(K){this.handleError(K,mxResources.get("errorLoadingFile"))}});B.readAsText(x)})(k.files[u]);k.type="";k.type="file";k.value=""}}));k.style.display="none";document.body.appendChild(k);this.libFileInputElt=k}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles= -mxUtils.bind(this,function(u,x){StorageFile.listFiles(this,"L",u,x)});window.openBrowserFile=mxUtils.bind(this,function(u,x,B){StorageFile.getFileContent(this,u,x,B)});window.deleteBrowserFile=mxUtils.bind(this,function(u,x,B){StorageFile.deleteFile(this,u,x,B)});var d=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(u){this.hideDialog(u)}));window.openFile.setConsumer(mxUtils.bind(this,function(u,x){try{this.loadLibrary(b== -App.MODE_BROWSER?new StorageLibrary(this,u,x):new LocalLibrary(this,u,x))}catch(B){this.handleError(B,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=d;window.openFile=null})}}; -App.prototype.saveLibrary=function(b,f,k,d,u,x,B){try{d=null!=d?d:this.mode;u=null!=u?u:!1;x=null!=x?x:!1;var D=this.createLibraryDataFromImages(f),K=mxUtils.bind(this,function(g){this.spinner.stop();null!=B&&B();this.handleError(g,null!=g?mxResources.get("errorSavingFile"):null)});null==k&&d==App.MODE_DEVICE&&(k=new LocalLibrary(this,D,b));if(null==k)this.pickFolder(d,mxUtils.bind(this,function(g){d==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))? -this.drive.insertFile(b,D,g,mxUtils.bind(this,function(q){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(q,f)}),K,this.drive.libraryMimeType):d==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,D,mxUtils.bind(this,function(q){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(q,f)}),K,g):d==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b, -D,mxUtils.bind(this,function(q){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(q,f)}),K,g):d==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,D,mxUtils.bind(this,function(q){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(q,f)}),K,g):d==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,D,mxUtils.bind(this,function(q){this.spinner.stop(); -this.hideDialog(!0);this.libraryLoaded(q,f)}),K,g):d==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,D,mxUtils.bind(this,function(q){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(q,f)}),K,g):d==App.MODE_BROWSER?(g=mxUtils.bind(this,function(){var q=new StorageLibrary(this,D,b);q.saveFile(b,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(q,f)}),K)}),null==localStorage.getItem(b)? -g():this.confirm(mxResources.get("replaceIt",[b]),g)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(u||this.spinner.spin(document.body,mxResources.get("saving"))){k.setData(D);var c=mxUtils.bind(this,function(){k.save(!0,mxUtils.bind(this,function(g){this.spinner.stop();this.hideDialog(!0);x||this.libraryLoaded(k,f);null!=B&&B()}),K)});if(b!=k.getTitle()){var e=k.getHash();k.rename(b,mxUtils.bind(this,function(g){k.constructor!=LocalLibrary&&e!=k.getHash()&& -(mxSettings.removeCustomLibrary(e),mxSettings.addCustomLibrary(k.getHash()));this.removeLibrarySidebar(e);c()}),K)}else c()}}catch(g){this.handleError(g)}}; -App.prototype.saveFile=function(b,f){var k=this.getCurrentFile();if(null!=k){var d=mxUtils.bind(this,function(){EditorUi.enableDrafts&&k.removeDraft();this.getCurrentFile()==k||k.isModified()||(k.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=f&&f()});if(b||null==k.getTitle()||null!=k.invalidFileHandle||null==this.mode)if(null!=k&&k.constructor==LocalFile&&null!=k.fileHandle)this.showSaveFilePicker(mxUtils.bind(this, -function(K,c){k.invalidFileHandle=null;k.fileHandle=K;k.title=c.name;k.desc=c;this.save(c.name,d)}),null,this.createFileSystemOptions(k.getTitle()));else{var u=null!=k.getTitle()?k.getTitle():this.defaultFilename,x=!mxClient.IS_IOS||!navigator.standalone,B=this.mode;b=this.getServiceCount(!0);isLocalStorage&&b++;var D=4>=b?2:6<b?4:3;u=new CreateDialog(this,u,mxUtils.bind(this,function(K,c,e){null!=K&&0<K.length&&(/(\.pdf)$/i.test(K)?this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this, -function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){e.value=K.split(".").slice(0,-1).join(".");e.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?e.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no")):(this.hideDialog(),null==B&&c==App.MODE_DEVICE?null!=k&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(g,q){k.fileHandle=g;k.mode=App.MODE_DEVICE;k.title=q.name; -k.desc=q;this.setMode(App.MODE_DEVICE);this.save(q.name,d)}),mxUtils.bind(this,function(g){"AbortError"!=g.name&&this.handleError(g)}),this.createFileSystemOptions(K)):(this.setMode(App.MODE_DEVICE),this.save(K,d)):"download"==c?(new LocalFile(this,null,K)).save():"_blank"==c?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0)):B!=c?this.pickFolder(c,mxUtils.bind(this,function(g){this.createFile(K, -this.getFileData(/(\.xml)$/i.test(K)||0>K.indexOf(".")||/(\.drawio)$/i.test(K),/(\.svg)$/i.test(K),/(\.html)$/i.test(K)),null,c,d,null==this.mode,g)})):null!=c&&this.save(K,d)))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,x,null,!0,D,null,null,null,this.editor.fileExtensions,!1);this.showDialog(u.container,420,b>D?390:280,!0,!0);u.init()}else this.save(k.getTitle(),d)}}; -App.prototype.loadTemplate=function(b,f,k,d,u){var x=!1,B=b,D=null!=d?d:b,K=/(\.v(dx|sdx?))($|\?)/i.test(D)||/(\.vs(x|sx?))($|\?)/i.test(D);d=/\.png$/i.test(D)||/\.pdf$/i.test(D);this.editor.isCorsEnabledForUrl(B)||(x=d||K,B="t="+(new Date).getTime(),B=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+B+(x?"&base64=1":""));this.editor.loadUrl(B,mxUtils.bind(this,function(c){try{var e=x?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(c):atob(c):c;if(K||this.isVisioData(e))K||(D=u?this.isRemoteVisioData(e)? -"raw.vss":"raw.vssx":this.isRemoteVisioData(e)?"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(c.substring(c.indexOf(",")+1)),function(g){f(g)},k,D);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,D))this.isExternalDataComms()?this.parseFileData(e,mxUtils.bind(this,function(g){4==g.readyState&&200<=g.status&&299>=g.status&&"<mxGraphModel"==g.responseText.substring(0,13)&&f(g.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k); -else if(this.isLucidChartData(e))this.convertLucidChart(e,mxUtils.bind(this,function(g){f(g)}),mxUtils.bind(this,function(g){k(g)}));else{if(/(\.png)($|\?)/i.test(D)||Editor.isPngData(e))e=Editor.extractGraphModelFromPng(c);f(e)}}catch(g){k(g)}}),k,/(\.png)($|\?)/i.test(D)||/(\.v(dx|sdx?))($|\?)/i.test(D)||/(\.vs(x|sx?))($|\?)/i.test(D),null,null,x)}; +null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(B,E){StorageFile.listFiles(this,"F",B,E)});window.openBrowserFile=mxUtils.bind(this,function(B,E,L){StorageFile.getFileContent(this,B,E,L)});window.deleteBrowserFile=mxUtils.bind(this,function(B,E,L){StorageFile.deleteFile(this,B,E,L)});var e=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this, +function(B,E){var L=mxUtils.bind(this,function(){this.useCanvasForExport||".png"!=E.substring(E.length-4)||(E=E.substring(0,E.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,B,E):new LocalFile(this,B,E))}),c=this.getCurrentFile();null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,L,mxResources.get("cancel"),mxResources.get("discardChanges")):L()}));var u=this.dialog,v=u.close;this.dialog.close=mxUtils.bind(this,function(B){Editor.useLocalStorage= +e;v.apply(u,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(B){this.handleError(B)}}; +App.prototype.pickLibrary=function(b){b=null!=b?b:this.mode;if(b==App.MODE_GOOGLE||b==App.MODE_DROPBOX||b==App.MODE_ONEDRIVE||b==App.MODE_GITHUB||b==App.MODE_GITLAB||b==App.MODE_TRELLO){var f=b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:this.dropbox;null!=f&&f.pickLibrary(mxUtils.bind(this,function(u,v){if(null!=v)try{this.loadLibrary(v)}catch(B){this.handleError(B,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body, +mxResources.get("loading"))&&f.getLibrary(u,mxUtils.bind(this,function(B){this.spinner.stop();try{this.loadLibrary(B)}catch(E){this.handleError(E,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(B){this.handleError(B,null!=B?mxResources.get("errorLoadingFile"):null)}))}))}else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var k=document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){if(null!= +k.files){for(var u=0;u<k.files.length;u++)mxUtils.bind(this,function(v){var B=new FileReader;B.onload=mxUtils.bind(this,function(E){try{this.loadLibrary(new LocalLibrary(this,E.target.result,v.name))}catch(L){this.handleError(L,mxResources.get("errorLoadingFile"))}});B.readAsText(v)})(k.files[u]);k.type="";k.type="file";k.value=""}}));k.style.display="none";document.body.appendChild(k);this.libFileInputElt=k}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles= +mxUtils.bind(this,function(u,v){StorageFile.listFiles(this,"L",u,v)});window.openBrowserFile=mxUtils.bind(this,function(u,v,B){StorageFile.getFileContent(this,u,v,B)});window.deleteBrowserFile=mxUtils.bind(this,function(u,v,B){StorageFile.deleteFile(this,u,v,B)});var e=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(u){this.hideDialog(u)}));window.openFile.setConsumer(mxUtils.bind(this,function(u,v){try{this.loadLibrary(b== +App.MODE_BROWSER?new StorageLibrary(this,u,v):new LocalLibrary(this,u,v))}catch(B){this.handleError(B,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=e;window.openFile=null})}}; +App.prototype.saveLibrary=function(b,f,k,e,u,v,B){try{e=null!=e?e:this.mode;u=null!=u?u:!1;v=null!=v?v:!1;var E=this.createLibraryDataFromImages(f),L=mxUtils.bind(this,function(g){this.spinner.stop();null!=B&&B();this.handleError(g,null!=g?mxResources.get("errorSavingFile"):null)});null==k&&e==App.MODE_DEVICE&&(k=new LocalLibrary(this,E,b));if(null==k)this.pickFolder(e,mxUtils.bind(this,function(g){e==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))? +this.drive.insertFile(b,E,g,mxUtils.bind(this,function(q){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(q,f)}),L,this.drive.libraryMimeType):e==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,E,mxUtils.bind(this,function(q){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(q,f)}),L,g):e==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b, +E,mxUtils.bind(this,function(q){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(q,f)}),L,g):e==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,E,mxUtils.bind(this,function(q){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(q,f)}),L,g):e==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,E,mxUtils.bind(this,function(q){this.spinner.stop(); +this.hideDialog(!0);this.libraryLoaded(q,f)}),L,g):e==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,E,mxUtils.bind(this,function(q){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(q,f)}),L,g):e==App.MODE_BROWSER?(g=mxUtils.bind(this,function(){var q=new StorageLibrary(this,E,b);q.saveFile(b,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(q,f)}),L)}),null==localStorage.getItem(b)? +g():this.confirm(mxResources.get("replaceIt",[b]),g)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(u||this.spinner.spin(document.body,mxResources.get("saving"))){k.setData(E);var c=mxUtils.bind(this,function(){k.save(!0,mxUtils.bind(this,function(g){this.spinner.stop();this.hideDialog(!0);v||this.libraryLoaded(k,f);null!=B&&B()}),L)});if(b!=k.getTitle()){var d=k.getHash();k.rename(b,mxUtils.bind(this,function(g){k.constructor!=LocalLibrary&&d!=k.getHash()&& +(mxSettings.removeCustomLibrary(d),mxSettings.addCustomLibrary(k.getHash()));this.removeLibrarySidebar(d);c()}),L)}else c()}}catch(g){this.handleError(g)}}; +App.prototype.saveFile=function(b,f){var k=this.getCurrentFile();if(null!=k){var e=mxUtils.bind(this,function(){EditorUi.enableDrafts&&k.removeDraft();this.getCurrentFile()==k||k.isModified()||(k.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=f&&f()});if(b||null==k.getTitle()||null!=k.invalidFileHandle||null==this.mode)if(null!=k&&k.constructor==LocalFile&&null!=k.fileHandle)this.showSaveFilePicker(mxUtils.bind(this, +function(L,c){k.invalidFileHandle=null;k.fileHandle=L;k.title=c.name;k.desc=c;this.save(c.name,e)}),null,this.createFileSystemOptions(k.getTitle()));else{var u=null!=k.getTitle()?k.getTitle():this.defaultFilename,v=!mxClient.IS_IOS||!navigator.standalone,B=this.mode;b=this.getServiceCount(!0);isLocalStorage&&b++;var E=4>=b?2:6<b?4:3;u=new CreateDialog(this,u,mxUtils.bind(this,function(L,c,d){null!=L&&0<L.length&&(/(\.pdf)$/i.test(L)?this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this, +function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){d.value=L.split(".").slice(0,-1).join(".");d.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?d.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no")):(this.hideDialog(),null==B&&c==App.MODE_DEVICE?null!=k&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(g,q){k.fileHandle=g;k.mode=App.MODE_DEVICE;k.title=q.name; +k.desc=q;this.setMode(App.MODE_DEVICE);this.save(q.name,e)}),mxUtils.bind(this,function(g){"AbortError"!=g.name&&this.handleError(g)}),this.createFileSystemOptions(L)):(this.setMode(App.MODE_DEVICE),this.save(L,e)):"download"==c?(new LocalFile(this,null,L)).save():"_blank"==c?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0)):B!=c?this.pickFolder(c,mxUtils.bind(this,function(g){this.createFile(L, +this.getFileData(/(\.xml)$/i.test(L)||0>L.indexOf(".")||/(\.drawio)$/i.test(L),/(\.svg)$/i.test(L),/(\.html)$/i.test(L)),null,c,e,null==this.mode,g)})):null!=c&&this.save(L,e)))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,v,null,!0,E,null,null,null,this.editor.fileExtensions,!1);this.showDialog(u.container,420,b>E?390:280,!0,!0);u.init()}else this.save(k.getTitle(),e)}}; +App.prototype.loadTemplate=function(b,f,k,e,u){var v=!1,B=b,E=null!=e?e:b,L=/(\.v(dx|sdx?))($|\?)/i.test(E)||/(\.vs(x|sx?))($|\?)/i.test(E);e=/\.png$/i.test(E)||/\.pdf$/i.test(E);this.editor.isCorsEnabledForUrl(B)||(v=e||L,B="t="+(new Date).getTime(),B=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+B+(v?"&base64=1":""));this.editor.loadUrl(B,mxUtils.bind(this,function(c){try{var d=v?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(c):atob(c):c;if(L||this.isVisioData(d))L||(E=u?this.isRemoteVisioData(d)? +"raw.vss":"raw.vssx":this.isRemoteVisioData(d)?"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(c.substring(c.indexOf(",")+1)),function(g){f(g)},k,E);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,E))this.isExternalDataComms()?this.parseFileData(d,mxUtils.bind(this,function(g){4==g.readyState&&200<=g.status&&299>=g.status&&"<mxGraphModel"==g.responseText.substring(0,13)&&f(g.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k); +else if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,function(g){f(g)}),mxUtils.bind(this,function(g){k(g)}));else{if(/(\.png)($|\?)/i.test(E)||Editor.isPngData(d))d=Editor.extractGraphModelFromPng(c);f(d)}}catch(g){k(g)}}),k,/(\.png)($|\?)/i.test(E)||/(\.v(dx|sdx?))($|\?)/i.test(E)||/(\.vs(x|sx?))($|\?)/i.test(E),null,null,v)}; App.prototype.getPeerForMode=function(b){return b==App.MODE_GOOGLE?this.drive:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_DROPBOX?this.dropbox:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_TRELLO?this.trello:null}; -App.prototype.createFile=function(b,f,k,d,u,x,B,D,K){d=D?null:null!=d?d:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){f=null!=f?f:this.emptyDiagramXml;var c=mxUtils.bind(this,function(){this.spinner.stop()}),e=mxUtils.bind(this,function(g){c();null==g&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=g&&this.handleError(g)});try{d==App.MODE_GOOGLE&&null!=this.drive?(null==B&&null!=this.stateArg&&null!=this.stateArg.folderId&&(B=this.stateArg.folderId), -this.drive.insertFile(b,f,B,mxUtils.bind(this,function(g){c();this.fileCreated(g,k,x,u,K)}),e)):d==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,f,mxUtils.bind(this,function(g){c();this.fileCreated(g,k,x,u,K)}),e,!1,B):d==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,f,mxUtils.bind(this,function(g){c();this.fileCreated(g,k,x,u,K)}),e,!1,B):d==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,f,mxUtils.bind(this,function(g){c();this.fileCreated(g,k,x,u,K)}),e, -!1,B):d==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,f,mxUtils.bind(this,function(g){c();this.fileCreated(g,k,x,u,K)}),e):d==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(b,f,mxUtils.bind(this,function(g){c();this.fileCreated(g,k,x,u,K)}),e,!1,B):d==App.MODE_BROWSER?StorageFile.insertFile(this,b,f,mxUtils.bind(this,function(g){c();this.fileCreated(g,k,x,u,K)}),e):!D&&d==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(c(),this.showSaveFilePicker(mxUtils.bind(this, -function(g,q){var m=new LocalFile(this,f,q.name,null,g,q);m.saveFile(q.name,!1,mxUtils.bind(this,function(){this.fileCreated(m,k,x,u,K)}),e,!0)}),mxUtils.bind(this,function(g){"AbortError"!=g.name&&e(g)}),this.createFileSystemOptions(b))):(c(),this.fileCreated(new LocalFile(this,f,b,null==d),k,x,u,K))}catch(g){c(),this.handleError(g)}}}; -App.prototype.fileCreated=function(b,f,k,d,u){var x=window.location.pathname;null!=f&&0<f.length&&(x+="?libs="+f);null!=u&&0<u.length&&(x+="?clibs="+u);x=this.getUrl(x);b.getMode()!=App.MODE_DEVICE&&(x+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var B=b.getData();B=0<B.length?this.editor.extractGraphModel(mxUtils.parseXml(B).documentElement,!0):null;var D=window.location.protocol+"//"+window.location.hostname+x,K=B,c=null;null!=B&&/\.svg$/i.test(b.getTitle())&& -(c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),K=this.decodeNodeIntoGraph(K,c));b.setData(this.createFileData(B,c,b,D));null!=c&&c.container.parentNode.removeChild(c.container);var e=mxUtils.bind(this,function(){this.spinner.stop()}),g=mxUtils.bind(this,function(){e();var q=this.getCurrentFile();null==k&&null!=q&&(k=!q.isModified()&&null==q.getMode());var m=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b);k&&b.addAllSavedStatus(); -null!=f&&this.sidebar.showEntries(f);if(null!=u){for(var z=[],C=u.split(";"),v=0;v<C.length;v++)z.push(decodeURIComponent(C[v]));this.loadLibraries(z)}}),n=mxUtils.bind(this,function(){k||null==q||!q.isModified()?m():this.confirm(mxResources.get("allChangesLost"),null,m,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=d&&d();null==k||k?n():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(), -null==b.getMode())),null!=d&&d(),window.openWindow(x,null,n))});b.constructor==LocalFile?g():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){g()}),mxUtils.bind(this,function(q){e();null!=q&&"AbortError"==q.name||this.handleError(q)}))}}; -App.prototype.loadFile=function(b,f,k,d,u){if("1"==urlParams.openInSameWin||navigator.standalone)f=!0;this.hideDialog();var x=mxUtils.bind(this,function(){if(null==b||0==b.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var K=mxUtils.bind(this,function(m){this.handleError(m,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var n=this.getCurrentFile(); -window.location.hash=null!=n?n.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(m){null!=m?(this.fileLoaded(new StorageFile(this,m,b)),null!=d&&d()):K({message:mxResources.get("fileNotFound")})}),K)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var m=this.getCurrentFile();window.location.hash=null!=m?m.getHash():""}));else if(null!=k)this.spinner.stop(), -this.fileLoaded(k),null!=d&&d();else if("S"==b.charAt(0))this.spinner.stop(),this.alert("[Deprecation] #S is no longer supported, go to https://app.diagrams.net/?desc="+b.substring(1).substring(0,10),mxUtils.bind(this,function(){window.location.href="https://app.diagrams.net/?desc="+b.substring(1)}));else if("R"==b.charAt(0)){this.spinner.stop();var c=decodeURIComponent(b.substring(1));"<"!=c.charAt(0)&&(c=Graph.decompress(c));c=new LocalFile(this,c,null!=urlParams.title?decodeURIComponent(urlParams.title): -this.defaultFilename,!0);c.getHash=function(){return b};this.fileLoaded(c);null!=d&&d()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(m,n){this.spinner.stop();this.fileLoaded(new EmbedFile(this,m,n));null!=d&&d()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")}, -mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var e=decodeURIComponent(b.substring(1)),g=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=e.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var m=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var n=e.substring(31,e.lastIndexOf("&ex"));this.loadFile("G"+n,f,null,mxUtils.bind(this,function(){var z=this.getCurrentFile();null!=z&&this.editor.chromeless&& -!this.editor.editable&&(z.getHash=function(){return"G"+n},window.location.hash="#"+z.getHash());null!=d&&d()}));return!0}return!1});!m()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",m);return!0});this.loadTemplate(e,mxUtils.bind(this,function(m){this.spinner.stop();if(null!=m&&0<m.length){var n=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var z=e,C=e.lastIndexOf("."),v=z.lastIndexOf("/");C>v&&0<v&&(z=z.substring(v+1,C),C=e.substring(C), -this.useCanvasForExport||".png"!=C||(C=".drawio"),".svg"===C||".xml"===C||".html"===C||".png"===C||".drawio"===C)&&(n=z+C)}m=new LocalFile(this,m,null!=urlParams.title?decodeURIComponent(urlParams.title):n,!0);m.getHash=function(){return b};this.fileLoaded(m,!0)?null!=d&&d():g()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else g()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this, +App.prototype.createFile=function(b,f,k,e,u,v,B,E,L){e=E?null:null!=e?e:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){f=null!=f?f:this.emptyDiagramXml;var c=mxUtils.bind(this,function(){this.spinner.stop()}),d=mxUtils.bind(this,function(g){c();null==g&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=g&&this.handleError(g)});try{e==App.MODE_GOOGLE&&null!=this.drive?(null==B&&null!=this.stateArg&&null!=this.stateArg.folderId&&(B=this.stateArg.folderId), +this.drive.insertFile(b,f,B,mxUtils.bind(this,function(g){c();this.fileCreated(g,k,v,u,L)}),d)):e==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,f,mxUtils.bind(this,function(g){c();this.fileCreated(g,k,v,u,L)}),d,!1,B):e==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,f,mxUtils.bind(this,function(g){c();this.fileCreated(g,k,v,u,L)}),d,!1,B):e==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,f,mxUtils.bind(this,function(g){c();this.fileCreated(g,k,v,u,L)}),d, +!1,B):e==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,f,mxUtils.bind(this,function(g){c();this.fileCreated(g,k,v,u,L)}),d):e==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(b,f,mxUtils.bind(this,function(g){c();this.fileCreated(g,k,v,u,L)}),d,!1,B):e==App.MODE_BROWSER?StorageFile.insertFile(this,b,f,mxUtils.bind(this,function(g){c();this.fileCreated(g,k,v,u,L)}),d):!E&&e==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(c(),this.showSaveFilePicker(mxUtils.bind(this, +function(g,q){var m=new LocalFile(this,f,q.name,null,g,q);m.saveFile(q.name,!1,mxUtils.bind(this,function(){this.fileCreated(m,k,v,u,L)}),d,!0)}),mxUtils.bind(this,function(g){"AbortError"!=g.name&&d(g)}),this.createFileSystemOptions(b))):(c(),this.fileCreated(new LocalFile(this,f,b,null==e),k,v,u,L))}catch(g){c(),this.handleError(g)}}}; +App.prototype.fileCreated=function(b,f,k,e,u){var v=window.location.pathname;null!=f&&0<f.length&&(v+="?libs="+f);null!=u&&0<u.length&&(v+="?clibs="+u);v=this.getUrl(v);b.getMode()!=App.MODE_DEVICE&&(v+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var B=b.getData();B=0<B.length?this.editor.extractGraphModel(mxUtils.parseXml(B).documentElement,!0):null;var E=window.location.protocol+"//"+window.location.hostname+v,L=B,c=null;null!=B&&/\.svg$/i.test(b.getTitle())&& +(c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),L=this.decodeNodeIntoGraph(L,c));b.setData(this.createFileData(B,c,b,E));null!=c&&c.container.parentNode.removeChild(c.container);var d=mxUtils.bind(this,function(){this.spinner.stop()}),g=mxUtils.bind(this,function(){d();var q=this.getCurrentFile();null==k&&null!=q&&(k=!q.isModified()&&null==q.getMode());var m=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b);k&&b.addAllSavedStatus(); +null!=f&&this.sidebar.showEntries(f);if(null!=u){for(var z=[],C=u.split(";"),x=0;x<C.length;x++)z.push(decodeURIComponent(C[x]));this.loadLibraries(z)}}),n=mxUtils.bind(this,function(){k||null==q||!q.isModified()?m():this.confirm(mxResources.get("allChangesLost"),null,m,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=e&&e();null==k||k?n():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(), +null==b.getMode())),null!=e&&e(),window.openWindow(v,null,n))});b.constructor==LocalFile?g():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){g()}),mxUtils.bind(this,function(q){d();null!=q&&"AbortError"==q.name||this.handleError(q)}))}}; +App.prototype.loadFile=function(b,f,k,e,u){if("1"==urlParams.openInSameWin||navigator.standalone)f=!0;this.hideDialog();var v=mxUtils.bind(this,function(){if(null==b||0==b.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var L=mxUtils.bind(this,function(m){this.handleError(m,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var n=this.getCurrentFile(); +window.location.hash=null!=n?n.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(m){null!=m?(this.fileLoaded(new StorageFile(this,m,b)),null!=e&&e()):L({message:mxResources.get("fileNotFound")})}),L)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var m=this.getCurrentFile();window.location.hash=null!=m?m.getHash():""}));else if(null!=k)this.spinner.stop(), +this.fileLoaded(k),null!=e&&e();else if("S"==b.charAt(0))this.spinner.stop(),this.alert("[Deprecation] #S is no longer supported, go to https://app.diagrams.net/?desc="+b.substring(1).substring(0,10),mxUtils.bind(this,function(){window.location.href="https://app.diagrams.net/?desc="+b.substring(1)}));else if("R"==b.charAt(0)){this.spinner.stop();var c=decodeURIComponent(b.substring(1));"<"!=c.charAt(0)&&(c=Graph.decompress(c));c=new LocalFile(this,c,null!=urlParams.title?decodeURIComponent(urlParams.title): +this.defaultFilename,!0);c.getHash=function(){return b};this.fileLoaded(c);null!=e&&e()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(m,n){this.spinner.stop();this.fileLoaded(new EmbedFile(this,m,n));null!=e&&e()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")}, +mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var d=decodeURIComponent(b.substring(1)),g=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=d.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var m=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var n=d.substring(31,d.lastIndexOf("&ex"));this.loadFile("G"+n,f,null,mxUtils.bind(this,function(){var z=this.getCurrentFile();null!=z&&this.editor.chromeless&& +!this.editor.editable&&(z.getHash=function(){return"G"+n},window.location.hash="#"+z.getHash());null!=e&&e()}));return!0}return!1});!m()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",m);return!0});this.loadTemplate(d,mxUtils.bind(this,function(m){this.spinner.stop();if(null!=m&&0<m.length){var n=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var z=d,C=d.lastIndexOf("."),x=z.lastIndexOf("/");C>x&&0<x&&(z=z.substring(x+1,C),C=d.substring(C), +this.useCanvasForExport||".png"!=C||(C=".drawio"),".svg"===C||".xml"===C||".html"===C||".png"===C||".drawio"===C)&&(n=z+C)}m=new LocalFile(this,m,null!=urlParams.title?decodeURIComponent(urlParams.title):n,!0);m.getHash=function(){return b};this.fileLoaded(m,!0)?null!=e&&e():g()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else g()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this, function(){g()||(this.spinner.stop(),this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else if(c=null,"G"==b.charAt(0)?c=this.drive:"D"==b.charAt(0)?c=this.dropbox:"W"==b.charAt(0)?c=this.oneDrive:"H"==b.charAt(0)?c=this.gitHub:"A"==b.charAt(0)?c=this.gitLab:"T"==b.charAt(0)&&(c=this.trello),null==c)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")}, mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var m=this.getCurrentFile();window.location.hash=null!=m?m.getHash():""}));else{var q=b.charAt(0);b=decodeURIComponent(b.substring(1));c.getFile(b,mxUtils.bind(this,function(m){this.spinner.stop();this.fileLoaded(m);var n=this.getCurrentFile();null==n?(window.location.hash="",this.showSplash()):this.editor.chromeless&&!this.editor.editable?(n.getHash=function(){return q+b},window.location.hash="#"+n.getHash()):m==n&&null==m.getMode()&& -(m=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+m+'" class="geStatusAlert">'+m+"</div>"));null!=d&&d()}),mxUtils.bind(this,function(m){null!=window.console&&null!=m&&console.log("error in loadFile:",b,m);var n=mxUtils.bind(this,function(){var z=this.getCurrentFile();null==z?(window.location.hash="",this.showSplash()):window.location.hash="#"+z.getHash()});null==m||"AbortError"!=m.name?this.handleError(m,null!=m?mxResources.get("errorLoadingFile"):null,n,null,null,"#"+q+b):n()}))}}), -B=this.getCurrentFile(),D=mxUtils.bind(this,function(){u||null==B||!B.isModified()?x():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=B&&(window.location.hash=B.getHash())}),x,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?D():null==B||f?D():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,D)).container,320,140,!0,!0)}; +(m=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+m+'" class="geStatusAlert">'+m+"</div>"));null!=e&&e()}),mxUtils.bind(this,function(m){null!=window.console&&null!=m&&console.log("error in loadFile:",b,m);var n=mxUtils.bind(this,function(){var z=this.getCurrentFile();null==z?(window.location.hash="",this.showSplash()):window.location.hash="#"+z.getHash()});null==m||"AbortError"!=m.name?this.handleError(m,null!=m?mxResources.get("errorLoadingFile"):null,n,null,null,"#"+q+b):n()}))}}), +B=this.getCurrentFile(),E=mxUtils.bind(this,function(){u||null==B||!B.isModified()?v():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=B&&(window.location.hash=B.getHash())}),v,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?E():null==B||f?E():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,E)).container,320,140,!0,!0)}; App.prototype.getLibraryStorageHint=function(b){var f=b.getTitle();b.constructor!=LocalLibrary&&(f+="\n"+b.getHash());b.constructor==DriveLibrary?f+=" ("+mxResources.get("googleDrive")+")":b.constructor==GitHubLibrary?f+=" ("+mxResources.get("github")+")":b.constructor==TrelloLibrary?f+=" ("+mxResources.get("trello")+")":b.constructor==DropboxLibrary?f+=" ("+mxResources.get("dropbox")+")":b.constructor==OneDriveLibrary?f+=" ("+mxResources.get("oneDrive")+")":b.constructor==StorageLibrary?f+=" ("+ -mxResources.get("browser")+")":b.constructor==LocalLibrary&&(f+=" ("+mxResources.get("device")+")");return f};App.prototype.restoreLibraries=function(){function b(k){for(var d=0;d<k.length;d++)""!=k[d]&&0>mxUtils.indexOf(f,k[d])&&f.push(k[d])}var f=[];b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"));this.loadLibraries(f)}; -App.prototype.loadLibraries=function(b,f){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var k=mxUtils.bind(this,function(c,e){e||mxSettings.removeCustomLibrary(c);delete this.loadedLibraries[c]}),d=0,u=[],x=0<b.length&&"L.scratchpad"==b[0]?1:0,B=mxUtils.bind(this,function(){if(0==d){if(null!=b)for(var c=b.length-1;0<=c;c--)null!=u[c]&&this.loadLibrary(u[c],c<=x);null!=f&&f()}});if(null!=b)for(var D=0;D<b.length;D++){var K=encodeURIComponent(decodeURIComponent(b[D])); -mxUtils.bind(this,function(c,e){if(null!=c&&0<c.length&&null==this.loadedLibraries[c]&&null==this.sidebar.palettes[c]){this.loadedLibraries[c]=!0;d++;var g=mxUtils.bind(this,function(v){u[e]=v;d--;B()}),q=mxUtils.bind(this,function(v){k(c,v);d--;B()}),m=c.substring(0,1);if("L"==m)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var v=decodeURIComponent(c.substring(1));StorageFile.getFileContent(this,v,mxUtils.bind(this,function(y){".scratchpad"==v&&null== -y&&(y=this.emptyLibraryXml);null!=y?g(new StorageLibrary(this,y,v)):q()}),q)}catch(y){q()}}),0);else if("U"==m){var n=decodeURIComponent(c.substring(1));this.isOffline()||this.loadTemplate(n,mxUtils.bind(this,function(v){null!=v&&0<v.length?g(new UrlLibrary(this,v,n)):q()}),function(){q()},null,!0)}else if("R"==m){m=decodeURIComponent(c.substring(1));try{m=JSON.parse(m);var z={id:m[0],title:m[1],downloadUrl:m[2]};this.remoteInvoke("getFileContent",[z.downloadUrl],null,mxUtils.bind(this,function(v){try{g(new RemoteLibrary(this, -v,z))}catch(y){q()}}),function(){q()})}catch(v){q()}}else if("S"==m&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(c.substring(1)),function(v){g(v)},q)}catch(v){q()}else{var C=null;"G"==m?null!=this.drive&&null!=this.drive.user&&(C=this.drive):"H"==m?null!=this.gitHub&&null!=this.gitHub.getUser()&&(C=this.gitHub):"T"==m?null!=this.trello&&this.trello.isAuthorized()&&(C=this.trello):"D"==m?null!=this.dropbox&&null!=this.dropbox.getUser()&&(C=this.dropbox):"W"==m&&null!=this.oneDrive&& -null!=this.oneDrive.getUser()&&(C=this.oneDrive);null!=C?C.getLibrary(decodeURIComponent(c.substring(1)),mxUtils.bind(this,function(v){try{g(v)}catch(y){q()}}),function(v){q()}):q(!0)}}})(K,D)}B()}}; -App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var b=this.getCurrentFile();"1"==urlParams.embed&&("atlas"==uiTheme||"1"==urlParams.atlas?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="1"==urlParams.noLangIcon?"0":"25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"));this.commentsSupported()&&"1"!=urlParams.sketch?null==this.commentButton&& -(this.commentButton=document.createElement("a"),this.commentButton.setAttribute("title",mxResources.get("comments")),this.commentButton.className="geToolbarButton geAdaptiveAsset",this.commentButton.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;float:left;cursor:pointer;width:24px;height:24px;background-size:24px 24px;background-position:center center;background-repeat:no-repeat;background-image:url("+Editor.commentImage+");","atlas"==uiTheme?(this.commentButton.style.marginRight= -"10px",this.commentButton.style.marginTop="-3px"):this.commentButton.style.marginTop="min"==uiTheme?"1px":"1"==urlParams.atlas?"-2px":"-5px",mxEvent.addListener(this.commentButton,"click",mxUtils.bind(this,function(){this.actions.get("comments").funct()})),this.buttonContainer.appendChild(this.commentButton),"atlas"==uiTheme&&(this.commentButton.style.filter="invert(100%)")):null!=this.commentButton&&(this.commentButton.parentNode.removeChild(this.commentButton),this.commentButton=null);"1"==urlParams.embed|| -"draw.io"!=this.getServiceName()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()?null!=urlParams.notif&&this.fetchAndShowNotification(urlParams.notif):(null!=b?null==this.shareButton&&(this.shareButton=document.createElement("div"),this.shareButton.className="geBtn gePrimaryBtn",this.shareButton.style.display="inline-block",this.shareButton.style.backgroundColor="#F2931E",this.shareButton.style.borderColor="#F08705",this.shareButton.style.backgroundImage="none",this.shareButton.style.padding= -"2px 10px 0 10px",this.shareButton.style.marginTop="-10px",this.shareButton.style.height="28px",this.shareButton.style.lineHeight="28px",this.shareButton.style.minWidth="0px",this.shareButton.style.cssFloat="right",this.shareButton.setAttribute("title",mxResources.get("share")),b=document.createElement("img"),b.className="geInverseAdaptiveAsset",b.setAttribute("src",this.shareImage),b.setAttribute("align","absmiddle"),b.style.marginRight="4px",b.style.marginTop="-3px",this.shareButton.appendChild(b), -"atlas"!=uiTheme&&(this.shareButton.style.color="black",b.style.filter="invert(100%)"),mxUtils.write(this.shareButton,mxResources.get("share")),mxEvent.addListener(this.shareButton,"click",mxUtils.bind(this,function(){this.actions.get("share").funct()})),this.buttonContainer.appendChild(this.shareButton)):null!=this.shareButton&&(this.shareButton.parentNode.removeChild(this.shareButton),this.shareButton=null),"1"!=urlParams.extAuth&&this.fetchAndShowNotification("online",this.mode))}}; -App.prototype.fetchAndShowNotification=function(b,f){if(!this.fetchingNotif){b=b||"online";var k=null,d=mxUtils.bind(this,function(u){u=u.filter(function(K){return!K.targets||-1<K.targets.indexOf(b)||null!=f&&-1<K.targets.indexOf(f)});for(var x=b+"NotifReadTS",B=isLocalStorage?parseInt(localStorage.getItem(x)):!0,D=0;D<u.length;D++)u[D].isNew=!B||u[D].timestamp>B;this.showNotification(u,x)});try{isLocalStorage&&(k=JSON.parse(localStorage.getItem(".notifCache")))}catch(u){}null==k||k.ts+864E5<Date.now()? -(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,function(u){200<=u.getStatus()&&299>=u.getStatus()&&(u=JSON.parse(u.getText()),u.sort(function(x,B){return B.timestamp-x.timestamp}),isLocalStorage&&localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:u})),this.fetchingNotif=!1,d(u))}))):d(k.notifs)}}; -App.prototype.showNotification=function(b,f){function k(c){var e=document.querySelector(".geNotification-count");null!=e&&(e.innerHTML=c,e.style.display=0==c?"none":"",e=document.querySelector(".geNotification-bell"),e.style.animation=0==c?"none":"",e.className="geNotification-bell"+(0==c?" geNotification-bellOff":""),document.querySelector(".geBell-rad").style.animation=0==c?"none":"")}var d=b.length;if("min"==uiTheme)for(var u=d=0;u<b.length;u++)b[u].isNew&&d++;if(0==d)null!=this.notificationBtn&& -(this.notificationBtn.style.display="none",this.editor.fireEvent(new mxEventObject("statusChanged")));else{var x=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var c=this.notificationWin.querySelectorAll(".circle.active"),e=0;e<c.length;e++)c[e].className="circle";isLocalStorage&&b[0]&&localStorage.setItem(f,b[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className="geNotification-box";"min"==uiTheme? -(this.notificationBtn.style.width="30px",this.notificationBtn.style.top="4px"):"1"==urlParams.atlas&&(this.notificationBtn.style.top="2px");d=document.createElement("span");d.className="geNotification-count";this.notificationBtn.appendChild(d);d=document.createElement("div");d.className="geNotification-bell";d.style.opacity="min"==uiTheme?"0.5":"";u=document.createElement("span");u.className="geBell-top";d.appendChild(u);u=document.createElement("span");u.className="geBell-middle";d.appendChild(u); -u=document.createElement("span");u.className="geBell-bottom";d.appendChild(u);u=document.createElement("span");u.className="geBell-rad";d.appendChild(u);this.notificationBtn.appendChild(d);this.buttonContainer.insertBefore(this.notificationBtn,this.buttonContainer.firstChild);this.notificationWin=document.createElement("div");this.notificationWin.className="geNotifPanel";this.notificationWin.style.display="none";document.body.appendChild(this.notificationWin);u=document.createElement("div");u.className= -"header";d=document.createElement("span");d.className="title";d.textContent=mxResources.get("notifications");u.appendChild(d);d=document.createElement("span");d.className="closeBtn";d.textContent="x";u.appendChild(d);this.notificationWin.appendChild(u);u=document.createElement("div");u.className="notifications clearfix";var B=document.createElement("div");B.setAttribute("id","geNotifList");B.style.position="relative";u.appendChild(B);this.notificationWin.appendChild(u);mxEvent.addListener(this.notificationBtn, -"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=0;var c=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=c.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=c.right-this.notificationWin.clientWidth+"px";k(0)}else x()}));mxEvent.addListener(d,"click",x)}else this.notificationBtn.style.display="";var D=0,K=document.getElementById("geNotifList"); -if(null!=K){K.innerHTML='<div class="line"></div>';for(u=0;u<b.length;u++)(function(c,e){e.isNew&&D++;var g=document.createElement("div");g.className="notification";c=c.timeSince(new Date(e.timestamp));null==c&&(c=mxResources.get("lessThanAMinute"));g.innerHTML='<div class="circle'+(e.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[c],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(e.content)+"</p>";e.link&&mxEvent.addListener(g,"click",function(){window.open(e.link, -"notifWin")});K.appendChild(g)})(this,b[u]);k(D)}}}; -App.prototype.save=function(b,f){var k=this.getCurrentFile();if(null!=k&&this.spinner.spin(document.body,mxResources.get("saving"))){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var d=mxUtils.bind(this,function(){k.handleFileSuccess(!0);null!=f&&f()}),u=mxUtils.bind(this,function(x){k.isModified()&&Editor.addRetryToError(x,mxUtils.bind(this,function(){this.save(b,f)}));k.handleFileError(x,null==x||"AbortError"!=x.name)});try{b==k.getTitle()?k.save(!0,d, -u):k.saveAs(b,d,u)}catch(x){u(x)}}}; -App.prototype.pickFolder=function(b,f,k,d,u){k=null!=k?k:!0;var x=this.spinner.pause();k&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(B){x();if(B.action==google.picker.Action.PICKED){var D=null;null!=B.docs&&0<B.docs.length&&"folder"==B.docs[0].type&&(D=B.docs[0].id);f(D)}}),u):k&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(B){x();null!=B&&null!=B.value&&0<B.value.length&&(B=OneDriveFile.prototype.getIdOf(B.value[0]), -f(B))}),d):k&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(B){x();f(B)})):k&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(B){x();f(B)})):k&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(B){x();f(B)})):EditorUi.prototype.pickFolder.apply(this,arguments)}; -App.prototype.exportFile=function(b,f,k,d,u,x){u==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(f,d?this.base64ToBlob(b,k):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(B){this.spinner.stop();this.handleError(B)})):u==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(f,b,x,mxUtils.bind(this,function(B){this.spinner.stop()}), -mxUtils.bind(this,function(B){this.spinner.stop();this.handleError(B)}),k,d):u==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(f,d?this.base64ToBlob(b,k):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(B){this.spinner.stop();this.handleError(B)}),!1,x):u==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(f,b,mxUtils.bind(this, -function(){this.spinner.stop()}),mxUtils.bind(this,function(B){this.spinner.stop();this.handleError(B)}),!0,x,d):u==App.MODE_GITLAB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitLab.insertFile(f,b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(B){this.spinner.stop();this.handleError(B)}),!0,x,d):u==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(f,d?this.base64ToBlob(b, -k):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(B){this.spinner.stop();this.handleError(B)}),!1,x):u==App.MODE_BROWSER&&(k=mxUtils.bind(this,function(){localStorage.setItem(f,b)}),null==localStorage.getItem(f)?k():this.confirm(mxResources.get("replaceIt",[f]),k))}; +mxResources.get("browser")+")":b.constructor==LocalLibrary&&(f+=" ("+mxResources.get("device")+")");return f};App.prototype.restoreLibraries=function(){function b(k){for(var e=0;e<k.length;e++)""!=k[e]&&0>mxUtils.indexOf(f,k[e])&&f.push(k[e])}var f=[];b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"));this.loadLibraries(f)}; +App.prototype.loadLibraries=function(b,f){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var k=mxUtils.bind(this,function(c,d){d||mxSettings.removeCustomLibrary(c);delete this.loadedLibraries[c]}),e=0,u=[],v=0<b.length&&"L.scratchpad"==b[0]?1:0,B=mxUtils.bind(this,function(){if(0==e){if(null!=b)for(var c=b.length-1;0<=c;c--)null!=u[c]&&this.loadLibrary(u[c],c<=v);null!=f&&f()}});if(null!=b)for(var E=0;E<b.length;E++){var L=encodeURIComponent(decodeURIComponent(b[E])); +mxUtils.bind(this,function(c,d){if(null!=c&&0<c.length&&null==this.loadedLibraries[c]&&null==this.sidebar.palettes[c]){this.loadedLibraries[c]=!0;e++;var g=mxUtils.bind(this,function(x){u[d]=x;e--;B()}),q=mxUtils.bind(this,function(x){k(c,x);e--;B()}),m=c.substring(0,1);if("L"==m)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var x=decodeURIComponent(c.substring(1));StorageFile.getFileContent(this,x,mxUtils.bind(this,function(y){".scratchpad"==x&&null== +y&&(y=this.emptyLibraryXml);null!=y?g(new StorageLibrary(this,y,x)):q()}),q)}catch(y){q()}}),0);else if("U"==m){var n=decodeURIComponent(c.substring(1));this.isOffline()||this.loadTemplate(n,mxUtils.bind(this,function(x){null!=x&&0<x.length?g(new UrlLibrary(this,x,n)):q()}),function(){q()},null,!0)}else if("R"==m){m=decodeURIComponent(c.substring(1));try{m=JSON.parse(m);var z={id:m[0],title:m[1],downloadUrl:m[2]};this.remoteInvoke("getFileContent",[z.downloadUrl],null,mxUtils.bind(this,function(x){try{g(new RemoteLibrary(this, +x,z))}catch(y){q()}}),function(){q()})}catch(x){q()}}else if("S"==m&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(c.substring(1)),function(x){g(x)},q)}catch(x){q()}else{var C=null;"G"==m?null!=this.drive&&null!=this.drive.user&&(C=this.drive):"H"==m?null!=this.gitHub&&null!=this.gitHub.getUser()&&(C=this.gitHub):"T"==m?null!=this.trello&&this.trello.isAuthorized()&&(C=this.trello):"D"==m?null!=this.dropbox&&null!=this.dropbox.getUser()&&(C=this.dropbox):"W"==m&&null!=this.oneDrive&& +null!=this.oneDrive.getUser()&&(C=this.oneDrive);null!=C?C.getLibrary(decodeURIComponent(c.substring(1)),mxUtils.bind(this,function(x){try{g(x)}catch(y){q()}}),function(x){q()}):q(!0)}}})(L,E)}B()}}; +App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var b=this.getCurrentFile();"1"==urlParams.embed&&(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px");this.commentsSupported()&&"1"!=urlParams.sketch?null==this.commentButton&&(this.commentButton=document.createElement("a"),this.commentButton.setAttribute("title",mxResources.get("comments")),this.commentButton.className="geToolbarButton geAdaptiveAsset",this.commentButton.style.cssText= +"display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;float:left;cursor:pointer;width:24px;height:24px;background-size:24px 24px;background-position:center center;background-repeat:no-repeat;background-image:url("+Editor.commentImage+");","atlas"==uiTheme?(this.commentButton.style.marginRight="10px",this.commentButton.style.marginTop="-3px"):this.commentButton.style.marginTop="min"==uiTheme?"1px":"1"==urlParams.atlas?"-2px":"-5px",mxEvent.addListener(this.commentButton,"click", +mxUtils.bind(this,function(){this.actions.get("comments").funct()})),this.buttonContainer.appendChild(this.commentButton),"atlas"==uiTheme&&(this.commentButton.style.filter="invert(100%)")):null!=this.commentButton&&(this.commentButton.parentNode.removeChild(this.commentButton),this.commentButton=null);"1"==urlParams.embed||"draw.io"!=this.getServiceName()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()?null!=urlParams.notif&&this.fetchAndShowNotification(urlParams.notif):(null!= +b?null==this.shareButton&&(this.shareButton=document.createElement("div"),this.shareButton.className="geBtn gePrimaryBtn",this.shareButton.style.display="inline-block",this.shareButton.style.backgroundColor="#F2931E",this.shareButton.style.borderColor="#F08705",this.shareButton.style.backgroundImage="none",this.shareButton.style.padding="2px 10px 0 10px",this.shareButton.style.marginTop="-10px",this.shareButton.style.height="28px",this.shareButton.style.lineHeight="28px",this.shareButton.style.minWidth= +"0px",this.shareButton.style.cssFloat="right",this.shareButton.setAttribute("title",mxResources.get("share")),b=document.createElement("img"),b.className="geInverseAdaptiveAsset",b.setAttribute("src",this.shareImage),b.setAttribute("align","absmiddle"),b.style.marginRight="4px",b.style.marginTop="-3px",this.shareButton.appendChild(b),"atlas"!=uiTheme&&(this.shareButton.style.color="black",b.style.filter="invert(100%)"),mxUtils.write(this.shareButton,mxResources.get("share")),mxEvent.addListener(this.shareButton, +"click",mxUtils.bind(this,function(){this.actions.get("share").funct()})),this.buttonContainer.appendChild(this.shareButton)):null!=this.shareButton&&(this.shareButton.parentNode.removeChild(this.shareButton),this.shareButton=null),"1"!=urlParams.extAuth&&this.fetchAndShowNotification("online",this.mode))}}; +App.prototype.fetchAndShowNotification=function(b,f){if(!this.fetchingNotif){b=b||"online";var k=null,e=mxUtils.bind(this,function(u){u=u.filter(function(L){return!L.targets||-1<L.targets.indexOf(b)||null!=f&&-1<L.targets.indexOf(f)});for(var v=b+"NotifReadTS",B=isLocalStorage?parseInt(localStorage.getItem(v)):!0,E=0;E<u.length;E++)u[E].isNew=!B||u[E].timestamp>B;this.showNotification(u,v)});try{isLocalStorage&&(k=JSON.parse(localStorage.getItem(".notifCache")))}catch(u){}null==k||k.ts+864E5<Date.now()? +(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,function(u){200<=u.getStatus()&&299>=u.getStatus()&&(u=JSON.parse(u.getText()),u.sort(function(v,B){return B.timestamp-v.timestamp}),isLocalStorage&&localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:u})),this.fetchingNotif=!1,e(u))}))):e(k.notifs)}}; +App.prototype.showNotification=function(b,f){function k(c){var d=document.querySelector(".geNotification-count");null!=d&&(d.innerHTML=c,d.style.display=0==c?"none":"",d=document.querySelector(".geNotification-bell"),d.style.animation=0==c?"none":"",d.className="geNotification-bell"+(0==c?" geNotification-bellOff":""),document.querySelector(".geBell-rad").style.animation=0==c?"none":"")}var e=b.length;if("min"==uiTheme)for(var u=e=0;u<b.length;u++)b[u].isNew&&e++;if(0==e)null!=this.notificationBtn&& +(this.notificationBtn.style.display="none",this.editor.fireEvent(new mxEventObject("statusChanged")));else{var v=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var c=this.notificationWin.querySelectorAll(".circle.active"),d=0;d<c.length;d++)c[d].className="circle";isLocalStorage&&b[0]&&localStorage.setItem(f,b[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className="geNotification-box";"min"==uiTheme? +(this.notificationBtn.style.width="30px",this.notificationBtn.style.top="4px"):"1"==urlParams.atlas&&(this.notificationBtn.style.top="2px");e=document.createElement("span");e.className="geNotification-count";this.notificationBtn.appendChild(e);e=document.createElement("div");e.className="geNotification-bell";e.style.opacity="min"==uiTheme?"0.5":"";u=document.createElement("span");u.className="geBell-top";e.appendChild(u);u=document.createElement("span");u.className="geBell-middle";e.appendChild(u); +u=document.createElement("span");u.className="geBell-bottom";e.appendChild(u);u=document.createElement("span");u.className="geBell-rad";e.appendChild(u);this.notificationBtn.appendChild(e);this.buttonContainer.insertBefore(this.notificationBtn,this.buttonContainer.firstChild);this.notificationWin=document.createElement("div");this.notificationWin.className="geNotifPanel";this.notificationWin.style.display="none";document.body.appendChild(this.notificationWin);u=document.createElement("div");u.className= +"header";e=document.createElement("span");e.className="title";e.textContent=mxResources.get("notifications");u.appendChild(e);e=document.createElement("span");e.className="closeBtn";e.textContent="x";u.appendChild(e);this.notificationWin.appendChild(u);u=document.createElement("div");u.className="notifications clearfix";var B=document.createElement("div");B.setAttribute("id","geNotifList");B.style.position="relative";u.appendChild(B);this.notificationWin.appendChild(u);mxEvent.addListener(this.notificationBtn, +"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=0;var c=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=c.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=c.right-this.notificationWin.clientWidth+"px";k(0)}else v()}));mxEvent.addListener(e,"click",v)}else this.notificationBtn.style.display="";var E=0,L=document.getElementById("geNotifList"); +if(null!=L){L.innerHTML='<div class="line"></div>';for(u=0;u<b.length;u++)(function(c,d){d.isNew&&E++;var g=document.createElement("div");g.className="notification";c=c.timeSince(new Date(d.timestamp));null==c&&(c=mxResources.get("lessThanAMinute"));g.innerHTML='<div class="circle'+(d.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[c],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(d.content)+"</p>";d.link&&mxEvent.addListener(g,"click",function(){window.open(d.link, +"notifWin")});L.appendChild(g)})(this,b[u]);k(E)}}}; +App.prototype.save=function(b,f){var k=this.getCurrentFile();if(null!=k&&this.spinner.spin(document.body,mxResources.get("saving"))){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var e=mxUtils.bind(this,function(){k.handleFileSuccess(!0);null!=f&&f()}),u=mxUtils.bind(this,function(v){k.isModified()&&Editor.addRetryToError(v,mxUtils.bind(this,function(){this.save(b,f)}));k.handleFileError(v,null==v||"AbortError"!=v.name)});try{b==k.getTitle()?k.save(!0,e, +u):k.saveAs(b,e,u)}catch(v){u(v)}}}; +App.prototype.pickFolder=function(b,f,k,e,u){k=null!=k?k:!0;var v=this.spinner.pause();k&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(B){v();if(B.action==google.picker.Action.PICKED){var E=null;null!=B.docs&&0<B.docs.length&&"folder"==B.docs[0].type&&(E=B.docs[0].id);f(E)}}),u):k&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(B){v();null!=B&&null!=B.value&&0<B.value.length&&(B=OneDriveFile.prototype.getIdOf(B.value[0]), +f(B))}),e):k&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(B){v();f(B)})):k&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(B){v();f(B)})):k&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(B){v();f(B)})):EditorUi.prototype.pickFolder.apply(this,arguments)}; +App.prototype.exportFile=function(b,f,k,e,u,v){u==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(f,e?this.base64ToBlob(b,k):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(B){this.spinner.stop();this.handleError(B)})):u==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(f,b,v,mxUtils.bind(this,function(B){this.spinner.stop()}), +mxUtils.bind(this,function(B){this.spinner.stop();this.handleError(B)}),k,e):u==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(f,e?this.base64ToBlob(b,k):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(B){this.spinner.stop();this.handleError(B)}),!1,v):u==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(f,b,mxUtils.bind(this, +function(){this.spinner.stop()}),mxUtils.bind(this,function(B){this.spinner.stop();this.handleError(B)}),!0,v,e):u==App.MODE_GITLAB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitLab.insertFile(f,b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(B){this.spinner.stop();this.handleError(B)}),!0,v,e):u==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(f,e?this.base64ToBlob(b, +k):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(B){this.spinner.stop();this.handleError(B)}),!1,v):u==App.MODE_BROWSER&&(k=mxUtils.bind(this,function(){localStorage.setItem(f,b)}),null==localStorage.getItem(f)?k():this.confirm(mxResources.get("replaceIt",[f]),k))}; App.prototype.descriptorChanged=function(){var b=this.getCurrentFile();if(null!=b){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerText="";var f=null!=b.getTitle()?b.getTitle():this.defaultFilename;mxUtils.write(this.fname,f);this.fname.setAttribute("title",f+" - "+mxResources.get("rename"))}f=this.editor.graph;var k=b.isEditable()&&!b.invalidChecksum;f.isEnabled()&&!k&&f.reset();f.setEnabled(k);null==urlParams.rev&&(this.updateDocumentTitle(),f=b.getHash(),0<f.length? window.location.hash=f:0<window.location.hash.length&&(window.location.hash=""))}this.updateUi();null==this.format||null!=b&&this.fileEditable==b.isEditable()||!this.editor.graph.isSelectionEmpty()||(this.format.refresh(),this.fileEditable=null!=b?b.isEditable():null);this.fireEvent(new mxEventObject("fileDescriptorChanged","file",b))}; -App.prototype.showAuthDialog=function(b,f,k,d){var u=this.spinner.pause();this.showDialog((new AuthDialog(this,b,f,mxUtils.bind(this,function(x){try{null!=k&&k(x,mxUtils.bind(this,function(){this.hideDialog();u()}))}catch(B){this.editor.setStatus(mxUtils.htmlEntities(B.message))}}))).container,300,f?180:140,!0,!0,mxUtils.bind(this,function(x){null!=d&&d(x);x&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))}; -App.prototype.convertFile=function(b,f,k,d,u,x,B,D){var K=f;/\.svg$/i.test(K)||(K=K.substring(0,f.lastIndexOf("."))+d);var c=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(c=!0);if(/\.v(dx|sdx?)$/i.test(f)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var e=new XMLHttpRequest;e.open("GET",b,!0);c||(e.responseType="blob");if(D)for(var g in D)e.setRequestHeader(g,D[g]);e.onload=mxUtils.bind(this,function(){if(200<= -e.status&&299>=e.status){var m=null;c?(m=JSON.parse(e.responseText),m=this.base64ToBlob(m.content,"application/octet-stream")):m=new Blob([e.response],{type:"application/octet-stream"});this.importVisio(m,mxUtils.bind(this,function(n){u(new LocalFile(this,n,K,!0))}),x,f)}else null!=x&&x({message:mxResources.get("errorLoadingFile")})});e.onerror=x;e.send()}else{var q=mxUtils.bind(this,function(m){try{if(/\.pdf$/i.test(f)){var n=Editor.extractGraphModelFromPdf(m);null!=n&&0<n.length&&u(new LocalFile(this, -n,K,!0))}else/\.png$/i.test(f)?(n=this.extractGraphModelFromPng(m),null!=n?u(new LocalFile(this,n,K,!0)):u(new LocalFile(this,m,f,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(m,b)?this.parseFileData(m,mxUtils.bind(this,function(z){4==z.readyState&&(200<=z.status&&299>=z.status?u(new LocalFile(this,z.responseText,K,!0)):null!=x&&x({message:mxResources.get("errorLoadingFile")}))}),f):u(new LocalFile(this,m,K,!0))}catch(z){null!=x&&x(z)}});k=/\.png$/i.test(f)||/\.jpe?g$/i.test(f)|| -/\.pdf$/i.test(f)||null!=k&&"image/"==k.substring(0,6);c?mxUtils.get(b,mxUtils.bind(this,function(m){if(200<=m.getStatus()&&299>=m.getStatus()){if(null!=u){m=JSON.parse(m.getText());var n=m.content;"base64"===m.encoding&&(n=/\.png$/i.test(f)?"data:image/png;base64,"+n:/\.pdf$/i.test(f)?"data:application/pdf;base64,"+n:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(n):atob(n));q(n)}}else null!=x&&x({code:App.ERROR_UNKNOWN})}),function(){null!=x&&x({code:App.ERROR_UNKNOWN})},!1,this.timeout, -function(){null!=x&&x({code:App.ERROR_TIMEOUT,retry:fn})},D):null!=B?B(b,q,x,k):this.editor.loadUrl(b,q,x,k,null,null,null,D)}}; +App.prototype.showAuthDialog=function(b,f,k,e){var u=this.spinner.pause();this.showDialog((new AuthDialog(this,b,f,mxUtils.bind(this,function(v){try{null!=k&&k(v,mxUtils.bind(this,function(){this.hideDialog();u()}))}catch(B){this.editor.setStatus(mxUtils.htmlEntities(B.message))}}))).container,300,f?180:140,!0,!0,mxUtils.bind(this,function(v){null!=e&&e(v);v&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))}; +App.prototype.convertFile=function(b,f,k,e,u,v,B,E){var L=f;/\.svg$/i.test(L)||(L=L.substring(0,f.lastIndexOf("."))+e);var c=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(c=!0);if(/\.v(dx|sdx?)$/i.test(f)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var d=new XMLHttpRequest;d.open("GET",b,!0);c||(d.responseType="blob");if(E)for(var g in E)d.setRequestHeader(g,E[g]);d.onload=mxUtils.bind(this,function(){if(200<= +d.status&&299>=d.status){var m=null;c?(m=JSON.parse(d.responseText),m=this.base64ToBlob(m.content,"application/octet-stream")):m=new Blob([d.response],{type:"application/octet-stream"});this.importVisio(m,mxUtils.bind(this,function(n){u(new LocalFile(this,n,L,!0))}),v,f)}else null!=v&&v({message:mxResources.get("errorLoadingFile")})});d.onerror=v;d.send()}else{var q=mxUtils.bind(this,function(m){try{if(/\.pdf$/i.test(f)){var n=Editor.extractGraphModelFromPdf(m);null!=n&&0<n.length&&u(new LocalFile(this, +n,L,!0))}else/\.png$/i.test(f)?(n=this.extractGraphModelFromPng(m),null!=n?u(new LocalFile(this,n,L,!0)):u(new LocalFile(this,m,f,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(m,b)?this.parseFileData(m,mxUtils.bind(this,function(z){4==z.readyState&&(200<=z.status&&299>=z.status?u(new LocalFile(this,z.responseText,L,!0)):null!=v&&v({message:mxResources.get("errorLoadingFile")}))}),f):u(new LocalFile(this,m,L,!0))}catch(z){null!=v&&v(z)}});k=/\.png$/i.test(f)||/\.jpe?g$/i.test(f)|| +/\.pdf$/i.test(f)||null!=k&&"image/"==k.substring(0,6);c?mxUtils.get(b,mxUtils.bind(this,function(m){if(200<=m.getStatus()&&299>=m.getStatus()){if(null!=u){m=JSON.parse(m.getText());var n=m.content;"base64"===m.encoding&&(n=/\.png$/i.test(f)?"data:image/png;base64,"+n:/\.pdf$/i.test(f)?"data:application/pdf;base64,"+n:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(n):atob(n));q(n)}}else null!=v&&v({code:App.ERROR_UNKNOWN})}),function(){null!=v&&v({code:App.ERROR_UNKNOWN})},!1,this.timeout, +function(){null!=v&&v({code:App.ERROR_TIMEOUT,retry:fn})},E):null!=B?B(b,q,v,k):this.editor.loadUrl(b,q,v,k,null,null,null,E)}}; App.prototype.updateHeader=function(){if(null!=this.menubar){var b="url("+Editor.logoImage+")";this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="32px";this.appIcon.style.height=this.menubarHeight-28+"px";this.appIcon.style.margin="14px 0px 8px 16px";this.appIcon.style.opacity="0.85";this.appIcon.style.borderRadius="3px";this.appIcon.style.backgroundPosition="center center";this.appIcon.style.backgroundSize= -"100% 100%";this.appIcon.style.backgroundRepeat="no-repeat";this.appIcon.style.backgroundImage=b;mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(d){this.appIconClicked(d)}));var f=mxUtils.bind(this,function(){this.appIcon.style.backgroundColor=Editor.isDarkMode()?"":"#f08705"});this.addListener("darkModeChanged",f);f();mxUtils.setPrefixedStyle(this.appIcon.style,"transition","all 125ms linear");mxEvent.addListener(this.appIcon,"mouseover", -mxUtils.bind(this,function(){var d=this.getCurrentFile();null!=d&&(d=d.getMode(),d==App.MODE_GOOGLE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/google-drive-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):d==App.MODE_DROPBOX?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):d==App.MODE_ONEDRIVE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/onedrive-logo-white.svg)",this.appIcon.style.backgroundSize= -"70% 70%"):d==App.MODE_GITHUB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/github-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):d==App.MODE_GITLAB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/gitlab-logo-white.svg)",this.appIcon.style.backgroundSize="100% 100%"):d==App.MODE_TRELLO&&(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/trello-logo-white-orange.svg)",this.appIcon.style.backgroundSize="70% 70%"))}));mxEvent.addListener(this.appIcon,"mouseout", +"100% 100%";this.appIcon.style.backgroundRepeat="no-repeat";this.appIcon.style.backgroundImage=b;mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(u){this.appIconClicked(u)}));var f=mxUtils.bind(this,function(){this.appIcon.style.backgroundColor=Editor.isDarkMode()?"":"#f08705"});this.addListener("darkModeChanged",f);f();mxUtils.setPrefixedStyle(this.appIcon.style,"transition","all 125ms linear");mxEvent.addListener(this.appIcon,"mouseover", +mxUtils.bind(this,function(){var u=this.getCurrentFile();null!=u&&(u=u.getMode(),u==App.MODE_GOOGLE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/google-drive-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):u==App.MODE_DROPBOX?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):u==App.MODE_ONEDRIVE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/onedrive-logo-white.svg)",this.appIcon.style.backgroundSize= +"70% 70%"):u==App.MODE_GITHUB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/github-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):u==App.MODE_GITLAB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/gitlab-logo-white.svg)",this.appIcon.style.backgroundSize="100% 100%"):u==App.MODE_TRELLO&&(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/trello-logo-white-orange.svg)",this.appIcon.style.backgroundSize="70% 70%"))}));mxEvent.addListener(this.appIcon,"mouseout", mxUtils.bind(this,function(){this.appIcon.style.backgroundImage=b;this.appIcon.style.backgroundSize="90% 90%"}));"1"!=urlParams.embed&&this.menubarContainer.appendChild(this.appIcon);this.fnameWrapper=document.createElement("div");this.fnameWrapper.style.position="absolute";this.fnameWrapper.style.right="120px";this.fnameWrapper.style.left="60px";this.fnameWrapper.style.top="9px";this.fnameWrapper.style.height="26px";this.fnameWrapper.style.display="none";this.fnameWrapper.style.overflow="hidden"; -this.fnameWrapper.style.textOverflow="ellipsis";this.fname=document.createElement("a");this.fname.setAttribute("title",mxResources.get("rename"));this.fname.className="geItem";this.fname.style.padding="2px 8px 2px 8px";this.fname.style.display="inline";this.fname.style.fontSize="18px";this.fname.style.whiteSpace="nowrap";mxEvent.addListener(this.fname,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(d){d.preventDefault()}));mxEvent.addListener(this.fname,"click",mxUtils.bind(this, -function(d){var u=this.getCurrentFile();null!=u&&u.isRenamable()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),this.actions.get("rename").funct());mxEvent.consume(d)}));this.fnameWrapper.appendChild(this.fname);"1"!=urlParams.embed&&(this.menubarContainer.appendChild(this.fnameWrapper),this.menubar.container.style.position="absolute",this.menubar.container.style.paddingLeft="59px",this.toolbar.container.style.paddingLeft="16px",this.menubar.container.style.boxSizing="border-box", -this.menubar.container.style.top="34px");this.toggleFormatElement=document.createElement("a");this.toggleFormatElement.setAttribute("title",mxResources.get("formatPanel")+" ("+Editor.ctrlKey+"+Shift+P)");this.toggleFormatElement.style.position="absolute";this.toggleFormatElement.style.display="inline-block";this.toggleFormatElement.style.top="atlas"==uiTheme?"8px":"6px";this.toggleFormatElement.style.right="atlas"!=uiTheme&&"1"!=urlParams.embed?"30px":"10px";this.toggleFormatElement.style.padding= -"2px";this.toggleFormatElement.style.fontSize="14px";this.toggleFormatElement.className="atlas"!=uiTheme?"geButton geAdaptiveAsset":"";this.toggleFormatElement.style.width="16px";this.toggleFormatElement.style.height="16px";this.toggleFormatElement.style.backgroundPosition="50% 50%";this.toggleFormatElement.style.backgroundRepeat="no-repeat";this.toolbarContainer.appendChild(this.toggleFormatElement);mxEvent.addListener(this.toggleFormatElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this, -function(d){d.preventDefault()}));mxEvent.addListener(this.toggleFormatElement,"click",mxUtils.bind(this,function(d){EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"formatPanel"});this.actions.get("formatPanel").funct();mxEvent.consume(d)}));f=mxUtils.bind(this,function(){this.toggleFormatElement.style.backgroundImage=0<this.formatWidth?"url('"+this.formatShowImage+"')":"url('"+this.formatHideImage+"')"});this.addListener("formatWidthChanged",f);f();this.fullscreenElement=document.createElement("a"); -this.fullscreenElement.setAttribute("title",mxResources.get("fullscreen"));this.fullscreenElement.style.position="absolute";this.fullscreenElement.style.display="inline-block";this.fullscreenElement.style.top="atlas"==uiTheme?"8px":"6px";this.fullscreenElement.style.right="atlas"!=uiTheme&&"1"!=urlParams.embed?"50px":"30px";this.fullscreenElement.style.padding="2px";this.fullscreenElement.style.fontSize="14px";this.fullscreenElement.className="atlas"!=uiTheme?"geButton geAdaptiveAsset":"";this.fullscreenElement.style.width= -"16px";this.fullscreenElement.style.height="16px";this.fullscreenElement.style.backgroundPosition="50% 50%";this.fullscreenElement.style.backgroundSize="16px 16px";this.fullscreenElement.style.backgroundRepeat="no-repeat";this.fullscreenElement.style.backgroundImage="url('"+Editor.fullscreenImage+"')";this.toolbarContainer.appendChild(this.fullscreenElement);mxEvent.addListener(this.fullscreenElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(d){d.preventDefault()})); -"atlas"!=uiTheme&&(this.darkModeElement=document.createElement("a"),this.darkModeElement.setAttribute("title",mxResources.get("theme")),this.darkModeElement.style.position="absolute",this.darkModeElement.style.display="inline-block",this.darkModeElement.style.top="atlas"==uiTheme?"8px":"6px",this.darkModeElement.style.right="atlas"!=uiTheme&&"1"!=urlParams.embed?"70px":"50px",this.darkModeElement.style.padding="2px",this.darkModeElement.style.fontSize="14px",this.darkModeElement.className="atlas"!= -uiTheme?"geButton geAdaptiveAsset":"",this.darkModeElement.style.width="16px",this.darkModeElement.style.height="16px",this.darkModeElement.style.backgroundPosition="50% 50%",this.darkModeElement.style.backgroundSize="16px 16px",this.darkModeElement.style.backgroundRepeat="no-repeat",this.toolbarContainer.appendChild(this.darkModeElement),f=mxUtils.bind(this,function(){this.darkModeElement.style.backgroundImage="url('"+(Editor.isDarkMode()?Editor.lightModeImage:Editor.darkModeImage)+"')"}),this.addListener("darkModeChanged", -f),f(),mxEvent.addListener(this.darkModeElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(d){this.actions.get("toggleDarkMode").funct();d.preventDefault()})));"atlas"==uiTheme&&(mxUtils.setOpacity(this.toggleFormatElement,70),mxUtils.setOpacity(this.fullscreenElement,70));var k=this.hsplitPosition;mxEvent.addListener(this.fullscreenElement,"click",mxUtils.bind(this,function(d){var u=this.fullscreenMode;EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"fullscreen", -currentstate:u});"atlas"!=uiTheme&&"1"!=urlParams.embed&&this.toggleCompactMode(u);u||(k=this.hsplitPosition);this.hsplitPosition=u?k:0;this.toggleFormatPanel(u);this.fullscreenMode=!u;mxEvent.consume(d)}));"1"!=urlParams.embed&&(this.toggleElement=document.createElement("a"),this.toggleElement.setAttribute("title",mxResources.get("collapseExpand")),this.toggleElement.className="geButton geAdaptiveAsset",this.toggleElement.style.position="absolute",this.toggleElement.style.display="inline-block", -this.toggleElement.style.width="16px",this.toggleElement.style.height="16px",this.toggleElement.style.color="#666",this.toggleElement.style.top="atlas"==uiTheme?"8px":"6px",this.toggleElement.style.right="10px",this.toggleElement.style.padding="2px",this.toggleElement.style.fontSize="14px",this.toggleElement.style.textDecoration="none",this.toggleElement.style.backgroundImage="url('"+this.chevronUpImage+"')",this.toggleElement.style.backgroundPosition="50% 50%",this.toggleElement.style.backgroundRepeat= -"no-repeat",mxEvent.addListener(this.toggleElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(d){d.preventDefault()})),mxEvent.addListener(this.toggleElement,"click",mxUtils.bind(this,function(d){EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"toggleUI"});this.toggleCompactMode();mxEvent.consume(d)})),"atlas"!=uiTheme&&this.toolbarContainer.appendChild(this.toggleElement),!mxClient.IS_FF&&740>=screen.height&&"undefined"!==typeof this.toggleElement.click&&window.setTimeout(mxUtils.bind(this, +this.fnameWrapper.style.textOverflow="ellipsis";this.fname=document.createElement("a");this.fname.setAttribute("title",mxResources.get("rename"));this.fname.className="geItem";this.fname.style.padding="2px 8px 2px 8px";this.fname.style.display="inline";this.fname.style.fontSize="18px";this.fname.style.whiteSpace="nowrap";mxEvent.addListener(this.fname,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(u){u.preventDefault()}));mxEvent.addListener(this.fname,"click",mxUtils.bind(this, +function(u){var v=this.getCurrentFile();null!=v&&v.isRenamable()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),this.actions.get("rename").funct());mxEvent.consume(u)}));this.fnameWrapper.appendChild(this.fname);"1"!=urlParams.embed&&(this.menubarContainer.appendChild(this.fnameWrapper),this.menubar.container.style.position="absolute",this.menubar.container.style.paddingLeft="59px",this.toolbar.container.style.paddingLeft="16px",this.menubar.container.style.boxSizing="border-box", +this.menubar.container.style.top="34px");f="atlas"!=uiTheme&&"1"!=urlParams.embed?30:10;this.toggleFormatElement=document.createElement("a");this.toggleFormatElement.setAttribute("title",mxResources.get("formatPanel")+" ("+Editor.ctrlKey+"+Shift+P)");this.toggleFormatElement.style.position="absolute";this.toggleFormatElement.style.display="inline-block";this.toggleFormatElement.style.top="atlas"==uiTheme?"8px":"6px";this.toggleFormatElement.style.right=f+"px";this.toggleFormatElement.style.padding= +"2px";this.toggleFormatElement.style.fontSize="14px";this.toggleFormatElement.className="atlas"!=uiTheme?"geButton geAdaptiveAsset":"";this.toggleFormatElement.style.width="16px";this.toggleFormatElement.style.height="16px";this.toggleFormatElement.style.backgroundPosition="50% 50%";this.toggleFormatElement.style.backgroundSize="16px 16px";this.toggleFormatElement.style.backgroundRepeat="no-repeat";this.toolbarContainer.appendChild(this.toggleFormatElement);f+=20;mxEvent.addListener(this.toggleFormatElement, +mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(u){u.preventDefault()}));mxEvent.addListener(this.toggleFormatElement,"click",mxUtils.bind(this,function(u){EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"formatPanel"});this.actions.get("formatPanel").funct();mxEvent.consume(u)}));var k=mxUtils.bind(this,function(){this.toggleFormatElement.style.backgroundImage=0<this.formatWidth?"url('"+this.formatShowImage+"')":"url('"+this.formatHideImage+"')"});this.addListener("formatWidthChanged", +k);k();this.fullscreenElement=this.toggleFormatElement.cloneNode(!0);this.fullscreenElement.setAttribute("title",mxResources.get("fullscreen"));this.fullscreenElement.style.backgroundImage="url('"+Editor.fullscreenImage+"')";this.fullscreenElement.style.right=f+"px";this.toolbarContainer.appendChild(this.fullscreenElement);f+=20;mxEvent.addListener(this.fullscreenElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(u){u.preventDefault()}));mxEvent.addListener(this.fullscreenElement, +"click",mxUtils.bind(this,function(u){var v=this.fullscreenMode;EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"fullscreen",currentstate:v});"atlas"!=uiTheme&&"1"!=urlParams.embed&&this.toggleCompactMode(v);v||(e=this.hsplitPosition);this.hsplitPosition=v?e:0;this.toggleFormatPanel(v);this.fullscreenMode=!v;mxEvent.consume(u)}));"1"!=urlParams["live-ui"]&&"atlas"!=uiTheme&&(this.darkModeElement=this.toggleFormatElement.cloneNode(!0),this.darkModeElement.setAttribute("title",mxResources.get("theme")), +this.darkModeElement.style.right=f+"px",this.toolbarContainer.appendChild(this.darkModeElement),f+=20,f=mxUtils.bind(this,function(){this.darkModeElement.style.backgroundImage="url('"+(Editor.isDarkMode()||"atlas"==uiTheme?Editor.lightModeImage:Editor.darkModeImage)+"')"}),this.addListener("darkModeChanged",f),f(),mxEvent.addListener(this.darkModeElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(u){u.preventDefault()})),mxEvent.addListener(this.darkModeElement,"click", +mxUtils.bind(this,function(u){this.actions.get("toggleDarkMode").funct();mxEvent.consume(u)})));"atlas"==uiTheme&&(mxUtils.setOpacity(this.toggleFormatElement,70),mxUtils.setOpacity(this.fullscreenElement,70));var e=this.hsplitPosition;"1"!=urlParams.embed&&(this.toggleElement=document.createElement("a"),this.toggleElement.setAttribute("title",mxResources.get("collapseExpand")),this.toggleElement.className="geButton geAdaptiveAsset",this.toggleElement.style.position="absolute",this.toggleElement.style.display= +"inline-block",this.toggleElement.style.width="16px",this.toggleElement.style.height="16px",this.toggleElement.style.color="#666",this.toggleElement.style.top="atlas"==uiTheme?"8px":"6px",this.toggleElement.style.right="10px",this.toggleElement.style.padding="2px",this.toggleElement.style.fontSize="14px",this.toggleElement.style.textDecoration="none",this.toggleElement.style.backgroundImage="url('"+this.chevronUpImage+"')",this.toggleElement.style.backgroundPosition="50% 50%",this.toggleElement.style.backgroundRepeat= +"no-repeat",mxEvent.addListener(this.toggleElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(u){u.preventDefault()})),mxEvent.addListener(this.toggleElement,"click",mxUtils.bind(this,function(u){EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"toggleUI"});this.toggleCompactMode();mxEvent.consume(u)})),"atlas"!=uiTheme&&this.toolbarContainer.appendChild(this.toggleElement),!mxClient.IS_FF&&740>=screen.height&&"undefined"!==typeof this.toggleElement.click&&window.setTimeout(mxUtils.bind(this, function(){this.toggleElement.click()}),0))}}; App.prototype.toggleCompactMode=function(b){(b=null!=b?b:this.compactMode)?(this.menubar.container.style.position="absolute",this.menubar.container.style.paddingLeft="59px",this.menubar.container.style.paddingTop="",this.menubar.container.style.paddingBottom="",this.menubar.container.style.top="34px",this.toolbar.container.style.paddingLeft="16px",this.buttonContainer.style.visibility="visible",this.appIcon.style.display="block",this.fnameWrapper.style.display="block",this.fnameWrapper.style.visibility= "visible",this.menubarHeight=App.prototype.menubarHeight,this.refresh(),this.toggleElement.style.backgroundImage="url('"+this.chevronUpImage+"')"):(this.menubar.container.style.position="relative",this.menubar.container.style.paddingLeft="4px",this.menubar.container.style.paddingTop="0px",this.menubar.container.style.paddingBottom="0px",this.menubar.container.style.top="0px",this.toolbar.container.style.paddingLeft="8px",this.buttonContainer.style.visibility="hidden",this.appIcon.style.display="none", @@ -12233,441 +12238,441 @@ this.fnameWrapper.style.display="none",this.fnameWrapper.style.visibility="hidde App.prototype.updateUserElement=function(){if(null!=this.drive&&null!=this.drive.getUser()||null!=this.oneDrive&&null!=this.oneDrive.getUser()||null!=this.dropbox&&null!=this.dropbox.getUser()||null!=this.gitHub&&null!=this.gitHub.getUser()||null!=this.gitLab&&null!=this.gitLab.getUser()||null!=this.trello&&this.trello.isAuthorized()){null==this.userElement&&(this.userElement=document.createElement("a"),this.userElement.className="geItem",this.userElement.style.position="absolute",this.userElement.style.fontSize= "8pt",this.userElement.style.top="atlas"==uiTheme?"8px":"2px",this.userElement.style.right="30px",this.userElement.style.margin="4px",this.userElement.style.padding="2px",this.userElement.style.paddingRight="16px",this.userElement.style.verticalAlign="middle",this.userElement.style.backgroundImage="url("+IMAGE_PATH+"/expanded.gif)",this.userElement.style.backgroundPosition="100% 60%",this.userElement.style.backgroundRepeat="no-repeat",this.menubarContainer.appendChild(this.userElement),mxEvent.addListener(this.userElement, mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(f){f.preventDefault()})),mxEvent.addListener(this.userElement,"click",mxUtils.bind(this,function(f){if(null==this.userPanel){var k=document.createElement("div");k.className="geDialog";k.style.position="absolute";k.style.top=this.userElement.clientTop+this.userElement.clientHeight+6+"px";k.style.zIndex=5;k.style.right="36px";k.style.padding="0px";k.style.cursor="default";k.style.minWidth="300px";this.userPanel=k}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel); -else{var d=!1;this.userPanel.innerText="";var u=document.createElement("img");u.setAttribute("src",Dialog.prototype.closeImage);u.setAttribute("title",mxResources.get("close"));u.className="geDialogClose";u.style.top="8px";u.style.right="8px";mxEvent.addListener(u,"click",mxUtils.bind(this,function(){null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)}));this.userPanel.appendChild(u);if(null!=this.drive){var x=this.drive.getUsersList();if(0<x.length){var B=mxUtils.bind(this, -function(K,c){var e=this.getCurrentFile();null!=e&&e.constructor==DriveFile?(this.spinner.spin(document.body,c),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();K()}),2E3)):K()});k=mxUtils.bind(this,function(K){var c=document.createElement("tr");c.setAttribute("title","User ID: "+K.id);var e=document.createElement("td");e.setAttribute("valig","middle");e.style.height="59px";e.style.width="66px";var g=document.createElement("img");g.setAttribute("width","50"); -g.setAttribute("height","50");g.setAttribute("border","0");g.setAttribute("src",null!=K.pictureUrl?K.pictureUrl:this.defaultUserPicture);g.style.borderRadius="50%";g.style.margin="4px 8px 0 8px";e.appendChild(g);c.appendChild(e);e=document.createElement("td");e.setAttribute("valign","middle");e.style.whiteSpace="nowrap";e.style.paddingTop="4px";e.style.maxWidth="0";e.style.overflow="hidden";e.style.textOverflow="ellipsis";mxUtils.write(e,K.displayName+(K.isCurrent&&1<x.length?" ("+mxResources.get("default")+ -")":""));null!=K.email&&(mxUtils.br(e),g=document.createElement("small"),g.style.color="gray",mxUtils.write(g,K.email),e.appendChild(g));g=document.createElement("div");g.style.marginTop="4px";var q=document.createElement("i");mxUtils.write(q,mxResources.get("googleDrive"));g.appendChild(q);e.appendChild(g);c.appendChild(e);K.isCurrent||(c.style.cursor="pointer",c.style.opacity="0.3",mxEvent.addListener(c,"click",mxUtils.bind(this,function(m){B(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(K); -this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(n){this.handleError(n)}),!0)}),mxResources.get("closingFile")+"...");mxEvent.consume(m)})));return c});d=!0;u=document.createElement("table");u.style.borderSpacing="0";u.style.fontSize="10pt";u.style.width="100%";u.style.padding="10px";for(var D=0;D<x.length;D++)u.appendChild(k(x[D]));this.userPanel.appendChild(u);k=document.createElement("div");k.style.textAlign= +else{var e=!1;this.userPanel.innerText="";var u=document.createElement("img");u.setAttribute("src",Dialog.prototype.closeImage);u.setAttribute("title",mxResources.get("close"));u.className="geDialogClose";u.style.top="8px";u.style.right="8px";mxEvent.addListener(u,"click",mxUtils.bind(this,function(){null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)}));this.userPanel.appendChild(u);if(null!=this.drive){var v=this.drive.getUsersList();if(0<v.length){var B=mxUtils.bind(this, +function(L,c){var d=this.getCurrentFile();null!=d&&d.constructor==DriveFile?(this.spinner.spin(document.body,c),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();L()}),2E3)):L()});k=mxUtils.bind(this,function(L){var c=document.createElement("tr");c.setAttribute("title","User ID: "+L.id);var d=document.createElement("td");d.setAttribute("valig","middle");d.style.height="59px";d.style.width="66px";var g=document.createElement("img");g.setAttribute("width","50"); +g.setAttribute("height","50");g.setAttribute("border","0");g.setAttribute("src",null!=L.pictureUrl?L.pictureUrl:this.defaultUserPicture);g.style.borderRadius="50%";g.style.margin="4px 8px 0 8px";d.appendChild(g);c.appendChild(d);d=document.createElement("td");d.setAttribute("valign","middle");d.style.whiteSpace="nowrap";d.style.paddingTop="4px";d.style.maxWidth="0";d.style.overflow="hidden";d.style.textOverflow="ellipsis";mxUtils.write(d,L.displayName+(L.isCurrent&&1<v.length?" ("+mxResources.get("default")+ +")":""));null!=L.email&&(mxUtils.br(d),g=document.createElement("small"),g.style.color="gray",mxUtils.write(g,L.email),d.appendChild(g));g=document.createElement("div");g.style.marginTop="4px";var q=document.createElement("i");mxUtils.write(q,mxResources.get("googleDrive"));g.appendChild(q);d.appendChild(g);c.appendChild(d);L.isCurrent||(c.style.cursor="pointer",c.style.opacity="0.3",mxEvent.addListener(c,"click",mxUtils.bind(this,function(m){B(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(L); +this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(n){this.handleError(n)}),!0)}),mxResources.get("closingFile")+"...");mxEvent.consume(m)})));return c});e=!0;u=document.createElement("table");u.style.borderSpacing="0";u.style.fontSize="10pt";u.style.width="100%";u.style.padding="10px";for(var E=0;E<v.length;E++)u.appendChild(k(v[E]));this.userPanel.appendChild(u);k=document.createElement("div");k.style.textAlign= "left";k.style.padding="10px";k.style.whiteSpace="nowrap";k.style.borderTop="1px solid rgb(224, 224, 224)";u=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){B(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxResources.get("signOut"))}))}));u.className="geBtn";u.style.float="right";k.appendChild(u);u=mxUtils.button(mxResources.get("addAccount"), -mxUtils.bind(this,function(){var K=this.drive.createAuthWin();K.blur();window.focus();B(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(c){this.handleError(c)}),!0,K)}),mxResources.get("closingFile")+"...")}));u.className="geBtn";u.style.margin="0px";k.appendChild(u);this.userPanel.appendChild(k)}}u=mxUtils.bind(this,function(K,c,e,g){if(null!=K){d&&this.userPanel.appendChild(document.createElement("hr")); -d=!0;var q=document.createElement("table");q.style.borderSpacing="0";q.style.fontSize="10pt";q.style.width="100%";q.style.padding="10px";var m=document.createElement("tbody"),n=document.createElement("tr"),z=document.createElement("td");z.setAttribute("valig","top");z.style.width="40px";if(null!=c){var C=document.createElement("img");C.setAttribute("width","40");C.setAttribute("height","40");C.setAttribute("border","0");C.setAttribute("src",c);C.style.marginRight="6px";z.appendChild(C)}n.appendChild(z); -z=document.createElement("td");z.setAttribute("valign","middle");z.style.whiteSpace="nowrap";z.style.maxWidth="0";z.style.overflow="hidden";z.style.textOverflow="ellipsis";mxUtils.write(z,K.displayName);null!=K.email&&(mxUtils.br(z),c=document.createElement("small"),c.style.color="gray",mxUtils.write(c,K.email),z.appendChild(c));null!=g&&(K=document.createElement("div"),K.style.marginTop="4px",c=document.createElement("i"),mxUtils.write(c,g),K.appendChild(c),z.appendChild(K));n.appendChild(z);m.appendChild(n); -q.appendChild(m);this.userPanel.appendChild(q);K=document.createElement("div");K.style.textAlign="center";K.style.padding="10px";K.style.whiteSpace="nowrap";null!=e&&(e=mxUtils.button(mxResources.get("signOut"),e),e.className="geBtn",K.appendChild(e));this.userPanel.appendChild(K)}});null!=this.dropbox&&u(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var K=this.getCurrentFile();if(null!=K&&K.constructor==DropboxFile){var c=mxUtils.bind(this,function(){this.dropbox.logout(); -window.location.hash=""});K.isModified()?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&u(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var K=this.getCurrentFile();if(null!=K&&K.constructor==OneDriveFile){var c=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash= -""});K.isModified()?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&u(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var K=this.getCurrentFile();if(null!=K&&K.constructor==GitHubFile){var c=mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});K.isModified()?this.confirm(mxResources.get("allChangesLost"), -null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&u(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,function(){var K=this.getCurrentFile();if(null!=K&&K.constructor==GitLabFile){var c=mxUtils.bind(this,function(){this.gitLab.logout();window.location.hash=""});K.isModified()?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")): -c()}else this.gitLab.logout()}),mxResources.get("gitlab"));null!=this.trello&&u(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var K=this.getCurrentFile();if(null!=K&&K.constructor==TrelloFile){var c=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=""});K.isModified()?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}else this.trello.logout()}),mxResources.get("trello"));"min"== -uiTheme&&(u=this.getCurrentFile(),null!=u&&u.isRealtimeEnabled()&&u.isRealtimeSupported()&&(k=k.cloneNode(!1),k.style.textAlign="center",k.style.padding="10px",k.style.fontSize="9pt",D=u.getRealtimeError(),1!=u.getRealtimeState()&&(mxUtils.write(k,mxResources.get("realtimeCollaboration")+": "+(null!=D&&null!=D.message?D.message:mxResources.get("disconnected"))),this.userPanel.appendChild(k))));document.body.appendChild(this.userPanel)}mxEvent.consume(f)})),mxEvent.addListener(document.body,"click", +mxUtils.bind(this,function(){var L=this.drive.createAuthWin();L.blur();window.focus();B(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(c){this.handleError(c)}),!0,L)}),mxResources.get("closingFile")+"...")}));u.className="geBtn";u.style.margin="0px";k.appendChild(u);this.userPanel.appendChild(k)}}u=mxUtils.bind(this,function(L,c,d,g){if(null!=L){e&&this.userPanel.appendChild(document.createElement("hr")); +e=!0;var q=document.createElement("table");q.style.borderSpacing="0";q.style.fontSize="10pt";q.style.width="100%";q.style.padding="10px";var m=document.createElement("tbody"),n=document.createElement("tr"),z=document.createElement("td");z.setAttribute("valig","top");z.style.width="40px";if(null!=c){var C=document.createElement("img");C.setAttribute("width","40");C.setAttribute("height","40");C.setAttribute("border","0");C.setAttribute("src",c);C.style.marginRight="6px";z.appendChild(C)}n.appendChild(z); +z=document.createElement("td");z.setAttribute("valign","middle");z.style.whiteSpace="nowrap";z.style.maxWidth="0";z.style.overflow="hidden";z.style.textOverflow="ellipsis";mxUtils.write(z,L.displayName);null!=L.email&&(mxUtils.br(z),c=document.createElement("small"),c.style.color="gray",mxUtils.write(c,L.email),z.appendChild(c));null!=g&&(L=document.createElement("div"),L.style.marginTop="4px",c=document.createElement("i"),mxUtils.write(c,g),L.appendChild(c),z.appendChild(L));n.appendChild(z);m.appendChild(n); +q.appendChild(m);this.userPanel.appendChild(q);L=document.createElement("div");L.style.textAlign="center";L.style.padding="10px";L.style.whiteSpace="nowrap";null!=d&&(d=mxUtils.button(mxResources.get("signOut"),d),d.className="geBtn",L.appendChild(d));this.userPanel.appendChild(L)}});null!=this.dropbox&&u(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var L=this.getCurrentFile();if(null!=L&&L.constructor==DropboxFile){var c=mxUtils.bind(this,function(){this.dropbox.logout(); +window.location.hash=""});L.isModified()?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&u(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var L=this.getCurrentFile();if(null!=L&&L.constructor==OneDriveFile){var c=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash= +""});L.isModified()?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&u(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var L=this.getCurrentFile();if(null!=L&&L.constructor==GitHubFile){var c=mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});L.isModified()?this.confirm(mxResources.get("allChangesLost"), +null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&u(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,function(){var L=this.getCurrentFile();if(null!=L&&L.constructor==GitLabFile){var c=mxUtils.bind(this,function(){this.gitLab.logout();window.location.hash=""});L.isModified()?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")): +c()}else this.gitLab.logout()}),mxResources.get("gitlab"));null!=this.trello&&u(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var L=this.getCurrentFile();if(null!=L&&L.constructor==TrelloFile){var c=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=""});L.isModified()?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}else this.trello.logout()}),mxResources.get("trello"));"min"== +uiTheme&&(u=this.getCurrentFile(),null!=u&&u.isRealtimeEnabled()&&u.isRealtimeSupported()&&(k=k.cloneNode(!1),k.style.textAlign="center",k.style.padding="10px",k.style.fontSize="9pt",E=u.getRealtimeError(),1!=u.getRealtimeState()&&(mxUtils.write(k,mxResources.get("realtimeCollaboration")+": "+(null!=E&&null!=E.message?E.message:mxResources.get("disconnected"))),this.userPanel.appendChild(k))));document.body.appendChild(this.userPanel)}mxEvent.consume(f)})),mxEvent.addListener(document.body,"click", mxUtils.bind(this,function(f){mxEvent.isConsumed(f)||null==this.userPanel||null==this.userPanel.parentNode||this.userPanel.parentNode.removeChild(this.userPanel)})));var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()?b=this.gitHub.getUser():null!=this.gitLab&&null!=this.gitLab.getUser()&& (b=this.gitLab.getUser());null!=b?(this.userElement.innerText="",560<screen.width&&(mxUtils.write(this.userElement,b.displayName),this.userElement.style.display="block")):this.userElement.style.display="none"}else null!=this.userElement&&(this.userElement.parentNode.removeChild(this.userElement),this.userElement=null)}; App.prototype.getCurrentUser=function(){var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(b=this.gitHub.getUser());return b};var editorResetGraph=Editor.prototype.resetGraph; -Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);null==this.graph.defaultPageFormat&&(this.graph.pageFormat=mxSettings.getPageFormat())};(function(){var b=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-(EditorUi.isElectronApp?50:10)+"px";b.apply(this,arguments)};Menus.prototype.createHelpLink=function(k){var d=document.createElement("span");d.setAttribute("title",mxResources.get("help"));d.style.cssText="color:blue;text-decoration:underline;margin-left:8px;cursor:help;"; -var u=document.createElement("img");mxUtils.setOpacity(u,50);u.style.height="16px";u.style.width="16px";u.setAttribute("border","0");u.setAttribute("valign","bottom");u.setAttribute("src",Editor.helpImage);d.appendChild(u);mxEvent.addGestureListeners(d,mxUtils.bind(this,function(x){this.editorUi.hideCurrentMenu();this.editorUi.openLink(k);mxEvent.consume(x)}));return d};Menus.prototype.addLinkToItem=function(k,d){null!=k&&k.firstChild.nextSibling.appendChild(this.createHelpLink(d))};var f=Menus.prototype.init; -Menus.prototype.init=function(){function k(t,p,F){this.ui=t;this.previousExtFonts=this.extFonts=p;this.prevCustomFonts=this.customFonts=F}f.apply(this,arguments);var d=this.editorUi,u=d.editor.graph,x=mxUtils.bind(u,u.isEnabled),B=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),D=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&& -(null==document.documentMode||9<document.documentMode),K=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"app.diagrams.net"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!mxClient.IS_IOS&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),c="1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);mxClient.IS_SVG|| -d.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(t){return"file"!=t}));d.actions.addAction("new...",function(){var t=d.isOffline();if(t||"1"!=urlParams.newTempDlg||d.mode!=App.MODE_GOOGLE){var p=new NewDialog(d,t,!(d.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));d.showDialog(p.container,t?350:620,t?70:460,!0,!0,function(J){d.sidebar.hideTooltip();J&&null==d.getCurrentFile()&&d.showSplash()}); -p.init()}else{var F=function(J){return{id:J.id,isExt:!0,url:J.downloadUrl,title:J.title,imgUrl:J.thumbnailLink,changedBy:J.lastModifyingUserName,lastModifiedOn:J.modifiedDate}};t=new TemplatesDialog(d,function(J,M,H){var G=H.libs,E=H.clibs;d.pickFolder(d.mode,function(P){d.createFile(M,J,null!=G&&0<G.length?G:null,null,function(){d.hideDialog()},null,P,null,null!=E&&0<E.length?E:null)},null==d.stateArg||null==d.stateArg.folderId)},null,null,null,"user",function(J,M,H){var G=new Date;G.setDate(G.getDate()- -7);d.drive.listFiles(null,G,H?!0:!1,function(E){for(var P=[],T=0;T<E.items.length;T++)P.push(F(E.items[T]));J(P)},M)},function(J,M,H,G){d.drive.listFiles(J,null,G?!0:!1,function(E){for(var P=[],T=0;T<E.items.length;T++)P.push(F(E.items[T]));M(P)},H)},function(J,M,H){d.drive.getFile(J.id,function(G){M(G.data)},H)},null,null,!1,!1);d.showDialog(t.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}});d.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(u.isEnabled()&& -!u.isCellLocked(u.getDefaultParent())){var t=new NewDialog(d,null,!1,function(p){d.hideDialog();if(null!=p){var F=d.editor.graph.getFreeInsertPoint();u.setSelectionCells(d.importXml(p,Math.max(F.x,20),Math.max(F.y,20),!0,null,null,!0));u.scrollCellToVisible(u.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));d.showDialog(t.container,620,460,!0,!0,function(){d.sidebar.hideTooltip()});t.init()}})).isEnabled=x;var e=d.actions.addAction("shareCursor", -function(){d.setShareCursorPosition(!d.isShareCursorPosition())});e.setToggleAction(!0);e.setSelectedCallback(function(){return d.isShareCursorPosition()});e=d.actions.addAction("showRemoteCursors",function(){d.setShowRemoteCursors(!d.isShowRemoteCursors())});e.setToggleAction(!0);e.setSelectedCallback(function(){return d.isShowRemoteCursors()});e=d.actions.addAction("points",function(){d.editor.graph.view.setUnit(mxConstants.POINTS)});e.setToggleAction(!0);e.setSelectedCallback(function(){return d.editor.graph.view.unit== -mxConstants.POINTS});e=d.actions.addAction("inches",function(){d.editor.graph.view.setUnit(mxConstants.INCHES)});e.setToggleAction(!0);e.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.INCHES});e=d.actions.addAction("millimeters",function(){d.editor.graph.view.setUnit(mxConstants.MILLIMETERS)});e.setToggleAction(!0);e.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.MILLIMETERS});e=d.actions.addAction("meters",function(){d.editor.graph.view.setUnit(mxConstants.METERS)}); -e.setToggleAction(!0);e.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.METERS});this.put("units",new Menu(mxUtils.bind(this,function(t,p){this.addMenuItems(t,["points","inches","millimeters","meters"],p)})));e=d.actions.addAction("ruler",function(){mxSettings.setRulerOn(!mxSettings.isRulerOn());mxSettings.save();null!=d.ruler?(d.ruler.destroy(),d.ruler=null):d.ruler=new mxDualRuler(d,d.editor.graph.view.unit);d.refresh()});e.setEnabled(d.canvasSupported&&9!=document.documentMode); -e.setToggleAction(!0);e.setSelectedCallback(function(){return null!=d.ruler});e=d.actions.addAction("fullscreen",function(){"1"==urlParams.embedInline?d.setInlineFullscreen(!Editor.inlineFullscreen):null==document.fullscreenElement?document.body.requestFullscreen():document.exitFullscreen()});e.visible="1"==urlParams.embedInline||window==window.top&&document.fullscreenEnabled&&null!=document.body.requestFullscreen;e.setToggleAction(!0);e.setSelectedCallback(function(){return"1"==urlParams.embedInline? -Editor.inlineFullscreen:null!=document.fullscreenElement});e=d.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(t){d.setDarkMode(!Editor.isDarkMode());t=mxSettings.getUi();"atlas"!=t&&"min"!=t&&"sketch"!=t&&d.setCurrentTheme(Editor.isDarkMode()?"dark":"kennedy",!0)}));e.setToggleAction(!0);e.setSelectedCallback(function(){return Editor.isDarkMode()});e.isEnabled=function(){return"atlas"!=mxSettings.getUi()};d.actions.addAction("properties...",function(){var t=new FilePropertiesDialog(d); -d.showDialog(t.container,320,120,!0,!0);t.init()}).isEnabled=x;window.mxFreehand&&(d.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(){if(u.isEnabled()){if(null==this.freehandWindow){var t=!mxClient.IS_IE&&!mxClient.IS_IE11;this.freehandWindow=new FreehandWindow(d,document.body.offsetWidth-420,102,176,t?120:84,t)}u.freehand.isDrawing()?u.freehand.stopDrawing():u.freehand.startDrawing();this.freehandWindow.window.setVisible(u.freehand.isDrawing())}},null,null,"X")).isEnabled= -function(){return x()&&mxClient.IS_SVG});d.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var t=document.createElement("div");t.style.whiteSpace="nowrap";var p=null==d.pages||1>=d.pages.length,F=document.createElement("h3");mxUtils.write(F,mxResources.get("formatXml"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";t.appendChild(F);var J=d.addCheckbox(t,mxResources.get("selectionOnly"),!1,u.isSelectionEmpty()),M=d.addCheckbox(t,mxResources.get("compressed"), -!0),H=d.addCheckbox(t,mxResources.get("allPages"),!p,p);H.style.marginBottom="16px";mxEvent.addListener(J,"change",function(){J.checked?H.setAttribute("disabled","disabled"):H.removeAttribute("disabled")});t=new CustomDialog(d,t,mxUtils.bind(this,function(){d.downloadFile("xml",!M.checked,null,!J.checked,p||!H.checked)}),null,mxResources.get("export"));d.showDialog(t.container,300,200,!0,!0)}));Editor.enableExportUrl&&d.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){d.showPublishLinkDialog(mxResources.get("url"), -!0,null,null,function(t,p,F,J,M,H,G,E,P){G=[];P&&G.push("tags=%7B%7D");t=new EmbedDialog(d,d.createLink(t,p,F,J,M,H,null,!0,G));d.showDialog(t.container,450,240,!0,!0);t.init()})}));d.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(t){d.spinner.stop();d.showHtmlDialog(mxResources.get("export"),null,t,function(p,F,J,M,H,G,E,P,T,W,U){d.createHtml(p,F,J,M,H, -G,E,P,T,W,U,mxUtils.bind(this,function(V,l){var A=d.getBaseFilename(E);V='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(A)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+V+"\n"+l+"\n</body>\n</html>";d.saveData(A+(".drawio"==A.substring(A.lenth-7)?"":".drawio")+".html","html",V,"text/html")}))})})}));d.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp|| -!d.isOffline()&&!d.printPdfExport){var t=null==d.pages||1>=d.pages.length,p=document.createElement("div");p.style.whiteSpace="nowrap";var F=document.createElement("h3");mxUtils.write(F,mxResources.get("formatPdf"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";p.appendChild(F);var J=function(){E!=this&&this.checked?(l.removeAttribute("disabled"),l.checked=!u.pageVisible):(l.setAttribute("disabled","disabled"),l.checked=!1)};F=200;var M=1,H=null;if(d.pdfPageExport&& -!t){var G=function(){U.value=Math.max(1,Math.min(M,Math.max(parseInt(U.value),parseInt(T.value))));T.value=Math.max(1,Math.min(M,Math.min(parseInt(U.value),parseInt(T.value))))},E=d.addRadiobox(p,"pages",mxResources.get("allPages"),!0),P=d.addRadiobox(p,"pages",mxResources.get("pages")+":",!1,null,!0),T=document.createElement("input");T.style.cssText="margin:0 8px 0 8px;";T.setAttribute("value","1");T.setAttribute("type","number");T.setAttribute("min","1");T.style.width="50px";p.appendChild(T);var W= -document.createElement("span");mxUtils.write(W,mxResources.get("to"));p.appendChild(W);var U=T.cloneNode(!0);p.appendChild(U);mxEvent.addListener(T,"focus",function(){P.checked=!0});mxEvent.addListener(U,"focus",function(){P.checked=!0});mxEvent.addListener(T,"change",G);mxEvent.addListener(U,"change",G);if(null!=d.pages&&(M=d.pages.length,null!=d.currentPage))for(G=0;G<d.pages.length;G++)if(d.currentPage==d.pages[G]){H=G+1;T.value=H;U.value=H;break}T.setAttribute("max",M);U.setAttribute("max",M); -mxUtils.br(p);var V=d.addRadiobox(p,"pages",mxResources.get("selectionOnly"),!1,u.isSelectionEmpty()),l=d.addCheckbox(p,mxResources.get("crop"),!1,!0),A=d.addCheckbox(p,mxResources.get("grid"),!1,!1);mxEvent.addListener(E,"change",J);mxEvent.addListener(P,"change",J);mxEvent.addListener(V,"change",J);F+=64}else V=d.addCheckbox(p,mxResources.get("selectionOnly"),!1,u.isSelectionEmpty()),l=d.addCheckbox(p,mxResources.get("crop"),!u.pageVisible||!d.pdfPageExport,!d.pdfPageExport),A=d.addCheckbox(p,mxResources.get("grid"), -!1,!1),d.pdfPageExport||mxEvent.addListener(V,"change",J);J=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==d.getServiceName();var L=null,Q=null;if(EditorUi.isElectronApp||J)Q=d.addCheckbox(p,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),F+=30;J&&(L=d.addCheckbox(p,mxResources.get("transparentBackground"),!1),F+=30);p=new CustomDialog(d,p,mxUtils.bind(this,function(){var O=null;if(!t){O=parseInt(T.value);var R=parseInt(U.value);O=E.checked||O==H&&R==H?null:{from:Math.max(0, -Math.min(M-1,O-1)),to:Math.max(0,Math.min(M-1,R-1))}}d.downloadFile("pdf",null,null,!V.checked,t?!0:!E.checked&&null==O,!l.checked,null!=L&&L.checked,null,null,A.checked,null!=Q&&Q.checked,O)}),null,mxResources.get("export"));d.showDialog(p.container,300,F,!0,!0)}else d.showDialog((new PrintDialog(d,mxResources.get("formatPdf"))).container,360,null!=d.pages&&1<d.pages.length&&(d.editor.editable||"1"!=urlParams["hide-pages"])?470:390,!0,!0)}));d.actions.addAction("open...",function(){d.pickFile()}); -d.actions.addAction("close",function(){function t(){null!=p&&p.removeDraft();d.fileLoaded(null)}var p=d.getCurrentFile();null!=p&&p.isModified()?d.confirm(mxResources.get("allChangesLost"),null,t,mxResources.get("cancel"),mxResources.get("discardChanges")):t()});d.actions.addAction("editShape...",mxUtils.bind(this,function(){u.getSelectionCells();if(1==u.getSelectionCount()){var t=u.getSelectionCell(),p=u.view.getState(t);null!=p&&null!=p.shape&&null!=p.shape.stencil&&(t=new EditShapeDialog(d,t,mxResources.get("editShape")+ -":",630,400),d.showDialog(t.container,640,480,!0,!1),t.init())}}));d.actions.addAction("revisionHistory...",function(){d.isRevisionHistorySupported()?d.spinner.spin(document.body,mxResources.get("loading"))&&d.getRevisions(mxUtils.bind(this,function(t,p){d.spinner.stop();t=new RevisionDialog(d,t,p);d.showDialog(t.container,640,480,!0,!0);t.init()}),mxUtils.bind(this,function(t){d.handleError(t)})):d.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});d.actions.addAction("createRevision", -function(){d.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");e=d.actions.addAction("synchronize",function(){d.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(e.label=mxResources.get("refresh"));d.actions.addAction("upload...",function(){var t=d.getCurrentFile();null!=t&&(window.drawdata=d.getFileData(),t=null!=t.getTitle()?t.getTitle():d.defaultFilename,d.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+ -(d.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(t),null,!0))});"undefined"!==typeof MathJax&&(e=d.actions.addAction("mathematicalTypesetting",function(){var t=new ChangePageSetup(d);t.ignoreColor=!0;t.ignoreImage=!0;t.mathEnabled=!d.isMathEnabled();u.model.execute(t)}),e.setToggleAction(!0),e.setSelectedCallback(function(){return d.isMathEnabled()}),e.isEnabled=x);isLocalStorage&&(e=d.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen()); -mxSettings.save()}),e.setToggleAction(!0),e.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var g=d.actions.addAction("autosave",function(){d.editor.setAutosave(!d.editor.autosave)});g.setToggleAction(!0);g.setSelectedCallback(function(){return g.isEnabled()&&d.editor.autosave});d.actions.addAction("editGeometry...",function(){for(var t=u.getSelectionCells(),p=[],F=0;F<t.length;F++)u.getModel().isVertex(t[F])&&p.push(t[F]);0<p.length&&(t=new EditGeometryDialog(d,p),d.showDialog(t.container, -200,270,!0,!0),t.init())},null,null,Editor.ctrlKey+"+Shift+M");var q=null;d.actions.addAction("copyStyle",function(){u.isEnabled()&&!u.isSelectionEmpty()&&(q=u.copyStyle(u.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");d.actions.addAction("pasteStyle",function(){u.isEnabled()&&!u.isSelectionEmpty()&&null!=q&&u.pasteStyle(q,u.getSelectionCells())},null,null,Editor.ctrlKey+"+Shift+V");d.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!d.isOffline()){var t= -new BackgroundImageDialog(d,function(p){d.setBackgroundImage(p)});d.showDialog(t.container,400,170,!0,!0);t.init()}}));d.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){d.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(t,p,F,J,M,H,G,E,P,T,W,U,V,l,A){P=parseInt(t);!isNaN(P)&&0<P&&(A?d.downloadFile("remoteSvg",null,null,F,null,E,p,t,G,null,M):d.exportSvg(P/100,p,F, -J,M,H,G,!E,!1,T,U,V,l))}),!0,null,"svg",!0)}));d.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){d.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(t,p,F,J,M,H,G,E,P,T,W,U,V){t=parseInt(t);!isNaN(t)&&0<t&&d.exportImage(t/100,p,F,J,M,G,!E,!1,null,W,null,U,V)}),!0,Editor.defaultIncludeDiagram,"png",!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone|| -d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(t,p,F,J,M){d.downloadFile(p?"xmlpng":"png",null,null,t,null,null,F,J,M)}),!1,!0)}));d.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){d.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(t,p,F,J,M,H,G,E,P,T,W,U,V){t=parseInt(t);!isNaN(t)&&0<t&&d.exportImage(t/100,!1, -F,J,!1,G,!E,!1,"jpeg",W,null,U,V)}),!0,!1,"jpeg",!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(t,p,F,J,M){d.downloadFile("jpeg",null,null,t,null,null,null,J,M)}),!0,!0)}));e=d.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var t=mxUtils.sortCells(u.model.getTopmostCells(u.getSelectionCells())),p=mxUtils.getXml(0==t.length?d.editor.getGraphXml():u.encodeCells(t));d.copyImage(t,p)}));e.visible= -Editor.enableNativeCipboard&&d.isExportToCanvas()&&!mxClient.IS_SF;e=d.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){u.setShadowVisible(!u.shadowVisible)}));e.setToggleAction(!0);e.setSelectedCallback(function(){return u.shadowVisible});d.actions.put("about",new Action(mxResources.get("about")+" "+EditorUi.VERSION+"...",function(){d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.alert(d.editor.appName+" "+EditorUi.VERSION):d.openLink("https://www.diagrams.net/")})); -d.actions.addAction("support...",function(){EditorUi.isElectronApp?d.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):d.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});d.actions.addAction("exportOptionsDisabled...",function(){d.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});d.actions.addAction("keyboardShortcuts...",function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp? -d.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):d.openLink("shortcuts.svg")});d.actions.addAction("feedback...",function(){var t=new FeedbackDialog(d);d.showDialog(t.container,610,360,!0,!1);t.init()});d.actions.addAction("quickStart...",function(){d.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});e=d.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(d,document.body.offsetWidth-400,60, -212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,function(){d.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+K");e.setToggleAction(!0);e.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&& -this.tagsWindow.window.isVisible()}));e=d.actions.addAction("findReplace",mxUtils.bind(this,function(t,p){var F=(t=u.isEnabled()&&(null==p||!mxEvent.isShiftDown(p)))?"findReplace":"find";p=F+"Window";if(null==this[p]){var J=t?"min"==uiTheme?330:300:240;this[p]=new FindWindow(d,document.body.offsetWidth-(J+20),100,J,t?"min"==uiTheme?304:288:170,t);this[p].window.addListener("show",function(){d.fireEvent(new mxEventObject(F))});this[p].window.addListener("hide",function(){d.fireEvent(new mxEventObject(F))}); -this[p].window.setVisible(!0)}else this[p].window.setVisible(!this[p].window.isVisible())}),null,null,Editor.ctrlKey+"+F");e.setToggleAction(!0);e.setSelectedCallback(mxUtils.bind(this,function(){var t=u.isEnabled()?"findReplaceWindow":"findWindow";return null!=this[t]&&this[t].window.isVisible()}));d.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var t=null==d.pages||1>=d.pages.length;if(t)d.exportVisio();else{var p=document.createElement("div");p.style.whiteSpace= -"nowrap";var F=document.createElement("h3");mxUtils.write(F,mxResources.get("formatVsdx"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";p.appendChild(F);var J=d.addCheckbox(p,mxResources.get("allPages"),!t,t);J.style.marginBottom="16px";t=new CustomDialog(d,p,mxUtils.bind(this,function(){d.exportVisio(!J.checked)}),null,mxResources.get("export"));d.showDialog(t.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&d.actions.addAction("configuration...", -function(){var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.marginRight="4px";t.checked=mxSettings.getShowStartScreen();t.defaultChecked=t.checked;if(d.isSettingsEnabled()&&"1"==urlParams.sketch){var p=document.createElement("span");p.style["float"]="right";p.style.cursor="pointer";p.style.userSelect="none";p.style.marginTop="-4px";p.appendChild(t);mxUtils.write(p,mxResources.get("showStartScreen"));mxEvent.addListener(p,"click",function(M){mxEvent.getSource(M)!=t&& -(t.checked=!t.checked)});header=p}var F=localStorage.getItem(Editor.configurationKey);p=[[mxResources.get("reset"),function(M,H){d.confirm(mxResources.get("areYouSure"),function(){try{mxEvent.isShiftDown(M)?(localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config")):(localStorage.removeItem(Editor.configurationKey),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired")))}catch(G){d.handleError(G)}})},"Shift+Click to Reset Settings"]];var J=d.actions.get("plugins"); -null!=J&&"1"==urlParams.sketch&&p.push([mxResources.get("plugins"),J.funct]);EditorUi.isElectronApp||p.push([mxResources.get("share"),function(M,H){if(0<H.value.length)try{var G=JSON.parse(H.value),E=window.location.protocol+"//"+window.location.host+"/"+d.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(G)),P=new EmbedDialog(d,E);d.showDialog(P.container,450,240,!0);P.init()}catch(T){d.handleError(T)}else d.handleError({message:mxResources.get("invalidInput")})}]);p=new TextareaDialog(d,mxResources.get("configuration")+ -":",null!=F?JSON.stringify(JSON.parse(F),null,2):"",function(M){if(null!=M)try{if(null!=t.parentNode&&(mxSettings.setShowStartScreen(t.checked),mxSettings.save()),M==F)d.hideDialog();else{if(0<M.length){var H=JSON.parse(M);localStorage.setItem(Editor.configurationKey,JSON.stringify(H))}else localStorage.removeItem(Editor.configurationKey);d.hideDialog();d.alert(mxResources.get("restartForChangeRequired"))}}catch(G){d.handleError(G)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor", -p,t.parentNode);d.showDialog(p.container,620,460,!0,!1);p.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(t,p){var F=mxUtils.bind(this,function(M){var H=""==M?mxResources.get("automatic"):mxLanguageMap[M],G=null;""!=H&&(G=t.addItem(H,null,mxUtils.bind(this,function(){mxSettings.setLanguage(M);mxSettings.save();mxClient.language=M;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);d.alert(mxResources.get("restartForChangeRequired"))}), -p),(M==mxLanguage||""==M&&null==mxLanguage)&&t.addCheckmark(G,Editor.checkmarkImage));return G});F("");t.addSeparator(p);for(var J in mxLanguageMap)F(J)})));var m=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(t){var p=m.apply(this,arguments);if(null!=p&&"1"!=urlParams.noLangIcon){var F=this.get("language");if(null!=F){F=p.addMenu("",F.funct);F.setAttribute("title",mxResources.get("language"));F.className="geAdaptiveAsset";F.style.width="16px";F.style.paddingTop="2px";F.style.paddingLeft= -"4px";F.style.zIndex="1";F.style.position="absolute";F.style.display="block";F.style.cursor="pointer";F.style.right="17px";"atlas"==uiTheme?(F.style.top="6px",F.style.right="15px"):F.style.top="min"==uiTheme?"2px":"0px";var J=document.createElement("div");J.style.backgroundImage="url("+Editor.globeImage+")";J.style.backgroundPosition="center center";J.style.backgroundRepeat="no-repeat";J.style.backgroundSize="19px 19px";J.style.position="absolute";J.style.height="19px";J.style.width="19px";J.style.marginTop= -"2px";J.style.zIndex="1";F.appendChild(J);mxUtils.setOpacity(F,40);"1"==urlParams.winCtrls&&(F.style.right="95px",F.style.width="19px",F.style.height="19px",F.style.webkitAppRegion="no-drag",J.style.webkitAppRegion="no-drag");"atlas"==uiTheme&&(F.style.opacity="0.85",F.style.filter="invert(100%)");document.body.appendChild(F);p.langIcon=F}}return p}}d.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60, -parallelEdgeSpacing:10}}];d.actions.addAction("runLayout",function(){var t=new TextareaDialog(d,"Run Layouts:",JSON.stringify(d.customLayoutConfig,null,2),function(p){if(0<p.length)try{var F=JSON.parse(p);d.executeLayouts(u.createLayouts(F));d.customLayoutConfig=F;d.hideDialog()}catch(J){d.handleError(J)}},null,null,null,null,function(p,F){var J=mxUtils.button(mxResources.get("copy"),function(){try{var M=F.value;F.value=JSON.stringify(JSON.parse(M));F.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode? -F.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");d.alert(mxResources.get("copiedToClipboard"));F.value=M}catch(H){d.handleError(H)}});J.setAttribute("title","copy");J.className="geBtn";p.appendChild(J)},!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");d.showDialog(t.container,620,460,!0,!0);t.init()});e=this.get("layout");var n=e.funct;e.funct=function(t,p){n.apply(this,arguments);t.addItem(mxResources.get("orgChart"),null,function(){var F=null,J=20, -M=20,H=function(){if("undefined"!==typeof mxOrgChartLayout&&null!=F){var l=d.editor.graph,A=new mxOrgChartLayout(l,F,J,M),L=l.getDefaultParent();1<l.model.getChildCount(l.getSelectionCell())&&(L=l.getSelectionCell());A.execute(L)}},G=document.createElement("div"),E=document.createElement("div");E.style.marginTop="6px";E.style.display="inline-block";E.style.width="140px";mxUtils.write(E,mxResources.get("orgChartType")+": ");G.appendChild(E);var P=document.createElement("select");P.style.width="200px"; -P.style.boxSizing="border-box";E=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var T=0;T<E.length;T++){var W=document.createElement("option");mxUtils.write(W,E[T]);W.value=T;2==T&&W.setAttribute("selected","selected");P.appendChild(W)}mxEvent.addListener(P,"change",function(){F=P.value});G.appendChild(P);E=document.createElement("div"); -E.style.marginTop="6px";E.style.display="inline-block";E.style.width="140px";mxUtils.write(E,mxResources.get("parentChildSpacing")+": ");G.appendChild(E);var U=document.createElement("input");U.type="number";U.value=J;U.style.width="200px";U.style.boxSizing="border-box";G.appendChild(U);mxEvent.addListener(U,"change",function(){J=U.value});E=document.createElement("div");E.style.marginTop="6px";E.style.display="inline-block";E.style.width="140px";mxUtils.write(E,mxResources.get("siblingSpacing")+ -": ");G.appendChild(E);var V=document.createElement("input");V.type="number";V.value=M;V.style.width="200px";V.style.boxSizing="border-box";G.appendChild(V);mxEvent.addListener(V,"change",function(){M=V.value});G=new CustomDialog(d,G,function(){null==F&&(F=2);d.loadOrgChartLayouts(H)});d.showDialog(G.container,355,140,!0,!0)},p,null,x());t.addSeparator(p);t.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var F=new mxParallelEdgeLayout(u);F.checkOverlap=!0;d.prompt(mxResources.get("spacing"), -F.spacing,mxUtils.bind(this,function(J){F.spacing=J;d.executeLayout(function(){F.execute(u.getDefaultParent(),u.isSelectionEmpty()?null:u.getSelectionCells())},!1)}))}),p);t.addSeparator(p);d.menus.addMenuItem(t,"runLayout",p,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(t,p){if(!mxClient.IS_CHROMEAPP&&d.isOffline())this.addMenuItems(t,["about"],p);else{var F=t.addItem("Search:",null,null,p,null,null,!1);F.style.backgroundColor=Editor.isDarkMode()? -"#505759":"whiteSmoke";F.style.cursor="default";var J=document.createElement("input");J.setAttribute("type","text");J.setAttribute("size","25");J.style.marginLeft="8px";mxEvent.addListener(J,"keydown",mxUtils.bind(this,function(M){var H=mxUtils.trim(J.value);13==M.keyCode&&0<H.length?(this.editorUi.openLink("https://www.diagrams.net/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(H)),J.value="",EditorUi.logEvent({category:"SEARCH-HELP", -action:"search",label:H}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==M.keyCode&&(J.value="")}));F.firstChild.nextSibling.appendChild(J);mxEvent.addGestureListeners(J,function(M){document.activeElement!=J&&J.focus();mxEvent.consume(M)},function(M){mxEvent.consume(M)},function(M){mxEvent.consume(M)});window.setTimeout(function(){J.focus()},0);EditorUi.isElectronApp?(d.actions.addAction("website...",function(){d.openLink("https://www.diagrams.net")}),d.actions.addAction("check4Updates", -function(){d.checkForUpdates()}),this.addMenuItems(t,"- keyboardShortcuts quickStart website support -".split(" "),p),"1"!=urlParams.disableUpdate&&this.addMenuItems(t,["check4Updates"],p),this.addMenuItems(t,["openDevTools","-","about"],p)):this.addMenuItems(t,"- keyboardShortcuts quickStart support - about".split(" "),p)}"1"==urlParams.test&&(t.addSeparator(p),this.addSubmenu("testDevelop",t,p))})));mxResources.parse("diagramLanguage=Diagram Language");d.actions.addAction("diagramLanguage...",function(){var t= +Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);null==this.graph.defaultPageFormat&&(this.graph.pageFormat=mxSettings.getPageFormat())};(function(){var b=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-(EditorUi.isElectronApp?50:10)+"px";b.apply(this,arguments)};Menus.prototype.createHelpLink=function(k){var e=document.createElement("span");e.setAttribute("title",mxResources.get("help"));e.style.cssText="color:blue;text-decoration:underline;margin-left:8px;cursor:help;"; +var u=document.createElement("img");mxUtils.setOpacity(u,50);u.style.height="16px";u.style.width="16px";u.setAttribute("border","0");u.setAttribute("valign","bottom");u.setAttribute("src",Editor.helpImage);e.appendChild(u);mxEvent.addGestureListeners(e,mxUtils.bind(this,function(v){this.editorUi.hideCurrentMenu();this.editorUi.openLink(k);mxEvent.consume(v)}));return e};Menus.prototype.addLinkToItem=function(k,e){null!=k&&k.firstChild.nextSibling.appendChild(this.createHelpLink(e))};var f=Menus.prototype.init; +Menus.prototype.init=function(){function k(t,p,F){this.ui=t;this.previousExtFonts=this.extFonts=p;this.prevCustomFonts=this.customFonts=F}f.apply(this,arguments);var e=this.editorUi,u=e.editor.graph,v=mxUtils.bind(u,u.isEnabled),B=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),E=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&& +(null==document.documentMode||9<document.documentMode),L=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"app.diagrams.net"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!mxClient.IS_IOS&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),c="1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);mxClient.IS_SVG|| +e.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(t){return"file"!=t}));e.actions.addAction("new...",function(){var t=e.isOffline();if(t||"1"!=urlParams.newTempDlg||e.mode!=App.MODE_GOOGLE){var p=new NewDialog(e,t,!(e.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));e.showDialog(p.container,t?350:620,t?70:460,!0,!0,function(K){e.sidebar.hideTooltip();K&&null==e.getCurrentFile()&&e.showSplash()}); +p.init()}else{var F=function(K){return{id:K.id,isExt:!0,url:K.downloadUrl,title:K.title,imgUrl:K.thumbnailLink,changedBy:K.lastModifyingUserName,lastModifiedOn:K.modifiedDate}};t=new TemplatesDialog(e,function(K,D,H){var J=H.libs,G=H.clibs;e.pickFolder(e.mode,function(P){e.createFile(D,K,null!=J&&0<J.length?J:null,null,function(){e.hideDialog()},null,P,null,null!=G&&0<G.length?G:null)},null==e.stateArg||null==e.stateArg.folderId)},null,null,null,"user",function(K,D,H){var J=new Date;J.setDate(J.getDate()- +7);e.drive.listFiles(null,J,H?!0:!1,function(G){for(var P=[],T=0;T<G.items.length;T++)P.push(F(G.items[T]));K(P)},D)},function(K,D,H,J){e.drive.listFiles(K,null,J?!0:!1,function(G){for(var P=[],T=0;T<G.items.length;T++)P.push(F(G.items[T]));D(P)},H)},function(K,D,H){e.drive.getFile(K.id,function(J){D(J.data)},H)},null,null,!1,!1);e.showDialog(t.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}});e.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(u.isEnabled()&& +!u.isCellLocked(u.getDefaultParent())){var t=new NewDialog(e,null,!1,function(p){e.hideDialog();if(null!=p){var F=e.editor.graph.getFreeInsertPoint();u.setSelectionCells(e.importXml(p,Math.max(F.x,20),Math.max(F.y,20),!0,null,null,!0));u.scrollCellToVisible(u.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));e.showDialog(t.container,620,460,!0,!0,function(){e.sidebar.hideTooltip()});t.init()}})).isEnabled=v;var d=e.actions.addAction("shareCursor", +function(){e.setShareCursorPosition(!e.isShareCursorPosition())});d.setToggleAction(!0);d.setSelectedCallback(function(){return e.isShareCursorPosition()});d=e.actions.addAction("showRemoteCursors",function(){e.setShowRemoteCursors(!e.isShowRemoteCursors())});d.setToggleAction(!0);d.setSelectedCallback(function(){return e.isShowRemoteCursors()});d=e.actions.addAction("points",function(){e.editor.graph.view.setUnit(mxConstants.POINTS)});d.setToggleAction(!0);d.setSelectedCallback(function(){return e.editor.graph.view.unit== +mxConstants.POINTS});d=e.actions.addAction("inches",function(){e.editor.graph.view.setUnit(mxConstants.INCHES)});d.setToggleAction(!0);d.setSelectedCallback(function(){return e.editor.graph.view.unit==mxConstants.INCHES});d=e.actions.addAction("millimeters",function(){e.editor.graph.view.setUnit(mxConstants.MILLIMETERS)});d.setToggleAction(!0);d.setSelectedCallback(function(){return e.editor.graph.view.unit==mxConstants.MILLIMETERS});d=e.actions.addAction("meters",function(){e.editor.graph.view.setUnit(mxConstants.METERS)}); +d.setToggleAction(!0);d.setSelectedCallback(function(){return e.editor.graph.view.unit==mxConstants.METERS});this.put("units",new Menu(mxUtils.bind(this,function(t,p){this.addMenuItems(t,["points","inches","millimeters","meters"],p)})));d=e.actions.addAction("ruler",function(){mxSettings.setRulerOn(!mxSettings.isRulerOn());mxSettings.save();null!=e.ruler?(e.ruler.destroy(),e.ruler=null):e.ruler=new mxDualRuler(e,e.editor.graph.view.unit);e.refresh()});d.setEnabled(e.canvasSupported&&9!=document.documentMode); +d.setToggleAction(!0);d.setSelectedCallback(function(){return null!=e.ruler});d=e.actions.addAction("fullscreen",function(){"1"==urlParams.embedInline?e.setInlineFullscreen(!Editor.inlineFullscreen):null==document.fullscreenElement?document.body.requestFullscreen():document.exitFullscreen()});d.visible="1"==urlParams.embedInline||window==window.top&&document.fullscreenEnabled&&null!=document.body.requestFullscreen;d.setToggleAction(!0);d.setSelectedCallback(function(){return"1"==urlParams.embedInline? +Editor.inlineFullscreen:null!=document.fullscreenElement});d=e.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(t){e.setDarkMode(!Editor.isDarkMode());t=mxSettings.getUi();"atlas"!=t&&"min"!=t&&"sketch"!=t&&e.setCurrentTheme(Editor.isDarkMode()?"dark":"kennedy",!0)}));d.setToggleAction(!0);d.setSelectedCallback(function(){return Editor.isDarkMode()});e.actions.addAction("properties...",function(){var t=new FilePropertiesDialog(e);e.showDialog(t.container,320,120,!0,!0);t.init()}).isEnabled= +v;window.mxFreehand&&(e.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(){if(u.isEnabled()){if(null==this.freehandWindow){var t=!mxClient.IS_IE&&!mxClient.IS_IE11;this.freehandWindow=new FreehandWindow(e,document.body.offsetWidth-420,102,176,t?120:84,t)}u.freehand.isDrawing()?u.freehand.stopDrawing():u.freehand.startDrawing();this.freehandWindow.window.setVisible(u.freehand.isDrawing())}},null,null,"X")).isEnabled=function(){return v()&&mxClient.IS_SVG});e.actions.put("exportXml", +new Action(mxResources.get("formatXml")+"...",function(){var t=document.createElement("div");t.style.whiteSpace="nowrap";var p=null==e.pages||1>=e.pages.length,F=document.createElement("h3");mxUtils.write(F,mxResources.get("formatXml"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";t.appendChild(F);var K=e.addCheckbox(t,mxResources.get("selectionOnly"),!1,u.isSelectionEmpty()),D=e.addCheckbox(t,mxResources.get("compressed"),!0),H=e.addCheckbox(t,mxResources.get("allPages"), +!p,p);H.style.marginBottom="16px";mxEvent.addListener(K,"change",function(){K.checked?H.setAttribute("disabled","disabled"):H.removeAttribute("disabled")});t=new CustomDialog(e,t,mxUtils.bind(this,function(){e.downloadFile("xml",!D.checked,null,!K.checked,p||!H.checked)}),null,mxResources.get("export"));e.showDialog(t.container,300,200,!0,!0)}));Editor.enableExportUrl&&e.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){e.showPublishLinkDialog(mxResources.get("url"),!0,null, +null,function(t,p,F,K,D,H,J,G,P){J=[];P&&J.push("tags=%7B%7D");t=new EmbedDialog(e,e.createLink(t,p,F,K,D,H,null,!0,J));e.showDialog(t.container,450,240,!0,!0);t.init()})}));e.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){e.spinner.spin(document.body,mxResources.get("loading"))&&e.getPublicUrl(e.getCurrentFile(),function(t){e.spinner.stop();e.showHtmlDialog(mxResources.get("export"),null,t,function(p,F,K,D,H,J,G,P,T,W,U){e.createHtml(p,F,K,D,H,J,G,P,T, +W,U,mxUtils.bind(this,function(V,l){var A=e.getBaseFilename(G);V='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(A)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+V+"\n"+l+"\n</body>\n</html>";e.saveData(A+(".drawio"==A.substring(A.lenth-7)?"":".drawio")+".html","html",V,"text/html")}))})})}));e.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp|| +!e.isOffline()&&!e.printPdfExport){var t=null==e.pages||1>=e.pages.length,p=document.createElement("div");p.style.whiteSpace="nowrap";var F=document.createElement("h3");mxUtils.write(F,mxResources.get("formatPdf"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";p.appendChild(F);var K=function(){G!=this&&this.checked?(l.removeAttribute("disabled"),l.checked=!u.pageVisible):(l.setAttribute("disabled","disabled"),l.checked=!1)};F=200;var D=1,H=null;if(e.pdfPageExport&& +!t){var J=function(){U.value=Math.max(1,Math.min(D,Math.max(parseInt(U.value),parseInt(T.value))));T.value=Math.max(1,Math.min(D,Math.min(parseInt(U.value),parseInt(T.value))))},G=e.addRadiobox(p,"pages",mxResources.get("allPages"),!0),P=e.addRadiobox(p,"pages",mxResources.get("pages")+":",!1,null,!0),T=document.createElement("input");T.style.cssText="margin:0 8px 0 8px;";T.setAttribute("value","1");T.setAttribute("type","number");T.setAttribute("min","1");T.style.width="50px";p.appendChild(T);var W= +document.createElement("span");mxUtils.write(W,mxResources.get("to"));p.appendChild(W);var U=T.cloneNode(!0);p.appendChild(U);mxEvent.addListener(T,"focus",function(){P.checked=!0});mxEvent.addListener(U,"focus",function(){P.checked=!0});mxEvent.addListener(T,"change",J);mxEvent.addListener(U,"change",J);if(null!=e.pages&&(D=e.pages.length,null!=e.currentPage))for(J=0;J<e.pages.length;J++)if(e.currentPage==e.pages[J]){H=J+1;T.value=H;U.value=H;break}T.setAttribute("max",D);U.setAttribute("max",D); +mxUtils.br(p);var V=e.addRadiobox(p,"pages",mxResources.get("selectionOnly"),!1,u.isSelectionEmpty()),l=e.addCheckbox(p,mxResources.get("crop"),!1,!0),A=e.addCheckbox(p,mxResources.get("grid"),!1,!1);mxEvent.addListener(G,"change",K);mxEvent.addListener(P,"change",K);mxEvent.addListener(V,"change",K);F+=64}else V=e.addCheckbox(p,mxResources.get("selectionOnly"),!1,u.isSelectionEmpty()),l=e.addCheckbox(p,mxResources.get("crop"),!u.pageVisible||!e.pdfPageExport,!e.pdfPageExport),A=e.addCheckbox(p,mxResources.get("grid"), +!1,!1),e.pdfPageExport||mxEvent.addListener(V,"change",K);K=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==e.getServiceName();var M=null,Q=null;if(EditorUi.isElectronApp||K)Q=e.addCheckbox(p,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),F+=30;K&&(M=e.addCheckbox(p,mxResources.get("transparentBackground"),!1),F+=30);p=new CustomDialog(e,p,mxUtils.bind(this,function(){var O=null;if(!t){O=parseInt(T.value);var R=parseInt(U.value);O=G.checked||O==H&&R==H?null:{from:Math.max(0, +Math.min(D-1,O-1)),to:Math.max(0,Math.min(D-1,R-1))}}e.downloadFile("pdf",null,null,!V.checked,t?!0:!G.checked&&null==O,!l.checked,null!=M&&M.checked,null,null,A.checked,null!=Q&&Q.checked,O)}),null,mxResources.get("export"));e.showDialog(p.container,300,F,!0,!0)}else e.showDialog((new PrintDialog(e,mxResources.get("formatPdf"))).container,360,null!=e.pages&&1<e.pages.length&&(e.editor.editable||"1"!=urlParams["hide-pages"])?470:390,!0,!0)}));e.actions.addAction("open...",function(){e.pickFile()}); +e.actions.addAction("close",function(){function t(){null!=p&&p.removeDraft();e.fileLoaded(null)}var p=e.getCurrentFile();null!=p&&p.isModified()?e.confirm(mxResources.get("allChangesLost"),null,t,mxResources.get("cancel"),mxResources.get("discardChanges")):t()});e.actions.addAction("editShape...",mxUtils.bind(this,function(){u.getSelectionCells();if(1==u.getSelectionCount()){var t=u.getSelectionCell(),p=u.view.getState(t);null!=p&&null!=p.shape&&null!=p.shape.stencil&&(t=new EditShapeDialog(e,t,mxResources.get("editShape")+ +":",630,400),e.showDialog(t.container,640,480,!0,!1),t.init())}}));e.actions.addAction("revisionHistory...",function(){e.isRevisionHistorySupported()?e.spinner.spin(document.body,mxResources.get("loading"))&&e.getRevisions(mxUtils.bind(this,function(t,p){e.spinner.stop();t=new RevisionDialog(e,t,p);e.showDialog(t.container,640,480,!0,!0);t.init()}),mxUtils.bind(this,function(t){e.handleError(t)})):e.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});e.actions.addAction("createRevision", +function(){e.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");d=e.actions.addAction("synchronize",function(){e.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(d.label=mxResources.get("refresh"));e.actions.addAction("upload...",function(){var t=e.getCurrentFile();null!=t&&(window.drawdata=e.getFileData(),t=null!=t.getTitle()?t.getTitle():e.defaultFilename,e.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+ +(e.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(t),null,!0))});"undefined"!==typeof MathJax&&(d=e.actions.addAction("mathematicalTypesetting",function(){var t=new ChangePageSetup(e);t.ignoreColor=!0;t.ignoreImage=!0;t.mathEnabled=!e.isMathEnabled();u.model.execute(t)}),d.setToggleAction(!0),d.setSelectedCallback(function(){return e.isMathEnabled()}),d.isEnabled=v);isLocalStorage&&(d=e.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen()); +mxSettings.save()}),d.setToggleAction(!0),d.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var g=e.actions.addAction("autosave",function(){e.editor.setAutosave(!e.editor.autosave)});g.setToggleAction(!0);g.setSelectedCallback(function(){return g.isEnabled()&&e.editor.autosave});e.actions.addAction("editGeometry...",function(){for(var t=u.getSelectionCells(),p=[],F=0;F<t.length;F++)u.getModel().isVertex(t[F])&&p.push(t[F]);0<p.length&&(t=new EditGeometryDialog(e,p),e.showDialog(t.container, +200,270,!0,!0),t.init())},null,null,Editor.ctrlKey+"+Shift+M");var q=null;e.actions.addAction("copyStyle",function(){u.isEnabled()&&!u.isSelectionEmpty()&&(q=u.copyStyle(u.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");e.actions.addAction("pasteStyle",function(){u.isEnabled()&&!u.isSelectionEmpty()&&null!=q&&u.pasteStyle(q,u.getSelectionCells())},null,null,Editor.ctrlKey+"+Shift+V");e.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!e.isOffline()){var t= +new BackgroundImageDialog(e,function(p){e.setBackgroundImage(p)});e.showDialog(t.container,400,170,!0,!0);t.init()}}));e.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){e.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(t,p,F,K,D,H,J,G,P,T,W,U,V,l,A){P=parseInt(t);!isNaN(P)&&0<P&&(A?e.downloadFile("remoteSvg",null,null,F,null,G,p,t,J,null,D):e.exportSvg(P/100,p,F, +K,D,H,J,!G,!1,T,U,V,l))}),!0,null,"svg",!0)}));e.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){e.isExportToCanvas()?e.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(t,p,F,K,D,H,J,G,P,T,W,U,V){t=parseInt(t);!isNaN(t)&&0<t&&e.exportImage(t/100,p,F,K,D,J,!G,!1,null,W,null,U,V)}),!0,Editor.defaultIncludeDiagram,"png",!0):e.isOffline()||mxClient.IS_IOS&&navigator.standalone|| +e.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(t,p,F,K,D){e.downloadFile(p?"xmlpng":"png",null,null,t,null,null,F,K,D)}),!1,!0)}));e.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){e.isExportToCanvas()?e.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(t,p,F,K,D,H,J,G,P,T,W,U,V){t=parseInt(t);!isNaN(t)&&0<t&&e.exportImage(t/100,!1, +F,K,!1,J,!G,!1,"jpeg",W,null,U,V)}),!0,!1,"jpeg",!0):e.isOffline()||mxClient.IS_IOS&&navigator.standalone||e.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(t,p,F,K,D){e.downloadFile("jpeg",null,null,t,null,null,null,K,D)}),!0,!0)}));d=e.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var t=mxUtils.sortCells(u.model.getTopmostCells(u.getSelectionCells())),p=mxUtils.getXml(0==t.length?e.editor.getGraphXml():u.encodeCells(t));e.copyImage(t,p)}));d.visible= +Editor.enableNativeCipboard&&e.isExportToCanvas()&&!mxClient.IS_SF;d=e.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){u.setShadowVisible(!u.shadowVisible)}));d.setToggleAction(!0);d.setSelectedCallback(function(){return u.shadowVisible});e.actions.put("about",new Action(mxResources.get("about")+" "+EditorUi.VERSION+"...",function(){e.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?e.alert(e.editor.appName+" "+EditorUi.VERSION):e.openLink("https://www.diagrams.net/")})); +e.actions.addAction("support...",function(){EditorUi.isElectronApp?e.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):e.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});e.actions.addAction("exportOptionsDisabled...",function(){e.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});e.actions.addAction("keyboardShortcuts...",function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp? +e.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):e.openLink("shortcuts.svg")});e.actions.addAction("feedback...",function(){var t=new FeedbackDialog(e);e.showDialog(t.container,610,360,!0,!1);t.init()});e.actions.addAction("quickStart...",function(){e.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});d=e.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(e,document.body.offsetWidth-400,60, +212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,function(){e.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){e.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),e.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+K");d.setToggleAction(!0);d.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&& +this.tagsWindow.window.isVisible()}));d=e.actions.addAction("findReplace",mxUtils.bind(this,function(t,p){var F=(t=u.isEnabled()&&(null==p||!mxEvent.isShiftDown(p)))?"findReplace":"find";p=F+"Window";if(null==this[p]){var K=t?"min"==uiTheme?330:300:240;this[p]=new FindWindow(e,document.body.offsetWidth-(K+20),100,K,t?"min"==uiTheme?304:288:170,t);this[p].window.addListener("show",function(){e.fireEvent(new mxEventObject(F))});this[p].window.addListener("hide",function(){e.fireEvent(new mxEventObject(F))}); +this[p].window.setVisible(!0)}else this[p].window.setVisible(!this[p].window.isVisible())}),null,null,Editor.ctrlKey+"+F");d.setToggleAction(!0);d.setSelectedCallback(mxUtils.bind(this,function(){var t=u.isEnabled()?"findReplaceWindow":"findWindow";return null!=this[t]&&this[t].window.isVisible()}));e.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var t=null==e.pages||1>=e.pages.length;if(t)e.exportVisio();else{var p=document.createElement("div");p.style.whiteSpace= +"nowrap";var F=document.createElement("h3");mxUtils.write(F,mxResources.get("formatVsdx"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";p.appendChild(F);var K=e.addCheckbox(p,mxResources.get("allPages"),!t,t);K.style.marginBottom="16px";t=new CustomDialog(e,p,mxUtils.bind(this,function(){e.exportVisio(!K.checked)}),null,mxResources.get("export"));e.showDialog(t.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&e.actions.addAction("configuration...", +function(){var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.marginRight="4px";t.checked=mxSettings.getShowStartScreen();t.defaultChecked=t.checked;if(e.isSettingsEnabled()&&"1"==urlParams.sketch){var p=document.createElement("span");p.style["float"]="right";p.style.cursor="pointer";p.style.userSelect="none";p.style.marginTop="-4px";p.appendChild(t);mxUtils.write(p,mxResources.get("showStartScreen"));mxEvent.addListener(p,"click",function(D){mxEvent.getSource(D)!=t&& +(t.checked=!t.checked)});header=p}var F=localStorage.getItem(Editor.configurationKey);p=[[mxResources.get("reset"),function(D,H){e.confirm(mxResources.get("areYouSure"),function(){try{mxEvent.isShiftDown(D)?(localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config")):(localStorage.removeItem(Editor.configurationKey),e.hideDialog(),e.alert(mxResources.get("restartForChangeRequired")))}catch(J){e.handleError(J)}})},"Shift+Click to Reset Settings"]];var K=e.actions.get("plugins"); +null!=K&&"1"==urlParams.sketch&&p.push([mxResources.get("plugins"),K.funct]);EditorUi.isElectronApp||p.push([mxResources.get("share"),function(D,H){if(0<H.value.length)try{var J=JSON.parse(H.value),G=window.location.protocol+"//"+window.location.host+"/"+e.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(J)),P=new EmbedDialog(e,G);e.showDialog(P.container,450,240,!0);P.init()}catch(T){e.handleError(T)}else e.handleError({message:mxResources.get("invalidInput")})}]);p=new TextareaDialog(e,mxResources.get("configuration")+ +":",null!=F?JSON.stringify(JSON.parse(F),null,2):"",function(D){if(null!=D)try{if(null!=t.parentNode&&(mxSettings.setShowStartScreen(t.checked),mxSettings.save()),D==F)e.hideDialog();else{if(0<D.length){var H=JSON.parse(D);localStorage.setItem(Editor.configurationKey,JSON.stringify(H))}else localStorage.removeItem(Editor.configurationKey);e.hideDialog();e.alert(mxResources.get("restartForChangeRequired"))}}catch(J){e.handleError(J)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor", +p,t.parentNode);e.showDialog(p.container,620,460,!0,!1);p.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(t,p){var F=mxUtils.bind(this,function(D){var H=""==D?mxResources.get("automatic"):mxLanguageMap[D],J=null;""!=H&&(J=t.addItem(H,null,mxUtils.bind(this,function(){mxSettings.setLanguage(D);mxSettings.save();mxClient.language=D;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);e.alert(mxResources.get("restartForChangeRequired"))}), +p),(D==mxLanguage||""==D&&null==mxLanguage)&&t.addCheckmark(J,Editor.checkmarkImage));return J});F("");t.addSeparator(p);for(var K in mxLanguageMap)F(K)})));var m=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(t){var p=m.apply(this,arguments);if(null!=p&&"1"!=urlParams.embed&&("atlas"!=uiTheme||"1"==urlParams["live-ui"])){var F=this.get("1"==urlParams["live-ui"]?"theme":"language");if(null!=F){F=p.addMenu("",F.funct);F.setAttribute("title",mxResources.get("1"==urlParams["live-ui"]? +"preferences":"language"));F.className="geAdaptiveAsset";F.style.boxSizing="border-box";F.style.width="19px";F.style.height="19px";F.style.paddingTop="2px";F.style.paddingLeft="4px";F.style.zIndex="1";F.style.position="absolute";F.style.display="block";F.style.cursor="pointer";F.style.right="20px";F.style.top="min"==uiTheme?"2px":"0px";var K=document.createElement("div");K.className="geToolbarButton";K.style.backgroundImage="url("+Editor.globeImage+")";K.style.backgroundPosition="center center";K.style.backgroundRepeat= +"no-repeat";K.style.backgroundSize="100% 100%";K.style.filter="none";K.style.position="absolute";K.style.height="100%";K.style.width="100%";K.style.marginTop="atlas"==uiTheme?"8px":"2px";K.style.marginLeft="2px";K.style.zIndex="1";F.appendChild(K);"1"!=urlParams["live-ui"]&&mxUtils.setOpacity(F,70);"1"==urlParams.winCtrls&&(F.style.right="95px",F.style.width="19px",F.style.height="19px",F.style.webkitAppRegion="no-drag",K.style.webkitAppRegion="no-drag");"atlas"==uiTheme&&(F.style.filter="invert(100%)", +F.style.opacity="0.85");document.body.appendChild(F);p.langIcon=F;if("1"==urlParams["live-ui"]){var D=mxUtils.bind(this,function(){K.style.backgroundImage="url('"+(Editor.isDarkMode()||"atlas"==uiTheme?Editor.lightModeImage:Editor.darkModeImage)+"')"});this.editorUi.addListener("darkModeChanged",D);D()}this.editorUi.switchThemeElt=F}}return p}}e.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}]; +e.actions.addAction("runLayout",function(){var t=new TextareaDialog(e,"Run Layouts:",JSON.stringify(e.customLayoutConfig,null,2),function(p){if(0<p.length)try{var F=JSON.parse(p);e.executeLayouts(u.createLayouts(F));e.customLayoutConfig=F;e.hideDialog()}catch(K){e.handleError(K)}},null,null,null,null,function(p,F){var K=mxUtils.button(mxResources.get("copy"),function(){try{var D=F.value;F.value=JSON.stringify(JSON.parse(D));F.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select(): +document.execCommand("selectAll",!1,null);document.execCommand("copy");e.alert(mxResources.get("copiedToClipboard"));F.value=D}catch(H){e.handleError(H)}});K.setAttribute("title","copy");K.className="geBtn";p.appendChild(K)},!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");e.showDialog(t.container,620,460,!0,!0);t.init()});d=this.get("layout");var n=d.funct;d.funct=function(t,p){n.apply(this,arguments);t.addItem(mxResources.get("orgChart"),null,function(){var F=null,K=20,D=20,H=function(){if("undefined"!== +typeof mxOrgChartLayout&&null!=F){var l=e.editor.graph,A=new mxOrgChartLayout(l,F,K,D),M=l.getDefaultParent();1<l.model.getChildCount(l.getSelectionCell())&&(M=l.getSelectionCell());A.execute(M)}},J=document.createElement("div"),G=document.createElement("div");G.style.marginTop="6px";G.style.display="inline-block";G.style.width="140px";mxUtils.write(G,mxResources.get("orgChartType")+": ");J.appendChild(G);var P=document.createElement("select");P.style.width="200px";P.style.boxSizing="border-box"; +G=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var T=0;T<G.length;T++){var W=document.createElement("option");mxUtils.write(W,G[T]);W.value=T;2==T&&W.setAttribute("selected","selected");P.appendChild(W)}mxEvent.addListener(P,"change",function(){F=P.value});J.appendChild(P);G=document.createElement("div");G.style.marginTop= +"6px";G.style.display="inline-block";G.style.width="140px";mxUtils.write(G,mxResources.get("parentChildSpacing")+": ");J.appendChild(G);var U=document.createElement("input");U.type="number";U.value=K;U.style.width="200px";U.style.boxSizing="border-box";J.appendChild(U);mxEvent.addListener(U,"change",function(){K=U.value});G=document.createElement("div");G.style.marginTop="6px";G.style.display="inline-block";G.style.width="140px";mxUtils.write(G,mxResources.get("siblingSpacing")+": ");J.appendChild(G); +var V=document.createElement("input");V.type="number";V.value=D;V.style.width="200px";V.style.boxSizing="border-box";J.appendChild(V);mxEvent.addListener(V,"change",function(){D=V.value});J=new CustomDialog(e,J,function(){null==F&&(F=2);e.loadOrgChartLayouts(H)});e.showDialog(J.container,355,140,!0,!0)},p,null,v());t.addSeparator(p);t.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var F=new mxParallelEdgeLayout(u);F.checkOverlap=!0;e.prompt(mxResources.get("spacing"),F.spacing, +mxUtils.bind(this,function(K){F.spacing=K;e.executeLayout(function(){F.execute(u.getDefaultParent(),u.isSelectionEmpty()?null:u.getSelectionCells())},!1)}))}),p);t.addSeparator(p);e.menus.addMenuItem(t,"runLayout",p,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(t,p){if(!mxClient.IS_CHROMEAPP&&e.isOffline())this.addMenuItems(t,["about"],p);else{var F=t.addItem("Search:",null,null,p,null,null,!1);F.style.backgroundColor=Editor.isDarkMode()?"#505759": +"whiteSmoke";F.style.cursor="default";var K=document.createElement("input");K.setAttribute("type","text");K.setAttribute("size","25");K.style.marginLeft="8px";mxEvent.addListener(K,"keydown",mxUtils.bind(this,function(D){var H=mxUtils.trim(K.value);13==D.keyCode&&0<H.length?(this.editorUi.openLink("https://www.diagrams.net/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(H)),K.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search", +label:H}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==D.keyCode&&(K.value="")}));F.firstChild.nextSibling.appendChild(K);mxEvent.addGestureListeners(K,function(D){document.activeElement!=K&&K.focus();mxEvent.consume(D)},function(D){mxEvent.consume(D)},function(D){mxEvent.consume(D)});window.setTimeout(function(){K.focus()},0);EditorUi.isElectronApp?(e.actions.addAction("website...",function(){e.openLink("https://www.diagrams.net")}),e.actions.addAction("check4Updates", +function(){e.checkForUpdates()}),this.addMenuItems(t,"- keyboardShortcuts quickStart website support -".split(" "),p),"1"!=urlParams.disableUpdate&&this.addMenuItems(t,["check4Updates"],p),this.addMenuItems(t,["openDevTools","-","about"],p)):this.addMenuItems(t,"- keyboardShortcuts quickStart support - about".split(" "),p)}"1"==urlParams.test&&(t.addSeparator(p),this.addSubmenu("testDevelop",t,p))})));mxResources.parse("diagramLanguage=Diagram Language");e.actions.addAction("diagramLanguage...",function(){var t= prompt("Language Code",Graph.diagramLanguage||"");null!=t&&(Graph.diagramLanguage=0<t.length?t:null,u.refresh())});if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testInspectPages=Check Pages");mxResources.parse("testFixPages=Fix Pages");mxResources.parse("testInspect=Inspect"); -mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");mxResources.parse("testOptimize=Remove Inline Images");d.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!u.isSelectionEmpty()){var t=u.cloneCells(u.getSelectionCells()),p=u.getBoundingBoxFromGeometry(t);t=u.moveCells(t,-p.x,-p.y);d.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+p.width+", "+p.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(u.encodeCells(t)))+ -"'),")}}));d.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var t=u.getGraphBounds(),p=u.view.translate,F=u.view.scale;u.insertVertex(u.getDefaultParent(),null,"",t.x/F-p.x,t.y/F-p.y,t.width/F,t.height/F,"fillColor=none;strokeColor=red;")}));d.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var t=null!=d.pages&&null!=d.getCurrentFile()?d.getCurrentFile().getAnonymizedXmlForPages(d.pages):"";t=new TextareaDialog(d,"Paste Data:",t,function(p){if(0<p.length)try{var F= -function(E){function P(R){if(null==O[R]){if(O[R]=!0,null!=U[R]){for(;0<U[R].length;){var S=U[R].pop();P(S)}delete U[R]}}else mxLog.debug(T+": Visited: "+R)}var T=E.parentNode.id,W=E.childNodes;E={};for(var U={},V=null,l={},A=0;A<W.length;A++){var L=W[A];if(null!=L.id&&0<L.id.length)if(null==E[L.id]){E[L.id]=L.id;var Q=L.getAttribute("parent");null==Q?null!=V?mxLog.debug(T+": Multiple roots: "+L.id):V=L.id:(null==U[Q]&&(U[Q]=[]),U[Q].push(L.id))}else l[L.id]=L.id}W=Object.keys(l);0<W.length?(W=T+": "+ -W.length+" Duplicates: "+W.join(", "),mxLog.debug(W+" (see console)")):mxLog.debug(T+": Checked");var O={};null==V?mxLog.debug(T+": No root"):(P(V),Object.keys(O).length!=Object.keys(E).length&&(mxLog.debug(T+": Invalid tree: (see console)"),console.log(T+": Invalid tree",U)))};"<"!=p.charAt(0)&&(p=Graph.decompress(p),mxLog.debug("See console for uncompressed XML"),console.log("xml",p));var J=mxUtils.parseXml(p),M=d.getPagesForNode(J.documentElement,"mxGraphModel");if(null!=M&&0<M.length)try{var H= -d.getHashValueForPages(M);mxLog.debug("Checksum: ",H)}catch(E){mxLog.debug("Error: ",E.message)}else mxLog.debug("No pages found for checksum");var G=J.getElementsByTagName("root");for(p=0;p<G.length;p++)F(G[p]);mxLog.show()}catch(E){d.handleError(E),null!=window.console&&console.error(E)}});d.showDialog(t.container,620,460,!0,!0);t.init()}));var z=null;d.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=d.pages){var t=new TextareaDialog(d,"Diff/Sync:","",function(p){var F=d.getCurrentFile(); -if(0<p.length&&null!=F)try{var J=JSON.parse(p);F.patch([J],null,!0);d.hideDialog()}catch(M){d.handleError(M)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(p,F){z=d.getPagesForXml(d.getFileData(!0));t.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(z)}],["Diff",function(p,F){try{t.textarea.value=JSON.stringify(d.diffPages(z,d.pages),null,2)}catch(J){d.handleError(J)}}]]);null==z?(z=d.getPagesForXml(d.getFileData(!0)),t.textarea.value= -"Snapshot created "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(z)):t.textarea.value=JSON.stringify(d.diffPages(z,d.pages),null,2);d.showDialog(t.container,620,460,!0,!0);t.init()}else d.alert("No pages")}));d.actions.addAction("testInspectPages",mxUtils.bind(this,function(){var t=d.getCurrentFile();console.log("editorUi",d,"file",t);if(null!=t&&t.isRealtime()){console.log("Checksum ownPages",d.getHashValueForPages(t.ownPages));console.log("Checksum theirPages",d.getHashValueForPages(t.theirPages)); -console.log("diff ownPages/theirPages",d.diffPages(t.ownPages,t.theirPages));var p=t.getShadowPages();null!=p&&(console.log("Checksum shadowPages",d.getHashValueForPages(p)),console.log("diff shadowPages/ownPages",d.diffPages(p,t.ownPages)),console.log("diff ownPages/shadowPages",d.diffPages(t.ownPages,p)),console.log("diff theirPages/shadowPages",d.diffPages(t.theirPages,p)));null!=t.sync&&null!=t.sync.snapshot&&(console.log("Checksum snapshot",d.getHashValueForPages(t.sync.snapshot)),console.log("diff ownPages/snapshot", -d.diffPages(t.ownPages,t.sync.snapshot)),console.log("diff theirPages/snapshot",d.diffPages(t.theirPages,t.sync.snapshot)),null!=d.pages&&console.log("diff snapshot/actualPages",d.diffPages(t.sync.snapshot,d.pages)));null!=d.pages&&(console.log("diff ownPages/actualPages",d.diffPages(t.ownPages,d.pages)),console.log("diff theirPages/actualPages",d.diffPages(t.theirPages,d.pages)))}null!=t&&console.log("Shadow pages",[d.getXmlForPages(t.getShadowPages())]);null!=d.pages&&console.log("Checksum actualPages", -d.getHashValueForPages(d.pages))}));d.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",d);var t=d.getCurrentFile();null!=t&&t.isRealtime()&&null!=t.shadowPages&&(console.log("patching actualPages to shadowPages",t.patch([d.diffPages(t.shadowPages,d.pages)])),t.ownPages=d.clonePages(d.pages),t.theirPages=d.clonePages(d.pages),t.shadowPages=d.clonePages(d.pages),null!=t.sync&&(t.sync.snapshot=d.clonePages(d.pages)))}));d.actions.addAction("testOptimize",mxUtils.bind(this, -function(){u.model.beginUpdate();try{var t=u.model.cells,p=0,F=[],J=[],M;for(M in t){var H=t[M],G=u.getCurrentCellStyle(H)[mxConstants.STYLE_IMAGE];null!=G&&"data:"==G.substring(0,5)&&(null==F[G]&&(F[G]=(F[G]||0)+1,p++),J.push(H))}u.setCellStyles(mxConstants.STYLE_IMAGE,null,J);console.log("Removed",p,"image(s) from",J.length,"cell(s): ",[J,F])}finally{u.model.endUpdate()}}));d.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(d,u.getModel())}));d.actions.addAction("testXmlImageExport", -mxUtils.bind(this,function(){var t=new mxImageExport,p=u.getGraphBounds(),F=u.view.scale,J=mxUtils.createXmlDocument(),M=J.createElement("output");J.appendChild(M);J=new mxXmlCanvas2D(M);J.translate(Math.floor((1-p.x)/F),Math.floor((1-p.y)/F));J.scale(1/F);var H=0,G=J.save;J.save=function(){H++;G.apply(this,arguments)};var E=J.restore;J.restore=function(){H--;E.apply(this,arguments)};var P=t.drawShape;t.drawShape=function(T){mxLog.debug("entering shape",T,H);P.apply(this,arguments);mxLog.debug("leaving shape", -T,H)};t.drawState(u.getView().getState(u.model.root),J);mxLog.show();mxLog.debug(mxUtils.getXml(M));mxLog.debug("stateCounter",H)}));d.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});this.put("testDevelop",new Menu(mxUtils.bind(this,function(t,p){this.addMenuItems(t,"createSidebarEntry showBoundingBox - testInspectPages testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport - testShowConsole".split(" "), -p)})))}d.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!d.isOffline()?d.showDialog((new MoreShapesDialog(d,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):d.showDialog((new MoreShapesDialog(d,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});d.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(t){u.isEnabled()&&(t=new mxCell("",new mxGeometry(0,0,120,120),d.defaultCustomShapeStyle),t.vertex=!0,t=new EditShapeDialog(d, -t,mxResources.get("editShape")+":",630,400),d.showDialog(t.container,640,480,!0,!1),t.init())})).isEnabled=x;d.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(t){d.spinner.stop();d.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",t,function(p,F,J,M,H,G,E,P,T,W,U){d.createHtml(p,F,J,M,H,G,E,P,T,W,U,mxUtils.bind(this,function(V, -l){var A=new EmbedDialog(d,V+"\n"+l,null,null,function(){var L=window.open(),Q=L.document;if(null!=Q){"CSS1Compat"===document.compatMode&&Q.writeln("<!DOCTYPE html>");Q.writeln("<html>");Q.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');Q.writeln("<body>");Q.writeln(V);var O=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;O&&Q.writeln(l);Q.writeln("</body>");Q.writeln("</html>");Q.close();if(!O){var R=L.document.createElement("div"); -R.marginLeft="26px";R.marginTop="26px";mxUtils.write(R,mxResources.get("updatingDocument"));O=L.document.createElement("img");O.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");O.style.marginLeft="6px";R.appendChild(O);L.document.body.insertBefore(R,L.document.body.firstChild);window.setTimeout(function(){var S=document.createElement("script");S.type="text/javascript";S.src=/<script.*?src="(.*?)"/.exec(l)[1];Q.body.appendChild(S);R.parentNode.removeChild(R)}, -20)}}else d.handleError({message:mxResources.get("errorUpdatingPreview")})});d.showDialog(A.container,450,240,!0,!0);A.init()}))})})}));d.actions.put("liveImage",new Action("Live image...",function(){var t=d.getCurrentFile();null!=t&&d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(p){d.spinner.stop();null!=p?(p=new EmbedDialog(d,'<img src="'+(t.constructor!=DriveFile?p:"https://drive.google.com/uc?id="+t.getId())+'"/>'),d.showDialog(p.container, -450,240,!0,!0),p.init()):d.handleError({message:mxResources.get("invalidPublicUrl")})})}));d.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){d.showEmbedImageDialog(function(t,p,F,J,M,H){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedImage(t,p,F,J,M,H,function(G){d.spinner.stop();G=new EmbedDialog(d,G);d.showDialog(G.container,450,240,!0,!0);G.init()},function(G){d.spinner.stop();d.handleError(G)})},mxResources.get("image"),mxResources.get("retina"), -d.isExportToCanvas())}));d.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){d.showEmbedImageDialog(function(t,p,F,J,M,H){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedSvg(t,p,F,J,M,H,function(G){d.spinner.stop();G=new EmbedDialog(d,G);d.showDialog(G.container,450,240,!0,!0);G.init()},function(G){d.spinner.stop();d.handleError(G)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.diagrams.net/doc/faq/embed-svg.html")})); -d.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var t=u.getGraphBounds();d.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(t.height/u.view.scale)+2,function(p,F,J,M,H,G,E,P,T){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(W){d.spinner.stop();var U=[];T&&U.push("tags=%7B%7D");W=new EmbedDialog(d,'<iframe frameborder="0" style="width:'+E+";height:"+P+';" src="'+d.createLink(p,F,J,M,H,G,W,null, -U)+'"></iframe>');d.showDialog(W.container,450,240,!0,!0);W.init()})},!0)}));d.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var t=document.createElement("div");t.style.position="absolute";t.style.bottom="30px";t.style.textAlign="center";t.style.width="100%";t.style.left="0px";var p=document.createElement("a");p.setAttribute("href","javascript:void(0);");p.setAttribute("target","_blank");p.style.cursor="pointer";mxUtils.write(p,mxResources.get("getNotionChromeExtension")); -t.appendChild(p);mxEvent.addListener(p,"click",function(F){d.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(F)});d.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(F,J,M,H,G,E,P,T,W){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(U){d.spinner.stop();var V=["border=0"];W&&V.push("tags=%7B%7D");U=new EmbedDialog(d,d.createLink(F,J,M,H,G,E,U,null,V,!0)); -d.showDialog(U.container,450,240,!0,!0);U.init()})},!0,"https://www.diagrams.net/blog/drawio-notion",t)}));d.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){d.showPublishLinkDialog(null,null,null,null,function(t,p,F,J,M,H,G,E,P){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(T){d.spinner.stop();var W=[];P&&W.push("tags=%7B%7D");T=new EmbedDialog(d,d.createLink(t,p,F,J,M,H,T,null,W));d.showDialog(T.container,450,240, -!0,!0);T.init()})})}));d.actions.addAction("microsoftOffice...",function(){d.openLink("https://office.draw.io")});d.actions.addAction("googleDocs...",function(){d.openLink("http://docsaddon.draw.io")});d.actions.addAction("googleSlides...",function(){d.openLink("https://slidesaddon.draw.io")});d.actions.addAction("googleSheets...",function(){d.openLink("https://sheetsaddon.draw.io")});d.actions.addAction("googleSites...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(), -function(t){d.spinner.stop();t=new GoogleSitesDialog(d,t);d.showDialog(t.container,420,256,!0,!0);t.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)e=d.actions.addAction("scratchpad",function(){d.toggleScratchpad()}),e.setToggleAction(!0),e.setSelectedCallback(function(){return null!=d.scratchpad}),"0"!=urlParams.plugins&&d.actions.addAction("plugins...",function(){d.showDialog((new PluginsDialog(d)).container,380,240,!0,!1)});e=d.actions.addAction("search",function(){var t=d.sidebar.isEntryVisible("search"); -d.sidebar.showPalette("search",!t);isLocalStorage&&(mxSettings.settings.search=!t,mxSettings.save())});e.label=mxResources.get("searchShapes");e.setToggleAction(!0);e.setSelectedCallback(function(){return d.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(d.actions.get("save").funct=function(t){u.isEditing()&&u.stopEditing();var p="0"!=urlParams.pages||null!=d.pages&&1<d.pages.length?d.getFileData(!0):mxUtils.getXml(d.editor.getGraphXml());if("json"==urlParams.proto){var F=d.createLoadMessage("save"); -F.xml=p;t&&(F.exit=!0);p=JSON.stringify(F)}(window.opener||window.parent).postMessage(p,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(d.editor.modified=!1,d.editor.setStatus(""));t=d.getCurrentFile();null==t||t.constructor==EmbedFile||t.constructor==LocalFile&&null==t.mode||d.saveFile()},d.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?d.sendEmbeddedSvgExport():d.actions.get("save").funct(!0)}).label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"), -d.actions.addAction("exit",function(){if("1"==urlParams.embedInline)d.sendEmbeddedSvgExport();else{var t=function(){d.editor.modified=!1;var p="json"==urlParams.proto?JSON.stringify({event:"exit",modified:d.editor.modified}):"";(window.opener||window.parent).postMessage(p,"*")};d.editor.modified?d.confirm(mxResources.get("allChangesLost"),null,t,mxResources.get("cancel"),mxResources.get("discardChanges")):t()}}));this.put("exportAs",new Menu(mxUtils.bind(this,function(t,p){d.isExportToCanvas()?(this.addMenuItems(t, -["exportPng"],p),d.jpgSupported&&this.addMenuItems(t,["exportJpg"],p)):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(t,["exportPng","exportJpg"],p);this.addMenuItems(t,["exportSvg","-"],p);d.isOffline()||d.printPdfExport?this.addMenuItems(t,["exportPdf"],p):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(t,["exportPdf"],p);mxClient.IS_IE||"undefined"===typeof VsdxExport&&d.isOffline()||this.addMenuItems(t,["exportVsdx"],p);this.addMenuItems(t,["-", -"exportHtml","exportXml","exportUrl"],p);d.isOffline()||(t.addSeparator(p),this.addMenuItem(t,"export",p).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(t,p){function F(H){H.pickFile(function(G){d.spinner.spin(document.body,mxResources.get("loading"))&&H.getFile(G,function(E){var P="data:image/"==E.getData().substring(0,11)?M(E.getTitle()):"text/xml";/\.svg$/i.test(E.getTitle())&&!d.editor.isDataSvg(E.getData())&&(E.setData(Editor.createSvgDataUri(E.getData())), -P="image/svg+xml");J(E.getData(),P,E.getTitle())},function(E){d.handleError(E,null!=E?mxResources.get("errorLoadingFile"):null)},H==d.drive)},!0)}var J=mxUtils.bind(this,function(H,G,E){var P=u.view,T=u.getGraphBounds(),W=u.snap(Math.ceil(Math.max(0,T.x/P.scale-P.translate.x)+4*u.gridSize)),U=u.snap(Math.ceil(Math.max(0,(T.y+T.height)/P.scale-P.translate.y)+4*u.gridSize));"data:image/"==H.substring(0,11)?d.loadImage(H,mxUtils.bind(this,function(V){var l=!0,A=mxUtils.bind(this,function(){d.resizeImage(V, -H,mxUtils.bind(this,function(L,Q,O){L=l?Math.min(1,Math.min(d.maxImageSize/Q,d.maxImageSize/O)):1;d.importFile(H,G,W,U,Math.round(Q*L),Math.round(O*L),E,function(R){d.spinner.stop();u.setSelectionCells(R);u.scrollCellToVisible(u.getSelectionCell())})}),l)});H.length>d.resampleThreshold?d.confirmImageResize(function(L){l=L;A()}):A()}),mxUtils.bind(this,function(){d.handleError({message:mxResources.get("cannotOpenFile")})})):d.importFile(H,G,W,U,0,0,E,function(V){d.spinner.stop();u.setSelectionCells(V); -u.scrollCellToVisible(u.getSelectionCell())})}),M=mxUtils.bind(this,function(H){var G="text/xml";/\.png$/i.test(H)?G="image/png":/\.jpe?g$/i.test(H)?G="image/jpg":/\.gif$/i.test(H)?G="image/gif":/\.pdf$/i.test(H)&&(G="application/pdf");return G});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?t.addItem(mxResources.get("googleDrive")+"...",null,function(){F(d.drive)},p):B&&"function"===typeof window.DriveClient&&t.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+ -"...)",null,function(){},p,null,!1));null!=d.oneDrive?t.addItem(mxResources.get("oneDrive")+"...",null,function(){F(d.oneDrive)},p):K&&"function"===typeof window.OneDriveClient&&t.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);null!=d.dropbox?t.addItem(mxResources.get("dropbox")+"...",null,function(){F(d.dropbox)},p):D&&"function"===typeof window.DropboxClient&&t.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null, -function(){},p,null,!1);t.addSeparator(p);null!=d.gitHub&&t.addItem(mxResources.get("github")+"...",null,function(){F(d.gitHub)},p);null!=d.gitLab&&t.addItem(mxResources.get("gitlab")+"...",null,function(){F(d.gitLab)},p);null!=d.trello?t.addItem(mxResources.get("trello")+"...",null,function(){F(d.trello)},p):c&&"function"===typeof window.TrelloClient&&t.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);t.addSeparator(p);isLocalStorage&&"0"!=urlParams.browser&& -t.addItem(mxResources.get("browser")+"...",null,function(){d.importLocalFile(!1)},p);"1"!=urlParams.noDevice&&t.addItem(mxResources.get("device")+"...",null,function(){d.importLocalFile(!0)},p);d.isOffline()||(t.addSeparator(p),t.addItem(mxResources.get("url")+"...",null,function(){var H=new FilenameDialog(d,"",mxResources.get("import"),function(G){if(null!=G&&0<G.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var E=/(\.png)($|\?)/i.test(G)?"image/png":"text/xml";d.editor.loadUrl(PROXY_URL+ -"?url="+encodeURIComponent(G),function(P){J(P,E,G)},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==E)}},mxResources.get("url"));d.showDialog(H.container,300,80,!0,!0);H.init()},p))}))).isEnabled=x;this.put("theme",new Menu(mxUtils.bind(this,function(t,p){var F="1"==urlParams.sketch?"sketch":mxSettings.getUi(),J=t.addItem(mxResources.get("automatic"),null,function(){d.setCurrentTheme("")},p);"kennedy"!=F&&"atlas"!=F&&"dark"!=F&&"min"!=F&&"sketch"!= -F&&t.addCheckmark(J,Editor.checkmarkImage);t.addSeparator(p);J=t.addItem(mxResources.get("default"),null,function(){d.setCurrentTheme("kennedy")},p);"kennedy"!=F&&"dark"!=F||t.addCheckmark(J,Editor.checkmarkImage);J=t.addItem(mxResources.get("minimal"),null,function(){d.setCurrentTheme("min")},p);"min"==F&&t.addCheckmark(J,Editor.checkmarkImage);J=t.addItem(mxResources.get("atlas"),null,function(){d.setCurrentTheme("atlas")},p);"atlas"==F&&t.addCheckmark(J,Editor.checkmarkImage);J=t.addItem(mxResources.get("sketch"), -null,function(){d.setCurrentTheme("sketch")},p);"sketch"==F&&t.addCheckmark(J,Editor.checkmarkImage);t.addSeparator(p);("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(t,["toggleDarkMode"],p)})));e=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var t=this.editorUi.getCurrentFile();if(null!=t)if(t.constructor==LocalFile&&null!=t.fileHandle)d.showSaveFilePicker(mxUtils.bind(d,function(F,J){t.invalidFileHandle=null;t.fileHandle= -F;t.title=J.name;t.desc=J;d.save(J.name)}),null,d.createFileSystemOptions(t.getTitle()));else{var p=null!=t.getTitle()?t.getTitle():this.editorUi.defaultFilename;p=new FilenameDialog(this.editorUi,p,mxResources.get("rename"),mxUtils.bind(this,function(F){null!=F&&0<F.length&&null!=t&&F!=t.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&t.rename(F,mxUtils.bind(this,function(J){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(J){this.editorUi.handleError(J, -null!=J?mxResources.get("errorRenamingFile"):null)}))}),t.constructor==DriveFile||t.constructor==StorageFile?mxResources.get("diagramName"):null,function(F){if(null!=F&&0<F.length)return!0;d.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,d.editor.fileExtensions);this.editorUi.showDialog(p.container,340,96,!0,!0);p.init()}}));e.isEnabled=function(){return this.enabled&&x.apply(this,arguments)};e.visible="1"!=urlParams.embed;d.actions.addAction("makeCopy...", -mxUtils.bind(this,function(){var t=d.getCurrentFile();if(null!=t){var p=d.getCopyFilename(t);t.constructor==DriveFile?(p=new CreateDialog(d,p,mxUtils.bind(this,function(F,J){"_blank"==J?d.editor.editAsNew(d.getFileData(),F):("download"==J&&(J=App.MODE_GOOGLE),null!=F&&0<F.length&&(J==App.MODE_GOOGLE?d.spinner.spin(document.body,mxResources.get("saving"))&&t.saveAs(F,mxUtils.bind(this,function(M){t.desc=M;t.save(!1,mxUtils.bind(this,function(){d.spinner.stop();t.setModified(!1);t.addAllSavedStatus()}), -mxUtils.bind(this,function(H){d.handleError(H)}))}),mxUtils.bind(this,function(M){d.handleError(M)})):d.createFile(F,d.getFileData(!0),null,J)))}),mxUtils.bind(this,function(){d.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,!0,null,!0,null,null,null,null,d.editor.fileExtensions),d.showDialog(p.container,420,380,!0,!0),p.init()):d.editor.editAsNew(this.editorUi.getFileData(!0),p)}}));d.actions.put("openFolder",new Action(mxResources.get("openIt",[mxResources.get("folder")])+ -"...",function(t,p){d.appIconClicked(p)}));d.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var t=d.getCurrentFile();if(t.getMode()==App.MODE_GOOGLE||t.getMode()==App.MODE_ONEDRIVE){var p=!1;if(t.getMode()==App.MODE_GOOGLE&&null!=t.desc.parents)for(var F=0;F<t.desc.parents.length;F++)if(t.desc.parents[F].isRoot){p=!0;break}d.pickFolder(t.getMode(),mxUtils.bind(this,function(J){d.spinner.spin(document.body,mxResources.get("moving"))&&t.move(J,mxUtils.bind(this,function(M){d.spinner.stop()}), -mxUtils.bind(this,function(M){d.handleError(M)}))}),null,!0,p)}}));this.put("publish",new Menu(mxUtils.bind(this,function(t,p){this.addMenuItems(t,["publishLink"],p)})));d.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){d.openLink("https://app.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var t=d.getCurrentFile();null!=t&&t.share()}catch(p){d.handleError(p)}}));this.put("embed",new Menu(mxUtils.bind(this,function(t,p){var F= -d.getCurrentFile();null==F||F.getMode()!=App.MODE_GOOGLE&&F.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(F.getTitle())||this.addMenuItems(t,["liveImage","-"],p);this.addMenuItems(t,["embedImage","embedSvg","-","embedHtml"],p);navigator.standalone||d.isOffline()||this.addMenuItems(t,["embedIframe"],p);"1"==urlParams.embed||d.isOffline()||this.addMenuItems(t,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),p)})));d.addInsertItem=function(t,p,F,J){("plantUml"!=J|| -EditorUi.enablePlantUml&&!d.isOffline())&&t.addItem(F,null,mxUtils.bind(this,function(){if("fromText"==J||"formatSql"==J||"plantUml"==J||"mermaid"==J){var M=new ParseDialog(d,F,J);d.showDialog(M.container,620,420,!0,!1);d.dialog.container.style.overflow="auto"}else M=new CreateGraphDialog(d,F,J),d.showDialog(M.container,620,420,!0,!1);M.init()}),p,null,x())};var C=function(t){u.getModel().beginUpdate();try{t=u.addCell(t),u.fireEvent(new mxEventObject("cellsInserted","cells",[t]))}finally{u.getModel().endUpdate()}u.scrollCellToVisible(t); -u.setSelectionCell(t);u.container.focus();u.editAfterInsert&&u.startEditing(t);window.setTimeout(function(){null!=d.hoverIcons&&d.hoverIcons.update(u.view.getState(t))},0);return t},v=function(t,p,F,J,M){t=new mxCell(t,new mxGeometry(0,0,p,F),J);t.vertex=!0;null==M&&(M=u.getCenterInsertPoint(u.getBoundingBoxFromGeometry([t],!0)));t.geometry.x=M.x;t.geometry.y=M.y;return C(t)};d.actions.put("insertText",new Action(mxResources.get("text"),function(t){u.isEnabled()&&!u.isCellLocked(u.getDefaultParent())&& -u.startEditingAtCell(v("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;",null==t||mxEvent.isControlDown(t)||mxEvent.isMetaDown(t)?null:u.getInsertPoint()))},null,null,Editor.ctrlKey+"+Shift+X/A")).isEnabled=x;d.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(t){u.isEnabled()&&!u.isCellLocked(u.getDefaultParent())&&v("",120,60,"whiteSpace=wrap;html=1;",null==t||mxEvent.isControlDown(t)|| -mxEvent.isMetaDown(t)?null:u.getInsertPoint())},null,null,"D")).isEnabled=x;d.actions.put("insertNote",new Action(mxResources.get("note"),function(t){u.isEnabled()&&!u.isCellLocked(u.getDefaultParent())&&v("",140,160,"shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",null==t||mxEvent.isControlDown(t)||mxEvent.isMetaDown(t)? -null:u.getInsertPoint())},null,null,"S")).isEnabled=x;d.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(t){u.isEnabled()&&!u.isCellLocked(u.getDefaultParent())&&v("",80,80,"ellipse;whiteSpace=wrap;html=1;",null==t||mxEvent.isControlDown(t)||mxEvent.isMetaDown(t)?null:u.getInsertPoint())},null,null,"F")).isEnabled=x;d.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(t){u.isEnabled()&&!u.isCellLocked(u.getDefaultParent())&&v("",80,80,"rhombus;whiteSpace=wrap;html=1;", -null==t||mxEvent.isControlDown(t)||mxEvent.isMetaDown(t)?null:u.getInsertPoint())})).isEnabled=x;d.actions.put("insertEdge",new Action(mxResources.get("line"),function(t){if(u.isEnabled()&&!u.isCellLocked(u.getDefaultParent())){var p=u.defaultEdgeLength;t=null==t||mxEvent.isControlDown(t)||mxEvent.isMetaDown(t)?null:u.getInsertPoint();null==t&&(t=u.getCenterInsertPoint(u.getBoundingBoxFromGeometry([F],!0)));var F=new mxCell("",new mxGeometry(0,0,p,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;"); -F.geometry.setTerminalPoint(t,!0);F.geometry.setTerminalPoint(new mxPoint(t.x+F.geometry.width,t.y),!1);F.geometry.points=[];F.geometry.relative=!0;F.edge=!0;C(F)}},null,null,"C")).isEnabled=x;d.addInsertMenuItems=mxUtils.bind(this,function(t,p,F){for(var J=0;J<F.length;J++)"-"==F[J]?t.addSeparator(p):d.addInsertItem(t,p,mxResources.get(F[J])+"...",F[J])});this.put("insert",new Menu(mxUtils.bind(this,function(t,p){this.addMenuItems(t,"insertRectangle insertEllipse insertRhombus - insertEdge insertNote - insertText insertLink - createShape insertFreehand - insertImage".split(" "), -p);d.insertTemplateEnabled&&!d.isOffline()&&this.addMenuItems(t,["insertTemplate"],p);t.addSeparator(p);this.addSubmenu("insertLayout",t,p,mxResources.get("layout"));this.addSubmenu("insertAdvanced",t,p,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(t,p){d.addInsertMenuItems(t,p,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(t,p){d.addInsertMenuItems(t, -p,["fromText","plantUml","mermaid","-","formatSql"]);t.addItem(mxResources.get("csv")+"...",null,function(){d.showImportCsvDialog()},p,null,x())})));this.put("openRecent",new Menu(function(t,p){var F=d.getRecent();if(null!=F){for(var J=0;J<F.length;J++)(function(M){var H=M.mode;H==App.MODE_GOOGLE?H="googleDrive":H==App.MODE_ONEDRIVE&&(H="oneDrive");t.addItem(M.title+" ("+mxResources.get(H)+")",null,function(){d.loadFile(M.id)},p)})(F[J]);t.addSeparator(p)}t.addItem(mxResources.get("reset"),null,function(){d.resetRecent()}, -p)}));this.put("openFrom",new Menu(function(t,p){null!=d.drive?t.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickFile(App.MODE_GOOGLE)},p):B&&"function"===typeof window.DriveClient&&t.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);null!=d.oneDrive?t.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickFile(App.MODE_ONEDRIVE)},p):K&&"function"===typeof window.OneDriveClient&&t.addItem(mxResources.get("oneDrive")+ -" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);null!=d.dropbox?t.addItem(mxResources.get("dropbox")+"...",null,function(){d.pickFile(App.MODE_DROPBOX)},p):D&&"function"===typeof window.DropboxClient&&t.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);t.addSeparator(p);null!=d.gitHub&&t.addItem(mxResources.get("github")+"...",null,function(){d.pickFile(App.MODE_GITHUB)},p);null!=d.gitLab&&t.addItem(mxResources.get("gitlab")+ -"...",null,function(){d.pickFile(App.MODE_GITLAB)},p);null!=d.trello?t.addItem(mxResources.get("trello")+"...",null,function(){d.pickFile(App.MODE_TRELLO)},p):c&&"function"===typeof window.TrelloClient&&t.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);t.addSeparator(p);isLocalStorage&&"0"!=urlParams.browser&&t.addItem(mxResources.get("browser")+"...",null,function(){d.pickFile(App.MODE_BROWSER)},p);"1"!=urlParams.noDevice&&t.addItem(mxResources.get("device")+ -"...",null,function(){d.pickFile(App.MODE_DEVICE)},p);d.isOffline()||(t.addSeparator(p),t.addItem(mxResources.get("url")+"...",null,function(){var F=new FilenameDialog(d,"",mxResources.get("open"),function(J){null!=J&&0<J.length&&(null==d.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(J):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(J)))},mxResources.get("url"));d.showDialog(F.container,300, -80,!0,!0);F.init()},p))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(t,p){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?t.addItem(mxResources.get("googleDrive")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},p):B&&"function"===typeof window.DriveClient&&t.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1));null!=d.oneDrive?t.addItem(mxResources.get("oneDrive")+ -"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},p):K&&"function"===typeof window.OneDriveClient&&t.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);null!=d.dropbox?t.addItem(mxResources.get("dropbox")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},p):D&&"function"===typeof window.DropboxClient&&t.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){}, -p,null,!1);t.addSeparator(p);null!=d.gitHub&&t.addItem(mxResources.get("github")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},p);null!=d.gitLab&&t.addItem(mxResources.get("gitlab")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},p);null!=d.trello?t.addItem(mxResources.get("trello")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},p):c&&"function"===typeof window.TrelloClient&&t.addItem(mxResources.get("trello")+ -" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);t.addSeparator(p);isLocalStorage&&"0"!=urlParams.browser&&t.addItem(mxResources.get("browser")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},p);"1"!=urlParams.noDevice&&t.addItem(mxResources.get("device")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},p)})),this.put("openLibraryFrom",new Menu(function(t,p){"undefined"!=typeof google&&"undefined"!=typeof google.picker&& -(null!=d.drive?t.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickLibrary(App.MODE_GOOGLE)},p):B&&"function"===typeof window.DriveClient&&t.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1));null!=d.oneDrive?t.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickLibrary(App.MODE_ONEDRIVE)},p):K&&"function"===typeof window.OneDriveClient&&t.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)", -null,function(){},p,null,!1);null!=d.dropbox?t.addItem(mxResources.get("dropbox")+"...",null,function(){d.pickLibrary(App.MODE_DROPBOX)},p):D&&"function"===typeof window.DropboxClient&&t.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);t.addSeparator(p);null!=d.gitHub&&t.addItem(mxResources.get("github")+"...",null,function(){d.pickLibrary(App.MODE_GITHUB)},p);null!=d.gitLab&&t.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickLibrary(App.MODE_GITLAB)}, -p);null!=d.trello?t.addItem(mxResources.get("trello")+"...",null,function(){d.pickLibrary(App.MODE_TRELLO)},p):c&&"function"===typeof window.TrelloClient&&t.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);t.addSeparator(p);isLocalStorage&&"0"!=urlParams.browser&&t.addItem(mxResources.get("browser")+"...",null,function(){d.pickLibrary(App.MODE_BROWSER)},p);"1"!=urlParams.noDevice&&t.addItem(mxResources.get("device")+"...",null,function(){d.pickLibrary(App.MODE_DEVICE)}, -p);d.isOffline()||(t.addSeparator(p),t.addItem(mxResources.get("url")+"...",null,function(){var F=new FilenameDialog(d,"",mxResources.get("open"),function(J){if(null!=J&&0<J.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var M=J;d.editor.isCorsEnabledForUrl(J)||(M=PROXY_URL+"?url="+encodeURIComponent(J));mxUtils.get(M,function(H){if(200<=H.getStatus()&&299>=H.getStatus()){d.spinner.stop();try{d.loadLibrary(new UrlLibrary(this,H.getText(),J))}catch(G){d.handleError(G,mxResources.get("errorLoadingFile"))}}else d.spinner.stop(), -d.handleError(null,mxResources.get("errorLoadingFile"))},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));d.showDialog(F.container,300,80,!0,!0);F.init()},p));"1"==urlParams.confLib&&(t.addSeparator(p),t.addItem(mxResources.get("confluenceCloud")+"...",null,function(){d.showRemotelyStoredLibrary(mxResources.get("libraries"))},p))})));this.put("edit",new Menu(mxUtils.bind(this,function(t,p){this.addMenuItems(t,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))}))); -e=d.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(d,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){d.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("comments"));else{var t=!this.commentsWindow.window.isVisible(); -this.commentsWindow.window.setVisible(t);this.commentsWindow.refreshCommentsTime();t&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));e.setToggleAction(!0);e.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));d.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));e=this.get("viewPanels");var y=e.funct;e.funct= -function(t,p){y.apply(this,arguments);d.menus.addMenuItems(t,["tags"],p);d.commentsSupported()&&d.menus.addMenuItems(t,["comments"],p)};this.put("view",new Menu(mxUtils.bind(this,function(t,p){this.addMenuItems(t,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","tags"]).concat(d.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(t,["-","search"],p);if(isLocalStorage||mxClient.IS_CHROMEAPP){var F=this.addMenuItem(t,"scratchpad",p);(!d.isOffline()||mxClient.IS_CHROMEAPP|| +mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");mxResources.parse("testOptimize=Remove Inline Images");e.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!u.isSelectionEmpty()){var t=u.cloneCells(u.getSelectionCells()),p=u.getBoundingBoxFromGeometry(t);t=u.moveCells(t,-p.x,-p.y);e.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+p.width+", "+p.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(u.encodeCells(t)))+ +"'),")}}));e.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var t=u.getGraphBounds(),p=u.view.translate,F=u.view.scale;u.insertVertex(u.getDefaultParent(),null,"",t.x/F-p.x,t.y/F-p.y,t.width/F,t.height/F,"fillColor=none;strokeColor=red;")}));e.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var t=null!=e.pages&&null!=e.getCurrentFile()?e.getCurrentFile().getAnonymizedXmlForPages(e.pages):"";t=new TextareaDialog(e,"Paste Data:",t,function(p){if(0<p.length)try{var F= +function(G){function P(R){if(null==O[R]){if(O[R]=!0,null!=U[R]){for(;0<U[R].length;){var S=U[R].pop();P(S)}delete U[R]}}else mxLog.debug(T+": Visited: "+R)}var T=G.parentNode.id,W=G.childNodes;G={};for(var U={},V=null,l={},A=0;A<W.length;A++){var M=W[A];if(null!=M.id&&0<M.id.length)if(null==G[M.id]){G[M.id]=M.id;var Q=M.getAttribute("parent");null==Q?null!=V?mxLog.debug(T+": Multiple roots: "+M.id):V=M.id:(null==U[Q]&&(U[Q]=[]),U[Q].push(M.id))}else l[M.id]=M.id}W=Object.keys(l);0<W.length?(W=T+": "+ +W.length+" Duplicates: "+W.join(", "),mxLog.debug(W+" (see console)")):mxLog.debug(T+": Checked");var O={};null==V?mxLog.debug(T+": No root"):(P(V),Object.keys(O).length!=Object.keys(G).length&&(mxLog.debug(T+": Invalid tree: (see console)"),console.log(T+": Invalid tree",U)))};"<"!=p.charAt(0)&&(p=Graph.decompress(p),mxLog.debug("See console for uncompressed XML"),console.log("xml",p));var K=mxUtils.parseXml(p),D=e.getPagesForNode(K.documentElement,"mxGraphModel");if(null!=D&&0<D.length)try{var H= +e.getHashValueForPages(D);mxLog.debug("Checksum: ",H)}catch(G){mxLog.debug("Error: ",G.message)}else mxLog.debug("No pages found for checksum");var J=K.getElementsByTagName("root");for(p=0;p<J.length;p++)F(J[p]);mxLog.show()}catch(G){e.handleError(G),null!=window.console&&console.error(G)}});e.showDialog(t.container,620,460,!0,!0);t.init()}));var z=null;e.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=e.pages){var t=new TextareaDialog(e,"Diff/Sync:","",function(p){var F=e.getCurrentFile(); +if(0<p.length&&null!=F)try{var K=JSON.parse(p);F.patch([K],null,!0);e.hideDialog()}catch(D){e.handleError(D)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(p,F){z=e.getPagesForXml(e.getFileData(!0));t.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+e.getHashValueForPages(z)}],["Diff",function(p,F){try{t.textarea.value=JSON.stringify(e.diffPages(z,e.pages),null,2)}catch(K){e.handleError(K)}}]]);null==z?(z=e.getPagesForXml(e.getFileData(!0)),t.textarea.value= +"Snapshot created "+(new Date).toLocaleString()+" Checksum "+e.getHashValueForPages(z)):t.textarea.value=JSON.stringify(e.diffPages(z,e.pages),null,2);e.showDialog(t.container,620,460,!0,!0);t.init()}else e.alert("No pages")}));e.actions.addAction("testInspectPages",mxUtils.bind(this,function(){var t=e.getCurrentFile();console.log("editorUi",e,"file",t);if(null!=t&&t.isRealtime()){console.log("Checksum ownPages",e.getHashValueForPages(t.ownPages));console.log("Checksum theirPages",e.getHashValueForPages(t.theirPages)); +console.log("diff ownPages/theirPages",e.diffPages(t.ownPages,t.theirPages));var p=t.getShadowPages();null!=p&&(console.log("Checksum shadowPages",e.getHashValueForPages(p)),console.log("diff shadowPages/ownPages",e.diffPages(p,t.ownPages)),console.log("diff ownPages/shadowPages",e.diffPages(t.ownPages,p)),console.log("diff theirPages/shadowPages",e.diffPages(t.theirPages,p)));null!=t.sync&&null!=t.sync.snapshot&&(console.log("Checksum snapshot",e.getHashValueForPages(t.sync.snapshot)),console.log("diff ownPages/snapshot", +e.diffPages(t.ownPages,t.sync.snapshot)),console.log("diff theirPages/snapshot",e.diffPages(t.theirPages,t.sync.snapshot)),null!=e.pages&&console.log("diff snapshot/actualPages",e.diffPages(t.sync.snapshot,e.pages)));null!=e.pages&&(console.log("diff ownPages/actualPages",e.diffPages(t.ownPages,e.pages)),console.log("diff theirPages/actualPages",e.diffPages(t.theirPages,e.pages)))}null!=t&&console.log("Shadow pages",[e.getXmlForPages(t.getShadowPages())]);null!=e.pages&&console.log("Checksum actualPages", +e.getHashValueForPages(e.pages))}));e.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",e);var t=e.getCurrentFile();null!=t&&t.isRealtime()&&null!=t.shadowPages&&(console.log("patching actualPages to shadowPages",t.patch([e.diffPages(t.shadowPages,e.pages)])),t.ownPages=e.clonePages(e.pages),t.theirPages=e.clonePages(e.pages),t.shadowPages=e.clonePages(e.pages),null!=t.sync&&(t.sync.snapshot=e.clonePages(e.pages)))}));e.actions.addAction("testOptimize",mxUtils.bind(this, +function(){u.model.beginUpdate();try{var t=u.model.cells,p=0,F=[],K=[],D;for(D in t){var H=t[D],J=u.getCurrentCellStyle(H)[mxConstants.STYLE_IMAGE];null!=J&&"data:"==J.substring(0,5)&&(null==F[J]&&(F[J]=(F[J]||0)+1,p++),K.push(H))}u.setCellStyles(mxConstants.STYLE_IMAGE,null,K);console.log("Removed",p,"image(s) from",K.length,"cell(s): ",[K,F])}finally{u.model.endUpdate()}}));e.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(e,u.getModel())}));e.actions.addAction("testXmlImageExport", +mxUtils.bind(this,function(){var t=new mxImageExport,p=u.getGraphBounds(),F=u.view.scale,K=mxUtils.createXmlDocument(),D=K.createElement("output");K.appendChild(D);K=new mxXmlCanvas2D(D);K.translate(Math.floor((1-p.x)/F),Math.floor((1-p.y)/F));K.scale(1/F);var H=0,J=K.save;K.save=function(){H++;J.apply(this,arguments)};var G=K.restore;K.restore=function(){H--;G.apply(this,arguments)};var P=t.drawShape;t.drawShape=function(T){mxLog.debug("entering shape",T,H);P.apply(this,arguments);mxLog.debug("leaving shape", +T,H)};t.drawState(u.getView().getState(u.model.root),K);mxLog.show();mxLog.debug(mxUtils.getXml(D));mxLog.debug("stateCounter",H)}));e.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});this.put("testDevelop",new Menu(mxUtils.bind(this,function(t,p){this.addMenuItems(t,"createSidebarEntry showBoundingBox - testInspectPages testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport - testShowConsole".split(" "), +p)})))}e.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!e.isOffline()?e.showDialog((new MoreShapesDialog(e,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):e.showDialog((new MoreShapesDialog(e,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});e.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(t){u.isEnabled()&&(t=new mxCell("",new mxGeometry(0,0,120,120),e.defaultCustomShapeStyle),t.vertex=!0,t=new EditShapeDialog(e, +t,mxResources.get("editShape")+":",630,400),e.showDialog(t.container,640,480,!0,!1),t.init())})).isEnabled=v;e.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){e.spinner.spin(document.body,mxResources.get("loading"))&&e.getPublicUrl(e.getCurrentFile(),function(t){e.spinner.stop();e.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",t,function(p,F,K,D,H,J,G,P,T,W,U){e.createHtml(p,F,K,D,H,J,G,P,T,W,U,mxUtils.bind(this,function(V, +l){var A=new EmbedDialog(e,V+"\n"+l,null,null,function(){var M=window.open(),Q=M.document;if(null!=Q){"CSS1Compat"===document.compatMode&&Q.writeln("<!DOCTYPE html>");Q.writeln("<html>");Q.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');Q.writeln("<body>");Q.writeln(V);var O=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;O&&Q.writeln(l);Q.writeln("</body>");Q.writeln("</html>");Q.close();if(!O){var R=M.document.createElement("div"); +R.marginLeft="26px";R.marginTop="26px";mxUtils.write(R,mxResources.get("updatingDocument"));O=M.document.createElement("img");O.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");O.style.marginLeft="6px";R.appendChild(O);M.document.body.insertBefore(R,M.document.body.firstChild);window.setTimeout(function(){var S=document.createElement("script");S.type="text/javascript";S.src=/<script.*?src="(.*?)"/.exec(l)[1];Q.body.appendChild(S);R.parentNode.removeChild(R)}, +20)}}else e.handleError({message:mxResources.get("errorUpdatingPreview")})});e.showDialog(A.container,450,240,!0,!0);A.init()}))})})}));e.actions.put("liveImage",new Action("Live image...",function(){var t=e.getCurrentFile();null!=t&&e.spinner.spin(document.body,mxResources.get("loading"))&&e.getPublicUrl(e.getCurrentFile(),function(p){e.spinner.stop();null!=p?(p=new EmbedDialog(e,'<img src="'+(t.constructor!=DriveFile?p:"https://drive.google.com/uc?id="+t.getId())+'"/>'),e.showDialog(p.container, +450,240,!0,!0),p.init()):e.handleError({message:mxResources.get("invalidPublicUrl")})})}));e.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){e.showEmbedImageDialog(function(t,p,F,K,D,H){e.spinner.spin(document.body,mxResources.get("loading"))&&e.createEmbedImage(t,p,F,K,D,H,function(J){e.spinner.stop();J=new EmbedDialog(e,J);e.showDialog(J.container,450,240,!0,!0);J.init()},function(J){e.spinner.stop();e.handleError(J)})},mxResources.get("image"),mxResources.get("retina"), +e.isExportToCanvas())}));e.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){e.showEmbedImageDialog(function(t,p,F,K,D,H){e.spinner.spin(document.body,mxResources.get("loading"))&&e.createEmbedSvg(t,p,F,K,D,H,function(J){e.spinner.stop();J=new EmbedDialog(e,J);e.showDialog(J.container,450,240,!0,!0);J.init()},function(J){e.spinner.stop();e.handleError(J)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.diagrams.net/doc/faq/embed-svg.html")})); +e.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var t=u.getGraphBounds();e.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(t.height/u.view.scale)+2,function(p,F,K,D,H,J,G,P,T){e.spinner.spin(document.body,mxResources.get("loading"))&&e.getPublicUrl(e.getCurrentFile(),function(W){e.spinner.stop();var U=[];T&&U.push("tags=%7B%7D");W=new EmbedDialog(e,'<iframe frameborder="0" style="width:'+G+";height:"+P+';" src="'+e.createLink(p,F,K,D,H,J,W,null, +U)+'"></iframe>');e.showDialog(W.container,450,240,!0,!0);W.init()})},!0)}));e.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var t=document.createElement("div");t.style.position="absolute";t.style.bottom="30px";t.style.textAlign="center";t.style.width="100%";t.style.left="0px";var p=document.createElement("a");p.setAttribute("href","javascript:void(0);");p.setAttribute("target","_blank");p.style.cursor="pointer";mxUtils.write(p,mxResources.get("getNotionChromeExtension")); +t.appendChild(p);mxEvent.addListener(p,"click",function(F){e.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(F)});e.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(F,K,D,H,J,G,P,T,W){e.spinner.spin(document.body,mxResources.get("loading"))&&e.getPublicUrl(e.getCurrentFile(),function(U){e.spinner.stop();var V=["border=0"];W&&V.push("tags=%7B%7D");U=new EmbedDialog(e,e.createLink(F,K,D,H,J,G,U,null,V,!0)); +e.showDialog(U.container,450,240,!0,!0);U.init()})},!0,"https://www.diagrams.net/blog/drawio-notion",t)}));e.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){e.showPublishLinkDialog(null,null,null,null,function(t,p,F,K,D,H,J,G,P){e.spinner.spin(document.body,mxResources.get("loading"))&&e.getPublicUrl(e.getCurrentFile(),function(T){e.spinner.stop();var W=[];P&&W.push("tags=%7B%7D");T=new EmbedDialog(e,e.createLink(t,p,F,K,D,H,T,null,W));e.showDialog(T.container,450,240, +!0,!0);T.init()})})}));e.actions.addAction("microsoftOffice...",function(){e.openLink("https://office.draw.io")});e.actions.addAction("googleDocs...",function(){e.openLink("http://docsaddon.draw.io")});e.actions.addAction("googleSlides...",function(){e.openLink("https://slidesaddon.draw.io")});e.actions.addAction("googleSheets...",function(){e.openLink("https://sheetsaddon.draw.io")});e.actions.addAction("googleSites...",function(){e.spinner.spin(document.body,mxResources.get("loading"))&&e.getPublicUrl(e.getCurrentFile(), +function(t){e.spinner.stop();t=new GoogleSitesDialog(e,t);e.showDialog(t.container,420,256,!0,!0);t.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)d=e.actions.addAction("scratchpad",function(){e.toggleScratchpad()}),d.setToggleAction(!0),d.setSelectedCallback(function(){return null!=e.scratchpad}),"0"!=urlParams.plugins&&e.actions.addAction("plugins...",function(){e.showDialog((new PluginsDialog(e)).container,380,240,!0,!1)});d=e.actions.addAction("search",function(){var t=e.sidebar.isEntryVisible("search"); +e.sidebar.showPalette("search",!t);isLocalStorage&&(mxSettings.settings.search=!t,mxSettings.save())});d.label=mxResources.get("searchShapes");d.setToggleAction(!0);d.setSelectedCallback(function(){return e.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(e.actions.get("save").funct=function(t){u.isEditing()&&u.stopEditing();var p="0"!=urlParams.pages||null!=e.pages&&1<e.pages.length?e.getFileData(!0):mxUtils.getXml(e.editor.getGraphXml());if("json"==urlParams.proto){var F=e.createLoadMessage("save"); +F.xml=p;t&&(F.exit=!0);p=JSON.stringify(F)}(window.opener||window.parent).postMessage(p,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(e.editor.modified=!1,e.editor.setStatus(""));t=e.getCurrentFile();null==t||t.constructor==EmbedFile||t.constructor==LocalFile&&null==t.mode||e.saveFile()},e.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?e.sendEmbeddedSvgExport():e.actions.get("save").funct(!0)}).label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"), +e.actions.addAction("exit",function(){if("1"==urlParams.embedInline)e.sendEmbeddedSvgExport();else{var t=function(){e.editor.modified=!1;var p="json"==urlParams.proto?JSON.stringify({event:"exit",modified:e.editor.modified}):"";(window.opener||window.parent).postMessage(p,"*")};e.editor.modified?e.confirm(mxResources.get("allChangesLost"),null,t,mxResources.get("cancel"),mxResources.get("discardChanges")):t()}}));this.put("exportAs",new Menu(mxUtils.bind(this,function(t,p){e.isExportToCanvas()?(this.addMenuItems(t, +["exportPng"],p),e.jpgSupported&&this.addMenuItems(t,["exportJpg"],p)):e.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(t,["exportPng","exportJpg"],p);this.addMenuItems(t,["exportSvg","-"],p);e.isOffline()||e.printPdfExport?this.addMenuItems(t,["exportPdf"],p):e.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(t,["exportPdf"],p);mxClient.IS_IE||"undefined"===typeof VsdxExport&&e.isOffline()||this.addMenuItems(t,["exportVsdx"],p);this.addMenuItems(t,["-", +"exportHtml","exportXml","exportUrl"],p);e.isOffline()||(t.addSeparator(p),this.addMenuItem(t,"export",p).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(t,p){function F(H){H.pickFile(function(J){e.spinner.spin(document.body,mxResources.get("loading"))&&H.getFile(J,function(G){var P="data:image/"==G.getData().substring(0,11)?D(G.getTitle()):"text/xml";/\.svg$/i.test(G.getTitle())&&!e.editor.isDataSvg(G.getData())&&(G.setData(Editor.createSvgDataUri(G.getData())), +P="image/svg+xml");K(G.getData(),P,G.getTitle())},function(G){e.handleError(G,null!=G?mxResources.get("errorLoadingFile"):null)},H==e.drive)},!0)}var K=mxUtils.bind(this,function(H,J,G){var P=u.view,T=u.getGraphBounds(),W=u.snap(Math.ceil(Math.max(0,T.x/P.scale-P.translate.x)+4*u.gridSize)),U=u.snap(Math.ceil(Math.max(0,(T.y+T.height)/P.scale-P.translate.y)+4*u.gridSize));"data:image/"==H.substring(0,11)?e.loadImage(H,mxUtils.bind(this,function(V){var l=!0,A=mxUtils.bind(this,function(){e.resizeImage(V, +H,mxUtils.bind(this,function(M,Q,O){M=l?Math.min(1,Math.min(e.maxImageSize/Q,e.maxImageSize/O)):1;e.importFile(H,J,W,U,Math.round(Q*M),Math.round(O*M),G,function(R){e.spinner.stop();u.setSelectionCells(R);u.scrollCellToVisible(u.getSelectionCell())})}),l)});H.length>e.resampleThreshold?e.confirmImageResize(function(M){l=M;A()}):A()}),mxUtils.bind(this,function(){e.handleError({message:mxResources.get("cannotOpenFile")})})):e.importFile(H,J,W,U,0,0,G,function(V){e.spinner.stop();u.setSelectionCells(V); +u.scrollCellToVisible(u.getSelectionCell())})}),D=mxUtils.bind(this,function(H){var J="text/xml";/\.png$/i.test(H)?J="image/png":/\.jpe?g$/i.test(H)?J="image/jpg":/\.gif$/i.test(H)?J="image/gif":/\.pdf$/i.test(H)&&(J="application/pdf");return J});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=e.drive?t.addItem(mxResources.get("googleDrive")+"...",null,function(){F(e.drive)},p):B&&"function"===typeof window.DriveClient&&t.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+ +"...)",null,function(){},p,null,!1));null!=e.oneDrive?t.addItem(mxResources.get("oneDrive")+"...",null,function(){F(e.oneDrive)},p):L&&"function"===typeof window.OneDriveClient&&t.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);null!=e.dropbox?t.addItem(mxResources.get("dropbox")+"...",null,function(){F(e.dropbox)},p):E&&"function"===typeof window.DropboxClient&&t.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null, +function(){},p,null,!1);t.addSeparator(p);null!=e.gitHub&&t.addItem(mxResources.get("github")+"...",null,function(){F(e.gitHub)},p);null!=e.gitLab&&t.addItem(mxResources.get("gitlab")+"...",null,function(){F(e.gitLab)},p);null!=e.trello?t.addItem(mxResources.get("trello")+"...",null,function(){F(e.trello)},p):c&&"function"===typeof window.TrelloClient&&t.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);t.addSeparator(p);isLocalStorage&&"0"!=urlParams.browser&& +t.addItem(mxResources.get("browser")+"...",null,function(){e.importLocalFile(!1)},p);"1"!=urlParams.noDevice&&t.addItem(mxResources.get("device")+"...",null,function(){e.importLocalFile(!0)},p);e.isOffline()||(t.addSeparator(p),t.addItem(mxResources.get("url")+"...",null,function(){var H=new FilenameDialog(e,"",mxResources.get("import"),function(J){if(null!=J&&0<J.length&&e.spinner.spin(document.body,mxResources.get("loading"))){var G=/(\.png)($|\?)/i.test(J)?"image/png":"text/xml";e.editor.loadUrl(PROXY_URL+ +"?url="+encodeURIComponent(J),function(P){K(P,G,J)},function(){e.spinner.stop();e.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==G)}},mxResources.get("url"));e.showDialog(H.container,300,80,!0,!0);H.init()},p))}))).isEnabled=v;this.put("theme",new Menu(mxUtils.bind(this,function(t,p){var F="1"==urlParams.sketch?"sketch":mxSettings.getUi();("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(t,["toggleDarkMode"],p);t.addSeparator(p); +var K=t.addItem(mxResources.get("default"),null,function(){e.setCurrentTheme("")},p);("kennedy"==F||"dark"==F||"atlas"!=F&&"min"!=F&&"sketch"!=F)&&t.addCheckmark(K,Editor.checkmarkImage);K=t.addItem(mxResources.get("sketch"),null,function(){e.setCurrentTheme("sketch")},p);"sketch"==F&&t.addCheckmark(K,Editor.checkmarkImage);K=t.addItem(mxResources.get("minimal"),null,function(){e.setCurrentTheme("min")},p);"min"==F&&t.addCheckmark(K,Editor.checkmarkImage);K=t.addItem(mxResources.get("atlas"),null, +function(){e.setCurrentTheme("atlas")},p);"atlas"==F&&t.addCheckmark(K,Editor.checkmarkImage)})));d=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var t=this.editorUi.getCurrentFile();if(null!=t)if(t.constructor==LocalFile&&null!=t.fileHandle)e.showSaveFilePicker(mxUtils.bind(e,function(F,K){t.invalidFileHandle=null;t.fileHandle=F;t.title=K.name;t.desc=K;e.save(K.name)}),null,e.createFileSystemOptions(t.getTitle()));else{var p=null!=t.getTitle()?t.getTitle():this.editorUi.defaultFilename; +p=new FilenameDialog(this.editorUi,p,mxResources.get("rename"),mxUtils.bind(this,function(F){null!=F&&0<F.length&&null!=t&&F!=t.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&t.rename(F,mxUtils.bind(this,function(K){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(K){this.editorUi.handleError(K,null!=K?mxResources.get("errorRenamingFile"):null)}))}),t.constructor==DriveFile||t.constructor==StorageFile?mxResources.get("diagramName"):null,function(F){if(null!= +F&&0<F.length)return!0;e.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,e.editor.fileExtensions);this.editorUi.showDialog(p.container,340,96,!0,!0);p.init()}}));d.isEnabled=function(){return this.enabled&&v.apply(this,arguments)};d.visible="1"!=urlParams.embed;e.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var t=e.getCurrentFile();if(null!=t){var p=e.getCopyFilename(t);t.constructor==DriveFile?(p=new CreateDialog(e, +p,mxUtils.bind(this,function(F,K){"_blank"==K?e.editor.editAsNew(e.getFileData(),F):("download"==K&&(K=App.MODE_GOOGLE),null!=F&&0<F.length&&(K==App.MODE_GOOGLE?e.spinner.spin(document.body,mxResources.get("saving"))&&t.saveAs(F,mxUtils.bind(this,function(D){t.desc=D;t.save(!1,mxUtils.bind(this,function(){e.spinner.stop();t.setModified(!1);t.addAllSavedStatus()}),mxUtils.bind(this,function(H){e.handleError(H)}))}),mxUtils.bind(this,function(D){e.handleError(D)})):e.createFile(F,e.getFileData(!0), +null,K)))}),mxUtils.bind(this,function(){e.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,!0,null,!0,null,null,null,null,e.editor.fileExtensions),e.showDialog(p.container,420,380,!0,!0),p.init()):e.editor.editAsNew(this.editorUi.getFileData(!0),p)}}));e.actions.put("openFolder",new Action(mxResources.get("openIt",[mxResources.get("folder")])+"...",function(t,p){e.appIconClicked(p)}));e.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var t=e.getCurrentFile(); +if(t.getMode()==App.MODE_GOOGLE||t.getMode()==App.MODE_ONEDRIVE){var p=!1;if(t.getMode()==App.MODE_GOOGLE&&null!=t.desc.parents)for(var F=0;F<t.desc.parents.length;F++)if(t.desc.parents[F].isRoot){p=!0;break}e.pickFolder(t.getMode(),mxUtils.bind(this,function(K){e.spinner.spin(document.body,mxResources.get("moving"))&&t.move(K,mxUtils.bind(this,function(D){e.spinner.stop()}),mxUtils.bind(this,function(D){e.handleError(D)}))}),null,!0,p)}}));this.put("publish",new Menu(mxUtils.bind(this,function(t, +p){this.addMenuItems(t,["publishLink"],p)})));e.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){e.openLink("https://app.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var t=e.getCurrentFile();null!=t&&t.share()}catch(p){e.handleError(p)}}));this.put("embed",new Menu(mxUtils.bind(this,function(t,p){var F=e.getCurrentFile();null==F||F.getMode()!=App.MODE_GOOGLE&&F.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(F.getTitle())|| +this.addMenuItems(t,["liveImage","-"],p);this.addMenuItems(t,["embedImage","embedSvg","-","embedHtml"],p);navigator.standalone||e.isOffline()||this.addMenuItems(t,["embedIframe"],p);"1"==urlParams.embed||e.isOffline()||this.addMenuItems(t,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),p)})));e.addInsertItem=function(t,p,F,K){("plantUml"!=K||EditorUi.enablePlantUml&&!e.isOffline())&&t.addItem(F,null,mxUtils.bind(this,function(){if("fromText"==K||"formatSql"==K|| +"plantUml"==K||"mermaid"==K){var D=new ParseDialog(e,F,K);e.showDialog(D.container,620,420,!0,!1);e.dialog.container.style.overflow="auto"}else D=new CreateGraphDialog(e,F,K),e.showDialog(D.container,620,420,!0,!1);D.init()}),p,null,v())};var C=function(t){u.getModel().beginUpdate();try{t=u.addCell(t),u.fireEvent(new mxEventObject("cellsInserted","cells",[t]))}finally{u.getModel().endUpdate()}u.scrollCellToVisible(t);u.setSelectionCell(t);u.container.focus();u.editAfterInsert&&u.startEditing(t);window.setTimeout(function(){null!= +e.hoverIcons&&e.hoverIcons.update(u.view.getState(t))},0);return t},x=function(t,p,F,K,D){t=new mxCell(t,new mxGeometry(0,0,p,F),K);t.vertex=!0;null==D&&(D=u.getCenterInsertPoint(u.getBoundingBoxFromGeometry([t],!0)));t.geometry.x=D.x;t.geometry.y=D.y;return C(t)};e.actions.put("insertText",new Action(mxResources.get("text"),function(t){u.isEnabled()&&!u.isCellLocked(u.getDefaultParent())&&u.startEditingAtCell(x("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;", +null==t||mxEvent.isControlDown(t)||mxEvent.isMetaDown(t)?null:u.getInsertPoint()))},null,null,Editor.ctrlKey+"+Shift+X/A")).isEnabled=v;e.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(t){u.isEnabled()&&!u.isCellLocked(u.getDefaultParent())&&x("",120,60,"whiteSpace=wrap;html=1;",null==t||mxEvent.isControlDown(t)||mxEvent.isMetaDown(t)?null:u.getInsertPoint())},null,null,"D")).isEnabled=v;e.actions.put("insertNote",new Action(mxResources.get("note"),function(t){u.isEnabled()&& +!u.isCellLocked(u.getDefaultParent())&&x("",140,160,"shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",null==t||mxEvent.isControlDown(t)||mxEvent.isMetaDown(t)?null:u.getInsertPoint())},null,null,"S")).isEnabled=v;e.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(t){u.isEnabled()&&!u.isCellLocked(u.getDefaultParent())&& +x("",80,80,"ellipse;whiteSpace=wrap;html=1;",null==t||mxEvent.isControlDown(t)||mxEvent.isMetaDown(t)?null:u.getInsertPoint())},null,null,"F")).isEnabled=v;e.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(t){u.isEnabled()&&!u.isCellLocked(u.getDefaultParent())&&x("",80,80,"rhombus;whiteSpace=wrap;html=1;",null==t||mxEvent.isControlDown(t)||mxEvent.isMetaDown(t)?null:u.getInsertPoint())})).isEnabled=v;e.actions.put("insertEdge",new Action(mxResources.get("line"),function(t){if(u.isEnabled()&& +!u.isCellLocked(u.getDefaultParent())){var p=u.defaultEdgeLength;t=null==t||mxEvent.isControlDown(t)||mxEvent.isMetaDown(t)?null:u.getInsertPoint();null==t&&(t=u.getCenterInsertPoint(u.getBoundingBoxFromGeometry([F],!0)));var F=new mxCell("",new mxGeometry(0,0,p,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");F.geometry.setTerminalPoint(t,!0);F.geometry.setTerminalPoint(new mxPoint(t.x+F.geometry.width,t.y),!1);F.geometry.points=[];F.geometry.relative=!0;F.edge=!0;C(F)}},null,null,"C")).isEnabled= +v;e.addInsertMenuItems=mxUtils.bind(this,function(t,p,F){for(var K=0;K<F.length;K++)"-"==F[K]?t.addSeparator(p):e.addInsertItem(t,p,mxResources.get(F[K])+"...",F[K])});this.put("insert",new Menu(mxUtils.bind(this,function(t,p){this.addMenuItems(t,"insertRectangle insertEllipse insertRhombus - insertEdge insertNote - insertText insertLink - createShape insertFreehand - insertImage".split(" "),p);e.insertTemplateEnabled&&!e.isOffline()&&this.addMenuItems(t,["insertTemplate"],p);t.addSeparator(p);this.addSubmenu("insertLayout", +t,p,mxResources.get("layout"));this.addSubmenu("insertAdvanced",t,p,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(t,p){e.addInsertMenuItems(t,p,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(t,p){e.addInsertMenuItems(t,p,["fromText","plantUml","mermaid","-","formatSql"]);t.addItem(mxResources.get("csv")+"...",null,function(){u.popupMenuHandler.hideMenu(); +e.showImportCsvDialog()},p,null,v());"min"==uiTheme&&this.addMenuItems(t,["-","createShape","editDiagram"],p)})));this.put("openRecent",new Menu(function(t,p){var F=e.getRecent();if(null!=F){for(var K=0;K<F.length;K++)(function(D){var H=D.mode;H==App.MODE_GOOGLE?H="googleDrive":H==App.MODE_ONEDRIVE&&(H="oneDrive");t.addItem(D.title+" ("+mxResources.get(H)+")",null,function(){e.loadFile(D.id)},p)})(F[K]);t.addSeparator(p)}t.addItem(mxResources.get("reset"),null,function(){e.resetRecent()},p)}));this.put("openFrom", +new Menu(function(t,p){null!=e.drive?t.addItem(mxResources.get("googleDrive")+"...",null,function(){e.pickFile(App.MODE_GOOGLE)},p):B&&"function"===typeof window.DriveClient&&t.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);null!=e.oneDrive?t.addItem(mxResources.get("oneDrive")+"...",null,function(){e.pickFile(App.MODE_ONEDRIVE)},p):L&&"function"===typeof window.OneDriveClient&&t.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+ +"...)",null,function(){},p,null,!1);null!=e.dropbox?t.addItem(mxResources.get("dropbox")+"...",null,function(){e.pickFile(App.MODE_DROPBOX)},p):E&&"function"===typeof window.DropboxClient&&t.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);t.addSeparator(p);null!=e.gitHub&&t.addItem(mxResources.get("github")+"...",null,function(){e.pickFile(App.MODE_GITHUB)},p);null!=e.gitLab&&t.addItem(mxResources.get("gitlab")+"...",null,function(){e.pickFile(App.MODE_GITLAB)}, +p);null!=e.trello?t.addItem(mxResources.get("trello")+"...",null,function(){e.pickFile(App.MODE_TRELLO)},p):c&&"function"===typeof window.TrelloClient&&t.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);t.addSeparator(p);isLocalStorage&&"0"!=urlParams.browser&&t.addItem(mxResources.get("browser")+"...",null,function(){e.pickFile(App.MODE_BROWSER)},p);"1"!=urlParams.noDevice&&t.addItem(mxResources.get("device")+"...",null,function(){e.pickFile(App.MODE_DEVICE)}, +p);e.isOffline()||(t.addSeparator(p),t.addItem(mxResources.get("url")+"...",null,function(){var F=new FilenameDialog(e,"",mxResources.get("open"),function(K){null!=K&&0<K.length&&(null==e.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(K):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(K)))},mxResources.get("url"));e.showDialog(F.container,300,80,!0,!0);F.init()},p))}));Editor.enableCustomLibraries&& +(this.put("newLibrary",new Menu(function(t,p){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=e.drive?t.addItem(mxResources.get("googleDrive")+"...",null,function(){e.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},p):B&&"function"===typeof window.DriveClient&&t.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1));null!=e.oneDrive?t.addItem(mxResources.get("oneDrive")+"...",null,function(){e.showLibraryDialog(null, +null,null,null,App.MODE_ONEDRIVE)},p):L&&"function"===typeof window.OneDriveClient&&t.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);null!=e.dropbox?t.addItem(mxResources.get("dropbox")+"...",null,function(){e.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},p):E&&"function"===typeof window.DropboxClient&&t.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);t.addSeparator(p);null!= +e.gitHub&&t.addItem(mxResources.get("github")+"...",null,function(){e.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},p);null!=e.gitLab&&t.addItem(mxResources.get("gitlab")+"...",null,function(){e.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},p);null!=e.trello?t.addItem(mxResources.get("trello")+"...",null,function(){e.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},p):c&&"function"===typeof window.TrelloClient&&t.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+ +"...)",null,function(){},p,null,!1);t.addSeparator(p);isLocalStorage&&"0"!=urlParams.browser&&t.addItem(mxResources.get("browser")+"...",null,function(){e.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},p);"1"!=urlParams.noDevice&&t.addItem(mxResources.get("device")+"...",null,function(){e.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},p)})),this.put("openLibraryFrom",new Menu(function(t,p){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=e.drive?t.addItem(mxResources.get("googleDrive")+ +"...",null,function(){e.pickLibrary(App.MODE_GOOGLE)},p):B&&"function"===typeof window.DriveClient&&t.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1));null!=e.oneDrive?t.addItem(mxResources.get("oneDrive")+"...",null,function(){e.pickLibrary(App.MODE_ONEDRIVE)},p):L&&"function"===typeof window.OneDriveClient&&t.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);null!=e.dropbox?t.addItem(mxResources.get("dropbox")+ +"...",null,function(){e.pickLibrary(App.MODE_DROPBOX)},p):E&&"function"===typeof window.DropboxClient&&t.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);t.addSeparator(p);null!=e.gitHub&&t.addItem(mxResources.get("github")+"...",null,function(){e.pickLibrary(App.MODE_GITHUB)},p);null!=e.gitLab&&t.addItem(mxResources.get("gitlab")+"...",null,function(){e.pickLibrary(App.MODE_GITLAB)},p);null!=e.trello?t.addItem(mxResources.get("trello")+"...", +null,function(){e.pickLibrary(App.MODE_TRELLO)},p):c&&"function"===typeof window.TrelloClient&&t.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);t.addSeparator(p);isLocalStorage&&"0"!=urlParams.browser&&t.addItem(mxResources.get("browser")+"...",null,function(){e.pickLibrary(App.MODE_BROWSER)},p);"1"!=urlParams.noDevice&&t.addItem(mxResources.get("device")+"...",null,function(){e.pickLibrary(App.MODE_DEVICE)},p);e.isOffline()||(t.addSeparator(p), +t.addItem(mxResources.get("url")+"...",null,function(){var F=new FilenameDialog(e,"",mxResources.get("open"),function(K){if(null!=K&&0<K.length&&e.spinner.spin(document.body,mxResources.get("loading"))){var D=K;e.editor.isCorsEnabledForUrl(K)||(D=PROXY_URL+"?url="+encodeURIComponent(K));mxUtils.get(D,function(H){if(200<=H.getStatus()&&299>=H.getStatus()){e.spinner.stop();try{e.loadLibrary(new UrlLibrary(this,H.getText(),K))}catch(J){e.handleError(J,mxResources.get("errorLoadingFile"))}}else e.spinner.stop(), +e.handleError(null,mxResources.get("errorLoadingFile"))},function(){e.spinner.stop();e.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));e.showDialog(F.container,300,80,!0,!0);F.init()},p));"1"==urlParams.confLib&&(t.addSeparator(p),t.addItem(mxResources.get("confluenceCloud")+"...",null,function(){e.showRemotelyStoredLibrary(mxResources.get("libraries"))},p))})));this.put("edit",new Menu(mxUtils.bind(this,function(t,p){this.addMenuItems(t,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))}))); +d=e.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(e,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){e.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){e.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),e.fireEvent(new mxEventObject("comments"));else{var t=!this.commentsWindow.window.isVisible(); +this.commentsWindow.window.setVisible(t);this.commentsWindow.refreshCommentsTime();t&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));d.setToggleAction(!0);d.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));e.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));d=this.get("viewPanels");var y=d.funct;d.funct= +function(t,p){y.apply(this,arguments);e.menus.addMenuItems(t,["tags"],p);e.commentsSupported()&&e.menus.addMenuItems(t,["comments"],p)};this.put("view",new Menu(mxUtils.bind(this,function(t,p){this.addMenuItems(t,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","tags"]).concat(e.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(t,["-","search"],p);if(isLocalStorage||mxClient.IS_CHROMEAPP){var F=this.addMenuItem(t,"scratchpad",p);(!e.isOffline()||mxClient.IS_CHROMEAPP|| EditorUi.isElectronApp)&&this.addLinkToItem(F,"https://www.diagrams.net/doc/faq/scratchpad")}this.addMenuItems(t,["shapes","-","pageView","pageScale"]);this.addSubmenu("units",t,p);this.addMenuItems(t,"- scrollbars tooltips ruler - grid guides".split(" "),p);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(t,"shadowVisible",p);this.addMenuItems(t,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),p);"1"!=urlParams.sketch&&this.addMenuItems(t, -["-","fullscreen"],p)})));if(EditorUi.isElectronApp){var I="1"==urlParams.enableSpellCheck;e=d.actions.addAction("spellCheck",function(){d.toggleSpellCheck();I=!I;d.alert(mxResources.get("restartForChangeRequired"))});e.setToggleAction(!0);e.setSelectedCallback(function(){return I});var N="1"==urlParams.enableStoreBkp;e=d.actions.addAction("autoBkp",function(){d.toggleStoreBkp();N=!N});e.setToggleAction(!0);e.setSelectedCallback(function(){return N});d.actions.addAction("openDevTools",function(){d.openDevTools()}); -d.actions.addAction("drafts...",function(){var t=new FilenameDialog(d,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(p){p=parseInt(p);0<=p&&(EditorUi.draftSaveDelay=1E3*p,EditorUi.enableDrafts=0<p,mxSettings.setDraftSaveDelay(p),mxSettings.save())}),mxResources.get("draftSaveInt"),null,null,null,null,null,null,50,250);d.showDialog(t.container,320,80,!0,!0);t.init()})}this.put("extras",new Menu(mxUtils.bind(this,function(t,p){"1"==urlParams.noLangIcon&&(this.addSubmenu("language", -t,p),t.addSeparator(p));"1"!=urlParams.embed&&(this.addSubmenu("theme",t,p),t.addSeparator(p));if("undefined"!==typeof MathJax){var F=this.addMenuItem(t,"mathematicalTypesetting",p);(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(F,"https://www.diagrams.net/doc/faq/math-typesetting")}EditorUi.isElectronApp&&this.addMenuItems(t,["spellCheck","autoBkp","drafts"],p);this.addMenuItems(t,["copyConnect","collapseExpand","-"],p);"1"!=urlParams.embed&&(F=d.getCurrentFile(), -null!=F&&F.isRealtimeEnabled()&&F.isRealtimeSupported()&&this.addMenuItems(t,["showRemoteCursors","shareCursor"],p),this.addMenuItems(t,["autosave"],p));t.addSeparator(p);!d.isOfflineApp()&&isLocalStorage&&this.addMenuItem(t,"plugins",p);this.addMenuItems(t,["-","editDiagram"],p);Graph.translateDiagram&&this.addMenuItems(t,["diagramLanguage"]);t.addSeparator(p);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(t,["showStartScreen"],p);this.addMenuItems(t,["configuration"], -p);t.addSeparator(p);"1"==urlParams.newTempDlg&&(d.actions.addAction("templates",function(){function J(H){return{id:H.id,isExt:!0,url:H.downloadUrl,title:H.title,imgUrl:H.thumbnailLink,changedBy:H.lastModifyingUserName,lastModifiedOn:H.modifiedDate}}var M=new TemplatesDialog(d,function(H){console.log(arguments)},null,null,null,"user",function(H,G,E){var P=new Date;P.setDate(P.getDate()-7);d.drive.listFiles(null,P,E?!0:!1,function(T){for(var W=[],U=0;U<T.items.length;U++)W.push(J(T.items[U]));H(W)}, -G)},function(H,G,E,P){d.drive.listFiles(H,null,P?!0:!1,function(T){for(var W=[],U=0;U<T.items.length;U++)W.push(J(T.items[U]));G(W)},E)},function(H,G,E){d.drive.getFile(H.id,function(P){G(P.data)},E)},null,function(H){H({Test:[]},1)},!0,!1);d.showDialog(M.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}),this.addMenuItem(t,"templates",p))})));this.put("file",new Menu(mxUtils.bind(this,function(t,p){if("1"==urlParams.embed)this.addSubmenu("importFrom",t,p),this.addSubmenu("exportAs", -t,p),this.addSubmenu("embed",t,p),"1"==urlParams.libraries&&(this.addMenuItems(t,["-"],p),this.addSubmenu("newLibrary",t,p),this.addSubmenu("openLibraryFrom",t,p)),d.isRevisionHistorySupported()&&this.addMenuItems(t,["-","revisionHistory"],p),this.addMenuItems(t,["-","pageSetup","print","-","rename"],p),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(t,["saveAndExit"],p):(this.addMenuItems(t,["save"],p),"1"==urlParams.saveAndExit&&this.addMenuItems(t, -["saveAndExit"],p))),"1"!=urlParams.noExitBtn&&this.addMenuItems(t,["exit"],p);else{var F=this.editorUi.getCurrentFile();if(null!=F&&F.constructor==DriveFile){F.isRestricted()&&this.addMenuItems(t,["exportOptionsDisabled"],p);this.addMenuItems(t,["save","-","share"],p);var J=this.addMenuItem(t,"synchronize",p);(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(J,"https://www.diagrams.net/doc/faq/synchronize");t.addSeparator(p)}else this.addMenuItems(t,["new"],p);this.addSubmenu("openFrom", -t,p);isLocalStorage&&this.addSubmenu("openRecent",t,p);null!=F&&F.constructor==DriveFile?this.addMenuItems(t,"new - rename makeCopy openFolder moveToFolder".split(" "),p):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==F||F.constructor==LocalFile&&null==F.fileHandle||(t.addSeparator(p),J=this.addMenuItem(t,"synchronize",p),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(J,"https://www.diagrams.net/doc/faq/synchronize")),this.addMenuItems(t,["-","save","saveAs", -"-"],p),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=d.getServiceName()||d.isOfflineApp()||null==F||this.addMenuItems(t,["share","-"],p),this.addMenuItems(t,["rename"],p),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(t,["upload"],p):(this.addMenuItems(t,["makeCopy"],p),null!=F&&F.constructor==OneDriveFile&&this.addMenuItems(t,["moveToFolder"],p)));t.addSeparator(p);this.addSubmenu("importFrom",t,p);this.addSubmenu("exportAs",t,p); -t.addSeparator(p);this.addSubmenu("embed",t,p);this.addSubmenu("publish",t,p);t.addSeparator(p);this.addSubmenu("newLibrary",t,p);this.addSubmenu("openLibraryFrom",t,p);d.isRevisionHistorySupported()&&this.addMenuItems(t,["-","revisionHistory"],p);null!=F&&null!=d.fileNode&&"1"!=urlParams.embedInline&&(J=null!=F.getTitle()?F.getTitle():d.defaultFilename,(F.constructor==DriveFile&&null!=F.sync&&F.sync.isConnected()||!/(\.html)$/i.test(J)&&!/(\.svg)$/i.test(J))&&this.addMenuItems(t,["-","properties"])); -this.addMenuItems(t,["-","pageSetup"],p);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(t,["print"],p);this.addMenuItems(t,["-","close"])}})));k.prototype.execute=function(){var t=this.ui.editor.graph;this.customFonts=this.prevCustomFonts;this.prevCustomFonts=this.ui.menus.customFonts;this.ui.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));this.extFonts=this.previousExtFonts;for(var p=t.extFonts,F=0;null!=p&&F<p.length;F++){var J=document.getElementById("extFont_"+ -p[F].name);null!=J&&J.parentNode.removeChild(J)}t.extFonts=[];for(F=0;null!=this.previousExtFonts&&F<this.previousExtFonts.length;F++)this.ui.editor.graph.addExtFont(this.previousExtFonts[F].name,this.previousExtFonts[F].url);this.previousExtFonts=p};this.put("fontFamily",new Menu(mxUtils.bind(this,function(t,p){for(var F=mxUtils.bind(this,function(U,V,l,A,L){var Q=d.editor.graph;A=this.styleChange(t,A||U,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY], -"1"!=urlParams["ext-fonts"]?[U,null!=V?encodeURIComponent(V):null,null]:[U],null,p,function(){"1"!=urlParams["ext-fonts"]?Q.setFont(U,V):(document.execCommand("fontname",!1,U),Q.addExtFont(U,V));d.fireEvent(new mxEventObject("styleChanged","keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values","1"!=urlParams["ext-fonts"]?[U,null!=V?encodeURIComponent(V):null,null]:[U],"cells",[Q.cellEditor.getEditingCell()]))},function(){Q.updateLabelElements(Q.getSelectionCells(), +["-","fullscreen"],p)})));if(EditorUi.isElectronApp){var I="1"==urlParams.enableSpellCheck;d=e.actions.addAction("spellCheck",function(){e.toggleSpellCheck();I=!I;e.alert(mxResources.get("restartForChangeRequired"))});d.setToggleAction(!0);d.setSelectedCallback(function(){return I});var N="1"==urlParams.enableStoreBkp;d=e.actions.addAction("autoBkp",function(){e.toggleStoreBkp();N=!N});d.setToggleAction(!0);d.setSelectedCallback(function(){return N});e.actions.addAction("openDevTools",function(){e.openDevTools()}); +e.actions.addAction("drafts...",function(){var t=new FilenameDialog(e,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(p){p=parseInt(p);0<=p&&(EditorUi.draftSaveDelay=1E3*p,EditorUi.enableDrafts=0<p,mxSettings.setDraftSaveDelay(p),mxSettings.save())}),mxResources.get("draftSaveInt"),null,null,null,null,null,null,50,250);e.showDialog(t.container,320,80,!0,!0);t.init()})}this.put("extras",new Menu(mxUtils.bind(this,function(t,p){"1"==urlParams.embed&&null!=urlParams.lang|| +this.addSubmenu("language",t,p);"1"!=urlParams.embed&&this.addSubmenu("theme",t,p);t.addSeparator(p);if("undefined"!==typeof MathJax){var F=this.addMenuItem(t,"mathematicalTypesetting",p);(!e.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(F,"https://www.diagrams.net/doc/faq/math-typesetting")}EditorUi.isElectronApp&&this.addMenuItems(t,["spellCheck","autoBkp","drafts"],p);this.addMenuItems(t,["copyConnect","collapseExpand","-"],p);"1"!=urlParams.embed&&(F=e.getCurrentFile(), +null!=F&&F.isRealtimeEnabled()&&F.isRealtimeSupported()&&this.addMenuItems(t,["showRemoteCursors","shareCursor"],p),this.addMenuItems(t,["autosave"],p));t.addSeparator(p);!e.isOfflineApp()&&isLocalStorage&&this.addMenuItem(t,"plugins",p);this.addMenuItems(t,["-","editDiagram"],p);Graph.translateDiagram&&this.addMenuItems(t,["diagramLanguage"]);t.addSeparator(p);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(t,["showStartScreen"],p);this.addMenuItems(t,["configuration"], +p);t.addSeparator(p);"1"==urlParams.newTempDlg&&(e.actions.addAction("templates",function(){function K(H){return{id:H.id,isExt:!0,url:H.downloadUrl,title:H.title,imgUrl:H.thumbnailLink,changedBy:H.lastModifyingUserName,lastModifiedOn:H.modifiedDate}}var D=new TemplatesDialog(e,function(H){console.log(arguments)},null,null,null,"user",function(H,J,G){var P=new Date;P.setDate(P.getDate()-7);e.drive.listFiles(null,P,G?!0:!1,function(T){for(var W=[],U=0;U<T.items.length;U++)W.push(K(T.items[U]));H(W)}, +J)},function(H,J,G,P){e.drive.listFiles(H,null,P?!0:!1,function(T){for(var W=[],U=0;U<T.items.length;U++)W.push(K(T.items[U]));J(W)},G)},function(H,J,G){e.drive.getFile(H.id,function(P){J(P.data)},G)},null,function(H){H({Test:[]},1)},!0,!1);e.showDialog(D.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}),this.addMenuItem(t,"templates",p))})));this.put("file",new Menu(mxUtils.bind(this,function(t,p){if("1"==urlParams.embed)this.addSubmenu("importFrom",t,p),this.addSubmenu("exportAs", +t,p),this.addSubmenu("embed",t,p),"1"==urlParams.libraries&&(this.addMenuItems(t,["-"],p),this.addSubmenu("newLibrary",t,p),this.addSubmenu("openLibraryFrom",t,p)),e.isRevisionHistorySupported()&&this.addMenuItems(t,["-","revisionHistory"],p),this.addMenuItems(t,["-","pageSetup","print","-","rename"],p),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(t,["saveAndExit"],p):(this.addMenuItems(t,["save"],p),"1"==urlParams.saveAndExit&&this.addMenuItems(t, +["saveAndExit"],p))),"1"!=urlParams.noExitBtn&&this.addMenuItems(t,["exit"],p);else{var F=this.editorUi.getCurrentFile();if(null!=F&&F.constructor==DriveFile){F.isRestricted()&&this.addMenuItems(t,["exportOptionsDisabled"],p);this.addMenuItems(t,["save","-","share"],p);var K=this.addMenuItem(t,"synchronize",p);(!e.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(K,"https://www.diagrams.net/doc/faq/synchronize");t.addSeparator(p)}else this.addMenuItems(t,["new"],p);this.addSubmenu("openFrom", +t,p);isLocalStorage&&this.addSubmenu("openRecent",t,p);null!=F&&F.constructor==DriveFile?this.addMenuItems(t,"new - rename makeCopy openFolder moveToFolder".split(" "),p):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==F||F.constructor==LocalFile&&null==F.fileHandle||(t.addSeparator(p),K=this.addMenuItem(t,"synchronize",p),(!e.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(K,"https://www.diagrams.net/doc/faq/synchronize")),this.addMenuItems(t,["-","save","saveAs", +"-"],p),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=e.getServiceName()||e.isOfflineApp()||null==F||this.addMenuItems(t,["share","-"],p),this.addMenuItems(t,["rename"],p),e.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(t,["upload"],p):(this.addMenuItems(t,["makeCopy"],p),null!=F&&F.constructor==OneDriveFile&&this.addMenuItems(t,["moveToFolder"],p)));t.addSeparator(p);this.addSubmenu("importFrom",t,p);this.addSubmenu("exportAs",t,p); +t.addSeparator(p);this.addSubmenu("embed",t,p);this.addSubmenu("publish",t,p);t.addSeparator(p);this.addSubmenu("newLibrary",t,p);this.addSubmenu("openLibraryFrom",t,p);e.isRevisionHistorySupported()&&this.addMenuItems(t,["-","revisionHistory"],p);null!=F&&null!=e.fileNode&&"1"!=urlParams.embedInline&&(K=null!=F.getTitle()?F.getTitle():e.defaultFilename,(F.constructor==DriveFile&&null!=F.sync&&F.sync.isConnected()||!/(\.html)$/i.test(K)&&!/(\.svg)$/i.test(K))&&this.addMenuItems(t,["-","properties"])); +this.addMenuItems(t,["-","pageSetup"],p);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(t,["print"],p);this.addMenuItems(t,["-","close"])}})));k.prototype.execute=function(){var t=this.ui.editor.graph;this.customFonts=this.prevCustomFonts;this.prevCustomFonts=this.ui.menus.customFonts;this.ui.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));this.extFonts=this.previousExtFonts;for(var p=t.extFonts,F=0;null!=p&&F<p.length;F++){var K=document.getElementById("extFont_"+ +p[F].name);null!=K&&K.parentNode.removeChild(K)}t.extFonts=[];for(F=0;null!=this.previousExtFonts&&F<this.previousExtFonts.length;F++)this.ui.editor.graph.addExtFont(this.previousExtFonts[F].name,this.previousExtFonts[F].url);this.previousExtFonts=p};this.put("fontFamily",new Menu(mxUtils.bind(this,function(t,p){for(var F=mxUtils.bind(this,function(U,V,l,A,M){var Q=e.editor.graph;A=this.styleChange(t,A||U,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY], +"1"!=urlParams["ext-fonts"]?[U,null!=V?encodeURIComponent(V):null,null]:[U],null,p,function(){"1"!=urlParams["ext-fonts"]?Q.setFont(U,V):(document.execCommand("fontname",!1,U),Q.addExtFont(U,V));e.fireEvent(new mxEventObject("styleChanged","keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values","1"!=urlParams["ext-fonts"]?[U,null!=V?encodeURIComponent(V):null,null]:[U],"cells",[Q.cellEditor.getEditingCell()]))},function(){Q.updateLabelElements(Q.getSelectionCells(), function(O){O.removeAttribute("face");O.style.fontFamily=null;"PRE"==O.nodeName&&Q.replaceElement(O,"div")});"1"==urlParams["ext-fonts"]&&Q.addExtFont(U,V)});l&&(l=document.createElement("span"),l.className="geSprite geSprite-delete",l.style.cursor="pointer",l.style.display="inline-block",A.firstChild.nextSibling.nextSibling.appendChild(l),mxEvent.addListener(l,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(O){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[U.toLowerCase()]; -for(var R=0;R<this.customFonts.length;R++)if(this.customFonts[R].name==U&&this.customFonts[R].url==V){this.customFonts.splice(R,1);d.fireEvent(new mxEventObject("customFontsChanged"));break}}else{var S=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=S&&0<S.length)for(R=0;R<S.length;R++)if(S[R].name==U){S.splice(R,1);break}var X=mxUtils.clone(this.customFonts);for(R=0;R<X.length;R++)if(X[R].name==U){X.splice(R,1);break}R=new k(this.editorUi,S,X);this.editorUi.editor.graph.model.execute(R)}this.editorUi.hideCurrentMenu(); -mxEvent.consume(O)})));Graph.addFont(U,V);A.firstChild.nextSibling.style.fontFamily=U;null!=L&&A.setAttribute("title",L)}),J={},M=0;M<this.defaultFonts.length;M++){var H=this.defaultFonts[M];"string"===typeof H?F(H):null!=H.fontFamily&&null!=H.fontUrl&&(J[encodeURIComponent(H.fontFamily)+"@"+encodeURIComponent(H.fontUrl)]=!0,F(H.fontFamily,H.fontUrl))}t.addSeparator(p);if("1"!=urlParams["ext-fonts"]){H=function(U){var V=encodeURIComponent(U.name)+(null==U.url?"":"@"+encodeURIComponent(U.url));if(!J[V]){for(var l= -U.name,A=0;null!=E[l.toLowerCase()];)l=U.name+" ("+ ++A+")";null==G[V]&&(P.push({name:U.name,url:U.url,label:l,title:U.url}),E[l.toLowerCase()]=U,G[V]=U)}};var G={},E={},P=[];for(M=0;M<this.customFonts.length;M++)H(this.customFonts[M]);for(var T in Graph.recentCustomFonts)H(Graph.recentCustomFonts[T]);P.sort(function(U,V){return U.label<V.label?-1:U.label>V.label?1:0});if(0<P.length){for(M=0;M<P.length;M++)F(P[M].name,P[M].url,!0,P[M].label,P[M].url);t.addSeparator(p)}t.addItem(mxResources.get("reset"), -null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];d.fireEvent(new mxEventObject("customFontsChanged"))}),p);t.addSeparator(p)}else{T=this.editorUi.editor.graph.extFonts;if(null!=T&&0<T.length){H={};var W=!1;for(M=0;M<this.customFonts.length;M++)H[this.customFonts[M].name]=!0;for(M=0;M<T.length;M++)H[T[M].name]||(this.customFonts.push(T[M]),W=!0);W&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(M= -0;M<this.customFonts.length;M++)T=this.customFonts[M].name,H=this.customFonts[M].url,F(T,H,!0),this.editorUi.editor.graph.addExtFont(T,H,!0);t.addSeparator(p);t.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var U=new k(this.editorUi,[],[]);d.editor.graph.model.execute(U)}),p);t.addSeparator(p)}}t.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var U=this.editorUi.editor.graph,V=U.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],l= -"s",A=null;if("1"!=urlParams["ext-fonts"]&&U.isEditing()){var L=U.getSelectedEditingElement();null!=L&&(L=mxUtils.getCurrentStyle(L),null!=L&&(V=Graph.stripQuotes(L.fontFamily),A=Graph.getFontUrl(V,null),null!=A&&(Graph.isGoogleFontUrl(A)?(A=null,l="g"):l="w")))}else L=U.getView().getState(U.getSelectionCell()),null!=L&&(V=L.style[mxConstants.STYLE_FONTFAMILY]||V,"1"!=urlParams["ext-fonts"]?(L=L.style.fontSource,null!=L&&(L=decodeURIComponent(L),Graph.isGoogleFontUrl(L)?l="g":(l="w",A=L))):(l=L.style.FType|| -l,"w"==l&&(A=this.editorUi.editor.graph.extFonts,L=null,null!=A&&(L=A.find(function(O){return O.name==V})),A=null!=L?L.url:mxResources.get("urlNotFound",null,"URL not found"))));null!=A&&A.substring(0,PROXY_URL.length)==PROXY_URL&&(A=decodeURIComponent(A.substr((PROXY_URL+"?url=").length)));var Q=null;document.activeElement==U.cellEditor.textarea&&(Q=U.cellEditor.saveSelection());l=new FontDialog(this.editorUi,V,A,l,mxUtils.bind(this,function(O,R,S){null!=Q&&(U.cellEditor.restoreSelection(Q),Q=null); +for(var R=0;R<this.customFonts.length;R++)if(this.customFonts[R].name==U&&this.customFonts[R].url==V){this.customFonts.splice(R,1);e.fireEvent(new mxEventObject("customFontsChanged"));break}}else{var S=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=S&&0<S.length)for(R=0;R<S.length;R++)if(S[R].name==U){S.splice(R,1);break}var X=mxUtils.clone(this.customFonts);for(R=0;R<X.length;R++)if(X[R].name==U){X.splice(R,1);break}R=new k(this.editorUi,S,X);this.editorUi.editor.graph.model.execute(R)}this.editorUi.hideCurrentMenu(); +mxEvent.consume(O)})));Graph.addFont(U,V);A.firstChild.nextSibling.style.fontFamily=U;null!=M&&A.setAttribute("title",M)}),K={},D=0;D<this.defaultFonts.length;D++){var H=this.defaultFonts[D];"string"===typeof H?F(H):null!=H.fontFamily&&null!=H.fontUrl&&(K[encodeURIComponent(H.fontFamily)+"@"+encodeURIComponent(H.fontUrl)]=!0,F(H.fontFamily,H.fontUrl))}t.addSeparator(p);if("1"!=urlParams["ext-fonts"]){H=function(U){var V=encodeURIComponent(U.name)+(null==U.url?"":"@"+encodeURIComponent(U.url));if(!K[V]){for(var l= +U.name,A=0;null!=G[l.toLowerCase()];)l=U.name+" ("+ ++A+")";null==J[V]&&(P.push({name:U.name,url:U.url,label:l,title:U.url}),G[l.toLowerCase()]=U,J[V]=U)}};var J={},G={},P=[];for(D=0;D<this.customFonts.length;D++)H(this.customFonts[D]);for(var T in Graph.recentCustomFonts)H(Graph.recentCustomFonts[T]);P.sort(function(U,V){return U.label<V.label?-1:U.label>V.label?1:0});if(0<P.length){for(D=0;D<P.length;D++)F(P[D].name,P[D].url,!0,P[D].label,P[D].url);t.addSeparator(p)}t.addItem(mxResources.get("reset"), +null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];e.fireEvent(new mxEventObject("customFontsChanged"))}),p);t.addSeparator(p)}else{T=this.editorUi.editor.graph.extFonts;if(null!=T&&0<T.length){H={};var W=!1;for(D=0;D<this.customFonts.length;D++)H[this.customFonts[D].name]=!0;for(D=0;D<T.length;D++)H[T[D].name]||(this.customFonts.push(T[D]),W=!0);W&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(D= +0;D<this.customFonts.length;D++)T=this.customFonts[D].name,H=this.customFonts[D].url,F(T,H,!0),this.editorUi.editor.graph.addExtFont(T,H,!0);t.addSeparator(p);t.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var U=new k(this.editorUi,[],[]);e.editor.graph.model.execute(U)}),p);t.addSeparator(p)}}t.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var U=this.editorUi.editor.graph,V=U.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],l= +"s",A=null;if("1"!=urlParams["ext-fonts"]&&U.isEditing()){var M=U.getSelectedEditingElement();null!=M&&(M=mxUtils.getCurrentStyle(M),null!=M&&(V=Graph.stripQuotes(M.fontFamily),A=Graph.getFontUrl(V,null),null!=A&&(Graph.isGoogleFontUrl(A)?(A=null,l="g"):l="w")))}else M=U.getView().getState(U.getSelectionCell()),null!=M&&(V=M.style[mxConstants.STYLE_FONTFAMILY]||V,"1"!=urlParams["ext-fonts"]?(M=M.style.fontSource,null!=M&&(M=decodeURIComponent(M),Graph.isGoogleFontUrl(M)?l="g":(l="w",A=M))):(l=M.style.FType|| +l,"w"==l&&(A=this.editorUi.editor.graph.extFonts,M=null,null!=A&&(M=A.find(function(O){return O.name==V})),A=null!=M?M.url:mxResources.get("urlNotFound",null,"URL not found"))));null!=A&&A.substring(0,PROXY_URL.length)==PROXY_URL&&(A=decodeURIComponent(A.substr((PROXY_URL+"?url=").length)));var Q=null;document.activeElement==U.cellEditor.textarea&&(Q=U.cellEditor.saveSelection());l=new FontDialog(this.editorUi,V,A,l,mxUtils.bind(this,function(O,R,S){null!=Q&&(U.cellEditor.restoreSelection(Q),Q=null); if(null!=O&&0<O.length)if("1"!=urlParams["ext-fonts"]&&U.isEditing())U.setFont(O,R);else{U.getModel().beginUpdate();try{U.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(U.setCellStyles(mxConstants.STYLE_FONTFAMILY,O),U.setCellStyles("fontSource",null!=R?encodeURIComponent(R):null),U.setCellStyles("FType",null)):(U.setCellStyles(mxConstants.STYLE_FONTFAMILY,O),"s"!=S&&(U.setCellStyles("FType",S),0==R.indexOf("http://")&&(R=PROXY_URL+"?url="+encodeURIComponent(R)),this.editorUi.editor.graph.addExtFont(O, R)));S=!0;for(var X=0;X<this.customFonts.length;X++)if(this.customFonts[X].name==O){S=!1;break}S&&(this.customFonts.push({name:O,url:R}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{U.getModel().endUpdate()}}}));this.editorUi.showDialog(l.container,380,Editor.enableWebFonts?250:180,!0,!0);l.init()}),p,null,!0)})))}})();function DiagramPage(b,f){this.node=b;null!=f?this.node.setAttribute("id",f):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")}; DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,f,k){this.ui=b;this.page=f;this.previous=this.name=k}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))}; function MovePage(b,f,k){this.ui=b;this.oldIndex=f;this.newIndex=k}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))}; function SelectPage(b,f,k){this.ui=b;this.previousPage=this.page=f;this.neverShown=!0;null!=f&&(this.neverShown=null==f.viewState,this.ui.updatePageRoot(f),null!=k&&(f.viewState=k,this.neverShown=!1))} -SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var f=this.ui.editor,k=f.graph,d=Graph.compressNode(f.getGraphXml(!0));mxUtils.setTextContent(b.node,d);b.viewState=k.getViewState();b.root=k.model.root;null!=b.model&&b.model.rootChanged(b.root);k.view.clear(b.root,!0);k.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;k.model.prefix=Editor.guid()+"-";k.model.rootChanged(b.root); +SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var f=this.ui.editor,k=f.graph,e=Graph.compressNode(f.getGraphXml(!0));mxUtils.setTextContent(b.node,e);b.viewState=k.getViewState();b.root=k.model.root;null!=b.model&&b.model.rootChanged(b.root);k.view.clear(b.root,!0);k.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;k.model.prefix=Editor.guid()+"-";k.model.rootChanged(b.root); k.setViewState(b.viewState);k.gridEnabled=k.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);f.updateGraphComponents();k.view.validate();k.blockMathRender=!0;k.sizeDidChange();k.blockMathRender=!1;this.neverShown&&(this.neverShown=!1,k.selectUnlockedLayer());f.graph.fireEvent(new mxEventObject(mxEvent.ROOT));f.fireEvent(new mxEventObject("pageSelected","change",this))}}; -function ChangePage(b,f,k,d,u){SelectPage.call(this,b,k);this.relatedPage=f;this.index=d;this.previousIndex=null;this.noSelect=u}mxUtils.extend(ChangePage,SelectPage); +function ChangePage(b,f,k,e,u){SelectPage.call(this,b,k);this.relatedPage=f;this.index=e;this.previousIndex=null;this.noSelect=u}mxUtils.extend(ChangePage,SelectPage); ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};EditorUi.prototype.tabContainerHeight=38;EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)}; EditorUi.prototype.getPageIndex=function(b){var f=null;if(null!=this.pages&&null!=b)for(var k=0;k<this.pages.length;k++)if(this.pages[k]==b){f=k;break}return f};EditorUi.prototype.getPageById=function(b,f){f=null!=f?f:this.pages;if(null!=f)for(var k=0;k<f.length;k++)if(f[k].getId()==b)return f[k];return null}; -EditorUi.prototype.createImageForPageLink=function(b,f,k){var d=b.indexOf(","),u=null;0<d&&(d=this.getPageById(b.substring(d+1)),null!=d&&d!=f&&(u=this.getImageForPage(d,f,k),u.originalSrc=b));null==u&&(u={originalSrc:b});return u}; -EditorUi.prototype.getImageForPage=function(b,f,k){k=null!=k?k:this.editor.graph;var d=k.getGlobalVariable,u=this.createTemporaryGraph(k.getStylesheet());u.defaultPageBackgroundColor=k.defaultPageBackgroundColor;u.shapeBackgroundColor=k.shapeBackgroundColor;u.shapeForegroundColor=k.shapeForegroundColor;var x=this.getPageIndex(null!=f?f:this.currentPage);u.getGlobalVariable=function(D){return"pagenumber"==D?x+1:"page"==D&&null!=f?f.getName():d.apply(this,arguments)};document.body.appendChild(u.container); +EditorUi.prototype.createImageForPageLink=function(b,f,k){var e=b.indexOf(","),u=null;0<e&&(e=this.getPageById(b.substring(e+1)),null!=e&&e!=f&&(u=this.getImageForPage(e,f,k),u.originalSrc=b));null==u&&(u={originalSrc:b});return u}; +EditorUi.prototype.getImageForPage=function(b,f,k){k=null!=k?k:this.editor.graph;var e=k.getGlobalVariable,u=this.createTemporaryGraph(k.getStylesheet());u.defaultPageBackgroundColor=k.defaultPageBackgroundColor;u.shapeBackgroundColor=k.shapeBackgroundColor;u.shapeForegroundColor=k.shapeForegroundColor;var v=this.getPageIndex(null!=f?f:this.currentPage);u.getGlobalVariable=function(E){return"pagenumber"==E?v+1:"page"==E&&null!=f?f.getName():e.apply(this,arguments)};document.body.appendChild(u.container); this.updatePageRoot(b);u.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";k=u.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var B=u.getGraphBounds();document.body.removeChild(u.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(k)),B.width,B.height,B.x,B.y)}; EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,f=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var u= -this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";u!=this.tabContainer.style.height&&this.refresh(!1)}f.apply(b.view,arguments)});var k=null,d=mxUtils.bind(this,function(){this.updateTabContainer();var u=this.currentPage;null!=u&&u!=k&&(null==u.viewState||null==u.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&& +this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";u!=this.tabContainer.style.height&&this.refresh(!1)}f.apply(b.view,arguments)});var k=null,e=mxUtils.bind(this,function(){this.updateTabContainer();var u=this.currentPage;null!=u&&u!=k&&(null==u.viewState||null==u.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&& (b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+u.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+u.viewState.scrollTop),k=u);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"===typeof Editor.MathJaxClear||this.editor.graph.mathEnabled&&null!=this.editor||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(u, -x){u=x.getProperty("edit").changes;for(x=0;x<u.length;x++)if(u[x]instanceof SelectPage||u[x]instanceof RenamePage||u[x]instanceof MovePage||u[x]instanceof mxRootChange){d();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}}; -EditorUi.prototype.restoreViewState=function(b,f,k){b=null!=b?this.getPageById(b.getId()):null;var d=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,f):(d.setViewState(f),this.editor.updateGraphComponents(),d.view.revalidate(),d.sizeDidChange()),d.container.scrollLeft=d.view.translate.x*d.view.scale+f.scrollLeft,d.container.scrollTop=d.view.translate.y*d.view.scale+f.scrollTop,d.restoreSelection(k))}; -Graph.prototype.createViewState=function(b){var f=b.getAttribute("page"),k=parseFloat(b.getAttribute("pageScale")),d=parseFloat(b.getAttribute("pageWidth")),u=parseFloat(b.getAttribute("pageHeight")),x=b.getAttribute("background"),B=this.parseBackgroundImage(b.getAttribute("backgroundImage")),D=b.getAttribute("extFonts");if(D)try{D=D.split("|").map(function(K){K=K.split("^");return{name:K[0],url:K[1]}})}catch(K){console.log("ExtFonts format error: "+K.message)}return{gridEnabled:"0"!=b.getAttribute("grid"), -gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=f?"0"!=f:this.defaultPageVisible,background:null!=x&&0<x.length?x:null,backgroundImage:B,pageScale:isNaN(k)?mxGraph.prototype.pageScale:k,pageFormat:isNaN(d)||isNaN(u)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat: -mxSettings.getPageFormat():new mxRectangle(0,0,d,u),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:D||[]}}; -Graph.prototype.saveViewState=function(b,f,k,d){k||(f.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),f.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),f.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),f.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),f.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),f.setAttribute("connect",null==b||b.connect?"1":"0"),f.setAttribute("arrows",null==b||b.arrows?"1":"0"),f.setAttribute("fold", -null==b||b.foldingEnabled?"1":"0"));f.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);k=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=k&&(f.setAttribute("pageWidth",k.width),f.setAttribute("pageHeight",k.height));null!=b&&(null!=b.background&&f.setAttribute("background",b.background),d=this.getBackgroundImageObject(b.backgroundImage,d),null!=d&&f.setAttribute("backgroundImage", -JSON.stringify(d)));f.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");f.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null!=b&&null!=b.extFonts&&0<b.extFonts.length&&f.setAttribute("extFonts",b.extFonts.map(function(u){return u.name+"^"+u.url}).join("|"))}; +v){u=v.getProperty("edit").changes;for(v=0;v<u.length;v++)if(u[v]instanceof SelectPage||u[v]instanceof RenamePage||u[v]instanceof MovePage||u[v]instanceof mxRootChange){e();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}}; +EditorUi.prototype.restoreViewState=function(b,f,k){b=null!=b?this.getPageById(b.getId()):null;var e=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,f):(e.setViewState(f),this.editor.updateGraphComponents(),e.view.revalidate(),e.sizeDidChange()),e.container.scrollLeft=e.view.translate.x*e.view.scale+f.scrollLeft,e.container.scrollTop=e.view.translate.y*e.view.scale+f.scrollTop,e.restoreSelection(k))}; +Graph.prototype.createViewState=function(b){var f=b.getAttribute("page"),k=parseFloat(b.getAttribute("pageScale")),e=parseFloat(b.getAttribute("pageWidth")),u=parseFloat(b.getAttribute("pageHeight")),v=b.getAttribute("background"),B=this.parseBackgroundImage(b.getAttribute("backgroundImage")),E=b.getAttribute("extFonts");if(E)try{E=E.split("|").map(function(L){L=L.split("^");return{name:L[0],url:L[1]}})}catch(L){console.log("ExtFonts format error: "+L.message)}return{gridEnabled:"0"!=b.getAttribute("grid"), +gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=f?"0"!=f:this.defaultPageVisible,background:null!=v&&0<v.length?v:null,backgroundImage:B,pageScale:isNaN(k)?mxGraph.prototype.pageScale:k,pageFormat:isNaN(e)||isNaN(u)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat: +mxSettings.getPageFormat():new mxRectangle(0,0,e,u),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:E||[]}}; +Graph.prototype.saveViewState=function(b,f,k,e){k||(f.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),f.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),f.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),f.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),f.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),f.setAttribute("connect",null==b||b.connect?"1":"0"),f.setAttribute("arrows",null==b||b.arrows?"1":"0"),f.setAttribute("fold", +null==b||b.foldingEnabled?"1":"0"));f.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);k=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=k&&(f.setAttribute("pageWidth",k.width),f.setAttribute("pageHeight",k.height));null!=b&&(null!=b.background&&f.setAttribute("background",b.background),e=this.getBackgroundImageObject(b.backgroundImage,e),null!=e&&f.setAttribute("backgroundImage", +JSON.stringify(e)));f.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");f.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null!=b&&null!=b.extFonts&&0<b.extFonts.length&&f.setAttribute("extFonts",b.extFonts.map(function(u){return u.name+"^"+u.url}).join("|"))}; Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(), arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled,hiddenTags:this.hiddenTags,extFonts:this.extFonts}}; Graph.prototype.setViewState=function(b,f){if(null!=b){this.lastPasteXml=b.lastPasteXml;this.pasteCounter=b.pasteCounter||0;this.mathEnabled=b.mathEnabled;this.gridEnabled=b.gridEnabled;this.gridSize=b.gridSize;this.graphHandler.guidesEnabled=b.guidesEnabled;this.foldingEnabled=b.foldingEnabled;this.setShadowVisible(b.shadowVisible,!1);this.scrollbars=b.scrollbars;this.pageVisible=!this.isViewer()&&b.pageVisible;this.background=b.background;this.pageScale=b.pageScale;this.pageFormat=b.pageFormat; -this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var k=this.extFonts;this.extFonts=b.extFonts||[];if(f&&null!=k)for(f=0;f<k.length;f++){var d=document.getElementById("extFont_"+k[f].name);null!=d&&d.parentNode.removeChild(d)}for(f=0;f<this.extFonts.length;f++)this.addExtFont(this.extFonts[f].name,this.extFonts[f].url, +this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var k=this.extFonts;this.extFonts=b.extFonts||[];if(f&&null!=k)for(f=0;f<k.length;f++){var e=document.getElementById("extFont_"+k[f].name);null!=e&&e.parentNode.removeChild(e)}for(f=0;f<this.extFonts.length;f++)this.addExtFont(this.extFonts[f].name,this.extFonts[f].url, !0);this.view.scale=null!=b.scale?b.scale:1;null==this.view.currentRoot||this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null);null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer());null!=b.translate&&(this.view.translate=b.translate)}else this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=this.defaultGridEnabled,this.gridSize=mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,this.pageFormat= "undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.backgroundImage=this.background=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.setShadowVisible(!1,!1),this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=0,this.mathEnabled=this.defaultMathEnabled,this.connectionArrowsEnabled= !0,this.hiddenTags=[],this.extFonts=[];this.preferPageSize=this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged","state",b))}; -Graph.prototype.addExtFont=function(b,f,k){if(b&&f){"1"!=urlParams["ext-fonts"]&&(Graph.recentCustomFonts[b.toLowerCase()]={name:b,url:f});var d="extFont_"+b;if(null==document.getElementById(d))if(0==f.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",f,null,d);else{document.getElementsByTagName("head");var u=document.createElement("style");u.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+f+'");\n}'));u.setAttribute("id",d);document.getElementsByTagName("head")[0].appendChild(u)}if(!k){null== -this.extFonts&&(this.extFonts=[]);k=this.extFonts;d=!0;for(u=0;u<k.length;u++)if(k[u].name==b){d=!1;break}d&&this.extFonts.push({name:b,url:f})}}}; +Graph.prototype.addExtFont=function(b,f,k){if(b&&f){"1"!=urlParams["ext-fonts"]&&(Graph.recentCustomFonts[b.toLowerCase()]={name:b,url:f});var e="extFont_"+b;if(null==document.getElementById(e))if(0==f.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",f,null,e);else{document.getElementsByTagName("head");var u=document.createElement("style");u.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+f+'");\n}'));u.setAttribute("id",e);document.getElementsByTagName("head")[0].appendChild(u)}if(!k){null== +this.extFonts&&(this.extFonts=[]);k=this.extFonts;e=!0;for(u=0;u<k.length;u++)if(k[u].name==b){e=!1;break}e&&this.extFonts.push({name:b,url:f})}}}; EditorUi.prototype.updatePageRoot=function(b,f){if(null==b.root){f=this.editor.extractGraphModel(b.node,null,f);var k=Editor.extractParserError(f);if(k)throw Error(k);null!=f?(b.graphModelNode=f,b.viewState=this.editor.graph.createViewState(f),k=new mxCodec(f.ownerDocument),b.root=k.decode(f).root):b.root=this.editor.graph.model.createRoot()}else if(null==b.viewState){if(null==b.graphModelNode){f=this.editor.extractGraphModel(b.node);if(k=Editor.extractParserError(f))throw Error(k);null!=f&&(b.graphModelNode= f)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}return b}; -EditorUi.prototype.selectPage=function(b,f,k){try{if(b!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);f=null!=f?f:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var d=this.editor.graph.model.createUndoableEdit();d.ignoreEdit=!0;var u=new SelectPage(this,b,k);u.execute();d.add(u);d.notify();this.editor.graph.tooltipHandler.hide();f||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",d))}}catch(x){this.handleError(x)}}; +EditorUi.prototype.selectPage=function(b,f,k){try{if(b!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);f=null!=f?f:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var e=this.editor.graph.model.createUndoableEdit();e.ignoreEdit=!0;var u=new SelectPage(this,b,k);u.execute();e.add(u);e.notify();this.editor.graph.tooltipHandler.hide();f||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",e))}}catch(v){this.handleError(v)}}; EditorUi.prototype.selectNextPage=function(b){var f=this.currentPage;null!=f&&null!=this.pages&&(f=mxUtils.indexOf(this.pages,f),b?this.selectPage(this.pages[mxUtils.mod(f+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(f-1,this.pages.length)]))}; EditorUi.prototype.insertPage=function(b,f){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId()),f=null!=f?f:this.pages.length,f=new ChangePage(this,b,b,f),this.editor.graph.model.execute(f));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b}; EditorUi.prototype.createPage=function(b,f){f=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),f);f.setName(null!=b?b:this.createPageName());this.initDiagramNode(f);return f};EditorUi.prototype.createPageName=function(){for(var b={},f=0;f<this.pages.length;f++){var k=this.pages[f].getName();null!=k&&0<k.length&&(b[k]=k)}f=this.pages.length;do k=mxResources.get("pageWithNumber",[++f]);while(null!=b[k]);return k}; -EditorUi.prototype.removePage=function(b){try{var f=this.editor.graph,k=mxUtils.indexOf(this.pages,b);if(f.isEnabled()&&0<=k){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);f.model.beginUpdate();try{var d=this.currentPage;d==b&&1<this.pages.length?(k==this.pages.length-1?k--:k++,d=this.pages[k]):1>=this.pages.length&&(d=this.insertPage(),f.model.execute(new RenamePage(this,d,mxResources.get("pageWithNumber",[1]))));f.model.execute(new ChangePage(this,b,d))}finally{f.model.endUpdate()}}}catch(u){this.handleError(u)}return b}; -EditorUi.prototype.duplicatePage=function(b,f){var k=null;try{var d=this.editor.graph;if(d.isEnabled()){d.isEditing()&&d.stopEditing();var u=b.node.cloneNode(!1);u.removeAttribute("id");var x={},B=d.createCellLookup([d.model.root]);k=new DiagramPage(u);k.root=d.cloneCell(d.model.root,null,x);var D=new mxGraphModel;D.prefix=Editor.guid()+"-";D.setRoot(k.root);d.updateCustomLinks(d.createCellMapping(x,B),[k.root]);k.viewState=b==this.currentPage?d.getViewState():b.viewState;this.initDiagramNode(k); -k.viewState.scale=1;k.viewState.scrollLeft=null;k.viewState.scrollTop=null;k.viewState.currentRoot=null;k.viewState.defaultParent=null;k.setName(f);k=this.insertPage(k,mxUtils.indexOf(this.pages,b)+1)}}catch(K){this.handleError(K)}return k};EditorUi.prototype.initDiagramNode=function(b){var f=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,f);mxUtils.setTextContent(b.node,Graph.compressNode(f))}; +EditorUi.prototype.removePage=function(b){try{var f=this.editor.graph,k=mxUtils.indexOf(this.pages,b);if(f.isEnabled()&&0<=k){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);f.model.beginUpdate();try{var e=this.currentPage;e==b&&1<this.pages.length?(k==this.pages.length-1?k--:k++,e=this.pages[k]):1>=this.pages.length&&(e=this.insertPage(),f.model.execute(new RenamePage(this,e,mxResources.get("pageWithNumber",[1]))));f.model.execute(new ChangePage(this,b,e))}finally{f.model.endUpdate()}}}catch(u){this.handleError(u)}return b}; +EditorUi.prototype.duplicatePage=function(b,f){var k=null;try{var e=this.editor.graph;if(e.isEnabled()){e.isEditing()&&e.stopEditing();var u=b.node.cloneNode(!1);u.removeAttribute("id");var v={},B=e.createCellLookup([e.model.root]);k=new DiagramPage(u);k.root=e.cloneCell(e.model.root,null,v);var E=new mxGraphModel;E.prefix=Editor.guid()+"-";E.setRoot(k.root);e.updateCustomLinks(e.createCellMapping(v,B),[k.root]);k.viewState=b==this.currentPage?e.getViewState():b.viewState;this.initDiagramNode(k); +k.viewState.scale=1;k.viewState.scrollLeft=null;k.viewState.scrollTop=null;k.viewState.currentRoot=null;k.viewState.defaultParent=null;k.setName(f);k=this.insertPage(k,mxUtils.indexOf(this.pages,b)+1)}}catch(L){this.handleError(L)}return k};EditorUi.prototype.initDiagramNode=function(b){var f=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,f);mxUtils.setTextContent(b.node,Graph.compressNode(f))}; EditorUi.prototype.clonePages=function(b){for(var f=[],k=0;k<b.length;k++)f.push(this.clonePage(b[k]));return f};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var f=new DiagramPage(b.node.cloneNode(!0)),k=b==this.currentPage?this.editor.graph.getViewState():b.viewState;f.viewState=mxUtils.clone(k,EditorUi.transientViewStateProperties);f.root=this.editor.graph.model.cloneCell(b.root,null,!0);return f}; EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var f=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(k){null!=k&&0<k.length&&this.editor.graph.model.execute(new RenamePage(this,b,k))}),mxResources.get("rename"));this.showDialog(f.container,300,80,!0,!0);f.init()}return b};EditorUi.prototype.movePage=function(b,f){this.editor.graph.model.execute(new MovePage(this,b,f))}; EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer";b.style.position="absolute";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.height="0px";return b}; -EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,f=document.createElement("div");f.style.position="relative";f.style.display="inline-block";f.style.verticalAlign="top";f.style.height=this.tabContainer.style.height;f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.fontSize="13px";f.style.marginLeft="30px";for(var k=this.editor.isChromelessView()?29:59,d=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-k)/this.pages.length)+ -1),u=null,x=0;x<this.pages.length;x++)mxUtils.bind(this,function(c,e){this.pages[c]==this.currentPage?(e.className="geActivePage",e.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):e.className="geInactivePage";e.setAttribute("draggable","true");mxEvent.addListener(e,"dragstart",mxUtils.bind(this,function(g){b.isEnabled()?(mxClient.IS_FF&&g.dataTransfer.setData("Text","<diagram/>"),u=c):mxEvent.consume(g)}));mxEvent.addListener(e,"dragend",mxUtils.bind(this,function(g){u=null;g.stopPropagation(); -g.preventDefault()}));mxEvent.addListener(e,"dragover",mxUtils.bind(this,function(g){null!=u&&(g.dataTransfer.dropEffect="move");g.stopPropagation();g.preventDefault()}));mxEvent.addListener(e,"drop",mxUtils.bind(this,function(g){null!=u&&c!=u&&this.movePage(u,c);g.stopPropagation();g.preventDefault()}));f.appendChild(e)})(x,this.createTabForPage(this.pages[x],d,this.pages[x]!=this.currentPage,x+1));this.tabContainer.innerText="";this.tabContainer.appendChild(f);d=this.createPageMenuTab();this.tabContainer.appendChild(d); -d=null;this.isPageInsertTabVisible()&&(d=this.createPageInsertTab(),this.tabContainer.appendChild(d));if(f.clientWidth>this.tabContainer.clientWidth-k){null!=d&&(d.style.position="absolute",d.style.right="0px",f.style.marginRight="30px");var B=this.createControlTab(4," ❮ ");B.style.position="absolute";B.style.right=this.editor.chromeless?"29px":"55px";B.style.fontSize="13pt";this.tabContainer.appendChild(B);var D=this.createControlTab(4," ❯");D.style.position="absolute"; -D.style.right=this.editor.chromeless?"0px":"29px";D.style.fontSize="13pt";this.tabContainer.appendChild(D);var K=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));f.style.width=K+"px";mxEvent.addListener(B,"click",mxUtils.bind(this,function(c){f.scrollLeft-=Math.max(20,K-20);mxUtils.setOpacity(B,0<f.scrollLeft?100:50);mxUtils.setOpacity(D,f.scrollLeft<f.scrollWidth-f.clientWidth?100:50);mxEvent.consume(c)}));mxUtils.setOpacity(B,0<f.scrollLeft?100:50);mxUtils.setOpacity(D, -f.scrollLeft<f.scrollWidth-f.clientWidth?100:50);mxEvent.addListener(D,"click",mxUtils.bind(this,function(c){f.scrollLeft+=Math.max(20,K-20);mxUtils.setOpacity(B,0<f.scrollLeft?100:50);mxUtils.setOpacity(D,f.scrollLeft<f.scrollWidth-f.clientWidth?100:50);mxEvent.consume(c)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()}; +EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,f=document.createElement("div");f.style.position="relative";f.style.display="inline-block";f.style.verticalAlign="top";f.style.height=this.tabContainer.style.height;f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.fontSize="13px";f.style.marginLeft="30px";for(var k=this.editor.isChromelessView()?29:59,e=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-k)/this.pages.length)+ +1),u=null,v=0;v<this.pages.length;v++)mxUtils.bind(this,function(c,d){this.pages[c]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(g){b.isEnabled()?(mxClient.IS_FF&&g.dataTransfer.setData("Text","<diagram/>"),u=c):mxEvent.consume(g)}));mxEvent.addListener(d,"dragend",mxUtils.bind(this,function(g){u=null;g.stopPropagation(); +g.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(g){null!=u&&(g.dataTransfer.dropEffect="move");g.stopPropagation();g.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(g){null!=u&&c!=u&&this.movePage(u,c);g.stopPropagation();g.preventDefault()}));f.appendChild(d)})(v,this.createTabForPage(this.pages[v],e,this.pages[v]!=this.currentPage,v+1));this.tabContainer.innerText="";this.tabContainer.appendChild(f);e=this.createPageMenuTab();this.tabContainer.appendChild(e); +e=null;this.isPageInsertTabVisible()&&(e=this.createPageInsertTab(),this.tabContainer.appendChild(e));if(f.clientWidth>this.tabContainer.clientWidth-k){null!=e&&(e.style.position="absolute",e.style.right="0px",f.style.marginRight="30px");var B=this.createControlTab(4," ❮ ");B.style.position="absolute";B.style.right=this.editor.chromeless?"29px":"55px";B.style.fontSize="13pt";this.tabContainer.appendChild(B);var E=this.createControlTab(4," ❯");E.style.position="absolute"; +E.style.right=this.editor.chromeless?"0px":"29px";E.style.fontSize="13pt";this.tabContainer.appendChild(E);var L=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));f.style.width=L+"px";mxEvent.addListener(B,"click",mxUtils.bind(this,function(c){f.scrollLeft-=Math.max(20,L-20);mxUtils.setOpacity(B,0<f.scrollLeft?100:50);mxUtils.setOpacity(E,f.scrollLeft<f.scrollWidth-f.clientWidth?100:50);mxEvent.consume(c)}));mxUtils.setOpacity(B,0<f.scrollLeft?100:50);mxUtils.setOpacity(E, +f.scrollLeft<f.scrollWidth-f.clientWidth?100:50);mxEvent.addListener(E,"click",mxUtils.bind(this,function(c){f.scrollLeft+=Math.max(20,L-20);mxUtils.setOpacity(B,0<f.scrollLeft?100:50);mxUtils.setOpacity(E,f.scrollLeft<f.scrollWidth-f.clientWidth?100:50);mxEvent.consume(c)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()}; EditorUi.prototype.createTab=function(b){var f=document.createElement("div");f.style.display="inline-block";f.style.whiteSpace="nowrap";f.style.boxSizing="border-box";f.style.position="relative";f.style.overflow="hidden";f.style.textAlign="center";f.style.marginLeft="-1px";f.style.height=this.tabContainer.clientHeight+"px";f.style.padding="12px 4px 8px 4px";f.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";f.style.borderTopStyle="none";f.style.borderBottomStyle="none";f.style.backgroundColor= this.tabContainer.style.backgroundColor;f.style.cursor="move";f.style.color="gray";b&&(mxEvent.addListener(f,"mouseenter",mxUtils.bind(this,function(k){this.editor.graph.isMouseDown||(f.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(k))})),mxEvent.addListener(f,"mouseleave",mxUtils.bind(this,function(k){f.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(k)})));return f}; EditorUi.prototype.createControlTab=function(b,f,k){k=this.createTab(null!=k?k:!0);k.style.lineHeight=this.tabContainerHeight+"px";k.style.paddingTop=b+"px";k.style.cursor="pointer";k.style.width="30px";k.innerHTML=f;null!=k.firstChild&&null!=k.firstChild.style&&mxUtils.setOpacity(k.firstChild,40);return k};EditorUi.prototype.getShortPageName=function(b){b=b.getName();36<b.length&&(b=b.substring(0,34)+"...");return b}; -EditorUi.prototype.createPageMenuTab=function(b,f){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var k=b.getElementsByTagName("div")[0];k.style.display="inline-block";k.style.marginTop="5px";k.style.width="21px";k.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(d){this.editor.graph.popupMenuHandler.hideMenu(); -var u=new mxPopupMenu(mxUtils.bind(this,function(D,K){var c=mxUtils.bind(this,function(){for(var m=0;m<this.pages.length;m++)mxUtils.bind(this,function(n){var z=D.addItem(this.getShortPageName(this.pages[n]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[n])}),K),C=this.pages[n].getId();z.setAttribute("title",this.pages[n].getName()+" ("+(n+1)+"/"+this.pages.length+")"+(null!=C?" ["+C+"]":""));this.pages[n]==this.currentPage&&D.addCheckmark(z,Editor.checkmarkImage)})(m)}),e=mxUtils.bind(this, -function(){D.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),K)});f||c();if(this.editor.graph.isEnabled()){f||(D.addSeparator(K),e());var g=this.currentPage;if(null!=g){D.addSeparator(K);var q=this.getShortPageName(g);D.addItem(mxResources.get("removeIt",[q]),null,mxUtils.bind(this,function(){this.removePage(g)}),K);D.addItem(mxResources.get("renameIt",[q]),null,mxUtils.bind(this,function(){this.renamePage(g,g.getName())}),K);f||D.addSeparator(K);D.addItem(mxResources.get("duplicateIt", -[q]),null,mxUtils.bind(this,function(){this.duplicatePage(g,mxResources.get("copyOf",[g.getName()]))}),K)}}f&&(D.addSeparator(K),e(),D.addSeparator(K),c())}));u.div.className+=" geMenubarMenu";u.smartSeparators=!0;u.showDisabled=!0;u.autoExpand=!0;u.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(u,arguments);u.destroy()});var x=mxEvent.getClientX(d),B=mxEvent.getClientY(d);u.popup(x,B,null,d);this.setCurrentMenu(u);mxEvent.consume(d)}));return b}; +EditorUi.prototype.createPageMenuTab=function(b,f){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var k=b.getElementsByTagName("div")[0];k.style.display="inline-block";k.style.marginTop="5px";k.style.width="21px";k.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(e){this.editor.graph.popupMenuHandler.hideMenu(); +var u=new mxPopupMenu(mxUtils.bind(this,function(E,L){var c=mxUtils.bind(this,function(){for(var m=0;m<this.pages.length;m++)mxUtils.bind(this,function(n){var z=E.addItem(this.getShortPageName(this.pages[n]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[n])}),L),C=this.pages[n].getId();z.setAttribute("title",this.pages[n].getName()+" ("+(n+1)+"/"+this.pages.length+")"+(null!=C?" ["+C+"]":""));this.pages[n]==this.currentPage&&E.addCheckmark(z,Editor.checkmarkImage)})(m)}),d=mxUtils.bind(this, +function(){E.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),L)});f||c();if(this.editor.graph.isEnabled()){f||(E.addSeparator(L),d());var g=this.currentPage;if(null!=g){E.addSeparator(L);var q=this.getShortPageName(g);E.addItem(mxResources.get("removeIt",[q]),null,mxUtils.bind(this,function(){this.removePage(g)}),L);E.addItem(mxResources.get("renameIt",[q]),null,mxUtils.bind(this,function(){this.renamePage(g,g.getName())}),L);f||E.addSeparator(L);E.addItem(mxResources.get("duplicateIt", +[q]),null,mxUtils.bind(this,function(){this.duplicatePage(g,mxResources.get("copyOf",[g.getName()]))}),L)}}f&&(E.addSeparator(L),d(),E.addSeparator(L),c())}));u.div.className+=" geMenubarMenu";u.smartSeparators=!0;u.showDisabled=!0;u.autoExpand=!0;u.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(u,arguments);u.destroy()});var v=mxEvent.getClientX(e),B=mxEvent.getClientY(e);u.popup(v,B,null,e);this.setCurrentMenu(u);mxEvent.consume(e)}));return b}; EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(k){this.insertPage();mxEvent.consume(k)}));var f=b.getElementsByTagName("div")[0];f.style.display="inline-block";f.style.width="21px";f.style.height="21px";return b}; -EditorUi.prototype.createTabForPage=function(b,f,k,d){k=this.createTab(k);var u=b.getName()||mxResources.get("untitled"),x=b.getId();k.setAttribute("title",u+(null!=x?" ("+x+")":"")+" ["+d+"]");mxUtils.write(k,u);k.style.maxWidth=f+"px";k.style.width=f+"px";this.addTabListeners(b,k);42<f&&(k.style.textOverflow="ellipsis");return k}; -EditorUi.prototype.addTabListeners=function(b,f){mxEvent.disableContextMenu(f);var k=this.editor.graph;mxEvent.addListener(f,"dblclick",mxUtils.bind(this,function(x){this.renamePage(b);mxEvent.consume(x)}));var d=!1,u=!1;mxEvent.addGestureListeners(f,mxUtils.bind(this,function(x){d=null!=this.currentMenu;u=b==this.currentPage;k.isMouseDown||u||this.selectPage(b)}),null,mxUtils.bind(this,function(x){if(k.isEnabled()&&!k.isMouseDown&&(mxEvent.isTouchEvent(x)&&u||mxEvent.isPopupTrigger(x))){k.popupMenuHandler.hideMenu(); -this.hideCurrentMenu();if(!mxEvent.isTouchEvent(x)||!d){var B=new mxPopupMenu(this.createPageMenu(b));B.div.className+=" geMenubarMenu";B.smartSeparators=!0;B.showDisabled=!0;B.autoExpand=!0;B.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(B,arguments);this.resetCurrentMenu();B.destroy()});var D=mxEvent.getClientX(x),K=mxEvent.getClientY(x);B.popup(D,K,null,x);this.setCurrentMenu(B,f)}mxEvent.consume(x)}}))}; -EditorUi.prototype.getLinkForPage=function(b,f,k){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var d=this.getCurrentFile();if(null!=d&&d.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var u=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));u+=(0==u.length?"?":"&")+"page-id="+b.getId();null!=f&&(u+="&"+f.join("&"));return(k&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)? -EditorUi.drawHost:"https://"+window.location.host)+"/"+u+"#"+d.getHash()}}return null}; -EditorUi.prototype.createPageMenu=function(b,f){return mxUtils.bind(this,function(k,d){var u=this.editor.graph;k.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),d);k.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),d);k.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,f)}),d);null!=this.getLinkForPage(b)&&(k.addSeparator(d),k.addItem(mxResources.get("link"), -null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(x,B,D,K,c,e){x=this.createUrlParameters(x,B,D,K,c,e);D||x.push("hide-pages=1");u.isSelectionEmpty()||(D=u.getBoundingBox(u.getSelectionCells()),B=u.view.translate,c=u.view.scale,D.width/=c,D.height/=c,D.x=D.x/c-B.x,D.y=D.y/c-B.y,x.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(D.x),y:Math.round(D.y),width:Math.round(D.width),height:Math.round(D.height),border:100})))); -K=new EmbedDialog(this,this.getLinkForPage(b,x,K));this.showDialog(K.container,450,240,!0,!0);K.init()}))})));k.addSeparator(d);k.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),d);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(k.addSeparator(d),k.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null, -!0,!0))}),d))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(f,k,d){d.ui=f.ui;return k};b.afterDecode=function(f,k,d){f=d.oldIndex;d.oldIndex=d.newIndex;d.newIndex=f;return d};mxCodecRegistry.register(b)})(); -(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(f,k,d){d.ui=f.ui;return k};b.afterDecode=function(f,k,d){f=d.previous;d.previous=d.name;d.name=f;return d};mxCodecRegistry.register(b)})(); -(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(f,k,d){d.setAttribute("relatedPage",k.relatedPage.getId());null==k.index&&(d.setAttribute("name",k.relatedPage.getName()),null!=k.relatedPage.viewState&&d.setAttribute("viewState",JSON.stringify(k.relatedPage.viewState,function(u,x){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,u)?x:void 0})),null!=k.relatedPage.root&&f.encodeCell(k.relatedPage.root, -d));return d};b.beforeDecode=function(f,k,d){d.ui=f.ui;d.relatedPage=d.ui.getPageById(k.getAttribute("relatedPage"));if(null==d.relatedPage){var u=k.ownerDocument.createElement("diagram");u.setAttribute("id",k.getAttribute("relatedPage"));u.setAttribute("name",k.getAttribute("name"));d.relatedPage=new DiagramPage(u);u=k.getAttribute("viewState");null!=u&&(d.relatedPage.viewState=JSON.parse(u),k.removeAttribute("viewState"));k=k.cloneNode(!0);u=k.firstChild;if(null!=u)for(d.relatedPage.root=f.decodeCell(u, -!1),d=u.nextSibling,u.parentNode.removeChild(u),u=d;null!=u;){d=u.nextSibling;if(u.nodeType==mxConstants.NODETYPE_ELEMENT){var x=u.getAttribute("id");null==f.lookup(x)&&f.decodeCell(u)}u.parentNode.removeChild(u);u=d}}return k};b.afterDecode=function(f,k,d){d.index=d.previousIndex;return d};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(d,u,x,B,D){u=null!=u?u:!1;null==x&&(x=this.getFoldableCells(this.getSelectionCells(),d));this.stopEditing();this.model.beginUpdate();try{for(var K=x.slice(),c=0;c<x.length;c++)"1"==mxUtils.getValue(this.getCurrentCellStyle(x[c]),"treeFolding","0")&&this.foldTreeCell(d,x[c]);x=K;x=b.apply(this,arguments)}finally{this.model.endUpdate()}return x};Graph.prototype.foldTreeCell= -function(d,u){this.model.beginUpdate();try{var x=[];this.traverse(u,!0,mxUtils.bind(this,function(D,K){var c=null!=K&&this.isTreeEdge(K);c&&x.push(K);D==u||null!=K&&!c||x.push(D);return(null==K||c)&&(D==u||!this.model.isCollapsed(D))}));this.model.setCollapsed(u,d);for(var B=0;B<x.length;B++)this.model.setVisible(x[B],!d)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(d){return!this.isEdgeIgnored(d)};Graph.prototype.getTreeEdges=function(d,u,x,B,D,K){return this.model.filterCells(this.getEdges(d, -u,x,B,D,K),mxUtils.bind(this,function(c){return this.isTreeEdge(c)}))};Graph.prototype.getIncomingTreeEdges=function(d,u){return this.getTreeEdges(d,u,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(d,u){return this.getTreeEdges(d,u,!1,!0,!1)};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function d(E){return z.isVertex(E)&&x(E)}function u(E){var P= -!1;null!=E&&(P="1"==n.getCurrentCellStyle(E).treeMoving);return P}function x(E){var P=!1;null!=E&&(E=z.getParent(E),P=n.view.getState(E),P="tree"==(null!=P?P.style:n.getCellStyle(E)).containerType);return P}function B(E){var P=!1;null!=E&&(E=z.getParent(E),P=n.view.getState(E),n.view.getState(E),P=null!=(null!=P?P.style:n.getCellStyle(E)).childLayout);return P}function D(E){E=n.view.getState(E);if(null!=E){var P=n.getIncomingTreeEdges(E.cell);if(0<P.length&&(P=n.view.getState(P[0]),null!=P&&(P=P.absolutePoints, -null!=P&&0<P.length&&(P=P[P.length-1],null!=P)))){if(P.y==E.y&&Math.abs(P.x-E.getCenterX())<E.width/2)return mxConstants.DIRECTION_SOUTH;if(P.y==E.y+E.height&&Math.abs(P.x-E.getCenterX())<E.width/2)return mxConstants.DIRECTION_NORTH;if(P.x>E.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function K(E,P){P=null!=P?P:!0;n.model.beginUpdate();try{var T=n.model.getParent(E),W=n.getIncomingTreeEdges(E),U=n.cloneCells([W[0],E]);n.model.setTerminal(U[0],n.model.getTerminal(W[0], -!0),!0);var V=D(E),l=T.geometry;V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NORTH?U[1].geometry.x+=P?E.geometry.width+10:-U[1].geometry.width-10:U[1].geometry.y+=P?E.geometry.height+10:-U[1].geometry.height-10;n.view.currentRoot!=T&&(U[1].geometry.x-=l.x,U[1].geometry.y-=l.y);var A=n.view.getState(E),L=n.view.scale;if(null!=A){var Q=mxRectangle.fromRectangle(A);V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NORTH?Q.x+=(P?E.geometry.width+10:-U[1].geometry.width-10)*L:Q.y+=(P? -E.geometry.height+10:-U[1].geometry.height-10)*L;var O=n.getOutgoingTreeEdges(n.model.getTerminal(W[0],!0));if(null!=O){for(var R=V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NORTH,S=l=W=0;S<O.length;S++){var X=n.model.getTerminal(O[S],!1);if(V==D(X)){var aa=n.view.getState(X);X!=E&&null!=aa&&(R&&P!=aa.getCenterX()<A.getCenterX()||!R&&P!=aa.getCenterY()<A.getCenterY())&&mxUtils.intersects(Q,aa)&&(W=10+Math.max(W,(Math.min(Q.x+Q.width,aa.x+aa.width)-Math.max(Q.x,aa.x))/L),l=10+Math.max(l, -(Math.min(Q.y+Q.height,aa.y+aa.height)-Math.max(Q.y,aa.y))/L))}}R?l=0:W=0;for(S=0;S<O.length;S++)if(X=n.model.getTerminal(O[S],!1),V==D(X)&&(aa=n.view.getState(X),X!=E&&null!=aa&&(R&&P!=aa.getCenterX()<A.getCenterX()||!R&&P!=aa.getCenterY()<A.getCenterY()))){var Y=[];n.traverse(aa.cell,!0,function(Z,ca){var fa=null!=ca&&n.isTreeEdge(ca);fa&&Y.push(ca);(null==ca||fa)&&Y.push(Z);return null==ca||fa});n.moveCells(Y,(P?1:-1)*W,(P?1:-1)*l)}}}return n.addCells(U,T)}finally{n.model.endUpdate()}}function c(E){n.model.beginUpdate(); -try{var P=D(E),T=n.getIncomingTreeEdges(E),W=n.cloneCells([T[0],E]);n.model.setTerminal(T[0],W[1],!1);n.model.setTerminal(W[0],W[1],!0);n.model.setTerminal(W[0],E,!1);var U=n.model.getParent(E),V=U.geometry,l=[];n.view.currentRoot!=U&&(W[1].geometry.x-=V.x,W[1].geometry.y-=V.y);n.traverse(E,!0,function(Q,O){var R=null!=O&&n.isTreeEdge(O);R&&l.push(O);(null==O||R)&&l.push(Q);return null==O||R});var A=E.geometry.width+40,L=E.geometry.height+40;P==mxConstants.DIRECTION_SOUTH?A=0:P==mxConstants.DIRECTION_NORTH? -(A=0,L=-L):P==mxConstants.DIRECTION_WEST?(A=-A,L=0):P==mxConstants.DIRECTION_EAST&&(L=0);n.moveCells(l,A,L);return n.addCells(W,U)}finally{n.model.endUpdate()}}function e(E,P){n.model.beginUpdate();try{var T=n.model.getParent(E),W=n.getIncomingTreeEdges(E),U=D(E);0==W.length&&(W=[n.createEdge(T,null,"",null,null,n.createCurrentEdgeStyle())],U=P);var V=n.cloneCells([W[0],E]);n.model.setTerminal(V[0],E,!0);if(null==n.model.getTerminal(V[0],!1)){n.model.setTerminal(V[0],V[1],!1);var l=n.getCellStyle(V[1]).newEdgeStyle; -if(null!=l)try{var A=JSON.parse(l),L;for(L in A)n.setCellStyles(L,A[L],[V[0]]),"edgeStyle"==L&&"elbowEdgeStyle"==A[L]&&n.setCellStyles("elbow",U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[V[0]])}catch(aa){}}W=n.getOutgoingTreeEdges(E);var Q=T.geometry;P=[];n.view.currentRoot==T&&(Q=new mxRectangle);for(l=0;l<W.length;l++){var O=n.model.getTerminal(W[l],!1);null!=O&&P.push(O)}var R=n.view.getBounds(P),S=n.view.translate,X=n.view.scale;U==mxConstants.DIRECTION_SOUTH? -(V[1].geometry.x=null==R?E.geometry.x+(E.geometry.width-V[1].geometry.width)/2:(R.x+R.width)/X-S.x-Q.x+10,V[1].geometry.y+=V[1].geometry.height-Q.y+40):U==mxConstants.DIRECTION_NORTH?(V[1].geometry.x=null==R?E.geometry.x+(E.geometry.width-V[1].geometry.width)/2:(R.x+R.width)/X-S.x+-Q.x+10,V[1].geometry.y-=V[1].geometry.height+Q.y+40):(V[1].geometry.x=U==mxConstants.DIRECTION_WEST?V[1].geometry.x-(V[1].geometry.width+Q.x+40):V[1].geometry.x+(V[1].geometry.width-Q.x+40),V[1].geometry.y=null==R?E.geometry.y+ -(E.geometry.height-V[1].geometry.height)/2:(R.y+R.height)/X-S.y+-Q.y+10);return n.addCells(V,T)}finally{n.model.endUpdate()}}function g(E,P,T){E=n.getOutgoingTreeEdges(E);T=n.view.getState(T);var W=[];if(null!=T&&null!=E){for(var U=0;U<E.length;U++){var V=n.view.getState(n.model.getTerminal(E[U],!1));null!=V&&(!P&&Math.min(V.x+V.width,T.x+T.width)>=Math.max(V.x,T.x)||P&&Math.min(V.y+V.height,T.y+T.height)>=Math.max(V.y,T.y))&&W.push(V)}W.sort(function(l,A){return P?l.x+l.width-A.x-A.width:l.y+l.height- -A.y-A.height})}return W}function q(E,P){var T=D(E),W=P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST;(T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST)==W&&T!=P?m.actions.get("selectParent").funct():T==P?(P=n.getOutgoingTreeEdges(E),null!=P&&0<P.length&&n.setSelectionCell(n.model.getTerminal(P[0],!1))):(T=n.getIncomingTreeEdges(E),null!=T&&0<T.length&&(W=g(n.model.getTerminal(T[0],!0),W,E),E=n.view.getState(E),null!=E&&(E=mxUtils.indexOf(W,E),0<=E&&(E+=P==mxConstants.DIRECTION_NORTH|| -P==mxConstants.DIRECTION_WEST?-1:1,0<=E&&E<=W.length-1&&n.setSelectionCell(W[E].cell)))))}var m=this,n=m.editor.graph,z=n.getModel(),C=m.menus.createPopupMenu;m.menus.createPopupMenu=function(E,P,T){C.apply(this,arguments);if(1==n.getSelectionCount()){P=n.getSelectionCell();var W=n.getOutgoingTreeEdges(P);E.addSeparator();0<W.length&&(d(n.getSelectionCell())&&this.addMenuItems(E,["selectChildren"],null,T),this.addMenuItems(E,["selectDescendants"],null,T));d(n.getSelectionCell())?(E.addSeparator(), -0<n.getIncomingTreeEdges(P).length&&this.addMenuItems(E,["selectSiblings","selectParent"],null,T)):0<n.model.getEdgeCount(P)&&this.addMenuItems(E,["selectConnections"],null,T)}};m.actions.addAction("selectChildren",function(){if(n.isEnabled()&&1==n.getSelectionCount()){var E=n.getSelectionCell();E=n.getOutgoingTreeEdges(E);if(null!=E){for(var P=[],T=0;T<E.length;T++)P.push(n.model.getTerminal(E[T],!1));n.setSelectionCells(P)}}},null,null,"Alt+Shift+X");m.actions.addAction("selectSiblings",function(){if(n.isEnabled()&& -1==n.getSelectionCount()){var E=n.getSelectionCell();E=n.getIncomingTreeEdges(E);if(null!=E&&0<E.length&&(E=n.getOutgoingTreeEdges(n.model.getTerminal(E[0],!0)),null!=E)){for(var P=[],T=0;T<E.length;T++)P.push(n.model.getTerminal(E[T],!1));n.setSelectionCells(P)}}},null,null,"Alt+Shift+S");m.actions.addAction("selectParent",function(){if(n.isEnabled()&&1==n.getSelectionCount()){var E=n.getSelectionCell();E=n.getIncomingTreeEdges(E);null!=E&&0<E.length&&n.setSelectionCell(n.model.getTerminal(E[0], -!0))}},null,null,"Alt+Shift+P");m.actions.addAction("selectDescendants",function(E,P){E=n.getSelectionCell();if(n.isEnabled()&&n.model.isVertex(E)){if(null!=P&&mxEvent.isAltDown(P))n.setSelectionCells(n.model.getTreeEdges(E,null==P||!mxEvent.isShiftDown(P),null==P||!mxEvent.isControlDown(P)));else{var T=[];n.traverse(E,!0,function(W,U){var V=null!=U&&n.isTreeEdge(U);V&&T.push(U);null!=U&&!V||null!=P&&mxEvent.isShiftDown(P)||T.push(W);return null==U||V})}n.setSelectionCells(T)}},null,null,"Alt+Shift+D"); -var v=n.removeCells;n.removeCells=function(E,P){P=null!=P?P:!0;null==E&&(E=this.getDeletableCells(this.getSelectionCells()));P&&(E=this.getDeletableCells(this.addAllEdges(E)));for(var T=[],W=0;W<E.length;W++){var U=E[W];z.isEdge(U)&&x(U)&&(T.push(U),U=z.getTerminal(U,!1));if(d(U)){var V=[];n.traverse(U,!0,function(l,A){var L=null!=A&&n.isTreeEdge(A);L&&V.push(A);(null==A||L)&&V.push(l);return null==A||L});0<V.length&&(T=T.concat(V),U=n.getIncomingTreeEdges(E[W]),E=E.concat(U))}else null!=U&&T.push(E[W])}E= -T;return v.apply(this,arguments)};m.hoverIcons.getStateAt=function(E,P,T){return d(E.cell)?null:this.graph.view.getState(this.graph.getCellAt(P,T))};var y=n.duplicateCells;n.duplicateCells=function(E,P){E=null!=E?E:this.getSelectionCells();for(var T=E.slice(0),W=0;W<T.length;W++){var U=n.view.getState(T[W]);if(null!=U&&d(U.cell)){var V=n.getIncomingTreeEdges(U.cell);for(U=0;U<V.length;U++)mxUtils.remove(V[U],E)}}this.model.beginUpdate();try{var l=y.call(this,E,P);if(l.length==E.length)for(W=0;W<E.length;W++)if(d(E[W])){var A= -n.getIncomingTreeEdges(l[W]);V=n.getIncomingTreeEdges(E[W]);if(0==A.length&&0<V.length){var L=this.cloneCell(V[0]);this.addEdge(L,n.getDefaultParent(),this.model.getTerminal(V[0],!0),l[W])}}}finally{this.model.endUpdate()}return l};var I=n.moveCells;n.moveCells=function(E,P,T,W,U,V,l){var A=null;this.model.beginUpdate();try{var L=U,Q=this.getCurrentCellStyle(U);if(null!=E&&d(U)&&"1"==mxUtils.getValue(Q,"treeFolding","0")){for(var O=0;O<E.length;O++)if(d(E[O])||n.model.isEdge(E[O])&&null==n.model.getTerminal(E[O], -!0)){U=n.model.getParent(E[O]);break}if(null!=L&&U!=L&&null!=this.view.getState(E[0])){var R=n.getIncomingTreeEdges(E[0]);if(0<R.length){var S=n.view.getState(n.model.getTerminal(R[0],!0));if(null!=S){var X=n.view.getState(L);null!=X&&(P=(X.getCenterX()-S.getCenterX())/n.view.scale,T=(X.getCenterY()-S.getCenterY())/n.view.scale)}}}}A=I.apply(this,arguments);if(null!=A&&null!=E&&A.length==E.length)for(O=0;O<A.length;O++)if(this.model.isEdge(A[O]))d(L)&&0>mxUtils.indexOf(A,this.model.getTerminal(A[O], -!0))&&this.model.setTerminal(A[O],L,!0);else if(d(E[O])&&(R=n.getIncomingTreeEdges(E[O]),0<R.length))if(!W)d(L)&&0>mxUtils.indexOf(E,this.model.getTerminal(R[0],!0))&&this.model.setTerminal(R[0],L,!0);else if(0==n.getIncomingTreeEdges(A[O]).length){Q=L;if(null==Q||Q==n.model.getParent(E[O]))Q=n.model.getTerminal(R[0],!0);W=this.cloneCell(R[0]);this.addEdge(W,n.getDefaultParent(),Q,A[O])}}finally{this.model.endUpdate()}return A};if(null!=m.sidebar){var N=m.sidebar.dropAndConnect;m.sidebar.dropAndConnect= -function(E,P,T,W){var U=n.model,V=null;U.beginUpdate();try{if(V=N.apply(this,arguments),d(E))for(var l=0;l<V.length;l++)if(U.isEdge(V[l])&&null==U.getTerminal(V[l],!0)){U.setTerminal(V[l],E,!0);var A=n.getCellGeometry(V[l]);A.points=null;null!=A.getTerminalPoint(!0)&&A.setTerminalPoint(null,!0)}}finally{U.endUpdate()}return V}}var t={88:m.actions.get("selectChildren"),84:m.actions.get("selectSubtree"),80:m.actions.get("selectParent"),83:m.actions.get("selectSiblings")},p=m.onKeyDown;m.onKeyDown=function(E){try{if(n.isEnabled()&& -!n.isEditing()&&d(n.getSelectionCell())&&1==n.getSelectionCount()){var P=null;0<n.getIncomingTreeEdges(n.getSelectionCell()).length&&(9==E.which?P=mxEvent.isShiftDown(E)?c(n.getSelectionCell()):e(n.getSelectionCell()):13==E.which&&(P=K(n.getSelectionCell(),!mxEvent.isShiftDown(E))));if(null!=P&&0<P.length)1==P.length&&n.model.isEdge(P[0])?n.setSelectionCell(n.model.getTerminal(P[0],!1)):n.setSelectionCell(P[P.length-1]),null!=m.hoverIcons&&m.hoverIcons.update(n.view.getState(n.getSelectionCell())), -n.startEditingAtCell(n.getSelectionCell()),mxEvent.consume(E);else if(mxEvent.isAltDown(E)&&mxEvent.isShiftDown(E)){var T=t[E.keyCode];null!=T&&(T.funct(E),mxEvent.consume(E))}else 37==E.keyCode?(q(n.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(E)):38==E.keyCode?(q(n.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(E)):39==E.keyCode?(q(n.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(E)):40==E.keyCode&&(q(n.getSelectionCell(),mxConstants.DIRECTION_SOUTH), -mxEvent.consume(E))}}catch(W){m.handleError(W)}mxEvent.isConsumed(E)||p.apply(this,arguments)};var F=n.connectVertex;n.connectVertex=function(E,P,T,W,U,V,l){var A=n.getIncomingTreeEdges(E);if(d(E)){var L=D(E),Q=L==mxConstants.DIRECTION_EAST||L==mxConstants.DIRECTION_WEST,O=P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST;return L==P||0==A.length?e(E,P):Q==O?c(E):K(E,P!=mxConstants.DIRECTION_NORTH&&P!=mxConstants.DIRECTION_WEST)}return F.apply(this,arguments)};n.getSubtree=function(E){var P= -[E];!u(E)&&!d(E)||B(E)||n.traverse(E,!0,function(T,W){var U=null!=W&&n.isTreeEdge(W);U&&0>mxUtils.indexOf(P,W)&&P.push(W);(null==W||U)&&0>mxUtils.indexOf(P,T)&&P.push(T);return null==W||U});return P};var J=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){J.apply(this,arguments);(u(this.state.cell)||d(this.state.cell))&&!B(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title", -"Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(E){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(E),mxEvent.getClientY(E),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(E); -this.graph.isMouseDown=!0;m.hoverIcons.reset();mxEvent.consume(E)})))};var M=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){M.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var H=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(E){H.apply(this, -arguments);null!=this.moveHandle&&(this.moveHandle.style.display=E?"":"none")};var G=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(E,P){G.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var d=k.apply(this,arguments),u=this.graph;return d.concat([this.addEntry("tree container", -function(){var x=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");x.vertex=!0;var B=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');B.vertex=!0;var D=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};'); -D.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");K.geometry.relative=!0;K.edge=!0;B.insertEdge(K,!0);D.insertEdge(K,!1);x.insert(K);x.insert(B);x.insert(D);return sb.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var x=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;"); -x.vertex=!0;var B=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');B.vertex=!0;var D=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); -D.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");K.geometry.relative=!0;K.edge=!0;B.insertEdge(K,!0);D.insertEdge(K,!1);var c=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); -c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");e.geometry.relative=!0;e.edge=!0;B.insertEdge(e,!0);c.insertEdge(e,!1);var g=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); +EditorUi.prototype.createTabForPage=function(b,f,k,e){k=this.createTab(k);var u=b.getName()||mxResources.get("untitled"),v=b.getId();k.setAttribute("title",u+(null!=v?" ("+v+")":"")+" ["+e+"]");mxUtils.write(k,u);k.style.maxWidth=f+"px";k.style.width=f+"px";this.addTabListeners(b,k);42<f&&(k.style.textOverflow="ellipsis");return k}; +EditorUi.prototype.addTabListeners=function(b,f){mxEvent.disableContextMenu(f);var k=this.editor.graph;mxEvent.addListener(f,"dblclick",mxUtils.bind(this,function(v){this.renamePage(b);mxEvent.consume(v)}));var e=!1,u=!1;mxEvent.addGestureListeners(f,mxUtils.bind(this,function(v){e=null!=this.currentMenu;u=b==this.currentPage;k.isMouseDown||u||this.selectPage(b)}),null,mxUtils.bind(this,function(v){if(k.isEnabled()&&!k.isMouseDown&&(mxEvent.isTouchEvent(v)&&u||mxEvent.isPopupTrigger(v))){k.popupMenuHandler.hideMenu(); +this.hideCurrentMenu();if(!mxEvent.isTouchEvent(v)||!e){var B=new mxPopupMenu(this.createPageMenu(b));B.div.className+=" geMenubarMenu";B.smartSeparators=!0;B.showDisabled=!0;B.autoExpand=!0;B.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(B,arguments);this.resetCurrentMenu();B.destroy()});var E=mxEvent.getClientX(v),L=mxEvent.getClientY(v);B.popup(E,L,null,v);this.setCurrentMenu(B,f)}mxEvent.consume(v)}}))}; +EditorUi.prototype.getLinkForPage=function(b,f,k){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var e=this.getCurrentFile();if(null!=e&&e.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var u=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));u+=(0==u.length?"?":"&")+"page-id="+b.getId();null!=f&&(u+="&"+f.join("&"));return(k&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)? +EditorUi.drawHost:"https://"+window.location.host)+"/"+u+"#"+e.getHash()}}return null}; +EditorUi.prototype.createPageMenu=function(b,f){return mxUtils.bind(this,function(k,e){var u=this.editor.graph;k.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),e);k.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),e);k.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,f)}),e);null!=this.getLinkForPage(b)&&(k.addSeparator(e),k.addItem(mxResources.get("link"), +null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(v,B,E,L,c,d){v=this.createUrlParameters(v,B,E,L,c,d);E||v.push("hide-pages=1");u.isSelectionEmpty()||(E=u.getBoundingBox(u.getSelectionCells()),B=u.view.translate,c=u.view.scale,E.width/=c,E.height/=c,E.x=E.x/c-B.x,E.y=E.y/c-B.y,v.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(E.x),y:Math.round(E.y),width:Math.round(E.width),height:Math.round(E.height),border:100})))); +L=new EmbedDialog(this,this.getLinkForPage(b,v,L));this.showDialog(L.container,450,240,!0,!0);L.init()}))})));k.addSeparator(e);k.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),e);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(k.addSeparator(e),k.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null, +!0,!0))}),e))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(f,k,e){e.ui=f.ui;return k};b.afterDecode=function(f,k,e){f=e.oldIndex;e.oldIndex=e.newIndex;e.newIndex=f;return e};mxCodecRegistry.register(b)})(); +(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(f,k,e){e.ui=f.ui;return k};b.afterDecode=function(f,k,e){f=e.previous;e.previous=e.name;e.name=f;return e};mxCodecRegistry.register(b)})(); +(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(f,k,e){e.setAttribute("relatedPage",k.relatedPage.getId());null==k.index&&(e.setAttribute("name",k.relatedPage.getName()),null!=k.relatedPage.viewState&&e.setAttribute("viewState",JSON.stringify(k.relatedPage.viewState,function(u,v){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,u)?v:void 0})),null!=k.relatedPage.root&&f.encodeCell(k.relatedPage.root, +e));return e};b.beforeDecode=function(f,k,e){e.ui=f.ui;e.relatedPage=e.ui.getPageById(k.getAttribute("relatedPage"));if(null==e.relatedPage){var u=k.ownerDocument.createElement("diagram");u.setAttribute("id",k.getAttribute("relatedPage"));u.setAttribute("name",k.getAttribute("name"));e.relatedPage=new DiagramPage(u);u=k.getAttribute("viewState");null!=u&&(e.relatedPage.viewState=JSON.parse(u),k.removeAttribute("viewState"));k=k.cloneNode(!0);u=k.firstChild;if(null!=u)for(e.relatedPage.root=f.decodeCell(u, +!1),e=u.nextSibling,u.parentNode.removeChild(u),u=e;null!=u;){e=u.nextSibling;if(u.nodeType==mxConstants.NODETYPE_ELEMENT){var v=u.getAttribute("id");null==f.lookup(v)&&f.decodeCell(u)}u.parentNode.removeChild(u);u=e}}return k};b.afterDecode=function(f,k,e){e.index=e.previousIndex;return e};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(e,u,v,B,E){u=null!=u?u:!1;null==v&&(v=this.getFoldableCells(this.getSelectionCells(),e));this.stopEditing();this.model.beginUpdate();try{for(var L=v.slice(),c=0;c<v.length;c++)"1"==mxUtils.getValue(this.getCurrentCellStyle(v[c]),"treeFolding","0")&&this.foldTreeCell(e,v[c]);v=L;v=b.apply(this,arguments)}finally{this.model.endUpdate()}return v};Graph.prototype.foldTreeCell= +function(e,u){this.model.beginUpdate();try{var v=[];this.traverse(u,!0,mxUtils.bind(this,function(E,L){var c=null!=L&&this.isTreeEdge(L);c&&v.push(L);E==u||null!=L&&!c||v.push(E);return(null==L||c)&&(E==u||!this.model.isCollapsed(E))}));this.model.setCollapsed(u,e);for(var B=0;B<v.length;B++)this.model.setVisible(v[B],!e)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(e){return!this.isEdgeIgnored(e)};Graph.prototype.getTreeEdges=function(e,u,v,B,E,L){return this.model.filterCells(this.getEdges(e, +u,v,B,E,L),mxUtils.bind(this,function(c){return this.isTreeEdge(c)}))};Graph.prototype.getIncomingTreeEdges=function(e,u){return this.getTreeEdges(e,u,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(e,u){return this.getTreeEdges(e,u,!1,!0,!1)};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function e(G){return z.isVertex(G)&&v(G)}function u(G){var P= +!1;null!=G&&(P="1"==n.getCurrentCellStyle(G).treeMoving);return P}function v(G){var P=!1;null!=G&&(G=z.getParent(G),P=n.view.getState(G),P="tree"==(null!=P?P.style:n.getCellStyle(G)).containerType);return P}function B(G){var P=!1;null!=G&&(G=z.getParent(G),P=n.view.getState(G),n.view.getState(G),P=null!=(null!=P?P.style:n.getCellStyle(G)).childLayout);return P}function E(G){G=n.view.getState(G);if(null!=G){var P=n.getIncomingTreeEdges(G.cell);if(0<P.length&&(P=n.view.getState(P[0]),null!=P&&(P=P.absolutePoints, +null!=P&&0<P.length&&(P=P[P.length-1],null!=P)))){if(P.y==G.y&&Math.abs(P.x-G.getCenterX())<G.width/2)return mxConstants.DIRECTION_SOUTH;if(P.y==G.y+G.height&&Math.abs(P.x-G.getCenterX())<G.width/2)return mxConstants.DIRECTION_NORTH;if(P.x>G.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function L(G,P){P=null!=P?P:!0;n.model.beginUpdate();try{var T=n.model.getParent(G),W=n.getIncomingTreeEdges(G),U=n.cloneCells([W[0],G]);n.model.setTerminal(U[0],n.model.getTerminal(W[0], +!0),!0);var V=E(G),l=T.geometry;V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NORTH?U[1].geometry.x+=P?G.geometry.width+10:-U[1].geometry.width-10:U[1].geometry.y+=P?G.geometry.height+10:-U[1].geometry.height-10;n.view.currentRoot!=T&&(U[1].geometry.x-=l.x,U[1].geometry.y-=l.y);var A=n.view.getState(G),M=n.view.scale;if(null!=A){var Q=mxRectangle.fromRectangle(A);V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NORTH?Q.x+=(P?G.geometry.width+10:-U[1].geometry.width-10)*M:Q.y+=(P? +G.geometry.height+10:-U[1].geometry.height-10)*M;var O=n.getOutgoingTreeEdges(n.model.getTerminal(W[0],!0));if(null!=O){for(var R=V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NORTH,S=l=W=0;S<O.length;S++){var X=n.model.getTerminal(O[S],!1);if(V==E(X)){var aa=n.view.getState(X);X!=G&&null!=aa&&(R&&P!=aa.getCenterX()<A.getCenterX()||!R&&P!=aa.getCenterY()<A.getCenterY())&&mxUtils.intersects(Q,aa)&&(W=10+Math.max(W,(Math.min(Q.x+Q.width,aa.x+aa.width)-Math.max(Q.x,aa.x))/M),l=10+Math.max(l, +(Math.min(Q.y+Q.height,aa.y+aa.height)-Math.max(Q.y,aa.y))/M))}}R?l=0:W=0;for(S=0;S<O.length;S++)if(X=n.model.getTerminal(O[S],!1),V==E(X)&&(aa=n.view.getState(X),X!=G&&null!=aa&&(R&&P!=aa.getCenterX()<A.getCenterX()||!R&&P!=aa.getCenterY()<A.getCenterY()))){var Y=[];n.traverse(aa.cell,!0,function(Z,ba){var ha=null!=ba&&n.isTreeEdge(ba);ha&&Y.push(ba);(null==ba||ha)&&Y.push(Z);return null==ba||ha});n.moveCells(Y,(P?1:-1)*W,(P?1:-1)*l)}}}return n.addCells(U,T)}finally{n.model.endUpdate()}}function c(G){n.model.beginUpdate(); +try{var P=E(G),T=n.getIncomingTreeEdges(G),W=n.cloneCells([T[0],G]);n.model.setTerminal(T[0],W[1],!1);n.model.setTerminal(W[0],W[1],!0);n.model.setTerminal(W[0],G,!1);var U=n.model.getParent(G),V=U.geometry,l=[];n.view.currentRoot!=U&&(W[1].geometry.x-=V.x,W[1].geometry.y-=V.y);n.traverse(G,!0,function(Q,O){var R=null!=O&&n.isTreeEdge(O);R&&l.push(O);(null==O||R)&&l.push(Q);return null==O||R});var A=G.geometry.width+40,M=G.geometry.height+40;P==mxConstants.DIRECTION_SOUTH?A=0:P==mxConstants.DIRECTION_NORTH? +(A=0,M=-M):P==mxConstants.DIRECTION_WEST?(A=-A,M=0):P==mxConstants.DIRECTION_EAST&&(M=0);n.moveCells(l,A,M);return n.addCells(W,U)}finally{n.model.endUpdate()}}function d(G,P){n.model.beginUpdate();try{var T=n.model.getParent(G),W=n.getIncomingTreeEdges(G),U=E(G);0==W.length&&(W=[n.createEdge(T,null,"",null,null,n.createCurrentEdgeStyle())],U=P);var V=n.cloneCells([W[0],G]);n.model.setTerminal(V[0],G,!0);if(null==n.model.getTerminal(V[0],!1)){n.model.setTerminal(V[0],V[1],!1);var l=n.getCellStyle(V[1]).newEdgeStyle; +if(null!=l)try{var A=JSON.parse(l),M;for(M in A)n.setCellStyles(M,A[M],[V[0]]),"edgeStyle"==M&&"elbowEdgeStyle"==A[M]&&n.setCellStyles("elbow",U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[V[0]])}catch(aa){}}W=n.getOutgoingTreeEdges(G);var Q=T.geometry;P=[];n.view.currentRoot==T&&(Q=new mxRectangle);for(l=0;l<W.length;l++){var O=n.model.getTerminal(W[l],!1);null!=O&&P.push(O)}var R=n.view.getBounds(P),S=n.view.translate,X=n.view.scale;U==mxConstants.DIRECTION_SOUTH? +(V[1].geometry.x=null==R?G.geometry.x+(G.geometry.width-V[1].geometry.width)/2:(R.x+R.width)/X-S.x-Q.x+10,V[1].geometry.y+=V[1].geometry.height-Q.y+40):U==mxConstants.DIRECTION_NORTH?(V[1].geometry.x=null==R?G.geometry.x+(G.geometry.width-V[1].geometry.width)/2:(R.x+R.width)/X-S.x+-Q.x+10,V[1].geometry.y-=V[1].geometry.height+Q.y+40):(V[1].geometry.x=U==mxConstants.DIRECTION_WEST?V[1].geometry.x-(V[1].geometry.width+Q.x+40):V[1].geometry.x+(V[1].geometry.width-Q.x+40),V[1].geometry.y=null==R?G.geometry.y+ +(G.geometry.height-V[1].geometry.height)/2:(R.y+R.height)/X-S.y+-Q.y+10);return n.addCells(V,T)}finally{n.model.endUpdate()}}function g(G,P,T){G=n.getOutgoingTreeEdges(G);T=n.view.getState(T);var W=[];if(null!=T&&null!=G){for(var U=0;U<G.length;U++){var V=n.view.getState(n.model.getTerminal(G[U],!1));null!=V&&(!P&&Math.min(V.x+V.width,T.x+T.width)>=Math.max(V.x,T.x)||P&&Math.min(V.y+V.height,T.y+T.height)>=Math.max(V.y,T.y))&&W.push(V)}W.sort(function(l,A){return P?l.x+l.width-A.x-A.width:l.y+l.height- +A.y-A.height})}return W}function q(G,P){var T=E(G),W=P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST;(T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST)==W&&T!=P?m.actions.get("selectParent").funct():T==P?(P=n.getOutgoingTreeEdges(G),null!=P&&0<P.length&&n.setSelectionCell(n.model.getTerminal(P[0],!1))):(T=n.getIncomingTreeEdges(G),null!=T&&0<T.length&&(W=g(n.model.getTerminal(T[0],!0),W,G),G=n.view.getState(G),null!=G&&(G=mxUtils.indexOf(W,G),0<=G&&(G+=P==mxConstants.DIRECTION_NORTH|| +P==mxConstants.DIRECTION_WEST?-1:1,0<=G&&G<=W.length-1&&n.setSelectionCell(W[G].cell)))))}var m=this,n=m.editor.graph,z=n.getModel(),C=m.menus.createPopupMenu;m.menus.createPopupMenu=function(G,P,T){C.apply(this,arguments);if(1==n.getSelectionCount()){P=n.getSelectionCell();var W=n.getOutgoingTreeEdges(P);G.addSeparator();0<W.length&&(e(n.getSelectionCell())&&this.addMenuItems(G,["selectChildren"],null,T),this.addMenuItems(G,["selectDescendants"],null,T));e(n.getSelectionCell())?(G.addSeparator(), +0<n.getIncomingTreeEdges(P).length&&this.addMenuItems(G,["selectSiblings","selectParent"],null,T)):0<n.model.getEdgeCount(P)&&this.addMenuItems(G,["selectConnections"],null,T)}};m.actions.addAction("selectChildren",function(){if(n.isEnabled()&&1==n.getSelectionCount()){var G=n.getSelectionCell();G=n.getOutgoingTreeEdges(G);if(null!=G){for(var P=[],T=0;T<G.length;T++)P.push(n.model.getTerminal(G[T],!1));n.setSelectionCells(P)}}},null,null,"Alt+Shift+X");m.actions.addAction("selectSiblings",function(){if(n.isEnabled()&& +1==n.getSelectionCount()){var G=n.getSelectionCell();G=n.getIncomingTreeEdges(G);if(null!=G&&0<G.length&&(G=n.getOutgoingTreeEdges(n.model.getTerminal(G[0],!0)),null!=G)){for(var P=[],T=0;T<G.length;T++)P.push(n.model.getTerminal(G[T],!1));n.setSelectionCells(P)}}},null,null,"Alt+Shift+S");m.actions.addAction("selectParent",function(){if(n.isEnabled()&&1==n.getSelectionCount()){var G=n.getSelectionCell();G=n.getIncomingTreeEdges(G);null!=G&&0<G.length&&n.setSelectionCell(n.model.getTerminal(G[0], +!0))}},null,null,"Alt+Shift+P");m.actions.addAction("selectDescendants",function(G,P){G=n.getSelectionCell();if(n.isEnabled()&&n.model.isVertex(G)){if(null!=P&&mxEvent.isAltDown(P))n.setSelectionCells(n.model.getTreeEdges(G,null==P||!mxEvent.isShiftDown(P),null==P||!mxEvent.isControlDown(P)));else{var T=[];n.traverse(G,!0,function(W,U){var V=null!=U&&n.isTreeEdge(U);V&&T.push(U);null!=U&&!V||null!=P&&mxEvent.isShiftDown(P)||T.push(W);return null==U||V})}n.setSelectionCells(T)}},null,null,"Alt+Shift+D"); +var x=n.removeCells;n.removeCells=function(G,P){P=null!=P?P:!0;null==G&&(G=this.getDeletableCells(this.getSelectionCells()));P&&(G=this.getDeletableCells(this.addAllEdges(G)));for(var T=[],W=0;W<G.length;W++){var U=G[W];z.isEdge(U)&&v(U)&&(T.push(U),U=z.getTerminal(U,!1));if(e(U)){var V=[];n.traverse(U,!0,function(l,A){var M=null!=A&&n.isTreeEdge(A);M&&V.push(A);(null==A||M)&&V.push(l);return null==A||M});0<V.length&&(T=T.concat(V),U=n.getIncomingTreeEdges(G[W]),G=G.concat(U))}else null!=U&&T.push(G[W])}G= +T;return x.apply(this,arguments)};m.hoverIcons.getStateAt=function(G,P,T){return e(G.cell)?null:this.graph.view.getState(this.graph.getCellAt(P,T))};var y=n.duplicateCells;n.duplicateCells=function(G,P){G=null!=G?G:this.getSelectionCells();for(var T=G.slice(0),W=0;W<T.length;W++){var U=n.view.getState(T[W]);if(null!=U&&e(U.cell)){var V=n.getIncomingTreeEdges(U.cell);for(U=0;U<V.length;U++)mxUtils.remove(V[U],G)}}this.model.beginUpdate();try{var l=y.call(this,G,P);if(l.length==G.length)for(W=0;W<G.length;W++)if(e(G[W])){var A= +n.getIncomingTreeEdges(l[W]);V=n.getIncomingTreeEdges(G[W]);if(0==A.length&&0<V.length){var M=this.cloneCell(V[0]);this.addEdge(M,n.getDefaultParent(),this.model.getTerminal(V[0],!0),l[W])}}}finally{this.model.endUpdate()}return l};var I=n.moveCells;n.moveCells=function(G,P,T,W,U,V,l){var A=null;this.model.beginUpdate();try{var M=U,Q=this.getCurrentCellStyle(U);if(null!=G&&e(U)&&"1"==mxUtils.getValue(Q,"treeFolding","0")){for(var O=0;O<G.length;O++)if(e(G[O])||n.model.isEdge(G[O])&&null==n.model.getTerminal(G[O], +!0)){U=n.model.getParent(G[O]);break}if(null!=M&&U!=M&&null!=this.view.getState(G[0])){var R=n.getIncomingTreeEdges(G[0]);if(0<R.length){var S=n.view.getState(n.model.getTerminal(R[0],!0));if(null!=S){var X=n.view.getState(M);null!=X&&(P=(X.getCenterX()-S.getCenterX())/n.view.scale,T=(X.getCenterY()-S.getCenterY())/n.view.scale)}}}}A=I.apply(this,arguments);if(null!=A&&null!=G&&A.length==G.length)for(O=0;O<A.length;O++)if(this.model.isEdge(A[O]))e(M)&&0>mxUtils.indexOf(A,this.model.getTerminal(A[O], +!0))&&this.model.setTerminal(A[O],M,!0);else if(e(G[O])&&(R=n.getIncomingTreeEdges(G[O]),0<R.length))if(!W)e(M)&&0>mxUtils.indexOf(G,this.model.getTerminal(R[0],!0))&&this.model.setTerminal(R[0],M,!0);else if(0==n.getIncomingTreeEdges(A[O]).length){Q=M;if(null==Q||Q==n.model.getParent(G[O]))Q=n.model.getTerminal(R[0],!0);W=this.cloneCell(R[0]);this.addEdge(W,n.getDefaultParent(),Q,A[O])}}finally{this.model.endUpdate()}return A};if(null!=m.sidebar){var N=m.sidebar.dropAndConnect;m.sidebar.dropAndConnect= +function(G,P,T,W){var U=n.model,V=null;U.beginUpdate();try{if(V=N.apply(this,arguments),e(G))for(var l=0;l<V.length;l++)if(U.isEdge(V[l])&&null==U.getTerminal(V[l],!0)){U.setTerminal(V[l],G,!0);var A=n.getCellGeometry(V[l]);A.points=null;null!=A.getTerminalPoint(!0)&&A.setTerminalPoint(null,!0)}}finally{U.endUpdate()}return V}}var t={88:m.actions.get("selectChildren"),84:m.actions.get("selectSubtree"),80:m.actions.get("selectParent"),83:m.actions.get("selectSiblings")},p=m.onKeyDown;m.onKeyDown=function(G){try{if(n.isEnabled()&& +!n.isEditing()&&e(n.getSelectionCell())&&1==n.getSelectionCount()){var P=null;0<n.getIncomingTreeEdges(n.getSelectionCell()).length&&(9==G.which?P=mxEvent.isShiftDown(G)?c(n.getSelectionCell()):d(n.getSelectionCell()):13==G.which&&(P=L(n.getSelectionCell(),!mxEvent.isShiftDown(G))));if(null!=P&&0<P.length)1==P.length&&n.model.isEdge(P[0])?n.setSelectionCell(n.model.getTerminal(P[0],!1)):n.setSelectionCell(P[P.length-1]),null!=m.hoverIcons&&m.hoverIcons.update(n.view.getState(n.getSelectionCell())), +n.startEditingAtCell(n.getSelectionCell()),mxEvent.consume(G);else if(mxEvent.isAltDown(G)&&mxEvent.isShiftDown(G)){var T=t[G.keyCode];null!=T&&(T.funct(G),mxEvent.consume(G))}else 37==G.keyCode?(q(n.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(G)):38==G.keyCode?(q(n.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(G)):39==G.keyCode?(q(n.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(G)):40==G.keyCode&&(q(n.getSelectionCell(),mxConstants.DIRECTION_SOUTH), +mxEvent.consume(G))}}catch(W){m.handleError(W)}mxEvent.isConsumed(G)||p.apply(this,arguments)};var F=n.connectVertex;n.connectVertex=function(G,P,T,W,U,V,l){var A=n.getIncomingTreeEdges(G);if(e(G)){var M=E(G),Q=M==mxConstants.DIRECTION_EAST||M==mxConstants.DIRECTION_WEST,O=P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST;return M==P||0==A.length?d(G,P):Q==O?c(G):L(G,P!=mxConstants.DIRECTION_NORTH&&P!=mxConstants.DIRECTION_WEST)}return F.apply(this,arguments)};n.getSubtree=function(G){var P= +[G];!u(G)&&!e(G)||B(G)||n.traverse(G,!0,function(T,W){var U=null!=W&&n.isTreeEdge(W);U&&0>mxUtils.indexOf(P,W)&&P.push(W);(null==W||U)&&0>mxUtils.indexOf(P,T)&&P.push(T);return null==W||U});return P};var K=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){K.apply(this,arguments);(u(this.state.cell)||e(this.state.cell))&&!B(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title", +"Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(G){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(G),mxEvent.getClientY(G),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(G); +this.graph.isMouseDown=!0;m.hoverIcons.reset();mxEvent.consume(G)})))};var D=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){D.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var H=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(G){H.apply(this, +arguments);null!=this.moveHandle&&(this.moveHandle.style.display=G?"":"none")};var J=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(G,P){J.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var e=k.apply(this,arguments),u=this.graph;return e.concat([this.addEntry("tree container", +function(){var v=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");v.vertex=!0;var B=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');B.vertex=!0;var E=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};'); +E.vertex=!0;var L=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");L.geometry.relative=!0;L.edge=!0;B.insertEdge(L,!0);E.insertEdge(L,!1);v.insert(L);v.insert(B);v.insert(E);return sb.createVertexTemplateFromCells([v],v.geometry.width,v.geometry.height,v.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var v=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;"); +v.vertex=!0;var B=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');B.vertex=!0;var E=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); +E.vertex=!0;var L=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");L.geometry.relative=!0;L.edge=!0;B.insertEdge(L,!0);E.insertEdge(L,!1);var c=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); +c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");d.geometry.relative=!0;d.edge=!0;B.insertEdge(d,!0);c.insertEdge(d,!1);var g=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); g.vertex=!0;var q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");q.geometry.relative=!0;q.edge=!0;B.insertEdge(q,!0);g.insertEdge(q,!1);var m=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); -m.vertex=!0;var n=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");n.geometry.relative=!0;n.edge=!0;B.insertEdge(n,!0);m.insertEdge(n,!1);x.insert(K);x.insert(e);x.insert(q);x.insert(n);x.insert(B);x.insert(D);x.insert(c);x.insert(g);x.insert(m);return sb.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var x=new mxCell("Central Idea", -new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');x.vertex=!0;return sb.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var x=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); -x.vertex=!0;var B=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");B.geometry.setTerminalPoint(new mxPoint(-40,40),!0);B.geometry.relative=!0;B.edge=!0;x.insertEdge(B,!1);return sb.createVertexTemplateFromCells([x,B],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var x=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); -x.vertex=!0;var B=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");B.geometry.setTerminalPoint(new mxPoint(-40,40),!0);B.geometry.relative=!0;B.edge=!0;x.insertEdge(B,!1);return sb.createVertexTemplateFromCells([x,B],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree orgchart organization division",function(){var x=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};'); -x.vertex=!0;var B=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');u.setAttributeForCell(B,"treeRoot","1");B.vertex=!0;var D=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};'); -D.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");K.geometry.relative=!0;K.edge=!0;B.insertEdge(K,!0);D.insertEdge(K,!1);var c=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;"); -e.geometry.relative=!0;e.edge=!0;B.insertEdge(e,!0);c.insertEdge(e,!1);x.insert(K);x.insert(e);x.insert(B);x.insert(D);x.insert(c);return sb.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree root",function(){var x=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');u.setAttributeForCell(x,"treeRoot", -"1");x.vertex=!0;return sb.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree division",function(){var x=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');x.vertex=!0;var B=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;"); -B.geometry.setTerminalPoint(new mxPoint(0,0),!0);B.geometry.relative=!0;B.edge=!0;x.insertEdge(B,!1);return sb.createVertexTemplateFromCells([x,B],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree sub sections",function(){var x=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");x.vertex=!0;var B=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;"); -B.geometry.setTerminalPoint(new mxPoint(110,-40),!0);B.geometry.relative=!0;B.edge=!0;x.insertEdge(B,!1);var D=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");D.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");K.geometry.setTerminalPoint(new mxPoint(110,-40),!0);K.geometry.relative= -!0;K.edge=!0;D.insertEdge(K,!1);return sb.createVertexTemplateFromCells([B,K,x,D],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows; -EditorUi.initMinimalTheme=function(){function b(v,y){if(EditorUi.windowed){var I=v.editor.graph;I.popupMenuHandler.hideMenu();if(null==v.formatWindow){y="1"==urlParams.sketch?Math.max(10,v.diagramContainer.clientWidth-241):Math.max(10,v.diagramContainer.clientWidth-248);var N="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;I="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,I.container.clientHeight-10);v.formatWindow=new WrapperWindow(v,mxResources.get("format"),y,N,240,I, -function(t){t=v.createFormat(t);t.init();return t});v.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){v.formatWindow.window.fit()}));v.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else v.formatWindow.window.setVisible(null!=y?y:!v.formatWindow.window.isVisible())}else null==v.formatElt&&(v.formatElt=v.createSidebarContainer(),v.createFormat(v.formatElt).init(),v.formatElt.style.border="none",v.formatElt.style.width="240px",v.formatElt.style.borderLeft="1px solid gray", -v.formatElt.style.right="0px"),I=v.diagramContainer.parentNode,null!=v.formatElt.parentNode?(v.formatElt.parentNode.removeChild(v.formatElt),I.style.right="0px"):(I.parentNode.appendChild(v.formatElt),I.style.right=v.formatElt.style.width)}function f(v,y){function I(F,J){var M=v.menus.get(F);F=p.addMenu(J,mxUtils.bind(this,function(){M.funct.apply(this,arguments)}));F.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;"; -F.className="geTitle";y.appendChild(F);return F}var N=document.createElement("div");N.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";N.className="geTitle";var t=document.createElement("span");t.style.fontSize="18px";t.style.marginRight="5px";t.innerHTML="+";N.appendChild(t);mxUtils.write(N,mxResources.get("moreShapes"));y.appendChild(N);mxEvent.addListener(N,"click",function(){v.actions.get("shapes").funct()}); -var p=new Menubar(v,y);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?N.style.bottom="0":null!=v.actions.get("newLibrary")?(N=document.createElement("div"),N.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",N.className="geTitle",t=document.createElement("span"),t.style.cssText="position:relative;top:6px;",mxUtils.write(t,mxResources.get("newLibrary")),N.appendChild(t), -y.appendChild(N),mxEvent.addListener(N,"click",v.actions.get("newLibrary").funct),N=document.createElement("div"),N.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",N.className="geTitle",t=document.createElement("span"),t.style.cssText="position:relative;top:6px;",mxUtils.write(t,mxResources.get("openLibrary")),N.appendChild(t),y.appendChild(N),mxEvent.addListener(N, -"click",v.actions.get("openLibrary").funct)):(N=I("newLibrary",mxResources.get("newLibrary")),N.style.boxSizing="border-box",N.style.paddingRight="6px",N.style.paddingLeft="6px",N.style.height="32px",N.style.left="0",N=I("openLibraryFrom",mxResources.get("openLibraryFrom")),N.style.borderLeft="1px solid lightgray",N.style.boxSizing="border-box",N.style.paddingRight="6px",N.style.paddingLeft="6px",N.style.height="32px",N.style.left="50%");y.appendChild(v.sidebar.container);y.style.overflow="hidden"} -function k(v,y){if(EditorUi.windowed){var I=v.editor.graph;I.popupMenuHandler.hideMenu();if(null==v.sidebarWindow){y=Math.min(I.container.clientWidth-10,218);var N="1"==urlParams.embedInline?650:Math.min(I.container.clientHeight-40,650);v.sidebarWindow=new WrapperWindow(v,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(I.container.clientHeight-N)/2):56,y-6,N-6,function(t){f(v,t)});v.sidebarWindow.window.addListener(mxEvent.SHOW, -mxUtils.bind(this,function(){v.sidebarWindow.window.fit()}));v.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);v.sidebarWindow.window.setVisible(!0);isLocalStorage&&v.getLocalData("sidebar",function(t){v.sidebar.showEntries(t,null,!0)});v.restoreLibraries()}else v.sidebarWindow.window.setVisible(null!=y?y:!v.sidebarWindow.window.isVisible())}else null==v.sidebarElt&&(v.sidebarElt=v.createSidebarContainer(),f(v,v.sidebarElt),v.sidebarElt.style.border="none",v.sidebarElt.style.width="210px", -v.sidebarElt.style.borderRight="1px solid gray"),I=v.diagramContainer.parentNode,null!=v.sidebarElt.parentNode?(v.sidebarElt.parentNode.removeChild(v.sidebarElt),I.style.left="0px"):(I.parentNode.appendChild(v.sidebarElt),I.style.left=v.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var d=0;try{d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(v){}Editor.checkmarkImage= +m.vertex=!0;var n=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");n.geometry.relative=!0;n.edge=!0;B.insertEdge(n,!0);m.insertEdge(n,!1);v.insert(L);v.insert(d);v.insert(q);v.insert(n);v.insert(B);v.insert(E);v.insert(c);v.insert(g);v.insert(m);return sb.createVertexTemplateFromCells([v],v.geometry.width,v.geometry.height,v.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var v=new mxCell("Central Idea", +new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');v.vertex=!0;return sb.createVertexTemplateFromCells([v],v.geometry.width,v.geometry.height,v.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var v=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); +v.vertex=!0;var B=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");B.geometry.setTerminalPoint(new mxPoint(-40,40),!0);B.geometry.relative=!0;B.edge=!0;v.insertEdge(B,!1);return sb.createVertexTemplateFromCells([v,B],v.geometry.width,v.geometry.height,v.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var v=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); +v.vertex=!0;var B=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");B.geometry.setTerminalPoint(new mxPoint(-40,40),!0);B.geometry.relative=!0;B.edge=!0;v.insertEdge(B,!1);return sb.createVertexTemplateFromCells([v,B],v.geometry.width,v.geometry.height,v.value)}),this.addEntry("tree orgchart organization division",function(){var v=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};'); +v.vertex=!0;var B=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');u.setAttributeForCell(B,"treeRoot","1");B.vertex=!0;var E=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};'); +E.vertex=!0;var L=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");L.geometry.relative=!0;L.edge=!0;B.insertEdge(L,!0);E.insertEdge(L,!1);var c=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;"); +d.geometry.relative=!0;d.edge=!0;B.insertEdge(d,!0);c.insertEdge(d,!1);v.insert(L);v.insert(d);v.insert(B);v.insert(E);v.insert(c);return sb.createVertexTemplateFromCells([v],v.geometry.width,v.geometry.height,v.value)}),this.addEntry("tree root",function(){var v=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');u.setAttributeForCell(v,"treeRoot", +"1");v.vertex=!0;return sb.createVertexTemplateFromCells([v],v.geometry.width,v.geometry.height,v.value)}),this.addEntry("tree division",function(){var v=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');v.vertex=!0;var B=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;"); +B.geometry.setTerminalPoint(new mxPoint(0,0),!0);B.geometry.relative=!0;B.edge=!0;v.insertEdge(B,!1);return sb.createVertexTemplateFromCells([v,B],v.geometry.width,v.geometry.height,v.value)}),this.addEntry("tree sub sections",function(){var v=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");v.vertex=!0;var B=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;"); +B.geometry.setTerminalPoint(new mxPoint(110,-40),!0);B.geometry.relative=!0;B.edge=!0;v.insertEdge(B,!1);var E=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");E.vertex=!0;var L=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");L.geometry.setTerminalPoint(new mxPoint(110,-40),!0);L.geometry.relative= +!0;L.edge=!0;E.insertEdge(L,!1);return sb.createVertexTemplateFromCells([B,L,v,E],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows; +EditorUi.initMinimalTheme=function(){function b(x,y){if(EditorUi.windowed){var I=x.editor.graph;I.popupMenuHandler.hideMenu();if(null==x.formatWindow){y="1"==urlParams.sketch?Math.max(10,x.diagramContainer.clientWidth-241):Math.max(10,x.diagramContainer.clientWidth-248);var N="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;I="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,I.container.clientHeight-10);x.formatWindow=new WrapperWindow(x,mxResources.get("format"),y,N,240,I, +function(t){x.createFormat(t).init()});x.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){x.formatWindow.window.fit()}));x.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else x.formatWindow.window.setVisible(null!=y?y:!x.formatWindow.window.isVisible())}else null==x.formatElt&&(x.formatElt=x.createSidebarContainer(),x.createFormat(x.formatElt).init(),x.formatElt.style.border="none",x.formatElt.style.width="240px",x.formatElt.style.borderLeft="1px solid gray", +x.formatElt.style.right="0px"),I=x.diagramContainer.parentNode,null!=x.formatElt.parentNode?(x.formatElt.parentNode.removeChild(x.formatElt),I.style.right="0px"):(I.parentNode.appendChild(x.formatElt),I.style.right=x.formatElt.style.width)}function f(x,y){function I(F,K){var D=x.menus.get(F);F=p.addMenu(K,mxUtils.bind(this,function(){D.funct.apply(this,arguments)}));F.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;"; +F.className="geTitle";y.appendChild(F);return F}var N=document.createElement("div");N.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";N.className="geTitle";var t=document.createElement("span");t.style.fontSize="18px";t.style.marginRight="5px";t.innerHTML="+";N.appendChild(t);mxUtils.write(N,mxResources.get("moreShapes"));y.appendChild(N);mxEvent.addListener(N,"click",function(){x.actions.get("shapes").funct()}); +var p=new Menubar(x,y);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?N.style.bottom="0":null!=x.actions.get("newLibrary")?(N=document.createElement("div"),N.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",N.className="geTitle",t=document.createElement("span"),t.style.cssText="position:relative;top:6px;",mxUtils.write(t,mxResources.get("newLibrary")),N.appendChild(t), +y.appendChild(N),mxEvent.addListener(N,"click",x.actions.get("newLibrary").funct),N=document.createElement("div"),N.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",N.className="geTitle",t=document.createElement("span"),t.style.cssText="position:relative;top:6px;",mxUtils.write(t,mxResources.get("openLibrary")),N.appendChild(t),y.appendChild(N),mxEvent.addListener(N, +"click",x.actions.get("openLibrary").funct)):(N=I("newLibrary",mxResources.get("newLibrary")),N.style.boxSizing="border-box",N.style.paddingRight="6px",N.style.paddingLeft="6px",N.style.height="32px",N.style.left="0",N=I("openLibraryFrom",mxResources.get("openLibraryFrom")),N.style.borderLeft="1px solid lightgray",N.style.boxSizing="border-box",N.style.paddingRight="6px",N.style.paddingLeft="6px",N.style.height="32px",N.style.left="50%");y.appendChild(x.sidebar.container);y.style.overflow="hidden"} +function k(x,y){if(EditorUi.windowed){var I=x.editor.graph;I.popupMenuHandler.hideMenu();if(null==x.sidebarWindow){y=Math.min(I.container.clientWidth-10,218);var N="1"==urlParams.embedInline?650:Math.min(I.container.clientHeight-40,650);x.sidebarWindow=new WrapperWindow(x,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(I.container.clientHeight-N)/2):56,y-6,N-6,function(t){f(x,t)});x.sidebarWindow.window.addListener(mxEvent.SHOW, +mxUtils.bind(this,function(){x.sidebarWindow.window.fit()}));x.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);x.sidebarWindow.window.setVisible(!0);isLocalStorage&&x.getLocalData("sidebar",function(t){x.sidebar.showEntries(t,null,!0)});x.restoreLibraries()}else x.sidebarWindow.window.setVisible(null!=y?y:!x.sidebarWindow.window.isVisible())}else null==x.sidebarElt&&(x.sidebarElt=x.createSidebarContainer(),f(x,x.sidebarElt),x.sidebarElt.style.border="none",x.sidebarElt.style.width="210px", +x.sidebarElt.style.borderRight="1px solid gray"),I=x.diagramContainer.parentNode,null!=x.sidebarElt.parentNode?(x.sidebarElt.parentNode.removeChild(x.sidebarElt),I.style.left="0px"):(I.parentNode.appendChild(x.sidebarElt),I.style.left=x.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var e=0;try{e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(x){}Editor.checkmarkImage= Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src; mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR= "#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor= "#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight="1"==urlParams.sketch?1:46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert="1"!=urlParams.sketch&&!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.styleElt=document.createElement("style");Editor.styleElt.type="text/css";Editor.styleElt.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(Editor.styleElt); -Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var u=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");u.apply(this,arguments)};var x=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){x.apply(this,arguments);this.menus.get("save").setEnabled(null!= -this.getCurrentFile()||"1"==urlParams.embed)};var B=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(v,y){null!=y.shortcut&&900>d&&!mxClient.IS_IOS?v.firstChild.nextSibling.setAttribute("title",y.shortcut):B.apply(this,arguments)};var D=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){D.apply(this,arguments);if(null!=this.userElement){var v=this.userElement;v.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+v.style.display;v.className= -"geToolbarButton";v.innerText="";v.style.backgroundImage="url("+Editor.userImage+")";v.style.backgroundPosition="center center";v.style.backgroundRepeat="no-repeat";v.style.backgroundSize="24px 24px";v.style.height="24px";v.style.width="24px";v.style.cssFloat="right";v.setAttribute("title",mxResources.get("changeUser"));if("none"!=v.style.display){v.style.display="inline-block";var y=this.getCurrentFile();if(null!=y&&y.isRealtimeEnabled()&&y.isRealtimeSupported()){var I=document.createElement("img"); -I.setAttribute("border","0");I.style.position="absolute";I.style.left="18px";I.style.top="2px";I.style.width="12px";I.style.height="12px";var N=y.getRealtimeError();y=y.getRealtimeState();var t=mxResources.get("realtimeCollaboration");1==y?(I.src=Editor.syncImage,t+=" ("+mxResources.get("online")+")"):(I.src=Editor.syncProblemImage,t=null!=N&&null!=N.message?t+(" ("+N.message+")"):t+(" ("+mxResources.get("disconnected")+")"));I.setAttribute("title",t);v.style.paddingRight="4px";v.appendChild(I)}}}}; -var K=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){K.apply(this,arguments);if(null!=this.shareButton){var v=this.shareButton;v.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";v.className="geToolbarButton";v.innerText="";v.style.backgroundImage="url("+Editor.shareImage+")";v.style.backgroundPosition="center center";v.style.backgroundRepeat="no-repeat";v.style.backgroundSize="24px 24px";v.style.height= -"24px";v.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop="-2px",this.buttonContainer.style.paddingTop="4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var v=document.createElement("div");v.style.display="inline-block";v.style.position="relative";v.style.marginTop="6px";v.style.marginRight="4px";var y=document.createElement("a");y.className= -"geMenuItem gePrimaryBtn";y.style.marginLeft="8px";y.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var I="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(y,I);y.setAttribute("title",I);mxEvent.addListener(y,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));v.appendChild(y)}}else mxUtils.write(y,mxResources.get("save")),y.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+ -"+S)"),mxEvent.addListener(y,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),v.appendChild(y),"1"==urlParams.saveAndExit&&(y=document.createElement("a"),mxUtils.write(y,mxResources.get("saveAndExit")),y.setAttribute("title",mxResources.get("saveAndExit")),y.className="geMenuItem",y.style.marginLeft="6px",y.style.padding="6px",mxEvent.addListener(y,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),v.appendChild(y));"1"!=urlParams.noExitBtn&&(y= -document.createElement("a"),I="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(y,I),y.setAttribute("title",I),y.className="geMenuItem",y.style.marginLeft="6px",y.style.padding="6px",mxEvent.addListener(y,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),v.appendChild(y));this.buttonContainer.appendChild(v);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var c=Sidebar.prototype.getTooltipOffset; -Sidebar.prototype.getTooltipOffset=function(v,y){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,v)){var I=mxUtils.getOffset(this.editorUi.picker);I.x+=this.editorUi.picker.offsetWidth+4;I.y+=v.offsetTop-y.height/2+16;return I}var N=c.apply(this,arguments);I=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);N.x+=I.x-16;N.y+=I.y;return N};var e=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(v,y,I){var N=this.editorUi.editor.graph; -v.smartSeparators=!0;e.apply(this,arguments);"1"==urlParams.sketch?N.isEnabled()&&(v.addSeparator(),1==N.getSelectionCount()&&this.addMenuItems(v,["-","lockUnlock"],null,I)):1==N.getSelectionCount()?(N.isCellFoldable(N.getSelectionCell())&&this.addMenuItems(v,N.isCellCollapsed(y)?["expand"]:["collapse"],null,I),this.addMenuItems(v,["collapsible","-","lockUnlock","enterGroup"],null,I),v.addSeparator(),this.addSubmenu("layout",v)):N.isSelectionEmpty()&&N.isEnabled()?(v.addSeparator(),this.addMenuItems(v, -["editData"],null,I),v.addSeparator(),this.addSubmenu("layout",v),this.addSubmenu("insert",v),this.addMenuItems(v,["-","exitGroup"],null,I)):N.isEnabled()&&this.addMenuItems(v,["-","lockUnlock"],null,I)};var g=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(v,y,I){g.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(v,["copyAsImage"],null,I)};EditorUi.prototype.toggleFormatPanel=function(v){null!=this.formatWindow?this.formatWindow.window.setVisible(null!= -v?v:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1), -this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow= -null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.window.setVisible(!1),this.menus.findReplaceWindow.window.destroy(),this.menus.findReplaceWindow=null);q.apply(this,arguments)};var m=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(v){m.apply(this,arguments);if(v){var y=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=y&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0); -null!=this.formatWindow&&(1E3<=y||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var n=Menus.prototype.init;Menus.prototype.init=function(){n.apply(this,arguments);var v=this.editorUi,y=v.editor.graph,I=v.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(H){v.setPagesVisible(!Editor.pagesVisible)})); -I.setToggleAction(!0);I.setSelectedCallback(function(){return Editor.pagesVisible});v.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){y.popupMenuHandler.hideMenu();v.showImportCsvDialog()}));v.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var H=new ParseDialog(v,"Insert from Text");v.showDialog(H.container,620,420,!0,!1);H.init()}));v.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var H=new ParseDialog(v,"Insert from Text", -"formatSql");v.showDialog(H.container,620,420,!0,!1);H.init()}));v.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){k(v)},null,null,Editor.ctrlKey+"+Shift+K"));I=v.actions.put("toggleFormat",new Action(mxResources.get("format"),function(){b(v)}));I.shortcut=v.actions.get("formatPanel").shortcut;I.setToggleAction(!0);I.setSelectedCallback(mxUtils.bind(this,function(){return null!=v.formatWindow&&v.formatWindow.window.isVisible()})); -EditorUi.enablePlantUml&&!v.isOffline()&&v.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var H=new ParseDialog(v,mxResources.get("plantUml")+"...","plantUml");v.showDialog(H.container,620,420,!0,!1);H.init()}));v.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var H=new ParseDialog(v,mxResources.get("mermaid")+"...","mermaid");v.showDialog(H.container,620,420,!0,!1);H.init()}));var N=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this, -function(H,G){var E=this.editorUi.editor.graph,P=E.getSelectionCell();N.call(this,H,P,null,G);this.addMenuItems(H,["editTooltip"],G);E.model.isVertex(P)&&this.addMenuItems(H,["editGeometry"],G);this.addMenuItems(H,["-","edit"],G)})));this.addPopupMenuCellEditItems=function(H,G,E,P){H.addSeparator();this.addSubmenu("editCell",H,P,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,function(H,G){var E=v.getCurrentFile();v.menus.addMenuItems(H,["new"],G);v.menus.addSubmenu("openFrom", -H,G);isLocalStorage&&this.addSubmenu("openRecent",H,G);H.addSeparator(G);v.menus.addMenuItems(H,["-","save"],G);null!=E&&E.constructor==DriveFile||v.menus.addMenuItems(H,["saveAs"],G);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||E.constructor==LocalFile&&null==E.fileHandle||v.menus.addMenuItems(H,["synchronize"],G);null!=E&&E.constructor==DriveFile?v.menus.addMenuItems(H,"- rename makeCopy - moveToFolder openFolder".split(" "),G):(v.menus.addMenuItems(H,["-","rename"],G),v.isOfflineApp()?navigator.onLine&& -"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(H,["upload"],G):v.menus.addMenuItems(H,["makeCopy"],G));null!=E&&E.isRevisionHistorySupported()&&v.menus.addMenuItems(H,["-","revisionHistory"],G);if(null!=E){if(null!=v.fileNode&&"1"!=urlParams.embedInline){var P=null!=E.getTitle()?E.getTitle():v.defaultFilename;(E.constructor==DriveFile&&null!=E.sync&&E.sync.isConnected()||!/(\.html)$/i.test(P)&&!/(\.svg)$/i.test(P))&&this.addMenuItems(H,["properties"],G)}E.constructor==DriveFile&& -v.menus.addMenuItems(H,["share"],G)}v.menus.addMenuItems(H,["-","autosave"],G)})));this.put("diagram",new Menu(mxUtils.bind(this,function(H,G){var E=v.getCurrentFile();v.menus.addSubmenu("extras",H,G,mxResources.get("preferences"));H.addSeparator(G);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)v.menus.addMenuItems(H,"new open - synchronize - save saveAs -".split(" "),G);else if("1"==urlParams.embed||v.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&v.menus.addMenuItems(H, -["-","save"],G);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||v.mode==App.MODE_ATLAS)v.menus.addMenuItems(H,["saveAndExit"],G),null!=E&&E.isRevisionHistorySupported()&&v.menus.addMenuItems(H,["revisionHistory"],G);H.addSeparator(G)}else v.mode==App.MODE_ATLAS?v.menus.addMenuItems(H,["save","synchronize","-"],G):"1"!=urlParams.noFileMenu&&("1"!=urlParams.sketch?(v.menus.addMenuItems(H,["new"],G),v.menus.addSubmenu("openFrom",H,G),isLocalStorage&&this.addSubmenu("openRecent", -H,G),H.addSeparator(G),null!=E&&(E.constructor==DriveFile&&v.menus.addMenuItems(H,["share"],G),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||E.constructor==LocalFile||v.menus.addMenuItems(H,["synchronize"],G)),H.addSeparator(G),v.menus.addSubmenu("save",H,G)):v.menus.addSubmenu("file",H,G));v.menus.addSubmenu("exportAs",H,G);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?v.menus.addMenuItems(H,["import"],G):"1"!=urlParams.noFileMenu&&v.menus.addSubmenu("importFrom",H,G);v.menus.addMenuItems(H,["-", -"findReplace"],G);v.commentsSupported()&&v.menus.addMenuItems(H,["comments","-"],G);v.menus.addMenuItems(H,["toggleFormat","layers","tags","-","pageSetup"],G);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||v.menus.addMenuItems(H,["print"],G);"1"!=urlParams.sketch&&null!=E&&null!=v.fileNode&&"1"!=urlParams.embedInline&&(E=null!=E.getTitle()?E.getTitle():v.defaultFilename,/(\.html)$/i.test(E)||/(\.svg)$/i.test(E)||this.addMenuItems(H,["-","properties"]));H.addSeparator(G);v.menus.addSubmenu("help", -H,G);"1"==urlParams.embed||v.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||v.mode==App.MODE_ATLAS)&&v.menus.addMenuItems(H,["-","exit"],G):"1"!=urlParams.noFileMenu&&v.menus.addMenuItems(H,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(H,G){var E=v.getCurrentFile();null!=E&&E.constructor==DriveFile?v.menus.addMenuItems(H,["save","makeCopy","-","rename","moveToFolder"],G):(v.menus.addMenuItems(H,["save","saveAs","-","rename"],G),v.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&& -"1"!=urlParams.lockdown&&this.addMenuItems(H,["upload"],G):v.menus.addMenuItems(H,["makeCopy"],G));v.menus.addMenuItems(H,["-","autosave"],G);null!=E&&E.isRevisionHistorySupported()&&v.menus.addMenuItems(H,["-","revisionHistory"],G)})));var t=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(H,G){t.funct(H,G);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||v.menus.addMenuItems(H,["publishLink"],G);v.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(H.addSeparator(G),v.menus.addSubmenu("embed", -H,G))})));var p=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(H,G){v.menus.addInsertTableCellItem(H,G)})));var F=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(H,G){F.funct(H,G);this.addMenuItems(H,["-","ruler","-","pageScale"],G)})));this.put("extras",new Menu(mxUtils.bind(this,function(H,G){null!=p&&v.menus.addSubmenu("language",H,G);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&v.mode!=App.MODE_ATLAS&&v.menus.addSubmenu("theme",H,G);v.menus.addSubmenu("units", -H,G);H.addSeparator(G);"1"!=urlParams.sketch&&v.menus.addMenuItems(H,["scrollbars","-","tooltips","copyConnect","collapseExpand"],G);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&v.mode!=App.MODE_ATLAS&&v.menus.addMenuItems(H,["-","showStartScreen","search","scratchpad"],G);H.addSeparator(G);"1"==urlParams.sketch&&v.menus.addMenuItems(H,["copyConnect","collapseExpand","tooltips","-"],G);EditorUi.isElectronApp&&v.menus.addMenuItems(H, -["-","spellCheck","autoBkp","drafts","-"],G);var E=v.getCurrentFile();null!=E&&E.isRealtimeEnabled()&&E.isRealtimeSupported()&&this.addMenuItems(H,["-","showRemoteCursors","shareCursor","-"],G);Graph.translateDiagram&&v.menus.addMenuItems(H,["diagramLanguage"],G);v.mode!=App.MODE_ATLAS&&v.menus.addMenuItem(H,"configuration",G);"1"!=urlParams.sketch&&!v.isOfflineApp()&&isLocalStorage&&v.mode!=App.MODE_ATLAS&&v.menus.addMenuItem(H,"plugins",G);H.addSeparator(G)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this, -function(H,G){v.menus.addMenuItems(H,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),G)})));mxUtils.bind(this,function(){var H=this.get("insert"),G=H.funct;H.funct=function(E,P){"1"==urlParams.sketch?(v.menus.addMenuItems(E,["toggleShapes"],P),v.menus.addSubmenu("table",E,P),E.addSeparator(P),v.insertTemplateEnabled&&!v.isOffline()&&v.menus.addMenuItems(E,["insertTemplate"],P),v.menus.addMenuItems(E,["insertImage","insertLink","-"],P),v.menus.addSubmenu("insertAdvanced", -E,P,mxResources.get("advanced")),v.menus.addSubmenu("layout",E,P)):(G.apply(this,arguments),v.menus.addSubmenu("table",E,P))}})();var J="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),M=function(H,G,E,P){H.addItem(E,null,mxUtils.bind(this,function(){var T=new CreateGraphDialog(v,E,P);v.showDialog(T.container,620,420,!0,!1);T.init()}),G)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(H,G){for(var E=0;E<J.length;E++)"-"==J[E]?H.addSeparator(G): -M(H,G,mxResources.get(J[E])+"...",J[E])})))};EditorUi.prototype.installFormatToolbar=function(v){var y=this.editor.graph,I=document.createElement("div");I.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";y.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(N,t){0<y.getSelectionCount()?(v.appendChild(I),I.innerHTML="Selected: "+ -y.getSelectionCount()):null!=I.parentNode&&I.parentNode.removeChild(I)}))};var z=!1;EditorUi.prototype.initFormatWindow=function(){if(!z&&null!=this.formatWindow){z=!0;var v=this.formatWindow.window.toggleMinimized,y=240;this.formatWindow.window.toggleMinimized=function(){v.apply(this,arguments);this.minimized?(y=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+y-140+"px"):(this.div.style.width=y+"px",this.table.style.width= -this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-y+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(I){mxEvent.getSource(I)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var C=EditorUi.prototype.init;EditorUi.prototype.init=function(){function v(da,ba,na){var ea=p.menus.get(da),ha=H.addMenu(mxResources.get(da),mxUtils.bind(this,function(){ea.funct.apply(this,arguments)}), -M);ha.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ha.style.display="inline-block";ha.style.boxSizing="border-box";ha.style.top="6px";ha.style.marginRight="6px";ha.style.height="30px";ha.style.paddingTop="6px";ha.style.paddingBottom="6px";ha.style.cursor="pointer";ha.setAttribute("title",mxResources.get(da));p.menus.menuCreated(ea,ha,"geMenuItem");null!=na?(ha.style.backgroundImage="url("+na+")",ha.style.backgroundPosition="center center",ha.style.backgroundRepeat="no-repeat",ha.style.backgroundSize= -"24px 24px",ha.style.width="34px",ha.innerText=""):ba||(ha.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",ha.style.backgroundPosition="right 6px center",ha.style.backgroundRepeat="no-repeat",ha.style.paddingRight="22px");return ha}function y(da,ba,na,ea,ha,oa){var ma=document.createElement("a");ma.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ma.style.display="inline-block";ma.style.boxSizing="border-box";ma.style.height="30px";ma.style.padding="6px";ma.style.position= -"relative";ma.style.verticalAlign="top";ma.style.top="0px";"1"==urlParams.sketch&&(ma.style.borderStyle="none",ma.style.boxShadow="none",ma.style.padding="6px",ma.style.margin="0px");null!=p.statusContainer?J.insertBefore(ma,p.statusContainer):J.appendChild(ma);null!=oa?(ma.style.backgroundImage="url("+oa+")",ma.style.backgroundPosition="center center",ma.style.backgroundRepeat="no-repeat",ma.style.backgroundSize="24px 24px",ma.style.width="34px"):mxUtils.write(ma,da);mxEvent.addListener(ma,mxClient.IS_POINTER? -"pointerdown":"mousedown",mxUtils.bind(this,function(va){va.preventDefault()}));mxEvent.addListener(ma,"click",function(va){"disabled"!=ma.getAttribute("disabled")&&ba(va);mxEvent.consume(va)});null==na&&(ma.style.marginRight="4px");null!=ea&&ma.setAttribute("title",ea);null!=ha&&(da=function(){ha.isEnabled()?(ma.removeAttribute("disabled"),ma.style.cursor="pointer"):(ma.setAttribute("disabled","disabled"),ma.style.cursor="default")},ha.addListener("stateChanged",da),F.addListener("enabledChanged", -da),da());return ma}function I(da,ba,na){na=document.createElement("div");na.className="geMenuItem";na.style.display="inline-block";na.style.verticalAlign="top";na.style.marginRight="6px";na.style.padding="0 4px 0 4px";na.style.height="30px";na.style.position="relative";na.style.top="0px";"1"==urlParams.sketch&&(na.style.boxShadow="none");for(var ea=0;ea<da.length;ea++)null!=da[ea]&&("1"==urlParams.sketch&&(da[ea].style.padding="10px 8px",da[ea].style.width="30px"),da[ea].style.margin="0px",da[ea].style.boxShadow= -"none",na.appendChild(da[ea]));null!=ba&&mxUtils.setOpacity(na,ba);null!=p.statusContainer&&"1"!=urlParams.sketch?J.insertBefore(na,p.statusContainer):J.appendChild(na);return na}function N(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(A.style.left=58>l.offsetTop-l.offsetHeight/2?"70px":"10px");else{for(var da=J.firstChild;null!=da;){var ba=da.nextSibling;"geMenuItem"!=da.className&&"geItem"!=da.className||da.parentNode.removeChild(da);da=ba}M=J.firstChild;d=window.innerWidth||document.documentElement.clientWidth|| -document.body.clientWidth;da=1E3>d||"1"==urlParams.sketch;var na=null;da||(na=v("diagram"));ba=da?v("diagram",null,Editor.menuImage):null;null!=ba&&(na=ba);I([na,y(mxResources.get("shapes"),p.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),p.actions.get("image"),da?Editor.shapesImage:null),y(mxResources.get("format"),p.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+p.actions.get("formatPanel").shortcut+")",p.actions.get("image"),da?Editor.formatImage:null)], -da?60:null);ba=v("insert",!0,da?U:null);I([ba,y(mxResources.get("delete"),p.actions.get("delete").funct,null,mxResources.get("delete"),p.actions.get("delete"),da?Editor.trashImage:null)],da?60:null);411<=d&&(I([Ea,za],60),520<=d&&I([Ba,640<=d?y("",ia.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",ia,Editor.zoomInImage):null,640<=d?y("",qa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",qa,Editor.zoomOutImage):null],60))}null!=na&&(mxEvent.disableContextMenu(na),mxEvent.addGestureListeners(na, -mxUtils.bind(this,function(ea){(mxEvent.isShiftDown(ea)||mxEvent.isAltDown(ea)||mxEvent.isMetaDown(ea)||mxEvent.isControlDown(ea)||mxEvent.isPopupTrigger(ea))&&p.appIconClicked(ea)}),null,null));ba=p.menus.get("language");null!=ba&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=d&&"1"!=urlParams.sketch?(null==wa&&(ba=H.addMenu("",ba.funct),ba.setAttribute("title",mxResources.get("language")),ba.className="geToolbarButton",ba.style.backgroundImage="url("+Editor.globeImage+")",ba.style.backgroundPosition= -"center center",ba.style.backgroundRepeat="no-repeat",ba.style.backgroundSize="24px 24px",ba.style.position="absolute",ba.style.height="24px",ba.style.width="24px",ba.style.zIndex="1",ba.style.right="8px",ba.style.cursor="pointer",ba.style.top="1"==urlParams.embed?"12px":"11px",J.appendChild(ba),wa=ba),p.buttonContainer.style.paddingRight="34px"):(p.buttonContainer.style.paddingRight="4px",null!=wa&&(wa.parentNode.removeChild(wa),wa=null))}C.apply(this,arguments);var t=document.createElement("div"); -t.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";t.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(t);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search)); -if("1"!=urlParams.sketch&&1E3<=d||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var p=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==p.embedViewport)mxUtils.fit(this.div);else{var da=parseInt(this.div.offsetLeft),ba=parseInt(this.div.offsetWidth),na=p.embedViewport.x+ -p.embedViewport.width,ea=parseInt(this.div.offsetTop),ha=parseInt(this.div.offsetHeight),oa=p.embedViewport.y+p.embedViewport.height;this.div.style.left=Math.max(p.embedViewport.x,Math.min(da,na-ba))+"px";this.div.style.top=Math.max(p.embedViewport.y,Math.min(ea,oa-ha))+"px";this.div.style.height=Math.min(p.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(p.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes", -!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=d)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),t=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>d||708>t)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));p=this;var F=p.editor.graph;p.toolbar=this.createToolbar(p.createDiv("geToolbar"));p.defaultLibraryName= -mxResources.get("untitledLibrary");var J=document.createElement("div");J.className="geMenubarContainer";var M=null,H=new Menubar(p,J);p.statusContainer=p.createStatusContainer();p.statusContainer.style.position="relative";p.statusContainer.style.maxWidth="";p.statusContainer.style.marginTop="7px";p.statusContainer.style.marginLeft="6px";p.statusContainer.style.color="gray";p.statusContainer.style.cursor="default";var G=p.hideCurrentMenu;p.hideCurrentMenu=function(){G.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()}; -var E=p.descriptorChanged;p.descriptorChanged=function(){E.apply(this,arguments);var da=p.getCurrentFile();if(null!=da&&null!=da.getTitle()){var ba=da.getMode();"google"==ba?ba="googleDrive":"github"==ba?ba="gitHub":"gitlab"==ba?ba="gitLab":"onedrive"==ba&&(ba="oneDrive");ba=mxResources.get(ba);J.setAttribute("title",da.getTitle()+(null!=ba?" ("+ba+")":""))}else J.removeAttribute("title")};p.setStatusText(p.editor.getStatus());J.appendChild(p.statusContainer);p.buttonContainer=document.createElement("div"); -p.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";J.appendChild(p.buttonContainer);p.menubarContainer=p.buttonContainer;p.tabContainer=document.createElement("div");p.tabContainer.className="geTabContainer";p.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";t=p.diagramContainer.parentNode;var P=document.createElement("div"); -P.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";p.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){P.style.top="20px";p.titlebar=document.createElement("div");p.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var T=document.createElement("div");T.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;"; -p.titlebar.appendChild(T);t.appendChild(p.titlebar)}T=p.menus.get("viewZoom");var W=T.funct;T.funct=function(da,ba){W.apply(this,arguments);p.menus.addMenuItems(da,["-","outline","fullscreen"],ba)};var U="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,V="1"==urlParams.sketch?document.createElement("div"):null,l="1"==urlParams.sketch?document.createElement("div"):null,A="1"==urlParams.sketch?document.createElement("div"):null,L=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)A.style.left= -"10px",A.style.top="10px",l.style.left="10px",l.style.top="60px",V.style.top="10px",V.style.right="12px",V.style.left="",p.diagramContainer.setAttribute("data-bounds",p.diagramContainer.style.top+" "+p.diagramContainer.style.left+" "+p.diagramContainer.style.width+" "+p.diagramContainer.style.height),p.diagramContainer.style.top="0px",p.diagramContainer.style.left="0px",p.diagramContainer.style.bottom="0px",p.diagramContainer.style.right="0px",p.diagramContainer.style.width="",p.diagramContainer.style.height= -"";else{var da=p.diagramContainer.getAttribute("data-bounds");if(null!=da){p.diagramContainer.style.background="transparent";p.diagramContainer.removeAttribute("data-bounds");var ba=F.getGraphBounds();da=da.split(" ");p.diagramContainer.style.top=da[0];p.diagramContainer.style.left=da[1];p.diagramContainer.style.width=ba.width+50+"px";p.diagramContainer.style.height=ba.height+46+"px";p.diagramContainer.style.bottom="";p.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize", -rect:p.diagramContainer.getBoundingClientRect()}),"*");p.refresh()}A.style.left=p.diagramContainer.offsetLeft+"px";A.style.top=p.diagramContainer.offsetTop-A.offsetHeight-4+"px";l.style.display="";l.style.left=p.diagramContainer.offsetLeft-l.offsetWidth-4+"px";l.style.top=p.diagramContainer.offsetTop+"px";V.style.left=p.diagramContainer.offsetLeft+p.diagramContainer.offsetWidth-V.offsetWidth+"px";V.style.top=A.style.top;V.style.right="";p.bottomResizer.style.left=p.diagramContainer.offsetLeft+(p.diagramContainer.offsetWidth- -p.bottomResizer.offsetWidth)/2+"px";p.bottomResizer.style.top=p.diagramContainer.offsetTop+p.diagramContainer.offsetHeight-p.bottomResizer.offsetHeight/2-1+"px";p.rightResizer.style.left=p.diagramContainer.offsetLeft+p.diagramContainer.offsetWidth-p.rightResizer.offsetWidth/2-1+"px";p.rightResizer.style.top=p.diagramContainer.offsetTop+(p.diagramContainer.offsetHeight-p.bottomResizer.offsetHeight)/2+"px"}p.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";p.rightResizer.style.visibility= -p.bottomResizer.style.visibility;J.style.display="none";A.style.visibility="";V.style.visibility=""}),Q=p.actions.get("fullscreen"),O=y("",Q.funct,null,mxResources.get(""),Q,Editor.fullscreenImage),R=mxUtils.bind(this,function(){O.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";L()});Q=mxUtils.bind(this,function(){b(p, -!0);p.initFormatWindow();var da=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(da.x+da.width+4,da.y);R()});p.addListener("inlineFullscreenChanged",R);p.addListener("editInlineStart",Q);"1"==urlParams.embedInline&&p.addListener("darkModeChanged",Q);p.addListener("editInlineStop",mxUtils.bind(this,function(da){p.diagramContainer.style.width="10px";p.diagramContainer.style.height="10px";p.diagramContainer.style.border="";p.bottomResizer.style.visibility="hidden";p.rightResizer.style.visibility= -"hidden";A.style.visibility="hidden";V.style.visibility="hidden";l.style.display="none"}));if(null!=p.hoverIcons){var S=p.hoverIcons.update;p.hoverIcons.update=function(){F.freehand.isDrawing()||S.apply(this,arguments)}}if(null!=F.freehand){var X=F.freehand.createStyle;F.freehand.createStyle=function(da){return X.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){l.className="geToolbarContainer";V.className="geToolbarContainer";A.className="geToolbarContainer";J.className="geToolbarContainer"; -p.picker=l;var aa=!1;"1"!=urlParams.embed&&"atlassian"!=p.getServiceName()&&(mxEvent.addListener(J,"mouseenter",function(){p.statusContainer.style.display="inline-block"}),mxEvent.addListener(J,"mouseleave",function(){aa||(p.statusContainer.style.display="none")}));var Y=mxUtils.bind(this,function(da){null!=p.notificationBtn&&(null!=da?p.notificationBtn.setAttribute("title",da):p.notificationBtn.removeAttribute("title"))});J.style.visibility=20>J.clientWidth?"hidden":"";p.editor.addListener("statusChanged", -mxUtils.bind(this,function(){p.setStatusText(p.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=p.getServiceName())if(p.statusContainer.style.display="inline-block",aa=!0,1==p.statusContainer.children.length&&""==p.editor.getStatus())J.style.visibility="hidden";else{if(0==p.statusContainer.children.length||1==p.statusContainer.children.length&&"function"===typeof p.statusContainer.firstChild.getAttribute&&null==p.statusContainer.firstChild.getAttribute("class")){var da=null!=p.statusContainer.firstChild&& -"function"===typeof p.statusContainer.firstChild.getAttribute?p.statusContainer.firstChild.getAttribute("title"):p.editor.getStatus();Y(da);var ba=p.getCurrentFile();ba=null!=ba?ba.savingStatusKey:DrawioFile.prototype.savingStatusKey;da==mxResources.get(ba)+"..."?(p.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(ba))+'..."src="'+Editor.tailSpin+'">',p.statusContainer.style.display="inline-block",aa=!0):6<p.buttonContainer.clientWidth&&(p.statusContainer.style.display= -"none",aa=!1)}else p.statusContainer.style.display="inline-block",Y(null),aa=!0;J.style.visibility=20>J.clientWidth&&!aa?"hidden":""}}));ua=v("diagram",null,Editor.menuImage);ua.style.boxShadow="none";ua.style.padding="6px";ua.style.margin="0px";A.appendChild(ua);mxEvent.disableContextMenu(ua);mxEvent.addGestureListeners(ua,mxUtils.bind(this,function(da){(mxEvent.isShiftDown(da)||mxEvent.isAltDown(da)||mxEvent.isMetaDown(da)||mxEvent.isControlDown(da)||mxEvent.isPopupTrigger(da))&&this.appIconClicked(da)}), -null,null);p.statusContainer.style.position="";p.statusContainer.style.display="none";p.statusContainer.style.margin="0px";p.statusContainer.style.padding="6px 0px";p.statusContainer.style.maxWidth=Math.min(d-240,280)+"px";p.statusContainer.style.display="inline-block";p.statusContainer.style.textOverflow="ellipsis";p.buttonContainer.style.position="";p.buttonContainer.style.paddingRight="0px";p.buttonContainer.style.display="inline-block";var Z=document.createElement("a");Z.style.padding="0px";Z.style.boxShadow= -"none";Z.className="geMenuItem";Z.style.display="inline-block";Z.style.width="40px";Z.style.height="12px";Z.style.marginBottom="-2px";Z.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";Z.style.backgroundPosition="top center";Z.style.backgroundRepeat="no-repeat";Z.setAttribute("title","Minimize");var ca=!1,fa=mxUtils.bind(this,function(){l.innerText="";if(!ca){var da=function(ba,na,ea,ha){null!=na&&ba.setAttribute("title",na);ba.style.cursor=null!=ea?ea:"default";ba.style.margin= -"2px 0px";l.appendChild(ba);mxUtils.br(l);null!=ha&&(ba.style.position="relative",ba.style.overflow="visible",na=document.createElement("div"),na.style.position="absolute",na.style.left="34px",na.style.top="28px",na.style.fontSize="8px",mxUtils.write(na,ha),ba.appendChild(na));return ba};da(p.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+ -" (A)",null,"A");da(p.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");da(p.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)", -!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");da(p.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");(function(){var ba=new mxCell("",new mxGeometry(0,0,F.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");ba.geometry.setTerminalPoint(new mxPoint(0,0),!0);ba.geometry.setTerminalPoint(new mxPoint(ba.geometry.width,0),!1);ba.geometry.points= -[];ba.geometry.relative=!0;ba.edge=!0;da(p.sidebar.createEdgeTemplateFromCells([ba],ba.geometry.width,ba.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");ba=ba.clone();ba.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";ba.geometry.width=F.defaultEdgeLength+20;ba.geometry.setTerminalPoint(new mxPoint(0,20),!0);ba.geometry.setTerminalPoint(new mxPoint(ba.geometry.width,20),!1);da(p.sidebar.createEdgeTemplateFromCells([ba], -ba.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"))})();(function(ba,na,ea,ha){ba=y("",ba.funct,null,na,ba,ea);ba.style.width="40px";ba.style.height="34px";ba.style.opacity="0.7";return da(ba,null,"pointer",ha)})(p.actions.get("insertFreehand"),mxResources.get("freehand")+" (X)",Editor.freehandImage,"X");ua=v("insert",null,Editor.plusImage);ua.style.boxShadow="none";ua.style.opacity="0.7";ua.style.padding="6px";ua.style.margin="0px";ua.style.height="34px";ua.style.width= -"37px";da(ua,null,"pointer")}"1"!=urlParams.embedInline&&l.appendChild(Z)});mxEvent.addListener(Z,"click",mxUtils.bind(this,function(){ca?(mxUtils.setPrefixedStyle(l.style,"transform","translate(0, -50%)"),l.style.padding="8px 6px 4px",l.style.top="50%",l.style.bottom="",l.style.height="",Z.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Z.style.width="40px",Z.style.height="12px",Z.setAttribute("title","Minimize"),ca=!1,fa()):(l.innerText="",l.appendChild(Z),mxUtils.setPrefixedStyle(l.style, -"transform","translate(0, 0)"),l.style.top="",l.style.bottom="12px",l.style.padding="0px",l.style.height="24px",Z.style.height="24px",Z.style.backgroundImage="url("+Editor.plusImage+")",Z.setAttribute("title",mxResources.get("insert")),Z.style.width="24px",ca=!0)}));fa();p.addListener("darkModeChanged",fa);p.addListener("sketchModeChanged",fa)}else p.editor.addListener("statusChanged",mxUtils.bind(this,function(){p.setStatusText(p.editor.getStatus())}));if(null!=T){var la=function(da){if(mxEvent.isAltDown(da))p.hideCurrentMenu(), -p.actions.get("customZoom").funct(),mxEvent.consume(da);else if("geItem"!=mxEvent.getSource(da).className||mxEvent.isShiftDown(da))p.hideCurrentMenu(),p.actions.get("smartFit").funct(),mxEvent.consume(da)},ia=p.actions.get("zoomIn"),qa=p.actions.get("zoomOut");Q=p.actions.get("resetView");var ka=p.actions.get("undo"),Da=p.actions.get("redo"),Ea=y("",ka.funct,null,mxResources.get("undo")+" ("+ka.shortcut+")",ka,Editor.undoImage),za=y("",Da.funct,null,mxResources.get("redo")+" ("+Da.shortcut+")",Da, -Editor.redoImage);if(null!=V){Q=function(){ra.style.display=null!=p.pages&&("0"!=urlParams.pages||1<p.pages.length||Editor.pagesVisible)?"inline-block":"none"};var Oa=function(){ra.innerText="";if(null!=p.currentPage){mxUtils.write(ra,p.currentPage.getName());var da=null!=p.pages?p.pages.length:1,ba=p.getPageIndex(p.currentPage);ba=null!=ba?ba+1:1;var na=p.currentPage.getId();ra.setAttribute("title",p.currentPage.getName()+" ("+ba+"/"+da+")"+(null!=na?" ["+na+"]":""))}},Aa=p.actions.get("delete"), -Ga=y("",Aa.funct,null,mxResources.get("delete"),Aa,Editor.trashImage);Ga.style.opacity="0.1";A.appendChild(Ga);Aa.addListener("stateChanged",function(){Ga.style.opacity=Aa.enabled?"":"0.1"});var Ia=function(){Ea.style.display=0<p.editor.undoManager.history.length||F.isEditing()?"inline-block":"none";za.style.display=Ea.style.display;Ea.style.opacity=ka.enabled?"":"0.1";za.style.opacity=Da.enabled?"":"0.1"};A.appendChild(Ea);A.appendChild(za);ka.addListener("stateChanged",Ia);Da.addListener("stateChanged", -Ia);Ia();var ra=this.createPageMenuTab(!1,!0);ra.style.display="none";ra.style.position="";ra.style.marginLeft="";ra.style.top="";ra.style.left="";ra.style.height="100%";ra.style.lineHeight="";ra.style.borderStyle="none";ra.style.padding="3px 0";ra.style.margin="0px";ra.style.background="";ra.style.border="";ra.style.boxShadow="none";ra.style.verticalAlign="top";ra.style.width="auto";ra.style.maxWidth="160px";ra.style.position="relative";ra.style.padding="6px";ra.style.textOverflow="ellipsis";ra.style.opacity= -"0.8";V.appendChild(ra);p.editor.addListener("pagesPatched",Oa);p.editor.addListener("pageSelected",Oa);p.editor.addListener("pageRenamed",Oa);p.editor.addListener("fileLoaded",Oa);Oa();p.addListener("fileDescriptorChanged",Q);p.addListener("pagesVisibleChanged",Q);p.editor.addListener("pagesPatched",Q);Q();Q=y("",qa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",qa,Editor.zoomOutImage);V.appendChild(Q);var ua=H.addMenu("100%",T.funct);ua.setAttribute("title",mxResources.get("zoom")); -ua.innerHTML="100%";ua.style.display="inline-block";ua.style.color="inherit";ua.style.cursor="pointer";ua.style.textAlign="center";ua.style.whiteSpace="nowrap";ua.style.paddingRight="10px";ua.style.textDecoration="none";ua.style.verticalAlign="top";ua.style.padding="6px 0";ua.style.fontSize="14px";ua.style.width="40px";ua.style.opacity="0.4";V.appendChild(ua);T=y("",ia.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",ia,Editor.zoomInImage);V.appendChild(T);"1"==urlParams.embedInline? -(V.appendChild(O),T=p.actions.get("exit"),V.appendChild(y("",T.funct,null,mxResources.get("exit"),T,Editor.closeImage))):O.parentNode.removeChild(O);p.tabContainer.style.visibility="hidden";J.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";A.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;"; -V.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";P.appendChild(A);P.appendChild(V);l.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";mxClient.IS_POINTER&&(l.style.touchAction="none");P.appendChild(l);window.setTimeout(function(){mxUtils.setPrefixedStyle(l.style, -"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(P)}else{var Ba=y("",la,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Q,Editor.zoomFitImage);J.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";ua=H.addMenu("100%",T.funct);ua.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");ua.style.whiteSpace="nowrap";ua.style.paddingRight= -"10px";ua.style.textDecoration="none";ua.style.textDecoration="none";ua.style.overflow="hidden";ua.style.visibility="hidden";ua.style.textAlign="center";ua.style.cursor="pointer";ua.style.height=parseInt(p.tabContainerHeight)-1+"px";ua.style.lineHeight=parseInt(p.tabContainerHeight)+1+"px";ua.style.position="absolute";ua.style.display="block";ua.style.fontSize="12px";ua.style.width="59px";ua.style.right="0px";ua.style.bottom="0px";ua.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")"; -ua.style.backgroundPosition="right 6px center";ua.style.backgroundRepeat="no-repeat";P.appendChild(ua)}(function(da){mxEvent.addListener(da,"click",la);var ba=mxUtils.bind(this,function(){da.innerText="";mxUtils.write(da,Math.round(100*p.editor.graph.view.scale)+"%")});p.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ba);p.editor.addListener("resetGraphView",ba);p.editor.addListener("pageSelected",ba)})(ua);var Fa=p.setGraphEnabled;p.setGraphEnabled=function(){Fa.apply(this,arguments);null!=this.tabContainer&& -(ua.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==V?this.tabContainerHeight+"px":"0px")}}P.appendChild(J);P.appendChild(p.diagramContainer);t.appendChild(P);p.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=d)&&"1"!=urlParams.embedInline&&b(this,!0);null==V&&P.appendChild(p.tabContainer);var wa=null;N();mxEvent.addListener(window,"resize",function(){N();null!=p.sidebarWindow&&p.sidebarWindow.window.fit(); -null!=p.formatWindow&&p.formatWindow.window.fit();null!=p.actions.outlineWindow&&p.actions.outlineWindow.window.fit();null!=p.actions.layersWindow&&p.actions.layersWindow.window.fit();null!=p.menus.tagsWindow&&p.menus.tagsWindow.window.fit();null!=p.menus.findWindow&&p.menus.findWindow.window.fit();null!=p.menus.findReplaceWindow&&p.menus.findReplaceWindow.window.fit()});if("1"==urlParams.embedInline){document.body.style.cursor="text";l.style.transform="";mxEvent.addGestureListeners(p.diagramContainer.parentNode, -function(da){mxEvent.getSource(da)==p.diagramContainer.parentNode&&(p.embedExitPoint=new mxPoint(mxEvent.getClientX(da),mxEvent.getClientY(da)),p.sendEmbeddedSvgExport())});t=document.createElement("div");t.style.position="absolute";t.style.width="10px";t.style.height="10px";t.style.borderRadius="5px";t.style.border="1px solid gray";t.style.background="#ffffff";t.style.cursor="row-resize";p.diagramContainer.parentNode.appendChild(t);p.bottomResizer=t;var La=null,ja=null,xa=null,sa=null;mxEvent.addGestureListeners(t, -function(da){sa=parseInt(p.diagramContainer.style.height);ja=mxEvent.getClientY(da);F.popupMenuHandler.hideMenu();mxEvent.consume(da)});t=t.cloneNode(!1);t.style.cursor="col-resize";p.diagramContainer.parentNode.appendChild(t);p.rightResizer=t;mxEvent.addGestureListeners(t,function(da){xa=parseInt(p.diagramContainer.style.width);La=mxEvent.getClientX(da);F.popupMenuHandler.hideMenu();mxEvent.consume(da)});mxEvent.addGestureListeners(document.body,null,function(da){var ba=!1;null!=La&&(p.diagramContainer.style.width= -Math.max(20,xa+mxEvent.getClientX(da)-La)+"px",ba=!0);null!=ja&&(p.diagramContainer.style.height=Math.max(20,sa+mxEvent.getClientY(da)-ja)+"px",ba=!0);ba&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:p.diagramContainer.getBoundingClientRect()}),"*"),L(),p.refresh())},function(da){null==La&&null==ja||mxEvent.consume(da);ja=La=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent"; -p.bottomResizer.style.visibility="hidden";p.rightResizer.style.visibility="hidden";A.style.visibility="hidden";V.style.visibility="hidden";l.style.display="none"}"1"==urlParams.prefetchFonts&&p.editor.loadFonts()}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var f=EditorUi.initTheme;EditorUi.initTheme=function(){f.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(d,u,x,B){var D=u.y,K=u.x,c=!1,e=!1;if(null!=this.states&&null!=d&&null!=u){var g=this,q=new mxCellState,m=this.graph.getView().scale,n=Math.max(2,this.getGuideTolerance()/2);q.x=d.x+K;q.y=d.y+D;q.width=d.width;q.height=d.height;for(var z=[],C=[],v=0;v<this.states.length;v++){var y=this.states[v];y instanceof mxCellState&&(B||!this.graph.isCellSelected(y.cell))&&((q.x>=y.x&&q.x<=y.x+y.width||y.x>=q.x&&y.x<=q.x+q.width)&&(q.y> -y.y+y.height+4||q.y+q.height+4<y.y)?z.push(y):(q.y>=y.y&&q.y<=y.y+y.height||y.y>=q.y&&y.y<=q.y+q.height)&&(q.x>y.x+y.width+4||q.x+q.width+4<y.x)&&C.push(y))}var I=0,N=0,t=y=0,p=0,F=0,J=0,M=0,H=5*m;if(1<z.length){z.push(q);z.sort(function(T,W){return T.y-W.y});var G=!1;v=q==z[0];m=q==z[z.length-1];if(!v&&!m)for(v=1;v<z.length-1;v++)if(q==z[v]){m=z[v-1];v=z[v+1];y=N=t=(v.y-m.y-m.height-q.height)/2;break}for(v=0;v<z.length-1;v++){m=z[v];var E=z[v+1],P=q==m||q==E;E=E.y-m.y-m.height;G|=q==m;if(0==N&&0== -I)N=E,I=1;else if(Math.abs(N-E)<=(P||1==v&&G?n:0))I+=1;else if(1<I&&G){z=z.slice(0,v+1);break}else if(3<=z.length-v&&!G)I=0,y=N=0!=t?t:0,z.splice(0,0==v?1:v),v=-1;else break;0!=y||P||(N=y=E)}3==z.length&&z[1]==q&&(y=0)}if(1<C.length){C.push(q);C.sort(function(T,W){return T.x-W.x});G=!1;v=q==C[0];m=q==C[C.length-1];if(!v&&!m)for(v=1;v<C.length-1;v++)if(q==C[v]){m=C[v-1];v=C[v+1];J=F=M=(v.x-m.x-m.width-q.width)/2;break}for(v=0;v<C.length-1;v++){m=C[v];E=C[v+1];P=q==m||q==E;E=E.x-m.x-m.width;G|=q==m; -if(0==F&&0==p)F=E,p=1;else if(Math.abs(F-E)<=(P||1==v&&G?n:0))p+=1;else if(1<p&&G){C=C.slice(0,v+1);break}else if(3<=C.length-v&&!G)p=0,J=F=0!=M?M:0,C.splice(0,0==v?1:v),v=-1;else break;0!=J||P||(F=J=E)}3==C.length&&C[1]==q&&(J=0)}n=function(T,W,U,V){var l=[];if(V){V=H;var A=0}else V=0,A=H;l.push(new mxPoint(T.x-V,T.y-A));l.push(new mxPoint(T.x+V,T.y+A));l.push(T);l.push(W);l.push(new mxPoint(W.x-V,W.y-A));l.push(new mxPoint(W.x+V,W.y+A));if(null!=U)return U.points=l,U;T=new mxPolyline(l,mxConstants.GUIDE_COLOR, -mxConstants.GUIDE_STROKEWIDTH);T.dialect=mxConstants.DIALECT_SVG;T.pointerEvents=!1;T.init(g.graph.getView().getOverlayPane());return T};F=function(T,W){if(T&&null!=g.guidesArrHor)for(T=0;T<g.guidesArrHor.length;T++)g.guidesArrHor[T].node.style.visibility="hidden";if(W&&null!=g.guidesArrVer)for(T=0;T<g.guidesArrVer.length;T++)g.guidesArrVer[T].node.style.visibility="hidden"};if(1<p&&p==C.length-1){p=[];M=g.guidesArrHor;c=[];K=0;v=C[0]==q?1:0;G=C[v].y+C[v].height;if(0<J)for(v=0;v<C.length-1;v++)m= -C[v],E=C[v+1],q==m?(K=E.x-m.width-J,c.push(new mxPoint(K+m.width+H,G)),c.push(new mxPoint(E.x-H,G))):q==E?(c.push(new mxPoint(m.x+m.width+H,G)),K=m.x+m.width+J,c.push(new mxPoint(K-H,G))):(c.push(new mxPoint(m.x+m.width+H,G)),c.push(new mxPoint(E.x-H,G)));else m=C[0],v=C[2],K=m.x+m.width+(v.x-m.x-m.width-q.width)/2,c.push(new mxPoint(m.x+m.width+H,G)),c.push(new mxPoint(K-H,G)),c.push(new mxPoint(K+q.width+H,G)),c.push(new mxPoint(v.x-H,G));for(v=0;v<c.length;v+=2)C=c[v],J=c[v+1],C=n(C,J,null!=M? -M[v/2]:null),C.node.style.visibility="visible",C.redraw(),p.push(C);for(v=c.length/2;null!=M&&v<M.length;v++)M[v].destroy();g.guidesArrHor=p;K-=d.x;c=!0}else F(!0);if(1<I&&I==z.length-1){p=[];M=g.guidesArrVer;e=[];D=0;v=z[0]==q?1:0;I=z[v].x+z[v].width;if(0<y)for(v=0;v<z.length-1;v++)m=z[v],E=z[v+1],q==m?(D=E.y-m.height-y,e.push(new mxPoint(I,D+m.height+H)),e.push(new mxPoint(I,E.y-H))):q==E?(e.push(new mxPoint(I,m.y+m.height+H)),D=m.y+m.height+y,e.push(new mxPoint(I,D-H))):(e.push(new mxPoint(I,m.y+ -m.height+H)),e.push(new mxPoint(I,E.y-H)));else m=z[0],v=z[2],D=m.y+m.height+(v.y-m.y-m.height-q.height)/2,e.push(new mxPoint(I,m.y+m.height+H)),e.push(new mxPoint(I,D-H)),e.push(new mxPoint(I,D+q.height+H)),e.push(new mxPoint(I,v.y-H));for(v=0;v<e.length;v+=2)C=e[v],J=e[v+1],C=n(C,J,null!=M?M[v/2]:null,!0),C.node.style.visibility="visible",C.redraw(),p.push(C);for(v=e.length/2;null!=M&&v<M.length;v++)M[v].destroy();g.guidesArrVer=p;D-=d.y;e=!0}else F(!1,!0)}if(c||e)return q=new mxPoint(K,D),z=b.call(this, -d,q,x,B),c&&!e?q.y=z.y:e&&!c&&(q.x=z.x),z.y!=q.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),z.x!=q.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),q;F(!0,!0);return b.apply(this,arguments)};var f=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(d){f.call(this,d);var u=this.guidesArrVer,x=this.guidesArrHor;if(null!=u)for(var B=0;B<u.length;B++)u[B].node.style.visibility=d?"visible":"hidden";if(null!= -x)for(B=0;B<x.length;B++)x[B].node.style.visibility=d?"visible":"hidden"};var k=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){k.call(this);var d=this.guidesArrVer,u=this.guidesArrHor;if(null!=d){for(var x=0;x<d.length;x++)d[x].destroy();this.guidesArrVer=null}if(null!=u){for(x=0;x<u.length;x++)u[x].destroy();this.guidesArrHor=null}}})();function mxRuler(b,f,k,d){function u(){var I=b.diagramContainer;g.style.top=I.offsetTop-K+"px";g.style.left=I.offsetLeft-K+"px";g.style.width=(k?0:I.offsetWidth)+K+"px";g.style.height=(k?I.offsetHeight:0)+K+"px"}function x(I,N,t){if(null!=B)return I;var p;return function(){var F=this,J=arguments,M=t&&!p;clearTimeout(p);p=setTimeout(function(){p=null;t||I.apply(F,J)},N);M&&I.apply(F,J)}}var B=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame, -D=window.cancelAnimationFrame||window.mozCancelAnimationFrame,K=this.RULER_THICKNESS,c=this;this.unit=f;var e=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},g=document.createElement("div");g.style.position="absolute";this.updateStyle=mxUtils.bind(this,function(){e=Editor.isDarkMode()? -{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};g.style.background=e.bkgClr;g.style[k?"borderRight":"borderBottom"]="0.5px solid "+e.strokeClr;g.style.borderLeft="0.5px solid "+e.strokeClr});this.updateStyle();document.body.appendChild(g);mxEvent.disableContextMenu(g);this.editorUiRefresh=b.refresh;b.refresh= +Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var u=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");u.apply(this,arguments)};var v=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){v.apply(this,arguments);this.menus.get("save").setEnabled(null!= +this.getCurrentFile()||"1"==urlParams.embed)};var B=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(x,y){null!=y.shortcut&&900>e&&!mxClient.IS_IOS?x.firstChild.nextSibling.setAttribute("title",y.shortcut):B.apply(this,arguments)};var E=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){E.apply(this,arguments);if(null!=this.userElement){var x=this.userElement;x.style.cssText="position:relative;cursor:pointer;display:"+x.style.display;x.className="geToolbarButton"; +x.innerText="";x.style.backgroundImage="url("+Editor.userImage+")";x.style.backgroundPosition="center center";x.style.backgroundRepeat="no-repeat";x.style.backgroundSize="24px 24px";x.style.height="24px";x.style.width="24px";var y=mxResources.get("changeUser");if("none"!=x.style.display){x.style.display="inline-block";var I=this.getCurrentFile();if(null!=I&&I.isRealtimeEnabled()&&I.isRealtimeSupported()){var N=document.createElement("img");N.setAttribute("border","0");N.style.position="absolute"; +N.style.left="18px";N.style.top="2px";N.style.width="12px";N.style.height="12px";var t=I.getRealtimeError();I=I.getRealtimeState();y+=" ("+mxResources.get("realtimeCollaboration");1==I?(N.src=Editor.syncImage,y+=mxResources.get("online")):(N.src=Editor.syncProblemImage,y=null!=t&&null!=t.message?y+t.message:y+mxResources.get("disconnected"));x.style.marginRight="6px";x.appendChild(N);y+=")"}}x.setAttribute("title",y)}};var L=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer= +function(){L.apply(this,arguments);null!=this.shareButton&&(this.shareButton.style.display="none")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var x=document.createElement("div");x.style.display="inline-block";x.style.position="relative";x.style.marginTop="6px";x.style.marginRight="4px";var y=document.createElement("a");y.className="geMenuItem gePrimaryBtn";y.style.marginLeft="8px";y.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!= +urlParams.saveAndExit){var I="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(y,I);y.setAttribute("title",I);mxEvent.addListener(y,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));x.appendChild(y)}}else mxUtils.write(y,mxResources.get("save")),y.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(y,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),x.appendChild(y), +"1"==urlParams.saveAndExit&&(y=document.createElement("a"),mxUtils.write(y,mxResources.get("saveAndExit")),y.setAttribute("title",mxResources.get("saveAndExit")),y.className="geMenuItem",y.style.marginLeft="6px",y.style.padding="6px",mxEvent.addListener(y,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),x.appendChild(y));"1"!=urlParams.noExitBtn&&(y=document.createElement("a"),I="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(y, +I),y.setAttribute("title",I),y.className="geMenuItem",y.style.marginLeft="6px",y.style.padding="6px",mxEvent.addListener(y,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),x.appendChild(y));this.buttonContainer.appendChild(x);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var c=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(x,y){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker, +x)){var I=mxUtils.getOffset(this.editorUi.picker);I.x+=this.editorUi.picker.offsetWidth+4;I.y+=x.offsetTop-y.height/2+16;return I}var N=c.apply(this,arguments);I=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);N.x+=I.x-16;N.y+=I.y;return N};var d=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(x,y,I){var N=this.editorUi.editor.graph;x.smartSeparators=!0;d.apply(this,arguments);"1"==urlParams.sketch?N.isEnabled()&&(x.addSeparator(),1==N.getSelectionCount()&&this.addMenuItems(x, +["-","lockUnlock"],null,I)):1==N.getSelectionCount()?(N.isCellFoldable(N.getSelectionCell())&&this.addMenuItems(x,N.isCellCollapsed(y)?["expand"]:["collapse"],null,I),this.addMenuItems(x,["collapsible","-","lockUnlock","enterGroup"],null,I),x.addSeparator(),this.addSubmenu("layout",x)):N.isSelectionEmpty()&&N.isEnabled()?(x.addSeparator(),this.addMenuItems(x,["editData"],null,I),x.addSeparator(),this.addSubmenu("layout",x),this.addSubmenu("insert",x),this.addMenuItems(x,["-","exitGroup"],null,I)): +N.isEnabled()&&this.addMenuItems(x,["-","lockUnlock"],null,I)};var g=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(x,y,I){g.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(x,["copyAsImage"],null,I)};EditorUi.prototype.toggleFormatPanel=function(x){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=x?x:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0}; +var q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&& +(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null);q.apply(this,arguments)};var m=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(x){m.apply(this,arguments);if(x){var y=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=y&& +null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=y||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var n=Menus.prototype.init;Menus.prototype.init=function(){n.apply(this,arguments);var x=this.editorUi,y=x.actions.put("togglePagesVisible", +new Action(mxResources.get("pages"),function(D){x.setPagesVisible(!Editor.pagesVisible)}));y.setToggleAction(!0);y.setSelectedCallback(function(){return Editor.pagesVisible});x.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){k(x)},null,null,Editor.ctrlKey+"+Shift+K"));y=x.actions.put("toggleFormat",new Action(mxResources.get("format"),function(){b(x)}));y.shortcut=x.actions.get("formatPanel").shortcut;y.setToggleAction(!0);y.setSelectedCallback(mxUtils.bind(this,function(){return null!= +x.formatWindow&&x.formatWindow.window.isVisible()}));EditorUi.enablePlantUml&&!x.isOffline()&&x.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var D=new ParseDialog(x,mxResources.get("plantUml")+"...","plantUml");x.showDialog(D.container,620,420,!0,!1);D.init()}));x.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var D=new ParseDialog(x,mxResources.get("mermaid")+"...","mermaid");x.showDialog(D.container,620,420,!0,!1);D.init()}));var I= +this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(D,H){var J=this.editorUi.editor.graph,G=J.getSelectionCell();I.call(this,D,G,null,H);this.addMenuItems(D,["editTooltip"],H);J.model.isVertex(G)&&this.addMenuItems(D,["editGeometry"],H);this.addMenuItems(D,["-","edit"],H)})));this.addPopupMenuCellEditItems=function(D,H,J,G){D.addSeparator();this.addSubmenu("editCell",D,G,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,function(D,H){var J=x.getCurrentFile(); +x.menus.addMenuItems(D,["new"],H);x.menus.addSubmenu("openFrom",D,H);isLocalStorage&&this.addSubmenu("openRecent",D,H);D.addSeparator(H);x.menus.addMenuItems(D,["-","save"],H);null!=J&&J.constructor==DriveFile||x.menus.addMenuItems(D,["saveAs"],H);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||J.constructor==LocalFile&&null==J.fileHandle||x.menus.addMenuItems(D,["synchronize"],H);null!=J&&J.constructor==DriveFile?x.menus.addMenuItems(D,"- rename makeCopy - moveToFolder openFolder".split(" "),H):(x.menus.addMenuItems(D, +["-","rename"],H),x.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(D,["upload"],H):x.menus.addMenuItems(D,["makeCopy"],H));null!=J&&J.isRevisionHistorySupported()&&x.menus.addMenuItems(D,["-","revisionHistory"],H);if(null!=J){if(null!=x.fileNode&&"1"!=urlParams.embedInline){var G=null!=J.getTitle()?J.getTitle():x.defaultFilename;(J.constructor==DriveFile&&null!=J.sync&&J.sync.isConnected()||!/(\.html)$/i.test(G)&&!/(\.svg)$/i.test(G))&&this.addMenuItems(D, +["properties"],H)}J.constructor==DriveFile&&x.menus.addMenuItems(D,["share"],H)}x.menus.addMenuItems(D,["-","autosave"],H)})));this.put("diagram",new Menu(mxUtils.bind(this,function(D,H){var J=x.getCurrentFile();x.menus.addSubmenu("extras",D,H,mxResources.get("preferences"));D.addSeparator(H);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)x.menus.addMenuItems(D,"new open - synchronize - save saveAs -".split(" "),H);else if("1"==urlParams.embed||x.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&& +"1"!=urlParams.embedInline&&x.menus.addMenuItems(D,["-","save"],H);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||x.mode==App.MODE_ATLAS)x.menus.addMenuItems(D,["saveAndExit"],H),null!=J&&J.isRevisionHistorySupported()&&x.menus.addMenuItems(D,["revisionHistory"],H);D.addSeparator(H)}else x.mode==App.MODE_ATLAS?x.menus.addMenuItems(D,["save","synchronize","-"],H):"1"!=urlParams.noFileMenu&&("1"!=urlParams.sketch?(x.menus.addMenuItems(D,["new"],H),x.menus.addSubmenu("openFrom", +D,H),isLocalStorage&&this.addSubmenu("openRecent",D,H),D.addSeparator(H),null!=J&&(J.constructor==DriveFile&&x.menus.addMenuItems(D,["share"],H),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||J.constructor==LocalFile||x.menus.addMenuItems(D,["synchronize"],H)),D.addSeparator(H),x.menus.addSubmenu("save",D,H)):x.menus.addSubmenu("file",D,H));x.menus.addSubmenu("exportAs",D,H);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?x.menus.addMenuItems(D,["import"],H):"1"!=urlParams.noFileMenu&&x.menus.addSubmenu("importFrom", +D,H);x.menus.addMenuItems(D,["-","findReplace"],H);x.commentsSupported()&&x.menus.addMenuItems(D,["comments","-"],H);x.menus.addMenuItems(D,["toggleFormat","layers","tags","-","pageSetup"],H);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||x.menus.addMenuItems(D,["print"],H);"1"!=urlParams.sketch&&null!=J&&null!=x.fileNode&&"1"!=urlParams.embedInline&&(J=null!=J.getTitle()?J.getTitle():x.defaultFilename,/(\.html)$/i.test(J)||/(\.svg)$/i.test(J)||this.addMenuItems(D,["-","properties"])); +D.addSeparator(H);x.menus.addSubmenu("help",D,H);"1"==urlParams.embed||x.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||x.mode==App.MODE_ATLAS)&&x.menus.addMenuItems(D,["-","exit"],H):"1"!=urlParams.noFileMenu&&x.menus.addMenuItems(D,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(D,H){var J=x.getCurrentFile();null!=J&&J.constructor==DriveFile?x.menus.addMenuItems(D,["save","makeCopy","-","rename","moveToFolder"],H):(x.menus.addMenuItems(D,["save","saveAs","-","rename"],H), +x.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(D,["upload"],H):x.menus.addMenuItems(D,["makeCopy"],H));x.menus.addMenuItems(D,["-","autosave"],H);null!=J&&J.isRevisionHistorySupported()&&x.menus.addMenuItems(D,["-","revisionHistory"],H)})));var N=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(D,H){N.funct(D,H);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||x.menus.addMenuItems(D,["publishLink"],H);x.mode!=App.MODE_ATLAS&& +"1"!=urlParams.extAuth&&(D.addSeparator(H),x.menus.addSubmenu("embed",D,H))})));var t=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(D,H){x.menus.addInsertTableCellItem(D,H)})));var p=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(D,H){p.funct(D,H);this.addMenuItems(D,["-","ruler","-","pageScale"],H)})));this.put("extras",new Menu(mxUtils.bind(this,function(D,H){null==t||"1"==urlParams.embed&&null!=urlParams.lang||x.menus.addSubmenu("language",D, +H);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&x.mode!=App.MODE_ATLAS&&x.menus.addSubmenu("theme",D,H);x.menus.addSubmenu("units",D,H);D.addSeparator(H);"1"!=urlParams.sketch&&x.menus.addMenuItems(D,["scrollbars","-","tooltips","copyConnect","collapseExpand"],H);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&x.mode!=App.MODE_ATLAS&&x.menus.addMenuItems(D,["-","showStartScreen","search","scratchpad"],H);D.addSeparator(H);"1"==urlParams.sketch&& +x.menus.addMenuItems(D,["copyConnect","collapseExpand","tooltips","-"],H);EditorUi.isElectronApp&&x.menus.addMenuItems(D,["-","spellCheck","autoBkp","drafts","-"],H);var J=x.getCurrentFile();null!=J&&J.isRealtimeEnabled()&&J.isRealtimeSupported()&&this.addMenuItems(D,["-","showRemoteCursors","shareCursor","-"],H);Graph.translateDiagram&&x.menus.addMenuItems(D,["diagramLanguage"],H);x.mode!=App.MODE_ATLAS&&x.menus.addMenuItem(D,"configuration",H);"1"!=urlParams.sketch&&!x.isOfflineApp()&&isLocalStorage&& +x.mode!=App.MODE_ATLAS&&x.menus.addMenuItem(D,"plugins",H);D.addSeparator(H)})));mxUtils.bind(this,function(){var D=this.get("insert"),H=D.funct;D.funct=function(J,G){"1"==urlParams.sketch?(x.menus.addMenuItems(J,["toggleShapes"],G),x.menus.addSubmenu("table",J,G),J.addSeparator(G),x.insertTemplateEnabled&&!x.isOffline()&&x.menus.addMenuItems(J,["insertTemplate"],G),x.menus.addMenuItems(J,["insertImage","insertLink","-"],G),x.menus.addSubmenu("insertAdvanced",J,G,mxResources.get("advanced")),x.menus.addSubmenu("layout", +J,G)):(H.apply(this,arguments),x.menus.addSubmenu("table",J,G))}})();var F="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),K=function(D,H,J,G){D.addItem(J,null,mxUtils.bind(this,function(){var P=new CreateGraphDialog(x,J,G);x.showDialog(P.container,620,420,!0,!1);P.init()}),H)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(D,H){for(var J=0;J<F.length;J++)"-"==F[J]?D.addSeparator(H):K(D,H,mxResources.get(F[J])+"...",F[J])})))};EditorUi.prototype.installFormatToolbar= +function(x){var y=this.editor.graph,I=document.createElement("div");I.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";y.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(N,t){0<y.getSelectionCount()?(x.appendChild(I),I.innerHTML="Selected: "+y.getSelectionCount()):null!=I.parentNode&&I.parentNode.removeChild(I)}))};var z=!1;EditorUi.prototype.initFormatWindow= +function(){if(!z&&null!=this.formatWindow){z=!0;var x=this.formatWindow.window.toggleMinimized,y=240;this.formatWindow.window.toggleMinimized=function(){x.apply(this,arguments);this.minimized?(y=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+y-140+"px"):(this.div.style.width=y+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-y+140)+"px");this.fit()}; +mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(I){mxEvent.getSource(I)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var C=EditorUi.prototype.init;EditorUi.prototype.init=function(){function x(ca,ea,da){var fa=p.menus.get(ca),ja=H.addMenu(mxResources.get(ca),mxUtils.bind(this,function(){fa.funct.apply(this,arguments)}),D);ja.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ja.style.display="inline-block";ja.style.boxSizing= +"border-box";ja.style.top="6px";ja.style.marginRight="6px";ja.style.height="30px";ja.style.paddingTop="6px";ja.style.paddingBottom="6px";ja.style.cursor="pointer";ja.setAttribute("title",mxResources.get(ca));p.menus.menuCreated(fa,ja,"geMenuItem");null!=da?(ja.style.backgroundImage="url("+da+")",ja.style.backgroundPosition="center center",ja.style.backgroundRepeat="no-repeat",ja.style.backgroundSize="24px 24px",ja.style.width="34px",ja.innerText=""):ea||(ja.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+ +")",ja.style.backgroundPosition="right 6px center",ja.style.backgroundRepeat="no-repeat",ja.style.paddingRight="22px");return ja}function y(ca,ea,da,fa,ja,ra){var oa=document.createElement("a");oa.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";oa.style.display="inline-block";oa.style.boxSizing="border-box";oa.style.height="30px";oa.style.padding="6px";oa.style.position="relative";oa.style.verticalAlign="top";oa.style.top="0px";"1"==urlParams.sketch&&(oa.style.borderStyle="none",oa.style.boxShadow= +"none",oa.style.padding="6px",oa.style.margin="0px");null!=p.statusContainer?K.insertBefore(oa,p.statusContainer):K.appendChild(oa);null!=ra?(oa.style.backgroundImage="url("+ra+")",oa.style.backgroundPosition="center center",oa.style.backgroundRepeat="no-repeat",oa.style.backgroundSize="24px 24px",oa.style.width="34px"):mxUtils.write(oa,ca);mxEvent.addListener(oa,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Aa){Aa.preventDefault()}));mxEvent.addListener(oa,"click",function(Aa){"disabled"!= +oa.getAttribute("disabled")&&ea(Aa);mxEvent.consume(Aa)});null==da&&(oa.style.marginRight="4px");null!=fa&&oa.setAttribute("title",fa);null!=ja&&(ca=function(){ja.isEnabled()?(oa.removeAttribute("disabled"),oa.style.cursor="pointer"):(oa.setAttribute("disabled","disabled"),oa.style.cursor="default")},ja.addListener("stateChanged",ca),F.addListener("enabledChanged",ca),ca());return oa}function I(ca,ea,da){da=document.createElement("div");da.className="geMenuItem";da.style.display="inline-block";da.style.verticalAlign= +"top";da.style.marginRight="6px";da.style.padding="0 4px 0 4px";da.style.height="30px";da.style.position="relative";da.style.top="0px";"1"==urlParams.sketch&&(da.style.boxShadow="none");for(var fa=0;fa<ca.length;fa++)null!=ca[fa]&&("1"==urlParams.sketch&&(ca[fa].style.padding="10px 8px",ca[fa].style.width="30px"),ca[fa].style.margin="0px",ca[fa].style.boxShadow="none",da.appendChild(ca[fa]));null!=ea&&mxUtils.setOpacity(da,ea);null!=p.statusContainer&&"1"!=urlParams.sketch?K.insertBefore(da,p.statusContainer): +K.appendChild(da);return da}function N(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(A.style.left=58>l.offsetTop-l.offsetHeight/2?"70px":"10px");else{for(var ca=K.firstChild;null!=ca;){var ea=ca.nextSibling;"geMenuItem"!=ca.className&&"geItem"!=ca.className||ca.parentNode.removeChild(ca);ca=ea}D=K.firstChild;e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;ca=1E3>e||"1"==urlParams.sketch;var da=null;ca||(da=x("diagram"));ea=ca?x("diagram",null,Editor.menuImage): +null;null!=ea&&(da=ea);I([da,y(mxResources.get("shapes"),p.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),p.actions.get("image"),ca?Editor.shapesImage:null),y(mxResources.get("format"),p.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+p.actions.get("formatPanel").shortcut+")",p.actions.get("image"),ca?Editor.formatImage:null)],ca?60:null);var fa=x("insert",!0,ca?U:null);I([fa,y(mxResources.get("delete"),p.actions.get("delete").funct,null,mxResources.get("delete"), +p.actions.get("delete"),ca?Editor.trashImage:null)],ca?60:null);411<=e&&(I([ya,Pa],60),520<=e&&I([Ea,640<=e?y("",qa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",qa,Editor.zoomInImage):null,640<=e?y("",la.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",la,Editor.zoomOutImage):null],60))}null!=da&&(mxEvent.disableContextMenu(da),mxEvent.addGestureListeners(da,mxUtils.bind(this,function(ja){(mxEvent.isShiftDown(ja)||mxEvent.isAltDown(ja)||mxEvent.isMetaDown(ja)||mxEvent.isControlDown(ja)|| +mxEvent.isPopupTrigger(ja))&&p.appIconClicked(ja)}),null,null));ea=p.menus.get("1"==urlParams["live-ui"]?"theme":"language");null!=ea&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=e&&"1"!=urlParams.embed&&"1"!=urlParams.sketch?(null==La&&(fa=H.addMenu("",ea.funct),fa.setAttribute("title",mxResources.get("1"==urlParams["live-ui"]?"preferences":"language")),fa.className="geToolbarButton",fa.style.backgroundImage="url("+Editor.globeImage+")",fa.style.backgroundPosition="center center",fa.style.backgroundRepeat= +"no-repeat",fa.style.backgroundSize="22px 22px",fa.style.position="absolute",fa.style.height="24px",fa.style.width="24px",fa.style.zIndex="1",fa.style.right="8px",fa.style.cursor="pointer",fa.style.top="12px",K.appendChild(fa),La=fa,"1"==urlParams["live-ui"]&&(ea=mxUtils.bind(this,function(){fa.style.backgroundImage="url('"+(Editor.isDarkMode()?Editor.lightModeImage:Editor.darkModeImage)+"')"}),p.addListener("darkModeChanged",ea),ea())),p.buttonContainer.style.paddingRight="34px"):(p.buttonContainer.style.paddingRight= +"4px",null!=La&&(La.parentNode.removeChild(La),La=null))}C.apply(this,arguments);var t=document.createElement("div");t.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";t.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(t);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version|| +0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=e||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var p=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==p.embedViewport)mxUtils.fit(this.div); +else{var ca=parseInt(this.div.offsetLeft),ea=parseInt(this.div.offsetWidth),da=p.embedViewport.x+p.embedViewport.width,fa=parseInt(this.div.offsetTop),ja=parseInt(this.div.offsetHeight),ra=p.embedViewport.y+p.embedViewport.height;this.div.style.left=Math.max(p.embedViewport.x,Math.min(ca,da-ea))+"px";this.div.style.top=Math.max(p.embedViewport.y,Math.min(fa,ra-ja))+"px";this.div.style.height=Math.min(p.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(p.embedViewport.width, +parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=e)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),t=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>e||708>t)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));p=this;var F=p.editor.graph; +p.toolbar=this.createToolbar(p.createDiv("geToolbar"));p.defaultLibraryName=mxResources.get("untitledLibrary");var K=document.createElement("div");K.className="geMenubarContainer";var D=null,H=new Menubar(p,K);p.statusContainer=p.createStatusContainer();p.statusContainer.style.position="relative";p.statusContainer.style.maxWidth="";p.statusContainer.style.marginTop="7px";p.statusContainer.style.marginLeft="6px";p.statusContainer.style.color="gray";p.statusContainer.style.cursor="default";var J=p.hideCurrentMenu; +p.hideCurrentMenu=function(){J.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var G=p.descriptorChanged;p.descriptorChanged=function(){G.apply(this,arguments);var ca=p.getCurrentFile();if(null!=ca&&null!=ca.getTitle()){var ea=ca.getMode();"google"==ea?ea="googleDrive":"github"==ea?ea="gitHub":"gitlab"==ea?ea="gitLab":"onedrive"==ea&&(ea="oneDrive");ea=mxResources.get(ea);K.setAttribute("title",ca.getTitle()+(null!=ea?" ("+ea+")":""))}else K.removeAttribute("title")};p.setStatusText(p.editor.getStatus()); +K.appendChild(p.statusContainer);p.buttonContainer=document.createElement("div");p.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";K.appendChild(p.buttonContainer);p.menubarContainer=p.buttonContainer;p.tabContainer=document.createElement("div");p.tabContainer.className="geTabContainer";p.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;"; +t=p.diagramContainer.parentNode;var P=document.createElement("div");P.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";p.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){P.style.top="20px";p.titlebar=document.createElement("div");p.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var T=document.createElement("div"); +T.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";p.titlebar.appendChild(T);t.appendChild(p.titlebar)}T=p.menus.get("viewZoom");var W=T.funct;T.funct=function(ca,ea){W.apply(this,arguments);p.menus.addMenuItems(ca,["-","outline","fullscreen"],ea)};var U="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,V="1"==urlParams.sketch?document.createElement("div"):null,l="1"==urlParams.sketch? +document.createElement("div"):null,A="1"==urlParams.sketch?document.createElement("div"):null,M=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)A.style.left="10px",A.style.top="10px",l.style.left="10px",l.style.top="60px",V.style.top="10px",V.style.right="12px",V.style.left="",p.diagramContainer.setAttribute("data-bounds",p.diagramContainer.style.top+" "+p.diagramContainer.style.left+" "+p.diagramContainer.style.width+" "+p.diagramContainer.style.height),p.diagramContainer.style.top="0px", +p.diagramContainer.style.left="0px",p.diagramContainer.style.bottom="0px",p.diagramContainer.style.right="0px",p.diagramContainer.style.width="",p.diagramContainer.style.height="";else{var ca=p.diagramContainer.getAttribute("data-bounds");if(null!=ca){p.diagramContainer.style.background="transparent";p.diagramContainer.removeAttribute("data-bounds");var ea=F.getGraphBounds();ca=ca.split(" ");p.diagramContainer.style.top=ca[0];p.diagramContainer.style.left=ca[1];p.diagramContainer.style.width=ea.width+ +50+"px";p.diagramContainer.style.height=ea.height+46+"px";p.diagramContainer.style.bottom="";p.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:p.diagramContainer.getBoundingClientRect()}),"*");p.refresh()}A.style.left=p.diagramContainer.offsetLeft+"px";A.style.top=p.diagramContainer.offsetTop-A.offsetHeight-4+"px";l.style.display="";l.style.left=p.diagramContainer.offsetLeft-l.offsetWidth-4+"px";l.style.top=p.diagramContainer.offsetTop+ +"px";V.style.left=p.diagramContainer.offsetLeft+p.diagramContainer.offsetWidth-V.offsetWidth+"px";V.style.top=A.style.top;V.style.right="";p.bottomResizer.style.left=p.diagramContainer.offsetLeft+(p.diagramContainer.offsetWidth-p.bottomResizer.offsetWidth)/2+"px";p.bottomResizer.style.top=p.diagramContainer.offsetTop+p.diagramContainer.offsetHeight-p.bottomResizer.offsetHeight/2-1+"px";p.rightResizer.style.left=p.diagramContainer.offsetLeft+p.diagramContainer.offsetWidth-p.rightResizer.offsetWidth/ +2-1+"px";p.rightResizer.style.top=p.diagramContainer.offsetTop+(p.diagramContainer.offsetHeight-p.bottomResizer.offsetHeight)/2+"px"}p.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";p.rightResizer.style.visibility=p.bottomResizer.style.visibility;K.style.display="none";A.style.visibility="";V.style.visibility=""}),Q=p.actions.get("fullscreen"),O=y("",Q.funct,null,mxResources.get(""),Q,Editor.fullscreenImage),R=mxUtils.bind(this,function(){O.style.backgroundImage="url("+(Editor.inlineFullscreen? +Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";M()});Q=mxUtils.bind(this,function(){b(p,!0);p.initFormatWindow();var ca=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(ca.x+ca.width+4,ca.y);R()});p.addListener("inlineFullscreenChanged",R);p.addListener("editInlineStart",Q);"1"==urlParams.embedInline&&p.addListener("darkModeChanged", +Q);p.addListener("editInlineStop",mxUtils.bind(this,function(ca){p.diagramContainer.style.width="10px";p.diagramContainer.style.height="10px";p.diagramContainer.style.border="";p.bottomResizer.style.visibility="hidden";p.rightResizer.style.visibility="hidden";A.style.visibility="hidden";V.style.visibility="hidden";l.style.display="none"}));if(null!=p.hoverIcons){var S=p.hoverIcons.update;p.hoverIcons.update=function(){F.freehand.isDrawing()||S.apply(this,arguments)}}if(null!=F.freehand){var X=F.freehand.createStyle; +F.freehand.createStyle=function(ca){return X.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){l.className="geToolbarContainer";V.className="geToolbarContainer";A.className="geToolbarContainer";K.className="geToolbarContainer";p.picker=l;var aa=!1;"1"!=urlParams.embed&&"atlassian"!=p.getServiceName()&&(mxEvent.addListener(K,"mouseenter",function(){p.statusContainer.style.display="inline-block"}),mxEvent.addListener(K,"mouseleave",function(){aa||(p.statusContainer.style.display="none")})); +var Y=mxUtils.bind(this,function(ca){null!=p.notificationBtn&&(null!=ca?p.notificationBtn.setAttribute("title",ca):p.notificationBtn.removeAttribute("title"))});if("1"!=urlParams.embed&&"1"==urlParams["live-ui"]){var Z=x("theme",null,Editor.darkModeImage);null!=Z&&(Z.style.position="relative",Z.style.backgroundPosition="top center",Z.style.backgroundSize="22px 22px",Z.style.width="24px",Z.style.height="28px",Z.style.top="4px",K.appendChild(Z),Q=mxUtils.bind(this,function(){Z.style.backgroundImage= +"url('"+(Editor.isDarkMode()?Editor.lightModeImage:Editor.darkModeImage)+"')"}),p.addListener("darkModeChanged",Q),Q())}K.style.visibility=20>K.clientWidth?"hidden":"";p.editor.addListener("statusChanged",mxUtils.bind(this,function(){p.setStatusText(p.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=p.getServiceName())if(p.statusContainer.style.display="inline-block",aa=!0,1==p.statusContainer.children.length&&""==p.editor.getStatus())K.style.visibility="hidden";else{if(0==p.statusContainer.children.length|| +1==p.statusContainer.children.length&&"function"===typeof p.statusContainer.firstChild.getAttribute&&null==p.statusContainer.firstChild.getAttribute("class")){var ca=null!=p.statusContainer.firstChild&&"function"===typeof p.statusContainer.firstChild.getAttribute?p.statusContainer.firstChild.getAttribute("title"):p.editor.getStatus();Y(ca);var ea=p.getCurrentFile();ea=null!=ea?ea.savingStatusKey:DrawioFile.prototype.savingStatusKey;ca==mxResources.get(ea)+"..."?(p.statusContainer.innerHTML='<img title="'+ +mxUtils.htmlEntities(mxResources.get(ea))+'..."src="'+Editor.tailSpin+'">',p.statusContainer.style.display="inline-block",aa=!0):6<p.buttonContainer.clientWidth&&(p.statusContainer.style.display="none",aa=!1)}else p.statusContainer.style.display="inline-block",Y(null),aa=!0;K.style.visibility=20>K.clientWidth&&!aa?"hidden":""}}));na=x("diagram",null,Editor.menuImage);na.style.boxShadow="none";na.style.padding="6px";na.style.margin="0px";A.appendChild(na);mxEvent.disableContextMenu(na);mxEvent.addGestureListeners(na, +mxUtils.bind(this,function(ca){(mxEvent.isShiftDown(ca)||mxEvent.isAltDown(ca)||mxEvent.isMetaDown(ca)||mxEvent.isControlDown(ca)||mxEvent.isPopupTrigger(ca))&&this.appIconClicked(ca)}),null,null);p.statusContainer.style.position="";p.statusContainer.style.display="none";p.statusContainer.style.margin="0px";p.statusContainer.style.padding="6px 0px";p.statusContainer.style.maxWidth=Math.min(e-240,280)+"px";p.statusContainer.style.display="inline-block";p.statusContainer.style.textOverflow="ellipsis"; +p.buttonContainer.style.display="inline-block";p.buttonContainer.style.position="relative";p.buttonContainer.style.paddingRight="0px";p.buttonContainer.style.top="0px";var ba=document.createElement("a");ba.style.padding="0px";ba.style.boxShadow="none";ba.className="geMenuItem";ba.style.display="inline-block";ba.style.width="40px";ba.style.height="12px";ba.style.marginBottom="-2px";ba.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";ba.style.backgroundPosition="top center";ba.style.backgroundRepeat= +"no-repeat";ba.setAttribute("title","Minimize");var ha=!1,ma=mxUtils.bind(this,function(){l.innerText="";if(!ha){var ca=function(ea,da,fa,ja){null!=da&&ea.setAttribute("title",da);ea.style.cursor=null!=fa?fa:"default";ea.style.margin="2px 0px";l.appendChild(ea);mxUtils.br(l);null!=ja&&(ea.style.position="relative",ea.style.overflow="visible",da=document.createElement("div"),da.style.position="absolute",da.style.left="34px",da.style.top="28px",da.style.fontSize="8px",mxUtils.write(da,ja),ea.appendChild(da)); +return ea};ca(p.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+" (A)",null,"A");ca(p.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;", +140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");ca(p.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");ca(p.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");(function(){var ea=new mxCell("",new mxGeometry(0,0,F.defaultEdgeLength, +0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");ea.geometry.setTerminalPoint(new mxPoint(0,0),!0);ea.geometry.setTerminalPoint(new mxPoint(ea.geometry.width,0),!1);ea.geometry.points=[];ea.geometry.relative=!0;ea.edge=!0;ca(p.sidebar.createEdgeTemplateFromCells([ea],ea.geometry.width,ea.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");ea=ea.clone();ea.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;"; +ea.geometry.width=F.defaultEdgeLength+20;ea.geometry.setTerminalPoint(new mxPoint(0,20),!0);ea.geometry.setTerminalPoint(new mxPoint(ea.geometry.width,20),!1);ca(p.sidebar.createEdgeTemplateFromCells([ea],ea.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"))})();(function(ea,da,fa,ja){ea=y("",ea.funct,null,da,ea,fa);ea.style.width="40px";ea.style.height="34px";ea.style.opacity="0.7";return ca(ea,null,"pointer",ja)})(p.actions.get("insertFreehand"),mxResources.get("freehand")+ +" (X)",Editor.freehandImage,"X");na=x("insert",null,Editor.plusImage);na.style.boxShadow="none";na.style.opacity="0.7";na.style.padding="6px";na.style.margin="0px";na.style.height="34px";na.style.width="37px";ca(na,null,"pointer")}"1"!=urlParams.embedInline&&l.appendChild(ba)});mxEvent.addListener(ba,"click",mxUtils.bind(this,function(){ha?(mxUtils.setPrefixedStyle(l.style,"transform","translate(0, -50%)"),l.style.padding="8px 6px 4px",l.style.top="50%",l.style.bottom="",l.style.height="",ba.style.backgroundImage= +"url("+mxWindow.prototype.normalizeImage+")",ba.style.width="40px",ba.style.height="12px",ba.setAttribute("title","Minimize"),ha=!1,ma()):(l.innerText="",l.appendChild(ba),mxUtils.setPrefixedStyle(l.style,"transform","translate(0, 0)"),l.style.top="",l.style.bottom="12px",l.style.padding="0px",l.style.height="24px",ba.style.height="24px",ba.style.backgroundImage="url("+Editor.plusImage+")",ba.setAttribute("title",mxResources.get("insert")),ba.style.width="24px",ha=!0)}));ma();p.addListener("darkModeChanged", +ma);p.addListener("sketchModeChanged",ma)}else p.editor.addListener("statusChanged",mxUtils.bind(this,function(){p.setStatusText(p.editor.getStatus())}));if(null!=T){var ia=function(ca){if(mxEvent.isAltDown(ca))p.hideCurrentMenu(),p.actions.get("customZoom").funct(),mxEvent.consume(ca);else if("geItem"!=mxEvent.getSource(ca).className||mxEvent.isShiftDown(ca))p.hideCurrentMenu(),p.actions.get("smartFit").funct(),mxEvent.consume(ca)},qa=p.actions.get("zoomIn"),la=p.actions.get("zoomOut");Q=p.actions.get("resetView"); +var Ca=p.actions.get("undo"),Da=p.actions.get("redo"),ya=y("",Ca.funct,null,mxResources.get("undo")+" ("+Ca.shortcut+")",Ca,Editor.undoImage),Pa=y("",Da.funct,null,mxResources.get("redo")+" ("+Da.shortcut+")",Da,Editor.redoImage);if(null!=V){Q=function(){Ga.style.display=null!=p.pages&&("0"!=urlParams.pages||1<p.pages.length||Editor.pagesVisible)?"inline-block":"none"};var za=function(){Ga.innerText="";if(null!=p.currentPage){mxUtils.write(Ga,p.currentPage.getName());var ca=null!=p.pages?p.pages.length: +1,ea=p.getPageIndex(p.currentPage);ea=null!=ea?ea+1:1;var da=p.currentPage.getId();Ga.setAttribute("title",p.currentPage.getName()+" ("+ea+"/"+ca+")"+(null!=da?" ["+da+"]":""))}},Fa=p.actions.get("delete"),Ia=y("",Fa.funct,null,mxResources.get("delete"),Fa,Editor.trashImage);Ia.style.opacity="0.1";A.appendChild(Ia);Fa.addListener("stateChanged",function(){Ia.style.opacity=Fa.enabled?"":"0.1"});var Ba=function(){ya.style.display=0<p.editor.undoManager.history.length||F.isEditing()?"inline-block":"none"; +Pa.style.display=ya.style.display;ya.style.opacity=Ca.enabled?"":"0.1";Pa.style.opacity=Da.enabled?"":"0.1"};A.appendChild(ya);A.appendChild(Pa);Ca.addListener("stateChanged",Ba);Da.addListener("stateChanged",Ba);Ba();var Ga=this.createPageMenuTab(!1,!0);Ga.style.display="none";Ga.style.position="";Ga.style.marginLeft="";Ga.style.top="";Ga.style.left="";Ga.style.height="100%";Ga.style.lineHeight="";Ga.style.borderStyle="none";Ga.style.padding="3px 0";Ga.style.margin="0px";Ga.style.background="";Ga.style.border= +"";Ga.style.boxShadow="none";Ga.style.verticalAlign="top";Ga.style.width="auto";Ga.style.maxWidth="160px";Ga.style.position="relative";Ga.style.padding="6px";Ga.style.textOverflow="ellipsis";Ga.style.opacity="0.8";V.appendChild(Ga);p.editor.addListener("pagesPatched",za);p.editor.addListener("pageSelected",za);p.editor.addListener("pageRenamed",za);p.editor.addListener("fileLoaded",za);za();p.addListener("fileDescriptorChanged",Q);p.addListener("pagesVisibleChanged",Q);p.editor.addListener("pagesPatched", +Q);Q();Q=y("",la.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",la,Editor.zoomOutImage);V.appendChild(Q);var na=H.addMenu("100%",T.funct);na.setAttribute("title",mxResources.get("zoom"));na.innerHTML="100%";na.style.display="inline-block";na.style.color="inherit";na.style.cursor="pointer";na.style.textAlign="center";na.style.whiteSpace="nowrap";na.style.paddingRight="10px";na.style.textDecoration="none";na.style.verticalAlign="top";na.style.padding="6px 0";na.style.fontSize= +"14px";na.style.width="40px";na.style.opacity="0.4";V.appendChild(na);T=y("",qa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",qa,Editor.zoomInImage);V.appendChild(T);"1"==urlParams.embedInline?(V.appendChild(O),T=p.actions.get("exit"),V.appendChild(y("",T.funct,null,mxResources.get("exit"),T,Editor.closeImage))):O.parentNode.removeChild(O);p.tabContainer.style.visibility="hidden";K.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;"; +A.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";V.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";P.appendChild(A);P.appendChild(V);l.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;"; +mxClient.IS_POINTER&&(l.style.touchAction="none");P.appendChild(l);window.setTimeout(function(){mxUtils.setPrefixedStyle(l.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(P)}else{var Ea=y("",ia,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Q,Editor.zoomFitImage);K.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";na=H.addMenu("100%", +T.funct);na.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");na.style.whiteSpace="nowrap";na.style.paddingRight="10px";na.style.textDecoration="none";na.style.textDecoration="none";na.style.overflow="hidden";na.style.visibility="hidden";na.style.textAlign="center";na.style.cursor="pointer";na.style.height=parseInt(p.tabContainerHeight)-1+"px";na.style.lineHeight=parseInt(p.tabContainerHeight)+1+"px";na.style.position="absolute";na.style.display="block";na.style.fontSize="12px";na.style.width= +"59px";na.style.right="0px";na.style.bottom="0px";na.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";na.style.backgroundPosition="right 6px center";na.style.backgroundRepeat="no-repeat";P.appendChild(na)}(function(ca){mxEvent.addListener(ca,"click",ia);var ea=mxUtils.bind(this,function(){ca.innerText="";mxUtils.write(ca,Math.round(100*p.editor.graph.view.scale)+"%")});p.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ea);p.editor.addListener("resetGraphView",ea);p.editor.addListener("pageSelected", +ea)})(na);var wa=p.setGraphEnabled;p.setGraphEnabled=function(){wa.apply(this,arguments);null!=this.tabContainer&&(na.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==V?this.tabContainerHeight+"px":"0px")}}P.appendChild(K);P.appendChild(p.diagramContainer);t.appendChild(P);p.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=e)&&"1"!=urlParams.embedInline&&b(this,!0);null==V&&P.appendChild(p.tabContainer); +var La=null;N();mxEvent.addListener(window,"resize",function(){N();null!=p.sidebarWindow&&p.sidebarWindow.window.fit();null!=p.formatWindow&&p.formatWindow.window.fit();null!=p.actions.outlineWindow&&p.actions.outlineWindow.window.fit();null!=p.actions.layersWindow&&p.actions.layersWindow.window.fit();null!=p.menus.tagsWindow&&p.menus.tagsWindow.window.fit();null!=p.menus.findWindow&&p.menus.findWindow.window.fit();null!=p.menus.findReplaceWindow&&p.menus.findReplaceWindow.window.fit()});if("1"== +urlParams.embedInline){document.body.style.cursor="text";l.style.transform="";mxEvent.addGestureListeners(p.diagramContainer.parentNode,function(ca){mxEvent.getSource(ca)==p.diagramContainer.parentNode&&(p.embedExitPoint=new mxPoint(mxEvent.getClientX(ca),mxEvent.getClientY(ca)),p.sendEmbeddedSvgExport())});t=document.createElement("div");t.style.position="absolute";t.style.width="10px";t.style.height="10px";t.style.borderRadius="5px";t.style.border="1px solid gray";t.style.background="#ffffff";t.style.cursor= +"row-resize";p.diagramContainer.parentNode.appendChild(t);p.bottomResizer=t;var ka=null,ua=null,sa=null,va=null;mxEvent.addGestureListeners(t,function(ca){va=parseInt(p.diagramContainer.style.height);ua=mxEvent.getClientY(ca);F.popupMenuHandler.hideMenu();mxEvent.consume(ca)});t=t.cloneNode(!1);t.style.cursor="col-resize";p.diagramContainer.parentNode.appendChild(t);p.rightResizer=t;mxEvent.addGestureListeners(t,function(ca){sa=parseInt(p.diagramContainer.style.width);ka=mxEvent.getClientX(ca);F.popupMenuHandler.hideMenu(); +mxEvent.consume(ca)});mxEvent.addGestureListeners(document.body,null,function(ca){var ea=!1;null!=ka&&(p.diagramContainer.style.width=Math.max(20,sa+mxEvent.getClientX(ca)-ka)+"px",ea=!0);null!=ua&&(p.diagramContainer.style.height=Math.max(20,va+mxEvent.getClientY(ca)-ua)+"px",ea=!0);ea&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:p.diagramContainer.getBoundingClientRect()}),"*"),M(),p.refresh())},function(ca){null==ka&&null== +ua||mxEvent.consume(ca);ua=ka=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";p.bottomResizer.style.visibility="hidden";p.rightResizer.style.visibility="hidden";A.style.visibility="hidden";V.style.visibility="hidden";l.style.display="none"}"1"==urlParams.prefetchFonts&&p.editor.loadFonts()}}}; +(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var f=EditorUi.initTheme;EditorUi.initTheme=function(){f.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(e,u,v,B){var E=u.y,L=u.x,c=!1,d=!1;if(null!=this.states&&null!=e&&null!=u){var g=this,q=new mxCellState,m=this.graph.getView().scale,n=Math.max(2,this.getGuideTolerance()/2);q.x=e.x+L;q.y=e.y+E;q.width=e.width;q.height=e.height;for(var z=[],C=[],x=0;x<this.states.length;x++){var y=this.states[x];y instanceof mxCellState&&(B||!this.graph.isCellSelected(y.cell))&&((q.x>=y.x&&q.x<=y.x+y.width||y.x>=q.x&&y.x<=q.x+q.width)&&(q.y> +y.y+y.height+4||q.y+q.height+4<y.y)?z.push(y):(q.y>=y.y&&q.y<=y.y+y.height||y.y>=q.y&&y.y<=q.y+q.height)&&(q.x>y.x+y.width+4||q.x+q.width+4<y.x)&&C.push(y))}var I=0,N=0,t=y=0,p=0,F=0,K=0,D=0,H=5*m;if(1<z.length){z.push(q);z.sort(function(T,W){return T.y-W.y});var J=!1;x=q==z[0];m=q==z[z.length-1];if(!x&&!m)for(x=1;x<z.length-1;x++)if(q==z[x]){m=z[x-1];x=z[x+1];y=N=t=(x.y-m.y-m.height-q.height)/2;break}for(x=0;x<z.length-1;x++){m=z[x];var G=z[x+1],P=q==m||q==G;G=G.y-m.y-m.height;J|=q==m;if(0==N&&0== +I)N=G,I=1;else if(Math.abs(N-G)<=(P||1==x&&J?n:0))I+=1;else if(1<I&&J){z=z.slice(0,x+1);break}else if(3<=z.length-x&&!J)I=0,y=N=0!=t?t:0,z.splice(0,0==x?1:x),x=-1;else break;0!=y||P||(N=y=G)}3==z.length&&z[1]==q&&(y=0)}if(1<C.length){C.push(q);C.sort(function(T,W){return T.x-W.x});J=!1;x=q==C[0];m=q==C[C.length-1];if(!x&&!m)for(x=1;x<C.length-1;x++)if(q==C[x]){m=C[x-1];x=C[x+1];K=F=D=(x.x-m.x-m.width-q.width)/2;break}for(x=0;x<C.length-1;x++){m=C[x];G=C[x+1];P=q==m||q==G;G=G.x-m.x-m.width;J|=q==m; +if(0==F&&0==p)F=G,p=1;else if(Math.abs(F-G)<=(P||1==x&&J?n:0))p+=1;else if(1<p&&J){C=C.slice(0,x+1);break}else if(3<=C.length-x&&!J)p=0,K=F=0!=D?D:0,C.splice(0,0==x?1:x),x=-1;else break;0!=K||P||(F=K=G)}3==C.length&&C[1]==q&&(K=0)}n=function(T,W,U,V){var l=[];if(V){V=H;var A=0}else V=0,A=H;l.push(new mxPoint(T.x-V,T.y-A));l.push(new mxPoint(T.x+V,T.y+A));l.push(T);l.push(W);l.push(new mxPoint(W.x-V,W.y-A));l.push(new mxPoint(W.x+V,W.y+A));if(null!=U)return U.points=l,U;T=new mxPolyline(l,mxConstants.GUIDE_COLOR, +mxConstants.GUIDE_STROKEWIDTH);T.dialect=mxConstants.DIALECT_SVG;T.pointerEvents=!1;T.init(g.graph.getView().getOverlayPane());return T};F=function(T,W){if(T&&null!=g.guidesArrHor)for(T=0;T<g.guidesArrHor.length;T++)g.guidesArrHor[T].node.style.visibility="hidden";if(W&&null!=g.guidesArrVer)for(T=0;T<g.guidesArrVer.length;T++)g.guidesArrVer[T].node.style.visibility="hidden"};if(1<p&&p==C.length-1){p=[];D=g.guidesArrHor;c=[];L=0;x=C[0]==q?1:0;J=C[x].y+C[x].height;if(0<K)for(x=0;x<C.length-1;x++)m= +C[x],G=C[x+1],q==m?(L=G.x-m.width-K,c.push(new mxPoint(L+m.width+H,J)),c.push(new mxPoint(G.x-H,J))):q==G?(c.push(new mxPoint(m.x+m.width+H,J)),L=m.x+m.width+K,c.push(new mxPoint(L-H,J))):(c.push(new mxPoint(m.x+m.width+H,J)),c.push(new mxPoint(G.x-H,J)));else m=C[0],x=C[2],L=m.x+m.width+(x.x-m.x-m.width-q.width)/2,c.push(new mxPoint(m.x+m.width+H,J)),c.push(new mxPoint(L-H,J)),c.push(new mxPoint(L+q.width+H,J)),c.push(new mxPoint(x.x-H,J));for(x=0;x<c.length;x+=2)C=c[x],K=c[x+1],C=n(C,K,null!=D? +D[x/2]:null),C.node.style.visibility="visible",C.redraw(),p.push(C);for(x=c.length/2;null!=D&&x<D.length;x++)D[x].destroy();g.guidesArrHor=p;L-=e.x;c=!0}else F(!0);if(1<I&&I==z.length-1){p=[];D=g.guidesArrVer;d=[];E=0;x=z[0]==q?1:0;I=z[x].x+z[x].width;if(0<y)for(x=0;x<z.length-1;x++)m=z[x],G=z[x+1],q==m?(E=G.y-m.height-y,d.push(new mxPoint(I,E+m.height+H)),d.push(new mxPoint(I,G.y-H))):q==G?(d.push(new mxPoint(I,m.y+m.height+H)),E=m.y+m.height+y,d.push(new mxPoint(I,E-H))):(d.push(new mxPoint(I,m.y+ +m.height+H)),d.push(new mxPoint(I,G.y-H)));else m=z[0],x=z[2],E=m.y+m.height+(x.y-m.y-m.height-q.height)/2,d.push(new mxPoint(I,m.y+m.height+H)),d.push(new mxPoint(I,E-H)),d.push(new mxPoint(I,E+q.height+H)),d.push(new mxPoint(I,x.y-H));for(x=0;x<d.length;x+=2)C=d[x],K=d[x+1],C=n(C,K,null!=D?D[x/2]:null,!0),C.node.style.visibility="visible",C.redraw(),p.push(C);for(x=d.length/2;null!=D&&x<D.length;x++)D[x].destroy();g.guidesArrVer=p;E-=e.y;d=!0}else F(!1,!0)}if(c||d)return q=new mxPoint(L,E),z=b.call(this, +e,q,v,B),c&&!d?q.y=z.y:d&&!c&&(q.x=z.x),z.y!=q.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),z.x!=q.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),q;F(!0,!0);return b.apply(this,arguments)};var f=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(e){f.call(this,e);var u=this.guidesArrVer,v=this.guidesArrHor;if(null!=u)for(var B=0;B<u.length;B++)u[B].node.style.visibility=e?"visible":"hidden";if(null!= +v)for(B=0;B<v.length;B++)v[B].node.style.visibility=e?"visible":"hidden"};var k=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){k.call(this);var e=this.guidesArrVer,u=this.guidesArrHor;if(null!=e){for(var v=0;v<e.length;v++)e[v].destroy();this.guidesArrVer=null}if(null!=u){for(v=0;v<u.length;v++)u[v].destroy();this.guidesArrHor=null}}})();function mxRuler(b,f,k,e){function u(){var I=b.diagramContainer;g.style.top=I.offsetTop-L+"px";g.style.left=I.offsetLeft-L+"px";g.style.width=(k?0:I.offsetWidth)+L+"px";g.style.height=(k?I.offsetHeight:0)+L+"px"}function v(I,N,t){if(null!=B)return I;var p;return function(){var F=this,K=arguments,D=t&&!p;clearTimeout(p);p=setTimeout(function(){p=null;t||I.apply(F,K)},N);D&&I.apply(F,K)}}var B=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame, +E=window.cancelAnimationFrame||window.mozCancelAnimationFrame,L=this.RULER_THICKNESS,c=this;this.unit=f;var d=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},g=document.createElement("div");g.style.position="absolute";this.updateStyle=mxUtils.bind(this,function(){d=Editor.isDarkMode()? +{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};g.style.background=d.bkgClr;g.style[k?"borderRight":"borderBottom"]="0.5px solid "+d.strokeClr;g.style.borderLeft="0.5px solid "+d.strokeClr});this.updateStyle();document.body.appendChild(g);mxEvent.disableContextMenu(g);this.editorUiRefresh=b.refresh;b.refresh= function(I){c.editorUiRefresh.apply(b,arguments);u()};u();var q=document.createElement("canvas");q.width=g.offsetWidth;q.height=g.offsetHeight;g.style.overflow="hidden";q.style.position="relative";g.appendChild(q);var m=q.getContext("2d");this.ui=b;var n=b.editor.graph;this.graph=n;this.container=g;this.canvas=q;var z=function(I,N,t,p,F){I=Math.round(I);N=Math.round(N);t=Math.round(t);p=Math.round(p);m.beginPath();m.moveTo(I+.5,N+.5);m.lineTo(t+.5,p+.5);m.stroke();F&&(k?(m.save(),m.translate(I,N), -m.rotate(-Math.PI/2),m.fillText(F,0,0),m.restore()):m.fillText(F,I,N))},C=function(){m.clearRect(0,0,q.width,q.height);m.beginPath();m.lineWidth=.7;m.strokeStyle=e.strokeClr;m.setLineDash([]);m.font="9px Arial";m.textAlign="center";var I=n.view.scale,N=n.view.getBackgroundPageBounds(),t=n.view.translate,p=n.pageVisible;t=p?K+(k?N.y-n.container.scrollTop:N.x-n.container.scrollLeft):K+(k?t.y*I-n.container.scrollTop:t.x*I-n.container.scrollLeft);var F=0;p&&(F=n.getPageLayout(),F=k?F.y*n.pageFormat.height: -F.x*n.pageFormat.width);var J;switch(c.unit){case mxConstants.POINTS:var M=J=10;var H=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:J=10;M=mxConstants.PIXELS_PER_MM;H=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:J=20;M=mxConstants.PIXELS_PER_MM;H=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:J=.5>=I||4<=I?8:16,M=mxConstants.PIXELS_PER_INCH/J,H=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var G=M;2<=I?G=M/(2*Math.floor(I/2)):.5>=I&&(G=M*Math.floor(1/I/2)*(c.unit== -mxConstants.MILLIMETERS?2:1));M=null;N=p?Math.min(t+(k?N.height:N.width),k?q.height:q.width):k?q.height:q.width;if(p)if(m.fillStyle=e.outBkgClr,k){var E=t-K;0<E&&m.fillRect(0,K,K,E);N<q.height&&m.fillRect(0,N,K,q.height)}else E=t-K,0<E&&m.fillRect(K,0,E,K),N<q.width&&m.fillRect(N,0,q.width,K);m.fillStyle=e.fontClr;for(p=p?t:t%(G*I);p<=N;p+=G*I)if(E=Math.round((p-t)/I/G),!(p<K||E==M)){M=E;var P=null;0==E%J&&(P=c.formatText(F+E*G)+"");k?z(K-H[Math.abs(E)%J],p,K,p,P):z(p,K-H[Math.abs(E)%J],p,K,P)}m.lineWidth= -1;z(k?0:K,k?K:0,K,K);m.fillStyle=e.cornerClr;m.fillRect(0,0,K,K)},v=-1,y=function(){null!=B?(null!=D&&D(v),v=B(C)):C()};this.drawRuler=y;this.sizeListener=f=x(function(){var I=n.container;k?(I=I.offsetHeight+K,q.height!=I&&(q.height=I,g.style.height=I+"px",y())):(I=I.offsetWidth+K,q.width!=I&&(q.width=I,g.style.width=I+"px",y()))},10);this.pageListener=function(){y()};this.scrollListener=d=x(function(){var I=k?n.container.scrollTop:n.container.scrollLeft;c.lastScroll!=I&&(c.lastScroll=I,y())},10); -this.unitListener=function(I,N){c.setUnit(N.getProperty("unit"))};n.addListener(mxEvent.SIZE,f);n.container.addEventListener("scroll",d);n.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(I){e=I;g.style.background=e.bkgClr;C()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(I,N,t,p){if(k&&4<I.height|| -!k&&4<I.width){if(null!=c.guidePart)try{m.putImageData(c.guidePart.imgData1,c.guidePart.x1,c.guidePart.y1),m.putImageData(c.guidePart.imgData2,c.guidePart.x2,c.guidePart.y2),m.putImageData(c.guidePart.imgData3,c.guidePart.x3,c.guidePart.y3)}catch(V){}var F=c.origGuideMove.apply(this,arguments);try{m.lineWidth=.5;m.strokeStyle=e.guideClr;m.setLineDash([2]);if(k){var J=I.y+F.y+K-this.graph.container.scrollTop;var M=0;var H=J+I.height/2;var G=K/2;var E=J+I.height;var P=0;var T=m.getImageData(M,J-1,K, -3);z(M,J,K,J);J--;var W=m.getImageData(G,H-1,K,3);z(G,H,K,H);H--;var U=m.getImageData(P,E-1,K,3);z(P,E,K,E);E--}else J=0,M=I.x+F.x+K-this.graph.container.scrollLeft,H=K/2,G=M+I.width/2,E=0,P=M+I.width,T=m.getImageData(M-1,J,3,K),z(M,J,M,K),M--,W=m.getImageData(G-1,H,3,K),z(G,H,G,K),G--,U=m.getImageData(P-1,E,3,K),z(P,E,P,K),P--;if(null==c.guidePart||c.guidePart.x1!=M||c.guidePart.y1!=J)c.guidePart={imgData1:T,x1:M,y1:J,imgData2:W,x2:G,y2:H,imgData3:U,x3:P,y3:E}}catch(V){}}else F=c.origGuideMove.apply(this, +m.rotate(-Math.PI/2),m.fillText(F,0,0),m.restore()):m.fillText(F,I,N))},C=function(){m.clearRect(0,0,q.width,q.height);m.beginPath();m.lineWidth=.7;m.strokeStyle=d.strokeClr;m.setLineDash([]);m.font="9px Arial";m.textAlign="center";var I=n.view.scale,N=n.view.getBackgroundPageBounds(),t=n.view.translate,p=n.pageVisible;t=p?L+(k?N.y-n.container.scrollTop:N.x-n.container.scrollLeft):L+(k?t.y*I-n.container.scrollTop:t.x*I-n.container.scrollLeft);var F=0;p&&(F=n.getPageLayout(),F=k?F.y*n.pageFormat.height: +F.x*n.pageFormat.width);var K;switch(c.unit){case mxConstants.POINTS:var D=K=10;var H=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:K=10;D=mxConstants.PIXELS_PER_MM;H=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:K=20;D=mxConstants.PIXELS_PER_MM;H=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:K=.5>=I||4<=I?8:16,D=mxConstants.PIXELS_PER_INCH/K,H=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var J=D;2<=I?J=D/(2*Math.floor(I/2)):.5>=I&&(J=D*Math.floor(1/I/2)*(c.unit== +mxConstants.MILLIMETERS?2:1));D=null;N=p?Math.min(t+(k?N.height:N.width),k?q.height:q.width):k?q.height:q.width;if(p)if(m.fillStyle=d.outBkgClr,k){var G=t-L;0<G&&m.fillRect(0,L,L,G);N<q.height&&m.fillRect(0,N,L,q.height)}else G=t-L,0<G&&m.fillRect(L,0,G,L),N<q.width&&m.fillRect(N,0,q.width,L);m.fillStyle=d.fontClr;for(p=p?t:t%(J*I);p<=N;p+=J*I)if(G=Math.round((p-t)/I/J),!(p<L||G==D)){D=G;var P=null;0==G%K&&(P=c.formatText(F+G*J)+"");k?z(L-H[Math.abs(G)%K],p,L,p,P):z(p,L-H[Math.abs(G)%K],p,L,P)}m.lineWidth= +1;z(k?0:L,k?L:0,L,L);m.fillStyle=d.cornerClr;m.fillRect(0,0,L,L)},x=-1,y=function(){null!=B?(null!=E&&E(x),x=B(C)):C()};this.drawRuler=y;this.sizeListener=f=v(function(){var I=n.container;k?(I=I.offsetHeight+L,q.height!=I&&(q.height=I,g.style.height=I+"px",y())):(I=I.offsetWidth+L,q.width!=I&&(q.width=I,g.style.width=I+"px",y()))},10);this.pageListener=function(){y()};this.scrollListener=e=v(function(){var I=k?n.container.scrollTop:n.container.scrollLeft;c.lastScroll!=I&&(c.lastScroll=I,y())},10); +this.unitListener=function(I,N){c.setUnit(N.getProperty("unit"))};n.addListener(mxEvent.SIZE,f);n.container.addEventListener("scroll",e);n.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(I){d=I;g.style.background=d.bkgClr;C()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(I,N,t,p){if(k&&4<I.height|| +!k&&4<I.width){if(null!=c.guidePart)try{m.putImageData(c.guidePart.imgData1,c.guidePart.x1,c.guidePart.y1),m.putImageData(c.guidePart.imgData2,c.guidePart.x2,c.guidePart.y2),m.putImageData(c.guidePart.imgData3,c.guidePart.x3,c.guidePart.y3)}catch(V){}var F=c.origGuideMove.apply(this,arguments);try{m.lineWidth=.5;m.strokeStyle=d.guideClr;m.setLineDash([2]);if(k){var K=I.y+F.y+L-this.graph.container.scrollTop;var D=0;var H=K+I.height/2;var J=L/2;var G=K+I.height;var P=0;var T=m.getImageData(D,K-1,L, +3);z(D,K,L,K);K--;var W=m.getImageData(J,H-1,L,3);z(J,H,L,H);H--;var U=m.getImageData(P,G-1,L,3);z(P,G,L,G);G--}else K=0,D=I.x+F.x+L-this.graph.container.scrollLeft,H=L/2,J=D+I.width/2,G=0,P=D+I.width,T=m.getImageData(D-1,K,3,L),z(D,K,D,L),D--,W=m.getImageData(J-1,H,3,L),z(J,H,J,L),J--,U=m.getImageData(P-1,G,3,L),z(P,G,P,L),P--;if(null==c.guidePart||c.guidePart.x1!=D||c.guidePart.y1!=K)c.guidePart={imgData1:T,x1:D,y1:K,imgData2:W,x2:J,y2:H,imgData3:U,x3:P,y3:G}}catch(V){}}else F=c.origGuideMove.apply(this, arguments);return F};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var I=c.origGuideDestroy.apply(this,arguments);if(null!=c.guidePart)try{m.putImageData(c.guidePart.imgData1,c.guidePart.x1,c.guidePart.y1),m.putImageData(c.guidePart.imgData2,c.guidePart.x2,c.guidePart.y2),m.putImageData(c.guidePart.imgData3,c.guidePart.x3,c.guidePart.y3),c.guidePart=null}catch(N){}return I}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS; mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};mxRuler.prototype.formatText=function(b){switch(this.unit){case mxConstants.POINTS:return Math.round(b);case mxConstants.MILLIMETERS:return(b/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(b/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(b/mxConstants.PIXELS_PER_INCH).toFixed(2)}}; mxRuler.prototype.destroy=function(){this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.graph.removeListener(this.sizeListener);this.graph.container.removeEventListener("scroll",this.scrollListener);this.graph.view.removeListener("unitChanged",this.unitListener);this.ui.removeListener("pageViewChanged",this.pageListener);this.ui.removeListener("pageScaleChanged",this.pageListener);this.ui.removeListener("pageFormatChanged", this.pageListener);null!=this.container&&this.container.parentNode.removeChild(this.container)}; -function mxDualRuler(b,f){var k=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return k};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,f,!0);this.hRuler=new mxRuler(b,f,!1,!0);f=mxUtils.bind(this,function(d){var u=!1;mxEvent.addGestureListeners(d,mxUtils.bind(this, -function(x){u=null!=b.currentMenu;mxEvent.consume(x)}),null,mxUtils.bind(this,function(x){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(x)||mxEvent.isPopupTrigger(x))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(x)||!u){var B=new mxPopupMenu(mxUtils.bind(this,function(c,e){b.menus.addMenuItems(c,["points","inches","millimeters","meters"],e)}));B.div.className+=" geMenubarMenu";B.smartSeparators=!0;B.showDisabled=!0;B.autoExpand= -!0;B.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(B,arguments);b.resetCurrentMenu();B.destroy()});var D=mxEvent.getClientX(x),K=mxEvent.getClientY(x);B.popup(D,K,null,x);b.setCurrentMenu(B,d)}mxEvent.consume(x)}}))});f(this.hRuler.container);f(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()}; -mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var f=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=f){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var k=mxFreehand.prototype.NORMAL_SMOOTHING,d=null,u=[],x,B=[],D,K=!1,c=!0,e=!0,g=!0,q=!0,m=[],n=!1,z=!0,C=!1,v={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},y=!0;this.setClosedPath=function(H){K=H};this.setAutoClose=function(H){c=H};this.setAutoInsert= -function(H){e=H};this.setAutoScroll=function(H){g=H};this.setOpenFill=function(H){q=H};this.setStopClickEnabled=function(H){z=H};this.setSelectInserted=function(H){C=H};this.setSmoothing=function(H){k=H};this.setPerfectFreehandMode=function(H){y=H};this.isPerfectFreehandMode=function(){return y};this.setBrushSize=function(H){v.size=H};this.getBrushSize=function(){return v.size};var I=function(H){n=H;b.getRubberband().setEnabled(!H);b.graphHandler.setSelectEnabled(!H);b.graphHandler.setMoveEnabled(!H); -b.container.style.cursor=H?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){I(!0)};this.isDrawing=function(){return n};var N=mxUtils.bind(this,function(H){if(d){var G=D.length,E=z&&0<B.length&&null!=D&&2>D.length;E||B.push.apply(B,D);D=[];B.push(null);u.push(d);d=null;(E||e)&&this.stopDrawing();e&&2<=G&&this.startDrawing();mxEvent.consume(H)}}),t=new mxCell;t.edge=!0;var p=function(){var H=b.getCurrentCellStyle(t);H=mxUtils.getValue(b.currentVertexStyle, -mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(H,mxConstants.STYLE_STROKECOLOR,"#000"));"default"==H&&(H=b.shapeForegroundColor);return H};this.createStyle=function(H){var G=";fillColor=none;";y&&(G=";lineShape=1;");return mxConstants.STYLE_SHAPE+"="+H+G};this.stopDrawing=function(){if(0<u.length){if(y){for(var H=[],G=0;G<B.length;G++)null!=B[G]&&H.push([B[G].x,B[G].y]);H=PerfectFreehand.getStroke(H,v);B=[];for(G=0;G<H.length;G++)B.push({x:H[G][0],y:H[G][1]});B.push(null)}H=B[0].x;var E=B[0].x,P= -B[0].y,T=B[0].y;for(G=1;G<B.length;G++)null!=B[G]&&(H=Math.max(H,B[G].x),E=Math.min(E,B[G].x),P=Math.max(P,B[G].y),T=Math.min(T,B[G].y));H-=E;P-=T;if(0<H&&0<P){var W=100/H,U=100/P;B.map(function(Q){if(null==Q)return Q;Q.x=(Q.x-E)*W;Q.y=(Q.y-T)*U;return Q});var V='<shape strokewidth="inherit"><foreground>',l=0;for(G=0;G<B.length;G++){var A=B[G];if(null==A){A=!1;l=B[l];var L=B[G-1];!K&&c&&(A=l.x-L.x,L=l.y-L.y,A=Math.sqrt(A*A+L*L)<=b.tolerance);if(K||A)V+='<line x="'+l.x.toFixed(2)+'" y="'+l.y.toFixed(2)+ -'"/>';V+="</path>"+(q||K||A?"<fillstroke/>":"<stroke/>");l=G+1}else V=G==l?V+('<path><move x="'+A.x.toFixed(2)+'" y="'+A.y.toFixed(2)+'"/>'):V+('<line x="'+A.x.toFixed(2)+'" y="'+A.y.toFixed(2)+'"/>')}V+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){G=this.createStyle("stencil("+Graph.compress(V)+")");V=b.view.scale;l=b.view.translate;G=new mxCell("",new mxGeometry(E/V-l.x,T/V-l.y,H/V,P/V),G);G.vertex=1;b.model.beginUpdate();try{G=b.addCell(G),b.fireEvent(new mxEventObject("cellsInserted", -"cells",[G])),b.fireEvent(new mxEventObject("freehandInserted","cell",G))}finally{b.model.endUpdate()}C&&b.setSelectionCells([G])}}for(G=0;G<u.length;G++)u[G].parentNode.removeChild(u[G]);d=null;u=[];B=[]}I(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(H,G){H=G.getProperty("eventName");G=G.getProperty("event");H==mxEvent.MOUSE_MOVE&&n&&(null!=G.sourceState&&G.sourceState.setCursor("crosshair"),G.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(H,G){if(b.isEnabled()&& -!b.isCellLocked(b.getDefaultParent())&&(H=G.getEvent(),n&&!mxEvent.isPopupTrigger(H)&&!mxEvent.isMultiTouchEvent(H))){var E=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);E=Math.max(1,E*b.view.scale);var P=p();d=document.createElementNS("http://www.w3.org/2000/svg","path");d.setAttribute("fill",y?P:"none");d.setAttribute("stroke",P);d.setAttribute("stroke-width",E);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(P=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3", -P=P.split(" ").map(function(T){return parseFloat(T)*E}).join(" "),d.setAttribute("stroke-dasharray",P));m=[];H=F(H);J(H);x="M"+H.x+" "+H.y;B.push(H);D=[];d.setAttribute("d",y?PerfectFreehand.getSvgPathFromStroke([[H.x,H.y]],v):x);f.appendChild(d);G.consume()}}),mouseMove:mxUtils.bind(this,function(H,G){if(d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){H=G.getEvent();H=F(H);J(H);var E=M(0);if(E)if(B.push(E),y){var P=[];for(E=0;E<B.length;E++)P.push([B[E].x,B[E].y]);D=[];for(var T=2;T<m.length;T+= -2)E=M(T),P.push([E.x,E.y]),D.push(E);d.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(P,v))}else{x+=" L"+E.x+" "+E.y;P="";D=[];for(T=2;T<m.length;T+=2)E=M(T),P+=" L"+E.x+" "+E.y,D.push(E);d.setAttribute("d",x+P)}g&&(E=b.view.translate,b.scrollRectToVisible((new mxRectangle(H.x-E.x,H.y-E.y)).grow(20)));G.consume()}}),mouseUp:mxUtils.bind(this,function(H,G){d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(N(G.getEvent()),G.consume())})});var F=function(H){return mxUtils.convertPoint(b.container, -mxEvent.getClientX(H),mxEvent.getClientY(H))},J=function(H){for(m.push(H);m.length>k;)m.shift()},M=function(H){var G=m.length;if(1===G%2||G>=k){var E=0,P=0,T,W=0;for(T=H;T<G;T++)W++,H=m[T],E+=H.x,P+=H.y;return{x:E/W,y:P/W}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;DrawioUser=function(b,f,k,d,u){this.id=b;this.email=f;this.displayName=k;this.pictureUrl=d;this.locale=u};DrawioComment=function(b,f,k,d,u,x,B){this.file=b;this.id=f;this.content=k;this.modifiedDate=d;this.createdDate=u;this.isResolved=x;this.user=B;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,f,k,d,u){f()};DrawioComment.prototype.editComment=function(b,f,k){f()};DrawioComment.prototype.deleteComment=function(b,f){b()};Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement; +function mxDualRuler(b,f){var k=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return k};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,f,!0);this.hRuler=new mxRuler(b,f,!1,!0);f=mxUtils.bind(this,function(e){var u=!1;mxEvent.addGestureListeners(e,mxUtils.bind(this, +function(v){u=null!=b.currentMenu;mxEvent.consume(v)}),null,mxUtils.bind(this,function(v){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(v)||mxEvent.isPopupTrigger(v))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(v)||!u){var B=new mxPopupMenu(mxUtils.bind(this,function(c,d){b.menus.addMenuItems(c,["points","inches","millimeters","meters"],d)}));B.div.className+=" geMenubarMenu";B.smartSeparators=!0;B.showDisabled=!0;B.autoExpand= +!0;B.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(B,arguments);b.resetCurrentMenu();B.destroy()});var E=mxEvent.getClientX(v),L=mxEvent.getClientY(v);B.popup(E,L,null,v);b.setCurrentMenu(B,e)}mxEvent.consume(v)}}))});f(this.hRuler.container);f(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()}; +mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var f=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=f){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var k=mxFreehand.prototype.NORMAL_SMOOTHING,e=null,u=[],v,B=[],E,L=!1,c=!0,d=!0,g=!0,q=!0,m=[],n=!1,z=!0,C=!1,x={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},y=!0;this.setClosedPath=function(H){L=H};this.setAutoClose=function(H){c=H};this.setAutoInsert= +function(H){d=H};this.setAutoScroll=function(H){g=H};this.setOpenFill=function(H){q=H};this.setStopClickEnabled=function(H){z=H};this.setSelectInserted=function(H){C=H};this.setSmoothing=function(H){k=H};this.setPerfectFreehandMode=function(H){y=H};this.isPerfectFreehandMode=function(){return y};this.setBrushSize=function(H){x.size=H};this.getBrushSize=function(){return x.size};var I=function(H){n=H;b.getRubberband().setEnabled(!H);b.graphHandler.setSelectEnabled(!H);b.graphHandler.setMoveEnabled(!H); +b.container.style.cursor=H?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){I(!0)};this.isDrawing=function(){return n};var N=mxUtils.bind(this,function(H){if(e){var J=E.length,G=z&&0<B.length&&null!=E&&2>E.length;G||B.push.apply(B,E);E=[];B.push(null);u.push(e);e=null;(G||d)&&this.stopDrawing();d&&2<=J&&this.startDrawing();mxEvent.consume(H)}}),t=new mxCell;t.edge=!0;var p=function(){var H=b.getCurrentCellStyle(t);H=mxUtils.getValue(b.currentVertexStyle, +mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(H,mxConstants.STYLE_STROKECOLOR,"#000"));"default"==H&&(H=b.shapeForegroundColor);return H};this.createStyle=function(H){var J=";fillColor=none;";y&&(J=";lineShape=1;");return mxConstants.STYLE_SHAPE+"="+H+J};this.stopDrawing=function(){if(0<u.length){if(y){for(var H=[],J=0;J<B.length;J++)null!=B[J]&&H.push([B[J].x,B[J].y]);H=PerfectFreehand.getStroke(H,x);B=[];for(J=0;J<H.length;J++)B.push({x:H[J][0],y:H[J][1]});B.push(null)}H=B[0].x;var G=B[0].x,P= +B[0].y,T=B[0].y;for(J=1;J<B.length;J++)null!=B[J]&&(H=Math.max(H,B[J].x),G=Math.min(G,B[J].x),P=Math.max(P,B[J].y),T=Math.min(T,B[J].y));H-=G;P-=T;if(0<H&&0<P){var W=100/H,U=100/P;B.map(function(Q){if(null==Q)return Q;Q.x=(Q.x-G)*W;Q.y=(Q.y-T)*U;return Q});var V='<shape strokewidth="inherit"><foreground>',l=0;for(J=0;J<B.length;J++){var A=B[J];if(null==A){A=!1;l=B[l];var M=B[J-1];!L&&c&&(A=l.x-M.x,M=l.y-M.y,A=Math.sqrt(A*A+M*M)<=b.tolerance);if(L||A)V+='<line x="'+l.x.toFixed(2)+'" y="'+l.y.toFixed(2)+ +'"/>';V+="</path>"+(q||L||A?"<fillstroke/>":"<stroke/>");l=J+1}else V=J==l?V+('<path><move x="'+A.x.toFixed(2)+'" y="'+A.y.toFixed(2)+'"/>'):V+('<line x="'+A.x.toFixed(2)+'" y="'+A.y.toFixed(2)+'"/>')}V+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){J=this.createStyle("stencil("+Graph.compress(V)+")");V=b.view.scale;l=b.view.translate;J=new mxCell("",new mxGeometry(G/V-l.x,T/V-l.y,H/V,P/V),J);J.vertex=1;b.model.beginUpdate();try{J=b.addCell(J),b.fireEvent(new mxEventObject("cellsInserted", +"cells",[J])),b.fireEvent(new mxEventObject("freehandInserted","cell",J))}finally{b.model.endUpdate()}C&&b.setSelectionCells([J])}}for(J=0;J<u.length;J++)u[J].parentNode.removeChild(u[J]);e=null;u=[];B=[]}I(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(H,J){H=J.getProperty("eventName");J=J.getProperty("event");H==mxEvent.MOUSE_MOVE&&n&&(null!=J.sourceState&&J.sourceState.setCursor("crosshair"),J.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(H,J){if(b.isEnabled()&& +!b.isCellLocked(b.getDefaultParent())&&(H=J.getEvent(),n&&!mxEvent.isPopupTrigger(H)&&!mxEvent.isMultiTouchEvent(H))){var G=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);G=Math.max(1,G*b.view.scale);var P=p();e=document.createElementNS("http://www.w3.org/2000/svg","path");e.setAttribute("fill",y?P:"none");e.setAttribute("stroke",P);e.setAttribute("stroke-width",G);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(P=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3", +P=P.split(" ").map(function(T){return parseFloat(T)*G}).join(" "),e.setAttribute("stroke-dasharray",P));m=[];H=F(H);K(H);v="M"+H.x+" "+H.y;B.push(H);E=[];e.setAttribute("d",y?PerfectFreehand.getSvgPathFromStroke([[H.x,H.y]],x):v);f.appendChild(e);J.consume()}}),mouseMove:mxUtils.bind(this,function(H,J){if(e&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){H=J.getEvent();H=F(H);K(H);var G=D(0);if(G)if(B.push(G),y){var P=[];for(G=0;G<B.length;G++)P.push([B[G].x,B[G].y]);E=[];for(var T=2;T<m.length;T+= +2)G=D(T),P.push([G.x,G.y]),E.push(G);e.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(P,x))}else{v+=" L"+G.x+" "+G.y;P="";E=[];for(T=2;T<m.length;T+=2)G=D(T),P+=" L"+G.x+" "+G.y,E.push(G);e.setAttribute("d",v+P)}g&&(G=b.view.translate,b.scrollRectToVisible((new mxRectangle(H.x-G.x,H.y-G.y)).grow(20)));J.consume()}}),mouseUp:mxUtils.bind(this,function(H,J){e&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(N(J.getEvent()),J.consume())})});var F=function(H){return mxUtils.convertPoint(b.container, +mxEvent.getClientX(H),mxEvent.getClientY(H))},K=function(H){for(m.push(H);m.length>k;)m.shift()},D=function(H){var J=m.length;if(1===J%2||J>=k){var G=0,P=0,T,W=0;for(T=H;T<J;T++)W++,H=m[T],G+=H.x,P+=H.y;return{x:G/W,y:P/W}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;DrawioUser=function(b,f,k,e,u){this.id=b;this.email=f;this.displayName=k;this.pictureUrl=e;this.locale=u};DrawioComment=function(b,f,k,e,u,v,B){this.file=b;this.id=f;this.content=k;this.modifiedDate=e;this.createdDate=u;this.isResolved=v;this.user=B;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,f,k,e,u){f()};DrawioComment.prototype.editComment=function(b,f,k){f()};DrawioComment.prototype.deleteComment=function(b,f){b()};Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement; Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"]; LucidImporter={}; (function(){function h(u){if(u&&null!=LucidImporter.imgSrcRepl){var E=LucidImporter.imgSrcRepl.attMap;if(E[u])u=E[u];else{E=LucidImporter.imgSrcRepl.imgRepl;for(var F=0;F<E.length;F++){var t=E[F];u=u.replace(t.searchVal,t.replVal)}LucidImporter.hasExtImgs=!0}}return u}function y(u){lb="";try{if(u){var E=null;LucidImporter.advImpConfig&&LucidImporter.advImpConfig.fontMapping&&(E=LucidImporter.advImpConfig.fontMapping[u]);if(E){for(var F in E)lb+=F+"="+E[F]+";";return E.fontFamily?"font-family: "+E.fontFamily: diff --git a/src/main/webapp/js/viewer-static.min.js b/src/main/webapp/js/viewer-static.min.js index 22d35cb9..236fe501 100644 --- a/src/main/webapp/js/viewer-static.min.js +++ b/src/main/webapp/js/viewer-static.min.js @@ -96,7 +96,7 @@ window.EXPORT_URL=window.EXPORT_URL||"https://convert.diagrams.net/node/export"; window.REALTIME_URL=window.REALTIME_URL||("test.draw.io"==window.location.hostname&&"local"!=urlParams.cache?"https://app.diagrams.net/cache":"cache");window.DRAWIO_GITLAB_URL=window.DRAWIO_GITLAB_URL||"https://gitlab.com";window.DRAWIO_GITLAB_ID=window.DRAWIO_GITLAB_ID||"2b14debc5feeb18ba65358d863ec870e4cc9294b28c3c941cb3014eb4af9a9b4";window.DRAWIO_GITHUB_URL=window.DRAWIO_GITHUB_URL||"https://github.com";window.DRAWIO_GITHUB_API_URL=window.DRAWIO_GITHUB_API_URL||"https://api.github.com"; window.DRAWIO_GITHUB_ID=window.DRAWIO_GITHUB_ID||"Iv1.98d62f0431e40543";window.DRAWIO_DROPBOX_ID=window.DRAWIO_DROPBOX_ID||"jg02tc0onwmhlgm";window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"import";window.PROXY_URL=window.PROXY_URL||"proxy";window.DRAWIO_VIEWER_URL=window.DRAWIO_VIEWER_URL||null;window.NOTIFICATIONS_URL=window.NOTIFICATIONS_URL||"https://www.draw.io/notifications"; window.RT_WEBSOCKET_URL=window.RT_WEBSOCKET_URL||"wss://"+("test.draw.io"==window.location.hostname?"app.diagrams.net":window.location.hostname)+"/rt";window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||((null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":window.DRAWIO_BASE_URL+"/iconSearch"); -window.TEMPLATE_PATH=window.TEMPLATE_PATH||"templates";window.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"newDiagramCats";window.PLUGINS_BASE_PATH=window.PLUGINS_BASE_PATH||"";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_CONFIG=window.DRAWIO_CONFIG||null;window.mxLoadResources=window.mxLoadResources||!1; +window.TEMPLATE_PATH=window.TEMPLATE_PATH||"templates";window.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"newDiagramCats";window.PLUGINS_BASE_PATH=window.PLUGINS_BASE_PATH||"";window.ALLOW_CUSTOM_PLUGINS=window.ALLOW_CUSTOM_PLUGINS||!1;window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_CONFIG=window.DRAWIO_CONFIG||null;window.mxLoadResources=window.mxLoadResources||!1; window.mxLanguage=window.mxLanguage||function(){var a=urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null);if(!a&&window.mxIsElectron&&(a=urlParams.appLang,null!=a)){var c=a.indexOf("-");0<=c&&(a=a.substring(0,c));a=a.toLowerCase()}}catch(d){isLocalStorage=!1}return a}(); window.mxLanguageMap=window.mxLanguageMap||{i18n:"",id:"Bahasa Indonesia",ms:"Bahasa Melayu",bs:"Bosanski",bg:"Bulgarian",ca:"Català",cs:"Čeština",da:"Dansk",de:"Deutsch",et:"Eesti",en:"English",es:"Español",eu:"Euskara",fil:"Filipino",fr:"Français",gl:"Galego",it:"Italiano",hu:"Magyar",lt:"Lietuvių",lv:"Latviešu",nl:"Nederlands",no:"Norsk",pl:"Polski","pt-br":"Português (Brasil)",pt:"Português (Portugal)",ro:"Română",fi:"Suomi",sv:"Svenska",vi:"Tiếng Việt",tr:"Türkçe",el:"Ελληνικά",ru:"Русский", sr:"Српски",uk:"Українська",he:"עברית",ar:"العربية",fa:"فارسی",th:"ไทย",ko:"한국어",ja:"日本語",zh:"简体中文","zh-tw":"繁體中文"};"undefined"===typeof window.mxBasePath&&(window.mxBasePath="mxgraph",window.mxImageBasePath="mxgraph/images"); @@ -111,7 +111,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url "se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1"); "embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources"; window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang; -window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.2.8",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"), +window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.3.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"), IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor), IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&& 0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!== @@ -1954,7 +1954,7 @@ function(y,F){return(y=y.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i))?(6===y[1 color:x.style.color});switch(t){case 0:mxJSColor.requireImage("hs.png");break;case 1:mxJSColor.requireImage("hv.png")}this.importColor()}};mxJSColor.install(); var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(b){return b.raw=b};$jscomp.createTemplateTagFirstArgWithRaw=function(b,e){b.raw=e;return b};$jscomp.arrayIteratorImpl=function(b){var e=0;return function(){return e<b.length?{done:!1,value:b[e++]}:{done:!0}}};$jscomp.arrayIterator=function(b){return{next:$jscomp.arrayIteratorImpl(b)}};$jscomp.makeIterator=function(b){var e="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];return e?e.call(b):$jscomp.arrayIterator(b)}; Editor=function(b,e,k,m,C){mxEventSource.call(this);this.chromeless=null!=b?b:this.chromeless;this.initStencilRegistry();this.graph=m||this.createGraph(e,k);this.editable=null!=C?C:!b;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(p){this.status=p;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus= -function(){return this.status};this.graphChangeListener=function(p,E){p=null!=E?E.getProperty("edit"):null;null!=p&&p.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0; +function(){return this.status};this.graphChangeListener=function(p,F){p=null!=F?F.getProperty("edit"):null;null!=p&&p.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0; (function(){try{for(var b=window;null!=b.opener&&"undefined"!==typeof b.opener.Editor&&!isNaN(b.opener.Editor.pageCounter)&&b.opener!=b;)b=b.opener;null!=b&&(b.Editor.pageCounter++,Editor.pageCounter=b.Editor.pageCounter)}catch(e){}})();Editor.defaultHtmlFont='-apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", system-ui, ui-sans-serif, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"';Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS; Editor.rowMoveImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=";Editor.lightCheckmarkImage="data:image/gif;base64,R0lGODlhFQAVAMQfAGxsbHx8fIqKioaGhvb29nJycvr6+sDAwJqamltbW5OTk+np6YGBgeTk5Ly8vJiYmP39/fLy8qWlpa6ursjIyOLi4vj4+N/f3+3t7fT09LCwsHZ2dubm5r6+vmZmZv///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OEY4NTZERTQ5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OEY4NTZERTU5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Rjg1NkRFMjlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Rjg1NkRFMzlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAB8ALAAAAAAVABUAAAVI4CeOZGmeaKqubKtylktSgCOLRyLd3+QJEJnh4VHcMoOfYQXQLBcBD4PA6ngGlIInEHEhPOANRkaIFhq8SuHCE1Hb8Lh8LgsBADs="; Editor.darkCheckmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg==";Editor.darkHelpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII="; @@ -1979,8 +1979,6 @@ Editor.closeBlackImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy Editor.plusImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==";Editor.shapesImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48Zz48cGF0aCBkPSJNMywxMWg4VjNIM1YxMXogTTUsNWg0djRINVY1eiIvPjxwYXRoIGQ9Ik0xMywzdjhoOFYzSDEzeiBNMTksOWgtNFY1aDRWOXoiLz48cGF0aCBkPSJNMywyMWg4di04SDNWMjF6IE01LDE1aDR2NEg1VjE1eiIvPjxwb2x5Z29uIHBvaW50cz0iMTgsMTMgMTYsMTMgMTYsMTYgMTMsMTYgMTMsMTggMTYsMTggMTYsMjEgMTgsMjEgMTgsMTggMjEsMTggMjEsMTYgMTgsMTYiLz48L2c+PC9nPjwvc3ZnPg=="; Editor.formatImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg=="; Editor.freehandImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHJlY3QgZmlsbD0ibm9uZSIgaGVpZ2h0PSIyNCIgd2lkdGg9IjI0Ii8+PHBhdGggZD0iTTQuNSw4YzEuMDQsMCwyLjM0LTEuNSw0LjI1LTEuNWMxLjUyLDAsMi43NSwxLjIzLDIuNzUsMi43NWMwLDIuMDQtMS45OSwzLjE1LTMuOTEsNC4yMkM1LjQyLDE0LjY3LDQsMTUuNTcsNCwxNyBjMCwxLjEsMC45LDIsMiwydjJjLTIuMjEsMC00LTEuNzktNC00YzAtMi43MSwyLjU2LTQuMTQsNC42Mi01LjI4YzEuNDItMC43OSwyLjg4LTEuNiwyLjg4LTIuNDdjMC0wLjQxLTAuMzQtMC43NS0wLjc1LTAuNzUgQzcuNSw4LjUsNi4yNSwxMCw0LjUsMTBDMy4xMiwxMCwyLDguODgsMiw3LjVDMiw1LjQ1LDQuMTcsMi44Myw1LDJsMS40MSwxLjQxQzUuNDEsNC40Miw0LDYuNDMsNCw3LjVDNCw3Ljc4LDQuMjIsOCw0LjUsOHogTTgsMjEgbDMuNzUsMGw4LjA2LTguMDZsLTMuNzUtMy43NUw4LDE3LjI1TDgsMjF6IE0xMCwxOC4wOGw2LjA2LTYuMDZsMC45MiwwLjkyTDEwLjkyLDE5TDEwLDE5TDEwLDE4LjA4eiBNMjAuMzcsNi4yOSBjLTAuMzktMC4zOS0xLjAyLTAuMzktMS40MSwwbC0xLjgzLDEuODNsMy43NSwzLjc1bDEuODMtMS44M2MwLjM5LTAuMzksMC4zOS0xLjAyLDAtMS40MUwyMC4zNyw2LjI5eiIvPjwvc3ZnPg=="; -Editor.darkImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxyZWN0IGZpbGw9Im5vbmUiIGhlaWdodD0iMjQiIHdpZHRoPSIyNCIvPjxwYXRoIGQ9Ik05LjM3LDUuNTFDOS4xOSw2LjE1LDkuMSw2LjgyLDkuMSw3LjVjMCw0LjA4LDMuMzIsNy40LDcuNCw3LjRjMC42OCwwLDEuMzUtMC4wOSwxLjk5LTAuMjdDMTcuNDUsMTcuMTksMTQuOTMsMTksMTIsMTkgYy0zLjg2LDAtNy0zLjE0LTctN0M1LDkuMDcsNi44MSw2LjU1LDkuMzcsNS41MXogTTEyLDNjLTQuOTcsMC05LDQuMDMtOSw5czQuMDMsOSw5LDlzOS00LjAzLDktOWMwLTAuNDYtMC4wNC0wLjkyLTAuMS0xLjM2IGMtMC45OCwxLjM3LTIuNTgsMi4yNi00LjQsMi4yNmMtMi45OCwwLTUuNC0yLjQyLTUuNC01LjRjMC0xLjgxLDAuODktMy40MiwyLjI2LTQuNEMxMi45MiwzLjA0LDEyLjQ2LDMsMTIsM0wxMiwzeiIvPjwvc3ZnPg=="; -Editor.lightImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxyZWN0IGZpbGw9Im5vbmUiIGhlaWdodD0iMjQiIHdpZHRoPSIyNCIvPjxwYXRoIGQ9Ik0xMiw5YzEuNjUsMCwzLDEuMzUsMywzcy0xLjM1LDMtMywzcy0zLTEuMzUtMy0zUzEwLjM1LDksMTIsOSBNMTIsN2MtMi43NiwwLTUsMi4yNC01LDVzMi4yNCw1LDUsNXM1LTIuMjQsNS01IFMxNC43Niw3LDEyLDdMMTIsN3ogTTIsMTNsMiwwYzAuNTUsMCwxLTAuNDUsMS0xcy0wLjQ1LTEtMS0xbC0yLDBjLTAuNTUsMC0xLDAuNDUtMSwxUzEuNDUsMTMsMiwxM3ogTTIwLDEzbDIsMGMwLjU1LDAsMS0wLjQ1LDEtMSBzLTAuNDUtMS0xLTFsLTIsMGMtMC41NSwwLTEsMC40NS0xLDFTMTkuNDUsMTMsMjAsMTN6IE0xMSwydjJjMCwwLjU1LDAuNDUsMSwxLDFzMS0wLjQ1LDEtMVYyYzAtMC41NS0wLjQ1LTEtMS0xUzExLDEuNDUsMTEsMnogTTExLDIwdjJjMCwwLjU1LDAuNDUsMSwxLDFzMS0wLjQ1LDEtMXYtMmMwLTAuNTUtMC40NS0xLTEtMUMxMS40NSwxOSwxMSwxOS40NSwxMSwyMHogTTUuOTksNC41OGMtMC4zOS0wLjM5LTEuMDMtMC4zOS0xLjQxLDAgYy0wLjM5LDAuMzktMC4zOSwxLjAzLDAsMS40MWwxLjA2LDEuMDZjMC4zOSwwLjM5LDEuMDMsMC4zOSwxLjQxLDBzMC4zOS0xLjAzLDAtMS40MUw1Ljk5LDQuNTh6IE0xOC4zNiwxNi45NSBjLTAuMzktMC4zOS0xLjAzLTAuMzktMS40MSwwYy0wLjM5LDAuMzktMC4zOSwxLjAzLDAsMS40MWwxLjA2LDEuMDZjMC4zOSwwLjM5LDEuMDMsMC4zOSwxLjQxLDBjMC4zOS0wLjM5LDAuMzktMS4wMywwLTEuNDEgTDE4LjM2LDE2Ljk1eiBNMTkuNDIsNS45OWMwLjM5LTAuMzksMC4zOS0xLjAzLDAtMS40MWMtMC4zOS0wLjM5LTEuMDMtMC4zOS0xLjQxLDBsLTEuMDYsMS4wNmMtMC4zOSwwLjM5LTAuMzksMS4wMywwLDEuNDEgczEuMDMsMC4zOSwxLjQxLDBMMTkuNDIsNS45OXogTTcuMDUsMTguMzZjMC4zOS0wLjM5LDAuMzktMS4wMywwLTEuNDFjLTAuMzktMC4zOS0xLjAzLTAuMzktMS40MSwwbC0xLjA2LDEuMDYgYy0wLjM5LDAuMzktMC4zOSwxLjAzLDAsMS40MXMxLjAzLDAuMzksMS40MSwwTDcuMDUsMTguMzZ6Ii8+PC9zdmc+"; Editor.undoImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+";Editor.redoImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg=="; Editor.outlineImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjxwYXRoIGQ9Ik0yMC41IDNsLS4xNi4wM0wxNSA1LjEgOSAzIDMuMzYgNC45Yy0uMjEuMDctLjM2LjI1LS4zNi40OFYyMC41YzAgLjI4LjIyLjUuNS41bC4xNi0uMDNMOSAxOC45bDYgMi4xIDUuNjQtMS45Yy4yMS0uMDcuMzYtLjI1LjM2LS40OFYzLjVjMC0uMjgtLjIyLS41LS41LS41ek0xNSAxOWwtNi0yLjExVjVsNiAyLjExVjE5eiIvPjwvc3ZnPg=="; Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDEydjdINXYtN0gzdjdjMCAxLjEuOSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMnYtN2gtMnptLTYgLjY3bDIuNTktMi41OEwxNyAxMS41bC01IDUtNS01IDEuNDEtMS40MUwxMSAxMi42N1YzaDJ2OS42N3oiLz48L3N2Zz4=";Editor.helpImage=Editor.lightHelpImage;Editor.checkmarkImage=Editor.lightCheckmarkImage; @@ -1988,7 +1986,7 @@ Editor.roughFillStyles=[{val:"auto",dispName:"Auto"},{val:"hachure",dispName:"Ha Editor.fillStyles=[{val:"auto",dispName:"Auto"},{val:"hatch",dispName:"Hatch"},{val:"solid",dispName:"Solid"},{val:"dots",dispName:"Dots"},{val:"cross-hatch",dispName:"Cross Hatch"},{val:"dashed",dispName:"Dashed"},{val:"zigzag-line",dispName:"ZigZag Line"}];Editor.themes=null;Editor.ctrlKey=mxClient.IS_MAC?"Cmd":"Ctrl";Editor.hintOffset=20;Editor.shapePickerHoverDelay=300;Editor.fitWindowBorders=null;Editor.popupsAllowed=null!=window.urlParams?"1"!=urlParams.noDevice:!0;Editor.simpleLabels=!1; Editor.enableNativeCipboard=window==window.top&&!mxClient.IS_FF&&null!=navigator.clipboard;Editor.sketchMode=!1;Editor.darkMode=!1;Editor.currentTheme=uiTheme;Editor.darkColor="#2a2a2a";Editor.lightColor="#f0f0f0";Editor.isDarkMode=function(b){return Editor.darkMode};Editor.isPngDataUrl=function(b){return null!=b&&"data:image/png;"==b.substring(0,15)}; Editor.isPngData=function(b){return 8<b.length&&137==b.charCodeAt(0)&&80==b.charCodeAt(1)&&78==b.charCodeAt(2)&&71==b.charCodeAt(3)&&13==b.charCodeAt(4)&&10==b.charCodeAt(5)&&26==b.charCodeAt(6)&&10==b.charCodeAt(7)}; -Editor.extractGraphModelFromPng=function(b){var e=null;try{var k=b.substring(b.indexOf(",")+1),m=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);EditorUi.parsePng(m,mxUtils.bind(this,function(C,p,E){C=m.substring(C+8,C+8+E);"zTXt"==p?(E=C.indexOf(String.fromCharCode(0)),"mxGraphModel"==C.substring(0,E)&&(C=pako.inflateRaw(Graph.stringToArrayBuffer(C.substring(E+2)),{to:"string"}).replace(/\+/g," "),null!=C&&0<C.length&&(e=C))):"tEXt"==p&&(C=C.split(String.fromCharCode(0)),1<C.length&&("mxGraphModel"== +Editor.extractGraphModelFromPng=function(b){var e=null;try{var k=b.substring(b.indexOf(",")+1),m=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);EditorUi.parsePng(m,mxUtils.bind(this,function(C,p,F){C=m.substring(C+8,C+8+F);"zTXt"==p?(F=C.indexOf(String.fromCharCode(0)),"mxGraphModel"==C.substring(0,F)&&(C=pako.inflateRaw(Graph.stringToArrayBuffer(C.substring(F+2)),{to:"string"}).replace(/\+/g," "),null!=C&&0<C.length&&(e=C))):"tEXt"==p&&(C=C.split(String.fromCharCode(0)),1<C.length&&("mxGraphModel"== C[0]||"mxfile"==C[0])&&(e=C[1]));if(null!=e||"IDAT"==p)return!0}))}catch(C){}null!=e&&"%"==e.charAt(0)&&(e=decodeURIComponent(e));null!=e&&"%"==e.charAt(0)&&(e=decodeURIComponent(e));return e};mxUtils.extend(Editor,mxEventSource);Editor.prototype.originalNoForeignObject=mxClient.NO_FO;Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif"; Editor.prototype.extendCanvas=!0;Editor.prototype.chromeless=!1;Editor.prototype.cancelFirst=!0;Editor.prototype.enabled=!0;Editor.prototype.filename=null;Editor.prototype.modified=!1;Editor.prototype.autosave=!0;Editor.prototype.initialTopSpacing=0;Editor.prototype.appName=document.title;Editor.prototype.editBlankUrl=window.location.protocol+"//"+window.location.host+"/";Editor.prototype.defaultGraphOverflow="hidden";Editor.prototype.init=function(){};Editor.prototype.isChromelessView=function(){return this.chromeless}; Editor.prototype.setAutosave=function(b){this.autosave=b;this.fireEvent(new mxEventObject("autosaveChanged"))};Editor.prototype.getEditBlankUrl=function(b){return this.editBlankUrl+b}; @@ -2005,107 +2003,107 @@ Editor.prototype.getGraphXml=function(b){b=(null!=b?b:1)?(new mxCodec(mxUtils.cr this.graph.gridSize);b.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");b.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");b.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");b.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");b.setAttribute("fold",this.graph.foldingEnabled?"1":"0");b.setAttribute("page",this.graph.pageVisible?"1":"0");b.setAttribute("pageScale",this.graph.pageScale);b.setAttribute("pageWidth",this.graph.pageFormat.width); b.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&b.setAttribute("background",this.graph.background);return b};Editor.prototype.updateGraphComponents=function(){var b=this.graph;null!=b.container&&(b.view.validateBackground(),b.container.style.overflow=b.scrollbars?"auto":this.defaultGraphOverflow,this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(b){this.modified=b}; Editor.prototype.setFilename=function(b){this.filename=b}; -Editor.prototype.createUndoManager=function(){var b=this.graph,e=new mxUndoManager;this.undoListener=function(m,C){e.undoableEditHappened(C.getProperty("edit"))};var k=mxUtils.bind(this,function(m,C){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,k);b.getView().addListener(mxEvent.UNDO,k);k=function(m,C){m=b.getSelectionCellsForChanges(C.getProperty("edit").changes,function(E){return!(E instanceof mxChildChange)});if(0<m.length){b.getModel();C=[];for(var p=0;p<m.length;p++)null!= +Editor.prototype.createUndoManager=function(){var b=this.graph,e=new mxUndoManager;this.undoListener=function(m,C){e.undoableEditHappened(C.getProperty("edit"))};var k=mxUtils.bind(this,function(m,C){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,k);b.getView().addListener(mxEvent.UNDO,k);k=function(m,C){m=b.getSelectionCellsForChanges(C.getProperty("edit").changes,function(F){return!(F instanceof mxChildChange)});if(0<m.length){b.getModel();C=[];for(var p=0;p<m.length;p++)null!= b.view.getState(m[p])&&C.push(m[p]);b.setSelectionCells(C)}};e.addListener(mxEvent.UNDO,k);e.addListener(mxEvent.REDO,k);return e};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()}; OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(b){null!=this.done&&this.done(null!=b?b:!0)}; -function Dialog(b,e,k,m,C,p,E,K,Q,d,f){var g=Q?57:0,x=k,z=m,u=Q?0:64,H=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(H.height=window.innerHeight);var J=H.height,D=Math.max(1,Math.round((H.width-k-u)/2)),G=Math.max(1,Math.round((J-m-b.footerHeight)/3));e.style.maxHeight="100%";k=null!=document.body?Math.min(k,document.body.scrollWidth-u):k;m=Math.min(m,J-u);0<b.dialogs.length&&(this.zIndex+= +function Dialog(b,e,k,m,C,p,F,K,P,d,f){var g=P?57:0,x=k,y=m,u=P?0:64,H=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(H.height=window.innerHeight);var J=H.height,D=Math.max(1,Math.round((H.width-k-u)/2)),G=Math.max(1,Math.round((J-m-b.footerHeight)/3));e.style.maxHeight="100%";k=null!=document.body?Math.min(k,document.body.scrollWidth-u):k;m=Math.min(m,J-u);0<b.dialogs.length&&(this.zIndex+= 2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=J+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));H=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=H.x+"px";this.bg.style.top=H.y+"px";D+=H.x;G+=H.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px", -G+=b.embedViewport.y,D+=b.embedViewport.x);C&&document.body.appendChild(this.bg);var V=b.createDiv(Q?"geTransDialog":"geDialog");C=this.getPosition(D,G,k,m);D=C.x;G=C.y;V.style.width=k+"px";V.style.height=m+"px";V.style.left=D+"px";V.style.top=G+"px";V.style.zIndex=this.zIndex;V.appendChild(e);document.body.appendChild(V);!K&&e.clientHeight>V.clientHeight-u&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage), -p.setAttribute("title",mxResources.get("close")),p.className="geDialogClose",p.style.top=G+14+"px",p.style.left=D+k+38-g+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!f)){var U=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(Y){U=!0}),null,mxUtils.bind(this,function(Y){U&&(b.hideDialog(!0),U=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=d){var Y=d(); -null!=Y&&(x=k=Y.w,z=m=Y.h)}Y=mxUtils.getDocumentSize();J=Y.height;this.bg.style.height=J+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");D=Math.max(1,Math.round((Y.width-k-u)/2));G=Math.max(1,Math.round((J-m-b.footerHeight)/3));k=null!=document.body?Math.min(x,document.body.scrollWidth-u):x;m=Math.min(z,J-u);Y=this.getPosition(D,G,k,m);D=Y.x;G=Y.y;V.style.left=D+"px";V.style.top=G+"px";V.style.width=k+"px";V.style.height=m+"px";!K&& -e.clientHeight>V.clientHeight-u&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=G+14+"px",this.dialogImg.style.left=D+k+38-g+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=E;this.container=V;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2; +G+=b.embedViewport.y,D+=b.embedViewport.x);C&&document.body.appendChild(this.bg);var W=b.createDiv(P?"geTransDialog":"geDialog");C=this.getPosition(D,G,k,m);D=C.x;G=C.y;W.style.width=k+"px";W.style.height=m+"px";W.style.left=D+"px";W.style.top=G+"px";W.style.zIndex=this.zIndex;W.appendChild(e);document.body.appendChild(W);!K&&e.clientHeight>W.clientHeight-u&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage), +p.setAttribute("title",mxResources.get("close")),p.className="geDialogClose",p.style.top=G+14+"px",p.style.left=D+k+38-g+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!f)){var T=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(Z){T=!0}),null,mxUtils.bind(this,function(Z){T&&(b.hideDialog(!0),T=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=d){var Z=d(); +null!=Z&&(x=k=Z.w,y=m=Z.h)}Z=mxUtils.getDocumentSize();J=Z.height;this.bg.style.height=J+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");D=Math.max(1,Math.round((Z.width-k-u)/2));G=Math.max(1,Math.round((J-m-b.footerHeight)/3));k=null!=document.body?Math.min(x,document.body.scrollWidth-u):x;m=Math.min(y,J-u);Z=this.getPosition(D,G,k,m);D=Z.x;G=Z.y;W.style.left=D+"px";W.style.top=G+"px";W.style.width=k+"px";W.style.height=m+"px";!K&& +e.clientHeight>W.clientHeight-u&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=G+14+"px",this.dialogImg.style.left=D+k+38-g+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=F;this.container=W;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2; Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+ "/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png"; Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+ "/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(b,e){return new mxPoint(b,e)};Dialog.prototype.close=function(b,e){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,e))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)}; -var ErrorDialog=function(b,e,k,m,C,p,E,K,Q,d,f){Q=null!=Q?Q:!0;var g=document.createElement("div");g.style.textAlign="center";if(null!=e){var x=document.createElement("div");x.style.padding="0px";x.style.margin="0px";x.style.fontSize="18px";x.style.paddingBottom="16px";x.style.marginBottom="10px";x.style.borderBottom="1px solid #c0c0c0";x.style.color="gray";x.style.whiteSpace="nowrap";x.style.textOverflow="ellipsis";x.style.overflow="hidden";mxUtils.write(x,e);x.setAttribute("title",e);g.appendChild(x)}e= -document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";e.innerHTML=k;g.appendChild(e);k=document.createElement("div");k.style.marginTop="12px";k.style.textAlign="center";null!=p&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();p()}),e.className="geBtn",k.appendChild(e),k.style.textAlign="center");null!=d&&(d=mxUtils.button(d,function(){null!=f&&f()}),d.className="geBtn",k.appendChild(d));var z=mxUtils.button(m,function(){Q&&b.hideDialog();null!=C&&C()}); -z.className="geBtn";k.appendChild(z);null!=E&&(m=mxUtils.button(E,function(){Q&&b.hideDialog();null!=K&&K()}),m.className="geBtn gePrimaryBtn",k.appendChild(m));this.init=function(){z.focus()};g.appendChild(k);this.container=g},PrintDialog=function(b,e){this.create(b,e)}; -PrintDialog.prototype.create=function(b){function e(z){var u=E.checked||d.checked,H=parseInt(g.value)/100;isNaN(H)&&(H=1,g.value="100%");H*=.75;var J=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,D=1/k.pageScale;if(u){var G=E.checked?1:parseInt(f.value);isNaN(G)||(D=mxUtils.getScaleForPageCount(G,k,J))}k.getGraphBounds();var V=G=0;J=mxRectangle.fromRectangle(J);J.width=Math.ceil(J.width*H);J.height=Math.ceil(J.height*H);D*=H;!u&&k.pageVisible?(H=k.getPageLayout(),G-=H.x*J.width,V-=H.y*J.height): -u=!0;u=PrintDialog.createPrintPreview(k,D,J,0,G,V,u);u.open();z&&PrintDialog.printPreview(u)}var k=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var C=document.createElement("tbody");var p=document.createElement("tr");var E=document.createElement("input");E.setAttribute("type","checkbox");var K=document.createElement("td");K.setAttribute("colspan","2");K.style.fontSize="10pt";K.appendChild(E);var Q=document.createElement("span");mxUtils.write(Q," "+mxResources.get("fitPage")); -K.appendChild(Q);mxEvent.addListener(Q,"click",function(z){E.checked=!E.checked;d.checked=!E.checked;mxEvent.consume(z)});mxEvent.addListener(E,"change",function(){d.checked=!E.checked});p.appendChild(K);C.appendChild(p);p=p.cloneNode(!1);var d=document.createElement("input");d.setAttribute("type","checkbox");K=document.createElement("td");K.style.fontSize="10pt";K.appendChild(d);Q=document.createElement("span");mxUtils.write(Q," "+mxResources.get("posterPrint")+":");K.appendChild(Q);mxEvent.addListener(Q, -"click",function(z){d.checked=!d.checked;E.checked=!d.checked;mxEvent.consume(z)});p.appendChild(K);var f=document.createElement("input");f.setAttribute("value","1");f.setAttribute("type","number");f.setAttribute("min","1");f.setAttribute("size","4");f.setAttribute("disabled","disabled");f.style.width="50px";K=document.createElement("td");K.style.fontSize="10pt";K.appendChild(f);mxUtils.write(K," "+mxResources.get("pages")+" (max)");p.appendChild(K);C.appendChild(p);mxEvent.addListener(d,"change", -function(){d.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled");E.checked=!d.checked});p=p.cloneNode(!1);K=document.createElement("td");mxUtils.write(K,mxResources.get("pageScale")+":");p.appendChild(K);K=document.createElement("td");var g=document.createElement("input");g.setAttribute("value","100 %");g.setAttribute("size","5");g.style.width="50px";K.appendChild(g);p.appendChild(K);C.appendChild(p);p=document.createElement("tr");K=document.createElement("td");K.colSpan=2; -K.style.paddingTop="20px";K.setAttribute("align","right");Q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});Q.className="geBtn";b.editor.cancelFirst&&K.appendChild(Q);if(PrintDialog.previewEnabled){var x=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});x.className="geBtn";K.appendChild(x)}x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});x.className="geBtn gePrimaryBtn";K.appendChild(x);b.editor.cancelFirst|| -K.appendChild(Q);p.appendChild(K);C.appendChild(p);m.appendChild(C);this.container=m};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var e=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(e,500):e()}}catch(k){}}; -PrintDialog.createPrintPreview=function(b,e,k,m,C,p,E){e=new mxPrintPreview(b,e,k,m,C,p);e.title=mxResources.get("preview");e.printBackgroundImage=!0;e.autoOrigin=E;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";e.backgroundColor=b;var K=e.writeHead;e.writeHead=function(Q){K.apply(this,arguments);Q.writeln('<style type="text/css">');Q.writeln("@media screen {");Q.writeln(" body > div { padding:30px;box-sizing:content-box; }");Q.writeln("}");Q.writeln("</style>")};return e}; +var ErrorDialog=function(b,e,k,m,C,p,F,K,P,d,f){P=null!=P?P:!0;var g=document.createElement("div");g.style.textAlign="center";if(null!=e){var x=document.createElement("div");x.style.padding="0px";x.style.margin="0px";x.style.fontSize="18px";x.style.paddingBottom="16px";x.style.marginBottom="10px";x.style.borderBottom="1px solid #c0c0c0";x.style.color="gray";x.style.whiteSpace="nowrap";x.style.textOverflow="ellipsis";x.style.overflow="hidden";mxUtils.write(x,e);x.setAttribute("title",e);g.appendChild(x)}e= +document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";e.innerHTML=k;g.appendChild(e);k=document.createElement("div");k.style.marginTop="12px";k.style.textAlign="center";null!=p&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();p()}),e.className="geBtn",k.appendChild(e),k.style.textAlign="center");null!=d&&(d=mxUtils.button(d,function(){null!=f&&f()}),d.className="geBtn",k.appendChild(d));var y=mxUtils.button(m,function(){P&&b.hideDialog();null!=C&&C()}); +y.className="geBtn";k.appendChild(y);null!=F&&(m=mxUtils.button(F,function(){P&&b.hideDialog();null!=K&&K()}),m.className="geBtn gePrimaryBtn",k.appendChild(m));this.init=function(){y.focus()};g.appendChild(k);this.container=g},PrintDialog=function(b,e){this.create(b,e)}; +PrintDialog.prototype.create=function(b){function e(y){var u=F.checked||d.checked,H=parseInt(g.value)/100;isNaN(H)&&(H=1,g.value="100%");H*=.75;var J=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,D=1/k.pageScale;if(u){var G=F.checked?1:parseInt(f.value);isNaN(G)||(D=mxUtils.getScaleForPageCount(G,k,J))}k.getGraphBounds();var W=G=0;J=mxRectangle.fromRectangle(J);J.width=Math.ceil(J.width*H);J.height=Math.ceil(J.height*H);D*=H;!u&&k.pageVisible?(H=k.getPageLayout(),G-=H.x*J.width,W-=H.y*J.height): +u=!0;u=PrintDialog.createPrintPreview(k,D,J,0,G,W,u);u.open();y&&PrintDialog.printPreview(u)}var k=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var C=document.createElement("tbody");var p=document.createElement("tr");var F=document.createElement("input");F.setAttribute("type","checkbox");var K=document.createElement("td");K.setAttribute("colspan","2");K.style.fontSize="10pt";K.appendChild(F);var P=document.createElement("span");mxUtils.write(P," "+mxResources.get("fitPage")); +K.appendChild(P);mxEvent.addListener(P,"click",function(y){F.checked=!F.checked;d.checked=!F.checked;mxEvent.consume(y)});mxEvent.addListener(F,"change",function(){d.checked=!F.checked});p.appendChild(K);C.appendChild(p);p=p.cloneNode(!1);var d=document.createElement("input");d.setAttribute("type","checkbox");K=document.createElement("td");K.style.fontSize="10pt";K.appendChild(d);P=document.createElement("span");mxUtils.write(P," "+mxResources.get("posterPrint")+":");K.appendChild(P);mxEvent.addListener(P, +"click",function(y){d.checked=!d.checked;F.checked=!d.checked;mxEvent.consume(y)});p.appendChild(K);var f=document.createElement("input");f.setAttribute("value","1");f.setAttribute("type","number");f.setAttribute("min","1");f.setAttribute("size","4");f.setAttribute("disabled","disabled");f.style.width="50px";K=document.createElement("td");K.style.fontSize="10pt";K.appendChild(f);mxUtils.write(K," "+mxResources.get("pages")+" (max)");p.appendChild(K);C.appendChild(p);mxEvent.addListener(d,"change", +function(){d.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled");F.checked=!d.checked});p=p.cloneNode(!1);K=document.createElement("td");mxUtils.write(K,mxResources.get("pageScale")+":");p.appendChild(K);K=document.createElement("td");var g=document.createElement("input");g.setAttribute("value","100 %");g.setAttribute("size","5");g.style.width="50px";K.appendChild(g);p.appendChild(K);C.appendChild(p);p=document.createElement("tr");K=document.createElement("td");K.colSpan=2; +K.style.paddingTop="20px";K.setAttribute("align","right");P=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});P.className="geBtn";b.editor.cancelFirst&&K.appendChild(P);if(PrintDialog.previewEnabled){var x=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});x.className="geBtn";K.appendChild(x)}x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});x.className="geBtn gePrimaryBtn";K.appendChild(x);b.editor.cancelFirst|| +K.appendChild(P);p.appendChild(K);C.appendChild(p);m.appendChild(C);this.container=m};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var e=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(e,500):e()}}catch(k){}}; +PrintDialog.createPrintPreview=function(b,e,k,m,C,p,F){e=new mxPrintPreview(b,e,k,m,C,p);e.title=mxResources.get("preview");e.printBackgroundImage=!0;e.autoOrigin=F;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";e.backgroundColor=b;var K=e.writeHead;e.writeHead=function(P){K.apply(this,arguments);P.writeln('<style type="text/css">');P.writeln("@media screen {");P.writeln(" body > div { padding:30px;box-sizing:content-box; }");P.writeln("}");P.writeln("</style>")};return e}; PrintDialog.previewEnabled=!0; -var PageSetupDialog=function(b){function e(){null==f||f==mxConstants.NONE?(d.style.backgroundColor="",d.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(d.style.backgroundColor=f,d.style.backgroundImage="")}function k(){var J=u;null!=J&&Graph.isPageLink(J.src)&&(J=b.createImageForPageLink(J.src,null));null!=J&&null!=J.src?(z.setAttribute("src",J.src),z.style.display=""):(z.removeAttribute("src"),z.style.display="none")}var m=b.editor.graph,C=document.createElement("table");C.style.width= -"100%";C.style.height="100%";var p=document.createElement("tbody");var E=document.createElement("tr");var K=document.createElement("td");K.style.verticalAlign="top";K.style.fontSize="10pt";mxUtils.write(K,mxResources.get("paperSize")+":");E.appendChild(K);K=document.createElement("td");K.style.verticalAlign="top";K.style.fontSize="10pt";var Q=PageSetupDialog.addPageFormatPanel(K,"pagesetupdialog",m.pageFormat);E.appendChild(K);p.appendChild(E);E=document.createElement("tr");K=document.createElement("td"); -mxUtils.write(K,mxResources.get("background")+":");E.appendChild(K);K=document.createElement("td");K.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var d=document.createElement("button");d.style.width="22px";d.style.height="22px";d.style.cursor="pointer";d.style.marginRight="20px";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(d.style.position="relative",d.style.top="-6px");var f=m.background;e();mxEvent.addListener(d, -"click",function(J){b.pickColor(f||"none",function(D){f=D;e()});mxEvent.consume(J)});K.appendChild(d);mxUtils.write(K,mxResources.get("gridSize")+":");var g=document.createElement("input");g.setAttribute("type","number");g.setAttribute("min","0");g.style.width="40px";g.style.marginLeft="6px";g.value=m.getGridSize();K.appendChild(g);mxEvent.addListener(g,"change",function(){var J=parseInt(g.value);g.value=Math.max(1,isNaN(J)?m.getGridSize():J)});E.appendChild(K);p.appendChild(E);E=document.createElement("tr"); -K=document.createElement("td");mxUtils.write(K,mxResources.get("image")+":");E.appendChild(K);K=document.createElement("td");var x=document.createElement("button");x.className="geBtn";x.style.margin="0px";mxUtils.write(x,mxResources.get("change")+"...");var z=document.createElement("img");z.setAttribute("valign","middle");z.style.verticalAlign="middle";z.style.border="1px solid lightGray";z.style.borderRadius="4px";z.style.marginRight="14px";z.style.maxWidth="100px";z.style.cursor="pointer";z.style.height= -"60px";z.style.padding="4px";var u=m.backgroundImage,H=function(J){b.showBackgroundImageDialog(function(D,G){G||(u=D,k())},u);mxEvent.consume(J)};mxEvent.addListener(x,"click",H);mxEvent.addListener(z,"click",H);k();K.appendChild(z);K.appendChild(x);E.appendChild(K);p.appendChild(E);E=document.createElement("tr");K=document.createElement("td");K.colSpan=2;K.style.paddingTop="16px";K.setAttribute("align","right");x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn"; -b.editor.cancelFirst&&K.appendChild(x);H=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var J=parseInt(g.value);isNaN(J)||m.gridSize===J||m.setGridSize(J);J=new ChangePageSetup(b,f,u,Q.get());J.ignoreColor=m.background==f;J.ignoreImage=(null!=m.backgroundImage?m.backgroundImage.src:null)===(null!=u?u.src:null);m.pageFormat.width==J.previousFormat.width&&m.pageFormat.height==J.previousFormat.height&&J.ignoreColor&&J.ignoreImage||m.model.execute(J)});H.className="geBtn gePrimaryBtn"; -K.appendChild(H);b.editor.cancelFirst||K.appendChild(x);E.appendChild(K);p.appendChild(E);C.appendChild(p);this.container=C}; -PageSetupDialog.addPageFormatPanel=function(b,e,k,m){function C(Y,O,qa){if(qa||g!=document.activeElement&&x!=document.activeElement){Y=!1;for(O=0;O<u.length;O++)qa=u[O],G?"custom"==qa.key&&(K.value=qa.key,G=!1):null!=qa.format&&("a4"==qa.key?826==k.width?(k=mxRectangle.fromRectangle(k),k.width=827):826==k.height&&(k=mxRectangle.fromRectangle(k),k.height=827):"a5"==qa.key&&(584==k.width?(k=mxRectangle.fromRectangle(k),k.width=583):584==k.height&&(k=mxRectangle.fromRectangle(k),k.height=583)),k.width== -qa.format.width&&k.height==qa.format.height?(K.value=qa.key,p.setAttribute("checked","checked"),p.defaultChecked=!0,p.checked=!0,E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1,Y=!0):k.width==qa.format.height&&k.height==qa.format.width&&(K.value=qa.key,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,E.setAttribute("checked","checked"),E.defaultChecked=!0,Y=E.checked=!0));Y?(Q.style.display="",f.style.display="none"):(g.value=k.width/100,x.value=k.height/100,p.setAttribute("checked", -"checked"),K.value="custom",Q.style.display="none",f.style.display="")}}e="format-"+e;var p=document.createElement("input");p.setAttribute("name",e);p.setAttribute("type","radio");p.setAttribute("value","portrait");var E=document.createElement("input");E.setAttribute("name",e);E.setAttribute("type","radio");E.setAttribute("value","landscape");var K=document.createElement("select");K.style.marginBottom="8px";K.style.borderRadius="4px";K.style.border="1px solid rgb(160, 160, 160)";K.style.width="206px"; -var Q=document.createElement("div");Q.style.marginLeft="4px";Q.style.width="210px";Q.style.height="24px";p.style.marginRight="6px";Q.appendChild(p);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));Q.appendChild(e);E.style.marginLeft="10px";E.style.marginRight="6px";Q.appendChild(E);var d=document.createElement("span");d.style.width="100px";mxUtils.write(d,mxResources.get("landscape"));Q.appendChild(d);var f=document.createElement("div");f.style.marginLeft= -"4px";f.style.width="210px";f.style.height="24px";var g=document.createElement("input");g.setAttribute("size","7");g.style.textAlign="right";f.appendChild(g);mxUtils.write(f," in x ");var x=document.createElement("input");x.setAttribute("size","7");x.style.textAlign="right";f.appendChild(x);mxUtils.write(f," in");Q.style.display="none";f.style.display="none";for(var z={},u=PageSetupDialog.getFormats(),H=0;H<u.length;H++){var J=u[H];z[J.key]=J;var D=document.createElement("option");D.setAttribute("value", -J.key);mxUtils.write(D,J.title);K.appendChild(D)}var G=!1;C();b.appendChild(K);mxUtils.br(b);b.appendChild(Q);b.appendChild(f);var V=k,U=function(Y,O){Y=z[K.value];null!=Y.format?(g.value=Y.format.width/100,x.value=Y.format.height/100,f.style.display="none",Q.style.display=""):(Q.style.display="none",f.style.display="");Y=parseFloat(g.value);if(isNaN(Y)||0>=Y)g.value=k.width/100;Y=parseFloat(x.value);if(isNaN(Y)||0>=Y)x.value=k.height/100;Y=new mxRectangle(0,0,Math.floor(100*parseFloat(g.value)), -Math.floor(100*parseFloat(x.value)));"custom"!=K.value&&E.checked&&(Y=new mxRectangle(0,0,Y.height,Y.width));O&&G||Y.width==V.width&&Y.height==V.height||(V=Y,null!=m&&m(V))};mxEvent.addListener(e,"click",function(Y){p.checked=!0;U(Y);mxEvent.consume(Y)});mxEvent.addListener(d,"click",function(Y){E.checked=!0;U(Y);mxEvent.consume(Y)});mxEvent.addListener(g,"blur",U);mxEvent.addListener(g,"click",U);mxEvent.addListener(x,"blur",U);mxEvent.addListener(x,"click",U);mxEvent.addListener(E,"change",U);mxEvent.addListener(p, -"change",U);mxEvent.addListener(K,"change",function(Y){G="custom"==K.value;U(Y,!0)});U();return{set:function(Y){k=Y;C(null,null,!0)},get:function(){return V},widthInput:g,heightInput:x}}; +var PageSetupDialog=function(b){function e(){null==f||f==mxConstants.NONE?(d.style.backgroundColor="",d.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(d.style.backgroundColor=f,d.style.backgroundImage="")}function k(){var J=u;null!=J&&Graph.isPageLink(J.src)&&(J=b.createImageForPageLink(J.src,null));null!=J&&null!=J.src?(y.setAttribute("src",J.src),y.style.display=""):(y.removeAttribute("src"),y.style.display="none")}var m=b.editor.graph,C=document.createElement("table");C.style.width= +"100%";C.style.height="100%";var p=document.createElement("tbody");var F=document.createElement("tr");var K=document.createElement("td");K.style.verticalAlign="top";K.style.fontSize="10pt";mxUtils.write(K,mxResources.get("paperSize")+":");F.appendChild(K);K=document.createElement("td");K.style.verticalAlign="top";K.style.fontSize="10pt";var P=PageSetupDialog.addPageFormatPanel(K,"pagesetupdialog",m.pageFormat);F.appendChild(K);p.appendChild(F);F=document.createElement("tr");K=document.createElement("td"); +mxUtils.write(K,mxResources.get("background")+":");F.appendChild(K);K=document.createElement("td");K.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var d=document.createElement("button");d.style.width="22px";d.style.height="22px";d.style.cursor="pointer";d.style.marginRight="20px";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(d.style.position="relative",d.style.top="-6px");var f=m.background;e();mxEvent.addListener(d, +"click",function(J){b.pickColor(f||"none",function(D){f=D;e()});mxEvent.consume(J)});K.appendChild(d);mxUtils.write(K,mxResources.get("gridSize")+":");var g=document.createElement("input");g.setAttribute("type","number");g.setAttribute("min","0");g.style.width="40px";g.style.marginLeft="6px";g.value=m.getGridSize();K.appendChild(g);mxEvent.addListener(g,"change",function(){var J=parseInt(g.value);g.value=Math.max(1,isNaN(J)?m.getGridSize():J)});F.appendChild(K);p.appendChild(F);F=document.createElement("tr"); +K=document.createElement("td");mxUtils.write(K,mxResources.get("image")+":");F.appendChild(K);K=document.createElement("td");var x=document.createElement("button");x.className="geBtn";x.style.margin="0px";mxUtils.write(x,mxResources.get("change")+"...");var y=document.createElement("img");y.setAttribute("valign","middle");y.style.verticalAlign="middle";y.style.border="1px solid lightGray";y.style.borderRadius="4px";y.style.marginRight="14px";y.style.maxWidth="100px";y.style.cursor="pointer";y.style.height= +"60px";y.style.padding="4px";var u=m.backgroundImage,H=function(J){b.showBackgroundImageDialog(function(D,G){G||(u=D,k())},u);mxEvent.consume(J)};mxEvent.addListener(x,"click",H);mxEvent.addListener(y,"click",H);k();K.appendChild(y);K.appendChild(x);F.appendChild(K);p.appendChild(F);F=document.createElement("tr");K=document.createElement("td");K.colSpan=2;K.style.paddingTop="16px";K.setAttribute("align","right");x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn"; +b.editor.cancelFirst&&K.appendChild(x);H=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var J=parseInt(g.value);isNaN(J)||m.gridSize===J||m.setGridSize(J);J=new ChangePageSetup(b,f,u,P.get());J.ignoreColor=m.background==f;J.ignoreImage=(null!=m.backgroundImage?m.backgroundImage.src:null)===(null!=u?u.src:null);m.pageFormat.width==J.previousFormat.width&&m.pageFormat.height==J.previousFormat.height&&J.ignoreColor&&J.ignoreImage||m.model.execute(J)});H.className="geBtn gePrimaryBtn"; +K.appendChild(H);b.editor.cancelFirst||K.appendChild(x);F.appendChild(K);p.appendChild(F);C.appendChild(p);this.container=C}; +PageSetupDialog.addPageFormatPanel=function(b,e,k,m){function C(Z,N,qa){if(qa||g!=document.activeElement&&x!=document.activeElement){Z=!1;for(N=0;N<u.length;N++)qa=u[N],G?"custom"==qa.key&&(K.value=qa.key,G=!1):null!=qa.format&&("a4"==qa.key?826==k.width?(k=mxRectangle.fromRectangle(k),k.width=827):826==k.height&&(k=mxRectangle.fromRectangle(k),k.height=827):"a5"==qa.key&&(584==k.width?(k=mxRectangle.fromRectangle(k),k.width=583):584==k.height&&(k=mxRectangle.fromRectangle(k),k.height=583)),k.width== +qa.format.width&&k.height==qa.format.height?(K.value=qa.key,p.setAttribute("checked","checked"),p.defaultChecked=!0,p.checked=!0,F.removeAttribute("checked"),F.defaultChecked=!1,F.checked=!1,Z=!0):k.width==qa.format.height&&k.height==qa.format.width&&(K.value=qa.key,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,F.setAttribute("checked","checked"),F.defaultChecked=!0,Z=F.checked=!0));Z?(P.style.display="",f.style.display="none"):(g.value=k.width/100,x.value=k.height/100,p.setAttribute("checked", +"checked"),K.value="custom",P.style.display="none",f.style.display="")}}e="format-"+e;var p=document.createElement("input");p.setAttribute("name",e);p.setAttribute("type","radio");p.setAttribute("value","portrait");var F=document.createElement("input");F.setAttribute("name",e);F.setAttribute("type","radio");F.setAttribute("value","landscape");var K=document.createElement("select");K.style.marginBottom="8px";K.style.borderRadius="4px";K.style.border="1px solid rgb(160, 160, 160)";K.style.width="206px"; +var P=document.createElement("div");P.style.marginLeft="4px";P.style.width="210px";P.style.height="24px";p.style.marginRight="6px";P.appendChild(p);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));P.appendChild(e);F.style.marginLeft="10px";F.style.marginRight="6px";P.appendChild(F);var d=document.createElement("span");d.style.width="100px";mxUtils.write(d,mxResources.get("landscape"));P.appendChild(d);var f=document.createElement("div");f.style.marginLeft= +"4px";f.style.width="210px";f.style.height="24px";var g=document.createElement("input");g.setAttribute("size","7");g.style.textAlign="right";f.appendChild(g);mxUtils.write(f," in x ");var x=document.createElement("input");x.setAttribute("size","7");x.style.textAlign="right";f.appendChild(x);mxUtils.write(f," in");P.style.display="none";f.style.display="none";for(var y={},u=PageSetupDialog.getFormats(),H=0;H<u.length;H++){var J=u[H];y[J.key]=J;var D=document.createElement("option");D.setAttribute("value", +J.key);mxUtils.write(D,J.title);K.appendChild(D)}var G=!1;C();b.appendChild(K);mxUtils.br(b);b.appendChild(P);b.appendChild(f);var W=k,T=function(Z,N){Z=y[K.value];null!=Z.format?(g.value=Z.format.width/100,x.value=Z.format.height/100,f.style.display="none",P.style.display=""):(P.style.display="none",f.style.display="");Z=parseFloat(g.value);if(isNaN(Z)||0>=Z)g.value=k.width/100;Z=parseFloat(x.value);if(isNaN(Z)||0>=Z)x.value=k.height/100;Z=new mxRectangle(0,0,Math.floor(100*parseFloat(g.value)), +Math.floor(100*parseFloat(x.value)));"custom"!=K.value&&F.checked&&(Z=new mxRectangle(0,0,Z.height,Z.width));N&&G||Z.width==W.width&&Z.height==W.height||(W=Z,null!=m&&m(W))};mxEvent.addListener(e,"click",function(Z){p.checked=!0;T(Z);mxEvent.consume(Z)});mxEvent.addListener(d,"click",function(Z){F.checked=!0;T(Z);mxEvent.consume(Z)});mxEvent.addListener(g,"blur",T);mxEvent.addListener(g,"click",T);mxEvent.addListener(x,"blur",T);mxEvent.addListener(x,"click",T);mxEvent.addListener(F,"change",T);mxEvent.addListener(p, +"change",T);mxEvent.addListener(K,"change",function(Z){G="custom"==K.value;T(Z,!0)});T();return{set:function(Z){k=Z;C(null,null,!0)},get:function(){return W},widthInput:g,heightInput:x}}; PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)", format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)}, {key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]}; -var FilenameDialog=function(b,e,k,m,C,p,E,K,Q,d,f,g,x){Q=null!=Q?Q:!0;var z=document.createElement("table"),u=document.createElement("tbody");z.style.position="absolute";z.style.top="30px";z.style.left="20px";var H=document.createElement("tr");var J=document.createElement("td");J.style.textOverflow="ellipsis";J.style.textAlign="right";J.style.maxWidth=(x?x+15:100)+"px";J.style.fontSize="10pt";J.style.width=(x?x:84)+"px";mxUtils.write(J,(C||mxResources.get("filename"))+":");H.appendChild(J);var D= -document.createElement("input");D.setAttribute("value",e||"");D.style.marginLeft="4px";D.style.width=null!=g?g+"px":"180px";var G=mxUtils.button(k,function(){if(null==p||p(D.value))Q&&b.hideDialog(),m(D.value)});G.className="geBtn gePrimaryBtn";this.init=function(){if(null!=C||null==E)if(D.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var V=z.parentNode;if(null!=V){var U=null;mxEvent.addListener(V,"dragleave", -function(Y){null!=U&&(U.style.backgroundColor="",U=null);Y.stopPropagation();Y.preventDefault()});mxEvent.addListener(V,"dragover",mxUtils.bind(this,function(Y){null==U&&(!mxClient.IS_IE||10<document.documentMode)&&(U=D,U.style.backgroundColor="#ebf2f9");Y.stopPropagation();Y.preventDefault()}));mxEvent.addListener(V,"drop",mxUtils.bind(this,function(Y){null!=U&&(U.style.backgroundColor="",U=null);0<=mxUtils.indexOf(Y.dataTransfer.types,"text/uri-list")&&(D.value=decodeURIComponent(Y.dataTransfer.getData("text/uri-list")), -G.click());Y.stopPropagation();Y.preventDefault()}))}}};J=document.createElement("td");J.style.whiteSpace="nowrap";J.appendChild(D);H.appendChild(J);if(null!=C||null==E)u.appendChild(H),null!=f&&(J.appendChild(FilenameDialog.createTypeHint(b,D,f)),null!=b.editor.diagramFileTypes&&(H=document.createElement("tr"),J=document.createElement("td"),J.style.textOverflow="ellipsis",J.style.textAlign="right",J.style.maxWidth="100px",J.style.fontSize="10pt",J.style.width="84px",mxUtils.write(J,mxResources.get("type")+ -":"),H.appendChild(J),J=document.createElement("td"),J.style.whiteSpace="nowrap",H.appendChild(J),e=FilenameDialog.createFileTypes(b,D,b.editor.diagramFileTypes),e.style.marginLeft="4px",e.style.width="198px",J.appendChild(e),D.style.width=null!=g?g-40+"px":"190px",H.appendChild(J),u.appendChild(H)));null!=E&&(H=document.createElement("tr"),J=document.createElement("td"),J.colSpan=2,J.appendChild(E),H.appendChild(J),u.appendChild(H));H=document.createElement("tr");J=document.createElement("td");J.colSpan= -2;J.style.paddingTop=null!=f?"12px":"20px";J.style.whiteSpace="nowrap";J.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});f.className="geBtn";b.editor.cancelFirst&&J.appendChild(f);null!=K&&(g=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(K)}),g.className="geBtn",J.appendChild(g));mxEvent.addListener(D,"keypress",function(V){13==V.keyCode&&G.click()});J.appendChild(G);b.editor.cancelFirst||J.appendChild(f); -H.appendChild(J);u.appendChild(H);z.appendChild(u);this.container=z};FilenameDialog.filenameHelpLink=null; +var FilenameDialog=function(b,e,k,m,C,p,F,K,P,d,f,g,x){P=null!=P?P:!0;var y=document.createElement("table"),u=document.createElement("tbody");y.style.position="absolute";y.style.top="30px";y.style.left="20px";var H=document.createElement("tr");var J=document.createElement("td");J.style.textOverflow="ellipsis";J.style.textAlign="right";J.style.maxWidth=(x?x+15:100)+"px";J.style.fontSize="10pt";J.style.width=(x?x:84)+"px";mxUtils.write(J,(C||mxResources.get("filename"))+":");H.appendChild(J);var D= +document.createElement("input");D.setAttribute("value",e||"");D.style.marginLeft="4px";D.style.width=null!=g?g+"px":"180px";var G=mxUtils.button(k,function(){if(null==p||p(D.value))P&&b.hideDialog(),m(D.value)});G.className="geBtn gePrimaryBtn";this.init=function(){if(null!=C||null==F)if(D.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var W=y.parentNode;if(null!=W){var T=null;mxEvent.addListener(W,"dragleave", +function(Z){null!=T&&(T.style.backgroundColor="",T=null);Z.stopPropagation();Z.preventDefault()});mxEvent.addListener(W,"dragover",mxUtils.bind(this,function(Z){null==T&&(!mxClient.IS_IE||10<document.documentMode)&&(T=D,T.style.backgroundColor="#ebf2f9");Z.stopPropagation();Z.preventDefault()}));mxEvent.addListener(W,"drop",mxUtils.bind(this,function(Z){null!=T&&(T.style.backgroundColor="",T=null);0<=mxUtils.indexOf(Z.dataTransfer.types,"text/uri-list")&&(D.value=decodeURIComponent(Z.dataTransfer.getData("text/uri-list")), +G.click());Z.stopPropagation();Z.preventDefault()}))}}};J=document.createElement("td");J.style.whiteSpace="nowrap";J.appendChild(D);H.appendChild(J);if(null!=C||null==F)u.appendChild(H),null!=f&&(J.appendChild(FilenameDialog.createTypeHint(b,D,f)),null!=b.editor.diagramFileTypes&&(H=document.createElement("tr"),J=document.createElement("td"),J.style.textOverflow="ellipsis",J.style.textAlign="right",J.style.maxWidth="100px",J.style.fontSize="10pt",J.style.width="84px",mxUtils.write(J,mxResources.get("type")+ +":"),H.appendChild(J),J=document.createElement("td"),J.style.whiteSpace="nowrap",H.appendChild(J),e=FilenameDialog.createFileTypes(b,D,b.editor.diagramFileTypes),e.style.marginLeft="4px",e.style.width="198px",J.appendChild(e),D.style.width=null!=g?g-40+"px":"190px",H.appendChild(J),u.appendChild(H)));null!=F&&(H=document.createElement("tr"),J=document.createElement("td"),J.colSpan=2,J.appendChild(F),H.appendChild(J),u.appendChild(H));H=document.createElement("tr");J=document.createElement("td");J.colSpan= +2;J.style.paddingTop=null!=f?"12px":"20px";J.style.whiteSpace="nowrap";J.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});f.className="geBtn";b.editor.cancelFirst&&J.appendChild(f);null!=K&&(g=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(K)}),g.className="geBtn",J.appendChild(g));mxEvent.addListener(D,"keypress",function(W){13==W.keyCode&&G.click()});J.appendChild(G);b.editor.cancelFirst||J.appendChild(f); +H.appendChild(J);u.appendChild(H);y.appendChild(u);this.container=y};FilenameDialog.filenameHelpLink=null; FilenameDialog.createTypeHint=function(b,e,k){var m=document.createElement("img");m.style.backgroundPosition="center bottom";m.style.backgroundRepeat="no-repeat";m.style.margin="2px 0 0 4px";m.style.verticalAlign="top";m.style.cursor="pointer";m.style.height="16px";m.style.width="16px";mxUtils.setOpacity(m,70);var C=function(){m.setAttribute("src",Editor.helpImage);m.setAttribute("title",mxResources.get("help"));for(var p=0;p<k.length;p++)if(0<k[p].ext.length&&e.value.toLowerCase().substring(e.value.length- -k[p].ext.length-1)=="."+k[p].ext){m.setAttribute("title",mxResources.get(k[p].title));break}};mxEvent.addListener(e,"keyup",C);mxEvent.addListener(e,"change",C);mxEvent.addListener(m,"click",function(p){var E=m.getAttribute("title");m.getAttribute("src")==Editor.helpImage?b.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=E&&b.showError(null,E,mxResources.get("help"),function(){b.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(p)}); +k[p].ext.length-1)=="."+k[p].ext){m.setAttribute("title",mxResources.get(k[p].title));break}};mxEvent.addListener(e,"keyup",C);mxEvent.addListener(e,"change",C);mxEvent.addListener(m,"click",function(p){var F=m.getAttribute("title");m.getAttribute("src")==Editor.helpImage?b.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=F&&b.showError(null,F,mxResources.get("help"),function(){b.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(p)}); C();return m}; -FilenameDialog.createFileTypes=function(b,e,k){var m=document.createElement("select");for(b=0;b<k.length;b++){var C=document.createElement("option");C.setAttribute("value",b);mxUtils.write(C,mxResources.get(k[b].description)+" (."+k[b].extension+")");m.appendChild(C)}mxEvent.addListener(m,"change",function(p){p=k[m.value].extension;var E=e.value.lastIndexOf(".drawio.");E=0<E?E:e.value.lastIndexOf(".");"drawio"!=p&&(p="drawio."+p);e.value=0<E?e.value.substring(0,E+1)+p:e.value+"."+p;"createEvent"in -document?(p=document.createEvent("HTMLEvents"),p.initEvent("change",!1,!0),e.dispatchEvent(p)):e.fireEvent("onchange")});b=function(p){p=e.value.toLowerCase();for(var E=0,K=0;K<k.length;K++){var Q=k[K].extension,d=null;"drawio"!=Q&&(d=Q,Q=".drawio."+Q);if(p.substring(p.length-Q.length-1)=="."+Q||null!=d&&p.substring(p.length-d.length-1)=="."+d){E=K;break}}m.value=E};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return m}; -var WrapperWindow=function(b,e,k,m,C,p,E){var K=b.createSidebarContainer();E(K);this.window=new mxWindow(e,K,k,m,C,p,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);b.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(Q){null==Q&&(Q=window.event);return null!=Q&&b.isSelectionAllowed(Q)}))}; -(function(){mxGraphView.prototype.validateBackgroundPage=function(){var E=this.graph;if(null!=E.container&&!E.transparentBackground){if(E.pageVisible){var K=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var Q=E.container.firstChild;null!=Q&&Q.nodeType!=mxConstants.NODETYPE_ELEMENT;)Q=Q.nextSibling;null!=Q&&(this.backgroundPageShape=this.createBackgroundPageShape(K),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML, -this.backgroundPageShape.init(E.container),Q.style.position="absolute",E.container.insertBefore(this.backgroundPageShape.node,Q),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(d){E.dblClick(d)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(d){E.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){null!= -E.tooltipHandler&&E.tooltipHandler.isHideOnHover()&&E.tooltipHandler.hide();E.isMouseDown&&!mxEvent.isConsumed(d)&&E.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){E.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(d))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=K,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}}; -mxGraphView.prototype.validateBackgroundStyles=function(){var E=this.graph,K=null==E.background||E.background==mxConstants.NONE?E.defaultPageBackgroundColor:E.background,Q=null!=K&&this.gridColor!=K.toLowerCase()?this.gridColor:"#ffffff",d="none",f="";if(E.isGridEnabled()||E.gridVisible){f=10;mxClient.IS_SVG?(d=unescape(encodeURIComponent(this.createSvgGrid(Q))),d=window.btoa?btoa(d):Base64.encode(d,!0),d="url(data:image/svg+xml;base64,"+d+")",f=E.gridSize*this.scale*this.gridSteps):d="url("+this.gridImage+ -")";var g=Q=0;null!=E.view.backgroundPageShape&&(g=this.getBackgroundPageBounds(),Q=1+g.x,g=1+g.y);f=-Math.round(f-mxUtils.mod(this.translate.x*this.scale-Q,f))+"px "+-Math.round(f-mxUtils.mod(this.translate.y*this.scale-g,f))+"px"}Q=E.view.canvas;null!=Q.ownerSVGElement&&(Q=Q.ownerSVGElement);null!=E.view.backgroundPageShape?(E.view.backgroundPageShape.node.style.backgroundPosition=f,E.view.backgroundPageShape.node.style.backgroundImage=d,E.view.backgroundPageShape.node.style.backgroundColor=K,E.view.backgroundPageShape.node.style.borderColor= -E.defaultPageBorderColor,E.container.className="geDiagramContainer geDiagramBackdrop",Q.style.backgroundImage="none",Q.style.backgroundColor=""):(E.container.className="geDiagramContainer",Q.style.backgroundPosition=f,Q.style.backgroundColor=K,Q.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(E){for(var K=this.graph.gridSize*this.scale;K<this.minGridSize;)K*=2;for(var Q=this.gridSteps*K,d=[],f=1;f<this.gridSteps;f++){var g=f*K;d.push("M 0 "+g+" L "+Q+" "+g+" M "+g+" 0 L "+g+ -" "+Q)}return'<svg width="'+Q+'" height="'+Q+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+Q+'" height="'+Q+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+E+'" opacity="0.2" stroke-width="1"/><path d="M '+Q+" 0 L 0 0 0 "+Q+'" fill="none" stroke="'+E+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,K){b.apply(this,arguments); -if(null!=this.shiftPreview1){var Q=this.view.canvas;null!=Q.ownerSVGElement&&(Q=Q.ownerSVGElement);var d=this.gridSize*this.view.scale*this.view.gridSteps;d=-Math.round(d-mxUtils.mod(this.view.translate.x*this.view.scale+E,d))+"px "+-Math.round(d-mxUtils.mod(this.view.translate.y*this.view.scale+K,d))+"px";Q.style.backgroundPosition=d}};mxGraph.prototype.updatePageBreaks=function(E,K,Q){var d=this.view.scale,f=this.view.translate,g=this.pageFormat,x=d*this.pageScale,z=this.view.getBackgroundPageBounds(); -K=z.width;Q=z.height;var u=new mxRectangle(d*f.x,d*f.y,g.width*x,g.height*x),H=(E=E&&Math.min(u.width,u.height)>this.minPageBreakDist)?Math.ceil(Q/u.height)-1:0,J=E?Math.ceil(K/u.width)-1:0,D=z.x+K,G=z.y+Q;null==this.horizontalPageBreaks&&0<H&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<J&&(this.verticalPageBreaks=[]);E=mxUtils.bind(this,function(V){if(null!=V){for(var U=V==this.horizontalPageBreaks?H:J,Y=0;Y<=U;Y++){var O=V==this.horizontalPageBreaks?[new mxPoint(Math.round(z.x), -Math.round(z.y+(Y+1)*u.height)),new mxPoint(Math.round(D),Math.round(z.y+(Y+1)*u.height))]:[new mxPoint(Math.round(z.x+(Y+1)*u.width),Math.round(z.y)),new mxPoint(Math.round(z.x+(Y+1)*u.width),Math.round(G))];null!=V[Y]?(V[Y].points=O,V[Y].redraw()):(O=new mxPolyline(O,this.pageBreakColor),O.dialect=this.dialect,O.isDashed=this.pageBreakDashed,O.pointerEvents=!1,O.init(this.view.backgroundPane),O.redraw(),V[Y]=O)}for(Y=U;Y<V.length;Y++)V[Y].destroy();V.splice(U,V.length-U)}});E(this.horizontalPageBreaks); -E(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(E,K,Q){for(var d=0;d<K.length;d++){if(this.graph.isTableCell(K[d])||this.graph.isTableRow(K[d]))return!1;if(this.graph.getModel().isVertex(K[d])){var f=this.graph.getCellGeometry(K[d]);if(null!=f&&f.relative)return!1}}return e.apply(this,arguments)};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var E= -k.apply(this,arguments);E.intersects=mxUtils.bind(this,function(K,Q){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(E,arguments)});return E};mxGraphView.prototype.createBackgroundPageShape=function(E){return new mxRectangleShape(E,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var E=this.getGraphBounds(),K=0<E.width?E.x/this.scale-this.translate.x:0,Q=0<E.height?E.y/this.scale-this.translate.y:0,d=this.graph.pageFormat, -f=this.graph.pageScale,g=d.width*f;d=d.height*f;f=Math.floor(Math.min(0,K)/g);var x=Math.floor(Math.min(0,Q)/d);return new mxRectangle(this.scale*(this.translate.x+f*g),this.scale*(this.translate.y+x*d),this.scale*(Math.ceil(Math.max(1,K+E.width/this.scale)/g)-f)*g,this.scale*(Math.ceil(Math.max(1,Q+E.height/this.scale)/d)-x)*d)};var m=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,K){m.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape|| -this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=E+"px",this.view.backgroundPageShape.node.style.marginTop=K+"px")};var C=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(E,K,Q,d,f,g){var x=C.apply(this,arguments);null==g||g||mxEvent.addListener(x,"mousedown",function(z){mxEvent.consume(z)});return x};var p=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell= -function(E,K,Q){var d=this.graph.model.getParent(E);if(K){var f=this.graph.model.isEdge(E)?null:this.graph.getCellGeometry(E);f=!this.graph.model.isEdge(d)&&!this.graph.isSiblingSelected(E)&&(null!=f&&f.relative||!this.graph.isContainer(d)||this.graph.isPart(E))}else if(f=p.apply(this,arguments),this.graph.isTableCell(E)||this.graph.isTableRow(E))f=d,this.graph.isTable(f)||(f=this.graph.model.getParent(f)),f=!this.graph.selectionCellsHandler.isHandled(f)||this.graph.isCellSelected(f)&&this.graph.isToggleEvent(Q.getEvent())|| -this.graph.isCellSelected(E)&&!this.graph.isToggleEvent(Q.getEvent())||this.graph.isTableCell(E)&&this.graph.isCellSelected(d);return f};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(E){E=E.getCell();for(var K=this.graph.getModel(),Q=K.getParent(E),d=this.graph.view.getState(Q),f=this.graph.isCellSelected(E);null!=d&&(K.isVertex(Q)||K.isEdge(Q));){var g=this.graph.isCellSelected(Q);f=f||g;if(g||!f&&(this.graph.isTableCell(E)||this.graph.isTableRow(E)))E=Q;Q=K.getParent(Q)}return E}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var m=this.editor.graph;m.lightbox=k;var C=m.getGraphBounds;m.getGraphBounds=function(){var P=C.apply(this,arguments),ca=this.backgroundImage;if(null!=ca&&null!=ca.width&&null!=ca.height){var ja=this.view.translate,ka=this.view.scale;P=mxRectangle.fromRectangle(P);P.add(new mxRectangle((ja.x+ca.x)*ka,(ja.y+ca.y)*ka,ca.width*ka,ca.height*ka))}return P};m.useCssTransforms&& -(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(P,ca){this.clearSelectionState()});m.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener); -m.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);m.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);m.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);m.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,m.isEnabled=function(){return!1},m.panningHandler.isForcePanningEvent=function(P){return!mxEvent.isPopupTrigger(P.getEvent())});this.actions=new Actions(this);this.menus= -this.createMenus();if(!m.standalone){var p="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents strokeColor strokeWidth".split(" "),E="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "), -K="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),Q=!1,d=!1;this.setDefaultStyle=function(P){try{m.getModel().isEdge(P)?d=!1:Q=!1;var ca=m.getCellStyle(P,!1),ja=[],ka=[],q;for(q in ca)ja.push(ca[q]),ka.push(q);m.getModel().isEdge(P)?m.currentEdgeStyle={}:m.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ka,"values",ja,"cells",[P]));m.getModel().isEdge(P)?d=!0:Q=!0}catch(F){this.handleError(F)}}; -this.clearDefaultStyle=function(){m.currentEdgeStyle=mxUtils.clone(m.defaultEdgeStyle);m.currentVertexStyle=mxUtils.clone(m.defaultVertexStyle);Q=d=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var f=["fontFamily","fontSource","fontSize","fontColor"];for(e=0;e<f.length;e++)0>mxUtils.indexOf(p,f[e])&&p.push(f[e]);var g="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),x=[["startArrow","startFill","endArrow","endFill"],["startSize", -"endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(e=0;e<x.length;e++)for(k=0;k<x[e].length;k++)p.push(x[e][k]);for(e=0;e<E.length;e++)0>mxUtils.indexOf(p,E[e])&&p.push(E[e]);var z=function(P,ca,ja,ka,q,F,R){ka=null!=ka?ka:m.currentVertexStyle;q=null!=q?q:m.currentEdgeStyle;F=null!=F?F:!0;ja=null!=ja?ja:m.getModel();if(R){R=[];for(var W=0;W<P.length;W++)R=R.concat(ja.getDescendants(P[W]));P=R}ja.beginUpdate(); -try{for(W=0;W<P.length;W++){var T=P[W];if(ca)var ba=["fontSize","fontFamily","fontColor"];else{var ha=ja.getStyle(T),ra=null!=ha?ha.split(";"):[];ba=p.slice();for(var ta=0;ta<ra.length;ta++){var ma=ra[ta],pa=ma.indexOf("=");if(0<=pa){var za=ma.substring(0,pa),Ba=mxUtils.indexOf(ba,za);0<=Ba&&ba.splice(Ba,1);for(R=0;R<x.length;R++){var Ia=x[R];if(0<=mxUtils.indexOf(Ia,za))for(var Aa=0;Aa<Ia.length;Aa++){var Ka=mxUtils.indexOf(ba,Ia[Aa]);0<=Ka&&ba.splice(Ka,1)}}}}}var Da=ja.isEdge(T);R=Da?q:ka;var Ra= -ja.getStyle(T);for(ta=0;ta<ba.length;ta++){za=ba[ta];var Qa=R[za];null!=Qa&&"edgeStyle"!=za&&("shape"!=za||Da)&&(!Da||F||0>mxUtils.indexOf(K,za))&&(Ra=mxUtils.setStyle(Ra,za,Qa))}Editor.simpleLabels&&(Ra=mxUtils.setStyle(mxUtils.setStyle(Ra,"html",null),"whiteSpace",null));ja.setStyle(T,Ra)}}finally{ja.endUpdate()}return P};m.addListener("cellsInserted",function(P,ca){z(ca.getProperty("cells"),null,null,null,null,!0,!0)});m.addListener("textInserted",function(P,ca){z(ca.getProperty("cells"),!0)}); -this.insertHandler=z;this.createDivs();this.createUi();this.refresh();var u=mxUtils.bind(this,function(P){null==P&&(P=window.event);return m.isEditing()||null!=P&&this.isSelectionAllowed(P)});this.container==document.body&&(this.menubarContainer.onselectstart=u,this.menubarContainer.onmousedown=u,this.toolbarContainer.onselectstart=u,this.toolbarContainer.onmousedown=u,this.diagramContainer.onselectstart=u,this.diagramContainer.onmousedown=u,this.sidebarContainer.onselectstart=u,this.sidebarContainer.onmousedown= -u,this.formatContainer.onselectstart=u,this.formatContainer.onmousedown=u,this.footerContainer.onselectstart=u,this.footerContainer.onmousedown=u,null!=this.tabContainer&&(this.tabContainer.onselectstart=u));!this.editor.chromeless||this.editor.editable?(e=function(P){if(null!=P){var ca=mxEvent.getSource(P);if("A"==ca.nodeName)for(;null!=ca;){if("geHint"==ca.className)return!0;ca=ca.parentNode}}return u(P)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer, -"contextmenu",e):this.diagramContainer.oncontextmenu=e):m.panningHandler.usePopupTrigger=!1;m.init(this.diagramContainer);mxClient.IS_SVG&&null!=m.view.getDrawPane()&&(e=m.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=m.graphHandler){var H=m.graphHandler.start;m.graphHandler.start=function(){null!=da.hoverIcons&&da.hoverIcons.reset();H.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this, -function(P){var ca=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(P)-ca.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(P)-ca.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var J=!1,D=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(P,ca){return J||D.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(P){32!=P.which||m.isEditing()? -mxEvent.isConsumed(P)||27!=P.keyCode||this.hideDialog(null,!0):(J=!0,this.hoverIcons.reset(),m.container.style.cursor="move",m.isEditing()||mxEvent.getSource(P)!=m.container||mxEvent.consume(P))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(P){m.container.style.cursor="";J=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var G=m.panningHandler.isForcePanningEvent;m.panningHandler.isForcePanningEvent=function(P){return G.apply(this, -arguments)||J||mxEvent.isMouseEvent(P.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(P.getEvent()))&&(!mxEvent.isControlDown(P.getEvent())&&mxEvent.isRightMouseButton(P.getEvent())||mxEvent.isMiddleMouseButton(P.getEvent()))};var V=m.cellEditor.isStopEditingEvent;m.cellEditor.isStopEditingEvent=function(P){return V.apply(this,arguments)||13==P.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(P)||mxClient.IS_MAC&&mxEvent.isMetaDown(P)||mxClient.IS_SF&&mxEvent.isShiftDown(P))};var U=m.isZoomWheelEvent; -m.isZoomWheelEvent=function(){return J||U.apply(this,arguments)};var Y=!1,O=null,qa=null,oa=null,aa=mxUtils.bind(this,function(){if(null!=this.toolbar&&Y!=m.cellEditor.isContentEditing()){for(var P=this.toolbar.container.firstChild,ca=[];null!=P;){var ja=P.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,P)&&(P.parentNode.removeChild(P),ca.push(P));P=ja}P=this.toolbar.fontMenu;ja=this.toolbar.sizeMenu;if(null==oa)this.toolbar.createTextToolbar();else{for(var ka=0;ka<oa.length;ka++)this.toolbar.container.appendChild(oa[ka]); -this.toolbar.fontMenu=O;this.toolbar.sizeMenu=qa}Y=m.cellEditor.isContentEditing();O=P;qa=ja;oa=ca}}),da=this,ia=m.cellEditor.startEditing;m.cellEditor.startEditing=function(){ia.apply(this,arguments);aa();if(m.cellEditor.isContentEditing()){var P=!1,ca=function(){P||(P=!0,window.setTimeout(function(){var ja=m.getSelectedEditingElement();null!=ja&&(ja=mxUtils.getCurrentStyle(ja),null!=ja&&null!=da.toolbar&&(da.toolbar.setFontName(Graph.stripQuotes(ja.fontFamily)),da.toolbar.setFontSize(parseInt(ja.fontSize)))); -P=!1},0))};mxEvent.addListener(m.cellEditor.textarea,"input",ca);mxEvent.addListener(m.cellEditor.textarea,"touchend",ca);mxEvent.addListener(m.cellEditor.textarea,"mouseup",ca);mxEvent.addListener(m.cellEditor.textarea,"keyup",ca);ca()}};var L=m.cellEditor.stopEditing;m.cellEditor.stopEditing=function(P,ca){try{L.apply(this,arguments),aa()}catch(ja){da.handleError(ja)}};m.container.setAttribute("tabindex","0");m.container.style.cursor="default";if(window.self===window.top&&null!=m.container.parentNode)try{m.container.focus()}catch(P){}var Z= -m.fireMouseEvent;m.fireMouseEvent=function(P,ca,ja){P==mxEvent.MOUSE_DOWN&&this.container.focus();Z.apply(this,arguments)};m.popupMenuHandler.autoExpand=!0;null!=this.menus&&(m.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(P,ca,ja){this.menus.createPopupMenu(P,ca,ja)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(P){m.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};m.connectionHandler.addListener(mxEvent.CONNECT, -function(P,ca){var ja=[ca.getProperty("cell")];ca.getProperty("terminalInserted")&&(ja.push(ca.getProperty("terminal")),window.setTimeout(function(){null!=da.hoverIcons&&da.hoverIcons.update(m.view.getState(ja[ja.length-1]))},0));z(ja)});this.addListener("styleChanged",mxUtils.bind(this,function(P,ca){var ja=ca.getProperty("cells"),ka=P=!1;if(0<ja.length)for(var q=0;q<ja.length&&(P=m.getModel().isVertex(ja[q])||P,!(ka=m.getModel().isEdge(ja[q])||ka)||!P);q++);else ka=P=!0;P=P&&!Q;ka=ka&&!d;ja=ca.getProperty("keys"); -ca=ca.getProperty("values");for(q=0;q<ja.length;q++){var F=0<=mxUtils.indexOf(f,ja[q]);if("strokeColor"!=ja[q]||null!=ca[q]&&"none"!=ca[q])if(0<=mxUtils.indexOf(E,ja[q]))ka||0<=mxUtils.indexOf(g,ja[q])?null==ca[q]?delete m.currentEdgeStyle[ja[q]]:m.currentEdgeStyle[ja[q]]=ca[q]:P&&0<=mxUtils.indexOf(p,ja[q])&&(null==ca[q]?delete m.currentVertexStyle[ja[q]]:m.currentVertexStyle[ja[q]]=ca[q]);else if(0<=mxUtils.indexOf(p,ja[q])){if(P||F)null==ca[q]?delete m.currentVertexStyle[ja[q]]:m.currentVertexStyle[ja[q]]= -ca[q];if(ka||F||0<=mxUtils.indexOf(g,ja[q]))null==ca[q]?delete m.currentEdgeStyle[ja[q]]:m.currentEdgeStyle[ja[q]]=ca[q]}}null!=this.toolbar&&(this.toolbar.setFontName(m.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(m.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==m.currentEdgeStyle.edgeStyle&&"1"==m.currentEdgeStyle.curved? +FilenameDialog.createFileTypes=function(b,e,k){var m=document.createElement("select");for(b=0;b<k.length;b++){var C=document.createElement("option");C.setAttribute("value",b);mxUtils.write(C,mxResources.get(k[b].description)+" (."+k[b].extension+")");m.appendChild(C)}mxEvent.addListener(m,"change",function(p){p=k[m.value].extension;var F=e.value.lastIndexOf(".drawio.");F=0<F?F:e.value.lastIndexOf(".");"drawio"!=p&&(p="drawio."+p);e.value=0<F?e.value.substring(0,F+1)+p:e.value+"."+p;"createEvent"in +document?(p=document.createEvent("HTMLEvents"),p.initEvent("change",!1,!0),e.dispatchEvent(p)):e.fireEvent("onchange")});b=function(p){p=e.value.toLowerCase();for(var F=0,K=0;K<k.length;K++){var P=k[K].extension,d=null;"drawio"!=P&&(d=P,P=".drawio."+P);if(p.substring(p.length-P.length-1)=="."+P||null!=d&&p.substring(p.length-d.length-1)=="."+d){F=K;break}}m.value=F};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return m}; +var WrapperWindow=function(b,e,k,m,C,p,F){var K=b.createSidebarContainer();F(K);this.window=new mxWindow(e,K,k,m,C,p,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);b.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(P){null==P&&(P=window.event);return null!=P&&b.isSelectionAllowed(P)}))}; +(function(){mxGraphView.prototype.validateBackgroundPage=function(){var F=this.graph;if(null!=F.container&&!F.transparentBackground){if(F.pageVisible){var K=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var P=F.container.firstChild;null!=P&&P.nodeType!=mxConstants.NODETYPE_ELEMENT;)P=P.nextSibling;null!=P&&(this.backgroundPageShape=this.createBackgroundPageShape(K),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML, +this.backgroundPageShape.init(F.container),P.style.position="absolute",F.container.insertBefore(this.backgroundPageShape.node,P),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(d){F.dblClick(d)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(d){F.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){null!= +F.tooltipHandler&&F.tooltipHandler.isHideOnHover()&&F.tooltipHandler.hide();F.isMouseDown&&!mxEvent.isConsumed(d)&&F.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){F.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(d))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=K,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}}; +mxGraphView.prototype.validateBackgroundStyles=function(){var F=this.graph,K=null==F.background||F.background==mxConstants.NONE?F.defaultPageBackgroundColor:F.background,P=null!=K&&this.gridColor!=K.toLowerCase()?this.gridColor:"#ffffff",d="none",f="";if(F.isGridEnabled()||F.gridVisible){f=10;mxClient.IS_SVG?(d=unescape(encodeURIComponent(this.createSvgGrid(P))),d=window.btoa?btoa(d):Base64.encode(d,!0),d="url(data:image/svg+xml;base64,"+d+")",f=F.gridSize*this.scale*this.gridSteps):d="url("+this.gridImage+ +")";var g=P=0;null!=F.view.backgroundPageShape&&(g=this.getBackgroundPageBounds(),P=1+g.x,g=1+g.y);f=-Math.round(f-mxUtils.mod(this.translate.x*this.scale-P,f))+"px "+-Math.round(f-mxUtils.mod(this.translate.y*this.scale-g,f))+"px"}P=F.view.canvas;null!=P.ownerSVGElement&&(P=P.ownerSVGElement);null!=F.view.backgroundPageShape?(F.view.backgroundPageShape.node.style.backgroundPosition=f,F.view.backgroundPageShape.node.style.backgroundImage=d,F.view.backgroundPageShape.node.style.backgroundColor=K,F.view.backgroundPageShape.node.style.borderColor= +F.defaultPageBorderColor,F.container.className="geDiagramContainer geDiagramBackdrop",P.style.backgroundImage="none",P.style.backgroundColor=""):(F.container.className="geDiagramContainer",P.style.backgroundPosition=f,P.style.backgroundColor=K,P.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(F){for(var K=this.graph.gridSize*this.scale;K<this.minGridSize;)K*=2;for(var P=this.gridSteps*K,d=[],f=1;f<this.gridSteps;f++){var g=f*K;d.push("M 0 "+g+" L "+P+" "+g+" M "+g+" 0 L "+g+ +" "+P)}return'<svg width="'+P+'" height="'+P+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+P+'" height="'+P+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+F+'" opacity="0.2" stroke-width="1"/><path d="M '+P+" 0 L 0 0 0 "+P+'" fill="none" stroke="'+F+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(F,K){b.apply(this,arguments); +if(null!=this.shiftPreview1){var P=this.view.canvas;null!=P.ownerSVGElement&&(P=P.ownerSVGElement);var d=this.gridSize*this.view.scale*this.view.gridSteps;d=-Math.round(d-mxUtils.mod(this.view.translate.x*this.view.scale+F,d))+"px "+-Math.round(d-mxUtils.mod(this.view.translate.y*this.view.scale+K,d))+"px";P.style.backgroundPosition=d}};mxGraph.prototype.updatePageBreaks=function(F,K,P){var d=this.view.scale,f=this.view.translate,g=this.pageFormat,x=d*this.pageScale,y=this.view.getBackgroundPageBounds(); +K=y.width;P=y.height;var u=new mxRectangle(d*f.x,d*f.y,g.width*x,g.height*x),H=(F=F&&Math.min(u.width,u.height)>this.minPageBreakDist)?Math.ceil(P/u.height)-1:0,J=F?Math.ceil(K/u.width)-1:0,D=y.x+K,G=y.y+P;null==this.horizontalPageBreaks&&0<H&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<J&&(this.verticalPageBreaks=[]);F=mxUtils.bind(this,function(W){if(null!=W){for(var T=W==this.horizontalPageBreaks?H:J,Z=0;Z<=T;Z++){var N=W==this.horizontalPageBreaks?[new mxPoint(Math.round(y.x), +Math.round(y.y+(Z+1)*u.height)),new mxPoint(Math.round(D),Math.round(y.y+(Z+1)*u.height))]:[new mxPoint(Math.round(y.x+(Z+1)*u.width),Math.round(y.y)),new mxPoint(Math.round(y.x+(Z+1)*u.width),Math.round(G))];null!=W[Z]?(W[Z].points=N,W[Z].redraw()):(N=new mxPolyline(N,this.pageBreakColor),N.dialect=this.dialect,N.isDashed=this.pageBreakDashed,N.pointerEvents=!1,N.init(this.view.backgroundPane),N.redraw(),W[Z]=N)}for(Z=T;Z<W.length;Z++)W[Z].destroy();W.splice(T,W.length-T)}});F(this.horizontalPageBreaks); +F(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(F,K,P){for(var d=0;d<K.length;d++){if(this.graph.isTableCell(K[d])||this.graph.isTableRow(K[d]))return!1;if(this.graph.getModel().isVertex(K[d])){var f=this.graph.getCellGeometry(K[d]);if(null!=f&&f.relative)return!1}}return e.apply(this,arguments)};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var F= +k.apply(this,arguments);F.intersects=mxUtils.bind(this,function(K,P){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(F,arguments)});return F};mxGraphView.prototype.createBackgroundPageShape=function(F){return new mxRectangleShape(F,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var F=this.getGraphBounds(),K=0<F.width?F.x/this.scale-this.translate.x:0,P=0<F.height?F.y/this.scale-this.translate.y:0,d=this.graph.pageFormat, +f=this.graph.pageScale,g=d.width*f;d=d.height*f;f=Math.floor(Math.min(0,K)/g);var x=Math.floor(Math.min(0,P)/d);return new mxRectangle(this.scale*(this.translate.x+f*g),this.scale*(this.translate.y+x*d),this.scale*(Math.ceil(Math.max(1,K+F.width/this.scale)/g)-f)*g,this.scale*(Math.ceil(Math.max(1,P+F.height/this.scale)/d)-x)*d)};var m=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(F,K){m.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape|| +this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=F+"px",this.view.backgroundPageShape.node.style.marginTop=K+"px")};var C=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(F,K,P,d,f,g){var x=C.apply(this,arguments);null==g||g||mxEvent.addListener(x,"mousedown",function(y){mxEvent.consume(y)});return x};var p=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell= +function(F,K,P){var d=this.graph.model.getParent(F);if(K){var f=this.graph.model.isEdge(F)?null:this.graph.getCellGeometry(F);f=!this.graph.model.isEdge(d)&&!this.graph.isSiblingSelected(F)&&(null!=f&&f.relative||!this.graph.isContainer(d)||this.graph.isPart(F))}else if(f=p.apply(this,arguments),this.graph.isTableCell(F)||this.graph.isTableRow(F))f=d,this.graph.isTable(f)||(f=this.graph.model.getParent(f)),f=!this.graph.selectionCellsHandler.isHandled(f)||this.graph.isCellSelected(f)&&this.graph.isToggleEvent(P.getEvent())|| +this.graph.isCellSelected(F)&&!this.graph.isToggleEvent(P.getEvent())||this.graph.isTableCell(F)&&this.graph.isCellSelected(d);return f};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(F){F=F.getCell();for(var K=this.graph.getModel(),P=K.getParent(F),d=this.graph.view.getState(P),f=this.graph.isCellSelected(F);null!=d&&(K.isVertex(P)||K.isEdge(P));){var g=this.graph.isCellSelected(P);f=f||g;if(g||!f&&(this.graph.isTableCell(F)||this.graph.isTableRow(F)))F=P;P=K.getParent(P)}return F}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var m=this.editor.graph;m.lightbox=k;var C=m.getGraphBounds;m.getGraphBounds=function(){var X=C.apply(this,arguments),ja=this.backgroundImage;if(null!=ja&&null!=ja.width&&null!=ja.height){var ca=this.view.translate,ka=this.view.scale;X=mxRectangle.fromRectangle(X);X.add(new mxRectangle((ca.x+ja.x)*ka,(ca.y+ja.y)*ka,ja.width*ka,ja.height*ka))}return X};m.useCssTransforms&& +(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(X,ja){this.clearSelectionState()});m.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener); +m.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);m.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);m.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);m.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,m.isEnabled=function(){return!1},m.panningHandler.isForcePanningEvent=function(X){return!mxEvent.isPopupTrigger(X.getEvent())});this.actions=new Actions(this);this.menus= +this.createMenus();if(!m.standalone){var p="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents strokeColor strokeWidth".split(" "),F="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "), +K="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),P=!1,d=!1;this.setDefaultStyle=function(X){try{m.getModel().isEdge(X)?d=!1:P=!1;var ja=m.getCellStyle(X,!1),ca=[],ka=[],q;for(q in ja)ca.push(ja[q]),ka.push(q);m.getModel().isEdge(X)?m.currentEdgeStyle={}:m.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ka,"values",ca,"cells",[X]));m.getModel().isEdge(X)?d=!0:P=!0}catch(E){this.handleError(E)}}; +this.clearDefaultStyle=function(){m.currentEdgeStyle=mxUtils.clone(m.defaultEdgeStyle);m.currentVertexStyle=mxUtils.clone(m.defaultVertexStyle);P=d=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var f=["fontFamily","fontSource","fontSize","fontColor"];for(e=0;e<f.length;e++)0>mxUtils.indexOf(p,f[e])&&p.push(f[e]);var g="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),x=[["startArrow","startFill","endArrow","endFill"],["startSize", +"endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(e=0;e<x.length;e++)for(k=0;k<x[e].length;k++)p.push(x[e][k]);for(e=0;e<F.length;e++)0>mxUtils.indexOf(p,F[e])&&p.push(F[e]);var y=function(X,ja,ca,ka,q,E,Q){ka=null!=ka?ka:m.currentVertexStyle;q=null!=q?q:m.currentEdgeStyle;E=null!=E?E:!0;ca=null!=ca?ca:m.getModel();if(Q){Q=[];for(var Y=0;Y<X.length;Y++)Q=Q.concat(ca.getDescendants(X[Y]));X=Q}ca.beginUpdate(); +try{for(Y=0;Y<X.length;Y++){var R=X[Y];if(ja)var ba=["fontSize","fontFamily","fontColor"];else{var ea=ca.getStyle(R),ra=null!=ea?ea.split(";"):[];ba=p.slice();for(var ta=0;ta<ra.length;ta++){var la=ra[ta],pa=la.indexOf("=");if(0<=pa){var xa=la.substring(0,pa),Ca=mxUtils.indexOf(ba,xa);0<=Ca&&ba.splice(Ca,1);for(Q=0;Q<x.length;Q++){var Ia=x[Q];if(0<=mxUtils.indexOf(Ia,xa))for(var Aa=0;Aa<Ia.length;Aa++){var La=mxUtils.indexOf(ba,Ia[Aa]);0<=La&&ba.splice(La,1)}}}}}var Da=ca.isEdge(R);Q=Da?q:ka;var Sa= +ca.getStyle(R);for(ta=0;ta<ba.length;ta++){xa=ba[ta];var Ra=Q[xa];null!=Ra&&"edgeStyle"!=xa&&("shape"!=xa||Da)&&(!Da||E||0>mxUtils.indexOf(K,xa))&&(Sa=mxUtils.setStyle(Sa,xa,Ra))}Editor.simpleLabels&&(Sa=mxUtils.setStyle(mxUtils.setStyle(Sa,"html",null),"whiteSpace",null));ca.setStyle(R,Sa)}}finally{ca.endUpdate()}return X};m.addListener("cellsInserted",function(X,ja){y(ja.getProperty("cells"),null,null,null,null,!0,!0)});m.addListener("textInserted",function(X,ja){y(ja.getProperty("cells"),!0)}); +this.insertHandler=y;this.createDivs();this.createUi();this.refresh();var u=mxUtils.bind(this,function(X){null==X&&(X=window.event);return m.isEditing()||null!=X&&this.isSelectionAllowed(X)});this.container==document.body&&(this.menubarContainer.onselectstart=u,this.menubarContainer.onmousedown=u,this.toolbarContainer.onselectstart=u,this.toolbarContainer.onmousedown=u,this.diagramContainer.onselectstart=u,this.diagramContainer.onmousedown=u,this.sidebarContainer.onselectstart=u,this.sidebarContainer.onmousedown= +u,this.formatContainer.onselectstart=u,this.formatContainer.onmousedown=u,this.footerContainer.onselectstart=u,this.footerContainer.onmousedown=u,null!=this.tabContainer&&(this.tabContainer.onselectstart=u));!this.editor.chromeless||this.editor.editable?(e=function(X){if(null!=X){var ja=mxEvent.getSource(X);if("A"==ja.nodeName)for(;null!=ja;){if("geHint"==ja.className)return!0;ja=ja.parentNode}}return u(X)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer, +"contextmenu",e):this.diagramContainer.oncontextmenu=e):m.panningHandler.usePopupTrigger=!1;m.init(this.diagramContainer);mxClient.IS_SVG&&null!=m.view.getDrawPane()&&(e=m.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=m.graphHandler){var H=m.graphHandler.start;m.graphHandler.start=function(){null!=fa.hoverIcons&&fa.hoverIcons.reset();H.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this, +function(X){var ja=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(X)-ja.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(X)-ja.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var J=!1,D=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(X,ja){return J||D.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(X){32!=X.which||m.isEditing()? +mxEvent.isConsumed(X)||27!=X.keyCode||this.hideDialog(null,!0):(J=!0,this.hoverIcons.reset(),m.container.style.cursor="move",m.isEditing()||mxEvent.getSource(X)!=m.container||mxEvent.consume(X))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(X){m.container.style.cursor="";J=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var G=m.panningHandler.isForcePanningEvent;m.panningHandler.isForcePanningEvent=function(X){return G.apply(this, +arguments)||J||mxEvent.isMouseEvent(X.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(X.getEvent()))&&(!mxEvent.isControlDown(X.getEvent())&&mxEvent.isRightMouseButton(X.getEvent())||mxEvent.isMiddleMouseButton(X.getEvent()))};var W=m.cellEditor.isStopEditingEvent;m.cellEditor.isStopEditingEvent=function(X){return W.apply(this,arguments)||13==X.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(X)||mxClient.IS_MAC&&mxEvent.isMetaDown(X)||mxClient.IS_SF&&mxEvent.isShiftDown(X))};var T=m.isZoomWheelEvent; +m.isZoomWheelEvent=function(){return J||T.apply(this,arguments)};var Z=!1,N=null,qa=null,oa=null,S=mxUtils.bind(this,function(){if(null!=this.toolbar&&Z!=m.cellEditor.isContentEditing()){for(var X=this.toolbar.container.firstChild,ja=[];null!=X;){var ca=X.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,X)&&(X.parentNode.removeChild(X),ja.push(X));X=ca}X=this.toolbar.fontMenu;ca=this.toolbar.sizeMenu;if(null==oa)this.toolbar.createTextToolbar();else{for(var ka=0;ka<oa.length;ka++)this.toolbar.container.appendChild(oa[ka]); +this.toolbar.fontMenu=N;this.toolbar.sizeMenu=qa}Z=m.cellEditor.isContentEditing();N=X;qa=ca;oa=ja}}),fa=this,ia=m.cellEditor.startEditing;m.cellEditor.startEditing=function(){ia.apply(this,arguments);S();if(m.cellEditor.isContentEditing()){var X=!1,ja=function(){X||(X=!0,window.setTimeout(function(){var ca=m.getSelectedEditingElement();null!=ca&&(ca=mxUtils.getCurrentStyle(ca),null!=ca&&null!=fa.toolbar&&(fa.toolbar.setFontName(Graph.stripQuotes(ca.fontFamily)),fa.toolbar.setFontSize(parseInt(ca.fontSize)))); +X=!1},0))};mxEvent.addListener(m.cellEditor.textarea,"input",ja);mxEvent.addListener(m.cellEditor.textarea,"touchend",ja);mxEvent.addListener(m.cellEditor.textarea,"mouseup",ja);mxEvent.addListener(m.cellEditor.textarea,"keyup",ja);ja()}};var M=m.cellEditor.stopEditing;m.cellEditor.stopEditing=function(X,ja){try{M.apply(this,arguments),S()}catch(ca){fa.handleError(ca)}};m.container.setAttribute("tabindex","0");m.container.style.cursor="default";if(window.self===window.top&&null!=m.container.parentNode)try{m.container.focus()}catch(X){}var aa= +m.fireMouseEvent;m.fireMouseEvent=function(X,ja,ca){X==mxEvent.MOUSE_DOWN&&this.container.focus();aa.apply(this,arguments)};m.popupMenuHandler.autoExpand=!0;null!=this.menus&&(m.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(X,ja,ca){this.menus.createPopupMenu(X,ja,ca)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(X){m.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};m.connectionHandler.addListener(mxEvent.CONNECT, +function(X,ja){var ca=[ja.getProperty("cell")];ja.getProperty("terminalInserted")&&(ca.push(ja.getProperty("terminal")),window.setTimeout(function(){null!=fa.hoverIcons&&fa.hoverIcons.update(m.view.getState(ca[ca.length-1]))},0));y(ca)});this.addListener("styleChanged",mxUtils.bind(this,function(X,ja){var ca=ja.getProperty("cells"),ka=X=!1;if(0<ca.length)for(var q=0;q<ca.length&&(X=m.getModel().isVertex(ca[q])||X,!(ka=m.getModel().isEdge(ca[q])||ka)||!X);q++);else ka=X=!0;X=X&&!P;ka=ka&&!d;ca=ja.getProperty("keys"); +ja=ja.getProperty("values");for(q=0;q<ca.length;q++){var E=0<=mxUtils.indexOf(f,ca[q]);if("strokeColor"!=ca[q]||null!=ja[q]&&"none"!=ja[q])if(0<=mxUtils.indexOf(F,ca[q]))ka||0<=mxUtils.indexOf(g,ca[q])?null==ja[q]?delete m.currentEdgeStyle[ca[q]]:m.currentEdgeStyle[ca[q]]=ja[q]:X&&0<=mxUtils.indexOf(p,ca[q])&&(null==ja[q]?delete m.currentVertexStyle[ca[q]]:m.currentVertexStyle[ca[q]]=ja[q]);else if(0<=mxUtils.indexOf(p,ca[q])){if(X||E)null==ja[q]?delete m.currentVertexStyle[ca[q]]:m.currentVertexStyle[ca[q]]= +ja[q];if(ka||E||0<=mxUtils.indexOf(g,ca[q]))null==ja[q]?delete m.currentEdgeStyle[ca[q]]:m.currentEdgeStyle[ca[q]]=ja[q]}}null!=this.toolbar&&(this.toolbar.setFontName(m.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(m.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==m.currentEdgeStyle.edgeStyle&&"1"==m.currentEdgeStyle.curved? "geSprite geSprite-curved":"straight"==m.currentEdgeStyle.edgeStyle||"none"==m.currentEdgeStyle.edgeStyle||null==m.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==m.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==m.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==m.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==m.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==m.currentEdgeStyle.elbow? -"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==m.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==m.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==m.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var P=m.currentVertexStyle.fontFamily||"Helvetica", -ca=String(m.currentVertexStyle.fontSize||"12"),ja=m.getView().getState(m.getSelectionCell());null!=ja&&(P=ja.style[mxConstants.STYLE_FONTFAMILY]||P,ca=ja.style[mxConstants.STYLE_FONTSIZE]||ca,10<P.length&&(P=P.substring(0,8)+"..."));this.toolbar.setFontName(P);this.toolbar.setFontSize(ca)}),m.getSelectionModel().addListener(mxEvent.CHANGE,b),m.getModel().addListener(mxEvent.CHANGE,b));m.addListener(mxEvent.CELLS_ADDED,function(P,ca){P=ca.getProperty("cells");ca=ca.getProperty("parent");null!=ca&& -m.getModel().isLayer(ca)&&!m.isCellVisible(ca)&&null!=P&&0<P.length&&m.getModel().setVisible(ca,!0)});this.gestureHandler=mxUtils.bind(this,function(P){null!=this.currentMenu&&mxEvent.getSource(P)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler); +"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==m.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==m.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==m.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var X=m.currentVertexStyle.fontFamily||"Helvetica", +ja=String(m.currentVertexStyle.fontSize||"12"),ca=m.getView().getState(m.getSelectionCell());null!=ca&&(X=ca.style[mxConstants.STYLE_FONTFAMILY]||X,ja=ca.style[mxConstants.STYLE_FONTSIZE]||ja,10<X.length&&(X=X.substring(0,8)+"..."));this.toolbar.setFontName(X);this.toolbar.setFontSize(ja)}),m.getSelectionModel().addListener(mxEvent.CHANGE,b),m.getModel().addListener(mxEvent.CHANGE,b));m.addListener(mxEvent.CELLS_ADDED,function(X,ja){X=ja.getProperty("cells");ja=ja.getProperty("parent");null!=ja&& +m.getModel().isLayer(ja)&&!m.isCellVisible(ja)&&null!=X&&0<X.length&&m.getModel().setVisible(ja,!0)});this.gestureHandler=mxUtils.bind(this,function(X){null!=this.currentMenu&&mxEvent.getSource(X)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler); this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this, function(){m.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){m.view.validateBackground()}));m.addListener("gridSizeChanged",mxUtils.bind(this,function(){m.isGridEnabled()&&m.view.validateBackground()}));this.editor.resetGraph()}this.init();m.standalone||this.open()};EditorUi.compactUi=!0; -EditorUi.parsePng=function(b,e,k){function m(K,Q){var d=p;p+=Q;return K.substring(d,p)}function C(K){K=m(K,4);return K.charCodeAt(3)+(K.charCodeAt(2)<<8)+(K.charCodeAt(1)<<16)+(K.charCodeAt(0)<<24)}var p=0;if(m(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(m(b,4),"IHDR"!=m(b,4))null!=k&&k();else{m(b,17);do{k=C(b);var E=m(b,4);if(null!=e&&e(p-8,E,k))break;value=m(b,k);m(b,4);if("IEND"==E)break}while(k)}};mxUtils.extend(EditorUi,mxEventSource); +EditorUi.parsePng=function(b,e,k){function m(K,P){var d=p;p+=P;return K.substring(d,p)}function C(K){K=m(K,4);return K.charCodeAt(3)+(K.charCodeAt(2)<<8)+(K.charCodeAt(1)<<16)+(K.charCodeAt(0)<<24)}var p=0;if(m(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(m(b,4),"IHDR"!=m(b,4))null!=k&&k();else{m(b,17);do{k=C(b);var F=m(b,4);if(null!=e&&e(p-8,F,k))break;value=m(b,k);m(b,4);if("IEND"==F)break}while(k)}};mxUtils.extend(EditorUi,mxEventSource); EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=38;EditorUi.prototype.footerHeight=28;EditorUi.prototype.sidebarFooterHeight=34;EditorUi.prototype.hsplitPosition=640>=screen.width?118:"large"!=urlParams["sidebar-entries"]?212:240;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2; EditorUi.prototype.lightboxVerticalDivider=4;EditorUi.prototype.hsplitClickEnabled=!1; EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(b.container,"scroll",mxUtils.bind(this,function(){b.tooltipHandler.hide();null!=b.connectionHandler&&null!=b.connectionHandler.constraintHandler&&b.connectionHandler.constraintHandler.reset()}));b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){b.tooltipHandler.hide();var m=b.getRubberband();null!=m&&m.cancel()}));mxEvent.addListener(b.container, @@ -2113,23 +2111,23 @@ EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0" arguments);k.updateActionStates()};b.editLink=k.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState}; EditorUi.prototype.createSelectionState=function(){for(var b=this.editor.graph,e=b.getSelectionCells(),k=this.initSelectionState(),m=!0,C=0;C<e.length;C++){var p=b.getCurrentCellStyle(e[C]);"0"!=mxUtils.getValue(p,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(k,e[C],e,m),m=!1)}this.updateSelectionStateForTableCells(k);return k}; EditorUi.prototype.initSelectionState=function(){return{vertices:[],edges:[],cells:[],x:null,y:null,width:null,height:null,style:{},containsImage:!1,containsLabel:!1,fill:!0,glass:!0,rounded:!0,autoSize:!1,image:!0,shadow:!0,lineJumps:!0,resizable:!0,table:!1,cell:!1,row:!1,movable:!0,rotatable:!0,stroke:!0,swimlane:!1,unlocked:this.editor.graph.isEnabled(),connections:!1}}; -EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){for(var e=mxUtils.sortCells(b.cells),k=this.editor.graph.model,m=k.getParent(e[0]),C=k.getParent(m),p=m.getIndex(e[0]),E=C.getIndex(m),K=null,Q=1,d=1,f=0,g=E<C.getChildCount()-1?k.getChildAt(k.getChildAt(C,E+1),p):null;f<e.length-1;){var x=e[++f];null==g||g!=x||null!=K&&Q!=K||(K=Q,Q=0,d++,m=k.getParent(g),g=E+d<C.getChildCount()?k.getChildAt(k.getChildAt(C,E+d),p):null);var z=this.editor.graph.view.getState(x); -if(x==k.getChildAt(m,p+Q)&&null!=z&&1==mxUtils.getValue(z.style,"colspan",1)&&1==mxUtils.getValue(z.style,"rowspan",1))Q++;else break}f==d*Q-1&&(b.mergeCell=e[0],b.colspan=Q,b.rowspan=d)}}; +EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){for(var e=mxUtils.sortCells(b.cells),k=this.editor.graph.model,m=k.getParent(e[0]),C=k.getParent(m),p=m.getIndex(e[0]),F=C.getIndex(m),K=null,P=1,d=1,f=0,g=F<C.getChildCount()-1?k.getChildAt(k.getChildAt(C,F+1),p):null;f<e.length-1;){var x=e[++f];null==g||g!=x||null!=K&&P!=K||(K=P,P=0,d++,m=k.getParent(g),g=F+d<C.getChildCount()?k.getChildAt(k.getChildAt(C,F+d),p):null);var y=this.editor.graph.view.getState(x); +if(x==k.getChildAt(m,p+P)&&null!=y&&1==mxUtils.getValue(y.style,"colspan",1)&&1==mxUtils.getValue(y.style,"rowspan",1))P++;else break}f==d*P-1&&(b.mergeCell=e[0],b.colspan=P,b.rowspan=d)}}; EditorUi.prototype.updateSelectionStateForCell=function(b,e,k,m){k=this.editor.graph;b.cells.push(e);if(k.getModel().isVertex(e)){b.connections=0<k.model.getEdgeCount(e);b.unlocked=b.unlocked&&!k.isCellLocked(e);b.resizable=b.resizable&&k.isCellResizable(e);b.rotatable=b.rotatable&&k.isCellRotatable(e);b.movable=b.movable&&k.isCellMovable(e)&&!k.isTableRow(e)&&!k.isTableCell(e);b.swimlane=b.swimlane||k.isSwimlane(e);b.table=b.table||k.isTable(e);b.cell=b.cell||k.isTableCell(e);b.row=b.row||k.isTableRow(e); b.vertices.push(e);var C=k.getCellGeometry(e);if(null!=C&&(0<C.width?null==b.width?b.width=C.width:b.width!=C.width&&(b.width=""):b.containsLabel=!0,0<C.height?null==b.height?b.height=C.height:b.height!=C.height&&(b.height=""):b.containsLabel=!0,!C.relative||null!=C.offset)){var p=C.relative?C.offset.x:C.x;C=C.relative?C.offset.y:C.y;null==b.x?b.x=p:b.x!=p&&(b.x="");null==b.y?b.y=C:b.y!=C&&(b.y="")}}else k.getModel().isEdge(e)&&(b.edges.push(e),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable= !1);e=k.view.getState(e);null!=e&&(b.autoSize=b.autoSize||k.isAutoSizeState(e),b.glass=b.glass&&k.isGlassState(e),b.rounded=b.rounded&&k.isRoundedState(e),b.lineJumps=b.lineJumps&&k.isLineJumpState(e),b.image=b.image&&k.isImageState(e),b.shadow=b.shadow&&k.isShadowState(e),b.fill=b.fill&&k.isFillState(e),b.stroke=b.stroke&&k.isStrokeState(e),p=mxUtils.getValue(e.style,mxConstants.STYLE_SHAPE,null),b.containsImage=b.containsImage||"image"==p,k.mergeStyle(e.style,b.style,m))}; -EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,e=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(Q,d){"mouseDown"==d.getProperty("eventName")&&e.hideShapePicker()}));var k=mxUtils.bind(this,function(){e.hideShapePicker(!0)});b.addListener("wheel",k);b.addListener(mxEvent.ESCAPE,k);b.view.addListener(mxEvent.SCALE,k);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,k);b.getSelectionModel().addListener(mxEvent.CHANGE,k);var m=b.popupMenuHandler.isMenuShowing; -b.popupMenuHandler.isMenuShowing=function(){return m.apply(this,arguments)||null!=e.shapePicker};var C=b.dblClick;b.dblClick=function(Q,d){if(this.isEnabled())if(null!=d||null==e.sidebar||mxEvent.isShiftDown(Q)||b.isCellLocked(b.getDefaultParent()))C.apply(this,arguments);else{var f=mxUtils.convertPoint(this.container,mxEvent.getClientX(Q),mxEvent.getClientY(Q));mxEvent.consume(Q);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(f.x,f.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset", -k);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();p.apply(this,arguments)};var E=this.hoverIcons.execute;this.hoverIcons.execute=function(Q,d,f){var g=f.getEvent();this.graph.isCloneEvent(g)||mxEvent.isShiftDown(g)?E.apply(this,arguments):this.graph.connectVertex(Q.cell,d,this.graph.defaultEdgeLength,g,null,null,mxUtils.bind(this,function(x,z,u){var H=b.getCompositeParent(Q.cell);x=b.getCellGeometry(H);for(f.consume();null!=H&&b.model.isVertex(H)&&null!=x&&x.relative;)cell= -H,H=b.model.getParent(cell),x=b.getCellGeometry(H);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(f.getGraphX(),f.getGraphY(),H,mxUtils.bind(this,function(J){u(J);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(J))}),d)}),30)}),mxUtils.bind(this,function(x){this.graph.selectCellsForConnectVertex(x,g,this)}))};var K=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(Q,d){null!=K&&window.clearTimeout(K);K=window.setTimeout(mxUtils.bind(this,function(){var f= -d.getProperty("arrow"),g=d.getProperty("direction"),x=d.getProperty("event");f=f.getBoundingClientRect();var z=mxUtils.getOffset(b.container),u=b.container.scrollLeft+f.x-z.x;z=b.container.scrollTop+f.y-z.y;var H=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),J=e.showShapePicker(u,z,H,mxUtils.bind(this,function(D){null!=D&&b.connectVertex(H,g,b.defaultEdgeLength,x,!0,!0,function(G,V,U){U(D);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(D))}, -function(G){b.selectCellsForConnectVertex(G)},x,this.hoverIcons)}),g,!0);this.centerShapePicker(J,f,u,z,g);mxUtils.setOpacity(J,30);mxEvent.addListener(J,"mouseenter",function(){mxUtils.setOpacity(J,100)});mxEvent.addListener(J,"mouseleave",function(){e.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(Q,d){null!=K&&window.clearTimeout(K)}))}}; +EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,e=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(P,d){"mouseDown"==d.getProperty("eventName")&&e.hideShapePicker()}));var k=mxUtils.bind(this,function(){e.hideShapePicker(!0)});b.addListener("wheel",k);b.addListener(mxEvent.ESCAPE,k);b.view.addListener(mxEvent.SCALE,k);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,k);b.getSelectionModel().addListener(mxEvent.CHANGE,k);var m=b.popupMenuHandler.isMenuShowing; +b.popupMenuHandler.isMenuShowing=function(){return m.apply(this,arguments)||null!=e.shapePicker};var C=b.dblClick;b.dblClick=function(P,d){if(this.isEnabled())if(null!=d||null==e.sidebar||mxEvent.isShiftDown(P)||b.isCellLocked(b.getDefaultParent()))C.apply(this,arguments);else{var f=mxUtils.convertPoint(this.container,mxEvent.getClientX(P),mxEvent.getClientY(P));mxEvent.consume(P);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(f.x,f.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset", +k);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();p.apply(this,arguments)};var F=this.hoverIcons.execute;this.hoverIcons.execute=function(P,d,f){var g=f.getEvent();this.graph.isCloneEvent(g)||mxEvent.isShiftDown(g)?F.apply(this,arguments):this.graph.connectVertex(P.cell,d,this.graph.defaultEdgeLength,g,null,null,mxUtils.bind(this,function(x,y,u){var H=b.getCompositeParent(P.cell);x=b.getCellGeometry(H);for(f.consume();null!=H&&b.model.isVertex(H)&&null!=x&&x.relative;)cell= +H,H=b.model.getParent(cell),x=b.getCellGeometry(H);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(f.getGraphX(),f.getGraphY(),H,mxUtils.bind(this,function(J){u(J);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(J))}),d)}),30)}),mxUtils.bind(this,function(x){this.graph.selectCellsForConnectVertex(x,g,this)}))};var K=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(P,d){null!=K&&window.clearTimeout(K);K=window.setTimeout(mxUtils.bind(this,function(){var f= +d.getProperty("arrow"),g=d.getProperty("direction"),x=d.getProperty("event");f=f.getBoundingClientRect();var y=mxUtils.getOffset(b.container),u=b.container.scrollLeft+f.x-y.x;y=b.container.scrollTop+f.y-y.y;var H=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),J=e.showShapePicker(u,y,H,mxUtils.bind(this,function(D){null!=D&&b.connectVertex(H,g,b.defaultEdgeLength,x,!0,!0,function(G,W,T){T(D);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(D))}, +function(G){b.selectCellsForConnectVertex(G)},x,this.hoverIcons)}),g,!0);this.centerShapePicker(J,f,u,y,g);mxUtils.setOpacity(J,30);mxEvent.addListener(J,"mouseenter",function(){mxUtils.setOpacity(J,100)});mxEvent.addListener(J,"mouseleave",function(){e.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(P,d){null!=K&&window.clearTimeout(K)}))}}; EditorUi.prototype.centerShapePicker=function(b,e,k,m,C){if(C==mxConstants.DIRECTION_EAST||C==mxConstants.DIRECTION_WEST)b.style.width="40px";var p=b.getBoundingClientRect();C==mxConstants.DIRECTION_NORTH?(k-=p.width/2-10,m-=p.height+6):C==mxConstants.DIRECTION_SOUTH?(k-=p.width/2-10,m+=e.height+6):C==mxConstants.DIRECTION_WEST?(k-=p.width+6,m-=p.height/2-10):C==mxConstants.DIRECTION_EAST&&(k+=e.width+6,m-=p.height/2-10);b.style.left=k+"px";b.style.top=m+"px"}; EditorUi.prototype.showShapePicker=function(b,e,k,m,C,p){b=this.createShapePicker(b,e,k,m,C,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(k,p),p);null!=b&&(null==this.hoverIcons||p||this.hoverIcons.reset(),p=this.editor.graph,p.popupMenuHandler.hideMenu(),p.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=m,this.shapePicker=b);return b}; -EditorUi.prototype.createShapePicker=function(b,e,k,m,C,p,E,K){var Q=null;if(null!=E&&0<E.length){var d=this,f=this.editor.graph;Q=document.createElement("div");C=f.view.getState(k);var g=null==k||null!=C&&f.isTransparentState(C)?null:f.copyStyle(k);k=6>E.length?35*E.length:140;Q.className="geToolbarContainer geSidebarContainer";Q.style.cssText="position:absolute;left:"+b+"px;top:"+e+"px;width:"+k+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+ -mxPopupMenu.prototype.zIndex+1+";";K||mxUtils.setPrefixedStyle(Q.style,"transform","translate(-22px,-22px)");null!=f.background&&f.background!=mxConstants.NONE&&(Q.style.backgroundColor=f.background);f.container.appendChild(Q);k=mxUtils.bind(this,function(x){var z=document.createElement("a");z.className="geItem";z.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";Q.appendChild(z);null!=g&&"1"!=urlParams.sketch? -this.sidebar.graph.pasteStyle(g,[x]):d.insertHandler([x],""!=x.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([x],25,25,z,null,!0,!1,x.geometry.width,x.geometry.height);mxEvent.addListener(z,"click",function(){var u=f.cloneCell(x);if(null!=m)m(u);else{u.geometry.x=f.snap(Math.round(b/f.view.scale)-f.view.translate.x-x.geometry.width/2);u.geometry.y=f.snap(Math.round(e/f.view.scale)-f.view.translate.y-x.geometry.height/2);f.model.beginUpdate();try{f.addCell(u)}finally{f.model.endUpdate()}f.setSelectionCell(u); -f.scrollCellToVisible(u);f.startEditingAtCell(u);null!=d.hoverIcons&&d.hoverIcons.update(f.view.getState(u))}null!=p&&p()})});for(C=0;C<(K?Math.min(E.length,4):E.length);C++)k(E[C]);E=Q.offsetTop+Q.clientHeight-(f.container.scrollTop+f.container.offsetHeight);0<E&&(Q.style.top=Math.max(f.container.scrollTop+22,e-E)+"px");E=Q.offsetLeft+Q.clientWidth-(f.container.scrollLeft+f.container.offsetWidth);0<E&&(Q.style.left=Math.max(f.container.scrollLeft+22,b-E)+"px")}return Q}; +EditorUi.prototype.createShapePicker=function(b,e,k,m,C,p,F,K){var P=null;if(null!=F&&0<F.length){var d=this,f=this.editor.graph;P=document.createElement("div");C=f.view.getState(k);var g=null==k||null!=C&&f.isTransparentState(C)?null:f.copyStyle(k);k=6>F.length?35*F.length:140;P.className="geToolbarContainer geSidebarContainer";P.style.cssText="position:absolute;left:"+b+"px;top:"+e+"px;width:"+k+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+ +mxPopupMenu.prototype.zIndex+1+";";K||mxUtils.setPrefixedStyle(P.style,"transform","translate(-22px,-22px)");null!=f.background&&f.background!=mxConstants.NONE&&(P.style.backgroundColor=f.background);f.container.appendChild(P);k=mxUtils.bind(this,function(x){var y=document.createElement("a");y.className="geItem";y.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";P.appendChild(y);null!=g&&"1"!=urlParams.sketch? +this.sidebar.graph.pasteStyle(g,[x]):d.insertHandler([x],""!=x.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([x],25,25,y,null,!0,!1,x.geometry.width,x.geometry.height);mxEvent.addListener(y,"click",function(){var u=f.cloneCell(x);if(null!=m)m(u);else{u.geometry.x=f.snap(Math.round(b/f.view.scale)-f.view.translate.x-x.geometry.width/2);u.geometry.y=f.snap(Math.round(e/f.view.scale)-f.view.translate.y-x.geometry.height/2);f.model.beginUpdate();try{f.addCell(u)}finally{f.model.endUpdate()}f.setSelectionCell(u); +f.scrollCellToVisible(u);f.startEditingAtCell(u);null!=d.hoverIcons&&d.hoverIcons.update(f.view.getState(u))}null!=p&&p()})});for(C=0;C<(K?Math.min(F.length,4):F.length);C++)k(F[C]);F=P.offsetTop+P.clientHeight-(f.container.scrollTop+f.container.offsetHeight);0<F&&(P.style.top=Math.max(f.container.scrollTop+22,e-F)+"px");F=P.offsetLeft+P.clientWidth-(f.container.scrollLeft+f.container.offsetWidth);0<F&&(P.style.left=Math.max(f.container.scrollLeft+22,b-F)+"px")}return P}; EditorUi.prototype.getCellsForShapePicker=function(b,e){e=mxUtils.bind(this,function(k,m,C,p){return this.editor.graph.createVertex(null,null,p||"",0,0,m||120,C||60,k,!1)});return[null!=b?this.editor.graph.cloneCell(b):e("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),e("whiteSpace=wrap;html=1;"),e("ellipse;whiteSpace=wrap;html=1;"),e("rhombus;whiteSpace=wrap;html=1;",80,80),e("rounded=1;whiteSpace=wrap;html=1;"),e("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"), e("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),e("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),e("triangle;whiteSpace=wrap;html=1;",60,80),e("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),e("shape=tape;whiteSpace=wrap;html=1;",120,100),e("ellipse;shape=cloud;whiteSpace=wrap;html=1;", 120,80),e("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),e("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",40,40)]};EditorUi.prototype.hideShapePicker=function(b){null!=this.shapePicker&&(this.shapePicker.parentNode.removeChild(this.shapePicker),this.shapePicker=null,b||null==this.shapePickerCallback||this.shapePickerCallback(),this.shapePickerCallback=null)}; @@ -2144,45 +2142,45 @@ b==mxConstants.ARROW_BLOCK_THIN?k="1"!=e?Format.blockThinMarkerImage.src:Format. "box"==b?k=Format.boxMarkerImage.src:"halfCircle"==b?k=Format.halfCircleMarkerImage.src:"openAsync"==b?k=Format.openAsyncFilledMarkerImage.src:"async"==b?k="1"!=e?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==b?k=Format.dashMarkerImage.src:"baseDash"==b?k=Format.baseDashMarkerImage.src:"cross"==b?k=Format.crossMarkerImage.src:"circle"==b?k=Format.circleMarkerImage.src:"circlePlus"==b?k=Format.circlePlusMarkerImage.src:"ERone"==b?k=Format.EROneMarkerImage.src:"ERmandOne"==b? k=Format.ERmandOneMarkerImage.src:"ERmany"==b?k=Format.ERmanyMarkerImage.src:"ERoneToMany"==b?k=Format.ERoneToManyMarkerImage.src:"ERzeroToOne"==b?k=Format.ERzeroToOneMarkerImage.src:"ERzeroToMany"==b&&(k=Format.ERzeroToManyMarkerImage.src);return k};EditorUi.prototype.createMenus=function(){return null}; EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,e=this.actions.get("paste"),k=this.actions.get("pasteHere");e.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));k.setEnabled(e.isEnabled())}; -EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(p){p.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(p){var E=null;if(p.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{E=E||p.getSelectionCells();E=p.getExportableCells(p.model.getTopmostCells(E));for(var K={},Q=p.createCellLookup(E),d=p.cloneCells(E,null,K),f=new mxGraphModel,g=f.getChildAt(f.getRoot(), -0),x=0;x<d.length;x++){f.add(g,d[x]);var z=p.view.getState(E[x]);if(null!=z){var u=p.getCellGeometry(d[x]);null!=u&&u.relative&&!f.isEdge(E[x])&&null==Q[mxObjectIdentity.get(f.getParent(E[x]))]&&(u.offset=null,u.relative=!1,u.x=z.x/z.view.scale-z.view.translate.x,u.y=z.y/z.view.scale-z.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(K,Q),d);mxClipboard.insertCount=1;mxClipboard.setCells(d)}b.updatePasteActionStates();return E};var k=mxClipboard.paste;mxClipboard.paste=function(p){var E= -null;p.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):E=k.apply(this,arguments);b.updatePasteActionStates();return E};var m=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){m.apply(this,arguments);b.updatePasteActionStates()};var C=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(p,E){C.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()}; +EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(p){p.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(p){var F=null;if(p.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{F=F||p.getSelectionCells();F=p.getExportableCells(p.model.getTopmostCells(F));for(var K={},P=p.createCellLookup(F),d=p.cloneCells(F,null,K),f=new mxGraphModel,g=f.getChildAt(f.getRoot(), +0),x=0;x<d.length;x++){f.add(g,d[x]);var y=p.view.getState(F[x]);if(null!=y){var u=p.getCellGeometry(d[x]);null!=u&&u.relative&&!f.isEdge(F[x])&&null==P[mxObjectIdentity.get(f.getParent(F[x]))]&&(u.offset=null,u.relative=!1,u.x=y.x/y.view.scale-y.view.translate.x,u.y=y.y/y.view.scale-y.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(K,P),d);mxClipboard.insertCount=1;mxClipboard.setCells(d)}b.updatePasteActionStates();return F};var k=mxClipboard.paste;mxClipboard.paste=function(p){var F= +null;p.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):F=k.apply(this,arguments);b.updatePasteActionStates();return F};var m=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){m.apply(this,arguments);b.updatePasteActionStates()};var C=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(p,F){C.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()}; EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600; -EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var P=this.graph.getPageLayout(),ca=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+P.x*ca.width),this.scale*(this.translate.y+P.y*ca.height),this.scale*P.width*ca.width, -this.scale*P.height*ca.height)};b.getPreferredPageSize=function(P,ca,ja){P=this.getPageLayout();ca=this.getPageSize();return new mxRectangle(0,0,P.width*ca.width,P.height*ca.height)};var e=null,k=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(P,ca,ja,ka){if(null!=b.container&&!b.isViewer()){ja=null!=ja?ja:0;ka=null!=ka?ka:0;var q=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),F=mxUtils.hasScrollbars(b.container),R=b.view.translate,W=b.view.scale, -T=mxRectangle.fromRectangle(q);T.x=T.x/W-R.x;T.y=T.y/W-R.y;T.width/=W;T.height/=W;R=b.container.scrollTop;var ba=b.container.scrollLeft,ha=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)ha+=3;var ra=b.container.offsetWidth-ha;ha=b.container.offsetHeight-ha;P=P?Math.max(.3,Math.min(ca||1,ra/T.width)):W;ca=(ra-P*T.width)/2/P;var ta=0==this.lightboxVerticalDivider?0:(ha-P*T.height)/this.lightboxVerticalDivider/P;F&&(ca=Math.max(ca,0),ta=Math.max(ta,0));if(F||q.width< -ra||q.height<ha)b.view.scaleAndTranslate(P,Math.floor(ca-T.x),Math.floor(ta-T.y)),b.container.scrollTop=R*P/W,b.container.scrollLeft=ba*P/W;else if(0!=ja||0!=ka)q=b.view.translate,b.view.setTranslate(Math.floor(q.x+ja/W),Math.floor(q.y+ka/W))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var m=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",m);this.destroyFunctions.push(function(){mxEvent.removeListener(window, -"resize",m)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(P){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(P){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var C=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position= +EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var ca=this.graph.getPageLayout(),ka=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+ca.x*ka.width),this.scale*(this.translate.y+ca.y*ka.height),this.scale*ca.width* +ka.width,this.scale*ca.height*ka.height)};b.getPreferredPageSize=function(ca,ka,q){ca=this.getPageLayout();ka=this.getPageSize();return new mxRectangle(0,0,ca.width*ka.width,ca.height*ka.height)};var e=null,k=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(ca,ka,q,E){if(null!=b.container&&!b.isViewer()){q=null!=q?q:0;E=null!=E?E:0;var Q=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),Y=mxUtils.hasScrollbars(b.container),R=b.view.translate, +ba=b.view.scale,ea=mxRectangle.fromRectangle(Q);ea.x=ea.x/ba-R.x;ea.y=ea.y/ba-R.y;ea.width/=ba;ea.height/=ba;R=b.container.scrollTop;var ra=b.container.scrollLeft,ta=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)ta+=3;var la=b.container.offsetWidth-ta;ta=b.container.offsetHeight-ta;ca=ca?Math.max(.3,Math.min(ka||1,la/ea.width)):ba;ka=(la-ca*ea.width)/2/ca;var pa=0==this.lightboxVerticalDivider?0:(ta-ca*ea.height)/this.lightboxVerticalDivider/ca;Y&&(ka=Math.max(ka, +0),pa=Math.max(pa,0));if(Y||Q.width<la||Q.height<ta)b.view.scaleAndTranslate(ca,Math.floor(ka-ea.x),Math.floor(pa-ea.y)),b.container.scrollTop=R*ca/ba,b.container.scrollLeft=ra*ca/ba;else if(0!=q||0!=E)Q=b.view.translate,b.view.setTranslate(Math.floor(Q.x+q/ba),Math.floor(Q.y+E/ba))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var m=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",m);this.destroyFunctions.push(function(){mxEvent.removeListener(window, +"resize",m)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(ca){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(ca){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var C=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position= "fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=b.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style, -"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var P=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=P?parseInt(P["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var E=0;p=mxUtils.bind(this,function(P,ca,ja){E++; -var ka=document.createElement("span");ka.style.paddingLeft="8px";ka.style.paddingRight="8px";ka.style.cursor="pointer";mxEvent.addListener(ka,"click",P);null!=ja&&ka.setAttribute("title",ja);P=document.createElement("img");P.setAttribute("border","0");P.setAttribute("src",ca);P.style.width="36px";P.style.filter="invert(100%)";ka.appendChild(P);this.chromelessToolbar.appendChild(ka);return ka});null!=C.backBtn&&p(mxUtils.bind(this,function(P){window.location.href=C.backBtn.url;mxEvent.consume(P)}), -Editor.backImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var K=p(mxUtils.bind(this,function(P){this.actions.get("previousPage").funct();mxEvent.consume(P)}),Editor.previousImage,mxResources.get("previousPage")),Q=document.createElement("div");Q.style.fontFamily=Editor.defaultHtmlFont;Q.style.display="inline-block";Q.style.verticalAlign="top";Q.style.fontWeight="bold";Q.style.marginTop="8px";Q.style.fontSize="14px";Q.style.color=mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff"; -this.chromelessToolbar.appendChild(Q);var d=p(mxUtils.bind(this,function(P){this.actions.get("nextPage").funct();mxEvent.consume(P)}),Editor.nextImage,mxResources.get("nextPage")),f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(Q.innerText="",mxUtils.write(Q,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});K.style.paddingLeft="0px";K.style.paddingRight="4px";d.style.paddingLeft="4px";d.style.paddingRight="0px";var g=mxUtils.bind(this, -function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(d.style.display="",K.style.display="",Q.style.display="inline-block"):(d.style.display="none",K.style.display="none",Q.style.display="none");f()});this.editor.addListener("resetGraphView",g);this.editor.addListener("pageSelected",f)}p(mxUtils.bind(this,function(P){this.actions.get("zoomOut").funct();mxEvent.consume(P)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(P){this.actions.get("zoomIn").funct(); -mxEvent.consume(P)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(P){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(P)}),Editor.zoomFitImage,mxResources.get("fit"));var x=null,z=null,u=mxUtils.bind(this,function(P){null!=x&&(window.clearTimeout(x),x=null);null!=z&&(window.clearTimeout(z),z=null);x=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar, -0);x=null;z=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";z=null}),600)}),P||200)}),H=mxUtils.bind(this,function(P){null!=x&&(window.clearTimeout(x),x=null);null!=z&&(window.clearTimeout(z),z=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,P||30)});if("1"==urlParams.layers){this.layersDialog=null;var J=p(mxUtils.bind(this,function(P){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog), -this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var ca=J.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding= -"4px 2px 4px 2px";this.layersDialog.style.left=ca.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));ca=mxUtils.getCurrentStyle(this.editor.graph.container); -this.layersDialog.style.zIndex=ca.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(P)}),Editor.layersImage,mxResources.get("layers")),D=b.getModel();D.addListener(mxEvent.CHANGE,function(){J.style.display=1<D.getChildCount(D.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(P){null!= -this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(P)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(g=0;g<this.lightboxToolbarActions.length;g++){var G=this.lightboxToolbarActions[g];G.elem=p(G.fn,G.icon,G.tooltip)}null!=C.refreshBtn&&p(mxUtils.bind(this,function(P){C.refreshBtn.url?window.location.href=C.refreshBtn.url: -window.location.reload();mxEvent.consume(P)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=C.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(P){C.fullscreenBtn.url?b.openLink(C.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(P)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(C.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=document.body))&&p(mxUtils.bind(this, -function(P){"1"==urlParams.close||C.closeBtn?window.close():(this.destroy(),mxEvent.consume(P))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(P){mxEvent.isTouchEvent(P)||(mxEvent.isShiftDown(P)|| -H(30),u())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(P){mxEvent.consume(P)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(P){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(P)?u():H(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(P){mxEvent.isShiftDown(P)?u():H(100);mxEvent.consume(P)}));mxEvent.addListener(this.chromelessToolbar, -"mouseleave",mxUtils.bind(this,function(P){mxEvent.isTouchEvent(P)||H(30)}));var V=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(P,ca){this.startX=ca.getGraphX();this.startY=ca.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(P,ca){},mouseUp:function(P,ca){mxEvent.isTouchEvent(ca.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<V&&Math.abs(this.scrollTop-b.container.scrollTop)< -V&&Math.abs(this.startX-ca.getGraphX())<V&&Math.abs(this.startY-ca.getGraphY())<V&&(0<parseFloat(k.chromelessToolbar.style.opacity||0)?u():H(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var U=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var P=this.graph.getPagePadding(),ca=this.graph.getPageSize();this.translate.x=P.x-(this.x0||0)*ca.width;this.translate.y=P.y-(this.y0||0)* -ca.height}U.apply(this,arguments)};if(!b.isViewer()){var Y=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var P=this.getPageLayout(),ca=this.getPagePadding(),ja=this.getPageSize(),ka=Math.ceil(2*ca.x+P.width*ja.width),q=Math.ceil(2*ca.y+P.height*ja.height),F=b.minimumGraphSize;if(null==F||F.width!=ka||F.height!=q)b.minimumGraphSize=new mxRectangle(0,0,ka,q);ka=ca.x-P.x*ja.width;ca=ca.y-P.y*ja.height;this.autoTranslate||this.view.translate.x== -ka&&this.view.translate.y==ca?Y.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=P.x,this.view.y0=P.y,P=b.view.translate.x,ja=b.view.translate.y,b.view.setTranslate(ka,ca),b.container.scrollLeft+=Math.round((ka-P)*b.view.scale),b.container.scrollTop+=Math.round((ca-ja)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var O=b.view.getBackgroundPane(),qa=b.view.getDrawPane();b.cumulativeZoomFactor=1;var oa=null,aa=null, -da=null,ia=null,L=null,Z=function(P){null!=oa&&window.clearTimeout(oa);0<=P&&window.setTimeout(function(){if(!b.isMouseDown||ia)oa=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),qa.style.transformOrigin="",O.style.transformOrigin="", -mxClient.IS_SF?(qa.style.transform="scale(1)",O.style.transform="scale(1)",window.setTimeout(function(){qa.style.transform="";O.style.transform=""},0)):(qa.style.transform="",O.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var ca=new mxPoint(b.container.scrollLeft,b.container.scrollTop),ja=mxUtils.getOffset(b.container),ka=b.view.scale,q=0,F=0;null!=aa&&(q=b.container.offsetWidth/2-aa.x+ja.x,F=b.container.offsetHeight/2-aa.y+ja.y);b.zoom(b.cumulativeZoomFactor, -null,b.isFastZoomEnabled()?20:null);b.view.scale!=ka&&(null!=da&&(q+=ca.x-da.x,F+=ca.y-da.y),null!=e&&k.chromelessResize(!1,null,q*(b.cumulativeZoomFactor-1),F*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==q&&0==F||(b.container.scrollLeft-=q*(b.cumulativeZoomFactor-1),b.container.scrollTop-=F*(b.cumulativeZoomFactor-1)));null!=L&&qa.setAttribute("filter",L);b.cumulativeZoomFactor=1;L=ia=aa=da=oa=null}),null!=P?P:b.isFastZoomEnabled()?k.wheelZoomDelay:k.lazyZoomDelay)},0)};b.lazyZoom= -function(P,ca,ja,ka){ka=null!=ka?ka:this.zoomFactor;(ca=ca||!b.scrollbars)&&(aa=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));P?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=ka,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*= -(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=ka,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;b.isFastZoomEnabled()&&(null==L&&""!=qa.getAttribute("filter")&&(L=qa.getAttribute("filter"),qa.removeAttribute("filter")),da=new mxPoint(b.container.scrollLeft,b.container.scrollTop),P=ca||null==aa?b.container.scrollLeft+ -b.container.clientWidth/2:aa.x+b.container.scrollLeft-b.container.offsetLeft,ka=ca||null==aa?b.container.scrollTop+b.container.clientHeight/2:aa.y+b.container.scrollTop-b.container.offsetTop,qa.style.transformOrigin=P+"px "+ka+"px",qa.style.transform="scale("+this.cumulativeZoomFactor+")",O.style.transformOrigin=P+"px "+ka+"px",O.style.transform="scale("+this.cumulativeZoomFactor+")",null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(P=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(P.style, -"transform-origin",(ca||null==aa?b.container.clientWidth/2+b.container.scrollLeft-P.offsetLeft+"px":aa.x+b.container.scrollLeft-P.offsetLeft-b.container.offsetLeft+"px")+" "+(ca||null==aa?b.container.clientHeight/2+b.container.scrollTop-P.offsetTop+"px":aa.y+b.container.scrollTop-P.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(P.style,"transform","scale("+this.cumulativeZoomFactor+")")),b.view.getDecoratorPane().style.opacity="0",b.view.getOverlayPane().style.opacity="0",null!=k.hoverIcons&& -k.hoverIcons.reset());Z(b.isFastZoomEnabled()?ja:0)};mxEvent.addGestureListeners(b.container,function(P){null!=oa&&window.clearTimeout(oa)},null,function(P){1!=b.cumulativeZoomFactor&&Z(0)});mxEvent.addListener(b.container,"scroll",function(P){null==oa||b.isMouseDown||1==b.cumulativeZoomFactor||Z(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(P,ca,ja,ka,q){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!ja&&b.isScrollWheelEvent(P))ja= -b.view.getTranslate(),ka=40/b.view.scale,mxEvent.isShiftDown(P)?b.view.setTranslate(ja.x+(ca?-ka:ka),ja.y):b.view.setTranslate(ja.x,ja.y+(ca?ka:-ka));else if(ja||b.isZoomWheelEvent(P))for(var F=mxEvent.getSource(P);null!=F;){if(F==b.container)return b.tooltipHandler.hideTooltip(),aa=null!=ka&&null!=q?new mxPoint(ka,q):new mxPoint(mxEvent.getClientX(P),mxEvent.getClientY(P)),ia=ja,ja=b.zoomFactor,ka=null,P.ctrlKey&&null!=P.deltaY&&40>Math.abs(P.deltaY)&&Math.round(P.deltaY)!=P.deltaY?ja=1+Math.abs(P.deltaY)/ -20*(ja-1):null!=P.movementY&&"pointermove"==P.type&&(ja=1+Math.max(1,Math.abs(P.movementY))/20*(ja-1),ka=-1),b.lazyZoom(ca,null,ka,ja),mxEvent.consume(P),!1;F=F.parentNode}}),b.container);b.panningHandler.zoomGraph=function(P){b.cumulativeZoomFactor=P.scale;b.lazyZoom(0<P.scale,!0);mxEvent.consume(P)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))}; -EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)}; +"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var ca=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=ca?parseInt(ca["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var F=0;p=mxUtils.bind(this,function(ca,ka, +q){F++;var E=document.createElement("span");E.style.paddingLeft="8px";E.style.paddingRight="8px";E.style.cursor="pointer";mxEvent.addListener(E,"click",ca);null!=q&&E.setAttribute("title",q);ca=document.createElement("img");ca.setAttribute("border","0");ca.setAttribute("src",ka);ca.style.width="36px";ca.style.filter="invert(100%)";E.appendChild(ca);this.chromelessToolbar.appendChild(E);return E});if(null!=C.backBtn){var K=Graph.sanitizeLink(C.backBtn.url);null!=K&&p(mxUtils.bind(this,function(ca){window.location.href= +K;mxEvent.consume(ca)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var P=p(mxUtils.bind(this,function(ca){this.actions.get("previousPage").funct();mxEvent.consume(ca)}),Editor.previousImage,mxResources.get("previousPage")),d=document.createElement("div");d.style.fontFamily=Editor.defaultHtmlFont;d.style.display="inline-block";d.style.verticalAlign="top";d.style.fontWeight="bold";d.style.marginTop="8px";d.style.fontSize="14px";d.style.color=mxClient.IS_IE||mxClient.IS_IE11? +"#000000":"#ffffff";this.chromelessToolbar.appendChild(d);var f=p(mxUtils.bind(this,function(ca){this.actions.get("nextPage").funct();mxEvent.consume(ca)}),Editor.nextImage,mxResources.get("nextPage")),g=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(d.innerText="",mxUtils.write(d,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});P.style.paddingLeft="0px";P.style.paddingRight="4px";f.style.paddingLeft="4px";f.style.paddingRight= +"0px";var x=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(f.style.display="",P.style.display="",d.style.display="inline-block"):(f.style.display="none",P.style.display="none",d.style.display="none");g()});this.editor.addListener("resetGraphView",x);this.editor.addListener("pageSelected",g)}p(mxUtils.bind(this,function(ca){this.actions.get("zoomOut").funct();mxEvent.consume(ca)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this, +function(ca){this.actions.get("zoomIn").funct();mxEvent.consume(ca)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(ca){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(ca)}),Editor.zoomFitImage,mxResources.get("fit"));var y=null,u=null,H=mxUtils.bind(this,function(ca){null!=y&&(window.clearTimeout(y),y=null);null!=u&&(window.clearTimeout(u),u=null);y=window.setTimeout(mxUtils.bind(this, +function(){mxUtils.setOpacity(this.chromelessToolbar,0);y=null;u=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";u=null}),600)}),ca||200)}),J=mxUtils.bind(this,function(ca){null!=y&&(window.clearTimeout(y),y=null);null!=u&&(window.clearTimeout(u),u=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,ca||30)});if("1"==urlParams.layers){this.layersDialog=null;var D=p(mxUtils.bind(this,function(ca){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog), +this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var ka=D.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding= +"4px 2px 4px 2px";this.layersDialog.style.left=ka.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));ka=mxUtils.getCurrentStyle(this.editor.graph.container); +this.layersDialog.style.zIndex=ka.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(ca)}),Editor.layersImage,mxResources.get("layers")),G=b.getModel();G.addListener(mxEvent.CHANGE,function(){D.style.display=1<G.getChildCount(G.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this, +function(ca){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(ca)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(x=0;x<this.lightboxToolbarActions.length;x++){var W=this.lightboxToolbarActions[x];W.elem=p(W.fn,W.icon,W.tooltip)}if(null!=C.refreshBtn){var T=null==C.refreshBtn.url?null:Graph.sanitizeLink(C.refreshBtn.url); +p(mxUtils.bind(this,function(ca){null!=T?window.location.href=T:window.location.reload();mxEvent.consume(ca)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=C.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(ca){C.fullscreenBtn.url?b.openLink(C.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(ca)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(C.closeBtn&&window.self===window.top||b.lightbox&&("1"== +urlParams.close||this.container!=document.body))&&p(mxUtils.bind(this,function(ca){"1"==urlParams.close||C.closeBtn?window.close():(this.destroy(),mxEvent.consume(ca))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this, +function(ca){mxEvent.isTouchEvent(ca)||(mxEvent.isShiftDown(ca)||J(30),H())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(ca){mxEvent.consume(ca)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(ca){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(ca)?H():J(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(ca){mxEvent.isShiftDown(ca)?H(): +J(100);mxEvent.consume(ca)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(ca){mxEvent.isTouchEvent(ca)||J(30)}));var Z=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ca,ka){this.startX=ka.getGraphX();this.startY=ka.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(ca,ka){},mouseUp:function(ca,ka){mxEvent.isTouchEvent(ka.getEvent())&&Math.abs(this.scrollLeft- +b.container.scrollLeft)<Z&&Math.abs(this.scrollTop-b.container.scrollTop)<Z&&Math.abs(this.startX-ka.getGraphX())<Z&&Math.abs(this.startY-ka.getGraphY())<Z&&(0<parseFloat(k.chromelessToolbar.style.opacity||0)?H():J(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var N=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var ca=this.graph.getPagePadding(),ka=this.graph.getPageSize();this.translate.x= +ca.x-(this.x0||0)*ka.width;this.translate.y=ca.y-(this.y0||0)*ka.height}N.apply(this,arguments)};if(!b.isViewer()){var qa=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var ca=this.getPageLayout(),ka=this.getPagePadding(),q=this.getPageSize(),E=Math.ceil(2*ka.x+ca.width*q.width),Q=Math.ceil(2*ka.y+ca.height*q.height),Y=b.minimumGraphSize;if(null==Y||Y.width!=E||Y.height!=Q)b.minimumGraphSize=new mxRectangle(0,0,E,Q);E=ka.x-ca.x*q.width;ka= +ka.y-ca.y*q.height;this.autoTranslate||this.view.translate.x==E&&this.view.translate.y==ka?qa.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=ca.x,this.view.y0=ca.y,ca=b.view.translate.x,q=b.view.translate.y,b.view.setTranslate(E,ka),b.container.scrollLeft+=Math.round((E-ca)*b.view.scale),b.container.scrollTop+=Math.round((ka-q)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var oa=b.view.getBackgroundPane(),S=b.view.getDrawPane(); +b.cumulativeZoomFactor=1;var fa=null,ia=null,M=null,aa=null,X=null,ja=function(ca){null!=fa&&window.clearTimeout(fa);0<=ca&&window.setTimeout(function(){if(!b.isMouseDown||aa)fa=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),S.style.transformOrigin= +"",oa.style.transformOrigin="",mxClient.IS_SF?(S.style.transform="scale(1)",oa.style.transform="scale(1)",window.setTimeout(function(){S.style.transform="";oa.style.transform=""},0)):(S.style.transform="",oa.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var ka=new mxPoint(b.container.scrollLeft,b.container.scrollTop),q=mxUtils.getOffset(b.container),E=b.view.scale,Q=0,Y=0;null!=ia&&(Q=b.container.offsetWidth/2-ia.x+q.x,Y=b.container.offsetHeight/ +2-ia.y+q.y);b.zoom(b.cumulativeZoomFactor,null,b.isFastZoomEnabled()?20:null);b.view.scale!=E&&(null!=M&&(Q+=ka.x-M.x,Y+=ka.y-M.y),null!=e&&k.chromelessResize(!1,null,Q*(b.cumulativeZoomFactor-1),Y*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==Q&&0==Y||(b.container.scrollLeft-=Q*(b.cumulativeZoomFactor-1),b.container.scrollTop-=Y*(b.cumulativeZoomFactor-1)));null!=X&&S.setAttribute("filter",X);b.cumulativeZoomFactor=1;X=aa=ia=M=fa=null}),null!=ca?ca:b.isFastZoomEnabled()?k.wheelZoomDelay: +k.lazyZoomDelay)},0)};b.lazyZoom=function(ca,ka,q,E){E=null!=E?E:this.zoomFactor;(ka=ka||!b.scrollbars)&&(ia=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));ca?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=E,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor? +this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=E,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;b.isFastZoomEnabled()&&(null==X&&""!=S.getAttribute("filter")&&(X=S.getAttribute("filter"),S.removeAttribute("filter")),M=new mxPoint(b.container.scrollLeft,b.container.scrollTop),ca=ka||null== +ia?b.container.scrollLeft+b.container.clientWidth/2:ia.x+b.container.scrollLeft-b.container.offsetLeft,E=ka||null==ia?b.container.scrollTop+b.container.clientHeight/2:ia.y+b.container.scrollTop-b.container.offsetTop,S.style.transformOrigin=ca+"px "+E+"px",S.style.transform="scale("+this.cumulativeZoomFactor+")",oa.style.transformOrigin=ca+"px "+E+"px",oa.style.transform="scale("+this.cumulativeZoomFactor+")",null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(ca=b.view.backgroundPageShape.node, +mxUtils.setPrefixedStyle(ca.style,"transform-origin",(ka||null==ia?b.container.clientWidth/2+b.container.scrollLeft-ca.offsetLeft+"px":ia.x+b.container.scrollLeft-ca.offsetLeft-b.container.offsetLeft+"px")+" "+(ka||null==ia?b.container.clientHeight/2+b.container.scrollTop-ca.offsetTop+"px":ia.y+b.container.scrollTop-ca.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(ca.style,"transform","scale("+this.cumulativeZoomFactor+")")),b.view.getDecoratorPane().style.opacity="0",b.view.getOverlayPane().style.opacity= +"0",null!=k.hoverIcons&&k.hoverIcons.reset());ja(b.isFastZoomEnabled()?q:0)};mxEvent.addGestureListeners(b.container,function(ca){null!=fa&&window.clearTimeout(fa)},null,function(ca){1!=b.cumulativeZoomFactor&&ja(0)});mxEvent.addListener(b.container,"scroll",function(ca){null==fa||b.isMouseDown||1==b.cumulativeZoomFactor||ja(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(ca,ka,q,E,Q){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&& +!q&&b.isScrollWheelEvent(ca))q=b.view.getTranslate(),E=40/b.view.scale,mxEvent.isShiftDown(ca)?b.view.setTranslate(q.x+(ka?-E:E),q.y):b.view.setTranslate(q.x,q.y+(ka?E:-E));else if(q||b.isZoomWheelEvent(ca))for(var Y=mxEvent.getSource(ca);null!=Y;){if(Y==b.container)return b.tooltipHandler.hideTooltip(),ia=null!=E&&null!=Q?new mxPoint(E,Q):new mxPoint(mxEvent.getClientX(ca),mxEvent.getClientY(ca)),aa=q,q=b.zoomFactor,E=null,ca.ctrlKey&&null!=ca.deltaY&&40>Math.abs(ca.deltaY)&&Math.round(ca.deltaY)!= +ca.deltaY?q=1+Math.abs(ca.deltaY)/20*(q-1):null!=ca.movementY&&"pointermove"==ca.type&&(q=1+Math.max(1,Math.abs(ca.movementY))/20*(q-1),E=-1),b.lazyZoom(ka,null,E,q),mxEvent.consume(ca),!1;Y=Y.parentNode}}),b.container);b.panningHandler.zoomGraph=function(ca){b.cumulativeZoomFactor=ca.scale;b.lazyZoom(0<ca.scale,!0);mxEvent.consume(ca)}}; +EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)}; EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;null!=this.format&&(this.formatWidth=b?240:0,this.formatContainer.style.display=b?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))}; EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var e=urlParams.border,k=60;null!=e&&(k=parseInt(e));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(k,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))}; EditorUi.prototype.isSelectionAllowed=function(b){return"SELECT"==mxEvent.getSource(b).nodeName||"INPUT"==mxEvent.getSource(b).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(b))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")}; @@ -2197,8 +2195,8 @@ EditorUi.prototype.resetScrollbars=function(){var b=this.editor.graph;if(!this.e b.scrollTileSize.height*b.view.scale))/4)));b.container.scrollLeft=Math.floor(Math.max(0,e.x-Math.max(0,(b.container.clientWidth-k)/2)))}else{e=mxRectangle.fromRectangle(b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds());k=b.view.translate;var m=b.view.scale;e.x=e.x/m-k.x;e.y=e.y/m-k.y;e.width/=m;e.height/=m;b.view.setTranslate(Math.floor(Math.max(0,(b.container.clientWidth-e.width)/2)-e.x+2),Math.floor((b.pageVisible?0:Math.max(0,(b.container.clientHeight-e.height)/4))-e.y+1))}}; EditorUi.prototype.setPageVisible=function(b){var e=this.editor.graph,k=mxUtils.hasScrollbars(e.container),m=0,C=0;k&&(m=e.view.translate.x*e.view.scale-e.container.scrollLeft,C=e.view.translate.y*e.view.scale-e.container.scrollTop);e.pageVisible=b;e.pageBreaksVisible=b;e.preferPageSize=b;e.view.validateBackground();if(k){var p=e.getSelectionCells();e.clearSelection();e.setSelectionCells(p)}e.sizeDidChange();k&&(e.container.scrollLeft=e.view.translate.x*e.view.scale-m,e.container.scrollTop=e.view.translate.y* e.view.scale-C);e.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))}; -EditorUi.prototype.installResizeHandler=function(b,e,k){e&&(b.window.setSize=function(C,p){if(!this.minimized){var E=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;C=Math.min(C,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());p=Math.min(p,E-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(C,p){var E=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth, -K=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,Q=parseInt(this.div.style.width),d=parseInt(this.div.style.height);C=Math.max(0,Math.min(C,E-Q));p=Math.max(0,Math.min(p,K-d));this.getX()==C&&this.getY()==p||mxWindow.prototype.setLocation.apply(this,arguments);e&&!this.minimized&&this.setSize(Q,d)};var m=mxUtils.bind(this,function(){var C=b.window.getX(),p=b.window.getY();b.window.setLocation(C,p)});mxEvent.addListener(window,"resize",m);b.destroy=function(){mxEvent.removeListener(window, +EditorUi.prototype.installResizeHandler=function(b,e,k){e&&(b.window.setSize=function(C,p){if(!this.minimized){var F=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;C=Math.min(C,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());p=Math.min(p,F-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(C,p){var F=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth, +K=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,P=parseInt(this.div.style.width),d=parseInt(this.div.style.height);C=Math.max(0,Math.min(C,F-P));p=Math.max(0,Math.min(p,K-d));this.getX()==C&&this.getY()==p||mxWindow.prototype.setLocation.apply(this,arguments);e&&!this.minimized&&this.setSize(P,d)};var m=mxUtils.bind(this,function(){var C=b.window.getX(),p=b.window.getY();b.window.setLocation(C,p)});mxEvent.addListener(window,"resize",m);b.destroy=function(){mxEvent.removeListener(window, "resize",m);b.window.destroy();null!=k&&k()}};function ChangeGridColor(b,e){this.ui=b;this.color=e}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(b)})(); function ChangePageSetup(b,e,k,m,C){this.ui=b;this.previousColor=this.color=e;this.previousImage=this.image=k;this.previousFormat=this.format=m;this.previousPageScale=this.pageScale=C;this.ignoreImage=this.ignoreColor=!1} ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var e=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=e}if(!this.ignoreImage){this.image=this.previousImage;e=b.backgroundImage;var k=this.previousImage;null!=k&&null!=k.src&&"data:page/id,"==k.src.substring(0,13)&&(k=this.ui.createImageForPageLink(k.src,this.ui.currentPage));this.ui.setBackgroundImage(k);this.previousImage=e}null!=this.previousFormat&& @@ -2208,7 +2206,7 @@ EditorUi.prototype.setBackgroundColor=function(b){this.editor.graph.background=b EditorUi.prototype.setPageFormat=function(b,e){e=null!=e?e:"1"==urlParams.sketch;this.editor.graph.pageFormat=b;e||(this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct());this.fireEvent(new mxEventObject("pageFormatChanged"))}; EditorUi.prototype.setPageScale=function(b){this.editor.graph.pageScale=b;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))};EditorUi.prototype.setGridColor=function(b){this.editor.graph.view.gridColor=b;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))}; EditorUi.prototype.addUndoListener=function(){var b=this.actions.get("undo"),e=this.actions.get("redo"),k=this.editor.undoManager,m=mxUtils.bind(this,function(){b.setEnabled(this.canUndo());e.setEnabled(this.canRedo())});k.addListener(mxEvent.ADD,m);k.addListener(mxEvent.UNDO,m);k.addListener(mxEvent.REDO,m);k.addListener(mxEvent.CLEAR,m);var C=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){C.apply(this,arguments);m()};var p=this.editor.graph.cellEditor.stopEditing; -this.editor.graph.cellEditor.stopEditing=function(E,K){p.apply(this,arguments);m()};m()}; +this.editor.graph.cellEditor.stopEditing=function(F,K){p.apply(this,arguments);m()};m()}; EditorUi.prototype.updateActionStates=function(){for(var b=this.editor.graph,e=this.getSelectionState(),k=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()),m="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded strokeColor sharp snapToGrid".split(" "),C=0;C<m.length;C++)this.actions.get(m[C]).setEnabled(0<e.cells.length); this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);this.actions.get("pasteSize").setEnabled(null!=this.copiedSize&&0<e.vertices.length);this.actions.get("pasteData").setEnabled(null!=this.copiedValue&&0<e.cells.length);this.actions.get("setAsDefaultStyle").setEnabled(1==b.getSelectionCount());this.actions.get("lockUnlock").setEnabled(!b.isSelectionEmpty());this.actions.get("bringForward").setEnabled(1==e.cells.length);this.actions.get("sendBackward").setEnabled(1== e.cells.length);this.actions.get("rotation").setEnabled(1==e.vertices.length);this.actions.get("wordWrap").setEnabled(1==e.vertices.length);this.actions.get("autosize").setEnabled(1==e.vertices.length);this.actions.get("copySize").setEnabled(1==e.vertices.length);this.actions.get("clearWaypoints").setEnabled(e.connections);this.actions.get("curved").setEnabled(0<e.edges.length);this.actions.get("turn").setEnabled(0<e.cells.length);this.actions.get("group").setEnabled(!e.row&&!e.cell&&(1<e.cells.length|| @@ -2217,10 +2215,10 @@ this.actions.get("exitGroup").setEnabled(null!=b.view.currentRoot);this.actions. this.actions.get("selectAll").setEnabled(k);this.actions.get("selectNone").setEnabled(k);m=1==e.vertices.length&&b.isCellFoldable(e.vertices[0]);this.actions.get("expand").setEnabled(m);this.actions.get("collapse").setEnabled(m);this.menus.get("navigation").setEnabled(0<e.cells.length||null!=b.view.currentRoot);this.menus.get("layout").setEnabled(k);this.menus.get("insert").setEnabled(k);this.menus.get("direction").setEnabled(e.unlocked&&1==e.vertices.length);this.menus.get("distribute").setEnabled(e.unlocked&& 1<e.vertices.length);this.menus.get("align").setEnabled(e.unlocked&&0<e.cells.length);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset}; EditorUi.prototype.refresh=function(b){b=null!=b?b:!0;var e=this.container.clientWidth,k=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,k=document.documentElement.clientHeight);var m=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(m=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var C=Math.max(0,Math.min(this.hsplitPosition, -e-this.splitSize-20));e=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",e+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",e+=this.toolbarHeight);0<e&&(e+=1);var p=0;if(null!=this.sidebarFooterContainer){var E=this.footerHeight+m;p=Math.max(0,Math.min(k-e-E,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=C+"px";this.sidebarFooterContainer.style.height= -p+"px";this.sidebarFooterContainer.style.bottom=E+"px"}k=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=e+"px";this.sidebarContainer.style.width=C+"px";this.formatContainer.style.top=e+"px";this.formatContainer.style.width=k+"px";this.formatContainer.style.display=null!=this.format?"":"none";E=this.getDiagramContainerOffset();var K=null!=this.hsplit.parentNode?C+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top; +e-this.splitSize-20));e=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",e+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",e+=this.toolbarHeight);0<e&&(e+=1);var p=0;if(null!=this.sidebarFooterContainer){var F=this.footerHeight+m;p=Math.max(0,Math.min(k-e-F,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=C+"px";this.sidebarFooterContainer.style.height= +p+"px";this.sidebarFooterContainer.style.bottom=F+"px"}k=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=e+"px";this.sidebarContainer.style.width=C+"px";this.formatContainer.style.top=e+"px";this.formatContainer.style.width=k+"px";this.formatContainer.style.display=null!=this.format?"":"none";F=this.getDiagramContainerOffset();var K=null!=this.hsplit.parentNode?C+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top; this.hsplit.style.bottom=this.footerHeight+m+"px";this.hsplit.style.left=C+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=K+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=m+"px");C=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+m+"px",this.tabContainer.style.right=k+"px",C=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+p+m+"px";this.formatContainer.style.bottom= -this.footerHeight+m+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=K+E.x+"px",this.diagramContainer.style.top=e+E.y+"px",this.diagramContainer.style.right=k+"px",this.diagramContainer.style.bottom=this.footerHeight+m+C+"px");b&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null}; +this.footerHeight+m+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=K+F.x+"px",this.diagramContainer.style.top=e+F.y+"px",this.diagramContainer.style.right=k+"px",this.diagramContainer.style.bottom=this.footerHeight+m+C+"px");b&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null}; EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand")); this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom= "0px";this.footerContainer.style.zIndex=mxPopupMenu.prototype.zIndex-3;this.hsplit.style.width=this.splitSize+"px";if(this.sidebarFooterContainer=this.createSidebarFooterContainer())this.sidebarFooterContainer.style.left="0px";this.editor.chromeless?this.diagramContainer.style.border="none":this.tabContainer=this.createTabContainer()}; @@ -2231,19 +2229,19 @@ this.container.appendChild(this.sidebarFooterContainer);this.container.appendChi !0,0,mxUtils.bind(this,function(e){this.hsplitPosition=e;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geItem geStatus";return b};EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=b;0==this.statusContainer.getElementsByTagName("div").length&&(this.statusContainer.innerText="",b=this.createStatusDiv(b),this.statusContainer.appendChild(b))}; EditorUi.prototype.createStatusDiv=function(b){var e=document.createElement("div");e.setAttribute("title",b);e.innerHTML=b;return e};EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")}; EditorUi.prototype.createDiv=function(b){var e=document.createElement("div");e.className=b;return e}; -EditorUi.prototype.addSplitHandler=function(b,e,k,m){function C(g){if(null!=E){var x=new mxPoint(mxEvent.getClientX(g),mxEvent.getClientY(g));m(Math.max(0,K+(e?x.x-E.x:E.y-x.y)-k));mxEvent.consume(g);K!=f()&&(Q=!0,d=null)}}function p(g){C(g);E=K=null}var E=null,K=null,Q=!0,d=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var f=mxUtils.bind(this,function(){var g=parseInt(e?b.style.left:b.style.bottom);e||(g=g+k-this.footerHeight);return g});mxEvent.addGestureListeners(b,function(g){E=new mxPoint(mxEvent.getClientX(g), -mxEvent.getClientY(g));K=f();Q=!1;mxEvent.consume(g)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(g){if(!Q&&this.hsplitClickEnabled){var x=null!=d?d-k:0;d=f();m(x);mxEvent.consume(g)}}));mxEvent.addGestureListeners(document,null,C,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,C,p)})}; +EditorUi.prototype.addSplitHandler=function(b,e,k,m){function C(g){if(null!=F){var x=new mxPoint(mxEvent.getClientX(g),mxEvent.getClientY(g));m(Math.max(0,K+(e?x.x-F.x:F.y-x.y)-k));mxEvent.consume(g);K!=f()&&(P=!0,d=null)}}function p(g){C(g);F=K=null}var F=null,K=null,P=!0,d=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var f=mxUtils.bind(this,function(){var g=parseInt(e?b.style.left:b.style.bottom);e||(g=g+k-this.footerHeight);return g});mxEvent.addGestureListeners(b,function(g){F=new mxPoint(mxEvent.getClientX(g), +mxEvent.getClientY(g));K=f();P=!1;mxEvent.consume(g)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(g){if(!P&&this.hsplitClickEnabled){var x=null!=d?d-k:0;d=f();m(x);mxEvent.consume(g)}}));mxEvent.addGestureListeners(document,null,C,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,C,p)})}; EditorUi.prototype.prompt=function(b,e,k){b=new FilenameDialog(this,e,mxResources.get("apply"),function(m){k(parseFloat(m))},b);this.showDialog(b.container,300,80,!0,!0);b.init()}; EditorUi.prototype.handleError=function(b,e,k,m,C){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=e){C=mxUtils.htmlEntities(mxResources.get("unknownError"));var p=mxResources.get("ok");e=null!=e?e:mxResources.get("error");null!=b&&null!=b.message&&(C=mxUtils.htmlEntities(b.message));this.showError(e,C,p,k,null,null,null,null,null,null,null,null,m?k:null)}else null!=k&&k()}; -EditorUi.prototype.showError=function(b,e,k,m,C,p,E,K,Q,d,f,g,x){b=new ErrorDialog(this,b,e,k||mxResources.get("ok"),m,C,p,E,g,K,Q);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,d||340,f||100+20*e,!0,!1,x);b.init()};EditorUi.prototype.showDialog=function(b,e,k,m,C,p,E,K,Q,d){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,k,m,C,p,E,K,Q,d);this.dialogs.push(this.dialog)}; +EditorUi.prototype.showError=function(b,e,k,m,C,p,F,K,P,d,f,g,x){b=new ErrorDialog(this,b,e,k||mxResources.get("ok"),m,C,p,F,g,K,P);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,d||340,f||100+20*e,!0,!1,x);b.init()};EditorUi.prototype.showDialog=function(b,e,k,m,C,p,F,K,P,d){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,k,m,C,p,F,K,P,d);this.dialogs.push(this.dialog)}; EditorUi.prototype.hideDialog=function(b,e,k){null!=this.dialogs&&0<this.dialogs.length&&(null==k||k==this.dialog.container.firstChild)&&(k=this.dialogs.pop(),0==k.close(b,e)?this.dialogs.push(k):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea? -this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var e=b.getSelectionCells(),k=new mxDictionary,m=[],C=0;C<e.length;C++){var p=b.isTableCell(e[C])?b.model.getParent(e[C]):e[C];null==p||k.get(p)||(k.put(p,!0),m.push(p))}b.setSelectionCells(b.duplicateCells(m,!1))}catch(E){this.handleError(E)}}; +this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var e=b.getSelectionCells(),k=new mxDictionary,m=[],C=0;C<e.length;C++){var p=b.isTableCell(e[C])?b.model.getParent(e[C]):e[C];null==p||k.get(p)||(k.put(p,!0),m.push(p))}b.setSelectionCells(b.duplicateCells(m,!1))}catch(F){this.handleError(F)}}; EditorUi.prototype.pickColor=function(b,e){var k=this.editor.graph,m=k.cellEditor.saveSelection(),C=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,mxUtils.rgba2hex(b)||"none",function(p){k.cellEditor.restoreSelection(m);e(p)},function(){k.cellEditor.restoreSelection(m)});this.showDialog(b.container,230,C,!0,!1);b.init()}; EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})}; EditorUi.prototype.extractGraphModelFromHtml=function(b){var e=null;try{var k=b.indexOf("<mxGraphModel ");if(0<=k){var m=b.lastIndexOf("</mxGraphModel>");m>k&&(e=b.substring(k,m+21).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}}catch(C){}return e}; EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(e){null!=e?b(e):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(k){if(null!=k){var m=decodeURIComponent(k);this.isCompatibleString(m)&&(k=m)}b(k)}),"text")}),"html")}; -EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,e){navigator.clipboard.read().then(mxUtils.bind(this,function(k){if(null!=k&&0<k.length&&"html"==e&&0<=mxUtils.indexOf(k[0].types,"text/html"))k[0].getType("text/html").then(mxUtils.bind(this,function(m){m.text().then(mxUtils.bind(this,function(C){try{var p=this.parseHtmlData(C),E="text/plain"!=p.getAttribute("data-type")?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);try{var K=E.lastIndexOf("%3E"); -0<=K&&K<E.length-3&&(E=E.substring(0,K+3))}catch(f){}try{var Q=p.getElementsByTagName("span"),d=null!=Q&&0<Q.length?mxUtils.trim(decodeURIComponent(Q[0].textContent)):decodeURIComponent(E);this.isCompatibleString(d)&&(E=d)}catch(f){}}catch(f){}b(this.isCompatibleString(E)?E:null)}))["catch"](function(C){b(null)})}))["catch"](function(m){b(null)});else if(null!=k&&0<k.length&&"text"==e&&0<=mxUtils.indexOf(k[0].types,"text/plain"))k[0].getType("text/plain").then(function(m){m.text().then(function(C){b(C)})["catch"](function(){b(null)})})["catch"](function(){b(null)}); +EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,e){navigator.clipboard.read().then(mxUtils.bind(this,function(k){if(null!=k&&0<k.length&&"html"==e&&0<=mxUtils.indexOf(k[0].types,"text/html"))k[0].getType("text/html").then(mxUtils.bind(this,function(m){m.text().then(mxUtils.bind(this,function(C){try{var p=this.parseHtmlData(C),F="text/plain"!=p.getAttribute("data-type")?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);try{var K=F.lastIndexOf("%3E"); +0<=K&&K<F.length-3&&(F=F.substring(0,K+3))}catch(f){}try{var P=p.getElementsByTagName("span"),d=null!=P&&0<P.length?mxUtils.trim(decodeURIComponent(P[0].textContent)):decodeURIComponent(F);this.isCompatibleString(d)&&(F=d)}catch(f){}}catch(f){}b(this.isCompatibleString(F)?F:null)}))["catch"](function(C){b(null)})}))["catch"](function(m){b(null)});else if(null!=k&&0<k.length&&"text"==e&&0<=mxUtils.indexOf(k[0].types,"text/plain"))k[0].getType("text/plain").then(function(m){m.text().then(function(C){b(C)})["catch"](function(){b(null)})})["catch"](function(){b(null)}); else b(null)}))["catch"](function(k){b(null)})}; EditorUi.prototype.parseHtmlData=function(b){var e=null;if(null!=b&&0<b.length){var k="<meta "==b.substring(0,6);e=document.createElement("div");e.innerHTML=(k?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(b);asHtml=!0;b=e.getElementsByTagName("style");if(null!=b)for(;0<b.length;)b[0].parentNode.removeChild(b[0]);null!=e.firstChild&&e.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=e.firstChild.nextSibling&&e.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"== e.firstChild.nodeName&&"A"==e.firstChild.nextSibling.nodeName&&null==e.firstChild.nextSibling.nextSibling&&(b=null==e.firstChild.nextSibling.innerText?mxUtils.getTextContent(e.firstChild.nextSibling):e.firstChild.nextSibling.innerText,b==e.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(e,b),asHtml=!1));k=k&&null!=e.firstChild?e.firstChild.nextSibling:e.firstChild;null!=k&&null==k.nextSibling&&k.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==k.nodeName?(b=k.getAttribute("src"), @@ -2254,18 +2252,18 @@ EditorUi.prototype.save=function(b){if(null!=b){this.editor.graph.isEditing()&&t "_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(e);return}this.editor.setModified(!1);this.editor.setFilename(b);this.updateDocumentTitle()}catch(k){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}}; EditorUi.prototype.executeLayouts=function(b,e){this.executeLayout(mxUtils.bind(this,function(){var k=new mxCompositeLayout(this.editor.graph,b),m=this.editor.graph.getSelectionCells();k.execute(this.editor.graph.getDefaultParent(),0==m.length?null:m)}),!0,e)}; EditorUi.prototype.executeLayout=function(b,e,k){var m=this.editor.graph;m.getModel().beginUpdate();try{b()}catch(C){throw C;}finally{this.allowAnimation&&e&&m.isEnabled()?(b=new mxMorphing(m),b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){m.getModel().endUpdate();null!=k&&k()})),b.startAnimation()):(m.getModel().endUpdate(),null!=k&&k())}}; -EditorUi.prototype.showImageDialog=function(b,e,k,m){m=this.editor.graph.cellEditor;var C=m.saveSelection(),p=mxUtils.prompt(b,e);m.restoreSelection(C);if(null!=p&&0<p.length){var E=new Image;E.onload=function(){k(p,E.width,E.height)};E.onerror=function(){k(null);mxUtils.alert(mxResources.get("fileNotFound"))};E.src=p}else k(null)};EditorUi.prototype.showLinkDialog=function(b,e,k){b=new LinkDialog(this,b,e,k);this.showDialog(b.container,420,90,!0,!0);b.init()}; +EditorUi.prototype.showImageDialog=function(b,e,k,m){m=this.editor.graph.cellEditor;var C=m.saveSelection(),p=mxUtils.prompt(b,e);m.restoreSelection(C);if(null!=p&&0<p.length){var F=new Image;F.onload=function(){k(p,F.width,F.height)};F.onerror=function(){k(null);mxUtils.alert(mxResources.get("fileNotFound"))};F.src=p}else k(null)};EditorUi.prototype.showLinkDialog=function(b,e,k){b=new LinkDialog(this,b,e,k);this.showDialog(b.container,420,90,!0,!0);b.init()}; EditorUi.prototype.showDataDialog=function(b){null!=b&&(b=new EditDataDialog(this,b),this.showDialog(b.container,480,420,!0,!1,null,!1),b.init())}; EditorUi.prototype.showBackgroundImageDialog=function(b,e){b=null!=b?b:mxUtils.bind(this,function(m){m=new ChangePageSetup(this,null,m);m.ignoreColor=!0;this.editor.graph.model.execute(m)});var k=mxUtils.prompt(mxResources.get("backgroundImage"),null!=e?e.src:"");null!=k&&0<k.length?(e=new Image,e.onload=function(){b(new mxImage(k,e.width,e.height),!1)},e.onerror=function(){b(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},e.src=k):b(null)}; EditorUi.prototype.setBackgroundImage=function(b){this.editor.graph.setBackgroundImage(b);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(b,e,k){mxUtils.confirm(b)?null!=e&&e():null!=k&&k()};EditorUi.prototype.createOutline=function(b){var e=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){e.update(!1)});return e}; EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize",66:"copyData",69:"pasteData"}; -EditorUi.prototype.createKeyHandler=function(b){function e(g,x,z){if(!m.isSelectionEmpty()&&m.isEnabled()){x=null!=x?x:1;var u=m.getCompositeParents(m.getSelectionCells()),H=0<u.length?u[0]:null;if(null!=H)if(z){m.getModel().beginUpdate();try{for(H=0;H<u.length;H++)if(m.getModel().isVertex(u[H])&&m.isCellResizable(u[H])){var J=m.getCellGeometry(u[H]);null!=J&&(J=J.clone(),37==g?J.width=Math.max(0,J.width-x):38==g?J.height=Math.max(0,J.height-x):39==g?J.width+=x:40==g&&(J.height+=x),m.getModel().setGeometry(u[H], -J))}}finally{m.getModel().endUpdate()}}else{J=m.model.getParent(H);var D=m.getView().scale;z=null;1==m.getSelectionCount()&&m.model.isVertex(H)&&null!=m.layoutManager&&!m.isCellLocked(H)&&(z=m.layoutManager.getLayout(J));if(null!=z&&z.constructor==mxStackLayout)x=J.getIndex(H),37==g||38==g?m.model.add(J,H,Math.max(0,x-1)):(39==g||40==g)&&m.model.add(J,H,Math.min(m.model.getChildCount(J),x+1));else{var G=m.graphHandler;null!=G&&(null==G.first&&G.start(H,0,0,u),null!=G.first&&(H=u=0,37==g?u=-x:38== -g?H=-x:39==g?u=x:40==g&&(H=x),G.currentDx+=u*D,G.currentDy+=H*D,G.checkPreview(),G.updatePreview()),null!=E&&window.clearTimeout(E),E=window.setTimeout(function(){if(null!=G.first){var V=G.roundLength(G.currentDx/D),U=G.roundLength(G.currentDy/D);G.moveCells(G.cells,V,U);G.reset()}},400))}}}}var k=this,m=this.editor.graph,C=new mxKeyHandler(m),p=C.isEventIgnored;C.isEventIgnored=function(g){return!(mxEvent.isShiftDown(g)&&9==g.keyCode)&&(!this.isControlDown(g)||mxEvent.isShiftDown(g)||90!=g.keyCode&& -89!=g.keyCode&&188!=g.keyCode&&190!=g.keyCode&&85!=g.keyCode)&&(66!=g.keyCode&&73!=g.keyCode||!this.isControlDown(g)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};C.isEnabledForEvent=function(g){return!mxEvent.isConsumed(g)&&this.isGraphEvent(g)&&this.isEnabled()&&(null==k.dialogs||0==k.dialogs.length)};C.isControlDown=function(g){return mxEvent.isControlDown(g)||mxClient.IS_MAC&&g.metaKey};var E=null,K={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH, -39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},Q=C.getFunction;mxKeyHandler.prototype.getFunction=function(g){if(m.isEnabled()){if(mxEvent.isShiftDown(g)&&mxEvent.isAltDown(g)){var x=k.actions.get(k.altShiftActions[g.keyCode]);if(null!=x)return x.funct}if(null!=K[g.keyCode]&&!m.isSelectionEmpty())if(!this.isControlDown(g)&&mxEvent.isShiftDown(g)&&mxEvent.isAltDown(g)){if(m.model.isVertex(m.getSelectionCell()))return function(){var z=m.connectVertex(m.getSelectionCell(),K[g.keyCode], -m.defaultEdgeLength,g,!0);null!=z&&0<z.length&&(1==z.length&&m.model.isEdge(z[0])?m.setSelectionCell(m.model.getTerminal(z[0],!1)):m.setSelectionCell(z[z.length-1]),m.scrollCellToVisible(m.getSelectionCell()),null!=k.hoverIcons&&k.hoverIcons.update(m.view.getState(m.getSelectionCell())))}}else return this.isControlDown(g)?function(){e(g.keyCode,mxEvent.isShiftDown(g)?m.gridSize:null,!0)}:function(){e(g.keyCode,mxEvent.isShiftDown(g)?m.gridSize:null)}}return Q.apply(this,arguments)};C.bindAction=mxUtils.bind(this, -function(g,x,z,u){var H=this.actions.get(z);null!=H&&(z=function(){H.isEnabled()&&H.funct.apply(this,arguments)},x?u?C.bindControlShiftKey(g,z):C.bindControlKey(g,z):u?C.bindShiftKey(g,z):C.bindKey(g,z))});var d=this,f=C.escape;C.escape=function(g){f.apply(this,arguments)};C.enter=function(){};C.bindControlShiftKey(36,function(){m.exitGroup()});C.bindControlShiftKey(35,function(){m.enterGroup()});C.bindShiftKey(36,function(){m.home()});C.bindKey(35,function(){m.refresh()});C.bindAction(107,!0,"zoomIn"); +EditorUi.prototype.createKeyHandler=function(b){function e(g,x,y){if(!m.isSelectionEmpty()&&m.isEnabled()){x=null!=x?x:1;var u=m.getCompositeParents(m.getSelectionCells()),H=0<u.length?u[0]:null;if(null!=H)if(y){m.getModel().beginUpdate();try{for(H=0;H<u.length;H++)if(m.getModel().isVertex(u[H])&&m.isCellResizable(u[H])){var J=m.getCellGeometry(u[H]);null!=J&&(J=J.clone(),37==g?J.width=Math.max(0,J.width-x):38==g?J.height=Math.max(0,J.height-x):39==g?J.width+=x:40==g&&(J.height+=x),m.getModel().setGeometry(u[H], +J))}}finally{m.getModel().endUpdate()}}else{J=m.model.getParent(H);var D=m.getView().scale;y=null;1==m.getSelectionCount()&&m.model.isVertex(H)&&null!=m.layoutManager&&!m.isCellLocked(H)&&(y=m.layoutManager.getLayout(J));if(null!=y&&y.constructor==mxStackLayout)x=J.getIndex(H),37==g||38==g?m.model.add(J,H,Math.max(0,x-1)):(39==g||40==g)&&m.model.add(J,H,Math.min(m.model.getChildCount(J),x+1));else{var G=m.graphHandler;null!=G&&(null==G.first&&G.start(H,0,0,u),null!=G.first&&(H=u=0,37==g?u=-x:38== +g?H=-x:39==g?u=x:40==g&&(H=x),G.currentDx+=u*D,G.currentDy+=H*D,G.checkPreview(),G.updatePreview()),null!=F&&window.clearTimeout(F),F=window.setTimeout(function(){if(null!=G.first){var W=G.roundLength(G.currentDx/D),T=G.roundLength(G.currentDy/D);G.moveCells(G.cells,W,T);G.reset()}},400))}}}}var k=this,m=this.editor.graph,C=new mxKeyHandler(m),p=C.isEventIgnored;C.isEventIgnored=function(g){return!(mxEvent.isShiftDown(g)&&9==g.keyCode)&&(!this.isControlDown(g)||mxEvent.isShiftDown(g)||90!=g.keyCode&& +89!=g.keyCode&&188!=g.keyCode&&190!=g.keyCode&&85!=g.keyCode)&&(66!=g.keyCode&&73!=g.keyCode||!this.isControlDown(g)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};C.isEnabledForEvent=function(g){return!mxEvent.isConsumed(g)&&this.isGraphEvent(g)&&this.isEnabled()&&(null==k.dialogs||0==k.dialogs.length)};C.isControlDown=function(g){return mxEvent.isControlDown(g)||mxClient.IS_MAC&&g.metaKey};var F=null,K={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH, +39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},P=C.getFunction;mxKeyHandler.prototype.getFunction=function(g){if(m.isEnabled()){if(mxEvent.isShiftDown(g)&&mxEvent.isAltDown(g)){var x=k.actions.get(k.altShiftActions[g.keyCode]);if(null!=x)return x.funct}if(null!=K[g.keyCode]&&!m.isSelectionEmpty())if(!this.isControlDown(g)&&mxEvent.isShiftDown(g)&&mxEvent.isAltDown(g)){if(m.model.isVertex(m.getSelectionCell()))return function(){var y=m.connectVertex(m.getSelectionCell(),K[g.keyCode], +m.defaultEdgeLength,g,!0);null!=y&&0<y.length&&(1==y.length&&m.model.isEdge(y[0])?m.setSelectionCell(m.model.getTerminal(y[0],!1)):m.setSelectionCell(y[y.length-1]),m.scrollCellToVisible(m.getSelectionCell()),null!=k.hoverIcons&&k.hoverIcons.update(m.view.getState(m.getSelectionCell())))}}else return this.isControlDown(g)?function(){e(g.keyCode,mxEvent.isShiftDown(g)?m.gridSize:null,!0)}:function(){e(g.keyCode,mxEvent.isShiftDown(g)?m.gridSize:null)}}return P.apply(this,arguments)};C.bindAction=mxUtils.bind(this, +function(g,x,y,u){var H=this.actions.get(y);null!=H&&(y=function(){H.isEnabled()&&H.funct.apply(this,arguments)},x?u?C.bindControlShiftKey(g,y):C.bindControlKey(g,y):u?C.bindShiftKey(g,y):C.bindKey(g,y))});var d=this,f=C.escape;C.escape=function(g){f.apply(this,arguments)};C.enter=function(){};C.bindControlShiftKey(36,function(){m.exitGroup()});C.bindControlShiftKey(35,function(){m.enterGroup()});C.bindShiftKey(36,function(){m.home()});C.bindKey(35,function(){m.refresh()});C.bindAction(107,!0,"zoomIn"); C.bindAction(109,!0,"zoomOut");C.bindAction(80,!0,"print");C.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)C.bindControlKey(36,function(){m.isEnabled()&&m.foldCells(!0)}),C.bindControlKey(35,function(){m.isEnabled()&&m.foldCells(!1)}),C.bindControlKey(13,function(){d.ctrlEnter()}),C.bindAction(8,!1,"delete"),C.bindAction(8,!0,"deleteAll"),C.bindAction(8,!1,"deleteLabels",!0),C.bindAction(46,!1,"delete"),C.bindAction(46,!0,"deleteAll"),C.bindAction(46,!1,"deleteLabels", !0),C.bindAction(36,!1,"resetView"),C.bindAction(72,!0,"fitWindow",!0),C.bindAction(74,!0,"fitPage"),C.bindAction(74,!0,"fitTwoPages",!0),C.bindAction(48,!0,"customZoom"),C.bindAction(82,!0,"turn"),C.bindAction(82,!0,"clearDefaultStyle",!0),C.bindAction(83,!0,"save"),C.bindAction(83,!0,"saveAs",!0),C.bindAction(65,!0,"selectAll"),C.bindAction(65,!0,"selectNone",!0),C.bindAction(73,!0,"selectVertices",!0),C.bindAction(69,!0,"selectEdges",!0),C.bindAction(69,!0,"editStyle"),C.bindAction(66,!0,"bold"), C.bindAction(66,!0,"toBack",!0),C.bindAction(70,!0,"toFront",!0),C.bindAction(68,!0,"duplicate"),C.bindAction(68,!0,"setAsDefaultStyle",!0),C.bindAction(90,!0,"undo"),C.bindAction(89,!0,"autosize",!0),C.bindAction(88,!0,"cut"),C.bindAction(67,!0,"copy"),C.bindAction(86,!0,"paste"),C.bindAction(71,!0,"group"),C.bindAction(77,!0,"editData"),C.bindAction(71,!0,"grid",!0),C.bindAction(73,!0,"italic"),C.bindAction(76,!0,"lockUnlock"),C.bindAction(76,!0,"layers",!0),C.bindAction(80,!0,"formatPanel",!0), @@ -2275,50 +2273,50 @@ null!=this.editor&&(this.editor.destroy(),this.editor=null);null!=this.menubar&& this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.removeListener(window,"resize",this.resizeHandler),this.resizeHandler=null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null);null!=this.orientationChangeHandler&&(mxEvent.removeListener(window,"orientationchange",this.orientationChangeHandler),this.orientationChangeHandler=null);null!=this.scrollHandler&&(mxEvent.removeListener(window,"scroll",this.scrollHandler), this.scrollHandler=null);if(null!=this.destroyFunctions){for(b=0;b<this.destroyFunctions.length;b++)this.destroyFunctions[b]();this.destroyFunctions=null}var e=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog];for(b=0;b<e.length;b++)null!=e[b]&&null!=e[b].parentNode&&e[b].parentNode.removeChild(e[b])};(function(){var b=[["nbsp","160"],["shy","173"]],e=mxUtils.parseXml;mxUtils.parseXml=function(k){for(var m=0;m<b.length;m++)k=k.replace(new RegExp("&"+b[m][0]+";","g"),"&#"+b[m][1]+";");return e(k)}})(); Date.prototype.toISOString||function(){function b(e){e=String(e);1===e.length&&(e="0"+e);return e}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()}); -Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,e=function(m){return"function"===typeof m||"[object Function]"===b.call(m)},k=Math.pow(2,53)-1;return function(m){var C=Object(m);if(null==m)throw new TypeError("Array.from requires an array-like object - not null or undefined");var p=1<arguments.length?arguments[1]:void 0,E;if("undefined"!==typeof p){if(!e(p))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(E= -arguments[2])}var K=Number(C.length);K=isNaN(K)?0:0!==K&&isFinite(K)?(0<K?1:-1)*Math.floor(Math.abs(K)):K;K=Math.min(Math.max(K,0),k);for(var Q=e(this)?Object(new this(K)):Array(K),d=0,f;d<K;)f=C[d],Q[d]=p?"undefined"===typeof E?p(f,d):p.call(E,f,d):f,d+=1;Q.length=K;return Q}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000"; +Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,e=function(m){return"function"===typeof m||"[object Function]"===b.call(m)},k=Math.pow(2,53)-1;return function(m){var C=Object(m);if(null==m)throw new TypeError("Array.from requires an array-like object - not null or undefined");var p=1<arguments.length?arguments[1]:void 0,F;if("undefined"!==typeof p){if(!e(p))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(F= +arguments[2])}var K=Number(C.length);K=isNaN(K)?0:0!==K&&isFinite(K)?(0<K?1:-1)*Math.floor(Math.abs(K)):K;K=Math.min(Math.max(K,0),k);for(var P=e(this)?Object(new this(K)):Array(K),d=0,f;d<K;)f=C[d],P[d]=p?"undefined"===typeof F?p(f,d):p.call(F,f,d):f,d+=1;P.length=K;return P}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000"; mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1; (function(){try{if(null!=navigator&&null!=navigator.language){var b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(e){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1; mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS; mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(b,e,k){return null}; mxImageShape.prototype.getImageDataUri=function(){var b=this.image;if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b,!0),this.clippedImage=b;b=this.clippedSvg}return b}; -Graph=function(b,e,k,m,C,p){mxGraph.call(this,b,e,k,m);this.themes=C||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(L){L=this.getCurrentCellStyle(L); -return null!=L?"1"==L.html||"wrap"==L[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var E=null,K=null,Q=null,d=null,f=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(L,Z){if("mouseDown"==Z.getProperty("eventName")&&this.isEnabled()){L=Z.getProperty("event");var P=L.getState();Z=this.view.scale;if(!mxEvent.isAltDown(L.getEvent())&&null!=P)if(this.model.isEdge(P.cell))if(E=new mxPoint(L.getGraphX(),L.getGraphY()),f=this.isCellSelected(P.cell),Q=P,K=L,null!=P.text&&null!= -P.text.boundingBox&&mxUtils.contains(P.text.boundingBox,L.getGraphX(),L.getGraphY()))d=mxEvent.LABEL_HANDLE;else{var ca=this.selectionCellsHandler.getHandler(P.cell);null!=ca&&null!=ca.bends&&0<ca.bends.length&&(d=ca.getHandleForEvent(L))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(L.getEvent())&&(ca=this.selectionCellsHandler.getHandler(P.cell),null==ca||null==ca.getHandleForEvent(L))){var ja=new mxRectangle(L.getGraphX()-1,L.getGraphY()-1),ka=mxEvent.isTouchEvent(L.getEvent())? -mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;ca=ka+2;ja.grow(ka);if(this.isTableCell(P.cell)&&!this.isCellSelected(P.cell)&&!(mxUtils.contains(P,L.getGraphX()-ca,L.getGraphY()-ca)&&mxUtils.contains(P,L.getGraphX()-ca,L.getGraphY()+ca)&&mxUtils.contains(P,L.getGraphX()+ca,L.getGraphY()+ca)&&mxUtils.contains(P,L.getGraphX()+ca,L.getGraphY()-ca))){var q=this.model.getParent(P.cell);ca=this.model.getParent(q);if(!this.isCellSelected(ca)){ka*=Z;var F=2*ka;if(this.model.getChildAt(ca, -0)!=q&&mxUtils.intersects(ja,new mxRectangle(P.x,P.y-ka,P.width,F))||this.model.getChildAt(q,0)!=P.cell&&mxUtils.intersects(ja,new mxRectangle(P.x-ka,P.y,F,P.height))||mxUtils.intersects(ja,new mxRectangle(P.x,P.y+P.height-ka,P.width,F))||mxUtils.intersects(ja,new mxRectangle(P.x+P.width-ka,P.y,F,P.height)))q=this.selectionCellsHandler.isHandled(ca),this.selectCellForEvent(ca,L.getEvent()),ca=this.selectionCellsHandler.getHandler(ca),null!=ca&&(ka=ca.getHandleForEvent(L),null!=ka&&(ca.start(L.getGraphX(), -L.getGraphY(),ka),ca.blockDelayedSelection=!q,L.consume()))}}for(;!L.isConsumed()&&null!=P&&(this.isTableCell(P.cell)||this.isTableRow(P.cell)||this.isTable(P.cell));)this.isSwimlane(P.cell)&&(ca=this.getActualStartSize(P.cell),(0<ca.x||0<ca.width)&&mxUtils.intersects(ja,new mxRectangle(P.x+(ca.x-ca.width-1)*Z+(0==ca.x?P.width:0),P.y,1,P.height))||(0<ca.y||0<ca.height)&&mxUtils.intersects(ja,new mxRectangle(P.x,P.y+(ca.y-ca.height-1)*Z+(0==ca.y?P.height:0),P.width,1)))&&(this.selectCellForEvent(P.cell, -L.getEvent()),ca=this.selectionCellsHandler.getHandler(P.cell),null!=ca&&(ka=mxEvent.CUSTOM_HANDLE-ca.customHandles.length+1,ca.start(L.getGraphX(),L.getGraphY(),ka),L.consume())),P=this.view.getState(this.model.getParent(P.cell))}}}));this.addMouseListener({mouseDown:function(L,Z){},mouseMove:mxUtils.bind(this,function(L,Z){L=this.selectionCellsHandler.handlers.map;for(var P in L)if(null!=L[P].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(Z.getEvent())){var ca= -this.tolerance;if(null!=E&&null!=Q&&null!=K){if(P=Q,Math.abs(E.x-Z.getGraphX())>ca||Math.abs(E.y-Z.getGraphY())>ca){var ja=this.selectionCellsHandler.getHandler(P.cell);null==ja&&this.model.isEdge(P.cell)&&(ja=this.createHandler(P));if(null!=ja&&null!=ja.bends&&0<ja.bends.length){L=ja.getHandleForEvent(K);var ka=this.view.getEdgeStyle(P);ca=ka==mxEdgeStyle.EntityRelation;f||d!=mxEvent.LABEL_HANDLE||(L=d);if(ca&&0!=L&&L!=ja.bends.length-1&&L!=mxEvent.LABEL_HANDLE)!ca||null==P.visibleSourceState&&null== -P.visibleTargetState||(this.graphHandler.reset(),Z.consume());else if(L==mxEvent.LABEL_HANDLE||0==L||null!=P.visibleSourceState||L==ja.bends.length-1||null!=P.visibleTargetState)ca||L==mxEvent.LABEL_HANDLE||(ca=P.absolutePoints,null!=ca&&(null==ka&&null==L||ka==mxEdgeStyle.OrthConnector)&&(L=d,null==L&&(L=new mxRectangle(E.x,E.y),L.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(L,ca[0].x,ca[0].y)?L=0:mxUtils.contains(L,ca[ca.length-1].x,ca[ca.length-1].y)?L=ja.bends.length-1:null!= -ka&&(2==ca.length||3==ca.length&&(0==Math.round(ca[0].x-ca[1].x)&&0==Math.round(ca[1].x-ca[2].x)||0==Math.round(ca[0].y-ca[1].y)&&0==Math.round(ca[1].y-ca[2].y)))?L=2:(L=mxUtils.findNearestSegment(P,E.x,E.y),L=null==ka?mxEvent.VIRTUAL_HANDLE-L:L+1))),null==L&&(L=mxEvent.VIRTUAL_HANDLE)),ja.start(Z.getGraphX(),Z.getGraphX(),L),Z.consume(),this.graphHandler.reset()}null!=ja&&(this.selectionCellsHandler.isHandlerActive(ja)?this.isCellSelected(P.cell)||(this.selectionCellsHandler.handlers.put(P.cell, -ja),this.selectCellForEvent(P.cell,Z.getEvent())):this.isCellSelected(P.cell)||ja.destroy());f=!1;E=K=Q=d=null}}else if(P=Z.getState(),null!=P&&this.isCellEditable(P.cell)){ja=null;if(this.model.isEdge(P.cell)){if(L=new mxRectangle(Z.getGraphX(),Z.getGraphY()),L.grow(mxEdgeHandler.prototype.handleImage.width/2),ca=P.absolutePoints,null!=ca)if(null!=P.text&&null!=P.text.boundingBox&&mxUtils.contains(P.text.boundingBox,Z.getGraphX(),Z.getGraphY()))ja="move";else if(mxUtils.contains(L,ca[0].x,ca[0].y)|| -mxUtils.contains(L,ca[ca.length-1].x,ca[ca.length-1].y))ja="pointer";else if(null!=P.visibleSourceState||null!=P.visibleTargetState)L=this.view.getEdgeStyle(P),ja="crosshair",L!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(P)&&(Z=mxUtils.findNearestSegment(P,Z.getGraphX(),Z.getGraphY()),Z<ca.length-1&&0<=Z&&(ja=0==Math.round(ca[Z].x-ca[Z+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(Z.getEvent())){ca=mxShape.prototype.svgStrokeTolerance/2;L=new mxRectangle(Z.getGraphX(),Z.getGraphY()); -L.grow(ca);if(this.isTableCell(P.cell)&&(Z=this.model.getParent(P.cell),ca=this.model.getParent(Z),!this.isCellSelected(ca)))if(mxUtils.intersects(L,new mxRectangle(P.x,P.y-2,P.width,4))&&this.model.getChildAt(ca,0)!=Z||mxUtils.intersects(L,new mxRectangle(P.x,P.y+P.height-2,P.width,4)))ja="row-resize";else if(mxUtils.intersects(L,new mxRectangle(P.x-2,P.y,4,P.height))&&this.model.getChildAt(Z,0)!=P.cell||mxUtils.intersects(L,new mxRectangle(P.x+P.width-2,P.y,4,P.height)))ja="col-resize";for(Z=P;null== -ja&&null!=Z&&(this.isTableCell(Z.cell)||this.isTableRow(Z.cell)||this.isTable(Z.cell));)this.isSwimlane(Z.cell)&&(ca=this.getActualStartSize(Z.cell),ka=this.view.scale,(0<ca.x||0<ca.width)&&mxUtils.intersects(L,new mxRectangle(Z.x+(ca.x-ca.width-1)*ka+(0==ca.x?Z.width*ka:0),Z.y,1,Z.height))?ja="col-resize":(0<ca.y||0<ca.height)&&mxUtils.intersects(L,new mxRectangle(Z.x,Z.y+(ca.y-ca.height-1)*ka+(0==ca.y?Z.height:0),Z.width,1))&&(ja="row-resize")),Z=this.view.getState(this.model.getParent(Z.cell))}null!= -ja&&P.setCursor(ja)}}}),mouseUp:mxUtils.bind(this,function(L,Z){d=E=K=Q=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(L){var Z=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);L.view.graph.isHtmlLabel(L.cell)&&(Z=1!=L.style.html?mxUtils.htmlEntities(Z,!1):L.view.graph.sanitizeHtml(Z));return Z};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0); -this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(L,Z){return!1};this.alternateEdgeStyle="vertical";null==m&&this.loadStylesheet();var g=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var L=g.apply(this,arguments); -if(this.graph.pageVisible){var Z=[],P=this.graph.pageFormat,ca=this.graph.pageScale,ja=P.width*ca;P=P.height*ca;ca=this.graph.view.translate;for(var ka=this.graph.view.scale,q=this.graph.getPageLayout(),F=0;F<q.width;F++)Z.push(new mxRectangle(((q.x+F)*ja+ca.x)*ka,(q.y*P+ca.y)*ka,ja*ka,P*ka));for(F=1;F<q.height;F++)Z.push(new mxRectangle((q.x*ja+ca.x)*ka,((q.y+F)*P+ca.y)*ka,ja*ka,P*ka));L=Z.concat(L)}return L};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor= -function(L,Z){return null==L.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(L){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var x=this.graphHandler.getCells;this.graphHandler.getCells=function(L){for(var Z=x.apply(this,arguments),P=new mxDictionary,ca=[],ja=0;ja<Z.length;ja++){var ka=this.graph.isTableCell(L)&&this.graph.isTableCell(Z[ja])&& -this.graph.isCellSelected(Z[ja])?this.graph.model.getParent(Z[ja]):this.graph.isTableRow(L)&&this.graph.isTableRow(Z[ja])&&this.graph.isCellSelected(Z[ja])?Z[ja]:this.graph.getCompositeParent(Z[ja]);null==ka||P.get(ka)||(P.put(ka,!0),ca.push(ka))}return ca};var z=this.graphHandler.start;this.graphHandler.start=function(L,Z,P,ca){var ja=!1;this.graph.isTableCell(L)&&(this.graph.isCellSelected(L)?ja=!0:L=this.graph.model.getParent(L));ja||this.graph.isTableRow(L)&&this.graph.isCellSelected(L)||(L=this.graph.getCompositeParent(L)); -z.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(L,Z){Z=this.graph.getCompositeParent(Z);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var u=new mxRubberband(this);this.getRubberband=function(){return u};var H=(new Date).getTime(),J=0,D=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var L=this.currentState;D.apply(this,arguments);L!=this.currentState?(H=(new Date).getTime(),J=0):J=(new Date).getTime()-H};var G= -this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(L){return mxEvent.isShiftDown(L.getEvent())&&mxEvent.isAltDown(L.getEvent())?!1:null!=this.currentState&&L.getState()==this.currentState&&2E3<J||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&G.apply(this,arguments)};var V=this.isToggleEvent;this.isToggleEvent=function(L){return V.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(L)};var U= -u.isForceRubberbandEvent;u.isForceRubberbandEvent=function(L){return U.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(L.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==L.getState()&&mxEvent.isTouchEvent(L.getEvent())};var Y=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(Y=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END, -mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=Y)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(L){return mxEvent.isMouseEvent(L.getEvent())};var O=this.click;this.click=function(L){var Z=null==L.state&&null!=L.sourceState&&this.isCellLocked(L.sourceState.cell);if(this.isEnabled()&&!Z||L.isConsumed())return O.apply(this,arguments);var P=Z?L.sourceState.cell:L.getCell();null!=P&&(P=this.getClickableLinkForCell(P),null!=P&&(this.isCustomLink(P)? -this.customLinkClicked(P):this.openLink(P)));this.isEnabled()&&Z&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(L){return L.sourceState};var qa=this.tooltipHandler.show;this.tooltipHandler.show=function(){qa.apply(this,arguments);if(null!=this.div)for(var L=this.div.getElementsByTagName("a"),Z=0;Z<L.length;Z++)null!=L[Z].getAttribute("href")&&null==L[Z].getAttribute("target")&&L[Z].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(L){return L.sourceState}; -this.getCursorForMouseEvent=function(L){var Z=null==L.state&&null!=L.sourceState&&this.isCellLocked(L.sourceState.cell);return this.getCursorForCell(Z?L.sourceState.cell:L.getCell())};var oa=this.getCursorForCell;this.getCursorForCell=function(L){if(!this.isEnabled()||this.isCellLocked(L)){if(null!=this.getClickableLinkForCell(L))return"pointer";if(this.isCellLocked(L))return"default"}return oa.apply(this,arguments)};this.selectRegion=function(L,Z){var P=mxEvent.isAltDown(Z)?L:null;L=this.getCells(L.x, -L.y,L.width,L.height,null,null,P,function(ca){return"1"==mxUtils.getValue(ca.style,"locked","0")},!0);if(this.isToggleEvent(Z))for(P=0;P<L.length;P++)this.selectCellForEvent(L[P],Z);else this.selectCellsForEvent(L,Z);return L};var aa=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(L,Z,P){return this.graph.isCellSelected(L)?!1:aa.apply(this,arguments)};this.isCellLocked=function(L){for(;null!=L;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(L), -"locked","0"))return!0;L=this.model.getParent(L)}return!1};var da=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(L,Z){"mouseDown"==Z.getProperty("eventName")&&(L=Z.getProperty("event").getState(),da=null==L||this.isSelectionEmpty()||this.isCellSelected(L.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(L,Z){if(!mxEvent.isMultiTouchEvent(Z)){L=Z.getProperty("event");var P=Z.getProperty("cell");null==P?(L=mxUtils.convertPoint(this.container, -mxEvent.getClientX(L),mxEvent.getClientY(L)),u.start(L.x,L.y)):null!=da?this.addSelectionCells(da):1<this.getSelectionCount()&&this.isCellSelected(P)&&this.removeSelectionCell(P);da=null;Z.consume()}}));this.connectionHandler.selectCells=function(L,Z){this.graph.setSelectionCell(Z||L)};this.connectionHandler.constraintHandler.isStateIgnored=function(L,Z){var P=L.view.graph;return Z&&(P.isCellSelected(L.cell)||P.isTableRow(L.cell)&&P.selectionCellsHandler.isHandled(P.model.getParent(L.cell)))};this.selectionModel.addListener(mxEvent.CHANGE, -mxUtils.bind(this,function(){var L=this.connectionHandler.constraintHandler;null!=L.currentFocus&&L.isStateIgnored(L.currentFocus,!0)&&(L.currentFocus=null,L.constraints=null,L.destroyIcons());L.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var ia=this.updateMouseEvent;this.updateMouseEvent=function(L){L=ia.apply(this,arguments);null!=L.state&&this.isCellLocked(L.getCell())&&(L.state=null);return L}}this.currentTranslate=new mxPoint(0,0)}; -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);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0; -Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than diagrams.net --\x3e"; +Graph=function(b,e,k,m,C,p){mxGraph.call(this,b,e,k,m);this.themes=C||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(M){M=this.getCurrentCellStyle(M); +return null!=M?"1"==M.html||"wrap"==M[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var F=null,K=null,P=null,d=null,f=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(M,aa){if("mouseDown"==aa.getProperty("eventName")&&this.isEnabled()){M=aa.getProperty("event");var X=M.getState();aa=this.view.scale;if(!mxEvent.isAltDown(M.getEvent())&&null!=X)if(this.model.isEdge(X.cell))if(F=new mxPoint(M.getGraphX(),M.getGraphY()),f=this.isCellSelected(X.cell),P=X,K=M,null!=X.text&& +null!=X.text.boundingBox&&mxUtils.contains(X.text.boundingBox,M.getGraphX(),M.getGraphY()))d=mxEvent.LABEL_HANDLE;else{var ja=this.selectionCellsHandler.getHandler(X.cell);null!=ja&&null!=ja.bends&&0<ja.bends.length&&(d=ja.getHandleForEvent(M))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(M.getEvent())&&(ja=this.selectionCellsHandler.getHandler(X.cell),null==ja||null==ja.getHandleForEvent(M))){var ca=new mxRectangle(M.getGraphX()-1,M.getGraphY()-1),ka=mxEvent.isTouchEvent(M.getEvent())? +mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;ja=ka+2;ca.grow(ka);if(this.isTableCell(X.cell)&&!this.isCellSelected(X.cell)&&!(mxUtils.contains(X,M.getGraphX()-ja,M.getGraphY()-ja)&&mxUtils.contains(X,M.getGraphX()-ja,M.getGraphY()+ja)&&mxUtils.contains(X,M.getGraphX()+ja,M.getGraphY()+ja)&&mxUtils.contains(X,M.getGraphX()+ja,M.getGraphY()-ja))){var q=this.model.getParent(X.cell);ja=this.model.getParent(q);if(!this.isCellSelected(ja)){ka*=aa;var E=2*ka;if(this.model.getChildAt(ja, +0)!=q&&mxUtils.intersects(ca,new mxRectangle(X.x,X.y-ka,X.width,E))||this.model.getChildAt(q,0)!=X.cell&&mxUtils.intersects(ca,new mxRectangle(X.x-ka,X.y,E,X.height))||mxUtils.intersects(ca,new mxRectangle(X.x,X.y+X.height-ka,X.width,E))||mxUtils.intersects(ca,new mxRectangle(X.x+X.width-ka,X.y,E,X.height)))q=this.selectionCellsHandler.isHandled(ja),this.selectCellForEvent(ja,M.getEvent()),ja=this.selectionCellsHandler.getHandler(ja),null!=ja&&(ka=ja.getHandleForEvent(M),null!=ka&&(ja.start(M.getGraphX(), +M.getGraphY(),ka),ja.blockDelayedSelection=!q,M.consume()))}}for(;!M.isConsumed()&&null!=X&&(this.isTableCell(X.cell)||this.isTableRow(X.cell)||this.isTable(X.cell));)this.isSwimlane(X.cell)&&(ja=this.getActualStartSize(X.cell),(0<ja.x||0<ja.width)&&mxUtils.intersects(ca,new mxRectangle(X.x+(ja.x-ja.width-1)*aa+(0==ja.x?X.width:0),X.y,1,X.height))||(0<ja.y||0<ja.height)&&mxUtils.intersects(ca,new mxRectangle(X.x,X.y+(ja.y-ja.height-1)*aa+(0==ja.y?X.height:0),X.width,1)))&&(this.selectCellForEvent(X.cell, +M.getEvent()),ja=this.selectionCellsHandler.getHandler(X.cell),null!=ja&&(ka=mxEvent.CUSTOM_HANDLE-ja.customHandles.length+1,ja.start(M.getGraphX(),M.getGraphY(),ka),M.consume())),X=this.view.getState(this.model.getParent(X.cell))}}}));this.addMouseListener({mouseDown:function(M,aa){},mouseMove:mxUtils.bind(this,function(M,aa){M=this.selectionCellsHandler.handlers.map;for(var X in M)if(null!=M[X].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(aa.getEvent())){var ja= +this.tolerance;if(null!=F&&null!=P&&null!=K){if(X=P,Math.abs(F.x-aa.getGraphX())>ja||Math.abs(F.y-aa.getGraphY())>ja){var ca=this.selectionCellsHandler.getHandler(X.cell);null==ca&&this.model.isEdge(X.cell)&&(ca=this.createHandler(X));if(null!=ca&&null!=ca.bends&&0<ca.bends.length){M=ca.getHandleForEvent(K);var ka=this.view.getEdgeStyle(X);ja=ka==mxEdgeStyle.EntityRelation;f||d!=mxEvent.LABEL_HANDLE||(M=d);if(ja&&0!=M&&M!=ca.bends.length-1&&M!=mxEvent.LABEL_HANDLE)!ja||null==X.visibleSourceState&& +null==X.visibleTargetState||(this.graphHandler.reset(),aa.consume());else if(M==mxEvent.LABEL_HANDLE||0==M||null!=X.visibleSourceState||M==ca.bends.length-1||null!=X.visibleTargetState)ja||M==mxEvent.LABEL_HANDLE||(ja=X.absolutePoints,null!=ja&&(null==ka&&null==M||ka==mxEdgeStyle.OrthConnector)&&(M=d,null==M&&(M=new mxRectangle(F.x,F.y),M.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(M,ja[0].x,ja[0].y)?M=0:mxUtils.contains(M,ja[ja.length-1].x,ja[ja.length-1].y)?M=ca.bends.length- +1:null!=ka&&(2==ja.length||3==ja.length&&(0==Math.round(ja[0].x-ja[1].x)&&0==Math.round(ja[1].x-ja[2].x)||0==Math.round(ja[0].y-ja[1].y)&&0==Math.round(ja[1].y-ja[2].y)))?M=2:(M=mxUtils.findNearestSegment(X,F.x,F.y),M=null==ka?mxEvent.VIRTUAL_HANDLE-M:M+1))),null==M&&(M=mxEvent.VIRTUAL_HANDLE)),ca.start(aa.getGraphX(),aa.getGraphX(),M),aa.consume(),this.graphHandler.reset()}null!=ca&&(this.selectionCellsHandler.isHandlerActive(ca)?this.isCellSelected(X.cell)||(this.selectionCellsHandler.handlers.put(X.cell, +ca),this.selectCellForEvent(X.cell,aa.getEvent())):this.isCellSelected(X.cell)||ca.destroy());f=!1;F=K=P=d=null}}else if(X=aa.getState(),null!=X&&this.isCellEditable(X.cell)){ca=null;if(this.model.isEdge(X.cell)){if(M=new mxRectangle(aa.getGraphX(),aa.getGraphY()),M.grow(mxEdgeHandler.prototype.handleImage.width/2),ja=X.absolutePoints,null!=ja)if(null!=X.text&&null!=X.text.boundingBox&&mxUtils.contains(X.text.boundingBox,aa.getGraphX(),aa.getGraphY()))ca="move";else if(mxUtils.contains(M,ja[0].x, +ja[0].y)||mxUtils.contains(M,ja[ja.length-1].x,ja[ja.length-1].y))ca="pointer";else if(null!=X.visibleSourceState||null!=X.visibleTargetState)M=this.view.getEdgeStyle(X),ca="crosshair",M!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(X)&&(aa=mxUtils.findNearestSegment(X,aa.getGraphX(),aa.getGraphY()),aa<ja.length-1&&0<=aa&&(ca=0==Math.round(ja[aa].x-ja[aa+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(aa.getEvent())){ja=mxShape.prototype.svgStrokeTolerance/2;M=new mxRectangle(aa.getGraphX(), +aa.getGraphY());M.grow(ja);if(this.isTableCell(X.cell)&&(aa=this.model.getParent(X.cell),ja=this.model.getParent(aa),!this.isCellSelected(ja)))if(mxUtils.intersects(M,new mxRectangle(X.x,X.y-2,X.width,4))&&this.model.getChildAt(ja,0)!=aa||mxUtils.intersects(M,new mxRectangle(X.x,X.y+X.height-2,X.width,4)))ca="row-resize";else if(mxUtils.intersects(M,new mxRectangle(X.x-2,X.y,4,X.height))&&this.model.getChildAt(aa,0)!=X.cell||mxUtils.intersects(M,new mxRectangle(X.x+X.width-2,X.y,4,X.height)))ca="col-resize"; +for(aa=X;null==ca&&null!=aa&&(this.isTableCell(aa.cell)||this.isTableRow(aa.cell)||this.isTable(aa.cell));)this.isSwimlane(aa.cell)&&(ja=this.getActualStartSize(aa.cell),ka=this.view.scale,(0<ja.x||0<ja.width)&&mxUtils.intersects(M,new mxRectangle(aa.x+(ja.x-ja.width-1)*ka+(0==ja.x?aa.width*ka:0),aa.y,1,aa.height))?ca="col-resize":(0<ja.y||0<ja.height)&&mxUtils.intersects(M,new mxRectangle(aa.x,aa.y+(ja.y-ja.height-1)*ka+(0==ja.y?aa.height:0),aa.width,1))&&(ca="row-resize")),aa=this.view.getState(this.model.getParent(aa.cell))}null!= +ca&&X.setCursor(ca)}}}),mouseUp:mxUtils.bind(this,function(M,aa){d=F=K=P=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(M){var aa=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);M.view.graph.isHtmlLabel(M.cell)&&(aa=1!=M.style.html?mxUtils.htmlEntities(aa,!1):M.view.graph.sanitizeHtml(aa));return aa};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0); +this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(M,aa){return!1};this.alternateEdgeStyle="vertical";null==m&&this.loadStylesheet();var g=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var M=g.apply(this,arguments); +if(this.graph.pageVisible){var aa=[],X=this.graph.pageFormat,ja=this.graph.pageScale,ca=X.width*ja;X=X.height*ja;ja=this.graph.view.translate;for(var ka=this.graph.view.scale,q=this.graph.getPageLayout(),E=0;E<q.width;E++)aa.push(new mxRectangle(((q.x+E)*ca+ja.x)*ka,(q.y*X+ja.y)*ka,ca*ka,X*ka));for(E=1;E<q.height;E++)aa.push(new mxRectangle((q.x*ca+ja.x)*ka,((q.y+E)*X+ja.y)*ka,ca*ka,X*ka));M=aa.concat(M)}return M};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor= +function(M,aa){return null==M.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(M){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var x=this.graphHandler.getCells;this.graphHandler.getCells=function(M){for(var aa=x.apply(this,arguments),X=new mxDictionary,ja=[],ca=0;ca<aa.length;ca++){var ka=this.graph.isTableCell(M)&&this.graph.isTableCell(aa[ca])&& +this.graph.isCellSelected(aa[ca])?this.graph.model.getParent(aa[ca]):this.graph.isTableRow(M)&&this.graph.isTableRow(aa[ca])&&this.graph.isCellSelected(aa[ca])?aa[ca]:this.graph.getCompositeParent(aa[ca]);null==ka||X.get(ka)||(X.put(ka,!0),ja.push(ka))}return ja};var y=this.graphHandler.start;this.graphHandler.start=function(M,aa,X,ja){var ca=!1;this.graph.isTableCell(M)&&(this.graph.isCellSelected(M)?ca=!0:M=this.graph.model.getParent(M));ca||this.graph.isTableRow(M)&&this.graph.isCellSelected(M)|| +(M=this.graph.getCompositeParent(M));y.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(M,aa){aa=this.graph.getCompositeParent(aa);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var u=new mxRubberband(this);this.getRubberband=function(){return u};var H=(new Date).getTime(),J=0,D=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var M=this.currentState;D.apply(this,arguments);M!=this.currentState?(H=(new Date).getTime(), +J=0):J=(new Date).getTime()-H};var G=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(M){return mxEvent.isShiftDown(M.getEvent())&&mxEvent.isAltDown(M.getEvent())?!1:null!=this.currentState&&M.getState()==this.currentState&&2E3<J||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&G.apply(this,arguments)};var W=this.isToggleEvent;this.isToggleEvent=function(M){return W.apply(this,arguments)||!mxClient.IS_CHROMEOS&& +mxEvent.isShiftDown(M)};var T=u.isForceRubberbandEvent;u.isForceRubberbandEvent=function(M){return T.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(M.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==M.getState()&&mxEvent.isTouchEvent(M.getEvent())};var Z=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(Z=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END, +mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=Z)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(M){return mxEvent.isMouseEvent(M.getEvent())};var N=this.click;this.click=function(M){var aa=null==M.state&&null!=M.sourceState&&this.isCellLocked(M.sourceState.cell);if(this.isEnabled()&&!aa||M.isConsumed())return N.apply(this,arguments);var X=aa?M.sourceState.cell:M.getCell();null!=X&&(X=this.getClickableLinkForCell(X),null!=X&&(this.isCustomLink(X)? +this.customLinkClicked(X):this.openLink(X)));this.isEnabled()&&aa&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(M){return M.sourceState};var qa=this.tooltipHandler.show;this.tooltipHandler.show=function(){qa.apply(this,arguments);if(null!=this.div)for(var M=this.div.getElementsByTagName("a"),aa=0;aa<M.length;aa++)null!=M[aa].getAttribute("href")&&null==M[aa].getAttribute("target")&&M[aa].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(M){return M.sourceState}; +this.getCursorForMouseEvent=function(M){var aa=null==M.state&&null!=M.sourceState&&this.isCellLocked(M.sourceState.cell);return this.getCursorForCell(aa?M.sourceState.cell:M.getCell())};var oa=this.getCursorForCell;this.getCursorForCell=function(M){if(!this.isEnabled()||this.isCellLocked(M)){if(null!=this.getClickableLinkForCell(M))return"pointer";if(this.isCellLocked(M))return"default"}return oa.apply(this,arguments)};this.selectRegion=function(M,aa){var X=mxEvent.isAltDown(aa)?M:null;M=this.getCells(M.x, +M.y,M.width,M.height,null,null,X,function(ja){return"1"==mxUtils.getValue(ja.style,"locked","0")},!0);if(this.isToggleEvent(aa))for(X=0;X<M.length;X++)this.selectCellForEvent(M[X],aa);else this.selectCellsForEvent(M,aa);return M};var S=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(M,aa,X){return this.graph.isCellSelected(M)?!1:S.apply(this,arguments)};this.isCellLocked=function(M){for(;null!=M;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(M), +"locked","0"))return!0;M=this.model.getParent(M)}return!1};var fa=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(M,aa){"mouseDown"==aa.getProperty("eventName")&&(M=aa.getProperty("event").getState(),fa=null==M||this.isSelectionEmpty()||this.isCellSelected(M.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(M,aa){if(!mxEvent.isMultiTouchEvent(aa)){M=aa.getProperty("event");var X=aa.getProperty("cell");null==X?(M=mxUtils.convertPoint(this.container, +mxEvent.getClientX(M),mxEvent.getClientY(M)),u.start(M.x,M.y)):null!=fa?this.addSelectionCells(fa):1<this.getSelectionCount()&&this.isCellSelected(X)&&this.removeSelectionCell(X);fa=null;aa.consume()}}));this.connectionHandler.selectCells=function(M,aa){this.graph.setSelectionCell(aa||M)};this.connectionHandler.constraintHandler.isStateIgnored=function(M,aa){var X=M.view.graph;return aa&&(X.isCellSelected(M.cell)||X.isTableRow(M.cell)&&X.selectionCellsHandler.isHandled(X.model.getParent(M.cell)))}; +this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var M=this.connectionHandler.constraintHandler;null!=M.currentFocus&&M.isStateIgnored(M.currentFocus,!0)&&(M.currentFocus=null,M.constraints=null,M.destroyIcons());M.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var ia=this.updateMouseEvent;this.updateMouseEvent=function(M){M=ia.apply(this,arguments);null!=M.state&&this.isCellLocked(M.getCell())&&(M.state=null);return M}}this.currentTranslate=new mxPoint(0, +0)};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);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language; +Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than diagrams.net --\x3e"; Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSource fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" "); Graph.layoutNames="mxHierarchicalLayout mxCircleLayout mxCompactTreeLayout mxEdgeLabelLayout mxFastOrganicLayout mxParallelEdgeLayout mxPartitionLayout mxRadialTreeLayout mxStackLayout".split(" "); Graph.createOffscreenGraph=function(b){var e=new Graph(document.createElement("div"));e.stylesheet.styles=mxUtils.clone(b.styles);e.resetViewOnRootChange=!1;e.setConnectable(!1);e.gridEnabled=!1;e.autoScroll=!1;e.setTooltips(!1);e.setEnabled(!1);e.container.style.visibility="hidden";e.container.style.position="absolute";e.container.style.overflow="hidden";e.container.style.height="1px";e.container.style.width="1px";return e}; Graph.createSvgImage=function(b,e,k,m,C){k=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+b+'px" height="'+e+'px" '+(null!=m&&null!=C?'viewBox="0 0 '+m+" "+C+'" ':"")+'version="1.1">'+k+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(k):Base64.encode(k,!0)),b,e)}; -Graph.createSvgNode=function(b,e,k,m,C){var p=mxUtils.createXmlDocument(),E=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");null!=C&&(null!=E.style?E.style.backgroundColor=C:E.setAttribute("style","background-color:"+C));null==p.createElementNS?(E.setAttribute("xmlns",mxConstants.NS_SVG),E.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):E.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);E.setAttribute("version","1.1"); -E.setAttribute("width",k+"px");E.setAttribute("height",m+"px");E.setAttribute("viewBox",b+" "+e+" "+k+" "+m);p.appendChild(E);return E};Graph.htmlToPng=function(b,e,k,m){var C=document.createElement("canvas");C.width=e;C.height=k;var p=document.createElement("img");p.onload=mxUtils.bind(this,function(){C.getContext("2d").drawImage(p,0,0);m(C.toDataURL())});p.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml"><style>em{color:red;}</style><em>I</em> lick <span>cheese</span></div></foreignObject></svg>')}; +Graph.createSvgNode=function(b,e,k,m,C){var p=mxUtils.createXmlDocument(),F=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");null!=C&&(null!=F.style?F.style.backgroundColor=C:F.setAttribute("style","background-color:"+C));null==p.createElementNS?(F.setAttribute("xmlns",mxConstants.NS_SVG),F.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):F.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);F.setAttribute("version","1.1"); +F.setAttribute("width",k+"px");F.setAttribute("height",m+"px");F.setAttribute("viewBox",b+" "+e+" "+k+" "+m);p.appendChild(F);return F};Graph.htmlToPng=function(b,e,k,m){var C=document.createElement("canvas");C.width=e;C.height=k;var p=document.createElement("img");p.onload=mxUtils.bind(this,function(){C.getContext("2d").drawImage(p,0,0);m(C.toDataURL())});p.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml"><style>em{color:red;}</style><em>I</em> lick <span>cheese</span></div></foreignObject></svg>')}; Graph.zapGremlins=function(b){for(var e=0,k=[],m=0;m<b.length;m++){var C=b.charCodeAt(m);(32<=C||9==C||10==C||13==C)&&65535!=C&&65534!=C||(k.push(b.substring(e,m)),e=m+1)}0<e&&e<b.length&&k.push(b.substring(e));return 0==k.length?b:k.join("")};Graph.stringToBytes=function(b){for(var e=Array(b.length),k=0;k<b.length;k++)e[k]=b.charCodeAt(k);return e};Graph.bytesToString=function(b){for(var e=Array(b.length),k=0;k<b.length;k++)e[k]=String.fromCharCode(b[k]);return e.join("")}; Graph.base64EncodeUnicode=function(b){return btoa(encodeURIComponent(b).replace(/%([0-9A-F]{2})/g,function(e,k){return String.fromCharCode(parseInt(k,16))}))};Graph.base64DecodeUnicode=function(b){return decodeURIComponent(Array.prototype.map.call(atob(b),function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(b,e){b=mxUtils.getXml(b);return Graph.compress(e?b:Graph.zapGremlins(b))}; Graph.arrayBufferToString=function(b){var e="";b=new Uint8Array(b);for(var k=b.byteLength,m=0;m<k;m++)e+=String.fromCharCode(b[m]);return e};Graph.stringToArrayBuffer=function(b){return Uint8Array.from(b,function(e){return e.charCodeAt(0)})}; @@ -2326,36 +2324,36 @@ Graph.arrayBufferIndexOfString=function(b,e,k){var m=e.charCodeAt(0),C=1,p=-1;fo Graph.decompress=function(b,e,k){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=Graph.stringToArrayBuffer(atob(b));e=decodeURIComponent(e?pako.inflate(b,{to:"string"}):pako.inflateRaw(b,{to:"string"}));return k?e:Graph.zapGremlins(e)}; Graph.fadeNodes=function(b,e,k,m,C){C=null!=C?C:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,e);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+C+"ms ease-in-out");Graph.setOpacityForNodes(b,k);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=m&&m()},C)},0)};Graph.removeKeys=function(b,e){for(var k in b)e(k)&&delete b[k]}; Graph.setTransitionForNodes=function(b,e){for(var k=0;k<b.length;k++)mxUtils.setPrefixedStyle(b[k].style,"transition",e)};Graph.setOpacityForNodes=function(b,e){for(var k=0;k<b.length;k++)b[k].style.opacity=e};Graph.removePasteFormatting=function(b){for(;null!=b;)null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild),b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style&&(b.style.whiteSpace="","#000000"==b.style.color&&(b.style.color="")),b=b.nextSibling}; -Graph.sanitizeHtml=function(b,e){return Graph.domPurify(b,!1)};Graph.sanitizeLink=function(b){var e=document.createElement("a");e.setAttribute("href",b);Graph.sanitizeNode(e);return e.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(b){"use"==b.nodeName&&b.hasAttribute("xlink:href")&&!b.getAttribute("xlink:href").match(/^#/)&&b.remove()}); +Graph.sanitizeHtml=function(b,e){return Graph.domPurify(b,!1)};Graph.sanitizeLink=function(b){var e=document.createElement("a");e.setAttribute("href",b);Graph.sanitizeNode(e);return e.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(b){"use"==b.nodeName&&(null!=b.getAttribute("xlink:href")&&!b.getAttribute("xlink:href").startsWith("#")||null!=b.getAttribute("href")&&!b.getAttribute("href").startsWith("#"))&&b.remove()}); Graph.domPurify=function(b,e){window.DOM_PURIFY_CONFIG.IN_PLACE=e;return DOMPurify.sanitize(b,window.DOM_PURIFY_CONFIG)}; Graph.clipSvgDataUri=function(b,e){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var k=document.createElement("div");k.style.position="absolute";k.style.visibility="hidden";var m=decodeURIComponent(escape(atob(b.substring(26)))),C=m.indexOf("<svg");if(0<=C){k.innerHTML=Graph.sanitizeHtml(m.substring(C));var p=k.getElementsByTagName("svg");if(0<p.length){if(e||null!=p[0].getAttribute("preserveAspectRatio")){document.body.appendChild(k);try{m=e= -1;var E=p[0].getAttribute("width"),K=p[0].getAttribute("height");E=null!=E&&"%"!=E.charAt(E.length-1)?parseFloat(E):NaN;K=null!=K&&"%"!=K.charAt(K.length-1)?parseFloat(K):NaN;var Q=p[0].getAttribute("viewBox");if(null!=Q&&!isNaN(E)&&!isNaN(K)){var d=Q.split(" ");4<=Q.length&&(e=parseFloat(d[2])/E,m=parseFloat(d[3])/K)}var f=p[0].getBBox();0<f.width&&0<f.height&&(k.getElementsByTagName("svg")[0].setAttribute("viewBox",f.x+" "+f.y+" "+f.width+" "+f.height),k.getElementsByTagName("svg")[0].setAttribute("width", +1;var F=p[0].getAttribute("width"),K=p[0].getAttribute("height");F=null!=F&&"%"!=F.charAt(F.length-1)?parseFloat(F):NaN;K=null!=K&&"%"!=K.charAt(K.length-1)?parseFloat(K):NaN;var P=p[0].getAttribute("viewBox");if(null!=P&&!isNaN(F)&&!isNaN(K)){var d=P.split(" ");4<=P.length&&(e=parseFloat(d[2])/F,m=parseFloat(d[3])/K)}var f=p[0].getBBox();0<f.width&&0<f.height&&(k.getElementsByTagName("svg")[0].setAttribute("viewBox",f.x+" "+f.y+" "+f.width+" "+f.height),k.getElementsByTagName("svg")[0].setAttribute("width", f.width/e),k.getElementsByTagName("svg")[0].setAttribute("height",f.height/m))}catch(g){}finally{document.body.removeChild(k)}}b=Editor.createSvgDataUri(mxUtils.getXml(p[0]))}}}catch(g){}return b};Graph.stripQuotes=function(b){null!=b&&("'"==b.charAt(0)&&(b=b.substring(1)),"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),'"'==b.charAt(0)&&(b=b.substring(1)),'"'==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)));return b}; Graph.createRemoveIcon=function(b,e){var k=document.createElement("img");k.setAttribute("src",Dialog.prototype.clearImage);k.setAttribute("title",b);k.setAttribute("width","13");k.setAttribute("height","10");k.style.marginLeft="4px";k.style.marginBottom="-1px";k.style.cursor="pointer";mxEvent.addListener(k,"click",e);return k};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};Graph.isLink=function(b){return null!=b&&Graph.linkPattern.test(b)}; Graph.linkPattern=RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i");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.linkRelation="nofollow noopener noreferrer"; Graph.prototype.defaultScrollbars=!0;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled="0"!=urlParams.grid;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.shapeForegroundColor="#000000";Graph.prototype.shapeBackgroundColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1; Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}^ ^\"^ '^=^;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0]; Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;Graph.prototype.enableFlowAnimation=!1;Graph.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput card curlyBracket singleArrow callout doubleArrow flexArrow umlLifeline".split(" "); -Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(k,m){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var C=k.view.graph.tolerance,p=!0,E=null,K=mxUtils.bind(this,function(f){p=!0;E=new mxPoint(mxEvent.getClientX(f),mxEvent.getClientY(f))}),Q=mxUtils.bind(this,function(f){p=p&&null!=E&&Math.abs(E.x-mxEvent.getClientX(f))<C&&Math.abs(E.y-mxEvent.getClientY(f))<C}),d=mxUtils.bind(this,function(f){if(p)for(var g=mxEvent.getSource(f);null!= -g&&g!=m.node;){if("a"==g.nodeName.toLowerCase()){k.view.graph.labelLinkClicked(k,g,f);break}g=g.parentNode}});mxEvent.addGestureListeners(m.node,K,Q,d);mxEvent.addListener(m.node,"click",function(f){mxEvent.consume(f)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(k){var m=mxEvent.getSource(k);"A"==m.nodeName&&(m=m.getAttribute("href"),null!= +Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(k,m){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var C=k.view.graph.tolerance,p=!0,F=null,K=mxUtils.bind(this,function(f){p=!0;F=new mxPoint(mxEvent.getClientX(f),mxEvent.getClientY(f))}),P=mxUtils.bind(this,function(f){p=p&&null!=F&&Math.abs(F.x-mxEvent.getClientX(f))<C&&Math.abs(F.y-mxEvent.getClientY(f))<C}),d=mxUtils.bind(this,function(f){if(p)for(var g=mxEvent.getSource(f);null!= +g&&g!=m.node;){if("a"==g.nodeName.toLowerCase()){k.view.graph.labelLinkClicked(k,g,f);break}g=g.parentNode}});mxEvent.addGestureListeners(m.node,K,P,d);mxEvent.addListener(m.node,"click",function(f){mxEvent.consume(f)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(k){var m=mxEvent.getSource(k);"A"==m.nodeName&&(m=m.getAttribute("href"),null!= m&&this.graph.isCustomLink(m)&&(mxEvent.isTouchEvent(k)||!mxEvent.isPopupTrigger(k))&&this.graph.customLinkClicked(m)&&mxEvent.consume(k))}))}}this.addListener(mxEvent.SIZE,mxUtils.bind(this,function(k,m){null!=this.container&&this.flowAnimationStyle&&(k=this.flowAnimationStyle.getAttribute("id"),this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(k))}));this.initLayoutManager()}; -(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFillState=function(E){return!this.isSpecialColor(E.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(E.style,"lineShape",null)&&(this.model.isVertex(E.cell)||"arrow"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE, -null)||"mxgraph.arrows2.wedgeArrow"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isStrokeState=function(E){return!this.isSpecialColor(E.style[mxConstants.STYLE_STROKECOLOR])};Graph.prototype.isSpecialColor=function(E){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],E)};Graph.prototype.isGlassState=function(E){E=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return"label"==E||"rectangle"==E|| -"internalStorage"==E||"ext"==E||"umlLifeline"==E||"swimlane"==E||"process"==E};Graph.prototype.isRoundedState=function(E){return null!=E.shape?E.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(E){var K=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(E.style,mxConstants.STYLE_CURVED,!1)&&("connector"==K||"filledEdge"==K)};Graph.prototype.isAutoSizeState=function(E){return"1"== -mxUtils.getValue(E.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(E){E=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return"label"==E||"image"==E};Graph.prototype.isShadowState=function(E){return"image"!=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.getVerticesAndEdges=function(E,K){E=null!=E?E:!0;K=null!=K?K:!0;var Q=this.model;return Q.filterDescendants(function(d){return E&&Q.isVertex(d)||K&&Q.isEdge(d)},Q.getRoot())};Graph.prototype.getCommonStyle= -function(E){for(var K={},Q=0;Q<E.length;Q++){var d=this.view.getState(E[Q]);this.mergeStyle(d.style,K,0==Q)}return K};Graph.prototype.mergeStyle=function(E,K,Q){if(null!=E){var d={},f;for(f in E){var g=E[f];null!=g&&(d[f]=!0,null==K[f]&&Q?K[f]=g:K[f]!=g&&delete K[f])}for(f in K)d[f]||delete K[f]}};Graph.prototype.getStartEditingCell=function(E,K){K=this.getCellStyle(E);K=parseInt(mxUtils.getValue(K,mxConstants.STYLE_STARTSIZE,0));this.isTable(E)&&(!this.isSwimlane(E)||0==K)&&""==this.getLabel(E)&& -0<this.model.getChildCount(E)&&(E=this.model.getChildAt(E,0),K=this.getCellStyle(E),K=parseInt(mxUtils.getValue(K,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(E)&&(!this.isSwimlane(E)||0==K)&&""==this.getLabel(E)&&0<this.model.getChildCount(E))for(K=0;K<this.model.getChildCount(E);K++){var Q=this.model.getChildAt(E,K);if(this.isCellEditable(Q)){E=Q;break}}return E};Graph.prototype.copyStyle=function(E){return this.getCellStyle(E,!1)};Graph.prototype.pasteStyle=function(E,K,Q){Q=null!=Q?Q:Graph.pasteStyles; -Graph.removeKeys(E,function(d){return 0>mxUtils.indexOf(Q,d)});this.updateCellStyles(E,K)};Graph.prototype.updateCellStyles=function(E,K){this.model.beginUpdate();try{for(var Q=0;Q<K.length;Q++)if(this.model.isVertex(K[Q])||this.model.isEdge(K[Q])){var d=this.getCellStyle(K[Q],!1),f;for(f in E){var g=E[f];d[f]!=g&&this.setCellStyles(f,g,[K[Q]])}}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&& -(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(E,K,Q,d,f,g){this.useCssTransforms&&(E=E/this.currentScale-this.currentTranslate.x,K=K/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(E,K,Q,d,f,g){d=null!=d?d:!0;f=null!=f?f:!0; -null==Q&&(Q=this.getCurrentRoot(),null==Q&&(Q=this.getModel().getRoot()));if(null!=Q)for(var x=this.model.getChildCount(Q)-1;0<=x;x--){var z=this.model.getChildAt(Q,x),u=this.getScaledCellAt(E,K,z,d,f,g);if(null!=u)return u;if(this.isCellVisible(z)&&(f&&this.model.isEdge(z)||d&&this.model.isVertex(z))&&(u=this.view.getState(z),null!=u&&(null==g||!g(u,E,K))&&this.intersects(u,E,K)))return z}return null};Graph.prototype.isRecursiveVertexResize=function(E){return!this.isSwimlane(E.cell)&&0<this.model.getChildCount(E.cell)&& -!this.isCellCollapsed(E.cell)&&"1"==mxUtils.getValue(E.style,"recursiveResize","1")&&null==mxUtils.getValue(E.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(E){for(var K=this.getCellGeometry(E);null!=K&&K.relative;)E=this.getModel().getParent(E),K=this.getCellGeometry(E);return E};Graph.prototype.isPart=function(E){return"1"==mxUtils.getValue(this.getCurrentCellStyle(E),"part","0")||this.isTableCell(E)||this.isTableRow(E)};Graph.prototype.getCompositeParents=function(E){for(var K= -new mxDictionary,Q=[],d=0;d<E.length;d++){var f=this.getCompositeParent(E[d]);this.isTableCell(f)&&(f=this.graph.model.getParent(f));this.isTableRow(f)&&(f=this.graph.model.getParent(f));null==f||K.get(f)||(K.put(f,!0),Q.push(f))}return Q};Graph.prototype.getCompositeParent=function(E){for(;this.isPart(E);){var K=this.model.getParent(E);if(!this.model.isVertex(K))break;E=K}return E};Graph.prototype.filterSelectionCells=function(E){var K=this.getSelectionCells();if(null!=E){for(var Q=[],d=0;d<K.length;d++)E(K[d])|| -Q.push(K[d]);K=Q}return K};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(E){if(this.useCssTransforms){var K=this.currentScale,Q=this.currentTranslate;E=new mxRectangle((E.x+2*Q.x)*K-Q.x,(E.y+2*Q.y)*K-Q.y,E.width*K,E.height*K)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(E){E=this.strokeWidth;this.graph.useCssTransforms&&(E/=this.graph.currentScale);return E};mxGraphView.prototype.getGraphBounds=function(){var E=this.graphBounds; -if(this.graph.useCssTransforms){var K=this.graph.currentTranslate,Q=this.graph.currentScale;E=new mxRectangle((E.x+K.x)*Q,(E.y+K.y)*Q,E.width*Q,E.height*Q)}return E};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(E){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y= -this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);e.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var k=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(E){E=k.apply(this,arguments);for(var K=[],Q=0;Q<E.length;Q++)this.isTableRow(E[Q])||this.isTableCell(E[Q])||K.push(E[Q]);return K};var m= -mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(E){E=m.apply(this,arguments);for(var K=[],Q=0;Q<E.length;Q++)this.isTable(E[Q])||this.isTableRow(E[Q])||this.isTableCell(E[Q])||K.push(E[Q]);return K};Graph.prototype.updateCssTransform=function(){var E=this.view.getDrawPane();if(null!=E)if(E=E.parentNode,this.useCssTransforms){var K=E.getAttribute("transform");E.setAttribute("transformOrigin","0 0");var Q=Math.round(100*this.currentScale)/100;E.setAttribute("transform", -"scale("+Q+","+Q+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");K!=E.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",E.getAttribute("transform"))}else E.removeAttribute("transformOrigin"),E.removeAttribute("transform")};var C=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var E=this.graph.useCssTransforms,K=this.scale,Q=this.translate; -E&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);C.apply(this,arguments);E&&(this.scale=K,this.translate=Q)};var p=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(E,K,Q){var d=this.useCssTransforms,f=this.view.scale,g=this.view.translate;d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);p.apply(this,arguments);d&&(this.view.scale=f,this.view.translate=g,this.useCssTransforms=!0)}})(); +(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFillState=function(F){return!this.isSpecialColor(F.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(F.style,"lineShape",null)&&(this.model.isVertex(F.cell)||"arrow"==mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE, +null)||"mxgraph.arrows2.wedgeArrow"==mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isStrokeState=function(F){return!this.isSpecialColor(F.style[mxConstants.STYLE_STROKECOLOR])};Graph.prototype.isSpecialColor=function(F){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],F)};Graph.prototype.isGlassState=function(F){F=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null);return"label"==F||"rectangle"==F|| +"internalStorage"==F||"ext"==F||"umlLifeline"==F||"swimlane"==F||"process"==F};Graph.prototype.isRoundedState=function(F){return null!=F.shape?F.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(F){var K=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(F.style,mxConstants.STYLE_CURVED,!1)&&("connector"==K||"filledEdge"==K)};Graph.prototype.isAutoSizeState=function(F){return"1"== +mxUtils.getValue(F.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(F){F=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null);return"label"==F||"image"==F};Graph.prototype.isShadowState=function(F){return"image"!=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.getVerticesAndEdges=function(F,K){F=null!=F?F:!0;K=null!=K?K:!0;var P=this.model;return P.filterDescendants(function(d){return F&&P.isVertex(d)||K&&P.isEdge(d)},P.getRoot())};Graph.prototype.getCommonStyle= +function(F){for(var K={},P=0;P<F.length;P++){var d=this.view.getState(F[P]);this.mergeStyle(d.style,K,0==P)}return K};Graph.prototype.mergeStyle=function(F,K,P){if(null!=F){var d={},f;for(f in F){var g=F[f];null!=g&&(d[f]=!0,null==K[f]&&P?K[f]=g:K[f]!=g&&delete K[f])}for(f in K)d[f]||delete K[f]}};Graph.prototype.getStartEditingCell=function(F,K){K=this.getCellStyle(F);K=parseInt(mxUtils.getValue(K,mxConstants.STYLE_STARTSIZE,0));this.isTable(F)&&(!this.isSwimlane(F)||0==K)&&""==this.getLabel(F)&& +0<this.model.getChildCount(F)&&(F=this.model.getChildAt(F,0),K=this.getCellStyle(F),K=parseInt(mxUtils.getValue(K,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(F)&&(!this.isSwimlane(F)||0==K)&&""==this.getLabel(F)&&0<this.model.getChildCount(F))for(K=0;K<this.model.getChildCount(F);K++){var P=this.model.getChildAt(F,K);if(this.isCellEditable(P)){F=P;break}}return F};Graph.prototype.copyStyle=function(F){return this.getCellStyle(F,!1)};Graph.prototype.pasteStyle=function(F,K,P){P=null!=P?P:Graph.pasteStyles; +Graph.removeKeys(F,function(d){return 0>mxUtils.indexOf(P,d)});this.updateCellStyles(F,K)};Graph.prototype.updateCellStyles=function(F,K){this.model.beginUpdate();try{for(var P=0;P<K.length;P++)if(this.model.isVertex(K[P])||this.model.isEdge(K[P])){var d=this.getCellStyle(K[P],!1),f;for(f in F){var g=F[f];d[f]!=g&&this.setCellStyles(f,g,[K[P]])}}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&& +(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(F,K,P,d,f,g){this.useCssTransforms&&(F=F/this.currentScale-this.currentTranslate.x,K=K/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(F,K,P,d,f,g){d=null!=d?d:!0;f=null!=f?f:!0; +null==P&&(P=this.getCurrentRoot(),null==P&&(P=this.getModel().getRoot()));if(null!=P)for(var x=this.model.getChildCount(P)-1;0<=x;x--){var y=this.model.getChildAt(P,x),u=this.getScaledCellAt(F,K,y,d,f,g);if(null!=u)return u;if(this.isCellVisible(y)&&(f&&this.model.isEdge(y)||d&&this.model.isVertex(y))&&(u=this.view.getState(y),null!=u&&(null==g||!g(u,F,K))&&this.intersects(u,F,K)))return y}return null};Graph.prototype.isRecursiveVertexResize=function(F){return!this.isSwimlane(F.cell)&&0<this.model.getChildCount(F.cell)&& +!this.isCellCollapsed(F.cell)&&"1"==mxUtils.getValue(F.style,"recursiveResize","1")&&null==mxUtils.getValue(F.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(F){for(var K=this.getCellGeometry(F);null!=K&&K.relative;)F=this.getModel().getParent(F),K=this.getCellGeometry(F);return F};Graph.prototype.isPart=function(F){return"1"==mxUtils.getValue(this.getCurrentCellStyle(F),"part","0")||this.isTableCell(F)||this.isTableRow(F)};Graph.prototype.getCompositeParents=function(F){for(var K= +new mxDictionary,P=[],d=0;d<F.length;d++){var f=this.getCompositeParent(F[d]);this.isTableCell(f)&&(f=this.graph.model.getParent(f));this.isTableRow(f)&&(f=this.graph.model.getParent(f));null==f||K.get(f)||(K.put(f,!0),P.push(f))}return P};Graph.prototype.getCompositeParent=function(F){for(;this.isPart(F);){var K=this.model.getParent(F);if(!this.model.isVertex(K))break;F=K}return F};Graph.prototype.filterSelectionCells=function(F){var K=this.getSelectionCells();if(null!=F){for(var P=[],d=0;d<K.length;d++)F(K[d])|| +P.push(K[d]);K=P}return K};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(F){if(this.useCssTransforms){var K=this.currentScale,P=this.currentTranslate;F=new mxRectangle((F.x+2*P.x)*K-P.x,(F.y+2*P.y)*K-P.y,F.width*K,F.height*K)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(F){F=this.strokeWidth;this.graph.useCssTransforms&&(F/=this.graph.currentScale);return F};mxGraphView.prototype.getGraphBounds=function(){var F=this.graphBounds; +if(this.graph.useCssTransforms){var K=this.graph.currentTranslate,P=this.graph.currentScale;F=new mxRectangle((F.x+K.x)*P,(F.y+K.y)*P,F.width*P,F.height*P)}return F};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(F){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y= +this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);e.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var k=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(F){F=k.apply(this,arguments);for(var K=[],P=0;P<F.length;P++)this.isTableRow(F[P])||this.isTableCell(F[P])||K.push(F[P]);return K};var m= +mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(F){F=m.apply(this,arguments);for(var K=[],P=0;P<F.length;P++)this.isTable(F[P])||this.isTableRow(F[P])||this.isTableCell(F[P])||K.push(F[P]);return K};Graph.prototype.updateCssTransform=function(){var F=this.view.getDrawPane();if(null!=F)if(F=F.parentNode,this.useCssTransforms){var K=F.getAttribute("transform");F.setAttribute("transformOrigin","0 0");var P=Math.round(100*this.currentScale)/100;F.setAttribute("transform", +"scale("+P+","+P+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");K!=F.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",F.getAttribute("transform"))}else F.removeAttribute("transformOrigin"),F.removeAttribute("transform")};var C=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var F=this.graph.useCssTransforms,K=this.scale,P=this.translate; +F&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);C.apply(this,arguments);F&&(this.scale=K,this.translate=P)};var p=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(F,K,P){var d=this.useCssTransforms,f=this.view.scale,g=this.view.translate;d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);p.apply(this,arguments);d&&(this.view.scale=f,this.view.translate=g,this.useCssTransforms=!0)}})(); Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};Graph.prototype.labelLinkClicked=function(b,e,k){e=e.getAttribute("href");if(null!=e&&!this.isCustomLink(e)&&(mxEvent.isLeftMouseButton(k)&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(e)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(e),b);mxEvent.consume(k)}}; Graph.prototype.openLink=function(b,e,k){var m=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==e&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==e&&window==window.top){var C=b.split("#")[1];window.location.hash=="#"+C&&(window.location.hash="");window.location.hash=C}else m=window.open(b,null!=e?e:"_blank"),null==m||k||(m.opener=null)}catch(p){}return m}; Graph.prototype.getLinkTitle=function(b){return b.substring(b.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(b){return"data:"==b.substring(0,5)};Graph.prototype.customLinkClicked=function(b){return!1};Graph.prototype.isExternalProtocol=function(b){return"mailto:"===b.substring(0,7)};Graph.prototype.isBlankLink=function(b){return!this.isExternalProtocol(b)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(b)&&b.substring(0,this.domainUrl.length)!==this.domainUrl)}; @@ -2369,10 +2367,10 @@ Graph.prototype.createLayouts=function(b){for(var e=[],k=0;k<b.length;k++)if(0<= Graph.prototype.getDataForCells=function(b){for(var e=[],k=0;k<b.length;k++){var m=null!=b[k].value?b[k].value.attributes:null,C={};C.id=b[k].id;if(null!=m)for(var p=0;p<m.length;p++)C[m[p].nodeName]=m[p].nodeValue;else C.label=this.convertValueToString(b[k]);e.push(C)}return e}; Graph.prototype.getNodesForCells=function(b){for(var e=[],k=0;k<b.length;k++){var m=this.view.getState(b[k]);if(null!=m){for(var C=this.cellRenderer.getShapesForState(m),p=0;p<C.length;p++)null!=C[p]&&null!=C[p].node&&e.push(C[p].node);null!=m.control&&null!=m.control.node&&e.push(m.control.node)}}return e}; Graph.prototype.createWipeAnimations=function(b,e){for(var k=[],m=0;m<b.length;m++){var C=this.view.getState(b[m]);null!=C&&null!=C.shape&&(this.model.isEdge(C.cell)&&null!=C.absolutePoints&&1<C.absolutePoints.length?k.push(this.createEdgeWipeAnimation(C,e)):this.model.isVertex(C.cell)&&null!=C.shape.bounds&&k.push(this.createVertexWipeAnimation(C,e)))}return k}; -Graph.prototype.createEdgeWipeAnimation=function(b,e){var k=b.absolutePoints.slice(),m=b.segments,C=b.length,p=k.length;return{execute:mxUtils.bind(this,function(E,K){if(null!=b.shape){var Q=[k[0]];K=E/K;e||(K=1-K);for(var d=C*K,f=1;f<p;f++)if(d<=m[f-1]){Q.push(new mxPoint(k[f-1].x+(k[f].x-k[f-1].x)*d/m[f-1],k[f-1].y+(k[f].y-k[f-1].y)*d/m[f-1]));break}else d-=m[f-1],Q.push(k[f]);b.shape.points=Q;b.shape.redraw();0==E&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!= +Graph.prototype.createEdgeWipeAnimation=function(b,e){var k=b.absolutePoints.slice(),m=b.segments,C=b.length,p=k.length;return{execute:mxUtils.bind(this,function(F,K){if(null!=b.shape){var P=[k[0]];K=F/K;e||(K=1-K);for(var d=C*K,f=1;f<p;f++)if(d<=m[f-1]){P.push(new mxPoint(k[f-1].x+(k[f].x-k[f-1].x)*d/m[f-1],k[f-1].y+(k[f].y-k[f-1].y)*d/m[f-1]));break}else d-=m[f-1],P.push(k[f]);b.shape.points=P;b.shape.redraw();0==F&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!= b.text.node&&(b.text.node.style.opacity=K)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}}; Graph.prototype.createVertexWipeAnimation=function(b,e){var k=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(m,C){null!=b.shape&&(C=m/C,e||(C=1-C),b.shape.bounds=new mxRectangle(k.x,k.y,k.width*C,k.height),b.shape.redraw(),0==m&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=C))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&& -(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.executeAnimations=function(b,e,k,m){k=null!=k?k:30;m=null!=m?m:30;var C=null,p=0,E=mxUtils.bind(this,function(){if(p==k||this.stoppingCustomActions){window.clearInterval(C);for(var K=0;K<b.length;K++)b[K].stop();null!=e&&e()}else for(K=0;K<b.length;K++)b[K].execute(p,k);p++});C=window.setInterval(E,m);E()}; +(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.executeAnimations=function(b,e,k,m){k=null!=k?k:30;m=null!=m?m:30;var C=null,p=0,F=mxUtils.bind(this,function(){if(p==k||this.stoppingCustomActions){window.clearInterval(C);for(var K=0;K<b.length;K++)b[K].stop();null!=e&&e()}else for(K=0;K<b.length;K++)b[K].execute(p,k);p++});C=window.setInterval(F,m);F()}; Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize}; Graph.prototype.getPageLayout=function(){var b=this.getPageSize(),e=this.getGraphBounds();if(0==e.width||0==e.height)return new mxRectangle(0,0,1,1);var k=Math.floor(Math.ceil(e.x/this.view.scale-this.view.translate.x)/b.width),m=Math.floor(Math.ceil(e.y/this.view.scale-this.view.translate.y)/b.height);return new mxRectangle(k,m,Math.ceil((Math.floor((e.x+e.width)/this.view.scale)-this.view.translate.x)/b.width)-k,Math.ceil((Math.floor((e.y+e.height)/this.view.scale)-this.view.translate.y)/b.height)- m)};Graph.prototype.sanitizeHtml=function(b,e){return Graph.sanitizeHtml(b,e)};Graph.prototype.updatePlaceholders=function(){var b=!1,e;for(e in this.model.cells){var k=this.model.cells[e];this.isReplacePlaceholders(k)&&(this.view.invalidate(k,!1,!1),b=!0)}b&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(b){return null!=b.value&&"object"==typeof b.value&&"1"==b.value.getAttribute("placeholders")}; @@ -2382,28 +2380,28 @@ Graph.prototype.getLabel=function(b){var e=mxGraph.prototype.getLabel.apply(this Graph.prototype.setGridSize=function(b){this.gridSize=b;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(b){this.defaultParent=b;this.fireEvent(new mxEventObject("defaultParentChanged"))};Graph.prototype.getClickableLinkForCell=function(b){do{var e=this.getLinkForCell(b);if(null!=e)return e;b=this.model.getParent(b)}while(null!=b);return null}; Graph.prototype.getGlobalVariable=function(b){var e=null;"date"==b?e=(new Date).toLocaleDateString():"time"==b?e=(new Date).toLocaleTimeString():"timestamp"==b?e=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),e=this.formatDate(new Date,b));return e}; Graph.prototype.formatDate=function(b,e,k){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy", -shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var m=this.dateFormatCache,C=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,p=/[^-+\dA-Z]/g,E=function(D,G){D=String(D);for(G=G||2;D.length<G;)D="0"+D;return D};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)|| -/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(m.masks[e]||e||m.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),k=!0);var K=k?"getUTC":"get",Q=b[K+"Date"](),d=b[K+"Day"](),f=b[K+"Month"](),g=b[K+"FullYear"](),x=b[K+"Hours"](),z=b[K+"Minutes"](),u=b[K+"Seconds"]();K=b[K+"Milliseconds"]();var H=k?0:b.getTimezoneOffset(),J={d:Q,dd:E(Q),ddd:m.i18n.dayNames[d],dddd:m.i18n.dayNames[d+7],m:f+1,mm:E(f+1),mmm:m.i18n.monthNames[f],mmmm:m.i18n.monthNames[f+ -12],yy:String(g).slice(2),yyyy:g,h:x%12||12,hh:E(x%12||12),H:x,HH:E(x),M:z,MM:E(z),s:u,ss:E(u),l:E(K,3),L:E(99<K?Math.round(K/10):K),t:12>x?"a":"p",tt:12>x?"am":"pm",T:12>x?"A":"P",TT:12>x?"AM":"PM",Z:k?"UTC":(String(b).match(C)||[""]).pop().replace(p,""),o:(0<H?"-":"+")+E(100*Math.floor(Math.abs(H)/60)+Math.abs(H)%60,4),S:["th","st","nd","rd"][3<Q%10?0:(10!=Q%100-Q%10)*Q%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(D){return D in J?J[D]:D.slice(1, +shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var m=this.dateFormatCache,C=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,p=/[^-+\dA-Z]/g,F=function(D,G){D=String(D);for(G=G||2;D.length<G;)D="0"+D;return D};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)|| +/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(m.masks[e]||e||m.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),k=!0);var K=k?"getUTC":"get",P=b[K+"Date"](),d=b[K+"Day"](),f=b[K+"Month"](),g=b[K+"FullYear"](),x=b[K+"Hours"](),y=b[K+"Minutes"](),u=b[K+"Seconds"]();K=b[K+"Milliseconds"]();var H=k?0:b.getTimezoneOffset(),J={d:P,dd:F(P),ddd:m.i18n.dayNames[d],dddd:m.i18n.dayNames[d+7],m:f+1,mm:F(f+1),mmm:m.i18n.monthNames[f],mmmm:m.i18n.monthNames[f+ +12],yy:String(g).slice(2),yyyy:g,h:x%12||12,hh:F(x%12||12),H:x,HH:F(x),M:y,MM:F(y),s:u,ss:F(u),l:F(K,3),L:F(99<K?Math.round(K/10):K),t:12>x?"a":"p",tt:12>x?"am":"pm",T:12>x?"A":"P",TT:12>x?"AM":"PM",Z:k?"UTC":(String(b).match(C)||[""]).pop().replace(p,""),o:(0<H?"-":"+")+F(100*Math.floor(Math.abs(H)/60)+Math.abs(H)%60,4),S:["th","st","nd","rd"][3<P%10?0:(10!=P%100-P%10)*P%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(D){return D in J?J[D]:D.slice(1, D.length-1)})};Graph.prototype.getLayerForCells=function(b){var e=null;if(0<b.length){for(e=b[0];!this.model.isLayer(e);)e=this.model.getParent(e);for(var k=1;k<b.length;k++)if(!this.model.isAncestor(e,b[k])){e=null;break}}return e}; -Graph.prototype.createLayersDialog=function(b,e){var k=document.createElement("div");k.style.position="absolute";for(var m=this.getModel(),C=m.getChildCount(m.root),p=0;p<C;p++)mxUtils.bind(this,function(E){function K(){m.isVisible(E)?(f.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(d,75)):(f.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(d,25))}var Q=this.convertValueToString(E)||mxResources.get("background")||"Background",d=document.createElement("div");d.style.overflow= -"hidden";d.style.textOverflow="ellipsis";d.style.padding="2px";d.style.whiteSpace="nowrap";d.style.cursor="pointer";d.setAttribute("title",mxResources.get(m.isVisible(E)?"hideIt":"show",[Q]));var f=document.createElement("img");f.setAttribute("draggable","false");f.setAttribute("align","absmiddle");f.setAttribute("border","0");f.style.position="relative";f.style.width="16px";f.style.padding="0px 6px 0 4px";e&&(f.style.filter="invert(100%)",f.style.top="-2px");d.appendChild(f);mxUtils.write(d,Q);k.appendChild(d); -mxEvent.addListener(d,"click",function(){m.setVisible(E,!m.isVisible(E));K();null!=b&&b(E)});K()})(m.getChildAt(m.root,p));return k}; -Graph.prototype.replacePlaceholders=function(b,e,k,m){m=[];if(null!=e){for(var C=0;match=this.placeholderPattern.exec(e);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var E=null;if(match.index>C&&"%"==e.charAt(match.index-1))E=p.substring(1);else{var K=p.substring(1,p.length-1);if("id"==K)E=b.id;else if(0>K.indexOf("{"))for(var Q=b;null==E&&null!=Q;)null!=Q.value&&"object"==typeof Q.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(E=Q.getAttribute(K+"_"+Graph.diagramLanguage)), -null==E&&(E=Q.hasAttribute(K)?null!=Q.getAttribute(K)?Q.getAttribute(K):"":null)),Q=this.model.getParent(Q);null==E&&(E=this.getGlobalVariable(K));null==E&&null!=k&&(E=k[K])}m.push(e.substring(C,match.index)+(null!=E?E:p));C=match.index+p.length}}m.push(e.substring(C))}return m.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var e=[],k=0;k<b.length;k++){var m=this.model.getCell(b[k].id);null!=m&&e.push(m)}this.setSelectionCells(e)}else this.clearSelection()}; +Graph.prototype.createLayersDialog=function(b,e){var k=document.createElement("div");k.style.position="absolute";for(var m=this.getModel(),C=m.getChildCount(m.root),p=0;p<C;p++)mxUtils.bind(this,function(F){function K(){m.isVisible(F)?(f.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(d,75)):(f.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(d,25))}var P=this.convertValueToString(F)||mxResources.get("background")||"Background",d=document.createElement("div");d.style.overflow= +"hidden";d.style.textOverflow="ellipsis";d.style.padding="2px";d.style.whiteSpace="nowrap";d.style.cursor="pointer";d.setAttribute("title",mxResources.get(m.isVisible(F)?"hideIt":"show",[P]));var f=document.createElement("img");f.setAttribute("draggable","false");f.setAttribute("align","absmiddle");f.setAttribute("border","0");f.style.position="relative";f.style.width="16px";f.style.padding="0px 6px 0 4px";e&&(f.style.filter="invert(100%)",f.style.top="-2px");d.appendChild(f);mxUtils.write(d,P);k.appendChild(d); +mxEvent.addListener(d,"click",function(){m.setVisible(F,!m.isVisible(F));K();null!=b&&b(F)});K()})(m.getChildAt(m.root,p));return k}; +Graph.prototype.replacePlaceholders=function(b,e,k,m){m=[];if(null!=e){for(var C=0;match=this.placeholderPattern.exec(e);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var F=null;if(match.index>C&&"%"==e.charAt(match.index-1))F=p.substring(1);else{var K=p.substring(1,p.length-1);if("id"==K)F=b.id;else if(0>K.indexOf("{"))for(var P=b;null==F&&null!=P;)null!=P.value&&"object"==typeof P.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(F=P.getAttribute(K+"_"+Graph.diagramLanguage)), +null==F&&(F=P.hasAttribute(K)?null!=P.getAttribute(K)?P.getAttribute(K):"":null)),P=this.model.getParent(P);null==F&&(F=this.getGlobalVariable(K));null==F&&null!=k&&(F=k[K])}m.push(e.substring(C,match.index)+(null!=F?F:p));C=match.index+p.length}}m.push(e.substring(C))}return m.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var e=[],k=0;k<b.length;k++){var m=this.model.getCell(b[k].id);null!=m&&e.push(m)}this.setSelectionCells(e)}else this.clearSelection()}; Graph.prototype.selectCellForEvent=function(b,e){mxEvent.isShiftDown(e)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),b)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)}; -Graph.prototype.selectTableRange=function(b,e){var k=!1;if(this.isTableCell(b)&&this.isTableCell(e)){var m=this.model.getParent(b),C=this.model.getParent(m),p=this.model.getParent(e);if(C==this.model.getParent(p)){b=m.getIndex(b);m=C.getIndex(m);var E=p.getIndex(e),K=C.getIndex(p);p=Math.max(m,K);e=Math.min(b,E);b=Math.max(b,E);E=[];for(m=Math.min(m,K);m<=p;m++){K=this.model.getChildAt(C,m);for(var Q=e;Q<=b;Q++)E.push(this.model.getChildAt(K,Q))}0<E.length&&(1<E.length||1<this.getSelectionCount()|| -!this.isCellSelected(E[0]))&&(this.setSelectionCells(E),k=!0)}}return k}; +Graph.prototype.selectTableRange=function(b,e){var k=!1;if(this.isTableCell(b)&&this.isTableCell(e)){var m=this.model.getParent(b),C=this.model.getParent(m),p=this.model.getParent(e);if(C==this.model.getParent(p)){b=m.getIndex(b);m=C.getIndex(m);var F=p.getIndex(e),K=C.getIndex(p);p=Math.max(m,K);e=Math.min(b,F);b=Math.max(b,F);F=[];for(m=Math.min(m,K);m<=p;m++){K=this.model.getChildAt(C,m);for(var P=e;P<=b;P++)F.push(this.model.getChildAt(K,P))}0<F.length&&(1<F.length||1<this.getSelectionCount()|| +!this.isCellSelected(F[0]))&&(this.setSelectionCells(F),k=!0)}}return k}; Graph.prototype.snapCellsToGrid=function(b,e){this.getModel().beginUpdate();try{for(var k=0;k<b.length;k++){var m=b[k],C=this.getCellGeometry(m);if(null!=C){C=C.clone();if(this.getModel().isVertex(m))C.x=Math.round(C.x/e)*e,C.y=Math.round(C.y/e)*e,C.width=Math.round(C.width/e)*e,C.height=Math.round(C.height/e)*e;else if(this.getModel().isEdge(m)&&null!=C.points)for(var p=0;p<C.points.length;p++)C.points[p].x=Math.round(C.points[p].x/e)*e,C.points[p].y=Math.round(C.points[p].y/e)*e;this.getModel().setGeometry(m, C)}}}finally{this.getModel().endUpdate()}};Graph.prototype.selectCellsForConnectVertex=function(b,e,k){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=k&&(mxEvent.isTouchEvent(e)?k.update(k.getState(this.view.getState(b[1]))):k.reset())):this.setSelectionCells(b)}; Graph.prototype.isCloneConnectSource=function(b){var e=null;null!=this.layoutManager&&(e=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=e&&e.constructor==mxStackLayout}; -Graph.prototype.connectVertex=function(b,e,k,m,C,p,E,K){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var Q=this.isCloneConnectSource(b),d=Q?b:this.getCompositeParent(b),f=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(d.geometry.x,d.geometry.y);e==mxConstants.DIRECTION_NORTH?(f.x+=d.geometry.width/2,f.y-=k):e== +Graph.prototype.connectVertex=function(b,e,k,m,C,p,F,K){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var P=this.isCloneConnectSource(b),d=P?b:this.getCompositeParent(b),f=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(d.geometry.x,d.geometry.y);e==mxConstants.DIRECTION_NORTH?(f.x+=d.geometry.width/2,f.y-=k):e== mxConstants.DIRECTION_SOUTH?(f.x+=d.geometry.width/2,f.y+=d.geometry.height+k):(f.x=e==mxConstants.DIRECTION_WEST?f.x-k:f.x+(d.geometry.width+k),f.y+=d.geometry.height/2);var g=this.view.getState(this.model.getParent(b));k=this.view.scale;var x=this.view.translate;d=x.x*k;x=x.y*k;null!=g&&this.model.isVertex(g.cell)&&(d=g.x,x=g.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(f.x+=b.parent.geometry.x,f.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(d+f.x*k,x+f.y*k)).grow(40*k);p=null!=p? -this.getCells(0,0,0,0,null,null,p,null,!0):null;g=this.view.getState(b);var z=null,u=null;if(null!=p){p=p.reverse();for(var H=0;H<p.length;H++)if(!this.isCellLocked(p[H])&&!this.model.isEdge(p[H])&&p[H]!=b)if(!this.model.isAncestor(b,p[H])&&this.isContainer(p[H])&&(null==z||p[H]==this.model.getParent(b)))z=p[H];else if(null==u&&this.isCellConnectable(p[H])&&!this.model.isAncestor(p[H],b)&&!this.isSwimlane(p[H])){var J=this.view.getState(p[H]);null==g||null==J||mxUtils.intersects(g,J)||(u=p[H])}}var D= -!mxEvent.isShiftDown(m)||mxEvent.isControlDown(m)||C;D&&("1"!=urlParams.sketch||C)&&(e==mxConstants.DIRECTION_NORTH?f.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?f.y+=b.geometry.height/2:f.x=e==mxConstants.DIRECTION_WEST?f.x-b.geometry.width/2:f.x+b.geometry.width/2);var G=[],V=u;u=z;C=mxUtils.bind(this,function(U){if(null==E||null!=U||null==u&&Q){this.model.beginUpdate();try{if(null==V&&D){var Y=this.getAbsoluteParent(null!=U?U:b);Y=Q?b:this.getCompositeParent(Y);V=null!=U?U:this.duplicateCells([Y], -!1)[0];null!=U&&this.addCells([V],this.model.getParent(b),null,null,null,!0);var O=this.getCellGeometry(V);null!=O&&(null!=U&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?f.y-=O.height/2:e==mxConstants.DIRECTION_SOUTH?f.y+=O.height/2:f.x=e==mxConstants.DIRECTION_WEST?f.x-O.width/2:f.x+O.width/2),O.x=f.x-O.width/2,O.y=f.y-O.height/2);null!=z?(this.addCells([V],z,null,null,null,!0),u=null):D&&!Q&&this.addCells([V],this.getDefaultParent(),null,null,null,!0)}var qa=mxEvent.isControlDown(m)&& -mxEvent.isShiftDown(m)&&D||null==u&&Q?null:this.insertEdge(this.model.getParent(b),null,"",b,V,this.createCurrentEdgeStyle());if(null!=qa&&this.connectionHandler.insertBeforeSource){var oa=null;for(U=b;null!=U.parent&&null!=U.geometry&&U.geometry.relative&&U.parent!=qa.parent;)U=this.model.getParent(U);null!=U&&null!=U.parent&&U.parent==qa.parent&&(oa=U.parent.getIndex(U),this.model.add(U.parent,qa,oa))}null==u&&null!=V&&null!=b.parent&&Q&&e==mxConstants.DIRECTION_WEST&&(oa=b.parent.getIndex(b),this.model.add(b.parent, -V,oa));null!=qa&&G.push(qa);null==u&&null!=V&&G.push(V);null==V&&null!=qa&&qa.geometry.setTerminalPoint(f,!1);null!=qa&&this.fireEvent(new mxEventObject("cellsInserted","cells",[qa]))}finally{this.model.endUpdate()}}if(null!=K)K(G);else return G});if(null==E||null!=V||!D||null==u&&Q)return C(V);E(d+f.x*k,x+f.y*k,C)}; +this.getCells(0,0,0,0,null,null,p,null,!0):null;g=this.view.getState(b);var y=null,u=null;if(null!=p){p=p.reverse();for(var H=0;H<p.length;H++)if(!this.isCellLocked(p[H])&&!this.model.isEdge(p[H])&&p[H]!=b)if(!this.model.isAncestor(b,p[H])&&this.isContainer(p[H])&&(null==y||p[H]==this.model.getParent(b)))y=p[H];else if(null==u&&this.isCellConnectable(p[H])&&!this.model.isAncestor(p[H],b)&&!this.isSwimlane(p[H])){var J=this.view.getState(p[H]);null==g||null==J||mxUtils.intersects(g,J)||(u=p[H])}}var D= +!mxEvent.isShiftDown(m)||mxEvent.isControlDown(m)||C;D&&("1"!=urlParams.sketch||C)&&(e==mxConstants.DIRECTION_NORTH?f.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?f.y+=b.geometry.height/2:f.x=e==mxConstants.DIRECTION_WEST?f.x-b.geometry.width/2:f.x+b.geometry.width/2);var G=[],W=u;u=y;C=mxUtils.bind(this,function(T){if(null==F||null!=T||null==u&&P){this.model.beginUpdate();try{if(null==W&&D){var Z=this.getAbsoluteParent(null!=T?T:b);Z=P?b:this.getCompositeParent(Z);W=null!=T?T:this.duplicateCells([Z], +!1)[0];null!=T&&this.addCells([W],this.model.getParent(b),null,null,null,!0);var N=this.getCellGeometry(W);null!=N&&(null!=T&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?f.y-=N.height/2:e==mxConstants.DIRECTION_SOUTH?f.y+=N.height/2:f.x=e==mxConstants.DIRECTION_WEST?f.x-N.width/2:f.x+N.width/2),N.x=f.x-N.width/2,N.y=f.y-N.height/2);null!=y?(this.addCells([W],y,null,null,null,!0),u=null):D&&!P&&this.addCells([W],this.getDefaultParent(),null,null,null,!0)}var qa=mxEvent.isControlDown(m)&& +mxEvent.isShiftDown(m)&&D||null==u&&P?null:this.insertEdge(this.model.getParent(b),null,"",b,W,this.createCurrentEdgeStyle());if(null!=qa&&this.connectionHandler.insertBeforeSource){var oa=null;for(T=b;null!=T.parent&&null!=T.geometry&&T.geometry.relative&&T.parent!=qa.parent;)T=this.model.getParent(T);null!=T&&null!=T.parent&&T.parent==qa.parent&&(oa=T.parent.getIndex(T),this.model.add(T.parent,qa,oa))}null==u&&null!=W&&null!=b.parent&&P&&e==mxConstants.DIRECTION_WEST&&(oa=b.parent.getIndex(b),this.model.add(b.parent, +W,oa));null!=qa&&G.push(qa);null==u&&null!=W&&G.push(W);null==W&&null!=qa&&qa.geometry.setTerminalPoint(f,!1);null!=qa&&this.fireEvent(new mxEventObject("cellsInserted","cells",[qa]))}finally{this.model.endUpdate()}}if(null!=K)K(G);else return G});if(null==F||null!=W||!D||null==u&&P)return C(W);F(d+f.x*k,x+f.y*k,C)}; Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var e=document.createElement("div"),k=[],m,C=0;C<b.length;C++)if(m=b[C],this.model.isVertex(m)||this.model.isEdge(m))this.isHtmlLabel(m)?(e.innerHTML=this.sanitizeHtml(this.getLabel(m)),m=mxUtils.extractTextWithWhitespace([e])):m=this.getLabel(m),m=mxUtils.trim(m.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<m.length&&k.push(m);return k.join(" ")}; Graph.prototype.convertValueToString=function(b){var e=this.model.getValue(b);if(null!=e&&"object"==typeof e){var k=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){e=b.getAttribute("placeholder");for(var m=b;null==k&&null!=m;)null!=m.value&&"object"==typeof m.value&&(k=m.hasAttribute(e)?null!=m.getAttribute(e)?m.getAttribute(e):"":null),m=this.model.getParent(m)}else k=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=e.getAttribute("label_"+Graph.diagramLanguage)), null==k&&(k=e.getAttribute("label")||"");return k||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),null!=b&&"javascript:"===b.toLowerCase().substring(0,11)&&(b=b.substring(11)),b):null}; @@ -2412,10 +2410,10 @@ Graph.prototype.updateHorizontalStyle=function(b,e){if(null!=b&&null!=e&&null!=t Graph.prototype.replaceDefaultColors=function(b,e){if(null!=e){b=mxUtils.hex2rgb(this.shapeBackgroundColor);var k=mxUtils.hex2rgb(this.shapeForegroundColor);this.replaceDefaultColor(e,mxConstants.STYLE_FONTCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_FILLCOLOR,b,k);this.replaceDefaultColor(e,mxConstants.STYLE_GRADIENTCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_STROKECOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_IMAGE_BORDER,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_IMAGE_BACKGROUND, b,k);this.replaceDefaultColor(e,mxConstants.STYLE_LABEL_BORDERCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_SWIMLANE_FILLCOLOR,b,k);this.replaceDefaultColor(e,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,b,k)}return e};Graph.prototype.replaceDefaultColor=function(b,e,k,m){null!=b&&"default"==b[e]&&null!=k&&(b[e]=this.getDefaultColor(b,e,k,m))};Graph.prototype.getDefaultColor=function(b,e,k,m){e="default"+e.charAt(0).toUpperCase()+e.substring(1);"invert"==b[e]&&(k=m);return k}; Graph.prototype.updateAlternateBounds=function(b,e,k){if(null!=b&&null!=e&&null!=this.layoutManager&&null!=e.alternateBounds){var m=this.layoutManager.getLayout(this.model.getParent(b));null!=m&&m.constructor==mxStackLayout&&(m.horizontal?e.alternateBounds.height=0:e.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(b,e){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(e.style,"moveCells","0")}; -Graph.prototype.foldCells=function(b,e,k,m,C){e=null!=e?e:!1;null==k&&(k=this.getFoldableCells(this.getSelectionCells(),b));if(null!=k){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<k.length;p++){var E=this.view.getState(k[p]),K=this.getCellGeometry(k[p]);if(null!=E&&null!=K){var Q=Math.round(K.width-E.width/this.view.scale),d=Math.round(K.height-E.height/this.view.scale);if(0!=d||0!=Q){var f=this.model.getParent(k[p]),g=this.layoutManager.getLayout(f); -null==g?null!=C&&this.isMoveCellsEvent(C,E)&&this.moveSiblings(E,f,Q,d):null!=C&&mxEvent.isAltDown(C)||g.constructor!=mxStackLayout||g.resizeLast||this.resizeParentStacks(f,g,Q,d)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(k)}}; -Graph.prototype.moveSiblings=function(b,e,k,m){this.model.beginUpdate();try{var C=this.getCellsBeyond(b.x,b.y,e,!0,!0);for(e=0;e<C.length;e++)if(C[e]!=b.cell){var p=this.view.getState(C[e]),E=this.getCellGeometry(C[e]);null!=p&&null!=E&&(E=E.clone(),E.translate(Math.round(k*Math.max(0,Math.min(1,(p.x-b.x)/b.width))),Math.round(m*Math.max(0,Math.min(1,(p.y-b.y)/b.height)))),this.model.setGeometry(C[e],E))}}finally{this.model.endUpdate()}}; -Graph.prototype.resizeParentStacks=function(b,e,k,m){if(null!=this.layoutManager&&null!=e&&e.constructor==mxStackLayout&&!e.resizeLast){this.model.beginUpdate();try{for(var C=e.horizontal;null!=b&&null!=e&&e.constructor==mxStackLayout&&e.horizontal==C&&!e.resizeLast;){var p=this.getCellGeometry(b),E=this.view.getState(b);null!=E&&null!=p&&(p=p.clone(),e.horizontal?p.width+=k+Math.min(0,E.width/this.view.scale-p.width):p.height+=m+Math.min(0,E.height/this.view.scale-p.height),this.model.setGeometry(b, +Graph.prototype.foldCells=function(b,e,k,m,C){e=null!=e?e:!1;null==k&&(k=this.getFoldableCells(this.getSelectionCells(),b));if(null!=k){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<k.length;p++){var F=this.view.getState(k[p]),K=this.getCellGeometry(k[p]);if(null!=F&&null!=K){var P=Math.round(K.width-F.width/this.view.scale),d=Math.round(K.height-F.height/this.view.scale);if(0!=d||0!=P){var f=this.model.getParent(k[p]),g=this.layoutManager.getLayout(f); +null==g?null!=C&&this.isMoveCellsEvent(C,F)&&this.moveSiblings(F,f,P,d):null!=C&&mxEvent.isAltDown(C)||g.constructor!=mxStackLayout||g.resizeLast||this.resizeParentStacks(f,g,P,d)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(k)}}; +Graph.prototype.moveSiblings=function(b,e,k,m){this.model.beginUpdate();try{var C=this.getCellsBeyond(b.x,b.y,e,!0,!0);for(e=0;e<C.length;e++)if(C[e]!=b.cell){var p=this.view.getState(C[e]),F=this.getCellGeometry(C[e]);null!=p&&null!=F&&(F=F.clone(),F.translate(Math.round(k*Math.max(0,Math.min(1,(p.x-b.x)/b.width))),Math.round(m*Math.max(0,Math.min(1,(p.y-b.y)/b.height)))),this.model.setGeometry(C[e],F))}}finally{this.model.endUpdate()}}; +Graph.prototype.resizeParentStacks=function(b,e,k,m){if(null!=this.layoutManager&&null!=e&&e.constructor==mxStackLayout&&!e.resizeLast){this.model.beginUpdate();try{for(var C=e.horizontal;null!=b&&null!=e&&e.constructor==mxStackLayout&&e.horizontal==C&&!e.resizeLast;){var p=this.getCellGeometry(b),F=this.view.getState(b);null!=F&&null!=p&&(p=p.clone(),e.horizontal?p.width+=k+Math.min(0,F.width/this.view.scale-p.width):p.height+=m+Math.min(0,F.height/this.view.scale-p.height),this.model.setGeometry(b, p));b=this.model.getParent(b);e=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var e=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=e.container:"1"==e.container};Graph.prototype.isCellConnectable=function(b){var e=this.getCurrentCellStyle(b);return null!=e.connectable?"0"!=e.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)}; Graph.prototype.isLabelMovable=function(b){var e=this.getCurrentCellStyle(b);return null!=e.movableLabel?"0"!=e.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(b){b=b||this.getDefaultParent();this.isCellLocked(b)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(b,e,k){k=k||this.getDefaultParent();this.isCellLocked(k)||mxGraph.prototype.selectCells.apply(this,arguments)}; Graph.prototype.getSwimlaneAt=function(b,e,k){var m=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(m)&&(m=null);return m};Graph.prototype.isCellFoldable=function(b){var e=this.getCurrentCellStyle(b);return this.foldingEnabled&&"0"!=mxUtils.getValue(e,mxConstants.STYLE_RESIZABLE,"1")&&("1"==e.treeFolding||!this.isCellLocked(b)&&(this.isContainer(b)&&"0"!=e.collapsible||!this.isContainer(b)&&"1"==e.collapsible))}; @@ -2423,7 +2421,7 @@ Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.esc Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)}; Graph.prototype.fitWindow=function(b,e){e=null!=e?e:10;var k=this.container.clientWidth-e,m=this.container.clientHeight-e,C=Math.floor(20*Math.min(k/b.width,m/b.height))/20;this.zoomTo(C);if(mxUtils.hasScrollbars(this.container)){var p=this.view.translate;this.container.scrollTop=(b.y+p.y)*C-Math.max((m-b.height*C)/2+e/2,0);this.container.scrollLeft=(b.x+p.x)*C-Math.max((k-b.width*C)/2+e/2,0)}}; Graph.prototype.getTooltipForCell=function(b){var e="";if(mxUtils.isNode(b.value)){var k=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=b.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==k&&(k=b.value.getAttribute("tooltip"));if(null!=k)null!=k&&this.isReplacePlaceholders(b)&&(k=this.replacePlaceholders(b,k)),e=this.sanitizeHtml(k);else{k=this.builtInProperties;b=b.value.attributes;var m=[];this.isEnabled()&&(k.push("linkTarget"),k.push("link"));for(var C=0;C<b.length;C++)(Graph.translateDiagram&& -"label"==b[C].nodeName||0>mxUtils.indexOf(k,b[C].nodeName))&&0<b[C].nodeValue.length&&m.push({name:b[C].nodeName,value:b[C].nodeValue});m.sort(function(p,E){return p.name<E.name?-1:p.name>E.name?1:0});for(C=0;C<m.length;C++)"link"==m[C].name&&this.isCustomLink(m[C].value)||(e+=("link"!=m[C].name?"<b>"+mxUtils.htmlEntities(m[C].name)+":</b> ":"")+mxUtils.htmlEntities(m[C].value)+"\n");0<e.length&&(e=e.substring(0,e.length-1),mxClient.IS_SVG&&(e='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+ +"label"==b[C].nodeName||0>mxUtils.indexOf(k,b[C].nodeName))&&0<b[C].nodeValue.length&&m.push({name:b[C].nodeName,value:b[C].nodeValue});m.sort(function(p,F){return p.name<F.name?-1:p.name>F.name?1:0});for(C=0;C<m.length;C++)"link"==m[C].name&&this.isCustomLink(m[C].value)||(e+=("link"!=m[C].name?"<b>"+mxUtils.htmlEntities(m[C].name)+":</b> ":"")+mxUtils.htmlEntities(m[C].value)+"\n");0<e.length&&(e=e.substring(0,e.length-1),mxClient.IS_SVG&&(e='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+ e+"</div>"))}}return e};Graph.prototype.getFlowAnimationStyle=function(){var b=document.getElementsByTagName("head")[0];if(null!=b&&null==this.flowAnimationStyle){this.flowAnimationStyle=document.createElement("style");this.flowAnimationStyle.setAttribute("id","geEditorFlowAnimation-"+Editor.guid());this.flowAnimationStyle.type="text/css";var e=this.flowAnimationStyle.getAttribute("id");this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(e);b.appendChild(this.flowAnimationStyle)}return this.flowAnimationStyle}; Graph.prototype.getFlowAnimationStyleCss=function(b){return"."+b+" {\nanimation: "+b+" 0.5s linear;\nanimation-iteration-count: infinite;\n}\n@keyframes "+b+" {\nto {\nstroke-dashoffset: "+-16*this.view.scale+";\n}\n}"};Graph.prototype.stringToBytes=function(b){return Graph.stringToBytes(b)};Graph.prototype.bytesToString=function(b){return Graph.bytesToString(b)};Graph.prototype.compressNode=function(b){return Graph.compressNode(b)};Graph.prototype.compress=function(b,e){return Graph.compress(b,e)}; Graph.prototype.decompress=function(b,e){return Graph.decompress(b,e)};Graph.prototype.zapGremlins=function(b){return Graph.zapGremlins(b)};HoverIcons=function(b){mxEventSource.call(this);this.graph=b;this.init()};mxUtils.extend(HoverIcons,mxEventSource);HoverIcons.prototype.arrowSpacing=2;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15; @@ -2450,201 +2448,201 @@ HoverIcons.prototype.click=function(b,e,k){var m=k.getEvent(),C=k.getGraphX(),p= HoverIcons.prototype.execute=function(b,e,k){k=k.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,e,this.graph.defaultEdgeLength,k,this.graph.isCloneEvent(k),this.graph.isCloneEvent(k)),k,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))}; HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var b=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(b=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));b.grow(this.graph.tolerance);b.grow(this.arrowSpacing); var e=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(e=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var k=null;null!=e&&(b.x-=e.horizontalOffset/2,b.y-=e.verticalOffset/2,b.width+=e.horizontalOffset,b.height+=e.verticalOffset,null!=e.rotationShape&&null!=e.rotationShape.node&&"hidden"!=e.rotationShape.node.style.visibility&&"none"!=e.rotationShape.node.style.display&&null!=e.rotationShape.boundingBox&& -(k=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(K,Q,d){if(null!=k){var f=new mxRectangle(Q,d,K.clientWidth,K.clientHeight);mxUtils.intersects(f,k)&&(K==this.arrowUp?d-=f.y+f.height-k.y:K==this.arrowRight?Q+=k.x+k.width-f.x:K==this.arrowDown?d+=k.y+k.height-f.y:K==this.arrowLeft&&(Q-=f.x+f.width-k.x))}K.style.left=Q+"px";K.style.top=d+"px";mxUtils.setOpacity(K,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y- +(k=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(K,P,d){if(null!=k){var f=new mxRectangle(P,d,K.clientWidth,K.clientHeight);mxUtils.intersects(f,k)&&(K==this.arrowUp?d-=f.y+f.height-k.y:K==this.arrowRight?P+=k.x+k.width-f.x:K==this.arrowDown?d+=k.y+k.height-f.y:K==this.arrowLeft&&(P-=f.x+f.width-k.x))}K.style.left=P+"px";K.style.top=d+"px";mxUtils.setOpacity(K,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y- this.triangleUp.height-this.tolerance));e(this.arrowRight,Math.round(b.x+b.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));e(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(b.y+b.height-this.tolerance));e(this.arrowLeft,Math.round(b.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){e=this.graph.getCellAt(b.x+b.width+this.triangleRight.width/2,this.currentState.getCenterY()); -var m=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),C=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=e&&e==m&&m==C&&C==b&&(b=C=m=e=null);var p=this.graph.getCellGeometry(this.currentState.cell),E=mxUtils.bind(this,function(K,Q){var d=this.graph.model.isVertex(K)&&this.graph.getCellGeometry(K);null==K||this.graph.model.isAncestor(K, -this.currentState.cell)||this.graph.isSwimlane(K)||!(null==d||null==p||d.height<3*p.height&&d.width<3*p.width)?Q.style.visibility="visible":Q.style.visibility="hidden"});E(e,this.arrowRight);E(m,this.arrowLeft);E(C,this.arrowUp);E(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")), +var m=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),C=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=e&&e==m&&m==C&&C==b&&(b=C=m=e=null);var p=this.graph.getCellGeometry(this.currentState.cell),F=mxUtils.bind(this,function(K,P){var d=this.graph.model.isVertex(K)&&this.graph.getCellGeometry(K);null==K||this.graph.model.isAncestor(K, +this.currentState.cell)||this.graph.isSwimlane(K)||!(null==d||null==p||d.height<3*p.height&&d.width<3*p.width)?P.style.visibility="visible":P.style.visibility="hidden"});F(e,this.arrowRight);F(m,this.arrowLeft);F(C,this.arrowUp);F(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")), this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}}; HoverIcons.prototype.computeBoundingBox=function(){var b=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(e){null!=e.parentNode&&(e=new mxRectangle(e.offsetLeft,e.offsetTop,e.offsetWidth,e.offsetHeight),null==b?b=e:b.add(e))});return b}; HoverIcons.prototype.getState=function(b){if(null!=b)if(b=b.cell,this.graph.getModel().contains(b)){if(this.graph.getModel().isVertex(b)&&!this.graph.isCellConnectable(b)){var e=this.graph.getModel().getParent(b);this.graph.getModel().isVertex(e)&&this.graph.isCellConnectable(e)&&(b=e)}if(this.graph.isCellLocked(b)||this.graph.model.isEdge(b))b=null;b=this.graph.view.getState(b);null!=b&&null==b.style&&(b=null)}else b=null;return b}; -HoverIcons.prototype.update=function(b,e,k){if(!this.graph.connectionArrowsEnabled||null!=b&&"0"==mxUtils.getValue(b.style,"allowArrows","1"))this.reset();else{null!=b&&null!=b.cell.geometry&&b.cell.geometry.relative&&this.graph.model.isEdge(b.cell.parent)&&(b=null);var m=null;this.prev!=b||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=b,m=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=b&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()|| -this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=b,this.update(b,e,k))}),this.updateDelay+10))):null!=this.startTime&&(m=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=b&&m<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,e,k)?this.reset(!1):(null!=this.currentState||m>this.activationDelay)&&this.currentState!=b&&(m>this.updateDelay&&null!=b||null==this.bbox||null==e||null==k||!mxUtils.contains(this.bbox, -e,k))&&(null!=b&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(b),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=b&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}}; -HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};Graph.prototype.createParent=function(b,e,k,m,C){b=this.cloneCell(b);for(var p=0;p<k;p++){var E=this.cloneCell(e),K=this.getCellGeometry(E);null!=K&&(K.x+=p*m,K.y+=p*C);b.insert(E)}return b}; -Graph.prototype.createTable=function(b,e,k,m,C,p,E,K,Q){k=null!=k?k:60;m=null!=m?m:40;p=null!=p?p:30;K=null!=K?K:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";Q=null!=Q?Q:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null, -null,null!=C?C:"",0,0,e*k,b*m+(null!=C?p:0),null!=E?E:"shape=table;startSize="+(null!=C?p:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,e*k,m,K),this.createVertex(null,null,"",0,0,k,m,Q),e,k,0),b,0,m)}; -Graph.prototype.setTableValues=function(b,e,k){for(var m=this.model.getChildCells(b,!0),C=0;C<m.length;C++)if(null!=k&&(m[C].value=k[C]),null!=e)for(var p=this.model.getChildCells(m[C],!0),E=0;E<p.length;E++)null!=e[C][E]&&(p[E].value=e[C][E]);return b}; -Graph.prototype.createCrossFunctionalSwimlane=function(b,e,k,m,C,p,E,K,Q){k=null!=k?k:120;m=null!=m?m:120;E=null!=E?E:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";K=null!=K?K:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;"; -Q=null!=Q?Q:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";C=this.createVertex(null,null,null!=C?C:"",0,0,e*k,b*m,null!=p?p:"shape=table;childLayout=tableLayout;"+(null==C?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");p=mxUtils.getValue(this.getCellStyle(C),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);C.geometry.width+=p;C.geometry.height+=p;E=this.createVertex(null, -null,"",0,p,e*k+p,m,E);C.insert(this.createParent(E,this.createVertex(null,null,"",p,0,k,m,K),e,k,0));return 1<b?(E.geometry.y=m+p,this.createParent(C,this.createParent(E,this.createVertex(null,null,"",p,0,k,m,Q),e,k,0),b-1,0,m)):C}; -Graph.prototype.visitTableCells=function(b,e){var k=null,m=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var C=0;C<m.length;C++){for(var p=this.getActualStartSize(m[C],!0),E=this.model.getChildCells(m[C],!0),K=this.getCellStyle(m[C],!0),Q=null,d=[],f=0;f<E.length;f++){var g=this.getCellGeometry(E[f]),x={cell:E[f],rospan:1,colspan:1,row:C,col:f,geo:g};g=null!=g.alternateBounds?g.alternateBounds:g;x.point=new mxPoint(g.width+(null!=Q?Q.point.x:b.x+p.x),g.height+(null!=k&&null!= -k[0]?k[0].point.y:b.y+p.y));x.actual=x;null!=k&&null!=k[f]&&1<k[f].rowspan?(x.rowspan=k[f].rowspan-1,x.colspan=k[f].colspan,x.actual=k[f].actual):null!=Q&&1<Q.colspan?(x.rowspan=Q.rowspan,x.colspan=Q.colspan-1,x.actual=Q.actual):(Q=this.getCurrentCellStyle(E[f],!0),null!=Q&&(x.rowspan=parseInt(Q.rowspan||1),x.colspan=parseInt(Q.colspan||1)));Q=1==mxUtils.getValue(K,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(K,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(x,E.length, -m.length,b.x+(Q?p.x:0),b.y+(Q?p.y:0));d.push(x);Q=x}k=d}};Graph.prototype.getTableLines=function(b,e,k){var m=[],C=[];(e||k)&&this.visitTableCells(b,mxUtils.bind(this,function(p,E,K,Q,d){e&&p.row<K-1&&(null==m[p.row]&&(m[p.row]=[new mxPoint(Q,p.point.y)]),1<p.rowspan&&m[p.row].push(null),m[p.row].push(p.point));k&&p.col<E-1&&(null==C[p.col]&&(C[p.col]=[new mxPoint(p.point.x,d)]),1<p.colspan&&C[p.col].push(null),C[p.col].push(p.point))}));return m.concat(C)}; +HoverIcons.prototype.update=function(b,e,k){if(!this.graph.connectionArrowsEnabled||null!=this.graph.freehand&&this.graph.freehand.isDrawing()||null!=b&&"0"==mxUtils.getValue(b.style,"allowArrows","1"))this.reset();else{null!=b&&null!=b.cell.geometry&&b.cell.geometry.relative&&this.graph.model.isEdge(b.cell.parent)&&(b=null);var m=null;this.prev!=b||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=b,m=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=b&&(this.updateThread= +window.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=b,this.update(b,e,k))}),this.updateDelay+10))):null!=this.startTime&&(m=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=b&&m<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,e,k)?this.reset(!1):(null!=this.currentState||m>this.activationDelay)&&this.currentState!=b&&(m>this.updateDelay&&null!= +b||null==this.bbox||null==e||null==k||!mxUtils.contains(this.bbox,e,k))&&(null!=b&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(b),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=b&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}}; +HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};Graph.prototype.createParent=function(b,e,k,m,C){b=this.cloneCell(b);for(var p=0;p<k;p++){var F=this.cloneCell(e),K=this.getCellGeometry(F);null!=K&&(K.x+=p*m,K.y+=p*C);b.insert(F)}return b}; +Graph.prototype.createTable=function(b,e,k,m,C,p,F,K,P){k=null!=k?k:60;m=null!=m?m:40;p=null!=p?p:30;K=null!=K?K:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";P=null!=P?P:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null, +null,null!=C?C:"",0,0,e*k,b*m+(null!=C?p:0),null!=F?F:"shape=table;startSize="+(null!=C?p:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,e*k,m,K),this.createVertex(null,null,"",0,0,k,m,P),e,k,0),b,0,m)}; +Graph.prototype.setTableValues=function(b,e,k){for(var m=this.model.getChildCells(b,!0),C=0;C<m.length;C++)if(null!=k&&(m[C].value=k[C]),null!=e)for(var p=this.model.getChildCells(m[C],!0),F=0;F<p.length;F++)null!=e[C][F]&&(p[F].value=e[C][F]);return b}; +Graph.prototype.createCrossFunctionalSwimlane=function(b,e,k,m,C,p,F,K,P){k=null!=k?k:120;m=null!=m?m:120;F=null!=F?F:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";K=null!=K?K:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;"; +P=null!=P?P:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";C=this.createVertex(null,null,null!=C?C:"",0,0,e*k,b*m,null!=p?p:"shape=table;childLayout=tableLayout;"+(null==C?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");p=mxUtils.getValue(this.getCellStyle(C),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);C.geometry.width+=p;C.geometry.height+=p;F=this.createVertex(null, +null,"",0,p,e*k+p,m,F);C.insert(this.createParent(F,this.createVertex(null,null,"",p,0,k,m,K),e,k,0));return 1<b?(F.geometry.y=m+p,this.createParent(C,this.createParent(F,this.createVertex(null,null,"",p,0,k,m,P),e,k,0),b-1,0,m)):C}; +Graph.prototype.visitTableCells=function(b,e){var k=null,m=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var C=0;C<m.length;C++){for(var p=this.getActualStartSize(m[C],!0),F=this.model.getChildCells(m[C],!0),K=this.getCellStyle(m[C],!0),P=null,d=[],f=0;f<F.length;f++){var g=this.getCellGeometry(F[f]),x={cell:F[f],rospan:1,colspan:1,row:C,col:f,geo:g};g=null!=g.alternateBounds?g.alternateBounds:g;x.point=new mxPoint(g.width+(null!=P?P.point.x:b.x+p.x),g.height+(null!=k&&null!= +k[0]?k[0].point.y:b.y+p.y));x.actual=x;null!=k&&null!=k[f]&&1<k[f].rowspan?(x.rowspan=k[f].rowspan-1,x.colspan=k[f].colspan,x.actual=k[f].actual):null!=P&&1<P.colspan?(x.rowspan=P.rowspan,x.colspan=P.colspan-1,x.actual=P.actual):(P=this.getCurrentCellStyle(F[f],!0),null!=P&&(x.rowspan=parseInt(P.rowspan||1),x.colspan=parseInt(P.colspan||1)));P=1==mxUtils.getValue(K,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(K,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(x,F.length, +m.length,b.x+(P?p.x:0),b.y+(P?p.y:0));d.push(x);P=x}k=d}};Graph.prototype.getTableLines=function(b,e,k){var m=[],C=[];(e||k)&&this.visitTableCells(b,mxUtils.bind(this,function(p,F,K,P,d){e&&p.row<K-1&&(null==m[p.row]&&(m[p.row]=[new mxPoint(P,p.point.y)]),1<p.rowspan&&m[p.row].push(null),m[p.row].push(p.point));k&&p.col<F-1&&(null==C[p.col]&&(C[p.col]=[new mxPoint(p.point.x,d)]),1<p.colspan&&C[p.col].push(null),C[p.col].push(p.point))}));return m.concat(C)}; Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};Graph.prototype.isStack=function(b){b=this.getCellStyle(b);return null!=b&&"stackLayout"==b.childLayout}; Graph.prototype.isStackChild=function(b){return this.model.isVertex(b)&&this.isStack(this.model.getParent(b))}; -Graph.prototype.setTableRowHeight=function(b,e,k){k=null!=k?k:!0;var m=this.getModel();m.beginUpdate();try{var C=this.getCellGeometry(b);if(null!=C){C=C.clone();C.height+=e;m.setGeometry(b,C);var p=m.getParent(b),E=m.getChildCells(p,!0);if(!k){var K=mxUtils.indexOf(E,b);if(K<E.length-1){var Q=E[K+1],d=this.getCellGeometry(Q);null!=d&&(d=d.clone(),d.y+=e,d.height-=e,m.setGeometry(Q,d))}}var f=this.getCellGeometry(p);null!=f&&(k||(k=b==E[E.length-1]),k&&(f=f.clone(),f.height+=e,m.setGeometry(p,f)))}}finally{m.endUpdate()}}; -Graph.prototype.setTableColumnWidth=function(b,e,k){k=null!=k?k:!1;var m=this.getModel(),C=m.getParent(b),p=m.getParent(C),E=m.getChildCells(C,!0);b=mxUtils.indexOf(E,b);var K=b==E.length-1;m.beginUpdate();try{for(var Q=m.getChildCells(p,!0),d=0;d<Q.length;d++){C=Q[d];E=m.getChildCells(C,!0);var f=E[b],g=this.getCellGeometry(f);null!=g&&(g=g.clone(),g.width+=e,null!=g.alternateBounds&&(g.alternateBounds.width+=e),m.setGeometry(f,g));b<E.length-1&&(f=E[b+1],g=this.getCellGeometry(f),null!=g&&(g=g.clone(), +Graph.prototype.setTableRowHeight=function(b,e,k){k=null!=k?k:!0;var m=this.getModel();m.beginUpdate();try{var C=this.getCellGeometry(b);if(null!=C){C=C.clone();C.height+=e;m.setGeometry(b,C);var p=m.getParent(b),F=m.getChildCells(p,!0);if(!k){var K=mxUtils.indexOf(F,b);if(K<F.length-1){var P=F[K+1],d=this.getCellGeometry(P);null!=d&&(d=d.clone(),d.y+=e,d.height-=e,m.setGeometry(P,d))}}var f=this.getCellGeometry(p);null!=f&&(k||(k=b==F[F.length-1]),k&&(f=f.clone(),f.height+=e,m.setGeometry(p,f)))}}finally{m.endUpdate()}}; +Graph.prototype.setTableColumnWidth=function(b,e,k){k=null!=k?k:!1;var m=this.getModel(),C=m.getParent(b),p=m.getParent(C),F=m.getChildCells(C,!0);b=mxUtils.indexOf(F,b);var K=b==F.length-1;m.beginUpdate();try{for(var P=m.getChildCells(p,!0),d=0;d<P.length;d++){C=P[d];F=m.getChildCells(C,!0);var f=F[b],g=this.getCellGeometry(f);null!=g&&(g=g.clone(),g.width+=e,null!=g.alternateBounds&&(g.alternateBounds.width+=e),m.setGeometry(f,g));b<F.length-1&&(f=F[b+1],g=this.getCellGeometry(f),null!=g&&(g=g.clone(), g.x+=e,k||(g.width-=e,null!=g.alternateBounds&&(g.alternateBounds.width-=e)),m.setGeometry(f,g)))}if(K||k){var x=this.getCellGeometry(p);null!=x&&(x=x.clone(),x.width+=e,m.setGeometry(p,x))}null!=this.layoutManager&&this.layoutManager.executeLayout(p)}finally{m.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1}; TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,e){for(var k=0,m=0;m<b.length;m++)if(!this.isVertexIgnored(b[m])){var C=this.graph.getCellGeometry(b[m]);null!=C&&(k+=e?C.width:C.height)}return k}; -TableLayout.prototype.getRowLayout=function(b,e){var k=this.graph.model.getChildCells(b,!0),m=this.graph.getActualStartSize(b,!0);b=this.getSize(k,!0);e=e-m.x-m.width;var C=[];m=m.x;for(var p=0;p<k.length;p++){var E=this.graph.getCellGeometry(k[p]);null!=E&&(m+=(null!=E.alternateBounds?E.alternateBounds.width:E.width)*e/b,C.push(Math.round(m)))}return C}; -TableLayout.prototype.layoutRow=function(b,e,k,m){var C=this.graph.getModel(),p=C.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var E=b.x,K=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var Q=0;Q<p.length;Q++){var d=this.graph.getCellGeometry(p[Q]);null!=d&&(d=d.clone(),d.y=b.y,d.height=k-b.y-b.height,null!=e?(d.x=e[Q],d.width=e[Q+1]-d.x,Q==p.length-1&&Q<e.length-2&&(d.width=m-d.x-b.x-b.width)):(d.x=E,E+=d.width,Q==p.length-1?d.width=m-b.x-b.width-K:K+=d.width),d.alternateBounds=new mxRectangle(0, -0,d.width,d.height),C.setGeometry(p[Q],d))}return K}; -TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),k=this.graph.getCellGeometry(b),m=this.graph.getCellStyle(b),C="1"==mxUtils.getValue(m,"resizeLastRow","0"),p="1"==mxUtils.getValue(m,"resizeLast","0");m="1"==mxUtils.getValue(m,"fixedRows","0");var E=this.graph.getModel(),K=0;E.beginUpdate();try{for(var Q=k.height-e.y-e.height,d=k.width-e.x-e.width,f=E.getChildCells(b,!0),g=0;g<f.length;g++)E.setVisible(f[g],!0);var x=this.getSize(f,!1);if(0<Q&&0<d&&0< -f.length&&0<x){if(C){var z=this.graph.getCellGeometry(f[f.length-1]);null!=z&&(z=z.clone(),z.height=Q-x+z.height,E.setGeometry(f[f.length-1],z))}var u=p?null:this.getRowLayout(f[0],d),H=[],J=e.y;for(g=0;g<f.length;g++)z=this.graph.getCellGeometry(f[g]),null!=z&&(z=z.clone(),z.x=e.x,z.width=d,z.y=Math.round(J),J=C||m?J+z.height:J+z.height/x*Q,z.height=Math.round(J)-z.y,E.setGeometry(f[g],z)),K=Math.max(K,this.layoutRow(f[g],u,z.height,d,H));m&&Q<x&&(k=k.clone(),k.height=J+e.height,E.setGeometry(b, -k));p&&d<K+Graph.minTableColumnWidth&&(k=k.clone(),k.width=K+e.width+e.x+Graph.minTableColumnWidth,E.setGeometry(b,k));this.graph.visitTableCells(b,mxUtils.bind(this,function(D){E.setVisible(D.cell,D.actual.cell==D.cell);if(D.actual.cell!=D.cell){if(D.actual.row==D.row){var G=null!=D.geo.alternateBounds?D.geo.alternateBounds:D.geo;D.actual.geo.width+=G.width}D.actual.col==D.col&&(G=null!=D.geo.alternateBounds?D.geo.alternateBounds:D.geo,D.actual.geo.height+=G.height)}}))}else for(g=0;g<f.length;g++)E.setVisible(f[g], -!1)}finally{E.endUpdate()}}}; +TableLayout.prototype.getRowLayout=function(b,e){var k=this.graph.model.getChildCells(b,!0),m=this.graph.getActualStartSize(b,!0);b=this.getSize(k,!0);e=e-m.x-m.width;var C=[];m=m.x;for(var p=0;p<k.length;p++){var F=this.graph.getCellGeometry(k[p]);null!=F&&(m+=(null!=F.alternateBounds?F.alternateBounds.width:F.width)*e/b,C.push(Math.round(m)))}return C}; +TableLayout.prototype.layoutRow=function(b,e,k,m){var C=this.graph.getModel(),p=C.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var F=b.x,K=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var P=0;P<p.length;P++){var d=this.graph.getCellGeometry(p[P]);null!=d&&(d=d.clone(),d.y=b.y,d.height=k-b.y-b.height,null!=e?(d.x=e[P],d.width=e[P+1]-d.x,P==p.length-1&&P<e.length-2&&(d.width=m-d.x-b.x-b.width)):(d.x=F,F+=d.width,P==p.length-1?d.width=m-b.x-b.width-K:K+=d.width),d.alternateBounds=new mxRectangle(0, +0,d.width,d.height),C.setGeometry(p[P],d))}return K}; +TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),k=this.graph.getCellGeometry(b),m=this.graph.getCellStyle(b),C="1"==mxUtils.getValue(m,"resizeLastRow","0"),p="1"==mxUtils.getValue(m,"resizeLast","0");m="1"==mxUtils.getValue(m,"fixedRows","0");var F=this.graph.getModel(),K=0;F.beginUpdate();try{for(var P=k.height-e.y-e.height,d=k.width-e.x-e.width,f=F.getChildCells(b,!0),g=0;g<f.length;g++)F.setVisible(f[g],!0);var x=this.getSize(f,!1);if(0<P&&0<d&&0< +f.length&&0<x){if(C){var y=this.graph.getCellGeometry(f[f.length-1]);null!=y&&(y=y.clone(),y.height=P-x+y.height,F.setGeometry(f[f.length-1],y))}var u=p?null:this.getRowLayout(f[0],d),H=[],J=e.y;for(g=0;g<f.length;g++)y=this.graph.getCellGeometry(f[g]),null!=y&&(y=y.clone(),y.x=e.x,y.width=d,y.y=Math.round(J),J=C||m?J+y.height:J+y.height/x*P,y.height=Math.round(J)-y.y,F.setGeometry(f[g],y)),K=Math.max(K,this.layoutRow(f[g],u,y.height,d,H));m&&P<x&&(k=k.clone(),k.height=J+e.height,F.setGeometry(b, +k));p&&d<K+Graph.minTableColumnWidth&&(k=k.clone(),k.width=K+e.width+e.x+Graph.minTableColumnWidth,F.setGeometry(b,k));this.graph.visitTableCells(b,mxUtils.bind(this,function(D){F.setVisible(D.cell,D.actual.cell==D.cell);if(D.actual.cell!=D.cell){if(D.actual.row==D.row){var G=null!=D.geo.alternateBounds?D.geo.alternateBounds:D.geo;D.actual.geo.width+=G.width}D.actual.col==D.col&&(G=null!=D.geo.alternateBounds?D.geo.alternateBounds:D.geo,D.actual.geo.height+=G.height)}}))}else for(g=0;g<f.length;g++)F.setVisible(f[g], +!1)}finally{F.endUpdate()}}}; (function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(f,g){g=null!=g?g:!0;var x=this.getState(f);null!=x&&g&&this.graph.model.isEdge(x.cell)&&null!=x.style&&1!=x.style[mxConstants.STYLE_CURVED]&&!x.invalid&&this.updateLineJumps(x)&&this.graph.cellRenderer.redraw(x,!1,this.isRendering());x=e.apply(this, arguments);null!=x&&g&&this.graph.model.isEdge(x.cell)&&null!=x.style&&1!=x.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(x);return x};var k=mxShape.prototype.paint;mxShape.prototype.paint=function(){k.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var f=this.node.getElementsByTagName("path");if(1<f.length){"1"!=mxUtils.getValue(this.state.style, mxConstants.STYLE_DASHED,"0")&&f[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var g=this.state.view.graph.getFlowAnimationStyle();null!=g&&f[1].setAttribute("class",g.getAttribute("id"))}}};var m=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(f,g){return m.apply(this,arguments)||null!=f.routedPoints&&null!=g.routedPoints&&!mxUtils.equalPoints(g.routedPoints,f.routedPoints)};var C=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState= -function(f){C.apply(this,arguments);this.graph.model.isEdge(f.cell)&&1!=f.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(f)};mxGraphView.prototype.updateLineJumps=function(f){var g=f.absolutePoints;if(Graph.lineJumpsEnabled){var x=null!=f.routedPoints,z=null;if(null!=g&&null!=this.validEdges&&"none"!==mxUtils.getValue(f.style,"jumpStyle","none")){var u=function(da,ia,L){var Z=new mxPoint(ia,L);Z.type=da;z.push(Z);Z=null!=f.routedPoints?f.routedPoints[z.length-1]:null;return null==Z||Z.type!= -da||Z.x!=ia||Z.y!=L},H=.5*this.scale;x=!1;z=[];for(var J=0;J<g.length-1;J++){for(var D=g[J+1],G=g[J],V=[],U=g[J+2];J<g.length-2&&mxUtils.ptSegDistSq(G.x,G.y,U.x,U.y,D.x,D.y)<1*this.scale*this.scale;)D=U,J++,U=g[J+2];x=u(0,G.x,G.y)||x;for(var Y=0;Y<this.validEdges.length;Y++){var O=this.validEdges[Y],qa=O.absolutePoints;if(null!=qa&&mxUtils.intersects(f,O)&&"1"!=O.style.noJump)for(O=0;O<qa.length-1;O++){var oa=qa[O+1],aa=qa[O];for(U=qa[O+2];O<qa.length-2&&mxUtils.ptSegDistSq(aa.x,aa.y,U.x,U.y,oa.x, -oa.y)<1*this.scale*this.scale;)oa=U,O++,U=qa[O+2];U=mxUtils.intersection(G.x,G.y,D.x,D.y,aa.x,aa.y,oa.x,oa.y);if(null!=U&&(Math.abs(U.x-G.x)>H||Math.abs(U.y-G.y)>H)&&(Math.abs(U.x-D.x)>H||Math.abs(U.y-D.y)>H)&&(Math.abs(U.x-aa.x)>H||Math.abs(U.y-aa.y)>H)&&(Math.abs(U.x-oa.x)>H||Math.abs(U.y-oa.y)>H)){oa=U.x-G.x;aa=U.y-G.y;U={distSq:oa*oa+aa*aa,x:U.x,y:U.y};for(oa=0;oa<V.length;oa++)if(V[oa].distSq>U.distSq){V.splice(oa,0,U);U=null;break}null==U||0!=V.length&&V[V.length-1].x===U.x&&V[V.length-1].y=== -U.y||V.push(U)}}}for(O=0;O<V.length;O++)x=u(1,V[O].x,V[O].y)||x}U=g[g.length-1];x=u(0,U.x,U.y)||x}f.routedPoints=z;return x}return!1};var p=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(f,g,x){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)p.apply(this,arguments);else{var z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/ -2,u=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,H=mxUtils.getValue(this.style,"jumpStyle","none"),J=!0,D=null,G=null,V=[],U=null;f.begin();for(var Y=0;Y<this.state.routedPoints.length;Y++){var O=this.state.routedPoints[Y],qa=new mxPoint(O.x/this.scale,O.y/this.scale);0==Y?qa=g[0]:Y==this.state.routedPoints.length-1&&(qa=g[g.length-1]);var oa=!1;if(null!=D&&1==O.type){var aa=this.state.routedPoints[Y+1];O=aa.x/this.scale-qa.x;aa=aa.y/this.scale-qa.y; -O=O*O+aa*aa;null==U&&(U=new mxPoint(qa.x-D.x,qa.y-D.y),G=Math.sqrt(U.x*U.x+U.y*U.y),0<G?(U.x=U.x*u/G,U.y=U.y*u/G):U=null);O>u*u&&0<G&&(O=D.x-qa.x,aa=D.y-qa.y,O=O*O+aa*aa,O>u*u&&(oa=new mxPoint(qa.x-U.x,qa.y-U.y),O=new mxPoint(qa.x+U.x,qa.y+U.y),V.push(oa),this.addPoints(f,V,x,z,!1,null,J),V=0>Math.round(U.x)||0==Math.round(U.x)&&0>=Math.round(U.y)?1:-1,J=!1,"sharp"==H?(f.lineTo(oa.x-U.y*V,oa.y+U.x*V),f.lineTo(O.x-U.y*V,O.y+U.x*V),f.lineTo(O.x,O.y)):"line"==H?(f.moveTo(oa.x+U.y*V,oa.y-U.x*V),f.lineTo(oa.x- -U.y*V,oa.y+U.x*V),f.moveTo(O.x-U.y*V,O.y+U.x*V),f.lineTo(O.x+U.y*V,O.y-U.x*V),f.moveTo(O.x,O.y)):"arc"==H?(V*=1.3,f.curveTo(oa.x-U.y*V,oa.y+U.x*V,O.x-U.y*V,O.y+U.x*V,O.x,O.y)):(f.moveTo(O.x,O.y),J=!0),V=[O],oa=!0))}else U=null;oa||(V.push(qa),D=qa)}this.addPoints(f,V,x,z,!1,null,J);f.stroke()}};var E=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(f,g,x,z){return null!=g&&"centerPerimeter"==g.style[mxConstants.STYLE_PERIMETER]?new mxPoint(g.getCenterX(), -g.getCenterY()):E.apply(this,arguments)};var K=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(f,g,x,z){if(null==g||null==f||"1"!=g.style.snapToPoint&&"1"!=f.style.snapToPoint)K.apply(this,arguments);else{g=this.getTerminalPort(f,g,z);var u=this.getNextPoint(f,x,z),H=this.graph.isOrthogonal(f),J=mxUtils.toRadians(Number(g.style[mxConstants.STYLE_ROTATION]||"0")),D=new mxPoint(g.getCenterX(),g.getCenterY());if(0!=J){var G=Math.cos(-J),V= -Math.sin(-J);u=mxUtils.getRotatedPoint(u,G,V,D)}G=parseFloat(f.style[mxConstants.STYLE_PERIMETER_SPACING]||0);G+=parseFloat(f.style[z?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);u=this.getPerimeterPoint(g,u,0==J&&H,G);0!=J&&(G=Math.cos(J),V=Math.sin(J),u=mxUtils.getRotatedPoint(u,G,V,D));f.setAbsoluteTerminalPoint(this.snapToAnchorPoint(f,g,x,z,u),z)}};mxGraphView.prototype.snapToAnchorPoint=function(f,g,x,z,u){if(null!=g&&null!=f){f=this.graph.getAllConnectionConstraints(g); -z=x=null;if(null!=f)for(var H=0;H<f.length;H++){var J=this.graph.getConnectionPoint(g,f[H]);if(null!=J){var D=(J.x-u.x)*(J.x-u.x)+(J.y-u.y)*(J.y-u.y);if(null==z||D<z)x=J,z=D}}null!=x&&(u=x)}return u};var Q=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(f,g,x){var z=Q.apply(this,arguments);"1"==f.getAttribute("placeholders")&&null!=x.state&&(z=x.state.view.graph.replacePlaceholders(x.state.cell,z));return z};var d=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape= -function(f){if(null!=f.style&&"undefined"!==typeof pako){var g=mxUtils.getValue(f.style,mxConstants.STYLE_SHAPE,null);if(null!=g&&"string"===typeof g&&"stencil("==g.substring(0,8))try{var x=g.substring(8,g.length-1),z=mxUtils.parseXml(Graph.decompress(x));return new mxShape(new mxStencil(z.documentElement))}catch(u){null!=window.console&&console.log("Error in shape: "+u)}}return d.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0; +function(f){C.apply(this,arguments);this.graph.model.isEdge(f.cell)&&1!=f.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(f)};mxGraphView.prototype.updateLineJumps=function(f){var g=f.absolutePoints;if(Graph.lineJumpsEnabled){var x=null!=f.routedPoints,y=null;if(null!=g&&null!=this.validEdges&&"none"!==mxUtils.getValue(f.style,"jumpStyle","none")){var u=function(fa,ia,M){var aa=new mxPoint(ia,M);aa.type=fa;y.push(aa);aa=null!=f.routedPoints?f.routedPoints[y.length-1]:null;return null==aa||aa.type!= +fa||aa.x!=ia||aa.y!=M},H=.5*this.scale;x=!1;y=[];for(var J=0;J<g.length-1;J++){for(var D=g[J+1],G=g[J],W=[],T=g[J+2];J<g.length-2&&mxUtils.ptSegDistSq(G.x,G.y,T.x,T.y,D.x,D.y)<1*this.scale*this.scale;)D=T,J++,T=g[J+2];x=u(0,G.x,G.y)||x;for(var Z=0;Z<this.validEdges.length;Z++){var N=this.validEdges[Z],qa=N.absolutePoints;if(null!=qa&&mxUtils.intersects(f,N)&&"1"!=N.style.noJump)for(N=0;N<qa.length-1;N++){var oa=qa[N+1],S=qa[N];for(T=qa[N+2];N<qa.length-2&&mxUtils.ptSegDistSq(S.x,S.y,T.x,T.y,oa.x, +oa.y)<1*this.scale*this.scale;)oa=T,N++,T=qa[N+2];T=mxUtils.intersection(G.x,G.y,D.x,D.y,S.x,S.y,oa.x,oa.y);if(null!=T&&(Math.abs(T.x-G.x)>H||Math.abs(T.y-G.y)>H)&&(Math.abs(T.x-D.x)>H||Math.abs(T.y-D.y)>H)&&(Math.abs(T.x-S.x)>H||Math.abs(T.y-S.y)>H)&&(Math.abs(T.x-oa.x)>H||Math.abs(T.y-oa.y)>H)){oa=T.x-G.x;S=T.y-G.y;T={distSq:oa*oa+S*S,x:T.x,y:T.y};for(oa=0;oa<W.length;oa++)if(W[oa].distSq>T.distSq){W.splice(oa,0,T);T=null;break}null==T||0!=W.length&&W[W.length-1].x===T.x&&W[W.length-1].y===T.y|| +W.push(T)}}}for(N=0;N<W.length;N++)x=u(1,W[N].x,W[N].y)||x}T=g[g.length-1];x=u(0,T.x,T.y)||x}f.routedPoints=y;return x}return!1};var p=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(f,g,x){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)p.apply(this,arguments);else{var y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/ +2,u=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,H=mxUtils.getValue(this.style,"jumpStyle","none"),J=!0,D=null,G=null,W=[],T=null;f.begin();for(var Z=0;Z<this.state.routedPoints.length;Z++){var N=this.state.routedPoints[Z],qa=new mxPoint(N.x/this.scale,N.y/this.scale);0==Z?qa=g[0]:Z==this.state.routedPoints.length-1&&(qa=g[g.length-1]);var oa=!1;if(null!=D&&1==N.type){var S=this.state.routedPoints[Z+1];N=S.x/this.scale-qa.x;S=S.y/this.scale-qa.y;N= +N*N+S*S;null==T&&(T=new mxPoint(qa.x-D.x,qa.y-D.y),G=Math.sqrt(T.x*T.x+T.y*T.y),0<G?(T.x=T.x*u/G,T.y=T.y*u/G):T=null);N>u*u&&0<G&&(N=D.x-qa.x,S=D.y-qa.y,N=N*N+S*S,N>u*u&&(oa=new mxPoint(qa.x-T.x,qa.y-T.y),N=new mxPoint(qa.x+T.x,qa.y+T.y),W.push(oa),this.addPoints(f,W,x,y,!1,null,J),W=0>Math.round(T.x)||0==Math.round(T.x)&&0>=Math.round(T.y)?1:-1,J=!1,"sharp"==H?(f.lineTo(oa.x-T.y*W,oa.y+T.x*W),f.lineTo(N.x-T.y*W,N.y+T.x*W),f.lineTo(N.x,N.y)):"line"==H?(f.moveTo(oa.x+T.y*W,oa.y-T.x*W),f.lineTo(oa.x- +T.y*W,oa.y+T.x*W),f.moveTo(N.x-T.y*W,N.y+T.x*W),f.lineTo(N.x+T.y*W,N.y-T.x*W),f.moveTo(N.x,N.y)):"arc"==H?(W*=1.3,f.curveTo(oa.x-T.y*W,oa.y+T.x*W,N.x-T.y*W,N.y+T.x*W,N.x,N.y)):(f.moveTo(N.x,N.y),J=!0),W=[N],oa=!0))}else T=null;oa||(W.push(qa),D=qa)}this.addPoints(f,W,x,y,!1,null,J);f.stroke()}};var F=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(f,g,x,y){return null!=g&&"centerPerimeter"==g.style[mxConstants.STYLE_PERIMETER]?new mxPoint(g.getCenterX(), +g.getCenterY()):F.apply(this,arguments)};var K=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(f,g,x,y){if(null==g||null==f||"1"!=g.style.snapToPoint&&"1"!=f.style.snapToPoint)K.apply(this,arguments);else{g=this.getTerminalPort(f,g,y);var u=this.getNextPoint(f,x,y),H=this.graph.isOrthogonal(f),J=mxUtils.toRadians(Number(g.style[mxConstants.STYLE_ROTATION]||"0")),D=new mxPoint(g.getCenterX(),g.getCenterY());if(0!=J){var G=Math.cos(-J),W= +Math.sin(-J);u=mxUtils.getRotatedPoint(u,G,W,D)}G=parseFloat(f.style[mxConstants.STYLE_PERIMETER_SPACING]||0);G+=parseFloat(f.style[y?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);u=this.getPerimeterPoint(g,u,0==J&&H,G);0!=J&&(G=Math.cos(J),W=Math.sin(J),u=mxUtils.getRotatedPoint(u,G,W,D));f.setAbsoluteTerminalPoint(this.snapToAnchorPoint(f,g,x,y,u),y)}};mxGraphView.prototype.snapToAnchorPoint=function(f,g,x,y,u){if(null!=g&&null!=f){f=this.graph.getAllConnectionConstraints(g); +y=x=null;if(null!=f)for(var H=0;H<f.length;H++){var J=this.graph.getConnectionPoint(g,f[H]);if(null!=J){var D=(J.x-u.x)*(J.x-u.x)+(J.y-u.y)*(J.y-u.y);if(null==y||D<y)x=J,y=D}}null!=x&&(u=x)}return u};var P=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(f,g,x){var y=P.apply(this,arguments);"1"==f.getAttribute("placeholders")&&null!=x.state&&(y=x.state.view.graph.replacePlaceholders(x.state.cell,y));return y};var d=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape= +function(f){if(null!=f.style&&"undefined"!==typeof pako){var g=mxUtils.getValue(f.style,mxConstants.STYLE_SHAPE,null);if(null!=g&&"string"===typeof g&&"stencil("==g.substring(0,8))try{var x=g.substring(8,g.length-1),y=mxUtils.parseXml(Graph.decompress(x));return new mxShape(new mxStencil(y.documentElement))}catch(u){null!=window.console&&console.log("Error in shape: "+u)}}return d.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0; mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={}; mxStencilRegistry.getStencil=function(b){var e=mxStencilRegistry.stencils[b];if(null==e&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var k=mxStencilRegistry.getBasenameForStencil(b);if(null!=k){e=mxStencilRegistry.libraries[k];if(null!=e){if(null==mxStencilRegistry.packages[k]){for(var m=0;m<e.length;m++){var C=e[m];if(!mxStencilRegistry.filesLoaded[C])if(mxStencilRegistry.filesLoaded[C]=!0,".xml"==C.toLowerCase().substring(C.length-4,C.length))mxStencilRegistry.loadStencilSet(C, -null);else if(".js"==C.toLowerCase().substring(C.length-3,C.length))try{if(mxStencilRegistry.allowEval){var p=mxUtils.load(C);null!=p&&200<=p.getStatus()&&299>=p.getStatus()&&eval.call(window,p.getText())}}catch(E){null!=window.console&&console.log("error in getStencil:",b,k,e,C,E)}}mxStencilRegistry.packages[k]=1}}else k=k.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+k+".xml",null);e=mxStencilRegistry.stencils[b]}}return e}; +null);else if(".js"==C.toLowerCase().substring(C.length-3,C.length))try{if(mxStencilRegistry.allowEval){var p=mxUtils.load(C);null!=p&&200<=p.getStatus()&&299>=p.getStatus()&&eval.call(window,p.getText())}}catch(F){null!=window.console&&console.log("error in getStencil:",b,k,e,C,F)}}mxStencilRegistry.packages[k]=1}}else k=k.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+k+".xml",null);e=mxStencilRegistry.stencils[b]}}return e}; mxStencilRegistry.getBasenameForStencil=function(b){var e=null;if(null!=b&&"string"===typeof b&&(b=b.split("."),0<b.length&&"mxgraph"==b[0])){e=b[1];for(var k=2;k<b.length-1;k++)e+="/"+b[k]}return e}; -mxStencilRegistry.loadStencilSet=function(b,e,k,m){var C=mxStencilRegistry.packages[b];if(null!=k&&k||null==C){var p=!1;if(null==C)try{if(m){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(E){null!=E&&null!=E.documentElement&&(mxStencilRegistry.packages[b]=E,p=!0,mxStencilRegistry.parseStencilSet(E.documentElement,e,p))}));return}C=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=C;p=!0}catch(E){null!=window.console&&console.log("error in loadStencilSet:",b,E)}null!=C&&null!= +mxStencilRegistry.loadStencilSet=function(b,e,k,m){var C=mxStencilRegistry.packages[b];if(null!=k&&k||null==C){var p=!1;if(null==C)try{if(m){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(F){null!=F&&null!=F.documentElement&&(mxStencilRegistry.packages[b]=F,p=!0,mxStencilRegistry.parseStencilSet(F.documentElement,e,p))}));return}C=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=C;p=!0}catch(F){null!=window.console&&console.log("error in loadStencilSet:",b,F)}null!=C&&null!= C.documentElement&&mxStencilRegistry.parseStencilSet(C.documentElement,e,p)}};mxStencilRegistry.loadStencil=function(b,e){if(null!=e)mxUtils.get(b,mxUtils.bind(this,function(k){e(200<=k.getStatus()&&299>=k.getStatus()?k.getXml():null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var e=0;e<b.length;e++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[e]).documentElement)}; -mxStencilRegistry.parseStencilSet=function(b,e,k){if("stencils"==b.nodeName)for(var m=b.firstChild;null!=m;)"shapes"==m.nodeName&&mxStencilRegistry.parseStencilSet(m,e,k),m=m.nextSibling;else{k=null!=k?k:!0;m=b.firstChild;var C="";b=b.getAttribute("name");for(null!=b&&(C=b+".");null!=m;){if(m.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=m.getAttribute("name"),null!=b)){C=C.toLowerCase();var p=b.replace(/ /g,"_");k&&mxStencilRegistry.addStencil(C+p.toLowerCase(),new mxStencil(m));if(null!=e){var E=m.getAttribute("w"), -K=m.getAttribute("h");E=null==E?80:parseInt(E,10);K=null==K?80:parseInt(K,10);e(C,p,b,E,K)}}m=m.nextSibling}}}; -"undefined"!==typeof mxVertexHandler&&function(){function b(){var y=document.createElement("div");y.className="geHint";y.style.whiteSpace="nowrap";y.style.position="absolute";return y}function e(y,M){switch(M){case mxConstants.POINTS:return y;case mxConstants.MILLIMETERS:return(y/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(y/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(y/mxConstants.PIXELS_PER_INCH).toFixed(2)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2"; +mxStencilRegistry.parseStencilSet=function(b,e,k){if("stencils"==b.nodeName)for(var m=b.firstChild;null!=m;)"shapes"==m.nodeName&&mxStencilRegistry.parseStencilSet(m,e,k),m=m.nextSibling;else{k=null!=k?k:!0;m=b.firstChild;var C="";b=b.getAttribute("name");for(null!=b&&(C=b+".");null!=m;){if(m.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=m.getAttribute("name"),null!=b)){C=C.toLowerCase();var p=b.replace(/ /g,"_");k&&mxStencilRegistry.addStencil(C+p.toLowerCase(),new mxStencil(m));if(null!=e){var F=m.getAttribute("w"), +K=m.getAttribute("h");F=null==F?80:parseInt(F,10);K=null==K?80:parseInt(K,10);e(C,p,b,F,K)}}m=m.nextSibling}}}; +"undefined"!==typeof mxVertexHandler&&function(){function b(){var z=document.createElement("div");z.className="geHint";z.style.whiteSpace="nowrap";z.style.position="absolute";return z}function e(z,L){switch(L){case mxConstants.POINTS:return z;case mxConstants.MILLIMETERS:return(z/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(z/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(z/mxConstants.PIXELS_PER_INCH).toFixed(2)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2"; mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR="#00a8ff";mxConstants.OUTLINE_COLOR="#00a8ff";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#99ccff";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#00a8ff";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.EDGE_SELECTION_COLOR="#00a8ff";mxConstants.DEFAULT_VALID_COLOR="#00a8ff";mxConstants.LABEL_HANDLE_FILLCOLOR="#cee7ff";mxConstants.GUIDE_COLOR="#0088cf";mxConstants.HIGHLIGHT_OPACITY=30;mxConstants.HIGHLIGHT_SIZE=5;mxEdgeHandler.prototype.snapToTerminals= -!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(y){return!mxEvent.isAltDown(y)};var k=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(y){return k.apply(this,arguments)||this.graph.isTableRow(y)||this.graph.isTableCell(y)};var m=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(y){return m.apply(this,arguments)|| -this.graph.isEdgeIgnored(y)};var C=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(y){return this.graph.isCloneEvent(y)!=C.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var y=new mxEllipse(null,this.highlightColor,this.highlightColor,0);y.opacity=mxConstants.HIGHLIGHT_OPACITY;return y};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState= -function(y){y=this.graph.createCurrentEdgeStyle();y=this.graph.createEdge(null,null,null,null,null,y);y=new mxCellState(this.graph.view,y,this.graph.getCellStyle(y));for(var M in this.graph.currentEdgeStyle)y.style[M]=this.graph.currentEdgeStyle[M];y.style=this.graph.postProcessCellStyle(y.cell,y.style);return y};var p=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var y=p.apply(this,arguments);y.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED]; -return y};mxConnectionHandler.prototype.updatePreview=function(y){};var E=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var y=E.apply(this,arguments),M=y.getCell;y.getCell=mxUtils.bind(this,function(N){var S=M.apply(this,arguments);this.error=null;return S});return y};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle= -function(){for(var y="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",M="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),N=0;N<M.length;N++)null!=this.currentEdgeStyle[M[N]]&&(y+=M[N]+"="+this.currentEdgeStyle[M[N]]+";");null!=this.currentEdgeStyle.orthogonalLoop?y+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&& -(y+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?y+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(y+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(y+="elbow="+this.currentEdgeStyle.elbow+";");return y=null!=this.currentEdgeStyle.html?y+("html="+this.currentEdgeStyle.html+";"):y+"html=1;"}; -Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var y=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=y&&(new mxCodec(y.ownerDocument)).decode(y,this.getStylesheet())};Graph.prototype.createCellLookup=function(y,M){M=null!=M?M:{};for(var N=0;N<y.length;N++){var S=y[N];M[mxObjectIdentity.get(S)]=S.getId();for(var X=this.model.getChildCount(S), -fa=0;fa<X;fa++)this.createCellLookup([this.model.getChildAt(S,fa)],M)}return M};Graph.prototype.createCellMapping=function(y,M,N){N=null!=N?N:{};for(var S in y){var X=M[S];null==N[X]&&(N[X]=y[S].getId()||"")}return N};Graph.prototype.importGraphModel=function(y,M,N,S){M=null!=M?M:0;N=null!=N?N:0;var X=new mxCodec(y.ownerDocument),fa=new mxGraphModel;X.decode(y,fa);y=[];X={};var la={},xa=fa.getChildren(this.cloneCell(fa.root,this.isCloneInvalidEdges(),X));if(null!=xa){var sa=this.createCellLookup([fa.root]); -xa=xa.slice();this.model.beginUpdate();try{if(1!=xa.length||this.isCellLocked(this.getDefaultParent()))for(fa=0;fa<xa.length;fa++)ya=this.model.getChildren(this.moveCells([xa[fa]],M,N,!1,this.model.getRoot())[0]),null!=ya&&(y=y.concat(ya));else{var ya=fa.getChildren(xa[0]);null!=ya&&(y=this.moveCells(ya,M,N,!1,this.getDefaultParent()),la[fa.getChildAt(fa.root,0).getId()]=this.getDefaultParent().getId())}if(null!=y&&(this.createCellMapping(X,sa,la),this.updateCustomLinks(la,y),S)){this.isGridEnabled()&& -(M=this.snap(M),N=this.snap(N));var Fa=this.getBoundingBoxFromGeometry(y,!0);null!=Fa&&this.moveCells(y,M-Fa.x,N-Fa.y)}}finally{this.model.endUpdate()}}return y};Graph.prototype.encodeCells=function(y){for(var M={},N=this.cloneCells(y,null,M),S=new mxDictionary,X=0;X<y.length;X++)S.put(y[X],!0);var fa=new mxCodec,la=new mxGraphModel,xa=la.getChildAt(la.getRoot(),0);for(X=0;X<N.length;X++){la.add(xa,N[X]);var sa=this.view.getState(y[X]);if(null!=sa){var ya=this.getCellGeometry(N[X]);null!=ya&&ya.relative&& -!this.model.isEdge(y[X])&&null==S.get(this.model.getParent(y[X]))&&(ya.offset=null,ya.relative=!1,ya.x=sa.x/sa.view.scale-sa.view.translate.x,ya.y=sa.y/sa.view.scale-sa.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(M,this.createCellLookup(y)),N);return fa.encode(la)};Graph.prototype.isSwimlane=function(y,M){var N=null;null==y||this.model.isEdge(y)||this.model.getParent(y)==this.model.getRoot()||(N=this.getCurrentCellStyle(y,M)[mxConstants.STYLE_SHAPE]);return N==mxConstants.SHAPE_SWIMLANE|| -"table"==N||"tableRow"==N};var K=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(y){var M=this.model.getParent(y);if(null!=M){var N=this.getCurrentCellStyle(M);if(null!=N.expand)return"0"!=N.expand}return K.apply(this,arguments)&&(null==M||!this.isTable(M))};var Q=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(y,M,N,S,X,fa,la,xa){null==xa&&(xa=this.model.getParent(y),this.isTable(xa)||this.isTableRow(xa))&&(xa=this.getCellAt(fa,la,null,!0,!1));N=null;this.model.beginUpdate(); -try{N=Q.apply(this,[y,M,N,S,X,fa,la,xa]);this.model.setValue(N,"");var sa=this.getChildCells(N,!0);for(M=0;M<sa.length;M++){var ya=this.getCellGeometry(sa[M]);null!=ya&&ya.relative&&0<ya.x&&this.model.remove(sa[M])}var Fa=this.getChildCells(y,!0);for(M=0;M<Fa.length;M++)ya=this.getCellGeometry(Fa[M]),null!=ya&&ya.relative&&0>=ya.x&&this.model.remove(Fa[M]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[N]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[N]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING, -null,[y]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[y]);var wa=this.model.getTerminal(N,!1);if(null!=wa){var ua=this.getCurrentCellStyle(wa);null!=ua&&"1"==ua.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[y]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[y]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[N]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[N]))}}finally{this.model.endUpdate()}return N};var d=Graph.prototype.selectCell;Graph.prototype.selectCell= -function(y,M,N){if(M||N)d.apply(this,arguments);else{var S=this.getSelectionCell(),X=null,fa=[],la=mxUtils.bind(this,function(xa){if(null!=this.view.getState(xa)&&(this.model.isVertex(xa)||this.model.isEdge(xa)))if(fa.push(xa),xa==S)X=fa.length-1;else if(y&&null==S&&0<fa.length||null!=X&&y&&fa.length>X||!y&&0<X)return;for(var sa=0;sa<this.model.getChildCount(xa);sa++)la(this.model.getChildAt(xa,sa))});la(this.model.root);0<fa.length&&(X=null!=X?mxUtils.mod(X+(y?1:-1),fa.length):0,this.setSelectionCell(fa[X]))}}; -Graph.prototype.swapShapes=function(y,M,N,S,X,fa,la){M=!1;if(!S&&null!=X&&1==y.length&&(S=this.view.getState(X),N=this.view.getState(y[0]),null!=S&&null!=N&&(null!=fa&&mxEvent.isShiftDown(fa)||"umlLifeline"==S.style.shape&&"umlLifeline"==N.style.shape)&&(S=this.getCellGeometry(X),fa=this.getCellGeometry(y[0]),null!=S&&null!=fa))){M=S.clone();S=fa.clone();S.x=M.x;S.y=M.y;M.x=fa.x;M.y=fa.y;this.model.beginUpdate();try{this.model.setGeometry(X,M),this.model.setGeometry(y[0],S)}finally{this.model.endUpdate()}M= -!0}return M};var f=Graph.prototype.moveCells;Graph.prototype.moveCells=function(y,M,N,S,X,fa,la){if(this.swapShapes(y,M,N,S,X,fa,la))return y;la=null!=la?la:{};if(this.isTable(X)){for(var xa=[],sa=0;sa<y.length;sa++)this.isTable(y[sa])?xa=xa.concat(this.model.getChildCells(y[sa],!0).reverse()):xa.push(y[sa]);y=xa}this.model.beginUpdate();try{xa=[];for(sa=0;sa<y.length;sa++)if(null!=X&&this.isTableRow(y[sa])){var ya=this.model.getParent(y[sa]),Fa=this.getCellGeometry(y[sa]);this.isTable(ya)&&xa.push(ya); -if(null!=ya&&null!=Fa&&this.isTable(ya)&&this.isTable(X)&&(S||ya!=X)){if(!S){var wa=this.getCellGeometry(ya);null!=wa&&(wa=wa.clone(),wa.height-=Fa.height,this.model.setGeometry(ya,wa))}wa=this.getCellGeometry(X);null!=wa&&(wa=wa.clone(),wa.height+=Fa.height,this.model.setGeometry(X,wa));var ua=this.model.getChildCells(X,!0);if(0<ua.length){y[sa]=S?this.cloneCell(y[sa]):y[sa];var La=this.model.getChildCells(y[sa],!0),Oa=this.model.getChildCells(ua[0],!0),Ca=Oa.length-La.length;if(0<Ca)for(var Ma= -0;Ma<Ca;Ma++){var Ga=this.cloneCell(La[La.length-1]);null!=Ga&&(Ga.value="",this.model.add(y[sa],Ga))}else if(0>Ca)for(Ma=0;Ma>Ca;Ma--)this.model.remove(La[La.length+Ma-1]);La=this.model.getChildCells(y[sa],!0);for(Ma=0;Ma<Oa.length;Ma++){var Ya=this.getCellGeometry(Oa[Ma]),db=this.getCellGeometry(La[Ma]);null!=Ya&&null!=db&&(db=db.clone(),db.width=Ya.width,this.model.setGeometry(La[Ma],db))}}}}var eb=f.apply(this,arguments);for(sa=0;sa<xa.length;sa++)!S&&this.model.contains(xa[sa])&&0==this.model.getChildCount(xa[sa])&& -this.model.remove(xa[sa]);S&&this.updateCustomLinks(this.createCellMapping(la,this.createCellLookup(y)),eb)}finally{this.model.endUpdate()}return eb};var g=Graph.prototype.removeCells;Graph.prototype.removeCells=function(y,M){var N=[];this.model.beginUpdate();try{for(var S=0;S<y.length;S++)if(this.isTableCell(y[S])){var X=this.model.getParent(y[S]),fa=this.model.getParent(X);1==this.model.getChildCount(X)&&1==this.model.getChildCount(fa)?0>mxUtils.indexOf(y,fa)&&0>mxUtils.indexOf(N,fa)&&N.push(fa): -this.labelChanged(y[S],"")}else{if(this.isTableRow(y[S])&&(fa=this.model.getParent(y[S]),0>mxUtils.indexOf(y,fa)&&0>mxUtils.indexOf(N,fa))){for(var la=this.model.getChildCells(fa,!0),xa=0,sa=0;sa<la.length;sa++)0<=mxUtils.indexOf(y,la[sa])&&xa++;xa==la.length&&N.push(fa)}N.push(y[S])}N=g.apply(this,[N,M])}finally{this.model.endUpdate()}return N};Graph.prototype.updateCustomLinks=function(y,M,N){N=null!=N?N:new Graph;for(var S=0;S<M.length;S++)null!=M[S]&&N.updateCustomLinksForCell(y,M[S],N)};Graph.prototype.updateCustomLinksForCell= -function(y,M){this.doUpdateCustomLinksForCell(y,M);for(var N=this.model.getChildCount(M),S=0;S<N;S++)this.updateCustomLinksForCell(y,this.model.getChildAt(M,S))};Graph.prototype.doUpdateCustomLinksForCell=function(y,M){};Graph.prototype.getAllConnectionConstraints=function(y,M){if(null!=y){M=mxUtils.getValue(y.style,"points",null);if(null!=M){y=[];try{var N=JSON.parse(M);for(M=0;M<N.length;M++){var S=N[M];y.push(new mxConnectionConstraint(new mxPoint(S[0],S[1]),2<S.length?"0"!=S[2]:!0,null,3<S.length? -S[3]:0,4<S.length?S[4]:0))}}catch(fa){}return y}if(null!=y.shape&&null!=y.shape.bounds){S=y.shape.direction;M=y.shape.bounds;var X=y.shape.scale;N=M.width/X;M=M.height/X;if(S==mxConstants.DIRECTION_NORTH||S==mxConstants.DIRECTION_SOUTH)S=N,N=M,M=S;M=y.shape.getConstraints(y.style,N,M);if(null!=M)return M;if(null!=y.shape.stencil&&null!=y.shape.stencil.constraints)return y.shape.stencil.constraints;if(null!=y.shape.constraints)return y.shape.constraints}}return null};Graph.prototype.flipEdge=function(y){if(null!= -y){var M=this.getCurrentCellStyle(y);M=mxUtils.getValue(M,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,M,[y])}};Graph.prototype.isValidRoot=function(y){for(var M=this.model.getChildCount(y),N=0,S=0;S<M;S++){var X=this.model.getChildAt(y,S);this.model.isVertex(X)&&(X=this.getCellGeometry(X),null==X||X.relative||N++)}return 0<N||this.isContainer(y)};Graph.prototype.isValidDropTarget= -function(y,M,N){for(var S=this.getCurrentCellStyle(y),X=!0,fa=!0,la=0;la<M.length&&fa;la++)X=X&&this.isTable(M[la]),fa=fa&&this.isTableRow(M[la]);return(1==M.length&&null!=N&&mxEvent.isShiftDown(N)&&!mxEvent.isControlDown(N)&&!mxEvent.isAltDown(N)||("1"!=mxUtils.getValue(S,"part","0")||this.isContainer(y))&&"0"!=mxUtils.getValue(S,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(y))&&!this.isTableRow(y)&&(!this.isTable(y)||fa||X))&&!this.isCellLocked(y)}; -Graph.prototype.createGroupCell=function(){var y=mxGraph.prototype.createGroupCell.apply(this,arguments);y.setStyle("group");return y};Graph.prototype.isExtendParentsOnAdd=function(y){var M=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(M&&null!=y&&null!=this.layoutManager){var N=this.model.getParent(y);null!=N&&(N=this.layoutManager.getLayout(N),null!=N&&N.constructor==mxStackLayout&&(M=!1))}return M};Graph.prototype.getPreferredSizeForCell=function(y){var M=mxGraph.prototype.getPreferredSizeForCell.apply(this, -arguments);null!=M&&(M.width+=10,M.height+=4,this.gridEnabled&&(M.width=this.snap(M.width),M.height=this.snap(M.height)));return M};Graph.prototype.turnShapes=function(y,M){var N=this.getModel(),S=[];N.beginUpdate();try{for(var X=0;X<y.length;X++){var fa=y[X];if(N.isEdge(fa)){var la=N.getTerminal(fa,!0),xa=N.getTerminal(fa,!1);N.setTerminal(fa,xa,!0);N.setTerminal(fa,la,!1);var sa=N.getGeometry(fa);if(null!=sa){sa=sa.clone();null!=sa.points&&sa.points.reverse();var ya=sa.getTerminalPoint(!0),Fa=sa.getTerminalPoint(!1); -sa.setTerminalPoint(ya,!1);sa.setTerminalPoint(Fa,!0);N.setGeometry(fa,sa);var wa=this.view.getState(fa),ua=this.view.getState(la),La=this.view.getState(xa);if(null!=wa){var Oa=null!=ua?this.getConnectionConstraint(wa,ua,!0):null,Ca=null!=La?this.getConnectionConstraint(wa,La,!1):null;this.setConnectionConstraint(fa,la,!0,Ca);this.setConnectionConstraint(fa,xa,!1,Oa);var Ma=mxUtils.getValue(wa.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING, -mxUtils.getValue(wa.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[fa]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Ma,[fa])}S.push(fa)}}else if(N.isVertex(fa)&&(sa=this.getCellGeometry(fa),null!=sa)){if(!(this.isTable(fa)||this.isTableRow(fa)||this.isTableCell(fa)||this.isSwimlane(fa))){sa=sa.clone();sa.x+=sa.width/2-sa.height/2;sa.y+=sa.height/2-sa.width/2;var Ga=sa.width;sa.width=sa.height;sa.height=Ga;N.setGeometry(fa,sa)}var Ya=this.view.getState(fa);if(null!=Ya){var db= -[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],eb=mxUtils.getValue(Ya.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,db[mxUtils.mod(mxUtils.indexOf(db,eb)+(M?-1:1),db.length)],[fa])}S.push(fa)}}}finally{N.endUpdate()}return S};Graph.prototype.stencilHasPlaceholders=function(y){if(null!=y&&null!=y.fgNode)for(y=y.fgNode.firstChild;null!=y;){if("text"==y.nodeName&&"1"==y.getAttribute("placeholders"))return!0; -y=y.nextSibling}return!1};var x=Graph.prototype.processChange;Graph.prototype.processChange=function(y){if(y instanceof mxGeometryChange&&(this.isTableCell(y.cell)||this.isTableRow(y.cell))&&(null==y.previous&&null!=y.geometry||null!=y.previous&&!y.previous.equals(y.geometry))){var M=y.cell;this.isTableCell(M)&&(M=this.model.getParent(M));this.isTableRow(M)&&(M=this.model.getParent(M));var N=this.view.getState(M);null!=N&&null!=N.shape&&(this.view.invalidate(M),N.shape.bounds=null)}x.apply(this,arguments); -y instanceof mxValueChange&&null!=y.cell&&null!=y.cell.value&&"object"==typeof y.cell.value&&this.invalidateDescendantsWithPlaceholders(y.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(y){y=this.model.getDescendants(y);if(0<y.length)for(var M=0;M<y.length;M++){var N=this.view.getState(y[M]);null!=N&&null!=N.shape&&null!=N.shape.stencil&&this.stencilHasPlaceholders(N.shape.stencil)?this.removeStateForCell(y[M]):this.isReplacePlaceholders(y[M])&&this.view.invalidate(y[M],!1,!1)}}; -Graph.prototype.replaceElement=function(y,M){M=y.ownerDocument.createElement(null!=M?M:"span");for(var N=Array.prototype.slice.call(y.attributes);attr=N.pop();)M.setAttribute(attr.nodeName,attr.nodeValue);M.innerHTML=y.innerHTML;y.parentNode.replaceChild(M,y)};Graph.prototype.processElements=function(y,M){if(null!=y){y=y.getElementsByTagName("*");for(var N=0;N<y.length;N++)M(y[N])}};Graph.prototype.updateLabelElements=function(y,M,N){y=null!=y?y:this.getSelectionCells();for(var S=document.createElement("div"), -X=0;X<y.length;X++)if(this.isHtmlLabel(y[X])){var fa=this.convertValueToString(y[X]);if(null!=fa&&0<fa.length){S.innerHTML=fa;for(var la=S.getElementsByTagName(null!=N?N:"*"),xa=0;xa<la.length;xa++)M(la[xa]);S.innerHTML!=fa&&this.cellLabelChanged(y[X],S.innerHTML)}}};Graph.prototype.cellLabelChanged=function(y,M,N){M=Graph.zapGremlins(M);this.model.beginUpdate();try{if(null!=y.value&&"object"==typeof y.value){if(this.isReplacePlaceholders(y)&&null!=y.getAttribute("placeholder"))for(var S=y.getAttribute("placeholder"), -X=y;null!=X;){if(X==this.model.getRoot()||null!=X.value&&"object"==typeof X.value&&X.hasAttribute(S)){this.setAttributeForCell(X,S,M);break}X=this.model.getParent(X)}var fa=y.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&fa.hasAttribute("label_"+Graph.diagramLanguage)?fa.setAttribute("label_"+Graph.diagramLanguage,M):fa.setAttribute("label",M);M=fa}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(y){if(null!= -y){for(var M=new mxDictionary,N=0;N<y.length;N++)M.put(y[N],!0);var S=[];for(N=0;N<y.length;N++){var X=this.model.getParent(y[N]);null==X||M.get(X)||(M.put(X,!0),S.push(X))}for(N=0;N<S.length;N++)if(X=this.view.getState(S[N]),null!=X&&(this.model.isEdge(X.cell)||this.model.isVertex(X.cell))&&this.isCellDeletable(X.cell)&&this.isTransparentState(X)){for(var fa=!0,la=0;la<this.model.getChildCount(X.cell)&&fa;la++)M.get(this.model.getChildAt(X.cell,la))||(fa=!1);fa&&y.push(X.cell)}}mxGraph.prototype.cellsRemoved.apply(this, -arguments)};Graph.prototype.removeCellsAfterUngroup=function(y){for(var M=[],N=0;N<y.length;N++)this.isCellDeletable(y[N])&&this.isTransparentState(this.view.getState(y[N]))&&M.push(y[N]);y=M;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(y,M){this.setAttributeForCell(y,"link",M)};Graph.prototype.setTooltipForCell=function(y,M){var N="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(y.value)&&y.value.hasAttribute("tooltip_"+ -Graph.diagramLanguage)&&(N="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(y,N,M)};Graph.prototype.getAttributeForCell=function(y,M,N){y=null!=y.value&&"object"===typeof y.value?y.value.getAttribute(M):null;return null!=y?y:N};Graph.prototype.setAttributeForCell=function(y,M,N){if(null!=y.value&&"object"==typeof y.value)var S=y.value.cloneNode(!0);else S=mxUtils.createXmlDocument().createElement("UserObject"),S.setAttribute("label",y.value||"");null!=N?S.setAttribute(M,N):S.removeAttribute(M); -this.model.setValue(y,S)};var z=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(y,M,N,S){this.getModel();if(mxEvent.isAltDown(M))return null;for(var X=0;X<y.length;X++){var fa=this.model.getParent(y[X]);if(this.model.isEdge(fa)&&0>mxUtils.indexOf(y,fa))return null}fa=z.apply(this,arguments);var la=!0;for(X=0;X<y.length&&la;X++)la=la&&this.isTableRow(y[X]);la&&(this.isTableCell(fa)&&(fa=this.model.getParent(fa)),this.isTableRow(fa)&&(fa=this.model.getParent(fa)),this.isTable(fa)|| -(fa=null));return fa};Graph.prototype.click=function(y){mxGraph.prototype.click.call(this,y);this.firstClickState=y.getState();this.firstClickSource=y.getSource()};Graph.prototype.dblClick=function(y,M){this.isEnabled()&&(M=this.insertTextForEvent(y,M),mxGraph.prototype.dblClick.call(this,y,M))};Graph.prototype.insertTextForEvent=function(y,M){var N=mxUtils.convertPoint(this.container,mxEvent.getClientX(y),mxEvent.getClientY(y));if(null!=y&&!this.model.isVertex(M)){var S=this.model.isEdge(M)?this.view.getState(M): -null,X=mxEvent.getSource(y);this.firstClickState!=S||this.firstClickSource!=X||null!=S&&null!=S.text&&null!=S.text.node&&null!=S.text.boundingBox&&(mxUtils.contains(S.text.boundingBox,N.x,N.y)||mxUtils.isAncestorNode(S.text.node,mxEvent.getSource(y)))||(null!=S||this.isCellLocked(this.getDefaultParent()))&&(null==S||this.isCellLocked(S.cell))||!(null!=S||mxClient.IS_SVG&&X==this.view.getCanvas().ownerSVGElement)||(null==S&&(S=this.view.getState(this.getCellAt(N.x,N.y))),M=this.addText(N.x,N.y,S))}return M}; -Graph.prototype.getInsertPoint=function(){var y=this.getGridSize(),M=this.container.scrollLeft/this.view.scale-this.view.translate.x,N=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var S=this.getPageLayout(),X=this.getPageSize();M=Math.max(M,S.x*X.width);N=Math.max(N,S.y*X.height)}return new mxPoint(this.snap(M+y),this.snap(N+y))};Graph.prototype.getFreeInsertPoint=function(){var y=this.view,M=this.getGraphBounds(),N=this.getInsertPoint(),S=this.snap(Math.round(Math.max(N.x, -M.x/y.scale-y.translate.x+(0==M.width?2*this.gridSize:0))));y=this.snap(Math.round(Math.max(N.y,(M.y+M.height)/y.scale-y.translate.y+2*this.gridSize)));return new mxPoint(S,y)};Graph.prototype.getCenterInsertPoint=function(y){y=null!=y?y:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-y.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/ -2)/this.view.scale-this.view.translate.y-y.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-y.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-y.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(y,M,N){var S=new mxCell;S.value="Text";S.geometry=new mxGeometry(0,0,0,0);S.vertex=!0;if(null!=N&&this.model.isEdge(N.cell)){S.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];"; -S.geometry.relative=!0;S.connectable=!1;var X=this.view.getRelativePoint(N,y,M);S.geometry.x=Math.round(1E4*X.x)/1E4;S.geometry.y=Math.round(X.y);S.geometry.offset=new mxPoint(0,0);X=this.view.getPoint(N,S.geometry);var fa=this.view.scale;S.geometry.offset=new mxPoint(Math.round((y-X.x)/fa),Math.round((M-X.y)/fa))}else X=this.view.translate,S.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",S.geometry.width=40,S.geometry.height=20,S.geometry.x=Math.round(y/this.view.scale)- -X.x-(null!=N?N.origin.x:0),S.geometry.y=Math.round(M/this.view.scale)-X.y-(null!=N?N.origin.y:0),S.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([S],null!=N?N.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[S])),this.autoSizeCell(S)}finally{this.getModel().endUpdate()}return S};Graph.prototype.addClickHandler=function(y,M,N){var S=mxUtils.bind(this,function(){var sa=this.container.getElementsByTagName("a");if(null!=sa)for(var ya=0;ya<sa.length;ya++){var Fa= -this.getAbsoluteUrl(sa[ya].getAttribute("href"));null!=Fa&&(sa[ya].setAttribute("rel",this.linkRelation),sa[ya].setAttribute("href",Fa),null!=M&&mxEvent.addGestureListeners(sa[ya],null,null,M))}});this.model.addListener(mxEvent.CHANGE,S);S();var X=this.container.style.cursor,fa=this.getTolerance(),la=this,xa={currentState:null,currentLink:null,currentTarget:null,highlight:null!=y&&""!=y&&y!=mxConstants.NONE?new mxCellHighlight(la,y,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(sa){var ya= -sa.sourceState;if(null==ya||null==la.getLinkForCell(ya.cell))sa=la.getCellAt(sa.getGraphX(),sa.getGraphY(),null,null,null,function(Fa,wa,ua){return null==la.getLinkForCell(Fa.cell)}),ya=null==ya||la.model.isAncestor(sa,ya.cell)?la.view.getState(sa):null;ya!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ya,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(sa,ya){this.startX=ya.getGraphX();this.startY=ya.getGraphY();this.scrollLeft=la.container.scrollLeft; -this.scrollTop=la.container.scrollTop;null==this.currentLink&&"auto"==la.container.style.overflow&&(la.container.style.cursor="move");this.updateCurrentState(ya)},mouseMove:function(sa,ya){if(la.isMouseDown)null!=this.currentLink&&(sa=Math.abs(this.startX-ya.getGraphX()),ya=Math.abs(this.startY-ya.getGraphY()),(sa>fa||ya>fa)&&this.clear());else{for(sa=ya.getSource();null!=sa&&"a"!=sa.nodeName.toLowerCase();)sa=sa.parentNode;null!=sa?this.clear():(null!=la.tooltipHandler&&null!=this.currentLink&&null!= -this.currentState&&la.tooltipHandler.reset(ya,!0,this.currentState),(null==this.currentState||ya.getState()!=this.currentState&&null!=ya.sourceState||!la.intersects(this.currentState,ya.getGraphX(),ya.getGraphY()))&&this.updateCurrentState(ya))}},mouseUp:function(sa,ya){var Fa=ya.getSource();for(sa=ya.getEvent();null!=Fa&&"a"!=Fa.nodeName.toLowerCase();)Fa=Fa.parentNode;null==Fa&&Math.abs(this.scrollLeft-la.container.scrollLeft)<fa&&Math.abs(this.scrollTop-la.container.scrollTop)<fa&&(null==ya.sourceState|| -!ya.isSource(ya.sourceState.control))&&((mxEvent.isLeftMouseButton(sa)||mxEvent.isMiddleMouseButton(sa))&&!mxEvent.isPopupTrigger(sa)||mxEvent.isTouchEvent(sa))&&(null!=this.currentLink?(Fa=la.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Fa||null==M||M(sa,this.currentLink),mxEvent.isConsumed(sa)||(sa=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(sa)?"_blank":Fa?la.linkTarget:"_top",la.openLink(this.currentLink,sa),ya.consume())):null!=N&&!ya.isConsumed()&& -Math.abs(this.scrollLeft-la.container.scrollLeft)<fa&&Math.abs(this.scrollTop-la.container.scrollTop)<fa&&Math.abs(this.startX-ya.getGraphX())<fa&&Math.abs(this.startY-ya.getGraphY())<fa&&N(ya.getEvent()));this.clear()},activate:function(sa){this.currentLink=la.getAbsoluteUrl(la.getLinkForCell(sa.cell));null!=this.currentLink&&(this.currentTarget=la.getLinkTargetForCell(sa.cell),la.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(sa))},clear:function(){null!=la.container&& -(la.container.style.cursor=X);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=la.tooltipHandler&&la.tooltipHandler.hide()}};la.click=function(sa){};la.addMouseListener(xa);mxEvent.addListener(document,"mouseleave",function(sa){xa.clear()})};Graph.prototype.duplicateCells=function(y,M){y=null!=y?y:this.getSelectionCells();M=null!=M?M:!0;for(var N=0;N<y.length;N++)this.isTableCell(y[N])&&(y[N]=this.model.getParent(y[N]));y=this.model.getTopmostCells(y); -var S=this.getModel(),X=this.gridSize,fa=[];S.beginUpdate();try{var la={},xa=this.createCellLookup(y),sa=this.cloneCells(y,!1,la,!0);for(N=0;N<y.length;N++){var ya=S.getParent(y[N]);if(null!=ya){var Fa=this.moveCells([sa[N]],X,X,!1)[0];fa.push(Fa);if(M)S.add(ya,sa[N]);else{var wa=ya.getIndex(y[N]);S.add(ya,sa[N],wa+1)}if(this.isTable(ya)){var ua=this.getCellGeometry(sa[N]),La=this.getCellGeometry(ya);null!=ua&&null!=La&&(La=La.clone(),La.height+=ua.height,S.setGeometry(ya,La))}}else fa.push(sa[N])}this.updateCustomLinks(this.createCellMapping(la, -xa),sa,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",sa))}finally{S.endUpdate()}return fa};Graph.prototype.insertImage=function(y,M,N){if(null!=y&&null!=this.cellEditor.textarea){for(var S=this.cellEditor.textarea.getElementsByTagName("img"),X=[],fa=0;fa<S.length;fa++)X.push(S[fa]);document.execCommand("insertimage",!1,y);y=this.cellEditor.textarea.getElementsByTagName("img");if(y.length==X.length+1)for(fa=y.length-1;0<=fa;fa--)if(0==fa||y[fa]!=X[fa-1]){y[fa].setAttribute("width", -M);y[fa].setAttribute("height",N);break}}};Graph.prototype.insertLink=function(y){if(null!=this.cellEditor.textarea)if(0==y.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var M=this.cellEditor.textarea.getElementsByTagName("a"),N=[],S=0;S<M.length;S++)N.push(M[S]);document.execCommand("createlink",!1,mxUtils.trim(y));M=this.cellEditor.textarea.getElementsByTagName("a");if(M.length==N.length+1)for(S=M.length-1;0<=S;S--)if(M[S]!=N[S-1]){for(M=M[S].getElementsByTagName("a");0<M.length;){for(N= -M[0].parentNode;null!=M[0].firstChild;)N.insertBefore(M[0].firstChild,M[0]);N.removeChild(M[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(y))};Graph.prototype.isCellResizable=function(y){var M=mxGraph.prototype.isCellResizable.apply(this,arguments),N=this.getCurrentCellStyle(y);return!this.isTableCell(y)&&!this.isTableRow(y)&&(M||"0"!=mxUtils.getValue(N,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==N[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(y,M){null== -M&&(M=this.getSelectionCells());if(null!=M&&1<M.length){for(var N=[],S=null,X=null,fa=0;fa<M.length;fa++)if(this.getModel().isVertex(M[fa])){var la=this.view.getState(M[fa]);if(null!=la){var xa=y?la.getCenterX():la.getCenterY();S=null!=S?Math.max(S,xa):xa;X=null!=X?Math.min(X,xa):xa;N.push(la)}}if(2<N.length){N.sort(function(wa,ua){return y?wa.x-ua.x:wa.y-ua.y});la=this.view.translate;xa=this.view.scale;X=X/xa-(y?la.x:la.y);S=S/xa-(y?la.x:la.y);this.getModel().beginUpdate();try{var sa=(S-X)/(N.length- -1);S=X;for(fa=1;fa<N.length-1;fa++){var ya=this.view.getState(this.model.getParent(N[fa].cell)),Fa=this.getCellGeometry(N[fa].cell);S+=sa;null!=Fa&&null!=ya&&(Fa=Fa.clone(),y?Fa.x=Math.round(S-Fa.width/2)-ya.origin.x:Fa.y=Math.round(S-Fa.height/2)-ya.origin.y,this.getModel().setGeometry(N[fa].cell,Fa))}}finally{this.getModel().endUpdate()}}}return M};Graph.prototype.isCloneEvent=function(y){return mxClient.IS_MAC&&mxEvent.isMetaDown(y)||mxEvent.isControlDown(y)};Graph.prototype.createSvgImageExport= -function(){var y=new mxImageExport;y.getLinkForCellState=mxUtils.bind(this,function(M,N){return this.getLinkForCell(M.cell)});return y};Graph.prototype.parseBackgroundImage=function(y){var M=null;null!=y&&0<y.length&&(y=JSON.parse(y),M=new mxImage(y.src,y.width,y.height));return M};Graph.prototype.getBackgroundImageObject=function(y){return y};Graph.prototype.getSvg=function(y,M,N,S,X,fa,la,xa,sa,ya,Fa,wa,ua,La){var Oa=null;if(null!=La)for(Oa=new mxDictionary,Fa=0;Fa<La.length;Fa++)Oa.put(La[Fa], -!0);if(La=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{M=null!=M?M:1;N=null!=N?N:0;X=null!=X?X:!0;fa=null!=fa?fa:!0;la=null!=la?la:!0;ya=null!=ya?ya:!1;var Ca="page"==ua?this.view.getBackgroundPageBounds():fa&&null==Oa||S||"diagram"==ua?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Ma=this.view.scale;"diagram"==ua&&null!=this.backgroundImage&&(Ca=mxRectangle.fromRectangle(Ca),Ca.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)* -Ma,(this.view.translate.y+this.backgroundImage.y)*Ma,this.backgroundImage.width*Ma,this.backgroundImage.height*Ma)));if(null==Ca)throw Error(mxResources.get("drawingEmpty"));S=M/Ma;ua=X?-.5:0;var Ga=Graph.createSvgNode(ua,ua,Math.max(1,Math.ceil(Ca.width*S)+2*N)+(ya&&0==N?5:0),Math.max(1,Math.ceil(Ca.height*S)+2*N)+(ya&&0==N?5:0),y),Ya=Ga.ownerDocument,db=null!=Ya.createElementNS?Ya.createElementNS(mxConstants.NS_SVG,"g"):Ya.createElement("g");Ga.appendChild(db);var eb=this.createSvgCanvas(db);eb.foOffset= -X?-.5:0;eb.textOffset=X?-.5:0;eb.imageOffset=X?-.5:0;eb.translate(Math.floor(N/M-Ca.x/Ma),Math.floor(N/M-Ca.y/Ma));var cb=document.createElement("div"),ub=eb.getAlternateText;eb.getAlternateText=function(ab,ib,gb,qb,nb,mb,Bb,wb,rb,vb,kb,hb,tb){if(null!=mb&&0<this.state.fontSize)try{mxUtils.isNode(mb)?mb=mb.innerText:(cb.innerHTML=mb,mb=mxUtils.extractTextWithWhitespace(cb.childNodes));for(var Cb=Math.ceil(2*qb/this.state.fontSize),xb=[],zb=0,ob=0;(0==Cb||zb<Cb)&&ob<mb.length;){var yb=mb.charCodeAt(ob); -if(10==yb||13==yb){if(0<zb)break}else xb.push(mb.charAt(ob)),255>yb&&zb++;ob++}xb.length<mb.length&&1<mb.length-xb.length&&(mb=mxUtils.trim(xb.join(""))+"...");return mb}catch(Ab){return ub.apply(this,arguments)}else return ub.apply(this,arguments)};var fb=this.backgroundImage;if(null!=fb){y=Ma/M;var pb=this.view.translate;ua=new mxRectangle((fb.x+pb.x)*y,(fb.y+pb.y)*y,fb.width*y,fb.height*y);mxUtils.intersects(Ca,ua)&&eb.image(fb.x+pb.x,fb.y+pb.y,fb.width,fb.height,fb.src,!0)}eb.scale(S);eb.textEnabled= -la;xa=null!=xa?xa:this.createSvgImageExport();var lb=xa.drawCellState,$a=xa.getLinkForCellState;xa.getLinkForCellState=function(ab,ib){var gb=$a.apply(this,arguments);return null==gb||ab.view.graph.isCustomLink(gb)?null:gb};xa.getLinkTargetForCellState=function(ab,ib){return ab.view.graph.getLinkTargetForCell(ab.cell)};xa.drawCellState=function(ab,ib){for(var gb=ab.view.graph,qb=null!=Oa?Oa.get(ab.cell):gb.isCellSelected(ab.cell),nb=gb.model.getParent(ab.cell);!(fa&&null==Oa||qb)&&null!=nb;)qb=null!= -Oa?Oa.get(nb):gb.isCellSelected(nb),nb=gb.model.getParent(nb);if(fa&&null==Oa||qb)gb.view.redrawEnumerationState(ab),lb.apply(this,arguments),this.doDrawShape(ab.secondLabel,ib)};xa.drawState(this.getView().getState(this.model.root),eb);this.updateSvgLinks(Ga,sa,!0);this.addForeignObjectWarning(eb,Ga);return Ga}finally{La&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(y,M){if("0"!=urlParams["svg-warning"]&&0<M.getElementsByTagName("foreignObject").length){var N= -y.createElement("switch"),S=y.createElement("g");S.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var X=y.createElement("a");X.setAttribute("transform","translate(0,-5)");null==X.setAttributeNS||M.ownerDocument!=document&&null==document.documentMode?(X.setAttribute("xlink:href",Graph.foreignObjectWarningLink),X.setAttribute("target","_blank")):(X.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),X.setAttributeNS(mxConstants.NS_XLINK, -"target","_blank"));y=y.createElement("text");y.setAttribute("text-anchor","middle");y.setAttribute("font-size","10px");y.setAttribute("x","50%");y.setAttribute("y","100%");mxUtils.write(y,Graph.foreignObjectWarningText);N.appendChild(S);X.appendChild(y);N.appendChild(X);M.appendChild(N)}};Graph.prototype.updateSvgLinks=function(y,M,N){y=y.getElementsByTagName("a");for(var S=0;S<y.length;S++)if(null==y[S].getAttribute("target")){var X=y[S].getAttribute("href");null==X&&(X=y[S].getAttribute("xlink:href")); -null!=X&&(null!=M&&/^https?:\/\//.test(X)?y[S].setAttribute("target",M):N&&this.isCustomLink(X)&&y[S].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(y){y=new mxSvgCanvas2D(y);y.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;y.pointerEvents=!0;return y};Graph.prototype.getSelectedElement=function(){var y=null;if(window.getSelection){var M=window.getSelection();M.getRangeAt&&M.rangeCount&&(y=M.getRangeAt(0).commonAncestorContainer)}else document.selection&& -(y=document.selection.createRange().parentElement());return y};Graph.prototype.getSelectedEditingElement=function(){for(var y=this.getSelectedElement();null!=y&&y.nodeType!=mxConstants.NODETYPE_ELEMENT;)y=y.parentNode;null!=y&&y==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(y=this.cellEditor.textarea.firstChild);return y};Graph.prototype.getParentByName=function(y,M,N){for(;null!=y&&y.nodeName!= -M;){if(y==N)return null;y=y.parentNode}return y};Graph.prototype.getParentByNames=function(y,M,N){for(;null!=y&&!(0<=mxUtils.indexOf(M,y.nodeName));){if(y==N)return null;y=y.parentNode}return y};Graph.prototype.selectNode=function(y){var M=null;if(window.getSelection){if(M=window.getSelection(),M.getRangeAt&&M.rangeCount){var N=document.createRange();N.selectNode(y);M.removeAllRanges();M.addRange(N)}}else(M=document.selection)&&"Control"!=M.type&&(y=M.createRange(),y.collapse(!0),N=M.createRange(), -N.setEndPoint("StartToStart",y),N.select())};Graph.prototype.flipEdgePoints=function(y,M,N){var S=this.getCellGeometry(y);if(null!=S){S=S.clone();if(null!=S.points)for(var X=0;X<S.points.length;X++)M?S.points[X].x=N+(N-S.points[X].x):S.points[X].y=N+(N-S.points[X].y);X=function(fa){null!=fa&&(M?fa.x=N+(N-fa.x):fa.y=N+(N-fa.y))};X(S.getTerminalPoint(!0));X(S.getTerminalPoint(!1));this.model.setGeometry(y,S)}};Graph.prototype.flipChildren=function(y,M,N){this.model.beginUpdate();try{for(var S=this.model.getChildCount(y), -X=0;X<S;X++){var fa=this.model.getChildAt(y,X);if(this.model.isEdge(fa))this.flipEdgePoints(fa,M,N);else{var la=this.getCellGeometry(fa);null!=la&&(la=la.clone(),M?la.x=N+(N-la.x-la.width):la.y=N+(N-la.y-la.height),this.model.setGeometry(fa,la))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(y,M){this.model.beginUpdate();try{y=this.model.getTopmostCells(y);for(var N=[],S=0;S<y.length;S++)if(this.model.isEdge(y[S])){var X=this.view.getState(y[S]);null!=X&&this.flipEdgePoints(y[S], -M,(M?X.getCenterX():X.getCenterY())/this.view.scale-(M?X.origin.x:X.origin.y)-(M?this.view.translate.x:this.view.translate.y))}else{var fa=this.getCellGeometry(y[S]);null!=fa&&this.flipChildren(y[S],M,M?fa.getCenterX()-fa.x:fa.getCenterY()-fa.y);N.push(y[S])}this.toggleCellStyles(M?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,N)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(y,M){var N=null;if(null!=y&&0<y.length){this.model.beginUpdate();try{for(var S=0;S<y.length;S++){var X= -this.model.getParent(y[S]);if(this.isTable(X)){var fa=this.getCellGeometry(y[S]),la=this.getCellGeometry(X);null!=fa&&null!=la&&(la=la.clone(),la.height-=fa.height,this.model.setGeometry(X,la))}}var xa=this.selectParentAfterDelete?this.model.getParents(y):null;this.removeCells(y,M)}finally{this.model.endUpdate()}if(null!=xa)for(N=[],S=0;S<xa.length;S++)this.model.contains(xa[S])&&(this.model.isVertex(xa[S])||this.model.isEdge(xa[S]))&&N.push(xa[S])}return N};Graph.prototype.insertTableColumn=function(y, -M){var N=this.getModel();N.beginUpdate();try{var S=y,X=0;if(this.isTableCell(y)){var fa=N.getParent(y);S=N.getParent(fa);X=mxUtils.indexOf(N.getChildCells(fa,!0),y)}else this.isTableRow(y)?S=N.getParent(y):y=N.getChildCells(S,!0)[0],M||(X=N.getChildCells(y,!0).length-1);var la=N.getChildCells(S,!0),xa=Graph.minTableColumnWidth;for(y=0;y<la.length;y++){var sa=N.getChildCells(la[y],!0)[X],ya=N.cloneCell(sa,!1),Fa=this.getCellGeometry(ya);ya.value=null;ya.style=mxUtils.setStyle(mxUtils.setStyle(ya.style, -"rowspan",null),"colspan",null);if(null!=Fa){null!=Fa.alternateBounds&&(Fa.width=Fa.alternateBounds.width,Fa.height=Fa.alternateBounds.height,Fa.alternateBounds=null);xa=Fa.width;var wa=this.getCellGeometry(la[y]);null!=wa&&(Fa.height=wa.height)}N.add(la[y],ya,X+(M?0:1))}var ua=this.getCellGeometry(S);null!=ua&&(ua=ua.clone(),ua.width+=xa,N.setGeometry(S,ua))}finally{N.endUpdate()}};Graph.prototype.deleteLane=function(y){var M=this.getModel();M.beginUpdate();try{var N=null;N="stackLayout"==this.getCurrentCellStyle(y).childLayout? -y:M.getParent(y);var S=M.getChildCells(N,!0);0==S.length?M.remove(N):(N==y&&(y=S[S.length-1]),M.remove(y))}finally{M.endUpdate()}};Graph.prototype.insertLane=function(y,M){var N=this.getModel();N.beginUpdate();try{var S=null;if("stackLayout"==this.getCurrentCellStyle(y).childLayout){S=y;var X=N.getChildCells(S,!0);y=X[M?0:X.length-1]}else S=N.getParent(y);var fa=S.getIndex(y);y=N.cloneCell(y,!1);y.value=null;N.add(S,y,fa+(M?0:1))}finally{N.endUpdate()}};Graph.prototype.insertTableRow=function(y,M){var N= -this.getModel();N.beginUpdate();try{var S=y,X=y;if(this.isTableCell(y))X=N.getParent(y),S=N.getParent(X);else if(this.isTableRow(y))S=N.getParent(y);else{var fa=N.getChildCells(S,!0);X=fa[M?0:fa.length-1]}var la=N.getChildCells(X,!0),xa=S.getIndex(X);X=N.cloneCell(X,!1);X.value=null;var sa=this.getCellGeometry(X);if(null!=sa){for(fa=0;fa<la.length;fa++){y=N.cloneCell(la[fa],!1);y.value=null;y.style=mxUtils.setStyle(mxUtils.setStyle(y.style,"rowspan",null),"colspan",null);var ya=this.getCellGeometry(y); -null!=ya&&(null!=ya.alternateBounds&&(ya.width=ya.alternateBounds.width,ya.height=ya.alternateBounds.height,ya.alternateBounds=null),ya.height=sa.height);X.insert(y)}N.add(S,X,xa+(M?0:1));var Fa=this.getCellGeometry(S);null!=Fa&&(Fa=Fa.clone(),Fa.height+=sa.height,N.setGeometry(S,Fa))}}finally{N.endUpdate()}};Graph.prototype.deleteTableColumn=function(y){var M=this.getModel();M.beginUpdate();try{var N=y,S=y;this.isTableCell(y)&&(S=M.getParent(y));this.isTableRow(S)&&(N=M.getParent(S));var X=M.getChildCells(N, -!0);if(0==X.length)M.remove(N);else{this.isTableRow(S)||(S=X[0]);var fa=M.getChildCells(S,!0);if(1>=fa.length)M.remove(N);else{var la=fa.length-1;this.isTableCell(y)&&(la=mxUtils.indexOf(fa,y));for(S=y=0;S<X.length;S++){var xa=M.getChildCells(X[S],!0)[la];M.remove(xa);var sa=this.getCellGeometry(xa);null!=sa&&(y=Math.max(y,sa.width))}var ya=this.getCellGeometry(N);null!=ya&&(ya=ya.clone(),ya.width-=y,M.setGeometry(N,ya))}}}finally{M.endUpdate()}};Graph.prototype.deleteTableRow=function(y){var M=this.getModel(); -M.beginUpdate();try{var N=y,S=y;this.isTableCell(y)&&(y=S=M.getParent(y));this.isTableRow(y)&&(N=M.getParent(S));var X=M.getChildCells(N,!0);if(1>=X.length)M.remove(N);else{this.isTableRow(S)||(S=X[X.length-1]);M.remove(S);y=0;var fa=this.getCellGeometry(S);null!=fa&&(y=fa.height);var la=this.getCellGeometry(N);null!=la&&(la=la.clone(),la.height-=y,M.setGeometry(N,la))}}finally{M.endUpdate()}};Graph.prototype.insertRow=function(y,M){for(var N=y.tBodies[0],S=N.rows[0].cells,X=y=0;X<S.length;X++){var fa= -S[X].getAttribute("colspan");y+=null!=fa?parseInt(fa):1}M=N.insertRow(M);for(X=0;X<y;X++)mxUtils.br(M.insertCell(-1));return M.cells[0]};Graph.prototype.deleteRow=function(y,M){y.tBodies[0].deleteRow(M)};Graph.prototype.insertColumn=function(y,M){var N=y.tHead;if(null!=N)for(var S=0;S<N.rows.length;S++){var X=document.createElement("th");N.rows[S].appendChild(X);mxUtils.br(X)}y=y.tBodies[0];for(N=0;N<y.rows.length;N++)S=y.rows[N].insertCell(M),mxUtils.br(S);return y.rows[0].cells[0<=M?M:y.rows[0].cells.length- -1]};Graph.prototype.deleteColumn=function(y,M){if(0<=M){y=y.tBodies[0].rows;for(var N=0;N<y.length;N++)y[N].cells.length>M&&y[N].deleteCell(M)}};Graph.prototype.pasteHtmlAtCaret=function(y){if(window.getSelection){var M=window.getSelection();if(M.getRangeAt&&M.rangeCount){M=M.getRangeAt(0);M.deleteContents();var N=document.createElement("div");N.innerHTML=y;y=document.createDocumentFragment();for(var S;S=N.firstChild;)lastNode=y.appendChild(S);M.insertNode(y)}}else(M=document.selection)&&"Control"!= -M.type&&M.createRange().pasteHTML(y)};Graph.prototype.createLinkForHint=function(y,M){function N(X,fa){X.length>fa&&(X=X.substring(0,Math.round(fa/2))+"..."+X.substring(X.length-Math.round(fa/4)));return X}y=null!=y?y:"javascript:void(0);";if(null==M||0==M.length)M=this.isCustomLink(y)?this.getLinkTitle(y):y;var S=document.createElement("a");S.setAttribute("rel",this.linkRelation);S.setAttribute("href",this.getAbsoluteUrl(y));S.setAttribute("title",N(this.isCustomLink(y)?this.getLinkTitle(y):y,80)); -null!=this.linkTarget&&S.setAttribute("target",this.linkTarget);mxUtils.write(S,N(M,40));this.isCustomLink(y)&&mxEvent.addListener(S,"click",mxUtils.bind(this,function(X){this.customLinkClicked(y);mxEvent.consume(X)}));return S};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(fa,la){this.popupMenuHandler.hideMenu()});var y=this.updateMouseEvent;this.updateMouseEvent= -function(fa){fa=y.apply(this,arguments);if(mxEvent.isTouchEvent(fa.getEvent())&&null==fa.getState()){var la=this.getCellAt(fa.graphX,fa.graphY);null!=la&&this.isSwimlane(la)&&this.hitsSwimlaneContent(la,fa.graphX,fa.graphY)||(fa.state=this.view.getState(la),null!=fa.state&&null!=fa.state.shape&&(this.container.style.cursor=fa.state.shape.node.style.cursor))}null==fa.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return fa};var M=!1,N=!1,S=!1,X=this.fireMouseEvent;this.fireMouseEvent= -function(fa,la,xa){fa==mxEvent.MOUSE_DOWN&&(la=this.updateMouseEvent(la),M=this.isCellSelected(la.getCell()),N=this.isSelectionEmpty(),S=this.popupMenuHandler.isMenuShowing());X.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(fa,la){var xa=mxEvent.isMouseEvent(la.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==la.getState()||!la.isSource(la.getState().control))&&(this.popupMenuHandler.popupTrigger||!S&&!xa&&(N&&null==la.getCell()&& -this.isSelectionEmpty()||M&&this.isCellSelected(la.getCell())));xa=!M||xa?null:mxUtils.bind(this,function(sa){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ya=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(la.getX()+ya.x+1,la.getY()+ya.y+1,sa,la.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[fa,la,xa])})};mxCellEditor.prototype.isContentEditing=function(){var y=this.graph.view.getState(this.editingCell);return null!=y&&1== -y.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var y="";window.getSelection?y=window.getSelection():document.getSelection?y=document.getSelection():document.selection&&(y=document.selection.createRange().text);return""!=y};mxCellEditor.prototype.insertTab=function(y){var M=this.textarea.ownerDocument.defaultView.getSelection(),N=M.getRangeAt(0), -S="\t";if(null!=y)for(S="";0<y;)S+=" ",y--;y=document.createElement("span");y.style.whiteSpace="pre";y.appendChild(document.createTextNode(S));N.insertNode(y);N.setStartAfter(y);N.setEndAfter(y);M.removeAllRanges();M.addRange(N)};mxCellEditor.prototype.alignText=function(y,M){var N=null!=M&&mxEvent.isShiftDown(M);if(N||null!=window.getSelection&&null!=window.getSelection().containsNode){var S=!0;this.graph.processElements(this.textarea,function(X){N||window.getSelection().containsNode(X,!0)?(X.removeAttribute("align"), -X.style.textAlign=null):S=!1});S&&this.graph.cellEditor.setAlign(y)}document.execCommand("justify"+y.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var y=window.getSelection();if(y.getRangeAt&&y.rangeCount){for(var M=[],N=0,S=y.rangeCount;N<S;++N)M.push(y.getRangeAt(N));return M}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(y){try{if(y)if(window.getSelection){sel= -window.getSelection();sel.removeAllRanges();for(var M=0,N=y.length;M<N;++M)sel.addRange(y[M])}else document.selection&&y.select&&y.select()}catch(S){}};var u=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(y){null!=y.text&&(y.text.replaceLinefeeds="0"!=mxUtils.getValue(y.style,"nl2Br","1"));u.apply(this,arguments)};var H=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(y,M){this.isKeepFocusEvent(y)||!mxEvent.isAltDown(y.getEvent())? -H.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(y){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var J=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(y,M){y=this.graph.getStartEditingCell(y,M);J.apply(this,arguments);var N=this.graph.view.getState(y);this.textarea.className=null!=N&&1==N.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor"; -this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(y);N=this.graph.getModel().getParent(y);var S=this.graph.getCellGeometry(y);if(this.graph.getModel().isEdge(N)&&null!=S&&S.relative||this.graph.getModel().isEdge(y))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var D=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(y){function M(X,fa){fa.originalNode=X;X=X.firstChild; -for(var la=fa.firstChild;null!=X&&null!=la;)M(X,la),X=X.nextSibling,la=la.nextSibling;return fa}function N(X,fa){if(null!=X)if(fa.originalNode!=X)S(X);else for(X=X.firstChild,fa=fa.firstChild;null!=X;){var la=X.nextSibling;null==fa?S(X):(N(X,fa),fa=fa.nextSibling);X=la}}function S(X){for(var fa=X.firstChild;null!=fa;){var la=fa.nextSibling;S(fa);fa=la}1==X.nodeType&&("BR"===X.nodeName||null!=X.firstChild)||3==X.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(X)).length?(3==X.nodeType&&mxUtils.setTextContent(X, -mxUtils.getTextContent(X).replace(/\n|\r/g,"")),1==X.nodeType&&(X.removeAttribute("style"),X.removeAttribute("class"),X.removeAttribute("width"),X.removeAttribute("cellpadding"),X.removeAttribute("cellspacing"),X.removeAttribute("border"))):X.parentNode.removeChild(X)}D.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(X){var fa=M(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this, -function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?N(this.textarea,fa):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var y=this.graph.view.getState(this.editingCell);if(null!=y){var M=null!=y&&"0"!=mxUtils.getValue(y.style,"nl2Br","1"),N=this.saveSelection();if(this.codeViewMode){xa=mxUtils.extractTextWithWhitespace(this.textarea.childNodes); -0<xa.length&&"\n"==xa.charAt(xa.length-1)&&(xa=xa.substring(0,xa.length-1));xa=this.graph.sanitizeHtml(M?xa.replace(/\n/g,"<br/>"):xa,!0);this.textarea.className="mxCellEditor geContentEditable";sa=mxUtils.getValue(y.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);M=mxUtils.getValue(y.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var S=mxUtils.getValue(y.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),X=(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE, -0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,fa=(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,la=[];(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&la.push("underline");(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&la.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT? -Math.round(sa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(sa)+"px";this.textarea.style.textDecoration=la.join(" ");this.textarea.style.fontWeight=X?"bold":"normal";this.textarea.style.fontStyle=fa?"italic":"";this.textarea.style.fontFamily=M;this.textarea.style.textAlign=S;this.textarea.style.padding="0px";this.textarea.innerHTML!=xa&&(this.textarea.innerHTML=xa,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange= -0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");var xa=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(xa=mxUtils.replaceTrailingNewlines(xa,"<div><br></div>"));xa=this.graph.sanitizeHtml(M?xa.replace(/\n/g,"").replace(/<br\s*.?>/g,"<br>"):xa,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var sa=mxConstants.DEFAULT_FONTSIZE; -this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(sa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(sa)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=xa&&(this.textarea.innerHTML= -xa);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=N;this.resize()}};var G=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(y,M){if(null!=this.textarea)if(y=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=y){var N=y.view.scale;this.bounds=mxRectangle.fromRectangle(y);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*N;this.bounds.height= -60*N;var S=null!=y.text?y.text.margin:null;null==S&&(S=mxUtils.getAlignmentAsPoint(mxUtils.getValue(y.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(y.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=S.x*this.bounds.width;this.bounds.y+=S.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/N)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/N)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight< -this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/N)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*N);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/N)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*N);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top= -Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+N+","+N+")")}else this.textarea.style.height="",this.textarea.style.overflow="",G.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(y,M){if("0"==mxUtils.getValue(y.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var N=this.graph.getEditingValue(y.cell,M);"1"==mxUtils.getValue(y.style,"nl2Br", -"1")&&(N=N.replace(/\n/g,"<br/>"));return N=this.graph.sanitizeHtml(N,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(y){if("0"==mxUtils.getValue(y.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var M=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return M="1"==mxUtils.getValue(y.style,"nl2Br","1")?M.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):M.replace(/\r\n/g,"").replace(/\n/g,"")};var V= -mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(y){this.codeViewMode&&this.toggleViewMode();V.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(y){}};var U=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(y,M){this.graph.getModel().beginUpdate();try{U.apply(this,arguments),""==M&&this.graph.isCellDeletable(y.cell)&&0==this.graph.model.getChildCount(y.cell)&& -this.graph.isTransparentState(y)&&this.graph.removeCells([y.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(y){var M=mxUtils.getValue(y.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=M&&M!=mxConstants.NONE||!(null!=y.cell.geometry&&0<y.cell.geometry.width)||0==mxUtils.getValue(y.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(y.style,mxConstants.STYLE_HORIZONTAL,1)||(M=mxUtils.getValue(y.style,mxConstants.STYLE_FILLCOLOR, -null));M==mxConstants.NONE&&(M=null);return M};mxCellEditor.prototype.getBorderColor=function(y){var M=mxUtils.getValue(y.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);null!=M&&M!=mxConstants.NONE||!(null!=y.cell.geometry&&0<y.cell.geometry.width)||0==mxUtils.getValue(y.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(y.style,mxConstants.STYLE_HORIZONTAL,1)||(M=mxUtils.getValue(y.style,mxConstants.STYLE_STROKECOLOR,null));M==mxConstants.NONE&&(M=null);return M};mxCellEditor.prototype.getMinimumSize= -function(y){var M=this.graph.getView().scale;return new mxRectangle(0,0,null==y.text?30:y.text.size*M+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(y,M){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(M.getEvent)};mxGraphView.prototype.formatUnitText=function(y){return y?e(y,this.unit):y};mxGraphHandler.prototype.updateHint=function(y){if(null!=this.pBounds&&(null!=this.shape|| -this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var M=this.graph.view.translate,N=this.graph.view.scale;y=this.roundLength((this.bounds.x+this.currentDx)/N-M.x);M=this.roundLength((this.bounds.y+this.currentDy)/N-M.y);N=this.graph.view.unit;this.hint.innerHTML=e(y,N)+", "+e(M,N);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+ -Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var Y=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(y,M){Y.apply(this,arguments);var N=this.graph.getCellStyle(y);if(null==N.childLayout){var S=this.graph.model.getParent(y),X=null!=S?this.graph.getCellGeometry(S):null;if(null!=X&&(N=this.graph.getCellStyle(S),"stackLayout"==N.childLayout)){var fa=parseFloat(mxUtils.getValue(N, -"stackBorder",mxStackLayout.prototype.border));N="1"==mxUtils.getValue(N,"horizontalStack","1");var la=this.graph.getActualStartSize(S);X=X.clone();N?X.height=M.height+la.y+la.height+2*fa:X.width=M.width+la.x+la.width+2*fa;this.graph.model.setGeometry(S,X)}}};var O=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function y(xa){N.get(xa)||(N.put(xa,!0),X.push(xa))}for(var M=O.apply(this,arguments),N=new mxDictionary,S= -this.graph.model,X=[],fa=0;fa<M.length;fa++){var la=M[fa];this.graph.isTableCell(la)?y(S.getParent(S.getParent(la))):this.graph.isTableRow(la)&&y(S.getParent(la));y(la)}return X};var qa=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(y){var M=qa.apply(this,arguments);M.stroke="#C0C0C0";M.strokewidth=1;return M};var oa=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(y){var M= -oa.apply(this,arguments);M.stroke="#C0C0C0";M.strokewidth=1;return M};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var y=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+y.x/2,this.bounds.y+this.rotationHandleVSpacing-y.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(y,M){return this.graph.isRecursiveVertexResize(y)&&!mxEvent.isAltDown(M.getEvent())};mxVertexHandler.prototype.isCenteredEvent= -function(y,M){return mxEvent.isControlDown(M.getEvent())||mxEvent.isMetaDown(M.getEvent())};var aa=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return aa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))): -this.bounds};var da=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return da.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var ia=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(y){return y.tableHandle||ia.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset= -function(){var y=0;this.graph.isTableRow(this.state.cell)?y=1:this.graph.isTableCell(this.state.cell)&&(y=2);return y};var L=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return L.apply(this,arguments).grow(-this.getSelectionBorderInset())};var Z=null,P=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==Z&&(Z=mxCellRenderer.defaultShapes.tableLine);var y=P.apply(this,arguments); -if(this.graph.isTable(this.state.cell)){var M=function(Oa,Ca,Ma){for(var Ga=[],Ya=0;Ya<Oa.length;Ya++){var db=Oa[Ya];Ga.push(null==db?null:new mxPoint((sa+db.x+Ca)*fa,(ya+db.y+Ma)*fa))}return Ga},N=this,S=this.graph,X=S.model,fa=S.view.scale,la=this.state,xa=this.selectionBorder,sa=this.state.origin.x+S.view.translate.x,ya=this.state.origin.y+S.view.translate.y;null==y&&(y=[]);var Fa=S.view.getCellStates(X.getChildCells(this.state.cell,!0));if(0<Fa.length){var wa=X.getChildCells(Fa[0].cell,!0),ua= -S.getTableLines(this.state.cell,!1,!0),La=S.getTableLines(this.state.cell,!0,!1);for(X=0;X<Fa.length;X++)mxUtils.bind(this,function(Oa){var Ca=Fa[Oa],Ma=Oa<Fa.length-1?Fa[Oa+1]:null;Ma=null!=Ma?S.getCellGeometry(Ma.cell):null;var Ga=null!=Ma&&null!=Ma.alternateBounds?Ma.alternateBounds:Ma;Ma=null!=La[Oa]?new Z(La[Oa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Ma.isDashed=xa.isDashed;Ma.svgStrokeTolerance++;Ca=new mxHandle(Ca,"row-resize",null,Ma);Ca.tableHandle=!0;var Ya= -0;Ca.shape.node.parentNode.insertBefore(Ca.shape.node,Ca.shape.node.parentNode.firstChild);Ca.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Ya?mxConstants.NONE:xa.stroke;if(this.shape.constructor==Z)this.shape.line=M(La[Oa],0,Ya),this.shape.updateBoundsFromLine();else{var eb=S.getActualStartSize(la.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Ya*fa;this.shape.bounds.x=la.x+(Oa==Fa.length-1?0:eb.x*fa);this.shape.bounds.width=la.width-(Oa==Fa.length- -1?0:eb.width+eb.x+fa)}this.shape.redraw()}};var db=!1;Ca.setPosition=function(eb,cb,ub){Ya=Math.max(Graph.minTableRowHeight-eb.height,cb.y-eb.y-eb.height);db=mxEvent.isShiftDown(ub.getEvent());null!=Ga&&db&&(Ya=Math.min(Ya,Ga.height-Graph.minTableRowHeight))};Ca.execute=function(eb){if(0!=Ya)S.setTableRowHeight(this.state.cell,Ya,!db);else if(!N.blockDelayedSelection){var cb=S.getCellAt(eb.getGraphX(),eb.getGraphY())||la.cell;S.graphHandler.selectCellForEvent(cb,eb)}Ya=0};Ca.reset=function(){Ya=0}; -y.push(Ca)})(X);for(X=0;X<wa.length;X++)mxUtils.bind(this,function(Oa){var Ca=S.view.getState(wa[Oa]),Ma=S.getCellGeometry(wa[Oa]),Ga=null!=Ma.alternateBounds?Ma.alternateBounds:Ma;null==Ca&&(Ca=new mxCellState(S.view,wa[Oa],S.getCellStyle(wa[Oa])),Ca.x=la.x+Ma.x*fa,Ca.y=la.y+Ma.y*fa,Ca.width=Ga.width*fa,Ca.height=Ga.height*fa,Ca.updateCachedBounds());Ma=Oa<wa.length-1?wa[Oa+1]:null;Ma=null!=Ma?S.getCellGeometry(Ma):null;var Ya=null!=Ma&&null!=Ma.alternateBounds?Ma.alternateBounds:Ma;Ma=null!=ua[Oa]? -new Z(ua[Oa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Ma.isDashed=xa.isDashed;Ma.svgStrokeTolerance++;Ca=new mxHandle(Ca,"col-resize",null,Ma);Ca.tableHandle=!0;var db=0;Ca.shape.node.parentNode.insertBefore(Ca.shape.node,Ca.shape.node.parentNode.firstChild);Ca.redraw=function(){if(null!=this.shape){this.shape.stroke=0==db?mxConstants.NONE:xa.stroke;if(this.shape.constructor==Z)this.shape.line=M(ua[Oa],db,0),this.shape.updateBoundsFromLine();else{var cb=S.getActualStartSize(la.cell, -!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Ga.width+db)*fa;this.shape.bounds.y=la.y+(Oa==wa.length-1?0:cb.y*fa);this.shape.bounds.height=la.height-(Oa==wa.length-1?0:(cb.height+cb.y)*fa)}this.shape.redraw()}};var eb=!1;Ca.setPosition=function(cb,ub,fb){db=Math.max(Graph.minTableColumnWidth-Ga.width,ub.x-cb.x-Ga.width);eb=mxEvent.isShiftDown(fb.getEvent());null==Ya||eb||(db=Math.min(db,Ya.width-Graph.minTableColumnWidth))};Ca.execute=function(cb){if(0!=db)S.setTableColumnWidth(this.state.cell, -db,eb);else if(!N.blockDelayedSelection){var ub=S.getCellAt(cb.getGraphX(),cb.getGraphY())||la.cell;S.graphHandler.selectCellForEvent(ub,cb)}db=0};Ca.positionChanged=function(){};Ca.reset=function(){db=0};y.push(Ca)})(X)}}return null!=y?y.reverse():null};var ca=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(y){ca.apply(this,arguments);if(null!=this.moveHandles)for(var M=0;M<this.moveHandles.length;M++)this.moveHandles[M].style.visibility=y?"":"hidden"; -if(null!=this.cornerHandles)for(M=0;M<this.cornerHandles.length;M++)this.cornerHandles[M].node.style.visibility=y?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var y=this.graph.model;if(null!=this.moveHandles){for(var M=0;M<this.moveHandles.length;M++)this.moveHandles[M].parentNode.removeChild(this.moveHandles[M]);this.moveHandles=null}this.moveHandles=[];for(M=0;M<y.getChildCount(this.state.cell);M++)mxUtils.bind(this,function(N){if(null!=N&&y.isVertex(N.cell)){var S=mxUtils.createImage(Editor.rowMoveImage); -S.style.position="absolute";S.style.cursor="pointer";S.style.width="7px";S.style.height="4px";S.style.padding="4px 2px 4px 2px";S.rowState=N;mxEvent.addGestureListeners(S,mxUtils.bind(this,function(X){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(X)&&this.graph.isCellSelected(N.cell)||this.graph.selectCellForEvent(N.cell,X);mxEvent.isPopupTrigger(X)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(X),mxEvent.getClientY(X),this.graph.getSelectionCells()), -this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(X),this.graph.isMouseDown=!0);mxEvent.consume(X)}),null,mxUtils.bind(this,function(X){mxEvent.isPopupTrigger(X)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(X),mxEvent.getClientY(X),N.cell,X),mxEvent.consume(X))}));this.moveHandles.push(S);this.graph.container.appendChild(S)}})(this.graph.view.getState(y.getChildAt(this.state.cell,M)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var y= -0;y<this.customHandles.length;y++)this.customHandles[y].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var ja=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var y=new mxPoint(0,0),M=this.tolerance,N=this.state.style.shape;null==mxCellRenderer.defaultShapes[N]&&mxStencilRegistry.getStencil(N);N=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell; -if(!N&&null!=this.customHandles)for(var S=0;S<this.customHandles.length;S++)if(null!=this.customHandles[S].shape&&null!=this.customHandles[S].shape.bounds){var X=this.customHandles[S].shape.bounds,fa=X.getCenterX(),la=X.getCenterY();if(Math.abs(this.state.x-fa)<X.width/2||Math.abs(this.state.y-la)<X.height/2||Math.abs(this.state.x+this.state.width-fa)<X.width/2||Math.abs(this.state.y+this.state.height-la)<X.height/2){N=!0;break}}N&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(M/= -2,this.graph.isTable(this.state.cell)&&(M+=7),y.x=this.sizers[0].bounds.width+M,y.y=this.sizers[0].bounds.height+M):y=ja.apply(this,arguments);return y};mxVertexHandler.prototype.updateHint=function(y){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"°";else{y=this.state.view.scale;var M=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/ -y),M)+" x "+e(this.roundLength(this.bounds.height/y),M)}y=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==y&&(y=this.bounds);this.hint.style.left=y.x+Math.round((y.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=y.y+y.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments); -null!=this.linkHint&&(this.linkHint.style.display="")};var ka=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(y,M){ka.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var q=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(y,M){q.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display= -"")};mxEdgeHandler.prototype.updateHint=function(y,M){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var N=this.graph.view.translate,S=this.graph.view.scale,X=this.roundLength(M.x/S-N.x);N=this.roundLength(M.y/S-N.y);S=this.graph.view.unit;this.hint.innerHTML=e(X,S)+", "+e(N,S);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(X=this.constraintHandler.currentConstraint.point, -this.hint.innerHTML="["+Math.round(100*X.x)+"%, "+Math.round(100*X.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(y.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(y.getGraphY(),M.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>'); +!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(z){return!mxEvent.isAltDown(z)};var k=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(z){return k.apply(this,arguments)||this.graph.isTableRow(z)||this.graph.isTableCell(z)};var m=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(z){return m.apply(this,arguments)|| +this.graph.isEdgeIgnored(z)};var C=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(z){return this.graph.isCloneEvent(z)!=C.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var z=new mxEllipse(null,this.highlightColor,this.highlightColor,0);z.opacity=mxConstants.HIGHLIGHT_OPACITY;return z};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState= +function(z){z=this.graph.createCurrentEdgeStyle();z=this.graph.createEdge(null,null,null,null,null,z);z=new mxCellState(this.graph.view,z,this.graph.getCellStyle(z));for(var L in this.graph.currentEdgeStyle)z.style[L]=this.graph.currentEdgeStyle[L];z.style=this.graph.postProcessCellStyle(z.cell,z.style);return z};var p=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var z=p.apply(this,arguments);z.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED]; +return z};mxConnectionHandler.prototype.updatePreview=function(z){};var F=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var z=F.apply(this,arguments),L=z.getCell;z.getCell=mxUtils.bind(this,function(O){var V=L.apply(this,arguments);this.error=null;return V});return z};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle= +function(){for(var z="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",L="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),O=0;O<L.length;O++)null!=this.currentEdgeStyle[L[O]]&&(z+=L[O]+"="+this.currentEdgeStyle[L[O]]+";");null!=this.currentEdgeStyle.orthogonalLoop?z+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&& +(z+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?z+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(z+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(z+="elbow="+this.currentEdgeStyle.elbow+";");return z=null!=this.currentEdgeStyle.html?z+("html="+this.currentEdgeStyle.html+";"):z+"html=1;"}; +Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var z=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=z&&(new mxCodec(z.ownerDocument)).decode(z,this.getStylesheet())};Graph.prototype.createCellLookup=function(z,L){L=null!=L?L:{};for(var O=0;O<z.length;O++){var V=z[O];L[mxObjectIdentity.get(V)]=V.getId();for(var U=this.model.getChildCount(V), +ha=0;ha<U;ha++)this.createCellLookup([this.model.getChildAt(V,ha)],L)}return L};Graph.prototype.createCellMapping=function(z,L,O){O=null!=O?O:{};for(var V in z){var U=L[V];null==O[U]&&(O[U]=z[V].getId()||"")}return O};Graph.prototype.importGraphModel=function(z,L,O,V){L=null!=L?L:0;O=null!=O?O:0;var U=new mxCodec(z.ownerDocument),ha=new mxGraphModel;U.decode(z,ha);z=[];U={};var ma={},wa=ha.getChildren(this.cloneCell(ha.root,this.isCloneInvalidEdges(),U));if(null!=wa){var sa=this.createCellLookup([ha.root]); +wa=wa.slice();this.model.beginUpdate();try{if(1!=wa.length||this.isCellLocked(this.getDefaultParent()))for(ha=0;ha<wa.length;ha++)ya=this.model.getChildren(this.moveCells([wa[ha]],L,O,!1,this.model.getRoot())[0]),null!=ya&&(z=z.concat(ya));else{var ya=ha.getChildren(wa[0]);null!=ya&&(z=this.moveCells(ya,L,O,!1,this.getDefaultParent()),ma[ha.getChildAt(ha.root,0).getId()]=this.getDefaultParent().getId())}if(null!=z&&(this.createCellMapping(U,sa,ma),this.updateCustomLinks(ma,z),V)){this.isGridEnabled()&& +(L=this.snap(L),O=this.snap(O));var Ha=this.getBoundingBoxFromGeometry(z,!0);null!=Ha&&this.moveCells(z,L-Ha.x,O-Ha.y)}}finally{this.model.endUpdate()}}return z};Graph.prototype.encodeCells=function(z){for(var L={},O=this.cloneCells(z,null,L),V=new mxDictionary,U=0;U<z.length;U++)V.put(z[U],!0);var ha=new mxCodec,ma=new mxGraphModel,wa=ma.getChildAt(ma.getRoot(),0);for(U=0;U<O.length;U++){ma.add(wa,O[U]);var sa=this.view.getState(z[U]);if(null!=sa){var ya=this.getCellGeometry(O[U]);null!=ya&&ya.relative&& +!this.model.isEdge(z[U])&&null==V.get(this.model.getParent(z[U]))&&(ya.offset=null,ya.relative=!1,ya.x=sa.x/sa.view.scale-sa.view.translate.x,ya.y=sa.y/sa.view.scale-sa.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(L,this.createCellLookup(z)),O);return ha.encode(ma)};Graph.prototype.isSwimlane=function(z,L){var O=null;null==z||this.model.isEdge(z)||this.model.getParent(z)==this.model.getRoot()||(O=this.getCurrentCellStyle(z,L)[mxConstants.STYLE_SHAPE]);return O==mxConstants.SHAPE_SWIMLANE|| +"table"==O||"tableRow"==O};var K=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(z){var L=this.model.getParent(z);if(null!=L){var O=this.getCurrentCellStyle(L);if(null!=O.expand)return"0"!=O.expand}return K.apply(this,arguments)&&(null==L||!this.isTable(L))};var P=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(z,L,O,V,U,ha,ma,wa){null==wa&&(wa=this.model.getParent(z),this.isTable(wa)||this.isTableRow(wa))&&(wa=this.getCellAt(ha,ma,null,!0,!1));O=null;this.model.beginUpdate(); +try{O=P.apply(this,[z,L,O,V,U,ha,ma,wa]);this.model.setValue(O,"");var sa=this.getChildCells(O,!0);for(L=0;L<sa.length;L++){var ya=this.getCellGeometry(sa[L]);null!=ya&&ya.relative&&0<ya.x&&this.model.remove(sa[L])}var Ha=this.getChildCells(z,!0);for(L=0;L<Ha.length;L++)ya=this.getCellGeometry(Ha[L]),null!=ya&&ya.relative&&0>=ya.x&&this.model.remove(Ha[L]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[O]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[O]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING, +null,[z]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[z]);var Qa=this.model.getTerminal(O,!1);if(null!=Qa){var ua=this.getCurrentCellStyle(Qa);null!=ua&&"1"==ua.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[z]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[z]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[O]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[O]))}}finally{this.model.endUpdate()}return O};var d=Graph.prototype.selectCell;Graph.prototype.selectCell= +function(z,L,O){if(L||O)d.apply(this,arguments);else{var V=this.getSelectionCell(),U=null,ha=[],ma=mxUtils.bind(this,function(wa){if(null!=this.view.getState(wa)&&(this.model.isVertex(wa)||this.model.isEdge(wa)))if(ha.push(wa),wa==V)U=ha.length-1;else if(z&&null==V&&0<ha.length||null!=U&&z&&ha.length>U||!z&&0<U)return;for(var sa=0;sa<this.model.getChildCount(wa);sa++)ma(this.model.getChildAt(wa,sa))});ma(this.model.root);0<ha.length&&(U=null!=U?mxUtils.mod(U+(z?1:-1),ha.length):0,this.setSelectionCell(ha[U]))}}; +Graph.prototype.swapShapes=function(z,L,O,V,U,ha,ma){L=!1;if(!V&&null!=U&&1==z.length&&(V=this.view.getState(U),O=this.view.getState(z[0]),null!=V&&null!=O&&(null!=ha&&mxEvent.isShiftDown(ha)||"umlLifeline"==V.style.shape&&"umlLifeline"==O.style.shape)&&(V=this.getCellGeometry(U),ha=this.getCellGeometry(z[0]),null!=V&&null!=ha))){L=V.clone();V=ha.clone();V.x=L.x;V.y=L.y;L.x=ha.x;L.y=ha.y;this.model.beginUpdate();try{this.model.setGeometry(U,L),this.model.setGeometry(z[0],V)}finally{this.model.endUpdate()}L= +!0}return L};var f=Graph.prototype.moveCells;Graph.prototype.moveCells=function(z,L,O,V,U,ha,ma){if(this.swapShapes(z,L,O,V,U,ha,ma))return z;ma=null!=ma?ma:{};if(this.isTable(U)){for(var wa=[],sa=0;sa<z.length;sa++)this.isTable(z[sa])?wa=wa.concat(this.model.getChildCells(z[sa],!0).reverse()):wa.push(z[sa]);z=wa}this.model.beginUpdate();try{wa=[];for(sa=0;sa<z.length;sa++)if(null!=U&&this.isTableRow(z[sa])){var ya=this.model.getParent(z[sa]),Ha=this.getCellGeometry(z[sa]);this.isTable(ya)&&wa.push(ya); +if(null!=ya&&null!=Ha&&this.isTable(ya)&&this.isTable(U)&&(V||ya!=U)){if(!V){var Qa=this.getCellGeometry(ya);null!=Qa&&(Qa=Qa.clone(),Qa.height-=Ha.height,this.model.setGeometry(ya,Qa))}Qa=this.getCellGeometry(U);null!=Qa&&(Qa=Qa.clone(),Qa.height+=Ha.height,this.model.setGeometry(U,Qa));var ua=this.model.getChildCells(U,!0);if(0<ua.length){z[sa]=V?this.cloneCell(z[sa]):z[sa];var za=this.model.getChildCells(z[sa],!0),Fa=this.model.getChildCells(ua[0],!0),Ba=Fa.length-za.length;if(0<Ba)for(var Ea= +0;Ea<Ba;Ea++){var Oa=this.cloneCell(za[za.length-1]);null!=Oa&&(Oa.value="",this.model.add(z[sa],Oa))}else if(0>Ba)for(Ea=0;Ea>Ba;Ea--)this.model.remove(za[za.length+Ea-1]);za=this.model.getChildCells(z[sa],!0);for(Ea=0;Ea<Fa.length;Ea++){var Pa=this.getCellGeometry(Fa[Ea]),bb=this.getCellGeometry(za[Ea]);null!=Pa&&null!=bb&&(bb=bb.clone(),bb.width=Pa.width,this.model.setGeometry(za[Ea],bb))}}}}var eb=f.apply(this,arguments);for(sa=0;sa<wa.length;sa++)!V&&this.model.contains(wa[sa])&&0==this.model.getChildCount(wa[sa])&& +this.model.remove(wa[sa]);V&&this.updateCustomLinks(this.createCellMapping(ma,this.createCellLookup(z)),eb)}finally{this.model.endUpdate()}return eb};var g=Graph.prototype.removeCells;Graph.prototype.removeCells=function(z,L){var O=[];this.model.beginUpdate();try{for(var V=0;V<z.length;V++)if(this.isTableCell(z[V])){var U=this.model.getParent(z[V]),ha=this.model.getParent(U);1==this.model.getChildCount(U)&&1==this.model.getChildCount(ha)?0>mxUtils.indexOf(z,ha)&&0>mxUtils.indexOf(O,ha)&&O.push(ha): +this.labelChanged(z[V],"")}else{if(this.isTableRow(z[V])&&(ha=this.model.getParent(z[V]),0>mxUtils.indexOf(z,ha)&&0>mxUtils.indexOf(O,ha))){for(var ma=this.model.getChildCells(ha,!0),wa=0,sa=0;sa<ma.length;sa++)0<=mxUtils.indexOf(z,ma[sa])&&wa++;wa==ma.length&&O.push(ha)}O.push(z[V])}O=g.apply(this,[O,L])}finally{this.model.endUpdate()}return O};Graph.prototype.updateCustomLinks=function(z,L,O){O=null!=O?O:new Graph;for(var V=0;V<L.length;V++)null!=L[V]&&O.updateCustomLinksForCell(z,L[V],O)};Graph.prototype.updateCustomLinksForCell= +function(z,L){this.doUpdateCustomLinksForCell(z,L);for(var O=this.model.getChildCount(L),V=0;V<O;V++)this.updateCustomLinksForCell(z,this.model.getChildAt(L,V))};Graph.prototype.doUpdateCustomLinksForCell=function(z,L){};Graph.prototype.getAllConnectionConstraints=function(z,L){if(null!=z){L=mxUtils.getValue(z.style,"points",null);if(null!=L){z=[];try{var O=JSON.parse(L);for(L=0;L<O.length;L++){var V=O[L];z.push(new mxConnectionConstraint(new mxPoint(V[0],V[1]),2<V.length?"0"!=V[2]:!0,null,3<V.length? +V[3]:0,4<V.length?V[4]:0))}}catch(ha){}return z}if(null!=z.shape&&null!=z.shape.bounds){V=z.shape.direction;L=z.shape.bounds;var U=z.shape.scale;O=L.width/U;L=L.height/U;if(V==mxConstants.DIRECTION_NORTH||V==mxConstants.DIRECTION_SOUTH)V=O,O=L,L=V;L=z.shape.getConstraints(z.style,O,L);if(null!=L)return L;if(null!=z.shape.stencil&&null!=z.shape.stencil.constraints)return z.shape.stencil.constraints;if(null!=z.shape.constraints)return z.shape.constraints}}return null};Graph.prototype.flipEdge=function(z){if(null!= +z){var L=this.getCurrentCellStyle(z);L=mxUtils.getValue(L,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,L,[z])}};Graph.prototype.isValidRoot=function(z){for(var L=this.model.getChildCount(z),O=0,V=0;V<L;V++){var U=this.model.getChildAt(z,V);this.model.isVertex(U)&&(U=this.getCellGeometry(U),null==U||U.relative||O++)}return 0<O||this.isContainer(z)};Graph.prototype.isValidDropTarget= +function(z,L,O){for(var V=this.getCurrentCellStyle(z),U=!0,ha=!0,ma=0;ma<L.length&&ha;ma++)U=U&&this.isTable(L[ma]),ha=ha&&this.isTableRow(L[ma]);return(1==L.length&&null!=O&&mxEvent.isShiftDown(O)&&!mxEvent.isControlDown(O)&&!mxEvent.isAltDown(O)||("1"!=mxUtils.getValue(V,"part","0")||this.isContainer(z))&&"0"!=mxUtils.getValue(V,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(z))&&!this.isTableRow(z)&&(!this.isTable(z)||ha||U))&&!this.isCellLocked(z)}; +Graph.prototype.createGroupCell=function(){var z=mxGraph.prototype.createGroupCell.apply(this,arguments);z.setStyle("group");return z};Graph.prototype.isExtendParentsOnAdd=function(z){var L=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(L&&null!=z&&null!=this.layoutManager){var O=this.model.getParent(z);null!=O&&(O=this.layoutManager.getLayout(O),null!=O&&O.constructor==mxStackLayout&&(L=!1))}return L};Graph.prototype.getPreferredSizeForCell=function(z){var L=mxGraph.prototype.getPreferredSizeForCell.apply(this, +arguments);null!=L&&(L.width+=10,L.height+=4,this.gridEnabled&&(L.width=this.snap(L.width),L.height=this.snap(L.height)));return L};Graph.prototype.turnShapes=function(z,L){var O=this.getModel(),V=[];O.beginUpdate();try{for(var U=0;U<z.length;U++){var ha=z[U];if(O.isEdge(ha)){var ma=O.getTerminal(ha,!0),wa=O.getTerminal(ha,!1);O.setTerminal(ha,wa,!0);O.setTerminal(ha,ma,!1);var sa=O.getGeometry(ha);if(null!=sa){sa=sa.clone();null!=sa.points&&sa.points.reverse();var ya=sa.getTerminalPoint(!0),Ha=sa.getTerminalPoint(!1); +sa.setTerminalPoint(ya,!1);sa.setTerminalPoint(Ha,!0);O.setGeometry(ha,sa);var Qa=this.view.getState(ha),ua=this.view.getState(ma),za=this.view.getState(wa);if(null!=Qa){var Fa=null!=ua?this.getConnectionConstraint(Qa,ua,!0):null,Ba=null!=za?this.getConnectionConstraint(Qa,za,!1):null;this.setConnectionConstraint(ha,ma,!0,Ba);this.setConnectionConstraint(ha,wa,!1,Fa);var Ea=mxUtils.getValue(Qa.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING, +mxUtils.getValue(Qa.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ha]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Ea,[ha])}V.push(ha)}}else if(O.isVertex(ha)&&(sa=this.getCellGeometry(ha),null!=sa)){if(!(this.isTable(ha)||this.isTableRow(ha)||this.isTableCell(ha)||this.isSwimlane(ha))){sa=sa.clone();sa.x+=sa.width/2-sa.height/2;sa.y+=sa.height/2-sa.width/2;var Oa=sa.width;sa.width=sa.height;sa.height=Oa;O.setGeometry(ha,sa)}var Pa=this.view.getState(ha);if(null!=Pa){var bb= +[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],eb=mxUtils.getValue(Pa.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,bb[mxUtils.mod(mxUtils.indexOf(bb,eb)+(L?-1:1),bb.length)],[ha])}V.push(ha)}}}finally{O.endUpdate()}return V};Graph.prototype.stencilHasPlaceholders=function(z){if(null!=z&&null!=z.fgNode)for(z=z.fgNode.firstChild;null!=z;){if("text"==z.nodeName&&"1"==z.getAttribute("placeholders"))return!0; +z=z.nextSibling}return!1};var x=Graph.prototype.processChange;Graph.prototype.processChange=function(z){if(z instanceof mxGeometryChange&&(this.isTableCell(z.cell)||this.isTableRow(z.cell))&&(null==z.previous&&null!=z.geometry||null!=z.previous&&!z.previous.equals(z.geometry))){var L=z.cell;this.isTableCell(L)&&(L=this.model.getParent(L));this.isTableRow(L)&&(L=this.model.getParent(L));var O=this.view.getState(L);null!=O&&null!=O.shape&&(this.view.invalidate(L),O.shape.bounds=null)}x.apply(this,arguments); +z instanceof mxValueChange&&null!=z.cell&&null!=z.cell.value&&"object"==typeof z.cell.value&&this.invalidateDescendantsWithPlaceholders(z.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(z){z=this.model.getDescendants(z);if(0<z.length)for(var L=0;L<z.length;L++){var O=this.view.getState(z[L]);null!=O&&null!=O.shape&&null!=O.shape.stencil&&this.stencilHasPlaceholders(O.shape.stencil)?this.removeStateForCell(z[L]):this.isReplacePlaceholders(z[L])&&this.view.invalidate(z[L],!1,!1)}}; +Graph.prototype.replaceElement=function(z,L){L=z.ownerDocument.createElement(null!=L?L:"span");for(var O=Array.prototype.slice.call(z.attributes);attr=O.pop();)L.setAttribute(attr.nodeName,attr.nodeValue);L.innerHTML=z.innerHTML;z.parentNode.replaceChild(L,z)};Graph.prototype.processElements=function(z,L){if(null!=z){z=z.getElementsByTagName("*");for(var O=0;O<z.length;O++)L(z[O])}};Graph.prototype.updateLabelElements=function(z,L,O){z=null!=z?z:this.getSelectionCells();for(var V=document.createElement("div"), +U=0;U<z.length;U++)if(this.isHtmlLabel(z[U])){var ha=this.convertValueToString(z[U]);if(null!=ha&&0<ha.length){V.innerHTML=ha;for(var ma=V.getElementsByTagName(null!=O?O:"*"),wa=0;wa<ma.length;wa++)L(ma[wa]);V.innerHTML!=ha&&this.cellLabelChanged(z[U],V.innerHTML)}}};Graph.prototype.cellLabelChanged=function(z,L,O){L=Graph.zapGremlins(L);this.model.beginUpdate();try{if(null!=z.value&&"object"==typeof z.value){if(this.isReplacePlaceholders(z)&&null!=z.getAttribute("placeholder"))for(var V=z.getAttribute("placeholder"), +U=z;null!=U;){if(U==this.model.getRoot()||null!=U.value&&"object"==typeof U.value&&U.hasAttribute(V)){this.setAttributeForCell(U,V,L);break}U=this.model.getParent(U)}var ha=z.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ha.hasAttribute("label_"+Graph.diagramLanguage)?ha.setAttribute("label_"+Graph.diagramLanguage,L):ha.setAttribute("label",L);L=ha}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(z){if(null!= +z){for(var L=new mxDictionary,O=0;O<z.length;O++)L.put(z[O],!0);var V=[];for(O=0;O<z.length;O++){var U=this.model.getParent(z[O]);null==U||L.get(U)||(L.put(U,!0),V.push(U))}for(O=0;O<V.length;O++)if(U=this.view.getState(V[O]),null!=U&&(this.model.isEdge(U.cell)||this.model.isVertex(U.cell))&&this.isCellDeletable(U.cell)&&this.isTransparentState(U)){for(var ha=!0,ma=0;ma<this.model.getChildCount(U.cell)&&ha;ma++)L.get(this.model.getChildAt(U.cell,ma))||(ha=!1);ha&&z.push(U.cell)}}mxGraph.prototype.cellsRemoved.apply(this, +arguments)};Graph.prototype.removeCellsAfterUngroup=function(z){for(var L=[],O=0;O<z.length;O++)this.isCellDeletable(z[O])&&this.isTransparentState(this.view.getState(z[O]))&&L.push(z[O]);z=L;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(z,L){this.setAttributeForCell(z,"link",L)};Graph.prototype.setTooltipForCell=function(z,L){var O="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(z.value)&&z.value.hasAttribute("tooltip_"+ +Graph.diagramLanguage)&&(O="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(z,O,L)};Graph.prototype.getAttributeForCell=function(z,L,O){z=null!=z.value&&"object"===typeof z.value?z.value.getAttribute(L):null;return null!=z?z:O};Graph.prototype.setAttributeForCell=function(z,L,O){if(null!=z.value&&"object"==typeof z.value)var V=z.value.cloneNode(!0);else V=mxUtils.createXmlDocument().createElement("UserObject"),V.setAttribute("label",z.value||"");null!=O?V.setAttribute(L,O):V.removeAttribute(L); +this.model.setValue(z,V)};var y=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(z,L,O,V){this.getModel();if(mxEvent.isAltDown(L))return null;for(var U=0;U<z.length;U++){var ha=this.model.getParent(z[U]);if(this.model.isEdge(ha)&&0>mxUtils.indexOf(z,ha))return null}ha=y.apply(this,arguments);var ma=!0;for(U=0;U<z.length&&ma;U++)ma=ma&&this.isTableRow(z[U]);ma&&(this.isTableCell(ha)&&(ha=this.model.getParent(ha)),this.isTableRow(ha)&&(ha=this.model.getParent(ha)),this.isTable(ha)|| +(ha=null));return ha};Graph.prototype.click=function(z){mxGraph.prototype.click.call(this,z);this.firstClickState=z.getState();this.firstClickSource=z.getSource()};Graph.prototype.dblClick=function(z,L){this.isEnabled()&&(L=this.insertTextForEvent(z,L),mxGraph.prototype.dblClick.call(this,z,L))};Graph.prototype.insertTextForEvent=function(z,L){var O=mxUtils.convertPoint(this.container,mxEvent.getClientX(z),mxEvent.getClientY(z));if(null!=z&&!this.model.isVertex(L)){var V=this.model.isEdge(L)?this.view.getState(L): +null,U=mxEvent.getSource(z);this.firstClickState!=V||this.firstClickSource!=U||null!=V&&null!=V.text&&null!=V.text.node&&null!=V.text.boundingBox&&(mxUtils.contains(V.text.boundingBox,O.x,O.y)||mxUtils.isAncestorNode(V.text.node,mxEvent.getSource(z)))||(null!=V||this.isCellLocked(this.getDefaultParent()))&&(null==V||this.isCellLocked(V.cell))||!(null!=V||mxClient.IS_SVG&&U==this.view.getCanvas().ownerSVGElement)||(null==V&&(V=this.view.getState(this.getCellAt(O.x,O.y))),L=this.addText(O.x,O.y,V))}return L}; +Graph.prototype.getInsertPoint=function(){var z=this.getGridSize(),L=this.container.scrollLeft/this.view.scale-this.view.translate.x,O=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var V=this.getPageLayout(),U=this.getPageSize();L=Math.max(L,V.x*U.width);O=Math.max(O,V.y*U.height)}return new mxPoint(this.snap(L+z),this.snap(O+z))};Graph.prototype.getFreeInsertPoint=function(){var z=this.view,L=this.getGraphBounds(),O=this.getInsertPoint(),V=this.snap(Math.round(Math.max(O.x, +L.x/z.scale-z.translate.x+(0==L.width?2*this.gridSize:0))));z=this.snap(Math.round(Math.max(O.y,(L.y+L.height)/z.scale-z.translate.y+2*this.gridSize)));return new mxPoint(V,z)};Graph.prototype.getCenterInsertPoint=function(z){z=null!=z?z:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/ +2)/this.view.scale-this.view.translate.y-z.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-z.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(z,L,O){var V=new mxCell;V.value="Text";V.geometry=new mxGeometry(0,0,0,0);V.vertex=!0;if(null!=O&&this.model.isEdge(O.cell)){V.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];"; +V.geometry.relative=!0;V.connectable=!1;var U=this.view.getRelativePoint(O,z,L);V.geometry.x=Math.round(1E4*U.x)/1E4;V.geometry.y=Math.round(U.y);V.geometry.offset=new mxPoint(0,0);U=this.view.getPoint(O,V.geometry);var ha=this.view.scale;V.geometry.offset=new mxPoint(Math.round((z-U.x)/ha),Math.round((L-U.y)/ha))}else U=this.view.translate,V.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",V.geometry.width=40,V.geometry.height=20,V.geometry.x=Math.round(z/this.view.scale)- +U.x-(null!=O?O.origin.x:0),V.geometry.y=Math.round(L/this.view.scale)-U.y-(null!=O?O.origin.y:0),V.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([V],null!=O?O.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[V])),this.autoSizeCell(V)}finally{this.getModel().endUpdate()}return V};Graph.prototype.addClickHandler=function(z,L,O){var V=mxUtils.bind(this,function(){var sa=this.container.getElementsByTagName("a");if(null!=sa)for(var ya=0;ya<sa.length;ya++){var Ha= +this.getAbsoluteUrl(sa[ya].getAttribute("href"));null!=Ha&&(sa[ya].setAttribute("rel",this.linkRelation),sa[ya].setAttribute("href",Ha),null!=L&&mxEvent.addGestureListeners(sa[ya],null,null,L))}});this.model.addListener(mxEvent.CHANGE,V);V();var U=this.container.style.cursor,ha=this.getTolerance(),ma=this,wa={currentState:null,currentLink:null,currentTarget:null,highlight:null!=z&&""!=z&&z!=mxConstants.NONE?new mxCellHighlight(ma,z,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(sa){var ya= +sa.sourceState;if(null==ya||null==ma.getLinkForCell(ya.cell))sa=ma.getCellAt(sa.getGraphX(),sa.getGraphY(),null,null,null,function(Ha,Qa,ua){return null==ma.getLinkForCell(Ha.cell)}),ya=null==ya||ma.model.isAncestor(sa,ya.cell)?ma.view.getState(sa):null;ya!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ya,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(sa,ya){this.startX=ya.getGraphX();this.startY=ya.getGraphY();this.scrollLeft=ma.container.scrollLeft; +this.scrollTop=ma.container.scrollTop;null==this.currentLink&&"auto"==ma.container.style.overflow&&(ma.container.style.cursor="move");this.updateCurrentState(ya)},mouseMove:function(sa,ya){if(ma.isMouseDown)null!=this.currentLink&&(sa=Math.abs(this.startX-ya.getGraphX()),ya=Math.abs(this.startY-ya.getGraphY()),(sa>ha||ya>ha)&&this.clear());else{for(sa=ya.getSource();null!=sa&&"a"!=sa.nodeName.toLowerCase();)sa=sa.parentNode;null!=sa?this.clear():(null!=ma.tooltipHandler&&null!=this.currentLink&&null!= +this.currentState&&ma.tooltipHandler.reset(ya,!0,this.currentState),(null==this.currentState||ya.getState()!=this.currentState&&null!=ya.sourceState||!ma.intersects(this.currentState,ya.getGraphX(),ya.getGraphY()))&&this.updateCurrentState(ya))}},mouseUp:function(sa,ya){var Ha=ya.getSource();for(sa=ya.getEvent();null!=Ha&&"a"!=Ha.nodeName.toLowerCase();)Ha=Ha.parentNode;null==Ha&&Math.abs(this.scrollLeft-ma.container.scrollLeft)<ha&&Math.abs(this.scrollTop-ma.container.scrollTop)<ha&&(null==ya.sourceState|| +!ya.isSource(ya.sourceState.control))&&((mxEvent.isLeftMouseButton(sa)||mxEvent.isMiddleMouseButton(sa))&&!mxEvent.isPopupTrigger(sa)||mxEvent.isTouchEvent(sa))&&(null!=this.currentLink?(Ha=ma.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Ha||null==L||L(sa,this.currentLink),mxEvent.isConsumed(sa)||(sa=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(sa)?"_blank":Ha?ma.linkTarget:"_top",ma.openLink(this.currentLink,sa),ya.consume())):null!=O&&!ya.isConsumed()&& +Math.abs(this.scrollLeft-ma.container.scrollLeft)<ha&&Math.abs(this.scrollTop-ma.container.scrollTop)<ha&&Math.abs(this.startX-ya.getGraphX())<ha&&Math.abs(this.startY-ya.getGraphY())<ha&&O(ya.getEvent()));this.clear()},activate:function(sa){this.currentLink=ma.getAbsoluteUrl(ma.getLinkForCell(sa.cell));null!=this.currentLink&&(this.currentTarget=ma.getLinkTargetForCell(sa.cell),ma.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(sa))},clear:function(){null!=ma.container&& +(ma.container.style.cursor=U);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=ma.tooltipHandler&&ma.tooltipHandler.hide()}};ma.click=function(sa){};ma.addMouseListener(wa);mxEvent.addListener(document,"mouseleave",function(sa){wa.clear()})};Graph.prototype.duplicateCells=function(z,L){z=null!=z?z:this.getSelectionCells();L=null!=L?L:!0;for(var O=0;O<z.length;O++)this.isTableCell(z[O])&&(z[O]=this.model.getParent(z[O]));z=this.model.getTopmostCells(z); +var V=this.getModel(),U=this.gridSize,ha=[];V.beginUpdate();try{var ma={},wa=this.createCellLookup(z),sa=this.cloneCells(z,!1,ma,!0);for(O=0;O<z.length;O++){var ya=V.getParent(z[O]);if(null!=ya){var Ha=this.moveCells([sa[O]],U,U,!1)[0];ha.push(Ha);if(L)V.add(ya,sa[O]);else{var Qa=ya.getIndex(z[O]);V.add(ya,sa[O],Qa+1)}if(this.isTable(ya)){var ua=this.getCellGeometry(sa[O]),za=this.getCellGeometry(ya);null!=ua&&null!=za&&(za=za.clone(),za.height+=ua.height,V.setGeometry(ya,za))}}else ha.push(sa[O])}this.updateCustomLinks(this.createCellMapping(ma, +wa),sa,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",sa))}finally{V.endUpdate()}return ha};Graph.prototype.insertImage=function(z,L,O){if(null!=z&&null!=this.cellEditor.textarea){for(var V=this.cellEditor.textarea.getElementsByTagName("img"),U=[],ha=0;ha<V.length;ha++)U.push(V[ha]);document.execCommand("insertimage",!1,z);z=this.cellEditor.textarea.getElementsByTagName("img");if(z.length==U.length+1)for(ha=z.length-1;0<=ha;ha--)if(0==ha||z[ha]!=U[ha-1]){z[ha].setAttribute("width", +L);z[ha].setAttribute("height",O);break}}};Graph.prototype.insertLink=function(z){if(null!=this.cellEditor.textarea)if(0==z.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var L=this.cellEditor.textarea.getElementsByTagName("a"),O=[],V=0;V<L.length;V++)O.push(L[V]);document.execCommand("createlink",!1,mxUtils.trim(z));L=this.cellEditor.textarea.getElementsByTagName("a");if(L.length==O.length+1)for(V=L.length-1;0<=V;V--)if(L[V]!=O[V-1]){for(L=L[V].getElementsByTagName("a");0<L.length;){for(O= +L[0].parentNode;null!=L[0].firstChild;)O.insertBefore(L[0].firstChild,L[0]);O.removeChild(L[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(z))};Graph.prototype.isCellResizable=function(z){var L=mxGraph.prototype.isCellResizable.apply(this,arguments),O=this.getCurrentCellStyle(z);return!this.isTableCell(z)&&!this.isTableRow(z)&&(L||"0"!=mxUtils.getValue(O,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==O[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(z,L){null== +L&&(L=this.getSelectionCells());if(null!=L&&1<L.length){for(var O=[],V=null,U=null,ha=0;ha<L.length;ha++)if(this.getModel().isVertex(L[ha])){var ma=this.view.getState(L[ha]);if(null!=ma){var wa=z?ma.getCenterX():ma.getCenterY();V=null!=V?Math.max(V,wa):wa;U=null!=U?Math.min(U,wa):wa;O.push(ma)}}if(2<O.length){O.sort(function(Qa,ua){return z?Qa.x-ua.x:Qa.y-ua.y});ma=this.view.translate;wa=this.view.scale;U=U/wa-(z?ma.x:ma.y);V=V/wa-(z?ma.x:ma.y);this.getModel().beginUpdate();try{var sa=(V-U)/(O.length- +1);V=U;for(ha=1;ha<O.length-1;ha++){var ya=this.view.getState(this.model.getParent(O[ha].cell)),Ha=this.getCellGeometry(O[ha].cell);V+=sa;null!=Ha&&null!=ya&&(Ha=Ha.clone(),z?Ha.x=Math.round(V-Ha.width/2)-ya.origin.x:Ha.y=Math.round(V-Ha.height/2)-ya.origin.y,this.getModel().setGeometry(O[ha].cell,Ha))}}finally{this.getModel().endUpdate()}}}return L};Graph.prototype.isCloneEvent=function(z){return mxClient.IS_MAC&&mxEvent.isMetaDown(z)||mxEvent.isControlDown(z)};Graph.prototype.createSvgImageExport= +function(){var z=new mxImageExport;z.getLinkForCellState=mxUtils.bind(this,function(L,O){return this.getLinkForCell(L.cell)});return z};Graph.prototype.parseBackgroundImage=function(z){var L=null;null!=z&&0<z.length&&(z=JSON.parse(z),L=new mxImage(z.src,z.width,z.height));return L};Graph.prototype.getBackgroundImageObject=function(z){return z};Graph.prototype.getSvg=function(z,L,O,V,U,ha,ma,wa,sa,ya,Ha,Qa,ua,za){var Fa=null;if(null!=za)for(Fa=new mxDictionary,Ha=0;Ha<za.length;Ha++)Fa.put(za[Ha], +!0);if(za=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{L=null!=L?L:1;O=null!=O?O:0;U=null!=U?U:!0;ha=null!=ha?ha:!0;ma=null!=ma?ma:!0;ya=null!=ya?ya:!1;var Ba="page"==ua?this.view.getBackgroundPageBounds():ha&&null==Fa||V||"diagram"==ua?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Ea=this.view.scale;"diagram"==ua&&null!=this.backgroundImage&&(Ba=mxRectangle.fromRectangle(Ba),Ba.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)* +Ea,(this.view.translate.y+this.backgroundImage.y)*Ea,this.backgroundImage.width*Ea,this.backgroundImage.height*Ea)));if(null==Ba)throw Error(mxResources.get("drawingEmpty"));V=L/Ea;ua=U?-.5:0;var Oa=Graph.createSvgNode(ua,ua,Math.max(1,Math.ceil(Ba.width*V)+2*O)+(ya&&0==O?5:0),Math.max(1,Math.ceil(Ba.height*V)+2*O)+(ya&&0==O?5:0),z),Pa=Oa.ownerDocument,bb=null!=Pa.createElementNS?Pa.createElementNS(mxConstants.NS_SVG,"g"):Pa.createElement("g");Oa.appendChild(bb);var eb=this.createSvgCanvas(bb);eb.foOffset= +U?-.5:0;eb.textOffset=U?-.5:0;eb.imageOffset=U?-.5:0;eb.translate(Math.floor(O/L-Ba.x/Ea),Math.floor(O/L-Ba.y/Ea));var db=document.createElement("div"),ub=eb.getAlternateText;eb.getAlternateText=function(ab,ib,gb,qb,nb,mb,Bb,wb,rb,vb,kb,hb,tb){if(null!=mb&&0<this.state.fontSize)try{mxUtils.isNode(mb)?mb=mb.innerText:(db.innerHTML=mb,mb=mxUtils.extractTextWithWhitespace(db.childNodes));for(var Cb=Math.ceil(2*qb/this.state.fontSize),xb=[],zb=0,ob=0;(0==Cb||zb<Cb)&&ob<mb.length;){var yb=mb.charCodeAt(ob); +if(10==yb||13==yb){if(0<zb)break}else xb.push(mb.charAt(ob)),255>yb&&zb++;ob++}xb.length<mb.length&&1<mb.length-xb.length&&(mb=mxUtils.trim(xb.join(""))+"...");return mb}catch(Ab){return ub.apply(this,arguments)}else return ub.apply(this,arguments)};var fb=this.backgroundImage;if(null!=fb){z=Ea/L;var pb=this.view.translate;ua=new mxRectangle((fb.x+pb.x)*z,(fb.y+pb.y)*z,fb.width*z,fb.height*z);mxUtils.intersects(Ba,ua)&&eb.image(fb.x+pb.x,fb.y+pb.y,fb.width,fb.height,fb.src,!0)}eb.scale(V);eb.textEnabled= +ma;wa=null!=wa?wa:this.createSvgImageExport();var lb=wa.drawCellState,$a=wa.getLinkForCellState;wa.getLinkForCellState=function(ab,ib){var gb=$a.apply(this,arguments);return null==gb||ab.view.graph.isCustomLink(gb)?null:gb};wa.getLinkTargetForCellState=function(ab,ib){return ab.view.graph.getLinkTargetForCell(ab.cell)};wa.drawCellState=function(ab,ib){for(var gb=ab.view.graph,qb=null!=Fa?Fa.get(ab.cell):gb.isCellSelected(ab.cell),nb=gb.model.getParent(ab.cell);!(ha&&null==Fa||qb)&&null!=nb;)qb=null!= +Fa?Fa.get(nb):gb.isCellSelected(nb),nb=gb.model.getParent(nb);if(ha&&null==Fa||qb)gb.view.redrawEnumerationState(ab),lb.apply(this,arguments),this.doDrawShape(ab.secondLabel,ib)};wa.drawState(this.getView().getState(this.model.root),eb);this.updateSvgLinks(Oa,sa,!0);this.addForeignObjectWarning(eb,Oa);return Oa}finally{za&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(z,L){if("0"!=urlParams["svg-warning"]&&0<L.getElementsByTagName("foreignObject").length){var O= +z.createElement("switch"),V=z.createElement("g");V.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var U=z.createElement("a");U.setAttribute("transform","translate(0,-5)");null==U.setAttributeNS||L.ownerDocument!=document&&null==document.documentMode?(U.setAttribute("xlink:href",Graph.foreignObjectWarningLink),U.setAttribute("target","_blank")):(U.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),U.setAttributeNS(mxConstants.NS_XLINK, +"target","_blank"));z=z.createElement("text");z.setAttribute("text-anchor","middle");z.setAttribute("font-size","10px");z.setAttribute("x","50%");z.setAttribute("y","100%");mxUtils.write(z,Graph.foreignObjectWarningText);O.appendChild(V);U.appendChild(z);O.appendChild(U);L.appendChild(O)}};Graph.prototype.updateSvgLinks=function(z,L,O){z=z.getElementsByTagName("a");for(var V=0;V<z.length;V++)if(null==z[V].getAttribute("target")){var U=z[V].getAttribute("href");null==U&&(U=z[V].getAttribute("xlink:href")); +null!=U&&(null!=L&&/^https?:\/\//.test(U)?z[V].setAttribute("target",L):O&&this.isCustomLink(U)&&z[V].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(z){z=new mxSvgCanvas2D(z);z.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;z.pointerEvents=!0;return z};Graph.prototype.getSelectedElement=function(){var z=null;if(window.getSelection){var L=window.getSelection();L.getRangeAt&&L.rangeCount&&(z=L.getRangeAt(0).commonAncestorContainer)}else document.selection&& +(z=document.selection.createRange().parentElement());return z};Graph.prototype.getSelectedEditingElement=function(){for(var z=this.getSelectedElement();null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=z.parentNode;null!=z&&z==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(z=this.cellEditor.textarea.firstChild);return z};Graph.prototype.getParentByName=function(z,L,O){for(;null!=z&&z.nodeName!= +L;){if(z==O)return null;z=z.parentNode}return z};Graph.prototype.getParentByNames=function(z,L,O){for(;null!=z&&!(0<=mxUtils.indexOf(L,z.nodeName));){if(z==O)return null;z=z.parentNode}return z};Graph.prototype.selectNode=function(z){var L=null;if(window.getSelection){if(L=window.getSelection(),L.getRangeAt&&L.rangeCount){var O=document.createRange();O.selectNode(z);L.removeAllRanges();L.addRange(O)}}else(L=document.selection)&&"Control"!=L.type&&(z=L.createRange(),z.collapse(!0),O=L.createRange(), +O.setEndPoint("StartToStart",z),O.select())};Graph.prototype.flipEdgePoints=function(z,L,O){var V=this.getCellGeometry(z);if(null!=V){V=V.clone();if(null!=V.points)for(var U=0;U<V.points.length;U++)L?V.points[U].x=O+(O-V.points[U].x):V.points[U].y=O+(O-V.points[U].y);U=function(ha){null!=ha&&(L?ha.x=O+(O-ha.x):ha.y=O+(O-ha.y))};U(V.getTerminalPoint(!0));U(V.getTerminalPoint(!1));this.model.setGeometry(z,V)}};Graph.prototype.flipChildren=function(z,L,O){this.model.beginUpdate();try{for(var V=this.model.getChildCount(z), +U=0;U<V;U++){var ha=this.model.getChildAt(z,U);if(this.model.isEdge(ha))this.flipEdgePoints(ha,L,O);else{var ma=this.getCellGeometry(ha);null!=ma&&(ma=ma.clone(),L?ma.x=O+(O-ma.x-ma.width):ma.y=O+(O-ma.y-ma.height),this.model.setGeometry(ha,ma))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(z,L){this.model.beginUpdate();try{z=this.model.getTopmostCells(z);for(var O=[],V=0;V<z.length;V++)if(this.model.isEdge(z[V])){var U=this.view.getState(z[V]);null!=U&&this.flipEdgePoints(z[V], +L,(L?U.getCenterX():U.getCenterY())/this.view.scale-(L?U.origin.x:U.origin.y)-(L?this.view.translate.x:this.view.translate.y))}else{var ha=this.getCellGeometry(z[V]);null!=ha&&this.flipChildren(z[V],L,L?ha.getCenterX()-ha.x:ha.getCenterY()-ha.y);O.push(z[V])}this.toggleCellStyles(L?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,O)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(z,L){var O=null;if(null!=z&&0<z.length){this.model.beginUpdate();try{for(var V=0;V<z.length;V++){var U= +this.model.getParent(z[V]);if(this.isTable(U)){var ha=this.getCellGeometry(z[V]),ma=this.getCellGeometry(U);null!=ha&&null!=ma&&(ma=ma.clone(),ma.height-=ha.height,this.model.setGeometry(U,ma))}}var wa=this.selectParentAfterDelete?this.model.getParents(z):null;this.removeCells(z,L)}finally{this.model.endUpdate()}if(null!=wa)for(O=[],V=0;V<wa.length;V++)this.model.contains(wa[V])&&(this.model.isVertex(wa[V])||this.model.isEdge(wa[V]))&&O.push(wa[V])}return O};Graph.prototype.insertTableColumn=function(z, +L){var O=this.getModel();O.beginUpdate();try{var V=z,U=0;if(this.isTableCell(z)){var ha=O.getParent(z);V=O.getParent(ha);U=mxUtils.indexOf(O.getChildCells(ha,!0),z)}else this.isTableRow(z)?V=O.getParent(z):z=O.getChildCells(V,!0)[0],L||(U=O.getChildCells(z,!0).length-1);var ma=O.getChildCells(V,!0),wa=Graph.minTableColumnWidth;for(z=0;z<ma.length;z++){var sa=O.getChildCells(ma[z],!0)[U],ya=O.cloneCell(sa,!1),Ha=this.getCellGeometry(ya);ya.value=null;ya.style=mxUtils.setStyle(mxUtils.setStyle(ya.style, +"rowspan",null),"colspan",null);if(null!=Ha){null!=Ha.alternateBounds&&(Ha.width=Ha.alternateBounds.width,Ha.height=Ha.alternateBounds.height,Ha.alternateBounds=null);wa=Ha.width;var Qa=this.getCellGeometry(ma[z]);null!=Qa&&(Ha.height=Qa.height)}O.add(ma[z],ya,U+(L?0:1))}var ua=this.getCellGeometry(V);null!=ua&&(ua=ua.clone(),ua.width+=wa,O.setGeometry(V,ua))}finally{O.endUpdate()}};Graph.prototype.deleteLane=function(z){var L=this.getModel();L.beginUpdate();try{var O=null;O="stackLayout"==this.getCurrentCellStyle(z).childLayout? +z:L.getParent(z);var V=L.getChildCells(O,!0);0==V.length?L.remove(O):(O==z&&(z=V[V.length-1]),L.remove(z))}finally{L.endUpdate()}};Graph.prototype.insertLane=function(z,L){var O=this.getModel();O.beginUpdate();try{var V=null;if("stackLayout"==this.getCurrentCellStyle(z).childLayout){V=z;var U=O.getChildCells(V,!0);z=U[L?0:U.length-1]}else V=O.getParent(z);var ha=V.getIndex(z);z=O.cloneCell(z,!1);z.value=null;O.add(V,z,ha+(L?0:1))}finally{O.endUpdate()}};Graph.prototype.insertTableRow=function(z,L){var O= +this.getModel();O.beginUpdate();try{var V=z,U=z;if(this.isTableCell(z))U=O.getParent(z),V=O.getParent(U);else if(this.isTableRow(z))V=O.getParent(z);else{var ha=O.getChildCells(V,!0);U=ha[L?0:ha.length-1]}var ma=O.getChildCells(U,!0),wa=V.getIndex(U);U=O.cloneCell(U,!1);U.value=null;var sa=this.getCellGeometry(U);if(null!=sa){for(ha=0;ha<ma.length;ha++){z=O.cloneCell(ma[ha],!1);z.value=null;z.style=mxUtils.setStyle(mxUtils.setStyle(z.style,"rowspan",null),"colspan",null);var ya=this.getCellGeometry(z); +null!=ya&&(null!=ya.alternateBounds&&(ya.width=ya.alternateBounds.width,ya.height=ya.alternateBounds.height,ya.alternateBounds=null),ya.height=sa.height);U.insert(z)}O.add(V,U,wa+(L?0:1));var Ha=this.getCellGeometry(V);null!=Ha&&(Ha=Ha.clone(),Ha.height+=sa.height,O.setGeometry(V,Ha))}}finally{O.endUpdate()}};Graph.prototype.deleteTableColumn=function(z){var L=this.getModel();L.beginUpdate();try{var O=z,V=z;this.isTableCell(z)&&(V=L.getParent(z));this.isTableRow(V)&&(O=L.getParent(V));var U=L.getChildCells(O, +!0);if(0==U.length)L.remove(O);else{this.isTableRow(V)||(V=U[0]);var ha=L.getChildCells(V,!0);if(1>=ha.length)L.remove(O);else{var ma=ha.length-1;this.isTableCell(z)&&(ma=mxUtils.indexOf(ha,z));for(V=z=0;V<U.length;V++){var wa=L.getChildCells(U[V],!0)[ma];L.remove(wa);var sa=this.getCellGeometry(wa);null!=sa&&(z=Math.max(z,sa.width))}var ya=this.getCellGeometry(O);null!=ya&&(ya=ya.clone(),ya.width-=z,L.setGeometry(O,ya))}}}finally{L.endUpdate()}};Graph.prototype.deleteTableRow=function(z){var L=this.getModel(); +L.beginUpdate();try{var O=z,V=z;this.isTableCell(z)&&(z=V=L.getParent(z));this.isTableRow(z)&&(O=L.getParent(V));var U=L.getChildCells(O,!0);if(1>=U.length)L.remove(O);else{this.isTableRow(V)||(V=U[U.length-1]);L.remove(V);z=0;var ha=this.getCellGeometry(V);null!=ha&&(z=ha.height);var ma=this.getCellGeometry(O);null!=ma&&(ma=ma.clone(),ma.height-=z,L.setGeometry(O,ma))}}finally{L.endUpdate()}};Graph.prototype.insertRow=function(z,L){for(var O=z.tBodies[0],V=O.rows[0].cells,U=z=0;U<V.length;U++){var ha= +V[U].getAttribute("colspan");z+=null!=ha?parseInt(ha):1}L=O.insertRow(L);for(U=0;U<z;U++)mxUtils.br(L.insertCell(-1));return L.cells[0]};Graph.prototype.deleteRow=function(z,L){z.tBodies[0].deleteRow(L)};Graph.prototype.insertColumn=function(z,L){var O=z.tHead;if(null!=O)for(var V=0;V<O.rows.length;V++){var U=document.createElement("th");O.rows[V].appendChild(U);mxUtils.br(U)}z=z.tBodies[0];for(O=0;O<z.rows.length;O++)V=z.rows[O].insertCell(L),mxUtils.br(V);return z.rows[0].cells[0<=L?L:z.rows[0].cells.length- +1]};Graph.prototype.deleteColumn=function(z,L){if(0<=L){z=z.tBodies[0].rows;for(var O=0;O<z.length;O++)z[O].cells.length>L&&z[O].deleteCell(L)}};Graph.prototype.pasteHtmlAtCaret=function(z){if(window.getSelection){var L=window.getSelection();if(L.getRangeAt&&L.rangeCount){L=L.getRangeAt(0);L.deleteContents();var O=document.createElement("div");O.innerHTML=z;z=document.createDocumentFragment();for(var V;V=O.firstChild;)lastNode=z.appendChild(V);L.insertNode(z)}}else(L=document.selection)&&"Control"!= +L.type&&L.createRange().pasteHTML(z)};Graph.prototype.createLinkForHint=function(z,L){function O(U,ha){U.length>ha&&(U=U.substring(0,Math.round(ha/2))+"..."+U.substring(U.length-Math.round(ha/4)));return U}z=null!=z?z:"javascript:void(0);";if(null==L||0==L.length)L=this.isCustomLink(z)?this.getLinkTitle(z):z;var V=document.createElement("a");V.setAttribute("rel",this.linkRelation);V.setAttribute("href",this.getAbsoluteUrl(z));V.setAttribute("title",O(this.isCustomLink(z)?this.getLinkTitle(z):z,80)); +null!=this.linkTarget&&V.setAttribute("target",this.linkTarget);mxUtils.write(V,O(L,40));this.isCustomLink(z)&&mxEvent.addListener(V,"click",mxUtils.bind(this,function(U){this.customLinkClicked(z);mxEvent.consume(U)}));return V};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ha,ma){this.popupMenuHandler.hideMenu()});var z=this.updateMouseEvent;this.updateMouseEvent= +function(ha){ha=z.apply(this,arguments);if(mxEvent.isTouchEvent(ha.getEvent())&&null==ha.getState()){var ma=this.getCellAt(ha.graphX,ha.graphY);null!=ma&&this.isSwimlane(ma)&&this.hitsSwimlaneContent(ma,ha.graphX,ha.graphY)||(ha.state=this.view.getState(ma),null!=ha.state&&null!=ha.state.shape&&(this.container.style.cursor=ha.state.shape.node.style.cursor))}null==ha.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ha};var L=!1,O=!1,V=!1,U=this.fireMouseEvent;this.fireMouseEvent= +function(ha,ma,wa){ha==mxEvent.MOUSE_DOWN&&(ma=this.updateMouseEvent(ma),L=this.isCellSelected(ma.getCell()),O=this.isSelectionEmpty(),V=this.popupMenuHandler.isMenuShowing());U.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(ha,ma){var wa=mxEvent.isMouseEvent(ma.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==ma.getState()||!ma.isSource(ma.getState().control))&&(this.popupMenuHandler.popupTrigger||!V&&!wa&&(O&&null==ma.getCell()&& +this.isSelectionEmpty()||L&&this.isCellSelected(ma.getCell())));wa=!L||wa?null:mxUtils.bind(this,function(sa){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ya=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(ma.getX()+ya.x+1,ma.getY()+ya.y+1,sa,ma.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ha,ma,wa])})};mxCellEditor.prototype.isContentEditing=function(){var z=this.graph.view.getState(this.editingCell);return null!=z&&1== +z.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var z="";window.getSelection?z=window.getSelection():document.getSelection?z=document.getSelection():document.selection&&(z=document.selection.createRange().text);return""!=z};mxCellEditor.prototype.insertTab=function(z){var L=this.textarea.ownerDocument.defaultView.getSelection(),O=L.getRangeAt(0), +V="\t";if(null!=z)for(V="";0<z;)V+=" ",z--;z=document.createElement("span");z.style.whiteSpace="pre";z.appendChild(document.createTextNode(V));O.insertNode(z);O.setStartAfter(z);O.setEndAfter(z);L.removeAllRanges();L.addRange(O)};mxCellEditor.prototype.alignText=function(z,L){var O=null!=L&&mxEvent.isShiftDown(L);if(O||null!=window.getSelection&&null!=window.getSelection().containsNode){var V=!0;this.graph.processElements(this.textarea,function(U){O||window.getSelection().containsNode(U,!0)?(U.removeAttribute("align"), +U.style.textAlign=null):V=!1});V&&this.graph.cellEditor.setAlign(z)}document.execCommand("justify"+z.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var z=window.getSelection();if(z.getRangeAt&&z.rangeCount){for(var L=[],O=0,V=z.rangeCount;O<V;++O)L.push(z.getRangeAt(O));return L}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(z){try{if(z)if(window.getSelection){sel= +window.getSelection();sel.removeAllRanges();for(var L=0,O=z.length;L<O;++L)sel.addRange(z[L])}else document.selection&&z.select&&z.select()}catch(V){}};var u=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(z){null!=z.text&&(z.text.replaceLinefeeds="0"!=mxUtils.getValue(z.style,"nl2Br","1"));u.apply(this,arguments)};var H=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(z,L){this.isKeepFocusEvent(z)||!mxEvent.isAltDown(z.getEvent())? +H.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(z){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var J=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(z,L){z=this.graph.getStartEditingCell(z,L);J.apply(this,arguments);var O=this.graph.view.getState(z);this.textarea.className=null!=O&&1==O.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor"; +this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(z);O=this.graph.getModel().getParent(z);var V=this.graph.getCellGeometry(z);if(this.graph.getModel().isEdge(O)&&null!=V&&V.relative||this.graph.getModel().isEdge(z))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var D=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(z){function L(U,ha){ha.originalNode=U;U=U.firstChild; +for(var ma=ha.firstChild;null!=U&&null!=ma;)L(U,ma),U=U.nextSibling,ma=ma.nextSibling;return ha}function O(U,ha){if(null!=U)if(ha.originalNode!=U)V(U);else for(U=U.firstChild,ha=ha.firstChild;null!=U;){var ma=U.nextSibling;null==ha?V(U):(O(U,ha),ha=ha.nextSibling);U=ma}}function V(U){for(var ha=U.firstChild;null!=ha;){var ma=ha.nextSibling;V(ha);ha=ma}1==U.nodeType&&("BR"===U.nodeName||null!=U.firstChild)||3==U.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(U)).length?(3==U.nodeType&&mxUtils.setTextContent(U, +mxUtils.getTextContent(U).replace(/\n|\r/g,"")),1==U.nodeType&&(U.removeAttribute("style"),U.removeAttribute("class"),U.removeAttribute("width"),U.removeAttribute("cellpadding"),U.removeAttribute("cellspacing"),U.removeAttribute("border"))):U.parentNode.removeChild(U)}D.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(U){var ha=L(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this, +function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?O(this.textarea,ha):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var z=this.graph.view.getState(this.editingCell);if(null!=z){var L=null!=z&&"0"!=mxUtils.getValue(z.style,"nl2Br","1"),O=this.saveSelection();if(this.codeViewMode){wa=mxUtils.extractTextWithWhitespace(this.textarea.childNodes); +0<wa.length&&"\n"==wa.charAt(wa.length-1)&&(wa=wa.substring(0,wa.length-1));wa=this.graph.sanitizeHtml(L?wa.replace(/\n/g,"<br/>"):wa,!0);this.textarea.className="mxCellEditor geContentEditable";sa=mxUtils.getValue(z.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);L=mxUtils.getValue(z.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var V=mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),U=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE, +0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ha=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,ma=[];(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&ma.push("underline");(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&ma.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT? +Math.round(sa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(sa)+"px";this.textarea.style.textDecoration=ma.join(" ");this.textarea.style.fontWeight=U?"bold":"normal";this.textarea.style.fontStyle=ha?"italic":"";this.textarea.style.fontFamily=L;this.textarea.style.textAlign=V;this.textarea.style.padding="0px";this.textarea.innerHTML!=wa&&(this.textarea.innerHTML=wa,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange= +0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");var wa=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(wa=mxUtils.replaceTrailingNewlines(wa,"<div><br></div>"));wa=this.graph.sanitizeHtml(L?wa.replace(/\n/g,"").replace(/<br\s*.?>/g,"<br>"):wa,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var sa=mxConstants.DEFAULT_FONTSIZE; +this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(sa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(sa)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=wa&&(this.textarea.innerHTML= +wa);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=O;this.resize()}};var G=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(z,L){if(null!=this.textarea)if(z=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=z){var O=z.view.scale;this.bounds=mxRectangle.fromRectangle(z);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*O;this.bounds.height= +60*O;var V=null!=z.text?z.text.margin:null;null==V&&(V=mxUtils.getAlignmentAsPoint(mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(z.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=V.x*this.bounds.width;this.bounds.y+=V.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/O)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/O)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight< +this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/O)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*O);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/O)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*O);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top= +Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+O+","+O+")")}else this.textarea.style.height="",this.textarea.style.overflow="",G.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(z,L){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var O=this.graph.getEditingValue(z.cell,L);"1"==mxUtils.getValue(z.style,"nl2Br", +"1")&&(O=O.replace(/\n/g,"<br/>"));return O=this.graph.sanitizeHtml(O,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(z){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var L=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return L="1"==mxUtils.getValue(z.style,"nl2Br","1")?L.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):L.replace(/\r\n/g,"").replace(/\n/g,"")};var W= +mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(z){this.codeViewMode&&this.toggleViewMode();W.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(z){}};var T=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(z,L){this.graph.getModel().beginUpdate();try{T.apply(this,arguments),""==L&&this.graph.isCellDeletable(z.cell)&&0==this.graph.model.getChildCount(z.cell)&& +this.graph.isTransparentState(z)&&this.graph.removeCells([z.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(z){var L=mxUtils.getValue(z.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=L&&L!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(L=mxUtils.getValue(z.style,mxConstants.STYLE_FILLCOLOR, +null));L==mxConstants.NONE&&(L=null);return L};mxCellEditor.prototype.getBorderColor=function(z){var L=mxUtils.getValue(z.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);null!=L&&L!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(L=mxUtils.getValue(z.style,mxConstants.STYLE_STROKECOLOR,null));L==mxConstants.NONE&&(L=null);return L};mxCellEditor.prototype.getMinimumSize= +function(z){var L=this.graph.getView().scale;return new mxRectangle(0,0,null==z.text?30:z.text.size*L+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(z,L){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(L.getEvent)};mxGraphView.prototype.formatUnitText=function(z){return z?e(z,this.unit):z};mxGraphHandler.prototype.updateHint=function(z){if(null!=this.pBounds&&(null!=this.shape|| +this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var L=this.graph.view.translate,O=this.graph.view.scale;z=this.roundLength((this.bounds.x+this.currentDx)/O-L.x);L=this.roundLength((this.bounds.y+this.currentDy)/O-L.y);O=this.graph.view.unit;this.hint.innerHTML=e(z,O)+", "+e(L,O);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+ +Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var Z=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(z,L){Z.apply(this,arguments);var O=this.graph.getCellStyle(z);if(null==O.childLayout){var V=this.graph.model.getParent(z),U=null!=V?this.graph.getCellGeometry(V):null;if(null!=U&&(O=this.graph.getCellStyle(V),"stackLayout"==O.childLayout)){var ha=parseFloat(mxUtils.getValue(O, +"stackBorder",mxStackLayout.prototype.border));O="1"==mxUtils.getValue(O,"horizontalStack","1");var ma=this.graph.getActualStartSize(V);U=U.clone();O?U.height=L.height+ma.y+ma.height+2*ha:U.width=L.width+ma.x+ma.width+2*ha;this.graph.model.setGeometry(V,U)}}};var N=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function z(wa){O.get(wa)||(O.put(wa,!0),U.push(wa))}for(var L=N.apply(this,arguments),O=new mxDictionary,V= +this.graph.model,U=[],ha=0;ha<L.length;ha++){var ma=L[ha];this.graph.isTableCell(ma)?z(V.getParent(V.getParent(ma))):this.graph.isTableRow(ma)&&z(V.getParent(ma));z(ma)}return U};var qa=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(z){var L=qa.apply(this,arguments);L.stroke="#C0C0C0";L.strokewidth=1;return L};var oa=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(z){var L= +oa.apply(this,arguments);L.stroke="#C0C0C0";L.strokewidth=1;return L};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var z=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+z.x/2,this.bounds.y+this.rotationHandleVSpacing-z.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(z,L){return this.graph.isRecursiveVertexResize(z)&&!mxEvent.isAltDown(L.getEvent())};mxVertexHandler.prototype.isCenteredEvent= +function(z,L){return mxEvent.isControlDown(L.getEvent())||mxEvent.isMetaDown(L.getEvent())};var S=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return S.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))): +this.bounds};var fa=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return fa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var ia=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(z){return z.tableHandle||ia.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset= +function(){var z=0;this.graph.isTableRow(this.state.cell)?z=1:this.graph.isTableCell(this.state.cell)&&(z=2);return z};var M=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return M.apply(this,arguments).grow(-this.getSelectionBorderInset())};var aa=null,X=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==aa&&(aa=mxCellRenderer.defaultShapes.tableLine);var z=X.apply(this,arguments); +if(this.graph.isTable(this.state.cell)){var L=function(Fa,Ba,Ea){for(var Oa=[],Pa=0;Pa<Fa.length;Pa++){var bb=Fa[Pa];Oa.push(null==bb?null:new mxPoint((sa+bb.x+Ba)*ha,(ya+bb.y+Ea)*ha))}return Oa},O=this,V=this.graph,U=V.model,ha=V.view.scale,ma=this.state,wa=this.selectionBorder,sa=this.state.origin.x+V.view.translate.x,ya=this.state.origin.y+V.view.translate.y;null==z&&(z=[]);var Ha=V.view.getCellStates(U.getChildCells(this.state.cell,!0));if(0<Ha.length){var Qa=U.getChildCells(Ha[0].cell,!0),ua= +V.getTableLines(this.state.cell,!1,!0),za=V.getTableLines(this.state.cell,!0,!1);for(U=0;U<Ha.length;U++)mxUtils.bind(this,function(Fa){var Ba=Ha[Fa],Ea=Fa<Ha.length-1?Ha[Fa+1]:null;Ea=null!=Ea?V.getCellGeometry(Ea.cell):null;var Oa=null!=Ea&&null!=Ea.alternateBounds?Ea.alternateBounds:Ea;Ea=null!=za[Fa]?new aa(za[Fa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Ea.isDashed=wa.isDashed;Ea.svgStrokeTolerance++;Ba=new mxHandle(Ba,"row-resize",null,Ea);Ba.tableHandle=!0;var Pa= +0;Ba.shape.node.parentNode.insertBefore(Ba.shape.node,Ba.shape.node.parentNode.firstChild);Ba.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Pa?mxConstants.NONE:wa.stroke;if(this.shape.constructor==aa)this.shape.line=L(za[Fa],0,Pa),this.shape.updateBoundsFromLine();else{var eb=V.getActualStartSize(ma.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Pa*ha;this.shape.bounds.x=ma.x+(Fa==Ha.length-1?0:eb.x*ha);this.shape.bounds.width=ma.width-(Fa==Ha.length- +1?0:eb.width+eb.x+ha)}this.shape.redraw()}};var bb=!1;Ba.setPosition=function(eb,db,ub){Pa=Math.max(Graph.minTableRowHeight-eb.height,db.y-eb.y-eb.height);bb=mxEvent.isShiftDown(ub.getEvent());null!=Oa&&bb&&(Pa=Math.min(Pa,Oa.height-Graph.minTableRowHeight))};Ba.execute=function(eb){if(0!=Pa)V.setTableRowHeight(this.state.cell,Pa,!bb);else if(!O.blockDelayedSelection){var db=V.getCellAt(eb.getGraphX(),eb.getGraphY())||ma.cell;V.graphHandler.selectCellForEvent(db,eb)}Pa=0};Ba.reset=function(){Pa=0}; +z.push(Ba)})(U);for(U=0;U<Qa.length;U++)mxUtils.bind(this,function(Fa){var Ba=V.view.getState(Qa[Fa]),Ea=V.getCellGeometry(Qa[Fa]),Oa=null!=Ea.alternateBounds?Ea.alternateBounds:Ea;null==Ba&&(Ba=new mxCellState(V.view,Qa[Fa],V.getCellStyle(Qa[Fa])),Ba.x=ma.x+Ea.x*ha,Ba.y=ma.y+Ea.y*ha,Ba.width=Oa.width*ha,Ba.height=Oa.height*ha,Ba.updateCachedBounds());Ea=Fa<Qa.length-1?Qa[Fa+1]:null;Ea=null!=Ea?V.getCellGeometry(Ea):null;var Pa=null!=Ea&&null!=Ea.alternateBounds?Ea.alternateBounds:Ea;Ea=null!=ua[Fa]? +new aa(ua[Fa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Ea.isDashed=wa.isDashed;Ea.svgStrokeTolerance++;Ba=new mxHandle(Ba,"col-resize",null,Ea);Ba.tableHandle=!0;var bb=0;Ba.shape.node.parentNode.insertBefore(Ba.shape.node,Ba.shape.node.parentNode.firstChild);Ba.redraw=function(){if(null!=this.shape){this.shape.stroke=0==bb?mxConstants.NONE:wa.stroke;if(this.shape.constructor==aa)this.shape.line=L(ua[Fa],bb,0),this.shape.updateBoundsFromLine();else{var db=V.getActualStartSize(ma.cell, +!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Oa.width+bb)*ha;this.shape.bounds.y=ma.y+(Fa==Qa.length-1?0:db.y*ha);this.shape.bounds.height=ma.height-(Fa==Qa.length-1?0:(db.height+db.y)*ha)}this.shape.redraw()}};var eb=!1;Ba.setPosition=function(db,ub,fb){bb=Math.max(Graph.minTableColumnWidth-Oa.width,ub.x-db.x-Oa.width);eb=mxEvent.isShiftDown(fb.getEvent());null==Pa||eb||(bb=Math.min(bb,Pa.width-Graph.minTableColumnWidth))};Ba.execute=function(db){if(0!=bb)V.setTableColumnWidth(this.state.cell, +bb,eb);else if(!O.blockDelayedSelection){var ub=V.getCellAt(db.getGraphX(),db.getGraphY())||ma.cell;V.graphHandler.selectCellForEvent(ub,db)}bb=0};Ba.positionChanged=function(){};Ba.reset=function(){bb=0};z.push(Ba)})(U)}}return null!=z?z.reverse():null};var ja=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(z){ja.apply(this,arguments);if(null!=this.moveHandles)for(var L=0;L<this.moveHandles.length;L++)this.moveHandles[L].style.visibility=z?"":"hidden"; +if(null!=this.cornerHandles)for(L=0;L<this.cornerHandles.length;L++)this.cornerHandles[L].node.style.visibility=z?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var z=this.graph.model;if(null!=this.moveHandles){for(var L=0;L<this.moveHandles.length;L++)this.moveHandles[L].parentNode.removeChild(this.moveHandles[L]);this.moveHandles=null}this.moveHandles=[];for(L=0;L<z.getChildCount(this.state.cell);L++)mxUtils.bind(this,function(O){if(null!=O&&z.isVertex(O.cell)){var V=mxUtils.createImage(Editor.rowMoveImage); +V.style.position="absolute";V.style.cursor="pointer";V.style.width="7px";V.style.height="4px";V.style.padding="4px 2px 4px 2px";V.rowState=O;mxEvent.addGestureListeners(V,mxUtils.bind(this,function(U){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(U)&&this.graph.isCellSelected(O.cell)||this.graph.selectCellForEvent(O.cell,U);mxEvent.isPopupTrigger(U)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(U),mxEvent.getClientY(U),this.graph.getSelectionCells()), +this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(U),this.graph.isMouseDown=!0);mxEvent.consume(U)}),null,mxUtils.bind(this,function(U){mxEvent.isPopupTrigger(U)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(U),mxEvent.getClientY(U),O.cell,U),mxEvent.consume(U))}));this.moveHandles.push(V);this.graph.container.appendChild(V)}})(this.graph.view.getState(z.getChildAt(this.state.cell,L)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var z= +0;z<this.customHandles.length;z++)this.customHandles[z].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var ca=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var z=new mxPoint(0,0),L=this.tolerance,O=this.state.style.shape;null==mxCellRenderer.defaultShapes[O]&&mxStencilRegistry.getStencil(O);O=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell; +if(!O&&null!=this.customHandles)for(var V=0;V<this.customHandles.length;V++)if(null!=this.customHandles[V].shape&&null!=this.customHandles[V].shape.bounds){var U=this.customHandles[V].shape.bounds,ha=U.getCenterX(),ma=U.getCenterY();if(Math.abs(this.state.x-ha)<U.width/2||Math.abs(this.state.y-ma)<U.height/2||Math.abs(this.state.x+this.state.width-ha)<U.width/2||Math.abs(this.state.y+this.state.height-ma)<U.height/2){O=!0;break}}O&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(L/= +2,this.graph.isTable(this.state.cell)&&(L+=7),z.x=this.sizers[0].bounds.width+L,z.y=this.sizers[0].bounds.height+L):z=ca.apply(this,arguments);return z};mxVertexHandler.prototype.updateHint=function(z){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"°";else{z=this.state.view.scale;var L=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/ +z),L)+" x "+e(this.roundLength(this.bounds.height/z),L)}z=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==z&&(z=this.bounds);this.hint.style.left=z.x+Math.round((z.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=z.y+z.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments); +null!=this.linkHint&&(this.linkHint.style.display="")};var ka=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(z,L){ka.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var q=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(z,L){q.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display= +"")};mxEdgeHandler.prototype.updateHint=function(z,L){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var O=this.graph.view.translate,V=this.graph.view.scale,U=this.roundLength(L.x/V-O.x);O=this.roundLength(L.y/V-O.y);V=this.graph.view.unit;this.hint.innerHTML=e(U,V)+", "+e(O,V);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(U=this.constraintHandler.currentConstraint.point, +this.hint.innerHTML="["+Math.round(100*U.x)+"%, "+Math.round(100*U.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(z.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(z.getGraphY(),L.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>'); Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 4.5 2 L 4.5 7 M 2 4.5 L 7 4.5 z" stroke="#000"/>');mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle= Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.endMainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.secondaryHandle=Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>');HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>'); HoverIcons.prototype.endFixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');HoverIcons.prototype.terminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>');HoverIcons.prototype.endTerminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="'+ @@ -2653,67 +2651,67 @@ HoverIcons.prototype.arrowFill+'"/><circle cx="11" cy="11" r="3" stroke="#fff" f mxEdgeHandler.prototype.endHandleImage=HoverIcons.prototype.endMainHandle;mxEdgeHandler.prototype.terminalHandleImage=HoverIcons.prototype.terminalHandle;mxEdgeHandler.prototype.endTerminalHandleImage=HoverIcons.prototype.endTerminalHandle;mxEdgeHandler.prototype.fixedHandleImage=HoverIcons.prototype.fixedHandle;mxEdgeHandler.prototype.endFixedHandleImage=HoverIcons.prototype.endFixedHandle;mxEdgeHandler.prototype.labelHandleImage=HoverIcons.prototype.secondaryHandle;mxOutline.prototype.sizerImage= HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers= !0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled= -!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(y){return!mxEvent.isShiftDown(y.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(y){return!mxEvent.isShiftDown(y.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance= -12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(y){return mxEvent.isMouseEvent(y.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(y){var M=y.getEvent();return null==y.getState()&&!mxEvent.isMouseEvent(M)||mxEvent.isPopupTrigger(M)&&(null==y.getState()||mxEvent.isControlDown(M)||mxEvent.isShiftDown(M))};var F=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown= -function(y,M){F.apply(this,arguments);mxEvent.isTouchEvent(M.getEvent())&&this.graph.isCellSelected(M.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(y){var M=y.getEvent();return mxEvent.isLeftMouseButton(M)&&(this.useLeftButtonForPanning&&null==y.getState()||mxEvent.isControlDown(M)&&!mxEvent.isShiftDown(M))||this.usePopupTrigger&&mxEvent.isPopupTrigger(M)};mxRubberband.prototype.isSpaceEvent=function(y){return this.graph.isEnabled()&& -!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(y.getEvent())||mxEvent.isMetaDown(y.getEvent()))&&mxEvent.isShiftDown(y.getEvent())&&mxEvent.isAltDown(y.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(y,M){if(this.cancelled)this.cancelled=!1,M.consume();else{var N=null!=this.div&&"none"!=this.div.style.display,S=null,X=null,fa=y=null; -null!=this.first&&null!=this.currentX&&null!=this.currentY&&(S=this.first.x,X=this.first.y,y=(this.currentX-S)/this.graph.view.scale,fa=(this.currentY-X)/this.graph.view.scale,mxEvent.isAltDown(M.getEvent())||(y=this.graph.snap(y),fa=this.graph.snap(fa),this.graph.isGridEnabled()||(Math.abs(y)<this.graph.tolerance&&(y=0),Math.abs(fa)<this.graph.tolerance&&(fa=0))));this.reset();if(N){if(this.isSpaceEvent(M)){this.graph.model.beginUpdate();try{var la=this.graph.getCellsBeyond(S,X,this.graph.getDefaultParent(), -!0,!0);for(N=0;N<la.length;N++)if(this.graph.isCellMovable(la[N])){var xa=this.graph.view.getState(la[N]),sa=this.graph.getCellGeometry(la[N]);null!=xa&&null!=sa&&(sa=sa.clone(),sa.translate(y,fa),this.graph.model.setGeometry(la[N],sa))}}finally{this.graph.model.endUpdate()}}else la=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(la,M.getEvent());M.consume()}}};mxRubberband.prototype.mouseMove=function(y,M){if(!M.isConsumed()&&null!=this.first){var N=mxUtils.getScrollOrigin(this.graph.container); -y=mxUtils.getOffset(this.graph.container);N.x-=y.x;N.y-=y.y;y=M.getX()+N.x;N=M.getY()+N.y;var S=this.first.x-y,X=this.first.y-N,fa=this.graph.tolerance;if(null!=this.div||Math.abs(S)>fa||Math.abs(X)>fa)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(y,N),this.isSpaceEvent(M)?(y=this.x+this.width,N=this.y+this.height,S=this.graph.view.scale,mxEvent.isAltDown(M.getEvent())||(this.width=this.graph.snap(this.width/S)*S,this.height=this.graph.snap(this.height/S)*S,this.graph.isGridEnabled()|| -(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=y-this.width),this.y<this.first.y&&(this.y=N-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px", +!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(z){return!mxEvent.isShiftDown(z.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(z){return!mxEvent.isShiftDown(z.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance= +12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(z){return mxEvent.isMouseEvent(z.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(z){var L=z.getEvent();return null==z.getState()&&!mxEvent.isMouseEvent(L)||mxEvent.isPopupTrigger(L)&&(null==z.getState()||mxEvent.isControlDown(L)||mxEvent.isShiftDown(L))};var E=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown= +function(z,L){E.apply(this,arguments);mxEvent.isTouchEvent(L.getEvent())&&this.graph.isCellSelected(L.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(z){var L=z.getEvent();return mxEvent.isLeftMouseButton(L)&&(this.useLeftButtonForPanning&&null==z.getState()||mxEvent.isControlDown(L)&&!mxEvent.isShiftDown(L))||this.usePopupTrigger&&mxEvent.isPopupTrigger(L)};mxRubberband.prototype.isSpaceEvent=function(z){return this.graph.isEnabled()&& +!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(z.getEvent())||mxEvent.isMetaDown(z.getEvent()))&&mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(z,L){if(this.cancelled)this.cancelled=!1,L.consume();else{var O=null!=this.div&&"none"!=this.div.style.display,V=null,U=null,ha=z=null; +null!=this.first&&null!=this.currentX&&null!=this.currentY&&(V=this.first.x,U=this.first.y,z=(this.currentX-V)/this.graph.view.scale,ha=(this.currentY-U)/this.graph.view.scale,mxEvent.isAltDown(L.getEvent())||(z=this.graph.snap(z),ha=this.graph.snap(ha),this.graph.isGridEnabled()||(Math.abs(z)<this.graph.tolerance&&(z=0),Math.abs(ha)<this.graph.tolerance&&(ha=0))));this.reset();if(O){if(this.isSpaceEvent(L)){this.graph.model.beginUpdate();try{var ma=this.graph.getCellsBeyond(V,U,this.graph.getDefaultParent(), +!0,!0);for(O=0;O<ma.length;O++)if(this.graph.isCellMovable(ma[O])){var wa=this.graph.view.getState(ma[O]),sa=this.graph.getCellGeometry(ma[O]);null!=wa&&null!=sa&&(sa=sa.clone(),sa.translate(z,ha),this.graph.model.setGeometry(ma[O],sa))}}finally{this.graph.model.endUpdate()}}else ma=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(ma,L.getEvent());L.consume()}}};mxRubberband.prototype.mouseMove=function(z,L){if(!L.isConsumed()&&null!=this.first){var O=mxUtils.getScrollOrigin(this.graph.container); +z=mxUtils.getOffset(this.graph.container);O.x-=z.x;O.y-=z.y;z=L.getX()+O.x;O=L.getY()+O.y;var V=this.first.x-z,U=this.first.y-O,ha=this.graph.tolerance;if(null!=this.div||Math.abs(V)>ha||Math.abs(U)>ha)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(z,O),this.isSpaceEvent(L)?(z=this.x+this.width,O=this.y+this.height,V=this.graph.view.scale,mxEvent.isAltDown(L.getEvent())||(this.width=this.graph.snap(this.width/V)*V,this.height=this.graph.snap(this.height/V)*V,this.graph.isGridEnabled()|| +(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=z-this.width),this.y<this.first.y&&(this.y=O-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px", null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&& -(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),M.consume()}};var R=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);R.apply(this,arguments)};var W=(new Date).getTime(),T=0,ba=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(y,M,N,S){ba.apply(this,arguments);N!=this.currentTerminalState?(W=(new Date).getTime(), -T=0):T=(new Date).getTime()-W;this.currentTerminalState=N};var ha=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(y){return mxEvent.isShiftDown(y.getEvent())&&mxEvent.isAltDown(y.getEvent())?!1:null!=this.currentTerminalState&&y.getState()==this.currentTerminalState&&2E3<T||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&ha.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape= -function(y,M,N){M=null!=y&&0==y;var S=this.state.getVisibleTerminalState(M);y=null!=y&&(0==y||y>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==y)?this.graph.getConnectionConstraint(this.state,S,M):null;N=null!=(null!=y?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(M),y):null)?N?this.endFixedHandleImage:this.fixedHandleImage:null!=y&&null!=S?N?this.endTerminalHandleImage:this.terminalHandleImage:N?this.endHandleImage:this.handleImage;if(null!=N)return N= -new mxImageShape(new mxRectangle(0,0,N.width,N.height),N.src),N.preserveImageAspect=!1,N;N=mxConstants.HANDLE_SIZE;this.preferHtml&&--N;return new mxRectangleShape(new mxRectangle(0,0,N,N),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var ra=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(y,M,N){this.handleImage=M==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:M==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage; -return ra.apply(this,arguments)};var ta=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(y){if(null!=y&&1==y.length){var M=this.graph.getModel(),N=M.getParent(y[0]),S=this.graph.getCellGeometry(y[0]);if(M.isEdge(N)&&null!=S&&S.relative&&(M=this.graph.view.getState(y[0]),null!=M&&2>M.width&&2>M.height&&null!=M.text&&null!=M.text.boundingBox))return mxRectangle.fromRectangle(M.text.boundingBox)}return ta.apply(this,arguments)};var ma=mxGraphHandler.prototype.getGuideStates; -mxGraphHandler.prototype.getGuideStates=function(){for(var y=ma.apply(this,arguments),M=[],N=0;N<y.length;N++)"1"!=mxUtils.getValue(y[N].style,"part","0")&&M.push(y[N]);return M};var pa=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(y){var M=this.graph.getModel(),N=M.getParent(y.cell),S=this.graph.getCellGeometry(y.cell);return M.isEdge(N)&&null!=S&&S.relative&&2>y.width&&2>y.height&&null!=y.text&&null!=y.text.boundingBox?(M=y.text.unrotatedBoundingBox|| -y.text.boundingBox,new mxRectangle(Math.round(M.x),Math.round(M.y),Math.round(M.width),Math.round(M.height))):pa.apply(this,arguments)};var za=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(y,M){var N=this.graph.getModel(),S=N.getParent(this.state.cell),X=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(M)==mxEvent.ROTATION_HANDLE||!N.isEdge(S)||null==X||!X.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&za.apply(this,arguments)}; -mxVertexHandler.prototype.rotateClick=function(){var y=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),M=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&y==mxConstants.NONE&&M==mxConstants.NONE?(y=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,y,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])}; -var Ba=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(y,M){Ba.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var Ia=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(y,M){Ia.apply(this,arguments);null!=this.rotationShape&&null!= -this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var Aa=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){Aa.apply(this,arguments);var y=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles(); -else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var M=0;4>M;M++){var N=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);N.dialect=mxConstants.DIALECT_SVG;N.init(this.graph.view.getOverlayPane());this.cornerHandles.push(N)}}var S=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()< -this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(X,fa){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));S()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(X,fa){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler); -M=this.graph.getLinkForCell(this.state.cell);N=this.graph.getLinksForState(this.state);this.updateLinkHint(M,N);if(null!=M||null!=N&&0<N.length)y=!0;y&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(y,M){try{if(null==y&&(null==M||0==M.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=y||null!=M&&0<M.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding= -"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=y&&(this.linkHint.appendChild(this.graph.createLinkForHint(y)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var N=document.createElement("img");N.className="geAdaptiveAsset";N.setAttribute("src",Editor.editImage); -N.setAttribute("title",mxResources.get("editLink"));N.setAttribute("width","11");N.setAttribute("height","11");N.style.marginLeft="10px";N.style.marginBottom="-1px";N.style.cursor="pointer";this.linkHint.appendChild(N);mxEvent.addListener(N,"click",mxUtils.bind(this,function(fa){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(fa)}));var S=N.cloneNode(!0);S.setAttribute("src",Editor.trashImage);S.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")])); -S.style.marginLeft="4px";this.linkHint.appendChild(S);mxEvent.addListener(S,"click",mxUtils.bind(this,function(fa){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(fa)}))}if(null!=M)for(N=0;N<M.length;N++){var X=document.createElement("div");X.style.marginTop=null!=y||0<N?"6px":"0px";X.appendChild(this.graph.createLinkForHint(M[N].getAttribute("href"),mxUtils.getTextContent(M[N])));this.linkHint.appendChild(X)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(fa){}};mxEdgeHandler.prototype.updateLinkHint= -mxVertexHandler.prototype.updateLinkHint;var Ka=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){Ka.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var y=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()< -this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(S,X){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));y();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var M=this.graph.getLinkForCell(this.state.cell),N=this.graph.getLinksForState(this.state);if(null!=M||null!=N&&0<N.length)this.updateLinkHint(M, -N),this.redrawHandles()};var Da=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Da.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Ra=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var y=0;y<this.moveHandles.length;y++)this.moveHandles[y].style.left=this.moveHandles[y].rowState.x+this.moveHandles[y].rowState.width- -5+"px",this.moveHandles[y].style.top=this.moveHandles[y].rowState.y+this.moveHandles[y].rowState.height/2-6+"px";if(null!=this.cornerHandles){y=this.getSelectionBorderInset();var M=this.cornerHandles,N=M[0].bounds.height/2;M[0].bounds.x=this.state.x-M[0].bounds.width/2+y;M[0].bounds.y=this.state.y-N+y;M[0].redraw();M[1].bounds.x=M[0].bounds.x+this.state.width-2*y;M[1].bounds.y=M[0].bounds.y;M[1].redraw();M[2].bounds.x=M[0].bounds.x;M[2].bounds.y=this.state.y+this.state.height-2*y;M[2].redraw();M[3].bounds.x= -M[1].bounds.x;M[3].bounds.y=M[2].bounds.y;M[3].redraw();for(y=0;y<this.cornerHandles.length;y++)this.cornerHandles[y].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Ra.apply(this);null!=this.state&&null!=this.linkHint&&(y=new mxPoint(this.state.getCenterX(),this.state.getCenterY()), -M=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),N=mxUtils.getBoundingBox(M,this.state.style[mxConstants.STYLE_ROTATION]||"0",y),y=null!=N?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,M=null!=this.state.text?this.state.text.boundingBox:null,null==N&&(N=this.state),N=N.y+N.height,null!=M&&(N=Math.max(N,M.y+M.height)),this.linkHint.style.left=Math.max(0,Math.round(y.x+(y.width-this.linkHint.clientWidth)/2))+"px", -this.linkHint.style.top=Math.round(N+this.verticalOffset/2+Editor.hintOffset)+"px")};var Qa=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Qa.apply(this,arguments);if(null!=this.moveHandles){for(var y=0;y<this.moveHandles.length;y++)null!=this.moveHandles[y]&&null!=this.moveHandles[y].parentNode&&this.moveHandles[y].parentNode.removeChild(this.moveHandles[y]);this.moveHandles=null}if(null!=this.cornerHandles){for(y=0;y<this.cornerHandles.length;y++)null!=this.cornerHandles[y]&& -null!=this.cornerHandles[y].node&&null!=this.cornerHandles[y].node.parentNode&&this.cornerHandles[y].node.parentNode.removeChild(this.cornerHandles[y].node);this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&& -(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Ta=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Ta.apply(this),null!=this.state&&null!=this.linkHint)){var y=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(y=new mxRectangle(y.x,y.y,y.width,y.height),y.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(y.x+(y.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top= -Math.round(y.y+y.height+Editor.hintOffset)+"px"}};var Za=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){Za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Pa=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Pa.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler), -this.changeHandler=null)}}();(function(){function b(c,l,v){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=v?v:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function m(){mxCylinder.call(this)}function C(){mxCylinder.call(this)}function p(){mxActor.call(this)}function E(){mxCylinder.call(this)}function K(){mxCylinder.call(this)}function Q(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxShape.call(this)}function g(){mxShape.call(this)} -function x(c,l,v,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=v;this.strokewidth=null!=n?n:1}function z(){mxActor.call(this)}function u(){mxCylinder.call(this)}function H(){mxCylinder.call(this)}function J(){mxActor.call(this)}function D(){mxActor.call(this)}function G(){mxActor.call(this)}function V(){mxActor.call(this)}function U(){mxActor.call(this)}function Y(){mxActor.call(this)}function O(){mxActor.call(this)}function qa(c,l){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round"); +(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),L.consume()}};var Q=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);Q.apply(this,arguments)};var Y=(new Date).getTime(),R=0,ba=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(z,L,O,V){ba.apply(this,arguments);O!=this.currentTerminalState?(Y=(new Date).getTime(), +R=0):R=(new Date).getTime()-Y;this.currentTerminalState=O};var ea=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(z){return mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())?!1:null!=this.currentTerminalState&&z.getState()==this.currentTerminalState&&2E3<R||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&ea.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape= +function(z,L,O){L=null!=z&&0==z;var V=this.state.getVisibleTerminalState(L);z=null!=z&&(0==z||z>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==z)?this.graph.getConnectionConstraint(this.state,V,L):null;O=null!=(null!=z?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(L),z):null)?O?this.endFixedHandleImage:this.fixedHandleImage:null!=z&&null!=V?O?this.endTerminalHandleImage:this.terminalHandleImage:O?this.endHandleImage:this.handleImage;if(null!=O)return O= +new mxImageShape(new mxRectangle(0,0,O.width,O.height),O.src),O.preserveImageAspect=!1,O;O=mxConstants.HANDLE_SIZE;this.preferHtml&&--O;return new mxRectangleShape(new mxRectangle(0,0,O,O),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var ra=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(z,L,O){this.handleImage=L==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:L==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage; +return ra.apply(this,arguments)};var ta=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(z){if(null!=z&&1==z.length){var L=this.graph.getModel(),O=L.getParent(z[0]),V=this.graph.getCellGeometry(z[0]);if(L.isEdge(O)&&null!=V&&V.relative&&(L=this.graph.view.getState(z[0]),null!=L&&2>L.width&&2>L.height&&null!=L.text&&null!=L.text.boundingBox))return mxRectangle.fromRectangle(L.text.boundingBox)}return ta.apply(this,arguments)};var la=mxGraphHandler.prototype.getGuideStates; +mxGraphHandler.prototype.getGuideStates=function(){for(var z=la.apply(this,arguments),L=[],O=0;O<z.length;O++)"1"!=mxUtils.getValue(z[O].style,"part","0")&&L.push(z[O]);return L};var pa=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(z){var L=this.graph.getModel(),O=L.getParent(z.cell),V=this.graph.getCellGeometry(z.cell);return L.isEdge(O)&&null!=V&&V.relative&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox?(L=z.text.unrotatedBoundingBox|| +z.text.boundingBox,new mxRectangle(Math.round(L.x),Math.round(L.y),Math.round(L.width),Math.round(L.height))):pa.apply(this,arguments)};var xa=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(z,L){var O=this.graph.getModel(),V=O.getParent(this.state.cell),U=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(L)==mxEvent.ROTATION_HANDLE||!O.isEdge(V)||null==U||!U.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&xa.apply(this,arguments)}; +mxVertexHandler.prototype.rotateClick=function(){var z=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),L=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&z==mxConstants.NONE&&L==mxConstants.NONE?(z=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,z,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])}; +var Ca=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(z,L){Ca.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var Ia=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(z,L){Ia.apply(this,arguments);null!=this.rotationShape&&null!= +this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var Aa=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){Aa.apply(this,arguments);var z=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles(); +else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var L=0;4>L;L++){var O=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);O.dialect=mxConstants.DIALECT_SVG;O.init(this.graph.view.getOverlayPane());this.cornerHandles.push(O)}}var V=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()< +this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(U,ha){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));V()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(U,ha){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler); +L=this.graph.getLinkForCell(this.state.cell);O=this.graph.getLinksForState(this.state);this.updateLinkHint(L,O);if(null!=L||null!=O&&0<O.length)z=!0;z&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(z,L){try{if(null==z&&(null==L||0==L.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=z||null!=L&&0<L.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding= +"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=z&&(this.linkHint.appendChild(this.graph.createLinkForHint(z)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var O=document.createElement("img");O.className="geAdaptiveAsset";O.setAttribute("src",Editor.editImage); +O.setAttribute("title",mxResources.get("editLink"));O.setAttribute("width","11");O.setAttribute("height","11");O.style.marginLeft="10px";O.style.marginBottom="-1px";O.style.cursor="pointer";this.linkHint.appendChild(O);mxEvent.addListener(O,"click",mxUtils.bind(this,function(ha){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(ha)}));var V=O.cloneNode(!0);V.setAttribute("src",Editor.trashImage);V.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")])); +V.style.marginLeft="4px";this.linkHint.appendChild(V);mxEvent.addListener(V,"click",mxUtils.bind(this,function(ha){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(ha)}))}if(null!=L)for(O=0;O<L.length;O++){var U=document.createElement("div");U.style.marginTop=null!=z||0<O?"6px":"0px";U.appendChild(this.graph.createLinkForHint(L[O].getAttribute("href"),mxUtils.getTextContent(L[O])));this.linkHint.appendChild(U)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(ha){}};mxEdgeHandler.prototype.updateLinkHint= +mxVertexHandler.prototype.updateLinkHint;var La=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){La.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var z=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()< +this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(V,U){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));z();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var L=this.graph.getLinkForCell(this.state.cell),O=this.graph.getLinksForState(this.state);if(null!=L||null!=O&&0<O.length)this.updateLinkHint(L, +O),this.redrawHandles()};var Da=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Da.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Sa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.left=this.moveHandles[z].rowState.x+this.moveHandles[z].rowState.width- +5+"px",this.moveHandles[z].style.top=this.moveHandles[z].rowState.y+this.moveHandles[z].rowState.height/2-6+"px";if(null!=this.cornerHandles){z=this.getSelectionBorderInset();var L=this.cornerHandles,O=L[0].bounds.height/2;L[0].bounds.x=this.state.x-L[0].bounds.width/2+z;L[0].bounds.y=this.state.y-O+z;L[0].redraw();L[1].bounds.x=L[0].bounds.x+this.state.width-2*z;L[1].bounds.y=L[0].bounds.y;L[1].redraw();L[2].bounds.x=L[0].bounds.x;L[2].bounds.y=this.state.y+this.state.height-2*z;L[2].redraw();L[3].bounds.x= +L[1].bounds.x;L[3].bounds.y=L[2].bounds.y;L[3].redraw();for(z=0;z<this.cornerHandles.length;z++)this.cornerHandles[z].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Sa.apply(this);null!=this.state&&null!=this.linkHint&&(z=new mxPoint(this.state.getCenterX(),this.state.getCenterY()), +L=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),O=mxUtils.getBoundingBox(L,this.state.style[mxConstants.STYLE_ROTATION]||"0",z),z=null!=O?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,L=null!=this.state.text?this.state.text.boundingBox:null,null==O&&(O=this.state),O=O.y+O.height,null!=L&&(O=Math.max(O,L.y+L.height)),this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/2))+"px", +this.linkHint.style.top=Math.round(O+this.verticalOffset/2+Editor.hintOffset)+"px")};var Ra=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Ra.apply(this,arguments);if(null!=this.moveHandles){for(var z=0;z<this.moveHandles.length;z++)null!=this.moveHandles[z]&&null!=this.moveHandles[z].parentNode&&this.moveHandles[z].parentNode.removeChild(this.moveHandles[z]);this.moveHandles=null}if(null!=this.cornerHandles){for(z=0;z<this.cornerHandles.length;z++)null!=this.cornerHandles[z]&& +null!=this.cornerHandles[z].node&&null!=this.cornerHandles[z].node.parentNode&&this.cornerHandles[z].node.parentNode.removeChild(this.cornerHandles[z].node);this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&& +(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Ta=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Ta.apply(this),null!=this.state&&null!=this.linkHint)){var z=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(z=new mxRectangle(z.x,z.y,z.width,z.height),z.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top= +Math.round(z.y+z.height+Editor.hintOffset)+"px"}};var Za=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){Za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Na=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Na.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler), +this.changeHandler=null)}}();(function(){function b(c,l,v){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=v?v:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function m(){mxCylinder.call(this)}function C(){mxCylinder.call(this)}function p(){mxActor.call(this)}function F(){mxCylinder.call(this)}function K(){mxCylinder.call(this)}function P(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxShape.call(this)}function g(){mxShape.call(this)} +function x(c,l,v,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=v;this.strokewidth=null!=n?n:1}function y(){mxActor.call(this)}function u(){mxCylinder.call(this)}function H(){mxCylinder.call(this)}function J(){mxActor.call(this)}function D(){mxActor.call(this)}function G(){mxActor.call(this)}function W(){mxActor.call(this)}function T(){mxActor.call(this)}function Z(){mxActor.call(this)}function N(){mxActor.call(this)}function qa(c,l){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round"); this.defaultVariation=l;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,qa.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,qa.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,qa.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,qa.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,qa.prototype.curveTo); -this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,qa.prototype.arcTo)}function oa(){mxRectangleShape.call(this)}function aa(){mxRectangleShape.call(this)}function da(){mxActor.call(this)}function ia(){mxActor.call(this)}function L(){mxActor.call(this)}function Z(){mxRectangleShape.call(this)}function P(){mxRectangleShape.call(this)}function ca(){mxCylinder.call(this)}function ja(){mxShape.call(this)}function ka(){mxShape.call(this)}function q(){mxEllipse.call(this)}function F(){mxShape.call(this)} -function R(){mxShape.call(this)}function W(){mxRectangleShape.call(this)}function T(){mxShape.call(this)}function ba(){mxShape.call(this)}function ha(){mxShape.call(this)}function ra(){mxShape.call(this)}function ta(){mxShape.call(this)}function ma(){mxCylinder.call(this)}function pa(){mxCylinder.call(this)}function za(){mxRectangleShape.call(this)}function Ba(){mxDoubleEllipse.call(this)}function Ia(){mxDoubleEllipse.call(this)}function Aa(){mxArrowConnector.call(this);this.spacing=0}function Ka(){mxArrowConnector.call(this); -this.spacing=0}function Da(){mxActor.call(this)}function Ra(){mxRectangleShape.call(this)}function Qa(){mxActor.call(this)}function Ta(){mxActor.call(this)}function Za(){mxActor.call(this)}function Pa(){mxActor.call(this)}function y(){mxActor.call(this)}function M(){mxActor.call(this)}function N(){mxActor.call(this)}function S(){mxActor.call(this)}function X(){mxActor.call(this)}function fa(){mxActor.call(this)}function la(){mxEllipse.call(this)}function xa(){mxEllipse.call(this)}function sa(){mxEllipse.call(this)} -function ya(){mxRhombus.call(this)}function Fa(){mxEllipse.call(this)}function wa(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function La(){mxEllipse.call(this)}function Oa(){mxActor.call(this)}function Ca(){mxActor.call(this)}function Ma(){mxActor.call(this)}function Ga(c,l,v,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=v;this.strokewidth=null!=n?n:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Ya(){mxConnector.call(this)} -function db(c,l,v,n,t,A,B,ea,I,va){B+=I;var na=n.clone();n.x-=t*(2*B+I);n.y-=A*(2*B+I);t*=B+I;A*=B+I;return function(){c.ellipse(na.x-t-B,na.y-A-B,2*B,2*B);va?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var l=0;l<this.line.length;l++){var v=this.line[l];null!=v&&(v=new mxRectangle(v.x,v.y,this.strokewidth,this.strokewidth),null==c?c=v:c.add(v))}this.bounds=null!=c?c:new mxRectangle};b.prototype.paintVertexShape= +this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,qa.prototype.arcTo)}function oa(){mxRectangleShape.call(this)}function S(){mxRectangleShape.call(this)}function fa(){mxActor.call(this)}function ia(){mxActor.call(this)}function M(){mxActor.call(this)}function aa(){mxRectangleShape.call(this)}function X(){mxRectangleShape.call(this)}function ja(){mxCylinder.call(this)}function ca(){mxShape.call(this)}function ka(){mxShape.call(this)}function q(){mxEllipse.call(this)}function E(){mxShape.call(this)} +function Q(){mxShape.call(this)}function Y(){mxRectangleShape.call(this)}function R(){mxShape.call(this)}function ba(){mxShape.call(this)}function ea(){mxShape.call(this)}function ra(){mxShape.call(this)}function ta(){mxShape.call(this)}function la(){mxCylinder.call(this)}function pa(){mxCylinder.call(this)}function xa(){mxRectangleShape.call(this)}function Ca(){mxDoubleEllipse.call(this)}function Ia(){mxDoubleEllipse.call(this)}function Aa(){mxArrowConnector.call(this);this.spacing=0}function La(){mxArrowConnector.call(this); +this.spacing=0}function Da(){mxActor.call(this)}function Sa(){mxRectangleShape.call(this)}function Ra(){mxActor.call(this)}function Ta(){mxActor.call(this)}function Za(){mxActor.call(this)}function Na(){mxActor.call(this)}function z(){mxActor.call(this)}function L(){mxActor.call(this)}function O(){mxActor.call(this)}function V(){mxActor.call(this)}function U(){mxActor.call(this)}function ha(){mxActor.call(this)}function ma(){mxEllipse.call(this)}function wa(){mxEllipse.call(this)}function sa(){mxEllipse.call(this)} +function ya(){mxRhombus.call(this)}function Ha(){mxEllipse.call(this)}function Qa(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function za(){mxEllipse.call(this)}function Fa(){mxActor.call(this)}function Ba(){mxActor.call(this)}function Ea(){mxActor.call(this)}function Oa(c,l,v,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=v;this.strokewidth=null!=n?n:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Pa(){mxConnector.call(this)} +function bb(c,l,v,n,t,A,B,da,I,va){B+=I;var na=n.clone();n.x-=t*(2*B+I);n.y-=A*(2*B+I);t*=B+I;A*=B+I;return function(){c.ellipse(na.x-t-B,na.y-A-B,2*B,2*B);va?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var l=0;l<this.line.length;l++){var v=this.line[l];null!=v&&(v=new mxRectangle(v.x,v.y,this.strokewidth,this.strokewidth),null==c?c=v:c.add(v))}this.bounds=null!=c?c:new mxRectangle};b.prototype.paintVertexShape= function(c,l,v,n,t){this.paintTableLine(c,this.line,0,0)};b.prototype.paintTableLine=function(c,l,v,n){if(null!=l){var t=null;c.begin();for(var A=0;A<l.length;A++){var B=l[A];null!=B&&(null==t?c.moveTo(B.x+v,B.y+n):null!=t&&c.lineTo(B.x+v,B.y+n));t=B}c.end();c.stroke()}};b.prototype.intersectsRectangle=function(c){var l=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var v=null,n=0;n<this.line.length&&!l;n++){var t=this.line[n];null!=t&&null!=v&&(l=mxUtils.rectangleIntersectsSegment(c, -v,t));v=t}return l};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(c,l,v,n,t){var A=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,B=this.isHorizontal(),ea=this.getTitleSize();0==ea||this.outline?ua.prototype.paintVertexShape.apply(this, -arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-l,-v));A||this.outline||!(B&&ea<t||!B&&ea<n)||this.paintForeground(c,l,v,n,t)};e.prototype.paintForeground=function(c,l,v,n,t){if(null!=this.state){var A=this.flipH,B=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ea=A;A=B;B=ea}c.rotate(-this.getShapeRotation(),A,B,l+n/2,v+t/2);s=this.scale;l=this.bounds.x/s;v=this.bounds.y/s;n=this.bounds.width/s;t=this.bounds.height/ +v,t));v=t}return l};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(c,l,v,n,t){var A=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,B=this.isHorizontal(),da=this.getTitleSize();0==da||this.outline?ua.prototype.paintVertexShape.apply(this, +arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-l,-v));A||this.outline||!(B&&da<t||!B&&da<n)||this.paintForeground(c,l,v,n,t)};e.prototype.paintForeground=function(c,l,v,n,t){if(null!=this.state){var A=this.flipH,B=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var da=A;A=B;B=da}c.rotate(-this.getShapeRotation(),A,B,l+n/2,v+t/2);s=this.scale;l=this.bounds.x/s;v=this.bounds.y/s;n=this.bounds.width/s;t=this.bounds.height/ s;this.paintTableForeground(c,l,v,n,t)}};e.prototype.paintTableForeground=function(c,l,v,n,t){n=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(t=0;t<n.length;t++)b.prototype.paintTableLine(c,n[t],l,v)};e.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table", -e);mxUtils.extend(k,e);k.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",k);mxUtils.extend(m,mxCylinder);m.prototype.size=20;m.prototype.darkOpacity=0;m.prototype.darkOpacity2=0;m.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ea=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style, -"darkOpacity2",this.darkOpacity2))));c.translate(l,v);c.begin();c.moveTo(0,0);c.lineTo(n-A,0);c.lineTo(n,A);c.lineTo(n,t);c.lineTo(A,t);c.lineTo(0,t-A);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(n-A,0),c.lineTo(n,A),c.lineTo(A,A),c.close(),c.fill()),0!=ea&&(c.setFillAlpha(Math.abs(ea)),c.setFillColor(0>ea?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(A, -A),c.lineTo(A,t),c.lineTo(0,t-A),c.close(),c.fill()),c.begin(),c.moveTo(A,t),c.lineTo(A,A),c.lineTo(0,0),c.moveTo(A,A),c.lineTo(n,A),c.end(),c.stroke())};m.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",m);var eb=Math.tan(mxUtils.toRadians(30)),cb=(.5-eb)/2;mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(C, +e);mxUtils.extend(k,e);k.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",k);mxUtils.extend(m,mxCylinder);m.prototype.size=20;m.prototype.darkOpacity=0;m.prototype.darkOpacity2=0;m.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),da=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style, +"darkOpacity2",this.darkOpacity2))));c.translate(l,v);c.begin();c.moveTo(0,0);c.lineTo(n-A,0);c.lineTo(n,A);c.lineTo(n,t);c.lineTo(A,t);c.lineTo(0,t-A);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(n-A,0),c.lineTo(n,A),c.lineTo(A,A),c.close(),c.fill()),0!=da&&(c.setFillAlpha(Math.abs(da)),c.setFillColor(0>da?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(A, +A),c.lineTo(A,t),c.lineTo(0,t-A),c.close(),c.fill()),c.begin(),c.moveTo(A,t),c.lineTo(A,A),c.lineTo(0,0),c.moveTo(A,A),c.lineTo(n,A),c.end(),c.stroke())};m.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",m);var eb=Math.tan(mxUtils.toRadians(30)),db=(.5-eb)/2;mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(C, mxCylinder);C.prototype.size=6;C.prototype.paintVertexShape=function(c,l,v,n,t){c.setFillColor(this.stroke);var A=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(l+.5*(n-A),v+.5*(t-A),A,A);c.fill();c.setFillColor(mxConstants.NONE);c.rect(l,v,n,t);c.fill()};mxCellRenderer.registerShape("waypoint",C);mxUtils.extend(p,mxActor);p.prototype.size=20;p.prototype.redrawPath=function(c,l,v,n,t){l=Math.min(n,t/eb);c.translate((n-l)/2,(t-l)/2+l/4);c.moveTo(0, -.25*l);c.lineTo(.5*l,l*cb);c.lineTo(l,.25*l);c.lineTo(.5*l,(.5-cb)*l);c.lineTo(0,.25*l);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(E,mxCylinder);E.prototype.size=20;E.prototype.redrawPath=function(c,l,v,n,t,A){l=Math.min(n,t/(.5+eb));A?(c.moveTo(0,.25*l),c.lineTo(.5*l,(.5-cb)*l),c.lineTo(l,.25*l),c.moveTo(.5*l,(.5-cb)*l),c.lineTo(.5*l,(1-cb)*l)):(c.translate((n-l)/2,(t-l)/2),c.moveTo(0,.25*l),c.lineTo(.5*l,l*cb),c.lineTo(l,.25*l),c.lineTo(l,.75*l),c.lineTo(.5* -l,(1-cb)*l),c.lineTo(0,.75*l),c.close());c.end()};mxCellRenderer.registerShape("isoCube",E);mxUtils.extend(K,mxCylinder);K.prototype.redrawPath=function(c,l,v,n,t,A){l=Math.min(t/2,Math.round(t/8)+this.strokewidth-1);if(A&&null!=this.fill||!A&&null==this.fill)c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0, --l);A||(c.moveTo(0,l),c.curveTo(0,-l/3,n,-l/3,n,l),c.lineTo(n,t-l),c.curveTo(n,t+l/3,0,t+l/3,0,t-l),c.close())};K.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",K);mxUtils.extend(Q,mxCylinder);Q.prototype.size=30;Q.prototype.darkOpacity=0;Q.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size", +.25*l);c.lineTo(.5*l,l*db);c.lineTo(l,.25*l);c.lineTo(.5*l,(.5-db)*l);c.lineTo(0,.25*l);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(F,mxCylinder);F.prototype.size=20;F.prototype.redrawPath=function(c,l,v,n,t,A){l=Math.min(n,t/(.5+eb));A?(c.moveTo(0,.25*l),c.lineTo(.5*l,(.5-db)*l),c.lineTo(l,.25*l),c.moveTo(.5*l,(.5-db)*l),c.lineTo(.5*l,(1-db)*l)):(c.translate((n-l)/2,(t-l)/2),c.moveTo(0,.25*l),c.lineTo(.5*l,l*db),c.lineTo(l,.25*l),c.lineTo(l,.75*l),c.lineTo(.5* +l,(1-db)*l),c.lineTo(0,.75*l),c.close());c.end()};mxCellRenderer.registerShape("isoCube",F);mxUtils.extend(K,mxCylinder);K.prototype.redrawPath=function(c,l,v,n,t,A){l=Math.min(t/2,Math.round(t/8)+this.strokewidth-1);if(A&&null!=this.fill||!A&&null==this.fill)c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0, +-l);A||(c.moveTo(0,l),c.curveTo(0,-l/3,n,-l/3,n,l),c.lineTo(n,t-l),c.curveTo(n,t+l/3,0,t+l/3,0,t-l),c.close())};K.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",K);mxUtils.extend(P,mxCylinder);P.prototype.size=30;P.prototype.darkOpacity=0;P.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size", this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(l,v);c.begin();c.moveTo(0,0);c.lineTo(n-A,0);c.lineTo(n,A);c.lineTo(n,t);c.lineTo(0,t);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(n-A,0),c.lineTo(n-A,A),c.lineTo(n,A),c.close(),c.fill()),c.begin(),c.moveTo(n-A,0),c.lineTo(n-A,A),c.lineTo(n,A), -c.end(),c.stroke())};mxCellRenderer.registerShape("note",Q);mxUtils.extend(d,Q);mxCellRenderer.registerShape("note2",d);d.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,0)}return null};mxUtils.extend(f,mxShape);f.prototype.isoAngle=15;f.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style, +c.end(),c.stroke())};mxCellRenderer.registerShape("note",P);mxUtils.extend(d,P);mxCellRenderer.registerShape("note2",d);d.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,0)}return null};mxUtils.extend(f,mxShape);f.prototype.isoAngle=15;f.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style, "isoAngle",this.isoAngle))))*Math.PI/200;A=Math.min(n*Math.tan(A),.5*t);c.translate(l,v);c.begin();c.moveTo(.5*n,0);c.lineTo(n,A);c.lineTo(n,t-A);c.lineTo(.5*n,t);c.lineTo(0,t-A);c.lineTo(0,A);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,A);c.lineTo(.5*n,2*A);c.lineTo(n,A);c.moveTo(.5*n,2*A);c.lineTo(.5*n,t);c.stroke()};mxCellRenderer.registerShape("isoCube2",f);mxUtils.extend(g,mxShape);g.prototype.size=15;g.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(0,Math.min(.5* t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(l,v);0==A?(c.rect(0,0,n,t),c.fillAndStroke()):(c.begin(),c.moveTo(0,A),c.arcTo(.5*n,A,0,0,1,.5*n,0),c.arcTo(.5*n,A,0,0,1,n,A),c.lineTo(n,t-A),c.arcTo(.5*n,A,0,0,1,.5*n,t),c.arcTo(.5*n,A,0,0,1,0,t-A),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(n,A),c.arcTo(.5*n,A,0,0,1,.5*n,2*A),c.arcTo(.5*n,A,0,0,1,0,A),c.stroke())};mxCellRenderer.registerShape("cylinder2",g);mxUtils.extend(x,mxCylinder);x.prototype.size= 15;x.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(0,Math.min(.5*t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"lid",!0);c.translate(l,v);0==A?(c.rect(0,0,n,t),c.fillAndStroke()):(c.begin(),B?(c.moveTo(0,A),c.arcTo(.5*n,A,0,0,1,.5*n,0),c.arcTo(.5*n,A,0,0,1,n,A)):(c.moveTo(0,0),c.arcTo(.5*n,A,0,0,0,.5*n,A),c.arcTo(.5*n,A,0,0,0,n,0)),c.lineTo(n,t-A),c.arcTo(.5*n,A,0,0,1,.5*n,t),c.arcTo(.5*n,A,0,0,1,0,t-A),c.close(),c.fillAndStroke(),c.setShadow(!1), -B&&(c.begin(),c.moveTo(n,A),c.arcTo(.5*n,A,0,0,1,.5*n,2*A),c.arcTo(.5*n,A,0,0,1,0,A),c.stroke()))};mxCellRenderer.registerShape("cylinder3",x);mxUtils.extend(z,mxActor);z.prototype.redrawPath=function(c,l,v,n,t){c.moveTo(0,0);c.quadTo(n/2,.5*t,n,0);c.quadTo(.5*n,t/2,n,t);c.quadTo(n/2,.5*t,0,t);c.quadTo(.5*n,t/2,0,0);c.end()};mxCellRenderer.registerShape("switch",z);mxUtils.extend(u,mxCylinder);u.prototype.tabWidth=60;u.prototype.tabHeight=20;u.prototype.tabPosition="right";u.prototype.arcSize=.1; -u.prototype.paintVertexShape=function(c,l,v,n,t){c.translate(l,v);l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));v=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var A=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),B=mxUtils.getValue(this.style,"rounded",!1),ea=mxUtils.getValue(this.style,"absoluteArcSize",!1),I=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));ea||(I*=Math.min(n,t)); +B&&(c.begin(),c.moveTo(n,A),c.arcTo(.5*n,A,0,0,1,.5*n,2*A),c.arcTo(.5*n,A,0,0,1,0,A),c.stroke()))};mxCellRenderer.registerShape("cylinder3",x);mxUtils.extend(y,mxActor);y.prototype.redrawPath=function(c,l,v,n,t){c.moveTo(0,0);c.quadTo(n/2,.5*t,n,0);c.quadTo(.5*n,t/2,n,t);c.quadTo(n/2,.5*t,0,t);c.quadTo(.5*n,t/2,0,0);c.end()};mxCellRenderer.registerShape("switch",y);mxUtils.extend(u,mxCylinder);u.prototype.tabWidth=60;u.prototype.tabHeight=20;u.prototype.tabPosition="right";u.prototype.arcSize=.1; +u.prototype.paintVertexShape=function(c,l,v,n,t){c.translate(l,v);l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));v=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var A=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),B=mxUtils.getValue(this.style,"rounded",!1),da=mxUtils.getValue(this.style,"absoluteArcSize",!1),I=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));da||(I*=Math.min(n,t)); I=Math.min(I,.5*n,.5*(t-v));l=Math.max(l,I);l=Math.min(n-I,l);B||(I=0);c.begin();"left"==A?(c.moveTo(Math.max(I,0),v),c.lineTo(Math.max(I,0),0),c.lineTo(l,0),c.lineTo(l,v)):(c.moveTo(n-l,v),c.lineTo(n-l,0),c.lineTo(n-Math.max(I,0),0),c.lineTo(n-Math.max(I,0),v));B?(c.moveTo(0,I+v),c.arcTo(I,I,0,0,1,I,v),c.lineTo(n-I,v),c.arcTo(I,I,0,0,1,n,I+v),c.lineTo(n,t-I),c.arcTo(I,I,0,0,1,n-I,t),c.lineTo(I,t),c.arcTo(I,I,0,0,1,0,t-I)):(c.moveTo(0,v),c.lineTo(n,v),c.lineTo(n,t),c.lineTo(0,t));c.close();c.fillAndStroke(); c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(n-30,v+20),c.lineTo(n-20,v+10),c.lineTo(n-10,v+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",u);u.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var v=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style, "tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),t=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));t||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));n||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-v),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-v),0,A,Math.min(c.height,c.height- @@ -2727,13 +2725,13 @@ n,new mxRectangle(c.x,c.y+l,v,n-2*l);l*=v;return new mxRectangle(c.x+l,c.y,v-2*l "size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*l),0,0)}return null};x.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(l/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*l*this.scale),0,Math.max(0,.3*l*this.scale))}return null};u.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style, "tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var v=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),t=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));t||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));n||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition", this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-v),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-v),0,A,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};H.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};d.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style, -"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,Math.max(0,l*this.scale))}return null};mxUtils.extend(V,mxActor);V.prototype.size=.2;V.prototype.fixedSize=20;V.prototype.isRoundable=function(){return!0};V.prototype.redrawPath=function(c,l,v,n,t){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style, -"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,t),new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n-l,t)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("parallelogram",V);mxUtils.extend(U,mxActor);U.prototype.size=.2;U.prototype.fixedSize=20;U.prototype.isRoundable=function(){return!0};U.prototype.redrawPath=function(c,l,v,n,t){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5* -n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,t),new mxPoint(l,0),new mxPoint(n-l,0),new mxPoint(n,t)],this.isRounded,v,!0)};mxCellRenderer.registerShape("trapezoid",U);mxUtils.extend(Y,mxActor);Y.prototype.size=.5;Y.prototype.redrawPath=function(c,l,v,n,t){c.setFillColor(null); -l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(n,0),new mxPoint(l,0),new mxPoint(l,t/2),new mxPoint(0,t/2),new mxPoint(l,t/2),new mxPoint(l,t),new mxPoint(n,t)],this.isRounded,v,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",Y);mxUtils.extend(O,mxActor);O.prototype.redrawPath=function(c,l,v,n,t){c.setStrokeWidth(1);c.setFillColor(this.stroke); -l=n/5;c.rect(0,0,l,t);c.fillAndStroke();c.rect(2*l,0,l,t);c.fillAndStroke();c.rect(4*l,0,l,t);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",O);qa.prototype.moveTo=function(c,l){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;this.firstX=c;this.firstY=l};qa.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)}; +"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,Math.max(0,l*this.scale))}return null};mxUtils.extend(W,mxActor);W.prototype.size=.2;W.prototype.fixedSize=20;W.prototype.isRoundable=function(){return!0};W.prototype.redrawPath=function(c,l,v,n,t){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style, +"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,t),new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n-l,t)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("parallelogram",W);mxUtils.extend(T,mxActor);T.prototype.size=.2;T.prototype.fixedSize=20;T.prototype.isRoundable=function(){return!0};T.prototype.redrawPath=function(c,l,v,n,t){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5* +n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,t),new mxPoint(l,0),new mxPoint(n-l,0),new mxPoint(n,t)],this.isRounded,v,!0)};mxCellRenderer.registerShape("trapezoid",T);mxUtils.extend(Z,mxActor);Z.prototype.size=.5;Z.prototype.redrawPath=function(c,l,v,n,t){c.setFillColor(null); +l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(n,0),new mxPoint(l,0),new mxPoint(l,t/2),new mxPoint(0,t/2),new mxPoint(l,t/2),new mxPoint(l,t),new mxPoint(n,t)],this.isRounded,v,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",Z);mxUtils.extend(N,mxActor);N.prototype.redrawPath=function(c,l,v,n,t){c.setStrokeWidth(1);c.setFillColor(this.stroke); +l=n/5;c.rect(0,0,l,t);c.fillAndStroke();c.rect(2*l,0,l,t);c.fillAndStroke();c.rect(4*l,0,l,t);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",N);qa.prototype.moveTo=function(c,l){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;this.firstX=c;this.firstY=l};qa.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)}; qa.prototype.quadTo=function(c,l,v,n){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=n};qa.prototype.curveTo=function(c,l,v,n,t,A){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=t;this.lastY=A};qa.prototype.arcTo=function(c,l,v,n,t,A,B){this.originalArcTo.apply(this.canvas,arguments);this.lastX=A;this.lastY=B};qa.prototype.lineTo=function(c,l){if(null!=this.lastX&&null!=this.lastY){var v=function(na){return"number"===typeof na?na?0>na?-1:1:na===na?0:NaN:NaN}, -n=Math.abs(c-this.lastX),t=Math.abs(l-this.lastY),A=Math.sqrt(n*n+t*t);if(2>A){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;return}var B=Math.round(A/10),ea=this.defaultVariation;5>B&&(B=5,ea/=3);var I=v(c-this.lastX)*n/B;v=v(l-this.lastY)*t/B;n/=A;t/=A;for(A=0;A<B;A++){var va=(Math.random()-.5)*ea;this.originalLineTo.call(this.canvas,I*A+this.lastX-va*t,v*A+this.lastY-va*n)}this.originalLineTo.call(this.canvas,c,l)}else this.originalLineTo.apply(this.canvas,arguments); +n=Math.abs(c-this.lastX),t=Math.abs(l-this.lastY),A=Math.sqrt(n*n+t*t);if(2>A){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;return}var B=Math.round(A/10),da=this.defaultVariation;5>B&&(B=5,da/=3);var I=v(c-this.lastX)*n/B;v=v(l-this.lastY)*t/B;n/=A;t/=A;for(A=0;A<B;A++){var va=(Math.random()-.5)*da;this.originalLineTo.call(this.canvas,I*A+this.lastX-va*t,v*A+this.lastY-va*n)}this.originalLineTo.call(this.canvas,c,l)}else this.originalLineTo.apply(this.canvas,arguments); this.lastX=c;this.lastY=l};qa.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var fb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){fb.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};var pb=mxShape.prototype.afterPaint; mxShape.prototype.afterPaint=function(c){pb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new qa(c,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};mxRhombus.prototype.defaultJiggle=2;var lb=mxRectangleShape.prototype.isHtmlAllowed; mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&lb.apply(this,arguments)};var $a=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,l,v,n,t){if(null==c.handJiggle||c.handJiggle.constructor!=qa)$a.apply(this,arguments);else{var A=!0;null!=this.style&&(A="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS, @@ -2741,178 +2739,178 @@ mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null== A,t*A)),c.moveTo(l+A,v),c.lineTo(l+n-A,v),c.quadTo(l+n,v,l+n,v+A),c.lineTo(l+n,v+t-A),c.quadTo(l+n,v+t,l+n-A,v+t),c.lineTo(l+A,v+t),c.quadTo(l,v+t,l,v+t-A),c.lineTo(l,v+A),c.quadTo(l,v,l+A,v)):(c.moveTo(l,v),c.lineTo(l+n,v),c.lineTo(l+n,v+t),c.lineTo(l,v+t),c.lineTo(l,v)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(oa,mxRectangleShape);oa.prototype.size=.1;oa.prototype.fixedSize=!1;oa.prototype.isHtmlAllowed=function(){return!1};oa.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style, mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var l=c.width,v=c.height;c=new mxRectangle(c.x,c.y,l,v);var n=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;n=Math.max(n,Math.min(l*t,v*t))}c.x+=Math.round(n);c.width-=Math.round(2*n);return c}return c}; oa.prototype.paintForeground=function(c,l,v,n,t){var A=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),B=parseFloat(mxUtils.getValue(this.style,"size",this.size));B=A?Math.max(0,Math.min(n,B)):n*Math.max(0,Math.min(1,B));this.isRounded&&(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,B=Math.max(B,Math.min(n*A,t*A)));B=Math.round(B);c.begin();c.moveTo(l+B,v);c.lineTo(l+B,v+t);c.moveTo(l+n-B,v);c.lineTo(l+n-B,v+t);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this, -arguments)};mxCellRenderer.registerShape("process",oa);mxCellRenderer.registerShape("process2",oa);mxUtils.extend(aa,mxRectangleShape);aa.prototype.paintBackground=function(c,l,v,n,t){c.setFillColor(mxConstants.NONE);c.rect(l,v,n,t);c.fill()};aa.prototype.paintForeground=function(c,l,v,n,t){};mxCellRenderer.registerShape("transparent",aa);mxUtils.extend(da,mxHexagon);da.prototype.size=30;da.prototype.position=.5;da.prototype.position2=.5;da.prototype.base=20;da.prototype.getLabelMargins=function(){return new mxRectangle(0, -0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};da.prototype.isRoundable=function(){return!0};da.prototype.redrawPath=function(c,l,v,n,t){l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;v=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var A=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),B=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2", -this.position2)))),ea=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,t-v),new mxPoint(Math.min(n,A+ea),t-v),new mxPoint(B,t),new mxPoint(Math.max(0,A),t-v),new mxPoint(0,t-v)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",da);mxUtils.extend(ia,mxActor);ia.prototype.size=.2;ia.prototype.fixedSize=20;ia.prototype.isRoundable=function(){return!0};ia.prototype.redrawPath=function(c, +arguments)};mxCellRenderer.registerShape("process",oa);mxCellRenderer.registerShape("process2",oa);mxUtils.extend(S,mxRectangleShape);S.prototype.paintBackground=function(c,l,v,n,t){c.setFillColor(mxConstants.NONE);c.rect(l,v,n,t);c.fill()};S.prototype.paintForeground=function(c,l,v,n,t){};mxCellRenderer.registerShape("transparent",S);mxUtils.extend(fa,mxHexagon);fa.prototype.size=30;fa.prototype.position=.5;fa.prototype.position2=.5;fa.prototype.base=20;fa.prototype.getLabelMargins=function(){return new mxRectangle(0, +0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};fa.prototype.isRoundable=function(){return!0};fa.prototype.redrawPath=function(c,l,v,n,t){l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;v=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var A=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),B=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2", +this.position2)))),da=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,t-v),new mxPoint(Math.min(n,A+da),t-v),new mxPoint(B,t),new mxPoint(Math.max(0,A),t-v),new mxPoint(0,t-v)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",fa);mxUtils.extend(ia,mxActor);ia.prototype.size=.2;ia.prototype.fixedSize=20;ia.prototype.isRoundable=function(){return!0};ia.prototype.redrawPath=function(c, l,v,n,t){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n-l,0),new mxPoint(n,t/2),new mxPoint(n-l,t),new mxPoint(0,t),new mxPoint(l,t/2)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("step", -ia);mxUtils.extend(L,mxHexagon);L.prototype.size=.25;L.prototype.fixedSize=20;L.prototype.isRoundable=function(){return!0};L.prototype.redrawPath=function(c,l,v,n,t){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l, -0),new mxPoint(n-l,0),new mxPoint(n,.5*t),new mxPoint(n-l,t),new mxPoint(l,t),new mxPoint(0,.5*t)],this.isRounded,v,!0)};mxCellRenderer.registerShape("hexagon",L);mxUtils.extend(Z,mxRectangleShape);Z.prototype.isHtmlAllowed=function(){return!1};Z.prototype.paintForeground=function(c,l,v,n,t){var A=Math.min(n/5,t/5)+1;c.begin();c.moveTo(l+n/2,v+A);c.lineTo(l+n/2,v+t-A);c.moveTo(l+A,v+t/2);c.lineTo(l+n-A,v+t/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus", -Z);var ab=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};mxRhombus.prototype.paintVertexShape=function(c,l,v,n,t){ab.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var A=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]|| -0);l+=A;v+=A;n-=2*A;t-=2*A;0<n&&0<t&&(c.setShadow(!1),ab.apply(this,[c,l,v,n,t]))}};mxUtils.extend(P,mxRectangleShape);P.prototype.isHtmlAllowed=function(){return!1};P.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};P.prototype.paintForeground=function(c,l,v,n,t){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var A= -Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=A;v+=A;n-=2*A;t-=2*A;0<n&&0<t&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);A=0;do{var B=mxCellRenderer.defaultShapes[this.style["symbol"+A]];if(null!=B){var ea=this.style["symbol"+A+"Align"],I=this.style["symbol"+A+"VerticalAlign"],va=this.style["symbol"+A+"Width"],na=this.style["symbol"+A+"Height"],Xa=this.style["symbol"+A+"Spacing"]||0,jb=this.style["symbol"+A+"VSpacing"]|| -Xa,bb=this.style["symbol"+A+"ArcSpacing"];null!=bb&&(bb*=this.getArcSize(n+this.strokewidth,t+this.strokewidth),Xa+=bb,jb+=bb);bb=l;var Ea=v;bb=ea==mxConstants.ALIGN_CENTER?bb+(n-va)/2:ea==mxConstants.ALIGN_RIGHT?bb+(n-va-Xa):bb+Xa;Ea=I==mxConstants.ALIGN_MIDDLE?Ea+(t-na)/2:I==mxConstants.ALIGN_BOTTOM?Ea+(t-na-jb):Ea+jb;c.save();ea=new B;ea.style=this.style;B.prototype.paintVertexShape.call(ea,c,bb,Ea,va,na);c.restore()}A++}while(null!=B)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)}; -mxCellRenderer.registerShape("ext",P);mxUtils.extend(ca,mxCylinder);ca.prototype.redrawPath=function(c,l,v,n,t,A){A?(c.moveTo(0,0),c.lineTo(n/2,t/2),c.lineTo(n,0),c.end()):(c.moveTo(0,0),c.lineTo(n,0),c.lineTo(n,t),c.lineTo(0,t),c.close())};mxCellRenderer.registerShape("message",ca);mxUtils.extend(ja,mxShape);ja.prototype.paintBackground=function(c,l,v,n,t){c.translate(l,v);c.ellipse(n/4,0,n/2,t/4);c.fillAndStroke();c.begin();c.moveTo(n/2,t/4);c.lineTo(n/2,2*t/3);c.moveTo(n/2,t/3);c.lineTo(0,t/3); -c.moveTo(n/2,t/3);c.lineTo(n,t/3);c.moveTo(n/2,2*t/3);c.lineTo(0,t);c.moveTo(n/2,2*t/3);c.lineTo(n,t);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",ja);mxUtils.extend(ka,mxShape);ka.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};ka.prototype.paintBackground=function(c,l,v,n,t){c.translate(l,v);c.begin();c.moveTo(0,t/4);c.lineTo(0,3*t/4);c.end();c.stroke();c.begin();c.moveTo(0,t/2);c.lineTo(n/6,t/2);c.end();c.stroke();c.ellipse(n/6,0,5*n/6,t);c.fillAndStroke()}; -mxCellRenderer.registerShape("umlBoundary",ka);mxUtils.extend(q,mxEllipse);q.prototype.paintVertexShape=function(c,l,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/8,v+t);c.lineTo(l+7*n/8,v+t);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",q);mxUtils.extend(F,mxShape);F.prototype.paintVertexShape=function(c,l,v,n,t){c.translate(l,v);c.begin();c.moveTo(n,0);c.lineTo(0,t);c.moveTo(0,0);c.lineTo(n,t);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy", -F);mxUtils.extend(R,mxShape);R.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};R.prototype.paintBackground=function(c,l,v,n,t){c.translate(l,v);c.begin();c.moveTo(3*n/8,t/8*1.1);c.lineTo(5*n/8,0);c.end();c.stroke();c.ellipse(0,t/8,n,7*t/8);c.fillAndStroke()};R.prototype.paintForeground=function(c,l,v,n,t){c.begin();c.moveTo(3*n/8,t/8*1.1);c.lineTo(5*n/8,t/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",R);mxUtils.extend(W,mxRectangleShape); -W.prototype.size=40;W.prototype.isHtmlAllowed=function(){return!1};W.prototype.getLabelBounds=function(c){var l=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,l)};W.prototype.paintBackground=function(c,l,v,n,t){var A=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"participant");null==B||null==this.state?mxRectangleShape.prototype.paintBackground.call(this, -c,l,v,n,A):(B=this.state.view.graph.cellRenderer.getShape(B),null!=B&&B!=W&&(B=new B,B.apply(this.state),c.save(),B.paintVertexShape(c,l,v,n,A),c.restore()));A<t&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(l+n/2,v+A),c.lineTo(l+n/2,v+t),c.end(),c.stroke())};W.prototype.paintForeground=function(c,l,v,n,t){var A=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,l,v,n,Math.min(t, -A))};mxCellRenderer.registerShape("umlLifeline",W);mxUtils.extend(T,mxShape);T.prototype.width=60;T.prototype.height=30;T.prototype.corner=10;T.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};T.prototype.paintBackground=function(c,l,v,n,t){var A=this.corner,B=Math.min(n,Math.max(A,parseFloat(mxUtils.getValue(this.style, -"width",this.width)))),ea=Math.min(t,Math.max(1.5*A,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),I=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);I!=mxConstants.NONE&&(c.setFillColor(I),c.rect(l,v,n,t),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,l,v,n,t),c.setGradient(this.fill,this.gradient,l,v,n,t,this.gradientDirection)):c.setFillColor(this.fill);c.begin(); -c.moveTo(l,v);c.lineTo(l+B,v);c.lineTo(l+B,v+Math.max(0,ea-1.5*A));c.lineTo(l+Math.max(0,B-A),v+ea);c.lineTo(l,v+ea);c.close();c.fillAndStroke();c.begin();c.moveTo(l+B,v);c.lineTo(l+n,v);c.lineTo(l+n,v+t);c.lineTo(l,v+t);c.lineTo(l,v+ea);c.stroke()};mxCellRenderer.registerShape("umlFrame",T);mxPerimeter.CenterPerimeter=function(c,l,v,n){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c, -l,v,n){n=W.prototype.size;null!=l&&(n=mxUtils.getValue(l.style,"size",n)*l.view.scale);l=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*l.view.scale/2-1;v.x<c.getCenterX()&&(l=-1*(l+1));return new mxPoint(c.getCenterX()+l,Math.min(c.y+c.height,Math.max(c.y+n,v.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,l,v,n){n=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter", +ia);mxUtils.extend(M,mxHexagon);M.prototype.size=.25;M.prototype.fixedSize=20;M.prototype.isRoundable=function(){return!0};M.prototype.redrawPath=function(c,l,v,n,t){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l, +0),new mxPoint(n-l,0),new mxPoint(n,.5*t),new mxPoint(n-l,t),new mxPoint(l,t),new mxPoint(0,.5*t)],this.isRounded,v,!0)};mxCellRenderer.registerShape("hexagon",M);mxUtils.extend(aa,mxRectangleShape);aa.prototype.isHtmlAllowed=function(){return!1};aa.prototype.paintForeground=function(c,l,v,n,t){var A=Math.min(n/5,t/5)+1;c.begin();c.moveTo(l+n/2,v+A);c.lineTo(l+n/2,v+t-A);c.moveTo(l+A,v+t/2);c.lineTo(l+n-A,v+t/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)}; +mxCellRenderer.registerShape("plus",aa);var ab=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};mxRhombus.prototype.paintVertexShape=function(c,l,v,n,t){ab.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var A=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]|| +0);l+=A;v+=A;n-=2*A;t-=2*A;0<n&&0<t&&(c.setShadow(!1),ab.apply(this,[c,l,v,n,t]))}};mxUtils.extend(X,mxRectangleShape);X.prototype.isHtmlAllowed=function(){return!1};X.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};X.prototype.paintForeground=function(c,l,v,n,t){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var A= +Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=A;v+=A;n-=2*A;t-=2*A;0<n&&0<t&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);A=0;do{var B=mxCellRenderer.defaultShapes[this.style["symbol"+A]];if(null!=B){var da=this.style["symbol"+A+"Align"],I=this.style["symbol"+A+"VerticalAlign"],va=this.style["symbol"+A+"Width"],na=this.style["symbol"+A+"Height"],Ya=this.style["symbol"+A+"Spacing"]||0,jb=this.style["symbol"+A+"VSpacing"]|| +Ya,cb=this.style["symbol"+A+"ArcSpacing"];null!=cb&&(cb*=this.getArcSize(n+this.strokewidth,t+this.strokewidth),Ya+=cb,jb+=cb);cb=l;var Ga=v;cb=da==mxConstants.ALIGN_CENTER?cb+(n-va)/2:da==mxConstants.ALIGN_RIGHT?cb+(n-va-Ya):cb+Ya;Ga=I==mxConstants.ALIGN_MIDDLE?Ga+(t-na)/2:I==mxConstants.ALIGN_BOTTOM?Ga+(t-na-jb):Ga+jb;c.save();da=new B;da.style=this.style;B.prototype.paintVertexShape.call(da,c,cb,Ga,va,na);c.restore()}A++}while(null!=B)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)}; +mxCellRenderer.registerShape("ext",X);mxUtils.extend(ja,mxCylinder);ja.prototype.redrawPath=function(c,l,v,n,t,A){A?(c.moveTo(0,0),c.lineTo(n/2,t/2),c.lineTo(n,0),c.end()):(c.moveTo(0,0),c.lineTo(n,0),c.lineTo(n,t),c.lineTo(0,t),c.close())};mxCellRenderer.registerShape("message",ja);mxUtils.extend(ca,mxShape);ca.prototype.paintBackground=function(c,l,v,n,t){c.translate(l,v);c.ellipse(n/4,0,n/2,t/4);c.fillAndStroke();c.begin();c.moveTo(n/2,t/4);c.lineTo(n/2,2*t/3);c.moveTo(n/2,t/3);c.lineTo(0,t/3); +c.moveTo(n/2,t/3);c.lineTo(n,t/3);c.moveTo(n/2,2*t/3);c.lineTo(0,t);c.moveTo(n/2,2*t/3);c.lineTo(n,t);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",ca);mxUtils.extend(ka,mxShape);ka.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};ka.prototype.paintBackground=function(c,l,v,n,t){c.translate(l,v);c.begin();c.moveTo(0,t/4);c.lineTo(0,3*t/4);c.end();c.stroke();c.begin();c.moveTo(0,t/2);c.lineTo(n/6,t/2);c.end();c.stroke();c.ellipse(n/6,0,5*n/6,t);c.fillAndStroke()}; +mxCellRenderer.registerShape("umlBoundary",ka);mxUtils.extend(q,mxEllipse);q.prototype.paintVertexShape=function(c,l,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/8,v+t);c.lineTo(l+7*n/8,v+t);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",q);mxUtils.extend(E,mxShape);E.prototype.paintVertexShape=function(c,l,v,n,t){c.translate(l,v);c.begin();c.moveTo(n,0);c.lineTo(0,t);c.moveTo(0,0);c.lineTo(n,t);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy", +E);mxUtils.extend(Q,mxShape);Q.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};Q.prototype.paintBackground=function(c,l,v,n,t){c.translate(l,v);c.begin();c.moveTo(3*n/8,t/8*1.1);c.lineTo(5*n/8,0);c.end();c.stroke();c.ellipse(0,t/8,n,7*t/8);c.fillAndStroke()};Q.prototype.paintForeground=function(c,l,v,n,t){c.begin();c.moveTo(3*n/8,t/8*1.1);c.lineTo(5*n/8,t/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",Q);mxUtils.extend(Y,mxRectangleShape); +Y.prototype.size=40;Y.prototype.isHtmlAllowed=function(){return!1};Y.prototype.getLabelBounds=function(c){var l=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,l)};Y.prototype.paintBackground=function(c,l,v,n,t){var A=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"participant");null==B||null==this.state?mxRectangleShape.prototype.paintBackground.call(this, +c,l,v,n,A):(B=this.state.view.graph.cellRenderer.getShape(B),null!=B&&B!=Y&&(B=new B,B.apply(this.state),c.save(),B.paintVertexShape(c,l,v,n,A),c.restore()));A<t&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(l+n/2,v+A),c.lineTo(l+n/2,v+t),c.end(),c.stroke())};Y.prototype.paintForeground=function(c,l,v,n,t){var A=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,l,v,n,Math.min(t, +A))};mxCellRenderer.registerShape("umlLifeline",Y);mxUtils.extend(R,mxShape);R.prototype.width=60;R.prototype.height=30;R.prototype.corner=10;R.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};R.prototype.paintBackground=function(c,l,v,n,t){var A=this.corner,B=Math.min(n,Math.max(A,parseFloat(mxUtils.getValue(this.style, +"width",this.width)))),da=Math.min(t,Math.max(1.5*A,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),I=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);I!=mxConstants.NONE&&(c.setFillColor(I),c.rect(l,v,n,t),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,l,v,n,t),c.setGradient(this.fill,this.gradient,l,v,n,t,this.gradientDirection)):c.setFillColor(this.fill);c.begin(); +c.moveTo(l,v);c.lineTo(l+B,v);c.lineTo(l+B,v+Math.max(0,da-1.5*A));c.lineTo(l+Math.max(0,B-A),v+da);c.lineTo(l,v+da);c.close();c.fillAndStroke();c.begin();c.moveTo(l+B,v);c.lineTo(l+n,v);c.lineTo(l+n,v+t);c.lineTo(l,v+t);c.lineTo(l,v+da);c.stroke()};mxCellRenderer.registerShape("umlFrame",R);mxPerimeter.CenterPerimeter=function(c,l,v,n){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c, +l,v,n){n=Y.prototype.size;null!=l&&(n=mxUtils.getValue(l.style,"size",n)*l.view.scale);l=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*l.view.scale/2-1;v.x<c.getCenterX()&&(l=-1*(l+1));return new mxPoint(c.getCenterX()+l,Math.min(c.y+c.height,Math.max(c.y+n,v.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,l,v,n){n=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter", mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(c,l,v,n){n=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*l.view.scale/2-1;null!=l.style.backboneSize&&(n+=parseFloat(l.style.backboneSize)*l.view.scale/2-1);if("south"==l.style[mxConstants.STYLE_DIRECTION]||"north"==l.style[mxConstants.STYLE_DIRECTION])return v.x<c.getCenterX()&&(n=-1*(n+1)),new mxPoint(c.getCenterX()+n,Math.min(c.y+c.height,Math.max(c.y,v.y)));v.y<c.getCenterY()&&(n=-1*(n+1));return new mxPoint(Math.min(c.x+ -c.width,Math.max(c.x,v.x)),c.getCenterY()+n)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,l,v,n){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(l.style,"size",da.prototype.size))*l.view.scale))),l.style),l,v,n)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c, -l,v,n){var t="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=t?V.prototype.fixedSize:V.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));t&&(A*=l.view.scale);var B=c.x,ea=c.y,I=c.width,va=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),ea=[new mxPoint(B,ea),new mxPoint(B+I,ea+t),new mxPoint(B+ -I,ea+va),new mxPoint(B,ea+va-t),new mxPoint(B,ea)]):(t=t?Math.max(0,Math.min(.5*I,A)):I*Math.max(0,Math.min(1,A)),ea=[new mxPoint(B+t,ea),new mxPoint(B+I,ea),new mxPoint(B+I-t,ea+va),new mxPoint(B,ea+va),new mxPoint(B+t,ea)]);va=c.getCenterX();c=c.getCenterY();c=new mxPoint(va,c);n&&(v.x<B||v.x>B+I?c.y=v.y:c.x=v.x);return mxUtils.getPerimeterPoint(ea,c,v)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,l,v,n){var t="0"!= -mxUtils.getValue(l.style,"fixedSize","0"),A=t?U.prototype.fixedSize:U.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));t&&(A*=l.view.scale);var B=c.x,ea=c.y,I=c.width,va=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(t=t?Math.max(0,Math.min(.5*I,A)):I*Math.max(0,Math.min(1,A)),ea=[new mxPoint(B+t,ea),new mxPoint(B+I-t,ea),new mxPoint(B+I,ea+va),new mxPoint(B,ea+va),new mxPoint(B+ -t,ea)]):l==mxConstants.DIRECTION_WEST?(t=t?Math.max(0,Math.min(I,A)):I*Math.max(0,Math.min(1,A)),ea=[new mxPoint(B,ea),new mxPoint(B+I,ea),new mxPoint(B+I-t,ea+va),new mxPoint(B+t,ea+va),new mxPoint(B,ea)]):l==mxConstants.DIRECTION_NORTH?(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),ea=[new mxPoint(B,ea+t),new mxPoint(B+I,ea),new mxPoint(B+I,ea+va),new mxPoint(B,ea+va-t),new mxPoint(B,ea+t)]):(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),ea=[new mxPoint(B,ea),new mxPoint(B+ -I,ea+t),new mxPoint(B+I,ea+va-t),new mxPoint(B,ea+va),new mxPoint(B,ea)]);va=c.getCenterX();c=c.getCenterY();c=new mxPoint(va,c);n&&(v.x<B||v.x>B+I?c.y=v.y:c.x=v.x);return mxUtils.getPerimeterPoint(ea,c,v)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,v,n){var t="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=t?ia.prototype.fixedSize:ia.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));t&&(A*=l.view.scale);var B= -c.x,ea=c.y,I=c.width,va=c.height,na=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(t=t?Math.max(0,Math.min(I,A)):I*Math.max(0,Math.min(1,A)),ea=[new mxPoint(B,ea),new mxPoint(B+I-t,ea),new mxPoint(B+I,c),new mxPoint(B+I-t,ea+va),new mxPoint(B,ea+va),new mxPoint(B+t,c),new mxPoint(B,ea)]):l==mxConstants.DIRECTION_WEST?(t=t?Math.max(0,Math.min(I,A)):I*Math.max(0,Math.min(1, -A)),ea=[new mxPoint(B+t,ea),new mxPoint(B+I,ea),new mxPoint(B+I-t,c),new mxPoint(B+I,ea+va),new mxPoint(B+t,ea+va),new mxPoint(B,c),new mxPoint(B+t,ea)]):l==mxConstants.DIRECTION_NORTH?(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),ea=[new mxPoint(B,ea+t),new mxPoint(na,ea),new mxPoint(B+I,ea+t),new mxPoint(B+I,ea+va),new mxPoint(na,ea+va-t),new mxPoint(B,ea+va),new mxPoint(B,ea+t)]):(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),ea=[new mxPoint(B,ea),new mxPoint(na,ea+ -t),new mxPoint(B+I,ea),new mxPoint(B+I,ea+va-t),new mxPoint(na,ea+va),new mxPoint(B,ea+va-t),new mxPoint(B,ea)]);na=new mxPoint(na,c);n&&(v.x<B||v.x>B+I?na.y=v.y:na.x=v.x);return mxUtils.getPerimeterPoint(ea,na,v)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,l,v,n){var t="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=t?L.prototype.fixedSize:L.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));t&&(A*=l.view.scale);var B= -c.x,ea=c.y,I=c.width,va=c.height,na=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),ea=[new mxPoint(na,ea),new mxPoint(B+I,ea+t),new mxPoint(B+I,ea+va-t),new mxPoint(na,ea+va),new mxPoint(B,ea+va-t),new mxPoint(B,ea+t),new mxPoint(na,ea)]):(t=t?Math.max(0,Math.min(I,A)):I*Math.max(0, -Math.min(1,A)),ea=[new mxPoint(B+t,ea),new mxPoint(B+I-t,ea),new mxPoint(B+I,c),new mxPoint(B+I-t,ea+va),new mxPoint(B+t,ea+va),new mxPoint(B,c),new mxPoint(B+t,ea)]);na=new mxPoint(na,c);n&&(v.x<B||v.x>B+I?na.y=v.y:na.x=v.x);return mxUtils.getPerimeterPoint(ea,na,v)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ba,mxShape);ba.prototype.size=10;ba.prototype.paintBackground=function(c,l,v,n,t){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size)); -c.translate(l,v);c.ellipse((n-A)/2,0,A,A);c.fillAndStroke();c.begin();c.moveTo(n/2,A);c.lineTo(n/2,t);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",ba);mxUtils.extend(ha,mxShape);ha.prototype.size=10;ha.prototype.inset=2;ha.prototype.paintBackground=function(c,l,v,n,t){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size)),B=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,v);c.begin();c.moveTo(n/2,A+B);c.lineTo(n/2,t);c.end();c.stroke(); -c.begin();c.moveTo((n-A)/2-B,A/2);c.quadTo((n-A)/2-B,A+B,n/2,A+B);c.quadTo((n+A)/2+B,A+B,(n+A)/2+B,A/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",ha);mxUtils.extend(ra,mxShape);ra.prototype.paintBackground=function(c,l,v,n,t){c.translate(l,v);c.begin();c.moveTo(0,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,0,t);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",ra);mxUtils.extend(ta,mxShape);ta.prototype.inset=2;ta.prototype.paintBackground=function(c,l,v,n,t){var A=parseFloat(mxUtils.getValue(this.style, -"inset",this.inset))+this.strokewidth;c.translate(l,v);c.ellipse(0,A,n-2*A,t-2*A);c.fillAndStroke();c.begin();c.moveTo(n/2,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,n/2,t);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",ta);mxUtils.extend(ma,mxCylinder);ma.prototype.jettyWidth=20;ma.prototype.jettyHeight=10;ma.prototype.redrawPath=function(c,l,v,n,t,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight", -this.jettyHeight));v=B/2;B=v+B/2;var ea=Math.min(l,t-l),I=Math.min(ea+2*l,t-l);A?(c.moveTo(v,ea),c.lineTo(B,ea),c.lineTo(B,ea+l),c.lineTo(v,ea+l),c.moveTo(v,I),c.lineTo(B,I),c.lineTo(B,I+l),c.lineTo(v,I+l)):(c.moveTo(v,0),c.lineTo(n,0),c.lineTo(n,t),c.lineTo(v,t),c.lineTo(v,I+l),c.lineTo(0,I+l),c.lineTo(0,I),c.lineTo(v,I),c.lineTo(v,ea+l),c.lineTo(0,ea+l),c.lineTo(0,ea),c.lineTo(v,ea),c.close());c.end()};mxCellRenderer.registerShape("module",ma);mxUtils.extend(pa,mxCylinder);pa.prototype.jettyWidth= -32;pa.prototype.jettyHeight=12;pa.prototype.redrawPath=function(c,l,v,n,t,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));v=B/2;B=v+B/2;var ea=.3*t-l/2,I=.7*t-l/2;A?(c.moveTo(v,ea),c.lineTo(B,ea),c.lineTo(B,ea+l),c.lineTo(v,ea+l),c.moveTo(v,I),c.lineTo(B,I),c.lineTo(B,I+l),c.lineTo(v,I+l)):(c.moveTo(v,0),c.lineTo(n,0),c.lineTo(n,t),c.lineTo(v,t),c.lineTo(v,I+l),c.lineTo(0,I+l),c.lineTo(0,I),c.lineTo(v, -I),c.lineTo(v,ea+l),c.lineTo(0,ea+l),c.lineTo(0,ea),c.lineTo(v,ea),c.close());c.end()};mxCellRenderer.registerShape("component",pa);mxUtils.extend(za,mxRectangleShape);za.prototype.paintForeground=function(c,l,v,n,t){var A=n/2,B=t/2,ea=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(l+A,v),new mxPoint(l+n,v+B),new mxPoint(l+A,v+t),new mxPoint(l,v+B)],this.isRounded,ea,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this, -arguments)};mxCellRenderer.registerShape("associativeEntity",za);mxUtils.extend(Ba,mxDoubleEllipse);Ba.prototype.outerStroke=!0;Ba.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.min(4,Math.min(n/5,t/5));0<n&&0<t&&(c.ellipse(l+A,v+A,n-2*A,t-2*A),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(l,v,n,t),c.stroke())};mxCellRenderer.registerShape("endState",Ba);mxUtils.extend(Ia,Ba);Ia.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Ia);mxUtils.extend(Aa,mxArrowConnector); -Aa.prototype.defaultWidth=4;Aa.prototype.isOpenEnded=function(){return!0};Aa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};Aa.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",Aa);mxUtils.extend(Ka,mxArrowConnector);Ka.prototype.defaultWidth=10;Ka.prototype.defaultArrowWidth=20;Ka.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style, -"startWidth",this.defaultArrowWidth)};Ka.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ka.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Ka);mxUtils.extend(Da,mxActor);Da.prototype.size=30;Da.prototype.isRoundable=function(){return!0};Da.prototype.redrawPath=function(c,l,v,n,t){l=Math.min(t,parseFloat(mxUtils.getValue(this.style, -"size",this.size)));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,t),new mxPoint(0,l),new mxPoint(n,0),new mxPoint(n,t)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("manualInput",Da);mxUtils.extend(Ra,mxRectangleShape);Ra.prototype.dx=20;Ra.prototype.dy=20;Ra.prototype.isHtmlAllowed=function(){return!1};Ra.prototype.paintForeground=function(c,l,v,n,t){mxRectangleShape.prototype.paintForeground.apply(this,arguments); -var A=0;if(this.isRounded){var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;A=Math.max(A,Math.min(n*B,t*B))}B=Math.max(A,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(A,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(l,v+A);c.lineTo(l+n,v+A);c.end();c.stroke();c.begin();c.moveTo(l+B,v);c.lineTo(l+B,v+t);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Ra); -mxUtils.extend(Qa,mxActor);Qa.prototype.dx=20;Qa.prototype.dy=20;Qa.prototype.redrawPath=function(c,l,v,n,t){l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));v=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,v),new mxPoint(l,v), -new mxPoint(l,t),new mxPoint(0,t)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",Qa);mxUtils.extend(Ta,mxActor);Ta.prototype.redrawPath=function(c,l,v,n,t){c.moveTo(0,0);c.lineTo(0,t);c.end();c.moveTo(n,0);c.lineTo(n,t);c.end();c.moveTo(0,t/2);c.lineTo(n,t/2);c.end()};mxCellRenderer.registerShape("crossbar",Ta);mxUtils.extend(Za,mxActor);Za.prototype.dx=20;Za.prototype.dy=20;Za.prototype.redrawPath=function(c,l,v,n,t){l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style, -"dx",this.dx))));v=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,v),new mxPoint((n+l)/2,v),new mxPoint((n+l)/2,t),new mxPoint((n-l)/2,t),new mxPoint((n-l)/2,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("tee",Za);mxUtils.extend(Pa, -mxActor);Pa.prototype.arrowWidth=.3;Pa.prototype.arrowSize=.2;Pa.prototype.redrawPath=function(c,l,v,n,t){var A=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));v=(t-A)/2;A=v+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(n-l,v),new mxPoint(n-l,0),new mxPoint(n,t/2),new mxPoint(n- -l,t),new mxPoint(n-l,A),new mxPoint(0,A)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("singleArrow",Pa);mxUtils.extend(y,mxActor);y.prototype.redrawPath=function(c,l,v,n,t){var A=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Pa.prototype.arrowWidth))));l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Pa.prototype.arrowSize))));v=(t-A)/2;A=v+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/ -2;this.addPoints(c,[new mxPoint(0,t/2),new mxPoint(l,0),new mxPoint(l,v),new mxPoint(n-l,v),new mxPoint(n-l,0),new mxPoint(n,t/2),new mxPoint(n-l,t),new mxPoint(n-l,A),new mxPoint(l,A),new mxPoint(l,t)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",y);mxUtils.extend(M,mxActor);M.prototype.size=.1;M.prototype.fixedSize=20;M.prototype.redrawPath=function(c,l,v,n,t){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style, -"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(l,0);c.lineTo(n,0);c.quadTo(n-2*l,t/2,n,t);c.lineTo(l,t);c.quadTo(l-2*l,t/2,l,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",M);mxUtils.extend(N,mxActor);N.prototype.redrawPath=function(c,l,v,n,t){c.moveTo(0,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,0,t);c.close();c.end()};mxCellRenderer.registerShape("or",N);mxUtils.extend(S,mxActor);S.prototype.redrawPath=function(c, -l,v,n,t){c.moveTo(0,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,0,t);c.quadTo(n/2,t/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",S);mxUtils.extend(X,mxActor);X.prototype.size=20;X.prototype.isRoundable=function(){return!0};X.prototype.redrawPath=function(c,l,v,n,t){l=Math.min(n/2,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(n-l,0),new mxPoint(n, -.8*l),new mxPoint(n,t),new mxPoint(0,t),new mxPoint(0,.8*l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("loopLimit",X);mxUtils.extend(fa,mxActor);fa.prototype.size=.375;fa.prototype.isRoundable=function(){return!0};fa.prototype.redrawPath=function(c,l,v,n,t){l=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n, -t-l),new mxPoint(n/2,t),new mxPoint(0,t-l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",fa);mxUtils.extend(la,mxEllipse);la.prototype.paintVertexShape=function(c,l,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/2,v+t);c.lineTo(l+n,v+t);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",la);mxUtils.extend(xa,mxEllipse);xa.prototype.paintVertexShape=function(c,l,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this, -arguments);c.setShadow(!1);c.begin();c.moveTo(l,v+t/2);c.lineTo(l+n,v+t/2);c.end();c.stroke();c.begin();c.moveTo(l+n/2,v);c.lineTo(l+n/2,v+t);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",xa);mxUtils.extend(sa,mxEllipse);sa.prototype.paintVertexShape=function(c,l,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l+.145*n,v+.145*t);c.lineTo(l+.855*n,v+.855*t);c.end();c.stroke();c.begin();c.moveTo(l+.855*n,v+.145*t);c.lineTo(l+.145*n, -v+.855*t);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",sa);mxUtils.extend(ya,mxRhombus);ya.prototype.paintVertexShape=function(c,l,v,n,t){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,v+t/2);c.lineTo(l+n,v+t/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ya);mxUtils.extend(Fa,mxEllipse);Fa.prototype.paintVertexShape=function(c,l,v,n,t){c.begin();c.moveTo(l,v);c.lineTo(l+n,v);c.lineTo(l+n/2,v+t/2);c.close();c.fillAndStroke(); -c.begin();c.moveTo(l,v+t);c.lineTo(l+n,v+t);c.lineTo(l+n/2,v+t/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",Fa);mxUtils.extend(wa,mxEllipse);wa.prototype.paintVertexShape=function(c,l,v,n,t){var A=c.state.strokeWidth/2,B=10+2*A,ea=v+t-B/2;c.begin();c.moveTo(l,v);c.lineTo(l,v+t);c.moveTo(l+A,ea);c.lineTo(l+A+B,ea-B/2);c.moveTo(l+A,ea);c.lineTo(l+A+B,ea+B/2);c.moveTo(l+A,ea);c.lineTo(l+n-A,ea);c.moveTo(l+n,v);c.lineTo(l+n,v+t);c.moveTo(l+n-A,ea);c.lineTo(l+n-B-A,ea-B/2);c.moveTo(l+ -n-A,ea);c.lineTo(l+n-B-A,ea+B/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",wa);mxUtils.extend(ua,mxEllipse);ua.prototype.drawHidden=!0;ua.prototype.paintVertexShape=function(c,l,v,n,t){this.outline||c.setStrokeColor(null);if(null!=this.style){var A=c.pointerEvents,B=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||B||(c.pointerEvents=!1);var ea="1"==mxUtils.getValue(this.style,"top","1"),I="1"==mxUtils.getValue(this.style, -"left","1"),va="1"==mxUtils.getValue(this.style,"right","1"),na="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||B||this.outline||ea||va||na||I?(c.rect(l,v,n,t),c.fill(),c.pointerEvents=A,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,v),this.outline||ea?c.lineTo(l+n,v):c.moveTo(l+n,v),this.outline||va?c.lineTo(l+n,v+t):c.moveTo(l+n,v+t),this.outline||na?c.lineTo(l,v+t):c.moveTo(l,v+t),(this.outline||I)&&c.lineTo(l,v),c.end(),c.stroke(),c.setLineCap("flat")): -c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",ua);mxUtils.extend(La,mxEllipse);La.prototype.paintVertexShape=function(c,l,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(l+n/2,v),c.lineTo(l+n/2,v+t)):(c.moveTo(l,v+t/2),c.lineTo(l+n,v+t/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",La);mxUtils.extend(Oa,mxActor);Oa.prototype.redrawPath=function(c, -l,v,n,t){l=Math.min(n,t/2);c.moveTo(0,0);c.lineTo(n-l,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,n-l,t);c.lineTo(0,t);c.close();c.end()};mxCellRenderer.registerShape("delay",Oa);mxUtils.extend(Ca,mxActor);Ca.prototype.size=.2;Ca.prototype.redrawPath=function(c,l,v,n,t){l=Math.min(t,n);var A=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(t-A)/2;v=l+A;var B=(n-A)/2;A=B+A;c.moveTo(0,l);c.lineTo(B,l);c.lineTo(B,0);c.lineTo(A,0);c.lineTo(A,l);c.lineTo(n,l);c.lineTo(n,v); -c.lineTo(A,v);c.lineTo(A,t);c.lineTo(B,t);c.lineTo(B,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("cross",Ca);mxUtils.extend(Ma,mxActor);Ma.prototype.size=.25;Ma.prototype.redrawPath=function(c,l,v,n,t){l=Math.min(n,t/2);v=Math.min(n-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*n);c.moveTo(0,t/2);c.lineTo(v,0);c.lineTo(n-l,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,n-l,t);c.lineTo(v,t);c.close();c.end()};mxCellRenderer.registerShape("display",Ma);mxUtils.extend(Ga, -mxActor);Ga.prototype.cst={RECT2:"mxgraph.basic.rect"};Ga.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float", +c.width,Math.max(c.x,v.x)),c.getCenterY()+n)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,l,v,n){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(l.style,"size",fa.prototype.size))*l.view.scale))),l.style),l,v,n)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c, +l,v,n){var t="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=t?W.prototype.fixedSize:W.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));t&&(A*=l.view.scale);var B=c.x,da=c.y,I=c.width,va=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),da=[new mxPoint(B,da),new mxPoint(B+I,da+t),new mxPoint(B+ +I,da+va),new mxPoint(B,da+va-t),new mxPoint(B,da)]):(t=t?Math.max(0,Math.min(.5*I,A)):I*Math.max(0,Math.min(1,A)),da=[new mxPoint(B+t,da),new mxPoint(B+I,da),new mxPoint(B+I-t,da+va),new mxPoint(B,da+va),new mxPoint(B+t,da)]);va=c.getCenterX();c=c.getCenterY();c=new mxPoint(va,c);n&&(v.x<B||v.x>B+I?c.y=v.y:c.x=v.x);return mxUtils.getPerimeterPoint(da,c,v)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,l,v,n){var t="0"!= +mxUtils.getValue(l.style,"fixedSize","0"),A=t?T.prototype.fixedSize:T.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));t&&(A*=l.view.scale);var B=c.x,da=c.y,I=c.width,va=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(t=t?Math.max(0,Math.min(.5*I,A)):I*Math.max(0,Math.min(1,A)),da=[new mxPoint(B+t,da),new mxPoint(B+I-t,da),new mxPoint(B+I,da+va),new mxPoint(B,da+va),new mxPoint(B+ +t,da)]):l==mxConstants.DIRECTION_WEST?(t=t?Math.max(0,Math.min(I,A)):I*Math.max(0,Math.min(1,A)),da=[new mxPoint(B,da),new mxPoint(B+I,da),new mxPoint(B+I-t,da+va),new mxPoint(B+t,da+va),new mxPoint(B,da)]):l==mxConstants.DIRECTION_NORTH?(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),da=[new mxPoint(B,da+t),new mxPoint(B+I,da),new mxPoint(B+I,da+va),new mxPoint(B,da+va-t),new mxPoint(B,da+t)]):(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),da=[new mxPoint(B,da),new mxPoint(B+ +I,da+t),new mxPoint(B+I,da+va-t),new mxPoint(B,da+va),new mxPoint(B,da)]);va=c.getCenterX();c=c.getCenterY();c=new mxPoint(va,c);n&&(v.x<B||v.x>B+I?c.y=v.y:c.x=v.x);return mxUtils.getPerimeterPoint(da,c,v)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,v,n){var t="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=t?ia.prototype.fixedSize:ia.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));t&&(A*=l.view.scale);var B= +c.x,da=c.y,I=c.width,va=c.height,na=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(t=t?Math.max(0,Math.min(I,A)):I*Math.max(0,Math.min(1,A)),da=[new mxPoint(B,da),new mxPoint(B+I-t,da),new mxPoint(B+I,c),new mxPoint(B+I-t,da+va),new mxPoint(B,da+va),new mxPoint(B+t,c),new mxPoint(B,da)]):l==mxConstants.DIRECTION_WEST?(t=t?Math.max(0,Math.min(I,A)):I*Math.max(0,Math.min(1, +A)),da=[new mxPoint(B+t,da),new mxPoint(B+I,da),new mxPoint(B+I-t,c),new mxPoint(B+I,da+va),new mxPoint(B+t,da+va),new mxPoint(B,c),new mxPoint(B+t,da)]):l==mxConstants.DIRECTION_NORTH?(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),da=[new mxPoint(B,da+t),new mxPoint(na,da),new mxPoint(B+I,da+t),new mxPoint(B+I,da+va),new mxPoint(na,da+va-t),new mxPoint(B,da+va),new mxPoint(B,da+t)]):(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),da=[new mxPoint(B,da),new mxPoint(na,da+ +t),new mxPoint(B+I,da),new mxPoint(B+I,da+va-t),new mxPoint(na,da+va),new mxPoint(B,da+va-t),new mxPoint(B,da)]);na=new mxPoint(na,c);n&&(v.x<B||v.x>B+I?na.y=v.y:na.x=v.x);return mxUtils.getPerimeterPoint(da,na,v)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,l,v,n){var t="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=t?M.prototype.fixedSize:M.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));t&&(A*=l.view.scale);var B= +c.x,da=c.y,I=c.width,va=c.height,na=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),da=[new mxPoint(na,da),new mxPoint(B+I,da+t),new mxPoint(B+I,da+va-t),new mxPoint(na,da+va),new mxPoint(B,da+va-t),new mxPoint(B,da+t),new mxPoint(na,da)]):(t=t?Math.max(0,Math.min(I,A)):I*Math.max(0, +Math.min(1,A)),da=[new mxPoint(B+t,da),new mxPoint(B+I-t,da),new mxPoint(B+I,c),new mxPoint(B+I-t,da+va),new mxPoint(B+t,da+va),new mxPoint(B,c),new mxPoint(B+t,da)]);na=new mxPoint(na,c);n&&(v.x<B||v.x>B+I?na.y=v.y:na.x=v.x);return mxUtils.getPerimeterPoint(da,na,v)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ba,mxShape);ba.prototype.size=10;ba.prototype.paintBackground=function(c,l,v,n,t){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size)); +c.translate(l,v);c.ellipse((n-A)/2,0,A,A);c.fillAndStroke();c.begin();c.moveTo(n/2,A);c.lineTo(n/2,t);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",ba);mxUtils.extend(ea,mxShape);ea.prototype.size=10;ea.prototype.inset=2;ea.prototype.paintBackground=function(c,l,v,n,t){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size)),B=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,v);c.begin();c.moveTo(n/2,A+B);c.lineTo(n/2,t);c.end();c.stroke(); +c.begin();c.moveTo((n-A)/2-B,A/2);c.quadTo((n-A)/2-B,A+B,n/2,A+B);c.quadTo((n+A)/2+B,A+B,(n+A)/2+B,A/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",ea);mxUtils.extend(ra,mxShape);ra.prototype.paintBackground=function(c,l,v,n,t){c.translate(l,v);c.begin();c.moveTo(0,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,0,t);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",ra);mxUtils.extend(ta,mxShape);ta.prototype.inset=2;ta.prototype.paintBackground=function(c,l,v,n,t){var A=parseFloat(mxUtils.getValue(this.style, +"inset",this.inset))+this.strokewidth;c.translate(l,v);c.ellipse(0,A,n-2*A,t-2*A);c.fillAndStroke();c.begin();c.moveTo(n/2,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,n/2,t);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",ta);mxUtils.extend(la,mxCylinder);la.prototype.jettyWidth=20;la.prototype.jettyHeight=10;la.prototype.redrawPath=function(c,l,v,n,t,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight", +this.jettyHeight));v=B/2;B=v+B/2;var da=Math.min(l,t-l),I=Math.min(da+2*l,t-l);A?(c.moveTo(v,da),c.lineTo(B,da),c.lineTo(B,da+l),c.lineTo(v,da+l),c.moveTo(v,I),c.lineTo(B,I),c.lineTo(B,I+l),c.lineTo(v,I+l)):(c.moveTo(v,0),c.lineTo(n,0),c.lineTo(n,t),c.lineTo(v,t),c.lineTo(v,I+l),c.lineTo(0,I+l),c.lineTo(0,I),c.lineTo(v,I),c.lineTo(v,da+l),c.lineTo(0,da+l),c.lineTo(0,da),c.lineTo(v,da),c.close());c.end()};mxCellRenderer.registerShape("module",la);mxUtils.extend(pa,mxCylinder);pa.prototype.jettyWidth= +32;pa.prototype.jettyHeight=12;pa.prototype.redrawPath=function(c,l,v,n,t,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));v=B/2;B=v+B/2;var da=.3*t-l/2,I=.7*t-l/2;A?(c.moveTo(v,da),c.lineTo(B,da),c.lineTo(B,da+l),c.lineTo(v,da+l),c.moveTo(v,I),c.lineTo(B,I),c.lineTo(B,I+l),c.lineTo(v,I+l)):(c.moveTo(v,0),c.lineTo(n,0),c.lineTo(n,t),c.lineTo(v,t),c.lineTo(v,I+l),c.lineTo(0,I+l),c.lineTo(0,I),c.lineTo(v, +I),c.lineTo(v,da+l),c.lineTo(0,da+l),c.lineTo(0,da),c.lineTo(v,da),c.close());c.end()};mxCellRenderer.registerShape("component",pa);mxUtils.extend(xa,mxRectangleShape);xa.prototype.paintForeground=function(c,l,v,n,t){var A=n/2,B=t/2,da=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(l+A,v),new mxPoint(l+n,v+B),new mxPoint(l+A,v+t),new mxPoint(l,v+B)],this.isRounded,da,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this, +arguments)};mxCellRenderer.registerShape("associativeEntity",xa);mxUtils.extend(Ca,mxDoubleEllipse);Ca.prototype.outerStroke=!0;Ca.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.min(4,Math.min(n/5,t/5));0<n&&0<t&&(c.ellipse(l+A,v+A,n-2*A,t-2*A),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(l,v,n,t),c.stroke())};mxCellRenderer.registerShape("endState",Ca);mxUtils.extend(Ia,Ca);Ia.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Ia);mxUtils.extend(Aa,mxArrowConnector); +Aa.prototype.defaultWidth=4;Aa.prototype.isOpenEnded=function(){return!0};Aa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};Aa.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",Aa);mxUtils.extend(La,mxArrowConnector);La.prototype.defaultWidth=10;La.prototype.defaultArrowWidth=20;La.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style, +"startWidth",this.defaultArrowWidth)};La.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};La.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",La);mxUtils.extend(Da,mxActor);Da.prototype.size=30;Da.prototype.isRoundable=function(){return!0};Da.prototype.redrawPath=function(c,l,v,n,t){l=Math.min(t,parseFloat(mxUtils.getValue(this.style, +"size",this.size)));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,t),new mxPoint(0,l),new mxPoint(n,0),new mxPoint(n,t)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("manualInput",Da);mxUtils.extend(Sa,mxRectangleShape);Sa.prototype.dx=20;Sa.prototype.dy=20;Sa.prototype.isHtmlAllowed=function(){return!1};Sa.prototype.paintForeground=function(c,l,v,n,t){mxRectangleShape.prototype.paintForeground.apply(this,arguments); +var A=0;if(this.isRounded){var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;A=Math.max(A,Math.min(n*B,t*B))}B=Math.max(A,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(A,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(l,v+A);c.lineTo(l+n,v+A);c.end();c.stroke();c.begin();c.moveTo(l+B,v);c.lineTo(l+B,v+t);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Sa); +mxUtils.extend(Ra,mxActor);Ra.prototype.dx=20;Ra.prototype.dy=20;Ra.prototype.redrawPath=function(c,l,v,n,t){l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));v=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,v),new mxPoint(l,v), +new mxPoint(l,t),new mxPoint(0,t)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",Ra);mxUtils.extend(Ta,mxActor);Ta.prototype.redrawPath=function(c,l,v,n,t){c.moveTo(0,0);c.lineTo(0,t);c.end();c.moveTo(n,0);c.lineTo(n,t);c.end();c.moveTo(0,t/2);c.lineTo(n,t/2);c.end()};mxCellRenderer.registerShape("crossbar",Ta);mxUtils.extend(Za,mxActor);Za.prototype.dx=20;Za.prototype.dy=20;Za.prototype.redrawPath=function(c,l,v,n,t){l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style, +"dx",this.dx))));v=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,v),new mxPoint((n+l)/2,v),new mxPoint((n+l)/2,t),new mxPoint((n-l)/2,t),new mxPoint((n-l)/2,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("tee",Za);mxUtils.extend(Na, +mxActor);Na.prototype.arrowWidth=.3;Na.prototype.arrowSize=.2;Na.prototype.redrawPath=function(c,l,v,n,t){var A=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));v=(t-A)/2;A=v+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(n-l,v),new mxPoint(n-l,0),new mxPoint(n,t/2),new mxPoint(n- +l,t),new mxPoint(n-l,A),new mxPoint(0,A)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("singleArrow",Na);mxUtils.extend(z,mxActor);z.prototype.redrawPath=function(c,l,v,n,t){var A=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Na.prototype.arrowWidth))));l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Na.prototype.arrowSize))));v=(t-A)/2;A=v+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/ +2;this.addPoints(c,[new mxPoint(0,t/2),new mxPoint(l,0),new mxPoint(l,v),new mxPoint(n-l,v),new mxPoint(n-l,0),new mxPoint(n,t/2),new mxPoint(n-l,t),new mxPoint(n-l,A),new mxPoint(l,A),new mxPoint(l,t)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",z);mxUtils.extend(L,mxActor);L.prototype.size=.1;L.prototype.fixedSize=20;L.prototype.redrawPath=function(c,l,v,n,t){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style, +"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(l,0);c.lineTo(n,0);c.quadTo(n-2*l,t/2,n,t);c.lineTo(l,t);c.quadTo(l-2*l,t/2,l,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",L);mxUtils.extend(O,mxActor);O.prototype.redrawPath=function(c,l,v,n,t){c.moveTo(0,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,0,t);c.close();c.end()};mxCellRenderer.registerShape("or",O);mxUtils.extend(V,mxActor);V.prototype.redrawPath=function(c, +l,v,n,t){c.moveTo(0,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,0,t);c.quadTo(n/2,t/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",V);mxUtils.extend(U,mxActor);U.prototype.size=20;U.prototype.isRoundable=function(){return!0};U.prototype.redrawPath=function(c,l,v,n,t){l=Math.min(n/2,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(n-l,0),new mxPoint(n, +.8*l),new mxPoint(n,t),new mxPoint(0,t),new mxPoint(0,.8*l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("loopLimit",U);mxUtils.extend(ha,mxActor);ha.prototype.size=.375;ha.prototype.isRoundable=function(){return!0};ha.prototype.redrawPath=function(c,l,v,n,t){l=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n, +t-l),new mxPoint(n/2,t),new mxPoint(0,t-l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",ha);mxUtils.extend(ma,mxEllipse);ma.prototype.paintVertexShape=function(c,l,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/2,v+t);c.lineTo(l+n,v+t);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",ma);mxUtils.extend(wa,mxEllipse);wa.prototype.paintVertexShape=function(c,l,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this, +arguments);c.setShadow(!1);c.begin();c.moveTo(l,v+t/2);c.lineTo(l+n,v+t/2);c.end();c.stroke();c.begin();c.moveTo(l+n/2,v);c.lineTo(l+n/2,v+t);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",wa);mxUtils.extend(sa,mxEllipse);sa.prototype.paintVertexShape=function(c,l,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l+.145*n,v+.145*t);c.lineTo(l+.855*n,v+.855*t);c.end();c.stroke();c.begin();c.moveTo(l+.855*n,v+.145*t);c.lineTo(l+.145*n, +v+.855*t);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",sa);mxUtils.extend(ya,mxRhombus);ya.prototype.paintVertexShape=function(c,l,v,n,t){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,v+t/2);c.lineTo(l+n,v+t/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ya);mxUtils.extend(Ha,mxEllipse);Ha.prototype.paintVertexShape=function(c,l,v,n,t){c.begin();c.moveTo(l,v);c.lineTo(l+n,v);c.lineTo(l+n/2,v+t/2);c.close();c.fillAndStroke(); +c.begin();c.moveTo(l,v+t);c.lineTo(l+n,v+t);c.lineTo(l+n/2,v+t/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",Ha);mxUtils.extend(Qa,mxEllipse);Qa.prototype.paintVertexShape=function(c,l,v,n,t){var A=c.state.strokeWidth/2,B=10+2*A,da=v+t-B/2;c.begin();c.moveTo(l,v);c.lineTo(l,v+t);c.moveTo(l+A,da);c.lineTo(l+A+B,da-B/2);c.moveTo(l+A,da);c.lineTo(l+A+B,da+B/2);c.moveTo(l+A,da);c.lineTo(l+n-A,da);c.moveTo(l+n,v);c.lineTo(l+n,v+t);c.moveTo(l+n-A,da);c.lineTo(l+n-B-A,da-B/2);c.moveTo(l+ +n-A,da);c.lineTo(l+n-B-A,da+B/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Qa);mxUtils.extend(ua,mxEllipse);ua.prototype.drawHidden=!0;ua.prototype.paintVertexShape=function(c,l,v,n,t){this.outline||c.setStrokeColor(null);if(null!=this.style){var A=c.pointerEvents,B=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||B||(c.pointerEvents=!1);var da="1"==mxUtils.getValue(this.style,"top","1"),I="1"==mxUtils.getValue(this.style, +"left","1"),va="1"==mxUtils.getValue(this.style,"right","1"),na="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||B||this.outline||da||va||na||I?(c.rect(l,v,n,t),c.fill(),c.pointerEvents=A,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,v),this.outline||da?c.lineTo(l+n,v):c.moveTo(l+n,v),this.outline||va?c.lineTo(l+n,v+t):c.moveTo(l+n,v+t),this.outline||na?c.lineTo(l,v+t):c.moveTo(l,v+t),(this.outline||I)&&c.lineTo(l,v),c.end(),c.stroke(),c.setLineCap("flat")): +c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",ua);mxUtils.extend(za,mxEllipse);za.prototype.paintVertexShape=function(c,l,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(l+n/2,v),c.lineTo(l+n/2,v+t)):(c.moveTo(l,v+t/2),c.lineTo(l+n,v+t/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",za);mxUtils.extend(Fa,mxActor);Fa.prototype.redrawPath=function(c, +l,v,n,t){l=Math.min(n,t/2);c.moveTo(0,0);c.lineTo(n-l,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,n-l,t);c.lineTo(0,t);c.close();c.end()};mxCellRenderer.registerShape("delay",Fa);mxUtils.extend(Ba,mxActor);Ba.prototype.size=.2;Ba.prototype.redrawPath=function(c,l,v,n,t){l=Math.min(t,n);var A=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(t-A)/2;v=l+A;var B=(n-A)/2;A=B+A;c.moveTo(0,l);c.lineTo(B,l);c.lineTo(B,0);c.lineTo(A,0);c.lineTo(A,l);c.lineTo(n,l);c.lineTo(n,v); +c.lineTo(A,v);c.lineTo(A,t);c.lineTo(B,t);c.lineTo(B,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("cross",Ba);mxUtils.extend(Ea,mxActor);Ea.prototype.size=.25;Ea.prototype.redrawPath=function(c,l,v,n,t){l=Math.min(n,t/2);v=Math.min(n-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*n);c.moveTo(0,t/2);c.lineTo(v,0);c.lineTo(n-l,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,n-l,t);c.lineTo(v,t);c.close();c.end()};mxCellRenderer.registerShape("display",Ea);mxUtils.extend(Oa, +mxActor);Oa.prototype.cst={RECT2:"mxgraph.basic.rect"};Oa.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float", defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",dispName:"Frame"}]},{name:"fillColor2",dispName:"Inside Fill Color",type:"color",defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"}, {val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"}, {val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square", -dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Ga.prototype.paintVertexShape=function(c,l,v,n,t){c.translate(l, -v);this.strictDrawShape(c,0,0,n,t)};Ga.prototype.strictDrawShape=function(c,l,v,n,t,A){var B=A&&A.rectStyle?A.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ea=A&&A.absoluteCornerSize?A.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),I=A&&A.size?A.size:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),va=A&&A.rectOutline?A.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),na=A&&A.indent? -A.indent:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Xa=A&&A.dashed?A.dashed:mxUtils.getValue(this.style,"dashed",!1),jb=A&&A.dashPattern?A.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),bb=A&&A.relIndent?A.relIndent:Math.max(0,Math.min(50,na)),Ea=A&&A.top?A.top:mxUtils.getValue(this.style,"top",!0),Na=A&&A.right?A.right:mxUtils.getValue(this.style,"right",!0),Ja=A&&A.bottom?A.bottom:mxUtils.getValue(this.style,"bottom",!0),Ha=A&&A.left?A.left: -mxUtils.getValue(this.style,"left",!0),Sa=A&&A.topLeftStyle?A.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Ua=A&&A.topRightStyle?A.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Va=A&&A.bottomRightStyle?A.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Wa=A&&A.bottomLeftStyle?A.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Fb=A&&A.fillColor?A.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff"); +dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Oa.prototype.paintVertexShape=function(c,l,v,n,t){c.translate(l, +v);this.strictDrawShape(c,0,0,n,t)};Oa.prototype.strictDrawShape=function(c,l,v,n,t,A){var B=A&&A.rectStyle?A.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),da=A&&A.absoluteCornerSize?A.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),I=A&&A.size?A.size:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),va=A&&A.rectOutline?A.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),na=A&&A.indent? +A.indent:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Ya=A&&A.dashed?A.dashed:mxUtils.getValue(this.style,"dashed",!1),jb=A&&A.dashPattern?A.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),cb=A&&A.relIndent?A.relIndent:Math.max(0,Math.min(50,na)),Ga=A&&A.top?A.top:mxUtils.getValue(this.style,"top",!0),Ma=A&&A.right?A.right:mxUtils.getValue(this.style,"right",!0),Ka=A&&A.bottom?A.bottom:mxUtils.getValue(this.style,"bottom",!0),Ja=A&&A.left?A.left: +mxUtils.getValue(this.style,"left",!0),Ua=A&&A.topLeftStyle?A.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Va=A&&A.topRightStyle?A.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Wa=A&&A.bottomRightStyle?A.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Xa=A&&A.bottomLeftStyle?A.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Fb=A&&A.fillColor?A.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff"); A&&A.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Gb=A&&A.strokeWidth?A.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),Db=A&&A.fillColor2?A.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Eb=A&&A.gradientColor2?A.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Hb=A&&A.gradientDirection2?A.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Ib=A&&A.opacity?A.opacity:mxUtils.getValue(this.style,"opacity","100"), -Jb=Math.max(0,Math.min(50,I));A=Ga.prototype;c.setDashed(Xa);jb&&""!=jb&&c.setDashPattern(jb);c.setStrokeWidth(Gb);I=Math.min(.5*t,.5*n,I);ea||(I=Jb*Math.min(n,t)/100);I=Math.min(I,.5*Math.min(n,t));ea||(na=Math.min(bb*Math.min(n,t)/100));na=Math.min(na,.5*Math.min(n,t)-I);(Ea||Na||Ja||Ha)&&"frame"!=va&&(c.begin(),Ea?A.moveNW(c,l,v,n,t,B,Sa,I,Ha):c.moveTo(0,0),Ea&&A.paintNW(c,l,v,n,t,B,Sa,I,Ha),A.paintTop(c,l,v,n,t,B,Ua,I,Na),Na&&A.paintNE(c,l,v,n,t,B,Ua,I,Ea),A.paintRight(c,l,v,n,t,B,Va,I,Ja),Ja&& -A.paintSE(c,l,v,n,t,B,Va,I,Na),A.paintBottom(c,l,v,n,t,B,Wa,I,Ha),Ha&&A.paintSW(c,l,v,n,t,B,Wa,I,Ja),A.paintLeft(c,l,v,n,t,B,Sa,I,Ea),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(Db),Xa=ea=Ib,"none"==Db&&(ea=0),"none"==Eb&&(Xa=0),c.setGradient(Db,Eb,0,0,n,t,Hb,ea,Xa),c.begin(),Ea?A.moveNWInner(c,l,v,n,t,B,Sa,I,na,Ea,Ha):c.moveTo(na,0),A.paintLeftInner(c,l,v,n,t,B,Wa,I,na,Ja,Ha),Ha&&Ja&&A.paintSWInner(c,l,v,n,t,B,Wa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Va,I,na,Na,Ja),Ja&&Na&&A.paintSEInner(c, -l,v,n,t,B,Va,I,na),A.paintRightInner(c,l,v,n,t,B,Ua,I,na,Ea,Na),Na&&Ea&&A.paintNEInner(c,l,v,n,t,B,Ua,I,na),A.paintTopInner(c,l,v,n,t,B,Sa,I,na,Ha,Ea),Ea&&Ha&&A.paintNWInner(c,l,v,n,t,B,Sa,I,na),c.fill(),"none"==Fb&&(c.begin(),A.paintFolds(c,l,v,n,t,B,Sa,Ua,Va,Wa,I,Ea,Na,Ja,Ha),c.stroke()));Ea||Na||Ja||!Ha?Ea||Na||!Ja||Ha?!Ea&&!Na&&Ja&&Ha?"frame"!=va?(c.begin(),A.moveSE(c,l,v,n,t,B,Va,I,Na),A.paintBottom(c,l,v,n,t,B,Wa,I,Ha),A.paintSW(c,l,v,n,t,B,Wa,I,Ja),A.paintLeft(c,l,v,n,t,B,Sa,I,Ea),"double"== -va&&(A.moveNWInner(c,l,v,n,t,B,Sa,I,na,Ea,Ha),A.paintLeftInner(c,l,v,n,t,B,Wa,I,na,Ja,Ha),A.paintSWInner(c,l,v,n,t,B,Wa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Va,I,na,Na,Ja)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,t,B,Va,I,Na),A.paintBottom(c,l,v,n,t,B,Wa,I,Ha),A.paintSW(c,l,v,n,t,B,Wa,I,Ja),A.paintLeft(c,l,v,n,t,B,Sa,I,Ea),A.lineNWInner(c,l,v,n,t,B,Sa,I,na,Ea,Ha),A.paintLeftInner(c,l,v,n,t,B,Wa,I,na,Ja,Ha),A.paintSWInner(c,l,v,n,t,B,Wa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Va,I,na,Na,Ja),c.close(), -c.fillAndStroke()):Ea||!Na||Ja||Ha?!Ea&&Na&&!Ja&&Ha?"frame"!=va?(c.begin(),A.moveSW(c,l,v,n,t,B,Sa,I,Ja),A.paintLeft(c,l,v,n,t,B,Sa,I,Ea),"double"==va&&(A.moveNWInner(c,l,v,n,t,B,Sa,I,na,Ea,Ha),A.paintLeftInner(c,l,v,n,t,B,Wa,I,na,Ja,Ha)),c.stroke(),c.begin(),A.moveNE(c,l,v,n,t,B,Ua,I,Ea),A.paintRight(c,l,v,n,t,B,Va,I,Ja),"double"==va&&(A.moveSEInner(c,l,v,n,t,B,Va,I,na,Ja),A.paintRightInner(c,l,v,n,t,B,Ua,I,na,Ea,Na)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,t,B,Sa,I,Ja),A.paintLeft(c,l,v,n,t,B,Sa, -I,Ea),A.lineNWInner(c,l,v,n,t,B,Sa,I,na,Ea,Ha),A.paintLeftInner(c,l,v,n,t,B,Wa,I,na,Ja,Ha),c.close(),c.fillAndStroke(),c.begin(),A.moveNE(c,l,v,n,t,B,Ua,I,Ea),A.paintRight(c,l,v,n,t,B,Va,I,Ja),A.lineSEInner(c,l,v,n,t,B,Va,I,na,Ja),A.paintRightInner(c,l,v,n,t,B,Ua,I,na,Ea,Na),c.close(),c.fillAndStroke()):!Ea&&Na&&Ja&&!Ha?"frame"!=va?(c.begin(),A.moveNE(c,l,v,n,t,B,Ua,I,Ea),A.paintRight(c,l,v,n,t,B,Va,I,Ja),A.paintSE(c,l,v,n,t,B,Va,I,Na),A.paintBottom(c,l,v,n,t,B,Wa,I,Ha),"double"==va&&(A.moveSWInner(c, -l,v,n,t,B,Wa,I,na,Ha),A.paintBottomInner(c,l,v,n,t,B,Va,I,na,Na,Ja),A.paintSEInner(c,l,v,n,t,B,Va,I,na),A.paintRightInner(c,l,v,n,t,B,Ua,I,na,Ea,Na)),c.stroke()):(c.begin(),A.moveNE(c,l,v,n,t,B,Ua,I,Ea),A.paintRight(c,l,v,n,t,B,Va,I,Ja),A.paintSE(c,l,v,n,t,B,Va,I,Na),A.paintBottom(c,l,v,n,t,B,Wa,I,Ha),A.lineSWInner(c,l,v,n,t,B,Wa,I,na,Ha),A.paintBottomInner(c,l,v,n,t,B,Va,I,na,Na,Ja),A.paintSEInner(c,l,v,n,t,B,Va,I,na),A.paintRightInner(c,l,v,n,t,B,Ua,I,na,Ea,Na),c.close(),c.fillAndStroke()):!Ea&& -Na&&Ja&&Ha?"frame"!=va?(c.begin(),A.moveNE(c,l,v,n,t,B,Ua,I,Ea),A.paintRight(c,l,v,n,t,B,Va,I,Ja),A.paintSE(c,l,v,n,t,B,Va,I,Na),A.paintBottom(c,l,v,n,t,B,Wa,I,Ha),A.paintSW(c,l,v,n,t,B,Wa,I,Ja),A.paintLeft(c,l,v,n,t,B,Sa,I,Ea),"double"==va&&(A.moveNWInner(c,l,v,n,t,B,Sa,I,na,Ea,Ha),A.paintLeftInner(c,l,v,n,t,B,Wa,I,na,Ja,Ha),A.paintSWInner(c,l,v,n,t,B,Wa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Va,I,na,Na,Ja),A.paintSEInner(c,l,v,n,t,B,Va,I,na),A.paintRightInner(c,l,v,n,t,B,Ua,I,na,Ea,Na)),c.stroke()): -(c.begin(),A.moveNE(c,l,v,n,t,B,Ua,I,Ea),A.paintRight(c,l,v,n,t,B,Va,I,Ja),A.paintSE(c,l,v,n,t,B,Va,I,Na),A.paintBottom(c,l,v,n,t,B,Wa,I,Ha),A.paintSW(c,l,v,n,t,B,Wa,I,Ja),A.paintLeft(c,l,v,n,t,B,Sa,I,Ea),A.lineNWInner(c,l,v,n,t,B,Sa,I,na,Ea,Ha),A.paintLeftInner(c,l,v,n,t,B,Wa,I,na,Ja,Ha),A.paintSWInner(c,l,v,n,t,B,Wa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Va,I,na,Na,Ja),A.paintSEInner(c,l,v,n,t,B,Va,I,na),A.paintRightInner(c,l,v,n,t,B,Ua,I,na,Ea,Na),c.close(),c.fillAndStroke()):!Ea||Na||Ja||Ha? -Ea&&!Na&&!Ja&&Ha?"frame"!=va?(c.begin(),A.moveSW(c,l,v,n,t,B,Wa,I,Ja),A.paintLeft(c,l,v,n,t,B,Sa,I,Ea),A.paintNW(c,l,v,n,t,B,Sa,I,Ha),A.paintTop(c,l,v,n,t,B,Ua,I,Na),"double"==va&&(A.moveNEInner(c,l,v,n,t,B,Ua,I,na,Na),A.paintTopInner(c,l,v,n,t,B,Sa,I,na,Ha,Ea),A.paintNWInner(c,l,v,n,t,B,Sa,I,na),A.paintLeftInner(c,l,v,n,t,B,Wa,I,na,Ja,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,t,B,Wa,I,Ja),A.paintLeft(c,l,v,n,t,B,Sa,I,Ea),A.paintNW(c,l,v,n,t,B,Sa,I,Ha),A.paintTop(c,l,v,n,t,B,Ua,I,Na),A.lineNEInner(c, -l,v,n,t,B,Ua,I,na,Na),A.paintTopInner(c,l,v,n,t,B,Sa,I,na,Ha,Ea),A.paintNWInner(c,l,v,n,t,B,Sa,I,na),A.paintLeftInner(c,l,v,n,t,B,Wa,I,na,Ja,Ha),c.close(),c.fillAndStroke()):Ea&&!Na&&Ja&&!Ha?"frame"!=va?(c.begin(),A.moveNW(c,l,v,n,t,B,Sa,I,Ha),A.paintTop(c,l,v,n,t,B,Ua,I,Na),"double"==va&&(A.moveNEInner(c,l,v,n,t,B,Ua,I,na,Na),A.paintTopInner(c,l,v,n,t,B,Sa,I,na,Ha,Ea)),c.stroke(),c.begin(),A.moveSE(c,l,v,n,t,B,Va,I,Na),A.paintBottom(c,l,v,n,t,B,Wa,I,Ha),"double"==va&&(A.moveSWInner(c,l,v,n,t,B,Wa, -I,na,Ha),A.paintBottomInner(c,l,v,n,t,B,Va,I,na,Na,Ja)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,t,B,Sa,I,Ha),A.paintTop(c,l,v,n,t,B,Ua,I,Na),A.lineNEInner(c,l,v,n,t,B,Ua,I,na,Na),A.paintTopInner(c,l,v,n,t,B,Sa,I,na,Ha,Ea),c.close(),c.fillAndStroke(),c.begin(),A.moveSE(c,l,v,n,t,B,Va,I,Na),A.paintBottom(c,l,v,n,t,B,Wa,I,Ha),A.lineSWInner(c,l,v,n,t,B,Wa,I,na,Ha),A.paintBottomInner(c,l,v,n,t,B,Va,I,na,Na,Ja),c.close(),c.fillAndStroke()):Ea&&!Na&&Ja&&Ha?"frame"!=va?(c.begin(),A.moveSE(c,l,v,n,t,B,Va, -I,Na),A.paintBottom(c,l,v,n,t,B,Wa,I,Ha),A.paintSW(c,l,v,n,t,B,Wa,I,Ja),A.paintLeft(c,l,v,n,t,B,Sa,I,Ea),A.paintNW(c,l,v,n,t,B,Sa,I,Ha),A.paintTop(c,l,v,n,t,B,Ua,I,Na),"double"==va&&(A.moveNEInner(c,l,v,n,t,B,Ua,I,na,Na),A.paintTopInner(c,l,v,n,t,B,Sa,I,na,Ha,Ea),A.paintNWInner(c,l,v,n,t,B,Sa,I,na),A.paintLeftInner(c,l,v,n,t,B,Wa,I,na,Ja,Ha),A.paintSWInner(c,l,v,n,t,B,Wa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Va,I,na,Na,Ja)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,t,B,Va,I,Na),A.paintBottom(c,l, -v,n,t,B,Wa,I,Ha),A.paintSW(c,l,v,n,t,B,Wa,I,Ja),A.paintLeft(c,l,v,n,t,B,Sa,I,Ea),A.paintNW(c,l,v,n,t,B,Sa,I,Ha),A.paintTop(c,l,v,n,t,B,Ua,I,Na),A.lineNEInner(c,l,v,n,t,B,Ua,I,na,Na),A.paintTopInner(c,l,v,n,t,B,Sa,I,na,Ha,Ea),A.paintNWInner(c,l,v,n,t,B,Sa,I,na),A.paintLeftInner(c,l,v,n,t,B,Wa,I,na,Ja,Ha),A.paintSWInner(c,l,v,n,t,B,Wa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Va,I,na,Na,Ja),c.close(),c.fillAndStroke()):Ea&&Na&&!Ja&&!Ha?"frame"!=va?(c.begin(),A.moveNW(c,l,v,n,t,B,Sa,I,Ha),A.paintTop(c, -l,v,n,t,B,Ua,I,Na),A.paintNE(c,l,v,n,t,B,Ua,I,Ea),A.paintRight(c,l,v,n,t,B,Va,I,Ja),"double"==va&&(A.moveSEInner(c,l,v,n,t,B,Va,I,na,Ja),A.paintRightInner(c,l,v,n,t,B,Ua,I,na,Ea,Na),A.paintNEInner(c,l,v,n,t,B,Ua,I,na),A.paintTopInner(c,l,v,n,t,B,Sa,I,na,Ha,Ea)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,t,B,Sa,I,Ha),A.paintTop(c,l,v,n,t,B,Ua,I,Na),A.paintNE(c,l,v,n,t,B,Ua,I,Ea),A.paintRight(c,l,v,n,t,B,Va,I,Ja),A.lineSEInner(c,l,v,n,t,B,Va,I,na,Ja),A.paintRightInner(c,l,v,n,t,B,Ua,I,na,Ea,Na),A.paintNEInner(c, -l,v,n,t,B,Ua,I,na),A.paintTopInner(c,l,v,n,t,B,Sa,I,na,Ha,Ea),c.close(),c.fillAndStroke()):Ea&&Na&&!Ja&&Ha?"frame"!=va?(c.begin(),A.moveSW(c,l,v,n,t,B,Wa,I,Ja),A.paintLeft(c,l,v,n,t,B,Sa,I,Ea),A.paintNW(c,l,v,n,t,B,Sa,I,Ha),A.paintTop(c,l,v,n,t,B,Ua,I,Na),A.paintNE(c,l,v,n,t,B,Ua,I,Ea),A.paintRight(c,l,v,n,t,B,Va,I,Ja),"double"==va&&(A.moveSEInner(c,l,v,n,t,B,Va,I,na,Ja),A.paintRightInner(c,l,v,n,t,B,Ua,I,na,Ea,Na),A.paintNEInner(c,l,v,n,t,B,Ua,I,na),A.paintTopInner(c,l,v,n,t,B,Sa,I,na,Ha,Ea),A.paintNWInner(c, -l,v,n,t,B,Sa,I,na),A.paintLeftInner(c,l,v,n,t,B,Wa,I,na,Ja,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,t,B,Wa,I,Ja),A.paintLeft(c,l,v,n,t,B,Sa,I,Ea),A.paintNW(c,l,v,n,t,B,Sa,I,Ha),A.paintTop(c,l,v,n,t,B,Ua,I,Na),A.paintNE(c,l,v,n,t,B,Ua,I,Ea),A.paintRight(c,l,v,n,t,B,Va,I,Ja),A.lineSEInner(c,l,v,n,t,B,Va,I,na,Ja),A.paintRightInner(c,l,v,n,t,B,Ua,I,na,Ea,Na),A.paintNEInner(c,l,v,n,t,B,Ua,I,na),A.paintTopInner(c,l,v,n,t,B,Sa,I,na,Ha,Ea),A.paintNWInner(c,l,v,n,t,B,Sa,I,na),A.paintLeftInner(c,l,v,n, -t,B,Wa,I,na,Ja,Ha),c.close(),c.fillAndStroke()):Ea&&Na&&Ja&&!Ha?"frame"!=va?(c.begin(),A.moveNW(c,l,v,n,t,B,Sa,I,Ha),A.paintTop(c,l,v,n,t,B,Ua,I,Na),A.paintNE(c,l,v,n,t,B,Ua,I,Ea),A.paintRight(c,l,v,n,t,B,Va,I,Ja),A.paintSE(c,l,v,n,t,B,Va,I,Na),A.paintBottom(c,l,v,n,t,B,Wa,I,Ha),"double"==va&&(A.moveSWInner(c,l,v,n,t,B,Wa,I,na,Ha),A.paintBottomInner(c,l,v,n,t,B,Va,I,na,Na,Ja),A.paintSEInner(c,l,v,n,t,B,Va,I,na),A.paintRightInner(c,l,v,n,t,B,Ua,I,na,Ea,Na),A.paintNEInner(c,l,v,n,t,B,Ua,I,na),A.paintTopInner(c, -l,v,n,t,B,Sa,I,na,Ha,Ea)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,t,B,Sa,I,Ha),A.paintTop(c,l,v,n,t,B,Ua,I,Na),A.paintNE(c,l,v,n,t,B,Ua,I,Ea),A.paintRight(c,l,v,n,t,B,Va,I,Ja),A.paintSE(c,l,v,n,t,B,Va,I,Na),A.paintBottom(c,l,v,n,t,B,Wa,I,Ha),A.lineSWInner(c,l,v,n,t,B,Wa,I,na,Ha),A.paintBottomInner(c,l,v,n,t,B,Va,I,na,Na,Ja),A.paintSEInner(c,l,v,n,t,B,Va,I,na),A.paintRightInner(c,l,v,n,t,B,Ua,I,na,Ea,Na),A.paintNEInner(c,l,v,n,t,B,Ua,I,na),A.paintTopInner(c,l,v,n,t,B,Sa,I,na,Ha,Ea),c.close(),c.fillAndStroke()): -Ea&&Na&&Ja&&Ha&&("frame"!=va?(c.begin(),A.moveNW(c,l,v,n,t,B,Sa,I,Ha),A.paintNW(c,l,v,n,t,B,Sa,I,Ha),A.paintTop(c,l,v,n,t,B,Ua,I,Na),A.paintNE(c,l,v,n,t,B,Ua,I,Ea),A.paintRight(c,l,v,n,t,B,Va,I,Ja),A.paintSE(c,l,v,n,t,B,Va,I,Na),A.paintBottom(c,l,v,n,t,B,Wa,I,Ha),A.paintSW(c,l,v,n,t,B,Wa,I,Ja),A.paintLeft(c,l,v,n,t,B,Sa,I,Ea),c.close(),"double"==va&&(A.moveSWInner(c,l,v,n,t,B,Wa,I,na,Ha),A.paintSWInner(c,l,v,n,t,B,Wa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Va,I,na,Na,Ja),A.paintSEInner(c,l,v,n,t, -B,Va,I,na),A.paintRightInner(c,l,v,n,t,B,Ua,I,na,Ea,Na),A.paintNEInner(c,l,v,n,t,B,Ua,I,na),A.paintTopInner(c,l,v,n,t,B,Sa,I,na,Ha,Ea),A.paintNWInner(c,l,v,n,t,B,Sa,I,na),A.paintLeftInner(c,l,v,n,t,B,Wa,I,na,Ja,Ha),c.close()),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,t,B,Sa,I,Ha),A.paintNW(c,l,v,n,t,B,Sa,I,Ha),A.paintTop(c,l,v,n,t,B,Ua,I,Na),A.paintNE(c,l,v,n,t,B,Ua,I,Ea),A.paintRight(c,l,v,n,t,B,Va,I,Ja),A.paintSE(c,l,v,n,t,B,Va,I,Na),A.paintBottom(c,l,v,n,t,B,Wa,I,Ha),A.paintSW(c,l,v,n,t,B,Wa,I,Ja), -A.paintLeft(c,l,v,n,t,B,Sa,I,Ea),c.close(),A.moveSWInner(c,l,v,n,t,B,Wa,I,na,Ha),A.paintSWInner(c,l,v,n,t,B,Wa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Va,I,na,Na,Ja),A.paintSEInner(c,l,v,n,t,B,Va,I,na),A.paintRightInner(c,l,v,n,t,B,Ua,I,na,Ea,Na),A.paintNEInner(c,l,v,n,t,B,Ua,I,na),A.paintTopInner(c,l,v,n,t,B,Sa,I,na,Ha,Ea),A.paintNWInner(c,l,v,n,t,B,Sa,I,na),A.paintLeftInner(c,l,v,n,t,B,Wa,I,na,Ja,Ha),c.close(),c.fillAndStroke())):"frame"!=va?(c.begin(),A.moveNW(c,l,v,n,t,B,Sa,I,Ha),A.paintTop(c, -l,v,n,t,B,Ua,I,Na),"double"==va&&(A.moveNEInner(c,l,v,n,t,B,Ua,I,na,Na),A.paintTopInner(c,l,v,n,t,B,Sa,I,na,Ha,Ea)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,t,B,Sa,I,Ha),A.paintTop(c,l,v,n,t,B,Ua,I,Na),A.lineNEInner(c,l,v,n,t,B,Ua,I,na,Na),A.paintTopInner(c,l,v,n,t,B,Sa,I,na,Ha,Ea),c.close(),c.fillAndStroke()):"frame"!=va?(c.begin(),A.moveNE(c,l,v,n,t,B,Ua,I,Ea),A.paintRight(c,l,v,n,t,B,Va,I,Ja),"double"==va&&(A.moveSEInner(c,l,v,n,t,B,Va,I,na,Ja),A.paintRightInner(c,l,v,n,t,B,Ua,I,na,Ea,Na)),c.stroke()): -(c.begin(),A.moveNE(c,l,v,n,t,B,Ua,I,Ea),A.paintRight(c,l,v,n,t,B,Va,I,Ja),A.lineSEInner(c,l,v,n,t,B,Va,I,na,Ja),A.paintRightInner(c,l,v,n,t,B,Ua,I,na,Ea,Na),c.close(),c.fillAndStroke()):"frame"!=va?(c.begin(),A.moveSE(c,l,v,n,t,B,Va,I,Na),A.paintBottom(c,l,v,n,t,B,Wa,I,Ha),"double"==va&&(A.moveSWInner(c,l,v,n,t,B,Wa,I,na,Ha),A.paintBottomInner(c,l,v,n,t,B,Va,I,na,Na,Ja)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,t,B,Va,I,Na),A.paintBottom(c,l,v,n,t,B,Wa,I,Ha),A.lineSWInner(c,l,v,n,t,B,Wa,I,na,Ha), -A.paintBottomInner(c,l,v,n,t,B,Va,I,na,Na,Ja),c.close(),c.fillAndStroke()):"frame"!=va?(c.begin(),A.moveSW(c,l,v,n,t,B,Sa,I,Ja),A.paintLeft(c,l,v,n,t,B,Sa,I,Ea),"double"==va&&(A.moveNWInner(c,l,v,n,t,B,Sa,I,na,Ea,Ha),A.paintLeftInner(c,l,v,n,t,B,Wa,I,na,Ja,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,t,B,Sa,I,Ja),A.paintLeft(c,l,v,n,t,B,Sa,I,Ea),A.lineNWInner(c,l,v,n,t,B,Sa,I,na,Ea,Ha),A.paintLeftInner(c,l,v,n,t,B,Wa,I,na,Ja,Ha),c.close(),c.fillAndStroke());c.begin();A.paintFolds(c,l,v,n,t,B,Sa,Ua, -Va,Wa,I,Ea,Na,Ja,Ha);c.stroke()};Ga.prototype.moveNW=function(c,l,v,n,t,A,B,ea,I){"square"==B||"default"==B&&"square"==A||!I?c.moveTo(0,0):c.moveTo(0,ea)};Ga.prototype.moveNE=function(c,l,v,n,t,A,B,ea,I){"square"==B||"default"==B&&"square"==A||!I?c.moveTo(n,0):c.moveTo(n-ea,0)};Ga.prototype.moveSE=function(c,l,v,n,t,A,B,ea,I){"square"==B||"default"==B&&"square"==A||!I?c.moveTo(n,t):c.moveTo(n,t-ea)};Ga.prototype.moveSW=function(c,l,v,n,t,A,B,ea,I){"square"==B||"default"==B&&"square"==A||!I?c.moveTo(0, -t):c.moveTo(ea,t)};Ga.prototype.paintNW=function(c,l,v,n,t,A,B,ea,I){if(I)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ea,ea,0,0,l,ea,0)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(ea,0);else c.lineTo(0,0)};Ga.prototype.paintTop=function(c,l,v,n,t,A,B,ea,I){"square"==B||"default"==B&&"square"==A||!I?c.lineTo(n,0):c.lineTo(n-ea,0)};Ga.prototype.paintNE= -function(c,l,v,n,t,A,B,ea,I){if(I)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ea,ea,0,0,l,n,ea)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n,ea);else c.lineTo(n,0)};Ga.prototype.paintRight=function(c,l,v,n,t,A,B,ea,I){"square"==B||"default"==B&&"square"==A||!I?c.lineTo(n,t):c.lineTo(n,t-ea)};Ga.prototype.paintLeft=function(c,l,v,n,t,A,B,ea,I){"square"== -B||"default"==B&&"square"==A||!I?c.lineTo(0,0):c.lineTo(0,ea)};Ga.prototype.paintSE=function(c,l,v,n,t,A,B,ea,I){if(I)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ea,ea,0,0,l,n-ea,t)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-ea,t);else c.lineTo(n,t)};Ga.prototype.paintBottom=function(c,l,v,n,t,A,B,ea,I){"square"==B||"default"==B&&"square"==A||!I?c.lineTo(0, -t):c.lineTo(ea,t)};Ga.prototype.paintSW=function(c,l,v,n,t,A,B,ea,I){if(I)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ea,ea,0,0,l,0,t-ea)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(0,t-ea);else c.lineTo(0,t)};Ga.prototype.paintNWInner=function(c,l,v,n,t,A,B,ea,I){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ea-.5*I,ea-.5*I,0,0,0,I,.5*I+ea);else if("invRound"== -B||"default"==B&&"invRound"==A)c.arcTo(ea+I,ea+I,0,0,1,I,I+ea);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(I,.5*I+ea);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(I+ea,I+ea),c.lineTo(I,I+ea)};Ga.prototype.paintTopInner=function(c,l,v,n,t,A,B,ea,I,va,na){va||na?!va&&na?c.lineTo(0,I):va&&!na?c.lineTo(I,0):va?"square"==B||"default"==B&&"square"==A?c.lineTo(I,I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(ea+.5*I,I):c.lineTo(ea+I,I):c.lineTo(0, -I):c.lineTo(0,0)};Ga.prototype.paintNEInner=function(c,l,v,n,t,A,B,ea,I){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ea-.5*I,ea-.5*I,0,0,0,n-ea-.5*I,I);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ea+I,ea+I,0,0,1,n-ea-I,I);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(n-ea-.5*I,I);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(n-ea-I,ea+I),c.lineTo(n-ea-I,I)};Ga.prototype.paintRightInner=function(c,l,v,n,t,A,B,ea,I,va,na){va||na?!va&&na?c.lineTo(n-I,0):va&&!na?c.lineTo(n, -I):va?"square"==B||"default"==B&&"square"==A?c.lineTo(n-I,I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-I,ea+.5*I):c.lineTo(n-I,ea+I):c.lineTo(n-I,0):c.lineTo(n,0)};Ga.prototype.paintLeftInner=function(c,l,v,n,t,A,B,ea,I,va,na){va||na?!va&&na?c.lineTo(I,t):va&&!na?c.lineTo(0,t-I):va?"square"==B||"default"==B&&"square"==A?c.lineTo(I,t-I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(I,t-ea-.5*I):c.lineTo(I,t-ea-I): -c.lineTo(I,t):c.lineTo(0,t)};Ga.prototype.paintSEInner=function(c,l,v,n,t,A,B,ea,I){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ea-.5*I,ea-.5*I,0,0,0,n-I,t-ea-.5*I);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ea+I,ea+I,0,0,1,n-I,t-ea-I);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(n-I,t-ea-.5*I);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(n-ea-I,t-ea-I),c.lineTo(n-I,t-ea-I)};Ga.prototype.paintBottomInner=function(c,l,v,n,t,A,B,ea,I,va,na){va||na?!va&&na?c.lineTo(n, -t-I):va&&!na?c.lineTo(n-I,t):"square"==B||"default"==B&&"square"==A||!va?c.lineTo(n-I,t-I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-ea-.5*I,t-I):c.lineTo(n-ea-I,t-I):c.lineTo(n,t)};Ga.prototype.paintSWInner=function(c,l,v,n,t,A,B,ea,I,va){if(!va)c.lineTo(I,t);else if("square"==B||"default"==B&&"square"==A)c.lineTo(I,t-I);else if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ea-.5*I,ea-.5*I,0,0,0,ea+.5*I,t-I);else if("invRound"==B||"default"==B&&"invRound"== -A)c.arcTo(ea+I,ea+I,0,0,1,ea+I,t-I);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(ea+.5*I,t-I);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(I+ea,t-ea-I),c.lineTo(I+ea,t-I)};Ga.prototype.moveSWInner=function(c,l,v,n,t,A,B,ea,I,va){va?"square"==B||"default"==B&&"square"==A?c.moveTo(I,t-I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(I,t-ea-.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(I,t-ea-I): -c.moveTo(0,t-I)};Ga.prototype.lineSWInner=function(c,l,v,n,t,A,B,ea,I,va){va?"square"==B||"default"==B&&"square"==A?c.lineTo(I,t-I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(I,t-ea-.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(I,t-ea-I):c.lineTo(0,t-I)};Ga.prototype.moveSEInner=function(c,l,v,n,t,A,B,ea,I,va){va?"square"==B||"default"==B&&"square"==A?c.moveTo(n-I,t-I):"rounded"==B||"default"==B&&"rounded"== -A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(n-I,t-ea-.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(n-I,t-ea-I):c.moveTo(n-I,t)};Ga.prototype.lineSEInner=function(c,l,v,n,t,A,B,ea,I,va){va?"square"==B||"default"==B&&"square"==A?c.lineTo(n-I,t-I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-I,t-ea-.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-I,t-ea-I): -c.lineTo(n-I,t)};Ga.prototype.moveNEInner=function(c,l,v,n,t,A,B,ea,I,va){va?"square"==B||"default"==B&&"square"==A||va?c.moveTo(n-I,I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(n-I,ea+.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(n-I,ea+I):c.moveTo(n,I)};Ga.prototype.lineNEInner=function(c,l,v,n,t,A,B,ea,I,va){va?"square"==B||"default"==B&&"square"==A||va?c.lineTo(n-I,I):"rounded"==B||"default"==B&&"rounded"== -A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-I,ea+.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-I,ea+I):c.lineTo(n,I)};Ga.prototype.moveNWInner=function(c,l,v,n,t,A,B,ea,I,va,na){va||na?!va&&na?c.moveTo(I,0):va&&!na?c.moveTo(0,I):"square"==B||"default"==B&&"square"==A?c.moveTo(I,I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(I,ea+.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"== -B&&"fold"==A)&&c.moveTo(I,ea+I):c.moveTo(0,0)};Ga.prototype.lineNWInner=function(c,l,v,n,t,A,B,ea,I,va,na){va||na?!va&&na?c.lineTo(I,0):va&&!na?c.lineTo(0,I):"square"==B||"default"==B&&"square"==A?c.lineTo(I,I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(I,ea+.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(I,ea+I):c.lineTo(0,0)};Ga.prototype.paintFolds=function(c,l,v,n,t,A,B,ea,I,va,na,Xa,jb,bb,Ea){if("fold"== -A||"fold"==B||"fold"==ea||"fold"==I||"fold"==va)("fold"==B||"default"==B&&"fold"==A)&&Xa&&Ea&&(c.moveTo(0,na),c.lineTo(na,na),c.lineTo(na,0)),("fold"==ea||"default"==ea&&"fold"==A)&&Xa&&jb&&(c.moveTo(n-na,0),c.lineTo(n-na,na),c.lineTo(n,na)),("fold"==I||"default"==I&&"fold"==A)&&bb&&jb&&(c.moveTo(n-na,t),c.lineTo(n-na,t-na),c.lineTo(n,t-na)),("fold"==va||"default"==va&&"fold"==A)&&bb&&Ea&&(c.moveTo(0,t-na),c.lineTo(na,t-na),c.lineTo(na,t))};mxCellRenderer.registerShape(Ga.prototype.cst.RECT2,Ga); -Ga.prototype.constraints=null;mxUtils.extend(Ya,mxConnector);Ya.prototype.origPaintEdgeShape=Ya.prototype.paintEdgeShape;Ya.prototype.paintEdgeShape=function(c,l,v){for(var n=[],t=0;t<l.length;t++)n.push(mxUtils.clone(l[t]));t=c.state.dashed;var A=c.state.fixDash;Ya.prototype.origPaintEdgeShape.apply(this,[c,n,v]);3<=c.state.strokeWidth&&(n=mxUtils.getValue(this.style,"fillColor",null),null!=n&&(c.setStrokeColor(n),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(t,A),Ya.prototype.origPaintEdgeShape.apply(this, -[c,l,v])))};mxCellRenderer.registerShape("filledEdge",Ya);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),v=c.apply(this,arguments);"umlFrame"==l.style.shape&&v.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return v}}();mxMarker.addMarker("dash",function(c,l,v,n,t,A,B,ea,I,va){var na=t*(B+I+1),Xa=A*(B+I+1);return function(){c.begin(); -c.moveTo(n.x-na/2-Xa/2,n.y-Xa/2+na/2);c.lineTo(n.x+Xa/2-3*na/2,n.y-3*Xa/2-na/2);c.stroke()}});mxMarker.addMarker("box",function(c,l,v,n,t,A,B,ea,I,va){var na=t*(B+I+1),Xa=A*(B+I+1),jb=n.x+na/2,bb=n.y+Xa/2;n.x-=na;n.y-=Xa;return function(){c.begin();c.moveTo(jb-na/2-Xa/2,bb-Xa/2+na/2);c.lineTo(jb-na/2+Xa/2,bb-Xa/2-na/2);c.lineTo(jb+Xa/2-3*na/2,bb-3*Xa/2-na/2);c.lineTo(jb-Xa/2-3*na/2,bb-3*Xa/2+na/2);c.close();va?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,v,n,t,A,B,ea,I, -va){var na=t*(B+I+1),Xa=A*(B+I+1);return function(){c.begin();c.moveTo(n.x-na/2-Xa/2,n.y-Xa/2+na/2);c.lineTo(n.x+Xa/2-3*na/2,n.y-3*Xa/2-na/2);c.moveTo(n.x-na/2+Xa/2,n.y-Xa/2-na/2);c.lineTo(n.x-Xa/2-3*na/2,n.y-3*Xa/2+na/2);c.stroke()}});mxMarker.addMarker("circle",db);mxMarker.addMarker("circlePlus",function(c,l,v,n,t,A,B,ea,I,va){var na=n.clone(),Xa=db.apply(this,arguments),jb=t*(B+2*I),bb=A*(B+2*I);return function(){Xa.apply(this,arguments);c.begin();c.moveTo(na.x-t*I,na.y-A*I);c.lineTo(na.x-2*jb+ -t*I,na.y-2*bb+A*I);c.moveTo(na.x-jb-bb+A*I,na.y-bb+jb-t*I);c.lineTo(na.x+bb-jb-A*I,na.y-bb-jb+t*I);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,l,v,n,t,A,B,ea,I,va){var na=t*(B+I+1),Xa=A*(B+I+1),jb=n.clone();n.x-=na;n.y-=Xa;return function(){c.begin();c.moveTo(jb.x-Xa,jb.y+na);c.quadTo(n.x-Xa,n.y+na,n.x,n.y);c.quadTo(n.x+Xa,n.y-na,jb.x+Xa,jb.y-na);c.stroke()}});mxMarker.addMarker("async",function(c,l,v,n,t,A,B,ea,I,va){l=t*I*1.118;v=A*I*1.118;t*=B+I;A*=B+I;var na=n.clone();na.x-=l;na.y-= -v;n.x+=-t-l;n.y+=-A-v;return function(){c.begin();c.moveTo(na.x,na.y);ea?c.lineTo(na.x-t-A/2,na.y-A+t/2):c.lineTo(na.x+A/2-t,na.y-A-t/2);c.lineTo(na.x-t,na.y-A);c.close();va?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,v,n,t,A,B,ea,I,va,na){A*=ea+va;B*=ea+va;var Xa=t.clone();return function(){l.begin();l.moveTo(Xa.x,Xa.y);I?l.lineTo(Xa.x-A-B/c,Xa.y-B+A/c):l.lineTo(Xa.x+B/c-A,Xa.y-B-A/c);l.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var ib= -function(c,l,v){return gb(c,["width"],l,function(n,t,A,B,ea){ea=c.shape.getEdgeWidth()*c.view.scale+v;return new mxPoint(B.x+t*n/4+A*ea/2,B.y+A*n/4-t*ea/2)},function(n,t,A,B,ea,I){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ea.x,ea.y,I.x,I.y));c.style.width=Math.round(2*n)/c.view.scale-v})},gb=function(c,l,v,n,t){return hb(c,l,function(A){var B=c.absolutePoints,ea=B.length-1;A=c.view.translate;var I=c.view.scale,va=v?B[0]:B[ea];B=v?B[1]:B[ea-1];ea=B.x-va.x;var na=B.y-va.y,Xa=Math.sqrt(ea*ea+na*na);va= -n.call(this,Xa,ea/Xa,na/Xa,va,B);return new mxPoint(va.x/I-A.x,va.y/I-A.y)},function(A,B,ea){var I=c.absolutePoints,va=I.length-1;A=c.view.translate;var na=c.view.scale,Xa=v?I[0]:I[va];I=v?I[1]:I[va-1];va=I.x-Xa.x;var jb=I.y-Xa.y,bb=Math.sqrt(va*va+jb*jb);B.x=(B.x+A.x)*na;B.y=(B.y+A.y)*na;t.call(this,bb,va/bb,jb/bb,Xa,I,B,ea)})},qb=function(c,l){return function(v){return[gb(v,["startWidth"],!0,function(n,t,A,B,ea){ea=mxUtils.getNumber(v.style,"startWidth",c)*v.view.scale+l;return new mxPoint(B.x+ -t*n/4+A*ea/2,B.y+A*n/4-t*ea/2)},function(n,t,A,B,ea,I){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ea.x,ea.y,I.x,I.y));v.style.startWidth=Math.round(2*n)/v.view.scale-l})]}},nb=function(c){return function(l){return[hb(l,["arrowWidth","arrowSize"],function(v){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Pa.prototype.arrowWidth))),t=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",Pa.prototype.arrowSize)));return new mxPoint(v.x+(1-t)*v.width,v.y+(1-n)*v.height/ +Jb=Math.max(0,Math.min(50,I));A=Oa.prototype;c.setDashed(Ya);jb&&""!=jb&&c.setDashPattern(jb);c.setStrokeWidth(Gb);I=Math.min(.5*t,.5*n,I);da||(I=Jb*Math.min(n,t)/100);I=Math.min(I,.5*Math.min(n,t));da||(na=Math.min(cb*Math.min(n,t)/100));na=Math.min(na,.5*Math.min(n,t)-I);(Ga||Ma||Ka||Ja)&&"frame"!=va&&(c.begin(),Ga?A.moveNW(c,l,v,n,t,B,Ua,I,Ja):c.moveTo(0,0),Ga&&A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),Ma&&A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),Ka&& +A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),Ja&&A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(Db),Ya=da=Ib,"none"==Db&&(da=0),"none"==Eb&&(Ya=0),c.setGradient(Db,Eb,0,0,n,t,Hb,da,Ya),c.begin(),Ga?A.moveNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja):c.moveTo(na,0),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),Ja&&Ka&&A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),Ka&&Ma&&A.paintSEInner(c, +l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),Ma&&Ga&&A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),Ga&&Ja&&A.paintNWInner(c,l,v,n,t,B,Ua,I,na),c.fill(),"none"==Fb&&(c.begin(),A.paintFolds(c,l,v,n,t,B,Ua,Va,Wa,Xa,I,Ga,Ma,Ka,Ja),c.stroke()));Ga||Ma||Ka||!Ja?Ga||Ma||!Ka||Ja?!Ga&&!Ma&&Ka&&Ja?"frame"!=va?(c.begin(),A.moveSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),"double"== +va&&(A.moveNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.lineNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),c.close(), +c.fillAndStroke()):Ga||!Ma||Ka||Ja?!Ga&&Ma&&!Ka&&Ja?"frame"!=va?(c.begin(),A.moveSW(c,l,v,n,t,B,Ua,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),"double"==va&&(A.moveNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja)),c.stroke(),c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),"double"==va&&(A.moveSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,t,B,Ua,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua, +I,Ga),A.lineNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),c.close(),c.fillAndStroke(),c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.lineSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),c.close(),c.fillAndStroke()):!Ga&&Ma&&Ka&&!Ja?"frame"!=va?(c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),"double"==va&&(A.moveSWInner(c, +l,v,n,t,B,Xa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma)),c.stroke()):(c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.lineSWInner(c,l,v,n,t,B,Xa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),c.close(),c.fillAndStroke()):!Ga&& +Ma&&Ka&&Ja?"frame"!=va?(c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),"double"==va&&(A.moveNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma)),c.stroke()): +(c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.lineNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),c.close(),c.fillAndStroke()):!Ga||Ma||Ka||Ja? +Ga&&!Ma&&!Ka&&Ja?"frame"!=va?(c.begin(),A.moveSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),"double"==va&&(A.moveNEInner(c,l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c,l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.lineNEInner(c, +l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c,l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),c.close(),c.fillAndStroke()):Ga&&!Ma&&Ka&&!Ja?"frame"!=va?(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),"double"==va&&(A.moveNEInner(c,l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga)),c.stroke(),c.begin(),A.moveSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),"double"==va&&(A.moveSWInner(c,l,v,n,t,B,Xa, +I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.lineNEInner(c,l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),c.close(),c.fillAndStroke(),c.begin(),A.moveSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.lineSWInner(c,l,v,n,t,B,Xa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),c.close(),c.fillAndStroke()):Ga&&!Ma&&Ka&&Ja?"frame"!=va?(c.begin(),A.moveSE(c,l,v,n,t,B,Wa, +I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),"double"==va&&(A.moveNEInner(c,l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c,l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l, +v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.lineNEInner(c,l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c,l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),c.close(),c.fillAndStroke()):Ga&&Ma&&!Ka&&!Ja?"frame"!=va?(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c, +l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),"double"==va&&(A.moveSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.lineSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c, +l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),c.close(),c.fillAndStroke()):Ga&&Ma&&!Ka&&Ja?"frame"!=va?(c.begin(),A.moveSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),"double"==va&&(A.moveSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c, +l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.lineSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c,l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n, +t,B,Xa,I,na,Ka,Ja),c.close(),c.fillAndStroke()):Ga&&Ma&&Ka&&!Ja?"frame"!=va?(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),"double"==va&&(A.moveSWInner(c,l,v,n,t,B,Xa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c, +l,v,n,t,B,Ua,I,na,Ja,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.lineSWInner(c,l,v,n,t,B,Xa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),c.close(),c.fillAndStroke()): +Ga&&Ma&&Ka&&Ja&&("frame"!=va?(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),c.close(),"double"==va&&(A.moveSWInner(c,l,v,n,t,B,Xa,I,na,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t, +B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c,l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),c.close()),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka), +A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),c.close(),A.moveSWInner(c,l,v,n,t,B,Xa,I,na,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c,l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),c.close(),c.fillAndStroke())):"frame"!=va?(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c, +l,v,n,t,B,Va,I,Ma),"double"==va&&(A.moveNEInner(c,l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.lineNEInner(c,l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),c.close(),c.fillAndStroke()):"frame"!=va?(c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),"double"==va&&(A.moveSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma)),c.stroke()): +(c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.lineSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),c.close(),c.fillAndStroke()):"frame"!=va?(c.begin(),A.moveSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),"double"==va&&(A.moveSWInner(c,l,v,n,t,B,Xa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.lineSWInner(c,l,v,n,t,B,Xa,I,na,Ja), +A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),c.close(),c.fillAndStroke()):"frame"!=va?(c.begin(),A.moveSW(c,l,v,n,t,B,Ua,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),"double"==va&&(A.moveNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,t,B,Ua,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.lineNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),c.close(),c.fillAndStroke());c.begin();A.paintFolds(c,l,v,n,t,B,Ua,Va, +Wa,Xa,I,Ga,Ma,Ka,Ja);c.stroke()};Oa.prototype.moveNW=function(c,l,v,n,t,A,B,da,I){"square"==B||"default"==B&&"square"==A||!I?c.moveTo(0,0):c.moveTo(0,da)};Oa.prototype.moveNE=function(c,l,v,n,t,A,B,da,I){"square"==B||"default"==B&&"square"==A||!I?c.moveTo(n,0):c.moveTo(n-da,0)};Oa.prototype.moveSE=function(c,l,v,n,t,A,B,da,I){"square"==B||"default"==B&&"square"==A||!I?c.moveTo(n,t):c.moveTo(n,t-da)};Oa.prototype.moveSW=function(c,l,v,n,t,A,B,da,I){"square"==B||"default"==B&&"square"==A||!I?c.moveTo(0, +t):c.moveTo(da,t)};Oa.prototype.paintNW=function(c,l,v,n,t,A,B,da,I){if(I)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(da,da,0,0,l,da,0)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(da,0);else c.lineTo(0,0)};Oa.prototype.paintTop=function(c,l,v,n,t,A,B,da,I){"square"==B||"default"==B&&"square"==A||!I?c.lineTo(n,0):c.lineTo(n-da,0)};Oa.prototype.paintNE= +function(c,l,v,n,t,A,B,da,I){if(I)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(da,da,0,0,l,n,da)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n,da);else c.lineTo(n,0)};Oa.prototype.paintRight=function(c,l,v,n,t,A,B,da,I){"square"==B||"default"==B&&"square"==A||!I?c.lineTo(n,t):c.lineTo(n,t-da)};Oa.prototype.paintLeft=function(c,l,v,n,t,A,B,da,I){"square"== +B||"default"==B&&"square"==A||!I?c.lineTo(0,0):c.lineTo(0,da)};Oa.prototype.paintSE=function(c,l,v,n,t,A,B,da,I){if(I)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(da,da,0,0,l,n-da,t)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-da,t);else c.lineTo(n,t)};Oa.prototype.paintBottom=function(c,l,v,n,t,A,B,da,I){"square"==B||"default"==B&&"square"==A||!I?c.lineTo(0, +t):c.lineTo(da,t)};Oa.prototype.paintSW=function(c,l,v,n,t,A,B,da,I){if(I)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(da,da,0,0,l,0,t-da)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(0,t-da);else c.lineTo(0,t)};Oa.prototype.paintNWInner=function(c,l,v,n,t,A,B,da,I){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(da-.5*I,da-.5*I,0,0,0,I,.5*I+da);else if("invRound"== +B||"default"==B&&"invRound"==A)c.arcTo(da+I,da+I,0,0,1,I,I+da);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(I,.5*I+da);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(I+da,I+da),c.lineTo(I,I+da)};Oa.prototype.paintTopInner=function(c,l,v,n,t,A,B,da,I,va,na){va||na?!va&&na?c.lineTo(0,I):va&&!na?c.lineTo(I,0):va?"square"==B||"default"==B&&"square"==A?c.lineTo(I,I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(da+.5*I,I):c.lineTo(da+I,I):c.lineTo(0, +I):c.lineTo(0,0)};Oa.prototype.paintNEInner=function(c,l,v,n,t,A,B,da,I){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(da-.5*I,da-.5*I,0,0,0,n-da-.5*I,I);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(da+I,da+I,0,0,1,n-da-I,I);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(n-da-.5*I,I);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(n-da-I,da+I),c.lineTo(n-da-I,I)};Oa.prototype.paintRightInner=function(c,l,v,n,t,A,B,da,I,va,na){va||na?!va&&na?c.lineTo(n-I,0):va&&!na?c.lineTo(n, +I):va?"square"==B||"default"==B&&"square"==A?c.lineTo(n-I,I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-I,da+.5*I):c.lineTo(n-I,da+I):c.lineTo(n-I,0):c.lineTo(n,0)};Oa.prototype.paintLeftInner=function(c,l,v,n,t,A,B,da,I,va,na){va||na?!va&&na?c.lineTo(I,t):va&&!na?c.lineTo(0,t-I):va?"square"==B||"default"==B&&"square"==A?c.lineTo(I,t-I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(I,t-da-.5*I):c.lineTo(I,t-da-I): +c.lineTo(I,t):c.lineTo(0,t)};Oa.prototype.paintSEInner=function(c,l,v,n,t,A,B,da,I){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(da-.5*I,da-.5*I,0,0,0,n-I,t-da-.5*I);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(da+I,da+I,0,0,1,n-I,t-da-I);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(n-I,t-da-.5*I);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(n-da-I,t-da-I),c.lineTo(n-I,t-da-I)};Oa.prototype.paintBottomInner=function(c,l,v,n,t,A,B,da,I,va,na){va||na?!va&&na?c.lineTo(n, +t-I):va&&!na?c.lineTo(n-I,t):"square"==B||"default"==B&&"square"==A||!va?c.lineTo(n-I,t-I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-da-.5*I,t-I):c.lineTo(n-da-I,t-I):c.lineTo(n,t)};Oa.prototype.paintSWInner=function(c,l,v,n,t,A,B,da,I,va){if(!va)c.lineTo(I,t);else if("square"==B||"default"==B&&"square"==A)c.lineTo(I,t-I);else if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(da-.5*I,da-.5*I,0,0,0,da+.5*I,t-I);else if("invRound"==B||"default"==B&&"invRound"== +A)c.arcTo(da+I,da+I,0,0,1,da+I,t-I);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(da+.5*I,t-I);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(I+da,t-da-I),c.lineTo(I+da,t-I)};Oa.prototype.moveSWInner=function(c,l,v,n,t,A,B,da,I,va){va?"square"==B||"default"==B&&"square"==A?c.moveTo(I,t-I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(I,t-da-.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(I,t-da-I): +c.moveTo(0,t-I)};Oa.prototype.lineSWInner=function(c,l,v,n,t,A,B,da,I,va){va?"square"==B||"default"==B&&"square"==A?c.lineTo(I,t-I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(I,t-da-.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(I,t-da-I):c.lineTo(0,t-I)};Oa.prototype.moveSEInner=function(c,l,v,n,t,A,B,da,I,va){va?"square"==B||"default"==B&&"square"==A?c.moveTo(n-I,t-I):"rounded"==B||"default"==B&&"rounded"== +A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(n-I,t-da-.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(n-I,t-da-I):c.moveTo(n-I,t)};Oa.prototype.lineSEInner=function(c,l,v,n,t,A,B,da,I,va){va?"square"==B||"default"==B&&"square"==A?c.lineTo(n-I,t-I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-I,t-da-.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-I,t-da-I): +c.lineTo(n-I,t)};Oa.prototype.moveNEInner=function(c,l,v,n,t,A,B,da,I,va){va?"square"==B||"default"==B&&"square"==A||va?c.moveTo(n-I,I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(n-I,da+.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(n-I,da+I):c.moveTo(n,I)};Oa.prototype.lineNEInner=function(c,l,v,n,t,A,B,da,I,va){va?"square"==B||"default"==B&&"square"==A||va?c.lineTo(n-I,I):"rounded"==B||"default"==B&&"rounded"== +A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-I,da+.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-I,da+I):c.lineTo(n,I)};Oa.prototype.moveNWInner=function(c,l,v,n,t,A,B,da,I,va,na){va||na?!va&&na?c.moveTo(I,0):va&&!na?c.moveTo(0,I):"square"==B||"default"==B&&"square"==A?c.moveTo(I,I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(I,da+.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"== +B&&"fold"==A)&&c.moveTo(I,da+I):c.moveTo(0,0)};Oa.prototype.lineNWInner=function(c,l,v,n,t,A,B,da,I,va,na){va||na?!va&&na?c.lineTo(I,0):va&&!na?c.lineTo(0,I):"square"==B||"default"==B&&"square"==A?c.lineTo(I,I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(I,da+.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(I,da+I):c.lineTo(0,0)};Oa.prototype.paintFolds=function(c,l,v,n,t,A,B,da,I,va,na,Ya,jb,cb,Ga){if("fold"== +A||"fold"==B||"fold"==da||"fold"==I||"fold"==va)("fold"==B||"default"==B&&"fold"==A)&&Ya&&Ga&&(c.moveTo(0,na),c.lineTo(na,na),c.lineTo(na,0)),("fold"==da||"default"==da&&"fold"==A)&&Ya&&jb&&(c.moveTo(n-na,0),c.lineTo(n-na,na),c.lineTo(n,na)),("fold"==I||"default"==I&&"fold"==A)&&cb&&jb&&(c.moveTo(n-na,t),c.lineTo(n-na,t-na),c.lineTo(n,t-na)),("fold"==va||"default"==va&&"fold"==A)&&cb&&Ga&&(c.moveTo(0,t-na),c.lineTo(na,t-na),c.lineTo(na,t))};mxCellRenderer.registerShape(Oa.prototype.cst.RECT2,Oa); +Oa.prototype.constraints=null;mxUtils.extend(Pa,mxConnector);Pa.prototype.origPaintEdgeShape=Pa.prototype.paintEdgeShape;Pa.prototype.paintEdgeShape=function(c,l,v){for(var n=[],t=0;t<l.length;t++)n.push(mxUtils.clone(l[t]));t=c.state.dashed;var A=c.state.fixDash;Pa.prototype.origPaintEdgeShape.apply(this,[c,n,v]);3<=c.state.strokeWidth&&(n=mxUtils.getValue(this.style,"fillColor",null),null!=n&&(c.setStrokeColor(n),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(t,A),Pa.prototype.origPaintEdgeShape.apply(this, +[c,l,v])))};mxCellRenderer.registerShape("filledEdge",Pa);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),v=c.apply(this,arguments);"umlFrame"==l.style.shape&&v.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return v}}();mxMarker.addMarker("dash",function(c,l,v,n,t,A,B,da,I,va){var na=t*(B+I+1),Ya=A*(B+I+1);return function(){c.begin(); +c.moveTo(n.x-na/2-Ya/2,n.y-Ya/2+na/2);c.lineTo(n.x+Ya/2-3*na/2,n.y-3*Ya/2-na/2);c.stroke()}});mxMarker.addMarker("box",function(c,l,v,n,t,A,B,da,I,va){var na=t*(B+I+1),Ya=A*(B+I+1),jb=n.x+na/2,cb=n.y+Ya/2;n.x-=na;n.y-=Ya;return function(){c.begin();c.moveTo(jb-na/2-Ya/2,cb-Ya/2+na/2);c.lineTo(jb-na/2+Ya/2,cb-Ya/2-na/2);c.lineTo(jb+Ya/2-3*na/2,cb-3*Ya/2-na/2);c.lineTo(jb-Ya/2-3*na/2,cb-3*Ya/2+na/2);c.close();va?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,v,n,t,A,B,da,I, +va){var na=t*(B+I+1),Ya=A*(B+I+1);return function(){c.begin();c.moveTo(n.x-na/2-Ya/2,n.y-Ya/2+na/2);c.lineTo(n.x+Ya/2-3*na/2,n.y-3*Ya/2-na/2);c.moveTo(n.x-na/2+Ya/2,n.y-Ya/2-na/2);c.lineTo(n.x-Ya/2-3*na/2,n.y-3*Ya/2+na/2);c.stroke()}});mxMarker.addMarker("circle",bb);mxMarker.addMarker("circlePlus",function(c,l,v,n,t,A,B,da,I,va){var na=n.clone(),Ya=bb.apply(this,arguments),jb=t*(B+2*I),cb=A*(B+2*I);return function(){Ya.apply(this,arguments);c.begin();c.moveTo(na.x-t*I,na.y-A*I);c.lineTo(na.x-2*jb+ +t*I,na.y-2*cb+A*I);c.moveTo(na.x-jb-cb+A*I,na.y-cb+jb-t*I);c.lineTo(na.x+cb-jb-A*I,na.y-cb-jb+t*I);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,l,v,n,t,A,B,da,I,va){var na=t*(B+I+1),Ya=A*(B+I+1),jb=n.clone();n.x-=na;n.y-=Ya;return function(){c.begin();c.moveTo(jb.x-Ya,jb.y+na);c.quadTo(n.x-Ya,n.y+na,n.x,n.y);c.quadTo(n.x+Ya,n.y-na,jb.x+Ya,jb.y-na);c.stroke()}});mxMarker.addMarker("async",function(c,l,v,n,t,A,B,da,I,va){l=t*I*1.118;v=A*I*1.118;t*=B+I;A*=B+I;var na=n.clone();na.x-=l;na.y-= +v;n.x+=-t-l;n.y+=-A-v;return function(){c.begin();c.moveTo(na.x,na.y);da?c.lineTo(na.x-t-A/2,na.y-A+t/2):c.lineTo(na.x+A/2-t,na.y-A-t/2);c.lineTo(na.x-t,na.y-A);c.close();va?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,v,n,t,A,B,da,I,va,na){A*=da+va;B*=da+va;var Ya=t.clone();return function(){l.begin();l.moveTo(Ya.x,Ya.y);I?l.lineTo(Ya.x-A-B/c,Ya.y-B+A/c):l.lineTo(Ya.x+B/c-A,Ya.y-B-A/c);l.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var ib= +function(c,l,v){return gb(c,["width"],l,function(n,t,A,B,da){da=c.shape.getEdgeWidth()*c.view.scale+v;return new mxPoint(B.x+t*n/4+A*da/2,B.y+A*n/4-t*da/2)},function(n,t,A,B,da,I){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,da.x,da.y,I.x,I.y));c.style.width=Math.round(2*n)/c.view.scale-v})},gb=function(c,l,v,n,t){return hb(c,l,function(A){var B=c.absolutePoints,da=B.length-1;A=c.view.translate;var I=c.view.scale,va=v?B[0]:B[da];B=v?B[1]:B[da-1];da=B.x-va.x;var na=B.y-va.y,Ya=Math.sqrt(da*da+na*na);va= +n.call(this,Ya,da/Ya,na/Ya,va,B);return new mxPoint(va.x/I-A.x,va.y/I-A.y)},function(A,B,da){var I=c.absolutePoints,va=I.length-1;A=c.view.translate;var na=c.view.scale,Ya=v?I[0]:I[va];I=v?I[1]:I[va-1];va=I.x-Ya.x;var jb=I.y-Ya.y,cb=Math.sqrt(va*va+jb*jb);B.x=(B.x+A.x)*na;B.y=(B.y+A.y)*na;t.call(this,cb,va/cb,jb/cb,Ya,I,B,da)})},qb=function(c,l){return function(v){return[gb(v,["startWidth"],!0,function(n,t,A,B,da){da=mxUtils.getNumber(v.style,"startWidth",c)*v.view.scale+l;return new mxPoint(B.x+ +t*n/4+A*da/2,B.y+A*n/4-t*da/2)},function(n,t,A,B,da,I){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,da.x,da.y,I.x,I.y));v.style.startWidth=Math.round(2*n)/v.view.scale-l})]}},nb=function(c){return function(l){return[hb(l,["arrowWidth","arrowSize"],function(v){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Na.prototype.arrowWidth))),t=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",Na.prototype.arrowSize)));return new mxPoint(v.x+(1-t)*v.width,v.y+(1-n)*v.height/ 2)},function(v,n){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(v.y+v.height/2-n.y)/v.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(v.x+v.width-n.x)/v.width))})]}},mb=function(c){return function(l){return[hb(l,["size"],function(v){var n=Math.max(0,Math.min(.5*v.height,parseFloat(mxUtils.getValue(this.state.style,"size",c))));return new mxPoint(v.x,v.y+n)},function(v,n){this.state.style.size=Math.max(0,n.y-v.y)},!0)]}},Bb=function(c,l,v){return function(n){var t=[hb(n,["size"], -function(A){var B=Math.max(0,Math.min(A.width,Math.min(A.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(A.x+B,A.y+B)},function(A,B){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(A.width,B.x-A.x),Math.min(A.height,B.y-A.y)))/c)},!1)];v&&mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&t.push(kb(n));return t}},wb=function(c,l,v,n,t){v=null!=v?v:.5;return function(A){var B=[hb(A,["size"],function(ea){var I=null!=t?"0"!=mxUtils.getValue(this.state.style, -"fixedSize","0"):null,va=parseFloat(mxUtils.getValue(this.state.style,"size",I?t:c));return new mxPoint(ea.x+Math.max(0,Math.min(.5*ea.width,va*(I?1:ea.width))),ea.getCenterY())},function(ea,I,va){ea=null!=t&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?I.x-ea.x:Math.max(0,Math.min(v,(I.x-ea.x)/ea.width));this.state.style.size=ea},!1,n)];l&&mxUtils.getValue(A.style,mxConstants.STYLE_ROUNDED,!1)&&B.push(kb(A));return B}},rb=function(c,l,v){c=null!=c?c:.5;return function(n){var t=[hb(n,["size"], -function(A){var B=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ea=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",B?v:l)));return new mxPoint(A.x+Math.min(.75*A.width*c,ea*(B?.75:.75*A.width)),A.y+A.height/4)},function(A,B){A=null!=v&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?B.x-A.x:Math.max(0,Math.min(c,(B.x-A.x)/A.width*.75));this.state.style.size=A},!1,!0)];mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&t.push(kb(n));return t}},vb= +function(A){var B=Math.max(0,Math.min(A.width,Math.min(A.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(A.x+B,A.y+B)},function(A,B){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(A.width,B.x-A.x),Math.min(A.height,B.y-A.y)))/c)},!1)];v&&mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&t.push(kb(n));return t}},wb=function(c,l,v,n,t){v=null!=v?v:.5;return function(A){var B=[hb(A,["size"],function(da){var I=null!=t?"0"!=mxUtils.getValue(this.state.style, +"fixedSize","0"):null,va=parseFloat(mxUtils.getValue(this.state.style,"size",I?t:c));return new mxPoint(da.x+Math.max(0,Math.min(.5*da.width,va*(I?1:da.width))),da.getCenterY())},function(da,I,va){da=null!=t&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?I.x-da.x:Math.max(0,Math.min(v,(I.x-da.x)/da.width));this.state.style.size=da},!1,n)];l&&mxUtils.getValue(A.style,mxConstants.STYLE_ROUNDED,!1)&&B.push(kb(A));return B}},rb=function(c,l,v){c=null!=c?c:.5;return function(n){var t=[hb(n,["size"], +function(A){var B=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,da=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",B?v:l)));return new mxPoint(A.x+Math.min(.75*A.width*c,da*(B?.75:.75*A.width)),A.y+A.height/4)},function(A,B){A=null!=v&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?B.x-A.x:Math.max(0,Math.min(c,(B.x-A.x)/A.width*.75));this.state.style.size=A},!1,!0)];mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&t.push(kb(n));return t}},vb= function(){return function(c){var l=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l}},kb=function(c,l){return hb(c,[mxConstants.STYLE_ARCSIZE],function(v){var n=null!=l?l:v.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var t=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(v.x+v.width-Math.min(v.width/2,t),v.y+n)}t=Math.max(0,parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE, 100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(v.x+v.width-Math.min(Math.max(v.width/2,v.height/2),Math.min(v.width,v.height)*t),v.y+n)},function(v,n,t){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(v.width,2*(v.x+v.width-n.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(v.width-n.x+v.x)/Math.min(v.width,v.height))))})},hb=function(c,l,v,n, -t,A,B){var ea=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);ea.execute=function(va){for(var na=0;na<l.length;na++)this.copyStyle(l[na]);B&&B(va)};ea.getPosition=v;ea.setPosition=n;ea.ignoreGrid=null!=t?t:!0;if(A){var I=ea.positionChanged;ea.positionChanged=function(){I.apply(this,arguments);c.view.invalidate(this.state.cell);c.view.validate()}}return ea},tb={link:function(c){return[ib(c,!0,10),ib(c,!1,10)]},flexArrow:function(c){var l=c.view.graph.gridSize/c.view.scale,v=[]; -mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(v.push(gb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,t,A,B,ea){n=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ea=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+t*(ea+c.shape.strokewidth*c.view.scale)+A*n/2,B.y+A*(ea+c.shape.strokewidth*c.view.scale)-t*n/2)},function(n,t,A,B,ea,I,va){n=Math.sqrt(mxUtils.ptSegDistSq(B.x, -B.y,ea.x,ea.y,I.x,I.y));t=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-t,I.x,I.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(t-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*n)/c.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(va.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))< -l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),v.push(gb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,t,A,B,ea){n=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;ea=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+t*(ea+c.shape.strokewidth*c.view.scale)+A*n/2,B.y+A*(ea+c.shape.strokewidth*c.view.scale)-t*n/2)},function(n,t,A,B,ea, -I,va){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ea.x,ea.y,I.x,I.y));t=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-t,I.x,I.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(t-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(va.getEvent())|| -(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<l&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(v.push(gb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,t,A,B,ea){n=(c.shape.getEdgeWidth()- -c.shape.strokewidth)*c.view.scale;ea=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+t*(ea+c.shape.strokewidth*c.view.scale)-A*n/2,B.y+A*(ea+c.shape.strokewidth*c.view.scale)+t*n/2)},function(n,t,A,B,ea,I,va){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ea.x,ea.y,I.x,I.y));t=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-t,I.x,I.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(t-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2* -n)/c.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(va.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),v.push(gb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,t,A,B,ea){n= -(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;ea=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+t*(ea+c.shape.strokewidth*c.view.scale)-A*n/2,B.y+A*(ea+c.shape.strokewidth*c.view.scale)+t*n/2)},function(n,t,A,B,ea,I,va){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ea.x,ea.y,I.x,I.y));t=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-t,I.x,I.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(t-c.shape.strokewidth)/3)/100/c.view.scale; +t,A,B){var da=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);da.execute=function(va){for(var na=0;na<l.length;na++)this.copyStyle(l[na]);B&&B(va)};da.getPosition=v;da.setPosition=n;da.ignoreGrid=null!=t?t:!0;if(A){var I=da.positionChanged;da.positionChanged=function(){I.apply(this,arguments);c.view.invalidate(this.state.cell);c.view.validate()}}return da},tb={link:function(c){return[ib(c,!0,10),ib(c,!1,10)]},flexArrow:function(c){var l=c.view.graph.gridSize/c.view.scale,v=[]; +mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(v.push(gb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,t,A,B,da){n=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;da=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+t*(da+c.shape.strokewidth*c.view.scale)+A*n/2,B.y+A*(da+c.shape.strokewidth*c.view.scale)-t*n/2)},function(n,t,A,B,da,I,va){n=Math.sqrt(mxUtils.ptSegDistSq(B.x, +B.y,da.x,da.y,I.x,I.y));t=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-t,I.x,I.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(t-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*n)/c.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(va.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))< +l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),v.push(gb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,t,A,B,da){n=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;da=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+t*(da+c.shape.strokewidth*c.view.scale)+A*n/2,B.y+A*(da+c.shape.strokewidth*c.view.scale)-t*n/2)},function(n,t,A,B,da, +I,va){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,da.x,da.y,I.x,I.y));t=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-t,I.x,I.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(t-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(va.getEvent())|| +(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<l&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(v.push(gb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,t,A,B,da){n=(c.shape.getEdgeWidth()- +c.shape.strokewidth)*c.view.scale;da=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+t*(da+c.shape.strokewidth*c.view.scale)-A*n/2,B.y+A*(da+c.shape.strokewidth*c.view.scale)+t*n/2)},function(n,t,A,B,da,I,va){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,da.x,da.y,I.x,I.y));t=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-t,I.x,I.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(t-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2* +n)/c.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(va.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),v.push(gb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,t,A,B,da){n= +(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;da=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+t*(da+c.shape.strokewidth*c.view.scale)-A*n/2,B.y+A*(da+c.shape.strokewidth*c.view.scale)+t*n/2)},function(n,t,A,B,da,I,va){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,da.x,da.y,I.x,I.y));t=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-t,I.x,I.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(t-c.shape.strokewidth)/3)/100/c.view.scale; c.style.endWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(va.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)- parseFloat(c.style.startWidth))<l&&(c.style.endWidth=c.style.startWidth))})));return v},swimlane:function(c){var l=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var v=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));l.push(kb(c,v/2))}l.push(hb(c,[mxConstants.STYLE_STARTSIZE],function(n){var t=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(c.style,mxConstants.STYLE_HORIZONTAL, 1)?new mxPoint(n.getCenterX(),n.y+Math.max(0,Math.min(n.height,t))):new mxPoint(n.x+Math.max(0,Math.min(n.width,t)),n.getCenterY())},function(n,t){c.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(n.height,t.y-n.y))):Math.round(Math.max(0,Math.min(n.width,t.x-n.x)))},!1,null,function(n){var t=c.view.graph;if(!mxEvent.isShiftDown(n.getEvent())&&!mxEvent.isControlDown(n.getEvent())&&(t.isTableRow(c.cell)||t.isTableCell(c.cell))){n= -t.getSwimlaneDirection(c.style);var A=t.model.getParent(c.cell);A=t.model.getChildCells(A,!0);for(var B=[],ea=0;ea<A.length;ea++)A[ea]!=c.cell&&t.isSwimlane(A[ea])&&t.getSwimlaneDirection(t.getCurrentCellStyle(A[ea]))==n&&B.push(A[ea]);t.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],B)}}));return l},label:vb(),ext:vb(),rectangle:vb(),triangle:vb(),rhombus:vb(),umlLifeline:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style, -"size",W.prototype.size))));return new mxPoint(l.getCenterX(),l.y+v)},function(l,v){this.state.style.size=Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},umlFrame:function(c){return[hb(c,["width","height"],function(l){var v=Math.max(T.prototype.corner,Math.min(l.width,mxUtils.getValue(this.state.style,"width",T.prototype.width))),n=Math.max(1.5*T.prototype.corner,Math.min(l.height,mxUtils.getValue(this.state.style,"height",T.prototype.height)));return new mxPoint(l.x+v,l.y+n)},function(l, -v){this.state.style.width=Math.round(Math.max(T.prototype.corner,Math.min(l.width,v.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*T.prototype.corner,Math.min(l.height,v.y-l.y)))},!1)]},process:function(c){var l=[hb(c,["size"],function(v){var n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),t=parseFloat(mxUtils.getValue(this.state.style,"size",oa.prototype.size));return n?new mxPoint(v.x+t,v.y+v.height/4):new mxPoint(v.x+v.width*t,v.y+v.height/4)},function(v,n){v="0"!=mxUtils.getValue(this.state.style, -"fixedSize","0")?Math.max(0,Math.min(.5*v.width,n.x-v.x)):Math.max(0,Math.min(.5,(n.x-v.x)/v.width));this.state.style.size=v},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},cross:function(c){return[hb(c,["size"],function(l){var v=Math.min(l.width,l.height);v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Ca.prototype.size)))*v/2;return new mxPoint(l.getCenterX()-v,l.getCenterY()-v)},function(l,v){var n=Math.min(l.width,l.height);this.state.style.size= -Math.max(0,Math.min(1,Math.min(Math.max(0,l.getCenterY()-v.y)/n*2,Math.max(0,l.getCenterX()-v.x)/n*2)))})]},note:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",Q.prototype.size)))));return new mxPoint(l.x+l.width-v,l.y+v)},function(l,v){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-v.x),Math.min(l.height,v.y-l.y))))})]},note2:function(c){return[hb(c,["size"],function(l){var v= +t.getSwimlaneDirection(c.style);var A=t.model.getParent(c.cell);A=t.model.getChildCells(A,!0);for(var B=[],da=0;da<A.length;da++)A[da]!=c.cell&&t.isSwimlane(A[da])&&t.getSwimlaneDirection(t.getCurrentCellStyle(A[da]))==n&&B.push(A[da]);t.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],B)}}));return l},label:vb(),ext:vb(),rectangle:vb(),triangle:vb(),rhombus:vb(),umlLifeline:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style, +"size",Y.prototype.size))));return new mxPoint(l.getCenterX(),l.y+v)},function(l,v){this.state.style.size=Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},umlFrame:function(c){return[hb(c,["width","height"],function(l){var v=Math.max(R.prototype.corner,Math.min(l.width,mxUtils.getValue(this.state.style,"width",R.prototype.width))),n=Math.max(1.5*R.prototype.corner,Math.min(l.height,mxUtils.getValue(this.state.style,"height",R.prototype.height)));return new mxPoint(l.x+v,l.y+n)},function(l, +v){this.state.style.width=Math.round(Math.max(R.prototype.corner,Math.min(l.width,v.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*R.prototype.corner,Math.min(l.height,v.y-l.y)))},!1)]},process:function(c){var l=[hb(c,["size"],function(v){var n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),t=parseFloat(mxUtils.getValue(this.state.style,"size",oa.prototype.size));return n?new mxPoint(v.x+t,v.y+v.height/4):new mxPoint(v.x+v.width*t,v.y+v.height/4)},function(v,n){v="0"!=mxUtils.getValue(this.state.style, +"fixedSize","0")?Math.max(0,Math.min(.5*v.width,n.x-v.x)):Math.max(0,Math.min(.5,(n.x-v.x)/v.width));this.state.style.size=v},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},cross:function(c){return[hb(c,["size"],function(l){var v=Math.min(l.width,l.height);v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Ba.prototype.size)))*v/2;return new mxPoint(l.getCenterX()-v,l.getCenterY()-v)},function(l,v){var n=Math.min(l.width,l.height);this.state.style.size= +Math.max(0,Math.min(1,Math.min(Math.max(0,l.getCenterY()-v.y)/n*2,Math.max(0,l.getCenterX()-v.x)/n*2)))})]},note:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",P.prototype.size)))));return new mxPoint(l.x+l.width-v,l.y+v)},function(l,v){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-v.x),Math.min(l.height,v.y-l.y))))})]},note2:function(c){return[hb(c,["size"],function(l){var v= Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",d.prototype.size)))));return new mxPoint(l.x+l.width-v,l.y+v)},function(l,v){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-v.x),Math.min(l.height,v.y-l.y))))})]},manualInput:function(c){var l=[hb(c,["size"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",Da.prototype.size)));return new mxPoint(v.x+v.width/4,v.y+3*n/4)},function(v, -n){this.state.style.size=Math.round(Math.max(0,Math.min(v.height,4*(n.y-v.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},dataStorage:function(c){return[hb(c,["size"],function(l){var v="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),n=parseFloat(mxUtils.getValue(this.state.style,"size",v?M.prototype.fixedSize:M.prototype.size));return new mxPoint(l.x+l.width-n*(v?1:l.width),l.getCenterY())},function(l,v){l="0"!=mxUtils.getValue(this.state.style, -"fixedSize","0")?Math.max(0,Math.min(l.width,l.x+l.width-v.x)):Math.max(0,Math.min(1,(l.x+l.width-v.x)/l.width));this.state.style.size=l},!1)]},callout:function(c){var l=[hb(c,["size","position"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",da.prototype.size))),t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",da.prototype.position)));mxUtils.getValue(this.state.style,"base",da.prototype.base);return new mxPoint(v.x+t*v.width,v.y+v.height- -n)},function(v,n){mxUtils.getValue(this.state.style,"base",da.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(v.height,v.y+v.height-n.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(n.x-v.x)/v.width)))/100},!1),hb(c,["position2"],function(v){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",da.prototype.position2)));return new mxPoint(v.x+n*v.width,v.y+v.height)},function(v,n){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1, -(n.x-v.x)/v.width)))/100},!1),hb(c,["base"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",da.prototype.size))),t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",da.prototype.position))),A=Math.max(0,Math.min(v.width,mxUtils.getValue(this.state.style,"base",da.prototype.base)));return new mxPoint(v.x+Math.min(v.width,t*v.width+A),v.y+v.height-n)},function(v,n){var t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",da.prototype.position))); -this.state.style.base=Math.round(Math.max(0,Math.min(v.width,n.x-v.x-t*v.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},internalStorage:function(c){var l=[hb(c,["dx","dy"],function(v){var n=Math.max(0,Math.min(v.width,mxUtils.getValue(this.state.style,"dx",Ra.prototype.dx))),t=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"dy",Ra.prototype.dy)));return new mxPoint(v.x+n,v.y+t)},function(v,n){this.state.style.dx=Math.round(Math.max(0, -Math.min(v.width,n.x-v.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(v.height,n.y-v.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},module:function(c){return[hb(c,["jettyWidth","jettyHeight"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",ma.prototype.jettyWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"jettyHeight",ma.prototype.jettyHeight)));return new mxPoint(l.x+v/2,l.y+ -2*n)},function(l,v){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,v.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,v.y-l.y))/2)})]},corner:function(c){return[hb(c,["dx","dy"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Qa.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",Qa.prototype.dy)));return new mxPoint(l.x+v,l.y+n)},function(l,v){this.state.style.dx=Math.round(Math.max(0, +n){this.state.style.size=Math.round(Math.max(0,Math.min(v.height,4*(n.y-v.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},dataStorage:function(c){return[hb(c,["size"],function(l){var v="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),n=parseFloat(mxUtils.getValue(this.state.style,"size",v?L.prototype.fixedSize:L.prototype.size));return new mxPoint(l.x+l.width-n*(v?1:l.width),l.getCenterY())},function(l,v){l="0"!=mxUtils.getValue(this.state.style, +"fixedSize","0")?Math.max(0,Math.min(l.width,l.x+l.width-v.x)):Math.max(0,Math.min(1,(l.x+l.width-v.x)/l.width));this.state.style.size=l},!1)]},callout:function(c){var l=[hb(c,["size","position"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",fa.prototype.size))),t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",fa.prototype.position)));mxUtils.getValue(this.state.style,"base",fa.prototype.base);return new mxPoint(v.x+t*v.width,v.y+v.height- +n)},function(v,n){mxUtils.getValue(this.state.style,"base",fa.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(v.height,v.y+v.height-n.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(n.x-v.x)/v.width)))/100},!1),hb(c,["position2"],function(v){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",fa.prototype.position2)));return new mxPoint(v.x+n*v.width,v.y+v.height)},function(v,n){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1, +(n.x-v.x)/v.width)))/100},!1),hb(c,["base"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",fa.prototype.size))),t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",fa.prototype.position))),A=Math.max(0,Math.min(v.width,mxUtils.getValue(this.state.style,"base",fa.prototype.base)));return new mxPoint(v.x+Math.min(v.width,t*v.width+A),v.y+v.height-n)},function(v,n){var t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",fa.prototype.position))); +this.state.style.base=Math.round(Math.max(0,Math.min(v.width,n.x-v.x-t*v.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},internalStorage:function(c){var l=[hb(c,["dx","dy"],function(v){var n=Math.max(0,Math.min(v.width,mxUtils.getValue(this.state.style,"dx",Sa.prototype.dx))),t=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"dy",Sa.prototype.dy)));return new mxPoint(v.x+n,v.y+t)},function(v,n){this.state.style.dx=Math.round(Math.max(0, +Math.min(v.width,n.x-v.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(v.height,n.y-v.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},module:function(c){return[hb(c,["jettyWidth","jettyHeight"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",la.prototype.jettyWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"jettyHeight",la.prototype.jettyHeight)));return new mxPoint(l.x+v/2,l.y+ +2*n)},function(l,v){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,v.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,v.y-l.y))/2)})]},corner:function(c){return[hb(c,["dx","dy"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Ra.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",Ra.prototype.dy)));return new mxPoint(l.x+v,l.y+n)},function(l,v){this.state.style.dx=Math.round(Math.max(0, Math.min(l.width,v.x-l.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},tee:function(c){return[hb(c,["dx","dy"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Za.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",Za.prototype.dy)));return new mxPoint(l.x+(l.width+v)/2,l.y+n)},function(l,v){this.state.style.dx=Math.round(Math.max(0,2*Math.min(l.width/2,v.x-l.x-l.width/2)));this.state.style.dy= Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},singleArrow:nb(1),doubleArrow:nb(.5),"mxgraph.arrows2.wedgeArrow":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":qb(20,20),folder:function(c){return[hb(c,["tabWidth","tabHeight"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",u.prototype.tabWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",u.prototype.tabHeight)));mxUtils.getValue(this.state.style, "tabPosition",u.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(v=l.width-v);return new mxPoint(l.x+v,l.y+n)},function(l,v){var n=Math.max(0,Math.min(l.width,v.x-l.x));mxUtils.getValue(this.state.style,"tabPosition",u.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(n=l.width-n);this.state.style.tabWidth=Math.round(n);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},document:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style, "size",G.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-v)*l.height)},function(l,v){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-v.y)/l.height))},!1)]},tape:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",D.prototype.size))));return new mxPoint(l.getCenterX(),l.y+v*l.height/2)},function(l,v){this.state.style.size=Math.max(0,Math.min(1,(v.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[hb(c, -["isoAngle"],function(l){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",f.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(v),.5*l.height))},function(l,v){this.state.style.isoAngle=Math.max(0,50*(v.y-l.y)/l.height)},!0)]},cylinder2:mb(g.prototype.size),cylinder3:mb(x.prototype.size),offPageConnector:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",fa.prototype.size)))); +["isoAngle"],function(l){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",f.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(v),.5*l.height))},function(l,v){this.state.style.isoAngle=Math.max(0,50*(v.y-l.y)/l.height)},!0)]},cylinder2:mb(g.prototype.size),cylinder3:mb(x.prototype.size),offPageConnector:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ha.prototype.size)))); return new mxPoint(l.getCenterX(),l.y+(1-v)*l.height)},function(l,v){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-v.y)/l.height))},!1)]},"mxgraph.basic.rect":function(c){var l=[Graph.createHandle(c,["size"],function(v){var n=Math.max(0,Math.min(v.width/2,v.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(v.x+n,v.y+n)},function(v,n){this.state.style.size=Math.round(100*Math.max(0,Math.min(v.height/2,v.width/2,n.x-v.x)))/100})];c=Graph.createHandle(c, -["indent"],function(v){var n=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(v.x+.75*v.width,v.y+n*v.height/200)},function(v,n){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(n.y-v.y)/v.height)))/100});l.push(c);return l},step:wb(ia.prototype.size,!0,null,!0,ia.prototype.fixedSize),hexagon:wb(L.prototype.size,!0,.5,!0,L.prototype.fixedSize),curlyBracket:wb(Y.prototype.size,!1),display:wb(Ma.prototype.size,!1),cube:Bb(1, -m.prototype.size,!1),card:Bb(.5,J.prototype.size,!0),loopLimit:Bb(.5,X.prototype.size,!0),trapezoid:rb(.5,U.prototype.size,U.prototype.fixedSize),parallelogram:rb(1,V.prototype.size,V.prototype.fixedSize)};Graph.createHandle=hb;Graph.handleFactory=tb;var Cb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=Cb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&& +["indent"],function(v){var n=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(v.x+.75*v.width,v.y+n*v.height/200)},function(v,n){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(n.y-v.y)/v.height)))/100});l.push(c);return l},step:wb(ia.prototype.size,!0,null,!0,ia.prototype.fixedSize),hexagon:wb(M.prototype.size,!0,.5,!0,M.prototype.fixedSize),curlyBracket:wb(Z.prototype.size,!1),display:wb(Ea.prototype.size,!1),cube:Bb(1, +m.prototype.size,!1),card:Bb(.5,J.prototype.size,!0),loopLimit:Bb(.5,U.prototype.size,!0),trapezoid:rb(.5,T.prototype.size,T.prototype.fixedSize),parallelogram:rb(1,W.prototype.size,W.prototype.fixedSize)};Graph.createHandle=hb;Graph.handleFactory=tb;var Cb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=Cb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&& null==mxStencilRegistry.getStencil(l)?l=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(l=mxConstants.SHAPE_SWIMLANE);l=tb[l];null==l&&null!=this.state.shape&&this.state.shape.isRoundable()&&(l=tb[mxConstants.SHAPE_RECTANGLE]);null!=l&&(l=l(this.state),null!=l&&(c=null==c?l:c.concat(l)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR); -c=tb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var xb=new mxPoint(1,0),zb=new mxPoint(1,0),ob=mxUtils.toRadians(-30);xb=mxUtils.getRotatedPoint(xb,Math.cos(ob),Math.sin(ob));var yb=mxUtils.toRadians(-150);zb=mxUtils.getRotatedPoint(zb,Math.cos(yb),Math.sin(yb));mxEdgeStyle.IsometricConnector=function(c,l,v,n,t){var A=c.view;n=null!=n&&0<n.length?n[0]:null;var B=c.absolutePoints,ea=B[0];B=B[B.length-1];null!=n&&(n=A.transformControlPoint(c,n)); -null==ea&&null!=l&&(ea=new mxPoint(l.getCenterX(),l.getCenterY()));null==B&&null!=v&&(B=new mxPoint(v.getCenterX(),v.getCenterY()));var I=xb.x,va=xb.y,na=zb.x,Xa=zb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=ea){c=function(Ea,Na,Ja){Ea-=bb.x;var Ha=Na-bb.y;Na=(Xa*Ea-na*Ha)/(I*Xa-va*na);Ea=(va*Ea-I*Ha)/(va*na-I*Xa);jb?(Ja&&(bb=new mxPoint(bb.x+I*Na,bb.y+va*Na),t.push(bb)),bb=new mxPoint(bb.x+na*Ea,bb.y+Xa*Ea)):(Ja&&(bb=new mxPoint(bb.x+na*Ea,bb.y+Xa*Ea),t.push(bb)), -bb=new mxPoint(bb.x+I*Na,bb.y+va*Na));t.push(bb)};var bb=ea;null==n&&(n=new mxPoint(ea.x+(B.x-ea.x)/2,ea.y+(B.y-ea.y)/2));c(n.x,n.y,!0);c(B.x,B.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ab=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var v=new mxElbowEdgeHandler(c);v.snapToTerminals=!1;return v}return Ab.apply(this,arguments)};p.prototype.constraints=[];E.prototype.getConstraints= +c=tb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var xb=new mxPoint(1,0),zb=new mxPoint(1,0),ob=mxUtils.toRadians(-30);xb=mxUtils.getRotatedPoint(xb,Math.cos(ob),Math.sin(ob));var yb=mxUtils.toRadians(-150);zb=mxUtils.getRotatedPoint(zb,Math.cos(yb),Math.sin(yb));mxEdgeStyle.IsometricConnector=function(c,l,v,n,t){var A=c.view;n=null!=n&&0<n.length?n[0]:null;var B=c.absolutePoints,da=B[0];B=B[B.length-1];null!=n&&(n=A.transformControlPoint(c,n)); +null==da&&null!=l&&(da=new mxPoint(l.getCenterX(),l.getCenterY()));null==B&&null!=v&&(B=new mxPoint(v.getCenterX(),v.getCenterY()));var I=xb.x,va=xb.y,na=zb.x,Ya=zb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=da){c=function(Ga,Ma,Ka){Ga-=cb.x;var Ja=Ma-cb.y;Ma=(Ya*Ga-na*Ja)/(I*Ya-va*na);Ga=(va*Ga-I*Ja)/(va*na-I*Ya);jb?(Ka&&(cb=new mxPoint(cb.x+I*Ma,cb.y+va*Ma),t.push(cb)),cb=new mxPoint(cb.x+na*Ga,cb.y+Ya*Ga)):(Ka&&(cb=new mxPoint(cb.x+na*Ga,cb.y+Ya*Ga),t.push(cb)), +cb=new mxPoint(cb.x+I*Ma,cb.y+va*Ma));t.push(cb)};var cb=da;null==n&&(n=new mxPoint(da.x+(B.x-da.x)/2,da.y+(B.y-da.y)/2));c(n.x,n.y,!0);c(B.x,B.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ab=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var v=new mxElbowEdgeHandler(c);v.snapToTerminals=!1;return v}return Ab.apply(this,arguments)};p.prototype.constraints=[];F.prototype.getConstraints= function(c,l,v){c=[];var n=Math.tan(mxUtils.toRadians(30)),t=(.5-n)/2;n=Math.min(l,v/(.5+n));l=(l-n)/2;v=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*n,v+n*t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+n,v+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+n,v+.75*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*n,v+(1-t)*n));c.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,l,v+.75*n));return c};f.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;n=Math.min(l*Math.tan(n),.5*v);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v-n));c.push(new mxConnectionConstraint(new mxPoint(.5, -1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));return c};da.prototype.getConstraints=function(c,l,v){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var n=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var t=l*Math.max(0, +1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));return c};fa.prototype.getConstraints=function(c,l,v){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var n=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var t=l*Math.max(0, Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(v-n)));c.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,l,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-n)));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75, 0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75, 1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];ua.prototype.constraints=mxRectangleShape.prototype.constraints; -mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;Q.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0, +mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;aa.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;P.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,.5*(l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(v+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0, .5),!1));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};J.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v+n)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};m.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,Math.min(v,parseFloat(mxUtils.getValue(this.style, @@ -2923,50 +2921,50 @@ mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwim function(c,l,v){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),t=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0)),c.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,n,t)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),t))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,t)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),t)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t));c.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,l,.25*(v-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(v-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.75*(v-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(v-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,0,.75*(v-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Ra.prototype.constraints=mxRectangleShape.prototype.constraints;M.prototype.constraints=mxRectangleShape.prototype.constraints;la.prototype.constraints=mxEllipse.prototype.constraints;xa.prototype.constraints=mxEllipse.prototype.constraints; -sa.prototype.constraints=mxEllipse.prototype.constraints;La.prototype.constraints=mxEllipse.prototype.constraints;Da.prototype.constraints=mxRectangleShape.prototype.constraints;Oa.prototype.constraints=mxRectangleShape.prototype.constraints;Ma.prototype.getConstraints=function(c,l,v){c=[];var n=Math.min(l,v/2),t=Math.min(l-n,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,t,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(t+l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(t+l-n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,v));return c};ma.prototype.getConstraints=function(c,l,v){l=parseFloat(mxUtils.getValue(c, -"jettyWidth",ma.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",ma.prototype.jettyHeight));var n=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1, +0),!1,null,0,.75*(v-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Sa.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;ma.prototype.constraints=mxEllipse.prototype.constraints;wa.prototype.constraints=mxEllipse.prototype.constraints; +sa.prototype.constraints=mxEllipse.prototype.constraints;za.prototype.constraints=mxEllipse.prototype.constraints;Da.prototype.constraints=mxRectangleShape.prototype.constraints;Fa.prototype.constraints=mxRectangleShape.prototype.constraints;Ea.prototype.getConstraints=function(c,l,v){c=[];var n=Math.min(l,v/2),t=Math.min(l-n,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,t,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(t+l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(t+l-n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,v));return c};la.prototype.getConstraints=function(c,l,v){l=parseFloat(mxUtils.getValue(c, +"jettyWidth",la.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",la.prototype.jettyHeight));var n=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1, .75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(v-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(v-.5*c,3.5*c))];v>5*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,l));v>8*c&&n.push(new mxConnectionConstraint(new mxPoint(0, -.5),!1,null,l));v>15*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,l));return n};X.prototype.constraints=mxRectangleShape.prototype.constraints;fa.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0, -.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];ja.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75, +.5),!1,null,l));v>15*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,l));return n};U.prototype.constraints=mxRectangleShape.prototype.constraints;ha.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0, +.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75, .1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];pa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0, .7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0, -.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];z.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25, +.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25, .5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];D.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1, .65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];ia.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0, .5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5, 0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1, .5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375, 1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55, -.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];V.prototype.constraints=mxRectangleShape.prototype.constraints;U.prototype.constraints=mxRectangleShape.prototype.constraints;G.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75, +.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];W.prototype.constraints=mxRectangleShape.prototype.constraints;T.prototype.constraints=mxRectangleShape.prototype.constraints;G.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75, 0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;Za.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),t=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style, "dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*l+.25*n,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),t));c.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,.5*(l+n),.5*(v+t)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),v));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),.5*(v+t)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*l-.25*n,t));c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,0,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*t));return c};Qa.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),t=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,0,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*t));return c};Ra.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),t=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,l,.5*t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*(v+t)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,v));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0, -1),!1));return c};Ta.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];Pa.prototype.getConstraints= +1),!1));return c};Ta.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];Na.prototype.getConstraints= function(c,l,v){c=[];var n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),t=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));n=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-t),n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-t,0));c.push(new mxConnectionConstraint(new mxPoint(1, -.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-t,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-t),v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));return c};y.prototype.getConstraints=function(c,l,v){c=[];var n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Pa.prototype.arrowWidth)))),t=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Pa.prototype.arrowSize))));n=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0, -.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-t,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-t,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,v));return c};Ca.prototype.getConstraints= +.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-t,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-t),v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));return c};z.prototype.getConstraints=function(c,l,v){c=[];var n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Na.prototype.arrowWidth)))),t=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Na.prototype.arrowSize))));n=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0, +.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-t,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-t,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,v));return c};Ba.prototype.getConstraints= function(c,l,v){c=[];var n=Math.min(v,l),t=Math.max(0,Math.min(n,n*parseFloat(mxUtils.getValue(this.style,"size",this.size))));n=(v-t)/2;var A=n+t,B=(l-t)/2;t=B+t;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,t,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,v));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+t),n));c.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+t),A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,0,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,n));return c};W.prototype.constraints=null;N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7, -.9),!1)];S.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];ra.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ta.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0, +0),!1,null,0,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,n));return c};Y.prototype.constraints=null;O.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7, +.9),!1)];V.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];ra.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ta.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0, .5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(b){this.editorUi=b;this.actions={};this.init()} -Actions.prototype.init=function(){function b(d){p.escape();d=p.deleteCells(p.getDeletableCells(p.getSelectionCells()),d);null!=d&&p.setSelectionCells(d)}function e(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{for(var d=p.getSelectionCells(),f=0;f<d.length;f++)p.cellLabelChanged(d[f],"")}finally{p.getModel().endUpdate()}}}function k(d,f,g,x,z){z.getModel().beginUpdate();try{var u=z.getCellGeometry(d);null!=u&&g&&x&&(g/=x,u=u.clone(),1<g?u.height=u.width/g:u.width=u.height*g,z.getModel().setGeometry(d, -u));z.setCellStyles(mxConstants.STYLE_CLIP_PATH,f,[d]);z.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[d])}finally{z.getModel().endUpdate()}}var m=this.editorUi,C=m.editor,p=C.graph,E=function(){return Action.prototype.isEnabled.apply(this,arguments)&&p.isEnabled()};this.addAction("new...",function(){p.openLink(m.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";m.openFile()});this.addAction("smartFit",function(){p.popupMenuHandler.hideMenu();var d=p.view.scale, +Actions.prototype.init=function(){function b(d){p.escape();d=p.deleteCells(p.getDeletableCells(p.getSelectionCells()),d);null!=d&&p.setSelectionCells(d)}function e(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{for(var d=p.getSelectionCells(),f=0;f<d.length;f++)p.cellLabelChanged(d[f],"")}finally{p.getModel().endUpdate()}}}function k(d,f,g,x,y){y.getModel().beginUpdate();try{var u=y.getCellGeometry(d);null!=u&&g&&x&&(g/=x,u=u.clone(),1<g?u.height=u.width/g:u.width=u.height*g,y.getModel().setGeometry(d, +u));y.setCellStyles(mxConstants.STYLE_CLIP_PATH,f,[d]);y.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[d])}finally{y.getModel().endUpdate()}}var m=this.editorUi,C=m.editor,p=C.graph,F=function(){return Action.prototype.isEnabled.apply(this,arguments)&&p.isEnabled()};this.addAction("new...",function(){p.openLink(m.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";m.openFile()});this.addAction("smartFit",function(){p.popupMenuHandler.hideMenu();var d=p.view.scale, f=p.view.translate.x,g=p.view.translate.y;m.actions.get("resetView").funct();1E-5>Math.abs(d-p.view.scale)&&f==p.view.translate.x&&g==p.view.translate.y&&m.actions.get(p.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){p.isEnabled()&&(p.isSelectionEmpty()?m.actions.get("smartFit").funct():p.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){m.hideDialog()})); -window.openFile.setConsumer(mxUtils.bind(this,function(d,f){try{var g=mxUtils.parseXml(d);C.graph.setSelectionCells(C.graph.importGraphModel(g.documentElement))}catch(x){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+x.message)}}));m.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=E;this.addAction("save",function(){m.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=E;this.addAction("saveAs...",function(){m.saveFile(!0)},null, -null,Editor.ctrlKey+"+Shift+S").isEnabled=E;this.addAction("export...",function(){m.showDialog((new ExportDialog(m)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var d=new EditDiagramDialog(m);m.showDialog(d.container,620,420,!0,!1);d.init()});this.addAction("pageSetup...",function(){m.showDialog((new PageSetupDialog(m)).container,320,240,!0,!0)}).isEnabled=E;this.addAction("print...",function(){m.showDialog((new PrintDialog(m)).container,300,180,!0,!0)},null,"sprite-print", +window.openFile.setConsumer(mxUtils.bind(this,function(d,f){try{var g=mxUtils.parseXml(d);C.graph.setSelectionCells(C.graph.importGraphModel(g.documentElement))}catch(x){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+x.message)}}));m.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=F;this.addAction("save",function(){m.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=F;this.addAction("saveAs...",function(){m.saveFile(!0)},null, +null,Editor.ctrlKey+"+Shift+S").isEnabled=F;this.addAction("export...",function(){m.showDialog((new ExportDialog(m)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var d=new EditDiagramDialog(m);m.showDialog(d.container,620,420,!0,!1);d.init()});this.addAction("pageSetup...",function(){m.showDialog((new PageSetupDialog(m)).container,320,240,!0,!0)}).isEnabled=F;this.addAction("print...",function(){m.showDialog((new PrintDialog(m)).container,300,180,!0,!0)},null,"sprite-print", Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(p,null,10,10)});this.addAction("undo",function(){m.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){m.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var d=null;try{d=m.copyXml(),null!=d&&p.removeCells(d,!1)}catch(f){}null==d&&mxClipboard.cut(p)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{m.copyXml()}catch(d){}try{mxClipboard.copy(p)}catch(d){m.handleError(d)}}, -null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var d=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(f){if(null!=f){p.getModel().beginUpdate();try{m.pasteXml(f,!0)}finally{p.getModel().endUpdate()}}else mxClipboard.paste(p)}),d=!0)}catch(f){}d||mxClipboard.paste(p)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(d){function f(x){if(null!=x){for(var z=!0,u=0;u< -x.length&&z;u++)z=z&&p.model.isEdge(x[u]);var H=p.view.translate;u=p.view.scale;var J=H.x,D=H.y;H=null;if(1==x.length&&z){var G=p.getCellGeometry(x[0]);null!=G&&(H=G.getTerminalPoint(!0))}H=null!=H?H:p.getBoundingBoxFromGeometry(x,z);null!=H&&(z=Math.round(p.snap(p.popupMenuHandler.triggerX/u-J)),u=Math.round(p.snap(p.popupMenuHandler.triggerY/u-D)),p.cellsMoved(x,z-H.x,u-H.y))}}function g(){p.getModel().beginUpdate();try{f(mxClipboard.paste(p))}finally{p.getModel().endUpdate()}}if(p.isEnabled()&& +null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var d=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(f){if(null!=f){p.getModel().beginUpdate();try{m.pasteXml(f,!0)}finally{p.getModel().endUpdate()}}else mxClipboard.paste(p)}),d=!0)}catch(f){}d||mxClipboard.paste(p)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(d){function f(x){if(null!=x){for(var y=!0,u=0;u< +x.length&&y;u++)y=y&&p.model.isEdge(x[u]);var H=p.view.translate;u=p.view.scale;var J=H.x,D=H.y;H=null;if(1==x.length&&y){var G=p.getCellGeometry(x[0]);null!=G&&(H=G.getTerminalPoint(!0))}H=null!=H?H:p.getBoundingBoxFromGeometry(x,y);null!=H&&(y=Math.round(p.snap(p.popupMenuHandler.triggerX/u-J)),u=Math.round(p.snap(p.popupMenuHandler.triggerY/u-D)),p.cellsMoved(x,y-H.x,u-H.y))}}function g(){p.getModel().beginUpdate();try{f(mxClipboard.paste(p))}finally{p.getModel().endUpdate()}}if(p.isEnabled()&& !p.isCellLocked(p.getDefaultParent())){d=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(x){if(null!=x){p.getModel().beginUpdate();try{f(m.pasteXml(x,!0))}finally{p.getModel().endUpdate()}}else g()}),d=!0)}catch(x){}d||g()}});this.addAction("copySize",function(){var d=p.getSelectionCell();p.isEnabled()&&null!=d&&p.getModel().isVertex(d)&&(d=p.getCellGeometry(d),null!=d&&(m.copiedSize=new mxRectangle(d.x,d.y,d.width,d.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize", function(){if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedSize){p.getModel().beginUpdate();try{for(var d=p.getResizableCells(p.getSelectionCells()),f=0;f<d.length;f++)if(p.getModel().isVertex(d[f])){var g=p.getCellGeometry(d[f]);null!=g&&(g=g.clone(),g.width=m.copiedSize.width,g.height=m.copiedSize.height,p.getModel().setGeometry(d[f],g))}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var d=p.getSelectionCell()||p.getModel().getRoot();p.isEnabled()&& null!=d&&(d=d.cloneValue(),null==d||isNaN(d.nodeType)||(m.copiedValue=d))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(d,f){function g(u,H){var J=x.getValue(u);H=u.cloneValue(H);H.removeAttribute("placeholders");null==J||isNaN(J.nodeType)||H.setAttribute("placeholders",J.getAttribute("placeholders"));null!=d&&mxEvent.isShiftDown(d)||H.setAttribute("label",p.convertValueToString(u));x.setValue(u,H)}d=null!=f?f:d;var x=p.getModel();if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedValue){x.beginUpdate(); -try{var z=p.getEditableCells(p.getSelectionCells());if(0==z.length)g(x.getRoot(),m.copiedValue);else for(f=0;f<z.length;f++)g(z[f],m.copiedValue)}finally{x.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(d,f){d=null!=f?f:d;null!=d&&mxEvent.isShiftDown(d)?e():b(null!=d&&(mxEvent.isControlDown(d)||mxEvent.isMetaDown(d)||mxEvent.isAltDown(d)))},null,null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){e()},null,null,Editor.ctrlKey+ +try{var y=p.getEditableCells(p.getSelectionCells());if(0==y.length)g(x.getRoot(),m.copiedValue);else for(f=0;f<y.length;f++)g(y[f],m.copiedValue)}finally{x.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(d,f){d=null!=f?f:d;null!=d&&mxEvent.isShiftDown(d)?e():b(null!=d&&(mxEvent.isControlDown(d)||mxEvent.isMetaDown(d)||mxEvent.isAltDown(d)))},null,null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){e()},null,null,Editor.ctrlKey+ "+Delete");this.addAction("duplicate",function(){try{p.setSelectionCells(p.duplicateCells()),p.scrollCellToVisible(p.getSelectionCell())}catch(d){m.handleError(d)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var d=m.getSelectionState();if(null!=d.mergeCell){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",d.rowspan,[d.mergeCell]),p.setCellStyles("colspan",d.colspan,[d.mergeCell])}finally{p.getModel().endUpdate()}}}));this.put("unmergeCells", new Action(mxResources.get("unmerge"),function(){var d=m.getSelectionState();if(0<d.cells.length){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",null,d.cells),p.setCellStyles("colspan",null,d.cells)}finally{p.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(d,f){d=null!=f?f:d;p.turnShapes(p.getResizableCells(p.getSelectionCells()),null!=d?mxEvent.isShiftDown(d):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R")); this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(d){d=p.getSelectionCell();p.isEnabled()&&null!=d&&p.addSelectionCells(p.getEdges(d))}));this.addAction("selectVertices",function(){p.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){p.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){p.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){p.clearSelection()}, @@ -2976,14 +2974,14 @@ null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){p.orderCell (d=p.getCellsForGroup(d),1<d.length&&p.setSelectionCell(p.groupCells(null,0,d))):p.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(p.isEnabled()){var d=p.getEditableCells(p.getSelectionCells());p.model.beginUpdate();try{var f=p.ungroupCells();if(null!=d)for(var g=0;g<d.length;g++)p.model.contains(d[g])&&(0==p.model.getChildCount(d[g])&&p.model.isVertex(d[g])&&p.setCellStyles("container","0",[d[g]]),f.push(d[g]))}finally{p.model.endUpdate()}0< f.length&&p.setSelectionCells(f)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(p.isEnabled()){var d=p.getSelectionCells();if(null!=d){for(var f=[],g=0;g<d.length;g++)p.isTableRow(d[g])||p.isTableCell(d[g])||f.push(d[g]);p.removeCellsFromParent(f)}}});this.addAction("edit",function(){p.isEnabled()&&p.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var d=p.getSelectionCell()||p.getModel().getRoot();m.showDataDialog(d)},null, null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var d=p.getSelectionCell();if(p.isEnabled()&&null!=d&&p.isCellEditable(d)){var f="";if(mxUtils.isNode(d.value)){var g=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&d.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(g=d.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==g&&(g=d.value.getAttribute("tooltip"));null!=g&&(f=g)}f=new TextareaDialog(m,mxResources.get("editTooltip")+":",f,function(x){p.setTooltipForCell(d, -x)});m.showDialog(f.container,320,200,!0,!0);f.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var d=p.getLinkForCell(p.getSelectionCell());null!=d&&p.openLink(d)});this.addAction("editLink...",function(){var d=p.getSelectionCell();if(p.isEnabled()&&null!=d&&p.isCellEditable(d)){var f=p.getLinkForCell(d)||"";m.showLinkDialog(f,mxResources.get("apply"),function(g,x,z){g=mxUtils.trim(g);p.setLinkForCell(d,0<g.length?g:null);p.setAttributeForCell(d,"linkTarget",z)},!0,p.getLinkTargetForCell(d))}}, -null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&(p.clearSelection(),m.actions.get("image").funct())})).isEnabled=E;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&m.showLinkDialog("",mxResources.get("insert"),function(d,f,g){d=mxUtils.trim(d);if(0<d.length){var x=null,z=p.getLinkTitle(d);null!=f&&0<f.length&&(x=f[0].iconUrl, -z=f[0].name||f[0].type,z=z.charAt(0).toUpperCase()+z.substring(1),30<z.length&&(z=z.substring(0,30)+"..."));f=new mxCell(z,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=x?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+x:"spacing=10;"));f.vertex=!0;x=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([f],!0));f.geometry.x=x.x;f.geometry.y=x.y;p.setAttributeForCell(f,"linkTarget",g);p.setLinkForCell(f,d);p.cellSizeUpdated(f, -!0);p.getModel().beginUpdate();try{f=p.addCell(f),p.fireEvent(new mxEventObject("cellsInserted","cells",[f]))}finally{p.getModel().endUpdate()}p.setSelectionCell(f);p.scrollCellToVisible(p.getSelectionCell())}},!0)})).isEnabled=E;this.addAction("link...",mxUtils.bind(this,function(){if(p.isEnabled())if(p.cellEditor.isContentEditing()){var d=p.getSelectedElement(),f=p.getParentByName(d,"A",p.cellEditor.textarea),g="";if(null==f&&null!=d&&null!=d.getElementsByTagName)for(var x=d.getElementsByTagName("a"), -z=0;z<x.length&&null==f;z++)x[z].textContent==d.textContent&&(f=x[z]);null!=f&&"A"==f.nodeName&&(g=f.getAttribute("href")||"",p.selectNode(f));var u=p.cellEditor.saveSelection();m.showLinkDialog(g,mxResources.get("apply"),mxUtils.bind(this,function(H){p.cellEditor.restoreSelection(u);null!=H&&p.insertLink(H)}))}else p.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=E;this.addAction("autosize",function(){var d=p.getSelectionCells();if(null!=d){p.getModel().beginUpdate(); +x)});m.showDialog(f.container,320,200,!0,!0);f.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var d=p.getLinkForCell(p.getSelectionCell());null!=d&&p.openLink(d)});this.addAction("editLink...",function(){var d=p.getSelectionCell();if(p.isEnabled()&&null!=d&&p.isCellEditable(d)){var f=p.getLinkForCell(d)||"";m.showLinkDialog(f,mxResources.get("apply"),function(g,x,y){g=mxUtils.trim(g);p.setLinkForCell(d,0<g.length?g:null);p.setAttributeForCell(d,"linkTarget",y)},!0,p.getLinkTargetForCell(d))}}, +null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&(p.clearSelection(),m.actions.get("image").funct())})).isEnabled=F;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&m.showLinkDialog("",mxResources.get("insert"),function(d,f,g){d=mxUtils.trim(d);if(0<d.length){var x=null,y=p.getLinkTitle(d);null!=f&&0<f.length&&(x=f[0].iconUrl, +y=f[0].name||f[0].type,y=y.charAt(0).toUpperCase()+y.substring(1),30<y.length&&(y=y.substring(0,30)+"..."));f=new mxCell(y,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=x?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+x:"spacing=10;"));f.vertex=!0;x=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([f],!0));f.geometry.x=x.x;f.geometry.y=x.y;p.setAttributeForCell(f,"linkTarget",g);p.setLinkForCell(f,d);p.cellSizeUpdated(f, +!0);p.getModel().beginUpdate();try{f=p.addCell(f),p.fireEvent(new mxEventObject("cellsInserted","cells",[f]))}finally{p.getModel().endUpdate()}p.setSelectionCell(f);p.scrollCellToVisible(p.getSelectionCell())}},!0)})).isEnabled=F;this.addAction("link...",mxUtils.bind(this,function(){if(p.isEnabled())if(p.cellEditor.isContentEditing()){var d=p.getSelectedElement(),f=p.getParentByName(d,"A",p.cellEditor.textarea),g="";if(null==f&&null!=d&&null!=d.getElementsByTagName)for(var x=d.getElementsByTagName("a"), +y=0;y<x.length&&null==f;y++)x[y].textContent==d.textContent&&(f=x[y]);null!=f&&"A"==f.nodeName&&(g=f.getAttribute("href")||"",p.selectNode(f));var u=p.cellEditor.saveSelection();m.showLinkDialog(g,mxResources.get("apply"),mxUtils.bind(this,function(H){p.cellEditor.restoreSelection(u);null!=H&&p.insertLink(H)}))}else p.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=F;this.addAction("autosize",function(){var d=p.getSelectionCells();if(null!=d){p.getModel().beginUpdate(); try{for(var f=0;f<d.length;f++){var g=d[f];0<p.getModel().getChildCount(g)?p.updateGroupBounds([g],0,!0):p.updateCellSize(g)}}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){p.snapCellsToGrid(p.getSelectionCells(),p.gridSize)});this.addAction("formattedText",function(){p.stopEditing();var d=p.getCommonStyle(p.getSelectionCells());d="1"==mxUtils.getValue(d,"html","0")?null:"1";p.getModel().beginUpdate();try{for(var f=p.getEditableCells(p.getSelectionCells()), -g=0;g<f.length;g++)if(state=p.getView().getState(f[g]),null!=state){var x=mxUtils.getValue(state.style,"html","0");if("1"==x&&null==d){var z=p.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(z=z.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var u=document.createElement("div");u.innerHTML=p.sanitizeHtml(z);z=mxUtils.extractTextWithWhitespace(u.childNodes);p.cellLabelChanged(state.cell,z);p.setCellStyles("html",d,[f[g]])}else"0"==x&&"1"==d&&(z=mxUtils.htmlEntities(p.convertValueToString(state.cell), -!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(z=z.replace(/\n/g,"<br/>")),p.cellLabelChanged(state.cell,p.sanitizeHtml(z)),p.setCellStyles("html",d,[f[g]]))}m.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=d?d:"0"],"cells",f))}finally{p.getModel().endUpdate()}});this.addAction("wordWrap",function(){var d=p.getView().getState(p.getSelectionCell()),f="wrap";p.stopEditing();null!=d&&"wrap"==d.style[mxConstants.STYLE_WHITE_SPACE]&&(f=null);p.setCellStyles(mxConstants.STYLE_WHITE_SPACE, +g=0;g<f.length;g++)if(state=p.getView().getState(f[g]),null!=state){var x=mxUtils.getValue(state.style,"html","0");if("1"==x&&null==d){var y=p.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(y=y.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var u=document.createElement("div");u.innerHTML=p.sanitizeHtml(y);y=mxUtils.extractTextWithWhitespace(u.childNodes);p.cellLabelChanged(state.cell,y);p.setCellStyles("html",d,[f[g]])}else"0"==x&&"1"==d&&(y=mxUtils.htmlEntities(p.convertValueToString(state.cell), +!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(y=y.replace(/\n/g,"<br/>")),p.cellLabelChanged(state.cell,p.sanitizeHtml(y)),p.setCellStyles("html",d,[f[g]]))}m.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=d?d:"0"],"cells",f))}finally{p.getModel().endUpdate()}});this.addAction("wordWrap",function(){var d=p.getView().getState(p.getSelectionCell()),f="wrap";p.stopEditing();null!=d&&"wrap"==d.style[mxConstants.STYLE_WHITE_SPACE]&&(f=null);p.setCellStyles(mxConstants.STYLE_WHITE_SPACE, f)});this.addAction("rotation",function(){var d="0",f=p.getView().getState(p.getSelectionCell());null!=f&&(d=f.style[mxConstants.STYLE_ROTATION]||d);d=new FilenameDialog(m,d,mxResources.get("apply"),function(g){null!=g&&0<g.length&&p.setCellStyles(mxConstants.STYLE_ROTATION,g)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");m.showDialog(d.container,375,80,!0,!0);d.init()});this.addAction("resetView",function(){p.zoomTo(1);m.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn", function(d){p.isFastZoomEnabled()?p.lazyZoom(!0,!0,m.buttonZoomDelay):p.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(d){p.isFastZoomEnabled()?p.lazyZoom(!1,!0,m.buttonZoomDelay):p.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var d=p.isSelectionEmpty()?p.getGraphBounds():p.getBoundingBox(p.getSelectionCells()),f=p.view.translate,g=p.view.scale;d.x=d.x/g-f.x;d.y=d.y/g-f.y;d.width/=g; d.height/=g;null!=p.backgroundImage&&(d=mxRectangle.fromRectangle(d),d.add(new mxRectangle(0,0,p.backgroundImage.width,p.backgroundImage.height)));0==d.width||0==d.height?(p.zoomTo(1),m.resetScrollbars()):(f=Editor.fitWindowBorders,null!=f&&(d.x-=f.x,d.y-=f.y,d.width+=f.width+f.x,d.height+=f.height+f.y),p.fitWindow(d))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();var d=p.pageFormat,f=p.pageScale;p.zoomTo(Math.floor(20* @@ -2993,11 +2991,11 @@ p.pageScale)/20);if(mxUtils.hasScrollbars(p.container)){var d=p.getPagePadding() 300,80,!0,!0);d.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var d=new FilenameDialog(this.editorUi,parseInt(100*p.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(f){f=parseInt(f);!isNaN(f)&&0<f&&(f=new ChangePageSetup(m,null,null,null,f/100),f.ignoreColor=!0,f.ignoreImage=!0,p.model.execute(f))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(d.container,300,80,!0,!0);d.init()}));var K=null;K=this.addAction("grid", function(){p.setGridEnabled(!p.isGridEnabled());p.defaultGridEnabled=p.isGridEnabled();m.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");K.setToggleAction(!0);K.setSelectedCallback(function(){return p.isGridEnabled()});K.setEnabled(!1);K=this.addAction("guides",function(){p.graphHandler.guidesEnabled=!p.graphHandler.guidesEnabled;m.fireEvent(new mxEventObject("guidesEnabledChanged"))});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.graphHandler.guidesEnabled}); K.setEnabled(!1);K=this.addAction("tooltips",function(){p.tooltipHandler.setEnabled(!p.tooltipHandler.isEnabled());m.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.tooltipHandler.isEnabled()});K=this.addAction("collapseExpand",function(){var d=new ChangePageSetup(m);d.ignoreColor=!0;d.ignoreImage=!0;d.foldingEnabled=!p.foldingEnabled;p.model.execute(d)});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.foldingEnabled}); -K.isEnabled=E;K=this.addAction("scrollbars",function(){m.setScrollbars(!m.hasScrollbars())});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.scrollbars});K=this.addAction("pageView",mxUtils.bind(this,function(){m.setPageVisible(!p.pageVisible)}));K.setToggleAction(!0);K.setSelectedCallback(function(){return p.pageVisible});K=this.addAction("connectionArrows",function(){p.connectionArrowsEnabled=!p.connectionArrowsEnabled;m.fireEvent(new mxEventObject("connectionArrowsChanged"))},null, +K.isEnabled=F;K=this.addAction("scrollbars",function(){m.setScrollbars(!m.hasScrollbars())});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.scrollbars});K=this.addAction("pageView",mxUtils.bind(this,function(){m.setPageVisible(!p.pageVisible)}));K.setToggleAction(!0);K.setSelectedCallback(function(){return p.pageVisible});K=this.addAction("connectionArrows",function(){p.connectionArrowsEnabled=!p.connectionArrowsEnabled;m.fireEvent(new mxEventObject("connectionArrowsChanged"))},null, null,"Alt+Shift+A");K.setToggleAction(!0);K.setSelectedCallback(function(){return p.connectionArrowsEnabled});K=this.addAction("connectionPoints",function(){p.setConnectable(!p.connectionHandler.isEnabled());m.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");K.setToggleAction(!0);K.setSelectedCallback(function(){return p.connectionHandler.isEnabled()});K=this.addAction("copyConnect",function(){p.connectionHandler.setCreateTarget(!p.connectionHandler.isCreateTarget()); -m.fireEvent(new mxEventObject("copyConnectChanged"))});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.connectionHandler.isCreateTarget()});K.isEnabled=E;K=this.addAction("autosave",function(){m.editor.setAutosave(!m.editor.autosave)});K.setToggleAction(!0);K.setSelectedCallback(function(){return m.editor.autosave});K.isEnabled=E;K.visible=!1;this.addAction("help",function(){var d="";mxResources.isLanguageSupported(mxClient.language)&&(d="_"+mxClient.language);p.openLink(RESOURCES_PATH+ -"/help"+d+".html")});var Q=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){Q||(m.showDialog((new AboutDialog(m)).container,320,280,!0,!0,function(){Q=!1}),Q=!0)}));K=mxUtils.bind(this,function(d,f,g,x){return this.addAction(d,function(){if(null!=g&&p.cellEditor.isContentEditing())g();else{p.stopEditing(!1);p.getModel().beginUpdate();try{var z=p.getEditableCells(p.getSelectionCells());p.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,f,z);(f&mxConstants.FONT_BOLD)== -mxConstants.FONT_BOLD?p.updateLabelElements(z,function(H){H.style.fontWeight=null;"B"==H.nodeName&&p.replaceElement(H)}):(f&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?p.updateLabelElements(z,function(H){H.style.fontStyle=null;"I"==H.nodeName&&p.replaceElement(H)}):(f&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&p.updateLabelElements(z,function(H){H.style.textDecoration=null;"U"==H.nodeName&&p.replaceElement(H)});for(var u=0;u<z.length;u++)0==p.model.getChildCount(z[u])&&p.autoSizeCell(z[u], +m.fireEvent(new mxEventObject("copyConnectChanged"))});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.connectionHandler.isCreateTarget()});K.isEnabled=F;K=this.addAction("autosave",function(){m.editor.setAutosave(!m.editor.autosave)});K.setToggleAction(!0);K.setSelectedCallback(function(){return m.editor.autosave});K.isEnabled=F;K.visible=!1;this.addAction("help",function(){var d="";mxResources.isLanguageSupported(mxClient.language)&&(d="_"+mxClient.language);p.openLink(RESOURCES_PATH+ +"/help"+d+".html")});var P=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){P||(m.showDialog((new AboutDialog(m)).container,320,280,!0,!0,function(){P=!1}),P=!0)}));K=mxUtils.bind(this,function(d,f,g,x){return this.addAction(d,function(){if(null!=g&&p.cellEditor.isContentEditing())g();else{p.stopEditing(!1);p.getModel().beginUpdate();try{var y=p.getEditableCells(p.getSelectionCells());p.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,f,y);(f&mxConstants.FONT_BOLD)== +mxConstants.FONT_BOLD?p.updateLabelElements(y,function(H){H.style.fontWeight=null;"B"==H.nodeName&&p.replaceElement(H)}):(f&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?p.updateLabelElements(y,function(H){H.style.fontStyle=null;"I"==H.nodeName&&p.replaceElement(H)}):(f&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&p.updateLabelElements(y,function(H){H.style.textDecoration=null;"U"==H.nodeName&&p.replaceElement(H)});for(var u=0;u<y.length;u++)0==p.model.getChildCount(y[u])&&p.autoSizeCell(y[u], !1)}finally{p.getModel().endUpdate()}}},null,null,x)});K("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");K("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");K("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){m.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...", function(){m.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){m.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){m.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){m.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL, !0)});this.addAction("shadow",function(){m.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,null),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dashed",function(){p.getModel().beginUpdate(); @@ -3007,18 +3005,18 @@ this.addAction("rounded",function(){p.getModel().beginUpdate();try{p.setCellStyl g="1"==mxUtils.getValue(f,mxConstants.STYLE_ROUNDED,"0")?"0":"1";p.setCellStyles(mxConstants.STYLE_ROUNDED,g);p.setCellStyles(mxConstants.STYLE_CURVED,null);m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[g,"0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}}});this.addAction("curved",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),p.setCellStyles(mxConstants.STYLE_CURVED, "1"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("collapsible",function(){var d=p.view.getState(p.getSelectionCell()),f="1";null!=d&&null!=p.getFoldingImage(d)&&(f="0");p.setCellStyles("collapsible",f);m.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[f],"cells",p.getSelectionCells()))});this.addAction("editStyle...", mxUtils.bind(this,function(){var d=p.getEditableCells(p.getSelectionCells());if(null!=d&&0<d.length){var f=p.getModel();f=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",f.getStyle(d[0])||"",function(g){null!=g&&p.setCellStyle(mxUtils.trim(g),d)},null,null,400,220);this.editorUi.showDialog(f.container,420,300,!0,!0);f.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){p.isEnabled()&&!p.isSelectionEmpty()&&m.setDefaultStyle(p.getSelectionCell())}, -null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){p.isEnabled()&&m.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var d=p.getSelectionCell();if(null!=d&&p.getModel().isEdge(d)){var f=C.graph.selectionCellsHandler.getHandler(d);if(f instanceof mxEdgeHandler){var g=p.view.translate,x=p.view.scale,z=g.x;g=g.y;d=p.getModel().getParent(d);for(var u=p.getCellGeometry(d);p.getModel().isVertex(d)&&null!=u;)z+=u.x,g+=u.y,d= -p.getModel().getParent(d),u=p.getCellGeometry(d);z=Math.round(p.snap(p.popupMenuHandler.triggerX/x-z));x=Math.round(p.snap(p.popupMenuHandler.triggerY/x-g));f.addPointAt(f.state,z,x)}}});this.addAction("removeWaypoint",function(){var d=m.actions.get("removeWaypoint");null!=d.handler&&d.handler.removePoint(d.handler.state,d.index)});this.addAction("clearWaypoints",function(d,f){d=null!=f?f:d;var g=p.getSelectionCells();if(null!=g){g=p.getEditableCells(p.addAllEdges(g));p.getModel().beginUpdate();try{for(var x= -0;x<g.length;x++){var z=g[x];if(p.getModel().isEdge(z)){var u=p.getCellGeometry(z);null!=f&&mxEvent.isShiftDown(d)?(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[z]),p.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[z]),p.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[z]),p.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[z])):null!=u&&(u=u.clone(),u.points=null,u.x=0,u.y=0,u.offset=null,p.getModel().setGeometry(z,u))}}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+C");K=this.addAction("subscript", +null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){p.isEnabled()&&m.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var d=p.getSelectionCell();if(null!=d&&p.getModel().isEdge(d)){var f=C.graph.selectionCellsHandler.getHandler(d);if(f instanceof mxEdgeHandler){var g=p.view.translate,x=p.view.scale,y=g.x;g=g.y;d=p.getModel().getParent(d);for(var u=p.getCellGeometry(d);p.getModel().isVertex(d)&&null!=u;)y+=u.x,g+=u.y,d= +p.getModel().getParent(d),u=p.getCellGeometry(d);y=Math.round(p.snap(p.popupMenuHandler.triggerX/x-y));x=Math.round(p.snap(p.popupMenuHandler.triggerY/x-g));f.addPointAt(f.state,y,x)}}});this.addAction("removeWaypoint",function(){var d=m.actions.get("removeWaypoint");null!=d.handler&&d.handler.removePoint(d.handler.state,d.index)});this.addAction("clearWaypoints",function(d,f){d=null!=f?f:d;var g=p.getSelectionCells();if(null!=g){g=p.getEditableCells(p.addAllEdges(g));p.getModel().beginUpdate();try{for(var x= +0;x<g.length;x++){var y=g[x];if(p.getModel().isEdge(y)){var u=p.getCellGeometry(y);null!=f&&mxEvent.isShiftDown(d)?(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[y]),p.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[y]),p.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[y]),p.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[y])):null!=u&&(u=u.clone(),u.points=null,u.x=0,u.y=0,u.offset=null,p.getModel().setGeometry(y,u))}}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+C");K=this.addAction("subscript", mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");K=this.addAction("superscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var d=mxResources.get("image")+" ("+mxResources.get("url")+"):",f=p.getView().getState(p.getSelectionCell()), -g="",x=null;null!=f&&(g=f.style[mxConstants.STYLE_IMAGE]||g,x=f.style[mxConstants.STYLE_CLIP_PATH]||x);var z=p.cellEditor.saveSelection();m.showImageDialog(d,g,function(u,H,J,D,G,V){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(z),p.insertImage(u,H,J);else{var U=p.getSelectionCells();if(null!=u&&(0<u.length||0<U.length)){var Y=null;p.getModel().beginUpdate();try{if(0==U.length){U=[p.insertVertex(p.getDefaultParent(),null,"",0,0,H,J,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")]; -var O=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(U,!0));U[0].geometry.x=O.x;U[0].geometry.y=O.y;null!=D&&k(U[0],D,G,V,p);Y=U;p.fireEvent(new mxEventObject("cellsInserted","cells",Y))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<u.length?u:null,U);var qa=p.getCurrentCellStyle(U[0]);"image"!=qa[mxConstants.STYLE_SHAPE]&&"label"!=qa[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",U):0==u.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,U);null==D&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH, -null,U);if(null!=H&&null!=J)for(u=0;u<U.length;u++){var oa=U[u];if("0"!=p.getCurrentCellStyle(oa).expand){var aa=p.getModel().getGeometry(oa);null!=aa&&(aa=aa.clone(),aa.width=H,aa.height=J,p.getModel().setGeometry(oa,aa))}null!=D&&k(oa,D,G,V,p)}}finally{p.getModel().endUpdate()}null!=Y&&(p.setSelectionCells(Y),p.scrollCellToVisible(Y[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,x)}}).isEnabled=E;this.addAction("crop...",function(){var d=p.getSelectionCell();if(p.isEnabled()&& -!p.isCellLocked(p.getDefaultParent())&&null!=d){var f=p.getCurrentCellStyle(d),g=f[mxConstants.STYLE_IMAGE],x=f[mxConstants.STYLE_SHAPE];g&&"image"==x&&(f=new CropImageDialog(m,g,f[mxConstants.STYLE_CLIP_PATH],function(z,u,H){k(d,z,u,H,p)}),m.showDialog(f.container,300,390,!0,!0))}}).isEnabled=E;K=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(m,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show", +g="",x=null;null!=f&&(g=f.style[mxConstants.STYLE_IMAGE]||g,x=f.style[mxConstants.STYLE_CLIP_PATH]||x);var y=p.cellEditor.saveSelection();m.showImageDialog(d,g,function(u,H,J,D,G,W){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(y),p.insertImage(u,H,J);else{var T=p.getSelectionCells();if(null!=u&&(0<u.length||0<T.length)){var Z=null;p.getModel().beginUpdate();try{if(0==T.length){T=[p.insertVertex(p.getDefaultParent(),null,"",0,0,H,J,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")]; +var N=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(T,!0));T[0].geometry.x=N.x;T[0].geometry.y=N.y;null!=D&&k(T[0],D,G,W,p);Z=T;p.fireEvent(new mxEventObject("cellsInserted","cells",Z))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<u.length?u:null,T);var qa=p.getCurrentCellStyle(T[0]);"image"!=qa[mxConstants.STYLE_SHAPE]&&"label"!=qa[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",T):0==u.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,T);null==D&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH, +null,T);if(null!=H&&null!=J)for(u=0;u<T.length;u++){var oa=T[u];if("0"!=p.getCurrentCellStyle(oa).expand){var S=p.getModel().getGeometry(oa);null!=S&&(S=S.clone(),S.width=H,S.height=J,p.getModel().setGeometry(oa,S))}null!=D&&k(oa,D,G,W,p)}}finally{p.getModel().endUpdate()}null!=Z&&(p.setSelectionCells(Z),p.scrollCellToVisible(Z[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,x)}}).isEnabled=F;this.addAction("crop...",function(){var d=p.getSelectionCell();if(p.isEnabled()&& +!p.isCellLocked(p.getDefaultParent())&&null!=d){var f=p.getCurrentCellStyle(d),g=f[mxConstants.STYLE_IMAGE],x=f[mxConstants.STYLE_SHAPE];g&&"image"==x&&(f=new CropImageDialog(m,g,f[mxConstants.STYLE_CLIP_PATH],function(y,u,H){k(d,y,u,H,p)}),m.showDialog(f.container,300,390,!0,!0))}}).isEnabled=F;K=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(m,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show", mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");K.setToggleAction(!0);K.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()})); K=this.addAction("formatPanel",mxUtils.bind(this,function(){m.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");K.setToggleAction(!0);K.setSelectedCallback(mxUtils.bind(this,function(){return 0<m.formatWidth}));K=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(m,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("outline"))})), this.outlineWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");K.setToggleAction(!0);K.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var d= -p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=d){var f=new ConnectionPointsDialog(m,d);m.showDialog(f.container,350,450,!0,!1,function(){f.destroy()});f.init()}}).isEnabled=E};Actions.prototype.addAction=function(b,e,k,m,C){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var p=mxResources.get(b)+"..."}else p=mxResources.get(b);return this.put(b,new Action(p,e,k,m,C))};Actions.prototype.put=function(b,e){return this.actions[b]=e}; +p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=d){var f=new ConnectionPointsDialog(m,d);m.showDialog(f.container,350,450,!0,!1,function(){f.destroy()});f.init()}}).isEnabled=F};Actions.prototype.addAction=function(b,e,k,m,C){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var p=mxResources.get(b)+"..."}else p=mxResources.get(b);return this.put(b,new Action(p,e,k,m,C))};Actions.prototype.put=function(b,e){return this.actions[b]=e}; Actions.prototype.get=function(b){return this.actions[b]};function Action(b,e,k,m,C){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(e);this.enabled=null!=k?k:!0;this.iconCls=m;this.shortcut=C;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(b){return b};Action.prototype.setEnabled=function(b){this.enabled!=b&&(this.enabled=b,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled}; Action.prototype.setToggleAction=function(b){this.toggleAction=b};Action.prototype.setSelectedCallback=function(b){this.selectedCallback=b};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(b,e){mxEventSource.call(this);this.ui=b;this.setData(e||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource); DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1; @@ -3026,28 +3024,28 @@ DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};DrawioFile.prototype.synchronizeFile=function(b,e){this.savingFile?null!=e&&e({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,function(k){this.sync.cleanup(b,e,k)}),e):this.updateFile(b,e)}; DrawioFile.prototype.updateFile=function(b,e,k,m){null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(C){try{null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[C]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=C?this.mergeFile(C,b,e,m):this.reloadFile(b, e))}catch(p){null!=e&&e(p)}}),e))}; -DrawioFile.prototype.mergeFile=function(b,e,k,m){var C=!0;try{this.stats.fileMerged++;var p=this.getShadowPages(),E=b.getShadowPages();if(null!=E&&0<E.length){var K=[this.ui.diffPages(null!=m?m:p,E)],Q=this.ignorePatches(K);this.setShadowPages(E);if(Q)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",Q);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(p,this.ui.pages):null;m={};Q={};var d=this.ui.patchPages(p,K[0]),f=this.ui.getHashValueForPages(d, -m),g=this.ui.getHashValueForPages(E,Q);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",p,"pages",this.ui.pages,"patches",K,"backup",this.backupPatch,"checksum",f,"current",g,"valid",f==g,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=f&&f!=g){var x=this.compressReportData(this.getAnonymizedXmlForPages(E)),z=this.compressReportData(this.getAnonymizedXmlForPages(d)),u=this.ui.hashValue(b.getCurrentEtag()),H=this.ui.hashValue(this.getCurrentEtag()); -this.checksumError(k,K,"Shadow Details: "+JSON.stringify(m)+"\nChecksum: "+f+"\nCurrent: "+g+"\nCurrent Details: "+JSON.stringify(Q)+"\nFrom: "+u+"\nTo: "+H+"\n\nFile Data:\n"+x+"\nPatched Shadow:\n"+z,null,"mergeFile",f,g,b.getCurrentRevisionId());return}if(null!=this.sync){var J=this.sync.patchRealtime(K,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==J||mxUtils.isEmptyObject(J)||K.push(J)}this.patch(K,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw C=!1,Error(mxResources.get("notADiagramFile")); -this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(V){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(V);try{if(C)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,V);else{var D=this.getCurrentUser(),G=null!=D?D.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),G,V)}}catch(U){}}}; +DrawioFile.prototype.mergeFile=function(b,e,k,m){var C=!0;try{this.stats.fileMerged++;var p=this.getShadowPages(),F=b.getShadowPages();if(null!=F&&0<F.length){var K=[this.ui.diffPages(null!=m?m:p,F)],P=this.ignorePatches(K);this.setShadowPages(F);if(P)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",P);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(p,this.ui.pages):null;m={};P={};var d=this.ui.patchPages(p,K[0]),f=this.ui.getHashValueForPages(d, +m),g=this.ui.getHashValueForPages(F,P);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",p,"pages",this.ui.pages,"patches",K,"backup",this.backupPatch,"checksum",f,"current",g,"valid",f==g,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=f&&f!=g){var x=this.compressReportData(this.getAnonymizedXmlForPages(F)),y=this.compressReportData(this.getAnonymizedXmlForPages(d)),u=this.ui.hashValue(b.getCurrentEtag()),H=this.ui.hashValue(this.getCurrentEtag()); +this.checksumError(k,K,"Shadow Details: "+JSON.stringify(m)+"\nChecksum: "+f+"\nCurrent: "+g+"\nCurrent Details: "+JSON.stringify(P)+"\nFrom: "+u+"\nTo: "+H+"\n\nFile Data:\n"+x+"\nPatched Shadow:\n"+y,null,"mergeFile",f,g,b.getCurrentRevisionId());return}if(null!=this.sync){var J=this.sync.patchRealtime(K,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==J||mxUtils.isEmptyObject(J)||K.push(J)}this.patch(K,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw C=!1,Error(mxResources.get("notADiagramFile")); +this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(W){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(W);try{if(C)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,W);else{var D=this.getCurrentUser(),G=null!=D?D.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),G,W)}}catch(T){}}}; DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),k=e.document.createElement("mxfile");if(null!=b)for(var m=0;m<b.length;m++){var C=e.encode(new mxGraphModel(b[m].root));"1"!=urlParams.dev&&(C=this.ui.anonymizeNode(C,!0));C.setAttribute("id",b[m].getId());b[m].viewState&&this.ui.editor.graph.saveViewState(b[m].viewState,C,!0);k.appendChild(C)}return mxUtils.getPrettyXml(k)}; DrawioFile.prototype.compressReportData=function(b,e,k){e=null!=e?e:1E4;null!=k&&null!=b&&b.length>k?b=b.substring(0,k)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b}; -DrawioFile.prototype.checksumError=function(b,e,k,m,C,p,E,K){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(var Q=0;Q<e.length;Q++)this.ui.anonymizePatch(e[Q]);var d=mxUtils.bind(this,function(H){var J=this.compressReportData(JSON.stringify(e,null,2));H=null==H?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(H.data)), -25E3);this.sendErrorReport("Checksum Error in "+C+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+J+(null!=H?"\n\nRemote:\n"+H:""),null,7E4)});null==m?d(null):this.getLatestVersion(mxUtils.bind(this,function(H){null!=H&&H.getCurrentEtag()==m?d(H):d(null)}),function(){})}else{var f=this.getCurrentUser(),g=null!=f?f.id:"unknown",x=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",z=JSON.stringify(e).length,u=null;if(null!=e&&this.constructor==DriveFile&&400>z){for(Q=0;Q<e.length;Q++)this.ui.anonymizePatch(e[Q]); -u=JSON.stringify(e);u=null!=u&&250>u.length?Graph.compress(u):null}this.getLatestVersion(mxUtils.bind(this,function(H){try{var J=null!=u?"Report":"Error",D=this.ui.getHashValueForPages(H.getShadowPages());EditorUi.logError("Checksum "+J+" in "+C+" "+x,null,this.getMode()+"."+this.getId(),"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+z+"-patches_"+e.length+(null!=u?"-json_"+u:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=E?"-current_"+E:"")+(null!=K? -"-rev_"+this.ui.hashValue(K):"")+(null!=D?"-latest_"+D:"")+(null!=H?"-latestRev_"+this.ui.hashValue(H.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+x,action:C,label:"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+z+"-patches_"+e.length+"-size_"+this.getSize()})}catch(G){}}),b)}}catch(H){}}; -DrawioFile.prototype.sendErrorReport=function(b,e,k,m){try{var C=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),E=this.getCurrentUser(),K=null!=E?this.ui.hashValue(E.id):"unknown",Q=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",d=this.getTitle(),f=d.lastIndexOf(".");E="xml";0<f&&(E=d.substring(f));var g=null!=k?k.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+ -":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+E+")\nUser="+K+Q+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e: +DrawioFile.prototype.checksumError=function(b,e,k,m,C,p,F,K){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(var P=0;P<e.length;P++)this.ui.anonymizePatch(e[P]);var d=mxUtils.bind(this,function(H){var J=this.compressReportData(JSON.stringify(e,null,2));H=null==H?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(H.data)), +25E3);this.sendErrorReport("Checksum Error in "+C+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+J+(null!=H?"\n\nRemote:\n"+H:""),null,7E4)});null==m?d(null):this.getLatestVersion(mxUtils.bind(this,function(H){null!=H&&H.getCurrentEtag()==m?d(H):d(null)}),function(){})}else{var f=this.getCurrentUser(),g=null!=f?f.id:"unknown",x=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",y=JSON.stringify(e).length,u=null;if(null!=e&&this.constructor==DriveFile&&400>y){for(P=0;P<e.length;P++)this.ui.anonymizePatch(e[P]); +u=JSON.stringify(e);u=null!=u&&250>u.length?Graph.compress(u):null}this.getLatestVersion(mxUtils.bind(this,function(H){try{var J=null!=u?"Report":"Error",D=this.ui.getHashValueForPages(H.getShadowPages());EditorUi.logError("Checksum "+J+" in "+C+" "+x,null,this.getMode()+"."+this.getId(),"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+y+"-patches_"+e.length+(null!=u?"-json_"+u:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=F?"-current_"+F:"")+(null!=K? +"-rev_"+this.ui.hashValue(K):"")+(null!=D?"-latest_"+D:"")+(null!=H?"-latestRev_"+this.ui.hashValue(H.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+x,action:C,label:"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+y+"-patches_"+e.length+"-size_"+this.getSize()})}catch(G){}}),b)}}catch(H){}}; +DrawioFile.prototype.sendErrorReport=function(b,e,k,m){try{var C=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),F=this.getCurrentUser(),K=null!=F?this.ui.hashValue(F.id):"unknown",P=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",d=this.getTitle(),f=d.lastIndexOf(".");F="xml";0<f&&(F=d.substring(f));var g=null!=k?k.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+ +":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+F+")\nUser="+K+P+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e: "")+(null!=k?"\n\nError: "+k.message:"")+"\n\nStack:\n"+g+"\n\nShadow:\n"+C+"\n\nData:\n"+p,m)}catch(x){}}; -DrawioFile.prototype.reloadFile=function(b,e){try{this.ui.spinner.stop();var k=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),e);else{var m=this.ui.editor.graph,C=m.getSelectionCells(),p=m.getViewState(),E= -this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(E,p,C);null!=this.backupPatch&&this.patch([this.backupPatch]);var K=this.ui.getCurrentFile();null!=K&&(K.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),k,mxResources.get("cancel"),mxResources.get("discardChanges")): +DrawioFile.prototype.reloadFile=function(b,e){try{this.ui.spinner.stop();var k=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),e);else{var m=this.ui.editor.graph,C=m.getSelectionCells(),p=m.getViewState(),F= +this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(F,p,C);null!=this.backupPatch&&this.patch([this.backupPatch]);var K=this.ui.getCurrentFile();null!=K&&(K.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),k,mxResources.get("cancel"),mxResources.get("discardChanges")): k()}catch(m){null!=e&&e(m)}};DrawioFile.prototype.mergeLatestVersion=function(b,e,k){this.getLatestVersion(mxUtils.bind(this,function(m){this.ui.editor.graph.model.beginUpdate();try{this.ui.replaceFileData(m.getData()),null!=b&&this.patch(b)}finally{this.ui.editor.graph.model.endUpdate()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(m.getDescriptor());this.descriptorChanged();null!=e&&e()}),k)}; DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var e=!0;if(null!=b)for(var k=0;k<b.length&&e;k++)e=e&&mxUtils.isEmptyObject(b[k]);return e}; -DrawioFile.prototype.patch=function(b,e,k){if(null!=b){var m=this.ui.editor.undoManager,C=m.history.slice(),p=m.indexOfNextAdd,E=this.ui.editor.graph;E.container.style.visibility="hidden";var K=this.changeListenerEnabled;this.changeListenerEnabled=k;var Q=E.foldingEnabled,d=E.mathEnabled,f=E.cellRenderer.redraw;E.cellRenderer.redraw=function(g){g.view.graph.isEditing(g.cell)&&(g.view.graph.scrollCellToVisible(g.cell),g.view.graph.cellEditor.resize());f.apply(this,arguments)};E.model.beginUpdate(); -try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{E.container.style.visibility="";E.model.endUpdate();E.cellRenderer.redraw=f;this.changeListenerEnabled=K;k||(m.history=C,m.indexOfNextAdd=p,m.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)d!=E.mathEnabled? -(this.ui.editor.updateGraphComponents(),E.refresh()):(Q!=E.foldingEnabled?E.view.revalidate():E.view.validate(),E.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",k)}return b}; +DrawioFile.prototype.patch=function(b,e,k){if(null!=b){var m=this.ui.editor.undoManager,C=m.history.slice(),p=m.indexOfNextAdd,F=this.ui.editor.graph;F.container.style.visibility="hidden";var K=this.changeListenerEnabled;this.changeListenerEnabled=k;var P=F.foldingEnabled,d=F.mathEnabled,f=F.cellRenderer.redraw;F.cellRenderer.redraw=function(g){g.view.graph.isEditing(g.cell)&&(g.view.graph.scrollCellToVisible(g.cell),g.view.graph.cellEditor.resize());f.apply(this,arguments)};F.model.beginUpdate(); +try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{F.container.style.visibility="";F.model.endUpdate();F.cellRenderer.redraw=f;this.changeListenerEnabled=K;k||(m.history=C,m.indexOfNextAdd=p,m.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)d!=F.mathEnabled? +(this.ui.editor.updateGraphComponents(),F.refresh()):(P!=F.foldingEnabled?F.view.revalidate():F.view.validate(),F.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",k)}return b}; DrawioFile.prototype.save=function(b,e,k,m,C,p){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",m,"overwrite",C,"manual",p,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!C&&this.invalidChecksum)if(null!=k)k({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=k)k({message:mxResources.get("readOnly")}); -else throw Error(mxResources.get("readOnly"));}catch(E){if(null!=k)k(E);else throw E;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var e=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=e&&(e.viewState=this.ui.editor.graph.getViewState(),e.needsUpdate=!0)}e=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return e}; +else throw Error(mxResources.get("readOnly"));}catch(F){if(null!=k)k(F);else throw F;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var e=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=e&&(e.viewState=this.ui.editor.graph.getViewState(),e.needsUpdate=!0)}e=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return e}; DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,e,k){}; DrawioFile.prototype.saveFile=function(b,e,k,m){};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};DrawioFile.prototype.isAutosaveOptional=function(){return!1}; DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,e,k){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,e,k){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""}; @@ -3084,26 +3082,26 @@ DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.u !1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))}; DrawioFile.prototype.handleFileError=function(b,e){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,e):(this.isModified()&&this.addUnsavedStatus(b),e?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||(b=this.getErrorMessage(b),null!=b&&60<b.length&&(b=b.substring(0,60)+"..."),this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+(null!=b?" ("+mxUtils.htmlEntities(b)+ ")":"")+"</div>"))))}; -DrawioFile.prototype.handleConflictError=function(b,e){var k=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),m=mxUtils.bind(this,function(E){this.handleFileError(E,!0)}),C=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,k,m,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),p=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&& +DrawioFile.prototype.handleConflictError=function(b,e){var k=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),m=mxUtils.bind(this,function(F){this.handleFileError(F,!0)}),C=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,k,m,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),p=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&& this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,k,m,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),m)});"none"==DrawioFile.SYNC?this.showCopyDialog(k,m,C):this.invalidChecksum?this.showRefreshDialog(k,m,this.getErrorMessage(b)):e?this.showConflictDialog(C,p):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument"))); this.synchronizeFile(k,m)}),this.getErrorMessage(b))};DrawioFile.prototype.getErrorMessage=function(b){var e=null!=b?null!=b.error?b.error.message:b.message:null;null==e&&null!=b&&b.code==App.ERROR_TIMEOUT&&(e=mxResources.get("timeout"));return e};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval}; DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(e){this.ui.stopSanityCheck(); null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(e){this.handleFileError(e)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()}; DrawioFile.prototype.createSecret=function(b){var e=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(e):this.sync.createToken(e,mxUtils.bind(this,function(k){b(e,k)}),mxUtils.bind(this,function(){b(e)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()}; -DrawioFile.prototype.fileSaved=function(b,e,k,m,C){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var p=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(p),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=k&&k()):this.sync.fileSaved(p,e,k,m,C)}catch(Q){this.invalidChecksum=this.inConflictState= -!0;this.descriptorChanged();null!=m&&m(Q);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,Q);else{var E=this.getCurrentUser(),K=null!=E?E.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),K,Q)}}catch(d){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}; +DrawioFile.prototype.fileSaved=function(b,e,k,m,C){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var p=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(p),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=k&&k()):this.sync.fileSaved(p,e,k,m,C)}catch(P){this.invalidChecksum=this.inConflictState= +!0;this.descriptorChanged();null!=m&&m(P);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,P);else{var F=this.getCurrentUser(),K=null!=F?F.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),K,P)}}catch(d){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}; DrawioFile.prototype.autosave=function(b,e,k,m){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var C=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==C&&(this.autosaveThread=null);EditorUi.debug("DrawioFile.autosave",[this],"thread",C,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile);if(this.isModified()&&this.isAutosaveNow()){var p=this.isAutosaveRevision(); -p&&(this.lastAutosaveRevision=(new Date).getTime());this.save(p,mxUtils.bind(this,function(E){this.autosaveCompleted();null!=k&&k(E)}),mxUtils.bind(this,function(E){null!=m&&m(E)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=k&&k(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",C,"delay",b,"saving",this.savingFile);this.autosaveThread=C};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){}; +p&&(this.lastAutosaveRevision=(new Date).getTime());this.save(p,mxUtils.bind(this,function(F){this.autosaveCompleted();null!=k&&k(F)}),mxUtils.bind(this,function(F){null!=m&&m(F)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=k&&k(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",C,"delay",b,"saving",this.savingFile);this.autosaveThread=C};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){}; DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))}; DrawioFile.prototype.close=function(b){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,b);this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,e){if(null!=b&&null!=e){var k=b.lastIndexOf(".");b=0<k?b.substring(k):"";k=e.lastIndexOf(".");return b===(0<k?e.substring(k):"")}return b==e}; DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.clearAutosave();this.removeListeners();this.stats.destroyed++;null!=this.sync&&(this.sync.destroy(),this.sync=null)};DrawioFile.prototype.commentsSupported=function(){return!1}; DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,e){b([])};DrawioFile.prototype.addComment=function(b,e,k){e(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,e){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,e)};LocalFile=function(b,e,k,m,C,p){DrawioFile.call(this,b,e);this.title=k;this.mode=m?null:App.MODE_DEVICE;this.fileHandle=C;this.desc=p};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title}; LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,e,k){this.saveAs(this.title,e,k)};LocalFile.prototype.saveAs=function(b,e,k){this.saveFile(b,!1,e,k)};LocalFile.prototype.saveAs=function(b,e,k){this.saveFile(b,!1,e,k)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b}; LocalFile.prototype.getLatestVersion=function(b,e){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,e)}; -LocalFile.prototype.saveFile=function(b,e,k,m,C){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;C||this.updateFileData();var p=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var E=this.getData(),K=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),Q=mxUtils.bind(this,function(d){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var f=mxUtils.bind(this, -function(x){this.savingFile=!1;null!=m&&m({error:x})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(x){this.fileHandle.getFile().then(mxUtils.bind(this,function(z){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[z],"conflict",this.desc.lastModified!=z.lastModified);this.desc.lastModified==z.lastModified?x.write(p?this.ui.base64ToBlob(d,"image/png"):d).then(mxUtils.bind(this,function(){x.close().then(mxUtils.bind(this, -function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(u){try{var H=this.desc;this.savingFile=!1;this.desc=u;this.fileSaved(E,H,K,f);this.removeDraft()}catch(J){f(J)}}),f)}),f)}),f):(this.inConflictState=!0,f())}),mxUtils.bind(this,function(z){this.invalidFileHandle=!0;f(z)}))}),f)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(d,b,p?"image/png":"text/xml",p);else if(d.length<MAX_REQUEST_SIZE){var g=b.lastIndexOf(".");g=0<g?b.substring(g+1):"xml"; -(new mxXmlRequest(SAVE_URL,"format="+g+"&xml="+encodeURIComponent(d)+"&filename="+encodeURIComponent(b)+(p?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}));K()}});p?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(d){Q(d)}),m,this.ui.getCurrentFile()!=this?E:null,e.scale,e.border)):Q(E)}; +LocalFile.prototype.saveFile=function(b,e,k,m,C){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;C||this.updateFileData();var p=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var F=this.getData(),K=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),P=mxUtils.bind(this,function(d){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var f=mxUtils.bind(this, +function(x){this.savingFile=!1;null!=m&&m({error:x})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(x){this.fileHandle.getFile().then(mxUtils.bind(this,function(y){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[y],"conflict",this.desc.lastModified!=y.lastModified);this.desc.lastModified==y.lastModified?x.write(p?this.ui.base64ToBlob(d,"image/png"):d).then(mxUtils.bind(this,function(){x.close().then(mxUtils.bind(this, +function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(u){try{var H=this.desc;this.savingFile=!1;this.desc=u;this.fileSaved(F,H,K,f);this.removeDraft()}catch(J){f(J)}}),f)}),f)}),f):(this.inConflictState=!0,f())}),mxUtils.bind(this,function(y){this.invalidFileHandle=!0;f(y)}))}),f)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(d,b,p?"image/png":"text/xml",p);else if(d.length<MAX_REQUEST_SIZE){var g=b.lastIndexOf(".");g=0<g?b.substring(g+1):"xml"; +(new mxXmlRequest(SAVE_URL,"format="+g+"&xml="+encodeURIComponent(d)+"&filename="+encodeURIComponent(b)+(p?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}));K()}});p?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(d){P(d)}),m,this.ui.getCurrentFile()!=this?F:null,e.scale,e.border)):P(F)}; LocalFile.prototype.rename=function(b,e,k){this.title=b;this.descriptorChanged();null!=e&&e()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"}, {description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}}, {commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"}, @@ -3116,7 +3114,6 @@ Editor.commentImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53M Editor.shareImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTggMTYuMDhjLS43NiAwLTEuNDQuMy0xLjk2Ljc3TDguOTEgMTIuN2MuMDUtLjIzLjA5LS40Ni4wOS0uN3MtLjA0LS40Ny0uMDktLjdsNy4wNS00LjExYy41NC41IDEuMjUuODEgMi4wNC44MSAxLjY2IDAgMy0xLjM0IDMtM3MtMS4zNC0zLTMtMy0zIDEuMzQtMyAzYzAgLjI0LjA0LjQ3LjA5LjdMOC4wNCA5LjgxQzcuNSA5LjMxIDYuNzkgOSA2IDljLTEuNjYgMC0zIDEuMzQtMyAzczEuMzQgMyAzIDNjLjc5IDAgMS41LS4zMSAyLjA0LS44MWw3LjEyIDQuMTZjLS4wNS4yMS0uMDguNDMtLjA4LjY1IDAgMS42MSAxLjMxIDIuOTIgMi45MiAyLjkyIDEuNjEgMCAyLjkyLTEuMzEgMi45Mi0yLjkycy0xLjMxLTIuOTItMi45Mi0yLjkyeiIvPjwvc3ZnPg=="; Editor.syncImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgNFYxTDggNWw0IDRWNmMzLjMxIDAgNiAyLjY5IDYgNiAwIDEuMDEtLjI1IDEuOTctLjcgMi44bDEuNDYgMS40NkMxOS41NCAxNS4wMyAyMCAxMy41NyAyMCAxMmMwLTQuNDItMy41OC04LTgtOHptMCAxNGMtMy4zMSAwLTYtMi42OS02LTYgMC0xLjAxLjI1LTEuOTcuNy0yLjhMNS4yNCA3Ljc0QzQuNDYgOC45NyA0IDEwLjQzIDQgMTJjMCA0LjQyIDMuNTggOCA4IDh2M2w0LTQtNC00djN6Ii8+PC9zdmc+";Editor.cloudImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEyIDZjMi42MiAwIDQuODggMS44NiA1LjM5IDQuNDNsLjMgMS41IDEuNTMuMTFjMS41Ni4xIDIuNzggMS40MSAyLjc4IDIuOTYgMCAxLjY1LTEuMzUgMy0zIDNINmMtMi4yMSAwLTQtMS43OS00LTQgMC0yLjA1IDEuNTMtMy43NiAzLjU2LTMuOTdsMS4wNy0uMTEuNS0uOTVDOC4wOCA3LjE0IDkuOTQgNiAxMiA2bTAtMkM5LjExIDQgNi42IDUuNjQgNS4zNSA4LjA0IDIuMzQgOC4zNiAwIDEwLjkxIDAgMTRjMCAzLjMxIDIuNjkgNiA2IDZoMTNjMi43NiAwIDUtMi4yNCA1LTUgMC0yLjY0LTIuMDUtNC43OC00LjY1LTQuOTZDMTguNjcgNi41OSAxNS42NCA0IDEyIDR6Ii8+PC9zdmc+"; Editor.cloudOffImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTI0IDE1YzAtMi42NC0yLjA1LTQuNzgtNC42NS00Ljk2QzE4LjY3IDYuNTkgMTUuNjQgNCAxMiA0Yy0xLjMzIDAtMi41Ny4zNi0zLjY1Ljk3bDEuNDkgMS40OUMxMC41MSA2LjE3IDExLjIzIDYgMTIgNmMzLjA0IDAgNS41IDIuNDYgNS41IDUuNXYuNUgxOWMxLjY2IDAgMyAxLjM0IDMgMyAwIC45OS0uNDggMS44NS0xLjIxIDIuNGwxLjQxIDEuNDFjMS4wOS0uOTIgMS44LTIuMjcgMS44LTMuODF6TTQuNDEgMy44NkwzIDUuMjdsMi43NyAyLjc3aC0uNDJDMi4zNCA4LjM2IDAgMTAuOTEgMCAxNGMwIDMuMzEgMi42OSA2IDYgNmgxMS43M2wyIDIgMS40MS0xLjQxTDQuNDEgMy44NnpNNiAxOGMtMi4yMSAwLTQtMS43OS00LTRzMS43OS00IDQtNGgxLjczbDggOEg2eiIvPjwvc3ZnPg=="; -Editor.syncDisabledImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTAgNi4zNVY0LjI2Yy0uOC4yMS0xLjU1LjU0LTIuMjMuOTZsMS40NiAxLjQ2Yy4yNS0uMTIuNS0uMjQuNzctLjMzem0tNy4xNC0uOTRsMi4zNiAyLjM2QzQuNDUgOC45OSA0IDEwLjQ0IDQgMTJjMCAyLjIxLjkxIDQuMiAyLjM2IDUuNjRMNCAyMGg2di02bC0yLjI0IDIuMjRDNi42OCAxNS4xNSA2IDEzLjY2IDYgMTJjMC0xIC4yNS0xLjk0LjY4LTIuNzdsOC4wOCA4LjA4Yy0uMjUuMTMtLjUuMjUtLjc3LjM0djIuMDljLjgtLjIxIDEuNTUtLjU0IDIuMjMtLjk2bDIuMzYgMi4zNiAxLjI3LTEuMjdMNC4xNCA0LjE0IDIuODYgNS40MXpNMjAgNGgtNnY2bDIuMjQtMi4yNEMxNy4zMiA4Ljg1IDE4IDEwLjM0IDE4IDEyYzAgMS0uMjUgMS45NC0uNjggMi43N2wxLjQ2IDEuNDZDMTkuNTUgMTUuMDEgMjAgMTMuNTYgMjAgMTJjMC0yLjIxLS45MS00LjItMi4zNi01LjY0TDIwIDR6Ii8+PC9zdmc+"; Editor.calendarImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48cGF0aCBkPSJNMjAsNEg0QzIuOSw0LDIsNC45LDIsNnYxMmMwLDEuMSwwLjksMiwyLDJoMTZjMS4xLDAsMi0wLjksMi0yVjZDMjIsNC45LDIxLjEsNCwyMCw0eiBNOCwxMUg0VjZoNFYxMXogTTE0LDExaC00VjZoNFYxMXogTTIwLDExaC00VjZoNFYxMXogTTgsMThINHYtNWg0VjE4eiBNMTQsMThoLTR2LTVoNFYxOHogTTIwLDE4aC00di01aDRWMTh6Ii8+PC9nPjwvc3ZnPg=="; Editor.syncProblemImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyAxMmMwIDIuMjEuOTEgNC4yIDIuMzYgNS42NEwzIDIwaDZ2LTZsLTIuMjQgMi4yNEM1LjY4IDE1LjE1IDUgMTMuNjYgNSAxMmMwLTIuNjEgMS42Ny00LjgzIDQtNS42NVY0LjI2QzUuNTUgNS4xNSAzIDguMjcgMyAxMnptOCA1aDJ2LTJoLTJ2MnpNMjEgNGgtNnY2bDIuMjQtMi4yNEMxOC4zMiA4Ljg1IDE5IDEwLjM0IDE5IDEyYzAgMi42MS0xLjY3IDQuODMtNCA1LjY1djIuMDljMy40NS0uODkgNi00LjAxIDYtNy43NCAwLTIuMjEtLjkxLTQuMi0yLjM2LTUuNjRMMjEgNHptLTEwIDloMlY3aC0ydjZ6Ii8+PC9zdmc+"; Editor.tailSpin="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9Ii0yIC0yIDQ0IDQ0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogICAgPGRlZnM+CiAgICAgICAgPGxpbmVhckdyYWRpZW50IHgxPSI4LjA0MiUiIHkxPSIwJSIgeDI9IjY1LjY4MiUiIHkyPSIyMy44NjUlIiBpZD0iYSI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiM4MDgwODAiIHN0b3Atb3BhY2l0eT0iMCIgb2Zmc2V0PSIwJSIvPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjODA4MDgwIiBzdG9wLW9wYWNpdHk9Ii42MzEiIG9mZnNldD0iNjMuMTQ2JSIvPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjODA4MDgwIiBvZmZzZXQ9IjEwMCUiLz4KICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPC9kZWZzPgogICAgPGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxIDEpIj4KICAgICAgICAgICAgPHBhdGggZD0iTTM2IDE4YzAtOS45NC04LjA2LTE4LTE4LTE4IiBzdHJva2U9InVybCgjYSkiIHN0cm9rZS13aWR0aD0iNiI+CiAgICAgICAgICAgICAgICA8YW5pbWF0ZVRyYW5zZm9ybQogICAgICAgICAgICAgICAgICAgIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIKICAgICAgICAgICAgICAgICAgICB0eXBlPSJyb3RhdGUiCiAgICAgICAgICAgICAgICAgICAgZnJvbT0iMCAxOCAxOCIKICAgICAgICAgICAgICAgICAgICB0bz0iMzYwIDE4IDE4IgogICAgICAgICAgICAgICAgICAgIGR1cj0iMC45cyIKICAgICAgICAgICAgICAgICAgICByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgLz4KICAgICAgICAgICAgPC9wYXRoPgogICAgICAgICAgICA8Y2lyY2xlIGZpbGw9IiM4MDgwODAiIGN4PSIzNiIgY3k9IjE4IiByPSIxIj4KICAgICAgICAgICAgICAgIDxhbmltYXRlVHJhbnNmb3JtCiAgICAgICAgICAgICAgICAgICAgYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIgogICAgICAgICAgICAgICAgICAgIHR5cGU9InJvdGF0ZSIKICAgICAgICAgICAgICAgICAgICBmcm9tPSIwIDE4IDE4IgogICAgICAgICAgICAgICAgICAgIHRvPSIzNjAgMTggMTgiCiAgICAgICAgICAgICAgICAgICAgZHVyPSIwLjlzIgogICAgICAgICAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPgogICAgICAgICAgICA8L2NpcmNsZT4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPgo="; @@ -3131,111 +3128,111 @@ Editor.hiResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAAC Editor.loResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg=="; Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker= "0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.enableWebFonts="1"!=urlParams["safe-style-src"];Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion= -null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(q){q.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(q,F){return"1"!=mxUtils.getValue(q.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(q, -F){return"1"==mxUtils.getValue(q.style,"comic","0")||"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureAngle", -dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough? -"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(q,F){return"1"== -mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum", -defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"}, +null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(q){q.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(q,E){return"1"!=mxUtils.getValue(q.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(q, +E){return"1"==mxUtils.getValue(q.style,"comic","0")||"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureAngle", +dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough? +"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(q,E){return"1"== +mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum", +defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"}, {val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(q){return"orthogonalEdgeStyle"==mxUtils.getValue(q.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity", dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash", dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"noJump", -dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&& -0==q.edges.length&&F.isTableCell(q.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&F.isTableCell(q.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(q,F){q=F.editorUi.editor.graph.getCellStyle(1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null);return"1"==mxUtils.getValue(q,"resizeLastRow","0")}, -isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&F.isTable(q.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(q,F){q=F.editorUi.editor.graph.getCellStyle(1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null);return"1"==mxUtils.getValue(q,"resizeLast","0")},isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&F.isTable(q.vertices[0])}},{name:"fillOpacity", +dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(q,E){E=E.editorUi.editor.graph;return 1==q.vertices.length&& +0==q.edges.length&&E.isTableCell(q.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(q,E){E=E.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&E.isTableCell(q.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(q,E){q=E.editorUi.editor.graph.getCellStyle(1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null);return"1"==mxUtils.getValue(q,"resizeLastRow","0")}, +isVisible:function(q,E){E=E.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&E.isTable(q.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(q,E){q=E.editorUi.editor.graph.getCellStyle(1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null);return"1"==mxUtils.getValue(q,"resizeLast","0")},isVisible:function(q,E){E=E.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&E.isTable(q.vertices[0])}},{name:"fillOpacity", dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float", defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool", -defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(q,F){return F.editorUi.editor.graph.isCellConnectable(0<q.vertices.length&&0==q.edges.length?q.vertices[0]:null)},isVisible:function(q,F){return 0<q.vertices.length&&0==q.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"}, +defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(q,E){return E.editorUi.editor.graph.isCellConnectable(0<q.vertices.length&&0==q.edges.length?q.vertices[0]:null)},isVisible:function(q,E){return 0<q.vertices.length&&0==q.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"}, {val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"}, -{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(q,F){q=1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null;F=F.editorUi.editor.graph;return null!=q&&(F.isSwimlane(q)||0<F.model.getChildCount(q))}, -isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(q,F){var R=1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null;F=F.editorUi.editor.graph;return null!=R&&(F.isContainer(R)&&"0"!=q.style.collapsible||!F.isContainer(R)&&"1"==q.style.collapsible)},isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0, -isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length&&!F.editorUi.editor.graph.isSwimlane(q.vertices[0])&&null==mxUtils.getValue(q.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(q,F){F=F.editorUi.editor.graph.model;return 0<q.vertices.length?F.isVertex(F.getParent(q.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog", -type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(q,F){q=0<q.vertices.length?F.editorUi.editor.graph.getCellGeometry(q.vertices[0]):null;return null!=q&&!q.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable", +{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(q,E){return 1==q.vertices.length&&0==q.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(q,E){q=1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null;E=E.editorUi.editor.graph;return null!=q&&(E.isSwimlane(q)||0<E.model.getChildCount(q))}, +isVisible:function(q,E){return 1==q.vertices.length&&0==q.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(q,E){var Q=1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null;E=E.editorUi.editor.graph;return null!=Q&&(E.isContainer(Q)&&"0"!=q.style.collapsible||!E.isContainer(Q)&&"1"==q.style.collapsible)},isVisible:function(q,E){return 1==q.vertices.length&&0==q.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0, +isVisible:function(q,E){return 1==q.vertices.length&&0==q.edges.length&&!E.editorUi.editor.graph.isSwimlane(q.vertices[0])&&null==mxUtils.getValue(q.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(q,E){E=E.editorUi.editor.graph.model;return 0<q.vertices.length?E.isVertex(E.getParent(q.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog", +type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(q,E){q=0<q.vertices.length?E.editorUi.editor.graph.getCellGeometry(q.vertices[0]):null;return null!=q&&!q.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable", dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents", -dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(q,F){var R=mxUtils.getValue(q.style,mxConstants.STYLE_FILLCOLOR,null);return F.editorUi.editor.graph.isSwimlane(q.vertices[0])||null==R||R==mxConstants.NONE||0==mxUtils.getValue(q.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(q.style,mxConstants.STYLE_OPACITY,100)||null!=q.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(q,F){return 0<q.vertices.length&& -F.editorUi.editor.graph.isContainer(q.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n'; -Editor.createRoughCanvas=function(q){var F=rough.canvas({getContext:function(){return q}});F.draw=function(R){var W=R.sets||[];R=R.options||this.getDefaultOptions();for(var T=0;T<W.length;T++){var ba=W[T];switch(ba.type){case "path":null!=R.stroke&&this._drawToContext(q,ba,R);break;case "fillPath":this._drawToContext(q,ba,R);break;case "fillSketch":this.fillSketch(q,ba,R)}}};F.fillSketch=function(R,W,T){var ba=q.state.strokeColor,ha=q.state.strokeWidth,ra=q.state.strokeAlpha,ta=q.state.dashed,ma= -T.fillWeight;0>ma&&(ma=T.strokeWidth/2);q.setStrokeAlpha(q.state.fillAlpha);q.setStrokeColor(T.fill||"");q.setStrokeWidth(ma);q.setDashed(!1);this._drawToContext(R,W,T);q.setDashed(ta);q.setStrokeWidth(ha);q.setStrokeColor(ba);q.setStrokeAlpha(ra)};F._drawToContext=function(R,W,T){R.begin();for(var ba=0;ba<W.ops.length;ba++){var ha=W.ops[ba],ra=ha.data;switch(ha.op){case "move":R.moveTo(ra[0],ra[1]);break;case "bcurveTo":R.curveTo(ra[0],ra[1],ra[2],ra[3],ra[4],ra[5]);break;case "lineTo":R.lineTo(ra[0], -ra[1])}}R.end();"fillPath"===W.type&&T.filled?R.fill():R.stroke()};return F};(function(){function q(ba,ha,ra){this.canvas=ba;this.rc=ha;this.shape=ra;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,q.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,q.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,q.prototype.rect);this.originalRoundrect= +dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(q,E){var Q=mxUtils.getValue(q.style,mxConstants.STYLE_FILLCOLOR,null);return E.editorUi.editor.graph.isSwimlane(q.vertices[0])||null==Q||Q==mxConstants.NONE||0==mxUtils.getValue(q.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(q.style,mxConstants.STYLE_OPACITY,100)||null!=q.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(q,E){return 0<q.vertices.length&& +E.editorUi.editor.graph.isContainer(q.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n'; +Editor.createRoughCanvas=function(q){var E=rough.canvas({getContext:function(){return q}});E.draw=function(Q){var Y=Q.sets||[];Q=Q.options||this.getDefaultOptions();for(var R=0;R<Y.length;R++){var ba=Y[R];switch(ba.type){case "path":null!=Q.stroke&&this._drawToContext(q,ba,Q);break;case "fillPath":this._drawToContext(q,ba,Q);break;case "fillSketch":this.fillSketch(q,ba,Q)}}};E.fillSketch=function(Q,Y,R){var ba=q.state.strokeColor,ea=q.state.strokeWidth,ra=q.state.strokeAlpha,ta=q.state.dashed,la= +R.fillWeight;0>la&&(la=R.strokeWidth/2);q.setStrokeAlpha(q.state.fillAlpha);q.setStrokeColor(R.fill||"");q.setStrokeWidth(la);q.setDashed(!1);this._drawToContext(Q,Y,R);q.setDashed(ta);q.setStrokeWidth(ea);q.setStrokeColor(ba);q.setStrokeAlpha(ra)};E._drawToContext=function(Q,Y,R){Q.begin();for(var ba=0;ba<Y.ops.length;ba++){var ea=Y.ops[ba],ra=ea.data;switch(ea.op){case "move":Q.moveTo(ra[0],ra[1]);break;case "bcurveTo":Q.curveTo(ra[0],ra[1],ra[2],ra[3],ra[4],ra[5]);break;case "lineTo":Q.lineTo(ra[0], +ra[1])}}Q.end();"fillPath"===Y.type&&R.filled?Q.fill():Q.stroke()};return E};(function(){function q(ba,ea,ra){this.canvas=ba;this.rc=ea;this.shape=ra;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,q.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,q.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,q.prototype.rect);this.originalRoundrect= this.canvas.roundrect;this.canvas.roundrect=mxUtils.bind(this,q.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,q.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,q.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,q.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,q.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo; this.canvas.curveTo=mxUtils.bind(this,q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,q.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,q.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,q.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke= -mxUtils.bind(this,q.prototype.fillAndStroke);this.path=[];this.passThrough=!1}q.prototype.moveOp="M";q.prototype.lineOp="L";q.prototype.quadOp="Q";q.prototype.curveOp="C";q.prototype.closeOp="Z";q.prototype.getStyle=function(ba,ha){var ra=1;if(null!=this.shape.state){var ta=this.shape.state.cell.id;if(null!=ta)for(var ma=0;ma<ta.length;ma++)ra=(ra<<5)-ra+ta.charCodeAt(ma)<<0}ra={strokeWidth:this.canvas.state.strokeWidth,seed:ra,preserveVertices:!0};ta=this.rc.getDefaultOptions();ra.stroke=ba?this.canvas.state.strokeColor=== -mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;ba=null;(ra.filled=ha)?(ra.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,ba=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):ra.fill="";ra.bowing=mxUtils.getValue(this.shape.style,"bowing",ta.bowing);ra.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ta.hachureAngle);ra.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting", -ta.curveFitting);ra.roughness=mxUtils.getValue(this.shape.style,"jiggle",ta.roughness);ra.simplification=mxUtils.getValue(this.shape.style,"simplification",ta.simplification);ra.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",ta.disableMultiStroke);ra.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",ta.disableMultiStrokeFill);ha=mxUtils.getValue(this.shape.style,"hachureGap",-1);ra.hachureGap="auto"==ha?-1:ha;ra.dashGap=mxUtils.getValue(this.shape.style, -"dashGap",ha);ra.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",ha);ra.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",ha);ha=mxUtils.getValue(this.shape.style,"fillWeight",-1);ra.fillWeight="auto"==ha?-1:ha;ha=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==ha&&(ha=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),ha=null!=ra.fill&&(null!=ba||null!=ha&&ra.fill==ha)?"solid": -ta.fillStyle);ra.fillStyle=ha;return ra};q.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};q.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};q.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var ba=2;ba<arguments.length;ba+=2)this.lastX=arguments[ba-1],this.lastY=arguments[ba],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))}; -q.prototype.lineTo=function(ba,ha){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,ba,ha),this.lastX=ba,this.lastY=ha)};q.prototype.moveTo=function(ba,ha){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,ba,ha),this.lastX=ba,this.lastY=ha,this.firstX=ba,this.firstY=ha)};q.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};q.prototype.quadTo=function(ba, -ha,ra,ta){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,ba,ha,ra,ta),this.lastX=ra,this.lastY=ta)};q.prototype.curveTo=function(ba,ha,ra,ta,ma,pa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,ba,ha,ra,ta,ma,pa),this.lastX=ma,this.lastY=pa)};q.prototype.arcTo=function(ba,ha,ra,ta,ma,pa,za){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var Ba=mxUtils.arcToCurves(this.lastX,this.lastY, -ba,ha,ra,ta,ma,pa,za);if(null!=Ba)for(var Ia=0;Ia<Ba.length;Ia+=6)this.curveTo(Ba[Ia],Ba[Ia+1],Ba[Ia+2],Ba[Ia+3],Ba[Ia+4],Ba[Ia+5]);this.lastX=pa;this.lastY=za}};q.prototype.rect=function(ba,ha,ra,ta){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(ba,ha,ra,ta,this.getStyle(!0,!0)))};q.prototype.ellipse=function(ba,ha,ra,ta){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(ba+ -ra/2,ha+ta/2,ra,ta,this.getStyle(!0,!0)))};q.prototype.roundrect=function(ba,ha,ra,ta,ma,pa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(ba+ma,ha),this.lineTo(ba+ra-ma,ha),this.quadTo(ba+ra,ha,ba+ra,ha+pa),this.lineTo(ba+ra,ha+ta-pa),this.quadTo(ba+ra,ha+ta,ba+ra-ma,ha+ta),this.lineTo(ba+ma,ha+ta),this.quadTo(ba,ha+ta,ba,ha+ta-pa),this.lineTo(ba,ha+pa),this.quadTo(ba,ha,ba+ma,ha))};q.prototype.drawPath=function(ba){if(0<this.path.length){this.passThrough= -!0;try{this.rc.path(this.path.join(" "),ba)}catch(ra){}this.passThrough=!1}else if(null!=this.nextShape){for(var ha in ba)this.nextShape.options[ha]=ba[ha];ba.stroke!=mxConstants.NONE&&null!=ba.stroke||delete this.nextShape.options.stroke;ba.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};q.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};q.prototype.fill= +mxUtils.bind(this,q.prototype.fillAndStroke);this.path=[];this.passThrough=!1}q.prototype.moveOp="M";q.prototype.lineOp="L";q.prototype.quadOp="Q";q.prototype.curveOp="C";q.prototype.closeOp="Z";q.prototype.getStyle=function(ba,ea){var ra=1;if(null!=this.shape.state){var ta=this.shape.state.cell.id;if(null!=ta)for(var la=0;la<ta.length;la++)ra=(ra<<5)-ra+ta.charCodeAt(la)<<0}ra={strokeWidth:this.canvas.state.strokeWidth,seed:ra,preserveVertices:!0};ta=this.rc.getDefaultOptions();ra.stroke=ba?this.canvas.state.strokeColor=== +mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;ba=null;(ra.filled=ea)?(ra.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,ba=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):ra.fill="";ra.bowing=mxUtils.getValue(this.shape.style,"bowing",ta.bowing);ra.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ta.hachureAngle);ra.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting", +ta.curveFitting);ra.roughness=mxUtils.getValue(this.shape.style,"jiggle",ta.roughness);ra.simplification=mxUtils.getValue(this.shape.style,"simplification",ta.simplification);ra.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",ta.disableMultiStroke);ra.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",ta.disableMultiStrokeFill);ea=mxUtils.getValue(this.shape.style,"hachureGap",-1);ra.hachureGap="auto"==ea?-1:ea;ra.dashGap=mxUtils.getValue(this.shape.style, +"dashGap",ea);ra.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",ea);ra.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",ea);ea=mxUtils.getValue(this.shape.style,"fillWeight",-1);ra.fillWeight="auto"==ea?-1:ea;ea=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==ea&&(ea=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),ea=null!=ra.fill&&(null!=ba||null!=ea&&ra.fill==ea)?"solid": +ta.fillStyle);ra.fillStyle=ea;return ra};q.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};q.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};q.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var ba=2;ba<arguments.length;ba+=2)this.lastX=arguments[ba-1],this.lastY=arguments[ba],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))}; +q.prototype.lineTo=function(ba,ea){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,ba,ea),this.lastX=ba,this.lastY=ea)};q.prototype.moveTo=function(ba,ea){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,ba,ea),this.lastX=ba,this.lastY=ea,this.firstX=ba,this.firstY=ea)};q.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};q.prototype.quadTo=function(ba, +ea,ra,ta){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,ba,ea,ra,ta),this.lastX=ra,this.lastY=ta)};q.prototype.curveTo=function(ba,ea,ra,ta,la,pa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,ba,ea,ra,ta,la,pa),this.lastX=la,this.lastY=pa)};q.prototype.arcTo=function(ba,ea,ra,ta,la,pa,xa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var Ca=mxUtils.arcToCurves(this.lastX,this.lastY, +ba,ea,ra,ta,la,pa,xa);if(null!=Ca)for(var Ia=0;Ia<Ca.length;Ia+=6)this.curveTo(Ca[Ia],Ca[Ia+1],Ca[Ia+2],Ca[Ia+3],Ca[Ia+4],Ca[Ia+5]);this.lastX=pa;this.lastY=xa}};q.prototype.rect=function(ba,ea,ra,ta){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(ba,ea,ra,ta,this.getStyle(!0,!0)))};q.prototype.ellipse=function(ba,ea,ra,ta){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(ba+ +ra/2,ea+ta/2,ra,ta,this.getStyle(!0,!0)))};q.prototype.roundrect=function(ba,ea,ra,ta,la,pa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(ba+la,ea),this.lineTo(ba+ra-la,ea),this.quadTo(ba+ra,ea,ba+ra,ea+pa),this.lineTo(ba+ra,ea+ta-pa),this.quadTo(ba+ra,ea+ta,ba+ra-la,ea+ta),this.lineTo(ba+la,ea+ta),this.quadTo(ba,ea+ta,ba,ea+ta-pa),this.lineTo(ba,ea+pa),this.quadTo(ba,ea,ba+la,ea))};q.prototype.drawPath=function(ba){if(0<this.path.length){this.passThrough= +!0;try{this.rc.path(this.path.join(" "),ba)}catch(ra){}this.passThrough=!1}else if(null!=this.nextShape){for(var ea in ba)this.nextShape.options[ea]=ba[ea];ba.stroke!=mxConstants.NONE&&null!=ba.stroke||delete this.nextShape.options.stroke;ba.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};q.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};q.prototype.fill= function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};q.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};q.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo= -this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(ba){return new q(ba,Editor.createRoughCanvas(ba),this)};var F=mxShape.prototype.createHandJiggle; -mxShape.prototype.createHandJiggle=function(ba){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?F.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(ba):this.createRoughCanvas(ba)};var R=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(ba,ha,ra,ta,ma){null!=ba.handJiggle&&ba.handJiggle.passThrough||R.apply(this,arguments)};var W=mxShape.prototype.paint;mxShape.prototype.paint= -function(ba){var ha=ba.addTolerance,ra=!0;null!=this.style&&(ra="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=ba.handJiggle&&ba.handJiggle.constructor==q&&!this.outline){ba.save();var ta=this.fill,ma=this.stroke;this.stroke=this.fill=null;var pa=this.configurePointerEvents,za=ba.setStrokeColor;ba.setStrokeColor=function(){};var Ba=ba.setFillColor;ba.setFillColor=function(){};ra||null==ta||(this.configurePointerEvents=function(){});ba.handJiggle.passThrough=!0;W.apply(this, -arguments);ba.handJiggle.passThrough=!1;ba.setFillColor=Ba;ba.setStrokeColor=za;this.configurePointerEvents=pa;this.stroke=ma;this.fill=ta;ba.restore();ra&&null!=ta&&(ba.addTolerance=function(){})}W.apply(this,arguments);ba.addTolerance=ha};var T=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(ba,ha,ra,ta,ma,pa){null!=ba.handJiggle&&ba.handJiggle.constructor==q?(ba.handJiggle.passThrough=!0,T.apply(this,arguments),ba.handJiggle.passThrough=!1):T.apply(this,arguments)}})(); -Editor.fastCompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?q:Graph.arrayBufferToString(pako.deflateRaw(q))};Editor.fastDecompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?q:pako.inflateRaw(Graph.stringToArrayBuffer(atob(q)),{to:"string"})};Editor.extractGraphModel=function(q,F,R){if(null!=q&&"undefined"!==typeof pako){var W=q.ownerDocument.getElementsByTagName("div"),T=[];if(null!=W&&0<W.length)for(var ba=0;ba<W.length;ba++)if("mxgraph"==W[ba].getAttribute("class")){T.push(W[ba]); -break}0<T.length&&(W=T[0].getAttribute("data-mxgraph"),null!=W?(T=JSON.parse(W),null!=T&&null!=T.xml&&(q=mxUtils.parseXml(T.xml),q=q.documentElement)):(T=T[0].getElementsByTagName("div"),0<T.length&&(W=mxUtils.getTextContent(T[0]),W=Graph.decompress(W,null,R),0<W.length&&(q=mxUtils.parseXml(W),q=q.documentElement))))}if(null!=q&&"svg"==q.nodeName)if(W=q.getAttribute("content"),null!=W&&"<"!=W.charAt(0)&&"%"!=W.charAt(0)&&(W=unescape(window.atob?atob(W):Base64.decode(cont,W))),null!=W&&"%"==W.charAt(0)&& -(W=decodeURIComponent(W)),null!=W&&0<W.length)q=mxUtils.parseXml(W).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==q||F||(T=null,"diagram"==q.nodeName?T=q:"mxfile"==q.nodeName&&(W=q.getElementsByTagName("diagram"),0<W.length&&(T=W[Math.max(0,Math.min(W.length-1,urlParams.page||0))])),null!=T&&(q=Editor.parseDiagramNode(T,R)));null==q||"mxGraphModel"==q.nodeName||F&&"mxfile"==q.nodeName||(q=null);return q};Editor.parseDiagramNode=function(q,F){var R=mxUtils.trim(mxUtils.getTextContent(q)), -W=null;0<R.length?(q=Graph.decompress(R,null,F),null!=q&&0<q.length&&(W=mxUtils.parseXml(q).documentElement)):(q=mxUtils.getChildNodes(q),0<q.length&&(W=mxUtils.createXmlDocument(),W.appendChild(W.importNode(q[0],!0)),W=W.documentElement));return W};Editor.getDiagramNodeXml=function(q){var F=mxUtils.getTextContent(q),R=null;0<F.length?R=Graph.decompress(F):null!=q.firstChild&&(R=mxUtils.getXml(q.firstChild));return R};Editor.extractGraphModelFromPdf=function(q){q=q.substring(q.indexOf(",")+1);q=window.atob&& -!mxClient.IS_SF?atob(q):Base64.decode(q,!0);if("%PDF-1.7"==q.substring(0,8)){var F=q.indexOf("EmbeddedFile");if(-1<F){var R=q.indexOf("stream",F)+9;if(0<q.substring(F,R).indexOf("application#2Fvnd.jgraph.mxfile"))return F=q.indexOf("endstream",R-1),pako.inflateRaw(Graph.stringToArrayBuffer(q.substring(R,F)),{to:"string"})}return null}R=null;F="";for(var W=0,T=0,ba=[],ha=null;T<q.length;){var ra=q.charCodeAt(T);T+=1;10!=ra&&(F+=String.fromCharCode(ra));ra=="/Subject (%3Cmxfile".charCodeAt(W)?W++:W= -0;if(19==W){var ta=q.indexOf("%3C%2Fmxfile%3E)",T)+15;T-=9;if(ta>T){R=q.substring(T,ta);break}}10==ra&&("endobj"==F?ha=null:"obj"==F.substring(F.length-3,F.length)||"xref"==F||"trailer"==F?(ha=[],ba[F.split(" ")[0]]=ha):null!=ha&&ha.push(F),F="")}null==R&&(R=Editor.extractGraphModelFromXref(ba));null!=R&&(R=decodeURIComponent(R.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return R};Editor.extractGraphModelFromXref=function(q){var F=q.trailer,R=null;null!=F&&(F=/.* \/Info (\d+) (\d+) R/g.exec(F.join("\n")), -null!=F&&0<F.length&&(F=q[F[1]],null!=F&&(F=/.* \/Subject (\d+) (\d+) R/g.exec(F.join("\n")),null!=F&&0<F.length&&(q=q[F[1]],null!=q&&(q=q.join("\n"),R=q.substring(1,q.length-1))))));return R};Editor.extractParserError=function(q,F){var R=null;q=null!=q?q.getElementsByTagName("parsererror"):null;null!=q&&0<q.length&&(R=F||mxResources.get("invalidChars"),F=q[0].getElementsByTagName("div"),0<F.length&&(R=mxUtils.getTextContent(F[0])));return null!=R?mxUtils.trim(R):R};Editor.addRetryToError=function(q, -F){null!=q&&(q=null!=q.error?q.error:q,null==q.retry&&(q.retry=F))};Editor.configure=function(q,F){if(null!=q){Editor.config=q;Editor.configVersion=q.version;Menus.prototype.defaultFonts=q.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=q.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=q.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=q.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes= +this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(ba){return new q(ba,Editor.createRoughCanvas(ba),this)};var E=mxShape.prototype.createHandJiggle; +mxShape.prototype.createHandJiggle=function(ba){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?E.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(ba):this.createRoughCanvas(ba)};var Q=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(ba,ea,ra,ta,la){null!=ba.handJiggle&&ba.handJiggle.passThrough||Q.apply(this,arguments)};var Y=mxShape.prototype.paint;mxShape.prototype.paint= +function(ba){var ea=ba.addTolerance,ra=!0;null!=this.style&&(ra="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=ba.handJiggle&&ba.handJiggle.constructor==q&&!this.outline){ba.save();var ta=this.fill,la=this.stroke;this.stroke=this.fill=null;var pa=this.configurePointerEvents,xa=ba.setStrokeColor;ba.setStrokeColor=function(){};var Ca=ba.setFillColor;ba.setFillColor=function(){};ra||null==ta||(this.configurePointerEvents=function(){});ba.handJiggle.passThrough=!0;Y.apply(this, +arguments);ba.handJiggle.passThrough=!1;ba.setFillColor=Ca;ba.setStrokeColor=xa;this.configurePointerEvents=pa;this.stroke=la;this.fill=ta;ba.restore();ra&&null!=ta&&(ba.addTolerance=function(){})}Y.apply(this,arguments);ba.addTolerance=ea};var R=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(ba,ea,ra,ta,la,pa){null!=ba.handJiggle&&ba.handJiggle.constructor==q?(ba.handJiggle.passThrough=!0,R.apply(this,arguments),ba.handJiggle.passThrough=!1):R.apply(this,arguments)}})(); +Editor.fastCompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?q:Graph.arrayBufferToString(pako.deflateRaw(q))};Editor.fastDecompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?q:pako.inflateRaw(Graph.stringToArrayBuffer(atob(q)),{to:"string"})};Editor.extractGraphModel=function(q,E,Q){if(null!=q&&"undefined"!==typeof pako){var Y=q.ownerDocument.getElementsByTagName("div"),R=[];if(null!=Y&&0<Y.length)for(var ba=0;ba<Y.length;ba++)if("mxgraph"==Y[ba].getAttribute("class")){R.push(Y[ba]); +break}0<R.length&&(Y=R[0].getAttribute("data-mxgraph"),null!=Y?(R=JSON.parse(Y),null!=R&&null!=R.xml&&(q=mxUtils.parseXml(R.xml),q=q.documentElement)):(R=R[0].getElementsByTagName("div"),0<R.length&&(Y=mxUtils.getTextContent(R[0]),Y=Graph.decompress(Y,null,Q),0<Y.length&&(q=mxUtils.parseXml(Y),q=q.documentElement))))}if(null!=q&&"svg"==q.nodeName)if(Y=q.getAttribute("content"),null!=Y&&"<"!=Y.charAt(0)&&"%"!=Y.charAt(0)&&(Y=unescape(window.atob?atob(Y):Base64.decode(cont,Y))),null!=Y&&"%"==Y.charAt(0)&& +(Y=decodeURIComponent(Y)),null!=Y&&0<Y.length)q=mxUtils.parseXml(Y).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==q||E||(R=null,"diagram"==q.nodeName?R=q:"mxfile"==q.nodeName&&(Y=q.getElementsByTagName("diagram"),0<Y.length&&(R=Y[Math.max(0,Math.min(Y.length-1,urlParams.page||0))])),null!=R&&(q=Editor.parseDiagramNode(R,Q)));null==q||"mxGraphModel"==q.nodeName||E&&"mxfile"==q.nodeName||(q=null);return q};Editor.parseDiagramNode=function(q,E){var Q=mxUtils.trim(mxUtils.getTextContent(q)), +Y=null;0<Q.length?(q=Graph.decompress(Q,null,E),null!=q&&0<q.length&&(Y=mxUtils.parseXml(q).documentElement)):(q=mxUtils.getChildNodes(q),0<q.length&&(Y=mxUtils.createXmlDocument(),Y.appendChild(Y.importNode(q[0],!0)),Y=Y.documentElement));return Y};Editor.getDiagramNodeXml=function(q){var E=mxUtils.getTextContent(q),Q=null;0<E.length?Q=Graph.decompress(E):null!=q.firstChild&&(Q=mxUtils.getXml(q.firstChild));return Q};Editor.extractGraphModelFromPdf=function(q){q=q.substring(q.indexOf(",")+1);q=window.atob&& +!mxClient.IS_SF?atob(q):Base64.decode(q,!0);if("%PDF-1.7"==q.substring(0,8)){var E=q.indexOf("EmbeddedFile");if(-1<E){var Q=q.indexOf("stream",E)+9;if(0<q.substring(E,Q).indexOf("application#2Fvnd.jgraph.mxfile"))return E=q.indexOf("endstream",Q-1),pako.inflateRaw(Graph.stringToArrayBuffer(q.substring(Q,E)),{to:"string"})}return null}Q=null;E="";for(var Y=0,R=0,ba=[],ea=null;R<q.length;){var ra=q.charCodeAt(R);R+=1;10!=ra&&(E+=String.fromCharCode(ra));ra=="/Subject (%3Cmxfile".charCodeAt(Y)?Y++:Y= +0;if(19==Y){var ta=q.indexOf("%3C%2Fmxfile%3E)",R)+15;R-=9;if(ta>R){Q=q.substring(R,ta);break}}10==ra&&("endobj"==E?ea=null:"obj"==E.substring(E.length-3,E.length)||"xref"==E||"trailer"==E?(ea=[],ba[E.split(" ")[0]]=ea):null!=ea&&ea.push(E),E="")}null==Q&&(Q=Editor.extractGraphModelFromXref(ba));null!=Q&&(Q=decodeURIComponent(Q.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return Q};Editor.extractGraphModelFromXref=function(q){var E=q.trailer,Q=null;null!=E&&(E=/.* \/Info (\d+) (\d+) R/g.exec(E.join("\n")), +null!=E&&0<E.length&&(E=q[E[1]],null!=E&&(E=/.* \/Subject (\d+) (\d+) R/g.exec(E.join("\n")),null!=E&&0<E.length&&(q=q[E[1]],null!=q&&(q=q.join("\n"),Q=q.substring(1,q.length-1))))));return Q};Editor.extractParserError=function(q,E){var Q=null;q=null!=q?q.getElementsByTagName("parsererror"):null;null!=q&&0<q.length&&(Q=E||mxResources.get("invalidChars"),E=q[0].getElementsByTagName("div"),0<E.length&&(Q=mxUtils.getTextContent(E[0])));return null!=Q?mxUtils.trim(Q):Q};Editor.addRetryToError=function(q, +E){null!=q&&(q=null!=q.error?q.error:q,null==q.retry&&(q.retry=E))};Editor.configure=function(q){if(null!=q){Editor.config=q;Editor.configVersion=q.version;Menus.prototype.defaultFonts=q.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=q.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=q.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=q.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes= q.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=q.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=q.autosaveDelay||DrawioFile.prototype.autosaveDelay;q.debug&&(urlParams.test="1");null!=q.templateFile&&(EditorUi.templateFile=q.templateFile);null!=q.styles&&(Array.isArray(q.styles)?Editor.styles=q.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=q.globalVars&&(Editor.globalVars= q.globalVars);null!=q.compressXml&&(Editor.compressXml=q.compressXml);null!=q.includeDiagram&&(Editor.defaultIncludeDiagram=q.includeDiagram);null!=q.simpleLabels&&(Editor.simpleLabels=q.simpleLabels);null!=q.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=q.oneDriveInlinePicker);null!=q.darkColor&&(Editor.darkColor=q.darkColor);null!=q.lightColor&&(Editor.lightColor=q.lightColor);null!=q.settingsName&&(Editor.configurationKey="."+q.settingsName+"-configuration",Editor.settingsKey="."+q.settingsName+ -"-config",mxSettings.key=Editor.settingsKey);q.customFonts&&(Menus.prototype.defaultFonts=q.customFonts.concat(Menus.prototype.defaultFonts));q.customPresetColors&&(ColorDialog.prototype.presetColors=q.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=q.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=q.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=q.css){var R=document.createElement("style");R.setAttribute("type","text/css"); -R.appendChild(document.createTextNode(q.css));var W=document.getElementsByTagName("script")[0];W.parentNode.insertBefore(R,W)}null!=q.libraries&&(Sidebar.prototype.customEntries=q.libraries);null!=q.enabledLibraries&&(Array.isArray(q.enabledLibraries)?Sidebar.prototype.enabledLibraries=q.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=q.defaultLibraries&&(Sidebar.prototype.defaultEntries=q.defaultLibraries);null!=q.defaultCustomLibraries&&(Editor.defaultCustomLibraries= +"-config",mxSettings.key=Editor.settingsKey);q.customFonts&&(Menus.prototype.defaultFonts=q.customFonts.concat(Menus.prototype.defaultFonts));q.customPresetColors&&(ColorDialog.prototype.presetColors=q.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=q.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=q.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=q.css){var E=document.createElement("style");E.setAttribute("type","text/css"); +E.appendChild(document.createTextNode(q.css));var Q=document.getElementsByTagName("script")[0];Q.parentNode.insertBefore(E,Q)}null!=q.libraries&&(Sidebar.prototype.customEntries=q.libraries);null!=q.enabledLibraries&&(Array.isArray(q.enabledLibraries)?Sidebar.prototype.enabledLibraries=q.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=q.defaultLibraries&&(Sidebar.prototype.defaultEntries=q.defaultLibraries);null!=q.defaultCustomLibraries&&(Editor.defaultCustomLibraries= q.defaultCustomLibraries);null!=q.enableCustomLibraries&&(Editor.enableCustomLibraries=q.enableCustomLibraries);null!=q.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=q.defaultVertexStyle);null!=q.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=q.defaultEdgeStyle);null!=q.defaultPageVisible&&(Graph.prototype.defaultPageVisible=q.defaultPageVisible);null!=q.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=q.defaultGridEnabled);null!=q.zoomWheel&&(Graph.zoomWheel=q.zoomWheel);null!= -q.zoomFactor&&(R=parseFloat(q.zoomFactor),!isNaN(R)&&1<R?Graph.prototype.zoomFactor=R:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=q.gridSteps&&(R=parseInt(q.gridSteps),!isNaN(R)&&0<R?mxGraphView.prototype.gridSteps=R:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=q.pageFormat&&(R=parseInt(q.pageFormat.width),W=parseInt(q.pageFormat.height),!isNaN(R)&&0<R&&!isNaN(W)&&0<W?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,R,W), +q.zoomFactor&&(E=parseFloat(q.zoomFactor),!isNaN(E)&&1<E?Graph.prototype.zoomFactor=E:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=q.gridSteps&&(E=parseInt(q.gridSteps),!isNaN(E)&&0<E?mxGraphView.prototype.gridSteps=E:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=q.pageFormat&&(E=parseInt(q.pageFormat.width),Q=parseInt(q.pageFormat.height),!isNaN(E)&&0<E&&!isNaN(Q)&&0<Q?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,E,Q), mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));q.thumbWidth&&(Sidebar.prototype.thumbWidth=q.thumbWidth);q.thumbHeight&&(Sidebar.prototype.thumbHeight=q.thumbHeight);q.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=q.emptyLibraryXml);q.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=q.emptyDiagramXml);q.sidebarWidth&&(EditorUi.prototype.hsplitPosition=q.sidebarWidth);q.sidebarTitles&& -(Sidebar.prototype.sidebarTitles=q.sidebarTitles);q.sidebarTitleSize&&(R=parseInt(q.sidebarTitleSize),!isNaN(R)&&0<R?Sidebar.prototype.sidebarTitleSize=R:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));q.fontCss&&("string"===typeof q.fontCss?Editor.configureFontCss(q.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=q.autosaveDelay&&(R=parseInt(q.autosaveDelay),!isNaN(R)&&0<R?DrawioFile.prototype.autosaveDelay=R:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay")); -if(null!=q.plugins&&!F)for(App.initPluginCallback(),F=0;F<q.plugins.length;F++)mxscript(q.plugins[F]);null!=q.maxImageBytes&&(EditorUi.prototype.maxImageBytes=q.maxImageBytes);null!=q.maxImageSize&&(EditorUi.prototype.maxImageSize=q.maxImageSize);null!=q.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=q.shareCursorPosition);null!=q.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=q.showRemoteCursors)}};Editor.configureFontCss=function(q){if(null!=q){Editor.prototype.fontCss=q; -var F=document.getElementsByTagName("script")[0];if(null!=F&&null!=F.parentNode){var R=document.createElement("style");R.setAttribute("type","text/css");R.appendChild(document.createTextNode(q));F.parentNode.insertBefore(R,F);q=q.split("url(");for(R=1;R<q.length;R++){var W=q[R].indexOf(")");W=Editor.trimCssUrl(q[R].substring(0,W));var T=document.createElement("link");T.setAttribute("rel","preload");T.setAttribute("href",W);T.setAttribute("as","font");T.setAttribute("crossorigin","");F.parentNode.insertBefore(T, -F)}}}};Editor.trimCssUrl=function(q){return q.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(q){q=null!=q?q:Editor.GUID_LENGTH;for(var F=[],R=0;R<q;R++)F.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return F.join("")};Editor.prototype.timeout= -25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(q){q=null!=q&&"mxlibrary"!=q.nodeName?this.extractGraphModel(q):null;if(null!=q){var F=Editor.extractParserError(q,mxResources.get("invalidOrMissingFile"));if(F)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[q],"cause",[F]),Error(mxResources.get("notADiagramFile")+ -" ("+F+")");if("mxGraphModel"==q.nodeName){F=q.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=F&&""!=F)F!=this.graph.currentStyle&&(R=null!=this.graph.themes?this.graph.themes[F]:mxUtils.load(STYLE_PATH+"/"+F+".xml").getDocumentElement(),null!=R&&(W=new mxCodec(R.ownerDocument),W.decode(R,this.graph.getStylesheet())));else{var R=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=R){var W=new mxCodec(R.ownerDocument); -W.decode(R,this.graph.getStylesheet())}}this.graph.currentStyle=F;this.graph.mathEnabled="1"==urlParams.math||"1"==q.getAttribute("math");F=q.getAttribute("backgroundImage");null!=F?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(F)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==q.getAttribute("shadow"),!1);if(F=q.getAttribute("extFonts"))try{for(F= -F.split("|").map(function(T){T=T.split("^");return{name:T[0],url:T[1]}}),R=0;R<F.length;R++)this.graph.addExtFont(F[R].name,F[R].url)}catch(T){console.log("ExtFonts format error: "+T.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(q,F){q=null!= -q?q:!0;var R=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&R.setAttribute("style",this.graph.currentStyle);var W=this.graph.getBackgroundImageObject(this.graph.backgroundImage,F);null!=W&&R.setAttribute("backgroundImage",JSON.stringify(W));R.setAttribute("math",this.graph.mathEnabled?"1":"0");R.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(W=this.graph.extFonts.map(function(T){return T.name+ -"^"+T.url}),R.setAttribute("extFonts",W.join("|")));return R};Editor.prototype.isDataSvg=function(q){try{var F=mxUtils.parseXml(q).documentElement.getAttribute("content");if(null!=F&&(null!=F&&"<"!=F.charAt(0)&&"%"!=F.charAt(0)&&(F=unescape(window.atob?atob(F):Base64.decode(cont,F))),null!=F&&"%"==F.charAt(0)&&(F=decodeURIComponent(F)),null!=F&&0<F.length)){var R=mxUtils.parseXml(F).documentElement;return"mxfile"==R.nodeName||"mxGraphModel"==R.nodeName}}catch(W){}return!1};Editor.prototype.extractGraphModel= -function(q,F,R){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();k.apply(this,arguments)};var m=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){m.apply(this, -arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(q,F){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){q=null!=q?q:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(T){try{MathJax.typesetClear([T]),MathJax.typeset([T]),Editor.onMathJaxDone()}catch(ba){MathJax.typesetClear([T]),null!=ba.retry?ba.retry.then(function(){MathJax.typesetPromise([T]).then(Editor.onMathJaxDone)}): -null!=window.console&&console.log("Error in MathJax: "+ba.toString())}};window.MathJax=null!=F?F:{options:{skipHtmlTags:{"[+]":["text"]}},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath"]},startup:{pageReady:function(){for(var T=0;T<Editor.mathJaxQueue.length;T++)Editor.doMathJaxRender(Editor.mathJaxQueue[T])}}};Editor.MathJaxRender=function(T){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(T):Editor.mathJaxQueue.push(T)}; -Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var R=Editor.prototype.init;Editor.prototype.init=function(){R.apply(this,arguments);var T=mxUtils.bind(this,function(ba,ha){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,T);this.graph.addListener(mxEvent.REFRESH,T)};F=document.getElementsByTagName("script");if(null!=F&&0<F.length){var W= -document.createElement("script");W.setAttribute("type","text/javascript");W.setAttribute("src",q);F[0].parentNode.appendChild(W)}}};Editor.prototype.csvToArray=function(q){if(0<q.length){var F="",R=[""],W=0,T=!0,ba;q=$jscomp.makeIterator(q);for(ba=q.next();!ba.done;ba=q.next())ba=ba.value,'"'===ba?(T&&ba===F&&(R[W]+=ba),T=!T):","===ba&&T?ba=R[++W]="":R[W]+=ba,F=ba;return R}return[]};Editor.prototype.getProxiedUrl=function(q){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&& -!this.isCorsEnabledForUrl(q)){var F=/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q);F=/\.png$/i.test(q)||/\.pdf$/i.test(q)||F;var R="t="+(new Date).getTime();q=PROXY_URL+"?url="+encodeURIComponent(q)+"&"+R+(F?"&base64=1":"")}return q};Editor.prototype.isCorsEnabledForUrl=function(q){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||q.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors))); -return null!=this.corsRegExp&&this.corsRegExp.test(q)||"https://raw.githubusercontent.com/"===q.substring(0,34)||"https://fonts.googleapis.com/"===q.substring(0,29)||"https://fonts.gstatic.com/"===q.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var q=new mxUrlConverter;q.updateBaseUrl();var F=q.convert,R=this;q.convert=function(W){if(null!=W){var T="http://"==W.substring(0,7)||"https://"==W.substring(0,8);T&&!navigator.onLine?W=Editor.svgBrokenImage.src:!T||W.substring(0,q.baseUrl.length)== -q.baseUrl||R.crossOriginImages&&R.isCorsEnabledForUrl(W)?"chrome-extension://"==W.substring(0,19)||mxClient.IS_CHROMEAPP||(W=F.apply(this,arguments)):W=PROXY_URL+"?url="+encodeURIComponent(W)}return W};return q};Editor.createSvgDataUri=function(q){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(q)))};Editor.prototype.convertImageToDataUri=function(q,F){try{var R=!0,W=window.setTimeout(mxUtils.bind(this,function(){R=!1;F(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(q))mxUtils.get(q, -mxUtils.bind(this,function(ba){window.clearTimeout(W);R&&F(Editor.createSvgDataUri(ba.getText()))}),function(){window.clearTimeout(W);R&&F(Editor.svgBrokenImage.src)});else{var T=new Image;this.crossOriginImages&&(T.crossOrigin="anonymous");T.onload=function(){window.clearTimeout(W);if(R)try{var ba=document.createElement("canvas"),ha=ba.getContext("2d");ba.height=T.height;ba.width=T.width;ha.drawImage(T,0,0);F(ba.toDataURL())}catch(ra){F(Editor.svgBrokenImage.src)}};T.onerror=function(){window.clearTimeout(W); -R&&F(Editor.svgBrokenImage.src)};T.src=q}}catch(ba){F(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(q,F,R,W){null==W&&(W=this.createImageUrlConverter());var T=0,ba=R||{};R=mxUtils.bind(this,function(ha,ra){ha=q.getElementsByTagName(ha);for(var ta=0;ta<ha.length;ta++)mxUtils.bind(this,function(ma){try{if(null!=ma){var pa=W.convert(ma.getAttribute(ra));if(null!=pa&&"data:"!=pa.substring(0,5)){var za=ba[pa];null==za?(T++,this.convertImageToDataUri(pa,function(Ba){null!=Ba&&(ba[pa]= -Ba,ma.setAttribute(ra,Ba));T--;0==T&&F(q)})):ma.setAttribute(ra,za)}else null!=pa&&ma.setAttribute(ra,pa)}}catch(Ba){}})(ha[ta])});R("image","xlink:href");R("img","src");0==T&&F(q)};Editor.base64Encode=function(q){for(var F="",R=0,W=q.length,T,ba,ha;R<W;){T=q.charCodeAt(R++)&255;if(R==W){F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&3)<<4);F+="==";break}ba=q.charCodeAt(R++);if(R==W){F+= -"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&3)<<4|(ba&240)>>4);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((ba&15)<<2);F+="=";break}ha=q.charCodeAt(R++);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&3)<<4|(ba&240)>>4);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((ba& -15)<<2|(ha&192)>>6);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(ha&63)}return F};Editor.prototype.loadUrl=function(q,F,R,W,T,ba,ha,ra){try{var ta=!ha&&(W||/(\.png)($|\?)/i.test(q)||/(\.jpe?g)($|\?)/i.test(q)||/(\.gif)($|\?)/i.test(q)||/(\.pdf)($|\?)/i.test(q));T=null!=T?T:!0;var ma=mxUtils.bind(this,function(){mxUtils.get(q,mxUtils.bind(this,function(pa){if(200<=pa.getStatus()&&299>=pa.getStatus()){if(null!=F){var za=pa.getText();if(ta){if((9==document.documentMode|| -10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){pa=mxUtilsBinaryToArray(pa.request.responseBody).toArray();za=Array(pa.length);for(var Ba=0;Ba<pa.length;Ba++)za[Ba]=String.fromCharCode(pa[Ba]);za=za.join("")}ba=null!=ba?ba:"data:image/png;base64,";za=ba+Editor.base64Encode(za)}F(za)}}else null!=R&&(0==pa.getStatus()?R({message:mxResources.get("accessDenied")},pa):404==pa.getStatus()?R({code:pa.getStatus()},pa):R({message:mxResources.get("error")+" "+pa.getStatus()},pa))}), -function(pa){null!=R&&R({message:mxResources.get("error")+" "+pa.getStatus()})},ta,this.timeout,function(){T&&null!=R&&R({code:App.ERROR_TIMEOUT,retry:ma})},ra)});ma()}catch(pa){null!=R&&R(pa)}};Editor.prototype.absoluteCssFonts=function(q){var F=null;if(null!=q){var R=q.split("url(");if(0<R.length){F=[R[0]];q=window.location.pathname;var W=null!=q?q.lastIndexOf("/"):-1;0<=W&&(q=q.substring(0,W+1));W=document.getElementsByTagName("base");var T=null;null!=W&&0<W.length&&(T=W[0].getAttribute("href")); -for(var ba=1;ba<R.length;ba++)if(W=R[ba].indexOf(")"),0<W){var ha=Editor.trimCssUrl(R[ba].substring(0,W));this.graph.isRelativeUrl(ha)&&(ha=null!=T?T+ha:window.location.protocol+"//"+window.location.hostname+("/"==ha.charAt(0)?"":q)+ha);F.push('url("'+ha+'"'+R[ba].substring(W))}else F.push(R[ba])}else F=[q]}return null!=F?F.join(""):null};Editor.prototype.mapFontUrl=function(q,F,R){/^https?:\/\//.test(F)&&!this.isCorsEnabledForUrl(F)&&(F=PROXY_URL+"?url="+encodeURIComponent(F));R(q,F)};Editor.prototype.embedCssFonts= -function(q,F){var R=q.split("url("),W=0;null==this.cachedFonts&&(this.cachedFonts={});var T=mxUtils.bind(this,function(){if(0==W){for(var ta=[R[0]],ma=1;ma<R.length;ma++){var pa=R[ma].indexOf(")");ta.push('url("');ta.push(this.cachedFonts[Editor.trimCssUrl(R[ma].substring(0,pa))]);ta.push('"'+R[ma].substring(pa))}F(ta.join(""))}});if(0<R.length){for(q=1;q<R.length;q++){var ba=R[q].indexOf(")"),ha=null,ra=R[q].indexOf("format(",ba);0<ra&&(ha=Editor.trimCssUrl(R[q].substring(ra+7,R[q].indexOf(")",ra)))); -mxUtils.bind(this,function(ta){if(null==this.cachedFonts[ta]){this.cachedFonts[ta]=ta;W++;var ma="application/x-font-ttf";if("svg"==ha||/(\.svg)($|\?)/i.test(ta))ma="image/svg+xml";else if("otf"==ha||"embedded-opentype"==ha||/(\.otf)($|\?)/i.test(ta))ma="application/x-font-opentype";else if("woff"==ha||/(\.woff)($|\?)/i.test(ta))ma="application/font-woff";else if("woff2"==ha||/(\.woff2)($|\?)/i.test(ta))ma="application/font-woff2";else if("eot"==ha||/(\.eot)($|\?)/i.test(ta))ma="application/vnd.ms-fontobject"; -else if("sfnt"==ha||/(\.sfnt)($|\?)/i.test(ta))ma="application/font-sfnt";this.mapFontUrl(ma,ta,mxUtils.bind(this,function(pa,za){this.loadUrl(za,mxUtils.bind(this,function(Ba){this.cachedFonts[ta]=Ba;W--;T()}),mxUtils.bind(this,function(Ba){W--;T()}),!0,null,"data:"+pa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(R[q].substring(0,ba)),ha)}T()}else F(q)};Editor.prototype.loadFonts=function(q){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(F){this.resolvedFontCss= -F;null!=q&&q()})):null!=q&&q()};Editor.prototype.createGoogleFontCache=function(){var q={},F;for(F in Graph.fontMapping)Graph.isCssFontUrl(F)&&(q[F]=Graph.fontMapping[F]);return q};Editor.prototype.embedExtFonts=function(q){var F=this.graph.getCustomFonts();if(0<F.length){var R=[],W=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var T=mxUtils.bind(this,function(){0==W&&this.embedCssFonts(R.join(""),q)}),ba=0;ba<F.length;ba++)mxUtils.bind(this,function(ha, -ra){Graph.isCssFontUrl(ra)?null==this.cachedGoogleFonts[ra]?(W++,this.loadUrl(ra,mxUtils.bind(this,function(ta){this.cachedGoogleFonts[ra]=ta;R.push(ta+"\n");W--;T()}),mxUtils.bind(this,function(ta){W--;R.push("@import url("+ra+");\n");T()}))):R.push(this.cachedGoogleFonts[ra]+"\n"):R.push('@font-face {font-family: "'+ha+'";src: url("'+ra+'")}\n')})(F[ba].name,F[ba].url);T()}else q()};Editor.prototype.addMathCss=function(q){q=q.getElementsByTagName("defs");if(null!=q&&0<q.length)for(var F=document.getElementsByTagName("style"), -R=0;R<F.length;R++){var W=mxUtils.getTextContent(F[R]);0>W.indexOf("mxPageSelector")&&0<W.indexOf("MathJax")&&q[0].appendChild(F[R].cloneNode(!0))}};Editor.prototype.addFontCss=function(q,F){F=null!=F?F:this.absoluteCssFonts(this.fontCss);if(null!=F){var R=q.getElementsByTagName("defs"),W=q.ownerDocument;0==R.length?(R=null!=W.createElementNS?W.createElementNS(mxConstants.NS_SVG,"defs"):W.createElement("defs"),null!=q.firstChild?q.insertBefore(R,q.firstChild):q.appendChild(R)):R=R[0];q=null!=W.createElementNS? -W.createElementNS(mxConstants.NS_SVG,"style"):W.createElement("style");q.setAttribute("type","text/css");mxUtils.setTextContent(q,F);R.appendChild(q)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(q,F,R){var W=mxClient.IS_FF?8192:16384;return Math.min(R,Math.min(W/q,W/F))};Editor.prototype.exportToCanvas=function(q,F,R,W,T,ba,ha,ra,ta,ma,pa,za,Ba,Ia,Aa,Ka,Da,Ra){try{ba=null!=ba?ba:!0;ha=null!=ha?ha: -!0;za=null!=za?za:this.graph;Ba=null!=Ba?Ba:0;var Qa=ta?null:za.background;Qa==mxConstants.NONE&&(Qa=null);null==Qa&&(Qa=W);null==Qa&&0==ta&&(Qa=Ka?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(za.getSvg(null,null,Ba,Ia,null,ha,null,null,null,ma,null,Ka,Da,Ra),mxUtils.bind(this,function(Ta){try{var Za=new Image;Za.onload=mxUtils.bind(this,function(){try{var y=function(){mxClient.IS_SF?window.setTimeout(function(){X.drawImage(Za,0,0);q(M,Ta)},0):(X.drawImage(Za,0,0),q(M,Ta))}, -M=document.createElement("canvas"),N=parseInt(Ta.getAttribute("width")),S=parseInt(Ta.getAttribute("height"));ra=null!=ra?ra:1;null!=F&&(ra=ba?Math.min(1,Math.min(3*F/(4*S),F/N)):F/N);ra=this.getMaxCanvasScale(N,S,ra);N=Math.ceil(ra*N);S=Math.ceil(ra*S);M.setAttribute("width",N);M.setAttribute("height",S);var X=M.getContext("2d");null!=Qa&&(X.beginPath(),X.rect(0,0,N,S),X.fillStyle=Qa,X.fill());1!=ra&&X.scale(ra,ra);if(Aa){var fa=za.view,la=fa.scale;fa.scale=1;var xa=btoa(unescape(encodeURIComponent(fa.createSvgGrid(fa.gridColor)))); -fa.scale=la;xa="data:image/svg+xml;base64,"+xa;var sa=za.gridSize*fa.gridSteps*ra,ya=za.getGraphBounds(),Fa=fa.translate.x*la,wa=fa.translate.y*la,ua=Fa+(ya.x-Fa)/la-Ba,La=wa+(ya.y-wa)/la-Ba,Oa=new Image;Oa.onload=function(){try{for(var Ca=-Math.round(sa-mxUtils.mod((Fa-ua)*ra,sa)),Ma=-Math.round(sa-mxUtils.mod((wa-La)*ra,sa));Ca<N;Ca+=sa)for(var Ga=Ma;Ga<S;Ga+=sa)X.drawImage(Oa,Ca/ra,Ga/ra);y()}catch(Ya){null!=T&&T(Ya)}};Oa.onerror=function(Ca){null!=T&&T(Ca)};Oa.src=xa}else y()}catch(Ca){null!= -T&&T(Ca)}});Za.onerror=function(y){null!=T&&T(y)};ma&&this.graph.addSvgShadow(Ta);this.graph.mathEnabled&&this.addMathCss(Ta);var Pa=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ta,this.resolvedFontCss),Za.src=Editor.createSvgDataUri(mxUtils.getXml(Ta))}catch(y){null!=T&&T(y)}});this.embedExtFonts(mxUtils.bind(this,function(y){try{null!=y&&this.addFontCss(Ta,y),this.loadFonts(Pa)}catch(M){null!=T&&T(M)}}))}catch(y){null!=T&&T(y)}}),R,pa)}catch(Ta){null!=T&&T(Ta)}}; -Editor.crcTable=[];for(var C=0;256>C;C++)for(var p=C,E=0;8>E;E++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[C]=p;Editor.updateCRC=function(q,F,R,W){for(var T=0;T<W;T++)q=Editor.crcTable[(q^F.charCodeAt(R+T))&255]^q>>>8;return q};Editor.crc32=function(q){for(var F=-1,R=0;R<q.length;R++)F=F>>>8^Editor.crcTable[(F^q.charCodeAt(R))&255];return(F^-1)>>>0};Editor.writeGraphModelToPng=function(q,F,R,W,T){function ba(pa,za){var Ba=ta;ta+=za;return pa.substring(Ba,ta)}function ha(pa){pa=ba(pa,4);return pa.charCodeAt(3)+ -(pa.charCodeAt(2)<<8)+(pa.charCodeAt(1)<<16)+(pa.charCodeAt(0)<<24)}function ra(pa){return String.fromCharCode(pa>>24&255,pa>>16&255,pa>>8&255,pa&255)}q=q.substring(q.indexOf(",")+1);q=window.atob?atob(q):Base64.decode(q,!0);var ta=0;if(ba(q,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=T&&T();else if(ba(q,4),"IHDR"!=ba(q,4))null!=T&&T();else{ba(q,17);T=q.substring(0,ta);do{var ma=ha(q);if("IDAT"==ba(q,4)){T=q.substring(0,ta-8);"pHYs"==F&&"dpi"==R?(R=Math.round(W/.0254), -R=ra(R)+ra(R)+String.fromCharCode(1)):R=R+String.fromCharCode(0)+("zTXt"==F?String.fromCharCode(0):"")+W;W=4294967295;W=Editor.updateCRC(W,F,0,4);W=Editor.updateCRC(W,R,0,R.length);T+=ra(R.length)+F+R+ra(W^4294967295);T+=q.substring(ta-8,q.length);break}T+=q.substring(ta-8,ta-4+ma);ba(q,ma);ba(q,4)}while(ma);return"data:image/png;base64,"+(window.btoa?btoa(T):Base64.encode(T,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var K=ColorDialog.addRecentColor; -ColorDialog.addRecentColor=function(q,F){K.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var Q=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){Q.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(q,F){var R=null;null!=q.editor.graph.getModel().getParent(F)?R=F.getId():null!=q.currentPage&&(R=q.currentPage.getId());return R}); +(Sidebar.prototype.sidebarTitles=q.sidebarTitles);q.sidebarTitleSize&&(E=parseInt(q.sidebarTitleSize),!isNaN(E)&&0<E?Sidebar.prototype.sidebarTitleSize=E:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));q.fontCss&&("string"===typeof q.fontCss?Editor.configureFontCss(q.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=q.autosaveDelay&&(E=parseInt(q.autosaveDelay),!isNaN(E)&&0<E?DrawioFile.prototype.autosaveDelay=E:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay")); +null!=q.maxImageBytes&&(EditorUi.prototype.maxImageBytes=q.maxImageBytes);null!=q.maxImageSize&&(EditorUi.prototype.maxImageSize=q.maxImageSize);null!=q.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=q.shareCursorPosition);null!=q.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=q.showRemoteCursors)}};Editor.configureFontCss=function(q){if(null!=q){Editor.prototype.fontCss=q;var E=document.getElementsByTagName("script")[0];if(null!=E&&null!=E.parentNode){var Q=document.createElement("style"); +Q.setAttribute("type","text/css");Q.appendChild(document.createTextNode(q));E.parentNode.insertBefore(Q,E);q=q.split("url(");for(Q=1;Q<q.length;Q++){var Y=q[Q].indexOf(")");Y=Editor.trimCssUrl(q[Q].substring(0,Y));var R=document.createElement("link");R.setAttribute("rel","preload");R.setAttribute("href",Y);R.setAttribute("as","font");R.setAttribute("crossorigin","");E.parentNode.insertBefore(R,E)}}}};Editor.trimCssUrl=function(q){return q.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$", +"g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(q){q=null!=q?q:Editor.GUID_LENGTH;for(var E=[],Q=0;Q<q;Q++)E.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return E.join("")};Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages= +!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(q){q=null!=q&&"mxlibrary"!=q.nodeName?this.extractGraphModel(q):null;if(null!=q){var E=Editor.extractParserError(q,mxResources.get("invalidOrMissingFile"));if(E)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[q],"cause",[E]),Error(mxResources.get("notADiagramFile")+" ("+E+")");if("mxGraphModel"==q.nodeName){E=q.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=E&&""!= +E)E!=this.graph.currentStyle&&(Q=null!=this.graph.themes?this.graph.themes[E]:mxUtils.load(STYLE_PATH+"/"+E+".xml").getDocumentElement(),null!=Q&&(Y=new mxCodec(Q.ownerDocument),Y.decode(Q,this.graph.getStylesheet())));else{var Q=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=Q){var Y=new mxCodec(Q.ownerDocument);Y.decode(Q,this.graph.getStylesheet())}}this.graph.currentStyle=E;this.graph.mathEnabled="1"==urlParams.math|| +"1"==q.getAttribute("math");E=q.getAttribute("backgroundImage");null!=E?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(E)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==q.getAttribute("shadow"),!1);if(E=q.getAttribute("extFonts"))try{for(E=E.split("|").map(function(R){R=R.split("^");return{name:R[0],url:R[1]}}),Q=0;Q<E.length;Q++)this.graph.addExtFont(E[Q].name, +E[Q].url)}catch(R){console.log("ExtFonts format error: "+R.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(q,E){q=null!=q?q:!0;var Q=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&Q.setAttribute("style", +this.graph.currentStyle);var Y=this.graph.getBackgroundImageObject(this.graph.backgroundImage,E);null!=Y&&Q.setAttribute("backgroundImage",JSON.stringify(Y));Q.setAttribute("math",this.graph.mathEnabled?"1":"0");Q.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(Y=this.graph.extFonts.map(function(R){return R.name+"^"+R.url}),Q.setAttribute("extFonts",Y.join("|")));return Q};Editor.prototype.isDataSvg=function(q){try{var E=mxUtils.parseXml(q).documentElement.getAttribute("content"); +if(null!=E&&(null!=E&&"<"!=E.charAt(0)&&"%"!=E.charAt(0)&&(E=unescape(window.atob?atob(E):Base64.decode(cont,E))),null!=E&&"%"==E.charAt(0)&&(E=decodeURIComponent(E)),null!=E&&0<E.length)){var Q=mxUtils.parseXml(E).documentElement;return"mxfile"==Q.nodeName||"mxGraphModel"==Q.nodeName}}catch(Y){}return!1};Editor.prototype.extractGraphModel=function(q,E,Q){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled= +"1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();k.apply(this,arguments)};var m=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){m.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath= +function(q,E){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){q=null!=q?q:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(R){try{MathJax.typesetClear([R]),MathJax.typeset([R]),Editor.onMathJaxDone()}catch(ba){MathJax.typesetClear([R]),null!=ba.retry?ba.retry.then(function(){MathJax.typesetPromise([R]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+ba.toString())}};window.MathJax=null!=E?E:{options:{skipHtmlTags:{"[+]":["text"]}}, +loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath"]},startup:{pageReady:function(){for(var R=0;R<Editor.mathJaxQueue.length;R++)Editor.doMathJaxRender(Editor.mathJaxQueue[R])}}};Editor.MathJaxRender=function(R){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(R):Editor.mathJaxQueue.push(R)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var Q=Editor.prototype.init; +Editor.prototype.init=function(){Q.apply(this,arguments);var R=mxUtils.bind(this,function(ba,ea){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,R);this.graph.addListener(mxEvent.REFRESH,R)};E=document.getElementsByTagName("script");if(null!=E&&0<E.length){var Y=document.createElement("script");Y.setAttribute("type","text/javascript");Y.setAttribute("src",q);E[0].parentNode.appendChild(Y)}}}; +Editor.prototype.csvToArray=function(q){if(0<q.length){var E="",Q=[""],Y=0,R=!0,ba;q=$jscomp.makeIterator(q);for(ba=q.next();!ba.done;ba=q.next())ba=ba.value,'"'===ba?(R&&ba===E&&(Q[Y]+=ba),R=!R):","===ba&&R?ba=Q[++Y]="":Q[Y]+=ba,E=ba;return Q}return[]};Editor.prototype.getProxiedUrl=function(q){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(q)){var E=/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q); +E=/\.png$/i.test(q)||/\.pdf$/i.test(q)||E;var Q="t="+(new Date).getTime();q=PROXY_URL+"?url="+encodeURIComponent(q)+"&"+Q+(E?"&base64=1":"")}return q};Editor.prototype.isCorsEnabledForUrl=function(q){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||q.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(q)||"https://raw.githubusercontent.com/"=== +q.substring(0,34)||"https://fonts.googleapis.com/"===q.substring(0,29)||"https://fonts.gstatic.com/"===q.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var q=new mxUrlConverter;q.updateBaseUrl();var E=q.convert,Q=this;q.convert=function(Y){if(null!=Y){var R="http://"==Y.substring(0,7)||"https://"==Y.substring(0,8);R&&!navigator.onLine?Y=Editor.svgBrokenImage.src:!R||Y.substring(0,q.baseUrl.length)==q.baseUrl||Q.crossOriginImages&&Q.isCorsEnabledForUrl(Y)?"chrome-extension://"== +Y.substring(0,19)||mxClient.IS_CHROMEAPP||(Y=E.apply(this,arguments)):Y=PROXY_URL+"?url="+encodeURIComponent(Y)}return Y};return q};Editor.createSvgDataUri=function(q){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(q)))};Editor.prototype.convertImageToDataUri=function(q,E){try{var Q=!0,Y=window.setTimeout(mxUtils.bind(this,function(){Q=!1;E(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(q))mxUtils.get(q,mxUtils.bind(this,function(ba){window.clearTimeout(Y);Q&& +E(Editor.createSvgDataUri(ba.getText()))}),function(){window.clearTimeout(Y);Q&&E(Editor.svgBrokenImage.src)});else{var R=new Image;this.crossOriginImages&&(R.crossOrigin="anonymous");R.onload=function(){window.clearTimeout(Y);if(Q)try{var ba=document.createElement("canvas"),ea=ba.getContext("2d");ba.height=R.height;ba.width=R.width;ea.drawImage(R,0,0);E(ba.toDataURL())}catch(ra){E(Editor.svgBrokenImage.src)}};R.onerror=function(){window.clearTimeout(Y);Q&&E(Editor.svgBrokenImage.src)};R.src=q}}catch(ba){E(Editor.svgBrokenImage.src)}}; +Editor.prototype.convertImages=function(q,E,Q,Y){null==Y&&(Y=this.createImageUrlConverter());var R=0,ba=Q||{};Q=mxUtils.bind(this,function(ea,ra){ea=q.getElementsByTagName(ea);for(var ta=0;ta<ea.length;ta++)mxUtils.bind(this,function(la){try{if(null!=la){var pa=Y.convert(la.getAttribute(ra));if(null!=pa&&"data:"!=pa.substring(0,5)){var xa=ba[pa];null==xa?(R++,this.convertImageToDataUri(pa,function(Ca){null!=Ca&&(ba[pa]=Ca,la.setAttribute(ra,Ca));R--;0==R&&E(q)})):la.setAttribute(ra,xa)}else null!= +pa&&la.setAttribute(ra,pa)}}catch(Ca){}})(ea[ta])});Q("image","xlink:href");Q("img","src");0==R&&E(q)};Editor.base64Encode=function(q){for(var E="",Q=0,Y=q.length,R,ba,ea;Q<Y;){R=q.charCodeAt(Q++)&255;if(Q==Y){E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4);E+="==";break}ba=q.charCodeAt(Q++);if(Q==Y){E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>> +2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4|(ba&240)>>4);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((ba&15)<<2);E+="=";break}ea=q.charCodeAt(Q++);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4|(ba&240)>>4);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((ba&15)<<2|(ea&192)>> +6);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(ea&63)}return E};Editor.prototype.loadUrl=function(q,E,Q,Y,R,ba,ea,ra){try{var ta=!ea&&(Y||/(\.png)($|\?)/i.test(q)||/(\.jpe?g)($|\?)/i.test(q)||/(\.gif)($|\?)/i.test(q)||/(\.pdf)($|\?)/i.test(q));R=null!=R?R:!0;var la=mxUtils.bind(this,function(){mxUtils.get(q,mxUtils.bind(this,function(pa){if(200<=pa.getStatus()&&299>=pa.getStatus()){if(null!=E){var xa=pa.getText();if(ta){if((9==document.documentMode||10==document.documentMode)&& +"undefined"!==typeof window.mxUtilsBinaryToArray){pa=mxUtilsBinaryToArray(pa.request.responseBody).toArray();xa=Array(pa.length);for(var Ca=0;Ca<pa.length;Ca++)xa[Ca]=String.fromCharCode(pa[Ca]);xa=xa.join("")}ba=null!=ba?ba:"data:image/png;base64,";xa=ba+Editor.base64Encode(xa)}E(xa)}}else null!=Q&&(0==pa.getStatus()?Q({message:mxResources.get("accessDenied")},pa):404==pa.getStatus()?Q({code:pa.getStatus()},pa):Q({message:mxResources.get("error")+" "+pa.getStatus()},pa))}),function(pa){null!=Q&& +Q({message:mxResources.get("error")+" "+pa.getStatus()})},ta,this.timeout,function(){R&&null!=Q&&Q({code:App.ERROR_TIMEOUT,retry:la})},ra)});la()}catch(pa){null!=Q&&Q(pa)}};Editor.prototype.absoluteCssFonts=function(q){var E=null;if(null!=q){var Q=q.split("url(");if(0<Q.length){E=[Q[0]];q=window.location.pathname;var Y=null!=q?q.lastIndexOf("/"):-1;0<=Y&&(q=q.substring(0,Y+1));Y=document.getElementsByTagName("base");var R=null;null!=Y&&0<Y.length&&(R=Y[0].getAttribute("href"));for(var ba=1;ba<Q.length;ba++)if(Y= +Q[ba].indexOf(")"),0<Y){var ea=Editor.trimCssUrl(Q[ba].substring(0,Y));this.graph.isRelativeUrl(ea)&&(ea=null!=R?R+ea:window.location.protocol+"//"+window.location.hostname+("/"==ea.charAt(0)?"":q)+ea);E.push('url("'+ea+'"'+Q[ba].substring(Y))}else E.push(Q[ba])}else E=[q]}return null!=E?E.join(""):null};Editor.prototype.mapFontUrl=function(q,E,Q){/^https?:\/\//.test(E)&&!this.isCorsEnabledForUrl(E)&&(E=PROXY_URL+"?url="+encodeURIComponent(E));Q(q,E)};Editor.prototype.embedCssFonts=function(q,E){var Q= +q.split("url("),Y=0;null==this.cachedFonts&&(this.cachedFonts={});var R=mxUtils.bind(this,function(){if(0==Y){for(var ta=[Q[0]],la=1;la<Q.length;la++){var pa=Q[la].indexOf(")");ta.push('url("');ta.push(this.cachedFonts[Editor.trimCssUrl(Q[la].substring(0,pa))]);ta.push('"'+Q[la].substring(pa))}E(ta.join(""))}});if(0<Q.length){for(q=1;q<Q.length;q++){var ba=Q[q].indexOf(")"),ea=null,ra=Q[q].indexOf("format(",ba);0<ra&&(ea=Editor.trimCssUrl(Q[q].substring(ra+7,Q[q].indexOf(")",ra))));mxUtils.bind(this, +function(ta){if(null==this.cachedFonts[ta]){this.cachedFonts[ta]=ta;Y++;var la="application/x-font-ttf";if("svg"==ea||/(\.svg)($|\?)/i.test(ta))la="image/svg+xml";else if("otf"==ea||"embedded-opentype"==ea||/(\.otf)($|\?)/i.test(ta))la="application/x-font-opentype";else if("woff"==ea||/(\.woff)($|\?)/i.test(ta))la="application/font-woff";else if("woff2"==ea||/(\.woff2)($|\?)/i.test(ta))la="application/font-woff2";else if("eot"==ea||/(\.eot)($|\?)/i.test(ta))la="application/vnd.ms-fontobject";else if("sfnt"== +ea||/(\.sfnt)($|\?)/i.test(ta))la="application/font-sfnt";this.mapFontUrl(la,ta,mxUtils.bind(this,function(pa,xa){this.loadUrl(xa,mxUtils.bind(this,function(Ca){this.cachedFonts[ta]=Ca;Y--;R()}),mxUtils.bind(this,function(Ca){Y--;R()}),!0,null,"data:"+pa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(Q[q].substring(0,ba)),ea)}R()}else E(q)};Editor.prototype.loadFonts=function(q){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(E){this.resolvedFontCss= +E;null!=q&&q()})):null!=q&&q()};Editor.prototype.createGoogleFontCache=function(){var q={},E;for(E in Graph.fontMapping)Graph.isCssFontUrl(E)&&(q[E]=Graph.fontMapping[E]);return q};Editor.prototype.embedExtFonts=function(q){var E=this.graph.getCustomFonts();if(0<E.length){var Q=[],Y=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var R=mxUtils.bind(this,function(){0==Y&&this.embedCssFonts(Q.join(""),q)}),ba=0;ba<E.length;ba++)mxUtils.bind(this,function(ea, +ra){Graph.isCssFontUrl(ra)?null==this.cachedGoogleFonts[ra]?(Y++,this.loadUrl(ra,mxUtils.bind(this,function(ta){this.cachedGoogleFonts[ra]=ta;Q.push(ta+"\n");Y--;R()}),mxUtils.bind(this,function(ta){Y--;Q.push("@import url("+ra+");\n");R()}))):Q.push(this.cachedGoogleFonts[ra]+"\n"):Q.push('@font-face {font-family: "'+ea+'";src: url("'+ra+'")}\n')})(E[ba].name,E[ba].url);R()}else q()};Editor.prototype.addMathCss=function(q){q=q.getElementsByTagName("defs");if(null!=q&&0<q.length)for(var E=document.getElementsByTagName("style"), +Q=0;Q<E.length;Q++){var Y=mxUtils.getTextContent(E[Q]);0>Y.indexOf("mxPageSelector")&&0<Y.indexOf("MathJax")&&q[0].appendChild(E[Q].cloneNode(!0))}};Editor.prototype.addFontCss=function(q,E){E=null!=E?E:this.absoluteCssFonts(this.fontCss);if(null!=E){var Q=q.getElementsByTagName("defs"),Y=q.ownerDocument;0==Q.length?(Q=null!=Y.createElementNS?Y.createElementNS(mxConstants.NS_SVG,"defs"):Y.createElement("defs"),null!=q.firstChild?q.insertBefore(Q,q.firstChild):q.appendChild(Q)):Q=Q[0];q=null!=Y.createElementNS? +Y.createElementNS(mxConstants.NS_SVG,"style"):Y.createElement("style");q.setAttribute("type","text/css");mxUtils.setTextContent(q,E);Q.appendChild(q)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(q,E,Q){var Y=mxClient.IS_FF?8192:16384;return Math.min(Q,Math.min(Y/q,Y/E))};Editor.prototype.exportToCanvas=function(q,E,Q,Y,R,ba,ea,ra,ta,la,pa,xa,Ca,Ia,Aa,La,Da,Sa){try{ba=null!=ba?ba:!0;ea=null!=ea?ea: +!0;xa=null!=xa?xa:this.graph;Ca=null!=Ca?Ca:0;var Ra=ta?null:xa.background;Ra==mxConstants.NONE&&(Ra=null);null==Ra&&(Ra=Y);null==Ra&&0==ta&&(Ra=La?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(xa.getSvg(null,null,Ca,Ia,null,ea,null,null,null,la,null,La,Da,Sa),mxUtils.bind(this,function(Ta){try{var Za=new Image;Za.onload=mxUtils.bind(this,function(){try{var z=function(){mxClient.IS_SF?window.setTimeout(function(){U.drawImage(Za,0,0);q(L,Ta)},0):(U.drawImage(Za,0,0),q(L,Ta))}, +L=document.createElement("canvas"),O=parseInt(Ta.getAttribute("width")),V=parseInt(Ta.getAttribute("height"));ra=null!=ra?ra:1;null!=E&&(ra=ba?Math.min(1,Math.min(3*E/(4*V),E/O)):E/O);ra=this.getMaxCanvasScale(O,V,ra);O=Math.ceil(ra*O);V=Math.ceil(ra*V);L.setAttribute("width",O);L.setAttribute("height",V);var U=L.getContext("2d");null!=Ra&&(U.beginPath(),U.rect(0,0,O,V),U.fillStyle=Ra,U.fill());1!=ra&&U.scale(ra,ra);if(Aa){var ha=xa.view,ma=ha.scale;ha.scale=1;var wa=btoa(unescape(encodeURIComponent(ha.createSvgGrid(ha.gridColor)))); +ha.scale=ma;wa="data:image/svg+xml;base64,"+wa;var sa=xa.gridSize*ha.gridSteps*ra,ya=xa.getGraphBounds(),Ha=ha.translate.x*ma,Qa=ha.translate.y*ma,ua=Ha+(ya.x-Ha)/ma-Ca,za=Qa+(ya.y-Qa)/ma-Ca,Fa=new Image;Fa.onload=function(){try{for(var Ba=-Math.round(sa-mxUtils.mod((Ha-ua)*ra,sa)),Ea=-Math.round(sa-mxUtils.mod((Qa-za)*ra,sa));Ba<O;Ba+=sa)for(var Oa=Ea;Oa<V;Oa+=sa)U.drawImage(Fa,Ba/ra,Oa/ra);z()}catch(Pa){null!=R&&R(Pa)}};Fa.onerror=function(Ba){null!=R&&R(Ba)};Fa.src=wa}else z()}catch(Ba){null!= +R&&R(Ba)}});Za.onerror=function(z){null!=R&&R(z)};la&&this.graph.addSvgShadow(Ta);this.graph.mathEnabled&&this.addMathCss(Ta);var Na=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ta,this.resolvedFontCss),Za.src=Editor.createSvgDataUri(mxUtils.getXml(Ta))}catch(z){null!=R&&R(z)}});this.embedExtFonts(mxUtils.bind(this,function(z){try{null!=z&&this.addFontCss(Ta,z),this.loadFonts(Na)}catch(L){null!=R&&R(L)}}))}catch(z){null!=R&&R(z)}}),Q,pa)}catch(Ta){null!=R&&R(Ta)}}; +Editor.crcTable=[];for(var C=0;256>C;C++)for(var p=C,F=0;8>F;F++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[C]=p;Editor.updateCRC=function(q,E,Q,Y){for(var R=0;R<Y;R++)q=Editor.crcTable[(q^E.charCodeAt(Q+R))&255]^q>>>8;return q};Editor.crc32=function(q){for(var E=-1,Q=0;Q<q.length;Q++)E=E>>>8^Editor.crcTable[(E^q.charCodeAt(Q))&255];return(E^-1)>>>0};Editor.writeGraphModelToPng=function(q,E,Q,Y,R){function ba(pa,xa){var Ca=ta;ta+=xa;return pa.substring(Ca,ta)}function ea(pa){pa=ba(pa,4);return pa.charCodeAt(3)+ +(pa.charCodeAt(2)<<8)+(pa.charCodeAt(1)<<16)+(pa.charCodeAt(0)<<24)}function ra(pa){return String.fromCharCode(pa>>24&255,pa>>16&255,pa>>8&255,pa&255)}q=q.substring(q.indexOf(",")+1);q=window.atob?atob(q):Base64.decode(q,!0);var ta=0;if(ba(q,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=R&&R();else if(ba(q,4),"IHDR"!=ba(q,4))null!=R&&R();else{ba(q,17);R=q.substring(0,ta);do{var la=ea(q);if("IDAT"==ba(q,4)){R=q.substring(0,ta-8);"pHYs"==E&&"dpi"==Q?(Q=Math.round(Y/.0254), +Q=ra(Q)+ra(Q)+String.fromCharCode(1)):Q=Q+String.fromCharCode(0)+("zTXt"==E?String.fromCharCode(0):"")+Y;Y=4294967295;Y=Editor.updateCRC(Y,E,0,4);Y=Editor.updateCRC(Y,Q,0,Q.length);R+=ra(Q.length)+E+Q+ra(Y^4294967295);R+=q.substring(ta-8,q.length);break}R+=q.substring(ta-8,ta-4+la);ba(q,la);ba(q,4)}while(la);return"data:image/png;base64,"+(window.btoa?btoa(R):Base64.encode(R,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var K=ColorDialog.addRecentColor; +ColorDialog.addRecentColor=function(q,E){K.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var P=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){P.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(q,E){var Q=null;null!=q.editor.graph.getModel().getParent(E)?Q=E.getId():null!=q.currentPage&&(Q=q.currentPage.getId());return Q}); if(null!=window.StyleFormatPanel){var d=Format.prototype.init;Format.prototype.init=function(){d.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var f=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?f.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var q=this.editorUi.getCurrentFile();return"1"==urlParams.embed|| -null!=q&&q.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(q){return!1};var g=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(q){q=g.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var F=this.editorUi,R=F.editor.graph,W=this.createOption(mxResources.get("shadow"),function(){return R.shadowVisible},function(T){var ba=new ChangePageSetup(F);ba.ignoreColor=!0;ba.ignoreImage=!0;ba.shadowVisible= -T;R.model.execute(ba)},{install:function(T){this.listener=function(){T(R.shadowVisible)};F.addListener("shadowVisibleChanged",this.listener)},destroy:function(){F.removeListener(this.listener)}});Editor.enableShadowOption||(W.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(W,60));q.appendChild(W)}return q};var x=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(q){q=x.apply(this,arguments);var F=this.editorUi,R=F.editor.graph; -if(R.isEnabled()){var W=F.getCurrentFile();if(null!=W&&W.isAutosaveOptional()){var T=this.createOption(mxResources.get("autosave"),function(){return F.editor.autosave},function(ha){F.editor.setAutosave(ha);F.editor.autosave&&W.isModified()&&W.fileChanged()},{install:function(ha){this.listener=function(){ha(F.editor.autosave)};F.editor.addListener("autosaveChanged",this.listener)},destroy:function(){F.editor.removeListener(this.listener)}});q.appendChild(T)}}if(this.isMathOptionVisible()&&R.isEnabled()&& -"undefined"!==typeof MathJax){T=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return R.mathEnabled},function(ha){F.actions.get("mathematicalTypesetting").funct()},{install:function(ha){this.listener=function(){ha(R.mathEnabled)};F.addListener("mathEnabledChanged",this.listener)},destroy:function(){F.removeListener(this.listener)}});T.style.paddingTop="5px";q.appendChild(T);var ba=F.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");ba.style.position= -"relative";ba.style.marginLeft="6px";ba.style.top="2px";T.appendChild(ba)}return q};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties= +null!=q&&q.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(q){return!1};var g=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(q){q=g.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var E=this.editorUi,Q=E.editor.graph,Y=this.createOption(mxResources.get("shadow"),function(){return Q.shadowVisible},function(R){var ba=new ChangePageSetup(E);ba.ignoreColor=!0;ba.ignoreImage=!0;ba.shadowVisible= +R;Q.model.execute(ba)},{install:function(R){this.listener=function(){R(Q.shadowVisible)};E.addListener("shadowVisibleChanged",this.listener)},destroy:function(){E.removeListener(this.listener)}});Editor.enableShadowOption||(Y.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(Y,60));q.appendChild(Y)}return q};var x=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(q){q=x.apply(this,arguments);var E=this.editorUi,Q=E.editor.graph; +if(Q.isEnabled()){var Y=E.getCurrentFile();if(null!=Y&&Y.isAutosaveOptional()){var R=this.createOption(mxResources.get("autosave"),function(){return E.editor.autosave},function(ea){E.editor.setAutosave(ea);E.editor.autosave&&Y.isModified()&&Y.fileChanged()},{install:function(ea){this.listener=function(){ea(E.editor.autosave)};E.editor.addListener("autosaveChanged",this.listener)},destroy:function(){E.editor.removeListener(this.listener)}});q.appendChild(R)}}if(this.isMathOptionVisible()&&Q.isEnabled()&& +"undefined"!==typeof MathJax){R=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return Q.mathEnabled},function(ea){E.actions.get("mathematicalTypesetting").funct()},{install:function(ea){this.listener=function(){ea(Q.mathEnabled)};E.addListener("mathEnabledChanged",this.listener)},destroy:function(){E.removeListener(this.listener)}});R.style.paddingTop="5px";q.appendChild(R);var ba=E.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");ba.style.position= +"relative";ba.style.marginLeft="6px";ba.style.top="2px";R.appendChild(ba)}return q};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties= [{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double", dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}, {name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties= @@ -3257,93 +3254,93 @@ min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name: stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000", font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3", stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"}, -{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(q,F,R){if(null!=F){var W=function(ba){if(null!=ba)if(R)for(var ha=0;ha<ba.length;ha++)F[ba[ha].name]=ba[ha];else for(var ra in F){var ta=!1;for(ha=0;ha<ba.length;ha++)if(ba[ha].name==ra&&ba[ha].type==F[ra].type){ta=!0;break}ta|| -delete F[ra]}},T=this.editorUi.editor.graph.view.getState(q);null!=T&&null!=T.shape&&(T.shape.commonCustomPropAdded||(T.shape.commonCustomPropAdded=!0,T.shape.customProperties=T.shape.customProperties||[],T.cell.vertex?Array.prototype.push.apply(T.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(T.shape.customProperties,Editor.commonEdgeProperties)),W(T.shape.customProperties));q=q.getAttribute("customProperties");if(null!=q)try{W(JSON.parse(q))}catch(ba){}}};var z= -StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var q=this.editorUi.getSelectionState();"image"!=q.style.shape&&!q.containsLabel&&0<q.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));z.apply(this,arguments);if(Editor.enableCustomProperties){for(var F={},R=q.vertices,W=q.edges,T=0;T<R.length;T++)this.findCommonProperties(R[T],F,0==T);for(T=0;T<W.length;T++)this.findCommonProperties(W[T],F,0==R.length&&0==T);null!=Object.getOwnPropertyNames&&0< -Object.getOwnPropertyNames(F).length&&this.container.appendChild(this.addProperties(this.createPanel(),F,q))}};var u=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(q){this.addActions(q,["copyStyle","pasteStyle"]);return u.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(q,F,R){function W(X,fa,la,xa){za.getModel().beginUpdate();try{var sa=[],ya=[];if(null!=la.index){for(var Fa=[],wa=la.parentRow.nextSibling;wa&& -wa.getAttribute("data-pName")==X;)Fa.push(wa.getAttribute("data-pValue")),wa=wa.nextSibling;la.index<Fa.length?null!=xa?Fa.splice(xa,1):Fa[la.index]=fa:Fa.push(fa);null!=la.size&&Fa.length>la.size&&(Fa=Fa.slice(0,la.size));fa=Fa.join(",");null!=la.countProperty&&(za.setCellStyles(la.countProperty,Fa.length,za.getSelectionCells()),sa.push(la.countProperty),ya.push(Fa.length))}za.setCellStyles(X,fa,za.getSelectionCells());sa.push(X);ya.push(fa);if(null!=la.dependentProps)for(X=0;X<la.dependentProps.length;X++){var ua= -la.dependentPropsDefVal[X],La=la.dependentPropsVals[X];if(La.length>fa)La=La.slice(0,fa);else for(var Oa=La.length;Oa<fa;Oa++)La.push(ua);La=La.join(",");za.setCellStyles(la.dependentProps[X],La,za.getSelectionCells());sa.push(la.dependentProps[X]);ya.push(La)}if("function"==typeof la.onChange)la.onChange(za,fa);pa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",sa,"values",ya,"cells",za.getSelectionCells()))}finally{za.getModel().endUpdate()}}function T(X,fa,la){var xa=mxUtils.getOffset(q, -!0),sa=mxUtils.getOffset(X,!0);fa.style.position="absolute";fa.style.left=sa.x-xa.x+"px";fa.style.top=sa.y-xa.y+"px";fa.style.width=X.offsetWidth+"px";fa.style.height=X.offsetHeight-(la?4:0)+"px";fa.style.zIndex=5}function ba(X,fa,la){var xa=document.createElement("div");xa.style.width="32px";xa.style.height="4px";xa.style.margin="2px";xa.style.border="1px solid black";xa.style.background=fa&&"none"!=fa?fa:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(pa,function(sa){this.editorUi.pickColor(fa, -function(ya){xa.style.background="none"==ya?"url('"+Dialog.prototype.noColorImage+"')":ya;W(X,ya,la)});mxEvent.consume(sa)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(xa);return btn}function ha(X,fa,la,xa,sa,ya,Fa){null!=fa&&(fa=fa.split(","),Ba.push({name:X,values:fa,type:la,defVal:xa,countProperty:sa,parentRow:ya,isDeletable:!0,flipBkg:Fa}));btn=mxUtils.button("+",mxUtils.bind(pa,function(wa){for(var ua=ya,La=0;null!=ua.nextSibling;)if(ua.nextSibling.getAttribute("data-pName")== -X)ua=ua.nextSibling,La++;else break;var Oa={type:la,parentRow:ya,index:La,isDeletable:!0,defVal:xa,countProperty:sa};La=ma(X,"",Oa,0==La%2,Fa);W(X,xa,Oa);ua.parentNode.insertBefore(La,ua.nextSibling);mxEvent.consume(wa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function ra(X,fa,la,xa,sa,ya,Fa){if(0<sa){var wa=Array(sa);fa=null!=fa?fa.split(","):[];for(var ua=0;ua<sa;ua++)wa[ua]=null!=fa[ua]?fa[ua]:null!=xa?xa:"";Ba.push({name:X,values:wa,type:la,defVal:xa, -parentRow:ya,flipBkg:Fa,size:sa})}return document.createElement("div")}function ta(X,fa,la){var xa=document.createElement("input");xa.type="checkbox";xa.checked="1"==fa;mxEvent.addListener(xa,"change",function(){W(X,xa.checked?"1":"0",la)});return xa}function ma(X,fa,la,xa,sa){var ya=la.dispName,Fa=la.type,wa=document.createElement("tr");wa.className="gePropRow"+(sa?"Dark":"")+(xa?"Alt":"")+" gePropNonHeaderRow";wa.setAttribute("data-pName",X);wa.setAttribute("data-pValue",fa);xa=!1;null!=la.index&& -(wa.setAttribute("data-index",la.index),ya=(null!=ya?ya:"")+"["+la.index+"]",xa=!0);var ua=document.createElement("td");ua.className="gePropRowCell";ya=mxResources.get(ya,null,ya);mxUtils.write(ua,ya);ua.setAttribute("title",ya);xa&&(ua.style.textAlign="right");wa.appendChild(ua);ua=document.createElement("td");ua.className="gePropRowCell";if("color"==Fa)ua.appendChild(ba(X,fa,la));else if("bool"==Fa||"boolean"==Fa)ua.appendChild(ta(X,fa,la));else if("enum"==Fa){var La=la.enumList;for(sa=0;sa<La.length;sa++)if(ya= -La[sa],ya.val==fa){mxUtils.write(ua,mxResources.get(ya.dispName,null,ya.dispName));break}mxEvent.addListener(ua,"click",mxUtils.bind(pa,function(){var Oa=document.createElement("select");T(ua,Oa);for(var Ca=0;Ca<La.length;Ca++){var Ma=La[Ca],Ga=document.createElement("option");Ga.value=mxUtils.htmlEntities(Ma.val);mxUtils.write(Ga,mxResources.get(Ma.dispName,null,Ma.dispName));Oa.appendChild(Ga)}Oa.value=fa;q.appendChild(Oa);mxEvent.addListener(Oa,"change",function(){var Ya=mxUtils.htmlEntities(Oa.value); -W(X,Ya,la)});Oa.focus();mxEvent.addListener(Oa,"blur",function(){q.removeChild(Oa)})}))}else"dynamicArr"==Fa?ua.appendChild(ha(X,fa,la.subType,la.subDefVal,la.countProperty,wa,sa)):"staticArr"==Fa?ua.appendChild(ra(X,fa,la.subType,la.subDefVal,la.size,wa,sa)):"readOnly"==Fa?(sa=document.createElement("input"),sa.setAttribute("readonly",""),sa.value=fa,sa.style.width="96px",sa.style.borderWidth="0px",ua.appendChild(sa)):(ua.innerHTML=mxUtils.htmlEntities(decodeURIComponent(fa)),mxEvent.addListener(ua, -"click",mxUtils.bind(pa,function(){function Oa(){var Ma=Ca.value;Ma=0==Ma.length&&"string"!=Fa?0:Ma;la.allowAuto&&(null!=Ma.trim&&"auto"==Ma.trim().toLowerCase()?(Ma="auto",Fa="string"):(Ma=parseFloat(Ma),Ma=isNaN(Ma)?0:Ma));null!=la.min&&Ma<la.min?Ma=la.min:null!=la.max&&Ma>la.max&&(Ma=la.max);Ma=encodeURIComponent(("int"==Fa?parseInt(Ma):Ma)+"");W(X,Ma,la)}var Ca=document.createElement("input");T(ua,Ca,!0);Ca.value=decodeURIComponent(fa);Ca.className="gePropEditor";"int"!=Fa&&"float"!=Fa||la.allowAuto|| -(Ca.type="number",Ca.step="int"==Fa?"1":"any",null!=la.min&&(Ca.min=parseFloat(la.min)),null!=la.max&&(Ca.max=parseFloat(la.max)));q.appendChild(Ca);mxEvent.addListener(Ca,"keypress",function(Ma){13==Ma.keyCode&&Oa()});Ca.focus();mxEvent.addListener(Ca,"blur",function(){Oa()})})));la.isDeletable&&(sa=mxUtils.button("-",mxUtils.bind(pa,function(Oa){W(X,"",la,la.index);mxEvent.consume(Oa)})),sa.style.height="16px",sa.style.width="25px",sa.style.float="right",sa.className="geColorBtn",ua.appendChild(sa)); -wa.appendChild(ua);return wa}var pa=this,za=this.editorUi.editor.graph,Ba=[];q.style.position="relative";q.style.padding="0";var Ia=document.createElement("table");Ia.className="geProperties";Ia.style.whiteSpace="nowrap";Ia.style.width="100%";var Aa=document.createElement("tr");Aa.className="gePropHeader";var Ka=document.createElement("th");Ka.className="gePropHeaderCell";var Da=document.createElement("img");Da.src=Sidebar.prototype.expandedImage;Da.style.verticalAlign="middle";Ka.appendChild(Da); -mxUtils.write(Ka,mxResources.get("property"));Aa.style.cursor="pointer";var Ra=function(){var X=Ia.querySelectorAll(".gePropNonHeaderRow");if(pa.editorUi.propertiesCollapsed){Da.src=Sidebar.prototype.collapsedImage;var fa="none";for(var la=q.childNodes.length-1;0<=la;la--)try{var xa=q.childNodes[la],sa=xa.nodeName.toUpperCase();"INPUT"!=sa&&"SELECT"!=sa||q.removeChild(xa)}catch(ya){}}else Da.src=Sidebar.prototype.expandedImage,fa="";for(la=0;la<X.length;la++)X[la].style.display=fa};mxEvent.addListener(Aa, -"click",function(){pa.editorUi.propertiesCollapsed=!pa.editorUi.propertiesCollapsed;Ra()});Aa.appendChild(Ka);Ka=document.createElement("th");Ka.className="gePropHeaderCell";Ka.innerHTML=mxResources.get("value");Aa.appendChild(Ka);Ia.appendChild(Aa);var Qa=!1,Ta=!1;Aa=null;1==R.vertices.length&&0==R.edges.length?Aa=R.vertices[0].id:0==R.vertices.length&&1==R.edges.length&&(Aa=R.edges[0].id);null!=Aa&&Ia.appendChild(ma("id",mxUtils.htmlEntities(Aa),{dispName:"ID",type:"readOnly"},!0,!1));for(var Za in F)if(Aa= -F[Za],"function"!=typeof Aa.isVisible||Aa.isVisible(R,this)){var Pa=null!=R.style[Za]?mxUtils.htmlEntities(R.style[Za]+""):null!=Aa.getDefaultValue?Aa.getDefaultValue(R,this):Aa.defVal;if("separator"==Aa.type)Ta=!Ta;else{if("staticArr"==Aa.type)Aa.size=parseInt(R.style[Aa.sizeProperty]||F[Aa.sizeProperty].defVal)||0;else if(null!=Aa.dependentProps){var y=Aa.dependentProps,M=[],N=[];for(Ka=0;Ka<y.length;Ka++){var S=R.style[y[Ka]];N.push(F[y[Ka]].subDefVal);M.push(null!=S?S.split(","):[])}Aa.dependentPropsDefVal= -N;Aa.dependentPropsVals=M}Ia.appendChild(ma(Za,Pa,Aa,Qa,Ta));Qa=!Qa}}for(Ka=0;Ka<Ba.length;Ka++)for(Aa=Ba[Ka],F=Aa.parentRow,R=0;R<Aa.values.length;R++)Za=ma(Aa.name,Aa.values[R],{type:Aa.type,parentRow:Aa.parentRow,isDeletable:Aa.isDeletable,index:R,defVal:Aa.defVal,countProperty:Aa.countProperty,size:Aa.size},0==R%2,Aa.flipBkg),F.parentNode.insertBefore(Za,F.nextSibling),F=Za;q.appendChild(Ia);Ra();return q};StyleFormatPanel.prototype.addStyles=function(q){function F(Aa){mxEvent.addListener(Aa, -"mouseenter",function(){Aa.style.opacity="1"});mxEvent.addListener(Aa,"mouseleave",function(){Aa.style.opacity="0.5"})}var R=this.editorUi,W=R.editor.graph,T=document.createElement("div");T.style.whiteSpace="nowrap";T.style.paddingLeft="24px";T.style.paddingRight="20px";q.style.paddingLeft="16px";q.style.paddingBottom="6px";q.style.position="relative";q.appendChild(T);var ba="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "), -ha=document.createElement("div");ha.style.whiteSpace="nowrap";ha.style.position="relative";ha.style.textAlign="center";ha.style.width="210px";for(var ra=[],ta=0;ta<this.defaultColorSchemes.length;ta++){var ma=document.createElement("div");ma.style.display="inline-block";ma.style.width="6px";ma.style.height="6px";ma.style.marginLeft="4px";ma.style.marginRight="3px";ma.style.borderRadius="3px";ma.style.cursor="pointer";ma.style.background="transparent";ma.style.border="1px solid #b5b6b7";mxUtils.bind(this, -function(Aa){mxEvent.addListener(ma,"click",mxUtils.bind(this,function(){pa(Aa)}))})(ta);ra.push(ma);ha.appendChild(ma)}var pa=mxUtils.bind(this,function(Aa){null!=ra[Aa]&&(null!=this.format.currentScheme&&null!=ra[this.format.currentScheme]&&(ra[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=Aa,za(this.defaultColorSchemes[this.format.currentScheme]),ra[this.format.currentScheme].style.background="#84d7ff")}),za=mxUtils.bind(this,function(Aa){var Ka=mxUtils.bind(this, -function(Ra){var Qa=mxUtils.button("",mxUtils.bind(this,function(Pa){W.getModel().beginUpdate();try{for(var y=R.getSelectionState().cells,M=0;M<y.length;M++){for(var N=W.getModel().getStyle(y[M]),S=0;S<ba.length;S++)N=mxUtils.removeStylename(N,ba[S]);var X=W.getModel().isVertex(y[M])?W.defaultVertexStyle:W.defaultEdgeStyle;null!=Ra?(mxEvent.isShiftDown(Pa)||(N=""==Ra.fill?mxUtils.setStyle(N,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(N,mxConstants.STYLE_FILLCOLOR,Ra.fill||mxUtils.getValue(X, -mxConstants.STYLE_FILLCOLOR,null)),N=mxUtils.setStyle(N,mxConstants.STYLE_GRADIENTCOLOR,Ra.gradient||mxUtils.getValue(X,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(Pa)||mxClient.IS_MAC&&mxEvent.isMetaDown(Pa)||!W.getModel().isVertex(y[M])||(N=mxUtils.setStyle(N,mxConstants.STYLE_FONTCOLOR,Ra.font||mxUtils.getValue(X,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(Pa)||(N=""==Ra.stroke?mxUtils.setStyle(N,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(N,mxConstants.STYLE_STROKECOLOR, -Ra.stroke||mxUtils.getValue(X,mxConstants.STYLE_STROKECOLOR,null)))):(N=mxUtils.setStyle(N,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(X,mxConstants.STYLE_FILLCOLOR,"#ffffff")),N=mxUtils.setStyle(N,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(X,mxConstants.STYLE_STROKECOLOR,"#000000")),N=mxUtils.setStyle(N,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(X,mxConstants.STYLE_GRADIENTCOLOR,null)),W.getModel().isVertex(y[M])&&(N=mxUtils.setStyle(N,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(X,mxConstants.STYLE_FONTCOLOR, -null))));W.getModel().setStyle(y[M],N)}}finally{W.getModel().endUpdate()}}));Qa.className="geStyleButton";Qa.style.width="36px";Qa.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Qa.style.margin="0px 6px 6px 0px";if(null!=Ra){var Ta="1"==urlParams.sketch?"2px solid":"1px solid";null!=Ra.border&&(Ta=Ra.border);null!=Ra.gradient?mxClient.IS_IE&&10>document.documentMode?Qa.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Ra.fill+"', EndColorStr='"+Ra.gradient+ -"', GradientType=0)":Qa.style.backgroundImage="linear-gradient("+Ra.fill+" 0px,"+Ra.gradient+" 100%)":Ra.fill==mxConstants.NONE?Qa.style.background="url('"+Dialog.prototype.noColorImage+"')":Qa.style.backgroundColor=""==Ra.fill?mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Ra.fill||mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Qa.style.border=Ra.stroke==mxConstants.NONE? -Ta+" transparent":""==Ra.stroke?Ta+" "+mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Ta+" "+(Ra.stroke||mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Ra.title&&Qa.setAttribute("title",Ra.title)}else{Ta=mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Za=mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR, -"#000000");Qa.style.backgroundColor=Ta;Qa.style.border="1px solid "+Za}Qa.style.borderRadius="0";T.appendChild(Qa)});T.innerText="";for(var Da=0;Da<Aa.length;Da++)0<Da&&0==mxUtils.mod(Da,4)&&mxUtils.br(T),Ka(Aa[Da])});null==this.format.currentScheme?pa(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):pa(this.format.currentScheme);ta=10>=this.defaultColorSchemes.length?28:8;var Ba=document.createElement("div");Ba.style.cssText="position:absolute;left:10px;top:8px;bottom:"+ta+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);"; -mxEvent.addListener(Ba,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Ia=document.createElement("div");Ia.style.cssText="position:absolute;left:202px;top:8px;bottom:"+ta+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);"; -1<this.defaultColorSchemes.length&&(q.appendChild(Ba),q.appendChild(Ia));mxEvent.addListener(Ia,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));F(Ba);F(Ia);za(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&q.appendChild(ha);return q};StyleFormatPanel.prototype.addEditOps=function(q){var F=this.editorUi.getSelectionState(),R=this.editorUi.editor.graph,W=null;1==F.cells.length&&(W=mxUtils.button(mxResources.get("editStyle"), -mxUtils.bind(this,function(T){this.editorUi.actions.get("editStyle").funct()})),W.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),W.style.width="210px",W.style.marginBottom="2px",q.appendChild(W));R=1==F.cells.length?R.view.getState(F.cells[0]):null;null!=R&&null!=R.shape&&null!=R.shape.stencil?(F=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(T){this.editorUi.actions.get("editShape").funct()})),F.setAttribute("title", -mxResources.get("editShape")),F.style.marginBottom="2px",null==W?F.style.width="210px":(W.style.width="104px",F.style.width="104px",F.style.marginLeft="2px"),q.appendChild(F)):F.image&&0<F.cells.length&&(F=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(T){this.editorUi.actions.get("image").funct()})),F.setAttribute("title",mxResources.get("editImage")),F.style.marginBottom="2px",null==W?F.style.width="210px":(W.style.width="104px",F.style.width="104px",F.style.marginLeft="2px"), -q.appendChild(F));return q}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(q){return q.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(q){return Graph.isGoogleFontUrl(q)};Graph.createFontElement=function(q, -F){var R=Graph.fontMapping[F];null==R&&Graph.isCssFontUrl(F)?(q=document.createElement("link"),q.setAttribute("rel","stylesheet"),q.setAttribute("type","text/css"),q.setAttribute("charset","UTF-8"),q.setAttribute("href",F)):(null==R&&(R='@font-face {\nfont-family: "'+q+'";\nsrc: url("'+F+'");\n}'),q=document.createElement("style"),mxUtils.write(q,R));return q};Graph.addFont=function(q,F,R){if(null!=q&&0<q.length&&null!=F&&0<F.length){var W=q.toLowerCase();if("helvetica"!=W&&"arial"!=q&&"sans-serif"!= -W){var T=Graph.customFontElements[W];null!=T&&T.url!=F&&(T.elt.parentNode.removeChild(T.elt),T=null);null==T?(T=F,"http:"==F.substring(0,5)&&(T=PROXY_URL+"?url="+encodeURIComponent(F)),T={name:q,url:F,elt:Graph.createFontElement(q,T)},Graph.customFontElements[W]=T,Graph.recentCustomFonts[W]=T,F=document.getElementsByTagName("head")[0],null!=R&&("link"==T.elt.nodeName.toLowerCase()?(T.elt.onload=R,T.elt.onerror=R):R()),null!=F&&F.appendChild(T.elt)):null!=R&&R()}else null!=R&&R()}else null!=R&&R(); -return q};Graph.getFontUrl=function(q,F){q=Graph.customFontElements[q.toLowerCase()];null!=q&&(F=q.url);return F};Graph.processFontAttributes=function(q){q=q.getElementsByTagName("*");for(var F=0;F<q.length;F++){var R=q[F].getAttribute("data-font-src");if(null!=R){var W="FONT"==q[F].nodeName?q[F].getAttribute("face"):q[F].style.fontFamily;null!=W&&Graph.addFont(W,R)}}};Graph.processFontStyle=function(q){if(null!=q){var F=mxUtils.getValue(q,"fontSource",null);if(null!=F){var R=mxUtils.getValue(q,mxConstants.STYLE_FONTFAMILY, -null);null!=R&&Graph.addFont(R,decodeURIComponent(F))}}return q};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!= -urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var H=Graph.prototype.init;Graph.prototype.init=function(){function q(T){F=T}H.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var F=null;mxEvent.addListener(this.container,"mouseenter",q);mxEvent.addListener(this.container,"mousemove",q);mxEvent.addListener(this.container,"mouseleave",function(T){F=null});this.isMouseInsertPoint=function(){return null!=F};var R=this.getInsertPoint; -this.getInsertPoint=function(){return null!=F?this.getPointForEvent(F):R.apply(this,arguments)};var W=this.layoutManager.getLayout;this.layoutManager.getLayout=function(T){var ba=this.graph.getCellStyle(T);if(null!=ba&&"rack"==ba.childLayout){var ha=new mxStackLayout(this.graph,!1);ha.gridSize=null!=ba.rackUnitSize?parseFloat(ba.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;ha.marginLeft=ba.marginLeft||0;ha.marginRight=ba.marginRight||0;ha.marginTop=ba.marginTop|| -0;ha.marginBottom=ba.marginBottom||0;ha.allowGaps=ba.allowGaps||0;ha.horizontal="1"==mxUtils.getValue(ba,"horizontalRack","0");ha.resizeParent=!1;ha.fill=!0;return ha}return W.apply(this,arguments)};this.updateGlobalUrlVariables()};var J=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(q,F){return Graph.processFontStyle(J.apply(this,arguments))};var D=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(q,F,R,W,T,ba,ha,ra,ta,ma, -pa){D.apply(this,arguments);Graph.processFontAttributes(pa)};var G=mxText.prototype.redraw;mxText.prototype.redraw=function(){G.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(q,F,R){function W(){for(var Aa=ha.getSelectionCells(),Ka=[],Da=0;Da<Aa.length;Da++)ha.isCellVisible(Aa[Da])&&Ka.push(Aa[Da]);ha.setSelectionCells(Ka)}function T(Aa){ha.setHiddenTags(Aa?[]:ra.slice());W();ha.refresh()}function ba(Aa, -Ka){ma.innerText="";if(0<Aa.length){var Da=document.createElement("table");Da.setAttribute("cellpadding","2");Da.style.boxSizing="border-box";Da.style.tableLayout="fixed";Da.style.width="100%";var Ra=document.createElement("tbody");if(null!=Aa&&0<Aa.length)for(var Qa=0;Qa<Aa.length;Qa++)(function(Ta){var Za=0>mxUtils.indexOf(ha.hiddenTags,Ta),Pa=document.createElement("tr"),y=document.createElement("td");y.style.align="center";y.style.width="16px";var M=document.createElement("img");M.setAttribute("src", -Za?Editor.visibleImage:Editor.hiddenImage);M.setAttribute("title",mxResources.get(Za?"hideIt":"show",[Ta]));mxUtils.setOpacity(M,Za?75:25);M.style.verticalAlign="middle";M.style.cursor="pointer";M.style.width="16px";if(F||Editor.isDarkMode())M.style.filter="invert(100%)";y.appendChild(M);mxEvent.addListener(M,"click",function(S){mxEvent.isShiftDown(S)?T(0<=mxUtils.indexOf(ha.hiddenTags,Ta)):(ha.toggleHiddenTag(Ta),W(),ha.refresh());mxEvent.consume(S)});Pa.appendChild(y);y=document.createElement("td"); -y.style.overflow="hidden";y.style.whiteSpace="nowrap";y.style.textOverflow="ellipsis";y.style.verticalAlign="middle";y.style.cursor="pointer";y.setAttribute("title",Ta);a=document.createElement("a");mxUtils.write(a,Ta);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Za?100:40);y.appendChild(a);mxEvent.addListener(y,"click",function(S){if(mxEvent.isShiftDown(S)){T(!0);var X=ha.getCellsForTags([Ta],null,null,!0);ha.isEnabled()?ha.setSelectionCells(X):ha.highlightCells(X)}else if(Za&& -0<ha.hiddenTags.length)T(!0);else{X=ra.slice();var fa=mxUtils.indexOf(X,Ta);X.splice(fa,1);ha.setHiddenTags(X);W();ha.refresh()}mxEvent.consume(S)});Pa.appendChild(y);if(ha.isEnabled()){y=document.createElement("td");y.style.verticalAlign="middle";y.style.textAlign="center";y.style.width="18px";if(null==Ka){y.style.align="center";y.style.width="16px";M=document.createElement("img");M.setAttribute("src",Editor.crossImage);M.setAttribute("title",mxResources.get("removeIt",[Ta]));mxUtils.setOpacity(M, -Za?75:25);M.style.verticalAlign="middle";M.style.cursor="pointer";M.style.width="16px";if(F||Editor.isDarkMode())M.style.filter="invert(100%)";mxEvent.addListener(M,"click",function(S){var X=mxUtils.indexOf(ra,Ta);0<=X&&ra.splice(X,1);ha.removeTagsForCells(ha.model.getDescendants(ha.model.getRoot()),[Ta]);ha.refresh();mxEvent.consume(S)});y.appendChild(M)}else{var N=document.createElement("input");N.setAttribute("type","checkbox");N.style.margin="0px";N.defaultChecked=null!=Ka&&0<=mxUtils.indexOf(Ka, -Ta);N.checked=N.defaultChecked;N.style.background="transparent";N.setAttribute("title",mxResources.get(N.defaultChecked?"removeIt":"add",[Ta]));mxEvent.addListener(N,"change",function(S){N.checked?ha.addTagsForCells(ha.getSelectionCells(),[Ta]):ha.removeTagsForCells(ha.getSelectionCells(),[Ta]);mxEvent.consume(S)});y.appendChild(N)}Pa.appendChild(y)}Ra.appendChild(Pa)})(Aa[Qa]);Da.appendChild(Ra);ma.appendChild(Da)}}var ha=this,ra=ha.hiddenTags.slice(),ta=document.createElement("div");ta.style.userSelect= -"none";ta.style.overflow="hidden";ta.style.padding="10px";ta.style.height="100%";var ma=document.createElement("div");ma.style.boxSizing="border-box";ma.style.borderRadius="4px";ma.style.userSelect="none";ma.style.overflow="auto";ma.style.position="absolute";ma.style.left="10px";ma.style.right="10px";ma.style.top="10px";ma.style.border=ha.isEnabled()?"1px solid #808080":"none";ma.style.bottom=ha.isEnabled()?"48px":"10px";ta.appendChild(ma);var pa=mxUtils.button(mxResources.get("reset"),function(Aa){ha.setHiddenTags([]); -mxEvent.isShiftDown(Aa)||(ra=ha.hiddenTags.slice());W();ha.refresh()});pa.setAttribute("title",mxResources.get("reset"));pa.className="geBtn";pa.style.margin="0 4px 0 0";var za=mxUtils.button(mxResources.get("add"),function(){null!=R&&R(ra,function(Aa){ra=Aa;Ba()})});za.setAttribute("title",mxResources.get("add"));za.className="geBtn";za.style.margin="0";ha.addListener(mxEvent.ROOT,function(){ra=ha.hiddenTags.slice()});var Ba=mxUtils.bind(this,function(Aa,Ka){if(q()){Aa=ha.getAllTags();for(Ka=0;Ka< -Aa.length;Ka++)0>mxUtils.indexOf(ra,Aa[Ka])&&ra.push(Aa[Ka]);ra.sort();ha.isSelectionEmpty()?ba(ra):ba(ra,ha.getCommonTagsForCells(ha.getSelectionCells()))}});ha.selectionModel.addListener(mxEvent.CHANGE,Ba);ha.model.addListener(mxEvent.CHANGE,Ba);ha.addListener(mxEvent.REFRESH,Ba);var Ia=document.createElement("div");Ia.style.boxSizing="border-box";Ia.style.whiteSpace="nowrap";Ia.style.position="absolute";Ia.style.overflow="hidden";Ia.style.bottom="0px";Ia.style.height="42px";Ia.style.right="10px"; -Ia.style.left="10px";ha.isEnabled()&&(Ia.appendChild(pa),Ia.appendChild(za),ta.appendChild(Ia));return{div:ta,refresh:Ba}};Graph.prototype.getCustomFonts=function(){var q=this.extFonts;q=null!=q?q.slice():[];for(var F in Graph.customFontElements){var R=Graph.customFontElements[F];q.push({name:R.name,url:R.url})}return q};Graph.prototype.setFont=function(q,F){Graph.addFont(q,F);document.execCommand("fontname",!1,q);if(null!=F){var R=this.cellEditor.textarea.getElementsByTagName("font");F=Graph.getFontUrl(q, -F);for(var W=0;W<R.length;W++)R[W].getAttribute("face")==q&&R[W].getAttribute("data-font-src")!=F&&R[W].setAttribute("data-font-src",F)}};var V=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return V.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var q=JSON.parse(decodeURIComponent(urlParams.vars)); -if(null!=q)for(var F in q)this.globalVars[F]=q[F]}catch(R){null!=window.console&&console.log("Error in vars URL parameter: "+R)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var U=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(q){var F=U.apply(this,arguments);null==F&&null!=this.globalVars&&(F=this.globalVars[q]);return F};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var q= -this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(q.ownerDocument)).decode(q)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var Y=Graph.prototype.getSvg;Graph.prototype.getSvg=function(q,F,R,W,T,ba,ha,ra,ta,ma,pa,za,Ba,Ia){var Aa=null,Ka=null,Da=null;za||null==this.themes||"darkTheme"!=this.defaultThemeName||(Aa=this.stylesheet,Ka=this.shapeForegroundColor,Da=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName? -"#000000":Editor.lightColor,this.shapeBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Ra=Y.apply(this,arguments),Qa=this.getCustomFonts();if(pa&&0<Qa.length){var Ta=Ra.ownerDocument,Za=null!=Ta.createElementNS?Ta.createElementNS(mxConstants.NS_SVG,"style"):Ta.createElement("style");null!=Ta.setAttributeNS?Za.setAttributeNS("type","text/css"):Za.setAttribute("type","text/css");for(var Pa="",y="",M=0;M<Qa.length;M++){var N= -Qa[M].name,S=Qa[M].url;Graph.isCssFontUrl(S)?Pa+="@import url("+S+");\n":y+='@font-face {\nfont-family: "'+N+'";\nsrc: url("'+S+'");\n}\n'}Za.appendChild(Ta.createTextNode(Pa+y));Ra.getElementsByTagName("defs")[0].appendChild(Za)}this.mathEnabled&&(document.body.appendChild(Ra),Editor.MathJaxRender(Ra),Ra.parentNode.removeChild(Ra));null!=Aa&&(this.shapeBackgroundColor=Da,this.shapeForegroundColor=Ka,this.stylesheet=Aa,this.refresh());return Ra};var O=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy= -function(q){O.apply(this,arguments);null!=q.secondLabel&&(q.secondLabel.destroy(),q.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(q){return[q.shape,q.text,q.secondLabel,q.control]};var qa=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){qa.apply(this,arguments);this.enumerationState=0};var oa=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(q){null!=q.shape&&this.redrawEnumerationState(q);return oa.apply(this, -arguments)};mxGraphView.prototype.createEnumerationValue=function(q){q=decodeURIComponent(mxUtils.getValue(q.style,"enumerateValue",""));""==q&&(q=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(q)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(q){var F="1"==mxUtils.getValue(q.style,"enumerate",0);F&&null==q.secondLabel?(q.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM), -q.secondLabel.size=12,q.secondLabel.state=q,q.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(q,q.secondLabel)):F||null==q.secondLabel||(q.secondLabel.destroy(),q.secondLabel=null);F=q.secondLabel;if(null!=F){var R=q.view.scale,W=this.createEnumerationValue(q);q=this.graph.model.isVertex(q.cell)?new mxRectangle(q.x+q.width-4*R,q.y+4*R,0,0):mxRectangle.fromPoint(q.view.getPoint(q));F.bounds.equals(q)&&F.value==W&&F.scale==R||(F.bounds=q,F.value=W,F.scale= -R,F.redraw())}};var aa=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){aa.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var q=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName|| -this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",q.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,q.ownerSVGElement))}};var da=Graph.prototype.refresh;Graph.prototype.refresh=function(){da.apply(this, +{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(q,E,Q){if(null!=E){var Y=function(ba){if(null!=ba)if(Q)for(var ea=0;ea<ba.length;ea++)E[ba[ea].name]=ba[ea];else for(var ra in E){var ta=!1;for(ea=0;ea<ba.length;ea++)if(ba[ea].name==ra&&ba[ea].type==E[ra].type){ta=!0;break}ta|| +delete E[ra]}},R=this.editorUi.editor.graph.view.getState(q);null!=R&&null!=R.shape&&(R.shape.commonCustomPropAdded||(R.shape.commonCustomPropAdded=!0,R.shape.customProperties=R.shape.customProperties||[],R.cell.vertex?Array.prototype.push.apply(R.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(R.shape.customProperties,Editor.commonEdgeProperties)),Y(R.shape.customProperties));q=q.getAttribute("customProperties");if(null!=q)try{Y(JSON.parse(q))}catch(ba){}}};var y= +StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var q=this.editorUi.getSelectionState();"image"!=q.style.shape&&!q.containsLabel&&0<q.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));y.apply(this,arguments);if(Editor.enableCustomProperties){for(var E={},Q=q.vertices,Y=q.edges,R=0;R<Q.length;R++)this.findCommonProperties(Q[R],E,0==R);for(R=0;R<Y.length;R++)this.findCommonProperties(Y[R],E,0==Q.length&&0==R);null!=Object.getOwnPropertyNames&&0< +Object.getOwnPropertyNames(E).length&&this.container.appendChild(this.addProperties(this.createPanel(),E,q))}};var u=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(q){this.addActions(q,["copyStyle","pasteStyle"]);return u.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(q,E,Q){function Y(U,ha,ma,wa){xa.getModel().beginUpdate();try{var sa=[],ya=[];if(null!=ma.index){for(var Ha=[],Qa=ma.parentRow.nextSibling;Qa&& +Qa.getAttribute("data-pName")==U;)Ha.push(Qa.getAttribute("data-pValue")),Qa=Qa.nextSibling;ma.index<Ha.length?null!=wa?Ha.splice(wa,1):Ha[ma.index]=ha:Ha.push(ha);null!=ma.size&&Ha.length>ma.size&&(Ha=Ha.slice(0,ma.size));ha=Ha.join(",");null!=ma.countProperty&&(xa.setCellStyles(ma.countProperty,Ha.length,xa.getSelectionCells()),sa.push(ma.countProperty),ya.push(Ha.length))}xa.setCellStyles(U,ha,xa.getSelectionCells());sa.push(U);ya.push(ha);if(null!=ma.dependentProps)for(U=0;U<ma.dependentProps.length;U++){var ua= +ma.dependentPropsDefVal[U],za=ma.dependentPropsVals[U];if(za.length>ha)za=za.slice(0,ha);else for(var Fa=za.length;Fa<ha;Fa++)za.push(ua);za=za.join(",");xa.setCellStyles(ma.dependentProps[U],za,xa.getSelectionCells());sa.push(ma.dependentProps[U]);ya.push(za)}if("function"==typeof ma.onChange)ma.onChange(xa,ha);pa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",sa,"values",ya,"cells",xa.getSelectionCells()))}finally{xa.getModel().endUpdate()}}function R(U,ha,ma){var wa=mxUtils.getOffset(q, +!0),sa=mxUtils.getOffset(U,!0);ha.style.position="absolute";ha.style.left=sa.x-wa.x+"px";ha.style.top=sa.y-wa.y+"px";ha.style.width=U.offsetWidth+"px";ha.style.height=U.offsetHeight-(ma?4:0)+"px";ha.style.zIndex=5}function ba(U,ha,ma){var wa=document.createElement("div");wa.style.width="32px";wa.style.height="4px";wa.style.margin="2px";wa.style.border="1px solid black";wa.style.background=ha&&"none"!=ha?ha:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(pa,function(sa){this.editorUi.pickColor(ha, +function(ya){wa.style.background="none"==ya?"url('"+Dialog.prototype.noColorImage+"')":ya;Y(U,ya,ma)});mxEvent.consume(sa)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(wa);return btn}function ea(U,ha,ma,wa,sa,ya,Ha){null!=ha&&(ha=ha.split(","),Ca.push({name:U,values:ha,type:ma,defVal:wa,countProperty:sa,parentRow:ya,isDeletable:!0,flipBkg:Ha}));btn=mxUtils.button("+",mxUtils.bind(pa,function(Qa){for(var ua=ya,za=0;null!=ua.nextSibling;)if(ua.nextSibling.getAttribute("data-pName")== +U)ua=ua.nextSibling,za++;else break;var Fa={type:ma,parentRow:ya,index:za,isDeletable:!0,defVal:wa,countProperty:sa};za=la(U,"",Fa,0==za%2,Ha);Y(U,wa,Fa);ua.parentNode.insertBefore(za,ua.nextSibling);mxEvent.consume(Qa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function ra(U,ha,ma,wa,sa,ya,Ha){if(0<sa){var Qa=Array(sa);ha=null!=ha?ha.split(","):[];for(var ua=0;ua<sa;ua++)Qa[ua]=null!=ha[ua]?ha[ua]:null!=wa?wa:"";Ca.push({name:U,values:Qa,type:ma,defVal:wa, +parentRow:ya,flipBkg:Ha,size:sa})}return document.createElement("div")}function ta(U,ha,ma){var wa=document.createElement("input");wa.type="checkbox";wa.checked="1"==ha;mxEvent.addListener(wa,"change",function(){Y(U,wa.checked?"1":"0",ma)});return wa}function la(U,ha,ma,wa,sa){var ya=ma.dispName,Ha=ma.type,Qa=document.createElement("tr");Qa.className="gePropRow"+(sa?"Dark":"")+(wa?"Alt":"")+" gePropNonHeaderRow";Qa.setAttribute("data-pName",U);Qa.setAttribute("data-pValue",ha);wa=!1;null!=ma.index&& +(Qa.setAttribute("data-index",ma.index),ya=(null!=ya?ya:"")+"["+ma.index+"]",wa=!0);var ua=document.createElement("td");ua.className="gePropRowCell";ya=mxResources.get(ya,null,ya);mxUtils.write(ua,ya);ua.setAttribute("title",ya);wa&&(ua.style.textAlign="right");Qa.appendChild(ua);ua=document.createElement("td");ua.className="gePropRowCell";if("color"==Ha)ua.appendChild(ba(U,ha,ma));else if("bool"==Ha||"boolean"==Ha)ua.appendChild(ta(U,ha,ma));else if("enum"==Ha){var za=ma.enumList;for(sa=0;sa<za.length;sa++)if(ya= +za[sa],ya.val==ha){mxUtils.write(ua,mxResources.get(ya.dispName,null,ya.dispName));break}mxEvent.addListener(ua,"click",mxUtils.bind(pa,function(){var Fa=document.createElement("select");R(ua,Fa);for(var Ba=0;Ba<za.length;Ba++){var Ea=za[Ba],Oa=document.createElement("option");Oa.value=mxUtils.htmlEntities(Ea.val);mxUtils.write(Oa,mxResources.get(Ea.dispName,null,Ea.dispName));Fa.appendChild(Oa)}Fa.value=ha;q.appendChild(Fa);mxEvent.addListener(Fa,"change",function(){var Pa=mxUtils.htmlEntities(Fa.value); +Y(U,Pa,ma)});Fa.focus();mxEvent.addListener(Fa,"blur",function(){q.removeChild(Fa)})}))}else"dynamicArr"==Ha?ua.appendChild(ea(U,ha,ma.subType,ma.subDefVal,ma.countProperty,Qa,sa)):"staticArr"==Ha?ua.appendChild(ra(U,ha,ma.subType,ma.subDefVal,ma.size,Qa,sa)):"readOnly"==Ha?(sa=document.createElement("input"),sa.setAttribute("readonly",""),sa.value=ha,sa.style.width="96px",sa.style.borderWidth="0px",ua.appendChild(sa)):(ua.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ha)),mxEvent.addListener(ua, +"click",mxUtils.bind(pa,function(){function Fa(){var Ea=Ba.value;Ea=0==Ea.length&&"string"!=Ha?0:Ea;ma.allowAuto&&(null!=Ea.trim&&"auto"==Ea.trim().toLowerCase()?(Ea="auto",Ha="string"):(Ea=parseFloat(Ea),Ea=isNaN(Ea)?0:Ea));null!=ma.min&&Ea<ma.min?Ea=ma.min:null!=ma.max&&Ea>ma.max&&(Ea=ma.max);Ea=encodeURIComponent(("int"==Ha?parseInt(Ea):Ea)+"");Y(U,Ea,ma)}var Ba=document.createElement("input");R(ua,Ba,!0);Ba.value=decodeURIComponent(ha);Ba.className="gePropEditor";"int"!=Ha&&"float"!=Ha||ma.allowAuto|| +(Ba.type="number",Ba.step="int"==Ha?"1":"any",null!=ma.min&&(Ba.min=parseFloat(ma.min)),null!=ma.max&&(Ba.max=parseFloat(ma.max)));q.appendChild(Ba);mxEvent.addListener(Ba,"keypress",function(Ea){13==Ea.keyCode&&Fa()});Ba.focus();mxEvent.addListener(Ba,"blur",function(){Fa()})})));ma.isDeletable&&(sa=mxUtils.button("-",mxUtils.bind(pa,function(Fa){Y(U,"",ma,ma.index);mxEvent.consume(Fa)})),sa.style.height="16px",sa.style.width="25px",sa.style.float="right",sa.className="geColorBtn",ua.appendChild(sa)); +Qa.appendChild(ua);return Qa}var pa=this,xa=this.editorUi.editor.graph,Ca=[];q.style.position="relative";q.style.padding="0";var Ia=document.createElement("table");Ia.className="geProperties";Ia.style.whiteSpace="nowrap";Ia.style.width="100%";var Aa=document.createElement("tr");Aa.className="gePropHeader";var La=document.createElement("th");La.className="gePropHeaderCell";var Da=document.createElement("img");Da.src=Sidebar.prototype.expandedImage;Da.style.verticalAlign="middle";La.appendChild(Da); +mxUtils.write(La,mxResources.get("property"));Aa.style.cursor="pointer";var Sa=function(){var U=Ia.querySelectorAll(".gePropNonHeaderRow");if(pa.editorUi.propertiesCollapsed){Da.src=Sidebar.prototype.collapsedImage;var ha="none";for(var ma=q.childNodes.length-1;0<=ma;ma--)try{var wa=q.childNodes[ma],sa=wa.nodeName.toUpperCase();"INPUT"!=sa&&"SELECT"!=sa||q.removeChild(wa)}catch(ya){}}else Da.src=Sidebar.prototype.expandedImage,ha="";for(ma=0;ma<U.length;ma++)U[ma].style.display=ha};mxEvent.addListener(Aa, +"click",function(){pa.editorUi.propertiesCollapsed=!pa.editorUi.propertiesCollapsed;Sa()});Aa.appendChild(La);La=document.createElement("th");La.className="gePropHeaderCell";La.innerHTML=mxResources.get("value");Aa.appendChild(La);Ia.appendChild(Aa);var Ra=!1,Ta=!1;Aa=null;1==Q.vertices.length&&0==Q.edges.length?Aa=Q.vertices[0].id:0==Q.vertices.length&&1==Q.edges.length&&(Aa=Q.edges[0].id);null!=Aa&&Ia.appendChild(la("id",mxUtils.htmlEntities(Aa),{dispName:"ID",type:"readOnly"},!0,!1));for(var Za in E)if(Aa= +E[Za],"function"!=typeof Aa.isVisible||Aa.isVisible(Q,this)){var Na=null!=Q.style[Za]?mxUtils.htmlEntities(Q.style[Za]+""):null!=Aa.getDefaultValue?Aa.getDefaultValue(Q,this):Aa.defVal;if("separator"==Aa.type)Ta=!Ta;else{if("staticArr"==Aa.type)Aa.size=parseInt(Q.style[Aa.sizeProperty]||E[Aa.sizeProperty].defVal)||0;else if(null!=Aa.dependentProps){var z=Aa.dependentProps,L=[],O=[];for(La=0;La<z.length;La++){var V=Q.style[z[La]];O.push(E[z[La]].subDefVal);L.push(null!=V?V.split(","):[])}Aa.dependentPropsDefVal= +O;Aa.dependentPropsVals=L}Ia.appendChild(la(Za,Na,Aa,Ra,Ta));Ra=!Ra}}for(La=0;La<Ca.length;La++)for(Aa=Ca[La],E=Aa.parentRow,Q=0;Q<Aa.values.length;Q++)Za=la(Aa.name,Aa.values[Q],{type:Aa.type,parentRow:Aa.parentRow,isDeletable:Aa.isDeletable,index:Q,defVal:Aa.defVal,countProperty:Aa.countProperty,size:Aa.size},0==Q%2,Aa.flipBkg),E.parentNode.insertBefore(Za,E.nextSibling),E=Za;q.appendChild(Ia);Sa();return q};StyleFormatPanel.prototype.addStyles=function(q){function E(Aa){mxEvent.addListener(Aa, +"mouseenter",function(){Aa.style.opacity="1"});mxEvent.addListener(Aa,"mouseleave",function(){Aa.style.opacity="0.5"})}var Q=this.editorUi,Y=Q.editor.graph,R=document.createElement("div");R.style.whiteSpace="nowrap";R.style.paddingLeft="24px";R.style.paddingRight="20px";q.style.paddingLeft="16px";q.style.paddingBottom="6px";q.style.position="relative";q.appendChild(R);var ba="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "), +ea=document.createElement("div");ea.style.whiteSpace="nowrap";ea.style.position="relative";ea.style.textAlign="center";ea.style.width="210px";for(var ra=[],ta=0;ta<this.defaultColorSchemes.length;ta++){var la=document.createElement("div");la.style.display="inline-block";la.style.width="6px";la.style.height="6px";la.style.marginLeft="4px";la.style.marginRight="3px";la.style.borderRadius="3px";la.style.cursor="pointer";la.style.background="transparent";la.style.border="1px solid #b5b6b7";mxUtils.bind(this, +function(Aa){mxEvent.addListener(la,"click",mxUtils.bind(this,function(){pa(Aa)}))})(ta);ra.push(la);ea.appendChild(la)}var pa=mxUtils.bind(this,function(Aa){null!=ra[Aa]&&(null!=this.format.currentScheme&&null!=ra[this.format.currentScheme]&&(ra[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=Aa,xa(this.defaultColorSchemes[this.format.currentScheme]),ra[this.format.currentScheme].style.background="#84d7ff")}),xa=mxUtils.bind(this,function(Aa){var La=mxUtils.bind(this, +function(Sa){var Ra=mxUtils.button("",mxUtils.bind(this,function(Na){Y.getModel().beginUpdate();try{for(var z=Q.getSelectionState().cells,L=0;L<z.length;L++){for(var O=Y.getModel().getStyle(z[L]),V=0;V<ba.length;V++)O=mxUtils.removeStylename(O,ba[V]);var U=Y.getModel().isVertex(z[L])?Y.defaultVertexStyle:Y.defaultEdgeStyle;null!=Sa?(mxEvent.isShiftDown(Na)||(O=""==Sa.fill?mxUtils.setStyle(O,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(O,mxConstants.STYLE_FILLCOLOR,Sa.fill||mxUtils.getValue(U, +mxConstants.STYLE_FILLCOLOR,null)),O=mxUtils.setStyle(O,mxConstants.STYLE_GRADIENTCOLOR,Sa.gradient||mxUtils.getValue(U,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(Na)||mxClient.IS_MAC&&mxEvent.isMetaDown(Na)||!Y.getModel().isVertex(z[L])||(O=mxUtils.setStyle(O,mxConstants.STYLE_FONTCOLOR,Sa.font||mxUtils.getValue(U,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(Na)||(O=""==Sa.stroke?mxUtils.setStyle(O,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(O,mxConstants.STYLE_STROKECOLOR, +Sa.stroke||mxUtils.getValue(U,mxConstants.STYLE_STROKECOLOR,null)))):(O=mxUtils.setStyle(O,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(U,mxConstants.STYLE_FILLCOLOR,"#ffffff")),O=mxUtils.setStyle(O,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(U,mxConstants.STYLE_STROKECOLOR,"#000000")),O=mxUtils.setStyle(O,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(U,mxConstants.STYLE_GRADIENTCOLOR,null)),Y.getModel().isVertex(z[L])&&(O=mxUtils.setStyle(O,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(U,mxConstants.STYLE_FONTCOLOR, +null))));Y.getModel().setStyle(z[L],O)}}finally{Y.getModel().endUpdate()}}));Ra.className="geStyleButton";Ra.style.width="36px";Ra.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ra.style.margin="0px 6px 6px 0px";if(null!=Sa){var Ta="1"==urlParams.sketch?"2px solid":"1px solid";null!=Sa.border&&(Ta=Sa.border);null!=Sa.gradient?mxClient.IS_IE&&10>document.documentMode?Ra.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Sa.fill+"', EndColorStr='"+Sa.gradient+ +"', GradientType=0)":Ra.style.backgroundImage="linear-gradient("+Sa.fill+" 0px,"+Sa.gradient+" 100%)":Sa.fill==mxConstants.NONE?Ra.style.background="url('"+Dialog.prototype.noColorImage+"')":Ra.style.backgroundColor=""==Sa.fill?mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Sa.fill||mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Ra.style.border=Sa.stroke==mxConstants.NONE? +Ta+" transparent":""==Sa.stroke?Ta+" "+mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Ta+" "+(Sa.stroke||mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Sa.title&&Ra.setAttribute("title",Sa.title)}else{Ta=mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Za=mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR, +"#000000");Ra.style.backgroundColor=Ta;Ra.style.border="1px solid "+Za}Ra.style.borderRadius="0";R.appendChild(Ra)});R.innerText="";for(var Da=0;Da<Aa.length;Da++)0<Da&&0==mxUtils.mod(Da,4)&&mxUtils.br(R),La(Aa[Da])});null==this.format.currentScheme?pa(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):pa(this.format.currentScheme);ta=10>=this.defaultColorSchemes.length?28:8;var Ca=document.createElement("div");Ca.style.cssText="position:absolute;left:10px;top:8px;bottom:"+ta+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);"; +mxEvent.addListener(Ca,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Ia=document.createElement("div");Ia.style.cssText="position:absolute;left:202px;top:8px;bottom:"+ta+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);"; +1<this.defaultColorSchemes.length&&(q.appendChild(Ca),q.appendChild(Ia));mxEvent.addListener(Ia,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));E(Ca);E(Ia);xa(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&q.appendChild(ea);return q};StyleFormatPanel.prototype.addEditOps=function(q){var E=this.editorUi.getSelectionState(),Q=this.editorUi.editor.graph,Y=null;1==E.cells.length&&(Y=mxUtils.button(mxResources.get("editStyle"), +mxUtils.bind(this,function(R){this.editorUi.actions.get("editStyle").funct()})),Y.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),Y.style.width="210px",Y.style.marginBottom="2px",q.appendChild(Y));Q=1==E.cells.length?Q.view.getState(E.cells[0]):null;null!=Q&&null!=Q.shape&&null!=Q.shape.stencil?(E=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(R){this.editorUi.actions.get("editShape").funct()})),E.setAttribute("title", +mxResources.get("editShape")),E.style.marginBottom="2px",null==Y?E.style.width="210px":(Y.style.width="104px",E.style.width="104px",E.style.marginLeft="2px"),q.appendChild(E)):E.image&&0<E.cells.length&&(E=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(R){this.editorUi.actions.get("image").funct()})),E.setAttribute("title",mxResources.get("editImage")),E.style.marginBottom="2px",null==Y?E.style.width="210px":(Y.style.width="104px",E.style.width="104px",E.style.marginLeft="2px"), +q.appendChild(E));return q}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(q){return q.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(q){return Graph.isGoogleFontUrl(q)};Graph.createFontElement=function(q, +E){var Q=Graph.fontMapping[E];null==Q&&Graph.isCssFontUrl(E)?(q=document.createElement("link"),q.setAttribute("rel","stylesheet"),q.setAttribute("type","text/css"),q.setAttribute("charset","UTF-8"),q.setAttribute("href",E)):(null==Q&&(Q='@font-face {\nfont-family: "'+q+'";\nsrc: url("'+E+'");\n}'),q=document.createElement("style"),mxUtils.write(q,Q));return q};Graph.addFont=function(q,E,Q){if(null!=q&&0<q.length&&null!=E&&0<E.length){var Y=q.toLowerCase();if("helvetica"!=Y&&"arial"!=q&&"sans-serif"!= +Y){var R=Graph.customFontElements[Y];null!=R&&R.url!=E&&(R.elt.parentNode.removeChild(R.elt),R=null);null==R?(R=E,"http:"==E.substring(0,5)&&(R=PROXY_URL+"?url="+encodeURIComponent(E)),R={name:q,url:E,elt:Graph.createFontElement(q,R)},Graph.customFontElements[Y]=R,Graph.recentCustomFonts[Y]=R,E=document.getElementsByTagName("head")[0],null!=Q&&("link"==R.elt.nodeName.toLowerCase()?(R.elt.onload=Q,R.elt.onerror=Q):Q()),null!=E&&E.appendChild(R.elt)):null!=Q&&Q()}else null!=Q&&Q()}else null!=Q&&Q(); +return q};Graph.getFontUrl=function(q,E){q=Graph.customFontElements[q.toLowerCase()];null!=q&&(E=q.url);return E};Graph.processFontAttributes=function(q){q=q.getElementsByTagName("*");for(var E=0;E<q.length;E++){var Q=q[E].getAttribute("data-font-src");if(null!=Q){var Y="FONT"==q[E].nodeName?q[E].getAttribute("face"):q[E].style.fontFamily;null!=Y&&Graph.addFont(Y,Q)}}};Graph.processFontStyle=function(q){if(null!=q){var E=mxUtils.getValue(q,"fontSource",null);if(null!=E){var Q=mxUtils.getValue(q,mxConstants.STYLE_FONTFAMILY, +null);null!=Q&&Graph.addFont(Q,decodeURIComponent(E))}}return q};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!= +urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var H=Graph.prototype.init;Graph.prototype.init=function(){function q(R){E=R}H.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var E=null;mxEvent.addListener(this.container,"mouseenter",q);mxEvent.addListener(this.container,"mousemove",q);mxEvent.addListener(this.container,"mouseleave",function(R){E=null});this.isMouseInsertPoint=function(){return null!=E};var Q=this.getInsertPoint; +this.getInsertPoint=function(){return null!=E?this.getPointForEvent(E):Q.apply(this,arguments)};var Y=this.layoutManager.getLayout;this.layoutManager.getLayout=function(R){var ba=this.graph.getCellStyle(R);if(null!=ba&&"rack"==ba.childLayout){var ea=new mxStackLayout(this.graph,!1);ea.gridSize=null!=ba.rackUnitSize?parseFloat(ba.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;ea.marginLeft=ba.marginLeft||0;ea.marginRight=ba.marginRight||0;ea.marginTop=ba.marginTop|| +0;ea.marginBottom=ba.marginBottom||0;ea.allowGaps=ba.allowGaps||0;ea.horizontal="1"==mxUtils.getValue(ba,"horizontalRack","0");ea.resizeParent=!1;ea.fill=!0;return ea}return Y.apply(this,arguments)};this.updateGlobalUrlVariables()};var J=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(q,E){return Graph.processFontStyle(J.apply(this,arguments))};var D=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(q,E,Q,Y,R,ba,ea,ra,ta,la, +pa){D.apply(this,arguments);Graph.processFontAttributes(pa)};var G=mxText.prototype.redraw;mxText.prototype.redraw=function(){G.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(q,E,Q){function Y(){for(var Aa=ea.getSelectionCells(),La=[],Da=0;Da<Aa.length;Da++)ea.isCellVisible(Aa[Da])&&La.push(Aa[Da]);ea.setSelectionCells(La)}function R(Aa){ea.setHiddenTags(Aa?[]:ra.slice());Y();ea.refresh()}function ba(Aa, +La){la.innerText="";if(0<Aa.length){var Da=document.createElement("table");Da.setAttribute("cellpadding","2");Da.style.boxSizing="border-box";Da.style.tableLayout="fixed";Da.style.width="100%";var Sa=document.createElement("tbody");if(null!=Aa&&0<Aa.length)for(var Ra=0;Ra<Aa.length;Ra++)(function(Ta){var Za=0>mxUtils.indexOf(ea.hiddenTags,Ta),Na=document.createElement("tr"),z=document.createElement("td");z.style.align="center";z.style.width="16px";var L=document.createElement("img");L.setAttribute("src", +Za?Editor.visibleImage:Editor.hiddenImage);L.setAttribute("title",mxResources.get(Za?"hideIt":"show",[Ta]));mxUtils.setOpacity(L,Za?75:25);L.style.verticalAlign="middle";L.style.cursor="pointer";L.style.width="16px";if(E||Editor.isDarkMode())L.style.filter="invert(100%)";z.appendChild(L);mxEvent.addListener(L,"click",function(V){mxEvent.isShiftDown(V)?R(0<=mxUtils.indexOf(ea.hiddenTags,Ta)):(ea.toggleHiddenTag(Ta),Y(),ea.refresh());mxEvent.consume(V)});Na.appendChild(z);z=document.createElement("td"); +z.style.overflow="hidden";z.style.whiteSpace="nowrap";z.style.textOverflow="ellipsis";z.style.verticalAlign="middle";z.style.cursor="pointer";z.setAttribute("title",Ta);a=document.createElement("a");mxUtils.write(a,Ta);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Za?100:40);z.appendChild(a);mxEvent.addListener(z,"click",function(V){if(mxEvent.isShiftDown(V)){R(!0);var U=ea.getCellsForTags([Ta],null,null,!0);ea.isEnabled()?ea.setSelectionCells(U):ea.highlightCells(U)}else if(Za&& +0<ea.hiddenTags.length)R(!0);else{U=ra.slice();var ha=mxUtils.indexOf(U,Ta);U.splice(ha,1);ea.setHiddenTags(U);Y();ea.refresh()}mxEvent.consume(V)});Na.appendChild(z);if(ea.isEnabled()){z=document.createElement("td");z.style.verticalAlign="middle";z.style.textAlign="center";z.style.width="18px";if(null==La){z.style.align="center";z.style.width="16px";L=document.createElement("img");L.setAttribute("src",Editor.crossImage);L.setAttribute("title",mxResources.get("removeIt",[Ta]));mxUtils.setOpacity(L, +Za?75:25);L.style.verticalAlign="middle";L.style.cursor="pointer";L.style.width="16px";if(E||Editor.isDarkMode())L.style.filter="invert(100%)";mxEvent.addListener(L,"click",function(V){var U=mxUtils.indexOf(ra,Ta);0<=U&&ra.splice(U,1);ea.removeTagsForCells(ea.model.getDescendants(ea.model.getRoot()),[Ta]);ea.refresh();mxEvent.consume(V)});z.appendChild(L)}else{var O=document.createElement("input");O.setAttribute("type","checkbox");O.style.margin="0px";O.defaultChecked=null!=La&&0<=mxUtils.indexOf(La, +Ta);O.checked=O.defaultChecked;O.style.background="transparent";O.setAttribute("title",mxResources.get(O.defaultChecked?"removeIt":"add",[Ta]));mxEvent.addListener(O,"change",function(V){O.checked?ea.addTagsForCells(ea.getSelectionCells(),[Ta]):ea.removeTagsForCells(ea.getSelectionCells(),[Ta]);mxEvent.consume(V)});z.appendChild(O)}Na.appendChild(z)}Sa.appendChild(Na)})(Aa[Ra]);Da.appendChild(Sa);la.appendChild(Da)}}var ea=this,ra=ea.hiddenTags.slice(),ta=document.createElement("div");ta.style.userSelect= +"none";ta.style.overflow="hidden";ta.style.padding="10px";ta.style.height="100%";var la=document.createElement("div");la.style.boxSizing="border-box";la.style.borderRadius="4px";la.style.userSelect="none";la.style.overflow="auto";la.style.position="absolute";la.style.left="10px";la.style.right="10px";la.style.top="10px";la.style.border=ea.isEnabled()?"1px solid #808080":"none";la.style.bottom=ea.isEnabled()?"48px":"10px";ta.appendChild(la);var pa=mxUtils.button(mxResources.get("reset"),function(Aa){ea.setHiddenTags([]); +mxEvent.isShiftDown(Aa)||(ra=ea.hiddenTags.slice());Y();ea.refresh()});pa.setAttribute("title",mxResources.get("reset"));pa.className="geBtn";pa.style.margin="0 4px 0 0";var xa=mxUtils.button(mxResources.get("add"),function(){null!=Q&&Q(ra,function(Aa){ra=Aa;Ca()})});xa.setAttribute("title",mxResources.get("add"));xa.className="geBtn";xa.style.margin="0";ea.addListener(mxEvent.ROOT,function(){ra=ea.hiddenTags.slice()});var Ca=mxUtils.bind(this,function(Aa,La){if(q()){Aa=ea.getAllTags();for(La=0;La< +Aa.length;La++)0>mxUtils.indexOf(ra,Aa[La])&&ra.push(Aa[La]);ra.sort();ea.isSelectionEmpty()?ba(ra):ba(ra,ea.getCommonTagsForCells(ea.getSelectionCells()))}});ea.selectionModel.addListener(mxEvent.CHANGE,Ca);ea.model.addListener(mxEvent.CHANGE,Ca);ea.addListener(mxEvent.REFRESH,Ca);var Ia=document.createElement("div");Ia.style.boxSizing="border-box";Ia.style.whiteSpace="nowrap";Ia.style.position="absolute";Ia.style.overflow="hidden";Ia.style.bottom="0px";Ia.style.height="42px";Ia.style.right="10px"; +Ia.style.left="10px";ea.isEnabled()&&(Ia.appendChild(pa),Ia.appendChild(xa),ta.appendChild(Ia));return{div:ta,refresh:Ca}};Graph.prototype.getCustomFonts=function(){var q=this.extFonts;q=null!=q?q.slice():[];for(var E in Graph.customFontElements){var Q=Graph.customFontElements[E];q.push({name:Q.name,url:Q.url})}return q};Graph.prototype.setFont=function(q,E){Graph.addFont(q,E);document.execCommand("fontname",!1,q);if(null!=E){var Q=this.cellEditor.textarea.getElementsByTagName("font");E=Graph.getFontUrl(q, +E);for(var Y=0;Y<Q.length;Y++)Q[Y].getAttribute("face")==q&&Q[Y].getAttribute("data-font-src")!=E&&Q[Y].setAttribute("data-font-src",E)}};var W=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return W.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var q=JSON.parse(decodeURIComponent(urlParams.vars)); +if(null!=q)for(var E in q)this.globalVars[E]=q[E]}catch(Q){null!=window.console&&console.log("Error in vars URL parameter: "+Q)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var T=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(q){var E=T.apply(this,arguments);null==E&&null!=this.globalVars&&(E=this.globalVars[q]);return E};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var q= +this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(q.ownerDocument)).decode(q)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var Z=Graph.prototype.getSvg;Graph.prototype.getSvg=function(q,E,Q,Y,R,ba,ea,ra,ta,la,pa,xa,Ca,Ia){var Aa=null,La=null,Da=null;xa||null==this.themes||"darkTheme"!=this.defaultThemeName||(Aa=this.stylesheet,La=this.shapeForegroundColor,Da=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName? +"#000000":Editor.lightColor,this.shapeBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Sa=Z.apply(this,arguments),Ra=this.getCustomFonts();if(pa&&0<Ra.length){var Ta=Sa.ownerDocument,Za=null!=Ta.createElementNS?Ta.createElementNS(mxConstants.NS_SVG,"style"):Ta.createElement("style");null!=Ta.setAttributeNS?Za.setAttributeNS("type","text/css"):Za.setAttribute("type","text/css");for(var Na="",z="",L=0;L<Ra.length;L++){var O= +Ra[L].name,V=Ra[L].url;Graph.isCssFontUrl(V)?Na+="@import url("+V+");\n":z+='@font-face {\nfont-family: "'+O+'";\nsrc: url("'+V+'");\n}\n'}Za.appendChild(Ta.createTextNode(Na+z));Sa.getElementsByTagName("defs")[0].appendChild(Za)}this.mathEnabled&&(document.body.appendChild(Sa),Editor.MathJaxRender(Sa),Sa.parentNode.removeChild(Sa));null!=Aa&&(this.shapeBackgroundColor=Da,this.shapeForegroundColor=La,this.stylesheet=Aa,this.refresh());return Sa};var N=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy= +function(q){N.apply(this,arguments);null!=q.secondLabel&&(q.secondLabel.destroy(),q.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(q){return[q.shape,q.text,q.secondLabel,q.control]};var qa=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){qa.apply(this,arguments);this.enumerationState=0};var oa=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(q){null!=q.shape&&this.redrawEnumerationState(q);return oa.apply(this, +arguments)};mxGraphView.prototype.createEnumerationValue=function(q){q=decodeURIComponent(mxUtils.getValue(q.style,"enumerateValue",""));""==q&&(q=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(q)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(q){var E="1"==mxUtils.getValue(q.style,"enumerate",0);E&&null==q.secondLabel?(q.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM), +q.secondLabel.size=12,q.secondLabel.state=q,q.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(q,q.secondLabel)):E||null==q.secondLabel||(q.secondLabel.destroy(),q.secondLabel=null);E=q.secondLabel;if(null!=E){var Q=q.view.scale,Y=this.createEnumerationValue(q);q=this.graph.model.isVertex(q.cell)?new mxRectangle(q.x+q.width-4*Q,q.y+4*Q,0,0):mxRectangle.fromPoint(q.view.getPoint(q));E.bounds.equals(q)&&E.value==Y&&E.scale==Q||(E.bounds=q,E.value=Y,E.scale= +Q,E.redraw())}};var S=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){S.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var q=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName|| +this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",q.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,q.ownerSVGElement))}};var fa=Graph.prototype.refresh;Graph.prototype.refresh=function(){fa.apply(this, arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var ia=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){ia.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(q){"data:action/json,"==q.substring(0,17)&&(q=JSON.parse(q.substring(17)), -null!=q.actions&&this.executeCustomActions(q.actions))};Graph.prototype.executeCustomActions=function(q,F){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var R=!1,W=0,T=0,ba=mxUtils.bind(this,function(){R||(R=!0,this.model.beginUpdate())}),ha=mxUtils.bind(this, -function(){R&&(R=!1,this.model.endUpdate())}),ra=mxUtils.bind(this,function(){0<W&&W--;0==W&&ta()}),ta=mxUtils.bind(this,function(){if(T<q.length){var ma=this.stoppingCustomActions,pa=q[T++],za=[];if(null!=pa.open)if(ha(),this.isCustomLink(pa.open)){if(!this.customLinkClicked(pa.open))return}else this.openLink(pa.open);null==pa.wait||ma||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;ra()}),W++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction, -""!=pa.wait?parseInt(pa.wait):1E3),ha());null!=pa.opacity&&null!=pa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(pa.opacity,!0)),pa.opacity.value);null!=pa.fadeIn&&(W++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(pa.fadeIn,!0)),0,1,ra,ma?0:pa.fadeIn.delay));null!=pa.fadeOut&&(W++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(pa.fadeOut,!0)),1,0,ra,ma?0:pa.fadeOut.delay));null!=pa.wipeIn&&(za=za.concat(this.createWipeAnimations(this.getCellsForAction(pa.wipeIn, -!0),!0)));null!=pa.wipeOut&&(za=za.concat(this.createWipeAnimations(this.getCellsForAction(pa.wipeOut,!0),!1)));null!=pa.toggle&&(ba(),this.toggleCells(this.getCellsForAction(pa.toggle,!0)));if(null!=pa.show){ba();var Ba=this.getCellsForAction(pa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(Ba),1);this.setCellsVisible(Ba,!0)}null!=pa.hide&&(ba(),Ba=this.getCellsForAction(pa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(Ba),0),this.setCellsVisible(Ba,!1));null!=pa.toggleStyle&& -null!=pa.toggleStyle.key&&(ba(),this.toggleCellStyles(pa.toggleStyle.key,null!=pa.toggleStyle.defaultValue?pa.toggleStyle.defaultValue:"0",this.getCellsForAction(pa.toggleStyle,!0)));null!=pa.style&&null!=pa.style.key&&(ba(),this.setCellStyles(pa.style.key,pa.style.value,this.getCellsForAction(pa.style,!0)));Ba=[];null!=pa.select&&this.isEnabled()&&(Ba=this.getCellsForAction(pa.select),this.setSelectionCells(Ba));null!=pa.highlight&&(Ba=this.getCellsForAction(pa.highlight),this.highlightCells(Ba, -pa.highlight.color,pa.highlight.duration,pa.highlight.opacity));null!=pa.scroll&&(Ba=this.getCellsForAction(pa.scroll));null!=pa.viewbox&&this.fitWindow(pa.viewbox,pa.viewbox.border);0<Ba.length&&this.scrollCellToVisible(Ba[0]);if(null!=pa.tags){Ba=[];null!=pa.tags.hidden&&(Ba=Ba.concat(pa.tags.hidden));if(null!=pa.tags.visible)for(var Ia=this.getAllTags(),Aa=0;Aa<Ia.length;Aa++)0>mxUtils.indexOf(pa.tags.visible,Ia[Aa])&&0>mxUtils.indexOf(Ba,Ia[Aa])&&Ba.push(Ia[Aa]);this.setHiddenTags(Ba);this.refresh()}0< -za.length&&(W++,this.executeAnimations(za,ra,ma?1:pa.steps,ma?0:pa.delay));0==W?ta():ha()}else this.stoppingCustomActions=this.executingCustomActions=!1,ha(),null!=F&&F()});ta()}};Graph.prototype.doUpdateCustomLinksForCell=function(q,F){var R=this.getLinkForCell(F);null!=R&&"data:action/json,"==R.substring(0,17)&&this.setLinkForCell(F,this.updateCustomLink(q,R));if(this.isHtmlLabel(F)){var W=document.createElement("div");W.innerHTML=this.sanitizeHtml(this.getLabel(F));for(var T=W.getElementsByTagName("a"), -ba=!1,ha=0;ha<T.length;ha++)R=T[ha].getAttribute("href"),null!=R&&"data:action/json,"==R.substring(0,17)&&(T[ha].setAttribute("href",this.updateCustomLink(q,R)),ba=!0);ba&&this.labelChanged(F,W.innerHTML)}};Graph.prototype.updateCustomLink=function(q,F){if("data:action/json,"==F.substring(0,17))try{var R=JSON.parse(F.substring(17));null!=R.actions&&(this.updateCustomLinkActions(q,R.actions),F="data:action/json,"+JSON.stringify(R))}catch(W){}return F};Graph.prototype.updateCustomLinkActions=function(q, -F){for(var R=0;R<F.length;R++){var W=F[R],T;for(T in W)this.updateCustomLinkAction(q,W[T],"cells"),this.updateCustomLinkAction(q,W[T],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(q,F,R){if(null!=F&&null!=F[R]){for(var W=[],T=0;T<F[R].length;T++)if("*"==F[R][T])W.push(F[R][T]);else{var ba=q[F[R][T]];null!=ba?""!=ba&&W.push(ba):W.push(F[R][T])}F[R]=W}};Graph.prototype.getCellsForAction=function(q,F){F=this.getCellsById(q.cells).concat(this.getCellsForTags(q.tags,null,F));if(null!= -q.excludeCells){for(var R=[],W=0;W<F.length;W++)0>q.excludeCells.indexOf(F[W].id)&&R.push(F[W]);F=R}return F};Graph.prototype.getCellsById=function(q){var F=[];if(null!=q)for(var R=0;R<q.length;R++)if("*"==q[R]){var W=this.model.getRoot();F=F.concat(this.model.filterDescendants(function(ba){return ba!=W},W))}else{var T=this.model.getCell(q[R]);null!=T&&F.push(T)}return F};var L=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(q){return L.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(q))}; -Graph.prototype.setHiddenTags=function(q){this.hiddenTags=q;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(q){var F=mxUtils.indexOf(this.hiddenTags,q);0>F?this.hiddenTags.push(q):0<=F&&this.hiddenTags.splice(F,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(q){if(null==q||0==q.length||0==this.hiddenTags.length)return!1;q=q.split(" ");if(q.length>this.hiddenTags.length)return!1;for(var F=0;F<q.length;F++)if(0> -mxUtils.indexOf(this.hiddenTags,q[F]))return!1;return!0};Graph.prototype.getCellsForTags=function(q,F,R,W){var T=[];if(null!=q){F=null!=F?F:this.model.getDescendants(this.model.getRoot());for(var ba=0,ha={},ra=0;ra<q.length;ra++)0<q[ra].length&&(ha[q[ra]]=!0,ba++);for(ra=0;ra<F.length;ra++)if(R&&this.model.getParent(F[ra])==this.model.root||this.model.isVertex(F[ra])||this.model.isEdge(F[ra])){var ta=this.getTagsForCell(F[ra]),ma=!1;if(0<ta.length&&(ta=ta.split(" "),ta.length>=q.length)){for(var pa= -ma=0;pa<ta.length&&ma<ba;pa++)null!=ha[ta[pa]]&&ma++;ma=ma==ba}ma&&(1!=W||this.isCellVisible(F[ra]))&&T.push(F[ra])}}return T};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(q){for(var F=null,R=[],W=0;W<q.length;W++){var T=this.getTagsForCell(q[W]);R=[];if(0<T.length){T=T.split(" ");for(var ba={},ha=0;ha<T.length;ha++)if(null==F||null!=F[T[ha]])ba[T[ha]]=!0,R.push(T[ha]);F=ba}else return[]}return R}; -Graph.prototype.getTagsForCells=function(q){for(var F=[],R={},W=0;W<q.length;W++){var T=this.getTagsForCell(q[W]);if(0<T.length){T=T.split(" ");for(var ba=0;ba<T.length;ba++)null==R[T[ba]]&&(R[T[ba]]=!0,F.push(T[ba]))}}return F};Graph.prototype.getTagsForCell=function(q){return this.getAttributeForCell(q,"tags","")};Graph.prototype.addTagsForCells=function(q,F){if(0<q.length&&0<F.length){this.model.beginUpdate();try{for(var R=0;R<q.length;R++){for(var W=this.getTagsForCell(q[R]),T=W.split(" "),ba= -!1,ha=0;ha<F.length;ha++){var ra=mxUtils.trim(F[ha]);""!=ra&&0>mxUtils.indexOf(T,ra)&&(W=0<W.length?W+" "+ra:ra,ba=!0)}ba&&this.setAttributeForCell(q[R],"tags",W)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(q,F){if(0<q.length&&0<F.length){this.model.beginUpdate();try{for(var R=0;R<q.length;R++){var W=this.getTagsForCell(q[R]);if(0<W.length){for(var T=W.split(" "),ba=!1,ha=0;ha<F.length;ha++){var ra=mxUtils.indexOf(T,F[ha]);0<=ra&&(T.splice(ra,1),ba=!0)}ba&&this.setAttributeForCell(q[R], -"tags",T.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(q){this.model.beginUpdate();try{for(var F=0;F<q.length;F++)this.model.setVisible(q[F],!this.model.isVisible(q[F]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(q,F){this.model.beginUpdate();try{for(var R=0;R<q.length;R++)this.model.setVisible(q[R],F)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(q,F,R,W){for(var T=0;T<q.length;T++)this.highlightCell(q[T], -F,R,W)};Graph.prototype.highlightCell=function(q,F,R,W,T){F=null!=F?F:mxConstants.DEFAULT_VALID_COLOR;R=null!=R?R:1E3;q=this.view.getState(q);var ba=null;null!=q&&(T=null!=T?T:4,T=Math.max(T+1,mxUtils.getValue(q.style,mxConstants.STYLE_STROKEWIDTH,1)+T),ba=new mxCellHighlight(this,F,T,!1),null!=W&&(ba.opacity=W),ba.highlight(q),window.setTimeout(function(){null!=ba.shape&&(mxUtils.setPrefixedStyle(ba.shape.node.style,"transition","all 1200ms ease-in-out"),ba.shape.node.style.opacity=0);window.setTimeout(function(){ba.destroy()}, -1200)},R));return ba};Graph.prototype.addSvgShadow=function(q,F,R,W){R=null!=R?R:!1;W=null!=W?W:!0;var T=q.ownerDocument,ba=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"filter"):T.createElement("filter");ba.setAttribute("id",this.shadowId);var ha=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):T.createElement("feGaussianBlur");ha.setAttribute("in","SourceAlpha");ha.setAttribute("stdDeviation",this.svgShadowBlur);ha.setAttribute("result","blur");ba.appendChild(ha); -ha=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"feOffset"):T.createElement("feOffset");ha.setAttribute("in","blur");ha.setAttribute("dx",this.svgShadowSize);ha.setAttribute("dy",this.svgShadowSize);ha.setAttribute("result","offsetBlur");ba.appendChild(ha);ha=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"feFlood"):T.createElement("feFlood");ha.setAttribute("flood-color",this.svgShadowColor);ha.setAttribute("flood-opacity",this.svgShadowOpacity);ha.setAttribute("result", -"offsetColor");ba.appendChild(ha);ha=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"feComposite"):T.createElement("feComposite");ha.setAttribute("in","offsetColor");ha.setAttribute("in2","offsetBlur");ha.setAttribute("operator","in");ha.setAttribute("result","offsetBlur");ba.appendChild(ha);ha=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"feBlend"):T.createElement("feBlend");ha.setAttribute("in","SourceGraphic");ha.setAttribute("in2","offsetBlur");ba.appendChild(ha); -ha=q.getElementsByTagName("defs");0==ha.length?(T=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"defs"):T.createElement("defs"),null!=q.firstChild?q.insertBefore(T,q.firstChild):q.appendChild(T)):T=ha[0];T.appendChild(ba);R||(F=null!=F?F:q.getElementsByTagName("g")[0],null!=F&&(F.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(q.getAttribute("width")))&&W&&(q.setAttribute("width",parseInt(q.getAttribute("width"))+6),q.setAttribute("height",parseInt(q.getAttribute("height"))+ -6),F=q.getAttribute("viewBox"),null!=F&&0<F.length&&(F=F.split(" "),3<F.length&&(w=parseFloat(F[2])+6,h=parseFloat(F[3])+6,q.setAttribute("viewBox",F[0]+" "+F[1]+" "+w+" "+h))))));return ba};Graph.prototype.setShadowVisible=function(q,F){mxClient.IS_SVG&&!mxClient.IS_SF&&(F=null!=F?F:!0,(this.shadowVisible=q)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),F&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer= -function(){if(null==this.defaultParent){var q=this.model.getChildCount(this.model.root),F=0;do var R=this.model.getChildAt(this.model.root,F);while(F++<q&&"1"==mxUtils.getValue(this.getCellStyle(R),"locked","0"));null!=R&&this.setDefaultParent(R)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn= +null!=q.actions&&this.executeCustomActions(q.actions))};Graph.prototype.executeCustomActions=function(q,E){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var Q=!1,Y=0,R=0,ba=mxUtils.bind(this,function(){Q||(Q=!0,this.model.beginUpdate())}),ea=mxUtils.bind(this, +function(){Q&&(Q=!1,this.model.endUpdate())}),ra=mxUtils.bind(this,function(){0<Y&&Y--;0==Y&&ta()}),ta=mxUtils.bind(this,function(){if(R<q.length){var la=this.stoppingCustomActions,pa=q[R++],xa=[];if(null!=pa.open)if(ea(),this.isCustomLink(pa.open)){if(!this.customLinkClicked(pa.open))return}else this.openLink(pa.open);null==pa.wait||la||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;ra()}),Y++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction, +""!=pa.wait?parseInt(pa.wait):1E3),ea());null!=pa.opacity&&null!=pa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(pa.opacity,!0)),pa.opacity.value);null!=pa.fadeIn&&(Y++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(pa.fadeIn,!0)),0,1,ra,la?0:pa.fadeIn.delay));null!=pa.fadeOut&&(Y++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(pa.fadeOut,!0)),1,0,ra,la?0:pa.fadeOut.delay));null!=pa.wipeIn&&(xa=xa.concat(this.createWipeAnimations(this.getCellsForAction(pa.wipeIn, +!0),!0)));null!=pa.wipeOut&&(xa=xa.concat(this.createWipeAnimations(this.getCellsForAction(pa.wipeOut,!0),!1)));null!=pa.toggle&&(ba(),this.toggleCells(this.getCellsForAction(pa.toggle,!0)));if(null!=pa.show){ba();var Ca=this.getCellsForAction(pa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(Ca),1);this.setCellsVisible(Ca,!0)}null!=pa.hide&&(ba(),Ca=this.getCellsForAction(pa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(Ca),0),this.setCellsVisible(Ca,!1));null!=pa.toggleStyle&& +null!=pa.toggleStyle.key&&(ba(),this.toggleCellStyles(pa.toggleStyle.key,null!=pa.toggleStyle.defaultValue?pa.toggleStyle.defaultValue:"0",this.getCellsForAction(pa.toggleStyle,!0)));null!=pa.style&&null!=pa.style.key&&(ba(),this.setCellStyles(pa.style.key,pa.style.value,this.getCellsForAction(pa.style,!0)));Ca=[];null!=pa.select&&this.isEnabled()&&(Ca=this.getCellsForAction(pa.select),this.setSelectionCells(Ca));null!=pa.highlight&&(Ca=this.getCellsForAction(pa.highlight),this.highlightCells(Ca, +pa.highlight.color,pa.highlight.duration,pa.highlight.opacity));null!=pa.scroll&&(Ca=this.getCellsForAction(pa.scroll));null!=pa.viewbox&&this.fitWindow(pa.viewbox,pa.viewbox.border);0<Ca.length&&this.scrollCellToVisible(Ca[0]);if(null!=pa.tags){Ca=[];null!=pa.tags.hidden&&(Ca=Ca.concat(pa.tags.hidden));if(null!=pa.tags.visible)for(var Ia=this.getAllTags(),Aa=0;Aa<Ia.length;Aa++)0>mxUtils.indexOf(pa.tags.visible,Ia[Aa])&&0>mxUtils.indexOf(Ca,Ia[Aa])&&Ca.push(Ia[Aa]);this.setHiddenTags(Ca);this.refresh()}0< +xa.length&&(Y++,this.executeAnimations(xa,ra,la?1:pa.steps,la?0:pa.delay));0==Y?ta():ea()}else this.stoppingCustomActions=this.executingCustomActions=!1,ea(),null!=E&&E()});ta()}};Graph.prototype.doUpdateCustomLinksForCell=function(q,E){var Q=this.getLinkForCell(E);null!=Q&&"data:action/json,"==Q.substring(0,17)&&this.setLinkForCell(E,this.updateCustomLink(q,Q));if(this.isHtmlLabel(E)){var Y=document.createElement("div");Y.innerHTML=this.sanitizeHtml(this.getLabel(E));for(var R=Y.getElementsByTagName("a"), +ba=!1,ea=0;ea<R.length;ea++)Q=R[ea].getAttribute("href"),null!=Q&&"data:action/json,"==Q.substring(0,17)&&(R[ea].setAttribute("href",this.updateCustomLink(q,Q)),ba=!0);ba&&this.labelChanged(E,Y.innerHTML)}};Graph.prototype.updateCustomLink=function(q,E){if("data:action/json,"==E.substring(0,17))try{var Q=JSON.parse(E.substring(17));null!=Q.actions&&(this.updateCustomLinkActions(q,Q.actions),E="data:action/json,"+JSON.stringify(Q))}catch(Y){}return E};Graph.prototype.updateCustomLinkActions=function(q, +E){for(var Q=0;Q<E.length;Q++){var Y=E[Q],R;for(R in Y)this.updateCustomLinkAction(q,Y[R],"cells"),this.updateCustomLinkAction(q,Y[R],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(q,E,Q){if(null!=E&&null!=E[Q]){for(var Y=[],R=0;R<E[Q].length;R++)if("*"==E[Q][R])Y.push(E[Q][R]);else{var ba=q[E[Q][R]];null!=ba?""!=ba&&Y.push(ba):Y.push(E[Q][R])}E[Q]=Y}};Graph.prototype.getCellsForAction=function(q,E){E=this.getCellsById(q.cells).concat(this.getCellsForTags(q.tags,null,E));if(null!= +q.excludeCells){for(var Q=[],Y=0;Y<E.length;Y++)0>q.excludeCells.indexOf(E[Y].id)&&Q.push(E[Y]);E=Q}return E};Graph.prototype.getCellsById=function(q){var E=[];if(null!=q)for(var Q=0;Q<q.length;Q++)if("*"==q[Q]){var Y=this.model.getRoot();E=E.concat(this.model.filterDescendants(function(ba){return ba!=Y},Y))}else{var R=this.model.getCell(q[Q]);null!=R&&E.push(R)}return E};var M=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(q){return M.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(q))}; +Graph.prototype.setHiddenTags=function(q){this.hiddenTags=q;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(q){var E=mxUtils.indexOf(this.hiddenTags,q);0>E?this.hiddenTags.push(q):0<=E&&this.hiddenTags.splice(E,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(q){if(null==q||0==q.length||0==this.hiddenTags.length)return!1;q=q.split(" ");if(q.length>this.hiddenTags.length)return!1;for(var E=0;E<q.length;E++)if(0> +mxUtils.indexOf(this.hiddenTags,q[E]))return!1;return!0};Graph.prototype.getCellsForTags=function(q,E,Q,Y){var R=[];if(null!=q){E=null!=E?E:this.model.getDescendants(this.model.getRoot());for(var ba=0,ea={},ra=0;ra<q.length;ra++)0<q[ra].length&&(ea[q[ra]]=!0,ba++);for(ra=0;ra<E.length;ra++)if(Q&&this.model.getParent(E[ra])==this.model.root||this.model.isVertex(E[ra])||this.model.isEdge(E[ra])){var ta=this.getTagsForCell(E[ra]),la=!1;if(0<ta.length&&(ta=ta.split(" "),ta.length>=q.length)){for(var pa= +la=0;pa<ta.length&&la<ba;pa++)null!=ea[ta[pa]]&&la++;la=la==ba}la&&(1!=Y||this.isCellVisible(E[ra]))&&R.push(E[ra])}}return R};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(q){for(var E=null,Q=[],Y=0;Y<q.length;Y++){var R=this.getTagsForCell(q[Y]);Q=[];if(0<R.length){R=R.split(" ");for(var ba={},ea=0;ea<R.length;ea++)if(null==E||null!=E[R[ea]])ba[R[ea]]=!0,Q.push(R[ea]);E=ba}else return[]}return Q}; +Graph.prototype.getTagsForCells=function(q){for(var E=[],Q={},Y=0;Y<q.length;Y++){var R=this.getTagsForCell(q[Y]);if(0<R.length){R=R.split(" ");for(var ba=0;ba<R.length;ba++)null==Q[R[ba]]&&(Q[R[ba]]=!0,E.push(R[ba]))}}return E};Graph.prototype.getTagsForCell=function(q){return this.getAttributeForCell(q,"tags","")};Graph.prototype.addTagsForCells=function(q,E){if(0<q.length&&0<E.length){this.model.beginUpdate();try{for(var Q=0;Q<q.length;Q++){for(var Y=this.getTagsForCell(q[Q]),R=Y.split(" "),ba= +!1,ea=0;ea<E.length;ea++){var ra=mxUtils.trim(E[ea]);""!=ra&&0>mxUtils.indexOf(R,ra)&&(Y=0<Y.length?Y+" "+ra:ra,ba=!0)}ba&&this.setAttributeForCell(q[Q],"tags",Y)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(q,E){if(0<q.length&&0<E.length){this.model.beginUpdate();try{for(var Q=0;Q<q.length;Q++){var Y=this.getTagsForCell(q[Q]);if(0<Y.length){for(var R=Y.split(" "),ba=!1,ea=0;ea<E.length;ea++){var ra=mxUtils.indexOf(R,E[ea]);0<=ra&&(R.splice(ra,1),ba=!0)}ba&&this.setAttributeForCell(q[Q], +"tags",R.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(q){this.model.beginUpdate();try{for(var E=0;E<q.length;E++)this.model.setVisible(q[E],!this.model.isVisible(q[E]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(q,E){this.model.beginUpdate();try{for(var Q=0;Q<q.length;Q++)this.model.setVisible(q[Q],E)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(q,E,Q,Y){for(var R=0;R<q.length;R++)this.highlightCell(q[R], +E,Q,Y)};Graph.prototype.highlightCell=function(q,E,Q,Y,R){E=null!=E?E:mxConstants.DEFAULT_VALID_COLOR;Q=null!=Q?Q:1E3;q=this.view.getState(q);var ba=null;null!=q&&(R=null!=R?R:4,R=Math.max(R+1,mxUtils.getValue(q.style,mxConstants.STYLE_STROKEWIDTH,1)+R),ba=new mxCellHighlight(this,E,R,!1),null!=Y&&(ba.opacity=Y),ba.highlight(q),window.setTimeout(function(){null!=ba.shape&&(mxUtils.setPrefixedStyle(ba.shape.node.style,"transition","all 1200ms ease-in-out"),ba.shape.node.style.opacity=0);window.setTimeout(function(){ba.destroy()}, +1200)},Q));return ba};Graph.prototype.addSvgShadow=function(q,E,Q,Y){Q=null!=Q?Q:!1;Y=null!=Y?Y:!0;var R=q.ownerDocument,ba=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"filter"):R.createElement("filter");ba.setAttribute("id",this.shadowId);var ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):R.createElement("feGaussianBlur");ea.setAttribute("in","SourceAlpha");ea.setAttribute("stdDeviation",this.svgShadowBlur);ea.setAttribute("result","blur");ba.appendChild(ea); +ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feOffset"):R.createElement("feOffset");ea.setAttribute("in","blur");ea.setAttribute("dx",this.svgShadowSize);ea.setAttribute("dy",this.svgShadowSize);ea.setAttribute("result","offsetBlur");ba.appendChild(ea);ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feFlood"):R.createElement("feFlood");ea.setAttribute("flood-color",this.svgShadowColor);ea.setAttribute("flood-opacity",this.svgShadowOpacity);ea.setAttribute("result", +"offsetColor");ba.appendChild(ea);ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feComposite"):R.createElement("feComposite");ea.setAttribute("in","offsetColor");ea.setAttribute("in2","offsetBlur");ea.setAttribute("operator","in");ea.setAttribute("result","offsetBlur");ba.appendChild(ea);ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feBlend"):R.createElement("feBlend");ea.setAttribute("in","SourceGraphic");ea.setAttribute("in2","offsetBlur");ba.appendChild(ea); +ea=q.getElementsByTagName("defs");0==ea.length?(R=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"defs"):R.createElement("defs"),null!=q.firstChild?q.insertBefore(R,q.firstChild):q.appendChild(R)):R=ea[0];R.appendChild(ba);Q||(E=null!=E?E:q.getElementsByTagName("g")[0],null!=E&&(E.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(q.getAttribute("width")))&&Y&&(q.setAttribute("width",parseInt(q.getAttribute("width"))+6),q.setAttribute("height",parseInt(q.getAttribute("height"))+ +6),E=q.getAttribute("viewBox"),null!=E&&0<E.length&&(E=E.split(" "),3<E.length&&(w=parseFloat(E[2])+6,h=parseFloat(E[3])+6,q.setAttribute("viewBox",E[0]+" "+E[1]+" "+w+" "+h))))));return ba};Graph.prototype.setShadowVisible=function(q,E){mxClient.IS_SVG&&!mxClient.IS_SF&&(E=null!=E?E:!0,(this.shadowVisible=q)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),E&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer= +function(){if(null==this.defaultParent){var q=this.model.getChildCount(this.model.root),E=0;do var Q=this.model.getChildAt(this.model.root,E);while(E++<q&&"1"==mxUtils.getValue(this.getCellStyle(Q),"locked","0"));null!=Q&&this.setDefaultParent(Q)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn= [SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml", STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=[SHAPES_PATH+"/mxKubernetes.js", STENCIL_PATH+"/kubernetes.xml"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic= @@ -3354,322 +3351,330 @@ STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[S STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.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.aws4= [SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+ -"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(q){var F=null;null!=q&&0<q.length&&("ER"==q.substring(0,2)?F="mxgraph.er":"sysML"==q.substring(0,5)&&(F="mxgraph.sysml"));return F};var Z=mxMarker.createMarker;mxMarker.createMarker= -function(q,F,R,W,T,ba,ha,ra,ta,ma){if(null!=R&&null==mxMarker.markers[R]){var pa=this.getPackageForType(R);null!=pa&&mxStencilRegistry.getStencil(pa)}return Z.apply(this,arguments)};var P=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(q,F,R,W,T,ba){"1"==mxUtils.getValue(F.style,"lineShape",null)&&q.setFillColor(mxUtils.getValue(F.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return P.apply(this,arguments)};PrintDialog.prototype.create=function(q,F){function R(){Ba.value= -Math.max(1,Math.min(ra,Math.max(parseInt(Ba.value),parseInt(za.value))));za.value=Math.max(1,Math.min(ra,Math.min(parseInt(Ba.value),parseInt(za.value))))}function W(ya){function Fa($a,ab,ib){var gb=$a.useCssTransforms,qb=$a.currentTranslate,nb=$a.currentScale,mb=$a.view.translate,Bb=$a.view.scale;$a.useCssTransforms&&($a.useCssTransforms=!1,$a.currentTranslate=new mxPoint(0,0),$a.currentScale=1,$a.view.translate=new mxPoint(0,0),$a.view.scale=1);var wb=$a.getGraphBounds(),rb=0,vb=0,kb=xa.get(),hb= -1/$a.pageScale,tb=Ra.checked;if(tb){hb=parseInt(fa.value);var Cb=parseInt(la.value);hb=Math.min(kb.height*Cb/(wb.height/$a.view.scale),kb.width*hb/(wb.width/$a.view.scale))}else hb=parseInt(Da.value)/(100*$a.pageScale),isNaN(hb)&&(wa=1/$a.pageScale,Da.value="100 %");kb=mxRectangle.fromRectangle(kb);kb.width=Math.ceil(kb.width*wa);kb.height=Math.ceil(kb.height*wa);hb*=wa;!tb&&$a.pageVisible?(wb=$a.getPageLayout(),rb-=wb.x*kb.width,vb-=wb.y*kb.height):tb=!0;if(null==ab){ab=PrintDialog.createPrintPreview($a, +"/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(q){var E=null;null!=q&&0<q.length&&("ER"==q.substring(0,2)?E="mxgraph.er":"sysML"==q.substring(0,5)&&(E="mxgraph.sysml"));return E};var aa=mxMarker.createMarker;mxMarker.createMarker= +function(q,E,Q,Y,R,ba,ea,ra,ta,la){if(null!=Q&&null==mxMarker.markers[Q]){var pa=this.getPackageForType(Q);null!=pa&&mxStencilRegistry.getStencil(pa)}return aa.apply(this,arguments)};var X=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(q,E,Q,Y,R,ba){"1"==mxUtils.getValue(E.style,"lineShape",null)&&q.setFillColor(mxUtils.getValue(E.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return X.apply(this,arguments)};PrintDialog.prototype.create=function(q,E){function Q(){Ca.value= +Math.max(1,Math.min(ra,Math.max(parseInt(Ca.value),parseInt(xa.value))));xa.value=Math.max(1,Math.min(ra,Math.min(parseInt(Ca.value),parseInt(xa.value))))}function Y(ya){function Ha($a,ab,ib){var gb=$a.useCssTransforms,qb=$a.currentTranslate,nb=$a.currentScale,mb=$a.view.translate,Bb=$a.view.scale;$a.useCssTransforms&&($a.useCssTransforms=!1,$a.currentTranslate=new mxPoint(0,0),$a.currentScale=1,$a.view.translate=new mxPoint(0,0),$a.view.scale=1);var wb=$a.getGraphBounds(),rb=0,vb=0,kb=wa.get(),hb= +1/$a.pageScale,tb=Sa.checked;if(tb){hb=parseInt(ha.value);var Cb=parseInt(ma.value);hb=Math.min(kb.height*Cb/(wb.height/$a.view.scale),kb.width*hb/(wb.width/$a.view.scale))}else hb=parseInt(Da.value)/(100*$a.pageScale),isNaN(hb)&&(Qa=1/$a.pageScale,Da.value="100 %");kb=mxRectangle.fromRectangle(kb);kb.width=Math.ceil(kb.width*Qa);kb.height=Math.ceil(kb.height*Qa);hb*=Qa;!tb&&$a.pageVisible?(wb=$a.getPageLayout(),rb-=wb.x*kb.width,vb-=wb.y*kb.height):tb=!0;if(null==ab){ab=PrintDialog.createPrintPreview($a, hb,kb,0,rb,vb,tb);ab.pageSelector=!1;ab.mathEnabled=!1;Ia.checked&&(ab.isCellVisible=function(ob){return $a.isCellSelected(ob)});rb=q.getCurrentFile();null!=rb&&(ab.title=rb.getTitle());var xb=ab.writeHead;ab.writeHead=function(ob){xb.apply(this,arguments);mxClient.IS_GC&&(ob.writeln('<style type="text/css">'),ob.writeln("@media print {"),ob.writeln(".MathJax svg { shape-rendering: crispEdges; }"),ob.writeln("}"),ob.writeln("</style>"));null!=q.editor.fontCss&&(ob.writeln('<style type="text/css">'), ob.writeln(q.editor.fontCss),ob.writeln("</style>"));for(var yb=$a.getCustomFonts(),Ab=0;Ab<yb.length;Ab++){var c=yb[Ab].name,l=yb[Ab].url;Graph.isCssFontUrl(l)?ob.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(l)+'" charset="UTF-8" type="text/css">'):(ob.writeln('<style type="text/css">'),ob.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(c)+'";\nsrc: url("'+mxUtils.htmlEntities(l)+'");\n}'),ob.writeln("</style>"))}};if("undefined"!==typeof MathJax){var zb=ab.renderPage; -ab.renderPage=function(ob,yb,Ab,c,l,v){var n=mxClient.NO_FO,t=zb.apply(this,arguments);mxClient.NO_FO=n;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:t.className="geDisableMathJax";return t}}rb=null;vb=T.shapeForegroundColor;tb=T.shapeBackgroundColor;kb=T.enableFlowAnimation;T.enableFlowAnimation=!1;null!=T.themes&&"darkTheme"==T.defaultThemeName&&(rb=T.stylesheet,T.stylesheet=T.getDefaultStylesheet(),T.shapeForegroundColor="#000000",T.shapeBackgroundColor="#ffffff",T.refresh());ab.open(null, -null,ib,!0);T.enableFlowAnimation=kb;null!=rb&&(T.shapeForegroundColor=vb,T.shapeBackgroundColor=tb,T.stylesheet=rb,T.refresh())}else{kb=$a.background;if(null==kb||""==kb||kb==mxConstants.NONE)kb="#ffffff";ab.backgroundColor=kb;ab.autoOrigin=tb;ab.appendGraph($a,hb,rb,vb,ib,!0);ib=$a.getCustomFonts();if(null!=ab.wnd)for(rb=0;rb<ib.length;rb++)vb=ib[rb].name,tb=ib[rb].url,Graph.isCssFontUrl(tb)?ab.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(tb)+'" charset="UTF-8" type="text/css">'): -(ab.wnd.document.writeln('<style type="text/css">'),ab.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(vb)+'";\nsrc: url("'+mxUtils.htmlEntities(tb)+'");\n}'),ab.wnd.document.writeln("</style>"))}gb&&($a.useCssTransforms=gb,$a.currentTranslate=qb,$a.currentScale=nb,$a.view.translate=mb,$a.view.scale=Bb);return ab}var wa=parseInt(sa.value)/100;isNaN(wa)&&(wa=1,sa.value="100 %");wa*=.75;var ua=null,La=T.shapeForegroundColor,Oa=T.shapeBackgroundColor;null!=T.themes&&"darkTheme"== -T.defaultThemeName&&(ua=T.stylesheet,T.stylesheet=T.getDefaultStylesheet(),T.shapeForegroundColor="#000000",T.shapeBackgroundColor="#ffffff",T.refresh());var Ca=za.value,Ma=Ba.value,Ga=!ma.checked,Ya=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(q,ma.checked,Ca,Ma,Ra.checked,fa.value,la.value,parseInt(Da.value)/100,parseInt(sa.value)/100,xa.get());else{Ga&&(Ga=Ia.checked||Ca==ta&&Ma==ta);if(!Ga&&null!=q.pages&&q.pages.length){var db=0;Ga=q.pages.length-1;ma.checked||(db=parseInt(Ca)-1, -Ga=parseInt(Ma)-1);for(var eb=db;eb<=Ga;eb++){var cb=q.pages[eb];Ca=cb==q.currentPage?T:null;if(null==Ca){Ca=q.createTemporaryGraph(T.stylesheet);Ca.shapeForegroundColor=T.shapeForegroundColor;Ca.shapeBackgroundColor=T.shapeBackgroundColor;Ma=!0;db=!1;var ub=null,fb=null;null==cb.viewState&&null==cb.root&&q.updatePageRoot(cb);null!=cb.viewState&&(Ma=cb.viewState.pageVisible,db=cb.viewState.mathEnabled,ub=cb.viewState.background,fb=cb.viewState.backgroundImage,Ca.extFonts=cb.viewState.extFonts);null!= -fb&&null!=fb.originalSrc&&(fb=q.createImageForPageLink(fb.originalSrc,cb));Ca.background=ub;Ca.backgroundImage=null!=fb?new mxImage(fb.src,fb.width,fb.height,fb.x,fb.y):null;Ca.pageVisible=Ma;Ca.mathEnabled=db;var pb=Ca.getGraphBounds;Ca.getGraphBounds=function(){var $a=pb.apply(this,arguments),ab=this.backgroundImage;if(null!=ab&&null!=ab.width&&null!=ab.height){var ib=this.view.translate,gb=this.view.scale;$a=mxRectangle.fromRectangle($a);$a.add(new mxRectangle((ib.x+ab.x)*gb,(ib.y+ab.y)*gb,ab.width* -gb,ab.height*gb))}return $a};var lb=Ca.getGlobalVariable;Ca.getGlobalVariable=function($a){return"page"==$a?cb.getName():"pagenumber"==$a?eb+1:"pagecount"==$a?null!=q.pages?q.pages.length:1:lb.apply(this,arguments)};document.body.appendChild(Ca.container);q.updatePageRoot(cb);Ca.model.setRoot(cb.root)}Ya=Fa(Ca,Ya,eb!=Ga);Ca!=T&&Ca.container.parentNode.removeChild(Ca.container)}}else Ya=Fa(T);null==Ya?q.handleError({message:mxResources.get("errorUpdatingPreview")}):(Ya.mathEnabled&&(Ga=Ya.wnd.document, -ya&&(Ya.wnd.IMMEDIATE_PRINT=!0),Ga.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),Ya.closeDocument(),!Ya.mathEnabled&&ya&&PrintDialog.printPreview(Ya));null!=ua&&(T.shapeForegroundColor=La,T.shapeBackgroundColor=Oa,T.stylesheet=ua,T.refresh())}}var T=q.editor.graph,ba=document.createElement("div"),ha=document.createElement("h3");ha.style.width="100%";ha.style.textAlign="center";ha.style.marginTop="0px";mxUtils.write(ha,F||mxResources.get("print")); -ba.appendChild(ha);var ra=1,ta=1;ha=document.createElement("div");ha.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var ma=document.createElement("input");ma.style.cssText="margin-right:8px;margin-bottom:8px;";ma.setAttribute("value","all");ma.setAttribute("type","radio");ma.setAttribute("name","pages-printdialog");ha.appendChild(ma);F=document.createElement("span");mxUtils.write(F,mxResources.get("printAllPages"));ha.appendChild(F);mxUtils.br(ha);var pa= -ma.cloneNode(!0);ma.setAttribute("checked","checked");pa.setAttribute("value","range");ha.appendChild(pa);F=document.createElement("span");mxUtils.write(F,mxResources.get("pages")+":");ha.appendChild(F);var za=document.createElement("input");za.style.cssText="margin:0 8px 0 8px;";za.setAttribute("value","1");za.setAttribute("type","number");za.setAttribute("min","1");za.style.width="50px";ha.appendChild(za);F=document.createElement("span");mxUtils.write(F,mxResources.get("to"));ha.appendChild(F); -var Ba=za.cloneNode(!0);ha.appendChild(Ba);mxEvent.addListener(za,"focus",function(){pa.checked=!0});mxEvent.addListener(Ba,"focus",function(){pa.checked=!0});mxEvent.addListener(za,"change",R);mxEvent.addListener(Ba,"change",R);if(null!=q.pages&&(ra=q.pages.length,null!=q.currentPage))for(F=0;F<q.pages.length;F++)if(q.currentPage==q.pages[F]){ta=F+1;za.value=ta;Ba.value=ta;break}za.setAttribute("max",ra);Ba.setAttribute("max",ra);q.isPagesEnabled()?1<ra&&(ba.appendChild(ha),pa.checked=!0):pa.checked= -!0;mxUtils.br(ha);var Ia=document.createElement("input");Ia.setAttribute("value","all");Ia.setAttribute("type","radio");Ia.style.marginRight="8px";T.isSelectionEmpty()&&Ia.setAttribute("disabled","disabled");var Aa=document.createElement("div");Aa.style.marginBottom="10px";1==ra?(Ia.setAttribute("type","checkbox"),Ia.style.marginBottom="12px",Aa.appendChild(Ia)):(Ia.setAttribute("name","pages-printdialog"),Ia.style.marginBottom="8px",ha.appendChild(Ia));F=document.createElement("span");mxUtils.write(F, -mxResources.get("selectionOnly"));Ia.parentNode.appendChild(F);1==ra&&mxUtils.br(Ia.parentNode);var Ka=document.createElement("input");Ka.style.marginRight="8px";Ka.setAttribute("value","adjust");Ka.setAttribute("type","radio");Ka.setAttribute("name","printZoom");Aa.appendChild(Ka);F=document.createElement("span");mxUtils.write(F,mxResources.get("adjustTo"));Aa.appendChild(F);var Da=document.createElement("input");Da.style.cssText="margin:0 8px 0 8px;";Da.setAttribute("value","100 %");Da.style.width= -"50px";Aa.appendChild(Da);mxEvent.addListener(Da,"focus",function(){Ka.checked=!0});ba.appendChild(Aa);ha=ha.cloneNode(!1);var Ra=Ka.cloneNode(!0);Ra.setAttribute("value","fit");Ka.setAttribute("checked","checked");F=document.createElement("div");F.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";F.appendChild(Ra);ha.appendChild(F);Aa=document.createElement("table");Aa.style.display="inline-block";var Qa=document.createElement("tbody"),Ta=document.createElement("tr"),Za=Ta.cloneNode(!0), -Pa=document.createElement("td"),y=Pa.cloneNode(!0),M=Pa.cloneNode(!0),N=Pa.cloneNode(!0),S=Pa.cloneNode(!0),X=Pa.cloneNode(!0);Pa.style.textAlign="right";N.style.textAlign="right";mxUtils.write(Pa,mxResources.get("fitTo"));var fa=document.createElement("input");fa.style.cssText="margin:0 8px 0 8px;";fa.setAttribute("value","1");fa.setAttribute("min","1");fa.setAttribute("type","number");fa.style.width="40px";y.appendChild(fa);F=document.createElement("span");mxUtils.write(F,mxResources.get("fitToSheetsAcross")); -M.appendChild(F);mxUtils.write(N,mxResources.get("fitToBy"));var la=fa.cloneNode(!0);S.appendChild(la);mxEvent.addListener(fa,"focus",function(){Ra.checked=!0});mxEvent.addListener(la,"focus",function(){Ra.checked=!0});F=document.createElement("span");mxUtils.write(F,mxResources.get("fitToSheetsDown"));X.appendChild(F);Ta.appendChild(Pa);Ta.appendChild(y);Ta.appendChild(M);Za.appendChild(N);Za.appendChild(S);Za.appendChild(X);Qa.appendChild(Ta);Qa.appendChild(Za);Aa.appendChild(Qa);ha.appendChild(Aa); -ba.appendChild(ha);ha=document.createElement("div");F=document.createElement("div");F.style.fontWeight="bold";F.style.marginBottom="12px";mxUtils.write(F,mxResources.get("paperSize"));ha.appendChild(F);F=document.createElement("div");F.style.marginBottom="12px";var xa=PageSetupDialog.addPageFormatPanel(F,"printdialog",q.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);ha.appendChild(F);F=document.createElement("span");mxUtils.write(F,mxResources.get("pageScale"));ha.appendChild(F);var sa= -document.createElement("input");sa.style.cssText="margin:0 8px 0 8px;";sa.setAttribute("value","100 %");sa.style.width="60px";ha.appendChild(sa);ba.appendChild(ha);F=document.createElement("div");F.style.cssText="text-align:right;margin:48px 0 0 0;";ha=mxUtils.button(mxResources.get("cancel"),function(){q.hideDialog()});ha.className="geBtn";q.editor.cancelFirst&&F.appendChild(ha);q.isOffline()||(Aa=mxUtils.button(mxResources.get("help"),function(){T.openLink("https://www.diagrams.net/doc/faq/print-diagram")}), -Aa.className="geBtn",F.appendChild(Aa));PrintDialog.previewEnabled&&(Aa=mxUtils.button(mxResources.get("preview"),function(){q.hideDialog();W(!1)}),Aa.className="geBtn",F.appendChild(Aa));Aa=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){q.hideDialog();W(!0)});Aa.className="geBtn gePrimaryBtn";F.appendChild(Aa);q.editor.cancelFirst||F.appendChild(ha);ba.appendChild(F);this.container=ba};var ca=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute= +ab.renderPage=function(ob,yb,Ab,c,l,v){var n=mxClient.NO_FO,t=zb.apply(this,arguments);mxClient.NO_FO=n;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:t.className="geDisableMathJax";return t}}rb=null;vb=R.shapeForegroundColor;tb=R.shapeBackgroundColor;kb=R.enableFlowAnimation;R.enableFlowAnimation=!1;null!=R.themes&&"darkTheme"==R.defaultThemeName&&(rb=R.stylesheet,R.stylesheet=R.getDefaultStylesheet(),R.shapeForegroundColor="#000000",R.shapeBackgroundColor="#ffffff",R.refresh());ab.open(null, +null,ib,!0);R.enableFlowAnimation=kb;null!=rb&&(R.shapeForegroundColor=vb,R.shapeBackgroundColor=tb,R.stylesheet=rb,R.refresh())}else{kb=$a.background;if(null==kb||""==kb||kb==mxConstants.NONE)kb="#ffffff";ab.backgroundColor=kb;ab.autoOrigin=tb;ab.appendGraph($a,hb,rb,vb,ib,!0);ib=$a.getCustomFonts();if(null!=ab.wnd)for(rb=0;rb<ib.length;rb++)vb=ib[rb].name,tb=ib[rb].url,Graph.isCssFontUrl(tb)?ab.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(tb)+'" charset="UTF-8" type="text/css">'): +(ab.wnd.document.writeln('<style type="text/css">'),ab.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(vb)+'";\nsrc: url("'+mxUtils.htmlEntities(tb)+'");\n}'),ab.wnd.document.writeln("</style>"))}gb&&($a.useCssTransforms=gb,$a.currentTranslate=qb,$a.currentScale=nb,$a.view.translate=mb,$a.view.scale=Bb);return ab}var Qa=parseInt(sa.value)/100;isNaN(Qa)&&(Qa=1,sa.value="100 %");Qa*=.75;var ua=null,za=R.shapeForegroundColor,Fa=R.shapeBackgroundColor;null!=R.themes&&"darkTheme"== +R.defaultThemeName&&(ua=R.stylesheet,R.stylesheet=R.getDefaultStylesheet(),R.shapeForegroundColor="#000000",R.shapeBackgroundColor="#ffffff",R.refresh());var Ba=xa.value,Ea=Ca.value,Oa=!la.checked,Pa=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(q,la.checked,Ba,Ea,Sa.checked,ha.value,ma.value,parseInt(Da.value)/100,parseInt(sa.value)/100,wa.get());else{Oa&&(Oa=Ia.checked||Ba==ta&&Ea==ta);if(!Oa&&null!=q.pages&&q.pages.length){var bb=0;Oa=q.pages.length-1;la.checked||(bb=parseInt(Ba)-1, +Oa=parseInt(Ea)-1);for(var eb=bb;eb<=Oa;eb++){var db=q.pages[eb];Ba=db==q.currentPage?R:null;if(null==Ba){Ba=q.createTemporaryGraph(R.stylesheet);Ba.shapeForegroundColor=R.shapeForegroundColor;Ba.shapeBackgroundColor=R.shapeBackgroundColor;Ea=!0;bb=!1;var ub=null,fb=null;null==db.viewState&&null==db.root&&q.updatePageRoot(db);null!=db.viewState&&(Ea=db.viewState.pageVisible,bb=db.viewState.mathEnabled,ub=db.viewState.background,fb=db.viewState.backgroundImage,Ba.extFonts=db.viewState.extFonts);null!= +fb&&null!=fb.originalSrc&&(fb=q.createImageForPageLink(fb.originalSrc,db));Ba.background=ub;Ba.backgroundImage=null!=fb?new mxImage(fb.src,fb.width,fb.height,fb.x,fb.y):null;Ba.pageVisible=Ea;Ba.mathEnabled=bb;var pb=Ba.getGraphBounds;Ba.getGraphBounds=function(){var $a=pb.apply(this,arguments),ab=this.backgroundImage;if(null!=ab&&null!=ab.width&&null!=ab.height){var ib=this.view.translate,gb=this.view.scale;$a=mxRectangle.fromRectangle($a);$a.add(new mxRectangle((ib.x+ab.x)*gb,(ib.y+ab.y)*gb,ab.width* +gb,ab.height*gb))}return $a};var lb=Ba.getGlobalVariable;Ba.getGlobalVariable=function($a){return"page"==$a?db.getName():"pagenumber"==$a?eb+1:"pagecount"==$a?null!=q.pages?q.pages.length:1:lb.apply(this,arguments)};document.body.appendChild(Ba.container);q.updatePageRoot(db);Ba.model.setRoot(db.root)}Pa=Ha(Ba,Pa,eb!=Oa);Ba!=R&&Ba.container.parentNode.removeChild(Ba.container)}}else Pa=Ha(R);null==Pa?q.handleError({message:mxResources.get("errorUpdatingPreview")}):(Pa.mathEnabled&&(Oa=Pa.wnd.document, +ya&&(Pa.wnd.IMMEDIATE_PRINT=!0),Oa.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),Pa.closeDocument(),!Pa.mathEnabled&&ya&&PrintDialog.printPreview(Pa));null!=ua&&(R.shapeForegroundColor=za,R.shapeBackgroundColor=Fa,R.stylesheet=ua,R.refresh())}}var R=q.editor.graph,ba=document.createElement("div"),ea=document.createElement("h3");ea.style.width="100%";ea.style.textAlign="center";ea.style.marginTop="0px";mxUtils.write(ea,E||mxResources.get("print")); +ba.appendChild(ea);var ra=1,ta=1;ea=document.createElement("div");ea.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var la=document.createElement("input");la.style.cssText="margin-right:8px;margin-bottom:8px;";la.setAttribute("value","all");la.setAttribute("type","radio");la.setAttribute("name","pages-printdialog");ea.appendChild(la);E=document.createElement("span");mxUtils.write(E,mxResources.get("printAllPages"));ea.appendChild(E);mxUtils.br(ea);var pa= +la.cloneNode(!0);la.setAttribute("checked","checked");pa.setAttribute("value","range");ea.appendChild(pa);E=document.createElement("span");mxUtils.write(E,mxResources.get("pages")+":");ea.appendChild(E);var xa=document.createElement("input");xa.style.cssText="margin:0 8px 0 8px;";xa.setAttribute("value","1");xa.setAttribute("type","number");xa.setAttribute("min","1");xa.style.width="50px";ea.appendChild(xa);E=document.createElement("span");mxUtils.write(E,mxResources.get("to"));ea.appendChild(E); +var Ca=xa.cloneNode(!0);ea.appendChild(Ca);mxEvent.addListener(xa,"focus",function(){pa.checked=!0});mxEvent.addListener(Ca,"focus",function(){pa.checked=!0});mxEvent.addListener(xa,"change",Q);mxEvent.addListener(Ca,"change",Q);if(null!=q.pages&&(ra=q.pages.length,null!=q.currentPage))for(E=0;E<q.pages.length;E++)if(q.currentPage==q.pages[E]){ta=E+1;xa.value=ta;Ca.value=ta;break}xa.setAttribute("max",ra);Ca.setAttribute("max",ra);q.isPagesEnabled()?1<ra&&(ba.appendChild(ea),pa.checked=!0):pa.checked= +!0;mxUtils.br(ea);var Ia=document.createElement("input");Ia.setAttribute("value","all");Ia.setAttribute("type","radio");Ia.style.marginRight="8px";R.isSelectionEmpty()&&Ia.setAttribute("disabled","disabled");var Aa=document.createElement("div");Aa.style.marginBottom="10px";1==ra?(Ia.setAttribute("type","checkbox"),Ia.style.marginBottom="12px",Aa.appendChild(Ia)):(Ia.setAttribute("name","pages-printdialog"),Ia.style.marginBottom="8px",ea.appendChild(Ia));E=document.createElement("span");mxUtils.write(E, +mxResources.get("selectionOnly"));Ia.parentNode.appendChild(E);1==ra&&mxUtils.br(Ia.parentNode);var La=document.createElement("input");La.style.marginRight="8px";La.setAttribute("value","adjust");La.setAttribute("type","radio");La.setAttribute("name","printZoom");Aa.appendChild(La);E=document.createElement("span");mxUtils.write(E,mxResources.get("adjustTo"));Aa.appendChild(E);var Da=document.createElement("input");Da.style.cssText="margin:0 8px 0 8px;";Da.setAttribute("value","100 %");Da.style.width= +"50px";Aa.appendChild(Da);mxEvent.addListener(Da,"focus",function(){La.checked=!0});ba.appendChild(Aa);ea=ea.cloneNode(!1);var Sa=La.cloneNode(!0);Sa.setAttribute("value","fit");La.setAttribute("checked","checked");E=document.createElement("div");E.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";E.appendChild(Sa);ea.appendChild(E);Aa=document.createElement("table");Aa.style.display="inline-block";var Ra=document.createElement("tbody"),Ta=document.createElement("tr"),Za=Ta.cloneNode(!0), +Na=document.createElement("td"),z=Na.cloneNode(!0),L=Na.cloneNode(!0),O=Na.cloneNode(!0),V=Na.cloneNode(!0),U=Na.cloneNode(!0);Na.style.textAlign="right";O.style.textAlign="right";mxUtils.write(Na,mxResources.get("fitTo"));var ha=document.createElement("input");ha.style.cssText="margin:0 8px 0 8px;";ha.setAttribute("value","1");ha.setAttribute("min","1");ha.setAttribute("type","number");ha.style.width="40px";z.appendChild(ha);E=document.createElement("span");mxUtils.write(E,mxResources.get("fitToSheetsAcross")); +L.appendChild(E);mxUtils.write(O,mxResources.get("fitToBy"));var ma=ha.cloneNode(!0);V.appendChild(ma);mxEvent.addListener(ha,"focus",function(){Sa.checked=!0});mxEvent.addListener(ma,"focus",function(){Sa.checked=!0});E=document.createElement("span");mxUtils.write(E,mxResources.get("fitToSheetsDown"));U.appendChild(E);Ta.appendChild(Na);Ta.appendChild(z);Ta.appendChild(L);Za.appendChild(O);Za.appendChild(V);Za.appendChild(U);Ra.appendChild(Ta);Ra.appendChild(Za);Aa.appendChild(Ra);ea.appendChild(Aa); +ba.appendChild(ea);ea=document.createElement("div");E=document.createElement("div");E.style.fontWeight="bold";E.style.marginBottom="12px";mxUtils.write(E,mxResources.get("paperSize"));ea.appendChild(E);E=document.createElement("div");E.style.marginBottom="12px";var wa=PageSetupDialog.addPageFormatPanel(E,"printdialog",q.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);ea.appendChild(E);E=document.createElement("span");mxUtils.write(E,mxResources.get("pageScale"));ea.appendChild(E);var sa= +document.createElement("input");sa.style.cssText="margin:0 8px 0 8px;";sa.setAttribute("value","100 %");sa.style.width="60px";ea.appendChild(sa);ba.appendChild(ea);E=document.createElement("div");E.style.cssText="text-align:right;margin:48px 0 0 0;";ea=mxUtils.button(mxResources.get("cancel"),function(){q.hideDialog()});ea.className="geBtn";q.editor.cancelFirst&&E.appendChild(ea);q.isOffline()||(Aa=mxUtils.button(mxResources.get("help"),function(){R.openLink("https://www.diagrams.net/doc/faq/print-diagram")}), +Aa.className="geBtn",E.appendChild(Aa));PrintDialog.previewEnabled&&(Aa=mxUtils.button(mxResources.get("preview"),function(){q.hideDialog();Y(!1)}),Aa.className="geBtn",E.appendChild(Aa));Aa=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){q.hideDialog();Y(!0)});Aa.className="geBtn gePrimaryBtn";E.appendChild(Aa);q.editor.cancelFirst||E.appendChild(ea);ba.appendChild(E);this.container=ba};var ja=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute= function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var q=this.image;null!=q&&null!=q.src&&Graph.isPageLink(q.src)&&(q={originalSrc:q.src});this.page.viewState.backgroundImage=q}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible= -this.shadowVisible)}}else ca.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var ja=document.createElement("canvas"),ka=new Image;ka.onload=function(){try{ja.getContext("2d").drawImage(ka, -0,0);var q=ja.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=q&&6<q.length}catch(F){}};ka.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(q){}Editor.prototype.useCanvasForExport=!1})(); +this.shadowVisible)}}else ja.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var ca=document.createElement("canvas"),ka=new Image;ka.onload=function(){try{ca.getContext("2d").drawImage(ka, +0,0);var q=ca.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=q&&6<q.length}catch(E){}};ka.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(q){}Editor.prototype.useCanvasForExport=!1})(); (function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};b.afterDecode=function(e,k,m){m.previousColor=m.color;m.previousImage=m.image;m.previousFormat=m.format;null!=m.foldingEnabled&&(m.foldingEnabled=!m.foldingEnabled);null!=m.mathEnabled&&(m.mathEnabled=!m.mathEnabled);null!=m.shadowVisible&&(m.shadowVisible=!m.shadowVisible);return m};mxCodecRegistry.register(b)})(); -(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.2.8";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage= +(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.3.0";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage= null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&& "1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35, -mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(d,f,g,x,z,u,H){u=null!=u?u:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&& -"1"!=urlParams.dev)try{if(d!=EditorUi.lastErrorMessage&&(null==d||null==f||-1==d.indexOf("Script error")&&-1==d.indexOf("extension"))&&null!=d&&0>d.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=d;var J=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";z=null!=z?z:Error(d);(new Image).src=J+"/log?severity="+u+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=x?":colno:"+ -encodeURIComponent(x):"")+(null!=z&&null!=z.stack?"&stack="+encodeURIComponent(z.stack):"")}}catch(D){}try{H||null==window.console||console.error(u,d,f,g,x,z)}catch(D){}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(g){}};EditorUi.sendReport= +mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(d,f,g,x,y,u,H){u=null!=u?u:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&& +"1"!=urlParams.dev)try{if(d!=EditorUi.lastErrorMessage&&(null==d||null==f||-1==d.indexOf("Script error")&&-1==d.indexOf("extension"))&&null!=d&&0>d.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=d;var J=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";y=null!=y?y:Error(d);(new Image).src=J+"/log?severity="+u+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=x?":colno:"+ +encodeURIComponent(x):"")+(null!=y&&null!=y.stack?"&stack="+encodeURIComponent(y.stack):"")}}catch(D){}try{H||null==window.console||console.error(u,d,f,g,x,y)}catch(D){}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(g){}};EditorUi.sendReport= function(d,f){if("1"==urlParams.dev)EditorUi.debug("sendReport",d);else if(EditorUi.enableLogging)try{f=null!=f?f:5E4,d.length>f&&(d=d.substring(0,f)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(d))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var d=[(new Date).toISOString()],f=0;f<arguments.length;f++)d.push(arguments[f]);console.log.apply(console, d)}}catch(g){}};EditorUi.removeChildNodes=function(d){for(;null!=d.firstChild;)d.removeChild(d.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;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.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad= -!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var d=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!d.getContext||!d.getContext("2d"))}catch(z){}try{var f=document.createElement("canvas"),g=new Image;g.onload=function(){try{f.getContext("2d").drawImage(g,0,0);var z= -f.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=z&&6<z.length}catch(u){}};g.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(z){}try{f=document.createElement("canvas");f.width=f.height=1;var x=f.toDataURL("image/jpeg"); -EditorUi.prototype.jpgSupported=null!==x.match("image/jpeg")}catch(z){}})();EditorUi.prototype.openLink=function(d,f,g){return this.editor.graph.openLink(d,f,g)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalData=function(d,f){f(localStorage.getItem(d))};EditorUi.prototype.setLocalData=function(d,f,g){localStorage.setItem(d,f);null!=g&&g()};EditorUi.prototype.removeLocalData=function(d,f){localStorage.removeItem(d);f()};EditorUi.prototype.setShareCursorPosition=function(d){this.shareCursorPosition= +!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var d=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!d.getContext||!d.getContext("2d"))}catch(y){}try{var f=document.createElement("canvas"),g=new Image;g.onload=function(){try{f.getContext("2d").drawImage(g,0,0);var y= +f.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=y&&6<y.length}catch(u){}};g.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(y){}try{f=document.createElement("canvas");f.width=f.height=1;var x=f.toDataURL("image/jpeg"); +EditorUi.prototype.jpgSupported=null!==x.match("image/jpeg")}catch(y){}})();EditorUi.prototype.openLink=function(d,f,g){return this.editor.graph.openLink(d,f,g)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalData=function(d,f){f(localStorage.getItem(d))};EditorUi.prototype.setLocalData=function(d,f,g){localStorage.setItem(d,f);null!=g&&g()};EditorUi.prototype.removeLocalData=function(d,f){localStorage.removeItem(d);f()};EditorUi.prototype.setShareCursorPosition=function(d){this.shareCursorPosition= d;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(d){this.showRemoteCursors=d;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(d){this.editor.graph.mathEnabled=d;this.editor.updateGraphComponents();this.editor.graph.refresh(); this.editor.graph.defaultMathEnabled=d;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(d){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(d){return this.isOfflineApp()||!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()}; -EditorUi.prototype.createSpinner=function(d,f,g){var x=null==d||null==f;g=null!=g?g:24;var z=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),u=z.spin;z.spin=function(J,D){var G=!1;this.active||(u.call(this,J),this.active=!0,null!=D&&(x&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),G=document.createElement("div"), +EditorUi.prototype.createSpinner=function(d,f,g){var x=null==d||null==f;g=null!=g?g:24;var y=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),u=y.spin;y.spin=function(J,D){var G=!1;this.active||(u.call(this,J),this.active=!0,null!=D&&(x&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),G=document.createElement("div"), G.style.position="absolute",G.style.whiteSpace="nowrap",G.style.background="#4B4243",G.style.color="white",G.style.fontFamily=Editor.defaultHtmlFont,G.style.fontSize="9pt",G.style.padding="6px",G.style.paddingLeft="10px",G.style.paddingRight="10px",G.style.zIndex=2E9,G.style.left=Math.max(0,d)+"px",G.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(G.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(G.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(G.style, -"boxShadow","2px 2px 3px 0px #ddd"),"..."!=D.substring(D.length-3,D.length)&&"!"!=D.charAt(D.length-1)&&(D+="..."),G.innerHTML=D,J.appendChild(G),z.status=G),this.pause=mxUtils.bind(this,function(){var V=function(){};this.active&&(V=mxUtils.bind(this,function(){this.spin(J,D)}));this.stop();return V}),G=!0);return G};var H=z.stop;z.stop=function(){H.call(this);this.active=!1;null!=z.status&&null!=z.status.parentNode&&z.status.parentNode.removeChild(z.status);z.status=null};z.pause=function(){return function(){}}; -return z};EditorUi.prototype.isCompatibleString=function(d){try{var f=mxUtils.parseXml(d),g=this.editor.extractGraphModel(f.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(x){}return!1};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&& +"boxShadow","2px 2px 3px 0px #ddd"),"..."!=D.substring(D.length-3,D.length)&&"!"!=D.charAt(D.length-1)&&(D+="..."),G.innerHTML=D,J.appendChild(G),y.status=G),this.pause=mxUtils.bind(this,function(){var W=function(){};this.active&&(W=mxUtils.bind(this,function(){this.spin(J,D)}));this.stop();return W}),G=!0);return G};var H=y.stop;y.stop=function(){H.call(this);this.active=!1;null!=y.status&&null!=y.status.parentNode&&y.status.parentNode.removeChild(y.status);y.status=null};y.pause=function(){return function(){}}; +return y};EditorUi.prototype.isCompatibleString=function(d){try{var f=mxUtils.parseXml(d),g=this.editor.extractGraphModel(f.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(x){}return!1};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&& 3==d.charCodeAt(2)&&4==d.charCodeAt(3)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&6==d.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||60==d.charCodeAt(0)&&63==d.charCodeAt(1)&&120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler; -EditorUi.prototype.createKeyHandler=function(d){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=f.getFunction,x=this.editor.graph,z=this;f.getFunction=function(u){if(x.isSelectionEmpty()&&null!=z.pages&&0<z.pages.length){var H=z.getSelectedPageIndex();if(mxEvent.isShiftDown(u)){if(37==u.keyCode)return function(){0<H&&z.movePage(H,H-1)};if(38==u.keyCode)return function(){0<H&&z.movePage(H,0)};if(39==u.keyCode)return function(){H<z.pages.length-1&&z.movePage(H, -H+1)};if(40==u.keyCode)return function(){H<z.pages.length-1&&z.movePage(H,z.pages.length-1)}}else if(mxEvent.isControlDown(u)||mxClient.IS_MAC&&mxEvent.isMetaDown(u)){if(37==u.keyCode)return function(){0<H&&z.selectNextPage(!1)};if(38==u.keyCode)return function(){0<H&&z.selectPage(z.pages[0])};if(39==u.keyCode)return function(){H<z.pages.length-1&&z.selectNextPage(!0)};if(40==u.keyCode)return function(){H<z.pages.length-1&&z.selectPage(z.pages[z.pages.length-1])}}}return!(65<=u.keyCode&&90>=u.keyCode)|| +EditorUi.prototype.createKeyHandler=function(d){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=f.getFunction,x=this.editor.graph,y=this;f.getFunction=function(u){if(x.isSelectionEmpty()&&null!=y.pages&&0<y.pages.length){var H=y.getSelectedPageIndex();if(mxEvent.isShiftDown(u)){if(37==u.keyCode)return function(){0<H&&y.movePage(H,H-1)};if(38==u.keyCode)return function(){0<H&&y.movePage(H,0)};if(39==u.keyCode)return function(){H<y.pages.length-1&&y.movePage(H, +H+1)};if(40==u.keyCode)return function(){H<y.pages.length-1&&y.movePage(H,y.pages.length-1)}}else if(mxEvent.isControlDown(u)||mxClient.IS_MAC&&mxEvent.isMetaDown(u)){if(37==u.keyCode)return function(){0<H&&y.selectNextPage(!1)};if(38==u.keyCode)return function(){0<H&&y.selectPage(y.pages[0])};if(39==u.keyCode)return function(){H<y.pages.length-1&&y.selectNextPage(!0)};if(40==u.keyCode)return function(){H<y.pages.length-1&&y.selectPage(y.pages[y.pages.length-1])}}}return!(65<=u.keyCode&&90>=u.keyCode)|| x.isSelectionEmpty()||mxEvent.isAltDown(u)||mxEvent.isShiftDown(u)||mxEvent.isControlDown(u)||mxClient.IS_MAC&&mxEvent.isMetaDown(u)?g.apply(this,arguments):null}}return f};var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var f=e.apply(this,arguments);if(null==f)try{var g=d.indexOf("<mxfile ");if(0<=g){var x=d.lastIndexOf("</mxfile>");x>g&&(f=d.substring(g,x+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g, -""))}else{var z=mxUtils.parseXml(d),u=this.editor.extractGraphModel(z.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=u?mxUtils.getXml(u):""}}catch(H){}return f};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var f=d.indexOf('<meta charset="utf-8">');0<=f&&(d=d.slice(0,f)+'<meta charset="utf-8"/>'+d.slice(f+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d){d=this.validateFileData(d); -d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var f=null!=d?this.editor.extractGraphModel(d,!0):null;null!=f&&(d=f);if(null!=d){f=this.editor.graph;f.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,x=d.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<x.length||1==x.length&&x[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var z=x.length-1;0<=z;z--){var u=this.updatePageRoot(new DiagramPage(x[z]));null==u.getName()&& -u.setName(mxResources.get("pageWithNumber",[z+1]));f.model.execute(new ChangePage(this,u,0==z?u:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root); -if(null!=g)for(z=0;z<g.length;z++)f.model.execute(new ChangePage(this,g[z],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,f,g,x,z,u,H,J,D,G,V){f=null!=f?f:this.editor.graph;z=null!=z?z:!1;D=null!=D?D:!0;var U=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var Y="_blank";else U=Y=x;if(null==d)return"";var O=d;if("mxfile"!=O.nodeName.toLowerCase()){if(V){var qa=d.ownerDocument.createElement("diagram");qa.setAttribute("id",Editor.guid()); -qa.appendChild(d)}else{qa=Graph.zapGremlins(mxUtils.getXml(d));O=Graph.compress(qa);if(Graph.decompress(O)!=qa)return qa;qa=d.ownerDocument.createElement("diagram");qa.setAttribute("id",Editor.guid());mxUtils.setTextContent(qa,O)}O=d.ownerDocument.createElement("mxfile");O.appendChild(qa)}G?(O=O.cloneNode(!0),O.removeAttribute("modified"),O.removeAttribute("host"),O.removeAttribute("agent"),O.removeAttribute("etag"),O.removeAttribute("userAgent"),O.removeAttribute("version"),O.removeAttribute("editor"), -O.removeAttribute("type")):(O.removeAttribute("userAgent"),O.removeAttribute("version"),O.removeAttribute("editor"),O.removeAttribute("pages"),O.removeAttribute("type"),mxClient.IS_CHROMEAPP?O.setAttribute("host","Chrome"):EditorUi.isElectronApp?O.setAttribute("host","Electron"):O.setAttribute("host",window.location.hostname),O.setAttribute("modified",(new Date).toISOString()),O.setAttribute("agent",navigator.appVersion),O.setAttribute("version",EditorUi.VERSION),O.setAttribute("etag",Editor.guid()), -d=null!=g?g.getMode():this.mode,null!=d&&O.setAttribute("type",d),1<O.getElementsByTagName("diagram").length&&null!=this.pages&&O.setAttribute("pages",this.pages.length));V=V?mxUtils.getPrettyXml(O):mxUtils.getXml(O);if(!u&&!z&&(H||null!=g&&/(\.html)$/i.test(g.getTitle())))V=this.getHtml2(mxUtils.getXml(O),f,null!=g?g.getTitle():null,Y,U);else if(u||!z&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(x=null),V=this.getEmbeddedSvg(V,f, -x,null,J,D,U);return V};EditorUi.prototype.getXmlFileData=function(d,f,g,x){d=null!=d?d:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var z=this.editor.getGraphXml(d,x);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(D){var G=D.getElementsByTagName("mxGraphModel");G=0<G.length?G[0]:null;null==G&&g?(G=mxUtils.trim(mxUtils.getTextContent(D)),D=D.cloneNode(!1),0<G.length&&(G=Graph.decompress(G),null!=G&&0<G.length&&D.appendChild(mxUtils.parseXml(G).documentElement))):null==G||g?D= -D.cloneNode(!0):(D=D.cloneNode(!1),mxUtils.setTextContent(D,Graph.compressNode(G)));z.appendChild(D)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(z)),z=this.fileNode.cloneNode(!1),f)d(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var u=this.pages[f],H=u.node;if(u!=this.currentPage)if(u.needsUpdate){var J=new mxCodec(mxUtils.createXmlDocument());J=J.encode(new mxGraphModel(u.root));this.editor.graph.saveViewState(u.viewState, +""))}else{var y=mxUtils.parseXml(d),u=this.editor.extractGraphModel(y.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=u?mxUtils.getXml(u):""}}catch(H){}return f};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var f=d.indexOf('<meta charset="utf-8">');0<=f&&(d=d.slice(0,f)+'<meta charset="utf-8"/>'+d.slice(f+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d){d=this.validateFileData(d); +d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var f=null!=d?this.editor.extractGraphModel(d,!0):null;null!=f&&(d=f);if(null!=d){f=this.editor.graph;f.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,x=d.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<x.length||1==x.length&&x[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var y=x.length-1;0<=y;y--){var u=this.updatePageRoot(new DiagramPage(x[y]));null==u.getName()&& +u.setName(mxResources.get("pageWithNumber",[y+1]));f.model.execute(new ChangePage(this,u,0==y?u:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root); +if(null!=g)for(y=0;y<g.length;y++)f.model.execute(new ChangePage(this,g[y],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,f,g,x,y,u,H,J,D,G,W){f=null!=f?f:this.editor.graph;y=null!=y?y:!1;D=null!=D?D:!0;var T=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var Z="_blank";else T=Z=x;if(null==d)return"";var N=d;if("mxfile"!=N.nodeName.toLowerCase()){if(W){var qa=d.ownerDocument.createElement("diagram");qa.setAttribute("id",Editor.guid()); +qa.appendChild(d)}else{qa=Graph.zapGremlins(mxUtils.getXml(d));N=Graph.compress(qa);if(Graph.decompress(N)!=qa)return qa;qa=d.ownerDocument.createElement("diagram");qa.setAttribute("id",Editor.guid());mxUtils.setTextContent(qa,N)}N=d.ownerDocument.createElement("mxfile");N.appendChild(qa)}G?(N=N.cloneNode(!0),N.removeAttribute("modified"),N.removeAttribute("host"),N.removeAttribute("agent"),N.removeAttribute("etag"),N.removeAttribute("userAgent"),N.removeAttribute("version"),N.removeAttribute("editor"), +N.removeAttribute("type")):(N.removeAttribute("userAgent"),N.removeAttribute("version"),N.removeAttribute("editor"),N.removeAttribute("pages"),N.removeAttribute("type"),mxClient.IS_CHROMEAPP?N.setAttribute("host","Chrome"):EditorUi.isElectronApp?N.setAttribute("host","Electron"):N.setAttribute("host",window.location.hostname),N.setAttribute("modified",(new Date).toISOString()),N.setAttribute("agent",navigator.appVersion),N.setAttribute("version",EditorUi.VERSION),N.setAttribute("etag",Editor.guid()), +d=null!=g?g.getMode():this.mode,null!=d&&N.setAttribute("type",d),1<N.getElementsByTagName("diagram").length&&null!=this.pages&&N.setAttribute("pages",this.pages.length));W=W?mxUtils.getPrettyXml(N):mxUtils.getXml(N);if(!u&&!y&&(H||null!=g&&/(\.html)$/i.test(g.getTitle())))W=this.getHtml2(mxUtils.getXml(N),f,null!=g?g.getTitle():null,Z,T);else if(u||!y&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(x=null),W=this.getEmbeddedSvg(W,f, +x,null,J,D,T);return W};EditorUi.prototype.getXmlFileData=function(d,f,g,x){d=null!=d?d:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var y=this.editor.getGraphXml(d,x);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(D){var G=D.getElementsByTagName("mxGraphModel");G=0<G.length?G[0]:null;null==G&&g?(G=mxUtils.trim(mxUtils.getTextContent(D)),D=D.cloneNode(!1),0<G.length&&(G=Graph.decompress(G),null!=G&&0<G.length&&D.appendChild(mxUtils.parseXml(G).documentElement))):null==G||g?D= +D.cloneNode(!0):(D=D.cloneNode(!1),mxUtils.setTextContent(D,Graph.compressNode(G)));y.appendChild(D)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(y)),y=this.fileNode.cloneNode(!1),f)d(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var u=this.pages[f],H=u.node;if(u!=this.currentPage)if(u.needsUpdate){var J=new mxCodec(mxUtils.createXmlDocument());J=J.encode(new mxGraphModel(u.root));this.editor.graph.saveViewState(u.viewState, J,null,x);EditorUi.removeChildNodes(H);mxUtils.setTextContent(H,Graph.compressNode(J));delete u.needsUpdate}else x&&(this.updatePageRoot(u),null!=u.viewState.backgroundImage&&(null!=u.viewState.backgroundImage.originalSrc?u.viewState.backgroundImage=this.createImageForPageLink(u.viewState.backgroundImage.originalSrc,u):Graph.isPageLink(u.viewState.backgroundImage.src)&&(u.viewState.backgroundImage=this.createImageForPageLink(u.viewState.backgroundImage.src,u))),null!=u.viewState.backgroundImage&& -null!=u.viewState.backgroundImage.originalSrc&&(J=new mxCodec(mxUtils.createXmlDocument()),J=J.encode(new mxGraphModel(u.root)),this.editor.graph.saveViewState(u.viewState,J,null,x),H=H.cloneNode(!1),mxUtils.setTextContent(H,Graph.compressNode(J))));d(H)}return z};EditorUi.prototype.anonymizeString=function(d,f){for(var g=[],x=0;x<d.length;x++){var z=d.charAt(x);0<=EditorUi.ignoredAnonymizedChars.indexOf(z)?g.push(z):isNaN(parseInt(z))?z.toLowerCase()!=z?g.push(String.fromCharCode(65+Math.round(25* -Math.random()))):z.toUpperCase()!=z?g.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(z)?g.push(" "):g.push("?"):g.push(f?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var f=0;f<d[EditorUi.DIFF_INSERT].length;f++)try{var g=mxUtils.parseXml(d[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name"))); -d[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(g)}catch(u){d[EditorUi.DIFF_INSERT][f].data=u.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var x in d[EditorUi.DIFF_UPDATE]){var z=d[EditorUi.DIFF_UPDATE][x];null!=z.name&&(z.name=this.anonymizeString(z.name));null!=z.cells&&(f=mxUtils.bind(this,function(u){var H=z.cells[u];if(null!=H){for(var J in H)null!=H[J].value&&(H[J].value="["+H[J].value.length+"]"),null!=H[J].xmlValue&&(H[J].xmlValue="["+H[J].xmlValue.length+"]"),null!=H[J].style&&(H[J].style= -"["+H[J].style.length+"]"),mxUtils.isEmptyObject(H[J])&&delete H[J];mxUtils.isEmptyObject(H)&&delete z.cells[u]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(z.cells)&&delete z.cells);mxUtils.isEmptyObject(z)&&delete d[EditorUi.DIFF_UPDATE][x]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,f){if(null!=d.attributes)for(var g=0;g<d.attributes.length;g++)"as"!=d.attributes[g].name&& +null!=u.viewState.backgroundImage.originalSrc&&(J=new mxCodec(mxUtils.createXmlDocument()),J=J.encode(new mxGraphModel(u.root)),this.editor.graph.saveViewState(u.viewState,J,null,x),H=H.cloneNode(!1),mxUtils.setTextContent(H,Graph.compressNode(J))));d(H)}return y};EditorUi.prototype.anonymizeString=function(d,f){for(var g=[],x=0;x<d.length;x++){var y=d.charAt(x);0<=EditorUi.ignoredAnonymizedChars.indexOf(y)?g.push(y):isNaN(parseInt(y))?y.toLowerCase()!=y?g.push(String.fromCharCode(65+Math.round(25* +Math.random()))):y.toUpperCase()!=y?g.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(y)?g.push(" "):g.push("?"):g.push(f?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var f=0;f<d[EditorUi.DIFF_INSERT].length;f++)try{var g=mxUtils.parseXml(d[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name"))); +d[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(g)}catch(u){d[EditorUi.DIFF_INSERT][f].data=u.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var x in d[EditorUi.DIFF_UPDATE]){var y=d[EditorUi.DIFF_UPDATE][x];null!=y.name&&(y.name=this.anonymizeString(y.name));null!=y.cells&&(f=mxUtils.bind(this,function(u){var H=y.cells[u];if(null!=H){for(var J in H)null!=H[J].value&&(H[J].value="["+H[J].value.length+"]"),null!=H[J].xmlValue&&(H[J].xmlValue="["+H[J].xmlValue.length+"]"),null!=H[J].style&&(H[J].style= +"["+H[J].style.length+"]"),mxUtils.isEmptyObject(H[J])&&delete H[J];mxUtils.isEmptyObject(H)&&delete y.cells[u]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(y.cells)&&delete y.cells);mxUtils.isEmptyObject(y)&&delete d[EditorUi.DIFF_UPDATE][x]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,f){if(null!=d.attributes)for(var g=0;g<d.attributes.length;g++)"as"!=d.attributes[g].name&& d.setAttribute(d.attributes[g].name,this.anonymizeString(d.attributes[g].value,f));if(null!=d.childNodes)for(g=0;g<d.childNodes.length;g++)this.anonymizeAttributes(d.childNodes[g],f)};EditorUi.prototype.anonymizeNode=function(d,f){f=d.getElementsByTagName("mxCell");for(var g=0;g<f.length;g++)null!=f[g].getAttribute("value")&&f[g].setAttribute("value","["+f[g].getAttribute("value").length+"]"),null!=f[g].getAttribute("xmlValue")&&f[g].setAttribute("xmlValue","["+f[g].getAttribute("xmlValue").length+ "]"),null!=f[g].getAttribute("style")&&f[g].setAttribute("style","["+f[g].getAttribute("style").length+"]"),null!=f[g].parentNode&&"root"!=f[g].parentNode.nodeName&&null!=f[g].parentNode.parentNode&&(f[g].setAttribute("id",f[g].parentNode.getAttribute("id")),f[g].parentNode.parentNode.replaceChild(f[g],f[g].parentNode));return d};EditorUi.prototype.synchronizeCurrentFile=function(d){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!d&&f.invalidChecksum? -f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),d?f.reloadFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(d,f,g,x,z,u,H, -J,D,G,V){z=null!=z?z:!0;u=null!=u?u:!1;var U=this.editor.graph;if(f||!d&&null!=D&&/(\.svg)$/i.test(D.getTitle())){var Y=null!=U.themes&&"darkTheme"==U.defaultThemeName;G=!1;if(Y||null!=this.pages&&this.currentPage!=this.pages[0]){var O=U.getGlobalVariable;U=this.createTemporaryGraph(Y?U.getDefaultStylesheet():U.getStylesheet());U.setBackgroundImage=this.editor.graph.setBackgroundImage;U.background=this.editor.graph.background;var qa=this.pages[0];this.currentPage==qa?U.setBackgroundImage(this.editor.graph.backgroundImage): -null!=qa.viewState&&null!=qa.viewState&&U.setBackgroundImage(qa.viewState.backgroundImage);U.getGlobalVariable=function(oa){return"page"==oa?qa.getName():"pagenumber"==oa?1:O.apply(this,arguments)};document.body.appendChild(U.container);U.model.setRoot(qa.root)}}H=null!=H?H:this.getXmlFileData(z,u,G,V);D=null!=D?D:this.getCurrentFile();d=this.createFileData(H,U,D,window.location.href,d,f,g,x,z,J,G);U!=this.editor.graph&&U.container.parentNode.removeChild(U.container);return d};EditorUi.prototype.getHtml= -function(d,f,g,x,z,u){u=null!=u?u:!0;var H=null,J=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){H=u?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var D=f.view.scale;u=Math.floor(H.x/D-f.view.translate.x);D=Math.floor(H.y/D-f.view.translate.y);H=f.background;null==z&&(f=this.getBasenames().join(";"),0<f.length&&(J=EditorUi.drawHost+"/embed.js?s="+f));d.setAttribute("x0",u);d.setAttribute("y0",D)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize", -"0"),d.setAttribute("fit","0"),d.setAttribute("border","20"),d.setAttribute("links","1"),null!=x&&d.setAttribute("edit",x));null!=z&&(z=z.replace(/&/g,"&"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";x=Graph.compress(d);Graph.decompress(x)!=d&&(x=encodeURIComponent(d));return(null==z?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=z?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==z?null!=g? -"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=z?'<meta http-equiv="refresh" content="0;URL=\''+z+"'\"/>\n":"")+"</head>\n<body"+(null==z&&null!=H&&H!=mxConstants.NONE?' style="background-color:'+H+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+x+"</div>\n</div>\n"+(null==z?'<script type="text/javascript" src="'+J+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+ -z+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,f,g,x,z){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=z&&(z=z.replace(/&/g,"&"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(d),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage)); -return(null==z?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=z?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==z?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=z?'<meta http-equiv="refresh" content="0;URL=\''+z+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+ -mxUtils.htmlEntities(JSON.stringify(d))+'"></div>\n'+(null==z?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+z+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPage=null;var f=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement: +f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),d?f.reloadFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(d,f,g,x,y,u,H, +J,D,G,W){y=null!=y?y:!0;u=null!=u?u:!1;var T=this.editor.graph;if(f||!d&&null!=D&&/(\.svg)$/i.test(D.getTitle())){var Z=null!=T.themes&&"darkTheme"==T.defaultThemeName;G=!1;if(Z||null!=this.pages&&this.currentPage!=this.pages[0]){var N=T.getGlobalVariable;T=this.createTemporaryGraph(Z?T.getDefaultStylesheet():T.getStylesheet());T.setBackgroundImage=this.editor.graph.setBackgroundImage;T.background=this.editor.graph.background;var qa=this.pages[0];this.currentPage==qa?T.setBackgroundImage(this.editor.graph.backgroundImage): +null!=qa.viewState&&null!=qa.viewState&&T.setBackgroundImage(qa.viewState.backgroundImage);T.getGlobalVariable=function(oa){return"page"==oa?qa.getName():"pagenumber"==oa?1:N.apply(this,arguments)};document.body.appendChild(T.container);T.model.setRoot(qa.root)}}H=null!=H?H:this.getXmlFileData(y,u,G,W);D=null!=D?D:this.getCurrentFile();d=this.createFileData(H,T,D,window.location.href,d,f,g,x,y,J,G);T!=this.editor.graph&&T.container.parentNode.removeChild(T.container);return d};EditorUi.prototype.getHtml= +function(d,f,g,x,y,u){u=null!=u?u:!0;var H=null,J=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){H=u?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var D=f.view.scale;u=Math.floor(H.x/D-f.view.translate.x);D=Math.floor(H.y/D-f.view.translate.y);H=f.background;null==y&&(f=this.getBasenames().join(";"),0<f.length&&(J=EditorUi.drawHost+"/embed.js?s="+f));d.setAttribute("x0",u);d.setAttribute("y0",D)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize", +"0"),d.setAttribute("fit","0"),d.setAttribute("border","20"),d.setAttribute("links","1"),null!=x&&d.setAttribute("edit",x));null!=y&&(y=y.replace(/&/g,"&"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";x=Graph.compress(d);Graph.decompress(x)!=d&&(x=encodeURIComponent(d));return(null==y?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=y?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==y?null!=g? +"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=y?'<meta http-equiv="refresh" content="0;URL=\''+y+"'\"/>\n":"")+"</head>\n<body"+(null==y&&null!=H&&H!=mxConstants.NONE?' style="background-color:'+H+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+x+"</div>\n</div>\n"+(null==y?'<script type="text/javascript" src="'+J+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+ +y+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,f,g,x,y){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=y&&(y=y.replace(/&/g,"&"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(d),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage)); +return(null==y?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=y?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==y?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=y?'<meta http-equiv="refresh" content="0;URL=\''+y+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+ +mxUtils.htmlEntities(JSON.stringify(d))+'"></div>\n'+(null==y?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+y+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPage=null;var f=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement: null,g=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(g)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[d],"node",[f],"cause",[g]),Error(mxResources.get("notADiagramFile")+" ("+g+")");d=null!=f?this.editor.extractGraphModel(f,!0):null;null!=d&&(f=d);if(null!=f&&"mxfile"==f.nodeName&&(d=f.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){g=null;this.fileNode=f;this.pages=[];for(var x=0;x<d.length;x++)null== d[x].getAttribute("id")&&d[x].setAttribute("id",x),f=new DiagramPage(d[x]),null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[x+1])),this.pages.push(f),null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]&&(g=f);this.currentPage=null!=g?g:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")), -this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var z=urlParams["layer-ids"].split(" ");f={};for(x=0;x<z.length;x++)f[z[x]]=!0;var u=this.editor.graph.getModel(),H=u.getChildren(u.root);for(x=0;x<H.length;x++){var J=H[x];u.setVisible(J,f[J.id]||!1)}}catch(D){}};EditorUi.prototype.getBaseFilename=function(d){var f= +this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var y=urlParams["layer-ids"].split(" ");f={};for(x=0;x<y.length;x++)f[y[x]]=!0;var u=this.editor.graph.getModel(),H=u.getChildren(u.root);for(x=0;x<H.length;x++){var J=H[x];u.setVisible(J,f[J.id]||!1)}}catch(D){}};EditorUi.prototype.getBaseFilename=function(d){var f= this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile= -function(d,f,g,x,z,u,H,J,D,G,V,U){try{x=null!=x?x:this.editor.graph.isSelectionEmpty();var Y=this.getBaseFilename("remoteSvg"==d?!1:!z),O=Y+("xml"==d||"pdf"==d&&V?".drawio":"")+"."+d;if("xml"==d){var qa=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,x,z,null,null,null,f);this.saveData(O,d,qa,"text/xml")}else if("html"==d)qa=this.getHtml2(this.getFileData(!0),this.editor.graph,Y),this.saveData(O,d,qa,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"== -d)O=Y+".png";else if("jpeg"==d)O=Y+".jpg";else if("remoteSvg"==d){O=Y+".svg";d="svg";var oa=parseInt(D);"string"===typeof J&&0<J.indexOf("%")&&(J=parseInt(J)/100);if(0<oa){var aa=this.editor.graph,da=aa.getGraphBounds();var ia=Math.ceil(da.width*J/aa.view.scale+2*oa);var L=Math.ceil(da.height*J/aa.view.scale+2*oa)}}this.saveRequest(O,d,mxUtils.bind(this,function(ka,q){try{var F=this.editor.graph.pageVisible;0==u&&(this.editor.graph.pageVisible=u);var R=this.createDownloadRequest(ka,d,x,q,H,z,J,D, -G,V,U,ia,L);this.editor.graph.pageVisible=F;return R}catch(W){this.handleError(W)}}))}else{var Z=null,P=mxUtils.bind(this,function(ka){ka.length<=MAX_REQUEST_SIZE?this.saveData(O,"svg",ka,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(Z)}))});if("svg"==d){var ca=this.editor.graph.background;if(H||ca==mxConstants.NONE)ca=null;var ja=this.editor.graph.getSvg(ca,null,null,null,null,x);g&&this.editor.graph.addSvgShadow(ja); -this.editor.convertImages(ja,mxUtils.bind(this,mxUtils.bind(this,function(ka){this.spinner.stop();P(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(ka))})))}else O=Y+".svg",Z=this.getFileData(!1,!0,null,mxUtils.bind(this,function(ka){this.spinner.stop();P(ka)}),x)}}catch(ka){this.handleError(ka)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,x,z,u,H,J,D,G,V,U,Y){var O=this.editor.graph,qa=O.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==u?!1:"xmlpng"!=f,null, -null,null,!1,"pdf"==f);var oa="",aa="";if(qa.width*qa.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};G=G?"1":"0";"pdf"==f&&(null!=V?aa="&from="+V.from+"&to="+V.to:0==u&&(aa="&allPages=1"));"xmlpng"==f&&(G="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(u=0;u<this.pages.length;u++)if(this.pages[u]==this.currentPage){oa="&from="+u;break}u=O.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!z?z||null!=u&&u!=mxConstants.NONE|| -(u="#ffffff"):u=mxConstants.NONE;z={globalVars:O.getExportVariables()};D&&(z.grid={size:O.gridSize,steps:O.view.gridSteps,color:O.view.gridColor});Graph.translateDiagram&&(z.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+oa+aa+"&bg="+(null!=u?u:mxConstants.NONE)+"&base64="+x+"&embedXml="+G+"&xml="+encodeURIComponent(g)+(null!=d?"&filename="+encodeURIComponent(d):"")+"&extras="+encodeURIComponent(JSON.stringify(z))+(null!=H?"&scale="+H:"")+(null!=J?"&border="+ -J:"")+(U&&isFinite(U)?"&w="+U:"")+(Y&&isFinite(Y)?"&h="+Y:""))};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,f,g){var x=window.location.hash,z=mxUtils.bind(this,function(H){var J=null!=d.data?d.data:"";null!=H&&0<H.length&&(0<J.length&&(J+="\n"),J+=H);H=new LocalFile(this,"csv"!=d.format&&0<J.length?J:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);H.getHash=function(){return x};this.fileLoaded(H); -"csv"==d.format&&this.importCsv(J,mxUtils.bind(this,function(Y){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var D=null!=d.interval?parseInt(d.interval):6E4,G=null,V=mxUtils.bind(this,function(){var Y=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(O){Y===this.currentPage&&(200<=O.getStatus()&&300>=O.getStatus()?(this.updateDiagram(O.getText()),U()): -this.handleError({message:mxResources.get("error")+" "+O.getStatus()}))}),mxUtils.bind(this,function(O){this.handleError(O)}))}),U=mxUtils.bind(this,function(){window.clearTimeout(G);G=window.setTimeout(V,D)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){U();V()}));U();V()}null!=f&&f()});if(null!=d.url&&0<d.url.length){var u=this.editor.getProxiedUrl(d.url);this.editor.loadUrl(u,mxUtils.bind(this,function(H){z(H)}),mxUtils.bind(this,function(H){null!=g&&g(H)}))}else z("")}; -EditorUi.prototype.updateDiagram=function(d){function f(L){var Z=new mxCellOverlay(L.image||z.warningImage,L.tooltip,L.align,L.valign,L.offset);Z.addListener(mxEvent.CLICK,function(P,ca){x.alert(L.tooltip)});return Z}var g=null,x=this;if(null!=d&&0<d.length&&(g=mxUtils.parseXml(d),d=null!=g?g.documentElement:null,null!=d&&"updates"==d.nodeName)){var z=this.editor.graph,u=z.getModel();u.beginUpdate();var H=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var J=u.getCell(d.getAttribute("id")); -if(null!=J){try{var D=d.getAttribute("value");if(null!=D){var G=mxUtils.parseXml(D).documentElement;if(null!=G)if("1"==G.getAttribute("replace-value"))u.setValue(J,G);else for(var V=G.attributes,U=0;U<V.length;U++)z.setAttributeForCell(J,V[U].nodeName,0<V[U].nodeValue.length?V[U].nodeValue:null)}}catch(L){null!=window.console&&console.log("Error in value for "+J.id+": "+L)}try{var Y=d.getAttribute("style");null!=Y&&z.model.setStyle(J,Y)}catch(L){null!=window.console&&console.log("Error in style for "+ -J.id+": "+L)}try{var O=d.getAttribute("icon");if(null!=O){var qa=0<O.length?JSON.parse(O):null;null!=qa&&qa.append||z.removeCellOverlays(J);null!=qa&&z.addCellOverlay(J,f(qa))}}catch(L){null!=window.console&&console.log("Error in icon for "+J.id+": "+L)}try{var oa=d.getAttribute("geometry");if(null!=oa){oa=JSON.parse(oa);var aa=z.getCellGeometry(J);if(null!=aa){aa=aa.clone();for(key in oa){var da=parseFloat(oa[key]);"dx"==key?aa.x+=da:"dy"==key?aa.y+=da:"dw"==key?aa.width+=da:"dh"==key?aa.height+= -da:aa[key]=parseFloat(oa[key])}z.model.setGeometry(J,aa)}}}catch(L){null!=window.console&&console.log("Error in icon for "+J.id+": "+L)}}}else if("model"==d.nodeName){for(var ia=d.firstChild;null!=ia&&ia.nodeType!=mxConstants.NODETYPE_ELEMENT;)ia=ia.nextSibling;null!=ia&&(new mxCodec(d.firstChild)).decode(ia,u)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(z.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))z.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")|| -0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(H=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{u.endUpdate()}null!=H&&this.chromelessResize&&this.chromelessResize(!0,H)}return g};EditorUi.prototype.getCopyFilename=function(d,f){var g=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var x=g.lastIndexOf(".");0<=x&&(d=g.substring(x),g=g.substring(0,x));if(f){f=g;var z=new Date;g=z.getFullYear();x=z.getMonth()+1;var u= -z.getDate(),H=z.getHours(),J=z.getMinutes();z=z.getSeconds();g=f+(" "+(g+"-"+x+"-"+u+"-"+H+"-"+J+"-"+z))}return g=mxResources.get("copyOf",[g])+d};EditorUi.prototype.fileLoaded=function(d,f){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var x=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var z=mxUtils.bind(this, +function(d,f,g,x,y,u,H,J,D,G,W,T){try{x=null!=x?x:this.editor.graph.isSelectionEmpty();var Z=this.getBaseFilename("remoteSvg"==d?!1:!y),N=Z+("xml"==d||"pdf"==d&&W?".drawio":"")+"."+d;if("xml"==d){var qa=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,x,y,null,null,null,f);this.saveData(N,d,qa,"text/xml")}else if("html"==d)qa=this.getHtml2(this.getFileData(!0),this.editor.graph,Z),this.saveData(N,d,qa,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"== +d)N=Z+".png";else if("jpeg"==d)N=Z+".jpg";else if("remoteSvg"==d){N=Z+".svg";d="svg";var oa=parseInt(D);"string"===typeof J&&0<J.indexOf("%")&&(J=parseInt(J)/100);if(0<oa){var S=this.editor.graph,fa=S.getGraphBounds();var ia=Math.ceil(fa.width*J/S.view.scale+2*oa);var M=Math.ceil(fa.height*J/S.view.scale+2*oa)}}this.saveRequest(N,d,mxUtils.bind(this,function(ka,q){try{var E=this.editor.graph.pageVisible;0==u&&(this.editor.graph.pageVisible=u);var Q=this.createDownloadRequest(ka,d,x,q,H,y,J,D,G,W, +T,ia,M);this.editor.graph.pageVisible=E;return Q}catch(Y){this.handleError(Y)}}))}else{var aa=null,X=mxUtils.bind(this,function(ka){ka.length<=MAX_REQUEST_SIZE?this.saveData(N,"svg",ka,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(aa)}))});if("svg"==d){var ja=this.editor.graph.background;if(H||ja==mxConstants.NONE)ja=null;var ca=this.editor.graph.getSvg(ja,null,null,null,null,x);g&&this.editor.graph.addSvgShadow(ca); +this.editor.convertImages(ca,mxUtils.bind(this,mxUtils.bind(this,function(ka){this.spinner.stop();X(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(ka))})))}else N=Z+".svg",aa=this.getFileData(!1,!0,null,mxUtils.bind(this,function(ka){this.spinner.stop();X(ka)}),x)}}catch(ka){this.handleError(ka)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,x,y,u,H,J,D,G,W,T,Z){var N=this.editor.graph,qa=N.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==u?!1:"xmlpng"!=f,null, +null,null,!1,"pdf"==f);var oa="",S="";if(qa.width*qa.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};G=G?"1":"0";"pdf"==f&&(null!=W?S="&from="+W.from+"&to="+W.to:0==u&&(S="&allPages=1"));"xmlpng"==f&&(G="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(u=0;u<this.pages.length;u++)if(this.pages[u]==this.currentPage){oa="&from="+u;break}u=N.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!y?y||null!=u&&u!=mxConstants.NONE||(u= +"#ffffff"):u=mxConstants.NONE;y={globalVars:N.getExportVariables()};D&&(y.grid={size:N.gridSize,steps:N.view.gridSteps,color:N.view.gridColor});Graph.translateDiagram&&(y.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+oa+S+"&bg="+(null!=u?u:mxConstants.NONE)+"&base64="+x+"&embedXml="+G+"&xml="+encodeURIComponent(g)+(null!=d?"&filename="+encodeURIComponent(d):"")+"&extras="+encodeURIComponent(JSON.stringify(y))+(null!=H?"&scale="+H:"")+(null!=J?"&border="+J:"")+ +(T&&isFinite(T)?"&w="+T:"")+(Z&&isFinite(Z)?"&h="+Z:""))};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,f,g){var x=window.location.hash,y=mxUtils.bind(this,function(H){var J=null!=d.data?d.data:"";null!=H&&0<H.length&&(0<J.length&&(J+="\n"),J+=H);H=new LocalFile(this,"csv"!=d.format&&0<J.length?J:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);H.getHash=function(){return x};this.fileLoaded(H); +"csv"==d.format&&this.importCsv(J,mxUtils.bind(this,function(Z){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var D=null!=d.interval?parseInt(d.interval):6E4,G=null,W=mxUtils.bind(this,function(){var Z=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(N){Z===this.currentPage&&(200<=N.getStatus()&&300>=N.getStatus()?(this.updateDiagram(N.getText()),T()): +this.handleError({message:mxResources.get("error")+" "+N.getStatus()}))}),mxUtils.bind(this,function(N){this.handleError(N)}))}),T=mxUtils.bind(this,function(){window.clearTimeout(G);G=window.setTimeout(W,D)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){T();W()}));T();W()}null!=f&&f()});if(null!=d.url&&0<d.url.length){var u=this.editor.getProxiedUrl(d.url);this.editor.loadUrl(u,mxUtils.bind(this,function(H){y(H)}),mxUtils.bind(this,function(H){null!=g&&g(H)}))}else y("")}; +EditorUi.prototype.updateDiagram=function(d){function f(M){var aa=new mxCellOverlay(M.image||y.warningImage,M.tooltip,M.align,M.valign,M.offset);aa.addListener(mxEvent.CLICK,function(X,ja){x.alert(M.tooltip)});return aa}var g=null,x=this;if(null!=d&&0<d.length&&(g=mxUtils.parseXml(d),d=null!=g?g.documentElement:null,null!=d&&"updates"==d.nodeName)){var y=this.editor.graph,u=y.getModel();u.beginUpdate();var H=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var J=u.getCell(d.getAttribute("id")); +if(null!=J){try{var D=d.getAttribute("value");if(null!=D){var G=mxUtils.parseXml(D).documentElement;if(null!=G)if("1"==G.getAttribute("replace-value"))u.setValue(J,G);else for(var W=G.attributes,T=0;T<W.length;T++)y.setAttributeForCell(J,W[T].nodeName,0<W[T].nodeValue.length?W[T].nodeValue:null)}}catch(M){null!=window.console&&console.log("Error in value for "+J.id+": "+M)}try{var Z=d.getAttribute("style");null!=Z&&y.model.setStyle(J,Z)}catch(M){null!=window.console&&console.log("Error in style for "+ +J.id+": "+M)}try{var N=d.getAttribute("icon");if(null!=N){var qa=0<N.length?JSON.parse(N):null;null!=qa&&qa.append||y.removeCellOverlays(J);null!=qa&&y.addCellOverlay(J,f(qa))}}catch(M){null!=window.console&&console.log("Error in icon for "+J.id+": "+M)}try{var oa=d.getAttribute("geometry");if(null!=oa){oa=JSON.parse(oa);var S=y.getCellGeometry(J);if(null!=S){S=S.clone();for(key in oa){var fa=parseFloat(oa[key]);"dx"==key?S.x+=fa:"dy"==key?S.y+=fa:"dw"==key?S.width+=fa:"dh"==key?S.height+=fa:S[key]= +parseFloat(oa[key])}y.model.setGeometry(J,S)}}}catch(M){null!=window.console&&console.log("Error in icon for "+J.id+": "+M)}}}else if("model"==d.nodeName){for(var ia=d.firstChild;null!=ia&&ia.nodeType!=mxConstants.NODETYPE_ELEMENT;)ia=ia.nextSibling;null!=ia&&(new mxCodec(d.firstChild)).decode(ia,u)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(y.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))y.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")|| +0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(H=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{u.endUpdate()}null!=H&&this.chromelessResize&&this.chromelessResize(!0,H)}return g};EditorUi.prototype.getCopyFilename=function(d,f){var g=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var x=g.lastIndexOf(".");0<=x&&(d=g.substring(x),g=g.substring(0,x));if(f){f=g;var y=new Date;g=y.getFullYear();x=y.getMonth()+1;var u= +y.getDate(),H=y.getHours(),J=y.getMinutes();y=y.getSeconds();g=f+(" "+(g+"-"+x+"-"+u+"-"+H+"-"+J+"-"+y))}return g=mxResources.get("copyOf",[g])+d};EditorUi.prototype.fileLoaded=function(d,f){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var x=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var y=mxUtils.bind(this, function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=g&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!f&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();f||this.showSplash()});if(null!=d)try{mxClient.IS_SF&& "min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(d);d.addListener("descriptorChanged",this.descriptorChangedListener);d.addListener("contentChanged",this.descriptorChangedListener);d.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(d.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();d.isEditable()?d.isModified()?(d.addUnsavedStatus(),null!=d.backupPatch&& d.patch([d.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded")); x=!0;if(!this.isOffline()&&null!=d.getMode()){var u="1"==urlParams.sketch?"sketch":uiTheme;if(null==u)u="default";else if("sketch"==u||"min"==u)u+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:d.getMode().toUpperCase()+"-OPEN-FILE-"+d.getHash(),action:"size_"+d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+u})}EditorUi.debug("File.opened",[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode== d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=d.getMode())try{this.addRecent({id:d.getHash(),title:d.getTitle(),mode:d.getMode()})}catch(H){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(H){}}catch(H){this.fileLoadedError=H;if(null!=d)try{d.close()}catch(J){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+H.message,label:"stack_"+H.stack})}catch(J){}d=mxUtils.bind(this, -function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||z():z()});f?d():this.handleError(H,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else z();return x};EditorUi.prototype.getHashValueForPages=function(d,f){var g=0,x=new mxGraphModel,z=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var u=0;u<d.length;u++){this.updatePageRoot(d[u]);var H= -d[u].node.cloneNode(!1);H.removeAttribute("name");x.root=d[u].root;var J=z.encode(x);this.editor.graph.saveViewState(d[u].viewState,J,!0);J.removeAttribute("pageWidth");J.removeAttribute("pageHeight");H.appendChild(J);null!=f&&(f.eltCount+=H.getElementsByTagName("*").length,f.nodeCount+=H.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(H,function(D,G,V,U){return!U||"mxGeometry"!=D.nodeName&&"mxPoint"!=D.nodeName||"x"!=G&&"y"!=G&&"width"!=G&&"height"!=G?U&&"mxCell"==D.nodeName&&"previous"== -G?null:V:Math.round(V)},f)<<0}return g};EditorUi.prototype.hashValue=function(d,f,g){var x=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(x^=this.hashValue(d.nodeName,f,g));if(null!=d.attributes){null!=g&&(g.attrCount+=d.attributes.length);for(var z=0;z<d.attributes.length;z++){var u=d.attributes[z].name,H=null!=f?f(d,u,d.attributes[z].value,!0):d.attributes[z].value;null!=H&&(x^=this.hashValue(u, -f,g)+this.hashValue(H,f,g))}}if(null!=d.childNodes)for(z=0;z<d.childNodes.length;z++)x=(x<<5)-x+this.hashValue(d.childNodes[z],f,g)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);f=0;null!=g&&(g.byteCount+=d.length);for(z=0;z<d.length;z++)f=(f<<5)-f+d.charCodeAt(z)<<0;x^=f}return x};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,f,g,x,z,u,H){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage|| +function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||y():y()});f?d():this.handleError(H,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else y();return x};EditorUi.prototype.getHashValueForPages=function(d,f){var g=0,x=new mxGraphModel,y=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var u=0;u<d.length;u++){this.updatePageRoot(d[u]);var H= +d[u].node.cloneNode(!1);H.removeAttribute("name");x.root=d[u].root;var J=y.encode(x);this.editor.graph.saveViewState(d[u].viewState,J,!0);J.removeAttribute("pageWidth");J.removeAttribute("pageHeight");H.appendChild(J);null!=f&&(f.eltCount+=H.getElementsByTagName("*").length,f.nodeCount+=H.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(H,function(D,G,W,T){return!T||"mxGeometry"!=D.nodeName&&"mxPoint"!=D.nodeName||"x"!=G&&"y"!=G&&"width"!=G&&"height"!=G?T&&"mxCell"==D.nodeName&&"previous"== +G?null:W:Math.round(W)},f)<<0}return g};EditorUi.prototype.hashValue=function(d,f,g){var x=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(x^=this.hashValue(d.nodeName,f,g));if(null!=d.attributes){null!=g&&(g.attrCount+=d.attributes.length);for(var y=0;y<d.attributes.length;y++){var u=d.attributes[y].name,H=null!=f?f(d,u,d.attributes[y].value,!0):d.attributes[y].value;null!=H&&(x^=this.hashValue(u, +f,g)+this.hashValue(H,f,g))}}if(null!=d.childNodes)for(y=0;y<d.childNodes.length;y++)x=(x<<5)-x+this.hashValue(d.childNodes[y],f,g)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);f=0;null!=g&&(g.byteCount+=d.length);for(y=0;y<d.length;y++)f=(f<<5)-f+d.charCodeAt(y)<<0;x^=f}return x};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,f,g,x,y,u,H){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage|| mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(d){null==d&&(d=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,d,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(d){var f=mxUtils.createXmlDocument(),g=f.createElement("mxlibrary");mxUtils.setTextContent(g,JSON.stringify(d));f.appendChild(g); return mxUtils.getXml(f)};EditorUi.prototype.closeLibrary=function(d){null!=d&&(this.removeLibrarySidebar(d.getHash()),d.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(d.getHash()),".scratchpad"==d.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(d){var f=this.sidebar.palettes[d];if(null!=f){for(var g=0;g<f.length;g++)f[g].parentNode.removeChild(f[g]);delete this.sidebar.palettes[d]}};EditorUi.prototype.repositionLibrary=function(d){var f=this.sidebar.container; if(null==d){var g=this.sidebar.palettes["L.scratchpad"];null==g&&(g=this.sidebar.palettes.search);null!=g&&(d=g[g.length-1].nextSibling)}d=null!=d?d:f.firstChild.nextSibling.nextSibling;g=f.lastChild;var x=g.previousSibling;f.insertBefore(g,d);f.insertBefore(x,g)};EditorUi.prototype.loadLibrary=function(d,f){var g=mxUtils.parseXml(d.getData());if("mxlibrary"==g.documentElement.nodeName){var x=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(d,x,g.documentElement.getAttribute("title"), -f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.libraryLoaded=function(d,f,g,x){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var z=this.sidebar.palettes[d.getHash()];z=null!=z?z[z.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var u=null,H=mxUtils.bind(this,function(ia,L){0==ia.length&&d.isEditable()? -(null==u&&(u=document.createElement("div"),u.className="geDropTarget",mxUtils.write(u,mxResources.get("dragElementsHere"))),L.appendChild(u)):this.addLibraryEntries(ia,L)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==g&&(g=d.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var J=this.sidebar.addPalette(d.getHash(),g,null!=x?x:!0,mxUtils.bind(this,function(ia){H(f,ia)}));this.repositionLibrary(z);var D=J.parentNode.previousSibling;x=D.getAttribute("title"); -null!=x&&0<x.length&&".scratchpad"!=d.title&&D.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+x);var G=document.createElement("div");G.style.position="absolute";G.style.right="0px";G.style.top="0px";G.style.padding="8px";G.style.backgroundColor="inherit";D.style.position="relative";var V=document.createElement("img");V.className="geAdaptiveAsset";V.setAttribute("src",Editor.crossImage);V.setAttribute("title",mxResources.get("close"));V.setAttribute("valign","absmiddle");V.setAttribute("border", -"0");V.style.position="relative";V.style.top="2px";V.style.width="14px";V.style.cursor="pointer";V.style.margin="0 3px";var U=null;if(".scratchpad"!=d.title||this.closableScratchpad)G.appendChild(V),mxEvent.addListener(V,"click",mxUtils.bind(this,function(ia){if(!mxEvent.isConsumed(ia)){var L=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=U?this.confirm(mxResources.get("allChangesLost"),null,L,mxResources.get("cancel"),mxResources.get("discardChanges")):L();mxEvent.consume(ia)}}));if(d.isEditable()){var Y= -this.editor.graph,O=null,qa=mxUtils.bind(this,function(ia){this.showLibraryDialog(d.getTitle(),J,f,d,d.getMode());mxEvent.consume(ia)}),oa=mxUtils.bind(this,function(ia){d.setModified(!0);d.isAutosave()?(null!=O&&null!=O.parentNode&&O.parentNode.removeChild(O),O=V.cloneNode(!1),O.setAttribute("src",Editor.spinImage),O.setAttribute("title",mxResources.get("saving")),O.style.cursor="default",O.style.marginRight="2px",O.style.marginTop="-2px",G.insertBefore(O,G.firstChild),D.style.paddingRight=18*G.childNodes.length+ -"px",this.saveLibrary(d.getTitle(),f,d,d.getMode(),!0,!0,function(){null!=O&&null!=O.parentNode&&(O.parentNode.removeChild(O),D.style.paddingRight=18*G.childNodes.length+"px")})):null==U&&(U=V.cloneNode(!1),U.setAttribute("src",Editor.saveImage),U.setAttribute("title",mxResources.get("save")),G.insertBefore(U,G.firstChild),mxEvent.addListener(U,"click",mxUtils.bind(this,function(L){this.saveLibrary(d.getTitle(),f,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==U||d.isModified()||(D.style.paddingRight= -18*G.childNodes.length+"px",U.parentNode.removeChild(U),U=null)});mxEvent.consume(L)})),D.style.paddingRight=18*G.childNodes.length+"px")}),aa=mxUtils.bind(this,function(ia,L,Z,P){ia=Y.cloneCells(mxUtils.sortCells(Y.model.getTopmostCells(ia)));for(var ca=0;ca<ia.length;ca++){var ja=Y.getCellGeometry(ia[ca]);null!=ja&&ja.translate(-L.x,-L.y)}J.appendChild(this.sidebar.createVertexTemplateFromCells(ia,L.width,L.height,P||"",!0,null,!1));ia={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(ia))), -w:L.width,h:L.height};null!=P&&(ia.title=P);f.push(ia);oa(Z);null!=u&&null!=u.parentNode&&0<f.length&&(u.parentNode.removeChild(u),u=null)}),da=mxUtils.bind(this,function(ia){if(Y.isSelectionEmpty())Y.getRubberband().isActive()?(Y.getRubberband().execute(ia),Y.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var L=Y.getSelectionCells(),Z=Y.view.getBounds(L),P=Y.view.scale;Z.x/=P;Z.y/=P;Z.width/=P;Z.height/=P;Z.x-=Y.view.translate.x; -Z.y-=Y.view.translate.y;aa(L,Z)}mxEvent.consume(ia)});mxEvent.addGestureListeners(J,function(){},mxUtils.bind(this,function(ia){Y.isMouseDown&&null!=Y.panningManager&&null!=Y.graphHandler.first&&(Y.graphHandler.suspend(),null!=Y.graphHandler.hint&&(Y.graphHandler.hint.style.visibility="hidden"),J.style.backgroundColor="#f1f3f4",J.style.cursor="copy",Y.panningManager.stop(),Y.autoScroll=!1,mxEvent.consume(ia))}),mxUtils.bind(this,function(ia){Y.isMouseDown&&null!=Y.panningManager&&null!=Y.graphHandler&& -(J.style.backgroundColor="",J.style.cursor="default",this.sidebar.showTooltips=!0,Y.panningManager.stop(),Y.graphHandler.reset(),Y.isMouseDown=!1,Y.autoScroll=!0,da(ia),mxEvent.consume(ia))}));mxEvent.addListener(J,"mouseleave",mxUtils.bind(this,function(ia){Y.isMouseDown&&null!=Y.graphHandler.first&&(Y.graphHandler.resume(),null!=Y.graphHandler.hint&&(Y.graphHandler.hint.style.visibility="visible"),J.style.backgroundColor="",J.style.cursor="",Y.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(J, -"dragover",mxUtils.bind(this,function(ia){J.style.backgroundColor="#f1f3f4";ia.dataTransfer.dropEffect="copy";J.style.cursor="copy";this.sidebar.hideTooltip();ia.stopPropagation();ia.preventDefault()})),mxEvent.addListener(J,"drop",mxUtils.bind(this,function(ia){J.style.cursor="";J.style.backgroundColor="";0<ia.dataTransfer.files.length&&this.importFiles(ia.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(L,Z,P,ca,ja,ka,q,F,R){if(null!=L&&"image/"==Z.substring(0,6))L="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+ -this.convertDataUri(L),L=[new mxCell("",new mxGeometry(0,0,ja,ka),L)],L[0].vertex=!0,aa(L,new mxRectangle(0,0,ja,ka),ia,mxEvent.isAltDown(ia)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),null!=u&&null!=u.parentNode&&0<f.length&&(u.parentNode.removeChild(u),u=null);else{var W=!1,T=mxUtils.bind(this,function(ba,ha){null!=ba&&"application/pdf"==ha&&(ha=Editor.extractGraphModelFromPdf(ba),null!=ha&&0<ha.length&&(ba=ha));if(null!=ba)if(ba=mxUtils.parseXml(ba),"mxlibrary"==ba.documentElement.nodeName)try{var ra= -JSON.parse(mxUtils.getTextContent(ba.documentElement));H(ra,J);f=f.concat(ra);oa(ia);this.spinner.stop();W=!0}catch(za){}else if("mxfile"==ba.documentElement.nodeName)try{var ta=ba.documentElement.getElementsByTagName("diagram");for(ra=0;ra<ta.length;ra++){var ma=this.stringToCells(Editor.getDiagramNodeXml(ta[ra])),pa=this.editor.graph.getBoundingBoxFromGeometry(ma);aa(ma,new mxRectangle(0,0,pa.width,pa.height),ia)}W=!0}catch(za){null!=window.console&&console.log("error in drop handler:",za)}W||(this.spinner.stop(), -this.handleError({message:mxResources.get("errorLoadingFile")}));null!=u&&null!=u.parentNode&&0<f.length&&(u.parentNode.removeChild(u),u=null)});null!=R&&null!=q&&(/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q))?this.importVisio(R,function(ba){T(ba,"text/xml")},null,q):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(L,q)&&null!=R?this.isExternalDataComms()?this.parseFile(R,mxUtils.bind(this,function(ba){4==ba.readyState&&(this.spinner.stop(),200<=ba.status&&299>=ba.status?T(ba.responseText, -"text/xml"):this.handleError({message:mxResources.get(413==ba.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):T(L,Z)}}));ia.stopPropagation();ia.preventDefault()})),mxEvent.addListener(J,"dragleave",function(ia){J.style.cursor="";J.style.backgroundColor="";ia.stopPropagation();ia.preventDefault()}));V=V.cloneNode(!1);V.setAttribute("src",Editor.editImage);V.setAttribute("title", -mxResources.get("edit"));G.insertBefore(V,G.firstChild);mxEvent.addListener(V,"click",qa);mxEvent.addListener(J,"dblclick",function(ia){mxEvent.getSource(ia)==J&&qa(ia)});x=V.cloneNode(!1);x.setAttribute("src",Editor.plusImage);x.setAttribute("title",mxResources.get("add"));G.insertBefore(x,G.firstChild);mxEvent.addListener(x,"click",da);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(x=document.createElement("span"),x.setAttribute("title",mxResources.get("help")),x.style.cssText= -"color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(x,"?"),mxEvent.addGestureListeners(x,mxUtils.bind(this,function(ia){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(ia)})),G.insertBefore(x,G.firstChild))}D.appendChild(G);D.style.paddingRight=18*G.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,f){for(var g=0;g<d.length;g++){var x=d[g],z=x.data;if(null!=z){z=this.convertDataUri(z);var u="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;"; -"fixed"==x.aspect&&(u+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(u+"image="+z,x.w,x.h,"",x.title||"",!1,null,!0))}else null!=x.xml&&(z=this.stringToCells(Graph.decompress(x.xml)),0<z.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(z,x.w,x.h,x.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(d){return null!=d?d[mxLanguage]||d.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight= -64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="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):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor= -Editor.darkColor,Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.shapeBackgroundColor=Editor.darkColor,Graph.prototype.shapeForegroundColor=Editor.lightColor,Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor=Editor.darkColor,mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR= -"#00ff00");Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];"1"==urlParams.sketch&&("undefined"!==typeof Menus&&(Menus.prototype.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts)),Graph.prototype.defaultVertexStyle={hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none", -rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d, -f,g,x,z,u,H){d=new ImageDialog(this,d,f,g,x,z,u,H);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,f){d=null!=d?d:mxUtils.bind(this,function(g,x){x||(g=new ChangePageSetup(this,null,g),g.ignoreColor=!0,this.editor.graph.model.execute(g))});d=new BackgroundImageDialog(this,d,f);this.showDialog(d.container,400,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,f,g,x,z){d=new LibraryDialog(this, -d,f,g,x,z);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(u){u&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var f=k.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&f.refresh()}));return f};EditorUi.prototype.createSidebarFooterContainer=function(){var d=this.createDiv("geSidebarContainer geSidebarFooter"); -d.style.position="absolute";d.style.overflow="hidden";var f=document.createElement("a");f.className="geTitle";f.style.color="#DF6C0C";f.style.fontWeight="bold";f.style.height="100%";f.style.paddingTop="9px";f.innerHTML="<span>+</span>";var g=f.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(f,mxResources.get("moreShapes")+"...");mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(x){x.preventDefault()}));mxEvent.addListener(f, -"click",mxUtils.bind(this,function(x){this.actions.get("shapes").funct();mxEvent.consume(x)}));d.appendChild(f);return d};EditorUi.prototype.handleError=function(d,f,g,x,z,u,H){var J=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},D=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{H?null!=window.console&&console.error("EditorUi.handleError:",d):EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message, -d.filename,d.lineNumber,d.columnNumber,d,"INFO")}catch(O){}if(null!=D||null!=f){H=mxUtils.htmlEntities(mxResources.get("unknownError"));var G=mxResources.get("ok"),V=null;f=null!=f?f:mxResources.get("error");if(null!=D){null!=D.retry&&(G=mxResources.get("cancel"),V=function(){J();D.retry()});if(404==D.code||404==D.status||403==D.code){H=403==D.code?null!=D.message?mxUtils.htmlEntities(D.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=z?z:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+ -(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var U=null!=z?null:null!=u?u:window.location.hash;if(null!=U&&("#G"==U.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==U.substring(0,45))&&(null!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&&"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.error.data[0].reason)||404==D.code||404==D.status)){U="#U"==U.substring(0, -2)?U.substring(45,U.lastIndexOf("%26ex")):U.substring(2);this.showError(f,H,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+U);this.handleError(d,f,g,x,z)}),V,mxResources.get("changeUser"),mxUtils.bind(this,function(){function O(){da.innerText="";for(var ia=0;ia<qa.length;ia++){var L=document.createElement("option");mxUtils.write(L,qa[ia].displayName);L.value=ia;da.appendChild(L);L=document.createElement("option");L.innerHTML= -" ";mxUtils.write(L,"<"+qa[ia].email+">");L.setAttribute("disabled","disabled");da.appendChild(L)}L=document.createElement("option");mxUtils.write(L,mxResources.get("addAccount"));L.value=qa.length;da.appendChild(L)}var qa=this.drive.getUsersList(),oa=document.createElement("div"),aa=document.createElement("span");aa.style.marginTop="6px";mxUtils.write(aa,mxResources.get("changeUser")+": ");oa.appendChild(aa);var da=document.createElement("select");da.style.width="200px";O();mxEvent.addListener(da, -"change",mxUtils.bind(this,function(){var ia=da.value,L=qa.length!=ia;L&&this.drive.setUser(qa[ia]);this.drive.authorize(L,mxUtils.bind(this,function(){L||(qa=this.drive.getUsersList(),O())}),mxUtils.bind(this,function(Z){this.handleError(Z)}),!0)}));oa.appendChild(da);oa=new CustomDialog(this,oa,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(oa.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!= -g&&g()}),480,150);return}}null!=D.message?H=""==D.message&&null!=D.name?mxUtils.htmlEntities(D.name):mxUtils.htmlEntities(D.message):null!=D.response&&null!=D.response.error?H=mxUtils.htmlEntities(D.response.error):"undefined"!==typeof window.App&&(D.code==App.ERROR_TIMEOUT?H=mxUtils.htmlEntities(mxResources.get("timeout")):D.code==App.ERROR_BUSY?H=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof D&&0<D.length&&(H=mxUtils.htmlEntities(D)))}var Y=u=null;null!=D&&null!=D.helpLink?(u= -mxResources.get("help"),Y=mxUtils.bind(this,function(){return this.editor.graph.openLink(D.helpLink)})):null!=D&&null!=D.ownerEmail&&(u=mxResources.get("contactOwner"),H+=mxUtils.htmlEntities(" ("+u+": "+D.ownerEmail+")"),Y=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(D.ownerEmail))}));this.showError(f,H,G,g,V,null,null,u,Y,null,null,null,x?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(d,f,g){d=new ErrorDialog(this,null,d,mxResources.get("ok"),f); -this.showDialog(d.container,g||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,f,g,x,z,u){var H=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},J=Math.min(200,28*Math.ceil(d.length/50));d=new ConfirmDialog(this,d,function(){H();null!=f&&f()},function(){H();null!=g&&g()},x,z,null,null,null,null,J);this.showDialog(d.container,340,46+J,!0,u);d.init()};EditorUi.prototype.showBanner=function(d,f,g,x){var z=!1;if(!(this.bannerShowing||this["hideBanner"+d]|| -isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){var u=document.createElement("div");u.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(u.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(u.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(u.style,"transition", -"all 1s ease");u.className="geBtn gePrimaryBtn";z=document.createElement("img");z.setAttribute("src",IMAGE_PATH+"/logo.png");z.setAttribute("border","0");z.setAttribute("align","absmiddle");z.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";u.appendChild(z);z=document.createElement("img");z.setAttribute("src",Dialog.prototype.closeImage);z.setAttribute("title",mxResources.get(x?"doNotShowAgain":"close"));z.setAttribute("border","0");z.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;"; -u.appendChild(z);mxUtils.write(u,f);document.body.appendChild(u);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var H=document.createElement("input");H.setAttribute("type","checkbox");H.setAttribute("id","geDoNotShowAgainCheckbox");H.style.marginRight="6px";if(!x){f.appendChild(H);var J=document.createElement("label");J.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(J,mxResources.get("doNotShowAgain"));f.appendChild(J); -u.style.paddingBottom="30px";u.appendChild(f)}var D=mxUtils.bind(this,function(){null!=u.parentNode&&(u.parentNode.removeChild(u),this.bannerShowing=!1,H.checked||x)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});mxEvent.addListener(z,"click",mxUtils.bind(this,function(V){mxEvent.consume(V);D()}));var G=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(u.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this, -function(){D()}),1E3)});mxEvent.addListener(u,"click",mxUtils.bind(this,function(V){var U=mxEvent.getSource(V);U!=H&&U!=J?(null!=g&&g(),D(),mxEvent.consume(V)):G()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(u.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(G,3E4);z=!0}return z};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas= -function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,f,g,x){d=d.toDataURL("image/"+g);if(null!=d&&6<d.length)null!=f&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(f))),0<x&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",x));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,f,g,x,z){var u="jpeg"==g?"jpg":g;x=this.getBaseFilename(x)+(null!=f?".drawio":"")+"."+u;d=this.createImageDataUri(d, -f,g,z);this.saveData(x,u,d.substring(d.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,f){d=new TextareaDialog(this,d,f,null,null,mxResources.get("close"));this.showDialog(d.container,620,460, -!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,f,g,x,z,u){"text/xml"!=g||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=u?u:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=x?this.base64ToBlob(d,g):new Blob([d],{type:g}),navigator.msSaveOrOpenBlob(d,f);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(d,!0):(g.document.write(d), -g.document.close(),g.document.execCommand("SaveAs",!0,f),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(f+":",d):this.openInNewWindow(d,g,x);else{var H=document.createElement("a");u=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof H.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var J=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);u=65==(J?parseInt(J[2],10): -!1)?!1:u}if(u||this.isOffline()){H.href=URL.createObjectURL(x?this.base64ToBlob(d,g):new Blob([d],{type:g}));u?H.download=f:H.setAttribute("target","_blank");document.body.appendChild(H);try{window.setTimeout(function(){URL.revokeObjectURL(H.href)},2E4),H.click(),H.parentNode.removeChild(H)}catch(D){}}else this.createEchoRequest(d,f,g,x,z).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,f,g,x,z,u){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!= -g?"&mime="+g:"")+(null!=z?"&format="+z:"")+(null!=u?"&base64="+u:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(x?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,f){f=f||"";d=atob(d);for(var g=d.length,x=Math.ceil(g/1024),z=Array(x),u=0;u<x;++u){for(var H=1024*u,J=Math.min(H+1024,g),D=Array(J-H),G=0;H<J;++G,++H)D[G]=d[H].charCodeAt(0);z[u]=new Uint8Array(D)}return new Blob(z,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,g,x,z,u,H,J){u=null!=u?u:!1;H=null!=H?H:"vsdx"!= -z&&(!mxClient.IS_IOS||!navigator.standalone);z=this.getServiceCount(u);isLocalStorage&&z++;var D=4>=z?2:6<z?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(G,V){try{if("_blank"==V)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(d,g,x);else if(null!=g&&"text/html"==g.substring(0,9)){var U=new EmbedDialog(this,d);this.showDialog(U.container,450,240,!0,!0);U.init()}else{var Y=window.open("about:blank");null==Y?mxUtils.popup(d,!0):(Y.document.write("<pre>"+mxUtils.htmlEntities(d, -!1)+"</pre>"),Y.document.close())}else V==App.MODE_DEVICE||"download"==V?this.doSaveLocalFile(d,G,g,x,null,J):null!=G&&0<G.length&&this.pickFolder(V,mxUtils.bind(this,function(O){try{this.exportFile(d,G,g,x,V,O)}catch(qa){this.handleError(qa)}}))}catch(O){this.handleError(O)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,u,H,null,1<z,D,d,g,x);u=this.isServices(z)?z>D?390:280:160;this.showDialog(f.container,420,u,!0,!0);f.init()};EditorUi.prototype.openInNewWindow= -function(d,f,g){var x=window.open("about:blank");null==x||null==x.document?mxUtils.popup(d,!0):("image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||g?(d=g?d:btoa(unescape(encodeURIComponent(d))),x.document.write('<html><img style="max-width:100%;" src="data:'+f+";base64,"+d+'"/></html>')):x.document.write("<html>"+d+"</html>"):x.document.write("<html><pre>"+mxUtils.htmlEntities(d,!1)+"</pre></html>"),x.document.close())};var m=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled= -function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(d){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=d(mxUtils.bind(this,function(x){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position= -"",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor= -"#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&& -(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var z=f.getBoundingClientRect();this.tagsDialog.style.left=z.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";z=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=z.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(x)}), -Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var x=this.editor.graph.getAllTags();f.style.display=0<x.length?"":"none"}))}m.apply(this,arguments);this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&& -(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog), -this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var g=d(mxUtils.bind(this,function(x){var z=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",z);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)z.apply(this); -else{this.exportDialog=document.createElement("div");var u=g.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color= -"#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=u.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";u=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=u.zIndex;var H=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});H.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this, -function(J){H.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var D=this.createImageDataUri(J,null,"png");J=document.createElement("img");J.style.maxWidth="140px";J.style.maxHeight="140px";J.style.cursor="pointer";J.style.backgroundColor="white";J.setAttribute("title",mxResources.get("openInNewWindow"));J.setAttribute("border","0");J.setAttribute("src",D);this.exportDialog.appendChild(J);mxEvent.addListener(J,"click",mxUtils.bind(this, -function(){this.openInNewWindow(D.substring(D.indexOf(",")+1),"image/png",!0);z.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(J){this.spinner.stop();this.handleError(J)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",z);document.body.appendChild(this.exportDialog)}mxEvent.consume(x)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,f,g,x,z){this.isLocalFileSave()? -this.saveLocalFile(g,d,x,z,f):this.saveRequest(d,f,mxUtils.bind(this,function(u,H){return this.createEchoRequest(g,u,x,z,f,H)}),g,z,x)};EditorUi.prototype.saveRequest=function(d,f,g,x,z,u,H){H=null!=H?H:!mxClient.IS_IOS||!navigator.standalone;var J=this.getServiceCount(!1);isLocalStorage&&J++;var D=4>=J?2:6<J?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(G,V){if("_blank"==V||null!=G&&0<G.length){var U=g("_blank"==V?null:G,V==App.MODE_DEVICE||"download"==V||null==V||"_blank"==V?"0":"1"); -null!=U&&(V==App.MODE_DEVICE||"download"==V||"_blank"==V?U.simulate(document,"_blank"):this.pickFolder(V,mxUtils.bind(this,function(Y){u=null!=u?u:"pdf"==f?"application/pdf":"image/"+f;if(null!=x)try{this.exportFile(x,G,u,!0,V,Y)}catch(O){this.handleError(O)}else this.spinner.spin(document.body,mxResources.get("saving"))&&U.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=U.getStatus()&&299>=U.getStatus())try{this.exportFile(U.getText(),G,u,!0,V,Y)}catch(O){this.handleError(O)}else this.handleError({message:mxResources.get("errorSavingFile")})}), -function(O){this.spinner.stop();this.handleError(O)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,H,null,1<J,D,x,u,z);J=this.isServices(J)?4<J?390:280:160;this.showDialog(d.container,420,J,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,f,g,x,z,u){};EditorUi.prototype.pickFolder=function(d, -f,g){f(null)};EditorUi.prototype.exportSvg=function(d,f,g,x,z,u,H,J,D,G,V,U,Y,O){if(this.spinner.spin(document.body,mxResources.get("export")))try{var qa=this.editor.graph.isSelectionEmpty();g=null!=g?g:qa;var oa=f?null:this.editor.graph.background;oa==mxConstants.NONE&&(oa=null);null==oa&&0==f&&(oa=V?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var aa=this.editor.graph.getSvg(oa,d,H,J,null,g,null,null,"blank"==G?"_blank":"self"==G?"_top":null,null,!Y,V,U);x&&this.editor.graph.addSvgShadow(aa); -var da=this.getBaseFilename()+(z?".drawio":"")+".svg";O=null!=O?O:mxUtils.bind(this,function(Z){this.isLocalFileSave()||Z.length<=MAX_REQUEST_SIZE?this.saveData(da,"svg",Z,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(Z)}))});var ia=mxUtils.bind(this,function(Z){this.spinner.stop();z&&Z.setAttribute("content",this.getFileData(!0,null,null,null,g,D,null,null,null,!1));O(Graph.xmlDeclaration+"\n"+(z? -Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(Z))});this.editor.graph.mathEnabled&&this.editor.addMathCss(aa);var L=mxUtils.bind(this,function(Z){u?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(Z,ia,this.thumbImageCache)):ia(Z)});Y?this.embedFonts(aa,L):(this.editor.addFontCss(aa),L(aa))}catch(Z){this.handleError(Z)}};EditorUi.prototype.addRadiobox=function(d,f,g,x,z,u,H){return this.addCheckbox(d,g,x,z,u,H,!0,f)};EditorUi.prototype.addCheckbox= -function(d,f,g,x,z,u,H,J){u=null!=u?u:!0;var D=document.createElement("input");D.style.marginRight="8px";D.style.marginTop="16px";D.setAttribute("type",H?"radio":"checkbox");H="geCheckbox-"+Editor.guid();D.id=H;null!=J&&D.setAttribute("name",J);g&&(D.setAttribute("checked","checked"),D.defaultChecked=!0);x&&D.setAttribute("disabled","disabled");u&&(d.appendChild(D),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",H),d.appendChild(g),z||mxUtils.br(d));return D};EditorUi.prototype.addEditButton= -function(d,f){var g=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var x=this.getCurrentFile(),z="";null!=x&&x.getMode()!=App.MODE_DEVICE&&x.getMode()!=App.MODE_BROWSER&&(z=window.location.href);var u=document.createElement("select");u.style.maxWidth="200px";u.style.width="auto";u.style.marginLeft="8px";u.style.marginRight="10px";u.className="geBtn";x=document.createElement("option");x.setAttribute("value","blank");mxUtils.write(x,mxResources.get("makeCopy")); -u.appendChild(x);x=document.createElement("option");x.setAttribute("value","custom");mxUtils.write(x,mxResources.get("custom")+"...");u.appendChild(x);d.appendChild(u);mxEvent.addListener(u,"change",mxUtils.bind(this,function(){if("custom"==u.value){var H=new FilenameDialog(this,z,mxResources.get("ok"),function(J){null!=J?z=J:u.value="blank"},mxResources.get("url"),null,null,null,null,function(){u.value="blank"});this.showDialog(H.container,300,80,!0,!1);H.init()}}));mxEvent.addListener(g,"change", -mxUtils.bind(this,function(){g.checked&&(null==f||f.checked)?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return g.checked?"blank"===u.value?"_blank":z:null},getEditInput:function(){return g},getEditSelect:function(){return u}}};EditorUi.prototype.addLinkSection=function(d,f){function g(){var J=document.createElement("div");J.style.width="100%";J.style.height="100%";J.style.boxSizing="border-box";null!=u&&u!=mxConstants.NONE?(J.style.border= -"1px solid black",J.style.backgroundColor=u):(J.style.backgroundPosition="center center",J.style.backgroundRepeat="no-repeat",J.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");H.innerText="";H.appendChild(J)}mxUtils.write(d,mxResources.get("links")+":");var x=document.createElement("select");x.style.width="100px";x.style.padding="0px";x.style.marginLeft="8px";x.style.marginRight="10px";x.className="geBtn";var z=document.createElement("option");z.setAttribute("value","auto");mxUtils.write(z, -mxResources.get("automatic"));x.appendChild(z);z=document.createElement("option");z.setAttribute("value","blank");mxUtils.write(z,mxResources.get("openInNewWindow"));x.appendChild(z);z=document.createElement("option");z.setAttribute("value","self");mxUtils.write(z,mxResources.get("openInThisWindow"));x.appendChild(z);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),x.appendChild(f));d.appendChild(x); -mxUtils.write(d,mxResources.get("borderColor")+":");var u="#0000ff",H=null;H=mxUtils.button("",mxUtils.bind(this,function(J){this.pickColor(u||"none",function(D){u=D;g()});mxEvent.consume(J)}));g();H.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";H.style.marginLeft="4px";H.style.height="22px";H.style.width="22px";H.style.position="relative";H.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";H.className="geColorBtn";d.appendChild(H);mxUtils.br(d);return{getColor:function(){return u}, -getTarget:function(){return x.value},focus:function(){x.focus()}}};EditorUi.prototype.createUrlParameters=function(d,f,g,x,z,u,H){H=null!=H?H:[];x&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||H.push("lightbox=1"),"auto"!=d&&H.push("target="+d),null!=f&&f!=mxConstants.NONE&&H.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=z&&0<z.length&&H.push("edit="+encodeURIComponent(z)),u&&H.push("layers=1"),this.editor.graph.foldingEnabled&&H.push("nav=1"));g&&null!= -this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&H.push("page-id="+this.currentPage.getId());return H};EditorUi.prototype.createLink=function(d,f,g,x,z,u,H,J,D,G){D=this.createUrlParameters(d,f,g,x,z,u,D);d=this.getCurrentFile();f=!0;null!=H?g="#U"+encodeURIComponent(H):(d=this.getCurrentFile(),J||null==d||d.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))): -(g="#"+d.getHash(),f=!1));f&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&D.push("title="+encodeURIComponent(d.getTitle()));G&&1<g.length&&(D.push("open="+g.substring(1)),g="");return(x&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<D.length?"?"+D.join("&"):"")+g};EditorUi.prototype.createHtml=function(d,f,g,x,z,u,H,J,D,G,V,U){this.getBasenames(); -var Y={};""!=z&&z!=mxConstants.NONE&&(Y.highlight=z);"auto"!==x&&(Y.target=x);G||(Y.lightbox=!1);Y.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(Y.zoom=g/100);g=[];H&&(g.push("pages"),Y.resize=!0,null!=this.pages&&null!=this.currentPage&&(Y.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(g.push("zoom"),Y.resize=!0);J&&g.push("layers");D&&g.push("tags");0<g.length&&(G&&g.push("lightbox"),Y.toolbar=g.join(" "));null!=V&&0<V.length&&(Y.edit=V);null!=d?Y.url=d:Y.xml=this.getFileData(!0, -null,null,null,null,!H);f='<div class="mxgraph" style="'+(u?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(Y))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";U(f,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL: -EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,f,g,x){var z=document.createElement("div");z.style.whiteSpace="nowrap";var u=document.createElement("h3");mxUtils.write(u,mxResources.get("html"));u.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";z.appendChild(u);var H=document.createElement("div");H.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var J=document.createElement("input"); -J.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";J.setAttribute("value","url");J.setAttribute("type","radio");J.setAttribute("name","type-embedhtmldialog");u=J.cloneNode(!0);u.setAttribute("value","copy");H.appendChild(u);var D=document.createElement("span");mxUtils.write(D,mxResources.get("includeCopyOfMyDiagram"));H.appendChild(D);mxUtils.br(H);H.appendChild(J);D=document.createElement("span");mxUtils.write(D,mxResources.get("publicDiagramUrl"));H.appendChild(D);var G=this.getCurrentFile(); -null==g&&null!=G&&G.constructor==window.DriveFile&&(D=document.createElement("a"),D.style.paddingLeft="12px",D.style.color="gray",D.style.cursor="pointer",mxUtils.write(D,mxResources.get("share")),H.appendChild(D),mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(G.getId())})));u.setAttribute("checked","checked");null==g&&J.setAttribute("disabled","disabled");z.appendChild(H);var V=this.addLinkSection(z),U=this.addCheckbox(z,mxResources.get("zoom"), -!0,null,!0);mxUtils.write(z,":");var Y=document.createElement("input");Y.setAttribute("type","text");Y.style.marginRight="16px";Y.style.width="60px";Y.style.marginLeft="4px";Y.style.marginRight="12px";Y.value="100%";z.appendChild(Y);var O=this.addCheckbox(z,mxResources.get("fit"),!0);H=null!=this.pages&&1<this.pages.length;var qa=qa=this.addCheckbox(z,mxResources.get("allPages"),H,!H),oa=this.addCheckbox(z,mxResources.get("layers"),!0),aa=this.addCheckbox(z,mxResources.get("tags"),!0),da=this.addCheckbox(z, -mxResources.get("lightbox"),!0),ia=null;H=380;if(EditorUi.enableHtmlEditOption){ia=this.addEditButton(z,da);var L=ia.getEditInput();L.style.marginBottom="16px";H+=50;mxEvent.addListener(da,"change",function(){da.checked?L.removeAttribute("disabled"):L.setAttribute("disabled","disabled");L.checked&&da.checked?ia.getEditSelect().removeAttribute("disabled"):ia.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,z,mxUtils.bind(this,function(){x(J.checked?g:null,U.checked,Y.value, -V.getTarget(),V.getColor(),O.checked,qa.checked,oa.checked,aa.checked,da.checked,null!=ia?ia.getLink():null)}),null,d,f);this.showDialog(d.container,340,H,!0,!0);u.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,f,g,x,z,u,H,J){var D=document.createElement("div");D.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,d||mxResources.get("link"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";D.appendChild(G);var V=this.getCurrentFile(); -d=0;if(null==V||V.constructor!=window.DriveFile||f)H=null!=H?H:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{d=80;H=null!=H?H:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";G=document.createElement("div");G.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var U=document.createElement("div");U.style.whiteSpace="normal";mxUtils.write(U,mxResources.get("linkAccountRequired"));G.appendChild(U); -U=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(V.getId())}));U.style.marginTop="12px";U.className="geBtn";G.appendChild(U);D.appendChild(G);U=document.createElement("a");U.style.paddingLeft="12px";U.style.color="gray";U.style.fontSize="11px";U.style.cursor="pointer";mxUtils.write(U,mxResources.get("check"));G.appendChild(U);mxEvent.addListener(U,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(), -mxUtils.bind(this,function(P){this.spinner.stop();P=new ErrorDialog(this,null,mxResources.get(null!=P?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(P.container,300,80,!0,!1);P.init()}))}))}var Y=null,O=null;if(null!=g||null!=x)d+=30,mxUtils.write(D,mxResources.get("width")+":"),Y=document.createElement("input"),Y.setAttribute("type","text"),Y.style.marginRight="16px",Y.style.width="50px",Y.style.marginLeft="6px",Y.style.marginRight="16px",Y.style.marginBottom="10px", -Y.value="100%",D.appendChild(Y),mxUtils.write(D,mxResources.get("height")+":"),O=document.createElement("input"),O.setAttribute("type","text"),O.style.width="50px",O.style.marginLeft="6px",O.style.marginBottom="10px",O.value=x+"px",D.appendChild(O),mxUtils.br(D);var qa=this.addLinkSection(D,u);g=null!=this.pages&&1<this.pages.length;var oa=null;if(null==V||V.constructor!=window.DriveFile||f)oa=this.addCheckbox(D,mxResources.get("allPages"),g,!g);var aa=this.addCheckbox(D,mxResources.get("lightbox"), -!0,null,null,!u),da=this.addEditButton(D,aa),ia=da.getEditInput();u&&(ia.style.marginLeft=aa.style.marginLeft,aa.style.display="none",d-=20);var L=this.addCheckbox(D,mxResources.get("layers"),!0);L.style.marginLeft=ia.style.marginLeft;L.style.marginTop="8px";var Z=this.addCheckbox(D,mxResources.get("tags"),!0);Z.style.marginLeft=ia.style.marginLeft;Z.style.marginBottom="16px";Z.style.marginTop="16px";mxEvent.addListener(aa,"change",function(){aa.checked?(L.removeAttribute("disabled"),ia.removeAttribute("disabled")): -(L.setAttribute("disabled","disabled"),ia.setAttribute("disabled","disabled"));ia.checked&&aa.checked?da.getEditSelect().removeAttribute("disabled"):da.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,D,mxUtils.bind(this,function(){z(qa.getTarget(),qa.getColor(),null==oa?!0:oa.checked,aa.checked,da.getLink(),L.checked,null!=Y?Y.value:null,null!=O?O.value:null,Z.checked)}),null,mxResources.get("create"),H,J);this.showDialog(f.container,340,300+d,!0,!0);null!=Y?(Y.focus(), -mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Y.select():document.execCommand("selectAll",!1,null)):qa.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,g,x,z){var u=document.createElement("div");u.style.whiteSpace="nowrap";var H=document.createElement("h3");mxUtils.write(H,mxResources.get("image"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(z?"10":"4")+"px";u.appendChild(H);if(z){mxUtils.write(u,mxResources.get("zoom")+":");var J=document.createElement("input"); -J.setAttribute("type","text");J.style.marginRight="16px";J.style.width="60px";J.style.marginLeft="4px";J.style.marginRight="12px";J.value=this.lastExportZoom||"100%";u.appendChild(J);mxUtils.write(u,mxResources.get("borderWidth")+":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";D.style.width="60px";D.style.marginLeft="4px";D.value=this.lastExportBorder||"0";u.appendChild(D);mxUtils.br(u)}var G=this.addCheckbox(u,mxResources.get("selectionOnly"),!1, -this.editor.graph.isSelectionEmpty()),V=x?null:this.addCheckbox(u,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);H=this.editor.graph;var U=x?null:this.addCheckbox(u,mxResources.get("transparentBackground"),H.background==mxConstants.NONE||null==H.background);null!=U&&(U.style.marginBottom="16px");d=new CustomDialog(this,u,mxUtils.bind(this,function(){var Y=parseInt(J.value)/100||1,O=parseInt(D.value)||0;g(!G.checked,null!=V?V.checked:!1,null!=U?U.checked:!1,Y,O)}),null,d,f); -this.showDialog(d.container,300,(z?25:0)+(x?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,f,g,x,z,u,H,J,D){H=null!=H?H:Editor.defaultIncludeDiagram;var G=document.createElement("div");G.style.whiteSpace="nowrap";var V=this.editor.graph,U="jpeg"==J?220:300,Y=document.createElement("h3");mxUtils.write(Y,d);Y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";G.appendChild(Y);mxUtils.write(G,mxResources.get("zoom")+":");var O=document.createElement("input"); -O.setAttribute("type","text");O.style.marginRight="16px";O.style.width="60px";O.style.marginLeft="4px";O.style.marginRight="12px";O.value=this.lastExportZoom||"100%";G.appendChild(O);mxUtils.write(G,mxResources.get("borderWidth")+":");var qa=document.createElement("input");qa.setAttribute("type","text");qa.style.marginRight="16px";qa.style.width="60px";qa.style.marginLeft="4px";qa.value=this.lastExportBorder||"0";G.appendChild(qa);mxUtils.br(G);var oa=this.addCheckbox(G,mxResources.get("selectionOnly"), -!1,V.isSelectionEmpty()),aa=document.createElement("input");aa.style.marginTop="16px";aa.style.marginRight="8px";aa.style.marginLeft="24px";aa.setAttribute("disabled","disabled");aa.setAttribute("type","checkbox");var da=document.createElement("select");da.style.marginTop="16px";da.style.marginLeft="8px";d=["selectionOnly","diagram","page"];var ia={};for(Y=0;Y<d.length;Y++)if(!V.isSelectionEmpty()||"selectionOnly"!=d[Y]){var L=document.createElement("option");mxUtils.write(L,mxResources.get(d[Y])); -L.setAttribute("value",d[Y]);da.appendChild(L);ia[d[Y]]=L}D?(mxUtils.write(G,mxResources.get("size")+":"),G.appendChild(da),mxUtils.br(G),U+=26,mxEvent.addListener(da,"change",function(){"selectionOnly"==da.value&&(oa.checked=!0)})):u&&(G.appendChild(aa),mxUtils.write(G,mxResources.get("crop")),mxUtils.br(G),U+=30,mxEvent.addListener(oa,"change",function(){oa.checked?aa.removeAttribute("disabled"):aa.setAttribute("disabled","disabled")}));V.isSelectionEmpty()?D&&(oa.style.display="none",oa.nextSibling.style.display= -"none",oa.nextSibling.nextSibling.style.display="none",U-=30):(da.value="diagram",aa.setAttribute("checked","checked"),aa.defaultChecked=!0,mxEvent.addListener(oa,"change",function(){da.value=oa.checked?"selectionOnly":"diagram"}));var Z=this.addCheckbox(G,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=J),P=null;Editor.isDarkMode()&&(P=this.addCheckbox(G,mxResources.get("dark"),!0),U+=26);var ca=this.addCheckbox(G,mxResources.get("shadow"),V.shadowVisible),ja=null;if("png"==J||"jpeg"== -J)ja=this.addCheckbox(G,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),U+=30;var ka=this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram"),H,null,null,"jpeg"!=J);ka.style.marginBottom="16px";var q=document.createElement("input");q.style.marginBottom="16px";q.style.marginRight="8px";q.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||q.setAttribute("disabled","disabled");var F=document.createElement("select");F.style.maxWidth="260px";F.style.marginLeft= -"8px";F.style.marginRight="10px";F.style.marginBottom="16px";F.className="geBtn";u=document.createElement("option");u.setAttribute("value","none");mxUtils.write(u,mxResources.get("noChange"));F.appendChild(u);u=document.createElement("option");u.setAttribute("value","embedFonts");mxUtils.write(u,mxResources.get("embedFonts"));F.appendChild(u);u=document.createElement("option");u.setAttribute("value","lblToSvg");mxUtils.write(u,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp|| -F.appendChild(u);mxEvent.addListener(F,"change",mxUtils.bind(this,function(){"lblToSvg"==F.value?(q.checked=!0,q.setAttribute("disabled","disabled"),ia.page.style.display="none","page"==da.value&&(da.value="diagram"),ca.checked=!1,ca.setAttribute("disabled","disabled"),W.style.display="inline-block",R.style.display="none"):"disabled"==q.getAttribute("disabled")&&(q.checked=!1,q.removeAttribute("disabled"),ca.removeAttribute("disabled"),ia.page.style.display="",W.style.display="none",R.style.display= -"")}));f&&(G.appendChild(q),mxUtils.write(G,mxResources.get("embedImages")),mxUtils.br(G),mxUtils.write(G,mxResources.get("txtSettings")+":"),G.appendChild(F),mxUtils.br(G),U+=60);var R=document.createElement("select");R.style.maxWidth="260px";R.style.marginLeft="8px";R.style.marginRight="10px";R.className="geBtn";f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));R.appendChild(f);f=document.createElement("option");f.setAttribute("value", -"blank");mxUtils.write(f,mxResources.get("openInNewWindow"));R.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));R.appendChild(f);var W=document.createElement("div");mxUtils.write(W,mxResources.get("LinksLost"));W.style.margin="7px";W.style.display="none";"svg"==J&&(mxUtils.write(G,mxResources.get("links")+":"),G.appendChild(R),G.appendChild(W),mxUtils.br(G),mxUtils.br(G),U+=50);g=new CustomDialog(this,G,mxUtils.bind(this, -function(){this.lastExportBorder=qa.value;this.lastExportZoom=O.value;z(O.value,Z.checked,!oa.checked,ca.checked,ka.checked,q.checked,qa.value,aa.checked,!1,R.value,null!=ja?ja.checked:null,null!=P?P.checked:null,da.value,"embedFonts"==F.value,"lblToSvg"==F.value)}),null,g,x);this.showDialog(g.container,340,U,!0,!0,null,null,null,null,!0);O.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?O.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog= -function(d,f,g,x,z){var u=document.createElement("div");u.style.whiteSpace="nowrap";var H=this.editor.graph;if(null!=f){var J=document.createElement("h3");mxUtils.write(J,f);J.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";u.appendChild(J)}var D=this.addCheckbox(u,mxResources.get("fit"),!0),G=this.addCheckbox(u,mxResources.get("shadow"),H.shadowVisible&&x,!x),V=this.addCheckbox(u,g),U=this.addCheckbox(u,mxResources.get("lightbox"),!0),Y=this.addEditButton(u,U),O=Y.getEditInput(), -qa=1<H.model.getChildCount(H.model.getRoot()),oa=this.addCheckbox(u,mxResources.get("layers"),qa,!qa);oa.style.marginLeft=O.style.marginLeft;oa.style.marginBottom="12px";oa.style.marginTop="8px";mxEvent.addListener(U,"change",function(){U.checked?(qa&&oa.removeAttribute("disabled"),O.removeAttribute("disabled")):(oa.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"));O.checked&&U.checked?Y.getEditSelect().removeAttribute("disabled"):Y.getEditSelect().setAttribute("disabled", -"disabled")});f=new CustomDialog(this,u,mxUtils.bind(this,function(){d(D.checked,G.checked,V.checked,U.checked,Y.getLink(),oa.checked)}),null,mxResources.get("embed"),z);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,g,x,z,u,H,J){function D(O){var qa=" ",oa="";x&&(qa=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+ -EditorUi.lightboxHost+"/?client=1"+(null!=V?"&page="+V:"")+(z?"&edit=_blank":"")+(u?"&layers=1":"")+"');}})(this);\"",oa+="cursor:pointer;");d&&(oa+="max-width:100%;");var aa="";g&&(aa=' width="'+Math.round(G.width)+'" height="'+Math.round(G.height)+'"');H('<img src="'+O+'"'+aa+(""!=oa?' style="'+oa+'"':"")+qa+"/>")}var G=this.editor.graph.getGraphBounds(),V=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(O){var qa=x?this.getFileData(!0): -null;O=this.createImageDataUri(O,qa,"png");D(O)}),null,null,null,mxUtils.bind(this,function(O){J({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),G.width*G.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var U="";g&&(U="&w="+Math.round(2*G.width)+"&h="+Math.round(2*G.height));var Y=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(x?"1":"0")+U+"&xml="+encodeURIComponent(f));Y.send(mxUtils.bind(this,function(){200<= -Y.getStatus()&&299>=Y.getStatus()?D("data:image/png;base64,"+Y.getText()):J({message:mxResources.get("unknownError")})}))}else J({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(d,f,g,x,z,u,H){var J=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),D=J.getElementsByTagName("a");if(null!=D)for(var G=0;G<D.length;G++){var V=D[G].getAttribute("href");null!=V&&"#"==V.charAt(0)&&"_blank"==D[G].getAttribute("target")&&D[G].removeAttribute("target")}x&& -J.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(J);if(g){var U=" ",Y="";x&&(U="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(z?"&edit=_blank":"")+(u?"&layers=1": -"")+"');}})(this);\"",Y+="cursor:pointer;");d&&(Y+="max-width:100%;");this.editor.convertImages(J,mxUtils.bind(this,function(O){H('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(O))+'"'+(""!=Y?' style="'+Y+'"':"")+U+"/>")}))}else Y="",x&&(f=this.getSelectedPageIndex(),J.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+ -EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(z?"&edit=_blank":"")+(u?"&layers=1":"")+"');}}})(this);"),Y+="cursor:pointer;"),d&&(d=parseInt(J.getAttribute("width")),z=parseInt(J.getAttribute("height")),J.setAttribute("viewBox","-0.5 -0.5 "+d+" "+z),Y+="max-width:100%;max-height:"+z+"px;",J.removeAttribute("height")),""!=Y&&J.setAttribute("style",Y),this.editor.addFontCss(J),this.editor.graph.mathEnabled&&this.editor.addMathCss(J),H(mxUtils.getXml(J))};EditorUi.prototype.timeSince=function(d){d= +f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.libraryLoaded=function(d,f,g,x){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var y=this.sidebar.palettes[d.getHash()];y=null!=y?y[y.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var u=null,H=mxUtils.bind(this,function(ia,M){0==ia.length&&d.isEditable()? +(null==u&&(u=document.createElement("div"),u.className="geDropTarget",mxUtils.write(u,mxResources.get("dragElementsHere"))),M.appendChild(u)):this.addLibraryEntries(ia,M)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==g&&(g=d.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var J=this.sidebar.addPalette(d.getHash(),g,null!=x?x:!0,mxUtils.bind(this,function(ia){H(f,ia)}));this.repositionLibrary(y);var D=J.parentNode.previousSibling;x=D.getAttribute("title"); +null!=x&&0<x.length&&".scratchpad"!=d.title&&D.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+x);var G=document.createElement("div");G.style.position="absolute";G.style.right="0px";G.style.top="0px";G.style.padding="8px";G.style.backgroundColor="inherit";D.style.position="relative";var W=document.createElement("img");W.className="geAdaptiveAsset";W.setAttribute("src",Editor.crossImage);W.setAttribute("title",mxResources.get("close"));W.setAttribute("valign","absmiddle");W.setAttribute("border", +"0");W.style.position="relative";W.style.top="2px";W.style.width="14px";W.style.cursor="pointer";W.style.margin="0 3px";var T=null;if(".scratchpad"!=d.title||this.closableScratchpad)G.appendChild(W),mxEvent.addListener(W,"click",mxUtils.bind(this,function(ia){if(!mxEvent.isConsumed(ia)){var M=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=T?this.confirm(mxResources.get("allChangesLost"),null,M,mxResources.get("cancel"),mxResources.get("discardChanges")):M();mxEvent.consume(ia)}}));if(d.isEditable()){var Z= +this.editor.graph,N=null,qa=mxUtils.bind(this,function(ia){this.showLibraryDialog(d.getTitle(),J,f,d,d.getMode());mxEvent.consume(ia)}),oa=mxUtils.bind(this,function(ia){d.setModified(!0);d.isAutosave()?(null!=N&&null!=N.parentNode&&N.parentNode.removeChild(N),N=W.cloneNode(!1),N.setAttribute("src",Editor.spinImage),N.setAttribute("title",mxResources.get("saving")),N.style.cursor="default",N.style.marginRight="2px",N.style.marginTop="-2px",G.insertBefore(N,G.firstChild),D.style.paddingRight=18*G.childNodes.length+ +"px",this.saveLibrary(d.getTitle(),f,d,d.getMode(),!0,!0,function(){null!=N&&null!=N.parentNode&&(N.parentNode.removeChild(N),D.style.paddingRight=18*G.childNodes.length+"px")})):null==T&&(T=W.cloneNode(!1),T.setAttribute("src",Editor.saveImage),T.setAttribute("title",mxResources.get("save")),G.insertBefore(T,G.firstChild),mxEvent.addListener(T,"click",mxUtils.bind(this,function(M){this.saveLibrary(d.getTitle(),f,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==T||d.isModified()||(D.style.paddingRight= +18*G.childNodes.length+"px",T.parentNode.removeChild(T),T=null)});mxEvent.consume(M)})),D.style.paddingRight=18*G.childNodes.length+"px")}),S=mxUtils.bind(this,function(ia,M,aa,X){ia=Z.cloneCells(mxUtils.sortCells(Z.model.getTopmostCells(ia)));for(var ja=0;ja<ia.length;ja++){var ca=Z.getCellGeometry(ia[ja]);null!=ca&&ca.translate(-M.x,-M.y)}J.appendChild(this.sidebar.createVertexTemplateFromCells(ia,M.width,M.height,X||"",!0,null,!1));ia={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(ia))), +w:M.width,h:M.height};null!=X&&(ia.title=X);f.push(ia);oa(aa);null!=u&&null!=u.parentNode&&0<f.length&&(u.parentNode.removeChild(u),u=null)}),fa=mxUtils.bind(this,function(ia){if(Z.isSelectionEmpty())Z.getRubberband().isActive()?(Z.getRubberband().execute(ia),Z.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var M=Z.getSelectionCells(),aa=Z.view.getBounds(M),X=Z.view.scale;aa.x/=X;aa.y/=X;aa.width/=X;aa.height/=X;aa.x-= +Z.view.translate.x;aa.y-=Z.view.translate.y;S(M,aa)}mxEvent.consume(ia)});mxEvent.addGestureListeners(J,function(){},mxUtils.bind(this,function(ia){Z.isMouseDown&&null!=Z.panningManager&&null!=Z.graphHandler.first&&(Z.graphHandler.suspend(),null!=Z.graphHandler.hint&&(Z.graphHandler.hint.style.visibility="hidden"),J.style.backgroundColor="#f1f3f4",J.style.cursor="copy",Z.panningManager.stop(),Z.autoScroll=!1,mxEvent.consume(ia))}),mxUtils.bind(this,function(ia){Z.isMouseDown&&null!=Z.panningManager&& +null!=Z.graphHandler&&(J.style.backgroundColor="",J.style.cursor="default",this.sidebar.showTooltips=!0,Z.panningManager.stop(),Z.graphHandler.reset(),Z.isMouseDown=!1,Z.autoScroll=!0,fa(ia),mxEvent.consume(ia))}));mxEvent.addListener(J,"mouseleave",mxUtils.bind(this,function(ia){Z.isMouseDown&&null!=Z.graphHandler.first&&(Z.graphHandler.resume(),null!=Z.graphHandler.hint&&(Z.graphHandler.hint.style.visibility="visible"),J.style.backgroundColor="",J.style.cursor="",Z.autoScroll=!0)}));Graph.fileSupport&& +(mxEvent.addListener(J,"dragover",mxUtils.bind(this,function(ia){J.style.backgroundColor="#f1f3f4";ia.dataTransfer.dropEffect="copy";J.style.cursor="copy";this.sidebar.hideTooltip();ia.stopPropagation();ia.preventDefault()})),mxEvent.addListener(J,"drop",mxUtils.bind(this,function(ia){J.style.cursor="";J.style.backgroundColor="";0<ia.dataTransfer.files.length&&this.importFiles(ia.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(M,aa,X,ja,ca,ka,q,E,Q){if(null!=M&&"image/"==aa.substring(0, +6))M="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(M),M=[new mxCell("",new mxGeometry(0,0,ca,ka),M)],M[0].vertex=!0,S(M,new mxRectangle(0,0,ca,ka),ia,mxEvent.isAltDown(ia)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),null!=u&&null!=u.parentNode&&0<f.length&&(u.parentNode.removeChild(u),u=null);else{var Y=!1,R=mxUtils.bind(this,function(ba,ea){null!=ba&&"application/pdf"==ea&&(ea=Editor.extractGraphModelFromPdf(ba),null!= +ea&&0<ea.length&&(ba=ea));if(null!=ba)if(ba=mxUtils.parseXml(ba),"mxlibrary"==ba.documentElement.nodeName)try{var ra=JSON.parse(mxUtils.getTextContent(ba.documentElement));H(ra,J);f=f.concat(ra);oa(ia);this.spinner.stop();Y=!0}catch(xa){}else if("mxfile"==ba.documentElement.nodeName)try{var ta=ba.documentElement.getElementsByTagName("diagram");for(ra=0;ra<ta.length;ra++){var la=this.stringToCells(Editor.getDiagramNodeXml(ta[ra])),pa=this.editor.graph.getBoundingBoxFromGeometry(la);S(la,new mxRectangle(0, +0,pa.width,pa.height),ia)}Y=!0}catch(xa){null!=window.console&&console.log("error in drop handler:",xa)}Y||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=u&&null!=u.parentNode&&0<f.length&&(u.parentNode.removeChild(u),u=null)});null!=Q&&null!=q&&(/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q))?this.importVisio(Q,function(ba){R(ba,"text/xml")},null,q):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(M,q)&&null!=Q?this.isExternalDataComms()? +this.parseFile(Q,mxUtils.bind(this,function(ba){4==ba.readyState&&(this.spinner.stop(),200<=ba.status&&299>=ba.status?R(ba.responseText,"text/xml"):this.handleError({message:mxResources.get(413==ba.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):R(M,aa)}}));ia.stopPropagation();ia.preventDefault()})),mxEvent.addListener(J,"dragleave",function(ia){J.style.cursor= +"";J.style.backgroundColor="";ia.stopPropagation();ia.preventDefault()}));W=W.cloneNode(!1);W.setAttribute("src",Editor.editImage);W.setAttribute("title",mxResources.get("edit"));G.insertBefore(W,G.firstChild);mxEvent.addListener(W,"click",qa);mxEvent.addListener(J,"dblclick",function(ia){mxEvent.getSource(ia)==J&&qa(ia)});x=W.cloneNode(!1);x.setAttribute("src",Editor.plusImage);x.setAttribute("title",mxResources.get("add"));G.insertBefore(x,G.firstChild);mxEvent.addListener(x,"click",fa);this.isOffline()|| +".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(x=document.createElement("span"),x.setAttribute("title",mxResources.get("help")),x.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(x,"?"),mxEvent.addGestureListeners(x,mxUtils.bind(this,function(ia){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(ia)})),G.insertBefore(x,G.firstChild))}D.appendChild(G);D.style.paddingRight=18*G.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries= +function(d,f){for(var g=0;g<d.length;g++){var x=d[g],y=x.data;if(null!=y){y=this.convertDataUri(y);var u="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==x.aspect&&(u+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(u+"image="+y,x.w,x.h,"",x.title||"",!1,null,!0))}else null!=x.xml&&(y=this.stringToCells(Graph.decompress(x.xml)),0<y.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(y,x.w,x.h,x.title||"",!0,null,!0)))}};EditorUi.prototype.getResource= +function(d){return null!=d?d[mxLanguage]||d.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="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):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor=Editor.darkColor,Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.shapeBackgroundColor=Editor.darkColor,Graph.prototype.shapeForegroundColor=Editor.lightColor,Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor= +Editor.darkColor,mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];"1"==urlParams.sketch&&("undefined"!==typeof Menus&&(Menus.prototype.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts)), +Graph.prototype.defaultVertexStyle={hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders= +new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,f,g,x,y,u,H){d=new ImageDialog(this,d,f,g,x,y,u,H);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,f){d=null!=d?d:mxUtils.bind(this,function(g,x){x||(g=new ChangePageSetup(this,null,g),g.ignoreColor=!0,this.editor.graph.model.execute(g))});d=new BackgroundImageDialog(this,d,f);this.showDialog(d.container, +400,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,f,g,x,y){d=new LibraryDialog(this,d,f,g,x,y);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(u){u&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var f=k.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&& +f.refresh()}));return f};EditorUi.prototype.createSidebarFooterContainer=function(){var d=this.createDiv("geSidebarContainer geSidebarFooter");d.style.position="absolute";d.style.overflow="hidden";var f=document.createElement("a");f.className="geTitle";f.style.color="#DF6C0C";f.style.fontWeight="bold";f.style.height="100%";f.style.paddingTop="9px";f.innerHTML="<span>+</span>";var g=f.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(f,mxResources.get("moreShapes")+ +"...");mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(x){x.preventDefault()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(x){this.actions.get("shapes").funct();mxEvent.consume(x)}));d.appendChild(f);return d};EditorUi.prototype.handleError=function(d,f,g,x,y,u,H){var J=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},D=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!= +d.message)try{H?null!=window.console&&console.error("EditorUi.handleError:",d):EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,d.columnNumber,d,"INFO")}catch(N){}if(null!=D||null!=f){H=mxUtils.htmlEntities(mxResources.get("unknownError"));var G=mxResources.get("ok"),W=null;f=null!=f?f:mxResources.get("error");if(null!=D){null!=D.retry&&(G=mxResources.get("cancel"),W=function(){J();D.retry()});if(404==D.code||404==D.status||403==D.code){H=403==D.code? +null!=D.message?mxUtils.htmlEntities(D.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=y?y:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var T=null!=y?null:null!=u?u:window.location.hash;if(null!=T&&("#G"==T.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==T.substring(0,45))&&(null!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&& +"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.error.data[0].reason)||404==D.code||404==D.status)){T="#U"==T.substring(0,2)?T.substring(45,T.lastIndexOf("%26ex")):T.substring(2);this.showError(f,H,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+T);this.handleError(d,f,g,x,y)}),W,mxResources.get("changeUser"),mxUtils.bind(this,function(){function N(){fa.innerText="";for(var ia= +0;ia<qa.length;ia++){var M=document.createElement("option");mxUtils.write(M,qa[ia].displayName);M.value=ia;fa.appendChild(M);M=document.createElement("option");M.innerHTML=" ";mxUtils.write(M,"<"+qa[ia].email+">");M.setAttribute("disabled","disabled");fa.appendChild(M)}M=document.createElement("option");mxUtils.write(M,mxResources.get("addAccount"));M.value=qa.length;fa.appendChild(M)}var qa=this.drive.getUsersList(),oa=document.createElement("div"),S=document.createElement("span"); +S.style.marginTop="6px";mxUtils.write(S,mxResources.get("changeUser")+": ");oa.appendChild(S);var fa=document.createElement("select");fa.style.width="200px";N();mxEvent.addListener(fa,"change",mxUtils.bind(this,function(){var ia=fa.value,M=qa.length!=ia;M&&this.drive.setUser(qa[ia]);this.drive.authorize(M,mxUtils.bind(this,function(){M||(qa=this.drive.getUsersList(),N())}),mxUtils.bind(this,function(aa){this.handleError(aa)}),!0)}));oa.appendChild(fa);oa=new CustomDialog(this,oa,mxUtils.bind(this, +function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(oa.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=D.message?H=""==D.message&&null!=D.name?mxUtils.htmlEntities(D.name):mxUtils.htmlEntities(D.message):null!=D.response&&null!=D.response.error?H=mxUtils.htmlEntities(D.response.error):"undefined"!==typeof window.App&&(D.code==App.ERROR_TIMEOUT?H=mxUtils.htmlEntities(mxResources.get("timeout")): +D.code==App.ERROR_BUSY?H=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof D&&0<D.length&&(H=mxUtils.htmlEntities(D)))}var Z=u=null;null!=D&&null!=D.helpLink?(u=mxResources.get("help"),Z=mxUtils.bind(this,function(){return this.editor.graph.openLink(D.helpLink)})):null!=D&&null!=D.ownerEmail&&(u=mxResources.get("contactOwner"),H+=mxUtils.htmlEntities(" ("+u+": "+D.ownerEmail+")"),Z=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(D.ownerEmail))}));this.showError(f, +H,G,g,W,null,null,u,Z,null,null,null,x?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(d,f,g){d=new ErrorDialog(this,null,d,mxResources.get("ok"),f);this.showDialog(d.container,g||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,f,g,x,y,u){var H=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},J=Math.min(200,28*Math.ceil(d.length/50));d=new ConfirmDialog(this,d,function(){H();null!=f&&f()},function(){H();null!=g&&g()},x,y,null,null,null,null, +J);this.showDialog(d.container,340,46+J,!0,u);d.init()};EditorUi.prototype.showBanner=function(d,f,g,x){var y=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){var u=document.createElement("div");u.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(u.style, +"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(u.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(u.style,"transition","all 1s ease");u.className="geBtn gePrimaryBtn";y=document.createElement("img");y.setAttribute("src",IMAGE_PATH+"/logo.png");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";u.appendChild(y);y=document.createElement("img");y.setAttribute("src", +Dialog.prototype.closeImage);y.setAttribute("title",mxResources.get(x?"doNotShowAgain":"close"));y.setAttribute("border","0");y.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";u.appendChild(y);mxUtils.write(u,f);document.body.appendChild(u);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var H=document.createElement("input");H.setAttribute("type","checkbox"); +H.setAttribute("id","geDoNotShowAgainCheckbox");H.style.marginRight="6px";if(!x){f.appendChild(H);var J=document.createElement("label");J.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(J,mxResources.get("doNotShowAgain"));f.appendChild(J);u.style.paddingBottom="30px";u.appendChild(f)}var D=mxUtils.bind(this,function(){null!=u.parentNode&&(u.parentNode.removeChild(u),this.bannerShowing=!1,H.checked||x)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+ +d]=Date.now(),mxSettings.save()))});mxEvent.addListener(y,"click",mxUtils.bind(this,function(W){mxEvent.consume(W);D()}));var G=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(u.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){D()}),1E3)});mxEvent.addListener(u,"click",mxUtils.bind(this,function(W){var T=mxEvent.getSource(W);T!=H&&T!=J?(null!=g&&g(),D(),mxEvent.consume(W)):G()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(u.style, +"transform","translate(-50%,0%)")}),500);window.setTimeout(G,3E4);y=!0}return y};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,f,g,x){d=d.toDataURL("image/"+g);if(null!=d&&6<d.length)null!=f&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(f))), +0<x&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",x));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,f,g,x,y){var u="jpeg"==g?"jpg":g;x=this.getBaseFilename(x)+(null!=f?".drawio":"")+"."+u;d=this.createImageDataUri(d,f,g,y);this.saveData(x,u,d.substring(d.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&& +9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,f){d=new TextareaDialog(this,d,f,null,null,mxResources.get("close"));this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,f,g,x,y,u){"text/xml"!=g||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)|| +(f=f+"."+(null!=u?u:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=x?this.base64ToBlob(d,g):new Blob([d],{type:g}),navigator.msSaveOrOpenBlob(d,f);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(d,!0):(g.document.write(d),g.document.close(),g.document.execCommand("SaveAs",!0,f),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(f+":",d):this.openInNewWindow(d,g,x);else{var H= +document.createElement("a");u=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof H.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var J=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);u=65==(J?parseInt(J[2],10):!1)?!1:u}if(u||this.isOffline()){H.href=URL.createObjectURL(x?this.base64ToBlob(d,g):new Blob([d],{type:g}));u?H.download=f:H.setAttribute("target","_blank");document.body.appendChild(H);try{window.setTimeout(function(){URL.revokeObjectURL(H.href)}, +2E4),H.click(),H.parentNode.removeChild(H)}catch(D){}}else this.createEchoRequest(d,f,g,x,y).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,f,g,x,y,u){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=g?"&mime="+g:"")+(null!=y?"&format="+y:"")+(null!=u?"&base64="+u:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(x?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,f){f=f||"";d=atob(d);for(var g=d.length,x=Math.ceil(g/1024),y=Array(x), +u=0;u<x;++u){for(var H=1024*u,J=Math.min(H+1024,g),D=Array(J-H),G=0;H<J;++G,++H)D[G]=d[H].charCodeAt(0);y[u]=new Uint8Array(D)}return new Blob(y,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,g,x,y,u,H,J){u=null!=u?u:!1;H=null!=H?H:"vsdx"!=y&&(!mxClient.IS_IOS||!navigator.standalone);y=this.getServiceCount(u);isLocalStorage&&y++;var D=4>=y?2:6<y?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(G,W){try{if("_blank"==W)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(d, +g,x);else if(null!=g&&"text/html"==g.substring(0,9)){var T=new EmbedDialog(this,d);this.showDialog(T.container,450,240,!0,!0);T.init()}else{var Z=window.open("about:blank");null==Z?mxUtils.popup(d,!0):(Z.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),Z.document.close())}else W==App.MODE_DEVICE||"download"==W?this.doSaveLocalFile(d,G,g,x,null,J):null!=G&&0<G.length&&this.pickFolder(W,mxUtils.bind(this,function(N){try{this.exportFile(d,G,g,x,W,N)}catch(qa){this.handleError(qa)}}))}catch(N){this.handleError(N)}}), +mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,u,H,null,1<y,D,d,g,x);u=this.isServices(y)?y>D?390:280:160;this.showDialog(f.container,420,u,!0,!0);f.init()};EditorUi.prototype.openInNewWindow=function(d,f,g){var x=window.open("about:blank");null==x||null==x.document?mxUtils.popup(d,!0):("image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||g?(d=g?d:btoa(unescape(encodeURIComponent(d))),x.document.write('<html><img style="max-width:100%;" src="data:'+ +f+";base64,"+d+'"/></html>')):x.document.write("<html>"+d+"</html>"):x.document.write("<html><pre>"+mxUtils.htmlEntities(d,!1)+"</pre></html>"),x.document.close())};var m=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(d){if(null!=urlParams.tags){this.tagsDialog= +this.tagsComponent=null;var f=d(mxUtils.bind(this,function(x){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding= +"4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor="#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div, +80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var y=f.getBoundingClientRect();this.tagsDialog.style.left=y.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+ +4+"px";y=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=y.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(x)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var x=this.editor.graph.getAllTags();f.style.display=0<x.length?"":"none"}))}m.apply(this,arguments);this.editor.addListener("tagsDialogShown", +mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&& +(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var g=d(mxUtils.bind(this, +function(x){var y=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",y);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)y.apply(this);else{this.exportDialog=document.createElement("div");var u=g.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center"; +this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=u.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";u=mxUtils.getCurrentStyle(this.editor.graph.container); +this.exportDialog.style.zIndex=u.zIndex;var H=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});H.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(J){H.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var D=this.createImageDataUri(J,null,"png");J=document.createElement("img");J.style.maxWidth="140px";J.style.maxHeight= +"140px";J.style.cursor="pointer";J.style.backgroundColor="white";J.setAttribute("title",mxResources.get("openInNewWindow"));J.setAttribute("border","0");J.setAttribute("src",D);this.exportDialog.appendChild(J);mxEvent.addListener(J,"click",mxUtils.bind(this,function(){this.openInNewWindow(D.substring(D.indexOf(",")+1),"image/png",!0);y.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(J){this.spinner.stop();this.handleError(J)}),null,null,null,null,null,null,null, +Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",y);document.body.appendChild(this.exportDialog)}mxEvent.consume(x)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,f,g,x,y){this.isLocalFileSave()?this.saveLocalFile(g,d,x,y,f):this.saveRequest(d,f,mxUtils.bind(this,function(u,H){return this.createEchoRequest(g,u,x,y,f,H)}),g,y,x)};EditorUi.prototype.saveRequest=function(d,f,g,x,y,u,H){H=null!=H?H:!mxClient.IS_IOS||!navigator.standalone; +var J=this.getServiceCount(!1);isLocalStorage&&J++;var D=4>=J?2:6<J?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(G,W){if("_blank"==W||null!=G&&0<G.length){var T=g("_blank"==W?null:G,W==App.MODE_DEVICE||"download"==W||null==W||"_blank"==W?"0":"1");null!=T&&(W==App.MODE_DEVICE||"download"==W||"_blank"==W?T.simulate(document,"_blank"):this.pickFolder(W,mxUtils.bind(this,function(Z){u=null!=u?u:"pdf"==f?"application/pdf":"image/"+f;if(null!=x)try{this.exportFile(x,G,u,!0,W,Z)}catch(N){this.handleError(N)}else this.spinner.spin(document.body, +mxResources.get("saving"))&&T.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=T.getStatus()&&299>=T.getStatus())try{this.exportFile(T.getText(),G,u,!0,W,Z)}catch(N){this.handleError(N)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(N){this.spinner.stop();this.handleError(N)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,H,null,1<J,D,x,u,y);J=this.isServices(J)?4<J?390:280:160;this.showDialog(d.container, +420,J,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,f,g,x,y,u){};EditorUi.prototype.pickFolder=function(d,f,g){f(null)};EditorUi.prototype.exportSvg=function(d,f,g,x,y,u,H,J,D,G,W,T,Z,N){if(this.spinner.spin(document.body,mxResources.get("export")))try{var qa=this.editor.graph.isSelectionEmpty();g=null!=g?g:qa;var oa=f?null:this.editor.graph.background;oa== +mxConstants.NONE&&(oa=null);null==oa&&0==f&&(oa=W?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var S=this.editor.graph.getSvg(oa,d,H,J,null,g,null,null,"blank"==G?"_blank":"self"==G?"_top":null,null,!Z,W,T);x&&this.editor.graph.addSvgShadow(S);var fa=this.getBaseFilename()+(y?".drawio":"")+".svg";N=null!=N?N:mxUtils.bind(this,function(aa){this.isLocalFileSave()||aa.length<=MAX_REQUEST_SIZE?this.saveData(fa,"svg",aa,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")}, +mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(aa)}))});var ia=mxUtils.bind(this,function(aa){this.spinner.stop();y&&aa.setAttribute("content",this.getFileData(!0,null,null,null,g,D,null,null,null,!1));N(Graph.xmlDeclaration+"\n"+(y?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(aa))});this.editor.graph.mathEnabled&&this.editor.addMathCss(S);var M=mxUtils.bind(this,function(aa){u?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(aa, +ia,this.thumbImageCache)):ia(aa)});Z?this.embedFonts(S,M):(this.editor.addFontCss(S),M(S))}catch(aa){this.handleError(aa)}};EditorUi.prototype.addRadiobox=function(d,f,g,x,y,u,H){return this.addCheckbox(d,g,x,y,u,H,!0,f)};EditorUi.prototype.addCheckbox=function(d,f,g,x,y,u,H,J){u=null!=u?u:!0;var D=document.createElement("input");D.style.marginRight="8px";D.style.marginTop="16px";D.setAttribute("type",H?"radio":"checkbox");H="geCheckbox-"+Editor.guid();D.id=H;null!=J&&D.setAttribute("name",J);g&& +(D.setAttribute("checked","checked"),D.defaultChecked=!0);x&&D.setAttribute("disabled","disabled");u&&(d.appendChild(D),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",H),d.appendChild(g),y||mxUtils.br(d));return D};EditorUi.prototype.addEditButton=function(d,f){var g=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var x=this.getCurrentFile(),y="";null!=x&&x.getMode()!=App.MODE_DEVICE&&x.getMode()!=App.MODE_BROWSER&&(y=window.location.href); +var u=document.createElement("select");u.style.maxWidth="200px";u.style.width="auto";u.style.marginLeft="8px";u.style.marginRight="10px";u.className="geBtn";x=document.createElement("option");x.setAttribute("value","blank");mxUtils.write(x,mxResources.get("makeCopy"));u.appendChild(x);x=document.createElement("option");x.setAttribute("value","custom");mxUtils.write(x,mxResources.get("custom")+"...");u.appendChild(x);d.appendChild(u);mxEvent.addListener(u,"change",mxUtils.bind(this,function(){if("custom"== +u.value){var H=new FilenameDialog(this,y,mxResources.get("ok"),function(J){null!=J?y=J:u.value="blank"},mxResources.get("url"),null,null,null,null,function(){u.value="blank"});this.showDialog(H.container,300,80,!0,!1);H.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,function(){g.checked&&(null==f||f.checked)?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return g.checked?"blank"===u.value?"_blank":y:null},getEditInput:function(){return g}, +getEditSelect:function(){return u}}};EditorUi.prototype.addLinkSection=function(d,f){function g(){var J=document.createElement("div");J.style.width="100%";J.style.height="100%";J.style.boxSizing="border-box";null!=u&&u!=mxConstants.NONE?(J.style.border="1px solid black",J.style.backgroundColor=u):(J.style.backgroundPosition="center center",J.style.backgroundRepeat="no-repeat",J.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");H.innerText="";H.appendChild(J)}mxUtils.write(d,mxResources.get("links")+ +":");var x=document.createElement("select");x.style.width="100px";x.style.padding="0px";x.style.marginLeft="8px";x.style.marginRight="10px";x.className="geBtn";var y=document.createElement("option");y.setAttribute("value","auto");mxUtils.write(y,mxResources.get("automatic"));x.appendChild(y);y=document.createElement("option");y.setAttribute("value","blank");mxUtils.write(y,mxResources.get("openInNewWindow"));x.appendChild(y);y=document.createElement("option");y.setAttribute("value","self");mxUtils.write(y, +mxResources.get("openInThisWindow"));x.appendChild(y);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),x.appendChild(f));d.appendChild(x);mxUtils.write(d,mxResources.get("borderColor")+":");var u="#0000ff",H=null;H=mxUtils.button("",mxUtils.bind(this,function(J){this.pickColor(u||"none",function(D){u=D;g()});mxEvent.consume(J)}));g();H.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px"; +H.style.marginLeft="4px";H.style.height="22px";H.style.width="22px";H.style.position="relative";H.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";H.className="geColorBtn";d.appendChild(H);mxUtils.br(d);return{getColor:function(){return u},getTarget:function(){return x.value},focus:function(){x.focus()}}};EditorUi.prototype.createUrlParameters=function(d,f,g,x,y,u,H){H=null!=H?H:[];x&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||H.push("lightbox=1"), +"auto"!=d&&H.push("target="+d),null!=f&&f!=mxConstants.NONE&&H.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=y&&0<y.length&&H.push("edit="+encodeURIComponent(y)),u&&H.push("layers=1"),this.editor.graph.foldingEnabled&&H.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&H.push("page-id="+this.currentPage.getId());return H};EditorUi.prototype.createLink=function(d,f,g,x,y,u,H,J,D,G){D=this.createUrlParameters(d,f,g,x,y,u,D);d=this.getCurrentFile(); +f=!0;null!=H?g="#U"+encodeURIComponent(H):(d=this.getCurrentFile(),J||null==d||d.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+d.getHash(),f=!1));f&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&D.push("title="+encodeURIComponent(d.getTitle()));G&&1<g.length&&(D.push("open="+g.substring(1)),g="");return(x&&"1"!=urlParams.dev?EditorUi.lightboxHost: +mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<D.length?"?"+D.join("&"):"")+g};EditorUi.prototype.createHtml=function(d,f,g,x,y,u,H,J,D,G,W,T){this.getBasenames();var Z={};""!=y&&y!=mxConstants.NONE&&(Z.highlight=y);"auto"!==x&&(Z.target=x);G||(Z.lightbox=!1);Z.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(Z.zoom=g/100);g=[];H&&(g.push("pages"),Z.resize=!0,null!=this.pages&& +null!=this.currentPage&&(Z.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(g.push("zoom"),Z.resize=!0);J&&g.push("layers");D&&g.push("tags");0<g.length&&(G&&g.push("lightbox"),Z.toolbar=g.join(" "));null!=W&&0<W.length&&(Z.edit=W);null!=d?Z.url=d:Z.xml=this.getFileData(!0,null,null,null,null,!H);f='<div class="mxgraph" style="'+(u?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(Z))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d): +"";T(f,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,f,g,x){var y=document.createElement("div");y.style.whiteSpace="nowrap";var u=document.createElement("h3");mxUtils.write(u, +mxResources.get("html"));u.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";y.appendChild(u);var H=document.createElement("div");H.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var J=document.createElement("input");J.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";J.setAttribute("value","url");J.setAttribute("type","radio");J.setAttribute("name","type-embedhtmldialog");u=J.cloneNode(!0);u.setAttribute("value", +"copy");H.appendChild(u);var D=document.createElement("span");mxUtils.write(D,mxResources.get("includeCopyOfMyDiagram"));H.appendChild(D);mxUtils.br(H);H.appendChild(J);D=document.createElement("span");mxUtils.write(D,mxResources.get("publicDiagramUrl"));H.appendChild(D);var G=this.getCurrentFile();null==g&&null!=G&&G.constructor==window.DriveFile&&(D=document.createElement("a"),D.style.paddingLeft="12px",D.style.color="gray",D.style.cursor="pointer",mxUtils.write(D,mxResources.get("share")),H.appendChild(D), +mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(G.getId())})));u.setAttribute("checked","checked");null==g&&J.setAttribute("disabled","disabled");y.appendChild(H);var W=this.addLinkSection(y),T=this.addCheckbox(y,mxResources.get("zoom"),!0,null,!0);mxUtils.write(y,":");var Z=document.createElement("input");Z.setAttribute("type","text");Z.style.marginRight="16px";Z.style.width="60px";Z.style.marginLeft="4px";Z.style.marginRight="12px";Z.value= +"100%";y.appendChild(Z);var N=this.addCheckbox(y,mxResources.get("fit"),!0);H=null!=this.pages&&1<this.pages.length;var qa=qa=this.addCheckbox(y,mxResources.get("allPages"),H,!H),oa=this.addCheckbox(y,mxResources.get("layers"),!0),S=this.addCheckbox(y,mxResources.get("tags"),!0),fa=this.addCheckbox(y,mxResources.get("lightbox"),!0),ia=null;H=380;if(EditorUi.enableHtmlEditOption){ia=this.addEditButton(y,fa);var M=ia.getEditInput();M.style.marginBottom="16px";H+=50;mxEvent.addListener(fa,"change",function(){fa.checked? +M.removeAttribute("disabled"):M.setAttribute("disabled","disabled");M.checked&&fa.checked?ia.getEditSelect().removeAttribute("disabled"):ia.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,y,mxUtils.bind(this,function(){x(J.checked?g:null,T.checked,Z.value,W.getTarget(),W.getColor(),N.checked,qa.checked,oa.checked,S.checked,fa.checked,null!=ia?ia.getLink():null)}),null,d,f);this.showDialog(d.container,340,H,!0,!0);u.focus()};EditorUi.prototype.showPublishLinkDialog=function(d, +f,g,x,y,u,H,J){var D=document.createElement("div");D.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,d||mxResources.get("link"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";D.appendChild(G);var W=this.getCurrentFile();d=0;if(null==W||W.constructor!=window.DriveFile||f)H=null!=H?H:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{d=80;H=null!=H?H:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram"; +G=document.createElement("div");G.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var T=document.createElement("div");T.style.whiteSpace="normal";mxUtils.write(T,mxResources.get("linkAccountRequired"));G.appendChild(T);T=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(W.getId())}));T.style.marginTop="12px";T.className="geBtn";G.appendChild(T);D.appendChild(G);T=document.createElement("a"); +T.style.paddingLeft="12px";T.style.color="gray";T.style.fontSize="11px";T.style.cursor="pointer";mxUtils.write(T,mxResources.get("check"));G.appendChild(T);mxEvent.addListener(T,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(X){this.spinner.stop();X=new ErrorDialog(this,null,mxResources.get(null!=X?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(X.container, +300,80,!0,!1);X.init()}))}))}var Z=null,N=null;if(null!=g||null!=x)d+=30,mxUtils.write(D,mxResources.get("width")+":"),Z=document.createElement("input"),Z.setAttribute("type","text"),Z.style.marginRight="16px",Z.style.width="50px",Z.style.marginLeft="6px",Z.style.marginRight="16px",Z.style.marginBottom="10px",Z.value="100%",D.appendChild(Z),mxUtils.write(D,mxResources.get("height")+":"),N=document.createElement("input"),N.setAttribute("type","text"),N.style.width="50px",N.style.marginLeft="6px",N.style.marginBottom= +"10px",N.value=x+"px",D.appendChild(N),mxUtils.br(D);var qa=this.addLinkSection(D,u);g=null!=this.pages&&1<this.pages.length;var oa=null;if(null==W||W.constructor!=window.DriveFile||f)oa=this.addCheckbox(D,mxResources.get("allPages"),g,!g);var S=this.addCheckbox(D,mxResources.get("lightbox"),!0,null,null,!u),fa=this.addEditButton(D,S),ia=fa.getEditInput();u&&(ia.style.marginLeft=S.style.marginLeft,S.style.display="none",d-=20);var M=this.addCheckbox(D,mxResources.get("layers"),!0);M.style.marginLeft= +ia.style.marginLeft;M.style.marginTop="8px";var aa=this.addCheckbox(D,mxResources.get("tags"),!0);aa.style.marginLeft=ia.style.marginLeft;aa.style.marginBottom="16px";aa.style.marginTop="16px";mxEvent.addListener(S,"change",function(){S.checked?(M.removeAttribute("disabled"),ia.removeAttribute("disabled")):(M.setAttribute("disabled","disabled"),ia.setAttribute("disabled","disabled"));ia.checked&&S.checked?fa.getEditSelect().removeAttribute("disabled"):fa.getEditSelect().setAttribute("disabled","disabled")}); +f=new CustomDialog(this,D,mxUtils.bind(this,function(){y(qa.getTarget(),qa.getColor(),null==oa?!0:oa.checked,S.checked,fa.getLink(),M.checked,null!=Z?Z.value:null,null!=N?N.value:null,aa.checked)}),null,mxResources.get("create"),H,J);this.showDialog(f.container,340,300+d,!0,!0);null!=Z?(Z.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Z.select():document.execCommand("selectAll",!1,null)):qa.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,g,x,y){var u=document.createElement("div"); +u.style.whiteSpace="nowrap";var H=document.createElement("h3");mxUtils.write(H,mxResources.get("image"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(y?"10":"4")+"px";u.appendChild(H);if(y){mxUtils.write(u,mxResources.get("zoom")+":");var J=document.createElement("input");J.setAttribute("type","text");J.style.marginRight="16px";J.style.width="60px";J.style.marginLeft="4px";J.style.marginRight="12px";J.value=this.lastExportZoom||"100%";u.appendChild(J);mxUtils.write(u, +mxResources.get("borderWidth")+":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";D.style.width="60px";D.style.marginLeft="4px";D.value=this.lastExportBorder||"0";u.appendChild(D);mxUtils.br(u)}var G=this.addCheckbox(u,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),W=x?null:this.addCheckbox(u,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);H=this.editor.graph;var T=x?null:this.addCheckbox(u,mxResources.get("transparentBackground"), +H.background==mxConstants.NONE||null==H.background);null!=T&&(T.style.marginBottom="16px");d=new CustomDialog(this,u,mxUtils.bind(this,function(){var Z=parseInt(J.value)/100||1,N=parseInt(D.value)||0;g(!G.checked,null!=W?W.checked:!1,null!=T?T.checked:!1,Z,N)}),null,d,f);this.showDialog(d.container,300,(y?25:0)+(x?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,f,g,x,y,u,H,J,D){H=null!=H?H:Editor.defaultIncludeDiagram;var G=document.createElement("div");G.style.whiteSpace="nowrap"; +var W=this.editor.graph,T="jpeg"==J?220:300,Z=document.createElement("h3");mxUtils.write(Z,d);Z.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";G.appendChild(Z);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=this.lastExportZoom||"100%";G.appendChild(N);mxUtils.write(G,mxResources.get("borderWidth")+ +":");var qa=document.createElement("input");qa.setAttribute("type","text");qa.style.marginRight="16px";qa.style.width="60px";qa.style.marginLeft="4px";qa.value=this.lastExportBorder||"0";G.appendChild(qa);mxUtils.br(G);var oa=this.addCheckbox(G,mxResources.get("selectionOnly"),!1,W.isSelectionEmpty()),S=document.createElement("input");S.style.marginTop="16px";S.style.marginRight="8px";S.style.marginLeft="24px";S.setAttribute("disabled","disabled");S.setAttribute("type","checkbox");var fa=document.createElement("select"); +fa.style.marginTop="16px";fa.style.marginLeft="8px";d=["selectionOnly","diagram","page"];var ia={};for(Z=0;Z<d.length;Z++)if(!W.isSelectionEmpty()||"selectionOnly"!=d[Z]){var M=document.createElement("option");mxUtils.write(M,mxResources.get(d[Z]));M.setAttribute("value",d[Z]);fa.appendChild(M);ia[d[Z]]=M}D?(mxUtils.write(G,mxResources.get("size")+":"),G.appendChild(fa),mxUtils.br(G),T+=26,mxEvent.addListener(fa,"change",function(){"selectionOnly"==fa.value&&(oa.checked=!0)})):u&&(G.appendChild(S), +mxUtils.write(G,mxResources.get("crop")),mxUtils.br(G),T+=30,mxEvent.addListener(oa,"change",function(){oa.checked?S.removeAttribute("disabled"):S.setAttribute("disabled","disabled")}));W.isSelectionEmpty()?D&&(oa.style.display="none",oa.nextSibling.style.display="none",oa.nextSibling.nextSibling.style.display="none",T-=30):(fa.value="diagram",S.setAttribute("checked","checked"),S.defaultChecked=!0,mxEvent.addListener(oa,"change",function(){fa.value=oa.checked?"selectionOnly":"diagram"}));var aa= +this.addCheckbox(G,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=J),X=null;Editor.isDarkMode()&&(X=this.addCheckbox(G,mxResources.get("dark"),!0),T+=26);var ja=this.addCheckbox(G,mxResources.get("shadow"),W.shadowVisible),ca=null;if("png"==J||"jpeg"==J)ca=this.addCheckbox(G,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),T+=30;var ka=this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram"),H,null,null,"jpeg"!=J);ka.style.marginBottom="16px";var q=document.createElement("input"); +q.style.marginBottom="16px";q.style.marginRight="8px";q.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||q.setAttribute("disabled","disabled");var E=document.createElement("select");E.style.maxWidth="260px";E.style.marginLeft="8px";E.style.marginRight="10px";E.style.marginBottom="16px";E.className="geBtn";u=document.createElement("option");u.setAttribute("value","none");mxUtils.write(u,mxResources.get("noChange"));E.appendChild(u);u=document.createElement("option");u.setAttribute("value", +"embedFonts");mxUtils.write(u,mxResources.get("embedFonts"));E.appendChild(u);u=document.createElement("option");u.setAttribute("value","lblToSvg");mxUtils.write(u,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||E.appendChild(u);mxEvent.addListener(E,"change",mxUtils.bind(this,function(){"lblToSvg"==E.value?(q.checked=!0,q.setAttribute("disabled","disabled"),ia.page.style.display="none","page"==fa.value&&(fa.value="diagram"),ja.checked=!1,ja.setAttribute("disabled","disabled"), +Y.style.display="inline-block",Q.style.display="none"):"disabled"==q.getAttribute("disabled")&&(q.checked=!1,q.removeAttribute("disabled"),ja.removeAttribute("disabled"),ia.page.style.display="",Y.style.display="none",Q.style.display="")}));f&&(G.appendChild(q),mxUtils.write(G,mxResources.get("embedImages")),mxUtils.br(G),mxUtils.write(G,mxResources.get("txtSettings")+":"),G.appendChild(E),mxUtils.br(G),T+=60);var Q=document.createElement("select");Q.style.maxWidth="260px";Q.style.marginLeft="8px"; +Q.style.marginRight="10px";Q.className="geBtn";f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));Q.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));Q.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));Q.appendChild(f);var Y=document.createElement("div");mxUtils.write(Y,mxResources.get("LinksLost")); +Y.style.margin="7px";Y.style.display="none";"svg"==J&&(mxUtils.write(G,mxResources.get("links")+":"),G.appendChild(Q),G.appendChild(Y),mxUtils.br(G),mxUtils.br(G),T+=50);g=new CustomDialog(this,G,mxUtils.bind(this,function(){this.lastExportBorder=qa.value;this.lastExportZoom=N.value;y(N.value,aa.checked,!oa.checked,ja.checked,ka.checked,q.checked,qa.value,S.checked,!1,Q.value,null!=ca?ca.checked:null,null!=X?X.checked:null,fa.value,"embedFonts"==E.value,"lblToSvg"==E.value)}),null,g,x);this.showDialog(g.container, +340,T,!0,!0,null,null,null,null,!0);N.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?N.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,f,g,x,y){var u=document.createElement("div");u.style.whiteSpace="nowrap";var H=this.editor.graph;if(null!=f){var J=document.createElement("h3");mxUtils.write(J,f);J.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";u.appendChild(J)}var D=this.addCheckbox(u,mxResources.get("fit"), +!0),G=this.addCheckbox(u,mxResources.get("shadow"),H.shadowVisible&&x,!x),W=this.addCheckbox(u,g),T=this.addCheckbox(u,mxResources.get("lightbox"),!0),Z=this.addEditButton(u,T),N=Z.getEditInput(),qa=1<H.model.getChildCount(H.model.getRoot()),oa=this.addCheckbox(u,mxResources.get("layers"),qa,!qa);oa.style.marginLeft=N.style.marginLeft;oa.style.marginBottom="12px";oa.style.marginTop="8px";mxEvent.addListener(T,"change",function(){T.checked?(qa&&oa.removeAttribute("disabled"),N.removeAttribute("disabled")): +(oa.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"));N.checked&&T.checked?Z.getEditSelect().removeAttribute("disabled"):Z.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,u,mxUtils.bind(this,function(){d(D.checked,G.checked,W.checked,T.checked,Z.getLink(),oa.checked)}),null,mxResources.get("embed"),y);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,g,x,y,u,H,J){function D(N){var qa=" ",oa="";x&&(qa= +" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(null!=W?"&page="+W:"")+(y?"&edit=_blank":"")+(u?"&layers=1":"")+"');}})(this);\"",oa+="cursor:pointer;");d&&(oa+="max-width:100%;");var S="";g&&(S= +' width="'+Math.round(G.width)+'" height="'+Math.round(G.height)+'"');H('<img src="'+N+'"'+S+(""!=oa?' style="'+oa+'"':"")+qa+"/>")}var G=this.editor.graph.getGraphBounds(),W=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(N){var qa=x?this.getFileData(!0):null;N=this.createImageDataUri(N,qa,"png");D(N)}),null,null,null,mxUtils.bind(this,function(N){J({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,f,null,null,Editor.defaultBorder); +else if(f=this.getFileData(!0),G.width*G.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var T="";g&&(T="&w="+Math.round(2*G.width)+"&h="+Math.round(2*G.height));var Z=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(x?"1":"0")+T+"&xml="+encodeURIComponent(f));Z.send(mxUtils.bind(this,function(){200<=Z.getStatus()&&299>=Z.getStatus()?D("data:image/png;base64,"+Z.getText()):J({message:mxResources.get("unknownError")})}))}else J({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg= +function(d,f,g,x,y,u,H){var J=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),D=J.getElementsByTagName("a");if(null!=D)for(var G=0;G<D.length;G++){var W=D[G].getAttribute("href");null!=W&&"#"==W.charAt(0)&&"_blank"==D[G].getAttribute("target")&&D[G].removeAttribute("target")}x&&J.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(J);if(g){var T=" ",Z="";x&&(T="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+ +EditorUi.lightboxHost+"/?client=1"+(y?"&edit=_blank":"")+(u?"&layers=1":"")+"');}})(this);\"",Z+="cursor:pointer;");d&&(Z+="max-width:100%;");this.editor.convertImages(J,mxUtils.bind(this,function(N){H('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(N))+'"'+(""!=Z?' style="'+Z+'"':"")+T+"/>")}))}else Z="",x&&(f=this.getSelectedPageIndex(),J.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+ +EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(y?"&edit=_blank":"")+(u?"&layers=1":"")+"');}}})(this);"),Z+="cursor:pointer;"),d&&(d=parseInt(J.getAttribute("width")),y=parseInt(J.getAttribute("height")),J.setAttribute("viewBox","-0.5 -0.5 "+d+" "+y),Z+="max-width:100%;max-height:"+y+"px;",J.removeAttribute("height")),""!=Z&&J.setAttribute("style",Z),this.editor.addFontCss(J),this.editor.graph.mathEnabled&&this.editor.addMathCss(J),H(mxUtils.getXml(J))};EditorUi.prototype.timeSince=function(d){d= Math.floor((new Date-d)/1E3);var f=Math.floor(d/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(d/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(d/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(d/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(d/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(d,f){if(null!=d){var g=null;if("diagram"==d.nodeName)g= -d;else if("mxfile"==d.nodeName){var x=d.getElementsByTagName("diagram");if(0<x.length){g=x[0];var z=f.getGlobalVariable;f.getGlobalVariable=function(u){return"page"==u?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==u?1:z.apply(this,arguments)}}}null!=g&&(d=Editor.parseDiagramNode(g))}x=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(d)}catch(u){}finally{this.editor.graph=x}return d};EditorUi.prototype.getPngFileProperties=function(d){var f=1,g=0;if(null!= -d){if(d.hasAttribute("scale")){var x=parseFloat(d.getAttribute("scale"));!isNaN(x)&&0<x&&(f=x)}d.hasAttribute("border")&&(x=parseInt(d.getAttribute("border")),!isNaN(x)&&0<x&&(g=x))}return{scale:f,border:g}};EditorUi.prototype.getEmbeddedPng=function(d,f,g,x,z){try{var u=this.editor.graph,H=null!=u.themes&&"darkTheme"==u.defaultThemeName,J=null;if(null!=g&&0<g.length)u=this.createTemporaryGraph(H?u.getDefaultStylesheet():u.getStylesheet()),document.body.appendChild(u.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement, -!0),u),J=g;else if(H||null!=this.pages&&this.currentPage!=this.pages[0]){u=this.createTemporaryGraph(H?u.getDefaultStylesheet():u.getStylesheet());var D=u.getGlobalVariable;u.setBackgroundImage=this.editor.graph.setBackgroundImage;var G=this.pages[0];this.currentPage==G?u.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&u.setBackgroundImage(G.viewState.backgroundImage);u.getGlobalVariable=function(V){return"page"==V?G.getName():"pagenumber"==V?1:D.apply(this, -arguments)};document.body.appendChild(u.container);u.model.setRoot(G.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(V){try{null==J&&(J=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var U=V.toDataURL("image/png");U=Editor.writeGraphModelToPng(U,"tEXt","mxfile",encodeURIComponent(J));d(U.substring(U.lastIndexOf(",")+1));u!=this.editor.graph&&u.container.parentNode.removeChild(u.container)}catch(Y){null!=f&&f(Y)}}),null,null,null,mxUtils.bind(this,function(V){null!=f&& -f(V)}),null,null,x,null,u.shadowVisible,null,u,z,null,null,null,"diagram",null)}catch(V){null!=f&&f(V)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,g,x,z,u,H,J,D,G,V,U,Y){J=null!=J?J:!0;V=null!=V?V:0;H=null!=D?D:f.background;H==mxConstants.NONE&&(H=null);u=f.getSvg(H,G,V,null,null,u,null,null,null,f.shadowVisible||U,null,Y,"diagram");(f.shadowVisible||U)&&f.addSvgShadow(u,null,null,0==V);null!=d&&u.setAttribute("content",d);null!=g&&u.setAttribute("resource",g);var O=mxUtils.bind(this,function(qa){qa= -(x?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(qa);null!=z&&z(qa);return qa});f.mathEnabled&&this.editor.addMathCss(u);if(null!=z)this.embedFonts(u,mxUtils.bind(this,function(qa){J?this.editor.convertImages(qa,mxUtils.bind(this,function(oa){O(oa)})):O(qa)}));else return O(u)};EditorUi.prototype.embedFonts=function(d,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss), -this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(d,g),f(d)}catch(x){f(d)}}))}catch(g){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,g,x,z,u,H,J,D,G,V,U,Y){D=null!=D?D:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var O=this.editor.graph.isSelectionEmpty();g=null!=g?g:O;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(qa){this.spinner.stop();try{this.saveCanvas(qa, -z?this.getFileData(!0,null,null,null,g,J):null,D,null==this.pages||0==this.pages.length,V)}catch(oa){this.handleError(oa)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(qa){this.spinner.stop();this.handleError(qa)}),null,g,d||1,f,x,null,null,u,H,G,U,Y)}catch(qa){this.spinner.stop(),this.handleError(qa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,f,g,x,z,u,H){f=null!=f?f:0;g=null!=g?g:0;var J= -[];try{var D=this.editor.graph;if(null!=d&&0<d.length){D.model.beginUpdate();try{var G=mxUtils.parseXml(d);d={};var V=this.editor.extractGraphModel(G.documentElement,null!=this.pages);if(null!=V&&"mxfile"==V.nodeName&&null!=this.pages){var U=V.getElementsByTagName("diagram");if(1==U.length&&!u){if(V=Editor.parseDiagramNode(U[0]),null!=this.currentPage&&(d[U[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var Y=U[0].getAttribute("name");null!=Y&&""!=Y&&this.editor.graph.model.execute(new RenamePage(this, -this.currentPage,Y))}}else if(0<U.length){u=[];var O=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[U[0].getAttribute("id")]=this.pages[0].getId(),V=Editor.parseDiagramNode(U[0]),x=!1,O=1);for(;O<U.length;O++){var qa=U[O].getAttribute("id");U[O].removeAttribute("id");var oa=this.updatePageRoot(new DiagramPage(U[O]));d[qa]=U[O].getAttribute("id");var aa=this.pages.length;null==oa.getName()&&oa.setName(mxResources.get("pageWithNumber",[aa+1]));D.model.execute(new ChangePage(this, -oa,oa,aa,!0));u.push(oa)}this.updatePageLinks(d,u)}}if(null!=V&&"mxGraphModel"===V.nodeName){J=D.importGraphModel(V,f,g,x);if(null!=J)for(O=0;O<J.length;O++)this.updatePageLinksForCell(d,J[O]);var da=D.parseBackgroundImage(V.getAttribute("backgroundImage"));if(null!=da&&null!=da.originalSrc){this.updateBackgroundPageLink(d,da);var ia=new ChangePageSetup(this,null,da);ia.ignoreColor=!0;D.model.execute(ia)}}H&&this.insertHandler(J,null,null,D.defaultVertexStyle,D.defaultEdgeStyle,!1,!0)}finally{D.model.endUpdate()}}}catch(L){if(z)throw L; -this.handleError(L)}return J};EditorUi.prototype.updatePageLinks=function(d,f){for(var g=0;g<f.length;g++)this.updatePageLinksForCell(d,f[g].root),null!=f[g].viewState&&this.updateBackgroundPageLink(d,f[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var g=d[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=g&&(f.originalSrc="data:page/id,"+g)}}catch(x){}};EditorUi.prototype.updatePageLinksForCell= -function(d,f){var g=document.createElement("div"),x=this.editor.graph,z=x.getLinkForCell(f);null!=z&&x.setLinkForCell(f,this.updatePageLink(d,z));if(x.isHtmlLabel(f)){g.innerHTML=x.sanitizeHtml(x.getLabel(f));for(var u=g.getElementsByTagName("a"),H=!1,J=0;J<u.length;J++)z=u[J].getAttribute("href"),null!=z&&(u[J].setAttribute("href",this.updatePageLink(d,z)),H=!0);H&&x.labelChanged(f,g.innerHTML)}for(J=0;J<x.model.getChildCount(f);J++)this.updatePageLinksForCell(d,x.model.getChildAt(f,J))};EditorUi.prototype.updatePageLink= -function(d,f){if(Graph.isPageLink(f)){var g=d[f.substring(f.indexOf(",")+1)];f=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==f.substring(0,17))try{var x=JSON.parse(f.substring(17));if(null!=x.actions){for(var z=0;z<x.actions.length;z++){var u=x.actions[z];if(null!=u.open&&Graph.isPageLink(u.open)){var H=u.open.substring(u.open.indexOf(",")+1);g=d[H];null!=g?u.open="data:page/id,"+g:null==this.getPageById(H)&&delete u.open}}f="data:action/json,"+JSON.stringify(x)}}catch(J){}return f}; -EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,f,g,x,z){x=null!=x?x:d.name;g=null!=g?g:mxUtils.bind(this,function(H){this.handleError(H)});var u=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var H=this.isRemoteVisioFormat(x);try{var J="UNKNOWN-VISIO",D=x.lastIndexOf(".");if(0<=D&&D<x.length)J=x.substring(D+1).toUpperCase();else{var G=x.lastIndexOf("/");0<= -G&&G<x.length&&(x=x.substring(G+1))}EditorUi.logEvent({category:J+"-MS-IMPORT-FILE",action:"filename_"+x,label:H?"remote":"local"})}catch(U){}if(H)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{H=new FormData;H.append("file1",d,x);var V=new XMLHttpRequest;V.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(x)?"?stencil=1":""));V.responseType="blob";this.addRemoteServiceSecurityCheck(V); -null!=z&&V.setRequestHeader("x-convert-custom",z);V.onreadystatechange=mxUtils.bind(this,function(){if(4==V.readyState)if(200<=V.status&&299>=V.status)try{var U=V.response;if("text/xml"==U.type){var Y=new FileReader;Y.onload=mxUtils.bind(this,function(O){try{f(O.target.result)}catch(qa){g({message:mxResources.get("errorLoadingFile")})}});Y.readAsText(U)}else this.doImportVisio(U,f,g,x)}catch(O){g(O)}else try{""==V.responseType||"text"==V.responseType?g({message:V.responseText}):(Y=new FileReader, -Y.onload=function(){g({message:JSON.parse(Y.result).Message})},Y.readAsText(V.response))}catch(O){g({})}});V.send(H)}else try{this.doImportVisio(d,f,g,x)}catch(U){g(U)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?u():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",u))};EditorUi.prototype.importGraphML=function(d,f,g){g=null!=g?g:mxUtils.bind(this,function(z){this.handleError(z)}); -var x=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(d,f,g)}catch(z){g(z)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?x():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",x))};EditorUi.prototype.exportVisio=function(d){var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(d)|| -this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.convertLucidChart=function(d,f,g){var x=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var z= -JSON.parse(d);f(LucidImporter.importState(z));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var u=[(new Date).toISOString(),"convertLucidChart",z];null!=z.state&&u.push(JSON.parse(z.state));if(null!=z.svgThumbs)for(var H=0;H<z.svgThumbs.length;H++)u.push(Editor.createSvgDataUri(z.svgThumbs[H]));null!=z.thumb&&u.push(z.thumb);console.log.apply(console,u)}}catch(J){}}catch(J){null!=window.console&&console.error(J),g(J)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})}); +d;else if("mxfile"==d.nodeName){var x=d.getElementsByTagName("diagram");if(0<x.length){g=x[0];var y=f.getGlobalVariable;f.getGlobalVariable=function(u){return"page"==u?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==u?1:y.apply(this,arguments)}}}null!=g&&(d=Editor.parseDiagramNode(g))}x=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(d)}catch(u){}finally{this.editor.graph=x}return d};EditorUi.prototype.getPngFileProperties=function(d){var f=1,g=0;if(null!= +d){if(d.hasAttribute("scale")){var x=parseFloat(d.getAttribute("scale"));!isNaN(x)&&0<x&&(f=x)}d.hasAttribute("border")&&(x=parseInt(d.getAttribute("border")),!isNaN(x)&&0<x&&(g=x))}return{scale:f,border:g}};EditorUi.prototype.getEmbeddedPng=function(d,f,g,x,y){try{var u=this.editor.graph,H=null!=u.themes&&"darkTheme"==u.defaultThemeName,J=null;if(null!=g&&0<g.length)u=this.createTemporaryGraph(H?u.getDefaultStylesheet():u.getStylesheet()),document.body.appendChild(u.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement, +!0),u),J=g;else if(H||null!=this.pages&&this.currentPage!=this.pages[0]){u=this.createTemporaryGraph(H?u.getDefaultStylesheet():u.getStylesheet());var D=u.getGlobalVariable;u.setBackgroundImage=this.editor.graph.setBackgroundImage;var G=this.pages[0];this.currentPage==G?u.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&u.setBackgroundImage(G.viewState.backgroundImage);u.getGlobalVariable=function(W){return"page"==W?G.getName():"pagenumber"==W?1:D.apply(this, +arguments)};document.body.appendChild(u.container);u.model.setRoot(G.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(W){try{null==J&&(J=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var T=W.toDataURL("image/png");T=Editor.writeGraphModelToPng(T,"tEXt","mxfile",encodeURIComponent(J));d(T.substring(T.lastIndexOf(",")+1));u!=this.editor.graph&&u.container.parentNode.removeChild(u.container)}catch(Z){null!=f&&f(Z)}}),null,null,null,mxUtils.bind(this,function(W){null!=f&& +f(W)}),null,null,x,null,u.shadowVisible,null,u,y,null,null,null,"diagram",null)}catch(W){null!=f&&f(W)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,g,x,y,u,H,J,D,G,W,T,Z){J=null!=J?J:!0;W=null!=W?W:0;H=null!=D?D:f.background;H==mxConstants.NONE&&(H=null);u=f.getSvg(H,G,W,null,null,u,null,null,null,f.shadowVisible||T,null,Z,"diagram");(f.shadowVisible||T)&&f.addSvgShadow(u,null,null,0==W);null!=d&&u.setAttribute("content",d);null!=g&&u.setAttribute("resource",g);var N=mxUtils.bind(this,function(qa){qa= +(x?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(qa);null!=y&&y(qa);return qa});f.mathEnabled&&this.editor.addMathCss(u);if(null!=y)this.embedFonts(u,mxUtils.bind(this,function(qa){J?this.editor.convertImages(qa,mxUtils.bind(this,function(oa){N(oa)})):N(qa)}));else return N(u)};EditorUi.prototype.embedFonts=function(d,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss), +this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(d,g),f(d)}catch(x){f(d)}}))}catch(g){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,g,x,y,u,H,J,D,G,W,T,Z){D=null!=D?D:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var N=this.editor.graph.isSelectionEmpty();g=null!=g?g:N;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(qa){this.spinner.stop();try{this.saveCanvas(qa, +y?this.getFileData(!0,null,null,null,g,J):null,D,null==this.pages||0==this.pages.length,W)}catch(oa){this.handleError(oa)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(qa){this.spinner.stop();this.handleError(qa)}),null,g,d||1,f,x,null,null,u,H,G,T,Z)}catch(qa){this.spinner.stop(),this.handleError(qa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,f,g,x,y,u,H){f=null!=f?f:0;g=null!=g?g:0;var J= +[];try{var D=this.editor.graph;if(null!=d&&0<d.length){D.model.beginUpdate();try{var G=mxUtils.parseXml(d);d={};var W=this.editor.extractGraphModel(G.documentElement,null!=this.pages);if(null!=W&&"mxfile"==W.nodeName&&null!=this.pages){var T=W.getElementsByTagName("diagram");if(1==T.length&&!u){if(W=Editor.parseDiagramNode(T[0]),null!=this.currentPage&&(d[T[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var Z=T[0].getAttribute("name");null!=Z&&""!=Z&&this.editor.graph.model.execute(new RenamePage(this, +this.currentPage,Z))}}else if(0<T.length){u=[];var N=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[T[0].getAttribute("id")]=this.pages[0].getId(),W=Editor.parseDiagramNode(T[0]),x=!1,N=1);for(;N<T.length;N++){var qa=T[N].getAttribute("id");T[N].removeAttribute("id");var oa=this.updatePageRoot(new DiagramPage(T[N]));d[qa]=T[N].getAttribute("id");var S=this.pages.length;null==oa.getName()&&oa.setName(mxResources.get("pageWithNumber",[S+1]));D.model.execute(new ChangePage(this, +oa,oa,S,!0));u.push(oa)}this.updatePageLinks(d,u)}}if(null!=W&&"mxGraphModel"===W.nodeName){J=D.importGraphModel(W,f,g,x);if(null!=J)for(N=0;N<J.length;N++)this.updatePageLinksForCell(d,J[N]);var fa=D.parseBackgroundImage(W.getAttribute("backgroundImage"));if(null!=fa&&null!=fa.originalSrc){this.updateBackgroundPageLink(d,fa);var ia=new ChangePageSetup(this,null,fa);ia.ignoreColor=!0;D.model.execute(ia)}}H&&this.insertHandler(J,null,null,D.defaultVertexStyle,D.defaultEdgeStyle,!1,!0)}finally{D.model.endUpdate()}}}catch(M){if(y)throw M; +this.handleError(M)}return J};EditorUi.prototype.updatePageLinks=function(d,f){for(var g=0;g<f.length;g++)this.updatePageLinksForCell(d,f[g].root),null!=f[g].viewState&&this.updateBackgroundPageLink(d,f[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var g=d[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=g&&(f.originalSrc="data:page/id,"+g)}}catch(x){}};EditorUi.prototype.updatePageLinksForCell= +function(d,f){var g=document.createElement("div"),x=this.editor.graph,y=x.getLinkForCell(f);null!=y&&x.setLinkForCell(f,this.updatePageLink(d,y));if(x.isHtmlLabel(f)){g.innerHTML=x.sanitizeHtml(x.getLabel(f));for(var u=g.getElementsByTagName("a"),H=!1,J=0;J<u.length;J++)y=u[J].getAttribute("href"),null!=y&&(u[J].setAttribute("href",this.updatePageLink(d,y)),H=!0);H&&x.labelChanged(f,g.innerHTML)}for(J=0;J<x.model.getChildCount(f);J++)this.updatePageLinksForCell(d,x.model.getChildAt(f,J))};EditorUi.prototype.updatePageLink= +function(d,f){if(Graph.isPageLink(f)){var g=d[f.substring(f.indexOf(",")+1)];f=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==f.substring(0,17))try{var x=JSON.parse(f.substring(17));if(null!=x.actions){for(var y=0;y<x.actions.length;y++){var u=x.actions[y];if(null!=u.open&&Graph.isPageLink(u.open)){var H=u.open.substring(u.open.indexOf(",")+1);g=d[H];null!=g?u.open="data:page/id,"+g:null==this.getPageById(H)&&delete u.open}}f="data:action/json,"+JSON.stringify(x)}}catch(J){}return f}; +EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,f,g,x,y){x=null!=x?x:d.name;g=null!=g?g:mxUtils.bind(this,function(H){this.handleError(H)});var u=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var H=this.isRemoteVisioFormat(x);try{var J="UNKNOWN-VISIO",D=x.lastIndexOf(".");if(0<=D&&D<x.length)J=x.substring(D+1).toUpperCase();else{var G=x.lastIndexOf("/");0<= +G&&G<x.length&&(x=x.substring(G+1))}EditorUi.logEvent({category:J+"-MS-IMPORT-FILE",action:"filename_"+x,label:H?"remote":"local"})}catch(T){}if(H)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{H=new FormData;H.append("file1",d,x);var W=new XMLHttpRequest;W.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(x)?"?stencil=1":""));W.responseType="blob";this.addRemoteServiceSecurityCheck(W); +null!=y&&W.setRequestHeader("x-convert-custom",y);W.onreadystatechange=mxUtils.bind(this,function(){if(4==W.readyState)if(200<=W.status&&299>=W.status)try{var T=W.response;if("text/xml"==T.type){var Z=new FileReader;Z.onload=mxUtils.bind(this,function(N){try{f(N.target.result)}catch(qa){g({message:mxResources.get("errorLoadingFile")})}});Z.readAsText(T)}else this.doImportVisio(T,f,g,x)}catch(N){g(N)}else try{""==W.responseType||"text"==W.responseType?g({message:W.responseText}):(Z=new FileReader, +Z.onload=function(){g({message:JSON.parse(Z.result).Message})},Z.readAsText(W.response))}catch(N){g({})}});W.send(H)}else try{this.doImportVisio(d,f,g,x)}catch(T){g(T)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?u():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",u))};EditorUi.prototype.importGraphML=function(d,f,g){g=null!=g?g:mxUtils.bind(this,function(y){this.handleError(y)}); +var x=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(d,f,g)}catch(y){g(y)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?x():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",x))};EditorUi.prototype.exportVisio=function(d){var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(d)|| +this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.convertLucidChart=function(d,f,g){var x=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var y= +JSON.parse(d);f(LucidImporter.importState(y));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var u=[(new Date).toISOString(),"convertLucidChart",y];null!=y.state&&u.push(JSON.parse(y.state));if(null!=y.svgThumbs)for(var H=0;H<y.svgThumbs.length;H++)u.push(Editor.createSvgDataUri(y.svgThumbs[H]));null!=y.thumb&&u.push(y.thumb);console.log.apply(console,u)}}catch(J){}}catch(J){null!=window.console&&console.error(J),g(J)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})}); "undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(x,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",x)})})})}):mxscript("js/extensions.min.js",x))};EditorUi.prototype.generateMermaidImage=function(d, -f,g,x){var z=this,u=function(){try{this.loadingMermaid=!1,f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig),f.securityLevel="strict",f.startOnLoad=!1,Editor.isDarkMode()&&(f.theme="dark"),mermaid.mermaidAPI.initialize(f),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(H){try{if(mxClient.IS_IE||mxClient.IS_IE11)H=H.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var J=mxUtils.parseXml(H).getElementsByTagName("svg"); -if(0<J.length){var D=parseFloat(J[0].getAttribute("width")),G=parseFloat(J[0].getAttribute("height"));if(isNaN(D)||isNaN(G))try{var V=J[0].getAttribute("viewBox").split(/\s+/);D=parseFloat(V[2]);G=parseFloat(V[3])}catch(U){D=D||100,G=G||100}g(z.convertDataUri(Editor.createSvgDataUri(H)),D,G)}else x({message:mxResources.get("invalidInput")})}catch(U){x(U)}})}catch(H){x(H)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?u():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js", -u):mxscript("js/extensions.min.js",u))};EditorUi.prototype.generatePlantUmlImage=function(d,f,g,x){function z(J,D,G){c1=J>>2;c2=(J&3)<<4|D>>4;c3=(D&15)<<2|G>>6;c4=G&63;r="";r+=u(c1&63);r+=u(c2&63);r+=u(c3&63);return r+=u(c4&63)}function u(J){if(10>J)return String.fromCharCode(48+J);J-=10;if(26>J)return String.fromCharCode(65+J);J-=26;if(26>J)return String.fromCharCode(97+J);J-=26;return 0==J?"-":1==J?"_":"?"}var H=new XMLHttpRequest;H.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/": -PLANT_URL+"/svg/")+function(J){r="";for(i=0;i<J.length;i+=3)r=i+2==J.length?r+z(J.charCodeAt(i),J.charCodeAt(i+1),0):i+1==J.length?r+z(J.charCodeAt(i),0,0):r+z(J.charCodeAt(i),J.charCodeAt(i+1),J.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(H.responseType="blob");H.onload=function(J){if(200<=this.status&&300>this.status)if("txt"==f)g(this.response);else{var D=new FileReader;D.readAsDataURL(this.response);D.onloadend=function(G){var V=new Image;V.onload= -function(){try{var U=V.width,Y=V.height;if(0==U&&0==Y){var O=D.result,qa=O.indexOf(","),oa=decodeURIComponent(escape(atob(O.substring(qa+1)))),aa=mxUtils.parseXml(oa).getElementsByTagName("svg");0<aa.length&&(U=parseFloat(aa[0].getAttribute("width")),Y=parseFloat(aa[0].getAttribute("height")))}g(D.result,U,Y)}catch(da){x(da)}};V.src=D.result};D.onerror=function(G){x(G)}}else x(J)};H.onerror=function(J){x(J)};H.send()};EditorUi.prototype.insertAsPreText=function(d,f,g){var x=this.editor.graph,z=null; -x.getModel().beginUpdate();try{z=x.insertVertex(null,null,"<pre>"+d+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),x.updateCellSize(z,!0)}finally{x.getModel().endUpdate()}return z};EditorUi.prototype.insertTextAt=function(d,f,g,x,z,u,H,J){u=null!=u?u:!0;H=null!=H?H:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g," "), -mxUtils.bind(this,function(Y){4==Y.readyState&&200<=Y.status&&299>=Y.status&&this.editor.graph.setSelectionCells(this.insertTextAt(Y.responseText,f,g,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(z||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var D=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var G=Editor.extractGraphModelFromPdf(d);if(null!=G&&0<G.length)return this.importXml(G,f,g,u,!0,J)}if(Editor.isPngDataUrl(d)&&(G=Editor.extractGraphModelFromPng(d), -null!=G&&0<G.length))return this.importXml(G,f,g,u,!0,J);if("data:image/svg+xml;"==d.substring(0,19))try{G=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(G=d.substring(d.indexOf(",")+1),G=window.atob&&!mxClient.IS_SF?atob(G):Base64.decode(G,!0)):G=decodeURIComponent(d.substring(d.indexOf(",")+1));var V=this.importXml(G,f,g,u,!0,J);if(0<V.length)return V}catch(Y){}this.loadImage(d,mxUtils.bind(this,function(Y){if("data:"==d.substring(0,5))this.resizeImage(Y,d,mxUtils.bind(this,function(oa,aa, -da){D.setSelectionCell(D.insertVertex(null,null,"",D.snap(f),D.snap(g),aa,da,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(oa)+";"))}),H,this.maxImageSize);else{var O=Math.min(1,Math.min(this.maxImageSize/Y.width,this.maxImageSize/Y.height)),qa=Math.round(Y.width*O);Y=Math.round(Y.height*O);D.setSelectionCell(D.insertVertex(null,null,"",D.snap(f),D.snap(g),qa,Y,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+ -d+";"))}}),mxUtils.bind(this,function(){var Y=null;D.getModel().beginUpdate();try{Y=D.insertVertex(D.getDefaultParent(),null,d,D.snap(f),D.snap(g),1,1,"text;"+(x?"html=1;":"")),D.updateCellSize(Y),D.fireEvent(new mxEventObject("textInserted","cells",[Y]))}finally{D.getModel().endUpdate()}D.setSelectionCell(Y)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,g,u,null,J);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this, -function(Y){this.editor.graph.setSelectionCells(this.importXml(Y,f,g,u,null,J))}),mxUtils.bind(this,function(Y){this.handleError(Y)}));else{D=this.editor.graph;z=null;D.getModel().beginUpdate();try{z=D.insertVertex(D.getDefaultParent(),null,"",D.snap(f),D.snap(g),1,1,"text;whiteSpace=wrap;"+(x?"html=1;":""));D.fireEvent(new mxEventObject("textInserted","cells",[z]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+ -"...");z.value=d;D.updateCellSize(z);if(0<this.maxTextWidth&&z.geometry.width>this.maxTextWidth){var U=D.getPreferredSizeForCell(z,this.maxTextWidth);z.geometry.width=U.width;z.geometry.height=U.height}Graph.isLink(z.value)&&D.setLinkForCell(z,z.value);z.geometry.width+=D.gridSize;z.geometry.height+=D.gridSize}finally{D.getModel().endUpdate()}return[z]}}return[]};EditorUi.prototype.formatFileSize=function(d){var f=-1;do d/=1024,f++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]}; +f,g,x){var y=this,u=function(){try{this.loadingMermaid=!1,f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig),f.securityLevel="strict",f.startOnLoad=!1,Editor.isDarkMode()&&(f.theme="dark"),mermaid.mermaidAPI.initialize(f),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(H){try{if(mxClient.IS_IE||mxClient.IS_IE11)H=H.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var J=mxUtils.parseXml(H).getElementsByTagName("svg"); +if(0<J.length){var D=parseFloat(J[0].getAttribute("width")),G=parseFloat(J[0].getAttribute("height"));if(isNaN(D)||isNaN(G))try{var W=J[0].getAttribute("viewBox").split(/\s+/);D=parseFloat(W[2]);G=parseFloat(W[3])}catch(T){D=D||100,G=G||100}g(y.convertDataUri(Editor.createSvgDataUri(H)),D,G)}else x({message:mxResources.get("invalidInput")})}catch(T){x(T)}})}catch(H){x(H)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?u():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js", +u):mxscript("js/extensions.min.js",u))};EditorUi.prototype.generatePlantUmlImage=function(d,f,g,x){function y(J,D,G){c1=J>>2;c2=(J&3)<<4|D>>4;c3=(D&15)<<2|G>>6;c4=G&63;r="";r+=u(c1&63);r+=u(c2&63);r+=u(c3&63);return r+=u(c4&63)}function u(J){if(10>J)return String.fromCharCode(48+J);J-=10;if(26>J)return String.fromCharCode(65+J);J-=26;if(26>J)return String.fromCharCode(97+J);J-=26;return 0==J?"-":1==J?"_":"?"}var H=new XMLHttpRequest;H.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/": +PLANT_URL+"/svg/")+function(J){r="";for(i=0;i<J.length;i+=3)r=i+2==J.length?r+y(J.charCodeAt(i),J.charCodeAt(i+1),0):i+1==J.length?r+y(J.charCodeAt(i),0,0):r+y(J.charCodeAt(i),J.charCodeAt(i+1),J.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(H.responseType="blob");H.onload=function(J){if(200<=this.status&&300>this.status)if("txt"==f)g(this.response);else{var D=new FileReader;D.readAsDataURL(this.response);D.onloadend=function(G){var W=new Image;W.onload= +function(){try{var T=W.width,Z=W.height;if(0==T&&0==Z){var N=D.result,qa=N.indexOf(","),oa=decodeURIComponent(escape(atob(N.substring(qa+1)))),S=mxUtils.parseXml(oa).getElementsByTagName("svg");0<S.length&&(T=parseFloat(S[0].getAttribute("width")),Z=parseFloat(S[0].getAttribute("height")))}g(D.result,T,Z)}catch(fa){x(fa)}};W.src=D.result};D.onerror=function(G){x(G)}}else x(J)};H.onerror=function(J){x(J)};H.send()};EditorUi.prototype.insertAsPreText=function(d,f,g){var x=this.editor.graph,y=null;x.getModel().beginUpdate(); +try{y=x.insertVertex(null,null,"<pre>"+d+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),x.updateCellSize(y,!0)}finally{x.getModel().endUpdate()}return y};EditorUi.prototype.insertTextAt=function(d,f,g,x,y,u,H,J){u=null!=u?u:!0;H=null!=H?H:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g," "),mxUtils.bind(this,function(Z){4== +Z.readyState&&200<=Z.status&&299>=Z.status&&this.editor.graph.setSelectionCells(this.insertTextAt(Z.responseText,f,g,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(y||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var D=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var G=Editor.extractGraphModelFromPdf(d);if(null!=G&&0<G.length)return this.importXml(G,f,g,u,!0,J)}if(Editor.isPngDataUrl(d)&&(G=Editor.extractGraphModelFromPng(d),null!=G&&0<G.length))return this.importXml(G, +f,g,u,!0,J);if("data:image/svg+xml;"==d.substring(0,19))try{G=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(G=d.substring(d.indexOf(",")+1),G=window.atob&&!mxClient.IS_SF?atob(G):Base64.decode(G,!0)):G=decodeURIComponent(d.substring(d.indexOf(",")+1));var W=this.importXml(G,f,g,u,!0,J);if(0<W.length)return W}catch(Z){}this.loadImage(d,mxUtils.bind(this,function(Z){if("data:"==d.substring(0,5))this.resizeImage(Z,d,mxUtils.bind(this,function(oa,S,fa){D.setSelectionCell(D.insertVertex(null,null, +"",D.snap(f),D.snap(g),S,fa,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(oa)+";"))}),H,this.maxImageSize);else{var N=Math.min(1,Math.min(this.maxImageSize/Z.width,this.maxImageSize/Z.height)),qa=Math.round(Z.width*N);Z=Math.round(Z.height*N);D.setSelectionCell(D.insertVertex(null,null,"",D.snap(f),D.snap(g),qa,Z,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+ +d+";"))}}),mxUtils.bind(this,function(){var Z=null;D.getModel().beginUpdate();try{Z=D.insertVertex(D.getDefaultParent(),null,d,D.snap(f),D.snap(g),1,1,"text;"+(x?"html=1;":"")),D.updateCellSize(Z),D.fireEvent(new mxEventObject("textInserted","cells",[Z]))}finally{D.getModel().endUpdate()}D.setSelectionCell(Z)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,g,u,null,J);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this, +function(Z){this.editor.graph.setSelectionCells(this.importXml(Z,f,g,u,null,J))}),mxUtils.bind(this,function(Z){this.handleError(Z)}));else{D=this.editor.graph;y=null;D.getModel().beginUpdate();try{y=D.insertVertex(D.getDefaultParent(),null,"",D.snap(f),D.snap(g),1,1,"text;whiteSpace=wrap;"+(x?"html=1;":""));D.fireEvent(new mxEventObject("textInserted","cells",[y]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+ +"...");y.value=d;D.updateCellSize(y);if(0<this.maxTextWidth&&y.geometry.width>this.maxTextWidth){var T=D.getPreferredSizeForCell(y,this.maxTextWidth);y.geometry.width=T.width;y.geometry.height=T.height}Graph.isLink(y.value)&&D.setLinkForCell(y,y.value);y.geometry.width+=D.gridSize;y.geometry.height+=D.gridSize}finally{D.getModel().endUpdate()}return[y]}}return[]};EditorUi.prototype.formatFileSize=function(d){var f=-1;do d/=1024,f++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]}; EditorUi.prototype.convertDataUri=function(d){if("data:"==d.substring(0,5)){var f=d.indexOf(";");0<f&&(d=d.substring(0,f)+d.substring(d.indexOf(",",f+1)))}return d};EditorUi.prototype.isRemoteFileFormat=function(d,f){return/("contentType":\s*"application\/gliffy\+json")/.test(d)};EditorUi.prototype.isLucidChartData=function(d){return null!=d&&('{"state":"{\\"Properties\\":'==d.substring(0,26)||'{"Properties":'==d.substring(0,14))};EditorUi.prototype.importLocalFile=function(d,f){if(d&&Graph.fileSupport){if(null== this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display="none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(H,J){StorageFile.listFiles(this, "F",H,J)});window.openBrowserFile=mxUtils.bind(this,function(H,J,D){StorageFile.getFileContent(this,H,J,D)});window.deleteBrowserFile=mxUtils.bind(this,function(H,J,D){StorageFile.deleteFile(this,H,J,D)});if(!f){var x=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(H){this.hideDialog(H)}));window.openFile.setConsumer(mxUtils.bind(this,function(H,J){null!=J&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(J)?(H=new Blob([H],{type:"application/octet-stream"}), -this.importVisio(H,mxUtils.bind(this,function(D){this.importXml(D,0,0,!0)}),null,J)):this.editor.graph.setSelectionCells(this.importXml(H,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var z=this.dialog,u=z.close;this.dialog.close=mxUtils.bind(this,function(H){Editor.useLocalStorage=x;u.apply(z,arguments);H&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}}; -EditorUi.prototype.importZipFile=function(d,f,g){var x=this,z=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(u){if(mxUtils.isEmptyObject(u.files))g();else{var H=0,J,D=!1;u.forEach(function(G,V){G=V.name.toLowerCase();"diagram/diagram.xml"==G?(D=!0,V.async("string").then(function(U){0==U.indexOf("<mxfile ")?f(U):g()})):0==G.indexOf("versions/")&&(G=parseInt(G.substr(9)),G>H&&(H=G,J=V))});0<H?J.async("string").then(function(G){(new XMLHttpRequest).upload&& -x.isRemoteFileFormat(G,d.name)?x.isOffline()?x.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):x.parseFileData(G,mxUtils.bind(this,function(V){4==V.readyState&&(200<=V.status&&299>=V.status?f(V.responseText):g())}),d.name):g()}):D||g()}},function(u){g(u)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?z():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",z))};EditorUi.prototype.importFile=function(d,f,g,x,z,u,H,J,D,G,V,U){G=null!= -G?G:!0;var Y=!1,O=null,qa=mxUtils.bind(this,function(oa){var aa=null;null!=oa&&"<mxlibrary"==oa.substring(0,10)?this.loadLibrary(new LocalLibrary(this,oa,H)):aa=this.importXml(oa,g,x,G,null,null!=U?mxEvent.isControlDown(U):null);null!=J&&J(aa)});"image"==f.substring(0,5)?(D=!1,"image/png"==f.substring(0,9)&&(f=V?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(O=this.importXml(f,g,x,G,null,null!=U?mxEvent.isControlDown(U):null),D=!0)),D||(f=this.editor.graph,D=d.indexOf(";"),0<D&&(d=d.substring(0, -D)+d.substring(d.indexOf(",",D+1))),G&&f.isGridEnabled()&&(g=f.snap(g),x=f.snap(x)),O=[f.insertVertex(null,null,"",g,x,z,u,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";")])):/(\.*<graphml )/.test(d)?(Y=!0,this.importGraphML(d,qa)):null!=D&&null!=H&&(/(\.v(dx|sdx?))($|\?)/i.test(H)||/(\.vs(x|sx?))($|\?)/i.test(H))?(Y=!0,this.importVisio(D,qa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,H)?this.isOffline()? -this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(Y=!0,z=mxUtils.bind(this,function(oa){4==oa.readyState&&(200<=oa.status&&299>=oa.status?qa(oa.responseText):null!=J&&J(null))}),null!=d?this.parseFileData(d,z,H):this.parseFile(D,z,H)):0==d.indexOf("PK")&&null!=D?(Y=!0,this.importZipFile(D,qa,mxUtils.bind(this,function(){O=this.insertTextAt(this.validateFileData(d),g,x,!0,null,G);J(O)}))):/(\.v(sd|dx))($|\?)/i.test(H)||/(\.vs(s|x))($|\?)/i.test(H)||(O=this.insertTextAt(this.validateFileData(d), -g,x,!0,null,G,null,null!=U?mxEvent.isControlDown(U):null));Y||null==J||J(O);return O};EditorUi.prototype.importFiles=function(d,f,g,x,z,u,H,J,D,G,V,U,Y){x=null!=x?x:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var O=null!=f&&null!=g,qa=!0;f=null!=f?f:0;g=null!=g?g:0;var oa=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var aa=V||this.resampleThreshold,da=0;da<d.length;da++)if("image/svg"!==d[da].type.substring(0,9)&&"image/"===d[da].type.substring(0,6)&&d[da].size>aa){oa=!0;break}var ia=mxUtils.bind(this, -function(){var L=this.editor.graph,Z=L.gridSize;z=null!=z?z:mxUtils.bind(this,function(F,R,W,T,ba,ha,ra,ta,ma){try{return null!=F&&"<mxlibrary"==F.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,F,ra)),null):this.isCompatibleString(F)&&1==d.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,F,ra,!0)),null):this.importFile(F,R,W,T,ba,ha,ra,ta,ma,O,U,Y)}catch(pa){return this.handleError(pa),null}});u=null!=u?u:mxUtils.bind(this, -function(F){L.setSelectionCells(F)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var P=d.length,ca=P,ja=[],ka=mxUtils.bind(this,function(F,R){ja[F]=R;if(0==--ca){this.spinner.stop();if(null!=J)J(ja);else{var W=[];L.getModel().beginUpdate();try{for(F=0;F<ja.length;F++){var T=ja[F]();null!=T&&(W=W.concat(T))}}finally{L.getModel().endUpdate()}}u(W)}}),q=0;q<P;q++)mxUtils.bind(this,function(F){var R=d[F];if(null!=R){var W=new FileReader;W.onload=mxUtils.bind(this,function(T){if(null== -H||H(R))if("image/"==R.type.substring(0,6))if("image/svg"==R.type.substring(0,9)){var ba=Graph.clipSvgDataUri(T.target.result),ha=ba.indexOf(",");ha=decodeURIComponent(escape(atob(ba.substring(ha+1))));var ra=mxUtils.parseXml(ha);ha=ra.getElementsByTagName("svg");if(0<ha.length){ha=ha[0];var ta=U?null:ha.getAttribute("content");null!=ta&&"<"!=ta.charAt(0)&&"%"!=ta.charAt(0)&&(ta=unescape(window.atob?atob(ta):Base64.decode(ta,!0)));null!=ta&&"%"==ta.charAt(0)&&(ta=decodeURIComponent(ta));null==ta|| -"<mxfile "!==ta.substring(0,8)&&"<mxGraphModel "!==ta.substring(0,14)?ka(F,mxUtils.bind(this,function(){try{if(null!=ra){var za=ra.getElementsByTagName("svg");if(0<za.length){var Ba=za[0],Ia=Ba.getAttribute("width"),Aa=Ba.getAttribute("height");Ia=null!=Ia&&"%"!=Ia.charAt(Ia.length-1)?parseFloat(Ia):NaN;Aa=null!=Aa&&"%"!=Aa.charAt(Aa.length-1)?parseFloat(Aa):NaN;var Ka=Ba.getAttribute("viewBox");if(null==Ka||0==Ka.length)Ba.setAttribute("viewBox","0 0 "+Ia+" "+Aa);else if(isNaN(Ia)||isNaN(Aa)){var Da= -Ka.split(" ");3<Da.length&&(Ia=parseFloat(Da[2]),Aa=parseFloat(Da[3]))}ba=Editor.createSvgDataUri(mxUtils.getXml(Ba));var Ra=Math.min(1,Math.min(x/Math.max(1,Ia)),x/Math.max(1,Aa)),Qa=z(ba,R.type,f+F*Z,g+F*Z,Math.max(1,Math.round(Ia*Ra)),Math.max(1,Math.round(Aa*Ra)),R.name);if(isNaN(Ia)||isNaN(Aa)){var Ta=new Image;Ta.onload=mxUtils.bind(this,function(){Ia=Math.max(1,Ta.width);Aa=Math.max(1,Ta.height);Qa[0].geometry.width=Ia;Qa[0].geometry.height=Aa;Ba.setAttribute("viewBox","0 0 "+Ia+" "+Aa);ba= -Editor.createSvgDataUri(mxUtils.getXml(Ba));var Za=ba.indexOf(";");0<Za&&(ba=ba.substring(0,Za)+ba.substring(ba.indexOf(",",Za+1)));L.setCellStyles("image",ba,[Qa[0]])});Ta.src=Editor.createSvgDataUri(mxUtils.getXml(Ba))}return Qa}}}catch(Za){}return null})):ka(F,mxUtils.bind(this,function(){return z(ta,"text/xml",f+F*Z,g+F*Z,0,0,R.name)}))}else ka(F,mxUtils.bind(this,function(){return null}))}else{ha=!1;if("image/png"==R.type){var ma=U?null:this.extractGraphModelFromPng(T.target.result);if(null!= -ma&&0<ma.length){var pa=new Image;pa.src=T.target.result;ka(F,mxUtils.bind(this,function(){return z(ma,"text/xml",f+F*Z,g+F*Z,pa.width,pa.height,R.name)}));ha=!0}}ha||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(T.target.result,mxUtils.bind(this,function(za){this.resizeImage(za, -T.target.result,mxUtils.bind(this,function(Ba,Ia,Aa){ka(F,mxUtils.bind(this,function(){if(null!=Ba&&Ba.length<G){var Ka=qa&&this.isResampleImageSize(R.size,V)?Math.min(1,Math.min(x/Ia,x/Aa)):1;return z(Ba,R.type,f+F*Z,g+F*Z,Math.round(Ia*Ka),Math.round(Aa*Ka),R.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),qa,x,V,R.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else ba=T.target.result,z(ba,R.type,f+F* -Z,g+F*Z,240,160,R.name,function(za){ka(F,function(){return za})},R)});/(\.v(dx|sdx?))($|\?)/i.test(R.name)||/(\.vs(x|sx?))($|\?)/i.test(R.name)?z(null,R.type,f+F*Z,g+F*Z,240,160,R.name,function(T){ka(F,function(){return T})},R):"image"==R.type.substring(0,5)||"application/pdf"==R.type?W.readAsDataURL(R):W.readAsText(R)}})(q)});if(oa){oa=[];for(da=0;da<d.length;da++)oa.push(d[da]);d=oa;this.confirmImageResize(function(L){qa=L;ia()},D)}else ia()};EditorUi.prototype.isBlankFile=function(){return null!= -this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,f){f=null!=f?f:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},x=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,z=function(u,H){if(u||f)mxSettings.setResizeImages(u?H:null),mxSettings.save();g();d(H)};null==x||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"), -function(u){z(u,!0)},function(u){z(u,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):z(!1,x)};EditorUi.prototype.parseFile=function(d,f,g){g=null!=g?g:d.name;var x=new FileReader;x.onload=mxUtils.bind(this,function(){this.parseFileData(x.result,f,g)});x.readAsText(d)}; -EditorUi.prototype.parseFileData=function(d,f,g){var x=new XMLHttpRequest;x.open("POST",OPEN_URL);x.setRequestHeader("Content-Type","application/x-www-form-urlencoded");x.onreadystatechange=function(){f(x)};x.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(z){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>f};EditorUi.prototype.resizeImage= -function(d,f,g,x,z,u,H){z=null!=z?z:this.maxImageSize;var J=Math.max(1,d.width),D=Math.max(1,d.height);if(x&&this.isResampleImageSize(null!=H?H:f.length,u))try{var G=Math.max(J/z,D/z);if(1<G){var V=Math.round(J/G),U=Math.round(D/G),Y=document.createElement("canvas");Y.width=V;Y.height=U;Y.getContext("2d").drawImage(d,0,0,V,U);var O=Y.toDataURL();if(O.length<f.length){var qa=document.createElement("canvas");qa.width=V;qa.height=U;var oa=qa.toDataURL();O!==oa&&(f=O,J=V,D=U)}}}catch(aa){}g(f,J,D)};EditorUi.prototype.extractGraphModelFromPng= -function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,g){try{var x=new Image;x.onload=function(){x.width=0<x.width?x.width:120;x.height=0<x.height?x.height:120;f(x)};null!=g&&(x.onerror=g);x.src=d}catch(z){if(null!=g)g(z);else throw z;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var C=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval= -mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var d=this,f=this.editor.graph;Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(aa){var da=aa.getEvent(); -return null==aa.getState()&&!mxEvent.isMouseEvent(da)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(da)&&(null==aa.getState()||mxEvent.isControlDown(da)||mxEvent.isShiftDown(da))});f.cellEditor.editPlantUmlData=function(aa,da,ia){var L=JSON.parse(ia);da=new TextareaDialog(d,mxResources.get("plantUml")+":",L.data,function(Z){null!=Z&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(Z,L.format,function(P,ca,ja){d.spinner.stop();f.getModel().beginUpdate();try{if("txt"== -L.format)f.labelChanged(aa,"<pre>"+P+"</pre>"),f.updateCellSize(aa,!0);else{f.setCellStyles("image",d.convertDataUri(P),[aa]);var ka=f.model.getGeometry(aa);null!=ka&&(ka=ka.clone(),ka.width=ca,ka.height=ja,f.cellsResized([aa],[ka],!1))}f.setAttributeForCell(aa,"plantUmlData",JSON.stringify({data:Z,format:L.format}))}finally{f.getModel().endUpdate()}},function(P){d.handleError(P)})},null,null,400,220);d.showDialog(da.container,420,300,!0,!0);da.init()};f.cellEditor.editMermaidData=function(aa,da, -ia){var L=JSON.parse(ia);da=new TextareaDialog(d,mxResources.get("mermaid")+":",L.data,function(Z){null!=Z&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(Z,L.config,function(P,ca,ja){d.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",P,[aa]);var ka=f.model.getGeometry(aa);null!=ka&&(ka=ka.clone(),ka.width=Math.max(ka.width,ca),ka.height=Math.max(ka.height,ja),f.cellsResized([aa],[ka],!1));f.setAttributeForCell(aa,"mermaidData",JSON.stringify({data:Z, -config:L.config},null,2))}finally{f.getModel().endUpdate()}},function(P){d.handleError(P)})},null,null,400,220);d.showDialog(da.container,420,300,!0,!0);da.init()};var g=f.cellEditor.startEditing;f.cellEditor.startEditing=function(aa,da){try{var ia=this.graph.getAttributeForCell(aa,"plantUmlData");if(null!=ia)this.editPlantUmlData(aa,da,ia);else if(ia=this.graph.getAttributeForCell(aa,"mermaidData"),null!=ia)this.editMermaidData(aa,da,ia);else{var L=f.getCellStyle(aa);"1"==mxUtils.getValue(L,"metaEdit", -"0")?d.showDataDialog(aa):g.apply(this,arguments)}}catch(Z){d.handleError(Z)}};f.getLinkTitle=function(aa){return d.getLinkTitle(aa)};f.customLinkClicked=function(aa){var da=!1;try{d.handleCustomLink(aa),da=!0}catch(ia){d.handleError(ia)}return da};var x=f.parseBackgroundImage;f.parseBackgroundImage=function(aa){var da=x.apply(this,arguments);null!=da&&null!=da.src&&Graph.isPageLink(da.src)&&(da={originalSrc:da.src});return da};var z=f.setBackgroundImage;f.setBackgroundImage=function(aa){null!=aa&& -null!=aa.originalSrc&&(aa=d.createImageForPageLink(aa.originalSrc,d.currentPage,this));z.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(aa,da){aa=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=aa){var ia=aa.indexOf(",");if(0<ia)for(aa=aa.substring(ia+ -1),da=da.getProperty("patches"),ia=0;ia<da.length;ia++)if(null!=da[ia][EditorUi.DIFF_UPDATE]&&null!=da[ia][EditorUi.DIFF_UPDATE][aa]||null!=da[ia][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(da[ia][EditorUi.DIFF_REMOVE],aa)){f.refreshBackgroundImage();break}}}));var u=f.getBackgroundImageObject;f.getBackgroundImageObject=function(aa,da){var ia=u.apply(this,arguments);if(null!=ia&&null!=ia.originalSrc)if(!da)ia={src:ia.originalSrc};else if(da&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var L= -this.stylesheet,Z=this.shapeForegroundColor,P=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";ia=d.createImageForPageLink(ia.originalSrc);this.shapeBackgroundColor=P;this.shapeForegroundColor=Z;this.stylesheet=L}return ia};var H=this.clearDefaultStyle;this.clearDefaultStyle=function(){H.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink= -"https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var J=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(aa){aa=null!=aa?aa:"";"1"==urlParams.dev&&(aa+=(0<aa.length?"&":"?")+"dev=1");return J.apply(this,arguments)};var D=f.addClickHandler;f.addClickHandler=function(aa,da,ia){var L=da;da=function(Z,P){if(null== -P){var ca=mxEvent.getSource(Z);"a"==ca.nodeName.toLowerCase()&&(P=ca.getAttribute("href"))}null!=P&&f.isCustomLink(P)&&(mxEvent.isTouchEvent(Z)||!mxEvent.isPopupTrigger(Z))&&f.customLinkClicked(P)&&mxEvent.consume(Z);null!=L&&L(Z,P)};D.call(this,aa,da,ia)};C.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var G=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(aa,da,ia){d.editor.graph.isSelectionEmpty()? -G.apply(this,arguments):d.menus.addMenuItems(aa,"delete - cut copy copyAsImage - duplicate".split(" "),null,ia)}}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,null!=d.pages&&1<d.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var V=f.getExportVariables;f.getExportVariables=function(){var aa=V.apply(this,arguments),da=d.getCurrentFile();null!=da&&(aa.filename=da.getTitle());aa.pagecount=null!=d.pages?d.pages.length:1;aa.page= -null!=d.currentPage?d.currentPage.getName():"";aa.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return aa};var U=f.getGlobalVariable;f.getGlobalVariable=function(aa){var da=d.getCurrentFile();return"filename"==aa&&null!=da?da.getTitle():"page"==aa&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==aa?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==aa?null!=d.pages?d.pages.length:1:U.apply(this,arguments)}; -var Y=f.labelLinkClicked;f.labelLinkClicked=function(aa,da,ia){var L=da.getAttribute("href");if(null==L||!f.isCustomLink(L)||!mxEvent.isTouchEvent(ia)&&mxEvent.isPopupTrigger(ia))Y.apply(this,arguments);else{if(!f.isEnabled()||null!=aa&&f.isCellLocked(aa.cell))f.customLinkClicked(L),f.getRubberband().reset();mxEvent.consume(ia)}};this.editor.getOrCreateFilename=function(){var aa=d.defaultFilename,da=d.getCurrentFile();null!=da&&(aa=null!=da.getTitle()?da.getTitle():aa);return aa};var O=this.actions.get("print"); -O.setEnabled(!mxClient.IS_IOS||!navigator.standalone);O.visible=O.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"), -this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED, -mxUtils.bind(this,function(aa){var da=f.cellEditor.text2,ia=null;null!=da&&(mxEvent.addListener(da,"dragleave",function(L){null!=ia&&(ia.parentNode.removeChild(ia),ia=null);L.stopPropagation();L.preventDefault()}),mxEvent.addListener(da,"dragover",mxUtils.bind(this,function(L){null==ia&&(!mxClient.IS_IE||10<document.documentMode)&&(ia=this.highlightElement(da));L.stopPropagation();L.preventDefault()})),mxEvent.addListener(da,"drop",mxUtils.bind(this,function(L){null!=ia&&(ia.parentNode.removeChild(ia), -ia=null);if(0<L.dataTransfer.files.length)this.importFiles(L.dataTransfer.files,0,0,this.maxImageSize,function(P,ca,ja,ka,q,F){f.insertImage(P,q,F)},function(){},function(P){return"image/"==P.type.substring(0,6)},function(P){for(var ca=0;ca<P.length;ca++)P[ca]()},mxEvent.isControlDown(L));else if(0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")){var Z=L.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(Z)?this.loadImage(decodeURIComponent(Z),mxUtils.bind(this,function(P){var ca= -Math.max(1,P.width);P=Math.max(1,P.height);var ja=this.maxImageSize;ja=Math.min(1,Math.min(ja/Math.max(1,ca)),ja/Math.max(1,P));f.insertImage(decodeURIComponent(Z),ca*ja,P*ja)})):document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(L.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(L.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/plain")); -L.stopPropagation();L.preventDefault()})))}));this.isSettingsEnabled()&&(O=this.editor.graph.view,O.setUnit(mxSettings.getUnit()),O.addListener("unitChanged",function(aa,da){mxSettings.setUnit(da.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,O.unit),this.refresh());if("1"==urlParams.styledev){O=document.getElementById("geFooter"); -null!=O&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),O.appendChild(this.styleInput), -this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(aa,da){0<this.editor.graph.getSelectionCount()?(aa=this.editor.graph.getSelectionCell(),aa=this.editor.graph.getModel().getStyle(aa),this.styleInput.value=aa||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var qa=this.isSelectionAllowed;this.isSelectionAllowed=function(aa){return mxEvent.getSource(aa)==this.styleInput?!0:qa.apply(this,arguments)}}O=document.getElementById("geInfo"); -null!=O&&O.parentNode.removeChild(O);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var oa=null;mxEvent.addListener(f.container,"dragleave",function(aa){f.isEnabled()&&(null!=oa&&(oa.parentNode.removeChild(oa),oa=null),aa.stopPropagation(),aa.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(aa){null==oa&&(!mxClient.IS_IE||10<document.documentMode)&&(oa=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip(); -aa.stopPropagation();aa.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(aa){null!=oa&&(oa.parentNode.removeChild(oa),oa=null);if(f.isEnabled()){var da=mxUtils.convertPoint(f.container,mxEvent.getClientX(aa),mxEvent.getClientY(aa)),ia=aa.dataTransfer.files,L=f.view.translate,Z=f.view.scale,P=da.x/Z-L.x,ca=da.y/Z-L.y;if(0<ia.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(aa)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null), -this.openFiles(ia,!0)):(mxEvent.isAltDown(aa)&&(ca=P=null),this.importFiles(ia,P,ca,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(aa),null,null,mxEvent.isShiftDown(aa),aa));else{mxEvent.isAltDown(aa)&&(ca=P=0);var ja=0<=mxUtils.indexOf(aa.dataTransfer.types,"text/uri-list")?aa.dataTransfer.getData("text/uri-list"):null;da=this.extractGraphModelFromEvent(aa,null!=this.pages);if(null!=da)f.setSelectionCells(this.importXml(da,P,ca,!0));else if(0<=mxUtils.indexOf(aa.dataTransfer.types,"text/html")){var ka= -aa.dataTransfer.getData("text/html");da=document.createElement("div");da.innerHTML=f.sanitizeHtml(ka);var q=null;ia=da.getElementsByTagName("img");null!=ia&&1==ia.length?(ka=ia[0].getAttribute("src"),null==ka&&(ka=ia[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(ka)||(q=!0)):(ia=da.getElementsByTagName("a"),null!=ia&&1==ia.length?ka=ia[0].getAttribute("href"):(da=da.getElementsByTagName("pre"),null!=da&&1==da.length&&(ka=mxUtils.getTextContent(da[0]))));var F=!0,R=mxUtils.bind(this, -function(){f.setSelectionCells(this.insertTextAt(ka,P,ca,!0,q,null,F,mxEvent.isControlDown(aa)))});q&&null!=ka&&ka.length>this.resampleThreshold?this.confirmImageResize(function(W){F=W;R()},mxEvent.isControlDown(aa)):R()}else null!=ja&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(ja)?this.loadImage(decodeURIComponent(ja),mxUtils.bind(this,function(W){var T=Math.max(1,W.width);W=Math.max(1,W.height);var ba=this.maxImageSize;ba=Math.min(1,Math.min(ba/Math.max(1,T)),ba/Math.max(1,W));f.setSelectionCell(f.insertVertex(null, -null,"",P,ca,T*ba,W*ba,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+ja+";"))}),mxUtils.bind(this,function(W){f.setSelectionCells(this.insertTextAt(ja,P,ca,!0))})):0<=mxUtils.indexOf(aa.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(aa.dataTransfer.getData("text/plain"),P,ca,!0))}}aa.stopPropagation();aa.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode(); -O=mxUtils.bind(this,function(){f.refresh();f.view.validateBackground();this.updateTabContainer()});this.addListener("darkModeChanged",O);this.addListener("sketchModeChanged",O);"dark"==uiTheme?(this.doSetDarkMode(!0),this.fireEvent(new mxEventObject("darkModeChanged"))):"min"==uiTheme&&"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches); -this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var g=f.clipboardData||f.originalEvent.clipboardData,x=!1,z=0;z<g.types.length;z++)if("text/"===g.types[z].substring(0,5)){x=!0;break}if(!x){var u=g.items;for(index in u){var H=u[index];if("file"===H.kind){if(d.isEditing())this.importFiles([H.getAsFile()],0,0,this.maxImageSize, -function(D,G,V,U,Y,O){d.insertImage(D,Y,O)},function(){},function(D){return"image/"==D.type.substring(0,6)},function(D){for(var G=0;G<D.length;G++)D[G]()});else{var J=this.editor.graph.getInsertPoint();this.importFiles([H.getAsFile()],J.x,J.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(D){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){g.innerHTML=" ";g.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph, -g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize= -"none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML=" ";var x=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(u){var H=mxEvent.getSource(u);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==H.nodeName||"TEXTAREA"==H.nodeName||224!=u.keyCode&& -(mxClient.IS_MAC||17!=u.keyCode)&&(!mxClient.IS_MAC||91!=u.keyCode&&93!=u.keyCode)||x||(g.style.left=f.container.scrollLeft+10+"px",g.style.top=f.container.scrollTop+10+"px",f.container.appendChild(g),x=!0,g.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(u){var H=u.keyCode;window.setTimeout(mxUtils.bind(this,function(){!x||224!=H&&17!=H&&91!=H&&93!=H||(x=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(), -g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(u){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g),d()}catch(H){this.handleError(H)}}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(u){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g,!0),d()}catch(H){this.handleError(H)}}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(u){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&& -(g.innerHTML=" ",g.focus(),null!=u.clipboardData&&this.pasteCells(u,g,!0,!0),mxEvent.isConsumed(u)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(u,g,!1,!0)}),0))}),!0);var z=this.isSelectionAllowed;this.isSelectionAllowed=function(u){return mxEvent.getSource(u)==g?!0:z.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(d,f){mxSettings.setUi(d);this.doSetCurrentTheme(d);this.fireEvent(new mxEventObject("currentThemeChanged"));f||this.alert(mxResources.get("restartForChangeRequired"))}; -EditorUi.prototype.doSetCurrentTheme=function(d){Editor.currentTheme!=d&&(Editor.currentTheme=d)};EditorUi.prototype.setSketchMode=function(d){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+ -(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }": +this.importVisio(H,mxUtils.bind(this,function(D){this.importXml(D,0,0,!0)}),null,J)):this.editor.graph.setSelectionCells(this.importXml(H,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var y=this.dialog,u=y.close;this.dialog.close=mxUtils.bind(this,function(H){Editor.useLocalStorage=x;u.apply(y,arguments);H&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}}; +EditorUi.prototype.importZipFile=function(d,f,g){var x=this,y=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(u){if(mxUtils.isEmptyObject(u.files))g();else{var H=0,J,D=!1;u.forEach(function(G,W){G=W.name.toLowerCase();"diagram/diagram.xml"==G?(D=!0,W.async("string").then(function(T){0==T.indexOf("<mxfile ")?f(T):g()})):0==G.indexOf("versions/")&&(G=parseInt(G.substr(9)),G>H&&(H=G,J=W))});0<H?J.async("string").then(function(G){(new XMLHttpRequest).upload&& +x.isRemoteFileFormat(G,d.name)?x.isOffline()?x.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):x.parseFileData(G,mxUtils.bind(this,function(W){4==W.readyState&&(200<=W.status&&299>=W.status?f(W.responseText):g())}),d.name):g()}):D||g()}},function(u){g(u)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?y():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",y))};EditorUi.prototype.importFile=function(d,f,g,x,y,u,H,J,D,G,W,T){G=null!= +G?G:!0;var Z=!1,N=null,qa=mxUtils.bind(this,function(oa){var S=null;null!=oa&&"<mxlibrary"==oa.substring(0,10)?this.loadLibrary(new LocalLibrary(this,oa,H)):S=this.importXml(oa,g,x,G,null,null!=T?mxEvent.isControlDown(T):null);null!=J&&J(S)});"image"==f.substring(0,5)?(D=!1,"image/png"==f.substring(0,9)&&(f=W?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(N=this.importXml(f,g,x,G,null,null!=T?mxEvent.isControlDown(T):null),D=!0)),D||(f=this.editor.graph,D=d.indexOf(";"),0<D&&(d=d.substring(0, +D)+d.substring(d.indexOf(",",D+1))),G&&f.isGridEnabled()&&(g=f.snap(g),x=f.snap(x)),N=[f.insertVertex(null,null,"",g,x,y,u,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";")])):/(\.*<graphml )/.test(d)?(Z=!0,this.importGraphML(d,qa)):null!=D&&null!=H&&(/(\.v(dx|sdx?))($|\?)/i.test(H)||/(\.vs(x|sx?))($|\?)/i.test(H))?(Z=!0,this.importVisio(D,qa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,H)?this.isOffline()? +this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(Z=!0,y=mxUtils.bind(this,function(oa){4==oa.readyState&&(200<=oa.status&&299>=oa.status?qa(oa.responseText):null!=J&&J(null))}),null!=d?this.parseFileData(d,y,H):this.parseFile(D,y,H)):0==d.indexOf("PK")&&null!=D?(Z=!0,this.importZipFile(D,qa,mxUtils.bind(this,function(){N=this.insertTextAt(this.validateFileData(d),g,x,!0,null,G);J(N)}))):/(\.v(sd|dx))($|\?)/i.test(H)||/(\.vs(s|x))($|\?)/i.test(H)||(N=this.insertTextAt(this.validateFileData(d), +g,x,!0,null,G,null,null!=T?mxEvent.isControlDown(T):null));Z||null==J||J(N);return N};EditorUi.prototype.importFiles=function(d,f,g,x,y,u,H,J,D,G,W,T,Z){x=null!=x?x:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var N=null!=f&&null!=g,qa=!0;f=null!=f?f:0;g=null!=g?g:0;var oa=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var S=W||this.resampleThreshold,fa=0;fa<d.length;fa++)if("image/svg"!==d[fa].type.substring(0,9)&&"image/"===d[fa].type.substring(0,6)&&d[fa].size>S){oa=!0;break}var ia=mxUtils.bind(this, +function(){var M=this.editor.graph,aa=M.gridSize;y=null!=y?y:mxUtils.bind(this,function(E,Q,Y,R,ba,ea,ra,ta,la){try{return null!=E&&"<mxlibrary"==E.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,E,ra)),null):this.isCompatibleString(E)&&1==d.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,E,ra,!0)),null):this.importFile(E,Q,Y,R,ba,ea,ra,ta,la,N,T,Z)}catch(pa){return this.handleError(pa),null}});u=null!=u?u:mxUtils.bind(this, +function(E){M.setSelectionCells(E)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var X=d.length,ja=X,ca=[],ka=mxUtils.bind(this,function(E,Q){ca[E]=Q;if(0==--ja){this.spinner.stop();if(null!=J)J(ca);else{var Y=[];M.getModel().beginUpdate();try{for(E=0;E<ca.length;E++){var R=ca[E]();null!=R&&(Y=Y.concat(R))}}finally{M.getModel().endUpdate()}}u(Y)}}),q=0;q<X;q++)mxUtils.bind(this,function(E){var Q=d[E];if(null!=Q){var Y=new FileReader;Y.onload=mxUtils.bind(this,function(R){if(null== +H||H(Q))if("image/"==Q.type.substring(0,6))if("image/svg"==Q.type.substring(0,9)){var ba=Graph.clipSvgDataUri(R.target.result),ea=ba.indexOf(",");ea=decodeURIComponent(escape(atob(ba.substring(ea+1))));var ra=mxUtils.parseXml(ea);ea=ra.getElementsByTagName("svg");if(0<ea.length){ea=ea[0];var ta=T?null:ea.getAttribute("content");null!=ta&&"<"!=ta.charAt(0)&&"%"!=ta.charAt(0)&&(ta=unescape(window.atob?atob(ta):Base64.decode(ta,!0)));null!=ta&&"%"==ta.charAt(0)&&(ta=decodeURIComponent(ta));null==ta|| +"<mxfile "!==ta.substring(0,8)&&"<mxGraphModel "!==ta.substring(0,14)?ka(E,mxUtils.bind(this,function(){try{if(null!=ra){var xa=ra.getElementsByTagName("svg");if(0<xa.length){var Ca=xa[0],Ia=Ca.getAttribute("width"),Aa=Ca.getAttribute("height");Ia=null!=Ia&&"%"!=Ia.charAt(Ia.length-1)?parseFloat(Ia):NaN;Aa=null!=Aa&&"%"!=Aa.charAt(Aa.length-1)?parseFloat(Aa):NaN;var La=Ca.getAttribute("viewBox");if(null==La||0==La.length)Ca.setAttribute("viewBox","0 0 "+Ia+" "+Aa);else if(isNaN(Ia)||isNaN(Aa)){var Da= +La.split(" ");3<Da.length&&(Ia=parseFloat(Da[2]),Aa=parseFloat(Da[3]))}ba=Editor.createSvgDataUri(mxUtils.getXml(Ca));var Sa=Math.min(1,Math.min(x/Math.max(1,Ia)),x/Math.max(1,Aa)),Ra=y(ba,Q.type,f+E*aa,g+E*aa,Math.max(1,Math.round(Ia*Sa)),Math.max(1,Math.round(Aa*Sa)),Q.name);if(isNaN(Ia)||isNaN(Aa)){var Ta=new Image;Ta.onload=mxUtils.bind(this,function(){Ia=Math.max(1,Ta.width);Aa=Math.max(1,Ta.height);Ra[0].geometry.width=Ia;Ra[0].geometry.height=Aa;Ca.setAttribute("viewBox","0 0 "+Ia+" "+Aa); +ba=Editor.createSvgDataUri(mxUtils.getXml(Ca));var Za=ba.indexOf(";");0<Za&&(ba=ba.substring(0,Za)+ba.substring(ba.indexOf(",",Za+1)));M.setCellStyles("image",ba,[Ra[0]])});Ta.src=Editor.createSvgDataUri(mxUtils.getXml(Ca))}return Ra}}}catch(Za){}return null})):ka(E,mxUtils.bind(this,function(){return y(ta,"text/xml",f+E*aa,g+E*aa,0,0,Q.name)}))}else ka(E,mxUtils.bind(this,function(){return null}))}else{ea=!1;if("image/png"==Q.type){var la=T?null:this.extractGraphModelFromPng(R.target.result);if(null!= +la&&0<la.length){var pa=new Image;pa.src=R.target.result;ka(E,mxUtils.bind(this,function(){return y(la,"text/xml",f+E*aa,g+E*aa,pa.width,pa.height,Q.name)}));ea=!0}}ea||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(R.target.result,mxUtils.bind(this,function(xa){this.resizeImage(xa, +R.target.result,mxUtils.bind(this,function(Ca,Ia,Aa){ka(E,mxUtils.bind(this,function(){if(null!=Ca&&Ca.length<G){var La=qa&&this.isResampleImageSize(Q.size,W)?Math.min(1,Math.min(x/Ia,x/Aa)):1;return y(Ca,Q.type,f+E*aa,g+E*aa,Math.round(Ia*La),Math.round(Aa*La),Q.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),qa,x,W,Q.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else ba=R.target.result,y(ba,Q.type,f+ +E*aa,g+E*aa,240,160,Q.name,function(xa){ka(E,function(){return xa})},Q)});/(\.v(dx|sdx?))($|\?)/i.test(Q.name)||/(\.vs(x|sx?))($|\?)/i.test(Q.name)?y(null,Q.type,f+E*aa,g+E*aa,240,160,Q.name,function(R){ka(E,function(){return R})},Q):"image"==Q.type.substring(0,5)||"application/pdf"==Q.type?Y.readAsDataURL(Q):Y.readAsText(Q)}})(q)});if(oa){oa=[];for(fa=0;fa<d.length;fa++)oa.push(d[fa]);d=oa;this.confirmImageResize(function(M){qa=M;ia()},D)}else ia()};EditorUi.prototype.isBlankFile=function(){return null!= +this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,f){f=null!=f?f:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},x=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,y=function(u,H){if(u||f)mxSettings.setResizeImages(u?H:null),mxSettings.save();g();d(H)};null==x||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"), +function(u){y(u,!0)},function(u){y(u,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):y(!1,x)};EditorUi.prototype.parseFile=function(d,f,g){g=null!=g?g:d.name;var x=new FileReader;x.onload=mxUtils.bind(this,function(){this.parseFileData(x.result,f,g)});x.readAsText(d)}; +EditorUi.prototype.parseFileData=function(d,f,g){var x=new XMLHttpRequest;x.open("POST",OPEN_URL);x.setRequestHeader("Content-Type","application/x-www-form-urlencoded");x.onreadystatechange=function(){f(x)};x.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(y){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>f};EditorUi.prototype.resizeImage= +function(d,f,g,x,y,u,H){y=null!=y?y:this.maxImageSize;var J=Math.max(1,d.width),D=Math.max(1,d.height);if(x&&this.isResampleImageSize(null!=H?H:f.length,u))try{var G=Math.max(J/y,D/y);if(1<G){var W=Math.round(J/G),T=Math.round(D/G),Z=document.createElement("canvas");Z.width=W;Z.height=T;Z.getContext("2d").drawImage(d,0,0,W,T);var N=Z.toDataURL();if(N.length<f.length){var qa=document.createElement("canvas");qa.width=W;qa.height=T;var oa=qa.toDataURL();N!==oa&&(f=N,J=W,D=T)}}}catch(S){}g(f,J,D)};EditorUi.prototype.extractGraphModelFromPng= +function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,g){try{var x=new Image;x.onload=function(){x.width=0<x.width?x.width:120;x.height=0<x.height?x.height:120;f(x)};null!=g&&(x.onerror=g);x.src=d}catch(y){if(null!=g)g(y);else throw y;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var C=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval= +mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var d=this,f=this.editor.graph;Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(S){var fa=S.getEvent(); +return null==S.getState()&&!mxEvent.isMouseEvent(fa)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(fa)&&(null==S.getState()||mxEvent.isControlDown(fa)||mxEvent.isShiftDown(fa))});f.cellEditor.editPlantUmlData=function(S,fa,ia){var M=JSON.parse(ia);fa=new TextareaDialog(d,mxResources.get("plantUml")+":",M.data,function(aa){null!=aa&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(aa,M.format,function(X,ja,ca){d.spinner.stop();f.getModel().beginUpdate();try{if("txt"== +M.format)f.labelChanged(S,"<pre>"+X+"</pre>"),f.updateCellSize(S,!0);else{f.setCellStyles("image",d.convertDataUri(X),[S]);var ka=f.model.getGeometry(S);null!=ka&&(ka=ka.clone(),ka.width=ja,ka.height=ca,f.cellsResized([S],[ka],!1))}f.setAttributeForCell(S,"plantUmlData",JSON.stringify({data:aa,format:M.format}))}finally{f.getModel().endUpdate()}},function(X){d.handleError(X)})},null,null,400,220);d.showDialog(fa.container,420,300,!0,!0);fa.init()};f.cellEditor.editMermaidData=function(S,fa,ia){var M= +JSON.parse(ia);fa=new TextareaDialog(d,mxResources.get("mermaid")+":",M.data,function(aa){null!=aa&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(aa,M.config,function(X,ja,ca){d.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",X,[S]);var ka=f.model.getGeometry(S);null!=ka&&(ka=ka.clone(),ka.width=Math.max(ka.width,ja),ka.height=Math.max(ka.height,ca),f.cellsResized([S],[ka],!1));f.setAttributeForCell(S,"mermaidData",JSON.stringify({data:aa, +config:M.config},null,2))}finally{f.getModel().endUpdate()}},function(X){d.handleError(X)})},null,null,400,220);d.showDialog(fa.container,420,300,!0,!0);fa.init()};var g=f.cellEditor.startEditing;f.cellEditor.startEditing=function(S,fa){try{var ia=this.graph.getAttributeForCell(S,"plantUmlData");if(null!=ia)this.editPlantUmlData(S,fa,ia);else if(ia=this.graph.getAttributeForCell(S,"mermaidData"),null!=ia)this.editMermaidData(S,fa,ia);else{var M=f.getCellStyle(S);"1"==mxUtils.getValue(M,"metaEdit", +"0")?d.showDataDialog(S):g.apply(this,arguments)}}catch(aa){d.handleError(aa)}};f.getLinkTitle=function(S){return d.getLinkTitle(S)};f.customLinkClicked=function(S){var fa=!1;try{d.handleCustomLink(S),fa=!0}catch(ia){d.handleError(ia)}return fa};var x=f.parseBackgroundImage;f.parseBackgroundImage=function(S){var fa=x.apply(this,arguments);null!=fa&&null!=fa.src&&Graph.isPageLink(fa.src)&&(fa={originalSrc:fa.src});return fa};var y=f.setBackgroundImage;f.setBackgroundImage=function(S){null!=S&&null!= +S.originalSrc&&(S=d.createImageForPageLink(S.originalSrc,d.currentPage,this));y.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(S,fa){S=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=S){var ia=S.indexOf(",");if(0<ia)for(S=S.substring(ia+1),fa=fa.getProperty("patches"), +ia=0;ia<fa.length;ia++)if(null!=fa[ia][EditorUi.DIFF_UPDATE]&&null!=fa[ia][EditorUi.DIFF_UPDATE][S]||null!=fa[ia][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(fa[ia][EditorUi.DIFF_REMOVE],S)){f.refreshBackgroundImage();break}}}));var u=f.getBackgroundImageObject;f.getBackgroundImageObject=function(S,fa){var ia=u.apply(this,arguments);if(null!=ia&&null!=ia.originalSrc)if(!fa)ia={src:ia.originalSrc};else if(fa&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var M=this.stylesheet,aa=this.shapeForegroundColor, +X=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";ia=d.createImageForPageLink(ia.originalSrc);this.shapeBackgroundColor=X;this.shapeForegroundColor=aa;this.stylesheet=M}return ia};var H=this.clearDefaultStyle;this.clearDefaultStyle=function(){H.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders"); +if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var J=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(S){S=null!=S?S:"";"1"==urlParams.dev&&(S+=(0<S.length?"&":"?")+"dev=1");return J.apply(this,arguments)};var D=f.addClickHandler;f.addClickHandler=function(S,fa,ia){var M=fa;fa=function(aa,X){if(null==X){var ja=mxEvent.getSource(aa);"a"==ja.nodeName.toLowerCase()&&(X= +ja.getAttribute("href"))}null!=X&&f.isCustomLink(X)&&(mxEvent.isTouchEvent(aa)||!mxEvent.isPopupTrigger(aa))&&f.customLinkClicked(X)&&mxEvent.consume(aa);null!=M&&M(aa,X)};D.call(this,S,fa,ia)};C.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var G=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(S,fa,ia){d.editor.graph.isSelectionEmpty()?G.apply(this,arguments):d.menus.addMenuItems(S, +"delete - cut copy copyAsImage - duplicate".split(" "),null,ia)}}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,null!=d.pages&&1<d.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var W=f.getExportVariables;f.getExportVariables=function(){var S=W.apply(this,arguments),fa=d.getCurrentFile();null!=fa&&(S.filename=fa.getTitle());S.pagecount=null!=d.pages?d.pages.length:1;S.page=null!=d.currentPage?d.currentPage.getName():""; +S.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return S};var T=f.getGlobalVariable;f.getGlobalVariable=function(S){var fa=d.getCurrentFile();return"filename"==S&&null!=fa?fa.getTitle():"page"==S&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==S?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==S?null!=d.pages?d.pages.length:1:T.apply(this,arguments)};var Z=f.labelLinkClicked;f.labelLinkClicked=function(S, +fa,ia){var M=fa.getAttribute("href");if(null==M||!f.isCustomLink(M)||!mxEvent.isTouchEvent(ia)&&mxEvent.isPopupTrigger(ia))Z.apply(this,arguments);else{if(!f.isEnabled()||null!=S&&f.isCellLocked(S.cell))f.customLinkClicked(M),f.getRubberband().reset();mxEvent.consume(ia)}};this.editor.getOrCreateFilename=function(){var S=d.defaultFilename,fa=d.getCurrentFile();null!=fa&&(S=null!=fa.getTitle()?fa.getTitle():S);return S};var N=this.actions.get("print");N.setEnabled(!mxClient.IS_IOS||!navigator.standalone); +N.visible=N.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"), +this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(S){var fa=f.cellEditor.text2, +ia=null;null!=fa&&(mxEvent.addListener(fa,"dragleave",function(M){null!=ia&&(ia.parentNode.removeChild(ia),ia=null);M.stopPropagation();M.preventDefault()}),mxEvent.addListener(fa,"dragover",mxUtils.bind(this,function(M){null==ia&&(!mxClient.IS_IE||10<document.documentMode)&&(ia=this.highlightElement(fa));M.stopPropagation();M.preventDefault()})),mxEvent.addListener(fa,"drop",mxUtils.bind(this,function(M){null!=ia&&(ia.parentNode.removeChild(ia),ia=null);if(0<M.dataTransfer.files.length)this.importFiles(M.dataTransfer.files, +0,0,this.maxImageSize,function(X,ja,ca,ka,q,E){f.insertImage(X,q,E)},function(){},function(X){return"image/"==X.type.substring(0,6)},function(X){for(var ja=0;ja<X.length;ja++)X[ja]()},mxEvent.isControlDown(M));else if(0<=mxUtils.indexOf(M.dataTransfer.types,"text/uri-list")){var aa=M.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(aa)?this.loadImage(decodeURIComponent(aa),mxUtils.bind(this,function(X){var ja=Math.max(1,X.width);X=Math.max(1,X.height);var ca=this.maxImageSize; +ca=Math.min(1,Math.min(ca/Math.max(1,ja)),ca/Math.max(1,X));f.insertImage(decodeURIComponent(aa),ja*ca,X*ca)})):document.execCommand("insertHTML",!1,M.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(M.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,M.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(M.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,M.dataTransfer.getData("text/plain"));M.stopPropagation();M.preventDefault()})))}));this.isSettingsEnabled()&& +(N=this.editor.graph.view,N.setUnit(mxSettings.getUnit()),N.addListener("unitChanged",function(S,fa){mxSettings.setUnit(fa.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,N.unit),this.refresh());if("1"==urlParams.styledev){N=document.getElementById("geFooter");null!=N&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type", +"text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),N.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this, +function(S,fa){0<this.editor.graph.getSelectionCount()?(S=this.editor.graph.getSelectionCell(),S=this.editor.graph.getModel().getStyle(S),this.styleInput.value=S||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var qa=this.isSelectionAllowed;this.isSelectionAllowed=function(S){return mxEvent.getSource(S)==this.styleInput?!0:qa.apply(this,arguments)}}N=document.getElementById("geInfo");null!=N&&N.parentNode.removeChild(N);if(Graph.fileSupport&&(!this.editor.chromeless|| +this.editor.editable)){var oa=null;mxEvent.addListener(f.container,"dragleave",function(S){f.isEnabled()&&(null!=oa&&(oa.parentNode.removeChild(oa),oa=null),S.stopPropagation(),S.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(S){null==oa&&(!mxClient.IS_IE||10<document.documentMode)&&(oa=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();S.stopPropagation();S.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this, +function(S){null!=oa&&(oa.parentNode.removeChild(oa),oa=null);if(f.isEnabled()){var fa=mxUtils.convertPoint(f.container,mxEvent.getClientX(S),mxEvent.getClientY(S)),ia=S.dataTransfer.files,M=f.view.translate,aa=f.view.scale,X=fa.x/aa-M.x,ja=fa.y/aa-M.y;if(0<ia.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(S)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(ia,!0)):(mxEvent.isAltDown(S)&&(ja=X=null),this.importFiles(ia,X,ja,this.maxImageSize, +null,null,null,null,mxEvent.isControlDown(S),null,null,mxEvent.isShiftDown(S),S));else{mxEvent.isAltDown(S)&&(ja=X=0);var ca=0<=mxUtils.indexOf(S.dataTransfer.types,"text/uri-list")?S.dataTransfer.getData("text/uri-list"):null;fa=this.extractGraphModelFromEvent(S,null!=this.pages);if(null!=fa)f.setSelectionCells(this.importXml(fa,X,ja,!0));else if(0<=mxUtils.indexOf(S.dataTransfer.types,"text/html")){var ka=S.dataTransfer.getData("text/html");fa=document.createElement("div");fa.innerHTML=f.sanitizeHtml(ka); +var q=null;ia=fa.getElementsByTagName("img");null!=ia&&1==ia.length?(ka=ia[0].getAttribute("src"),null==ka&&(ka=ia[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(ka)||(q=!0)):(ia=fa.getElementsByTagName("a"),null!=ia&&1==ia.length?ka=ia[0].getAttribute("href"):(fa=fa.getElementsByTagName("pre"),null!=fa&&1==fa.length&&(ka=mxUtils.getTextContent(fa[0]))));var E=!0,Q=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(ka,X,ja,!0,q,null,E,mxEvent.isControlDown(S)))}); +q&&null!=ka&&ka.length>this.resampleThreshold?this.confirmImageResize(function(Y){E=Y;Q()},mxEvent.isControlDown(S)):Q()}else null!=ca&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(ca)?this.loadImage(decodeURIComponent(ca),mxUtils.bind(this,function(Y){var R=Math.max(1,Y.width);Y=Math.max(1,Y.height);var ba=this.maxImageSize;ba=Math.min(1,Math.min(ba/Math.max(1,R)),ba/Math.max(1,Y));f.setSelectionCell(f.insertVertex(null,null,"",X,ja,R*ba,Y*ba,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+ +ca+";"))}),mxUtils.bind(this,function(Y){f.setSelectionCells(this.insertTextAt(ca,X,ja,!0))})):0<=mxUtils.indexOf(S.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(S.dataTransfer.getData("text/plain"),X,ja,!0))}}S.stopPropagation();S.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();N=mxUtils.bind(this,function(){f.refresh();f.view.validateBackground();this.updateTabContainer()});this.addListener("darkModeChanged", +N);this.addListener("sketchModeChanged",N);"dark"==uiTheme?(this.doSetDarkMode(!0),this.fireEvent(new mxEventObject("darkModeChanged"))):"min"==uiTheme&&"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d= +this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var g=f.clipboardData||f.originalEvent.clipboardData,x=!1,y=0;y<g.types.length;y++)if("text/"===g.types[y].substring(0,5)){x=!0;break}if(!x){var u=g.items;for(index in u){var H=u[index];if("file"===H.kind){if(d.isEditing())this.importFiles([H.getAsFile()],0,0,this.maxImageSize,function(D,G,W,T,Z,N){d.insertImage(D,Z,N)},function(){},function(D){return"image/"==D.type.substring(0, +6)},function(D){for(var G=0;G<D.length;G++)D[G]()});else{var J=this.editor.graph.getInsertPoint();this.importFiles([H.getAsFile()],J.x,J.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(D){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){g.innerHTML=" ";g.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect", +"off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable= +!0;g.innerHTML=" ";var x=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(u){var H=mxEvent.getSource(u);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==H.nodeName||"TEXTAREA"==H.nodeName||224!=u.keyCode&&(mxClient.IS_MAC||17!=u.keyCode)&&(!mxClient.IS_MAC||91!=u.keyCode&&93!=u.keyCode)||x||(g.style.left=f.container.scrollLeft+ +10+"px",g.style.top=f.container.scrollTop+10+"px",f.container.appendChild(g),x=!0,g.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(u){var H=u.keyCode;window.setTimeout(mxUtils.bind(this,function(){!x||224!=H&&17!=H&&91!=H&&93!=H||(x=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this, +function(u){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g),d()}catch(H){this.handleError(H)}}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(u){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g,!0),d()}catch(H){this.handleError(H)}}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(u){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(g.innerHTML=" ",g.focus(),null!=u.clipboardData&&this.pasteCells(u,g,!0,!0),mxEvent.isConsumed(u)||window.setTimeout(mxUtils.bind(this, +function(){this.pasteCells(u,g,!1,!0)}),0))}),!0);var y=this.isSelectionAllowed;this.isSelectionAllowed=function(u){return mxEvent.getSource(u)==g?!0:y.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(d,f){mxSettings.setUi(d);f=f||this.doSetCurrentTheme(d);this.fireEvent(new mxEventObject("currentThemeChanged"));f||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.doSetCurrentTheme=function(d){var f=Editor.currentTheme,g=!1;if(f!=d){if("1"==urlParams["live-ui"]){var x= +function(y){return null==y||""==y||"dark"==y||"kennedy"==y};console.log("doSetCurrentTheme",f,d);d=x(d)?"default":d;f=x(f)?"default":f;"sketch"==f&&"default"==d?(this.sidebarFooterContainer.style.display="block",this.menubarContainer.style.display="block",this.toolbarContainer.style.display="block",this.sidebarContainer.style.display="block",this.tabContainer.style.display="block",this.hsplit.style.display="block",this.hsplitPosition=EditorUi.prototype.hsplitPosition,this.menubarHeight=App.prototype.menubarHeight, +this.formatWidth=EditorUi.prototype.formatWidth,g=!0):"default"==f&&"sketch"==d&&(this.sidebarFooterContainer.style.display="none",this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.sidebarContainer.style.display="none",this.tabContainer.style.display="none",this.hsplit.style.display="none",this.formatWidth=this.menubarHeight=this.hsplitPosition=0,g=!0);this.switchTheme(d)}Editor.currentTheme=d}return g};EditorUi.prototype.switchTheme=function(d){this.createMenubarForTheme(d); +this.switchCssForTheme(d);"sketch"==d?(this.refresh(),this.createFormatWindow(),this.formatContainer.style.left="0px",this.formatContainer.style.top="0px",this.formatContainer.style.width=""):"default"==d&&(null!=this.formatContainer&&(this.formatContainer.style.left="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.formatWindow&&(this.formatWindow.destroy(), +this.formatWindow=null)),this.refresh())};EditorUi.prototype.switchCssForTheme=function(d){"sketch"==d?null==this.sketchStyleElt&&(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),this.sketchStyleElt=null)};EditorUi.prototype.createMenubarForTheme= +function(d){"sketch"==d?null==this.sketchMenubarElt&&(this.sketchMenubarElt=document.createElement("div"),this.sketchMenubarElt.className="geToolbarContainer",this.sketchMenubarElt.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;padding:6px;border:1px solid #c0c0c0;overflow:hidden;text-align:right;white-space:nowrap;user-select:none;",null!=this.switchThemeElt&&(this.switchThemeElt.style.position="relative",this.switchThemeElt.style.width="22px",this.switchThemeElt.style.height= +"22px",this.switchThemeElt.style.top="0px",this.switchThemeElt.style.right="6px",this.sketchMenubarElt.appendChild(this.switchThemeElt)),this.diagramContainer.parentNode.appendChild(this.sketchMenubarElt)):(null!=this.switchThemeElt&&(this.switchThemeElt.style.position="absolute",this.switchThemeElt.style.width="19px",this.switchThemeElt.style.height="19px",this.switchThemeElt.style.top="0px",this.switchThemeElt.style.right="17px",document.body.appendChild(this.switchThemeElt)),null!=this.sketchMenubarElt&& +(this.sketchMenubarElt.parentNode.removeChild(this.sketchMenubarElt),this.sketchMenubarElt=null))};EditorUi.prototype.addMenuToMenubar=function(d,f,g,x){var y=this.menus.get(f);d=d.addMenu(mxResources.get(f),y.funct);d.className=g;d.style.display="inline-block";d.style.boxSizing="border-box";d.style.top="6px";d.style.marginRight="6px";d.style.height="30px";d.style.paddingTop="6px";d.style.paddingBottom="6px";d.style.cursor="pointer";d.setAttribute("title",mxResources.get(f));this.menus.menuCreated(y, +d,"geMenuItem");null!=x&&(d.style.backgroundImage="url("+x+")",d.style.backgroundPosition="center center",d.style.backgroundRepeat="no-repeat",d.style.backgroundSize="24px 24px",d.style.width="34px",d.innerText="");return d};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var d="1"==urlParams.sketch?Math.max(10,this.diagramContainer.clientWidth-241):Math.max(10,this.diagramContainer.clientWidth-248),f="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60,g="1"==urlParams.embedInline? +580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),d,f,240,g,mxUtils.bind(this,function(x){x.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}};EditorUi.prototype.setSketchMode=function(d){this.spinner.spin(document.body,mxResources.get("working")+ +"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }": "html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body .geSidebarContainer *:not(svg *) { font-size:9pt; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }html body .geMenubarContainer .geStatus { margin-top: 0px !important; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+ (Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; border: none !important; }html body .geToolbarContainer a div { color: "+(Editor.isDarkMode()?"#707070":Editor.darkColor)+" }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: "+(Editor.isDarkMode()? "#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } html body div.geToolbarContainer a.geColorBtn { margin: 2px; } html body .mxWindow td.mxWindowPane input, html body .mxWindow td.mxWindowPane select, html body .mxWindow td.mxWindowPane textarea, html body .mxWindow td.mxWindowPane radio { padding: 0px; box-sizing: border-box; }.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); "+ @@ -3684,8 +3689,8 @@ p.setAttribute("charset","UTF-8");p.setAttribute("type","text/css");EditorUi.pro f.defaultPageBorderColor;Graph.prototype.shapeBackgroundColor=f.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=f.shapeForegroundColor;Graph.prototype.defaultThemeName=f.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor: "white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;null!=Editor.styleElt&&(Editor.styleElt.innerHTML=Editor.createMinimalCss());Editor.isDarkMode()?null==p.parentNode&&document.getElementsByTagName("head")[0].appendChild(p):null!=p.parentNode&&p.parentNode.removeChild(p)}}; EditorUi.prototype.setPagesVisible=function(d){Editor.pagesVisible!=d&&(Editor.pagesVisible=d,mxSettings.settings.pagesVisible=d,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(d,f){this.sidebar.sidebarTitles!=d&&(this.sidebar.sidebarTitles=d,this.sidebar.refresh(),this.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen= -function(d){Editor.inlineFullscreen!=d&&(Editor.inlineFullscreen=d,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(d){if(Editor.sketchMode!=d){var f=function(x,z,u){null== -x[z]&&(x[z]=u)},g=this.editor.graph;Editor.sketchMode=d;this.menus.defaultFontSize=d?20:16;g.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);f(g.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);g.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);f(g.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);f(g.defaultEdgeStyle,"edgeStyle","none");f(g.defaultEdgeStyle,"rounded","0");f(g.defaultEdgeStyle,"curved","1");f(g.defaultEdgeStyle,"jettySize","auto"); +function(d){Editor.inlineFullscreen!=d&&(Editor.inlineFullscreen=d,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(d){if(Editor.sketchMode!=d){var f=function(x,y,u){null== +x[y]&&(x[y]=u)},g=this.editor.graph;Editor.sketchMode=d;this.menus.defaultFontSize=d?20:16;g.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);f(g.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);g.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);f(g.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);f(g.defaultEdgeStyle,"edgeStyle","none");f(g.defaultEdgeStyle,"rounded","0");f(g.defaultEdgeStyle,"curved","1");f(g.defaultEdgeStyle,"jettySize","auto"); f(g.defaultEdgeStyle,"orthogonalLoop","1");f(g.defaultEdgeStyle,"endArrow","open");f(g.defaultEdgeStyle,"endSize","14");f(g.defaultEdgeStyle,"startSize","14");d&&(f(g.defaultVertexStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultVertexStyle,"fontSource",Editor.sketchFontSource),f(g.defaultVertexStyle,"hachureGap","4"),f(g.defaultVertexStyle,"sketch","1"),f(g.defaultEdgeStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultEdgeStyle,"fontSource",Editor.sketchFontSource),f(g.defaultEdgeStyle, "sketch","1"),f(g.defaultEdgeStyle,"hachureGap","4"),f(g.defaultEdgeStyle,"sourcePerimeterSpacing","8"),f(g.defaultEdgeStyle,"targetPerimeterSpacing","8"));g.currentVertexStyle=mxUtils.clone(g.defaultVertexStyle);g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=function(d){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var g=d.indexOf(",");0<g&&(f=this.getPageById(d.substring(g+1)),f=null!=f?f.getName(): mxResources.get("pageNotFound"))}else"data:"==d.substring(0,5)&&(f=mxResources.get("action"));return f};EditorUi.prototype.handleCustomLink=function(d){if(Graph.isPageLink(d)){var f=d.indexOf(",");if(d=this.getPageById(d.substring(f+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(d)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)}; @@ -3694,155 +3699,156 @@ EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Edito function(d,f){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,f){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor= mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",mxUtils.bind(this,function(d,f){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(d,f){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!= this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth); -mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,f,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(x,z){try{this.spinner.stop();var u=this.createImageDataUri(x,f,"png"),H=parseInt(z.getAttribute("width")),J=parseInt(z.getAttribute("height"));this.writeImageToClipboard(u,H,J,mxUtils.bind(this,function(D){this.handleError(D)}))}catch(D){this.handleError(D)}}),null,null,null,mxUtils.bind(this, -function(x){this.spinner.stop();this.handleError(x)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(x){this.handleError(x)}};EditorUi.prototype.writeImageToClipboard=function(d,f,g,x){var z=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":z,"text/html":new Blob(['<img src="'+d+'" width="'+f+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](x)}; -EditorUi.prototype.copyCells=function(d,f){var g=this.editor.graph;if(g.isSelectionEmpty())d.innerText="";else{var x=mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),z=mxUtils.getXml(g.encodeCells(x));mxUtils.setTextContent(d,encodeURIComponent(z));f?(g.removeCells(x,!1),g.lastPasteXml=null):(g.lastPasteXml=z,g.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var f=this.editor.graph; -f.isSelectionEmpty()||(d=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(d)),navigator.clipboard.writeText(f))}return d};EditorUi.prototype.pasteXml=function(d,f,g,x){var z=this.editor.graph,u=null;z.lastPasteXml==d?z.pasteCounter++:(z.lastPasteXml=d,z.pasteCounter=0);var H=z.pasteCounter*z.gridSize;if(g||this.isCompatibleString(d))u=this.importXml(d,H,H),z.setSelectionCells(u);else if(f&&1==z.getSelectionCount()){H=z.getStartEditingCell(z.getSelectionCell(), -x);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==z.getCurrentCellStyle(H)[mxConstants.STYLE_SHAPE])z.setCellStyles(mxConstants.STYLE_IMAGE,d,[H]);else{z.model.beginUpdate();try{z.labelChanged(H,d),Graph.isLink(d)&&z.setLinkForCell(H,d)}finally{z.model.endUpdate()}}z.setSelectionCell(H)}else u=z.getInsertPoint(),z.isMouseInsertPoint()&&(H=0,z.lastPasteXml==d&&0<z.pasteCounter&&z.pasteCounter--),u=this.insertTextAt(d,u.x+H,u.y+H,!0),z.setSelectionCells(u);z.isSelectionEmpty()||(z.scrollCellToVisible(z.getSelectionCell()), -null!=this.hoverIcons&&this.hoverIcons.update(z.view.getState(z.getSelectionCell())));return u};EditorUi.prototype.pasteCells=function(d,f,g,x){if(!mxEvent.isConsumed(d)){var z=f,u=!1;if(g&&null!=d.clipboardData&&d.clipboardData.getData){var H=d.clipboardData.getData("text/plain"),J=!1;if(null!=H&&0<H.length&&"%3CmxGraphModel%3E"==H.substring(0,18))try{var D=decodeURIComponent(H);this.isCompatibleString(D)&&(J=!0,H=D)}catch(qa){}J=J?null:d.clipboardData.getData("text/html");null!=J&&0<J.length?(z= -this.parseHtmlData(J),u="text/plain"!=z.getAttribute("data-type")):null!=H&&0<H.length&&(z=document.createElement("div"),mxUtils.setTextContent(z,J))}H=z.getElementsByTagName("span");if(null!=H&&0<H.length&&"application/vnd.lucid.chart.objects"===H[0].getAttribute("data-lucid-type"))g=H[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(qa){var oa=this.editor.graph;oa.lastPasteXml==qa?oa.pasteCounter++:(oa.lastPasteXml=qa,oa.pasteCounter= -0);var aa=oa.pasteCounter*oa.gridSize;oa.setSelectionCells(this.importXml(qa,aa,aa));oa.scrollCellToVisible(oa.getSelectionCell())}),mxUtils.bind(this,function(qa){this.handleError(qa)})),mxEvent.consume(d));else{var G=u?z.innerHTML:mxUtils.trim(null==z.innerText?mxUtils.getTextContent(z):z.innerText),V=!1;try{var U=G.lastIndexOf("%3E");0<=U&&U<G.length-3&&(G=G.substring(0,U+3))}catch(qa){}try{H=z.getElementsByTagName("span"),(D=null!=H&&0<H.length?mxUtils.trim(decodeURIComponent(H[0].textContent)): -decodeURIComponent(G))&&(this.isCompatibleString(D)||0==D.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(V=!0,G=D)}catch(qa){}try{if(null!=G&&0<G.length){if(0==G.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var Y=mxUtils.bind(this,function(){try{G=(new MiroImporter).importMiroJson(JSON.parse(G)),this.pasteXml(G,x,V,d)}catch(qa){console.log("Miro import error:",qa)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",Y):Y()}else this.pasteXml(G, -x,V,d);try{mxEvent.consume(d)}catch(qa){}}else if(!g){var O=this.editor.graph;O.lastPasteXml=null;O.pasteCounter=0}}catch(qa){this.handleError(qa)}}}f.innerHTML=" "};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var f=null,g=0;g<d.length;g++)mxEvent.addListener(d[g],"dragleave",function(x){null!=f&&(f.parentNode.removeChild(f),f=null);x.stopPropagation();x.preventDefault()}),mxEvent.addListener(d[g],"dragover",mxUtils.bind(this,function(x){(this.editor.graph.isEnabled()|| +mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,f,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(x,y){try{this.spinner.stop();var u=this.createImageDataUri(x,f,"png"),H=parseInt(y.getAttribute("width")),J=parseInt(y.getAttribute("height"));this.writeImageToClipboard(u,H,J,mxUtils.bind(this,function(D){this.handleError(D)}))}catch(D){this.handleError(D)}}),null,null,null,mxUtils.bind(this, +function(x){this.spinner.stop();this.handleError(x)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(x){this.handleError(x)}};EditorUi.prototype.writeImageToClipboard=function(d,f,g,x){var y=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":y,"text/html":new Blob(['<img src="'+d+'" width="'+f+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](x)}; +EditorUi.prototype.copyCells=function(d,f){var g=this.editor.graph;if(g.isSelectionEmpty())d.innerText="";else{var x=mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),y=mxUtils.getXml(g.encodeCells(x));mxUtils.setTextContent(d,encodeURIComponent(y));f?(g.removeCells(x,!1),g.lastPasteXml=null):(g.lastPasteXml=y,g.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var f=this.editor.graph; +f.isSelectionEmpty()||(d=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(d)),navigator.clipboard.writeText(f))}return d};EditorUi.prototype.pasteXml=function(d,f,g,x){var y=this.editor.graph,u=null;y.lastPasteXml==d?y.pasteCounter++:(y.lastPasteXml=d,y.pasteCounter=0);var H=y.pasteCounter*y.gridSize;if(g||this.isCompatibleString(d))u=this.importXml(d,H,H),y.setSelectionCells(u);else if(f&&1==y.getSelectionCount()){H=y.getStartEditingCell(y.getSelectionCell(), +x);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==y.getCurrentCellStyle(H)[mxConstants.STYLE_SHAPE])y.setCellStyles(mxConstants.STYLE_IMAGE,d,[H]);else{y.model.beginUpdate();try{y.labelChanged(H,d),Graph.isLink(d)&&y.setLinkForCell(H,d)}finally{y.model.endUpdate()}}y.setSelectionCell(H)}else u=y.getInsertPoint(),y.isMouseInsertPoint()&&(H=0,y.lastPasteXml==d&&0<y.pasteCounter&&y.pasteCounter--),u=this.insertTextAt(d,u.x+H,u.y+H,!0),y.setSelectionCells(u);y.isSelectionEmpty()||(y.scrollCellToVisible(y.getSelectionCell()), +null!=this.hoverIcons&&this.hoverIcons.update(y.view.getState(y.getSelectionCell())));return u};EditorUi.prototype.pasteCells=function(d,f,g,x){if(!mxEvent.isConsumed(d)){var y=f,u=!1;if(g&&null!=d.clipboardData&&d.clipboardData.getData){var H=d.clipboardData.getData("text/plain"),J=!1;if(null!=H&&0<H.length&&"%3CmxGraphModel%3E"==H.substring(0,18))try{var D=decodeURIComponent(H);this.isCompatibleString(D)&&(J=!0,H=D)}catch(qa){}J=J?null:d.clipboardData.getData("text/html");null!=J&&0<J.length?(y= +this.parseHtmlData(J),u="text/plain"!=y.getAttribute("data-type")):null!=H&&0<H.length&&(y=document.createElement("div"),mxUtils.setTextContent(y,J))}H=y.getElementsByTagName("span");if(null!=H&&0<H.length&&"application/vnd.lucid.chart.objects"===H[0].getAttribute("data-lucid-type"))g=H[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(qa){var oa=this.editor.graph;oa.lastPasteXml==qa?oa.pasteCounter++:(oa.lastPasteXml=qa,oa.pasteCounter= +0);var S=oa.pasteCounter*oa.gridSize;oa.setSelectionCells(this.importXml(qa,S,S));oa.scrollCellToVisible(oa.getSelectionCell())}),mxUtils.bind(this,function(qa){this.handleError(qa)})),mxEvent.consume(d));else{var G=u?y.innerHTML:mxUtils.trim(null==y.innerText?mxUtils.getTextContent(y):y.innerText),W=!1;try{var T=G.lastIndexOf("%3E");0<=T&&T<G.length-3&&(G=G.substring(0,T+3))}catch(qa){}try{H=y.getElementsByTagName("span"),(D=null!=H&&0<H.length?mxUtils.trim(decodeURIComponent(H[0].textContent)): +decodeURIComponent(G))&&(this.isCompatibleString(D)||0==D.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(W=!0,G=D)}catch(qa){}try{if(null!=G&&0<G.length){if(0==G.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var Z=mxUtils.bind(this,function(){try{G=(new MiroImporter).importMiroJson(JSON.parse(G)),this.pasteXml(G,x,W,d)}catch(qa){console.log("Miro import error:",qa)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",Z):Z()}else this.pasteXml(G, +x,W,d);try{mxEvent.consume(d)}catch(qa){}}else if(!g){var N=this.editor.graph;N.lastPasteXml=null;N.pasteCounter=0}}catch(qa){this.handleError(qa)}}}f.innerHTML=" "};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var f=null,g=0;g<d.length;g++)mxEvent.addListener(d[g],"dragleave",function(x){null!=f&&(f.parentNode.removeChild(f),f=null);x.stopPropagation();x.preventDefault()}),mxEvent.addListener(d[g],"dragover",mxUtils.bind(this,function(x){(this.editor.graph.isEnabled()|| "1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());x.stopPropagation();x.preventDefault()})),mxEvent.addListener(d[g],"drop",mxUtils.bind(this,function(x){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<x.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(x.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(x)&& -!mxEvent.isShiftDown(x)):this.openFiles(x.dataTransfer.files,!0);else{var z=this.extractGraphModelFromEvent(x);if(null==z){var u=null!=x.dataTransfer?x.dataTransfer:x.clipboardData;null!=u&&(10==document.documentMode||11==document.documentMode?z=u.getData("Text"):(z=null,z=0<=mxUtils.indexOf(u.types,"text/uri-list")?x.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(u.types,"text/html")?u.getData("text/html"):null,null!=z&&0<z.length?(u=document.createElement("div"),u.innerHTML=this.editor.graph.sanitizeHtml(z), -u=u.getElementsByTagName("img"),0<u.length&&(z=u[0].getAttribute("src"))):0<=mxUtils.indexOf(u.types,"text/plain")&&(z=u.getData("text/plain"))),null!=z&&(Editor.isPngDataUrl(z)?(z=Editor.extractGraphModelFromPng(z),null!=z&&0<z.length&&this.openLocalFile(z,null,!0)):this.isRemoteFileFormat(z)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(z))).send(mxUtils.bind(this,function(H){200<=H.getStatus()&& -299>=H.getStatus()&&this.openLocalFile(H.getText(),null,!0)})):/^https?:\/\//.test(z)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(z):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(z)))))}else this.openLocalFile(z,null,!0)}x.stopPropagation();x.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var f=0,g=0;if(null==d){var x=document.body;var z=document.documentElement; -var u=(x.clientWidth||z.clientWidth)-3;x=Math.max(x.clientHeight||0,z.clientHeight)-3}else f=d.offsetTop,g=d.offsetLeft,u=d.clientWidth,x=d.clientHeight;z=document.createElement("div");z.style.zIndex=mxPopupMenu.prototype.zIndex+2;z.style.border="3px dotted rgb(254, 137, 12)";z.style.pointerEvents="none";z.style.position="absolute";z.style.top=f+"px";z.style.left=g+"px";z.style.width=Math.max(0,u-3)+"px";z.style.height=Math.max(0,x-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(z): -document.body.appendChild(z);return z};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var f=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=f){var g=new mxCodec(f.ownerDocument),x=new mxGraphModel;g.decode(f,x);f=x.getChildAt(x.getRoot(),0);for(g=0;g<x.getChildCount(f);g++)d.push(x.getChildAt(f,g))}return d};EditorUi.prototype.openFileHandle=function(d,f,g,x,z){if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)?f=f.substring(0,f.length-4)+".drawio": +!mxEvent.isShiftDown(x)):this.openFiles(x.dataTransfer.files,!0);else{var y=this.extractGraphModelFromEvent(x);if(null==y){var u=null!=x.dataTransfer?x.dataTransfer:x.clipboardData;null!=u&&(10==document.documentMode||11==document.documentMode?y=u.getData("Text"):(y=null,y=0<=mxUtils.indexOf(u.types,"text/uri-list")?x.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(u.types,"text/html")?u.getData("text/html"):null,null!=y&&0<y.length?(u=document.createElement("div"),u.innerHTML=this.editor.graph.sanitizeHtml(y), +u=u.getElementsByTagName("img"),0<u.length&&(y=u[0].getAttribute("src"))):0<=mxUtils.indexOf(u.types,"text/plain")&&(y=u.getData("text/plain"))),null!=y&&(Editor.isPngDataUrl(y)?(y=Editor.extractGraphModelFromPng(y),null!=y&&0<y.length&&this.openLocalFile(y,null,!0)):this.isRemoteFileFormat(y)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(y))).send(mxUtils.bind(this,function(H){200<=H.getStatus()&& +299>=H.getStatus()&&this.openLocalFile(H.getText(),null,!0)})):/^https?:\/\//.test(y)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(y):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(y)))))}else this.openLocalFile(y,null,!0)}x.stopPropagation();x.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var f=0,g=0;if(null==d){var x=document.body;var y=document.documentElement; +var u=(x.clientWidth||y.clientWidth)-3;x=Math.max(x.clientHeight||0,y.clientHeight)-3}else f=d.offsetTop,g=d.offsetLeft,u=d.clientWidth,x=d.clientHeight;y=document.createElement("div");y.style.zIndex=mxPopupMenu.prototype.zIndex+2;y.style.border="3px dotted rgb(254, 137, 12)";y.style.pointerEvents="none";y.style.position="absolute";y.style.top=f+"px";y.style.left=g+"px";y.style.width=Math.max(0,u-3)+"px";y.style.height=Math.max(0,x-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(y): +document.body.appendChild(y);return y};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var f=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=f){var g=new mxCodec(f.ownerDocument),x=new mxGraphModel;g.decode(f,x);f=x.getChildAt(x.getRoot(),0);for(g=0;g<x.getChildCount(f);g++)d.push(x.getChildAt(f,g))}return d};EditorUi.prototype.openFileHandle=function(d,f,g,x,y){if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)?f=f.substring(0,f.length-4)+".drawio": /(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var u=mxUtils.bind(this,function(J){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==J.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,x);try{this.loadLibrary(new LocalLibrary(this,J,f))}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(J,f,x)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)|| /(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(g,mxUtils.bind(this,function(J){this.spinner.stop();u(J)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(J){this.spinner.stop();u(J)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(J){4==J.readyState&&(this.spinner.stop(), 200<=J.status&&299>=J.status?u(J.responseText):this.handleError({message:mxResources.get(413==J.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(J){this.spinner.stop();this.openLocalFile(J,f,x)}),mxUtils.bind(this,function(J){this.spinner.stop();this.handleError(J)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop(); null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,x);try{this.loadLibrary(new LocalLibrary(this,d,g.name))}catch(J){this.handleError(J,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(J){this.spinner.stop();u(J)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,x)}));else{if("image/png"==g.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"== -g.type){var H=Editor.extractGraphModelFromPdf(d);null!=H&&(z=null,x=!0,d=H)}this.spinner.stop();this.openLocalFile(d,f,x,z,null!=z?g:null)}}};EditorUi.prototype.openFiles=function(d,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<d.length;g++)mxUtils.bind(this,function(x){var z=new FileReader;z.onload=mxUtils.bind(this,function(u){try{this.openFileHandle(u.target.result,x.name,x,f)}catch(H){this.handleError(H)}});z.onerror=mxUtils.bind(this,function(u){this.spinner.stop(); -this.handleError(u);window.openFile=null});"image"!==x.type.substring(0,5)&&"application/pdf"!==x.type||"image/svg"===x.type.substring(0,9)?z.readAsText(x):z.readAsDataURL(x)})(d[g])};EditorUi.prototype.openLocalFile=function(d,f,g,x,z){var u=this.getCurrentFile(),H=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var J=mxUtils.parseXml(d);null!=J&&(this.editor.setGraphXml(J.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this, -d,f||this.defaultFilename,g,x,z))});if(null!=d&&0<d.length)null==u||!u.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=x)?H():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=x)&&null!=u&&u.isModified()?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!= +g.type){var H=Editor.extractGraphModelFromPdf(d);null!=H&&(y=null,x=!0,d=H)}this.spinner.stop();this.openLocalFile(d,f,x,y,null!=y?g:null)}}};EditorUi.prototype.openFiles=function(d,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<d.length;g++)mxUtils.bind(this,function(x){var y=new FileReader;y.onload=mxUtils.bind(this,function(u){try{this.openFileHandle(u.target.result,x.name,x,f)}catch(H){this.handleError(H)}});y.onerror=mxUtils.bind(this,function(u){this.spinner.stop(); +this.handleError(u);window.openFile=null});"image"!==x.type.substring(0,5)&&"application/pdf"!==x.type||"image/svg"===x.type.substring(0,9)?y.readAsText(x):y.readAsDataURL(x)})(d[g])};EditorUi.prototype.openLocalFile=function(d,f,g,x,y){var u=this.getCurrentFile(),H=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var J=mxUtils.parseXml(d);null!=J&&(this.editor.setGraphXml(J.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this, +d,f||this.defaultFilename,g,x,y))});if(null!=d&&0<d.length)null==u||!u.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=x)?H():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=x)&&null!=u&&u.isModified()?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!= u&&u.isModified()?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):H()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);f=[];for(var g in d)f.push(g);return f};EditorUi.prototype.addBasenamesForCell= -function(d,f){function g(H){if(null!=H){var J=H.lastIndexOf(".");0<J&&(H=H.substring(J+1,H.length));null==f[H]&&(f[H]=!0)}}var x=this.editor.graph,z=x.getCellStyle(d);g(mxStencilRegistry.getBasenameForStencil(z[mxConstants.STYLE_SHAPE]));x.model.isEdge(d)&&(g(mxMarker.getPackageForType(z[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(z[mxConstants.STYLE_ENDARROW])));z=x.model.getChildCount(d);for(var u=0;u<z;u++)this.addBasenamesForCell(x.model.getChildAt(d,u),f)};EditorUi.prototype.setGraphEnabled= +function(d,f){function g(H){if(null!=H){var J=H.lastIndexOf(".");0<J&&(H=H.substring(J+1,H.length));null==f[H]&&(f[H]=!0)}}var x=this.editor.graph,y=x.getCellStyle(d);g(mxStencilRegistry.getBasenameForStencil(y[mxConstants.STYLE_SHAPE]));x.model.isEdge(d)&&(g(mxMarker.getPackageForType(y[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(y[mxConstants.STYLE_ENDARROW])));y=x.model.getChildCount(d);for(var u=0;u<y;u++)this.addBasenamesForCell(x.model.getChildAt(d,u),f)};EditorUi.prototype.setGraphEnabled= function(d){this.diagramContainer.style.visibility=d?"":"hidden";this.formatContainer.style.visibility=d?"":"hidden";this.sidebarFooterContainer.style.display=d?"":"none";this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=d?"":"none";this.editor.graph.setEnabled(d);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=d?"":"hidden",this.ruler.vRuler.container.style.visibility=d?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=d?"":"hidden"); d||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!= -window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=!1;this.installMessageHandler(mxUtils.bind(this,function(f,g,x,z){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(z)try{var u=this.editor.graph;u.setGridEnabled(!1);u.pageVisible=!1;var H=u.model.cells,J;for(J in H){var D=H[J];null!= +window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=!1;this.installMessageHandler(mxUtils.bind(this,function(f,g,x,y){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(y)try{var u=this.editor.graph;u.setGridEnabled(!1);u.pageVisible=!1;var H=u.model.cells,J;for(J in H){var D=H[J];null!= D&&null!=D.style&&(D.style+=";sketch=1;"+(-1==D.style.indexOf("fontFamily=")||-1<D.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(G){console.log(G)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=x?x:!1;this.updateUi(); window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(d,f){null!=d?d.getPublicUrl(f):f(null)};EditorUi.prototype.createLoadMessage=function(d){var f=this.editor.graph;return{event:d, pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(d){var f=this.editor.graph;f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var x=f.background;if(null==x||x==mxConstants.NONE)x=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null, -null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(z){g.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(z)}),"*")}),null,null,!0,x,1,this.embedExportBorder)}else d||g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified= -!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(d){var f=null,g=!1,x=!1,z=null,u=mxUtils.bind(this,function(D,G){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,u);mxEvent.addListener(window,"message",mxUtils.bind(this,function(D){if(D.source== -(window.opener||window.parent)){var G=D.data,V=null,U=mxUtils.bind(this,function(ma){if(null!=ma&&"function"===typeof ma.charAt&&"<"!=ma.charAt(0))try{Editor.isPngDataUrl(ma)?ma=Editor.extractGraphModelFromPng(ma):"data:image/svg+xml;base64,"==ma.substring(0,26)?ma=atob(ma.substring(26)):"data:image/svg+xml;utf8,"==ma.substring(0,24)&&(ma=ma.substring(24)),null!=ma&&("%"==ma.charAt(0)?ma=decodeURIComponent(ma):"<"!=ma.charAt(0)&&(ma=Graph.decompress(ma)))}catch(pa){}return ma});if("json"==urlParams.proto){var Y= -!1;try{G=JSON.parse(G),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[D],"data",[G])}catch(ma){G=null}try{if(null==G)return;if("dialog"==G.action){this.showError(null!=G.titleKey?mxResources.get(G.titleKey):G.title,null!=G.messageKey?mxResources.get(G.messageKey):G.message,null!=G.buttonKey?mxResources.get(G.buttonKey):G.button);null!=G.modified&&(this.editor.modified=G.modified);return}if("layout"==G.action){this.executeLayouts(this.editor.graph.createLayouts(G.layouts));return}if("prompt"== -G.action){this.spinner.stop();var O=new FilenameDialog(this,G.defaultValue||"",null!=G.okKey?mxResources.get(G.okKey):G.ok,function(ma){null!=ma?H.postMessage(JSON.stringify({event:"prompt",value:ma,message:G}),"*"):H.postMessage(JSON.stringify({event:"prompt-cancel",message:G}),"*")},null!=G.titleKey?mxResources.get(G.titleKey):G.title);this.showDialog(O.container,300,80,!0,!1);O.init();return}if("draft"==G.action){var qa=U(G.xml);this.spinner.stop();O=new DraftDialog(this,mxResources.get("draftFound", +null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(y){g.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(y)}),"*")}),null,null,!0,x,1,this.embedExportBorder)}else d||g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified= +!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(d){var f=null,g=!1,x=!1,y=null,u=mxUtils.bind(this,function(D,G){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,u);mxEvent.addListener(window,"message",mxUtils.bind(this,function(D){if(D.source== +(window.opener||window.parent)){var G=D.data,W=null,T=mxUtils.bind(this,function(la){if(null!=la&&"function"===typeof la.charAt&&"<"!=la.charAt(0))try{Editor.isPngDataUrl(la)?la=Editor.extractGraphModelFromPng(la):"data:image/svg+xml;base64,"==la.substring(0,26)?la=atob(la.substring(26)):"data:image/svg+xml;utf8,"==la.substring(0,24)&&(la=la.substring(24)),null!=la&&("%"==la.charAt(0)?la=decodeURIComponent(la):"<"!=la.charAt(0)&&(la=Graph.decompress(la)))}catch(pa){}return la});if("json"==urlParams.proto){var Z= +!1;try{G=JSON.parse(G),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[D],"data",[G])}catch(la){G=null}try{if(null==G)return;if("dialog"==G.action){this.showError(null!=G.titleKey?mxResources.get(G.titleKey):G.title,null!=G.messageKey?mxResources.get(G.messageKey):G.message,null!=G.buttonKey?mxResources.get(G.buttonKey):G.button);null!=G.modified&&(this.editor.modified=G.modified);return}if("layout"==G.action){this.executeLayouts(this.editor.graph.createLayouts(G.layouts));return}if("prompt"== +G.action){this.spinner.stop();var N=new FilenameDialog(this,G.defaultValue||"",null!=G.okKey?mxResources.get(G.okKey):G.ok,function(la){null!=la?H.postMessage(JSON.stringify({event:"prompt",value:la,message:G}),"*"):H.postMessage(JSON.stringify({event:"prompt-cancel",message:G}),"*")},null!=G.titleKey?mxResources.get(G.titleKey):G.title);this.showDialog(N.container,300,80,!0,!1);N.init();return}if("draft"==G.action){var qa=T(G.xml);this.spinner.stop();N=new DraftDialog(this,mxResources.get("draftFound", [G.name||this.defaultFilename]),qa,mxUtils.bind(this,function(){this.hideDialog();H.postMessage(JSON.stringify({event:"draft",result:"edit",message:G}),"*")}),mxUtils.bind(this,function(){this.hideDialog();H.postMessage(JSON.stringify({event:"draft",result:"discard",message:G}),"*")}),G.editKey?mxResources.get(G.editKey):null,G.discardKey?mxResources.get(G.discardKey):null,G.ignore?mxUtils.bind(this,function(){this.hideDialog();H.postMessage(JSON.stringify({event:"draft",result:"ignore",message:G}), -"*")}):null);this.showDialog(O.container,640,480,!0,!1,mxUtils.bind(this,function(ma){ma&&this.actions.get("exit").funct()}));try{O.init()}catch(ma){H.postMessage(JSON.stringify({event:"draft",error:ma.toString(),message:G}),"*")}return}if("template"==G.action){this.spinner.stop();var oa=1==G.enableRecent,aa=1==G.enableSearch,da=1==G.enableCustomTemp;if("1"==urlParams.newTempDlg&&!G.templatesOnly&&null!=G.callback){var ia=this.getCurrentUser(),L=new TemplatesDialog(this,function(ma,pa,za){ma=ma|| -this.emptyDiagramXml;H.postMessage(JSON.stringify({event:"template",xml:ma,blank:ma==this.emptyDiagramXml,name:pa,tempUrl:za.url,libs:za.libs,builtIn:null!=za.info&&null!=za.info.custContentId,message:G}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=ia?ia.id:null,oa?mxUtils.bind(this,function(ma,pa,za){this.remoteInvoke("getRecentDiagrams",[za],null,ma,pa)}):null,aa?mxUtils.bind(this,function(ma,pa,za,Ba){this.remoteInvoke("searchDiagrams",[ma,Ba],null,pa, -za)}):null,mxUtils.bind(this,function(ma,pa,za){this.remoteInvoke("getFileContent",[ma.url],null,pa,za)}),null,da?mxUtils.bind(this,function(ma){this.remoteInvoke("getCustomTemplates",null,null,ma,function(){ma({},0)})}):null,!1,!1,!0,!0);this.showDialog(L.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}O=new NewDialog(this,!1,G.templatesOnly?!1:null!=G.callback,mxUtils.bind(this,function(ma,pa,za,Ba){ma=ma||this.emptyDiagramXml;null!=G.callback?H.postMessage(JSON.stringify({event:"template", -xml:ma,blank:ma==this.emptyDiagramXml,name:pa,tempUrl:za,libs:Ba,builtIn:!0,message:G}),"*"):(d(ma,D,ma!=this.emptyDiagramXml,G.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,oa?mxUtils.bind(this,function(ma){this.remoteInvoke("getRecentDiagrams",[null],null,ma,function(){ma(null,"Network Error!")})}):null,aa?mxUtils.bind(this,function(ma,pa){this.remoteInvoke("searchDiagrams",[ma,null],null,pa,function(){pa(null,"Network Error!")})}):null,mxUtils.bind(this, -function(ma,pa,za){H.postMessage(JSON.stringify({event:"template",docUrl:ma,info:pa,name:za}),"*")}),null,null,da?mxUtils.bind(this,function(ma){this.remoteInvoke("getCustomTemplates",null,null,ma,function(){ma({},0)})}):null,1==G.withoutType);this.showDialog(O.container,620,460,!0,!1,mxUtils.bind(this,function(ma){this.sidebar.hideTooltip();ma&&this.actions.get("exit").funct()}));O.init();return}if("textContent"==G.action){var Z=this.getDiagramTextContent();H.postMessage(JSON.stringify({event:"textContent", -data:Z,message:G}),"*");return}if("status"==G.action){null!=G.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(G.messageKey))):null!=G.message&&this.editor.setStatus(mxUtils.htmlEntities(G.message));null!=G.modified&&(this.editor.modified=G.modified);return}if("spinner"==G.action){var P=null!=G.messageKey?mxResources.get(G.messageKey):G.message;null==G.show||G.show?this.spinner.spin(document.body,P):this.spinner.stop();return}if("exit"==G.action){this.actions.get("exit").funct(); -return}if("viewport"==G.action){null!=G.viewport&&(this.embedViewport=G.viewport);return}if("snapshot"==G.action){this.sendEmbeddedSvgExport(!0);return}if("export"==G.action){if("png"==G.format||"xmlpng"==G.format){if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin)){var ca=null!=G.xml?G.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var ja=this.editor.graph,ka=mxUtils.bind(this,function(ma){this.editor.graph.setEnabled(!0); -this.spinner.stop();var pa=this.createLoadMessage("export");pa.format=G.format;pa.message=G;pa.data=ma;pa.xml=ca;H.postMessage(JSON.stringify(pa),"*")}),q=mxUtils.bind(this,function(ma){null==ma&&(ma=Editor.blankImage);"xmlpng"==G.format&&(ma=Editor.writeGraphModelToPng(ma,"tEXt","mxfile",encodeURIComponent(ca)));ja!=this.editor.graph&&ja.container.parentNode.removeChild(ja.container);ka(ma)}),F=G.pageId||(null!=this.pages?G.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var R= -mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=F){var ma=ja.getGlobalVariable;ja=this.createTemporaryGraph(ja.getStylesheet());for(var pa,za=0;za<this.pages.length;za++)if(this.pages[za].getId()==F){pa=this.updatePageRoot(this.pages[za]);break}null==pa&&(pa=this.currentPage);ja.getGlobalVariable=function(Ka){return"page"==Ka?pa.getName():"pagenumber"==Ka?1:ma.apply(this,arguments)};document.body.appendChild(ja.container);ja.model.setRoot(pa.root)}if(null!=G.layerIds){var Ba= -ja.model,Ia=Ba.getChildCells(Ba.getRoot()),Aa={};for(za=0;za<G.layerIds.length;za++)Aa[G.layerIds[za]]=!0;for(za=0;za<Ia.length;za++)Ba.setVisible(Ia[za],Aa[Ia[za].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(Ka){q(Ka.toDataURL("image/png"))}),G.width,null,G.background,mxUtils.bind(this,function(){q(null)}),null,null,G.scale,G.transparent,G.shadow,null,ja,G.border,null,G.grid,G.keepTheme)});null!=G.xml&&0<G.xml.length&&(g=!0,this.setFileData(ca),g=!1);R()}else(new mxXmlRequest(EXPORT_URL, -"format=png&embedXml="+("xmlpng"==G.format?"1":"0")+(null!=F?"&pageId="+F:"")+(null!=G.layerIds&&0<G.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:G.layerIds})):"")+(null!=G.scale?"&scale="+G.scale:"")+"&base64=1&xml="+encodeURIComponent(ca))).send(mxUtils.bind(this,function(ma){200<=ma.getStatus()&&299>=ma.getStatus()?ka("data:image/png;base64,"+ma.getText()):q(null)}),mxUtils.bind(this,function(){q(null)}))}}else if(R=mxUtils.bind(this,function(){var ma=this.createLoadMessage("export"); -ma.message=G;if("html2"==G.format||"html"==G.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var pa=this.getXmlFileData();ma.xml=mxUtils.getXml(pa);ma.data=this.getFileData(null,null,!0,null,null,null,pa);ma.format=G.format}else if("html"==G.format)pa=this.editor.getGraphXml(),ma.data=this.getHtml(pa,this.editor.graph),ma.xml=mxUtils.getXml(pa),ma.format=G.format;else{mxSvgCanvas2D.prototype.foAltText=null;pa=null!=G.background?G.background:this.editor.graph.background;pa== -mxConstants.NONE&&(pa=null);ma.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);ma.format="svg";var za=mxUtils.bind(this,function(Ba){this.editor.graph.setEnabled(!0);this.spinner.stop();ma.data=Editor.createSvgDataUri(Ba);H.postMessage(JSON.stringify(ma),"*")});if("xmlsvg"==G.format)(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))&&this.getEmbeddedSvg(ma.xml,this.editor.graph,null,!0,za,null,null,G.embedImages, -pa,G.scale,G.border,G.shadow,G.keepTheme);else if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))this.editor.graph.setEnabled(!1),pa=this.editor.graph.getSvg(pa,G.scale,G.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||G.shadow,null,G.keepTheme),(this.editor.graph.shadowVisible||G.shadow)&&this.editor.graph.addSvgShadow(pa),this.embedFonts(pa,mxUtils.bind(this,function(Ba){G.embedImages||null==G.embedImages?this.editor.convertImages(Ba, -mxUtils.bind(this,function(Ia){za(mxUtils.getXml(Ia))})):za(mxUtils.getXml(Ba))}));return}H.postMessage(JSON.stringify(ma),"*")}),null!=G.xml&&0<G.xml.length){if(this.editor.graph.mathEnabled){var W=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){W.apply(this,arguments);R()}}g=!0;this.setFileData(G.xml);g=!1;this.editor.graph.mathEnabled||R()}else R();return}if("load"==G.action){Y=G.toSketch;x=1==G.autosave;this.hideDialog();null!=G.modified&&null==urlParams.modified&&(urlParams.modified=G.modified); -null!=G.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=G.saveAndExit);null!=G.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=G.noSaveBtn);if(null!=G.rough){var T=Editor.sketchMode;this.doSetSketchMode(G.rough);T!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=G.dark&&(T=Editor.darkMode,this.doSetDarkMode(G.dark),T!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=G.border&&(this.embedExportBorder=G.border); +"*")}):null);this.showDialog(N.container,640,480,!0,!1,mxUtils.bind(this,function(la){la&&this.actions.get("exit").funct()}));try{N.init()}catch(la){H.postMessage(JSON.stringify({event:"draft",error:la.toString(),message:G}),"*")}return}if("template"==G.action){this.spinner.stop();var oa=1==G.enableRecent,S=1==G.enableSearch,fa=1==G.enableCustomTemp;if("1"==urlParams.newTempDlg&&!G.templatesOnly&&null!=G.callback){var ia=this.getCurrentUser(),M=new TemplatesDialog(this,function(la,pa,xa){la=la||this.emptyDiagramXml; +H.postMessage(JSON.stringify({event:"template",xml:la,blank:la==this.emptyDiagramXml,name:pa,tempUrl:xa.url,libs:xa.libs,builtIn:null!=xa.info&&null!=xa.info.custContentId,message:G}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=ia?ia.id:null,oa?mxUtils.bind(this,function(la,pa,xa){this.remoteInvoke("getRecentDiagrams",[xa],null,la,pa)}):null,S?mxUtils.bind(this,function(la,pa,xa,Ca){this.remoteInvoke("searchDiagrams",[la,Ca],null,pa,xa)}):null,mxUtils.bind(this, +function(la,pa,xa){this.remoteInvoke("getFileContent",[la.url],null,pa,xa)}),null,fa?mxUtils.bind(this,function(la){this.remoteInvoke("getCustomTemplates",null,null,la,function(){la({},0)})}):null,!1,!1,!0,!0);this.showDialog(M.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}N=new NewDialog(this,!1,G.templatesOnly?!1:null!=G.callback,mxUtils.bind(this,function(la,pa,xa,Ca){la=la||this.emptyDiagramXml;null!=G.callback?H.postMessage(JSON.stringify({event:"template",xml:la,blank:la== +this.emptyDiagramXml,name:pa,tempUrl:xa,libs:Ca,builtIn:!0,message:G}),"*"):(d(la,D,la!=this.emptyDiagramXml,G.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,oa?mxUtils.bind(this,function(la){this.remoteInvoke("getRecentDiagrams",[null],null,la,function(){la(null,"Network Error!")})}):null,S?mxUtils.bind(this,function(la,pa){this.remoteInvoke("searchDiagrams",[la,null],null,pa,function(){pa(null,"Network Error!")})}):null,mxUtils.bind(this,function(la, +pa,xa){H.postMessage(JSON.stringify({event:"template",docUrl:la,info:pa,name:xa}),"*")}),null,null,fa?mxUtils.bind(this,function(la){this.remoteInvoke("getCustomTemplates",null,null,la,function(){la({},0)})}):null,1==G.withoutType);this.showDialog(N.container,620,460,!0,!1,mxUtils.bind(this,function(la){this.sidebar.hideTooltip();la&&this.actions.get("exit").funct()}));N.init();return}if("textContent"==G.action){var aa=this.getDiagramTextContent();H.postMessage(JSON.stringify({event:"textContent", +data:aa,message:G}),"*");return}if("status"==G.action){null!=G.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(G.messageKey))):null!=G.message&&this.editor.setStatus(mxUtils.htmlEntities(G.message));null!=G.modified&&(this.editor.modified=G.modified);return}if("spinner"==G.action){var X=null!=G.messageKey?mxResources.get(G.messageKey):G.message;null==G.show||G.show?this.spinner.spin(document.body,X):this.spinner.stop();return}if("exit"==G.action){this.actions.get("exit").funct(); +return}if("viewport"==G.action){null!=G.viewport&&(this.embedViewport=G.viewport);return}if("snapshot"==G.action){this.sendEmbeddedSvgExport(!0);return}if("export"==G.action){if("png"==G.format||"xmlpng"==G.format){if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin)){var ja=null!=G.xml?G.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var ca=this.editor.graph,ka=mxUtils.bind(this,function(la){this.editor.graph.setEnabled(!0); +this.spinner.stop();var pa=this.createLoadMessage("export");pa.format=G.format;pa.message=G;pa.data=la;pa.xml=ja;H.postMessage(JSON.stringify(pa),"*")}),q=mxUtils.bind(this,function(la){null==la&&(la=Editor.blankImage);"xmlpng"==G.format&&(la=Editor.writeGraphModelToPng(la,"tEXt","mxfile",encodeURIComponent(ja)));ca!=this.editor.graph&&ca.container.parentNode.removeChild(ca.container);ka(la)}),E=G.pageId||(null!=this.pages?G.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var Q= +mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=E){var la=ca.getGlobalVariable;ca=this.createTemporaryGraph(ca.getStylesheet());for(var pa,xa=0;xa<this.pages.length;xa++)if(this.pages[xa].getId()==E){pa=this.updatePageRoot(this.pages[xa]);break}null==pa&&(pa=this.currentPage);ca.getGlobalVariable=function(La){return"page"==La?pa.getName():"pagenumber"==La?1:la.apply(this,arguments)};document.body.appendChild(ca.container);ca.model.setRoot(pa.root)}if(null!=G.layerIds){var Ca= +ca.model,Ia=Ca.getChildCells(Ca.getRoot()),Aa={};for(xa=0;xa<G.layerIds.length;xa++)Aa[G.layerIds[xa]]=!0;for(xa=0;xa<Ia.length;xa++)Ca.setVisible(Ia[xa],Aa[Ia[xa].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(La){q(La.toDataURL("image/png"))}),G.width,null,G.background,mxUtils.bind(this,function(){q(null)}),null,null,G.scale,G.transparent,G.shadow,null,ca,G.border,null,G.grid,G.keepTheme)});null!=G.xml&&0<G.xml.length&&(g=!0,this.setFileData(ja),g=!1);Q()}else(new mxXmlRequest(EXPORT_URL, +"format=png&embedXml="+("xmlpng"==G.format?"1":"0")+(null!=E?"&pageId="+E:"")+(null!=G.layerIds&&0<G.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:G.layerIds})):"")+(null!=G.scale?"&scale="+G.scale:"")+"&base64=1&xml="+encodeURIComponent(ja))).send(mxUtils.bind(this,function(la){200<=la.getStatus()&&299>=la.getStatus()?ka("data:image/png;base64,"+la.getText()):q(null)}),mxUtils.bind(this,function(){q(null)}))}}else if(Q=mxUtils.bind(this,function(){var la=this.createLoadMessage("export"); +la.message=G;if("html2"==G.format||"html"==G.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var pa=this.getXmlFileData();la.xml=mxUtils.getXml(pa);la.data=this.getFileData(null,null,!0,null,null,null,pa);la.format=G.format}else if("html"==G.format)pa=this.editor.getGraphXml(),la.data=this.getHtml(pa,this.editor.graph),la.xml=mxUtils.getXml(pa),la.format=G.format;else{mxSvgCanvas2D.prototype.foAltText=null;pa=null!=G.background?G.background:this.editor.graph.background;pa== +mxConstants.NONE&&(pa=null);la.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);la.format="svg";var xa=mxUtils.bind(this,function(Ca){this.editor.graph.setEnabled(!0);this.spinner.stop();la.data=Editor.createSvgDataUri(Ca);H.postMessage(JSON.stringify(la),"*")});if("xmlsvg"==G.format)(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))&&this.getEmbeddedSvg(la.xml,this.editor.graph,null,!0,xa,null,null,G.embedImages, +pa,G.scale,G.border,G.shadow,G.keepTheme);else if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))this.editor.graph.setEnabled(!1),pa=this.editor.graph.getSvg(pa,G.scale,G.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||G.shadow,null,G.keepTheme),(this.editor.graph.shadowVisible||G.shadow)&&this.editor.graph.addSvgShadow(pa),this.embedFonts(pa,mxUtils.bind(this,function(Ca){G.embedImages||null==G.embedImages?this.editor.convertImages(Ca, +mxUtils.bind(this,function(Ia){xa(mxUtils.getXml(Ia))})):xa(mxUtils.getXml(Ca))}));return}H.postMessage(JSON.stringify(la),"*")}),null!=G.xml&&0<G.xml.length){if(this.editor.graph.mathEnabled){var Y=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){Y.apply(this,arguments);Q()}}g=!0;this.setFileData(G.xml);g=!1;this.editor.graph.mathEnabled||Q()}else Q();return}if("load"==G.action){Z=G.toSketch;x=1==G.autosave;this.hideDialog();null!=G.modified&&null==urlParams.modified&&(urlParams.modified=G.modified); +null!=G.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=G.saveAndExit);null!=G.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=G.noSaveBtn);if(null!=G.rough){var R=Editor.sketchMode;this.doSetSketchMode(G.rough);R!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=G.dark&&(R=Editor.darkMode,this.doSetDarkMode(G.dark),R!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=G.border&&(this.embedExportBorder=G.border); null!=G.background&&(this.embedExportBackground=G.background);null!=G.viewport&&(this.embedViewport=G.viewport);this.embedExitPoint=null;if(null!=G.rect){var ba=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=G.rect.top+"px";this.diagramContainer.style.left=G.rect.left+"px";this.diagramContainer.style.height=G.rect.height+"px";this.diagramContainer.style.width=G.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right= -"";V=mxUtils.bind(this,function(){var ma=this.editor.graph,pa=ma.maxFitScale;ma.maxFitScale=G.maxFitScale;ma.fit(2*ba);ma.maxFitScale=pa;ma.container.scrollTop-=2*ba;ma.container.scrollLeft-=2*ba;this.fireEvent(new mxEventObject("editInlineStart","data",[G]))})}null!=G.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=G.noExitBtn);null!=G.title&&null!=this.buttonContainer&&(qa=document.createElement("span"),mxUtils.write(qa,G.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan), -this.buttonContainer.appendChild(qa),this.embedFilenameSpan=qa);try{G.libs&&this.sidebar.showEntries(G.libs)}catch(ma){}G=null!=G.xmlpng?this.extractGraphModelFromPng(G.xmlpng):null!=G.descriptor?G.descriptor:G.xml}else{if("merge"==G.action){var ha=this.getCurrentFile();null!=ha&&(qa=U(G.xml),null!=qa&&""!=qa&&ha.mergeFile(new LocalFile(this,qa),function(){H.postMessage(JSON.stringify({event:"merge",message:G}),"*")},function(ma){H.postMessage(JSON.stringify({event:"merge",message:G,error:ma}),"*")}))}else"remoteInvokeReady"== -G.action?this.handleRemoteInvokeReady(H):"remoteInvoke"==G.action?this.handleRemoteInvoke(G,D.origin):"remoteInvokeResponse"==G.action?this.handleRemoteInvokeResponse(G):H.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(G)}),"*");return}}catch(ma){this.handleError(ma)}}var ra=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),ta=mxUtils.bind(this,function(ma,pa){g=!0; -try{d(ma,pa,null,Y)}catch(za){this.handleError(za)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");z=ra();x&&null==f&&(f=mxUtils.bind(this,function(za,Ba){za=ra();za==z||g||(Ba=this.createLoadMessage("autosave"),Ba.xml=za,(window.opener||window.parent).postMessage(JSON.stringify(Ba),"*"));z=za}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged", -f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)pa=this.createLoadMessage("load"),pa.xml=ma,H.postMessage(JSON.stringify(pa),"*");null!=V&&V()});null!=G&& -"function"===typeof G.substring&&"data:application/vnd.visio;base64,"==G.substring(0,34)?(U="0M8R4KGxGuE"==G.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(G.substring(G.indexOf(",")+1)),function(ma){ta(ma,D)},mxUtils.bind(this,function(ma){this.handleError(ma)}),U)):null!=G&&"function"===typeof G.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(G,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(G, -mxUtils.bind(this,function(ma){4==ma.readyState&&200<=ma.status&&299>=ma.status&&"<mxGraphModel"==ma.responseText.substring(0,13)&&ta(ma.responseText,D)}),""):null!=G&&"function"===typeof G.substring&&this.isLucidChartData(G)?this.convertLucidChart(G,mxUtils.bind(this,function(ma){ta(ma)}),mxUtils.bind(this,function(ma){this.handleError(ma)})):null==G||"object"!==typeof G||null==G.format||null==G.data&&null==G.url?(G=U(G),ta(G,D)):this.loadDescriptor(G,mxUtils.bind(this,function(ma){ta(ra(),D)}), -mxUtils.bind(this,function(ma){this.handleError(ma,mxResources.get("errorLoadingFile"))}))}}));var H=window.opener||window.parent;u="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";H.postMessage(u,"*");if("json"==urlParams.proto){var J=this.editor.graph.openLink;this.editor.graph.openLink=function(D,G,V){J.apply(this,arguments);H.postMessage(JSON.stringify({event:"openLink",href:D,target:G,allowOpener:V}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!= -this.menubar&&"1"!=urlParams.embedInline){var d=document.createElement("div");d.style.display="inline-block";d.style.position="absolute";d.style.paddingTop="2px";d.style.paddingLeft="8px";d.style.paddingBottom="2px";var f=document.createElement("button");f.className="geBigButton";var g=f;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var x="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(f,x);f.setAttribute("title",x);mxEvent.addListener(f, -"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));d.appendChild(f)}}else mxUtils.write(f,mxResources.get("save")),f.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),d.appendChild(f),"1"==urlParams.saveAndExit&&(f=document.createElement("a"),mxUtils.write(f,mxResources.get("saveAndExit")),f.setAttribute("title",mxResources.get("saveAndExit")),f.className= -"geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),d.appendChild(f),g=f);"1"!=urlParams.noExitBtn&&(f=document.createElement("a"),g="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(f,g),f.setAttribute("title",g),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})), -d.appendChild(f),g=f);g.style.marginRight="20px";this.toolbar.container.appendChild(d);this.toolbar.staticElements.push(d);d.style.right="atlas"==uiTheme||"1"==urlParams.atlas?"62px":"72px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(d){this.importCsv(d)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/")); -this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(d){var f=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();d()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?f():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js", -function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",f)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",f))};EditorUi.prototype.importCsv=function(d,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,f)}))};EditorUi.prototype.doImportCsv=function(d,f){try{var g=d.split("\n"),x=[],z=[],u=[],H={};if(0<g.length){var J={},D=this.editor.graph,G=null,V=null,U=null,Y=null,O=null,qa=null,oa=null,aa="whiteSpace=wrap;html=1;", -da=null,ia=null,L="",Z="auto",P="auto",ca=!1,ja=null,ka=null,q=40,F=40,R=100,W=0,T=mxUtils.bind(this,function(){null!=f?f(ya):(D.setSelectionCells(ya),D.scrollCellToVisible(D.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),ba=D.getFreeInsertPoint(),ha=ba.x,ra=ba.y;ba=ra;var ta=null,ma="auto";ia=null;for(var pa=[],za=null,Ba=null,Ia=0;Ia<g.length&&"#"==g[Ia].charAt(0);){d=g[Ia].replace(/\r$/,"");for(Ia++;Ia<g.length&& -"\\"==d.charAt(d.length-1)&&"#"==g[Ia].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(g[Ia].substring(1)),Ia++;if("#"!=d.charAt(1)){var Aa=d.indexOf(":");if(0<Aa){var Ka=mxUtils.trim(d.substring(1,Aa)),Da=mxUtils.trim(d.substring(Aa+1));"label"==Ka?ta=D.sanitizeHtml(Da):"labelname"==Ka&&0<Da.length&&"-"!=Da?O=Da:"labels"==Ka&&0<Da.length&&"-"!=Da?oa=JSON.parse(Da):"style"==Ka?V=Da:"parentstyle"==Ka?aa=Da:"unknownStyle"==Ka&&"-"!=Da?qa=Da:"stylename"==Ka&&0<Da.length&&"-"!=Da?Y=Da:"styles"==Ka&& -0<Da.length&&"-"!=Da?U=JSON.parse(Da):"vars"==Ka&&0<Da.length&&"-"!=Da?G=JSON.parse(Da):"identity"==Ka&&0<Da.length&&"-"!=Da?da=Da:"parent"==Ka&&0<Da.length&&"-"!=Da?ia=Da:"namespace"==Ka&&0<Da.length&&"-"!=Da?L=Da:"width"==Ka?Z=Da:"height"==Ka?P=Da:"collapsed"==Ka&&"-"!=Da?ca="true"==Da:"left"==Ka&&0<Da.length?ja=Da:"top"==Ka&&0<Da.length?ka=Da:"ignore"==Ka?Ba=Da.split(","):"connect"==Ka?pa.push(JSON.parse(Da)):"link"==Ka?za=Da:"padding"==Ka?W=parseFloat(Da):"edgespacing"==Ka?q=parseFloat(Da):"nodespacing"== -Ka?F=parseFloat(Da):"levelspacing"==Ka?R=parseFloat(Da):"layout"==Ka&&(ma=Da)}}}if(null==g[Ia])throw Error(mxResources.get("invalidOrMissingFile"));var Ra=this.editor.csvToArray(g[Ia].replace(/\r$/,""));Aa=d=null;Ka=[];for(Da=0;Da<Ra.length;Da++)da==Ra[Da]&&(d=Da),ia==Ra[Da]&&(Aa=Da),Ka.push(mxUtils.trim(Ra[Da]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ta&&(ta="%"+Ka[0]+"%");if(null!=pa)for(var Qa=0;Qa<pa.length;Qa++)null==J[pa[Qa].to]&&(J[pa[Qa].to]={});da=[];for(Da= -Ia+1;Da<g.length;Da++){var Ta=this.editor.csvToArray(g[Da].replace(/\r$/,""));if(null==Ta){var Za=40<g[Da].length?g[Da].substring(0,40)+"...":g[Da];throw Error(Za+" ("+Da+"):\n"+mxResources.get("containsValidationErrors"));}0<Ta.length&&da.push(Ta)}D.model.beginUpdate();try{for(Da=0;Da<da.length;Da++){Ta=da[Da];var Pa=null,y=null!=d?L+Ta[d]:null;g=!1;null!=y&&(Pa=D.model.getCell(y),g=null==Pa||0<=mxUtils.indexOf(x,Pa));var M=new mxCell(ta,new mxGeometry(ha,ba,0,0),V||"whiteSpace=wrap;html=1;");M.collapsed= -ca;M.vertex=!0;M.id=y;null==Pa||g||D.model.setCollapsed(Pa,ca);for(var N=0;N<Ta.length;N++)D.setAttributeForCell(M,Ka[N],Ta[N]),null==Pa||g||D.setAttributeForCell(Pa,Ka[N],Ta[N]);if(null!=O&&null!=oa){var S=oa[M.getAttribute(O)];null!=S&&(D.labelChanged(M,S),null==Pa||g||D.cellLabelChanged(Pa,S))}if(null!=Y&&null!=U){var X=U[M.getAttribute(Y)];null!=X&&(M.style=X)}D.setAttributeForCell(M,"placeholders","1");M.style=D.replacePlaceholders(M,M.style,G);null==Pa||g?D.fireEvent(new mxEventObject("cellsInserted", -"cells",[M])):(D.model.setStyle(Pa,M.style),0>mxUtils.indexOf(u,Pa)&&u.push(Pa),D.fireEvent(new mxEventObject("cellsInserted","cells",[Pa])));g=null!=Pa;Pa=M;if(!g)for(Qa=0;Qa<pa.length;Qa++)J[pa[Qa].to][Pa.getAttribute(pa[Qa].to)]=Pa;null!=za&&"link"!=za&&(D.setLinkForCell(Pa,Pa.getAttribute(za)),D.setAttributeForCell(Pa,za,null));var fa=this.editor.graph.getPreferredSizeForCell(Pa);ia=null!=Aa?D.model.getCell(L+Ta[Aa]):null;if(Pa.vertex){Za=null!=ia?0:ha;Ia=null!=ia?0:ra;null!=ja&&null!=Pa.getAttribute(ja)&& -(Pa.geometry.x=Za+parseFloat(Pa.getAttribute(ja)));null!=ka&&null!=Pa.getAttribute(ka)&&(Pa.geometry.y=Ia+parseFloat(Pa.getAttribute(ka)));var la="@"==Z.charAt(0)?Pa.getAttribute(Z.substring(1)):null;Pa.geometry.width=null!=la&&"auto"!=la?parseFloat(Pa.getAttribute(Z.substring(1))):"auto"==Z||"auto"==la?fa.width+W:parseFloat(Z);var xa="@"==P.charAt(0)?Pa.getAttribute(P.substring(1)):null;Pa.geometry.height=null!=xa&&"auto"!=xa?parseFloat(xa):"auto"==P||"auto"==xa?fa.height+W:parseFloat(P);ba+=Pa.geometry.height+ -F}g?(null==H[y]&&(H[y]=[]),H[y].push(Pa)):(x.push(Pa),null!=ia?(ia.style=D.replacePlaceholders(ia,aa,G),D.addCell(Pa,ia),z.push(ia)):u.push(D.addCell(Pa)))}for(Da=0;Da<z.length;Da++)la="@"==Z.charAt(0)?z[Da].getAttribute(Z.substring(1)):null,xa="@"==P.charAt(0)?z[Da].getAttribute(P.substring(1)):null,"auto"!=Z&&"auto"!=la||"auto"!=P&&"auto"!=xa||D.updateGroupBounds([z[Da]],W,!0);var sa=u.slice(),ya=u.slice();for(Qa=0;Qa<pa.length;Qa++){var Fa=pa[Qa];for(Da=0;Da<x.length;Da++){Pa=x[Da];var wa=mxUtils.bind(this, -function(fb,pb,lb){var $a=pb.getAttribute(lb.from);if(null!=$a&&""!=$a){$a=$a.split(",");for(var ab=0;ab<$a.length;ab++){var ib=J[lb.to][$a[ab]];if(null==ib&&null!=qa){ib=new mxCell($a[ab],new mxGeometry(ha,ra,0,0),qa);ib.style=D.replacePlaceholders(pb,ib.style,G);var gb=this.editor.graph.getPreferredSizeForCell(ib);ib.geometry.width=gb.width+W;ib.geometry.height=gb.height+W;J[lb.to][$a[ab]]=ib;ib.vertex=!0;ib.id=$a[ab];u.push(D.addCell(ib))}if(null!=ib){gb=lb.label;null!=lb.fromlabel&&(gb=(pb.getAttribute(lb.fromlabel)|| -"")+(gb||""));null!=lb.sourcelabel&&(gb=D.replacePlaceholders(pb,lb.sourcelabel,G)+(gb||""));null!=lb.tolabel&&(gb=(gb||"")+(ib.getAttribute(lb.tolabel)||""));null!=lb.targetlabel&&(gb=(gb||"")+D.replacePlaceholders(ib,lb.targetlabel,G));var qb="target"==lb.placeholders==!lb.invert?ib:fb;qb=null!=lb.style?D.replacePlaceholders(qb,lb.style,G):D.createCurrentEdgeStyle();gb=D.insertEdge(null,null,gb||"",lb.invert?ib:fb,lb.invert?fb:ib,qb);if(null!=lb.labels)for(qb=0;qb<lb.labels.length;qb++){var nb= -lb.labels[qb],mb=new mxCell(nb.label||qb,new mxGeometry(null!=nb.x?nb.x:0,null!=nb.y?nb.y:0,0,0),"resizable=0;html=1;");mb.vertex=!0;mb.connectable=!1;mb.geometry.relative=!0;null!=nb.placeholders&&(mb.value=D.replacePlaceholders("target"==nb.placeholders==!lb.invert?ib:fb,mb.value,G));if(null!=nb.dx||null!=nb.dy)mb.geometry.offset=new mxPoint(null!=nb.dx?nb.dx:0,null!=nb.dy?nb.dy:0);gb.insert(mb)}ya.push(gb);mxUtils.remove(lb.invert?fb:ib,sa)}}}});wa(Pa,Pa,Fa);if(null!=H[Pa.id])for(N=0;N<H[Pa.id].length;N++)wa(Pa, -H[Pa.id][N],Fa)}}if(null!=Ba)for(Da=0;Da<x.length;Da++)for(Pa=x[Da],N=0;N<Ba.length;N++)D.setAttributeForCell(Pa,mxUtils.trim(Ba[N]),null);if(0<u.length){var ua=new mxParallelEdgeLayout(D);ua.spacing=q;ua.checkOverlap=!0;var La=function(){0<ua.spacing&&ua.execute(D.getDefaultParent());for(var fb=0;fb<u.length;fb++){var pb=D.getCellGeometry(u[fb]);pb.x=Math.round(D.snap(pb.x));pb.y=Math.round(D.snap(pb.y));"auto"==Z&&(pb.width=Math.round(D.snap(pb.width)));"auto"==P&&(pb.height=Math.round(D.snap(pb.height)))}}; -if("["==ma.charAt(0)){var Oa=T;D.view.validate();this.executeLayouts(D.createLayouts(JSON.parse(ma)),function(){La();Oa()});T=null}else if("circle"==ma){var Ca=new mxCircleLayout(D);Ca.disableEdgeStyle=!1;Ca.resetEdges=!1;var Ma=Ca.isVertexIgnored;Ca.isVertexIgnored=function(fb){return Ma.apply(this,arguments)||0>mxUtils.indexOf(u,fb)};this.executeLayout(function(){Ca.execute(D.getDefaultParent());La()},!0,T);T=null}else if("horizontaltree"==ma||"verticaltree"==ma||"auto"==ma&&ya.length==2*u.length- -1&&1==sa.length){D.view.validate();var Ga=new mxCompactTreeLayout(D,"horizontaltree"==ma);Ga.levelDistance=F;Ga.edgeRouting=!1;Ga.resetEdges=!1;this.executeLayout(function(){Ga.execute(D.getDefaultParent(),0<sa.length?sa[0]:null)},!0,T);T=null}else if("horizontalflow"==ma||"verticalflow"==ma||"auto"==ma&&1==sa.length){D.view.validate();var Ya=new mxHierarchicalLayout(D,"horizontalflow"==ma?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);Ya.intraCellSpacing=F;Ya.parallelEdgeSpacing=q;Ya.interRankCellSpacing= -R;Ya.disableEdgeStyle=!1;this.executeLayout(function(){Ya.execute(D.getDefaultParent(),ya);D.moveCells(ya,ha,ra)},!0,T);T=null}else if("orgchart"==ma){D.view.validate();var db=new mxOrgChartLayout(D,2,R,F),eb=db.isVertexIgnored;db.isVertexIgnored=function(fb){return eb.apply(this,arguments)||0>mxUtils.indexOf(u,fb)};this.executeLayout(function(){db.execute(D.getDefaultParent());La()},!0,T);T=null}else if("organic"==ma||"auto"==ma&&ya.length>u.length){D.view.validate();var cb=new mxFastOrganicLayout(D); -cb.forceConstant=3*F;cb.disableEdgeStyle=!1;cb.resetEdges=!1;var ub=cb.isVertexIgnored;cb.isVertexIgnored=function(fb){return ub.apply(this,arguments)||0>mxUtils.indexOf(u,fb)};this.executeLayout(function(){cb.execute(D.getDefaultParent());La()},!0,T);T=null}}this.hideDialog()}finally{D.model.endUpdate()}null!=T&&T()}}catch(fb){this.handleError(fb)}};EditorUi.prototype.getSearch=function(d){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var g="?", -x;for(x in urlParams)0>mxUtils.indexOf(d,x)&&null!=urlParams[x]&&(f+=g+x+"="+urlParams[x],g="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var f=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),x;for(x in urlParams)0>mxUtils.indexOf(g,x)&&(d=0==f?d+"?":d+"&",null!=urlParams[x]&&(d+=x+"="+urlParams[x], -f++))}return d};EditorUi.prototype.showLinkDialog=function(d,f,g,x,z){d=new LinkDialog(this,d,f,g,!0,x,z);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;d&&isLocalStorage&&"1"==urlParams.browser&&f++; -return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),f=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!g);this.actions.get("print").setEnabled(!g);this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g); -g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);this.actions.get("resetView").setEnabled(f);this.actions.get("undo").setEnabled(this.canUndo()&& -d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement= -function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var E=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=function(d){var f=E.apply(this,arguments);this.addListener("darkModeChanged",mxUtils.bind(this,function(){f.refresh()}));this.addListener("sketchModeChanged", -mxUtils.bind(this,function(){f.refresh()}));return f};var K=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){K.apply(this,arguments);var d=this.editor.graph,f=this.getCurrentFile(),g=this.getSelectionState(),x=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(x);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(x);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(x); -this.actions.get("connectionArrows").setEnabled(x);this.actions.get("connectionPoints").setEnabled(x);this.actions.get("copyStyle").setEnabled(x&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(x&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(x);this.actions.get("createRevision").setEnabled(x);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted()); -this.actions.get("editDiagram").setEnabled(x&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!= -f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"");d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(x&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};var Q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog), -this.exportDialog=null);Q.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,f,g,x,z,u,H,J){var D=d.editor.graph;if("xml"==g)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==g)d.hideDialog(),d.saveData(f,"svg",mxUtils.getXml(D.getSvg(x,z,u)),"image/svg+xml");else{var G=d.getFileData(!0,null,null,null,null,!0),V=D.getGraphBounds(),U=Math.floor(V.width*z/ -D.view.scale),Y=Math.floor(V.height*z/D.view.scale);if(G.length<=MAX_REQUEST_SIZE&&U*Y<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!d.isExportToCanvas()){var O={globalVars:D.getExportVariables()};J&&(O.grid={size:D.gridSize,steps:D.view.gridSteps,color:D.view.gridColor});d.saveRequest(f,g,function(qa,oa){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(oa||"0")+(null!=qa?"&filename="+encodeURIComponent(qa):"")+"&extras="+encodeURIComponent(JSON.stringify(O))+(0<H?"&dpi="+H: -"")+"&bg="+(null!=x?x:"none")+"&w="+U+"&h="+Y+"&border="+u+"&xml="+encodeURIComponent(G))})}else"png"==g?d.exportImage(z,null==x||"none"==x,!0,!1,!1,u,!0,!1,null,J,H):d.exportImage(z,!1,!0,!1,!1,u,!0,!1,"jpeg",J);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,f="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var x=d;this.currentPage!=this.pages[g]&&(x=this.createTemporaryGraph(d.getStylesheet()), -this.updatePageRoot(this.pages[g]),x.model.setRoot(this.pages[g].root));f+=this.pages[g].getName()+" "+x.getIndexableText()+" "}else f=d.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var f={},g=document.createElement("div");g.style.whiteSpace="nowrap";var x=document.createElement("h3");mxUtils.write(x,mxUtils.htmlEntities(d));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(x);var z= -document.createElement("div");z.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";z.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var u={};try{var H=mxSettings.getCustomLibraries();for(d=0;d<H.length;d++){var J=H[d];if("R"==J.substring(0,1)){var D=JSON.parse(decodeURIComponent(J.substring(1)));u[D[0]]={id:D[0],title:D[1],downloadUrl:D[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){z.innerText=""; -if(0==G.length)z.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var V=0;V<G.length;V++){var U=G[V];u[U.id]&&(f[U.id]=U);var Y=this.addCheckbox(z,U.title,u[U.id]);(function(O,qa){mxEvent.addListener(qa,"change",function(){this.checked?f[O.id]=O:delete f[O.id]})})(U,Y)}},mxUtils.bind(this,function(G){z.innerText="";var V=document.createElement("div");V.style.padding="8px";V.style.textAlign="center";mxUtils.write(V, -mxResources.get("error")+": ");mxUtils.write(V,null!=G&&null!=G.message?G.message:mxResources.get("unknownError"));z.appendChild(V)}));g.appendChild(z);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var G=0,V;for(V in f)null==u[V]&&(G++,mxUtils.bind(this,function(U){this.remoteInvoke("getFileContent",[U.downloadUrl],null,mxUtils.bind(this,function(Y){G--;0==G&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,Y,U))}catch(O){this.handleError(O, -mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){G--;0==G&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[V]));for(V in u)f[V]||this.closeLibrary(new RemoteLibrary(this,null,u[V]));0==G&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(g.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1, -allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin=d;for(var f=0;f<this.remoteInvokeQueue.length;f++)d.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var f= -d.msgMarkers,g=this.remoteInvokeCallbacks[f.callbackId];if(null==g)throw Error("No callback for "+(null!=f?f.callbackId:"null"));d.error?g.error&&g.error(d.error.errResp):g.callback&&g.callback.apply(this,d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,g,x,z){var u=!0,H=window.setTimeout(mxUtils.bind(this,function(){u=!1;z({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),J=mxUtils.bind(this,function(){window.clearTimeout(H); -u&&x.apply(this,arguments)}),D=mxUtils.bind(this,function(){window.clearTimeout(H);u&&z.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:J,error:D});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var g=mxUtils.bind(this,function(G,V){var U={event:"remoteInvokeResponse", -msgMarkers:d.msgMarkers};null!=V?U.error={errResp:V}:null!=G&&(U.resp=G);this.remoteWin.postMessage(JSON.stringify(U),"*")});try{var x=d.funtionName,z=this.remoteInvokableFns[x];if(null!=z&&"function"===typeof this[x]){if(z.allowedDomains){for(var u=!1,H=0;H<z.allowedDomains.length;H++)if(f=="https://"+z.allowedDomains[H]){u=!0;break}if(!u){g(null,"Invalid Call: "+x+" is not allowed.");return}}var J=d.functionArgs;Array.isArray(J)||(J=[]);if(z.isAsync)J.push(function(){g(Array.prototype.slice.apply(arguments))}), -J.push(function(G){g(null,G||"Unkown Error")}),this[x].apply(this,J);else{var D=this[x].apply(this,J);g([D])}}else g(null,"Invalid Call: "+x+" is not found.")}catch(G){g(null,"Invalid Call: An error occurred, "+G.message)}};EditorUi.prototype.openDatabase=function(d,f){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var x=g.open("database",2);x.onupgradeneeded=function(z){try{var u=x.result;1>z.oldVersion&&u.createObjectStore("objects",{keyPath:"key"}); -2>z.oldVersion&&(u.createObjectStore("files",{keyPath:"title"}),u.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(H){null!=f&&f(H)}};x.onsuccess=mxUtils.bind(this,function(z){var u=x.result;this.database=u;EditorUi.migrateStorageFiles&&(StorageFile.migrate(u),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(H){if(!H|| -"1"==urlParams.forceMigration){var J=document.createElement("iframe");J.style.display="none";J.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(J);var D=!0,G=!1,V,U=0,Y=mxUtils.bind(this,function(){G=!0;this.setDatabaseItem(".drawioMigrated3",!0);J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),O=mxUtils.bind(this,function(){U++;qa()}),qa=mxUtils.bind(this,function(){try{if(U>= -V.length)Y();else{var aa=V[U];StorageFile.getFileContent(this,aa,mxUtils.bind(this,function(da){null==da||".scratchpad"==aa&&da==this.emptyLibraryXml?J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[aa]}),"*"):O()}),O)}}catch(da){console.log(da)}}),oa=mxUtils.bind(this,function(aa){try{this.setDatabaseItem(null,[{title:aa.title,size:aa.data.length,lastModified:Date.now(),type:aa.isLib?"L":"F"},{title:aa.title,data:aa.data}],O,O,["filesInfo", -"files"])}catch(da){console.log(da)}});H=mxUtils.bind(this,function(aa){try{if(aa.source==J.contentWindow){var da={};try{da=JSON.parse(aa.data)}catch(ia){}"init"==da.event?(J.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=da.event||G||(D?null!=da.resp&&0<da.resp.length&&null!=da.resp[0]?(V=da.resp[0],D=!1,qa()):Y():null!=da.resp&&0<da.resp.length&& -null!=da.resp[0]?oa(da.resp[0]):O())}}catch(ia){console.log(ia)}});window.addEventListener("message",H)}})));d(u);u.onversionchange=function(){u.close()}});x.onerror=f;x.onblocked=function(){}}catch(z){null!=f&&f(z)}else null!=f&&f()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,f,g,x,z){this.openDatabase(mxUtils.bind(this,function(u){try{z=z||"objects";Array.isArray(z)||(z=[z],d=[d],f=[f]);var H=u.transaction(z,"readwrite");H.oncomplete=g;H.onerror=x;for(u=0;u<z.length;u++)H.objectStore(z[u]).put(null!= -d&&null!=d[u]?{key:d[u],data:f[u]}:f[u])}catch(J){null!=x&&x(J)}}),x)};EditorUi.prototype.removeDatabaseItem=function(d,f,g,x){this.openDatabase(mxUtils.bind(this,function(z){x=x||"objects";Array.isArray(x)||(x=[x],d=[d]);z=z.transaction(x,"readwrite");z.oncomplete=f;z.onerror=g;for(var u=0;u<x.length;u++)z.objectStore(x[u]).delete(d[u])}),g)};EditorUi.prototype.getDatabaseItem=function(d,f,g,x){this.openDatabase(mxUtils.bind(this,function(z){try{x=x||"objects";var u=z.transaction([x],"readonly").objectStore(x).get(d); -u.onsuccess=function(){f(u.result)};u.onerror=g}catch(H){null!=g&&g(H)}}),g)};EditorUi.prototype.getDatabaseItems=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(x){try{g=g||"objects";var z=x.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),u=[];z.onsuccess=function(H){null==H.target.result?d(u):(u.push(H.target.result.value),H.target.result.continue())};z.onerror=f}catch(H){null!=f&&f(H)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(d,f,g){this.openDatabase(mxUtils.bind(this, -function(x){try{g=g||"objects";var z=x.transaction([g],"readonly").objectStore(g).getAllKeys();z.onsuccess=function(){d(z.result)};z.onerror=f}catch(u){null!=f&&f(u)}}),f)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!= -d?d.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(d,f){var g=this.getCurrentFile();null!=g?g.getComments(d,f):d([])};EditorUi.prototype.addComment=function(d,f,g){var x=this.getCurrentFile();null!=x?x.addComment(d,f,g):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment= -function(d,f){var g=this.getCurrentFile();return null!=g?g.newComment(d,f):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(d,f){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(d,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile(); -return null!=d&&(d.constructor==DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,f,g,x,z,u,H,J){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,x,z,u,H,J)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts"); -return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d, -f,g,x,z,u,H,J,D,G,V,U,Y,O,qa,oa){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,g,x,z,u,H,J,D,G,V,U,Y,O,qa,oa)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,f,g,x){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,f,g,x)};EditorUi.prototype.convertImageToDataUri= -function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,f)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,f,g,x){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,f,g,x)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)}; -EditorUi.prototype.writeGraphModelToPng=function(d,f,g,x,z){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,f,g,x,z)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],f=0;f<localStorage.length;f++){var g=localStorage.key(f),x=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<x.length){var z="<mxfile "=== -x.substring(0,8)||"<?xml"===x.substring(0,5)||"\x3c!--[if IE]>"===x.substring(0,12);x="<mxlibrary>"===x.substring(0,11);(z||x)&&d.push(g)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(d);return{title:d,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})(); -var CommentsWindow=function(b,e,k,m,C,p){function E(){for(var aa=G.getElementsByTagName("div"),da=0,ia=0;ia<aa.length;ia++)"none"!=aa[ia].style.display&&aa[ia].parentNode==G&&da++;V.style.display=0==da?"block":"none"}function K(aa,da,ia,L){function Z(){da.removeChild(ja);da.removeChild(ka);ca.style.display="block";P.style.display="block"}H={div:da,comment:aa,saveCallback:ia,deleteOnCancel:L};var P=da.querySelector(".geCommentTxt"),ca=da.querySelector(".geCommentActionsList"),ja=document.createElement("textarea"); -ja.className="geCommentEditTxtArea";ja.style.minHeight=P.offsetHeight+"px";ja.value=aa.content;da.insertBefore(ja,P);var ka=document.createElement("div");ka.className="geCommentEditBtns";var q=mxUtils.button(mxResources.get("cancel"),function(){L?(da.parentNode.removeChild(da),E()):Z();H=null});q.className="geCommentEditBtn";ka.appendChild(q);var F=mxUtils.button(mxResources.get("save"),function(){P.innerText="";aa.content=ja.value;mxUtils.write(P,aa.content);Z();ia(aa);H=null});mxEvent.addListener(ja, -"keydown",mxUtils.bind(this,function(R){mxEvent.isConsumed(R)||((mxEvent.isControlDown(R)||mxClient.IS_MAC&&mxEvent.isMetaDown(R))&&13==R.keyCode?(F.click(),mxEvent.consume(R)):27==R.keyCode&&(q.click(),mxEvent.consume(R)))}));F.focus();F.className="geCommentEditBtn gePrimaryBtn";ka.appendChild(F);da.insertBefore(ka,P);ca.style.display="none";P.style.display="none";ja.focus()}function Q(aa,da){da.innerText="";aa=new Date(aa.modifiedDate);var ia=b.timeSince(aa);null==ia&&(ia=mxResources.get("lessThanAMinute")); -mxUtils.write(da,mxResources.get("timeAgo",[ia],"{1} ago"));da.setAttribute("title",aa.toLocaleDateString()+" "+aa.toLocaleTimeString())}function d(aa){var da=document.createElement("img");da.className="geCommentBusyImg";da.src=IMAGE_PATH+"/spin.gif";aa.appendChild(da);aa.busyImg=da}function f(aa){aa.style.border="1px solid red";aa.removeChild(aa.busyImg)}function g(aa){aa.style.border="";aa.removeChild(aa.busyImg)}function x(aa,da,ia,L,Z){function P(T,ba,ha){var ra=document.createElement("li");ra.className= -"geCommentAction";var ta=document.createElement("a");ta.className="geCommentActionLnk";mxUtils.write(ta,T);ra.appendChild(ta);mxEvent.addListener(ta,"click",function(ma){ba(ma,aa);ma.preventDefault();mxEvent.consume(ma)});W.appendChild(ra);ha&&(ra.style.display="none")}function ca(){function T(ra){ba.push(ha);if(null!=ra.replies)for(var ta=0;ta<ra.replies.length;ta++)ha=ha.nextSibling,T(ra.replies[ta])}var ba=[],ha=ka;T(aa);return{pdiv:ha,replies:ba}}function ja(T,ba,ha,ra,ta){function ma(){d(Ia); -aa.addReply(Ba,function(Aa){Ba.id=Aa;aa.replies.push(Ba);g(Ia);ha&&ha()},function(Aa){pa();f(Ia);b.handleError(Aa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},ra,ta)}function pa(){K(Ba,Ia,function(Aa){ma()},!0)}var za=ca().pdiv,Ba=b.newComment(T,b.getCurrentUser());Ba.pCommentId=aa.id;null==aa.replies&&(aa.replies=[]);var Ia=x(Ba,aa.replies,za,L+1);ba?pa():ma()}if(Z||!aa.isResolved){V.style.display="none";var ka=document.createElement("div");ka.className="geCommentContainer"; -ka.setAttribute("data-commentId",aa.id);ka.style.marginLeft=20*L+5+"px";aa.isResolved&&!Editor.isDarkMode()&&(ka.style.backgroundColor="ghostWhite");var q=document.createElement("div");q.className="geCommentHeader";var F=document.createElement("img");F.className="geCommentUserImg";F.src=aa.user.pictureUrl||Editor.userImage;q.appendChild(F);F=document.createElement("div");F.className="geCommentHeaderTxt";q.appendChild(F);var R=document.createElement("div");R.className="geCommentUsername";mxUtils.write(R, -aa.user.displayName||"");F.appendChild(R);R=document.createElement("div");R.className="geCommentDate";R.setAttribute("data-commentId",aa.id);Q(aa,R);F.appendChild(R);ka.appendChild(q);q=document.createElement("div");q.className="geCommentTxt";mxUtils.write(q,aa.content||"");ka.appendChild(q);aa.isLocked&&(ka.style.opacity="0.5");q=document.createElement("div");q.className="geCommentActions";var W=document.createElement("ul");W.className="geCommentActionsList";q.appendChild(W);z||aa.isLocked||0!=L&& -!u||P(mxResources.get("reply"),function(){ja("",!0)},aa.isResolved);F=b.getCurrentUser();null==F||F.id!=aa.user.id||z||aa.isLocked||(P(mxResources.get("edit"),function(){function T(){K(aa,ka,function(){d(ka);aa.editComment(aa.content,function(){g(ka)},function(ba){f(ka);T();b.handleError(ba,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}T()},aa.isResolved),P(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){d(ka);aa.deleteComment(function(T){if(!0=== -T){T=ka.querySelector(".geCommentTxt");T.innerText="";mxUtils.write(T,mxResources.get("msgDeleted"));var ba=ka.querySelectorAll(".geCommentAction");for(T=0;T<ba.length;T++)ba[T].parentNode.removeChild(ba[T]);g(ka);ka.style.opacity="0.5"}else{ba=ca(aa).replies;for(T=0;T<ba.length;T++)G.removeChild(ba[T]);for(T=0;T<da.length;T++)if(da[T]==aa){da.splice(T,1);break}V.style.display=0==G.getElementsByTagName("div").length?"block":"none"}},function(T){f(ka);b.handleError(T,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}, -aa.isResolved));z||aa.isLocked||0!=L||P(aa.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(T){function ba(){var ha=T.target;ha.innerText="";aa.isResolved=!aa.isResolved;mxUtils.write(ha,aa.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var ra=aa.isResolved?"none":"",ta=ca(aa).replies,ma=Editor.isDarkMode()?"transparent":aa.isResolved?"ghostWhite":"white",pa=0;pa<ta.length;pa++){ta[pa].style.backgroundColor=ma;for(var za=ta[pa].querySelectorAll(".geCommentAction"), -Ba=0;Ba<za.length;Ba++)za[Ba]!=ha.parentNode&&(za[Ba].style.display=ra);O||(ta[pa].style.display="none")}E()}aa.isResolved?ja(mxResources.get("reOpened")+": ",!0,ba,!1,!0):ja(mxResources.get("markedAsResolved"),!1,ba,!0)});ka.appendChild(q);null!=ia?G.insertBefore(ka,ia.nextSibling):G.appendChild(ka);for(ia=0;null!=aa.replies&&ia<aa.replies.length;ia++)q=aa.replies[ia],q.isResolved=aa.isResolved,x(q,aa.replies,null,L+1,Z);null!=H&&(H.comment.id==aa.id?(Z=aa.content,aa.content=H.comment.content,K(aa, -ka,H.saveCallback,H.deleteOnCancel),aa.content=Z):null==H.comment.id&&H.comment.pCommentId==aa.id&&(G.appendChild(H.div),K(H.comment,H.div,H.saveCallback,H.deleteOnCancel)));return ka}}var z=!b.canComment(),u=b.canReplyToReplies(),H=null,J=document.createElement("div");J.className="geCommentsWin";J.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var D=EditorUi.compactUi?"26px":"30px",G=document.createElement("div");G.className="geCommentsList";G.style.backgroundColor=Editor.isDarkMode()? -Dialog.backdropColor:"whiteSmoke";G.style.bottom=parseInt(D)+7+"px";J.appendChild(G);var V=document.createElement("span");V.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(V,mxResources.get("noCommentsFound"));var U=document.createElement("div");U.className="geToolbarContainer geCommentsToolbar";U.style.height=D;U.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";U.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";D=document.createElement("a"); -D.className="geButton";if(!z){var Y=D.cloneNode();Y.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';Y.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(Y,"click",function(aa){function da(){K(ia,L,function(Z){d(L);b.addComment(Z,function(P){Z.id=P;qa.push(Z);g(L)},function(P){f(L);da();b.handleError(P,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var ia=b.newComment("",b.getCurrentUser()),L=x(ia,qa,null,0); -da();aa.preventDefault();mxEvent.consume(aa)});U.appendChild(Y)}Y=D.cloneNode();Y.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';Y.setAttribute("title",mxResources.get("showResolved"));Y.className="geAdaptiveAsset";var O=!1;mxEvent.addListener(Y,"click",function(aa){this.className=(O=!O)?"geButton geCheckedBtn":"geButton";oa();aa.preventDefault();mxEvent.consume(aa)});U.appendChild(Y);b.commentsRefreshNeeded()&&(Y=D.cloneNode(),Y.innerHTML='<img src="'+IMAGE_PATH+ -'/update16.png" style="width: 16px; padding: 2px;">',Y.setAttribute("title",mxResources.get("refresh")),Y.className="geAdaptiveAsset",mxEvent.addListener(Y,"click",function(aa){oa();aa.preventDefault();mxEvent.consume(aa)}),U.appendChild(Y));b.commentsSaveNeeded()&&(D=D.cloneNode(),D.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',D.setAttribute("title",mxResources.get("save")),D.className="geAdaptiveAsset",mxEvent.addListener(D,"click",function(aa){p();aa.preventDefault(); -mxEvent.consume(aa)}),U.appendChild(D));J.appendChild(U);var qa=[],oa=mxUtils.bind(this,function(){this.hasError=!1;if(null!=H)try{H.div=H.div.cloneNode(!0);var aa=H.div.querySelector(".geCommentEditTxtArea"),da=H.div.querySelector(".geCommentEditBtns");H.comment.content=aa.value;aa.parentNode.removeChild(aa);da.parentNode.removeChild(da)}catch(ia){b.handleError(ia)}G.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+ -"...</div>";u=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(ia){function L(Z){if(null!=Z){Z.sort(function(ca,ja){return new Date(ca.modifiedDate)-new Date(ja.modifiedDate)});for(var P=0;P<Z.length;P++)L(Z[P].replies)}}ia.sort(function(Z,P){return new Date(Z.modifiedDate)-new Date(P.modifiedDate)});G.innerText="";G.appendChild(V);V.style.display="block";qa=ia;for(ia=0;ia<qa.length;ia++)L(qa[ia].replies),x(qa[ia],qa,null,0,O);null!=H&&null==H.comment.id&&null==H.comment.pCommentId&& -(G.appendChild(H.div),K(H.comment,H.div,H.saveCallback,H.deleteOnCancel))},mxUtils.bind(this,function(ia){G.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(ia&&ia.message?": "+ia.message:""));this.hasError=!0})):G.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});oa();this.refreshComments=oa;U=mxUtils.bind(this,function(){function aa(P){var ca=ia[P.id];if(null!=ca)for(Q(P,ca),ca=0;null!=P.replies&&ca<P.replies.length;ca++)aa(P.replies[ca])}if(this.window.isVisible()){for(var da= -G.querySelectorAll(".geCommentDate"),ia={},L=0;L<da.length;L++){var Z=da[L];ia[Z.getAttribute("data-commentId")]=Z}for(L=0;L<qa.length;L++)aa(qa[L])}});setInterval(U,6E4);this.refreshCommentsTime=U;this.window=new mxWindow(mxResources.get("comments"),J,e,k,m,C,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW, -mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,k,m,C,p,E,K,Q,d,f){var g=document.createElement("div");g.style.textAlign="center";f=null!=f?f:44;var x=document.createElement("div");x.style.padding="6px";x.style.overflow="auto";x.style.maxHeight=f+"px";x.style.lineHeight="1.2em";mxUtils.write(x,e);g.appendChild(x);null!=d&&(x=document.createElement("div"),x.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src", -d),x.appendChild(e),g.appendChild(x));d=document.createElement("div");d.style.textAlign="center";d.style.whiteSpace="nowrap";var z=document.createElement("input");z.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=m&&m(z.checked)});p.className="geBtn";null!=K&&(p.innerHTML=K+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&d.appendChild(p);var u=mxUtils.button(C|| -mxResources.get("ok"),function(){b.hideDialog();null!=k&&k(z.checked)});d.appendChild(u);null!=E?(u.innerHTML=E+"<br>"+u.innerHTML+"<br>",u.style.paddingBottom="8px",u.style.paddingTop="8px",u.style.height="auto",u.className="geBtn",u.style.width="40%"):u.className="geBtn gePrimaryBtn";b.editor.cancelFirst||d.appendChild(p);g.appendChild(d);Q?(d.style.marginTop="10px",x=document.createElement("p"),x.style.marginTop="20px",x.style.marginBottom="0px",x.appendChild(z),C=document.createElement("span"), -mxUtils.write(C," "+mxResources.get("rememberThisSetting")),x.appendChild(C),g.appendChild(x),mxEvent.addListener(C,"click",function(H){z.checked=!z.checked;mxEvent.consume(H)})):d.style.marginTop="12px";this.init=function(){u.focus()};this.container=g};function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")}; +"";W=mxUtils.bind(this,function(){var la=this.editor.graph,pa=la.maxFitScale;la.maxFitScale=G.maxFitScale;la.fit(2*ba);la.maxFitScale=pa;la.container.scrollTop-=2*ba;la.container.scrollLeft-=2*ba;this.fireEvent(new mxEventObject("editInlineStart","data",[G]))})}null!=G.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=G.noExitBtn);null!=G.title&&null!=this.buttonContainer&&(qa=document.createElement("span"),mxUtils.write(qa,G.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan), +this.buttonContainer.appendChild(qa),this.embedFilenameSpan=qa);try{G.libs&&this.sidebar.showEntries(G.libs)}catch(la){}G=null!=G.xmlpng?this.extractGraphModelFromPng(G.xmlpng):null!=G.descriptor?G.descriptor:G.xml}else{if("merge"==G.action){var ea=this.getCurrentFile();null!=ea&&(qa=T(G.xml),null!=qa&&""!=qa&&ea.mergeFile(new LocalFile(this,qa),function(){H.postMessage(JSON.stringify({event:"merge",message:G}),"*")},function(la){H.postMessage(JSON.stringify({event:"merge",message:G,error:la}),"*")}))}else"remoteInvokeReady"== +G.action?this.handleRemoteInvokeReady(H):"remoteInvoke"==G.action?this.handleRemoteInvoke(G,D.origin):"remoteInvokeResponse"==G.action?this.handleRemoteInvokeResponse(G):H.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(G)}),"*");return}}catch(la){this.handleError(la)}}var ra=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),ta=mxUtils.bind(this,function(la,pa){g=!0; +try{d(la,pa,null,Z)}catch(xa){this.handleError(xa)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");y=ra();x&&null==f&&(f=mxUtils.bind(this,function(xa,Ca){xa=ra();xa==y||g||(Ca=this.createLoadMessage("autosave"),Ca.xml=xa,(window.opener||window.parent).postMessage(JSON.stringify(Ca),"*"));y=xa}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged", +f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)pa=this.createLoadMessage("load"),pa.xml=la,H.postMessage(JSON.stringify(pa),"*");null!=W&&W()});null!=G&& +"function"===typeof G.substring&&"data:application/vnd.visio;base64,"==G.substring(0,34)?(T="0M8R4KGxGuE"==G.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(G.substring(G.indexOf(",")+1)),function(la){ta(la,D)},mxUtils.bind(this,function(la){this.handleError(la)}),T)):null!=G&&"function"===typeof G.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(G,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(G, +mxUtils.bind(this,function(la){4==la.readyState&&200<=la.status&&299>=la.status&&"<mxGraphModel"==la.responseText.substring(0,13)&&ta(la.responseText,D)}),""):null!=G&&"function"===typeof G.substring&&this.isLucidChartData(G)?this.convertLucidChart(G,mxUtils.bind(this,function(la){ta(la)}),mxUtils.bind(this,function(la){this.handleError(la)})):null==G||"object"!==typeof G||null==G.format||null==G.data&&null==G.url?(G=T(G),ta(G,D)):this.loadDescriptor(G,mxUtils.bind(this,function(la){ta(ra(),D)}), +mxUtils.bind(this,function(la){this.handleError(la,mxResources.get("errorLoadingFile"))}))}}));var H=window.opener||window.parent;u="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";H.postMessage(u,"*");if("json"==urlParams.proto){var J=this.editor.graph.openLink;this.editor.graph.openLink=function(D,G,W){J.apply(this,arguments);H.postMessage(JSON.stringify({event:"openLink",href:D,target:G,allowOpener:W}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!= +this.menubar&&"1"!=urlParams.embedInline){var d=document.createElement("div");d.style.display="inline-block";d.style.position="absolute";d.style.paddingTop="2px";d.style.paddingLeft="8px";d.style.paddingBottom="2px";d.style.marginRight="12px";d.style.right="atlas"==uiTheme||"1"==urlParams.atlas||"1"==urlParams["live-ui"]?"52px":"72px";var f=document.createElement("button");f.className="geBigButton";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var g="1"==urlParams.publishClose?mxResources.get("publish"): +mxResources.get("saveAndExit");mxUtils.write(f,g);f.setAttribute("title",g);mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));d.appendChild(f)}}else mxUtils.write(f,mxResources.get("save")),f.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),d.appendChild(f),"1"==urlParams.saveAndExit&&(f=document.createElement("a"),mxUtils.write(f, +mxResources.get("saveAndExit")),f.setAttribute("title",mxResources.get("saveAndExit")),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),d.appendChild(f));"1"!=urlParams.noExitBtn&&(f=document.createElement("a"),g="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(f,g),f.setAttribute("title",g),f.className="geBigButton geBigStandardButton", +f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),d.appendChild(f));this.toolbar.container.appendChild(d);this.toolbar.staticElements.push(d)}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(d){this.importCsv(d)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()? +null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(d){var f=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();d()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?f():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js", +function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",f)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",f))};EditorUi.prototype.importCsv=function(d,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,f)}))};EditorUi.prototype.doImportCsv=function(d,f){try{var g=d.split("\n"),x=[],y=[],u=[],H={};if(0<g.length){var J={},D=this.editor.graph,G=null,W=null, +T=null,Z=null,N=null,qa=null,oa=null,S="whiteSpace=wrap;html=1;",fa=null,ia=null,M="",aa="auto",X="auto",ja=!1,ca=null,ka=null,q=40,E=40,Q=100,Y=0,R=mxUtils.bind(this,function(){null!=f?f(ya):(D.setSelectionCells(ya),D.scrollCellToVisible(D.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),ba=D.getFreeInsertPoint(),ea=ba.x,ra=ba.y;ba=ra;var ta=null,la="auto";ia=null;for(var pa=[],xa=null,Ca=null,Ia=0;Ia<g.length&&"#"== +g[Ia].charAt(0);){d=g[Ia].replace(/\r$/,"");for(Ia++;Ia<g.length&&"\\"==d.charAt(d.length-1)&&"#"==g[Ia].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(g[Ia].substring(1)),Ia++;if("#"!=d.charAt(1)){var Aa=d.indexOf(":");if(0<Aa){var La=mxUtils.trim(d.substring(1,Aa)),Da=mxUtils.trim(d.substring(Aa+1));"label"==La?ta=D.sanitizeHtml(Da):"labelname"==La&&0<Da.length&&"-"!=Da?N=Da:"labels"==La&&0<Da.length&&"-"!=Da?oa=JSON.parse(Da):"style"==La?W=Da:"parentstyle"==La?S=Da:"unknownStyle"==La&&"-"!= +Da?qa=Da:"stylename"==La&&0<Da.length&&"-"!=Da?Z=Da:"styles"==La&&0<Da.length&&"-"!=Da?T=JSON.parse(Da):"vars"==La&&0<Da.length&&"-"!=Da?G=JSON.parse(Da):"identity"==La&&0<Da.length&&"-"!=Da?fa=Da:"parent"==La&&0<Da.length&&"-"!=Da?ia=Da:"namespace"==La&&0<Da.length&&"-"!=Da?M=Da:"width"==La?aa=Da:"height"==La?X=Da:"collapsed"==La&&"-"!=Da?ja="true"==Da:"left"==La&&0<Da.length?ca=Da:"top"==La&&0<Da.length?ka=Da:"ignore"==La?Ca=Da.split(","):"connect"==La?pa.push(JSON.parse(Da)):"link"==La?xa=Da:"padding"== +La?Y=parseFloat(Da):"edgespacing"==La?q=parseFloat(Da):"nodespacing"==La?E=parseFloat(Da):"levelspacing"==La?Q=parseFloat(Da):"layout"==La&&(la=Da)}}}if(null==g[Ia])throw Error(mxResources.get("invalidOrMissingFile"));var Sa=this.editor.csvToArray(g[Ia].replace(/\r$/,""));Aa=d=null;La=[];for(Da=0;Da<Sa.length;Da++)fa==Sa[Da]&&(d=Da),ia==Sa[Da]&&(Aa=Da),La.push(mxUtils.trim(Sa[Da]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ta&&(ta="%"+La[0]+"%");if(null!=pa)for(var Ra= +0;Ra<pa.length;Ra++)null==J[pa[Ra].to]&&(J[pa[Ra].to]={});fa=[];for(Da=Ia+1;Da<g.length;Da++){var Ta=this.editor.csvToArray(g[Da].replace(/\r$/,""));if(null==Ta){var Za=40<g[Da].length?g[Da].substring(0,40)+"...":g[Da];throw Error(Za+" ("+Da+"):\n"+mxResources.get("containsValidationErrors"));}0<Ta.length&&fa.push(Ta)}D.model.beginUpdate();try{for(Da=0;Da<fa.length;Da++){Ta=fa[Da];var Na=null,z=null!=d?M+Ta[d]:null;g=!1;null!=z&&(Na=D.model.getCell(z),g=null==Na||0<=mxUtils.indexOf(x,Na));var L=new mxCell(ta, +new mxGeometry(ea,ba,0,0),W||"whiteSpace=wrap;html=1;");L.collapsed=ja;L.vertex=!0;L.id=z;null==Na||g||D.model.setCollapsed(Na,ja);for(var O=0;O<Ta.length;O++)D.setAttributeForCell(L,La[O],Ta[O]),null==Na||g||D.setAttributeForCell(Na,La[O],Ta[O]);if(null!=N&&null!=oa){var V=oa[L.getAttribute(N)];null!=V&&(D.labelChanged(L,V),null==Na||g||D.cellLabelChanged(Na,V))}if(null!=Z&&null!=T){var U=T[L.getAttribute(Z)];null!=U&&(L.style=U)}D.setAttributeForCell(L,"placeholders","1");L.style=D.replacePlaceholders(L, +L.style,G);null==Na||g?D.fireEvent(new mxEventObject("cellsInserted","cells",[L])):(D.model.setStyle(Na,L.style),0>mxUtils.indexOf(u,Na)&&u.push(Na),D.fireEvent(new mxEventObject("cellsInserted","cells",[Na])));g=null!=Na;Na=L;if(!g)for(Ra=0;Ra<pa.length;Ra++)J[pa[Ra].to][Na.getAttribute(pa[Ra].to)]=Na;null!=xa&&"link"!=xa&&(D.setLinkForCell(Na,Na.getAttribute(xa)),D.setAttributeForCell(Na,xa,null));var ha=this.editor.graph.getPreferredSizeForCell(Na);ia=null!=Aa?D.model.getCell(M+Ta[Aa]):null;if(Na.vertex){Za= +null!=ia?0:ea;Ia=null!=ia?0:ra;null!=ca&&null!=Na.getAttribute(ca)&&(Na.geometry.x=Za+parseFloat(Na.getAttribute(ca)));null!=ka&&null!=Na.getAttribute(ka)&&(Na.geometry.y=Ia+parseFloat(Na.getAttribute(ka)));var ma="@"==aa.charAt(0)?Na.getAttribute(aa.substring(1)):null;Na.geometry.width=null!=ma&&"auto"!=ma?parseFloat(Na.getAttribute(aa.substring(1))):"auto"==aa||"auto"==ma?ha.width+Y:parseFloat(aa);var wa="@"==X.charAt(0)?Na.getAttribute(X.substring(1)):null;Na.geometry.height=null!=wa&&"auto"!= +wa?parseFloat(wa):"auto"==X||"auto"==wa?ha.height+Y:parseFloat(X);ba+=Na.geometry.height+E}g?(null==H[z]&&(H[z]=[]),H[z].push(Na)):(x.push(Na),null!=ia?(ia.style=D.replacePlaceholders(ia,S,G),D.addCell(Na,ia),y.push(ia)):u.push(D.addCell(Na)))}for(Da=0;Da<y.length;Da++)ma="@"==aa.charAt(0)?y[Da].getAttribute(aa.substring(1)):null,wa="@"==X.charAt(0)?y[Da].getAttribute(X.substring(1)):null,"auto"!=aa&&"auto"!=ma||"auto"!=X&&"auto"!=wa||D.updateGroupBounds([y[Da]],Y,!0);var sa=u.slice(),ya=u.slice(); +for(Ra=0;Ra<pa.length;Ra++){var Ha=pa[Ra];for(Da=0;Da<x.length;Da++){Na=x[Da];var Qa=mxUtils.bind(this,function(fb,pb,lb){var $a=pb.getAttribute(lb.from);if(null!=$a&&""!=$a){$a=$a.split(",");for(var ab=0;ab<$a.length;ab++){var ib=J[lb.to][$a[ab]];if(null==ib&&null!=qa){ib=new mxCell($a[ab],new mxGeometry(ea,ra,0,0),qa);ib.style=D.replacePlaceholders(pb,ib.style,G);var gb=this.editor.graph.getPreferredSizeForCell(ib);ib.geometry.width=gb.width+Y;ib.geometry.height=gb.height+Y;J[lb.to][$a[ab]]=ib; +ib.vertex=!0;ib.id=$a[ab];u.push(D.addCell(ib))}if(null!=ib){gb=lb.label;null!=lb.fromlabel&&(gb=(pb.getAttribute(lb.fromlabel)||"")+(gb||""));null!=lb.sourcelabel&&(gb=D.replacePlaceholders(pb,lb.sourcelabel,G)+(gb||""));null!=lb.tolabel&&(gb=(gb||"")+(ib.getAttribute(lb.tolabel)||""));null!=lb.targetlabel&&(gb=(gb||"")+D.replacePlaceholders(ib,lb.targetlabel,G));var qb="target"==lb.placeholders==!lb.invert?ib:fb;qb=null!=lb.style?D.replacePlaceholders(qb,lb.style,G):D.createCurrentEdgeStyle();gb= +D.insertEdge(null,null,gb||"",lb.invert?ib:fb,lb.invert?fb:ib,qb);if(null!=lb.labels)for(qb=0;qb<lb.labels.length;qb++){var nb=lb.labels[qb],mb=new mxCell(nb.label||qb,new mxGeometry(null!=nb.x?nb.x:0,null!=nb.y?nb.y:0,0,0),"resizable=0;html=1;");mb.vertex=!0;mb.connectable=!1;mb.geometry.relative=!0;null!=nb.placeholders&&(mb.value=D.replacePlaceholders("target"==nb.placeholders==!lb.invert?ib:fb,mb.value,G));if(null!=nb.dx||null!=nb.dy)mb.geometry.offset=new mxPoint(null!=nb.dx?nb.dx:0,null!=nb.dy? +nb.dy:0);gb.insert(mb)}ya.push(gb);mxUtils.remove(lb.invert?fb:ib,sa)}}}});Qa(Na,Na,Ha);if(null!=H[Na.id])for(O=0;O<H[Na.id].length;O++)Qa(Na,H[Na.id][O],Ha)}}if(null!=Ca)for(Da=0;Da<x.length;Da++)for(Na=x[Da],O=0;O<Ca.length;O++)D.setAttributeForCell(Na,mxUtils.trim(Ca[O]),null);if(0<u.length){var ua=new mxParallelEdgeLayout(D);ua.spacing=q;ua.checkOverlap=!0;var za=function(){0<ua.spacing&&ua.execute(D.getDefaultParent());for(var fb=0;fb<u.length;fb++){var pb=D.getCellGeometry(u[fb]);pb.x=Math.round(D.snap(pb.x)); +pb.y=Math.round(D.snap(pb.y));"auto"==aa&&(pb.width=Math.round(D.snap(pb.width)));"auto"==X&&(pb.height=Math.round(D.snap(pb.height)))}};if("["==la.charAt(0)){var Fa=R;D.view.validate();this.executeLayouts(D.createLayouts(JSON.parse(la)),function(){za();Fa()});R=null}else if("circle"==la){var Ba=new mxCircleLayout(D);Ba.disableEdgeStyle=!1;Ba.resetEdges=!1;var Ea=Ba.isVertexIgnored;Ba.isVertexIgnored=function(fb){return Ea.apply(this,arguments)||0>mxUtils.indexOf(u,fb)};this.executeLayout(function(){Ba.execute(D.getDefaultParent()); +za()},!0,R);R=null}else if("horizontaltree"==la||"verticaltree"==la||"auto"==la&&ya.length==2*u.length-1&&1==sa.length){D.view.validate();var Oa=new mxCompactTreeLayout(D,"horizontaltree"==la);Oa.levelDistance=E;Oa.edgeRouting=!1;Oa.resetEdges=!1;this.executeLayout(function(){Oa.execute(D.getDefaultParent(),0<sa.length?sa[0]:null)},!0,R);R=null}else if("horizontalflow"==la||"verticalflow"==la||"auto"==la&&1==sa.length){D.view.validate();var Pa=new mxHierarchicalLayout(D,"horizontalflow"==la?mxConstants.DIRECTION_WEST: +mxConstants.DIRECTION_NORTH);Pa.intraCellSpacing=E;Pa.parallelEdgeSpacing=q;Pa.interRankCellSpacing=Q;Pa.disableEdgeStyle=!1;this.executeLayout(function(){Pa.execute(D.getDefaultParent(),ya);D.moveCells(ya,ea,ra)},!0,R);R=null}else if("orgchart"==la){D.view.validate();var bb=new mxOrgChartLayout(D,2,Q,E),eb=bb.isVertexIgnored;bb.isVertexIgnored=function(fb){return eb.apply(this,arguments)||0>mxUtils.indexOf(u,fb)};this.executeLayout(function(){bb.execute(D.getDefaultParent());za()},!0,R);R=null}else if("organic"== +la||"auto"==la&&ya.length>u.length){D.view.validate();var db=new mxFastOrganicLayout(D);db.forceConstant=3*E;db.disableEdgeStyle=!1;db.resetEdges=!1;var ub=db.isVertexIgnored;db.isVertexIgnored=function(fb){return ub.apply(this,arguments)||0>mxUtils.indexOf(u,fb)};this.executeLayout(function(){db.execute(D.getDefaultParent());za()},!0,R);R=null}}this.hideDialog()}finally{D.model.endUpdate()}null!=R&&R()}}catch(fb){this.handleError(fb)}};EditorUi.prototype.getSearch=function(d){var f="";if("1"!=urlParams.offline&& +"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var g="?",x;for(x in urlParams)0>mxUtils.indexOf(d,x)&&null!=urlParams[x]&&(f+=g+x+"="+urlParams[x],g="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var f=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),x;for(x in urlParams)0>mxUtils.indexOf(g, +x)&&(d=0==f?d+"?":d+"&",null!=urlParams[x]&&(d+=x+"="+urlParams[x],f++))}return d};EditorUi.prototype.showLinkDialog=function(d,f,g,x,y){d=new LinkDialog(this,d,f,g,!0,x,y);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||f++;null!=this.gitHub&&f++;null!= +this.gitLab&&f++;d&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),f=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!g);this.actions.get("print").setEnabled(!g); +this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);this.actions.get("resetView").setEnabled(f); +this.actions.get("toggleDarkMode").setEnabled("atlas"!=uiTheme);this.actions.get("undo").setEnabled(this.canUndo()&&d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(d)); +this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var F=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=function(d){var f=F.apply(this,arguments); +this.addListener("darkModeChanged",mxUtils.bind(this,function(){f.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){f.refresh()}));return f};var K=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){K.apply(this,arguments);var d=this.editor.graph,f=this.getCurrentFile(),g=this.getSelectionState(),x=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(x);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional()); +this.actions.get("guides").setEnabled(x);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(x);this.actions.get("connectionArrows").setEnabled(x);this.actions.get("connectionPoints").setEnabled(x);this.actions.get("copyStyle").setEnabled(x&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(x&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(x);this.actions.get("createRevision").setEnabled(x); +this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(x&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility); +this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"");d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(x&&null!=d&&null!=d.shape&&null!=d.shape.stencil)}; +var P=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);P.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,f,g,x,y,u,H,J){var D=d.editor.graph;if("xml"==g)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==g)d.hideDialog(),d.saveData(f, +"svg",mxUtils.getXml(D.getSvg(x,y,u)),"image/svg+xml");else{var G=d.getFileData(!0,null,null,null,null,!0),W=D.getGraphBounds(),T=Math.floor(W.width*y/D.view.scale),Z=Math.floor(W.height*y/D.view.scale);if(G.length<=MAX_REQUEST_SIZE&&T*Z<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!d.isExportToCanvas()){var N={globalVars:D.getExportVariables()};J&&(N.grid={size:D.gridSize,steps:D.view.gridSteps,color:D.view.gridColor});d.saveRequest(f,g,function(qa,oa){return new mxXmlRequest(EXPORT_URL, +"format="+g+"&base64="+(oa||"0")+(null!=qa?"&filename="+encodeURIComponent(qa):"")+"&extras="+encodeURIComponent(JSON.stringify(N))+(0<H?"&dpi="+H:"")+"&bg="+(null!=x?x:"none")+"&w="+T+"&h="+Z+"&border="+u+"&xml="+encodeURIComponent(G))})}else"png"==g?d.exportImage(y,null==x||"none"==x,!0,!1,!1,u,!0,!1,null,J,H):d.exportImage(y,!1,!0,!1,!1,u,!0,!1,"jpeg",J);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1); +var d=this.editor.graph,f="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var x=d;this.currentPage!=this.pages[g]&&(x=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[g]),x.model.setRoot(this.pages[g].root));f+=this.pages[g].getName()+" "+x.getIndexableText()+" "}else f=d.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var f={},g=document.createElement("div");g.style.whiteSpace="nowrap";var x= +document.createElement("h3");mxUtils.write(x,mxUtils.htmlEntities(d));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(x);var y=document.createElement("div");y.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";y.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var u={};try{var H=mxSettings.getCustomLibraries();for(d=0;d<H.length;d++){var J=H[d];if("R"==J.substring(0,1)){var D=JSON.parse(decodeURIComponent(J.substring(1))); +u[D[0]]={id:D[0],title:D[1],downloadUrl:D[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){y.innerText="";if(0==G.length)y.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var W=0;W<G.length;W++){var T=G[W];u[T.id]&&(f[T.id]=T);var Z=this.addCheckbox(y,T.title,u[T.id]);(function(N,qa){mxEvent.addListener(qa,"change",function(){this.checked?f[N.id]=N:delete f[N.id]})})(T,Z)}}, +mxUtils.bind(this,function(G){y.innerText="";var W=document.createElement("div");W.style.padding="8px";W.style.textAlign="center";mxUtils.write(W,mxResources.get("error")+": ");mxUtils.write(W,null!=G&&null!=G.message?G.message:mxResources.get("unknownError"));y.appendChild(W)}));g.appendChild(y);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var G=0,W;for(W in f)null==u[W]&&(G++,mxUtils.bind(this,function(T){this.remoteInvoke("getFileContent", +[T.downloadUrl],null,mxUtils.bind(this,function(Z){G--;0==G&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,Z,T))}catch(N){this.handleError(N,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){G--;0==G&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[W]));for(W in u)f[W]||this.closeLibrary(new RemoteLibrary(this,null,u[W]));0==G&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud"); +this.showDialog(g.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin= +d;for(var f=0;f<this.remoteInvokeQueue.length;f++)d.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var f=d.msgMarkers,g=this.remoteInvokeCallbacks[f.callbackId];if(null==g)throw Error("No callback for "+(null!=f?f.callbackId:"null"));d.error?g.error&&g.error(d.error.errResp):g.callback&&g.callback.apply(this,d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,g,x,y){var u= +!0,H=window.setTimeout(mxUtils.bind(this,function(){u=!1;y({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),J=mxUtils.bind(this,function(){window.clearTimeout(H);u&&x.apply(this,arguments)}),D=mxUtils.bind(this,function(){window.clearTimeout(H);u&&y.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:J,error:D});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:g});null!=this.remoteWin? +this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var g=mxUtils.bind(this,function(G,W){var T={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=W?T.error={errResp:W}:null!=G&&(T.resp=G);this.remoteWin.postMessage(JSON.stringify(T),"*")});try{var x=d.funtionName,y=this.remoteInvokableFns[x];if(null!=y&&"function"===typeof this[x]){if(y.allowedDomains){for(var u=!1,H=0;H<y.allowedDomains.length;H++)if(f=="https://"+y.allowedDomains[H]){u= +!0;break}if(!u){g(null,"Invalid Call: "+x+" is not allowed.");return}}var J=d.functionArgs;Array.isArray(J)||(J=[]);if(y.isAsync)J.push(function(){g(Array.prototype.slice.apply(arguments))}),J.push(function(G){g(null,G||"Unkown Error")}),this[x].apply(this,J);else{var D=this[x].apply(this,J);g([D])}}else g(null,"Invalid Call: "+x+" is not found.")}catch(G){g(null,"Invalid Call: An error occurred, "+G.message)}};EditorUi.prototype.openDatabase=function(d,f){if(null==this.database){var g=window.indexedDB|| +window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var x=g.open("database",2);x.onupgradeneeded=function(y){try{var u=x.result;1>y.oldVersion&&u.createObjectStore("objects",{keyPath:"key"});2>y.oldVersion&&(u.createObjectStore("files",{keyPath:"title"}),u.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(H){null!=f&&f(H)}};x.onsuccess=mxUtils.bind(this,function(y){var u=x.result;this.database=u;EditorUi.migrateStorageFiles&&(StorageFile.migrate(u), +EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(H){if(!H||"1"==urlParams.forceMigration){var J=document.createElement("iframe");J.style.display="none";J.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(J);var D=!0,G=!1,W,T=0,Z=mxUtils.bind(this,function(){G=!0;this.setDatabaseItem(".drawioMigrated3", +!0);J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),N=mxUtils.bind(this,function(){T++;qa()}),qa=mxUtils.bind(this,function(){try{if(T>=W.length)Z();else{var S=W[T];StorageFile.getFileContent(this,S,mxUtils.bind(this,function(fa){null==fa||".scratchpad"==S&&fa==this.emptyLibraryXml?J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[S]}),"*"):N()}),N)}}catch(fa){console.log(fa)}}), +oa=mxUtils.bind(this,function(S){try{this.setDatabaseItem(null,[{title:S.title,size:S.data.length,lastModified:Date.now(),type:S.isLib?"L":"F"},{title:S.title,data:S.data}],N,N,["filesInfo","files"])}catch(fa){console.log(fa)}});H=mxUtils.bind(this,function(S){try{if(S.source==J.contentWindow){var fa={};try{fa=JSON.parse(S.data)}catch(ia){}"init"==fa.event?(J.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke", +funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=fa.event||G||(D?null!=fa.resp&&0<fa.resp.length&&null!=fa.resp[0]?(W=fa.resp[0],D=!1,qa()):Z():null!=fa.resp&&0<fa.resp.length&&null!=fa.resp[0]?oa(fa.resp[0]):N())}}catch(ia){console.log(ia)}});window.addEventListener("message",H)}})));d(u);u.onversionchange=function(){u.close()}});x.onerror=f;x.onblocked=function(){}}catch(y){null!=f&&f(y)}else null!=f&&f()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d, +f,g,x,y){this.openDatabase(mxUtils.bind(this,function(u){try{y=y||"objects";Array.isArray(y)||(y=[y],d=[d],f=[f]);var H=u.transaction(y,"readwrite");H.oncomplete=g;H.onerror=x;for(u=0;u<y.length;u++)H.objectStore(y[u]).put(null!=d&&null!=d[u]?{key:d[u],data:f[u]}:f[u])}catch(J){null!=x&&x(J)}}),x)};EditorUi.prototype.removeDatabaseItem=function(d,f,g,x){this.openDatabase(mxUtils.bind(this,function(y){x=x||"objects";Array.isArray(x)||(x=[x],d=[d]);y=y.transaction(x,"readwrite");y.oncomplete=f;y.onerror= +g;for(var u=0;u<x.length;u++)y.objectStore(x[u]).delete(d[u])}),g)};EditorUi.prototype.getDatabaseItem=function(d,f,g,x){this.openDatabase(mxUtils.bind(this,function(y){try{x=x||"objects";var u=y.transaction([x],"readonly").objectStore(x).get(d);u.onsuccess=function(){f(u.result)};u.onerror=g}catch(H){null!=g&&g(H)}}),g)};EditorUi.prototype.getDatabaseItems=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(x){try{g=g||"objects";var y=x.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)), +u=[];y.onsuccess=function(H){null==H.target.result?d(u):(u.push(H.target.result.value),H.target.result.continue())};y.onerror=f}catch(H){null!=f&&f(H)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(x){try{g=g||"objects";var y=x.transaction([g],"readonly").objectStore(g).getAllKeys();y.onsuccess=function(){d(y.result)};y.onerror=f}catch(u){null!=f&&f(u)}}),f)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!= +d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(d,f){var g=this.getCurrentFile();null!=g?g.getComments(d,f):d([])};EditorUi.prototype.addComment=function(d,f,g){var x=this.getCurrentFile();null!=x?x.addComment(d,f,g):f(Date.now())};EditorUi.prototype.canReplyToReplies= +function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,f){var g=this.getCurrentFile();return null!=g?g.newComment(d,f):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions= +function(d,f){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(d,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl= +function(d,f,g,x,y,u,H,J){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,x,y,u,H,J)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d, +f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,f,g,x,y,u,H,J,D,G,W,T,Z,N,qa,oa){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,g,x,y,u,H,J,D,G,W,T,Z,N,qa,oa)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()}; +EditorUi.prototype.convertImages=function(d,f,g,x){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,f,g,x)};EditorUi.prototype.convertImageToDataUri=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,f)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,f,g,x){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC"); +return Editor.updateCRC(d,f,g,x)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,f,g,x,y){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,f,g,x,y)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],f=0;f<localStorage.length;f++){var g= +localStorage.key(f),x=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<x.length){var y="<mxfile "===x.substring(0,8)||"<?xml"===x.substring(0,5)||"\x3c!--[if IE]>"===x.substring(0,12);x="<mxlibrary>"===x.substring(0,11);(y||x)&&d.push(g)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(d);return{title:d,data:f,isLib:"<mxlibrary>"=== +f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})(); +var CommentsWindow=function(b,e,k,m,C,p){function F(){for(var S=G.getElementsByTagName("div"),fa=0,ia=0;ia<S.length;ia++)"none"!=S[ia].style.display&&S[ia].parentNode==G&&fa++;W.style.display=0==fa?"block":"none"}function K(S,fa,ia,M){function aa(){fa.removeChild(ca);fa.removeChild(ka);ja.style.display="block";X.style.display="block"}H={div:fa,comment:S,saveCallback:ia,deleteOnCancel:M};var X=fa.querySelector(".geCommentTxt"),ja=fa.querySelector(".geCommentActionsList"),ca=document.createElement("textarea"); +ca.className="geCommentEditTxtArea";ca.style.minHeight=X.offsetHeight+"px";ca.value=S.content;fa.insertBefore(ca,X);var ka=document.createElement("div");ka.className="geCommentEditBtns";var q=mxUtils.button(mxResources.get("cancel"),function(){M?(fa.parentNode.removeChild(fa),F()):aa();H=null});q.className="geCommentEditBtn";ka.appendChild(q);var E=mxUtils.button(mxResources.get("save"),function(){X.innerText="";S.content=ca.value;mxUtils.write(X,S.content);aa();ia(S);H=null});mxEvent.addListener(ca, +"keydown",mxUtils.bind(this,function(Q){mxEvent.isConsumed(Q)||((mxEvent.isControlDown(Q)||mxClient.IS_MAC&&mxEvent.isMetaDown(Q))&&13==Q.keyCode?(E.click(),mxEvent.consume(Q)):27==Q.keyCode&&(q.click(),mxEvent.consume(Q)))}));E.focus();E.className="geCommentEditBtn gePrimaryBtn";ka.appendChild(E);fa.insertBefore(ka,X);ja.style.display="none";X.style.display="none";ca.focus()}function P(S,fa){fa.innerText="";S=new Date(S.modifiedDate);var ia=b.timeSince(S);null==ia&&(ia=mxResources.get("lessThanAMinute")); +mxUtils.write(fa,mxResources.get("timeAgo",[ia],"{1} ago"));fa.setAttribute("title",S.toLocaleDateString()+" "+S.toLocaleTimeString())}function d(S){var fa=document.createElement("img");fa.className="geCommentBusyImg";fa.src=IMAGE_PATH+"/spin.gif";S.appendChild(fa);S.busyImg=fa}function f(S){S.style.border="1px solid red";S.removeChild(S.busyImg)}function g(S){S.style.border="";S.removeChild(S.busyImg)}function x(S,fa,ia,M,aa){function X(R,ba,ea){var ra=document.createElement("li");ra.className="geCommentAction"; +var ta=document.createElement("a");ta.className="geCommentActionLnk";mxUtils.write(ta,R);ra.appendChild(ta);mxEvent.addListener(ta,"click",function(la){ba(la,S);la.preventDefault();mxEvent.consume(la)});Y.appendChild(ra);ea&&(ra.style.display="none")}function ja(){function R(ra){ba.push(ea);if(null!=ra.replies)for(var ta=0;ta<ra.replies.length;ta++)ea=ea.nextSibling,R(ra.replies[ta])}var ba=[],ea=ka;R(S);return{pdiv:ea,replies:ba}}function ca(R,ba,ea,ra,ta){function la(){d(Ia);S.addReply(Ca,function(Aa){Ca.id= +Aa;S.replies.push(Ca);g(Ia);ea&&ea()},function(Aa){pa();f(Ia);b.handleError(Aa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},ra,ta)}function pa(){K(Ca,Ia,function(Aa){la()},!0)}var xa=ja().pdiv,Ca=b.newComment(R,b.getCurrentUser());Ca.pCommentId=S.id;null==S.replies&&(S.replies=[]);var Ia=x(Ca,S.replies,xa,M+1);ba?pa():la()}if(aa||!S.isResolved){W.style.display="none";var ka=document.createElement("div");ka.className="geCommentContainer";ka.setAttribute("data-commentId", +S.id);ka.style.marginLeft=20*M+5+"px";S.isResolved&&!Editor.isDarkMode()&&(ka.style.backgroundColor="ghostWhite");var q=document.createElement("div");q.className="geCommentHeader";var E=document.createElement("img");E.className="geCommentUserImg";E.src=S.user.pictureUrl||Editor.userImage;q.appendChild(E);E=document.createElement("div");E.className="geCommentHeaderTxt";q.appendChild(E);var Q=document.createElement("div");Q.className="geCommentUsername";mxUtils.write(Q,S.user.displayName||"");E.appendChild(Q); +Q=document.createElement("div");Q.className="geCommentDate";Q.setAttribute("data-commentId",S.id);P(S,Q);E.appendChild(Q);ka.appendChild(q);q=document.createElement("div");q.className="geCommentTxt";mxUtils.write(q,S.content||"");ka.appendChild(q);S.isLocked&&(ka.style.opacity="0.5");q=document.createElement("div");q.className="geCommentActions";var Y=document.createElement("ul");Y.className="geCommentActionsList";q.appendChild(Y);y||S.isLocked||0!=M&&!u||X(mxResources.get("reply"),function(){ca("", +!0)},S.isResolved);E=b.getCurrentUser();null==E||E.id!=S.user.id||y||S.isLocked||(X(mxResources.get("edit"),function(){function R(){K(S,ka,function(){d(ka);S.editComment(S.content,function(){g(ka)},function(ba){f(ka);R();b.handleError(ba,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}R()},S.isResolved),X(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){d(ka);S.deleteComment(function(R){if(!0===R){R=ka.querySelector(".geCommentTxt"); +R.innerText="";mxUtils.write(R,mxResources.get("msgDeleted"));var ba=ka.querySelectorAll(".geCommentAction");for(R=0;R<ba.length;R++)ba[R].parentNode.removeChild(ba[R]);g(ka);ka.style.opacity="0.5"}else{ba=ja(S).replies;for(R=0;R<ba.length;R++)G.removeChild(ba[R]);for(R=0;R<fa.length;R++)if(fa[R]==S){fa.splice(R,1);break}W.style.display=0==G.getElementsByTagName("div").length?"block":"none"}},function(R){f(ka);b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}, +S.isResolved));y||S.isLocked||0!=M||X(S.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(R){function ba(){var ea=R.target;ea.innerText="";S.isResolved=!S.isResolved;mxUtils.write(ea,S.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var ra=S.isResolved?"none":"",ta=ja(S).replies,la=Editor.isDarkMode()?"transparent":S.isResolved?"ghostWhite":"white",pa=0;pa<ta.length;pa++){ta[pa].style.backgroundColor=la;for(var xa=ta[pa].querySelectorAll(".geCommentAction"), +Ca=0;Ca<xa.length;Ca++)xa[Ca]!=ea.parentNode&&(xa[Ca].style.display=ra);N||(ta[pa].style.display="none")}F()}S.isResolved?ca(mxResources.get("reOpened")+": ",!0,ba,!1,!0):ca(mxResources.get("markedAsResolved"),!1,ba,!0)});ka.appendChild(q);null!=ia?G.insertBefore(ka,ia.nextSibling):G.appendChild(ka);for(ia=0;null!=S.replies&&ia<S.replies.length;ia++)q=S.replies[ia],q.isResolved=S.isResolved,x(q,S.replies,null,M+1,aa);null!=H&&(H.comment.id==S.id?(aa=S.content,S.content=H.comment.content,K(S,ka,H.saveCallback, +H.deleteOnCancel),S.content=aa):null==H.comment.id&&H.comment.pCommentId==S.id&&(G.appendChild(H.div),K(H.comment,H.div,H.saveCallback,H.deleteOnCancel)));return ka}}var y=!b.canComment(),u=b.canReplyToReplies(),H=null,J=document.createElement("div");J.className="geCommentsWin";J.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var D=EditorUi.compactUi?"26px":"30px",G=document.createElement("div");G.className="geCommentsList";G.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor: +"whiteSmoke";G.style.bottom=parseInt(D)+7+"px";J.appendChild(G);var W=document.createElement("span");W.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(W,mxResources.get("noCommentsFound"));var T=document.createElement("div");T.className="geToolbarContainer geCommentsToolbar";T.style.height=D;T.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";T.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";D=document.createElement("a");D.className= +"geButton";if(!y){var Z=D.cloneNode();Z.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';Z.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(Z,"click",function(S){function fa(){K(ia,M,function(aa){d(M);b.addComment(aa,function(X){aa.id=X;qa.push(aa);g(M)},function(X){f(M);fa();b.handleError(X,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var ia=b.newComment("",b.getCurrentUser()),M=x(ia,qa,null,0);fa();S.preventDefault(); +mxEvent.consume(S)});T.appendChild(Z)}Z=D.cloneNode();Z.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';Z.setAttribute("title",mxResources.get("showResolved"));Z.className="geAdaptiveAsset";var N=!1;mxEvent.addListener(Z,"click",function(S){this.className=(N=!N)?"geButton geCheckedBtn":"geButton";oa();S.preventDefault();mxEvent.consume(S)});T.appendChild(Z);b.commentsRefreshNeeded()&&(Z=D.cloneNode(),Z.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">', +Z.setAttribute("title",mxResources.get("refresh")),Z.className="geAdaptiveAsset",mxEvent.addListener(Z,"click",function(S){oa();S.preventDefault();mxEvent.consume(S)}),T.appendChild(Z));b.commentsSaveNeeded()&&(D=D.cloneNode(),D.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',D.setAttribute("title",mxResources.get("save")),D.className="geAdaptiveAsset",mxEvent.addListener(D,"click",function(S){p();S.preventDefault();mxEvent.consume(S)}),T.appendChild(D));J.appendChild(T); +var qa=[],oa=mxUtils.bind(this,function(){this.hasError=!1;if(null!=H)try{H.div=H.div.cloneNode(!0);var S=H.div.querySelector(".geCommentEditTxtArea"),fa=H.div.querySelector(".geCommentEditBtns");H.comment.content=S.value;S.parentNode.removeChild(S);fa.parentNode.removeChild(fa)}catch(ia){b.handleError(ia)}G.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";u=b.canReplyToReplies(); +b.commentsSupported()?b.getComments(function(ia){function M(aa){if(null!=aa){aa.sort(function(ja,ca){return new Date(ja.modifiedDate)-new Date(ca.modifiedDate)});for(var X=0;X<aa.length;X++)M(aa[X].replies)}}ia.sort(function(aa,X){return new Date(aa.modifiedDate)-new Date(X.modifiedDate)});G.innerText="";G.appendChild(W);W.style.display="block";qa=ia;for(ia=0;ia<qa.length;ia++)M(qa[ia].replies),x(qa[ia],qa,null,0,N);null!=H&&null==H.comment.id&&null==H.comment.pCommentId&&(G.appendChild(H.div),K(H.comment, +H.div,H.saveCallback,H.deleteOnCancel))},mxUtils.bind(this,function(ia){G.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(ia&&ia.message?": "+ia.message:""));this.hasError=!0})):G.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});oa();this.refreshComments=oa;T=mxUtils.bind(this,function(){function S(X){var ja=ia[X.id];if(null!=ja)for(P(X,ja),ja=0;null!=X.replies&&ja<X.replies.length;ja++)S(X.replies[ja])}if(this.window.isVisible()){for(var fa=G.querySelectorAll(".geCommentDate"), +ia={},M=0;M<fa.length;M++){var aa=fa[M];ia[aa.getAttribute("data-commentId")]=aa}for(M=0;M<qa.length;M++)S(qa[M])}});setInterval(T,6E4);this.refreshCommentsTime=T;this.window=new mxWindow(mxResources.get("comments"),J,e,k,m,C,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()})); +b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,k,m,C,p,F,K,P,d,f){var g=document.createElement("div");g.style.textAlign="center";f=null!=f?f:44;var x=document.createElement("div");x.style.padding="6px";x.style.overflow="auto";x.style.maxHeight=f+"px";x.style.lineHeight="1.2em";mxUtils.write(x,e);g.appendChild(x);null!=d&&(x=document.createElement("div"),x.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",d),x.appendChild(e),g.appendChild(x));d=document.createElement("div"); +d.style.textAlign="center";d.style.whiteSpace="nowrap";var y=document.createElement("input");y.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=m&&m(y.checked)});p.className="geBtn";null!=K&&(p.innerHTML=K+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&d.appendChild(p);var u=mxUtils.button(C||mxResources.get("ok"),function(){b.hideDialog();null!=k&& +k(y.checked)});d.appendChild(u);null!=F?(u.innerHTML=F+"<br>"+u.innerHTML+"<br>",u.style.paddingBottom="8px",u.style.paddingTop="8px",u.style.height="auto",u.className="geBtn",u.style.width="40%"):u.className="geBtn gePrimaryBtn";b.editor.cancelFirst||d.appendChild(p);g.appendChild(d);P?(d.style.marginTop="10px",x=document.createElement("p"),x.style.marginTop="20px",x.style.marginBottom="0px",x.appendChild(y),C=document.createElement("span"),mxUtils.write(C," "+mxResources.get("rememberThisSetting")), +x.appendChild(C),g.appendChild(x),mxEvent.addListener(C,"click",function(H){y.checked=!y.checked;mxEvent.consume(H)})):d.style.marginTop="12px";this.init=function(){u.focus()};this.container=g};function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")}; DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,e,k){this.ui=b;this.page=e;this.previous=this.name=k}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))}; function MovePage(b,e,k){this.ui=b;this.oldIndex=e;this.newIndex=k}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))}; function SelectPage(b,e,k){this.ui=b;this.previousPage=this.page=e;this.neverShown=!0;null!=e&&(this.neverShown=null==e.viewState,this.ui.updatePageRoot(e),null!=k&&(e.viewState=k,this.neverShown=!1))} @@ -3853,14 +3859,14 @@ ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObje EditorUi.prototype.getPageIndex=function(b){var e=null;if(null!=this.pages&&null!=b)for(var k=0;k<this.pages.length;k++)if(this.pages[k]==b){e=k;break}return e};EditorUi.prototype.getPageById=function(b,e){e=null!=e?e:this.pages;if(null!=e)for(var k=0;k<e.length;k++)if(e[k].getId()==b)return e[k];return null}; EditorUi.prototype.createImageForPageLink=function(b,e,k){var m=b.indexOf(","),C=null;0<m&&(m=this.getPageById(b.substring(m+1)),null!=m&&m!=e&&(C=this.getImageForPage(m,e,k),C.originalSrc=b));null==C&&(C={originalSrc:b});return C}; EditorUi.prototype.getImageForPage=function(b,e,k){k=null!=k?k:this.editor.graph;var m=k.getGlobalVariable,C=this.createTemporaryGraph(k.getStylesheet());C.defaultPageBackgroundColor=k.defaultPageBackgroundColor;C.shapeBackgroundColor=k.shapeBackgroundColor;C.shapeForegroundColor=k.shapeForegroundColor;var p=this.getPageIndex(null!=e?e:this.currentPage);C.getGlobalVariable=function(K){return"pagenumber"==K?p+1:"page"==K&&null!=e?e.getName():m.apply(this,arguments)};document.body.appendChild(C.container); -this.updatePageRoot(b);C.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";k=C.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var E=C.getGraphBounds();document.body.removeChild(C.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(k)),E.width,E.height,E.x,E.y)}; +this.updatePageRoot(b);C.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";k=C.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var F=C.getGraphBounds();document.body.removeChild(C.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(k)),F.width,F.height,F.x,F.y)}; EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,e=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var C= this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";C!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(b.view,arguments)});var k=null,m=mxUtils.bind(this,function(){this.updateTabContainer();var C=this.currentPage;null!=C&&C!=k&&(null==C.viewState||null==C.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&& (b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+C.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+C.viewState.scrollTop),k=C);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"===typeof Editor.MathJaxClear||this.editor.graph.mathEnabled&&null!=this.editor||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(C, p){C=p.getProperty("edit").changes;for(p=0;p<C.length;p++)if(C[p]instanceof SelectPage||C[p]instanceof RenamePage||C[p]instanceof MovePage||C[p]instanceof mxRootChange){m();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}}; EditorUi.prototype.restoreViewState=function(b,e,k){b=null!=b?this.getPageById(b.getId()):null;var m=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,e):(m.setViewState(e),this.editor.updateGraphComponents(),m.view.revalidate(),m.sizeDidChange()),m.container.scrollLeft=m.view.translate.x*m.view.scale+e.scrollLeft,m.container.scrollTop=m.view.translate.y*m.view.scale+e.scrollTop,m.restoreSelection(k))}; -Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),k=parseFloat(b.getAttribute("pageScale")),m=parseFloat(b.getAttribute("pageWidth")),C=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),E=this.parseBackgroundImage(b.getAttribute("backgroundImage")),K=b.getAttribute("extFonts");if(K)try{K=K.split("|").map(function(Q){Q=Q.split("^");return{name:Q[0],url:Q[1]}})}catch(Q){console.log("ExtFonts format error: "+Q.message)}return{gridEnabled:"0"!=b.getAttribute("grid"), -gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=p&&0<p.length?p:null,backgroundImage:E,pageScale:isNaN(k)?mxGraph.prototype.pageScale:k,pageFormat:isNaN(m)||isNaN(C)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat: +Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),k=parseFloat(b.getAttribute("pageScale")),m=parseFloat(b.getAttribute("pageWidth")),C=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),F=this.parseBackgroundImage(b.getAttribute("backgroundImage")),K=b.getAttribute("extFonts");if(K)try{K=K.split("|").map(function(P){P=P.split("^");return{name:P[0],url:P[1]}})}catch(P){console.log("ExtFonts format error: "+P.message)}return{gridEnabled:"0"!=b.getAttribute("grid"), +gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=p&&0<p.length?p:null,backgroundImage:F,pageScale:isNaN(k)?mxGraph.prototype.pageScale:k,pageFormat:isNaN(m)||isNaN(C)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat: mxSettings.getPageFormat():new mxRectangle(0,0,m,C),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:K||[]}}; Graph.prototype.saveViewState=function(b,e,k,m){k||(e.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),e.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),e.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),e.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),e.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),e.setAttribute("connect",null==b||b.connect?"1":"0"),e.setAttribute("arrows",null==b||b.arrows?"1":"0"),e.setAttribute("fold", null==b||b.foldingEnabled?"1":"0"));e.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);k=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=k&&(e.setAttribute("pageWidth",k.width),e.setAttribute("pageHeight",k.height));null!=b&&(null!=b.background&&e.setAttribute("background",b.background),m=this.getBackgroundImageObject(b.backgroundImage,m),null!=m&&e.setAttribute("backgroundImage", @@ -3881,209 +3887,208 @@ EditorUi.prototype.selectNextPage=function(b){var e=this.currentPage;null!=e&&nu EditorUi.prototype.insertPage=function(b,e){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId()),e=null!=e?e:this.pages.length,e=new ChangePage(this,b,b,e),this.editor.graph.model.execute(e));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b}; EditorUi.prototype.createPage=function(b,e){e=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),e);e.setName(null!=b?b:this.createPageName());this.initDiagramNode(e);return e};EditorUi.prototype.createPageName=function(){for(var b={},e=0;e<this.pages.length;e++){var k=this.pages[e].getName();null!=k&&0<k.length&&(b[k]=k)}e=this.pages.length;do k=mxResources.get("pageWithNumber",[++e]);while(null!=b[k]);return k}; EditorUi.prototype.removePage=function(b){try{var e=this.editor.graph,k=mxUtils.indexOf(this.pages,b);if(e.isEnabled()&&0<=k){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e.model.beginUpdate();try{var m=this.currentPage;m==b&&1<this.pages.length?(k==this.pages.length-1?k--:k++,m=this.pages[k]):1>=this.pages.length&&(m=this.insertPage(),e.model.execute(new RenamePage(this,m,mxResources.get("pageWithNumber",[1]))));e.model.execute(new ChangePage(this,b,m))}finally{e.model.endUpdate()}}}catch(C){this.handleError(C)}return b}; -EditorUi.prototype.duplicatePage=function(b,e){var k=null;try{var m=this.editor.graph;if(m.isEnabled()){m.isEditing()&&m.stopEditing();var C=b.node.cloneNode(!1);C.removeAttribute("id");var p={},E=m.createCellLookup([m.model.root]);k=new DiagramPage(C);k.root=m.cloneCell(m.model.root,null,p);var K=new mxGraphModel;K.prefix=Editor.guid()+"-";K.setRoot(k.root);m.updateCustomLinks(m.createCellMapping(p,E),[k.root]);k.viewState=b==this.currentPage?m.getViewState():b.viewState;this.initDiagramNode(k); -k.viewState.scale=1;k.viewState.scrollLeft=null;k.viewState.scrollTop=null;k.viewState.currentRoot=null;k.viewState.defaultParent=null;k.setName(e);k=this.insertPage(k,mxUtils.indexOf(this.pages,b)+1)}}catch(Q){this.handleError(Q)}return k};EditorUi.prototype.initDiagramNode=function(b){var e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,e);mxUtils.setTextContent(b.node,Graph.compressNode(e))}; +EditorUi.prototype.duplicatePage=function(b,e){var k=null;try{var m=this.editor.graph;if(m.isEnabled()){m.isEditing()&&m.stopEditing();var C=b.node.cloneNode(!1);C.removeAttribute("id");var p={},F=m.createCellLookup([m.model.root]);k=new DiagramPage(C);k.root=m.cloneCell(m.model.root,null,p);var K=new mxGraphModel;K.prefix=Editor.guid()+"-";K.setRoot(k.root);m.updateCustomLinks(m.createCellMapping(p,F),[k.root]);k.viewState=b==this.currentPage?m.getViewState():b.viewState;this.initDiagramNode(k); +k.viewState.scale=1;k.viewState.scrollLeft=null;k.viewState.scrollTop=null;k.viewState.currentRoot=null;k.viewState.defaultParent=null;k.setName(e);k=this.insertPage(k,mxUtils.indexOf(this.pages,b)+1)}}catch(P){this.handleError(P)}return k};EditorUi.prototype.initDiagramNode=function(b){var e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,e);mxUtils.setTextContent(b.node,Graph.compressNode(e))}; EditorUi.prototype.clonePages=function(b){for(var e=[],k=0;k<b.length;k++)e.push(this.clonePage(b[k]));return e};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var e=new DiagramPage(b.node.cloneNode(!0)),k=b==this.currentPage?this.editor.graph.getViewState():b.viewState;e.viewState=mxUtils.clone(k,EditorUi.transientViewStateProperties);e.root=this.editor.graph.model.cloneCell(b.root,null,!0);return e}; EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(k){null!=k&&0<k.length&&this.editor.graph.model.execute(new RenamePage(this,b,k))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return b};EditorUi.prototype.movePage=function(b,e){this.editor.graph.model.execute(new MovePage(this,b,e))}; EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer";b.style.position="absolute";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.height="0px";return b}; EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,e=document.createElement("div");e.style.position="relative";e.style.display="inline-block";e.style.verticalAlign="top";e.style.height=this.tabContainer.style.height;e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.fontSize="13px";e.style.marginLeft="30px";for(var k=this.editor.isChromelessView()?29:59,m=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-k)/this.pages.length)+ 1),C=null,p=0;p<this.pages.length;p++)mxUtils.bind(this,function(d,f){this.pages[d]==this.currentPage?(f.className="geActivePage",f.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):f.className="geInactivePage";f.setAttribute("draggable","true");mxEvent.addListener(f,"dragstart",mxUtils.bind(this,function(g){b.isEnabled()?(mxClient.IS_FF&&g.dataTransfer.setData("Text","<diagram/>"),C=d):mxEvent.consume(g)}));mxEvent.addListener(f,"dragend",mxUtils.bind(this,function(g){C=null;g.stopPropagation(); g.preventDefault()}));mxEvent.addListener(f,"dragover",mxUtils.bind(this,function(g){null!=C&&(g.dataTransfer.dropEffect="move");g.stopPropagation();g.preventDefault()}));mxEvent.addListener(f,"drop",mxUtils.bind(this,function(g){null!=C&&d!=C&&this.movePage(C,d);g.stopPropagation();g.preventDefault()}));e.appendChild(f)})(p,this.createTabForPage(this.pages[p],m,this.pages[p]!=this.currentPage,p+1));this.tabContainer.innerText="";this.tabContainer.appendChild(e);m=this.createPageMenuTab();this.tabContainer.appendChild(m); -m=null;this.isPageInsertTabVisible()&&(m=this.createPageInsertTab(),this.tabContainer.appendChild(m));if(e.clientWidth>this.tabContainer.clientWidth-k){null!=m&&(m.style.position="absolute",m.style.right="0px",e.style.marginRight="30px");var E=this.createControlTab(4," ❮ ");E.style.position="absolute";E.style.right=this.editor.chromeless?"29px":"55px";E.style.fontSize="13pt";this.tabContainer.appendChild(E);var K=this.createControlTab(4," ❯");K.style.position="absolute"; -K.style.right=this.editor.chromeless?"0px":"29px";K.style.fontSize="13pt";this.tabContainer.appendChild(K);var Q=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=Q+"px";mxEvent.addListener(E,"click",mxUtils.bind(this,function(d){e.scrollLeft-=Math.max(20,Q-20);mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(K,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}));mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(K, -e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(K,"click",mxUtils.bind(this,function(d){e.scrollLeft+=Math.max(20,Q-20);mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(K,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()}; +m=null;this.isPageInsertTabVisible()&&(m=this.createPageInsertTab(),this.tabContainer.appendChild(m));if(e.clientWidth>this.tabContainer.clientWidth-k){null!=m&&(m.style.position="absolute",m.style.right="0px",e.style.marginRight="30px");var F=this.createControlTab(4," ❮ ");F.style.position="absolute";F.style.right=this.editor.chromeless?"29px":"55px";F.style.fontSize="13pt";this.tabContainer.appendChild(F);var K=this.createControlTab(4," ❯");K.style.position="absolute"; +K.style.right=this.editor.chromeless?"0px":"29px";K.style.fontSize="13pt";this.tabContainer.appendChild(K);var P=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=P+"px";mxEvent.addListener(F,"click",mxUtils.bind(this,function(d){e.scrollLeft-=Math.max(20,P-20);mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(K,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}));mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(K, +e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(K,"click",mxUtils.bind(this,function(d){e.scrollLeft+=Math.max(20,P-20);mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(K,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()}; EditorUi.prototype.createTab=function(b){var e=document.createElement("div");e.style.display="inline-block";e.style.whiteSpace="nowrap";e.style.boxSizing="border-box";e.style.position="relative";e.style.overflow="hidden";e.style.textAlign="center";e.style.marginLeft="-1px";e.style.height=this.tabContainer.clientHeight+"px";e.style.padding="12px 4px 8px 4px";e.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";e.style.borderTopStyle="none";e.style.borderBottomStyle="none";e.style.backgroundColor= this.tabContainer.style.backgroundColor;e.style.cursor="move";e.style.color="gray";b&&(mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(k){this.editor.graph.isMouseDown||(e.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(k))})),mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(k){e.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(k)})));return e}; EditorUi.prototype.createControlTab=function(b,e,k){k=this.createTab(null!=k?k:!0);k.style.lineHeight=this.tabContainerHeight+"px";k.style.paddingTop=b+"px";k.style.cursor="pointer";k.style.width="30px";k.innerHTML=e;null!=k.firstChild&&null!=k.firstChild.style&&mxUtils.setOpacity(k.firstChild,40);return k};EditorUi.prototype.getShortPageName=function(b){b=b.getName();36<b.length&&(b=b.substring(0,34)+"...");return b}; EditorUi.prototype.createPageMenuTab=function(b,e){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var k=b.getElementsByTagName("div")[0];k.style.display="inline-block";k.style.marginTop="5px";k.style.width="21px";k.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(m){this.editor.graph.popupMenuHandler.hideMenu(); -var C=new mxPopupMenu(mxUtils.bind(this,function(K,Q){var d=mxUtils.bind(this,function(){for(var z=0;z<this.pages.length;z++)mxUtils.bind(this,function(u){var H=K.addItem(this.getShortPageName(this.pages[u]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[u])}),Q),J=this.pages[u].getId();H.setAttribute("title",this.pages[u].getName()+" ("+(u+1)+"/"+this.pages.length+")"+(null!=J?" ["+J+"]":""));this.pages[u]==this.currentPage&&K.addCheckmark(H,Editor.checkmarkImage)})(z)}),f=mxUtils.bind(this, -function(){K.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),Q)});e||d();if(this.editor.graph.isEnabled()){e||(K.addSeparator(Q),f());var g=this.currentPage;if(null!=g){K.addSeparator(Q);var x=this.getShortPageName(g);K.addItem(mxResources.get("removeIt",[x]),null,mxUtils.bind(this,function(){this.removePage(g)}),Q);K.addItem(mxResources.get("renameIt",[x]),null,mxUtils.bind(this,function(){this.renamePage(g,g.getName())}),Q);e||K.addSeparator(Q);K.addItem(mxResources.get("duplicateIt", -[x]),null,mxUtils.bind(this,function(){this.duplicatePage(g,mxResources.get("copyOf",[g.getName()]))}),Q)}}e&&(K.addSeparator(Q),f(),K.addSeparator(Q),d())}));C.div.className+=" geMenubarMenu";C.smartSeparators=!0;C.showDisabled=!0;C.autoExpand=!0;C.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(C,arguments);C.destroy()});var p=mxEvent.getClientX(m),E=mxEvent.getClientY(m);C.popup(p,E,null,m);this.setCurrentMenu(C);mxEvent.consume(m)}));return b}; +var C=new mxPopupMenu(mxUtils.bind(this,function(K,P){var d=mxUtils.bind(this,function(){for(var y=0;y<this.pages.length;y++)mxUtils.bind(this,function(u){var H=K.addItem(this.getShortPageName(this.pages[u]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[u])}),P),J=this.pages[u].getId();H.setAttribute("title",this.pages[u].getName()+" ("+(u+1)+"/"+this.pages.length+")"+(null!=J?" ["+J+"]":""));this.pages[u]==this.currentPage&&K.addCheckmark(H,Editor.checkmarkImage)})(y)}),f=mxUtils.bind(this, +function(){K.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),P)});e||d();if(this.editor.graph.isEnabled()){e||(K.addSeparator(P),f());var g=this.currentPage;if(null!=g){K.addSeparator(P);var x=this.getShortPageName(g);K.addItem(mxResources.get("removeIt",[x]),null,mxUtils.bind(this,function(){this.removePage(g)}),P);K.addItem(mxResources.get("renameIt",[x]),null,mxUtils.bind(this,function(){this.renamePage(g,g.getName())}),P);e||K.addSeparator(P);K.addItem(mxResources.get("duplicateIt", +[x]),null,mxUtils.bind(this,function(){this.duplicatePage(g,mxResources.get("copyOf",[g.getName()]))}),P)}}e&&(K.addSeparator(P),f(),K.addSeparator(P),d())}));C.div.className+=" geMenubarMenu";C.smartSeparators=!0;C.showDisabled=!0;C.autoExpand=!0;C.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(C,arguments);C.destroy()});var p=mxEvent.getClientX(m),F=mxEvent.getClientY(m);C.popup(p,F,null,m);this.setCurrentMenu(C);mxEvent.consume(m)}));return b}; EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(k){this.insertPage();mxEvent.consume(k)}));var e=b.getElementsByTagName("div")[0];e.style.display="inline-block";e.style.width="21px";e.style.height="21px";return b}; EditorUi.prototype.createTabForPage=function(b,e,k,m){k=this.createTab(k);var C=b.getName()||mxResources.get("untitled"),p=b.getId();k.setAttribute("title",C+(null!=p?" ("+p+")":"")+" ["+m+"]");mxUtils.write(k,C);k.style.maxWidth=e+"px";k.style.width=e+"px";this.addTabListeners(b,k);42<e&&(k.style.textOverflow="ellipsis");return k}; EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var k=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(p){this.renamePage(b);mxEvent.consume(p)}));var m=!1,C=!1;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(p){m=null!=this.currentMenu;C=b==this.currentPage;k.isMouseDown||C||this.selectPage(b)}),null,mxUtils.bind(this,function(p){if(k.isEnabled()&&!k.isMouseDown&&(mxEvent.isTouchEvent(p)&&C||mxEvent.isPopupTrigger(p))){k.popupMenuHandler.hideMenu(); -this.hideCurrentMenu();if(!mxEvent.isTouchEvent(p)||!m){var E=new mxPopupMenu(this.createPageMenu(b));E.div.className+=" geMenubarMenu";E.smartSeparators=!0;E.showDisabled=!0;E.autoExpand=!0;E.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(E,arguments);this.resetCurrentMenu();E.destroy()});var K=mxEvent.getClientX(p),Q=mxEvent.getClientY(p);E.popup(K,Q,null,p);this.setCurrentMenu(E,e)}mxEvent.consume(p)}}))}; +this.hideCurrentMenu();if(!mxEvent.isTouchEvent(p)||!m){var F=new mxPopupMenu(this.createPageMenu(b));F.div.className+=" geMenubarMenu";F.smartSeparators=!0;F.showDisabled=!0;F.autoExpand=!0;F.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(F,arguments);this.resetCurrentMenu();F.destroy()});var K=mxEvent.getClientX(p),P=mxEvent.getClientY(p);F.popup(K,P,null,p);this.setCurrentMenu(F,e)}mxEvent.consume(p)}}))}; EditorUi.prototype.getLinkForPage=function(b,e,k){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var m=this.getCurrentFile();if(null!=m&&m.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var C=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));C+=(0==C.length?"?":"&")+"page-id="+b.getId();null!=e&&(C+="&"+e.join("&"));return(k&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)? EditorUi.drawHost:"https://"+window.location.host)+"/"+C+"#"+m.getHash()}}return null}; EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(k,m){var C=this.editor.graph;k.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),m);k.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),m);k.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,e)}),m);null!=this.getLinkForPage(b)&&(k.addSeparator(m),k.addItem(mxResources.get("link"), -null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(p,E,K,Q,d,f){p=this.createUrlParameters(p,E,K,Q,d,f);K||p.push("hide-pages=1");C.isSelectionEmpty()||(K=C.getBoundingBox(C.getSelectionCells()),E=C.view.translate,d=C.view.scale,K.width/=d,K.height/=d,K.x=K.x/d-E.x,K.y=K.y/d-E.y,p.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(K.x),y:Math.round(K.y),width:Math.round(K.width),height:Math.round(K.height),border:100})))); -Q=new EmbedDialog(this,this.getLinkForPage(b,p,Q));this.showDialog(Q.container,450,240,!0,!0);Q.init()}))})));k.addSeparator(m);k.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),m);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(k.addSeparator(m),k.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null, +null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(p,F,K,P,d,f){p=this.createUrlParameters(p,F,K,P,d,f);K||p.push("hide-pages=1");C.isSelectionEmpty()||(K=C.getBoundingBox(C.getSelectionCells()),F=C.view.translate,d=C.view.scale,K.width/=d,K.height/=d,K.x=K.x/d-F.x,K.y=K.y/d-F.y,p.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(K.x),y:Math.round(K.y),width:Math.round(K.width),height:Math.round(K.height),border:100})))); +P=new EmbedDialog(this,this.getLinkForPage(b,p,P));this.showDialog(P.container,450,240,!0,!0);P.init()}))})));k.addSeparator(m);k.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),m);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(k.addSeparator(m),k.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null, !0,!0))}),m))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};b.afterDecode=function(e,k,m){e=m.oldIndex;m.oldIndex=m.newIndex;m.newIndex=e;return m};mxCodecRegistry.register(b)})(); (function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};b.afterDecode=function(e,k,m){e=m.previous;m.previous=m.name;m.name=e;return m};mxCodecRegistry.register(b)})(); (function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(e,k,m){m.setAttribute("relatedPage",k.relatedPage.getId());null==k.index&&(m.setAttribute("name",k.relatedPage.getName()),null!=k.relatedPage.viewState&&m.setAttribute("viewState",JSON.stringify(k.relatedPage.viewState,function(C,p){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,C)?p:void 0})),null!=k.relatedPage.root&&e.encodeCell(k.relatedPage.root, m));return m};b.beforeDecode=function(e,k,m){m.ui=e.ui;m.relatedPage=m.ui.getPageById(k.getAttribute("relatedPage"));if(null==m.relatedPage){var C=k.ownerDocument.createElement("diagram");C.setAttribute("id",k.getAttribute("relatedPage"));C.setAttribute("name",k.getAttribute("name"));m.relatedPage=new DiagramPage(C);C=k.getAttribute("viewState");null!=C&&(m.relatedPage.viewState=JSON.parse(C),k.removeAttribute("viewState"));k=k.cloneNode(!0);C=k.firstChild;if(null!=C)for(m.relatedPage.root=e.decodeCell(C, -!1),m=C.nextSibling,C.parentNode.removeChild(C),C=m;null!=C;){m=C.nextSibling;if(C.nodeType==mxConstants.NODETYPE_ELEMENT){var p=C.getAttribute("id");null==e.lookup(p)&&e.decodeCell(C)}C.parentNode.removeChild(C);C=m}}return k};b.afterDecode=function(e,k,m){m.index=m.previousIndex;return m};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(m,C,p,E,K){C=null!=C?C:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),m));this.stopEditing();this.model.beginUpdate();try{for(var Q=p.slice(),d=0;d<p.length;d++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[d]),"treeFolding","0")&&this.foldTreeCell(m,p[d]);p=Q;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell= -function(m,C){this.model.beginUpdate();try{var p=[];this.traverse(C,!0,mxUtils.bind(this,function(K,Q){var d=null!=Q&&this.isTreeEdge(Q);d&&p.push(Q);K==C||null!=Q&&!d||p.push(K);return(null==Q||d)&&(K==C||!this.model.isCollapsed(K))}));this.model.setCollapsed(C,m);for(var E=0;E<p.length;E++)this.model.setVisible(p[E],!m)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(m){return!this.isEdgeIgnored(m)};Graph.prototype.getTreeEdges=function(m,C,p,E,K,Q){return this.model.filterCells(this.getEdges(m, -C,p,E,K,Q),mxUtils.bind(this,function(d){return this.isTreeEdge(d)}))};Graph.prototype.getIncomingTreeEdges=function(m,C){return this.getTreeEdges(m,C,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(m,C){return this.getTreeEdges(m,C,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function m(L){return H.isVertex(L)&&p(L)}function C(L){var Z= -!1;null!=L&&(Z="1"==u.getCurrentCellStyle(L).treeMoving);return Z}function p(L){var Z=!1;null!=L&&(L=H.getParent(L),Z=u.view.getState(L),Z="tree"==(null!=Z?Z.style:u.getCellStyle(L)).containerType);return Z}function E(L){var Z=!1;null!=L&&(L=H.getParent(L),Z=u.view.getState(L),u.view.getState(L),Z=null!=(null!=Z?Z.style:u.getCellStyle(L)).childLayout);return Z}function K(L){L=u.view.getState(L);if(null!=L){var Z=u.getIncomingTreeEdges(L.cell);if(0<Z.length&&(Z=u.view.getState(Z[0]),null!=Z&&(Z=Z.absolutePoints, -null!=Z&&0<Z.length&&(Z=Z[Z.length-1],null!=Z)))){if(Z.y==L.y&&Math.abs(Z.x-L.getCenterX())<L.width/2)return mxConstants.DIRECTION_SOUTH;if(Z.y==L.y+L.height&&Math.abs(Z.x-L.getCenterX())<L.width/2)return mxConstants.DIRECTION_NORTH;if(Z.x>L.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function Q(L,Z){Z=null!=Z?Z:!0;u.model.beginUpdate();try{var P=u.model.getParent(L),ca=u.getIncomingTreeEdges(L),ja=u.cloneCells([ca[0],L]);u.model.setTerminal(ja[0],u.model.getTerminal(ca[0], -!0),!0);var ka=K(L),q=P.geometry;ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH?ja[1].geometry.x+=Z?L.geometry.width+10:-ja[1].geometry.width-10:ja[1].geometry.y+=Z?L.geometry.height+10:-ja[1].geometry.height-10;u.view.currentRoot!=P&&(ja[1].geometry.x-=q.x,ja[1].geometry.y-=q.y);var F=u.view.getState(L),R=u.view.scale;if(null!=F){var W=mxRectangle.fromRectangle(F);ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH?W.x+=(Z?L.geometry.width+10:-ja[1].geometry.width- -10)*R:W.y+=(Z?L.geometry.height+10:-ja[1].geometry.height-10)*R;var T=u.getOutgoingTreeEdges(u.model.getTerminal(ca[0],!0));if(null!=T){for(var ba=ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH,ha=q=ca=0;ha<T.length;ha++){var ra=u.model.getTerminal(T[ha],!1);if(ka==K(ra)){var ta=u.view.getState(ra);ra!=L&&null!=ta&&(ba&&Z!=ta.getCenterX()<F.getCenterX()||!ba&&Z!=ta.getCenterY()<F.getCenterY())&&mxUtils.intersects(W,ta)&&(ca=10+Math.max(ca,(Math.min(W.x+W.width,ta.x+ta.width)-Math.max(W.x, -ta.x))/R),q=10+Math.max(q,(Math.min(W.y+W.height,ta.y+ta.height)-Math.max(W.y,ta.y))/R))}}ba?q=0:ca=0;for(ha=0;ha<T.length;ha++)if(ra=u.model.getTerminal(T[ha],!1),ka==K(ra)&&(ta=u.view.getState(ra),ra!=L&&null!=ta&&(ba&&Z!=ta.getCenterX()<F.getCenterX()||!ba&&Z!=ta.getCenterY()<F.getCenterY()))){var ma=[];u.traverse(ta.cell,!0,function(pa,za){var Ba=null!=za&&u.isTreeEdge(za);Ba&&ma.push(za);(null==za||Ba)&&ma.push(pa);return null==za||Ba});u.moveCells(ma,(Z?1:-1)*ca,(Z?1:-1)*q)}}}return u.addCells(ja, -P)}finally{u.model.endUpdate()}}function d(L){u.model.beginUpdate();try{var Z=K(L),P=u.getIncomingTreeEdges(L),ca=u.cloneCells([P[0],L]);u.model.setTerminal(P[0],ca[1],!1);u.model.setTerminal(ca[0],ca[1],!0);u.model.setTerminal(ca[0],L,!1);var ja=u.model.getParent(L),ka=ja.geometry,q=[];u.view.currentRoot!=ja&&(ca[1].geometry.x-=ka.x,ca[1].geometry.y-=ka.y);u.traverse(L,!0,function(W,T){var ba=null!=T&&u.isTreeEdge(T);ba&&q.push(T);(null==T||ba)&&q.push(W);return null==T||ba});var F=L.geometry.width+ -40,R=L.geometry.height+40;Z==mxConstants.DIRECTION_SOUTH?F=0:Z==mxConstants.DIRECTION_NORTH?(F=0,R=-R):Z==mxConstants.DIRECTION_WEST?(F=-F,R=0):Z==mxConstants.DIRECTION_EAST&&(R=0);u.moveCells(q,F,R);return u.addCells(ca,ja)}finally{u.model.endUpdate()}}function f(L,Z){u.model.beginUpdate();try{var P=u.model.getParent(L),ca=u.getIncomingTreeEdges(L),ja=K(L);0==ca.length&&(ca=[u.createEdge(P,null,"",null,null,u.createCurrentEdgeStyle())],ja=Z);var ka=u.cloneCells([ca[0],L]);u.model.setTerminal(ka[0], -L,!0);if(null==u.model.getTerminal(ka[0],!1)){u.model.setTerminal(ka[0],ka[1],!1);var q=u.getCellStyle(ka[1]).newEdgeStyle;if(null!=q)try{var F=JSON.parse(q),R;for(R in F)u.setCellStyles(R,F[R],[ka[0]]),"edgeStyle"==R&&"elbowEdgeStyle"==F[R]&&u.setCellStyles("elbow",ja==mxConstants.DIRECTION_SOUTH||ja==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[ka[0]])}catch(ta){}}ca=u.getOutgoingTreeEdges(L);var W=P.geometry;Z=[];u.view.currentRoot==P&&(W=new mxRectangle);for(q=0;q<ca.length;q++){var T= -u.model.getTerminal(ca[q],!1);null!=T&&Z.push(T)}var ba=u.view.getBounds(Z),ha=u.view.translate,ra=u.view.scale;ja==mxConstants.DIRECTION_SOUTH?(ka[1].geometry.x=null==ba?L.geometry.x+(L.geometry.width-ka[1].geometry.width)/2:(ba.x+ba.width)/ra-ha.x-W.x+10,ka[1].geometry.y+=ka[1].geometry.height-W.y+40):ja==mxConstants.DIRECTION_NORTH?(ka[1].geometry.x=null==ba?L.geometry.x+(L.geometry.width-ka[1].geometry.width)/2:(ba.x+ba.width)/ra-ha.x+-W.x+10,ka[1].geometry.y-=ka[1].geometry.height+W.y+40):(ka[1].geometry.x= -ja==mxConstants.DIRECTION_WEST?ka[1].geometry.x-(ka[1].geometry.width+W.x+40):ka[1].geometry.x+(ka[1].geometry.width-W.x+40),ka[1].geometry.y=null==ba?L.geometry.y+(L.geometry.height-ka[1].geometry.height)/2:(ba.y+ba.height)/ra-ha.y+-W.y+10);return u.addCells(ka,P)}finally{u.model.endUpdate()}}function g(L,Z,P){L=u.getOutgoingTreeEdges(L);P=u.view.getState(P);var ca=[];if(null!=P&&null!=L){for(var ja=0;ja<L.length;ja++){var ka=u.view.getState(u.model.getTerminal(L[ja],!1));null!=ka&&(!Z&&Math.min(ka.x+ -ka.width,P.x+P.width)>=Math.max(ka.x,P.x)||Z&&Math.min(ka.y+ka.height,P.y+P.height)>=Math.max(ka.y,P.y))&&ca.push(ka)}ca.sort(function(q,F){return Z?q.x+q.width-F.x-F.width:q.y+q.height-F.y-F.height})}return ca}function x(L,Z){var P=K(L),ca=Z==mxConstants.DIRECTION_EAST||Z==mxConstants.DIRECTION_WEST;(P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST)==ca&&P!=Z?z.actions.get("selectParent").funct():P==Z?(Z=u.getOutgoingTreeEdges(L),null!=Z&&0<Z.length&&u.setSelectionCell(u.model.getTerminal(Z[0], -!1))):(P=u.getIncomingTreeEdges(L),null!=P&&0<P.length&&(ca=g(u.model.getTerminal(P[0],!0),ca,L),L=u.view.getState(L),null!=L&&(L=mxUtils.indexOf(ca,L),0<=L&&(L+=Z==mxConstants.DIRECTION_NORTH||Z==mxConstants.DIRECTION_WEST?-1:1,0<=L&&L<=ca.length-1&&u.setSelectionCell(ca[L].cell)))))}var z=this,u=z.editor.graph,H=u.getModel(),J=z.menus.createPopupMenu;z.menus.createPopupMenu=function(L,Z,P){J.apply(this,arguments);if(1==u.getSelectionCount()){Z=u.getSelectionCell();var ca=u.getOutgoingTreeEdges(Z); -L.addSeparator();0<ca.length&&(m(u.getSelectionCell())&&this.addMenuItems(L,["selectChildren"],null,P),this.addMenuItems(L,["selectDescendants"],null,P));m(u.getSelectionCell())?(L.addSeparator(),0<u.getIncomingTreeEdges(Z).length&&this.addMenuItems(L,["selectSiblings","selectParent"],null,P)):0<u.model.getEdgeCount(Z)&&this.addMenuItems(L,["selectConnections"],null,P)}};z.actions.addAction("selectChildren",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var L=u.getSelectionCell();L=u.getOutgoingTreeEdges(L); -if(null!=L){for(var Z=[],P=0;P<L.length;P++)Z.push(u.model.getTerminal(L[P],!1));u.setSelectionCells(Z)}}},null,null,"Alt+Shift+X");z.actions.addAction("selectSiblings",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var L=u.getSelectionCell();L=u.getIncomingTreeEdges(L);if(null!=L&&0<L.length&&(L=u.getOutgoingTreeEdges(u.model.getTerminal(L[0],!0)),null!=L)){for(var Z=[],P=0;P<L.length;P++)Z.push(u.model.getTerminal(L[P],!1));u.setSelectionCells(Z)}}},null,null,"Alt+Shift+S");z.actions.addAction("selectParent", -function(){if(u.isEnabled()&&1==u.getSelectionCount()){var L=u.getSelectionCell();L=u.getIncomingTreeEdges(L);null!=L&&0<L.length&&u.setSelectionCell(u.model.getTerminal(L[0],!0))}},null,null,"Alt+Shift+P");z.actions.addAction("selectDescendants",function(L,Z){L=u.getSelectionCell();if(u.isEnabled()&&u.model.isVertex(L)){if(null!=Z&&mxEvent.isAltDown(Z))u.setSelectionCells(u.model.getTreeEdges(L,null==Z||!mxEvent.isShiftDown(Z),null==Z||!mxEvent.isControlDown(Z)));else{var P=[];u.traverse(L,!0,function(ca, -ja){var ka=null!=ja&&u.isTreeEdge(ja);ka&&P.push(ja);null!=ja&&!ka||null!=Z&&mxEvent.isShiftDown(Z)||P.push(ca);return null==ja||ka})}u.setSelectionCells(P)}},null,null,"Alt+Shift+D");var D=u.removeCells;u.removeCells=function(L,Z){Z=null!=Z?Z:!0;null==L&&(L=this.getDeletableCells(this.getSelectionCells()));Z&&(L=this.getDeletableCells(this.addAllEdges(L)));for(var P=[],ca=0;ca<L.length;ca++){var ja=L[ca];H.isEdge(ja)&&p(ja)&&(P.push(ja),ja=H.getTerminal(ja,!1));if(m(ja)){var ka=[];u.traverse(ja, -!0,function(q,F){var R=null!=F&&u.isTreeEdge(F);R&&ka.push(F);(null==F||R)&&ka.push(q);return null==F||R});0<ka.length&&(P=P.concat(ka),ja=u.getIncomingTreeEdges(L[ca]),L=L.concat(ja))}else null!=ja&&P.push(L[ca])}L=P;return D.apply(this,arguments)};z.hoverIcons.getStateAt=function(L,Z,P){return m(L.cell)?null:this.graph.view.getState(this.graph.getCellAt(Z,P))};var G=u.duplicateCells;u.duplicateCells=function(L,Z){L=null!=L?L:this.getSelectionCells();for(var P=L.slice(0),ca=0;ca<P.length;ca++){var ja= -u.view.getState(P[ca]);if(null!=ja&&m(ja.cell)){var ka=u.getIncomingTreeEdges(ja.cell);for(ja=0;ja<ka.length;ja++)mxUtils.remove(ka[ja],L)}}this.model.beginUpdate();try{var q=G.call(this,L,Z);if(q.length==L.length)for(ca=0;ca<L.length;ca++)if(m(L[ca])){var F=u.getIncomingTreeEdges(q[ca]);ka=u.getIncomingTreeEdges(L[ca]);if(0==F.length&&0<ka.length){var R=this.cloneCell(ka[0]);this.addEdge(R,u.getDefaultParent(),this.model.getTerminal(ka[0],!0),q[ca])}}}finally{this.model.endUpdate()}return q};var V= -u.moveCells;u.moveCells=function(L,Z,P,ca,ja,ka,q){var F=null;this.model.beginUpdate();try{var R=ja,W=this.getCurrentCellStyle(ja);if(null!=L&&m(ja)&&"1"==mxUtils.getValue(W,"treeFolding","0")){for(var T=0;T<L.length;T++)if(m(L[T])||u.model.isEdge(L[T])&&null==u.model.getTerminal(L[T],!0)){ja=u.model.getParent(L[T]);break}if(null!=R&&ja!=R&&null!=this.view.getState(L[0])){var ba=u.getIncomingTreeEdges(L[0]);if(0<ba.length){var ha=u.view.getState(u.model.getTerminal(ba[0],!0));if(null!=ha){var ra= -u.view.getState(R);null!=ra&&(Z=(ra.getCenterX()-ha.getCenterX())/u.view.scale,P=(ra.getCenterY()-ha.getCenterY())/u.view.scale)}}}}F=V.apply(this,arguments);if(null!=F&&null!=L&&F.length==L.length)for(T=0;T<F.length;T++)if(this.model.isEdge(F[T]))m(R)&&0>mxUtils.indexOf(F,this.model.getTerminal(F[T],!0))&&this.model.setTerminal(F[T],R,!0);else if(m(L[T])&&(ba=u.getIncomingTreeEdges(L[T]),0<ba.length))if(!ca)m(R)&&0>mxUtils.indexOf(L,this.model.getTerminal(ba[0],!0))&&this.model.setTerminal(ba[0], -R,!0);else if(0==u.getIncomingTreeEdges(F[T]).length){W=R;if(null==W||W==u.model.getParent(L[T]))W=u.model.getTerminal(ba[0],!0);ca=this.cloneCell(ba[0]);this.addEdge(ca,u.getDefaultParent(),W,F[T])}}finally{this.model.endUpdate()}return F};if(null!=z.sidebar){var U=z.sidebar.dropAndConnect;z.sidebar.dropAndConnect=function(L,Z,P,ca){var ja=u.model,ka=null;ja.beginUpdate();try{if(ka=U.apply(this,arguments),m(L))for(var q=0;q<ka.length;q++)if(ja.isEdge(ka[q])&&null==ja.getTerminal(ka[q],!0)){ja.setTerminal(ka[q], -L,!0);var F=u.getCellGeometry(ka[q]);F.points=null;null!=F.getTerminalPoint(!0)&&F.setTerminalPoint(null,!0)}}finally{ja.endUpdate()}return ka}}var Y={88:z.actions.get("selectChildren"),84:z.actions.get("selectSubtree"),80:z.actions.get("selectParent"),83:z.actions.get("selectSiblings")},O=z.onKeyDown;z.onKeyDown=function(L){try{if(u.isEnabled()&&!u.isEditing()&&m(u.getSelectionCell())&&1==u.getSelectionCount()){var Z=null;0<u.getIncomingTreeEdges(u.getSelectionCell()).length&&(9==L.which?Z=mxEvent.isShiftDown(L)? -d(u.getSelectionCell()):f(u.getSelectionCell()):13==L.which&&(Z=Q(u.getSelectionCell(),!mxEvent.isShiftDown(L))));if(null!=Z&&0<Z.length)1==Z.length&&u.model.isEdge(Z[0])?u.setSelectionCell(u.model.getTerminal(Z[0],!1)):u.setSelectionCell(Z[Z.length-1]),null!=z.hoverIcons&&z.hoverIcons.update(u.view.getState(u.getSelectionCell())),u.startEditingAtCell(u.getSelectionCell()),mxEvent.consume(L);else if(mxEvent.isAltDown(L)&&mxEvent.isShiftDown(L)){var P=Y[L.keyCode];null!=P&&(P.funct(L),mxEvent.consume(L))}else 37== -L.keyCode?(x(u.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(L)):38==L.keyCode?(x(u.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(L)):39==L.keyCode?(x(u.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(L)):40==L.keyCode&&(x(u.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(L))}}catch(ca){z.handleError(ca)}mxEvent.isConsumed(L)||O.apply(this,arguments)};var qa=u.connectVertex;u.connectVertex=function(L,Z,P,ca,ja,ka,q){var F=u.getIncomingTreeEdges(L); -if(m(L)){var R=K(L),W=R==mxConstants.DIRECTION_EAST||R==mxConstants.DIRECTION_WEST,T=Z==mxConstants.DIRECTION_EAST||Z==mxConstants.DIRECTION_WEST;return R==Z||0==F.length?f(L,Z):W==T?d(L):Q(L,Z!=mxConstants.DIRECTION_NORTH&&Z!=mxConstants.DIRECTION_WEST)}return qa.apply(this,arguments)};u.getSubtree=function(L){var Z=[L];!C(L)&&!m(L)||E(L)||u.traverse(L,!0,function(P,ca){var ja=null!=ca&&u.isTreeEdge(ca);ja&&0>mxUtils.indexOf(Z,ca)&&Z.push(ca);(null==ca||ja)&&0>mxUtils.indexOf(Z,P)&&Z.push(P);return null== -ca||ja});return Z};var oa=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){oa.apply(this,arguments);(C(this.state.cell)||m(this.state.cell))&&!E(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px", -this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(L){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(L),mxEvent.getClientY(L),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(L);this.graph.isMouseDown=!0;z.hoverIcons.reset();mxEvent.consume(L)})))};var aa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles= -function(){aa.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var da=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(L){da.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=L?"":"none")};var ia=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy= -function(L,Z){ia.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var m=k.apply(this,arguments),C=this.graph;return m.concat([this.addEntry("tree container",function(){var p=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex= -!0;var E=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');E.vertex=!0;var K=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');K.vertex=!0;var Q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;"); -Q.geometry.relative=!0;Q.edge=!0;E.insertEdge(Q,!0);K.insertEdge(Q,!1);p.insert(Q);p.insert(E);p.insert(K);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var p=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var E=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); -E.vertex=!0;var K=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');K.vertex=!0;var Q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");Q.geometry.relative=!0;Q.edge=!0; -E.insertEdge(Q,!0);K.insertEdge(Q,!1);var d=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;"); -f.geometry.relative=!0;f.edge=!0;E.insertEdge(f,!0);d.insertEdge(f,!1);var g=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');g.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;"); -x.geometry.relative=!0;x.edge=!0;E.insertEdge(x,!0);g.insertEdge(x,!1);var z=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');z.vertex=!0;var u=new mxCell("",new mxGeometry(0, -0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");u.geometry.relative=!0;u.edge=!0;E.insertEdge(u,!0);z.insertEdge(u,!1);p.insert(Q);p.insert(f);p.insert(x);p.insert(u);p.insert(E);p.insert(K);p.insert(d);p.insert(g);p.insert(z);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var p=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;'); -p.vertex=!0;return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var p=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); -p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");E.geometry.setTerminalPoint(new mxPoint(-40,40),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);return sb.createVertexTemplateFromCells([p,E],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var p=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); -p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");E.geometry.setTerminalPoint(new mxPoint(-40,40),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);return sb.createVertexTemplateFromCells([p,E],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree orgchart organization division",function(){var p=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};'); -p.vertex=!0;var E=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.setAttributeForCell(E,"treeRoot","1");E.vertex=!0;var K=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};'); -K.vertex=!0;var Q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");Q.geometry.relative=!0;Q.edge=!0;E.insertEdge(Q,!0);K.insertEdge(Q,!1);var d=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;"); -f.geometry.relative=!0;f.edge=!0;E.insertEdge(f,!0);d.insertEdge(f,!1);p.insert(Q);p.insert(f);p.insert(E);p.insert(K);p.insert(d);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree root",function(){var p=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.setAttributeForCell(p,"treeRoot", -"1");p.vertex=!0;return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree division",function(){var p=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;"); -E.geometry.setTerminalPoint(new mxPoint(0,0),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);return sb.createVertexTemplateFromCells([p,E],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree sub sections",function(){var p=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;"); -E.geometry.setTerminalPoint(new mxPoint(110,-40),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);var K=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");K.vertex=!0;var Q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");Q.geometry.setTerminalPoint(new mxPoint(110,-40),!0);Q.geometry.relative= -!0;Q.edge=!0;K.insertEdge(Q,!1);return sb.createVertexTemplateFromCells([E,Q,p,K],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows; -EditorUi.initMinimalTheme=function(){function b(D,G){if(EditorUi.windowed){var V=D.editor.graph;V.popupMenuHandler.hideMenu();if(null==D.formatWindow){G="1"==urlParams.sketch?Math.max(10,D.diagramContainer.clientWidth-241):Math.max(10,D.diagramContainer.clientWidth-248);var U="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;V="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,V.container.clientHeight-10);D.formatWindow=new WrapperWindow(D,mxResources.get("format"),G,U,240,V, -function(Y){Y=D.createFormat(Y);Y.init();return Y});D.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){D.formatWindow.window.fit()}));D.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else D.formatWindow.window.setVisible(null!=G?G:!D.formatWindow.window.isVisible())}else null==D.formatElt&&(D.formatElt=D.createSidebarContainer(),D.createFormat(D.formatElt).init(),D.formatElt.style.border="none",D.formatElt.style.width="240px",D.formatElt.style.borderLeft="1px solid gray", -D.formatElt.style.right="0px"),V=D.diagramContainer.parentNode,null!=D.formatElt.parentNode?(D.formatElt.parentNode.removeChild(D.formatElt),V.style.right="0px"):(V.parentNode.appendChild(D.formatElt),V.style.right=D.formatElt.style.width)}function e(D,G){function V(qa,oa){var aa=D.menus.get(qa);qa=O.addMenu(oa,mxUtils.bind(this,function(){aa.funct.apply(this,arguments)}));qa.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;"; -qa.className="geTitle";G.appendChild(qa);return qa}var U=document.createElement("div");U.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";U.className="geTitle";var Y=document.createElement("span");Y.style.fontSize="18px";Y.style.marginRight="5px";Y.innerHTML="+";U.appendChild(Y);mxUtils.write(U,mxResources.get("moreShapes"));G.appendChild(U);mxEvent.addListener(U,"click",function(){D.actions.get("shapes").funct()}); -var O=new Menubar(D,G);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?U.style.bottom="0":null!=D.actions.get("newLibrary")?(U=document.createElement("div"),U.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",U.className="geTitle",Y=document.createElement("span"),Y.style.cssText="position:relative;top:6px;",mxUtils.write(Y,mxResources.get("newLibrary")),U.appendChild(Y), -G.appendChild(U),mxEvent.addListener(U,"click",D.actions.get("newLibrary").funct),U=document.createElement("div"),U.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",U.className="geTitle",Y=document.createElement("span"),Y.style.cssText="position:relative;top:6px;",mxUtils.write(Y,mxResources.get("openLibrary")),U.appendChild(Y),G.appendChild(U),mxEvent.addListener(U, -"click",D.actions.get("openLibrary").funct)):(U=V("newLibrary",mxResources.get("newLibrary")),U.style.boxSizing="border-box",U.style.paddingRight="6px",U.style.paddingLeft="6px",U.style.height="32px",U.style.left="0",U=V("openLibraryFrom",mxResources.get("openLibraryFrom")),U.style.borderLeft="1px solid lightgray",U.style.boxSizing="border-box",U.style.paddingRight="6px",U.style.paddingLeft="6px",U.style.height="32px",U.style.left="50%");G.appendChild(D.sidebar.container);G.style.overflow="hidden"} -function k(D,G){if(EditorUi.windowed){var V=D.editor.graph;V.popupMenuHandler.hideMenu();if(null==D.sidebarWindow){G=Math.min(V.container.clientWidth-10,218);var U="1"==urlParams.embedInline?650:Math.min(V.container.clientHeight-40,650);D.sidebarWindow=new WrapperWindow(D,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(V.container.clientHeight-U)/2):56,G-6,U-6,function(Y){e(D,Y)});D.sidebarWindow.window.addListener(mxEvent.SHOW, -mxUtils.bind(this,function(){D.sidebarWindow.window.fit()}));D.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);D.sidebarWindow.window.setVisible(!0);isLocalStorage&&D.getLocalData("sidebar",function(Y){D.sidebar.showEntries(Y,null,!0)});D.restoreLibraries()}else D.sidebarWindow.window.setVisible(null!=G?G:!D.sidebarWindow.window.isVisible())}else null==D.sidebarElt&&(D.sidebarElt=D.createSidebarContainer(),e(D,D.sidebarElt),D.sidebarElt.style.border="none",D.sidebarElt.style.width="210px", -D.sidebarElt.style.borderRight="1px solid gray"),V=D.diagramContainer.parentNode,null!=D.sidebarElt.parentNode?(D.sidebarElt.parentNode.removeChild(D.sidebarElt),V.style.left="0px"):(V.parentNode.appendChild(D.sidebarElt),V.style.left=D.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var m=0;try{m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(D){}Editor.checkmarkImage= +!1),m=C.nextSibling,C.parentNode.removeChild(C),C=m;null!=C;){m=C.nextSibling;if(C.nodeType==mxConstants.NODETYPE_ELEMENT){var p=C.getAttribute("id");null==e.lookup(p)&&e.decodeCell(C)}C.parentNode.removeChild(C);C=m}}return k};b.afterDecode=function(e,k,m){m.index=m.previousIndex;return m};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(m,C,p,F,K){C=null!=C?C:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),m));this.stopEditing();this.model.beginUpdate();try{for(var P=p.slice(),d=0;d<p.length;d++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[d]),"treeFolding","0")&&this.foldTreeCell(m,p[d]);p=P;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell= +function(m,C){this.model.beginUpdate();try{var p=[];this.traverse(C,!0,mxUtils.bind(this,function(K,P){var d=null!=P&&this.isTreeEdge(P);d&&p.push(P);K==C||null!=P&&!d||p.push(K);return(null==P||d)&&(K==C||!this.model.isCollapsed(K))}));this.model.setCollapsed(C,m);for(var F=0;F<p.length;F++)this.model.setVisible(p[F],!m)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(m){return!this.isEdgeIgnored(m)};Graph.prototype.getTreeEdges=function(m,C,p,F,K,P){return this.model.filterCells(this.getEdges(m, +C,p,F,K,P),mxUtils.bind(this,function(d){return this.isTreeEdge(d)}))};Graph.prototype.getIncomingTreeEdges=function(m,C){return this.getTreeEdges(m,C,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(m,C){return this.getTreeEdges(m,C,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function m(M){return H.isVertex(M)&&p(M)}function C(M){var aa= +!1;null!=M&&(aa="1"==u.getCurrentCellStyle(M).treeMoving);return aa}function p(M){var aa=!1;null!=M&&(M=H.getParent(M),aa=u.view.getState(M),aa="tree"==(null!=aa?aa.style:u.getCellStyle(M)).containerType);return aa}function F(M){var aa=!1;null!=M&&(M=H.getParent(M),aa=u.view.getState(M),u.view.getState(M),aa=null!=(null!=aa?aa.style:u.getCellStyle(M)).childLayout);return aa}function K(M){M=u.view.getState(M);if(null!=M){var aa=u.getIncomingTreeEdges(M.cell);if(0<aa.length&&(aa=u.view.getState(aa[0]), +null!=aa&&(aa=aa.absolutePoints,null!=aa&&0<aa.length&&(aa=aa[aa.length-1],null!=aa)))){if(aa.y==M.y&&Math.abs(aa.x-M.getCenterX())<M.width/2)return mxConstants.DIRECTION_SOUTH;if(aa.y==M.y+M.height&&Math.abs(aa.x-M.getCenterX())<M.width/2)return mxConstants.DIRECTION_NORTH;if(aa.x>M.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function P(M,aa){aa=null!=aa?aa:!0;u.model.beginUpdate();try{var X=u.model.getParent(M),ja=u.getIncomingTreeEdges(M),ca=u.cloneCells([ja[0], +M]);u.model.setTerminal(ca[0],u.model.getTerminal(ja[0],!0),!0);var ka=K(M),q=X.geometry;ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH?ca[1].geometry.x+=aa?M.geometry.width+10:-ca[1].geometry.width-10:ca[1].geometry.y+=aa?M.geometry.height+10:-ca[1].geometry.height-10;u.view.currentRoot!=X&&(ca[1].geometry.x-=q.x,ca[1].geometry.y-=q.y);var E=u.view.getState(M),Q=u.view.scale;if(null!=E){var Y=mxRectangle.fromRectangle(E);ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH? +Y.x+=(aa?M.geometry.width+10:-ca[1].geometry.width-10)*Q:Y.y+=(aa?M.geometry.height+10:-ca[1].geometry.height-10)*Q;var R=u.getOutgoingTreeEdges(u.model.getTerminal(ja[0],!0));if(null!=R){for(var ba=ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH,ea=q=ja=0;ea<R.length;ea++){var ra=u.model.getTerminal(R[ea],!1);if(ka==K(ra)){var ta=u.view.getState(ra);ra!=M&&null!=ta&&(ba&&aa!=ta.getCenterX()<E.getCenterX()||!ba&&aa!=ta.getCenterY()<E.getCenterY())&&mxUtils.intersects(Y,ta)&&(ja=10+ +Math.max(ja,(Math.min(Y.x+Y.width,ta.x+ta.width)-Math.max(Y.x,ta.x))/Q),q=10+Math.max(q,(Math.min(Y.y+Y.height,ta.y+ta.height)-Math.max(Y.y,ta.y))/Q))}}ba?q=0:ja=0;for(ea=0;ea<R.length;ea++)if(ra=u.model.getTerminal(R[ea],!1),ka==K(ra)&&(ta=u.view.getState(ra),ra!=M&&null!=ta&&(ba&&aa!=ta.getCenterX()<E.getCenterX()||!ba&&aa!=ta.getCenterY()<E.getCenterY()))){var la=[];u.traverse(ta.cell,!0,function(pa,xa){var Ca=null!=xa&&u.isTreeEdge(xa);Ca&&la.push(xa);(null==xa||Ca)&&la.push(pa);return null== +xa||Ca});u.moveCells(la,(aa?1:-1)*ja,(aa?1:-1)*q)}}}return u.addCells(ca,X)}finally{u.model.endUpdate()}}function d(M){u.model.beginUpdate();try{var aa=K(M),X=u.getIncomingTreeEdges(M),ja=u.cloneCells([X[0],M]);u.model.setTerminal(X[0],ja[1],!1);u.model.setTerminal(ja[0],ja[1],!0);u.model.setTerminal(ja[0],M,!1);var ca=u.model.getParent(M),ka=ca.geometry,q=[];u.view.currentRoot!=ca&&(ja[1].geometry.x-=ka.x,ja[1].geometry.y-=ka.y);u.traverse(M,!0,function(Y,R){var ba=null!=R&&u.isTreeEdge(R);ba&&q.push(R); +(null==R||ba)&&q.push(Y);return null==R||ba});var E=M.geometry.width+40,Q=M.geometry.height+40;aa==mxConstants.DIRECTION_SOUTH?E=0:aa==mxConstants.DIRECTION_NORTH?(E=0,Q=-Q):aa==mxConstants.DIRECTION_WEST?(E=-E,Q=0):aa==mxConstants.DIRECTION_EAST&&(Q=0);u.moveCells(q,E,Q);return u.addCells(ja,ca)}finally{u.model.endUpdate()}}function f(M,aa){u.model.beginUpdate();try{var X=u.model.getParent(M),ja=u.getIncomingTreeEdges(M),ca=K(M);0==ja.length&&(ja=[u.createEdge(X,null,"",null,null,u.createCurrentEdgeStyle())], +ca=aa);var ka=u.cloneCells([ja[0],M]);u.model.setTerminal(ka[0],M,!0);if(null==u.model.getTerminal(ka[0],!1)){u.model.setTerminal(ka[0],ka[1],!1);var q=u.getCellStyle(ka[1]).newEdgeStyle;if(null!=q)try{var E=JSON.parse(q),Q;for(Q in E)u.setCellStyles(Q,E[Q],[ka[0]]),"edgeStyle"==Q&&"elbowEdgeStyle"==E[Q]&&u.setCellStyles("elbow",ca==mxConstants.DIRECTION_SOUTH||ca==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[ka[0]])}catch(ta){}}ja=u.getOutgoingTreeEdges(M);var Y=X.geometry;aa=[];u.view.currentRoot== +X&&(Y=new mxRectangle);for(q=0;q<ja.length;q++){var R=u.model.getTerminal(ja[q],!1);null!=R&&aa.push(R)}var ba=u.view.getBounds(aa),ea=u.view.translate,ra=u.view.scale;ca==mxConstants.DIRECTION_SOUTH?(ka[1].geometry.x=null==ba?M.geometry.x+(M.geometry.width-ka[1].geometry.width)/2:(ba.x+ba.width)/ra-ea.x-Y.x+10,ka[1].geometry.y+=ka[1].geometry.height-Y.y+40):ca==mxConstants.DIRECTION_NORTH?(ka[1].geometry.x=null==ba?M.geometry.x+(M.geometry.width-ka[1].geometry.width)/2:(ba.x+ba.width)/ra-ea.x+-Y.x+ +10,ka[1].geometry.y-=ka[1].geometry.height+Y.y+40):(ka[1].geometry.x=ca==mxConstants.DIRECTION_WEST?ka[1].geometry.x-(ka[1].geometry.width+Y.x+40):ka[1].geometry.x+(ka[1].geometry.width-Y.x+40),ka[1].geometry.y=null==ba?M.geometry.y+(M.geometry.height-ka[1].geometry.height)/2:(ba.y+ba.height)/ra-ea.y+-Y.y+10);return u.addCells(ka,X)}finally{u.model.endUpdate()}}function g(M,aa,X){M=u.getOutgoingTreeEdges(M);X=u.view.getState(X);var ja=[];if(null!=X&&null!=M){for(var ca=0;ca<M.length;ca++){var ka= +u.view.getState(u.model.getTerminal(M[ca],!1));null!=ka&&(!aa&&Math.min(ka.x+ka.width,X.x+X.width)>=Math.max(ka.x,X.x)||aa&&Math.min(ka.y+ka.height,X.y+X.height)>=Math.max(ka.y,X.y))&&ja.push(ka)}ja.sort(function(q,E){return aa?q.x+q.width-E.x-E.width:q.y+q.height-E.y-E.height})}return ja}function x(M,aa){var X=K(M),ja=aa==mxConstants.DIRECTION_EAST||aa==mxConstants.DIRECTION_WEST;(X==mxConstants.DIRECTION_EAST||X==mxConstants.DIRECTION_WEST)==ja&&X!=aa?y.actions.get("selectParent").funct():X==aa? +(aa=u.getOutgoingTreeEdges(M),null!=aa&&0<aa.length&&u.setSelectionCell(u.model.getTerminal(aa[0],!1))):(X=u.getIncomingTreeEdges(M),null!=X&&0<X.length&&(ja=g(u.model.getTerminal(X[0],!0),ja,M),M=u.view.getState(M),null!=M&&(M=mxUtils.indexOf(ja,M),0<=M&&(M+=aa==mxConstants.DIRECTION_NORTH||aa==mxConstants.DIRECTION_WEST?-1:1,0<=M&&M<=ja.length-1&&u.setSelectionCell(ja[M].cell)))))}var y=this,u=y.editor.graph,H=u.getModel(),J=y.menus.createPopupMenu;y.menus.createPopupMenu=function(M,aa,X){J.apply(this, +arguments);if(1==u.getSelectionCount()){aa=u.getSelectionCell();var ja=u.getOutgoingTreeEdges(aa);M.addSeparator();0<ja.length&&(m(u.getSelectionCell())&&this.addMenuItems(M,["selectChildren"],null,X),this.addMenuItems(M,["selectDescendants"],null,X));m(u.getSelectionCell())?(M.addSeparator(),0<u.getIncomingTreeEdges(aa).length&&this.addMenuItems(M,["selectSiblings","selectParent"],null,X)):0<u.model.getEdgeCount(aa)&&this.addMenuItems(M,["selectConnections"],null,X)}};y.actions.addAction("selectChildren", +function(){if(u.isEnabled()&&1==u.getSelectionCount()){var M=u.getSelectionCell();M=u.getOutgoingTreeEdges(M);if(null!=M){for(var aa=[],X=0;X<M.length;X++)aa.push(u.model.getTerminal(M[X],!1));u.setSelectionCells(aa)}}},null,null,"Alt+Shift+X");y.actions.addAction("selectSiblings",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var M=u.getSelectionCell();M=u.getIncomingTreeEdges(M);if(null!=M&&0<M.length&&(M=u.getOutgoingTreeEdges(u.model.getTerminal(M[0],!0)),null!=M)){for(var aa=[],X=0;X< +M.length;X++)aa.push(u.model.getTerminal(M[X],!1));u.setSelectionCells(aa)}}},null,null,"Alt+Shift+S");y.actions.addAction("selectParent",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var M=u.getSelectionCell();M=u.getIncomingTreeEdges(M);null!=M&&0<M.length&&u.setSelectionCell(u.model.getTerminal(M[0],!0))}},null,null,"Alt+Shift+P");y.actions.addAction("selectDescendants",function(M,aa){M=u.getSelectionCell();if(u.isEnabled()&&u.model.isVertex(M)){if(null!=aa&&mxEvent.isAltDown(aa))u.setSelectionCells(u.model.getTreeEdges(M, +null==aa||!mxEvent.isShiftDown(aa),null==aa||!mxEvent.isControlDown(aa)));else{var X=[];u.traverse(M,!0,function(ja,ca){var ka=null!=ca&&u.isTreeEdge(ca);ka&&X.push(ca);null!=ca&&!ka||null!=aa&&mxEvent.isShiftDown(aa)||X.push(ja);return null==ca||ka})}u.setSelectionCells(X)}},null,null,"Alt+Shift+D");var D=u.removeCells;u.removeCells=function(M,aa){aa=null!=aa?aa:!0;null==M&&(M=this.getDeletableCells(this.getSelectionCells()));aa&&(M=this.getDeletableCells(this.addAllEdges(M)));for(var X=[],ja=0;ja< +M.length;ja++){var ca=M[ja];H.isEdge(ca)&&p(ca)&&(X.push(ca),ca=H.getTerminal(ca,!1));if(m(ca)){var ka=[];u.traverse(ca,!0,function(q,E){var Q=null!=E&&u.isTreeEdge(E);Q&&ka.push(E);(null==E||Q)&&ka.push(q);return null==E||Q});0<ka.length&&(X=X.concat(ka),ca=u.getIncomingTreeEdges(M[ja]),M=M.concat(ca))}else null!=ca&&X.push(M[ja])}M=X;return D.apply(this,arguments)};y.hoverIcons.getStateAt=function(M,aa,X){return m(M.cell)?null:this.graph.view.getState(this.graph.getCellAt(aa,X))};var G=u.duplicateCells; +u.duplicateCells=function(M,aa){M=null!=M?M:this.getSelectionCells();for(var X=M.slice(0),ja=0;ja<X.length;ja++){var ca=u.view.getState(X[ja]);if(null!=ca&&m(ca.cell)){var ka=u.getIncomingTreeEdges(ca.cell);for(ca=0;ca<ka.length;ca++)mxUtils.remove(ka[ca],M)}}this.model.beginUpdate();try{var q=G.call(this,M,aa);if(q.length==M.length)for(ja=0;ja<M.length;ja++)if(m(M[ja])){var E=u.getIncomingTreeEdges(q[ja]);ka=u.getIncomingTreeEdges(M[ja]);if(0==E.length&&0<ka.length){var Q=this.cloneCell(ka[0]);this.addEdge(Q, +u.getDefaultParent(),this.model.getTerminal(ka[0],!0),q[ja])}}}finally{this.model.endUpdate()}return q};var W=u.moveCells;u.moveCells=function(M,aa,X,ja,ca,ka,q){var E=null;this.model.beginUpdate();try{var Q=ca,Y=this.getCurrentCellStyle(ca);if(null!=M&&m(ca)&&"1"==mxUtils.getValue(Y,"treeFolding","0")){for(var R=0;R<M.length;R++)if(m(M[R])||u.model.isEdge(M[R])&&null==u.model.getTerminal(M[R],!0)){ca=u.model.getParent(M[R]);break}if(null!=Q&&ca!=Q&&null!=this.view.getState(M[0])){var ba=u.getIncomingTreeEdges(M[0]); +if(0<ba.length){var ea=u.view.getState(u.model.getTerminal(ba[0],!0));if(null!=ea){var ra=u.view.getState(Q);null!=ra&&(aa=(ra.getCenterX()-ea.getCenterX())/u.view.scale,X=(ra.getCenterY()-ea.getCenterY())/u.view.scale)}}}}E=W.apply(this,arguments);if(null!=E&&null!=M&&E.length==M.length)for(R=0;R<E.length;R++)if(this.model.isEdge(E[R]))m(Q)&&0>mxUtils.indexOf(E,this.model.getTerminal(E[R],!0))&&this.model.setTerminal(E[R],Q,!0);else if(m(M[R])&&(ba=u.getIncomingTreeEdges(M[R]),0<ba.length))if(!ja)m(Q)&& +0>mxUtils.indexOf(M,this.model.getTerminal(ba[0],!0))&&this.model.setTerminal(ba[0],Q,!0);else if(0==u.getIncomingTreeEdges(E[R]).length){Y=Q;if(null==Y||Y==u.model.getParent(M[R]))Y=u.model.getTerminal(ba[0],!0);ja=this.cloneCell(ba[0]);this.addEdge(ja,u.getDefaultParent(),Y,E[R])}}finally{this.model.endUpdate()}return E};if(null!=y.sidebar){var T=y.sidebar.dropAndConnect;y.sidebar.dropAndConnect=function(M,aa,X,ja){var ca=u.model,ka=null;ca.beginUpdate();try{if(ka=T.apply(this,arguments),m(M))for(var q= +0;q<ka.length;q++)if(ca.isEdge(ka[q])&&null==ca.getTerminal(ka[q],!0)){ca.setTerminal(ka[q],M,!0);var E=u.getCellGeometry(ka[q]);E.points=null;null!=E.getTerminalPoint(!0)&&E.setTerminalPoint(null,!0)}}finally{ca.endUpdate()}return ka}}var Z={88:y.actions.get("selectChildren"),84:y.actions.get("selectSubtree"),80:y.actions.get("selectParent"),83:y.actions.get("selectSiblings")},N=y.onKeyDown;y.onKeyDown=function(M){try{if(u.isEnabled()&&!u.isEditing()&&m(u.getSelectionCell())&&1==u.getSelectionCount()){var aa= +null;0<u.getIncomingTreeEdges(u.getSelectionCell()).length&&(9==M.which?aa=mxEvent.isShiftDown(M)?d(u.getSelectionCell()):f(u.getSelectionCell()):13==M.which&&(aa=P(u.getSelectionCell(),!mxEvent.isShiftDown(M))));if(null!=aa&&0<aa.length)1==aa.length&&u.model.isEdge(aa[0])?u.setSelectionCell(u.model.getTerminal(aa[0],!1)):u.setSelectionCell(aa[aa.length-1]),null!=y.hoverIcons&&y.hoverIcons.update(u.view.getState(u.getSelectionCell())),u.startEditingAtCell(u.getSelectionCell()),mxEvent.consume(M); +else if(mxEvent.isAltDown(M)&&mxEvent.isShiftDown(M)){var X=Z[M.keyCode];null!=X&&(X.funct(M),mxEvent.consume(M))}else 37==M.keyCode?(x(u.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(M)):38==M.keyCode?(x(u.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(M)):39==M.keyCode?(x(u.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(M)):40==M.keyCode&&(x(u.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(M))}}catch(ja){y.handleError(ja)}mxEvent.isConsumed(M)|| +N.apply(this,arguments)};var qa=u.connectVertex;u.connectVertex=function(M,aa,X,ja,ca,ka,q){var E=u.getIncomingTreeEdges(M);if(m(M)){var Q=K(M),Y=Q==mxConstants.DIRECTION_EAST||Q==mxConstants.DIRECTION_WEST,R=aa==mxConstants.DIRECTION_EAST||aa==mxConstants.DIRECTION_WEST;return Q==aa||0==E.length?f(M,aa):Y==R?d(M):P(M,aa!=mxConstants.DIRECTION_NORTH&&aa!=mxConstants.DIRECTION_WEST)}return qa.apply(this,arguments)};u.getSubtree=function(M){var aa=[M];!C(M)&&!m(M)||F(M)||u.traverse(M,!0,function(X, +ja){var ca=null!=ja&&u.isTreeEdge(ja);ca&&0>mxUtils.indexOf(aa,ja)&&aa.push(ja);(null==ja||ca)&&0>mxUtils.indexOf(aa,X)&&aa.push(X);return null==ja||ca});return aa};var oa=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){oa.apply(this,arguments);(C(this.state.cell)||m(this.state.cell))&&!F(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position= +"absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(M){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(M),mxEvent.getClientY(M),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(M);this.graph.isMouseDown=!0;y.hoverIcons.reset(); +mxEvent.consume(M)})))};var S=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){S.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var fa=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(M){fa.apply(this,arguments);null!=this.moveHandle&& +(this.moveHandle.style.display=M?"":"none")};var ia=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(M,aa){ia.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var m=k.apply(this,arguments),C=this.graph;return m.concat([this.addEntry("tree container",function(){var p=new mxCell("Tree Container", +new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var F=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');F.vertex=!0;var K=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');K.vertex= +!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");P.geometry.relative=!0;P.edge=!0;F.insertEdge(P,!0);K.insertEdge(P,!1);p.insert(P);p.insert(F);p.insert(K);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var p=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;"); +p.vertex=!0;var F=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');F.vertex=!0;var K=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); +K.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");P.geometry.relative=!0;P.edge=!0;F.insertEdge(P,!0);K.insertEdge(P,!1);var d=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); +d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");f.geometry.relative=!0;f.edge=!0;F.insertEdge(f,!0);d.insertEdge(f,!1);var g=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); +g.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");x.geometry.relative=!0;x.edge=!0;F.insertEdge(x,!0);g.insertEdge(x,!1);var y=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); +y.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");u.geometry.relative=!0;u.edge=!0;F.insertEdge(u,!0);y.insertEdge(u,!1);p.insert(P);p.insert(f);p.insert(x);p.insert(u);p.insert(F);p.insert(K);p.insert(d);p.insert(g);p.insert(y);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var p=new mxCell("Central Idea", +new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');p.vertex=!0;return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var p=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); +p.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");F.geometry.setTerminalPoint(new mxPoint(-40,40),!0);F.geometry.relative=!0;F.edge=!0;p.insertEdge(F,!1);return sb.createVertexTemplateFromCells([p,F],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var p=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); +p.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");F.geometry.setTerminalPoint(new mxPoint(-40,40),!0);F.geometry.relative=!0;F.edge=!0;p.insertEdge(F,!1);return sb.createVertexTemplateFromCells([p,F],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree orgchart organization division",function(){var p=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};'); +p.vertex=!0;var F=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.setAttributeForCell(F,"treeRoot","1");F.vertex=!0;var K=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};'); +K.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");P.geometry.relative=!0;P.edge=!0;F.insertEdge(P,!0);K.insertEdge(P,!1);var d=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;"); +f.geometry.relative=!0;f.edge=!0;F.insertEdge(f,!0);d.insertEdge(f,!1);p.insert(P);p.insert(f);p.insert(F);p.insert(K);p.insert(d);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree root",function(){var p=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.setAttributeForCell(p,"treeRoot", +"1");p.vertex=!0;return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree division",function(){var p=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');p.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;"); +F.geometry.setTerminalPoint(new mxPoint(0,0),!0);F.geometry.relative=!0;F.edge=!0;p.insertEdge(F,!1);return sb.createVertexTemplateFromCells([p,F],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree sub sections",function(){var p=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");p.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;"); +F.geometry.setTerminalPoint(new mxPoint(110,-40),!0);F.geometry.relative=!0;F.edge=!0;p.insertEdge(F,!1);var K=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");K.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");P.geometry.setTerminalPoint(new mxPoint(110,-40),!0);P.geometry.relative= +!0;P.edge=!0;K.insertEdge(P,!1);return sb.createVertexTemplateFromCells([F,P,p,K],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows; +EditorUi.initMinimalTheme=function(){function b(D,G){if(EditorUi.windowed){var W=D.editor.graph;W.popupMenuHandler.hideMenu();if(null==D.formatWindow){G="1"==urlParams.sketch?Math.max(10,D.diagramContainer.clientWidth-241):Math.max(10,D.diagramContainer.clientWidth-248);var T="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;W="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,W.container.clientHeight-10);D.formatWindow=new WrapperWindow(D,mxResources.get("format"),G,T,240,W, +function(Z){D.createFormat(Z).init()});D.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){D.formatWindow.window.fit()}));D.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else D.formatWindow.window.setVisible(null!=G?G:!D.formatWindow.window.isVisible())}else null==D.formatElt&&(D.formatElt=D.createSidebarContainer(),D.createFormat(D.formatElt).init(),D.formatElt.style.border="none",D.formatElt.style.width="240px",D.formatElt.style.borderLeft="1px solid gray", +D.formatElt.style.right="0px"),W=D.diagramContainer.parentNode,null!=D.formatElt.parentNode?(D.formatElt.parentNode.removeChild(D.formatElt),W.style.right="0px"):(W.parentNode.appendChild(D.formatElt),W.style.right=D.formatElt.style.width)}function e(D,G){function W(qa,oa){var S=D.menus.get(qa);qa=N.addMenu(oa,mxUtils.bind(this,function(){S.funct.apply(this,arguments)}));qa.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;"; +qa.className="geTitle";G.appendChild(qa);return qa}var T=document.createElement("div");T.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";T.className="geTitle";var Z=document.createElement("span");Z.style.fontSize="18px";Z.style.marginRight="5px";Z.innerHTML="+";T.appendChild(Z);mxUtils.write(T,mxResources.get("moreShapes"));G.appendChild(T);mxEvent.addListener(T,"click",function(){D.actions.get("shapes").funct()}); +var N=new Menubar(D,G);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?T.style.bottom="0":null!=D.actions.get("newLibrary")?(T=document.createElement("div"),T.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",T.className="geTitle",Z=document.createElement("span"),Z.style.cssText="position:relative;top:6px;",mxUtils.write(Z,mxResources.get("newLibrary")),T.appendChild(Z), +G.appendChild(T),mxEvent.addListener(T,"click",D.actions.get("newLibrary").funct),T=document.createElement("div"),T.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",T.className="geTitle",Z=document.createElement("span"),Z.style.cssText="position:relative;top:6px;",mxUtils.write(Z,mxResources.get("openLibrary")),T.appendChild(Z),G.appendChild(T),mxEvent.addListener(T, +"click",D.actions.get("openLibrary").funct)):(T=W("newLibrary",mxResources.get("newLibrary")),T.style.boxSizing="border-box",T.style.paddingRight="6px",T.style.paddingLeft="6px",T.style.height="32px",T.style.left="0",T=W("openLibraryFrom",mxResources.get("openLibraryFrom")),T.style.borderLeft="1px solid lightgray",T.style.boxSizing="border-box",T.style.paddingRight="6px",T.style.paddingLeft="6px",T.style.height="32px",T.style.left="50%");G.appendChild(D.sidebar.container);G.style.overflow="hidden"} +function k(D,G){if(EditorUi.windowed){var W=D.editor.graph;W.popupMenuHandler.hideMenu();if(null==D.sidebarWindow){G=Math.min(W.container.clientWidth-10,218);var T="1"==urlParams.embedInline?650:Math.min(W.container.clientHeight-40,650);D.sidebarWindow=new WrapperWindow(D,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(W.container.clientHeight-T)/2):56,G-6,T-6,function(Z){e(D,Z)});D.sidebarWindow.window.addListener(mxEvent.SHOW, +mxUtils.bind(this,function(){D.sidebarWindow.window.fit()}));D.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);D.sidebarWindow.window.setVisible(!0);isLocalStorage&&D.getLocalData("sidebar",function(Z){D.sidebar.showEntries(Z,null,!0)});D.restoreLibraries()}else D.sidebarWindow.window.setVisible(null!=G?G:!D.sidebarWindow.window.isVisible())}else null==D.sidebarElt&&(D.sidebarElt=D.createSidebarContainer(),e(D,D.sidebarElt),D.sidebarElt.style.border="none",D.sidebarElt.style.width="210px", +D.sidebarElt.style.borderRight="1px solid gray"),W=D.diagramContainer.parentNode,null!=D.sidebarElt.parentNode?(D.sidebarElt.parentNode.removeChild(D.sidebarElt),W.style.left="0px"):(W.parentNode.appendChild(D.sidebarElt),W.style.left=D.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var m=0;try{m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(D){}Editor.checkmarkImage= Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src; mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR= "#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor= "#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight="1"==urlParams.sketch?1:46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert="1"!=urlParams.sketch&&!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.styleElt=document.createElement("style");Editor.styleElt.type="text/css";Editor.styleElt.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(Editor.styleElt); Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var C=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");C.apply(this,arguments)};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);this.menus.get("save").setEnabled(null!= -this.getCurrentFile()||"1"==urlParams.embed)};var E=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(D,G){null!=G.shortcut&&900>m&&!mxClient.IS_IOS?D.firstChild.nextSibling.setAttribute("title",G.shortcut):E.apply(this,arguments)};var K=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){K.apply(this,arguments);if(null!=this.userElement){var D=this.userElement;D.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+D.style.display;D.className= -"geToolbarButton";D.innerText="";D.style.backgroundImage="url("+Editor.userImage+")";D.style.backgroundPosition="center center";D.style.backgroundRepeat="no-repeat";D.style.backgroundSize="24px 24px";D.style.height="24px";D.style.width="24px";D.style.cssFloat="right";D.setAttribute("title",mxResources.get("changeUser"));if("none"!=D.style.display){D.style.display="inline-block";var G=this.getCurrentFile();if(null!=G&&G.isRealtimeEnabled()&&G.isRealtimeSupported()){var V=document.createElement("img"); -V.setAttribute("border","0");V.style.position="absolute";V.style.left="18px";V.style.top="2px";V.style.width="12px";V.style.height="12px";var U=G.getRealtimeError();G=G.getRealtimeState();var Y=mxResources.get("realtimeCollaboration");1==G?(V.src=Editor.syncImage,Y+=" ("+mxResources.get("online")+")"):(V.src=Editor.syncProblemImage,Y=null!=U&&null!=U.message?Y+(" ("+U.message+")"):Y+(" ("+mxResources.get("disconnected")+")"));V.setAttribute("title",Y);D.style.paddingRight="4px";D.appendChild(V)}}}}; -var Q=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){Q.apply(this,arguments);if(null!=this.shareButton){var D=this.shareButton;D.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";D.className="geToolbarButton";D.innerText="";D.style.backgroundImage="url("+Editor.shareImage+")";D.style.backgroundPosition="center center";D.style.backgroundRepeat="no-repeat";D.style.backgroundSize="24px 24px";D.style.height= -"24px";D.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop="-2px",this.buttonContainer.style.paddingTop="4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var D=document.createElement("div");D.style.display="inline-block";D.style.position="relative";D.style.marginTop="6px";D.style.marginRight="4px";var G=document.createElement("a");G.className= -"geMenuItem gePrimaryBtn";G.style.marginLeft="8px";G.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var V="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(G,V);G.setAttribute("title",V);mxEvent.addListener(G,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));D.appendChild(G)}}else mxUtils.write(G,mxResources.get("save")),G.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+ -"+S)"),mxEvent.addListener(G,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),D.appendChild(G),"1"==urlParams.saveAndExit&&(G=document.createElement("a"),mxUtils.write(G,mxResources.get("saveAndExit")),G.setAttribute("title",mxResources.get("saveAndExit")),G.className="geMenuItem",G.style.marginLeft="6px",G.style.padding="6px",mxEvent.addListener(G,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),D.appendChild(G));"1"!=urlParams.noExitBtn&&(G= -document.createElement("a"),V="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(G,V),G.setAttribute("title",V),G.className="geMenuItem",G.style.marginLeft="6px",G.style.padding="6px",mxEvent.addListener(G,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),D.appendChild(G));this.buttonContainer.appendChild(D);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var d=Sidebar.prototype.getTooltipOffset; -Sidebar.prototype.getTooltipOffset=function(D,G){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,D)){var V=mxUtils.getOffset(this.editorUi.picker);V.x+=this.editorUi.picker.offsetWidth+4;V.y+=D.offsetTop-G.height/2+16;return V}var U=d.apply(this,arguments);V=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);U.x+=V.x-16;U.y+=V.y;return U};var f=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(D,G,V){var U=this.editorUi.editor.graph; -D.smartSeparators=!0;f.apply(this,arguments);"1"==urlParams.sketch?U.isEnabled()&&(D.addSeparator(),1==U.getSelectionCount()&&this.addMenuItems(D,["-","lockUnlock"],null,V)):1==U.getSelectionCount()?(U.isCellFoldable(U.getSelectionCell())&&this.addMenuItems(D,U.isCellCollapsed(G)?["expand"]:["collapse"],null,V),this.addMenuItems(D,["collapsible","-","lockUnlock","enterGroup"],null,V),D.addSeparator(),this.addSubmenu("layout",D)):U.isSelectionEmpty()&&U.isEnabled()?(D.addSeparator(),this.addMenuItems(D, -["editData"],null,V),D.addSeparator(),this.addSubmenu("layout",D),this.addSubmenu("insert",D),this.addMenuItems(D,["-","exitGroup"],null,V)):U.isEnabled()&&this.addMenuItems(D,["-","lockUnlock"],null,V)};var g=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(D,G,V){g.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(D,["copyAsImage"],null,V)};EditorUi.prototype.toggleFormatPanel=function(D){null!=this.formatWindow?this.formatWindow.window.setVisible(null!= -D?D:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var x=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1), -this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow= -null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.window.setVisible(!1),this.menus.findReplaceWindow.window.destroy(),this.menus.findReplaceWindow=null);x.apply(this,arguments)};var z=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(D){z.apply(this,arguments);if(D){var G=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=G&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0); -null!=this.formatWindow&&(1E3<=G||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var u=Menus.prototype.init;Menus.prototype.init=function(){u.apply(this,arguments);var D=this.editorUi,G=D.editor.graph,V=D.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(da){D.setPagesVisible(!Editor.pagesVisible)})); -V.setToggleAction(!0);V.setSelectedCallback(function(){return Editor.pagesVisible});D.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){G.popupMenuHandler.hideMenu();D.showImportCsvDialog()}));D.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var da=new ParseDialog(D,"Insert from Text");D.showDialog(da.container,620,420,!0,!1);da.init()}));D.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var da=new ParseDialog(D, -"Insert from Text","formatSql");D.showDialog(da.container,620,420,!0,!1);da.init()}));D.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){k(D)},null,null,Editor.ctrlKey+"+Shift+K"));V=D.actions.put("toggleFormat",new Action(mxResources.get("format"),function(){b(D)}));V.shortcut=D.actions.get("formatPanel").shortcut;V.setToggleAction(!0);V.setSelectedCallback(mxUtils.bind(this,function(){return null!=D.formatWindow&&D.formatWindow.window.isVisible()})); -EditorUi.enablePlantUml&&!D.isOffline()&&D.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var da=new ParseDialog(D,mxResources.get("plantUml")+"...","plantUml");D.showDialog(da.container,620,420,!0,!1);da.init()}));D.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var da=new ParseDialog(D,mxResources.get("mermaid")+"...","mermaid");D.showDialog(da.container,620,420,!0,!1);da.init()}));var U=this.addPopupMenuCellEditItems;this.put("editCell", -new Menu(mxUtils.bind(this,function(da,ia){var L=this.editorUi.editor.graph,Z=L.getSelectionCell();U.call(this,da,Z,null,ia);this.addMenuItems(da,["editTooltip"],ia);L.model.isVertex(Z)&&this.addMenuItems(da,["editGeometry"],ia);this.addMenuItems(da,["-","edit"],ia)})));this.addPopupMenuCellEditItems=function(da,ia,L,Z){da.addSeparator();this.addSubmenu("editCell",da,Z,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,function(da,ia){var L=D.getCurrentFile();D.menus.addMenuItems(da, -["new"],ia);D.menus.addSubmenu("openFrom",da,ia);isLocalStorage&&this.addSubmenu("openRecent",da,ia);da.addSeparator(ia);D.menus.addMenuItems(da,["-","save"],ia);null!=L&&L.constructor==DriveFile||D.menus.addMenuItems(da,["saveAs"],ia);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||L.constructor==LocalFile&&null==L.fileHandle||D.menus.addMenuItems(da,["synchronize"],ia);null!=L&&L.constructor==DriveFile?D.menus.addMenuItems(da,"- rename makeCopy - moveToFolder openFolder".split(" "),ia):(D.menus.addMenuItems(da, -["-","rename"],ia),D.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(da,["upload"],ia):D.menus.addMenuItems(da,["makeCopy"],ia));null!=L&&L.isRevisionHistorySupported()&&D.menus.addMenuItems(da,["-","revisionHistory"],ia);if(null!=L){if(null!=D.fileNode&&"1"!=urlParams.embedInline){var Z=null!=L.getTitle()?L.getTitle():D.defaultFilename;(L.constructor==DriveFile&&null!=L.sync&&L.sync.isConnected()||!/(\.html)$/i.test(Z)&&!/(\.svg)$/i.test(Z))&&this.addMenuItems(da, -["properties"],ia)}L.constructor==DriveFile&&D.menus.addMenuItems(da,["share"],ia)}D.menus.addMenuItems(da,["-","autosave"],ia)})));this.put("diagram",new Menu(mxUtils.bind(this,function(da,ia){var L=D.getCurrentFile();D.menus.addSubmenu("extras",da,ia,mxResources.get("preferences"));da.addSeparator(ia);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)D.menus.addMenuItems(da,"new open - synchronize - save saveAs -".split(" "),ia);else if("1"==urlParams.embed||D.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&& -"1"!=urlParams.embedInline&&D.menus.addMenuItems(da,["-","save"],ia);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||D.mode==App.MODE_ATLAS)D.menus.addMenuItems(da,["saveAndExit"],ia),null!=L&&L.isRevisionHistorySupported()&&D.menus.addMenuItems(da,["revisionHistory"],ia);da.addSeparator(ia)}else D.mode==App.MODE_ATLAS?D.menus.addMenuItems(da,["save","synchronize","-"],ia):"1"!=urlParams.noFileMenu&&("1"!=urlParams.sketch?(D.menus.addMenuItems(da,["new"],ia),D.menus.addSubmenu("openFrom", -da,ia),isLocalStorage&&this.addSubmenu("openRecent",da,ia),da.addSeparator(ia),null!=L&&(L.constructor==DriveFile&&D.menus.addMenuItems(da,["share"],ia),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||L.constructor==LocalFile||D.menus.addMenuItems(da,["synchronize"],ia)),da.addSeparator(ia),D.menus.addSubmenu("save",da,ia)):D.menus.addSubmenu("file",da,ia));D.menus.addSubmenu("exportAs",da,ia);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?D.menus.addMenuItems(da,["import"],ia):"1"!=urlParams.noFileMenu&& -D.menus.addSubmenu("importFrom",da,ia);D.menus.addMenuItems(da,["-","findReplace"],ia);D.commentsSupported()&&D.menus.addMenuItems(da,["comments","-"],ia);D.menus.addMenuItems(da,["toggleFormat","layers","tags","-","pageSetup"],ia);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||D.menus.addMenuItems(da,["print"],ia);"1"!=urlParams.sketch&&null!=L&&null!=D.fileNode&&"1"!=urlParams.embedInline&&(L=null!=L.getTitle()?L.getTitle():D.defaultFilename,/(\.html)$/i.test(L)||/(\.svg)$/i.test(L)|| -this.addMenuItems(da,["-","properties"]));da.addSeparator(ia);D.menus.addSubmenu("help",da,ia);"1"==urlParams.embed||D.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||D.mode==App.MODE_ATLAS)&&D.menus.addMenuItems(da,["-","exit"],ia):"1"!=urlParams.noFileMenu&&D.menus.addMenuItems(da,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(da,ia){var L=D.getCurrentFile();null!=L&&L.constructor==DriveFile?D.menus.addMenuItems(da,["save","makeCopy","-","rename","moveToFolder"],ia):(D.menus.addMenuItems(da, -["save","saveAs","-","rename"],ia),D.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(da,["upload"],ia):D.menus.addMenuItems(da,["makeCopy"],ia));D.menus.addMenuItems(da,["-","autosave"],ia);null!=L&&L.isRevisionHistorySupported()&&D.menus.addMenuItems(da,["-","revisionHistory"],ia)})));var Y=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(da,ia){Y.funct(da,ia);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||D.menus.addMenuItems(da, -["publishLink"],ia);D.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(da.addSeparator(ia),D.menus.addSubmenu("embed",da,ia))})));var O=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(da,ia){D.menus.addInsertTableCellItem(da,ia)})));var qa=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(da,ia){qa.funct(da,ia);this.addMenuItems(da,["-","ruler","-","pageScale"],ia)})));this.put("extras",new Menu(mxUtils.bind(this,function(da,ia){null!=O&&D.menus.addSubmenu("language", -da,ia);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&D.mode!=App.MODE_ATLAS&&D.menus.addSubmenu("theme",da,ia);D.menus.addSubmenu("units",da,ia);da.addSeparator(ia);"1"!=urlParams.sketch&&D.menus.addMenuItems(da,["scrollbars","-","tooltips","copyConnect","collapseExpand"],ia);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&D.mode!=App.MODE_ATLAS&&D.menus.addMenuItems(da,["-","showStartScreen","search","scratchpad"],ia);da.addSeparator(ia); -"1"==urlParams.sketch&&D.menus.addMenuItems(da,["copyConnect","collapseExpand","tooltips","-"],ia);EditorUi.isElectronApp&&D.menus.addMenuItems(da,["-","spellCheck","autoBkp","drafts","-"],ia);var L=D.getCurrentFile();null!=L&&L.isRealtimeEnabled()&&L.isRealtimeSupported()&&this.addMenuItems(da,["-","showRemoteCursors","shareCursor","-"],ia);Graph.translateDiagram&&D.menus.addMenuItems(da,["diagramLanguage"],ia);D.mode!=App.MODE_ATLAS&&D.menus.addMenuItem(da,"configuration",ia);"1"!=urlParams.sketch&& -!D.isOfflineApp()&&isLocalStorage&&D.mode!=App.MODE_ATLAS&&D.menus.addMenuItem(da,"plugins",ia);da.addSeparator(ia)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(da,ia){D.menus.addMenuItems(da,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),ia)})));mxUtils.bind(this,function(){var da=this.get("insert"),ia=da.funct;da.funct=function(L,Z){"1"==urlParams.sketch?(D.menus.addMenuItems(L,["toggleShapes"],Z),D.menus.addSubmenu("table",L,Z),L.addSeparator(Z), -D.insertTemplateEnabled&&!D.isOffline()&&D.menus.addMenuItems(L,["insertTemplate"],Z),D.menus.addMenuItems(L,["insertImage","insertLink","-"],Z),D.menus.addSubmenu("insertAdvanced",L,Z,mxResources.get("advanced")),D.menus.addSubmenu("layout",L,Z)):(ia.apply(this,arguments),D.menus.addSubmenu("table",L,Z))}})();var oa="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),aa=function(da,ia,L,Z){da.addItem(L,null,mxUtils.bind(this,function(){var P=new CreateGraphDialog(D, -L,Z);D.showDialog(P.container,620,420,!0,!1);P.init()}),ia)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(da,ia){for(var L=0;L<oa.length;L++)"-"==oa[L]?da.addSeparator(ia):aa(da,ia,mxResources.get(oa[L])+"...",oa[L])})))};EditorUi.prototype.installFormatToolbar=function(D){var G=this.editor.graph,V=document.createElement("div");V.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;"; -G.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(U,Y){0<G.getSelectionCount()?(D.appendChild(V),V.innerHTML="Selected: "+G.getSelectionCount()):null!=V.parentNode&&V.parentNode.removeChild(V)}))};var H=!1;EditorUi.prototype.initFormatWindow=function(){if(!H&&null!=this.formatWindow){H=!0;var D=this.formatWindow.window.toggleMinimized,G=240;this.formatWindow.window.toggleMinimized=function(){D.apply(this,arguments);this.minimized?(G=parseInt(this.div.style.width),this.div.style.width= -"140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+G-140+"px"):(this.div.style.width=G+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-G+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(V){mxEvent.getSource(V)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var J=EditorUi.prototype.init;EditorUi.prototype.init= -function(){function D(wa,ua,La){var Oa=O.menus.get(wa),Ca=da.addMenu(mxResources.get(wa),mxUtils.bind(this,function(){Oa.funct.apply(this,arguments)}),aa);Ca.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ca.style.display="inline-block";Ca.style.boxSizing="border-box";Ca.style.top="6px";Ca.style.marginRight="6px";Ca.style.height="30px";Ca.style.paddingTop="6px";Ca.style.paddingBottom="6px";Ca.style.cursor="pointer";Ca.setAttribute("title",mxResources.get(wa));O.menus.menuCreated(Oa, -Ca,"geMenuItem");null!=La?(Ca.style.backgroundImage="url("+La+")",Ca.style.backgroundPosition="center center",Ca.style.backgroundRepeat="no-repeat",Ca.style.backgroundSize="24px 24px",Ca.style.width="34px",Ca.innerText=""):ua||(Ca.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Ca.style.backgroundPosition="right 6px center",Ca.style.backgroundRepeat="no-repeat",Ca.style.paddingRight="22px");return Ca}function G(wa,ua,La,Oa,Ca,Ma){var Ga=document.createElement("a");Ga.className= -"1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ga.style.display="inline-block";Ga.style.boxSizing="border-box";Ga.style.height="30px";Ga.style.padding="6px";Ga.style.position="relative";Ga.style.verticalAlign="top";Ga.style.top="0px";"1"==urlParams.sketch&&(Ga.style.borderStyle="none",Ga.style.boxShadow="none",Ga.style.padding="6px",Ga.style.margin="0px");null!=O.statusContainer?oa.insertBefore(Ga,O.statusContainer):oa.appendChild(Ga);null!=Ma?(Ga.style.backgroundImage="url("+Ma+")",Ga.style.backgroundPosition= -"center center",Ga.style.backgroundRepeat="no-repeat",Ga.style.backgroundSize="24px 24px",Ga.style.width="34px"):mxUtils.write(Ga,wa);mxEvent.addListener(Ga,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Ya){Ya.preventDefault()}));mxEvent.addListener(Ga,"click",function(Ya){"disabled"!=Ga.getAttribute("disabled")&&ua(Ya);mxEvent.consume(Ya)});null==La&&(Ga.style.marginRight="4px");null!=Oa&&Ga.setAttribute("title",Oa);null!=Ca&&(wa=function(){Ca.isEnabled()?(Ga.removeAttribute("disabled"), -Ga.style.cursor="pointer"):(Ga.setAttribute("disabled","disabled"),Ga.style.cursor="default")},Ca.addListener("stateChanged",wa),qa.addListener("enabledChanged",wa),wa());return Ga}function V(wa,ua,La){La=document.createElement("div");La.className="geMenuItem";La.style.display="inline-block";La.style.verticalAlign="top";La.style.marginRight="6px";La.style.padding="0 4px 0 4px";La.style.height="30px";La.style.position="relative";La.style.top="0px";"1"==urlParams.sketch&&(La.style.boxShadow="none"); -for(var Oa=0;Oa<wa.length;Oa++)null!=wa[Oa]&&("1"==urlParams.sketch&&(wa[Oa].style.padding="10px 8px",wa[Oa].style.width="30px"),wa[Oa].style.margin="0px",wa[Oa].style.boxShadow="none",La.appendChild(wa[Oa]));null!=ua&&mxUtils.setOpacity(La,ua);null!=O.statusContainer&&"1"!=urlParams.sketch?oa.insertBefore(La,O.statusContainer):oa.appendChild(La);return La}function U(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(F.style.left=58>q.offsetTop-q.offsetHeight/2?"70px":"10px");else{for(var wa= -oa.firstChild;null!=wa;){var ua=wa.nextSibling;"geMenuItem"!=wa.className&&"geItem"!=wa.className||wa.parentNode.removeChild(wa);wa=ua}aa=oa.firstChild;m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;wa=1E3>m||"1"==urlParams.sketch;var La=null;wa||(La=D("diagram"));ua=wa?D("diagram",null,Editor.menuImage):null;null!=ua&&(La=ua);V([La,G(mxResources.get("shapes"),O.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),O.actions.get("image"),wa?Editor.shapesImage: -null),G(mxResources.get("format"),O.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+O.actions.get("formatPanel").shortcut+")",O.actions.get("image"),wa?Editor.formatImage:null)],wa?60:null);ua=D("insert",!0,wa?ja:null);V([ua,G(mxResources.get("delete"),O.actions.get("delete").funct,null,mxResources.get("delete"),O.actions.get("delete"),wa?Editor.trashImage:null)],wa?60:null);411<=m&&(V([Qa,Ta],60),520<=m&&V([X,640<=m?G("",Aa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+ -" +)",Aa,Editor.zoomInImage):null,640<=m?G("",Ka.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Ka,Editor.zoomOutImage):null],60))}null!=La&&(mxEvent.disableContextMenu(La),mxEvent.addGestureListeners(La,mxUtils.bind(this,function(Oa){(mxEvent.isShiftDown(Oa)||mxEvent.isAltDown(Oa)||mxEvent.isMetaDown(Oa)||mxEvent.isControlDown(Oa)||mxEvent.isPopupTrigger(Oa))&&O.appIconClicked(Oa)}),null,null));ua=O.menus.get("language");null!=ua&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<= -m&&"1"!=urlParams.sketch?(null==la&&(ua=da.addMenu("",ua.funct),ua.setAttribute("title",mxResources.get("language")),ua.className="geToolbarButton",ua.style.backgroundImage="url("+Editor.globeImage+")",ua.style.backgroundPosition="center center",ua.style.backgroundRepeat="no-repeat",ua.style.backgroundSize="24px 24px",ua.style.position="absolute",ua.style.height="24px",ua.style.width="24px",ua.style.zIndex="1",ua.style.right="8px",ua.style.cursor="pointer",ua.style.top="1"==urlParams.embed?"12px": -"11px",oa.appendChild(ua),la=ua),O.buttonContainer.style.paddingRight="34px"):(O.buttonContainer.style.paddingRight="4px",null!=la&&(la.parentNode.removeChild(la),la=null))}J.apply(this,arguments);var Y=document.createElement("div");Y.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";Y.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(Y);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&& -(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=m||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search")); -var O=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==O.embedViewport)mxUtils.fit(this.div);else{var wa=parseInt(this.div.offsetLeft),ua=parseInt(this.div.offsetWidth),La=O.embedViewport.x+O.embedViewport.width,Oa=parseInt(this.div.offsetTop),Ca=parseInt(this.div.offsetHeight),Ma=O.embedViewport.y+O.embedViewport.height;this.div.style.left=Math.max(O.embedViewport.x,Math.min(wa,La-ua))+"px";this.div.style.top=Math.max(O.embedViewport.y,Math.min(Oa,Ma-Ca))+"px";this.div.style.height= -Math.min(O.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(O.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=m)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),Y=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>m||708>Y)?this.formatWindow.window.toggleMinimized(): -this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));O=this;var qa=O.editor.graph;O.toolbar=this.createToolbar(O.createDiv("geToolbar"));O.defaultLibraryName=mxResources.get("untitledLibrary");var oa=document.createElement("div");oa.className="geMenubarContainer";var aa=null,da=new Menubar(O,oa);O.statusContainer=O.createStatusContainer();O.statusContainer.style.position="relative";O.statusContainer.style.maxWidth="";O.statusContainer.style.marginTop="7px";O.statusContainer.style.marginLeft= -"6px";O.statusContainer.style.color="gray";O.statusContainer.style.cursor="default";var ia=O.hideCurrentMenu;O.hideCurrentMenu=function(){ia.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var L=O.descriptorChanged;O.descriptorChanged=function(){L.apply(this,arguments);var wa=O.getCurrentFile();if(null!=wa&&null!=wa.getTitle()){var ua=wa.getMode();"google"==ua?ua="googleDrive":"github"==ua?ua="gitHub":"gitlab"==ua?ua="gitLab":"onedrive"==ua&&(ua="oneDrive");ua=mxResources.get(ua); -oa.setAttribute("title",wa.getTitle()+(null!=ua?" ("+ua+")":""))}else oa.removeAttribute("title")};O.setStatusText(O.editor.getStatus());oa.appendChild(O.statusContainer);O.buttonContainer=document.createElement("div");O.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";oa.appendChild(O.buttonContainer);O.menubarContainer=O.buttonContainer;O.tabContainer=document.createElement("div");O.tabContainer.className= -"geTabContainer";O.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";Y=O.diagramContainer.parentNode;var Z=document.createElement("div");Z.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";O.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){Z.style.top="20px";O.titlebar=document.createElement("div");O.titlebar.style.cssText= -"position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var P=document.createElement("div");P.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";O.titlebar.appendChild(P);Y.appendChild(O.titlebar)}P=O.menus.get("viewZoom");var ca=P.funct;P.funct=function(wa,ua){ca.apply(this,arguments);O.menus.addMenuItems(wa,["-","outline","fullscreen"], -ua)};var ja="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,ka="1"==urlParams.sketch?document.createElement("div"):null,q="1"==urlParams.sketch?document.createElement("div"):null,F="1"==urlParams.sketch?document.createElement("div"):null,R=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)F.style.left="10px",F.style.top="10px",q.style.left="10px",q.style.top="60px",ka.style.top="10px",ka.style.right="12px",ka.style.left="",O.diagramContainer.setAttribute("data-bounds",O.diagramContainer.style.top+ -" "+O.diagramContainer.style.left+" "+O.diagramContainer.style.width+" "+O.diagramContainer.style.height),O.diagramContainer.style.top="0px",O.diagramContainer.style.left="0px",O.diagramContainer.style.bottom="0px",O.diagramContainer.style.right="0px",O.diagramContainer.style.width="",O.diagramContainer.style.height="";else{var wa=O.diagramContainer.getAttribute("data-bounds");if(null!=wa){O.diagramContainer.style.background="transparent";O.diagramContainer.removeAttribute("data-bounds");var ua=qa.getGraphBounds(); -wa=wa.split(" ");O.diagramContainer.style.top=wa[0];O.diagramContainer.style.left=wa[1];O.diagramContainer.style.width=ua.width+50+"px";O.diagramContainer.style.height=ua.height+46+"px";O.diagramContainer.style.bottom="";O.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:O.diagramContainer.getBoundingClientRect()}),"*");O.refresh()}F.style.left=O.diagramContainer.offsetLeft+"px";F.style.top=O.diagramContainer.offsetTop-F.offsetHeight-4+ -"px";q.style.display="";q.style.left=O.diagramContainer.offsetLeft-q.offsetWidth-4+"px";q.style.top=O.diagramContainer.offsetTop+"px";ka.style.left=O.diagramContainer.offsetLeft+O.diagramContainer.offsetWidth-ka.offsetWidth+"px";ka.style.top=F.style.top;ka.style.right="";O.bottomResizer.style.left=O.diagramContainer.offsetLeft+(O.diagramContainer.offsetWidth-O.bottomResizer.offsetWidth)/2+"px";O.bottomResizer.style.top=O.diagramContainer.offsetTop+O.diagramContainer.offsetHeight-O.bottomResizer.offsetHeight/ -2-1+"px";O.rightResizer.style.left=O.diagramContainer.offsetLeft+O.diagramContainer.offsetWidth-O.rightResizer.offsetWidth/2-1+"px";O.rightResizer.style.top=O.diagramContainer.offsetTop+(O.diagramContainer.offsetHeight-O.bottomResizer.offsetHeight)/2+"px"}O.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";O.rightResizer.style.visibility=O.bottomResizer.style.visibility;oa.style.display="none";F.style.visibility="";ka.style.visibility=""}),W=O.actions.get("fullscreen"),T=G("",W.funct, -null,mxResources.get(""),W,Editor.fullscreenImage),ba=mxUtils.bind(this,function(){T.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";R()});W=mxUtils.bind(this,function(){b(O,!0);O.initFormatWindow();var wa=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(wa.x+wa.width+4,wa.y);ba()}); -O.addListener("inlineFullscreenChanged",ba);O.addListener("editInlineStart",W);"1"==urlParams.embedInline&&O.addListener("darkModeChanged",W);O.addListener("editInlineStop",mxUtils.bind(this,function(wa){O.diagramContainer.style.width="10px";O.diagramContainer.style.height="10px";O.diagramContainer.style.border="";O.bottomResizer.style.visibility="hidden";O.rightResizer.style.visibility="hidden";F.style.visibility="hidden";ka.style.visibility="hidden";q.style.display="none"}));if(null!=O.hoverIcons){var ha= -O.hoverIcons.update;O.hoverIcons.update=function(){qa.freehand.isDrawing()||ha.apply(this,arguments)}}if(null!=qa.freehand){var ra=qa.freehand.createStyle;qa.freehand.createStyle=function(wa){return ra.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){q.className="geToolbarContainer";ka.className="geToolbarContainer";F.className="geToolbarContainer";oa.className="geToolbarContainer";O.picker=q;var ta=!1;"1"!=urlParams.embed&&"atlassian"!=O.getServiceName()&&(mxEvent.addListener(oa,"mouseenter", -function(){O.statusContainer.style.display="inline-block"}),mxEvent.addListener(oa,"mouseleave",function(){ta||(O.statusContainer.style.display="none")}));var ma=mxUtils.bind(this,function(wa){null!=O.notificationBtn&&(null!=wa?O.notificationBtn.setAttribute("title",wa):O.notificationBtn.removeAttribute("title"))});oa.style.visibility=20>oa.clientWidth?"hidden":"";O.editor.addListener("statusChanged",mxUtils.bind(this,function(){O.setStatusText(O.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!= -O.getServiceName())if(O.statusContainer.style.display="inline-block",ta=!0,1==O.statusContainer.children.length&&""==O.editor.getStatus())oa.style.visibility="hidden";else{if(0==O.statusContainer.children.length||1==O.statusContainer.children.length&&"function"===typeof O.statusContainer.firstChild.getAttribute&&null==O.statusContainer.firstChild.getAttribute("class")){var wa=null!=O.statusContainer.firstChild&&"function"===typeof O.statusContainer.firstChild.getAttribute?O.statusContainer.firstChild.getAttribute("title"): -O.editor.getStatus();ma(wa);var ua=O.getCurrentFile();ua=null!=ua?ua.savingStatusKey:DrawioFile.prototype.savingStatusKey;wa==mxResources.get(ua)+"..."?(O.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(ua))+'..."src="'+Editor.tailSpin+'">',O.statusContainer.style.display="inline-block",ta=!0):6<O.buttonContainer.clientWidth&&(O.statusContainer.style.display="none",ta=!1)}else O.statusContainer.style.display="inline-block",ma(null),ta=!0;oa.style.visibility=20>oa.clientWidth&& -!ta?"hidden":""}}));S=D("diagram",null,Editor.menuImage);S.style.boxShadow="none";S.style.padding="6px";S.style.margin="0px";F.appendChild(S);mxEvent.disableContextMenu(S);mxEvent.addGestureListeners(S,mxUtils.bind(this,function(wa){(mxEvent.isShiftDown(wa)||mxEvent.isAltDown(wa)||mxEvent.isMetaDown(wa)||mxEvent.isControlDown(wa)||mxEvent.isPopupTrigger(wa))&&this.appIconClicked(wa)}),null,null);O.statusContainer.style.position="";O.statusContainer.style.display="none";O.statusContainer.style.margin= -"0px";O.statusContainer.style.padding="6px 0px";O.statusContainer.style.maxWidth=Math.min(m-240,280)+"px";O.statusContainer.style.display="inline-block";O.statusContainer.style.textOverflow="ellipsis";O.buttonContainer.style.position="";O.buttonContainer.style.paddingRight="0px";O.buttonContainer.style.display="inline-block";var pa=document.createElement("a");pa.style.padding="0px";pa.style.boxShadow="none";pa.className="geMenuItem";pa.style.display="inline-block";pa.style.width="40px";pa.style.height= -"12px";pa.style.marginBottom="-2px";pa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";pa.style.backgroundPosition="top center";pa.style.backgroundRepeat="no-repeat";pa.setAttribute("title","Minimize");var za=!1,Ba=mxUtils.bind(this,function(){q.innerText="";if(!za){var wa=function(ua,La,Oa,Ca){null!=La&&ua.setAttribute("title",La);ua.style.cursor=null!=Oa?Oa:"default";ua.style.margin="2px 0px";q.appendChild(ua);mxUtils.br(q);null!=Ca&&(ua.style.position="relative",ua.style.overflow= -"visible",La=document.createElement("div"),La.style.position="absolute",La.style.left="34px",La.style.top="28px",La.style.fontSize="8px",mxUtils.write(La,Ca),ua.appendChild(La));return ua};wa(O.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+" (A)",null,"A");wa(O.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;", -140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");wa(O.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");wa(O.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");(function(){var ua=new mxCell("",new mxGeometry(0,0,qa.defaultEdgeLength, -0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");ua.geometry.setTerminalPoint(new mxPoint(0,0),!0);ua.geometry.setTerminalPoint(new mxPoint(ua.geometry.width,0),!1);ua.geometry.points=[];ua.geometry.relative=!0;ua.edge=!0;wa(O.sidebar.createEdgeTemplateFromCells([ua],ua.geometry.width,ua.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");ua=ua.clone();ua.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;"; -ua.geometry.width=qa.defaultEdgeLength+20;ua.geometry.setTerminalPoint(new mxPoint(0,20),!0);ua.geometry.setTerminalPoint(new mxPoint(ua.geometry.width,20),!1);wa(O.sidebar.createEdgeTemplateFromCells([ua],ua.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"))})();(function(ua,La,Oa,Ca){ua=G("",ua.funct,null,La,ua,Oa);ua.style.width="40px";ua.style.height="34px";ua.style.opacity="0.7";return wa(ua,null,"pointer",Ca)})(O.actions.get("insertFreehand"),mxResources.get("freehand")+ -" (X)",Editor.freehandImage,"X");S=D("insert",null,Editor.plusImage);S.style.boxShadow="none";S.style.opacity="0.7";S.style.padding="6px";S.style.margin="0px";S.style.height="34px";S.style.width="37px";wa(S,null,"pointer")}"1"!=urlParams.embedInline&&q.appendChild(pa)});mxEvent.addListener(pa,"click",mxUtils.bind(this,function(){za?(mxUtils.setPrefixedStyle(q.style,"transform","translate(0, -50%)"),q.style.padding="8px 6px 4px",q.style.top="50%",q.style.bottom="",q.style.height="",pa.style.backgroundImage= -"url("+mxWindow.prototype.normalizeImage+")",pa.style.width="40px",pa.style.height="12px",pa.setAttribute("title","Minimize"),za=!1,Ba()):(q.innerText="",q.appendChild(pa),mxUtils.setPrefixedStyle(q.style,"transform","translate(0, 0)"),q.style.top="",q.style.bottom="12px",q.style.padding="0px",q.style.height="24px",pa.style.height="24px",pa.style.backgroundImage="url("+Editor.plusImage+")",pa.setAttribute("title",mxResources.get("insert")),pa.style.width="24px",za=!0)}));Ba();O.addListener("darkModeChanged", -Ba);O.addListener("sketchModeChanged",Ba)}else O.editor.addListener("statusChanged",mxUtils.bind(this,function(){O.setStatusText(O.editor.getStatus())}));if(null!=P){var Ia=function(wa){if(mxEvent.isAltDown(wa))O.hideCurrentMenu(),O.actions.get("customZoom").funct(),mxEvent.consume(wa);else if("geItem"!=mxEvent.getSource(wa).className||mxEvent.isShiftDown(wa))O.hideCurrentMenu(),O.actions.get("smartFit").funct(),mxEvent.consume(wa)},Aa=O.actions.get("zoomIn"),Ka=O.actions.get("zoomOut");W=O.actions.get("resetView"); -var Da=O.actions.get("undo"),Ra=O.actions.get("redo"),Qa=G("",Da.funct,null,mxResources.get("undo")+" ("+Da.shortcut+")",Da,Editor.undoImage),Ta=G("",Ra.funct,null,mxResources.get("redo")+" ("+Ra.shortcut+")",Ra,Editor.redoImage);if(null!=ka){W=function(){N.style.display=null!=O.pages&&("0"!=urlParams.pages||1<O.pages.length||Editor.pagesVisible)?"inline-block":"none"};var Za=function(){N.innerText="";if(null!=O.currentPage){mxUtils.write(N,O.currentPage.getName());var wa=null!=O.pages?O.pages.length: -1,ua=O.getPageIndex(O.currentPage);ua=null!=ua?ua+1:1;var La=O.currentPage.getId();N.setAttribute("title",O.currentPage.getName()+" ("+ua+"/"+wa+")"+(null!=La?" ["+La+"]":""))}},Pa=O.actions.get("delete"),y=G("",Pa.funct,null,mxResources.get("delete"),Pa,Editor.trashImage);y.style.opacity="0.1";F.appendChild(y);Pa.addListener("stateChanged",function(){y.style.opacity=Pa.enabled?"":"0.1"});var M=function(){Qa.style.display=0<O.editor.undoManager.history.length||qa.isEditing()?"inline-block":"none"; -Ta.style.display=Qa.style.display;Qa.style.opacity=Da.enabled?"":"0.1";Ta.style.opacity=Ra.enabled?"":"0.1"};F.appendChild(Qa);F.appendChild(Ta);Da.addListener("stateChanged",M);Ra.addListener("stateChanged",M);M();var N=this.createPageMenuTab(!1,!0);N.style.display="none";N.style.position="";N.style.marginLeft="";N.style.top="";N.style.left="";N.style.height="100%";N.style.lineHeight="";N.style.borderStyle="none";N.style.padding="3px 0";N.style.margin="0px";N.style.background="";N.style.border=""; -N.style.boxShadow="none";N.style.verticalAlign="top";N.style.width="auto";N.style.maxWidth="160px";N.style.position="relative";N.style.padding="6px";N.style.textOverflow="ellipsis";N.style.opacity="0.8";ka.appendChild(N);O.editor.addListener("pagesPatched",Za);O.editor.addListener("pageSelected",Za);O.editor.addListener("pageRenamed",Za);O.editor.addListener("fileLoaded",Za);Za();O.addListener("fileDescriptorChanged",W);O.addListener("pagesVisibleChanged",W);O.editor.addListener("pagesPatched",W); -W();W=G("",Ka.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",Ka,Editor.zoomOutImage);ka.appendChild(W);var S=da.addMenu("100%",P.funct);S.setAttribute("title",mxResources.get("zoom"));S.innerHTML="100%";S.style.display="inline-block";S.style.color="inherit";S.style.cursor="pointer";S.style.textAlign="center";S.style.whiteSpace="nowrap";S.style.paddingRight="10px";S.style.textDecoration="none";S.style.verticalAlign="top";S.style.padding="6px 0";S.style.fontSize="14px"; -S.style.width="40px";S.style.opacity="0.4";ka.appendChild(S);P=G("",Aa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Aa,Editor.zoomInImage);ka.appendChild(P);"1"==urlParams.embedInline?(ka.appendChild(T),P=O.actions.get("exit"),ka.appendChild(G("",P.funct,null,mxResources.get("exit"),P,Editor.closeImage))):T.parentNode.removeChild(T);O.tabContainer.style.visibility="hidden";oa.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;"; -F.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";ka.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";Z.appendChild(F);Z.appendChild(ka);q.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;"; -mxClient.IS_POINTER&&(q.style.touchAction="none");Z.appendChild(q);window.setTimeout(function(){mxUtils.setPrefixedStyle(q.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(Z)}else{var X=G("",Ia,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",W,Editor.zoomFitImage);oa.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";S=da.addMenu("100%", -P.funct);S.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");S.style.whiteSpace="nowrap";S.style.paddingRight="10px";S.style.textDecoration="none";S.style.textDecoration="none";S.style.overflow="hidden";S.style.visibility="hidden";S.style.textAlign="center";S.style.cursor="pointer";S.style.height=parseInt(O.tabContainerHeight)-1+"px";S.style.lineHeight=parseInt(O.tabContainerHeight)+1+"px";S.style.position="absolute";S.style.display="block";S.style.fontSize="12px";S.style.width="59px"; -S.style.right="0px";S.style.bottom="0px";S.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";S.style.backgroundPosition="right 6px center";S.style.backgroundRepeat="no-repeat";Z.appendChild(S)}(function(wa){mxEvent.addListener(wa,"click",Ia);var ua=mxUtils.bind(this,function(){wa.innerText="";mxUtils.write(wa,Math.round(100*O.editor.graph.view.scale)+"%")});O.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ua);O.editor.addListener("resetGraphView",ua);O.editor.addListener("pageSelected", -ua)})(S);var fa=O.setGraphEnabled;O.setGraphEnabled=function(){fa.apply(this,arguments);null!=this.tabContainer&&(S.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==ka?this.tabContainerHeight+"px":"0px")}}Z.appendChild(oa);Z.appendChild(O.diagramContainer);Y.appendChild(Z);O.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=m)&&"1"!=urlParams.embedInline&&b(this,!0);null==ka&&Z.appendChild(O.tabContainer); -var la=null;U();mxEvent.addListener(window,"resize",function(){U();null!=O.sidebarWindow&&O.sidebarWindow.window.fit();null!=O.formatWindow&&O.formatWindow.window.fit();null!=O.actions.outlineWindow&&O.actions.outlineWindow.window.fit();null!=O.actions.layersWindow&&O.actions.layersWindow.window.fit();null!=O.menus.tagsWindow&&O.menus.tagsWindow.window.fit();null!=O.menus.findWindow&&O.menus.findWindow.window.fit();null!=O.menus.findReplaceWindow&&O.menus.findReplaceWindow.window.fit()});if("1"== -urlParams.embedInline){document.body.style.cursor="text";q.style.transform="";mxEvent.addGestureListeners(O.diagramContainer.parentNode,function(wa){mxEvent.getSource(wa)==O.diagramContainer.parentNode&&(O.embedExitPoint=new mxPoint(mxEvent.getClientX(wa),mxEvent.getClientY(wa)),O.sendEmbeddedSvgExport())});Y=document.createElement("div");Y.style.position="absolute";Y.style.width="10px";Y.style.height="10px";Y.style.borderRadius="5px";Y.style.border="1px solid gray";Y.style.background="#ffffff";Y.style.cursor= -"row-resize";O.diagramContainer.parentNode.appendChild(Y);O.bottomResizer=Y;var xa=null,sa=null,ya=null,Fa=null;mxEvent.addGestureListeners(Y,function(wa){Fa=parseInt(O.diagramContainer.style.height);sa=mxEvent.getClientY(wa);qa.popupMenuHandler.hideMenu();mxEvent.consume(wa)});Y=Y.cloneNode(!1);Y.style.cursor="col-resize";O.diagramContainer.parentNode.appendChild(Y);O.rightResizer=Y;mxEvent.addGestureListeners(Y,function(wa){ya=parseInt(O.diagramContainer.style.width);xa=mxEvent.getClientX(wa);qa.popupMenuHandler.hideMenu(); -mxEvent.consume(wa)});mxEvent.addGestureListeners(document.body,null,function(wa){var ua=!1;null!=xa&&(O.diagramContainer.style.width=Math.max(20,ya+mxEvent.getClientX(wa)-xa)+"px",ua=!0);null!=sa&&(O.diagramContainer.style.height=Math.max(20,Fa+mxEvent.getClientY(wa)-sa)+"px",ua=!0);ua&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:O.diagramContainer.getBoundingClientRect()}),"*"),R(),O.refresh())},function(wa){null==xa&&null== -sa||mxEvent.consume(wa);sa=xa=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";O.bottomResizer.style.visibility="hidden";O.rightResizer.style.visibility="hidden";F.style.visibility="hidden";ka.style.visibility="hidden";q.style.display="none"}"1"==urlParams.prefetchFonts&&O.editor.loadFonts()}}}; -(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,e,k,m,C,p,E){this.file=b;this.id=e;this.content=k;this.modifiedDate=m;this.createdDate=C;this.isResolved=p;this.user=E;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,k,m,C){e()};DrawioComment.prototype.editComment=function(b,e,k){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,k,m,C){this.id=b;this.email=e;this.displayName=k;this.pictureUrl=m;this.locale=C};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfDraftTooBigErr=Draft size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration?\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement; +this.getCurrentFile()||"1"==urlParams.embed)};var F=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(D,G){null!=G.shortcut&&900>m&&!mxClient.IS_IOS?D.firstChild.nextSibling.setAttribute("title",G.shortcut):F.apply(this,arguments)};var K=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){K.apply(this,arguments);if(null!=this.userElement){var D=this.userElement;D.style.cssText="position:relative;cursor:pointer;display:"+D.style.display;D.className="geToolbarButton"; +D.innerText="";D.style.backgroundImage="url("+Editor.userImage+")";D.style.backgroundPosition="center center";D.style.backgroundRepeat="no-repeat";D.style.backgroundSize="24px 24px";D.style.height="24px";D.style.width="24px";var G=mxResources.get("changeUser");if("none"!=D.style.display){D.style.display="inline-block";var W=this.getCurrentFile();if(null!=W&&W.isRealtimeEnabled()&&W.isRealtimeSupported()){var T=document.createElement("img");T.setAttribute("border","0");T.style.position="absolute"; +T.style.left="18px";T.style.top="2px";T.style.width="12px";T.style.height="12px";var Z=W.getRealtimeError();W=W.getRealtimeState();G+=" ("+mxResources.get("realtimeCollaboration");1==W?(T.src=Editor.syncImage,G+=mxResources.get("online")):(T.src=Editor.syncProblemImage,G=null!=Z&&null!=Z.message?G+Z.message:G+mxResources.get("disconnected"));D.style.marginRight="6px";D.appendChild(T);G+=")"}}D.setAttribute("title",G)}};var P=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer= +function(){P.apply(this,arguments);null!=this.shareButton&&(this.shareButton.style.display="none")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var D=document.createElement("div");D.style.display="inline-block";D.style.position="relative";D.style.marginTop="6px";D.style.marginRight="4px";var G=document.createElement("a");G.className="geMenuItem gePrimaryBtn";G.style.marginLeft="8px";G.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!= +urlParams.saveAndExit){var W="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(G,W);G.setAttribute("title",W);mxEvent.addListener(G,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));D.appendChild(G)}}else mxUtils.write(G,mxResources.get("save")),G.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(G,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),D.appendChild(G), +"1"==urlParams.saveAndExit&&(G=document.createElement("a"),mxUtils.write(G,mxResources.get("saveAndExit")),G.setAttribute("title",mxResources.get("saveAndExit")),G.className="geMenuItem",G.style.marginLeft="6px",G.style.padding="6px",mxEvent.addListener(G,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),D.appendChild(G));"1"!=urlParams.noExitBtn&&(G=document.createElement("a"),W="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(G, +W),G.setAttribute("title",W),G.className="geMenuItem",G.style.marginLeft="6px",G.style.padding="6px",mxEvent.addListener(G,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),D.appendChild(G));this.buttonContainer.appendChild(D);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var d=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(D,G){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker, +D)){var W=mxUtils.getOffset(this.editorUi.picker);W.x+=this.editorUi.picker.offsetWidth+4;W.y+=D.offsetTop-G.height/2+16;return W}var T=d.apply(this,arguments);W=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);T.x+=W.x-16;T.y+=W.y;return T};var f=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(D,G,W){var T=this.editorUi.editor.graph;D.smartSeparators=!0;f.apply(this,arguments);"1"==urlParams.sketch?T.isEnabled()&&(D.addSeparator(),1==T.getSelectionCount()&&this.addMenuItems(D, +["-","lockUnlock"],null,W)):1==T.getSelectionCount()?(T.isCellFoldable(T.getSelectionCell())&&this.addMenuItems(D,T.isCellCollapsed(G)?["expand"]:["collapse"],null,W),this.addMenuItems(D,["collapsible","-","lockUnlock","enterGroup"],null,W),D.addSeparator(),this.addSubmenu("layout",D)):T.isSelectionEmpty()&&T.isEnabled()?(D.addSeparator(),this.addMenuItems(D,["editData"],null,W),D.addSeparator(),this.addSubmenu("layout",D),this.addSubmenu("insert",D),this.addMenuItems(D,["-","exitGroup"],null,W)): +T.isEnabled()&&this.addMenuItems(D,["-","lockUnlock"],null,W)};var g=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(D,G,W){g.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(D,["copyAsImage"],null,W)};EditorUi.prototype.toggleFormatPanel=function(D){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=D?D:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0}; +var x=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&& +(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null);x.apply(this,arguments)};var y=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(D){y.apply(this,arguments);if(D){var G=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=G&& +null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=G||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var u=Menus.prototype.init;Menus.prototype.init=function(){u.apply(this,arguments);var D=this.editorUi,G=D.actions.put("togglePagesVisible", +new Action(mxResources.get("pages"),function(S){D.setPagesVisible(!Editor.pagesVisible)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.pagesVisible});D.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){k(D)},null,null,Editor.ctrlKey+"+Shift+K"));G=D.actions.put("toggleFormat",new Action(mxResources.get("format"),function(){b(D)}));G.shortcut=D.actions.get("formatPanel").shortcut;G.setToggleAction(!0);G.setSelectedCallback(mxUtils.bind(this,function(){return null!= +D.formatWindow&&D.formatWindow.window.isVisible()}));EditorUi.enablePlantUml&&!D.isOffline()&&D.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var S=new ParseDialog(D,mxResources.get("plantUml")+"...","plantUml");D.showDialog(S.container,620,420,!0,!1);S.init()}));D.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var S=new ParseDialog(D,mxResources.get("mermaid")+"...","mermaid");D.showDialog(S.container,620,420,!0,!1);S.init()}));var W= +this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(S,fa){var ia=this.editorUi.editor.graph,M=ia.getSelectionCell();W.call(this,S,M,null,fa);this.addMenuItems(S,["editTooltip"],fa);ia.model.isVertex(M)&&this.addMenuItems(S,["editGeometry"],fa);this.addMenuItems(S,["-","edit"],fa)})));this.addPopupMenuCellEditItems=function(S,fa,ia,M){S.addSeparator();this.addSubmenu("editCell",S,M,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,function(S,fa){var ia= +D.getCurrentFile();D.menus.addMenuItems(S,["new"],fa);D.menus.addSubmenu("openFrom",S,fa);isLocalStorage&&this.addSubmenu("openRecent",S,fa);S.addSeparator(fa);D.menus.addMenuItems(S,["-","save"],fa);null!=ia&&ia.constructor==DriveFile||D.menus.addMenuItems(S,["saveAs"],fa);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||ia.constructor==LocalFile&&null==ia.fileHandle||D.menus.addMenuItems(S,["synchronize"],fa);null!=ia&&ia.constructor==DriveFile?D.menus.addMenuItems(S,"- rename makeCopy - moveToFolder openFolder".split(" "), +fa):(D.menus.addMenuItems(S,["-","rename"],fa),D.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(S,["upload"],fa):D.menus.addMenuItems(S,["makeCopy"],fa));null!=ia&&ia.isRevisionHistorySupported()&&D.menus.addMenuItems(S,["-","revisionHistory"],fa);if(null!=ia){if(null!=D.fileNode&&"1"!=urlParams.embedInline){var M=null!=ia.getTitle()?ia.getTitle():D.defaultFilename;(ia.constructor==DriveFile&&null!=ia.sync&&ia.sync.isConnected()||!/(\.html)$/i.test(M)&& +!/(\.svg)$/i.test(M))&&this.addMenuItems(S,["properties"],fa)}ia.constructor==DriveFile&&D.menus.addMenuItems(S,["share"],fa)}D.menus.addMenuItems(S,["-","autosave"],fa)})));this.put("diagram",new Menu(mxUtils.bind(this,function(S,fa){var ia=D.getCurrentFile();D.menus.addSubmenu("extras",S,fa,mxResources.get("preferences"));S.addSeparator(fa);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)D.menus.addMenuItems(S,"new open - synchronize - save saveAs -".split(" "),fa);else if("1"==urlParams.embed|| +D.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&D.menus.addMenuItems(S,["-","save"],fa);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||D.mode==App.MODE_ATLAS)D.menus.addMenuItems(S,["saveAndExit"],fa),null!=ia&&ia.isRevisionHistorySupported()&&D.menus.addMenuItems(S,["revisionHistory"],fa);S.addSeparator(fa)}else D.mode==App.MODE_ATLAS?D.menus.addMenuItems(S,["save","synchronize","-"],fa):"1"!=urlParams.noFileMenu&&("1"!=urlParams.sketch? +(D.menus.addMenuItems(S,["new"],fa),D.menus.addSubmenu("openFrom",S,fa),isLocalStorage&&this.addSubmenu("openRecent",S,fa),S.addSeparator(fa),null!=ia&&(ia.constructor==DriveFile&&D.menus.addMenuItems(S,["share"],fa),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||ia.constructor==LocalFile||D.menus.addMenuItems(S,["synchronize"],fa)),S.addSeparator(fa),D.menus.addSubmenu("save",S,fa)):D.menus.addSubmenu("file",S,fa));D.menus.addSubmenu("exportAs",S,fa);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp? +D.menus.addMenuItems(S,["import"],fa):"1"!=urlParams.noFileMenu&&D.menus.addSubmenu("importFrom",S,fa);D.menus.addMenuItems(S,["-","findReplace"],fa);D.commentsSupported()&&D.menus.addMenuItems(S,["comments","-"],fa);D.menus.addMenuItems(S,["toggleFormat","layers","tags","-","pageSetup"],fa);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||D.menus.addMenuItems(S,["print"],fa);"1"!=urlParams.sketch&&null!=ia&&null!=D.fileNode&&"1"!=urlParams.embedInline&&(ia=null!=ia.getTitle()?ia.getTitle(): +D.defaultFilename,/(\.html)$/i.test(ia)||/(\.svg)$/i.test(ia)||this.addMenuItems(S,["-","properties"]));S.addSeparator(fa);D.menus.addSubmenu("help",S,fa);"1"==urlParams.embed||D.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||D.mode==App.MODE_ATLAS)&&D.menus.addMenuItems(S,["-","exit"],fa):"1"!=urlParams.noFileMenu&&D.menus.addMenuItems(S,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(S,fa){var ia=D.getCurrentFile();null!=ia&&ia.constructor==DriveFile?D.menus.addMenuItems(S, +["save","makeCopy","-","rename","moveToFolder"],fa):(D.menus.addMenuItems(S,["save","saveAs","-","rename"],fa),D.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(S,["upload"],fa):D.menus.addMenuItems(S,["makeCopy"],fa));D.menus.addMenuItems(S,["-","autosave"],fa);null!=ia&&ia.isRevisionHistorySupported()&&D.menus.addMenuItems(S,["-","revisionHistory"],fa)})));var T=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(S,fa){T.funct(S, +fa);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||D.menus.addMenuItems(S,["publishLink"],fa);D.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(S.addSeparator(fa),D.menus.addSubmenu("embed",S,fa))})));var Z=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(S,fa){D.menus.addInsertTableCellItem(S,fa)})));var N=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(S,fa){N.funct(S,fa);this.addMenuItems(S,["-","ruler","-","pageScale"],fa)})));this.put("extras",new Menu(mxUtils.bind(this, +function(S,fa){null==Z||"1"==urlParams.embed&&null!=urlParams.lang||D.menus.addSubmenu("language",S,fa);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&D.mode!=App.MODE_ATLAS&&D.menus.addSubmenu("theme",S,fa);D.menus.addSubmenu("units",S,fa);S.addSeparator(fa);"1"!=urlParams.sketch&&D.menus.addMenuItems(S,["scrollbars","-","tooltips","copyConnect","collapseExpand"],fa);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&D.mode!=App.MODE_ATLAS&& +D.menus.addMenuItems(S,["-","showStartScreen","search","scratchpad"],fa);S.addSeparator(fa);"1"==urlParams.sketch&&D.menus.addMenuItems(S,["copyConnect","collapseExpand","tooltips","-"],fa);EditorUi.isElectronApp&&D.menus.addMenuItems(S,["-","spellCheck","autoBkp","drafts","-"],fa);var ia=D.getCurrentFile();null!=ia&&ia.isRealtimeEnabled()&&ia.isRealtimeSupported()&&this.addMenuItems(S,["-","showRemoteCursors","shareCursor","-"],fa);Graph.translateDiagram&&D.menus.addMenuItems(S,["diagramLanguage"], +fa);D.mode!=App.MODE_ATLAS&&D.menus.addMenuItem(S,"configuration",fa);"1"!=urlParams.sketch&&!D.isOfflineApp()&&isLocalStorage&&D.mode!=App.MODE_ATLAS&&D.menus.addMenuItem(S,"plugins",fa);S.addSeparator(fa)})));mxUtils.bind(this,function(){var S=this.get("insert"),fa=S.funct;S.funct=function(ia,M){"1"==urlParams.sketch?(D.menus.addMenuItems(ia,["toggleShapes"],M),D.menus.addSubmenu("table",ia,M),ia.addSeparator(M),D.insertTemplateEnabled&&!D.isOffline()&&D.menus.addMenuItems(ia,["insertTemplate"], +M),D.menus.addMenuItems(ia,["insertImage","insertLink","-"],M),D.menus.addSubmenu("insertAdvanced",ia,M,mxResources.get("advanced")),D.menus.addSubmenu("layout",ia,M)):(fa.apply(this,arguments),D.menus.addSubmenu("table",ia,M))}})();var qa="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),oa=function(S,fa,ia,M){S.addItem(ia,null,mxUtils.bind(this,function(){var aa=new CreateGraphDialog(D,ia,M);D.showDialog(aa.container,620,420,!0,!1);aa.init()}),fa)}; +this.put("insertLayout",new Menu(mxUtils.bind(this,function(S,fa){for(var ia=0;ia<qa.length;ia++)"-"==qa[ia]?S.addSeparator(fa):oa(S,fa,mxResources.get(qa[ia])+"...",qa[ia])})))};EditorUi.prototype.installFormatToolbar=function(D){var G=this.editor.graph,W=document.createElement("div");W.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";G.getSelectionModel().addListener(mxEvent.CHANGE, +mxUtils.bind(this,function(T,Z){0<G.getSelectionCount()?(D.appendChild(W),W.innerHTML="Selected: "+G.getSelectionCount()):null!=W.parentNode&&W.parentNode.removeChild(W)}))};var H=!1;EditorUi.prototype.initFormatWindow=function(){if(!H&&null!=this.formatWindow){H=!0;var D=this.formatWindow.window.toggleMinimized,G=240;this.formatWindow.window.toggleMinimized=function(){D.apply(this,arguments);this.minimized?(G=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px", +this.div.style.left=parseInt(this.div.style.left)+G-140+"px"):(this.div.style.width=G+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-G+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(W){mxEvent.getSource(W)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var J=EditorUi.prototype.init;EditorUi.prototype.init=function(){function D(ua,za,Fa){var Ba= +N.menus.get(ua),Ea=fa.addMenu(mxResources.get(ua),mxUtils.bind(this,function(){Ba.funct.apply(this,arguments)}),S);Ea.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ea.style.display="inline-block";Ea.style.boxSizing="border-box";Ea.style.top="6px";Ea.style.marginRight="6px";Ea.style.height="30px";Ea.style.paddingTop="6px";Ea.style.paddingBottom="6px";Ea.style.cursor="pointer";Ea.setAttribute("title",mxResources.get(ua));N.menus.menuCreated(Ba,Ea,"geMenuItem");null!=Fa?(Ea.style.backgroundImage= +"url("+Fa+")",Ea.style.backgroundPosition="center center",Ea.style.backgroundRepeat="no-repeat",Ea.style.backgroundSize="24px 24px",Ea.style.width="34px",Ea.innerText=""):za||(Ea.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Ea.style.backgroundPosition="right 6px center",Ea.style.backgroundRepeat="no-repeat",Ea.style.paddingRight="22px");return Ea}function G(ua,za,Fa,Ba,Ea,Oa){var Pa=document.createElement("a");Pa.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem"; +Pa.style.display="inline-block";Pa.style.boxSizing="border-box";Pa.style.height="30px";Pa.style.padding="6px";Pa.style.position="relative";Pa.style.verticalAlign="top";Pa.style.top="0px";"1"==urlParams.sketch&&(Pa.style.borderStyle="none",Pa.style.boxShadow="none",Pa.style.padding="6px",Pa.style.margin="0px");null!=N.statusContainer?oa.insertBefore(Pa,N.statusContainer):oa.appendChild(Pa);null!=Oa?(Pa.style.backgroundImage="url("+Oa+")",Pa.style.backgroundPosition="center center",Pa.style.backgroundRepeat= +"no-repeat",Pa.style.backgroundSize="24px 24px",Pa.style.width="34px"):mxUtils.write(Pa,ua);mxEvent.addListener(Pa,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(bb){bb.preventDefault()}));mxEvent.addListener(Pa,"click",function(bb){"disabled"!=Pa.getAttribute("disabled")&&za(bb);mxEvent.consume(bb)});null==Fa&&(Pa.style.marginRight="4px");null!=Ba&&Pa.setAttribute("title",Ba);null!=Ea&&(ua=function(){Ea.isEnabled()?(Pa.removeAttribute("disabled"),Pa.style.cursor="pointer"): +(Pa.setAttribute("disabled","disabled"),Pa.style.cursor="default")},Ea.addListener("stateChanged",ua),qa.addListener("enabledChanged",ua),ua());return Pa}function W(ua,za,Fa){Fa=document.createElement("div");Fa.className="geMenuItem";Fa.style.display="inline-block";Fa.style.verticalAlign="top";Fa.style.marginRight="6px";Fa.style.padding="0 4px 0 4px";Fa.style.height="30px";Fa.style.position="relative";Fa.style.top="0px";"1"==urlParams.sketch&&(Fa.style.boxShadow="none");for(var Ba=0;Ba<ua.length;Ba++)null!= +ua[Ba]&&("1"==urlParams.sketch&&(ua[Ba].style.padding="10px 8px",ua[Ba].style.width="30px"),ua[Ba].style.margin="0px",ua[Ba].style.boxShadow="none",Fa.appendChild(ua[Ba]));null!=za&&mxUtils.setOpacity(Fa,za);null!=N.statusContainer&&"1"!=urlParams.sketch?oa.insertBefore(Fa,N.statusContainer):oa.appendChild(Fa);return Fa}function T(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(E.style.left=58>q.offsetTop-q.offsetHeight/2?"70px":"10px");else{for(var ua=oa.firstChild;null!=ua;){var za=ua.nextSibling; +"geMenuItem"!=ua.className&&"geItem"!=ua.className||ua.parentNode.removeChild(ua);ua=za}S=oa.firstChild;m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;ua=1E3>m||"1"==urlParams.sketch;var Fa=null;ua||(Fa=D("diagram"));za=ua?D("diagram",null,Editor.menuImage):null;null!=za&&(Fa=za);W([Fa,G(mxResources.get("shapes"),N.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),N.actions.get("image"),ua?Editor.shapesImage:null),G(mxResources.get("format"),N.actions.get("toggleFormat").funct, +null,mxResources.get("format")+" ("+N.actions.get("formatPanel").shortcut+")",N.actions.get("image"),ua?Editor.formatImage:null)],ua?60:null);var Ba=D("insert",!0,ua?ca:null);W([Ba,G(mxResources.get("delete"),N.actions.get("delete").funct,null,mxResources.get("delete"),N.actions.get("delete"),ua?Editor.trashImage:null)],ua?60:null);411<=m&&(W([Ta,Za],60),520<=m&&W([ha,640<=m?G("",La.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",La,Editor.zoomInImage):null,640<=m?G("",Da.funct,!0,mxResources.get("zoomOut")+ +" ("+Editor.ctrlKey+" -)",Da,Editor.zoomOutImage):null],60))}null!=Fa&&(mxEvent.disableContextMenu(Fa),mxEvent.addGestureListeners(Fa,mxUtils.bind(this,function(Ea){(mxEvent.isShiftDown(Ea)||mxEvent.isAltDown(Ea)||mxEvent.isMetaDown(Ea)||mxEvent.isControlDown(Ea)||mxEvent.isPopupTrigger(Ea))&&N.appIconClicked(Ea)}),null,null));za=N.menus.get("1"==urlParams["live-ui"]?"theme":"language");null!=za&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=m&&"1"!=urlParams.embed&&"1"!=urlParams.sketch? +(null==wa&&(Ba=fa.addMenu("",za.funct),Ba.setAttribute("title",mxResources.get("1"==urlParams["live-ui"]?"preferences":"language")),Ba.className="geToolbarButton",Ba.style.backgroundImage="url("+Editor.globeImage+")",Ba.style.backgroundPosition="center center",Ba.style.backgroundRepeat="no-repeat",Ba.style.backgroundSize="22px 22px",Ba.style.position="absolute",Ba.style.height="24px",Ba.style.width="24px",Ba.style.zIndex="1",Ba.style.right="8px",Ba.style.cursor="pointer",Ba.style.top="12px",oa.appendChild(Ba), +wa=Ba,"1"==urlParams["live-ui"]&&(za=mxUtils.bind(this,function(){Ba.style.backgroundImage="url('"+(Editor.isDarkMode()?Editor.lightModeImage:Editor.darkModeImage)+"')"}),N.addListener("darkModeChanged",za),za())),N.buttonContainer.style.paddingRight="34px"):(N.buttonContainer.style.paddingRight="4px",null!=wa&&(wa.parentNode.removeChild(wa),wa=null))}J.apply(this,arguments);var Z=document.createElement("div");Z.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;"; +Z.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(Z);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=m||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this, +!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var N=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==N.embedViewport)mxUtils.fit(this.div);else{var ua=parseInt(this.div.offsetLeft),za=parseInt(this.div.offsetWidth),Fa=N.embedViewport.x+N.embedViewport.width,Ba=parseInt(this.div.offsetTop),Ea=parseInt(this.div.offsetHeight),Oa=N.embedViewport.y+ +N.embedViewport.height;this.div.style.left=Math.max(N.embedViewport.x,Math.min(ua,Fa-za))+"px";this.div.style.top=Math.max(N.embedViewport.y,Math.min(Ba,Oa-Ea))+"px";this.div.style.height=Math.min(N.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(N.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=m)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch? +(this.initFormatWindow(),Z=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>m||708>Z)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));N=this;var qa=N.editor.graph;N.toolbar=this.createToolbar(N.createDiv("geToolbar"));N.defaultLibraryName=mxResources.get("untitledLibrary");var oa=document.createElement("div");oa.className="geMenubarContainer";var S=null, +fa=new Menubar(N,oa);N.statusContainer=N.createStatusContainer();N.statusContainer.style.position="relative";N.statusContainer.style.maxWidth="";N.statusContainer.style.marginTop="7px";N.statusContainer.style.marginLeft="6px";N.statusContainer.style.color="gray";N.statusContainer.style.cursor="default";var ia=N.hideCurrentMenu;N.hideCurrentMenu=function(){ia.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var M=N.descriptorChanged;N.descriptorChanged=function(){M.apply(this,arguments); +var ua=N.getCurrentFile();if(null!=ua&&null!=ua.getTitle()){var za=ua.getMode();"google"==za?za="googleDrive":"github"==za?za="gitHub":"gitlab"==za?za="gitLab":"onedrive"==za&&(za="oneDrive");za=mxResources.get(za);oa.setAttribute("title",ua.getTitle()+(null!=za?" ("+za+")":""))}else oa.removeAttribute("title")};N.setStatusText(N.editor.getStatus());oa.appendChild(N.statusContainer);N.buttonContainer=document.createElement("div");N.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;"; +oa.appendChild(N.buttonContainer);N.menubarContainer=N.buttonContainer;N.tabContainer=document.createElement("div");N.tabContainer.className="geTabContainer";N.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";Z=N.diagramContainer.parentNode;var aa=document.createElement("div");aa.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";N.diagramContainer.style.top="1"== +urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){aa.style.top="20px";N.titlebar=document.createElement("div");N.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var X=document.createElement("div");X.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";N.titlebar.appendChild(X); +Z.appendChild(N.titlebar)}X=N.menus.get("viewZoom");var ja=X.funct;X.funct=function(ua,za){ja.apply(this,arguments);N.menus.addMenuItems(ua,["-","outline","fullscreen"],za)};var ca="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,ka="1"==urlParams.sketch?document.createElement("div"):null,q="1"==urlParams.sketch?document.createElement("div"):null,E="1"==urlParams.sketch?document.createElement("div"):null,Q=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)E.style.left="10px",E.style.top= +"10px",q.style.left="10px",q.style.top="60px",ka.style.top="10px",ka.style.right="12px",ka.style.left="",N.diagramContainer.setAttribute("data-bounds",N.diagramContainer.style.top+" "+N.diagramContainer.style.left+" "+N.diagramContainer.style.width+" "+N.diagramContainer.style.height),N.diagramContainer.style.top="0px",N.diagramContainer.style.left="0px",N.diagramContainer.style.bottom="0px",N.diagramContainer.style.right="0px",N.diagramContainer.style.width="",N.diagramContainer.style.height=""; +else{var ua=N.diagramContainer.getAttribute("data-bounds");if(null!=ua){N.diagramContainer.style.background="transparent";N.diagramContainer.removeAttribute("data-bounds");var za=qa.getGraphBounds();ua=ua.split(" ");N.diagramContainer.style.top=ua[0];N.diagramContainer.style.left=ua[1];N.diagramContainer.style.width=za.width+50+"px";N.diagramContainer.style.height=za.height+46+"px";N.diagramContainer.style.bottom="";N.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize", +rect:N.diagramContainer.getBoundingClientRect()}),"*");N.refresh()}E.style.left=N.diagramContainer.offsetLeft+"px";E.style.top=N.diagramContainer.offsetTop-E.offsetHeight-4+"px";q.style.display="";q.style.left=N.diagramContainer.offsetLeft-q.offsetWidth-4+"px";q.style.top=N.diagramContainer.offsetTop+"px";ka.style.left=N.diagramContainer.offsetLeft+N.diagramContainer.offsetWidth-ka.offsetWidth+"px";ka.style.top=E.style.top;ka.style.right="";N.bottomResizer.style.left=N.diagramContainer.offsetLeft+ +(N.diagramContainer.offsetWidth-N.bottomResizer.offsetWidth)/2+"px";N.bottomResizer.style.top=N.diagramContainer.offsetTop+N.diagramContainer.offsetHeight-N.bottomResizer.offsetHeight/2-1+"px";N.rightResizer.style.left=N.diagramContainer.offsetLeft+N.diagramContainer.offsetWidth-N.rightResizer.offsetWidth/2-1+"px";N.rightResizer.style.top=N.diagramContainer.offsetTop+(N.diagramContainer.offsetHeight-N.bottomResizer.offsetHeight)/2+"px"}N.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden": +"";N.rightResizer.style.visibility=N.bottomResizer.style.visibility;oa.style.display="none";E.style.visibility="";ka.style.visibility=""}),Y=N.actions.get("fullscreen"),R=G("",Y.funct,null,mxResources.get(""),Y,Editor.fullscreenImage),ba=mxUtils.bind(this,function(){R.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent"; +Q()});Y=mxUtils.bind(this,function(){b(N,!0);N.initFormatWindow();var ua=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(ua.x+ua.width+4,ua.y);ba()});N.addListener("inlineFullscreenChanged",ba);N.addListener("editInlineStart",Y);"1"==urlParams.embedInline&&N.addListener("darkModeChanged",Y);N.addListener("editInlineStop",mxUtils.bind(this,function(ua){N.diagramContainer.style.width="10px";N.diagramContainer.style.height="10px";N.diagramContainer.style.border=""; +N.bottomResizer.style.visibility="hidden";N.rightResizer.style.visibility="hidden";E.style.visibility="hidden";ka.style.visibility="hidden";q.style.display="none"}));if(null!=N.hoverIcons){var ea=N.hoverIcons.update;N.hoverIcons.update=function(){qa.freehand.isDrawing()||ea.apply(this,arguments)}}if(null!=qa.freehand){var ra=qa.freehand.createStyle;qa.freehand.createStyle=function(ua){return ra.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){q.className="geToolbarContainer";ka.className= +"geToolbarContainer";E.className="geToolbarContainer";oa.className="geToolbarContainer";N.picker=q;var ta=!1;"1"!=urlParams.embed&&"atlassian"!=N.getServiceName()&&(mxEvent.addListener(oa,"mouseenter",function(){N.statusContainer.style.display="inline-block"}),mxEvent.addListener(oa,"mouseleave",function(){ta||(N.statusContainer.style.display="none")}));var la=mxUtils.bind(this,function(ua){null!=N.notificationBtn&&(null!=ua?N.notificationBtn.setAttribute("title",ua):N.notificationBtn.removeAttribute("title"))}); +if("1"!=urlParams.embed&&"1"==urlParams["live-ui"]){var pa=D("theme",null,Editor.darkModeImage);null!=pa&&(pa.style.position="relative",pa.style.backgroundPosition="top center",pa.style.backgroundSize="22px 22px",pa.style.width="24px",pa.style.height="28px",pa.style.top="4px",oa.appendChild(pa),Y=mxUtils.bind(this,function(){pa.style.backgroundImage="url('"+(Editor.isDarkMode()?Editor.lightModeImage:Editor.darkModeImage)+"')"}),N.addListener("darkModeChanged",Y),Y())}oa.style.visibility=20>oa.clientWidth? +"hidden":"";N.editor.addListener("statusChanged",mxUtils.bind(this,function(){N.setStatusText(N.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=N.getServiceName())if(N.statusContainer.style.display="inline-block",ta=!0,1==N.statusContainer.children.length&&""==N.editor.getStatus())oa.style.visibility="hidden";else{if(0==N.statusContainer.children.length||1==N.statusContainer.children.length&&"function"===typeof N.statusContainer.firstChild.getAttribute&&null==N.statusContainer.firstChild.getAttribute("class")){var ua= +null!=N.statusContainer.firstChild&&"function"===typeof N.statusContainer.firstChild.getAttribute?N.statusContainer.firstChild.getAttribute("title"):N.editor.getStatus();la(ua);var za=N.getCurrentFile();za=null!=za?za.savingStatusKey:DrawioFile.prototype.savingStatusKey;ua==mxResources.get(za)+"..."?(N.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(za))+'..."src="'+Editor.tailSpin+'">',N.statusContainer.style.display="inline-block",ta=!0):6<N.buttonContainer.clientWidth&& +(N.statusContainer.style.display="none",ta=!1)}else N.statusContainer.style.display="inline-block",la(null),ta=!0;oa.style.visibility=20>oa.clientWidth&&!ta?"hidden":""}}));U=D("diagram",null,Editor.menuImage);U.style.boxShadow="none";U.style.padding="6px";U.style.margin="0px";E.appendChild(U);mxEvent.disableContextMenu(U);mxEvent.addGestureListeners(U,mxUtils.bind(this,function(ua){(mxEvent.isShiftDown(ua)||mxEvent.isAltDown(ua)||mxEvent.isMetaDown(ua)||mxEvent.isControlDown(ua)||mxEvent.isPopupTrigger(ua))&& +this.appIconClicked(ua)}),null,null);N.statusContainer.style.position="";N.statusContainer.style.display="none";N.statusContainer.style.margin="0px";N.statusContainer.style.padding="6px 0px";N.statusContainer.style.maxWidth=Math.min(m-240,280)+"px";N.statusContainer.style.display="inline-block";N.statusContainer.style.textOverflow="ellipsis";N.buttonContainer.style.display="inline-block";N.buttonContainer.style.position="relative";N.buttonContainer.style.paddingRight="0px";N.buttonContainer.style.top= +"0px";var xa=document.createElement("a");xa.style.padding="0px";xa.style.boxShadow="none";xa.className="geMenuItem";xa.style.display="inline-block";xa.style.width="40px";xa.style.height="12px";xa.style.marginBottom="-2px";xa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";xa.style.backgroundPosition="top center";xa.style.backgroundRepeat="no-repeat";xa.setAttribute("title","Minimize");var Ca=!1,Ia=mxUtils.bind(this,function(){q.innerText="";if(!Ca){var ua=function(za,Fa,Ba,Ea){null!= +Fa&&za.setAttribute("title",Fa);za.style.cursor=null!=Ba?Ba:"default";za.style.margin="2px 0px";q.appendChild(za);mxUtils.br(q);null!=Ea&&(za.style.position="relative",za.style.overflow="visible",Fa=document.createElement("div"),Fa.style.position="absolute",Fa.style.left="34px",Fa.style.top="28px",Fa.style.fontSize="8px",mxUtils.write(Fa,Ea),za.appendChild(Fa));return za};ua(N.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;", +60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+" (A)",null,"A");ua(N.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");ua(N.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;", +160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");ua(N.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");(function(){var za=new mxCell("",new mxGeometry(0,0,qa.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");za.geometry.setTerminalPoint(new mxPoint(0,0),!0);za.geometry.setTerminalPoint(new mxPoint(za.geometry.width, +0),!1);za.geometry.points=[];za.geometry.relative=!0;za.edge=!0;ua(N.sidebar.createEdgeTemplateFromCells([za],za.geometry.width,za.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");za=za.clone();za.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";za.geometry.width=qa.defaultEdgeLength+20;za.geometry.setTerminalPoint(new mxPoint(0,20),!0);za.geometry.setTerminalPoint(new mxPoint(za.geometry.width, +20),!1);ua(N.sidebar.createEdgeTemplateFromCells([za],za.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"))})();(function(za,Fa,Ba,Ea){za=G("",za.funct,null,Fa,za,Ba);za.style.width="40px";za.style.height="34px";za.style.opacity="0.7";return ua(za,null,"pointer",Ea)})(N.actions.get("insertFreehand"),mxResources.get("freehand")+" (X)",Editor.freehandImage,"X");U=D("insert",null,Editor.plusImage);U.style.boxShadow="none";U.style.opacity="0.7";U.style.padding="6px";U.style.margin= +"0px";U.style.height="34px";U.style.width="37px";ua(U,null,"pointer")}"1"!=urlParams.embedInline&&q.appendChild(xa)});mxEvent.addListener(xa,"click",mxUtils.bind(this,function(){Ca?(mxUtils.setPrefixedStyle(q.style,"transform","translate(0, -50%)"),q.style.padding="8px 6px 4px",q.style.top="50%",q.style.bottom="",q.style.height="",xa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",xa.style.width="40px",xa.style.height="12px",xa.setAttribute("title","Minimize"),Ca=!1,Ia()):(q.innerText= +"",q.appendChild(xa),mxUtils.setPrefixedStyle(q.style,"transform","translate(0, 0)"),q.style.top="",q.style.bottom="12px",q.style.padding="0px",q.style.height="24px",xa.style.height="24px",xa.style.backgroundImage="url("+Editor.plusImage+")",xa.setAttribute("title",mxResources.get("insert")),xa.style.width="24px",Ca=!0)}));Ia();N.addListener("darkModeChanged",Ia);N.addListener("sketchModeChanged",Ia)}else N.editor.addListener("statusChanged",mxUtils.bind(this,function(){N.setStatusText(N.editor.getStatus())})); +if(null!=X){var Aa=function(ua){if(mxEvent.isAltDown(ua))N.hideCurrentMenu(),N.actions.get("customZoom").funct(),mxEvent.consume(ua);else if("geItem"!=mxEvent.getSource(ua).className||mxEvent.isShiftDown(ua))N.hideCurrentMenu(),N.actions.get("smartFit").funct(),mxEvent.consume(ua)},La=N.actions.get("zoomIn"),Da=N.actions.get("zoomOut");Y=N.actions.get("resetView");var Sa=N.actions.get("undo"),Ra=N.actions.get("redo"),Ta=G("",Sa.funct,null,mxResources.get("undo")+" ("+Sa.shortcut+")",Sa,Editor.undoImage), +Za=G("",Ra.funct,null,mxResources.get("redo")+" ("+Ra.shortcut+")",Ra,Editor.redoImage);if(null!=ka){Y=function(){V.style.display=null!=N.pages&&("0"!=urlParams.pages||1<N.pages.length||Editor.pagesVisible)?"inline-block":"none"};var Na=function(){V.innerText="";if(null!=N.currentPage){mxUtils.write(V,N.currentPage.getName());var ua=null!=N.pages?N.pages.length:1,za=N.getPageIndex(N.currentPage);za=null!=za?za+1:1;var Fa=N.currentPage.getId();V.setAttribute("title",N.currentPage.getName()+" ("+za+ +"/"+ua+")"+(null!=Fa?" ["+Fa+"]":""))}},z=N.actions.get("delete"),L=G("",z.funct,null,mxResources.get("delete"),z,Editor.trashImage);L.style.opacity="0.1";E.appendChild(L);z.addListener("stateChanged",function(){L.style.opacity=z.enabled?"":"0.1"});var O=function(){Ta.style.display=0<N.editor.undoManager.history.length||qa.isEditing()?"inline-block":"none";Za.style.display=Ta.style.display;Ta.style.opacity=Sa.enabled?"":"0.1";Za.style.opacity=Ra.enabled?"":"0.1"};E.appendChild(Ta);E.appendChild(Za); +Sa.addListener("stateChanged",O);Ra.addListener("stateChanged",O);O();var V=this.createPageMenuTab(!1,!0);V.style.display="none";V.style.position="";V.style.marginLeft="";V.style.top="";V.style.left="";V.style.height="100%";V.style.lineHeight="";V.style.borderStyle="none";V.style.padding="3px 0";V.style.margin="0px";V.style.background="";V.style.border="";V.style.boxShadow="none";V.style.verticalAlign="top";V.style.width="auto";V.style.maxWidth="160px";V.style.position="relative";V.style.padding= +"6px";V.style.textOverflow="ellipsis";V.style.opacity="0.8";ka.appendChild(V);N.editor.addListener("pagesPatched",Na);N.editor.addListener("pageSelected",Na);N.editor.addListener("pageRenamed",Na);N.editor.addListener("fileLoaded",Na);Na();N.addListener("fileDescriptorChanged",Y);N.addListener("pagesVisibleChanged",Y);N.editor.addListener("pagesPatched",Y);Y();Y=G("",Da.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",Da,Editor.zoomOutImage);ka.appendChild(Y);var U=fa.addMenu("100%", +X.funct);U.setAttribute("title",mxResources.get("zoom"));U.innerHTML="100%";U.style.display="inline-block";U.style.color="inherit";U.style.cursor="pointer";U.style.textAlign="center";U.style.whiteSpace="nowrap";U.style.paddingRight="10px";U.style.textDecoration="none";U.style.verticalAlign="top";U.style.padding="6px 0";U.style.fontSize="14px";U.style.width="40px";U.style.opacity="0.4";ka.appendChild(U);X=G("",La.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",La,Editor.zoomInImage); +ka.appendChild(X);"1"==urlParams.embedInline?(ka.appendChild(R),X=N.actions.get("exit"),ka.appendChild(G("",X.funct,null,mxResources.get("exit"),X,Editor.closeImage))):R.parentNode.removeChild(R);N.tabContainer.style.visibility="hidden";oa.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";E.style.cssText= +"position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";ka.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";aa.appendChild(E);aa.appendChild(ka);q.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;"; +mxClient.IS_POINTER&&(q.style.touchAction="none");aa.appendChild(q);window.setTimeout(function(){mxUtils.setPrefixedStyle(q.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(aa)}else{var ha=G("",Aa,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Y,Editor.zoomFitImage);oa.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";U=fa.addMenu("100%", +X.funct);U.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");U.style.whiteSpace="nowrap";U.style.paddingRight="10px";U.style.textDecoration="none";U.style.textDecoration="none";U.style.overflow="hidden";U.style.visibility="hidden";U.style.textAlign="center";U.style.cursor="pointer";U.style.height=parseInt(N.tabContainerHeight)-1+"px";U.style.lineHeight=parseInt(N.tabContainerHeight)+1+"px";U.style.position="absolute";U.style.display="block";U.style.fontSize="12px";U.style.width="59px"; +U.style.right="0px";U.style.bottom="0px";U.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";U.style.backgroundPosition="right 6px center";U.style.backgroundRepeat="no-repeat";aa.appendChild(U)}(function(ua){mxEvent.addListener(ua,"click",Aa);var za=mxUtils.bind(this,function(){ua.innerText="";mxUtils.write(ua,Math.round(100*N.editor.graph.view.scale)+"%")});N.editor.graph.view.addListener(mxEvent.EVENT_SCALE,za);N.editor.addListener("resetGraphView",za);N.editor.addListener("pageSelected", +za)})(U);var ma=N.setGraphEnabled;N.setGraphEnabled=function(){ma.apply(this,arguments);null!=this.tabContainer&&(U.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==ka?this.tabContainerHeight+"px":"0px")}}aa.appendChild(oa);aa.appendChild(N.diagramContainer);Z.appendChild(aa);N.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=m)&&"1"!=urlParams.embedInline&&b(this,!0);null==ka&&aa.appendChild(N.tabContainer); +var wa=null;T();mxEvent.addListener(window,"resize",function(){T();null!=N.sidebarWindow&&N.sidebarWindow.window.fit();null!=N.formatWindow&&N.formatWindow.window.fit();null!=N.actions.outlineWindow&&N.actions.outlineWindow.window.fit();null!=N.actions.layersWindow&&N.actions.layersWindow.window.fit();null!=N.menus.tagsWindow&&N.menus.tagsWindow.window.fit();null!=N.menus.findWindow&&N.menus.findWindow.window.fit();null!=N.menus.findReplaceWindow&&N.menus.findReplaceWindow.window.fit()});if("1"== +urlParams.embedInline){document.body.style.cursor="text";q.style.transform="";mxEvent.addGestureListeners(N.diagramContainer.parentNode,function(ua){mxEvent.getSource(ua)==N.diagramContainer.parentNode&&(N.embedExitPoint=new mxPoint(mxEvent.getClientX(ua),mxEvent.getClientY(ua)),N.sendEmbeddedSvgExport())});Z=document.createElement("div");Z.style.position="absolute";Z.style.width="10px";Z.style.height="10px";Z.style.borderRadius="5px";Z.style.border="1px solid gray";Z.style.background="#ffffff";Z.style.cursor= +"row-resize";N.diagramContainer.parentNode.appendChild(Z);N.bottomResizer=Z;var sa=null,ya=null,Ha=null,Qa=null;mxEvent.addGestureListeners(Z,function(ua){Qa=parseInt(N.diagramContainer.style.height);ya=mxEvent.getClientY(ua);qa.popupMenuHandler.hideMenu();mxEvent.consume(ua)});Z=Z.cloneNode(!1);Z.style.cursor="col-resize";N.diagramContainer.parentNode.appendChild(Z);N.rightResizer=Z;mxEvent.addGestureListeners(Z,function(ua){Ha=parseInt(N.diagramContainer.style.width);sa=mxEvent.getClientX(ua);qa.popupMenuHandler.hideMenu(); +mxEvent.consume(ua)});mxEvent.addGestureListeners(document.body,null,function(ua){var za=!1;null!=sa&&(N.diagramContainer.style.width=Math.max(20,Ha+mxEvent.getClientX(ua)-sa)+"px",za=!0);null!=ya&&(N.diagramContainer.style.height=Math.max(20,Qa+mxEvent.getClientY(ua)-ya)+"px",za=!0);za&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:N.diagramContainer.getBoundingClientRect()}),"*"),Q(),N.refresh())},function(ua){null==sa&&null== +ya||mxEvent.consume(ua);ya=sa=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";N.bottomResizer.style.visibility="hidden";N.rightResizer.style.visibility="hidden";E.style.visibility="hidden";ka.style.visibility="hidden";q.style.display="none"}"1"==urlParams.prefetchFonts&&N.editor.loadFonts()}}}; +(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,e,k,m,C,p,F){this.file=b;this.id=e;this.content=k;this.modifiedDate=m;this.createdDate=C;this.isResolved=p;this.user=F;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,k,m,C){e()};DrawioComment.prototype.editComment=function(b,e,k){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,k,m,C){this.id=b;this.email=e;this.displayName=k;this.pictureUrl=m;this.locale=C};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfDraftTooBigErr=Draft size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration?\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement; Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];GraphViewer=function(b,e,k){this.init(b,e,k)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://viewer.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.autoCrop=!1; GraphViewer.prototype.autoOrigin=!0;GraphViewer.prototype.center=!1;GraphViewer.prototype.forceCenter=!1;GraphViewer.prototype.allowZoomIn=!1;GraphViewer.prototype.allowZoomOut=!0;GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100;GraphViewer.prototype.responsive=!1; GraphViewer.prototype.init=function(b,e,k){this.graphConfig=null!=k?k:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.autoCrop=null!=this.graphConfig["auto-crop"]?this.graphConfig["auto-crop"]:this.autoCrop;this.autoOrigin=null!=this.graphConfig["auto-origin"]?this.graphConfig["auto-origin"]:this.autoOrigin;this.allowZoomOut=null!=this.graphConfig["allow-zoom-out"]?this.graphConfig["allow-zoom-out"]:this.allowZoomOut;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]? this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.forceCenter=null!=this.graphConfig.forceCenter?this.graphConfig.forceCenter:this.forceCenter;this.center=null!=this.graphConfig.center?this.graphConfig.center:this.center||this.forceCenter;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled=0<=mxUtils.indexOf(this.toolbarItems, "zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.tagsEnabled=0<=mxUtils.indexOf(this.toolbarItems,"tags");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialOverflow=document.body.style.overflow;this.initialWidth=null!=b?b.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.responsive=(null!=this.graphConfig.responsive? this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageId=this.graphConfig.pageId;this.editor=null;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=e&&(this.xmlDocument=e.ownerDocument,this.xmlNode=e,this.xml=mxUtils.getXml(e),null!=b)){var m=mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.graph.defaultPageBackgroundColor="transparent";this.graph.transparentBackground= -!1;if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var E=this.graph.view.getDrawPane().ownerSVGElement;this.graph.view.getCanvas();null!=this.graphConfig.border?E.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(E.style.padding="8px");E.style.boxSizing="border-box";E.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var H=this.view.graphBounds,J=this.view.translate;E.setAttribute("viewBox",H.x+J.x-this.panDx+" "+(H.y+J.y-this.panDy)+ -" "+(H.width+1)+" "+(H.height+1));this.container.style.backgroundColor=E.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",H))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(H){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1== -this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=e&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var K=this;this.graph.getImageFromBundles=function(H){return K.getImageUrl(H)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var Q=this.xmlNode.getElementsByTagName("diagram");if(0< -Q.length){if(null!=this.pageId)for(var d=0;d<Q.length;d++)if(this.pageId==Q[d].getAttribute("id")){this.currentPage=d;break}var f=this.graph.getGlobalVariable;K=this;this.graph.getGlobalVariable=function(H){var J=Q[K.currentPage];return"page"==H?J.getAttribute("name")||"Page-"+(K.currentPage+1):"pagenumber"==H?K.currentPage+1:"pagecount"==H?Q.length:f.apply(this,arguments)}}}this.diagrams=[];var g=null;this.selectPage=function(H){this.handlingResize||(this.currentPage=mxUtils.mod(H,this.diagrams.length), +!1;if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var F=this.graph.view.getDrawPane().ownerSVGElement;this.graph.view.getCanvas();null!=this.graphConfig.border?F.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(F.style.padding="8px");F.style.boxSizing="border-box";F.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var H=this.view.graphBounds,J=this.view.translate;F.setAttribute("viewBox",H.x+J.x-this.panDx+" "+(H.y+J.y-this.panDy)+ +" "+(H.width+1)+" "+(H.height+1));this.container.style.backgroundColor=F.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",H))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(H){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1== +this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=e&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var K=this;this.graph.getImageFromBundles=function(H){return K.getImageUrl(H)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var P=this.xmlNode.getElementsByTagName("diagram");if(0< +P.length){if(null!=this.pageId)for(var d=0;d<P.length;d++)if(this.pageId==P[d].getAttribute("id")){this.currentPage=d;break}var f=this.graph.getGlobalVariable;K=this;this.graph.getGlobalVariable=function(H){var J=P[K.currentPage];return"page"==H?J.getAttribute("name")||"Page-"+(K.currentPage+1):"pagenumber"==H?K.currentPage+1:"pagecount"==H?P.length:f.apply(this,arguments)}}}this.diagrams=[];var g=null;this.selectPage=function(H){this.handlingResize||(this.currentPage=mxUtils.mod(H,this.diagrams.length), this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(H){H=this.getIndexById(H);var J=0<=H;J&&this.selectPage(H);return J};d=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=g&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),g=this.xmlNode)});var x=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(H){if(null!=H&&Graph.isPageLink(H.src)){var J=H.src, -D=J.indexOf(",");0<D&&(D=K.getIndexById(J.substring(D+1)),0<=D&&(H=K.getImageForGraphModel(Editor.parseDiagramNode(K.diagrams[D])),H.originalSrc=J))}x.apply(this,arguments)};var z=this.graph.getGraphBounds;this.graph.getGraphBounds=function(H){var J=z.apply(this,arguments);H=this.backgroundImage;if(null!=H){var D=this.view.translate,G=this.view.scale;J=mxRectangle.fromRectangle(J);J.add(new mxRectangle((D.x+H.x)*G,(D.y+H.y)*G,H.width*G,H.height*G))}return J};this.addListener("xmlNodeChanged",d);d(); +D=J.indexOf(",");0<D&&(D=K.getIndexById(J.substring(D+1)),0<=D&&(H=K.getImageForGraphModel(Editor.parseDiagramNode(K.diagrams[D])),H.originalSrc=J))}x.apply(this,arguments)};var y=this.graph.getGraphBounds;this.graph.getGraphBounds=function(H){var J=y.apply(this,arguments);H=this.backgroundImage;if(null!=H){var D=this.view.translate,G=this.view.scale;J=mxRectangle.fromRectangle(J);J.add(new mxRectangle((D.x+H.x)*G,(D.y+H.y)*G,H.width*G,H.height*G))}return J};this.addListener("xmlNodeChanged",d);d(); urlParams.page=K.currentPage;d=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,d=this.setLayersVisible(),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.graph.panningHandler.isForcePanningEvent=function(H){return!mxEvent.isPopupTrigger(H.getEvent())&&"auto"==this.graph.container.style.overflow}, this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.panningHandler.ignoreCell=!0,this.graph.panningHandler.usePopupTrigger=!1,this.graph.panningHandler.pinchEnabled=!1);this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&b.setAttribute("title",this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph); this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=d&&this.setLayersVisible(d);this.graph.customLinkClicked=function(H){if(Graph.isPageLink(H)){var J=H.indexOf(",");K.selectPageById(H.substring(J+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(H);return!0};var u=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded= -!0;return u.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});k=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&"undefined"!==typeof k){var C=this.getObservableParent(b),p=new k(mxUtils.bind(this,function(E){0<b.offsetWidth&&(p.disconnect(),m())}));p.observe(C,{attributes:!0})}else m()}}; +!0;return u.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});k=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&"undefined"!==typeof k){var C=this.getObservableParent(b),p=new k(mxUtils.bind(this,function(F){0<b.offsetWidth&&(p.disconnect(),m())}));p.observe(C,{attributes:!0})}else m()}}; GraphViewer.prototype.getObservableParent=function(b){for(b=b.parentNode;b!=document.body&&null!=b.parentNode&&"none"!==mxUtils.getCurrentStyle(b).display;)b=b.parentNode;return b};GraphViewer.prototype.getImageUrl=function(b){null!=b&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)&&"data:image"!=b.substring(0,10)&&("/"==b.charAt(0)&&(b=b.substring(1,b.length)),b=this.imageBaseUrl+b);return b}; GraphViewer.prototype.getImageForGraphModel=function(b){var e=Graph.createOffscreenGraph(this.graph.getStylesheet());e.getGlobalVariable=this.graph.getGlobalVariable;document.body.appendChild(e.container);b=(new mxCodec(b.ownerDocument)).decode(b).root;e.model.setRoot(b);b=e.getSvg();var k=e.getGraphBounds();document.body.removeChild(e.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),k.width,k.height,k.x,k.y)}; GraphViewer.prototype.getIndexById=function(b){if(null!=this.diagrams)for(var e=0;e<this.diagrams.length;e++)if(this.diagrams[e].getAttribute("id")==b)return e;return-1};GraphViewer.prototype.setXmlNode=function(b){b=this.editor.extractGraphModel(b,!0);this.xmlDocument=b.ownerDocument;this.xml=mxUtils.getXml(b);this.xmlNode=b;this.updateGraphXml(b);this.fireEvent(new mxEventObject("xmlNodeChanged"))}; @@ -4091,35 +4096,35 @@ GraphViewer.prototype.setFileNode=function(b){null==this.xmlNode&&(this.xmlDocum GraphViewer.prototype.setLayersVisible=function(b){var e=!0;if(!this.autoOrigin){var k=[],m=this.graph.getModel();m.beginUpdate();try{for(var C=0;C<m.getChildCount(m.root);C++){var p=m.getChildAt(m.root,C);e=e&&m.isVisible(p);k.push(m.isVisible(p));m.setVisible(p,null!=b?b[C]:!0)}}finally{m.endUpdate()}}return e?null:k}; GraphViewer.prototype.setGraphXml=function(b){if(null!=this.graph){this.graph.view.translate=new mxPoint;this.graph.view.scale=1;var e=null;this.graph.getModel().beginUpdate();try{this.graph.getModel().clear(),this.editor.setGraphXml(b),e=this.setLayersVisible(!0)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph());this.graph.initialViewState= {translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};e&&this.setLayersVisible(e)}}; -GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,e=this.graph.getGraphBounds(),k=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var m=mxUtils.bind(this,function(){if(!k){k=!0;var K=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?K.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){K=b.getBoundingClientRect();var Q=mxUtils.getScrollOrigin(document.body); -Q="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-Q.x,top:-Q.y};K={left:K.left-Q.left,top:K.top-Q.top,bottom:K.bottom-Q.top,right:K.right-Q.left};this.toolbar.style.left=K.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=K.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=K.top+1+"px"):this.toolbar.style.top=K.top+"px"}else null!= -this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());k=!1}}),C=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(K){var Q=b.offsetWidth;Q==C||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=K?K:this.graphConfig.zoom|| -(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},C=Q,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize= +GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,e=this.graph.getGraphBounds(),k=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var m=mxUtils.bind(this,function(){if(!k){k=!0;var K=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?K.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){K=b.getBoundingClientRect();var P=mxUtils.getScrollOrigin(document.body); +P="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-P.x,top:-P.y};K={left:K.left-P.left,top:K.top-P.top,bottom:K.bottom-P.top,right:K.right-P.left};this.toolbar.style.left=K.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=K.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=K.top+1+"px"):this.toolbar.style.top=K.top+"px"}else null!= +this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());k=!1}}),C=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(K){var P=b.offsetWidth;P==C||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=K?K:this.graphConfig.zoom|| +(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},C=P,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize= !1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",m),this.graph.addListener("size",m)):new ResizeSensor(this.graph.container,m));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=b.style.height&&this.autoFit||this.updateContainerWidth(b,e.width+2*this.graph.border), 0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,e.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var p=C=null;m=mxUtils.bind(this,function(){window.clearTimeout(p);this.handlingResize||(p=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",m):new ResizeSensor(this.graph.container,m))}else 9>=document.documentMode||this.graph.addListener("size", -m);var E=mxUtils.bind(this,function(K){var Q=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var d=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==K&&this.allowZoomOut&&(this.allowZoomIn||e.width+2*this.graph.border>b.offsetWidth||e.height+2*this.graph.border>d)?(K=null,null!=d&&e.height+2*this.graph.border>d-2&&(K=(d-2*this.graph.border-2)/e.height),this.fitGraph(K)):this.widthIsEmpty|| -null!=K||0!=this.graphConfig.resize||""==b.style.height?(K=null!=K?K:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-e.x/this.graph.view.scale)+K.x,Math.floor(this.graph.border-e.y/this.graph.view.scale)+K.y),C=b.offsetWidth):this.graph.center((!this.widthIsEmpty||e.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=Q});8==document.documentMode?window.setTimeout(E,0):E();this.positionGraph=function(K){e=this.graph.getGraphBounds();C=null;E(K)}}; +m);var F=mxUtils.bind(this,function(K){var P=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var d=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==K&&this.allowZoomOut&&(this.allowZoomIn||e.width+2*this.graph.border>b.offsetWidth||e.height+2*this.graph.border>d)?(K=null,null!=d&&e.height+2*this.graph.border>d-2&&(K=(d-2*this.graph.border-2)/e.height),this.fitGraph(K)):this.widthIsEmpty|| +null!=K||0!=this.graphConfig.resize||""==b.style.height?(K=null!=K?K:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-e.x/this.graph.view.scale)+K.x,Math.floor(this.graph.border-e.y/this.graph.view.scale)+K.y),C=b.offsetWidth):this.graph.center((!this.widthIsEmpty||e.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=P});8==document.documentMode?window.setTimeout(F,0):F();this.positionGraph=function(K){e=this.graph.getGraphBounds();C=null;F(K)}}; GraphViewer.prototype.crop=function(){var b=this.graph,e=b.getGraphBounds(),k=b.border,m=b.view.scale;b.view.setTranslate(null!=e.x?Math.floor(b.view.translate.x-e.x/m+k):k,null!=e.y?Math.floor(b.view.translate.y-e.y/m+k):k)};GraphViewer.prototype.updateContainerWidth=function(b,e){b.style.width=e+"px"};GraphViewer.prototype.updateContainerHeight=function(b,e){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=e+"px"}; -GraphViewer.prototype.showLayers=function(b,e){var k=this.graphConfig.layers;k=null!=k&&0<k.length?k.split(" "):[];var m=this.graphConfig.layerIds,C=null!=m&&0<m.length,p=!1;if(0<k.length||C||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var E=b.getChildCount(b.root);if(null==e){e=!1;p={};if(C)for(var K=0;K<m.length;K++){var Q=b.getCell(m[K]);null!=Q&&(e=!0,p[Q.id]=!0)}else for(K=0;K<k.length;K++)Q=b.getChildAt(b.root,parseInt(k[K])),null!=Q&&(e=!0,p[Q.id]=!0);for(K=0;e&& -K<E;K++)Q=b.getChildAt(b.root,K),b.setVisible(Q,p[Q.id]||!1)}else for(K=0;K<E;K++)b.setVisible(b.getChildAt(b.root,K),e.isVisible(e.getChildAt(e.root,K)))}finally{b.endUpdate()}p=!0}return p}; +GraphViewer.prototype.showLayers=function(b,e){var k=this.graphConfig.layers;k=null!=k&&0<k.length?k.split(" "):[];var m=this.graphConfig.layerIds,C=null!=m&&0<m.length,p=!1;if(0<k.length||C||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var F=b.getChildCount(b.root);if(null==e){e=!1;p={};if(C)for(var K=0;K<m.length;K++){var P=b.getCell(m[K]);null!=P&&(e=!0,p[P.id]=!0)}else for(K=0;K<k.length;K++)P=b.getChildAt(b.root,parseInt(k[K])),null!=P&&(e=!0,p[P.id]=!0);for(K=0;e&& +K<F;K++)P=b.getChildAt(b.root,K),b.setVisible(P,p[P.id]||!1)}else for(K=0;K<F;K++)b.setVisible(b.getChildAt(b.root,K),e.isVisible(e.getChildAt(e.root,K)))}finally{b.endUpdate()}p=!0}return p}; GraphViewer.prototype.addToolbar=function(){var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee"; e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var k=null,m=null,C=mxUtils.bind(this,function(oa){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=m&&(window.clearTimeout(m),fadeThead2=null);k=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,0);k=null;m=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none"; m=null}),100)}),oa||200)}),p=mxUtils.bind(this,function(oa){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=m&&(window.clearTimeout(m),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,oa||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(oa){mxEvent.isTouchEvent(oa)||(p(30),C())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":"mousemove",function(oa){mxEvent.consume(oa)});mxEvent.addListener(e,"mouseenter", -mxUtils.bind(this,function(oa){p(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(oa){p(100);mxEvent.consume(oa)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(oa){mxEvent.isTouchEvent(oa)||p(30)}));var E=this.graph,K=E.getTolerance();E.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(oa,aa){this.startX=aa.getGraphX();this.startY=aa.getGraphY();this.scrollLeft=E.container.scrollLeft;this.scrollTop=E.container.scrollTop},mouseMove:function(oa, -aa){},mouseUp:function(oa,aa){mxEvent.isTouchEvent(aa.getEvent())&&Math.abs(this.scrollLeft-E.container.scrollLeft)<K&&Math.abs(this.scrollTop-E.container.scrollTop)<K&&Math.abs(this.startX-aa.getGraphX())<K&&Math.abs(this.startY-aa.getGraphY())<K&&(0<parseFloat(e.style.opacity||0)?C():p(30))}})}for(var Q=this.toolbarItems,d=0,f=mxUtils.bind(this,function(oa,aa,da,ia){oa=this.createToolbarButton(oa,aa,da,ia);e.appendChild(oa);d++;return oa}),g=null,x=null,z=null,u=null,H=0;H<Q.length;H++){var J=Q[H]; -if("pages"==J){u=b.ownerDocument.createElement("div");u.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;";mxUtils.setOpacity(u,70);var D=f(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");D.style.borderRightStyle="none";D.style.paddingLeft="0px";D.style.paddingRight="0px";e.appendChild(u);var G=f(mxUtils.bind(this, +mxUtils.bind(this,function(oa){p(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(oa){p(100);mxEvent.consume(oa)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(oa){mxEvent.isTouchEvent(oa)||p(30)}));var F=this.graph,K=F.getTolerance();F.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(oa,S){this.startX=S.getGraphX();this.startY=S.getGraphY();this.scrollLeft=F.container.scrollLeft;this.scrollTop=F.container.scrollTop},mouseMove:function(oa, +S){},mouseUp:function(oa,S){mxEvent.isTouchEvent(S.getEvent())&&Math.abs(this.scrollLeft-F.container.scrollLeft)<K&&Math.abs(this.scrollTop-F.container.scrollTop)<K&&Math.abs(this.startX-S.getGraphX())<K&&Math.abs(this.startY-S.getGraphY())<K&&(0<parseFloat(e.style.opacity||0)?C():p(30))}})}for(var P=this.toolbarItems,d=0,f=mxUtils.bind(this,function(oa,S,fa,ia){oa=this.createToolbarButton(oa,S,fa,ia);e.appendChild(oa);d++;return oa}),g=null,x=null,y=null,u=null,H=0;H<P.length;H++){var J=P[H];if("pages"== +J){u=b.ownerDocument.createElement("div");u.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;";mxUtils.setOpacity(u,70);var D=f(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");D.style.borderRightStyle="none";D.style.paddingLeft="0px";D.style.paddingRight="0px";e.appendChild(u);var G=f(mxUtils.bind(this, function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");G.style.paddingLeft="0px";G.style.paddingRight="0px";J=mxUtils.bind(this,function(){u.innerText="";mxUtils.write(u,this.currentPage+1+" / "+this.diagrams.length);u.style.display=1<this.diagrams.length?"inline-block":"none";D.style.display=u.style.display;G.style.display=u.style.display});this.addListener("graphChanged",J);J()}else if("zoom"==J)this.zoomEnabled&&(f(mxUtils.bind(this,function(){this.graph.zoomOut()}), -Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),f(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),f(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==J){if(this.layersEnabled){var V=this.graph.getModel(),U=f(mxUtils.bind(this,function(oa){if(null!= -g)g.parentNode.removeChild(g),g=null;else{g=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var da=this.graph.getGraphBounds(),ia=this.graph.view;0>da.x||0>da.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:ia.translate.clone(),scale:ia.scale}):null!=this.graph.originalViewState&&0<da.x/ia.scale+this.graph.originalViewState.translate.x-ia.translate.x&&0<da.y/ia.scale+this.graph.originalViewState.translate.y- -ia.translate.y&&(ia.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ia.translate.clone(),scale:ia.scale})}}));mxEvent.addListener(g,"mouseleave",function(){g.parentNode.removeChild(g);g=null});oa=U.getBoundingClientRect();g.style.width="140px";g.style.padding="2px 0px 2px 0px";g.style.border="1px solid #d0d0d0";g.style.backgroundColor="#eee";g.style.fontFamily=Editor.defaultHtmlFont; -g.style.fontSize="11px";g.style.overflowY="auto";g.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";g.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(g,80);var aa=mxUtils.getDocumentScrollOrigin(document);g.style.left=aa.x+oa.left-1+"px";g.style.top=aa.y+oa.bottom-2+"px";document.body.appendChild(g)}}),Editor.layersImage,mxResources.get("layers")||"Layers");V.addListener(mxEvent.CHANGE,function(){U.style.display=1<V.getChildCount(V.root)?"inline-block":"none"});U.style.display= -1<V.getChildCount(V.root)?"inline-block":"none"}}else if("tags"==J){if(this.tagsEnabled){var Y=f(mxUtils.bind(this,function(oa){null==x&&(x=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),x.div.getElementsByTagName("div")[0].style.position="",x.div.style.maxHeight="160px",x.div.style.maxWidth="120px",x.div.style.padding="2px",x.div.style.overflow="auto",x.div.style.height="auto",x.div.style.position="fixed",x.div.style.fontFamily=Editor.defaultHtmlFont,x.div.style.fontSize="11px", -x.div.style.backgroundColor="#eee",x.div.style.color="#000",x.div.style.border="1px solid #d0d0d0",x.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(x.div,80));if(null!=z)z.parentNode.removeChild(z),z=null;else{z=x.div;mxEvent.addListener(z,"mouseleave",function(){z.parentNode.removeChild(z);z=null});oa=Y.getBoundingClientRect();var aa=mxUtils.getDocumentScrollOrigin(document);z.style.left=aa.x+oa.left-1+"px";z.style.top=aa.y+oa.bottom-2+"px";document.body.appendChild(z);x.refresh()}}),Editor.tagsImage, -mxResources.get("tags")||"Tags");V.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){Y.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));Y.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==J?this.lightboxEnabled&&f(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(J=this.graphConfig["toolbar-buttons"][J],null!=J&&(J.elem=f(null== -J.enabled||J.enabled?J.handler:function(){},J.image,J.title,J.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*d);null!=this.graphConfig.title&&(Q=b.ownerDocument.createElement("div"),Q.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",Q.setAttribute("title",this.graphConfig.title),mxUtils.write(Q,this.graphConfig.title),mxUtils.setOpacity(Q,70), -e.appendChild(Q),this.filename=Q);this.minToolbarWidth=34*d;var O=b.style.border,qa=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var oa=b.getBoundingClientRect(),aa=mxUtils.getScrollOrigin(document.body);aa="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-aa.x,top:-aa.y};oa={left:oa.left- -aa.left,top:oa.top-aa.top,bottom:oa.bottom-aa.top,right:oa.right-aa.left};e.style.left=oa.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=oa.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=oa.top+1+"px"):e.style.top=oa.top+"px";"1px solid transparent"==O&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var da=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!= -g&&(g.parentNode.removeChild(g),g=null);b.style.border=O});mxEvent.addListener(document,"mousemove",function(ia){for(ia=mxEvent.getSource(ia);null!=ia;){if(ia==b||ia==e||ia==g)return;ia=ia.parentNode}da()});mxEvent.addListener(document.body,"mouseleave",function(ia){da()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",qa):qa();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!= +Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),f(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),f(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==J){if(this.layersEnabled){var W=this.graph.getModel(),T=f(mxUtils.bind(this,function(oa){if(null!= +g)g.parentNode.removeChild(g),g=null;else{g=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var fa=this.graph.getGraphBounds(),ia=this.graph.view;0>fa.x||0>fa.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:ia.translate.clone(),scale:ia.scale}):null!=this.graph.originalViewState&&0<fa.x/ia.scale+this.graph.originalViewState.translate.x-ia.translate.x&&0<fa.y/ia.scale+this.graph.originalViewState.translate.y- +ia.translate.y&&(ia.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ia.translate.clone(),scale:ia.scale})}}));mxEvent.addListener(g,"mouseleave",function(){g.parentNode.removeChild(g);g=null});oa=T.getBoundingClientRect();g.style.width="140px";g.style.padding="2px 0px 2px 0px";g.style.border="1px solid #d0d0d0";g.style.backgroundColor="#eee";g.style.fontFamily=Editor.defaultHtmlFont; +g.style.fontSize="11px";g.style.overflowY="auto";g.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";g.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(g,80);var S=mxUtils.getDocumentScrollOrigin(document);g.style.left=S.x+oa.left-1+"px";g.style.top=S.y+oa.bottom-2+"px";document.body.appendChild(g)}}),Editor.layersImage,mxResources.get("layers")||"Layers");W.addListener(mxEvent.CHANGE,function(){T.style.display=1<W.getChildCount(W.root)?"inline-block":"none"});T.style.display= +1<W.getChildCount(W.root)?"inline-block":"none"}}else if("tags"==J){if(this.tagsEnabled){var Z=f(mxUtils.bind(this,function(oa){null==x&&(x=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),x.div.getElementsByTagName("div")[0].style.position="",x.div.style.maxHeight="160px",x.div.style.maxWidth="120px",x.div.style.padding="2px",x.div.style.overflow="auto",x.div.style.height="auto",x.div.style.position="fixed",x.div.style.fontFamily=Editor.defaultHtmlFont,x.div.style.fontSize="11px", +x.div.style.backgroundColor="#eee",x.div.style.color="#000",x.div.style.border="1px solid #d0d0d0",x.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(x.div,80));if(null!=y)y.parentNode.removeChild(y),y=null;else{y=x.div;mxEvent.addListener(y,"mouseleave",function(){y.parentNode.removeChild(y);y=null});oa=Z.getBoundingClientRect();var S=mxUtils.getDocumentScrollOrigin(document);y.style.left=S.x+oa.left-1+"px";y.style.top=S.y+oa.bottom-2+"px";document.body.appendChild(y);x.refresh()}}),Editor.tagsImage, +mxResources.get("tags")||"Tags");W.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){Z.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));Z.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==J?this.lightboxEnabled&&f(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(J=this.graphConfig["toolbar-buttons"][J],null!=J&&(J.elem=f(null== +J.enabled||J.enabled?J.handler:function(){},J.image,J.title,J.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*d);null!=this.graphConfig.title&&(P=b.ownerDocument.createElement("div"),P.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",P.setAttribute("title",this.graphConfig.title),mxUtils.write(P,this.graphConfig.title),mxUtils.setOpacity(P,70), +e.appendChild(P),this.filename=P);this.minToolbarWidth=34*d;var N=b.style.border,qa=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var oa=b.getBoundingClientRect(),S=mxUtils.getScrollOrigin(document.body);S="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-S.x,top:-S.y};oa={left:oa.left- +S.left,top:oa.top-S.top,bottom:oa.bottom-S.top,right:oa.right-S.left};e.style.left=oa.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=oa.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=oa.top+1+"px"):e.style.top=oa.top+"px";"1px solid transparent"==N&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var fa=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=g&& +(g.parentNode.removeChild(g),g=null);b.style.border=N});mxEvent.addListener(document,"mousemove",function(ia){for(ia=mxEvent.getSource(ia);null!=ia;){if(ia==b||ia==e||ia==g)return;ia=ia.parentNode}fa()});mxEvent.addListener(document.body,"mouseleave",function(ia){fa()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",qa):qa();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!= e.parentNode&&qa()})).observe(b)}; GraphViewer.prototype.createToolbarButton=function(b,e,k,m){var C=document.createElement("div");C.style.borderRight="1px solid #d0d0d0";C.style.padding="3px 6px 3px 6px";mxEvent.addListener(C,"click",b);null!=k&&C.setAttribute("title",k);C.style.display="inline-block";b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",e);b.style.width="18px";null==m||m?(mxEvent.addListener(C,"mouseenter",function(){C.style.backgroundColor="#ddd"}),mxEvent.addListener(C,"mouseleave", function(){C.style.backgroundColor="#eee"}),mxUtils.setOpacity(b,60),C.style.cursor="pointer"):mxUtils.setOpacity(C,30);C.appendChild(b);return C};GraphViewer.prototype.disableButton=function(b){var e=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=e&&(mxUtils.setOpacity(e.elem,30),mxEvent.removeListener(e.elem,"click",e.handler),mxEvent.addListener(e.elem,"mouseenter",function(){e.elem.style.backgroundColor="#eee"}))}; @@ -4131,9 +4136,9 @@ this.graphConfig.highlight&&(k.highlight=this.graphConfig.highlight.substring(1) GraphViewer.prototype.showLocalLightbox=function(){mxUtils.getDocumentScrollOrigin(document);var b=document.createElement("div");b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeBlackImage);e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer"; mxEvent.addListener(e,"click",function(){m.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink= this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var k=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";var m=new EditorUi(new Editor(!0),document.createElement("div"),!0);m.editor.editBlankUrl=this.editBlankUrl;m.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=k; -m.refresh=function(){};var C=mxUtils.bind(this,function(g){27==g.keyCode&&m.destroy()}),p=this.initialOverflow,E=m.destroy;m.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",C);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow=p;GraphViewer.resizeSensorEnabled=!0;E.apply(this,arguments)};var K=m.editor.graph,Q=K.container;Q.style.overflow="hidden";this.lightboxChrome?(Q.style.border="1px solid #c0c0c0",Q.style.margin="40px",mxEvent.addListener(document.documentElement, -"keydown",C)):(b.style.display="none",e.style.display="none");var d=this;K.getImageFromBundles=function(g){return d.getImageUrl(g)};var f=m.createTemporaryGraph;m.createTemporaryGraph=function(){var g=f.apply(this,arguments);g.getImageFromBundles=function(x){return d.getImageUrl(x)};return g};this.graphConfig.move&&(K.isMoveCellsEvent=function(g){return!0});mxUtils.setPrefixedStyle(Q.style,"border-radius","4px");Q.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow= -"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(Q.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(Q.style,"transition","all .25s ease-in-out"));this.addClickHandler(K,m);window.setTimeout(mxUtils.bind(this,function(){Q.style.outline="none";Q.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(Q);document.body.appendChild(e);m.setFileData(this.xml);mxUtils.setPrefixedStyle(Q.style,"transform","rotateY(0deg)");m.chromelessToolbar.style.bottom= +m.refresh=function(){};var C=mxUtils.bind(this,function(g){27==g.keyCode&&m.destroy()}),p=this.initialOverflow,F=m.destroy;m.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",C);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow=p;GraphViewer.resizeSensorEnabled=!0;F.apply(this,arguments)};var K=m.editor.graph,P=K.container;P.style.overflow="hidden";this.lightboxChrome?(P.style.border="1px solid #c0c0c0",P.style.margin="40px",mxEvent.addListener(document.documentElement, +"keydown",C)):(b.style.display="none",e.style.display="none");var d=this;K.getImageFromBundles=function(g){return d.getImageUrl(g)};var f=m.createTemporaryGraph;m.createTemporaryGraph=function(){var g=f.apply(this,arguments);g.getImageFromBundles=function(x){return d.getImageUrl(x)};return g};this.graphConfig.move&&(K.isMoveCellsEvent=function(g){return!0});mxUtils.setPrefixedStyle(P.style,"border-radius","4px");P.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow= +"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(P.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(P.style,"transition","all .25s ease-in-out"));this.addClickHandler(K,m);window.setTimeout(mxUtils.bind(this,function(){P.style.outline="none";P.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(P);document.body.appendChild(e);m.setFileData(this.xml);mxUtils.setPrefixedStyle(P.style,"transform","rotateY(0deg)");m.chromelessToolbar.style.bottom= "60px";m.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(m.chromelessToolbar);m.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});m.lightboxFit();m.chromelessResize();this.showLayers(K,this.graph);mxEvent.addListener(b,"click",function(){m.destroy()})}),0);return m}; GraphViewer.prototype.updateTitle=function(b){b=b||"";this.showTitleAsTooltip&&null!=this.graph&&null!=this.graph.container&&this.graph.container.setAttribute("title",b);null!=this.filename&&(this.filename.innerText="",mxUtils.write(this.filename,b),this.filename.setAttribute("title",b))}; GraphViewer.processElements=function(b){mxUtils.forEach(GraphViewer.getElementsByClassName(b||"mxgraph"),function(e){try{e.innerText="",GraphViewer.createViewerForElement(e)}catch(k){e.innerText=k.message,null!=window.console&&console.error(k)}})}; @@ -4141,10 +4146,10 @@ GraphViewer.getElementsByClassName=function(b){if(document.getElementsByClassNam GraphViewer.createViewerForElement=function(b,e){var k=b.getAttribute("data-mxgraph");if(null!=k){var m=JSON.parse(k),C=function(p){p=mxUtils.parseXml(p);p=new GraphViewer(b,p.documentElement,m);null!=e&&e(p)};null!=m.url?GraphViewer.getUrl(m.url,function(p){C(p)}):C(m.xml)}}; GraphViewer.initCss=function(){try{var b=document.createElement("style");b.type="text/css";b.innerHTML="div.mxTooltip {\n-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n-moz-box-shadow: 3px 3px 12px #C0C0C0;\nbox-shadow: 3px 3px 12px #C0C0C0;\nbackground: #FFFFCC;\nborder-style: solid;\nborder-width: 1px;\nborder-color: black;\nfont-family: Arial;\nfont-size: 8pt;\nposition: absolute;\ncursor: default;\npadding: 4px;\ncolor: black;}\ntd.mxPopupMenuIcon div {\nwidth:16px;\nheight:16px;}\nhtml div.mxPopupMenu {\n-webkit-box-shadow:2px 2px 3px #d5d5d5;\n-moz-box-shadow:2px 2px 3px #d5d5d5;\nbox-shadow:2px 2px 3px #d5d5d5;\n_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0',Positive='true');\nbackground:white;\nposition:absolute;\nborder:3px solid #e7e7e7;\npadding:3px;}\nhtml table.mxPopupMenu {\nborder-collapse:collapse;\nmargin:0px;}\nhtml td.mxPopupMenuItem {\npadding:7px 30px 7px 30px;\nfont-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;}\nhtml td.mxPopupMenuIcon {\nbackground-color:white;\npadding:0px;}\ntd.mxPopupMenuIcon .geIcon {\npadding:2px;\npadding-bottom:4px;\nmargin:2px;\nborder:1px solid transparent;\nopacity:0.5;\n_width:26px;\n_height:26px;}\ntd.mxPopupMenuIcon .geIcon:hover {\nborder:1px solid gray;\nborder-radius:2px;\nopacity:1;}\nhtml tr.mxPopupMenuItemHover {\nbackground-color: #eeeeee;\ncolor: black;}\ntable.mxPopupMenu hr {\ncolor:#cccccc;\nbackground-color:#cccccc;\nborder:none;\nheight:1px;}\ntable.mxPopupMenu tr {\tfont-size:4pt;}\n.geDialog, .geDialog table { font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;\nborder:none;\nmargin:0px;}\n.geDialog {\tposition:absolute;\tbackground:white;\toverflow:hidden;\tpadding:30px;\tborder:1px solid #acacac;\t-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;\t-moz-box-shadow:0px 0px 2px 2px #d5d5d5;\tbox-shadow:0px 0px 2px 2px #d5d5d5;\t_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');\tz-index: 2;}.geDialogClose {\tposition:absolute;\twidth:9px;\theight:9px;\topacity:0.5;\tcursor:pointer;\t_filter:alpha(opacity=50);}.geDialogClose:hover {\topacity:1;}.geDialogTitle {\tbox-sizing:border-box;\twhite-space:nowrap;\tbackground:rgb(229, 229, 229);\tborder-bottom:1px solid rgb(192, 192, 192);\tfont-size:15px;\tfont-weight:bold;\ttext-align:center;\tcolor:rgb(35, 86, 149);}.geDialogFooter {\tbackground:whiteSmoke;\twhite-space:nowrap;\ttext-align:right;\tbox-sizing:border-box;\tborder-top:1px solid #e5e5e5;\tcolor:darkGray;}\n.geBtn {\tbackground-color: #f5f5f5;\tborder-radius: 2px;\tborder: 1px solid #d8d8d8;\tcolor: #333;\tcursor: default;\tfont-size: 11px;\tfont-weight: bold;\theight: 29px;\tline-height: 27px;\tmargin: 0 0 0 8px;\tmin-width: 72px;\toutline: 0;\tpadding: 0 8px;\tcursor: pointer;}.geBtn:hover, .geBtn:focus {\t-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\t-moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tbox-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tborder: 1px solid #c6c6c6;\tbackground-color: #f8f8f8;\tbackground-image: linear-gradient(#f8f8f8 0px,#f1f1f1 100%);\tcolor: #111;}.geBtn:disabled {\topacity: .5;}.gePrimaryBtn {\tbackground-color: #4d90fe;\tbackground-image: linear-gradient(#4d90fe 0px,#4787ed 100%);\tborder: 1px solid #3079ed;\tcolor: #fff;}.gePrimaryBtn:hover, .gePrimaryBtn:focus {\tbackground-color: #357ae8;\tbackground-image: linear-gradient(#4d90fe 0px,#357ae8 100%);\tborder: 1px solid #2f5bb7;\tcolor: #fff;}.gePrimaryBtn:disabled {\topacity: .5;}";document.getElementsByTagName("head")[0].appendChild(b)}catch(e){}}; GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,e,k){if(null!=GraphViewer.cachedUrls[b])e(GraphViewer.cachedUrls[b]);else{var m=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;m.open("GET",b);m.onload=function(){e(null!=m.getText?m.getText():m.responseText)};m.onerror=k;m.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0; -(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(k){return window.setTimeout(k,20)},e=function(k,m){function C(){this.q=[];this.add=function(z){this.q.push(z)};var g,x;this.call=function(){g=0;for(x=this.q.length;g<x;g++)this.q[g].call()}}function p(g,x){return g.currentStyle?g.currentStyle[x]:window.getComputedStyle?window.getComputedStyle(g,null).getPropertyValue(x):g.style[x]}function E(g,x){if(!g.resizedAttached)g.resizedAttached= +(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(k){return window.setTimeout(k,20)},e=function(k,m){function C(){this.q=[];this.add=function(y){this.q.push(y)};var g,x;this.call=function(){g=0;for(x=this.q.length;g<x;g++)this.q[g].call()}}function p(g,x){return g.currentStyle?g.currentStyle[x]:window.getComputedStyle?window.getComputedStyle(g,null).getPropertyValue(x):g.style[x]}function F(g,x){if(!g.resizedAttached)g.resizedAttached= new C,g.resizedAttached.add(x);else if(g.resizedAttached){g.resizedAttached.add(x);return}g.resizeSensor=document.createElement("div");g.resizeSensor.className="resize-sensor";g.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";g.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>'; -g.appendChild(g.resizeSensor);"static"==p(g,"position")&&(g.style.position="relative");var z=g.resizeSensor.childNodes[0],u=z.childNodes[0],H=g.resizeSensor.childNodes[1],J=function(){u.style.width="100000px";u.style.height="100000px";z.scrollLeft=1E5;z.scrollTop=1E5;H.scrollLeft=1E5;H.scrollTop=1E5};J();var D=!1,G=function(){g.resizedAttached&&(D&&(g.resizedAttached.call(),D=!1),b(G))};b(G);var V,U,Y,O;x=function(){if((Y=g.offsetWidth)!=V||(O=g.offsetHeight)!=U)D=!0,V=Y,U=O;J()};var qa=function(oa, -aa,da){oa.attachEvent?oa.attachEvent("on"+aa,da):oa.addEventListener(aa,da)};qa(z,"scroll",x);qa(H,"scroll",x)}var K=function(){GraphViewer.resizeSensorEnabled&&m()},Q=Object.prototype.toString.call(k),d="[object Array]"===Q||"[object NodeList]"===Q||"[object HTMLCollection]"===Q||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(d){Q=0;for(var f=k.length;Q<f;Q++)E(k[Q],K)}else E(k,K);this.detach=function(){if(d)for(var g=0,x=k.length;g<x;g++)e.detach(k[g]); +g.appendChild(g.resizeSensor);"static"==p(g,"position")&&(g.style.position="relative");var y=g.resizeSensor.childNodes[0],u=y.childNodes[0],H=g.resizeSensor.childNodes[1],J=function(){u.style.width="100000px";u.style.height="100000px";y.scrollLeft=1E5;y.scrollTop=1E5;H.scrollLeft=1E5;H.scrollTop=1E5};J();var D=!1,G=function(){g.resizedAttached&&(D&&(g.resizedAttached.call(),D=!1),b(G))};b(G);var W,T,Z,N;x=function(){if((Z=g.offsetWidth)!=W||(N=g.offsetHeight)!=T)D=!0,W=Z,T=N;J()};var qa=function(oa, +S,fa){oa.attachEvent?oa.attachEvent("on"+S,fa):oa.addEventListener(S,fa)};qa(y,"scroll",x);qa(H,"scroll",x)}var K=function(){GraphViewer.resizeSensorEnabled&&m()},P=Object.prototype.toString.call(k),d="[object Array]"===P||"[object NodeList]"===P||"[object HTMLCollection]"===P||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(d){P=0;for(var f=k.length;P<f;P++)F(k[P],K)}else F(k,K);this.detach=function(){if(d)for(var g=0,x=k.length;g<x;g++)e.detach(k[g]); else e.detach(k)}};e.detach=function(k){k.resizeSensor&&(k.removeChild(k.resizeSensor),delete k.resizeSensor,delete k.resizedAttached)};window.ResizeSensor=e})(); function mxBpmnShape(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxBpmnShape,mxShape); mxBpmnShape.prototype.customProperties=[{name:"symbol",dispName:"Event",type:"enum",defVal:"general",enumList:[{val:"general",dispName:"General"},{val:"message",dispName:"Message"},{val:"timer",dispName:"Timer"},{val:"escalation",dispName:"Escalation"},{val:"conditional",dispName:"Conditional"},{val:"link",dispName:"Link"},{val:"error",dispName:"Error"},{val:"cancel",dispName:"Cancel"},{val:"compensation",dispName:"Compensation"},{val:"signal",dispName:"Signal"},{val:"multiple",dispName:"Multiple"}, diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js index bad36330..6c31a554 100644 --- a/src/main/webapp/js/viewer.min.js +++ b/src/main/webapp/js/viewer.min.js @@ -96,7 +96,7 @@ window.EXPORT_URL=window.EXPORT_URL||"https://convert.diagrams.net/node/export"; window.REALTIME_URL=window.REALTIME_URL||("test.draw.io"==window.location.hostname&&"local"!=urlParams.cache?"https://app.diagrams.net/cache":"cache");window.DRAWIO_GITLAB_URL=window.DRAWIO_GITLAB_URL||"https://gitlab.com";window.DRAWIO_GITLAB_ID=window.DRAWIO_GITLAB_ID||"2b14debc5feeb18ba65358d863ec870e4cc9294b28c3c941cb3014eb4af9a9b4";window.DRAWIO_GITHUB_URL=window.DRAWIO_GITHUB_URL||"https://github.com";window.DRAWIO_GITHUB_API_URL=window.DRAWIO_GITHUB_API_URL||"https://api.github.com"; window.DRAWIO_GITHUB_ID=window.DRAWIO_GITHUB_ID||"Iv1.98d62f0431e40543";window.DRAWIO_DROPBOX_ID=window.DRAWIO_DROPBOX_ID||"jg02tc0onwmhlgm";window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"import";window.PROXY_URL=window.PROXY_URL||"proxy";window.DRAWIO_VIEWER_URL=window.DRAWIO_VIEWER_URL||null;window.NOTIFICATIONS_URL=window.NOTIFICATIONS_URL||"https://www.draw.io/notifications"; window.RT_WEBSOCKET_URL=window.RT_WEBSOCKET_URL||"wss://"+("test.draw.io"==window.location.hostname?"app.diagrams.net":window.location.hostname)+"/rt";window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||((null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":window.DRAWIO_BASE_URL+"/iconSearch"); -window.TEMPLATE_PATH=window.TEMPLATE_PATH||"templates";window.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"newDiagramCats";window.PLUGINS_BASE_PATH=window.PLUGINS_BASE_PATH||"";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_CONFIG=window.DRAWIO_CONFIG||null;window.mxLoadResources=window.mxLoadResources||!1; +window.TEMPLATE_PATH=window.TEMPLATE_PATH||"templates";window.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"newDiagramCats";window.PLUGINS_BASE_PATH=window.PLUGINS_BASE_PATH||"";window.ALLOW_CUSTOM_PLUGINS=window.ALLOW_CUSTOM_PLUGINS||!1;window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_CONFIG=window.DRAWIO_CONFIG||null;window.mxLoadResources=window.mxLoadResources||!1; window.mxLanguage=window.mxLanguage||function(){var a=urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null);if(!a&&window.mxIsElectron&&(a=urlParams.appLang,null!=a)){var c=a.indexOf("-");0<=c&&(a=a.substring(0,c));a=a.toLowerCase()}}catch(d){isLocalStorage=!1}return a}(); window.mxLanguageMap=window.mxLanguageMap||{i18n:"",id:"Bahasa Indonesia",ms:"Bahasa Melayu",bs:"Bosanski",bg:"Bulgarian",ca:"Català",cs:"Čeština",da:"Dansk",de:"Deutsch",et:"Eesti",en:"English",es:"Español",eu:"Euskara",fil:"Filipino",fr:"Français",gl:"Galego",it:"Italiano",hu:"Magyar",lt:"Lietuvių",lv:"Latviešu",nl:"Nederlands",no:"Norsk",pl:"Polski","pt-br":"Português (Brasil)",pt:"Português (Portugal)",ro:"Română",fi:"Suomi",sv:"Svenska",vi:"Tiếng Việt",tr:"Türkçe",el:"Ελληνικά",ru:"Русский", sr:"Српски",uk:"Українська",he:"עברית",ar:"العربية",fa:"فارسی",th:"ไทย",ko:"한국어",ja:"日本語",zh:"简体中文","zh-tw":"繁體中文"};"undefined"===typeof window.mxBasePath&&(window.mxBasePath="mxgraph",window.mxImageBasePath="mxgraph/images"); @@ -111,7 +111,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url "se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1"); "embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources"; window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang; -window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.2.8",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"), +window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.3.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"), IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor), IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&& 0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!== @@ -1954,7 +1954,7 @@ function(y,F){return(y=y.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i))?(6===y[1 color:x.style.color});switch(t){case 0:mxJSColor.requireImage("hs.png");break;case 1:mxJSColor.requireImage("hv.png")}this.importColor()}};mxJSColor.install(); var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(b){return b.raw=b};$jscomp.createTemplateTagFirstArgWithRaw=function(b,e){b.raw=e;return b};$jscomp.arrayIteratorImpl=function(b){var e=0;return function(){return e<b.length?{done:!1,value:b[e++]}:{done:!0}}};$jscomp.arrayIterator=function(b){return{next:$jscomp.arrayIteratorImpl(b)}};$jscomp.makeIterator=function(b){var e="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];return e?e.call(b):$jscomp.arrayIterator(b)}; Editor=function(b,e,k,m,C){mxEventSource.call(this);this.chromeless=null!=b?b:this.chromeless;this.initStencilRegistry();this.graph=m||this.createGraph(e,k);this.editable=null!=C?C:!b;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(p){this.status=p;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus= -function(){return this.status};this.graphChangeListener=function(p,E){p=null!=E?E.getProperty("edit"):null;null!=p&&p.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0; +function(){return this.status};this.graphChangeListener=function(p,F){p=null!=F?F.getProperty("edit"):null;null!=p&&p.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0; (function(){try{for(var b=window;null!=b.opener&&"undefined"!==typeof b.opener.Editor&&!isNaN(b.opener.Editor.pageCounter)&&b.opener!=b;)b=b.opener;null!=b&&(b.Editor.pageCounter++,Editor.pageCounter=b.Editor.pageCounter)}catch(e){}})();Editor.defaultHtmlFont='-apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", system-ui, ui-sans-serif, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"';Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS; Editor.rowMoveImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=";Editor.lightCheckmarkImage="data:image/gif;base64,R0lGODlhFQAVAMQfAGxsbHx8fIqKioaGhvb29nJycvr6+sDAwJqamltbW5OTk+np6YGBgeTk5Ly8vJiYmP39/fLy8qWlpa6ursjIyOLi4vj4+N/f3+3t7fT09LCwsHZ2dubm5r6+vmZmZv///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OEY4NTZERTQ5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OEY4NTZERTU5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Rjg1NkRFMjlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Rjg1NkRFMzlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAB8ALAAAAAAVABUAAAVI4CeOZGmeaKqubKtylktSgCOLRyLd3+QJEJnh4VHcMoOfYQXQLBcBD4PA6ngGlIInEHEhPOANRkaIFhq8SuHCE1Hb8Lh8LgsBADs="; Editor.darkCheckmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg==";Editor.darkHelpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII="; @@ -1979,8 +1979,6 @@ Editor.closeBlackImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy Editor.plusImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==";Editor.shapesImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48Zz48cGF0aCBkPSJNMywxMWg4VjNIM1YxMXogTTUsNWg0djRINVY1eiIvPjxwYXRoIGQ9Ik0xMywzdjhoOFYzSDEzeiBNMTksOWgtNFY1aDRWOXoiLz48cGF0aCBkPSJNMywyMWg4di04SDNWMjF6IE01LDE1aDR2NEg1VjE1eiIvPjxwb2x5Z29uIHBvaW50cz0iMTgsMTMgMTYsMTMgMTYsMTYgMTMsMTYgMTMsMTggMTYsMTggMTYsMjEgMTgsMjEgMTgsMTggMjEsMTggMjEsMTYgMTgsMTYiLz48L2c+PC9nPjwvc3ZnPg=="; Editor.formatImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg=="; Editor.freehandImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHJlY3QgZmlsbD0ibm9uZSIgaGVpZ2h0PSIyNCIgd2lkdGg9IjI0Ii8+PHBhdGggZD0iTTQuNSw4YzEuMDQsMCwyLjM0LTEuNSw0LjI1LTEuNWMxLjUyLDAsMi43NSwxLjIzLDIuNzUsMi43NWMwLDIuMDQtMS45OSwzLjE1LTMuOTEsNC4yMkM1LjQyLDE0LjY3LDQsMTUuNTcsNCwxNyBjMCwxLjEsMC45LDIsMiwydjJjLTIuMjEsMC00LTEuNzktNC00YzAtMi43MSwyLjU2LTQuMTQsNC42Mi01LjI4YzEuNDItMC43OSwyLjg4LTEuNiwyLjg4LTIuNDdjMC0wLjQxLTAuMzQtMC43NS0wLjc1LTAuNzUgQzcuNSw4LjUsNi4yNSwxMCw0LjUsMTBDMy4xMiwxMCwyLDguODgsMiw3LjVDMiw1LjQ1LDQuMTcsMi44Myw1LDJsMS40MSwxLjQxQzUuNDEsNC40Miw0LDYuNDMsNCw3LjVDNCw3Ljc4LDQuMjIsOCw0LjUsOHogTTgsMjEgbDMuNzUsMGw4LjA2LTguMDZsLTMuNzUtMy43NUw4LDE3LjI1TDgsMjF6IE0xMCwxOC4wOGw2LjA2LTYuMDZsMC45MiwwLjkyTDEwLjkyLDE5TDEwLDE5TDEwLDE4LjA4eiBNMjAuMzcsNi4yOSBjLTAuMzktMC4zOS0xLjAyLTAuMzktMS40MSwwbC0xLjgzLDEuODNsMy43NSwzLjc1bDEuODMtMS44M2MwLjM5LTAuMzksMC4zOS0xLjAyLDAtMS40MUwyMC4zNyw2LjI5eiIvPjwvc3ZnPg=="; -Editor.darkImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxyZWN0IGZpbGw9Im5vbmUiIGhlaWdodD0iMjQiIHdpZHRoPSIyNCIvPjxwYXRoIGQ9Ik05LjM3LDUuNTFDOS4xOSw2LjE1LDkuMSw2LjgyLDkuMSw3LjVjMCw0LjA4LDMuMzIsNy40LDcuNCw3LjRjMC42OCwwLDEuMzUtMC4wOSwxLjk5LTAuMjdDMTcuNDUsMTcuMTksMTQuOTMsMTksMTIsMTkgYy0zLjg2LDAtNy0zLjE0LTctN0M1LDkuMDcsNi44MSw2LjU1LDkuMzcsNS41MXogTTEyLDNjLTQuOTcsMC05LDQuMDMtOSw5czQuMDMsOSw5LDlzOS00LjAzLDktOWMwLTAuNDYtMC4wNC0wLjkyLTAuMS0xLjM2IGMtMC45OCwxLjM3LTIuNTgsMi4yNi00LjQsMi4yNmMtMi45OCwwLTUuNC0yLjQyLTUuNC01LjRjMC0xLjgxLDAuODktMy40MiwyLjI2LTQuNEMxMi45MiwzLjA0LDEyLjQ2LDMsMTIsM0wxMiwzeiIvPjwvc3ZnPg=="; -Editor.lightImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxyZWN0IGZpbGw9Im5vbmUiIGhlaWdodD0iMjQiIHdpZHRoPSIyNCIvPjxwYXRoIGQ9Ik0xMiw5YzEuNjUsMCwzLDEuMzUsMywzcy0xLjM1LDMtMywzcy0zLTEuMzUtMy0zUzEwLjM1LDksMTIsOSBNMTIsN2MtMi43NiwwLTUsMi4yNC01LDVzMi4yNCw1LDUsNXM1LTIuMjQsNS01IFMxNC43Niw3LDEyLDdMMTIsN3ogTTIsMTNsMiwwYzAuNTUsMCwxLTAuNDUsMS0xcy0wLjQ1LTEtMS0xbC0yLDBjLTAuNTUsMC0xLDAuNDUtMSwxUzEuNDUsMTMsMiwxM3ogTTIwLDEzbDIsMGMwLjU1LDAsMS0wLjQ1LDEtMSBzLTAuNDUtMS0xLTFsLTIsMGMtMC41NSwwLTEsMC40NS0xLDFTMTkuNDUsMTMsMjAsMTN6IE0xMSwydjJjMCwwLjU1LDAuNDUsMSwxLDFzMS0wLjQ1LDEtMVYyYzAtMC41NS0wLjQ1LTEtMS0xUzExLDEuNDUsMTEsMnogTTExLDIwdjJjMCwwLjU1LDAuNDUsMSwxLDFzMS0wLjQ1LDEtMXYtMmMwLTAuNTUtMC40NS0xLTEtMUMxMS40NSwxOSwxMSwxOS40NSwxMSwyMHogTTUuOTksNC41OGMtMC4zOS0wLjM5LTEuMDMtMC4zOS0xLjQxLDAgYy0wLjM5LDAuMzktMC4zOSwxLjAzLDAsMS40MWwxLjA2LDEuMDZjMC4zOSwwLjM5LDEuMDMsMC4zOSwxLjQxLDBzMC4zOS0xLjAzLDAtMS40MUw1Ljk5LDQuNTh6IE0xOC4zNiwxNi45NSBjLTAuMzktMC4zOS0xLjAzLTAuMzktMS40MSwwYy0wLjM5LDAuMzktMC4zOSwxLjAzLDAsMS40MWwxLjA2LDEuMDZjMC4zOSwwLjM5LDEuMDMsMC4zOSwxLjQxLDBjMC4zOS0wLjM5LDAuMzktMS4wMywwLTEuNDEgTDE4LjM2LDE2Ljk1eiBNMTkuNDIsNS45OWMwLjM5LTAuMzksMC4zOS0xLjAzLDAtMS40MWMtMC4zOS0wLjM5LTEuMDMtMC4zOS0xLjQxLDBsLTEuMDYsMS4wNmMtMC4zOSwwLjM5LTAuMzksMS4wMywwLDEuNDEgczEuMDMsMC4zOSwxLjQxLDBMMTkuNDIsNS45OXogTTcuMDUsMTguMzZjMC4zOS0wLjM5LDAuMzktMS4wMywwLTEuNDFjLTAuMzktMC4zOS0xLjAzLTAuMzktMS40MSwwbC0xLjA2LDEuMDYgYy0wLjM5LDAuMzktMC4zOSwxLjAzLDAsMS40MXMxLjAzLDAuMzksMS40MSwwTDcuMDUsMTguMzZ6Ii8+PC9zdmc+"; Editor.undoImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+";Editor.redoImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg=="; Editor.outlineImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjxwYXRoIGQ9Ik0yMC41IDNsLS4xNi4wM0wxNSA1LjEgOSAzIDMuMzYgNC45Yy0uMjEuMDctLjM2LjI1LS4zNi40OFYyMC41YzAgLjI4LjIyLjUuNS41bC4xNi0uMDNMOSAxOC45bDYgMi4xIDUuNjQtMS45Yy4yMS0uMDcuMzYtLjI1LjM2LS40OFYzLjVjMC0uMjgtLjIyLS41LS41LS41ek0xNSAxOWwtNi0yLjExVjVsNiAyLjExVjE5eiIvPjwvc3ZnPg=="; Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDEydjdINXYtN0gzdjdjMCAxLjEuOSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMnYtN2gtMnptLTYgLjY3bDIuNTktMi41OEwxNyAxMS41bC01IDUtNS01IDEuNDEtMS40MUwxMSAxMi42N1YzaDJ2OS42N3oiLz48L3N2Zz4=";Editor.helpImage=Editor.lightHelpImage;Editor.checkmarkImage=Editor.lightCheckmarkImage; @@ -1988,7 +1986,7 @@ Editor.roughFillStyles=[{val:"auto",dispName:"Auto"},{val:"hachure",dispName:"Ha Editor.fillStyles=[{val:"auto",dispName:"Auto"},{val:"hatch",dispName:"Hatch"},{val:"solid",dispName:"Solid"},{val:"dots",dispName:"Dots"},{val:"cross-hatch",dispName:"Cross Hatch"},{val:"dashed",dispName:"Dashed"},{val:"zigzag-line",dispName:"ZigZag Line"}];Editor.themes=null;Editor.ctrlKey=mxClient.IS_MAC?"Cmd":"Ctrl";Editor.hintOffset=20;Editor.shapePickerHoverDelay=300;Editor.fitWindowBorders=null;Editor.popupsAllowed=null!=window.urlParams?"1"!=urlParams.noDevice:!0;Editor.simpleLabels=!1; Editor.enableNativeCipboard=window==window.top&&!mxClient.IS_FF&&null!=navigator.clipboard;Editor.sketchMode=!1;Editor.darkMode=!1;Editor.currentTheme=uiTheme;Editor.darkColor="#2a2a2a";Editor.lightColor="#f0f0f0";Editor.isDarkMode=function(b){return Editor.darkMode};Editor.isPngDataUrl=function(b){return null!=b&&"data:image/png;"==b.substring(0,15)}; Editor.isPngData=function(b){return 8<b.length&&137==b.charCodeAt(0)&&80==b.charCodeAt(1)&&78==b.charCodeAt(2)&&71==b.charCodeAt(3)&&13==b.charCodeAt(4)&&10==b.charCodeAt(5)&&26==b.charCodeAt(6)&&10==b.charCodeAt(7)}; -Editor.extractGraphModelFromPng=function(b){var e=null;try{var k=b.substring(b.indexOf(",")+1),m=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);EditorUi.parsePng(m,mxUtils.bind(this,function(C,p,E){C=m.substring(C+8,C+8+E);"zTXt"==p?(E=C.indexOf(String.fromCharCode(0)),"mxGraphModel"==C.substring(0,E)&&(C=pako.inflateRaw(Graph.stringToArrayBuffer(C.substring(E+2)),{to:"string"}).replace(/\+/g," "),null!=C&&0<C.length&&(e=C))):"tEXt"==p&&(C=C.split(String.fromCharCode(0)),1<C.length&&("mxGraphModel"== +Editor.extractGraphModelFromPng=function(b){var e=null;try{var k=b.substring(b.indexOf(",")+1),m=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);EditorUi.parsePng(m,mxUtils.bind(this,function(C,p,F){C=m.substring(C+8,C+8+F);"zTXt"==p?(F=C.indexOf(String.fromCharCode(0)),"mxGraphModel"==C.substring(0,F)&&(C=pako.inflateRaw(Graph.stringToArrayBuffer(C.substring(F+2)),{to:"string"}).replace(/\+/g," "),null!=C&&0<C.length&&(e=C))):"tEXt"==p&&(C=C.split(String.fromCharCode(0)),1<C.length&&("mxGraphModel"== C[0]||"mxfile"==C[0])&&(e=C[1]));if(null!=e||"IDAT"==p)return!0}))}catch(C){}null!=e&&"%"==e.charAt(0)&&(e=decodeURIComponent(e));null!=e&&"%"==e.charAt(0)&&(e=decodeURIComponent(e));return e};mxUtils.extend(Editor,mxEventSource);Editor.prototype.originalNoForeignObject=mxClient.NO_FO;Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif"; Editor.prototype.extendCanvas=!0;Editor.prototype.chromeless=!1;Editor.prototype.cancelFirst=!0;Editor.prototype.enabled=!0;Editor.prototype.filename=null;Editor.prototype.modified=!1;Editor.prototype.autosave=!0;Editor.prototype.initialTopSpacing=0;Editor.prototype.appName=document.title;Editor.prototype.editBlankUrl=window.location.protocol+"//"+window.location.host+"/";Editor.prototype.defaultGraphOverflow="hidden";Editor.prototype.init=function(){};Editor.prototype.isChromelessView=function(){return this.chromeless}; Editor.prototype.setAutosave=function(b){this.autosave=b;this.fireEvent(new mxEventObject("autosaveChanged"))};Editor.prototype.getEditBlankUrl=function(b){return this.editBlankUrl+b}; @@ -2005,107 +2003,107 @@ Editor.prototype.getGraphXml=function(b){b=(null!=b?b:1)?(new mxCodec(mxUtils.cr this.graph.gridSize);b.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");b.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");b.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");b.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");b.setAttribute("fold",this.graph.foldingEnabled?"1":"0");b.setAttribute("page",this.graph.pageVisible?"1":"0");b.setAttribute("pageScale",this.graph.pageScale);b.setAttribute("pageWidth",this.graph.pageFormat.width); b.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&b.setAttribute("background",this.graph.background);return b};Editor.prototype.updateGraphComponents=function(){var b=this.graph;null!=b.container&&(b.view.validateBackground(),b.container.style.overflow=b.scrollbars?"auto":this.defaultGraphOverflow,this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(b){this.modified=b}; Editor.prototype.setFilename=function(b){this.filename=b}; -Editor.prototype.createUndoManager=function(){var b=this.graph,e=new mxUndoManager;this.undoListener=function(m,C){e.undoableEditHappened(C.getProperty("edit"))};var k=mxUtils.bind(this,function(m,C){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,k);b.getView().addListener(mxEvent.UNDO,k);k=function(m,C){m=b.getSelectionCellsForChanges(C.getProperty("edit").changes,function(E){return!(E instanceof mxChildChange)});if(0<m.length){b.getModel();C=[];for(var p=0;p<m.length;p++)null!= +Editor.prototype.createUndoManager=function(){var b=this.graph,e=new mxUndoManager;this.undoListener=function(m,C){e.undoableEditHappened(C.getProperty("edit"))};var k=mxUtils.bind(this,function(m,C){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,k);b.getView().addListener(mxEvent.UNDO,k);k=function(m,C){m=b.getSelectionCellsForChanges(C.getProperty("edit").changes,function(F){return!(F instanceof mxChildChange)});if(0<m.length){b.getModel();C=[];for(var p=0;p<m.length;p++)null!= b.view.getState(m[p])&&C.push(m[p]);b.setSelectionCells(C)}};e.addListener(mxEvent.UNDO,k);e.addListener(mxEvent.REDO,k);return e};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()}; OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(b){null!=this.done&&this.done(null!=b?b:!0)}; -function Dialog(b,e,k,m,C,p,E,K,Q,d,f){var g=Q?57:0,x=k,z=m,u=Q?0:64,H=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(H.height=window.innerHeight);var J=H.height,D=Math.max(1,Math.round((H.width-k-u)/2)),G=Math.max(1,Math.round((J-m-b.footerHeight)/3));e.style.maxHeight="100%";k=null!=document.body?Math.min(k,document.body.scrollWidth-u):k;m=Math.min(m,J-u);0<b.dialogs.length&&(this.zIndex+= +function Dialog(b,e,k,m,C,p,F,K,P,d,f){var g=P?57:0,x=k,y=m,u=P?0:64,H=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(H.height=window.innerHeight);var J=H.height,D=Math.max(1,Math.round((H.width-k-u)/2)),G=Math.max(1,Math.round((J-m-b.footerHeight)/3));e.style.maxHeight="100%";k=null!=document.body?Math.min(k,document.body.scrollWidth-u):k;m=Math.min(m,J-u);0<b.dialogs.length&&(this.zIndex+= 2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=J+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));H=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=H.x+"px";this.bg.style.top=H.y+"px";D+=H.x;G+=H.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px", -G+=b.embedViewport.y,D+=b.embedViewport.x);C&&document.body.appendChild(this.bg);var V=b.createDiv(Q?"geTransDialog":"geDialog");C=this.getPosition(D,G,k,m);D=C.x;G=C.y;V.style.width=k+"px";V.style.height=m+"px";V.style.left=D+"px";V.style.top=G+"px";V.style.zIndex=this.zIndex;V.appendChild(e);document.body.appendChild(V);!K&&e.clientHeight>V.clientHeight-u&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage), -p.setAttribute("title",mxResources.get("close")),p.className="geDialogClose",p.style.top=G+14+"px",p.style.left=D+k+38-g+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!f)){var U=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(Y){U=!0}),null,mxUtils.bind(this,function(Y){U&&(b.hideDialog(!0),U=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=d){var Y=d(); -null!=Y&&(x=k=Y.w,z=m=Y.h)}Y=mxUtils.getDocumentSize();J=Y.height;this.bg.style.height=J+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");D=Math.max(1,Math.round((Y.width-k-u)/2));G=Math.max(1,Math.round((J-m-b.footerHeight)/3));k=null!=document.body?Math.min(x,document.body.scrollWidth-u):x;m=Math.min(z,J-u);Y=this.getPosition(D,G,k,m);D=Y.x;G=Y.y;V.style.left=D+"px";V.style.top=G+"px";V.style.width=k+"px";V.style.height=m+"px";!K&& -e.clientHeight>V.clientHeight-u&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=G+14+"px",this.dialogImg.style.left=D+k+38-g+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=E;this.container=V;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2; +G+=b.embedViewport.y,D+=b.embedViewport.x);C&&document.body.appendChild(this.bg);var W=b.createDiv(P?"geTransDialog":"geDialog");C=this.getPosition(D,G,k,m);D=C.x;G=C.y;W.style.width=k+"px";W.style.height=m+"px";W.style.left=D+"px";W.style.top=G+"px";W.style.zIndex=this.zIndex;W.appendChild(e);document.body.appendChild(W);!K&&e.clientHeight>W.clientHeight-u&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage), +p.setAttribute("title",mxResources.get("close")),p.className="geDialogClose",p.style.top=G+14+"px",p.style.left=D+k+38-g+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!f)){var T=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(Z){T=!0}),null,mxUtils.bind(this,function(Z){T&&(b.hideDialog(!0),T=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=d){var Z=d(); +null!=Z&&(x=k=Z.w,y=m=Z.h)}Z=mxUtils.getDocumentSize();J=Z.height;this.bg.style.height=J+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");D=Math.max(1,Math.round((Z.width-k-u)/2));G=Math.max(1,Math.round((J-m-b.footerHeight)/3));k=null!=document.body?Math.min(x,document.body.scrollWidth-u):x;m=Math.min(y,J-u);Z=this.getPosition(D,G,k,m);D=Z.x;G=Z.y;W.style.left=D+"px";W.style.top=G+"px";W.style.width=k+"px";W.style.height=m+"px";!K&& +e.clientHeight>W.clientHeight-u&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=G+14+"px",this.dialogImg.style.left=D+k+38-g+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=F;this.container=W;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2; Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+ "/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png"; Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+ "/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(b,e){return new mxPoint(b,e)};Dialog.prototype.close=function(b,e){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,e))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)}; -var ErrorDialog=function(b,e,k,m,C,p,E,K,Q,d,f){Q=null!=Q?Q:!0;var g=document.createElement("div");g.style.textAlign="center";if(null!=e){var x=document.createElement("div");x.style.padding="0px";x.style.margin="0px";x.style.fontSize="18px";x.style.paddingBottom="16px";x.style.marginBottom="10px";x.style.borderBottom="1px solid #c0c0c0";x.style.color="gray";x.style.whiteSpace="nowrap";x.style.textOverflow="ellipsis";x.style.overflow="hidden";mxUtils.write(x,e);x.setAttribute("title",e);g.appendChild(x)}e= -document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";e.innerHTML=k;g.appendChild(e);k=document.createElement("div");k.style.marginTop="12px";k.style.textAlign="center";null!=p&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();p()}),e.className="geBtn",k.appendChild(e),k.style.textAlign="center");null!=d&&(d=mxUtils.button(d,function(){null!=f&&f()}),d.className="geBtn",k.appendChild(d));var z=mxUtils.button(m,function(){Q&&b.hideDialog();null!=C&&C()}); -z.className="geBtn";k.appendChild(z);null!=E&&(m=mxUtils.button(E,function(){Q&&b.hideDialog();null!=K&&K()}),m.className="geBtn gePrimaryBtn",k.appendChild(m));this.init=function(){z.focus()};g.appendChild(k);this.container=g},PrintDialog=function(b,e){this.create(b,e)}; -PrintDialog.prototype.create=function(b){function e(z){var u=E.checked||d.checked,H=parseInt(g.value)/100;isNaN(H)&&(H=1,g.value="100%");H*=.75;var J=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,D=1/k.pageScale;if(u){var G=E.checked?1:parseInt(f.value);isNaN(G)||(D=mxUtils.getScaleForPageCount(G,k,J))}k.getGraphBounds();var V=G=0;J=mxRectangle.fromRectangle(J);J.width=Math.ceil(J.width*H);J.height=Math.ceil(J.height*H);D*=H;!u&&k.pageVisible?(H=k.getPageLayout(),G-=H.x*J.width,V-=H.y*J.height): -u=!0;u=PrintDialog.createPrintPreview(k,D,J,0,G,V,u);u.open();z&&PrintDialog.printPreview(u)}var k=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var C=document.createElement("tbody");var p=document.createElement("tr");var E=document.createElement("input");E.setAttribute("type","checkbox");var K=document.createElement("td");K.setAttribute("colspan","2");K.style.fontSize="10pt";K.appendChild(E);var Q=document.createElement("span");mxUtils.write(Q," "+mxResources.get("fitPage")); -K.appendChild(Q);mxEvent.addListener(Q,"click",function(z){E.checked=!E.checked;d.checked=!E.checked;mxEvent.consume(z)});mxEvent.addListener(E,"change",function(){d.checked=!E.checked});p.appendChild(K);C.appendChild(p);p=p.cloneNode(!1);var d=document.createElement("input");d.setAttribute("type","checkbox");K=document.createElement("td");K.style.fontSize="10pt";K.appendChild(d);Q=document.createElement("span");mxUtils.write(Q," "+mxResources.get("posterPrint")+":");K.appendChild(Q);mxEvent.addListener(Q, -"click",function(z){d.checked=!d.checked;E.checked=!d.checked;mxEvent.consume(z)});p.appendChild(K);var f=document.createElement("input");f.setAttribute("value","1");f.setAttribute("type","number");f.setAttribute("min","1");f.setAttribute("size","4");f.setAttribute("disabled","disabled");f.style.width="50px";K=document.createElement("td");K.style.fontSize="10pt";K.appendChild(f);mxUtils.write(K," "+mxResources.get("pages")+" (max)");p.appendChild(K);C.appendChild(p);mxEvent.addListener(d,"change", -function(){d.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled");E.checked=!d.checked});p=p.cloneNode(!1);K=document.createElement("td");mxUtils.write(K,mxResources.get("pageScale")+":");p.appendChild(K);K=document.createElement("td");var g=document.createElement("input");g.setAttribute("value","100 %");g.setAttribute("size","5");g.style.width="50px";K.appendChild(g);p.appendChild(K);C.appendChild(p);p=document.createElement("tr");K=document.createElement("td");K.colSpan=2; -K.style.paddingTop="20px";K.setAttribute("align","right");Q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});Q.className="geBtn";b.editor.cancelFirst&&K.appendChild(Q);if(PrintDialog.previewEnabled){var x=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});x.className="geBtn";K.appendChild(x)}x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});x.className="geBtn gePrimaryBtn";K.appendChild(x);b.editor.cancelFirst|| -K.appendChild(Q);p.appendChild(K);C.appendChild(p);m.appendChild(C);this.container=m};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var e=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(e,500):e()}}catch(k){}}; -PrintDialog.createPrintPreview=function(b,e,k,m,C,p,E){e=new mxPrintPreview(b,e,k,m,C,p);e.title=mxResources.get("preview");e.printBackgroundImage=!0;e.autoOrigin=E;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";e.backgroundColor=b;var K=e.writeHead;e.writeHead=function(Q){K.apply(this,arguments);Q.writeln('<style type="text/css">');Q.writeln("@media screen {");Q.writeln(" body > div { padding:30px;box-sizing:content-box; }");Q.writeln("}");Q.writeln("</style>")};return e}; +var ErrorDialog=function(b,e,k,m,C,p,F,K,P,d,f){P=null!=P?P:!0;var g=document.createElement("div");g.style.textAlign="center";if(null!=e){var x=document.createElement("div");x.style.padding="0px";x.style.margin="0px";x.style.fontSize="18px";x.style.paddingBottom="16px";x.style.marginBottom="10px";x.style.borderBottom="1px solid #c0c0c0";x.style.color="gray";x.style.whiteSpace="nowrap";x.style.textOverflow="ellipsis";x.style.overflow="hidden";mxUtils.write(x,e);x.setAttribute("title",e);g.appendChild(x)}e= +document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";e.innerHTML=k;g.appendChild(e);k=document.createElement("div");k.style.marginTop="12px";k.style.textAlign="center";null!=p&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();p()}),e.className="geBtn",k.appendChild(e),k.style.textAlign="center");null!=d&&(d=mxUtils.button(d,function(){null!=f&&f()}),d.className="geBtn",k.appendChild(d));var y=mxUtils.button(m,function(){P&&b.hideDialog();null!=C&&C()}); +y.className="geBtn";k.appendChild(y);null!=F&&(m=mxUtils.button(F,function(){P&&b.hideDialog();null!=K&&K()}),m.className="geBtn gePrimaryBtn",k.appendChild(m));this.init=function(){y.focus()};g.appendChild(k);this.container=g},PrintDialog=function(b,e){this.create(b,e)}; +PrintDialog.prototype.create=function(b){function e(y){var u=F.checked||d.checked,H=parseInt(g.value)/100;isNaN(H)&&(H=1,g.value="100%");H*=.75;var J=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,D=1/k.pageScale;if(u){var G=F.checked?1:parseInt(f.value);isNaN(G)||(D=mxUtils.getScaleForPageCount(G,k,J))}k.getGraphBounds();var W=G=0;J=mxRectangle.fromRectangle(J);J.width=Math.ceil(J.width*H);J.height=Math.ceil(J.height*H);D*=H;!u&&k.pageVisible?(H=k.getPageLayout(),G-=H.x*J.width,W-=H.y*J.height): +u=!0;u=PrintDialog.createPrintPreview(k,D,J,0,G,W,u);u.open();y&&PrintDialog.printPreview(u)}var k=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var C=document.createElement("tbody");var p=document.createElement("tr");var F=document.createElement("input");F.setAttribute("type","checkbox");var K=document.createElement("td");K.setAttribute("colspan","2");K.style.fontSize="10pt";K.appendChild(F);var P=document.createElement("span");mxUtils.write(P," "+mxResources.get("fitPage")); +K.appendChild(P);mxEvent.addListener(P,"click",function(y){F.checked=!F.checked;d.checked=!F.checked;mxEvent.consume(y)});mxEvent.addListener(F,"change",function(){d.checked=!F.checked});p.appendChild(K);C.appendChild(p);p=p.cloneNode(!1);var d=document.createElement("input");d.setAttribute("type","checkbox");K=document.createElement("td");K.style.fontSize="10pt";K.appendChild(d);P=document.createElement("span");mxUtils.write(P," "+mxResources.get("posterPrint")+":");K.appendChild(P);mxEvent.addListener(P, +"click",function(y){d.checked=!d.checked;F.checked=!d.checked;mxEvent.consume(y)});p.appendChild(K);var f=document.createElement("input");f.setAttribute("value","1");f.setAttribute("type","number");f.setAttribute("min","1");f.setAttribute("size","4");f.setAttribute("disabled","disabled");f.style.width="50px";K=document.createElement("td");K.style.fontSize="10pt";K.appendChild(f);mxUtils.write(K," "+mxResources.get("pages")+" (max)");p.appendChild(K);C.appendChild(p);mxEvent.addListener(d,"change", +function(){d.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled");F.checked=!d.checked});p=p.cloneNode(!1);K=document.createElement("td");mxUtils.write(K,mxResources.get("pageScale")+":");p.appendChild(K);K=document.createElement("td");var g=document.createElement("input");g.setAttribute("value","100 %");g.setAttribute("size","5");g.style.width="50px";K.appendChild(g);p.appendChild(K);C.appendChild(p);p=document.createElement("tr");K=document.createElement("td");K.colSpan=2; +K.style.paddingTop="20px";K.setAttribute("align","right");P=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});P.className="geBtn";b.editor.cancelFirst&&K.appendChild(P);if(PrintDialog.previewEnabled){var x=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});x.className="geBtn";K.appendChild(x)}x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});x.className="geBtn gePrimaryBtn";K.appendChild(x);b.editor.cancelFirst|| +K.appendChild(P);p.appendChild(K);C.appendChild(p);m.appendChild(C);this.container=m};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var e=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(e,500):e()}}catch(k){}}; +PrintDialog.createPrintPreview=function(b,e,k,m,C,p,F){e=new mxPrintPreview(b,e,k,m,C,p);e.title=mxResources.get("preview");e.printBackgroundImage=!0;e.autoOrigin=F;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";e.backgroundColor=b;var K=e.writeHead;e.writeHead=function(P){K.apply(this,arguments);P.writeln('<style type="text/css">');P.writeln("@media screen {");P.writeln(" body > div { padding:30px;box-sizing:content-box; }");P.writeln("}");P.writeln("</style>")};return e}; PrintDialog.previewEnabled=!0; -var PageSetupDialog=function(b){function e(){null==f||f==mxConstants.NONE?(d.style.backgroundColor="",d.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(d.style.backgroundColor=f,d.style.backgroundImage="")}function k(){var J=u;null!=J&&Graph.isPageLink(J.src)&&(J=b.createImageForPageLink(J.src,null));null!=J&&null!=J.src?(z.setAttribute("src",J.src),z.style.display=""):(z.removeAttribute("src"),z.style.display="none")}var m=b.editor.graph,C=document.createElement("table");C.style.width= -"100%";C.style.height="100%";var p=document.createElement("tbody");var E=document.createElement("tr");var K=document.createElement("td");K.style.verticalAlign="top";K.style.fontSize="10pt";mxUtils.write(K,mxResources.get("paperSize")+":");E.appendChild(K);K=document.createElement("td");K.style.verticalAlign="top";K.style.fontSize="10pt";var Q=PageSetupDialog.addPageFormatPanel(K,"pagesetupdialog",m.pageFormat);E.appendChild(K);p.appendChild(E);E=document.createElement("tr");K=document.createElement("td"); -mxUtils.write(K,mxResources.get("background")+":");E.appendChild(K);K=document.createElement("td");K.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var d=document.createElement("button");d.style.width="22px";d.style.height="22px";d.style.cursor="pointer";d.style.marginRight="20px";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(d.style.position="relative",d.style.top="-6px");var f=m.background;e();mxEvent.addListener(d, -"click",function(J){b.pickColor(f||"none",function(D){f=D;e()});mxEvent.consume(J)});K.appendChild(d);mxUtils.write(K,mxResources.get("gridSize")+":");var g=document.createElement("input");g.setAttribute("type","number");g.setAttribute("min","0");g.style.width="40px";g.style.marginLeft="6px";g.value=m.getGridSize();K.appendChild(g);mxEvent.addListener(g,"change",function(){var J=parseInt(g.value);g.value=Math.max(1,isNaN(J)?m.getGridSize():J)});E.appendChild(K);p.appendChild(E);E=document.createElement("tr"); -K=document.createElement("td");mxUtils.write(K,mxResources.get("image")+":");E.appendChild(K);K=document.createElement("td");var x=document.createElement("button");x.className="geBtn";x.style.margin="0px";mxUtils.write(x,mxResources.get("change")+"...");var z=document.createElement("img");z.setAttribute("valign","middle");z.style.verticalAlign="middle";z.style.border="1px solid lightGray";z.style.borderRadius="4px";z.style.marginRight="14px";z.style.maxWidth="100px";z.style.cursor="pointer";z.style.height= -"60px";z.style.padding="4px";var u=m.backgroundImage,H=function(J){b.showBackgroundImageDialog(function(D,G){G||(u=D,k())},u);mxEvent.consume(J)};mxEvent.addListener(x,"click",H);mxEvent.addListener(z,"click",H);k();K.appendChild(z);K.appendChild(x);E.appendChild(K);p.appendChild(E);E=document.createElement("tr");K=document.createElement("td");K.colSpan=2;K.style.paddingTop="16px";K.setAttribute("align","right");x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn"; -b.editor.cancelFirst&&K.appendChild(x);H=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var J=parseInt(g.value);isNaN(J)||m.gridSize===J||m.setGridSize(J);J=new ChangePageSetup(b,f,u,Q.get());J.ignoreColor=m.background==f;J.ignoreImage=(null!=m.backgroundImage?m.backgroundImage.src:null)===(null!=u?u.src:null);m.pageFormat.width==J.previousFormat.width&&m.pageFormat.height==J.previousFormat.height&&J.ignoreColor&&J.ignoreImage||m.model.execute(J)});H.className="geBtn gePrimaryBtn"; -K.appendChild(H);b.editor.cancelFirst||K.appendChild(x);E.appendChild(K);p.appendChild(E);C.appendChild(p);this.container=C}; -PageSetupDialog.addPageFormatPanel=function(b,e,k,m){function C(Y,O,qa){if(qa||g!=document.activeElement&&x!=document.activeElement){Y=!1;for(O=0;O<u.length;O++)qa=u[O],G?"custom"==qa.key&&(K.value=qa.key,G=!1):null!=qa.format&&("a4"==qa.key?826==k.width?(k=mxRectangle.fromRectangle(k),k.width=827):826==k.height&&(k=mxRectangle.fromRectangle(k),k.height=827):"a5"==qa.key&&(584==k.width?(k=mxRectangle.fromRectangle(k),k.width=583):584==k.height&&(k=mxRectangle.fromRectangle(k),k.height=583)),k.width== -qa.format.width&&k.height==qa.format.height?(K.value=qa.key,p.setAttribute("checked","checked"),p.defaultChecked=!0,p.checked=!0,E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1,Y=!0):k.width==qa.format.height&&k.height==qa.format.width&&(K.value=qa.key,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,E.setAttribute("checked","checked"),E.defaultChecked=!0,Y=E.checked=!0));Y?(Q.style.display="",f.style.display="none"):(g.value=k.width/100,x.value=k.height/100,p.setAttribute("checked", -"checked"),K.value="custom",Q.style.display="none",f.style.display="")}}e="format-"+e;var p=document.createElement("input");p.setAttribute("name",e);p.setAttribute("type","radio");p.setAttribute("value","portrait");var E=document.createElement("input");E.setAttribute("name",e);E.setAttribute("type","radio");E.setAttribute("value","landscape");var K=document.createElement("select");K.style.marginBottom="8px";K.style.borderRadius="4px";K.style.border="1px solid rgb(160, 160, 160)";K.style.width="206px"; -var Q=document.createElement("div");Q.style.marginLeft="4px";Q.style.width="210px";Q.style.height="24px";p.style.marginRight="6px";Q.appendChild(p);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));Q.appendChild(e);E.style.marginLeft="10px";E.style.marginRight="6px";Q.appendChild(E);var d=document.createElement("span");d.style.width="100px";mxUtils.write(d,mxResources.get("landscape"));Q.appendChild(d);var f=document.createElement("div");f.style.marginLeft= -"4px";f.style.width="210px";f.style.height="24px";var g=document.createElement("input");g.setAttribute("size","7");g.style.textAlign="right";f.appendChild(g);mxUtils.write(f," in x ");var x=document.createElement("input");x.setAttribute("size","7");x.style.textAlign="right";f.appendChild(x);mxUtils.write(f," in");Q.style.display="none";f.style.display="none";for(var z={},u=PageSetupDialog.getFormats(),H=0;H<u.length;H++){var J=u[H];z[J.key]=J;var D=document.createElement("option");D.setAttribute("value", -J.key);mxUtils.write(D,J.title);K.appendChild(D)}var G=!1;C();b.appendChild(K);mxUtils.br(b);b.appendChild(Q);b.appendChild(f);var V=k,U=function(Y,O){Y=z[K.value];null!=Y.format?(g.value=Y.format.width/100,x.value=Y.format.height/100,f.style.display="none",Q.style.display=""):(Q.style.display="none",f.style.display="");Y=parseFloat(g.value);if(isNaN(Y)||0>=Y)g.value=k.width/100;Y=parseFloat(x.value);if(isNaN(Y)||0>=Y)x.value=k.height/100;Y=new mxRectangle(0,0,Math.floor(100*parseFloat(g.value)), -Math.floor(100*parseFloat(x.value)));"custom"!=K.value&&E.checked&&(Y=new mxRectangle(0,0,Y.height,Y.width));O&&G||Y.width==V.width&&Y.height==V.height||(V=Y,null!=m&&m(V))};mxEvent.addListener(e,"click",function(Y){p.checked=!0;U(Y);mxEvent.consume(Y)});mxEvent.addListener(d,"click",function(Y){E.checked=!0;U(Y);mxEvent.consume(Y)});mxEvent.addListener(g,"blur",U);mxEvent.addListener(g,"click",U);mxEvent.addListener(x,"blur",U);mxEvent.addListener(x,"click",U);mxEvent.addListener(E,"change",U);mxEvent.addListener(p, -"change",U);mxEvent.addListener(K,"change",function(Y){G="custom"==K.value;U(Y,!0)});U();return{set:function(Y){k=Y;C(null,null,!0)},get:function(){return V},widthInput:g,heightInput:x}}; +var PageSetupDialog=function(b){function e(){null==f||f==mxConstants.NONE?(d.style.backgroundColor="",d.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(d.style.backgroundColor=f,d.style.backgroundImage="")}function k(){var J=u;null!=J&&Graph.isPageLink(J.src)&&(J=b.createImageForPageLink(J.src,null));null!=J&&null!=J.src?(y.setAttribute("src",J.src),y.style.display=""):(y.removeAttribute("src"),y.style.display="none")}var m=b.editor.graph,C=document.createElement("table");C.style.width= +"100%";C.style.height="100%";var p=document.createElement("tbody");var F=document.createElement("tr");var K=document.createElement("td");K.style.verticalAlign="top";K.style.fontSize="10pt";mxUtils.write(K,mxResources.get("paperSize")+":");F.appendChild(K);K=document.createElement("td");K.style.verticalAlign="top";K.style.fontSize="10pt";var P=PageSetupDialog.addPageFormatPanel(K,"pagesetupdialog",m.pageFormat);F.appendChild(K);p.appendChild(F);F=document.createElement("tr");K=document.createElement("td"); +mxUtils.write(K,mxResources.get("background")+":");F.appendChild(K);K=document.createElement("td");K.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var d=document.createElement("button");d.style.width="22px";d.style.height="22px";d.style.cursor="pointer";d.style.marginRight="20px";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(d.style.position="relative",d.style.top="-6px");var f=m.background;e();mxEvent.addListener(d, +"click",function(J){b.pickColor(f||"none",function(D){f=D;e()});mxEvent.consume(J)});K.appendChild(d);mxUtils.write(K,mxResources.get("gridSize")+":");var g=document.createElement("input");g.setAttribute("type","number");g.setAttribute("min","0");g.style.width="40px";g.style.marginLeft="6px";g.value=m.getGridSize();K.appendChild(g);mxEvent.addListener(g,"change",function(){var J=parseInt(g.value);g.value=Math.max(1,isNaN(J)?m.getGridSize():J)});F.appendChild(K);p.appendChild(F);F=document.createElement("tr"); +K=document.createElement("td");mxUtils.write(K,mxResources.get("image")+":");F.appendChild(K);K=document.createElement("td");var x=document.createElement("button");x.className="geBtn";x.style.margin="0px";mxUtils.write(x,mxResources.get("change")+"...");var y=document.createElement("img");y.setAttribute("valign","middle");y.style.verticalAlign="middle";y.style.border="1px solid lightGray";y.style.borderRadius="4px";y.style.marginRight="14px";y.style.maxWidth="100px";y.style.cursor="pointer";y.style.height= +"60px";y.style.padding="4px";var u=m.backgroundImage,H=function(J){b.showBackgroundImageDialog(function(D,G){G||(u=D,k())},u);mxEvent.consume(J)};mxEvent.addListener(x,"click",H);mxEvent.addListener(y,"click",H);k();K.appendChild(y);K.appendChild(x);F.appendChild(K);p.appendChild(F);F=document.createElement("tr");K=document.createElement("td");K.colSpan=2;K.style.paddingTop="16px";K.setAttribute("align","right");x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn"; +b.editor.cancelFirst&&K.appendChild(x);H=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var J=parseInt(g.value);isNaN(J)||m.gridSize===J||m.setGridSize(J);J=new ChangePageSetup(b,f,u,P.get());J.ignoreColor=m.background==f;J.ignoreImage=(null!=m.backgroundImage?m.backgroundImage.src:null)===(null!=u?u.src:null);m.pageFormat.width==J.previousFormat.width&&m.pageFormat.height==J.previousFormat.height&&J.ignoreColor&&J.ignoreImage||m.model.execute(J)});H.className="geBtn gePrimaryBtn"; +K.appendChild(H);b.editor.cancelFirst||K.appendChild(x);F.appendChild(K);p.appendChild(F);C.appendChild(p);this.container=C}; +PageSetupDialog.addPageFormatPanel=function(b,e,k,m){function C(Z,N,qa){if(qa||g!=document.activeElement&&x!=document.activeElement){Z=!1;for(N=0;N<u.length;N++)qa=u[N],G?"custom"==qa.key&&(K.value=qa.key,G=!1):null!=qa.format&&("a4"==qa.key?826==k.width?(k=mxRectangle.fromRectangle(k),k.width=827):826==k.height&&(k=mxRectangle.fromRectangle(k),k.height=827):"a5"==qa.key&&(584==k.width?(k=mxRectangle.fromRectangle(k),k.width=583):584==k.height&&(k=mxRectangle.fromRectangle(k),k.height=583)),k.width== +qa.format.width&&k.height==qa.format.height?(K.value=qa.key,p.setAttribute("checked","checked"),p.defaultChecked=!0,p.checked=!0,F.removeAttribute("checked"),F.defaultChecked=!1,F.checked=!1,Z=!0):k.width==qa.format.height&&k.height==qa.format.width&&(K.value=qa.key,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,F.setAttribute("checked","checked"),F.defaultChecked=!0,Z=F.checked=!0));Z?(P.style.display="",f.style.display="none"):(g.value=k.width/100,x.value=k.height/100,p.setAttribute("checked", +"checked"),K.value="custom",P.style.display="none",f.style.display="")}}e="format-"+e;var p=document.createElement("input");p.setAttribute("name",e);p.setAttribute("type","radio");p.setAttribute("value","portrait");var F=document.createElement("input");F.setAttribute("name",e);F.setAttribute("type","radio");F.setAttribute("value","landscape");var K=document.createElement("select");K.style.marginBottom="8px";K.style.borderRadius="4px";K.style.border="1px solid rgb(160, 160, 160)";K.style.width="206px"; +var P=document.createElement("div");P.style.marginLeft="4px";P.style.width="210px";P.style.height="24px";p.style.marginRight="6px";P.appendChild(p);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));P.appendChild(e);F.style.marginLeft="10px";F.style.marginRight="6px";P.appendChild(F);var d=document.createElement("span");d.style.width="100px";mxUtils.write(d,mxResources.get("landscape"));P.appendChild(d);var f=document.createElement("div");f.style.marginLeft= +"4px";f.style.width="210px";f.style.height="24px";var g=document.createElement("input");g.setAttribute("size","7");g.style.textAlign="right";f.appendChild(g);mxUtils.write(f," in x ");var x=document.createElement("input");x.setAttribute("size","7");x.style.textAlign="right";f.appendChild(x);mxUtils.write(f," in");P.style.display="none";f.style.display="none";for(var y={},u=PageSetupDialog.getFormats(),H=0;H<u.length;H++){var J=u[H];y[J.key]=J;var D=document.createElement("option");D.setAttribute("value", +J.key);mxUtils.write(D,J.title);K.appendChild(D)}var G=!1;C();b.appendChild(K);mxUtils.br(b);b.appendChild(P);b.appendChild(f);var W=k,T=function(Z,N){Z=y[K.value];null!=Z.format?(g.value=Z.format.width/100,x.value=Z.format.height/100,f.style.display="none",P.style.display=""):(P.style.display="none",f.style.display="");Z=parseFloat(g.value);if(isNaN(Z)||0>=Z)g.value=k.width/100;Z=parseFloat(x.value);if(isNaN(Z)||0>=Z)x.value=k.height/100;Z=new mxRectangle(0,0,Math.floor(100*parseFloat(g.value)), +Math.floor(100*parseFloat(x.value)));"custom"!=K.value&&F.checked&&(Z=new mxRectangle(0,0,Z.height,Z.width));N&&G||Z.width==W.width&&Z.height==W.height||(W=Z,null!=m&&m(W))};mxEvent.addListener(e,"click",function(Z){p.checked=!0;T(Z);mxEvent.consume(Z)});mxEvent.addListener(d,"click",function(Z){F.checked=!0;T(Z);mxEvent.consume(Z)});mxEvent.addListener(g,"blur",T);mxEvent.addListener(g,"click",T);mxEvent.addListener(x,"blur",T);mxEvent.addListener(x,"click",T);mxEvent.addListener(F,"change",T);mxEvent.addListener(p, +"change",T);mxEvent.addListener(K,"change",function(Z){G="custom"==K.value;T(Z,!0)});T();return{set:function(Z){k=Z;C(null,null,!0)},get:function(){return W},widthInput:g,heightInput:x}}; PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)", format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)}, {key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]}; -var FilenameDialog=function(b,e,k,m,C,p,E,K,Q,d,f,g,x){Q=null!=Q?Q:!0;var z=document.createElement("table"),u=document.createElement("tbody");z.style.position="absolute";z.style.top="30px";z.style.left="20px";var H=document.createElement("tr");var J=document.createElement("td");J.style.textOverflow="ellipsis";J.style.textAlign="right";J.style.maxWidth=(x?x+15:100)+"px";J.style.fontSize="10pt";J.style.width=(x?x:84)+"px";mxUtils.write(J,(C||mxResources.get("filename"))+":");H.appendChild(J);var D= -document.createElement("input");D.setAttribute("value",e||"");D.style.marginLeft="4px";D.style.width=null!=g?g+"px":"180px";var G=mxUtils.button(k,function(){if(null==p||p(D.value))Q&&b.hideDialog(),m(D.value)});G.className="geBtn gePrimaryBtn";this.init=function(){if(null!=C||null==E)if(D.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var V=z.parentNode;if(null!=V){var U=null;mxEvent.addListener(V,"dragleave", -function(Y){null!=U&&(U.style.backgroundColor="",U=null);Y.stopPropagation();Y.preventDefault()});mxEvent.addListener(V,"dragover",mxUtils.bind(this,function(Y){null==U&&(!mxClient.IS_IE||10<document.documentMode)&&(U=D,U.style.backgroundColor="#ebf2f9");Y.stopPropagation();Y.preventDefault()}));mxEvent.addListener(V,"drop",mxUtils.bind(this,function(Y){null!=U&&(U.style.backgroundColor="",U=null);0<=mxUtils.indexOf(Y.dataTransfer.types,"text/uri-list")&&(D.value=decodeURIComponent(Y.dataTransfer.getData("text/uri-list")), -G.click());Y.stopPropagation();Y.preventDefault()}))}}};J=document.createElement("td");J.style.whiteSpace="nowrap";J.appendChild(D);H.appendChild(J);if(null!=C||null==E)u.appendChild(H),null!=f&&(J.appendChild(FilenameDialog.createTypeHint(b,D,f)),null!=b.editor.diagramFileTypes&&(H=document.createElement("tr"),J=document.createElement("td"),J.style.textOverflow="ellipsis",J.style.textAlign="right",J.style.maxWidth="100px",J.style.fontSize="10pt",J.style.width="84px",mxUtils.write(J,mxResources.get("type")+ -":"),H.appendChild(J),J=document.createElement("td"),J.style.whiteSpace="nowrap",H.appendChild(J),e=FilenameDialog.createFileTypes(b,D,b.editor.diagramFileTypes),e.style.marginLeft="4px",e.style.width="198px",J.appendChild(e),D.style.width=null!=g?g-40+"px":"190px",H.appendChild(J),u.appendChild(H)));null!=E&&(H=document.createElement("tr"),J=document.createElement("td"),J.colSpan=2,J.appendChild(E),H.appendChild(J),u.appendChild(H));H=document.createElement("tr");J=document.createElement("td");J.colSpan= -2;J.style.paddingTop=null!=f?"12px":"20px";J.style.whiteSpace="nowrap";J.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});f.className="geBtn";b.editor.cancelFirst&&J.appendChild(f);null!=K&&(g=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(K)}),g.className="geBtn",J.appendChild(g));mxEvent.addListener(D,"keypress",function(V){13==V.keyCode&&G.click()});J.appendChild(G);b.editor.cancelFirst||J.appendChild(f); -H.appendChild(J);u.appendChild(H);z.appendChild(u);this.container=z};FilenameDialog.filenameHelpLink=null; +var FilenameDialog=function(b,e,k,m,C,p,F,K,P,d,f,g,x){P=null!=P?P:!0;var y=document.createElement("table"),u=document.createElement("tbody");y.style.position="absolute";y.style.top="30px";y.style.left="20px";var H=document.createElement("tr");var J=document.createElement("td");J.style.textOverflow="ellipsis";J.style.textAlign="right";J.style.maxWidth=(x?x+15:100)+"px";J.style.fontSize="10pt";J.style.width=(x?x:84)+"px";mxUtils.write(J,(C||mxResources.get("filename"))+":");H.appendChild(J);var D= +document.createElement("input");D.setAttribute("value",e||"");D.style.marginLeft="4px";D.style.width=null!=g?g+"px":"180px";var G=mxUtils.button(k,function(){if(null==p||p(D.value))P&&b.hideDialog(),m(D.value)});G.className="geBtn gePrimaryBtn";this.init=function(){if(null!=C||null==F)if(D.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var W=y.parentNode;if(null!=W){var T=null;mxEvent.addListener(W,"dragleave", +function(Z){null!=T&&(T.style.backgroundColor="",T=null);Z.stopPropagation();Z.preventDefault()});mxEvent.addListener(W,"dragover",mxUtils.bind(this,function(Z){null==T&&(!mxClient.IS_IE||10<document.documentMode)&&(T=D,T.style.backgroundColor="#ebf2f9");Z.stopPropagation();Z.preventDefault()}));mxEvent.addListener(W,"drop",mxUtils.bind(this,function(Z){null!=T&&(T.style.backgroundColor="",T=null);0<=mxUtils.indexOf(Z.dataTransfer.types,"text/uri-list")&&(D.value=decodeURIComponent(Z.dataTransfer.getData("text/uri-list")), +G.click());Z.stopPropagation();Z.preventDefault()}))}}};J=document.createElement("td");J.style.whiteSpace="nowrap";J.appendChild(D);H.appendChild(J);if(null!=C||null==F)u.appendChild(H),null!=f&&(J.appendChild(FilenameDialog.createTypeHint(b,D,f)),null!=b.editor.diagramFileTypes&&(H=document.createElement("tr"),J=document.createElement("td"),J.style.textOverflow="ellipsis",J.style.textAlign="right",J.style.maxWidth="100px",J.style.fontSize="10pt",J.style.width="84px",mxUtils.write(J,mxResources.get("type")+ +":"),H.appendChild(J),J=document.createElement("td"),J.style.whiteSpace="nowrap",H.appendChild(J),e=FilenameDialog.createFileTypes(b,D,b.editor.diagramFileTypes),e.style.marginLeft="4px",e.style.width="198px",J.appendChild(e),D.style.width=null!=g?g-40+"px":"190px",H.appendChild(J),u.appendChild(H)));null!=F&&(H=document.createElement("tr"),J=document.createElement("td"),J.colSpan=2,J.appendChild(F),H.appendChild(J),u.appendChild(H));H=document.createElement("tr");J=document.createElement("td");J.colSpan= +2;J.style.paddingTop=null!=f?"12px":"20px";J.style.whiteSpace="nowrap";J.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});f.className="geBtn";b.editor.cancelFirst&&J.appendChild(f);null!=K&&(g=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(K)}),g.className="geBtn",J.appendChild(g));mxEvent.addListener(D,"keypress",function(W){13==W.keyCode&&G.click()});J.appendChild(G);b.editor.cancelFirst||J.appendChild(f); +H.appendChild(J);u.appendChild(H);y.appendChild(u);this.container=y};FilenameDialog.filenameHelpLink=null; FilenameDialog.createTypeHint=function(b,e,k){var m=document.createElement("img");m.style.backgroundPosition="center bottom";m.style.backgroundRepeat="no-repeat";m.style.margin="2px 0 0 4px";m.style.verticalAlign="top";m.style.cursor="pointer";m.style.height="16px";m.style.width="16px";mxUtils.setOpacity(m,70);var C=function(){m.setAttribute("src",Editor.helpImage);m.setAttribute("title",mxResources.get("help"));for(var p=0;p<k.length;p++)if(0<k[p].ext.length&&e.value.toLowerCase().substring(e.value.length- -k[p].ext.length-1)=="."+k[p].ext){m.setAttribute("title",mxResources.get(k[p].title));break}};mxEvent.addListener(e,"keyup",C);mxEvent.addListener(e,"change",C);mxEvent.addListener(m,"click",function(p){var E=m.getAttribute("title");m.getAttribute("src")==Editor.helpImage?b.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=E&&b.showError(null,E,mxResources.get("help"),function(){b.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(p)}); +k[p].ext.length-1)=="."+k[p].ext){m.setAttribute("title",mxResources.get(k[p].title));break}};mxEvent.addListener(e,"keyup",C);mxEvent.addListener(e,"change",C);mxEvent.addListener(m,"click",function(p){var F=m.getAttribute("title");m.getAttribute("src")==Editor.helpImage?b.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=F&&b.showError(null,F,mxResources.get("help"),function(){b.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(p)}); C();return m}; -FilenameDialog.createFileTypes=function(b,e,k){var m=document.createElement("select");for(b=0;b<k.length;b++){var C=document.createElement("option");C.setAttribute("value",b);mxUtils.write(C,mxResources.get(k[b].description)+" (."+k[b].extension+")");m.appendChild(C)}mxEvent.addListener(m,"change",function(p){p=k[m.value].extension;var E=e.value.lastIndexOf(".drawio.");E=0<E?E:e.value.lastIndexOf(".");"drawio"!=p&&(p="drawio."+p);e.value=0<E?e.value.substring(0,E+1)+p:e.value+"."+p;"createEvent"in -document?(p=document.createEvent("HTMLEvents"),p.initEvent("change",!1,!0),e.dispatchEvent(p)):e.fireEvent("onchange")});b=function(p){p=e.value.toLowerCase();for(var E=0,K=0;K<k.length;K++){var Q=k[K].extension,d=null;"drawio"!=Q&&(d=Q,Q=".drawio."+Q);if(p.substring(p.length-Q.length-1)=="."+Q||null!=d&&p.substring(p.length-d.length-1)=="."+d){E=K;break}}m.value=E};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return m}; -var WrapperWindow=function(b,e,k,m,C,p,E){var K=b.createSidebarContainer();E(K);this.window=new mxWindow(e,K,k,m,C,p,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);b.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(Q){null==Q&&(Q=window.event);return null!=Q&&b.isSelectionAllowed(Q)}))}; -(function(){mxGraphView.prototype.validateBackgroundPage=function(){var E=this.graph;if(null!=E.container&&!E.transparentBackground){if(E.pageVisible){var K=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var Q=E.container.firstChild;null!=Q&&Q.nodeType!=mxConstants.NODETYPE_ELEMENT;)Q=Q.nextSibling;null!=Q&&(this.backgroundPageShape=this.createBackgroundPageShape(K),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML, -this.backgroundPageShape.init(E.container),Q.style.position="absolute",E.container.insertBefore(this.backgroundPageShape.node,Q),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(d){E.dblClick(d)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(d){E.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){null!= -E.tooltipHandler&&E.tooltipHandler.isHideOnHover()&&E.tooltipHandler.hide();E.isMouseDown&&!mxEvent.isConsumed(d)&&E.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){E.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(d))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=K,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}}; -mxGraphView.prototype.validateBackgroundStyles=function(){var E=this.graph,K=null==E.background||E.background==mxConstants.NONE?E.defaultPageBackgroundColor:E.background,Q=null!=K&&this.gridColor!=K.toLowerCase()?this.gridColor:"#ffffff",d="none",f="";if(E.isGridEnabled()||E.gridVisible){f=10;mxClient.IS_SVG?(d=unescape(encodeURIComponent(this.createSvgGrid(Q))),d=window.btoa?btoa(d):Base64.encode(d,!0),d="url(data:image/svg+xml;base64,"+d+")",f=E.gridSize*this.scale*this.gridSteps):d="url("+this.gridImage+ -")";var g=Q=0;null!=E.view.backgroundPageShape&&(g=this.getBackgroundPageBounds(),Q=1+g.x,g=1+g.y);f=-Math.round(f-mxUtils.mod(this.translate.x*this.scale-Q,f))+"px "+-Math.round(f-mxUtils.mod(this.translate.y*this.scale-g,f))+"px"}Q=E.view.canvas;null!=Q.ownerSVGElement&&(Q=Q.ownerSVGElement);null!=E.view.backgroundPageShape?(E.view.backgroundPageShape.node.style.backgroundPosition=f,E.view.backgroundPageShape.node.style.backgroundImage=d,E.view.backgroundPageShape.node.style.backgroundColor=K,E.view.backgroundPageShape.node.style.borderColor= -E.defaultPageBorderColor,E.container.className="geDiagramContainer geDiagramBackdrop",Q.style.backgroundImage="none",Q.style.backgroundColor=""):(E.container.className="geDiagramContainer",Q.style.backgroundPosition=f,Q.style.backgroundColor=K,Q.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(E){for(var K=this.graph.gridSize*this.scale;K<this.minGridSize;)K*=2;for(var Q=this.gridSteps*K,d=[],f=1;f<this.gridSteps;f++){var g=f*K;d.push("M 0 "+g+" L "+Q+" "+g+" M "+g+" 0 L "+g+ -" "+Q)}return'<svg width="'+Q+'" height="'+Q+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+Q+'" height="'+Q+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+E+'" opacity="0.2" stroke-width="1"/><path d="M '+Q+" 0 L 0 0 0 "+Q+'" fill="none" stroke="'+E+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,K){b.apply(this,arguments); -if(null!=this.shiftPreview1){var Q=this.view.canvas;null!=Q.ownerSVGElement&&(Q=Q.ownerSVGElement);var d=this.gridSize*this.view.scale*this.view.gridSteps;d=-Math.round(d-mxUtils.mod(this.view.translate.x*this.view.scale+E,d))+"px "+-Math.round(d-mxUtils.mod(this.view.translate.y*this.view.scale+K,d))+"px";Q.style.backgroundPosition=d}};mxGraph.prototype.updatePageBreaks=function(E,K,Q){var d=this.view.scale,f=this.view.translate,g=this.pageFormat,x=d*this.pageScale,z=this.view.getBackgroundPageBounds(); -K=z.width;Q=z.height;var u=new mxRectangle(d*f.x,d*f.y,g.width*x,g.height*x),H=(E=E&&Math.min(u.width,u.height)>this.minPageBreakDist)?Math.ceil(Q/u.height)-1:0,J=E?Math.ceil(K/u.width)-1:0,D=z.x+K,G=z.y+Q;null==this.horizontalPageBreaks&&0<H&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<J&&(this.verticalPageBreaks=[]);E=mxUtils.bind(this,function(V){if(null!=V){for(var U=V==this.horizontalPageBreaks?H:J,Y=0;Y<=U;Y++){var O=V==this.horizontalPageBreaks?[new mxPoint(Math.round(z.x), -Math.round(z.y+(Y+1)*u.height)),new mxPoint(Math.round(D),Math.round(z.y+(Y+1)*u.height))]:[new mxPoint(Math.round(z.x+(Y+1)*u.width),Math.round(z.y)),new mxPoint(Math.round(z.x+(Y+1)*u.width),Math.round(G))];null!=V[Y]?(V[Y].points=O,V[Y].redraw()):(O=new mxPolyline(O,this.pageBreakColor),O.dialect=this.dialect,O.isDashed=this.pageBreakDashed,O.pointerEvents=!1,O.init(this.view.backgroundPane),O.redraw(),V[Y]=O)}for(Y=U;Y<V.length;Y++)V[Y].destroy();V.splice(U,V.length-U)}});E(this.horizontalPageBreaks); -E(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(E,K,Q){for(var d=0;d<K.length;d++){if(this.graph.isTableCell(K[d])||this.graph.isTableRow(K[d]))return!1;if(this.graph.getModel().isVertex(K[d])){var f=this.graph.getCellGeometry(K[d]);if(null!=f&&f.relative)return!1}}return e.apply(this,arguments)};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var E= -k.apply(this,arguments);E.intersects=mxUtils.bind(this,function(K,Q){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(E,arguments)});return E};mxGraphView.prototype.createBackgroundPageShape=function(E){return new mxRectangleShape(E,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var E=this.getGraphBounds(),K=0<E.width?E.x/this.scale-this.translate.x:0,Q=0<E.height?E.y/this.scale-this.translate.y:0,d=this.graph.pageFormat, -f=this.graph.pageScale,g=d.width*f;d=d.height*f;f=Math.floor(Math.min(0,K)/g);var x=Math.floor(Math.min(0,Q)/d);return new mxRectangle(this.scale*(this.translate.x+f*g),this.scale*(this.translate.y+x*d),this.scale*(Math.ceil(Math.max(1,K+E.width/this.scale)/g)-f)*g,this.scale*(Math.ceil(Math.max(1,Q+E.height/this.scale)/d)-x)*d)};var m=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,K){m.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape|| -this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=E+"px",this.view.backgroundPageShape.node.style.marginTop=K+"px")};var C=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(E,K,Q,d,f,g){var x=C.apply(this,arguments);null==g||g||mxEvent.addListener(x,"mousedown",function(z){mxEvent.consume(z)});return x};var p=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell= -function(E,K,Q){var d=this.graph.model.getParent(E);if(K){var f=this.graph.model.isEdge(E)?null:this.graph.getCellGeometry(E);f=!this.graph.model.isEdge(d)&&!this.graph.isSiblingSelected(E)&&(null!=f&&f.relative||!this.graph.isContainer(d)||this.graph.isPart(E))}else if(f=p.apply(this,arguments),this.graph.isTableCell(E)||this.graph.isTableRow(E))f=d,this.graph.isTable(f)||(f=this.graph.model.getParent(f)),f=!this.graph.selectionCellsHandler.isHandled(f)||this.graph.isCellSelected(f)&&this.graph.isToggleEvent(Q.getEvent())|| -this.graph.isCellSelected(E)&&!this.graph.isToggleEvent(Q.getEvent())||this.graph.isTableCell(E)&&this.graph.isCellSelected(d);return f};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(E){E=E.getCell();for(var K=this.graph.getModel(),Q=K.getParent(E),d=this.graph.view.getState(Q),f=this.graph.isCellSelected(E);null!=d&&(K.isVertex(Q)||K.isEdge(Q));){var g=this.graph.isCellSelected(Q);f=f||g;if(g||!f&&(this.graph.isTableCell(E)||this.graph.isTableRow(E)))E=Q;Q=K.getParent(Q)}return E}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var m=this.editor.graph;m.lightbox=k;var C=m.getGraphBounds;m.getGraphBounds=function(){var P=C.apply(this,arguments),ca=this.backgroundImage;if(null!=ca&&null!=ca.width&&null!=ca.height){var ja=this.view.translate,ka=this.view.scale;P=mxRectangle.fromRectangle(P);P.add(new mxRectangle((ja.x+ca.x)*ka,(ja.y+ca.y)*ka,ca.width*ka,ca.height*ka))}return P};m.useCssTransforms&& -(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(P,ca){this.clearSelectionState()});m.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener); -m.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);m.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);m.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);m.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,m.isEnabled=function(){return!1},m.panningHandler.isForcePanningEvent=function(P){return!mxEvent.isPopupTrigger(P.getEvent())});this.actions=new Actions(this);this.menus= -this.createMenus();if(!m.standalone){var p="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents strokeColor strokeWidth".split(" "),E="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "), -K="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),Q=!1,d=!1;this.setDefaultStyle=function(P){try{m.getModel().isEdge(P)?d=!1:Q=!1;var ca=m.getCellStyle(P,!1),ja=[],ka=[],q;for(q in ca)ja.push(ca[q]),ka.push(q);m.getModel().isEdge(P)?m.currentEdgeStyle={}:m.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ka,"values",ja,"cells",[P]));m.getModel().isEdge(P)?d=!0:Q=!0}catch(F){this.handleError(F)}}; -this.clearDefaultStyle=function(){m.currentEdgeStyle=mxUtils.clone(m.defaultEdgeStyle);m.currentVertexStyle=mxUtils.clone(m.defaultVertexStyle);Q=d=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var f=["fontFamily","fontSource","fontSize","fontColor"];for(e=0;e<f.length;e++)0>mxUtils.indexOf(p,f[e])&&p.push(f[e]);var g="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),x=[["startArrow","startFill","endArrow","endFill"],["startSize", -"endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(e=0;e<x.length;e++)for(k=0;k<x[e].length;k++)p.push(x[e][k]);for(e=0;e<E.length;e++)0>mxUtils.indexOf(p,E[e])&&p.push(E[e]);var z=function(P,ca,ja,ka,q,F,R){ka=null!=ka?ka:m.currentVertexStyle;q=null!=q?q:m.currentEdgeStyle;F=null!=F?F:!0;ja=null!=ja?ja:m.getModel();if(R){R=[];for(var W=0;W<P.length;W++)R=R.concat(ja.getDescendants(P[W]));P=R}ja.beginUpdate(); -try{for(W=0;W<P.length;W++){var T=P[W];if(ca)var ba=["fontSize","fontFamily","fontColor"];else{var ha=ja.getStyle(T),ra=null!=ha?ha.split(";"):[];ba=p.slice();for(var ta=0;ta<ra.length;ta++){var ma=ra[ta],pa=ma.indexOf("=");if(0<=pa){var za=ma.substring(0,pa),Ba=mxUtils.indexOf(ba,za);0<=Ba&&ba.splice(Ba,1);for(R=0;R<x.length;R++){var Ia=x[R];if(0<=mxUtils.indexOf(Ia,za))for(var Aa=0;Aa<Ia.length;Aa++){var Ka=mxUtils.indexOf(ba,Ia[Aa]);0<=Ka&&ba.splice(Ka,1)}}}}}var Da=ja.isEdge(T);R=Da?q:ka;var Ra= -ja.getStyle(T);for(ta=0;ta<ba.length;ta++){za=ba[ta];var Qa=R[za];null!=Qa&&"edgeStyle"!=za&&("shape"!=za||Da)&&(!Da||F||0>mxUtils.indexOf(K,za))&&(Ra=mxUtils.setStyle(Ra,za,Qa))}Editor.simpleLabels&&(Ra=mxUtils.setStyle(mxUtils.setStyle(Ra,"html",null),"whiteSpace",null));ja.setStyle(T,Ra)}}finally{ja.endUpdate()}return P};m.addListener("cellsInserted",function(P,ca){z(ca.getProperty("cells"),null,null,null,null,!0,!0)});m.addListener("textInserted",function(P,ca){z(ca.getProperty("cells"),!0)}); -this.insertHandler=z;this.createDivs();this.createUi();this.refresh();var u=mxUtils.bind(this,function(P){null==P&&(P=window.event);return m.isEditing()||null!=P&&this.isSelectionAllowed(P)});this.container==document.body&&(this.menubarContainer.onselectstart=u,this.menubarContainer.onmousedown=u,this.toolbarContainer.onselectstart=u,this.toolbarContainer.onmousedown=u,this.diagramContainer.onselectstart=u,this.diagramContainer.onmousedown=u,this.sidebarContainer.onselectstart=u,this.sidebarContainer.onmousedown= -u,this.formatContainer.onselectstart=u,this.formatContainer.onmousedown=u,this.footerContainer.onselectstart=u,this.footerContainer.onmousedown=u,null!=this.tabContainer&&(this.tabContainer.onselectstart=u));!this.editor.chromeless||this.editor.editable?(e=function(P){if(null!=P){var ca=mxEvent.getSource(P);if("A"==ca.nodeName)for(;null!=ca;){if("geHint"==ca.className)return!0;ca=ca.parentNode}}return u(P)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer, -"contextmenu",e):this.diagramContainer.oncontextmenu=e):m.panningHandler.usePopupTrigger=!1;m.init(this.diagramContainer);mxClient.IS_SVG&&null!=m.view.getDrawPane()&&(e=m.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=m.graphHandler){var H=m.graphHandler.start;m.graphHandler.start=function(){null!=da.hoverIcons&&da.hoverIcons.reset();H.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this, -function(P){var ca=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(P)-ca.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(P)-ca.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var J=!1,D=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(P,ca){return J||D.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(P){32!=P.which||m.isEditing()? -mxEvent.isConsumed(P)||27!=P.keyCode||this.hideDialog(null,!0):(J=!0,this.hoverIcons.reset(),m.container.style.cursor="move",m.isEditing()||mxEvent.getSource(P)!=m.container||mxEvent.consume(P))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(P){m.container.style.cursor="";J=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var G=m.panningHandler.isForcePanningEvent;m.panningHandler.isForcePanningEvent=function(P){return G.apply(this, -arguments)||J||mxEvent.isMouseEvent(P.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(P.getEvent()))&&(!mxEvent.isControlDown(P.getEvent())&&mxEvent.isRightMouseButton(P.getEvent())||mxEvent.isMiddleMouseButton(P.getEvent()))};var V=m.cellEditor.isStopEditingEvent;m.cellEditor.isStopEditingEvent=function(P){return V.apply(this,arguments)||13==P.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(P)||mxClient.IS_MAC&&mxEvent.isMetaDown(P)||mxClient.IS_SF&&mxEvent.isShiftDown(P))};var U=m.isZoomWheelEvent; -m.isZoomWheelEvent=function(){return J||U.apply(this,arguments)};var Y=!1,O=null,qa=null,oa=null,aa=mxUtils.bind(this,function(){if(null!=this.toolbar&&Y!=m.cellEditor.isContentEditing()){for(var P=this.toolbar.container.firstChild,ca=[];null!=P;){var ja=P.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,P)&&(P.parentNode.removeChild(P),ca.push(P));P=ja}P=this.toolbar.fontMenu;ja=this.toolbar.sizeMenu;if(null==oa)this.toolbar.createTextToolbar();else{for(var ka=0;ka<oa.length;ka++)this.toolbar.container.appendChild(oa[ka]); -this.toolbar.fontMenu=O;this.toolbar.sizeMenu=qa}Y=m.cellEditor.isContentEditing();O=P;qa=ja;oa=ca}}),da=this,ia=m.cellEditor.startEditing;m.cellEditor.startEditing=function(){ia.apply(this,arguments);aa();if(m.cellEditor.isContentEditing()){var P=!1,ca=function(){P||(P=!0,window.setTimeout(function(){var ja=m.getSelectedEditingElement();null!=ja&&(ja=mxUtils.getCurrentStyle(ja),null!=ja&&null!=da.toolbar&&(da.toolbar.setFontName(Graph.stripQuotes(ja.fontFamily)),da.toolbar.setFontSize(parseInt(ja.fontSize)))); -P=!1},0))};mxEvent.addListener(m.cellEditor.textarea,"input",ca);mxEvent.addListener(m.cellEditor.textarea,"touchend",ca);mxEvent.addListener(m.cellEditor.textarea,"mouseup",ca);mxEvent.addListener(m.cellEditor.textarea,"keyup",ca);ca()}};var L=m.cellEditor.stopEditing;m.cellEditor.stopEditing=function(P,ca){try{L.apply(this,arguments),aa()}catch(ja){da.handleError(ja)}};m.container.setAttribute("tabindex","0");m.container.style.cursor="default";if(window.self===window.top&&null!=m.container.parentNode)try{m.container.focus()}catch(P){}var Z= -m.fireMouseEvent;m.fireMouseEvent=function(P,ca,ja){P==mxEvent.MOUSE_DOWN&&this.container.focus();Z.apply(this,arguments)};m.popupMenuHandler.autoExpand=!0;null!=this.menus&&(m.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(P,ca,ja){this.menus.createPopupMenu(P,ca,ja)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(P){m.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};m.connectionHandler.addListener(mxEvent.CONNECT, -function(P,ca){var ja=[ca.getProperty("cell")];ca.getProperty("terminalInserted")&&(ja.push(ca.getProperty("terminal")),window.setTimeout(function(){null!=da.hoverIcons&&da.hoverIcons.update(m.view.getState(ja[ja.length-1]))},0));z(ja)});this.addListener("styleChanged",mxUtils.bind(this,function(P,ca){var ja=ca.getProperty("cells"),ka=P=!1;if(0<ja.length)for(var q=0;q<ja.length&&(P=m.getModel().isVertex(ja[q])||P,!(ka=m.getModel().isEdge(ja[q])||ka)||!P);q++);else ka=P=!0;P=P&&!Q;ka=ka&&!d;ja=ca.getProperty("keys"); -ca=ca.getProperty("values");for(q=0;q<ja.length;q++){var F=0<=mxUtils.indexOf(f,ja[q]);if("strokeColor"!=ja[q]||null!=ca[q]&&"none"!=ca[q])if(0<=mxUtils.indexOf(E,ja[q]))ka||0<=mxUtils.indexOf(g,ja[q])?null==ca[q]?delete m.currentEdgeStyle[ja[q]]:m.currentEdgeStyle[ja[q]]=ca[q]:P&&0<=mxUtils.indexOf(p,ja[q])&&(null==ca[q]?delete m.currentVertexStyle[ja[q]]:m.currentVertexStyle[ja[q]]=ca[q]);else if(0<=mxUtils.indexOf(p,ja[q])){if(P||F)null==ca[q]?delete m.currentVertexStyle[ja[q]]:m.currentVertexStyle[ja[q]]= -ca[q];if(ka||F||0<=mxUtils.indexOf(g,ja[q]))null==ca[q]?delete m.currentEdgeStyle[ja[q]]:m.currentEdgeStyle[ja[q]]=ca[q]}}null!=this.toolbar&&(this.toolbar.setFontName(m.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(m.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==m.currentEdgeStyle.edgeStyle&&"1"==m.currentEdgeStyle.curved? +FilenameDialog.createFileTypes=function(b,e,k){var m=document.createElement("select");for(b=0;b<k.length;b++){var C=document.createElement("option");C.setAttribute("value",b);mxUtils.write(C,mxResources.get(k[b].description)+" (."+k[b].extension+")");m.appendChild(C)}mxEvent.addListener(m,"change",function(p){p=k[m.value].extension;var F=e.value.lastIndexOf(".drawio.");F=0<F?F:e.value.lastIndexOf(".");"drawio"!=p&&(p="drawio."+p);e.value=0<F?e.value.substring(0,F+1)+p:e.value+"."+p;"createEvent"in +document?(p=document.createEvent("HTMLEvents"),p.initEvent("change",!1,!0),e.dispatchEvent(p)):e.fireEvent("onchange")});b=function(p){p=e.value.toLowerCase();for(var F=0,K=0;K<k.length;K++){var P=k[K].extension,d=null;"drawio"!=P&&(d=P,P=".drawio."+P);if(p.substring(p.length-P.length-1)=="."+P||null!=d&&p.substring(p.length-d.length-1)=="."+d){F=K;break}}m.value=F};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return m}; +var WrapperWindow=function(b,e,k,m,C,p,F){var K=b.createSidebarContainer();F(K);this.window=new mxWindow(e,K,k,m,C,p,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);b.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(P){null==P&&(P=window.event);return null!=P&&b.isSelectionAllowed(P)}))}; +(function(){mxGraphView.prototype.validateBackgroundPage=function(){var F=this.graph;if(null!=F.container&&!F.transparentBackground){if(F.pageVisible){var K=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var P=F.container.firstChild;null!=P&&P.nodeType!=mxConstants.NODETYPE_ELEMENT;)P=P.nextSibling;null!=P&&(this.backgroundPageShape=this.createBackgroundPageShape(K),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML, +this.backgroundPageShape.init(F.container),P.style.position="absolute",F.container.insertBefore(this.backgroundPageShape.node,P),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(d){F.dblClick(d)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(d){F.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){null!= +F.tooltipHandler&&F.tooltipHandler.isHideOnHover()&&F.tooltipHandler.hide();F.isMouseDown&&!mxEvent.isConsumed(d)&&F.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){F.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(d))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=K,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}}; +mxGraphView.prototype.validateBackgroundStyles=function(){var F=this.graph,K=null==F.background||F.background==mxConstants.NONE?F.defaultPageBackgroundColor:F.background,P=null!=K&&this.gridColor!=K.toLowerCase()?this.gridColor:"#ffffff",d="none",f="";if(F.isGridEnabled()||F.gridVisible){f=10;mxClient.IS_SVG?(d=unescape(encodeURIComponent(this.createSvgGrid(P))),d=window.btoa?btoa(d):Base64.encode(d,!0),d="url(data:image/svg+xml;base64,"+d+")",f=F.gridSize*this.scale*this.gridSteps):d="url("+this.gridImage+ +")";var g=P=0;null!=F.view.backgroundPageShape&&(g=this.getBackgroundPageBounds(),P=1+g.x,g=1+g.y);f=-Math.round(f-mxUtils.mod(this.translate.x*this.scale-P,f))+"px "+-Math.round(f-mxUtils.mod(this.translate.y*this.scale-g,f))+"px"}P=F.view.canvas;null!=P.ownerSVGElement&&(P=P.ownerSVGElement);null!=F.view.backgroundPageShape?(F.view.backgroundPageShape.node.style.backgroundPosition=f,F.view.backgroundPageShape.node.style.backgroundImage=d,F.view.backgroundPageShape.node.style.backgroundColor=K,F.view.backgroundPageShape.node.style.borderColor= +F.defaultPageBorderColor,F.container.className="geDiagramContainer geDiagramBackdrop",P.style.backgroundImage="none",P.style.backgroundColor=""):(F.container.className="geDiagramContainer",P.style.backgroundPosition=f,P.style.backgroundColor=K,P.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(F){for(var K=this.graph.gridSize*this.scale;K<this.minGridSize;)K*=2;for(var P=this.gridSteps*K,d=[],f=1;f<this.gridSteps;f++){var g=f*K;d.push("M 0 "+g+" L "+P+" "+g+" M "+g+" 0 L "+g+ +" "+P)}return'<svg width="'+P+'" height="'+P+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+P+'" height="'+P+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+F+'" opacity="0.2" stroke-width="1"/><path d="M '+P+" 0 L 0 0 0 "+P+'" fill="none" stroke="'+F+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(F,K){b.apply(this,arguments); +if(null!=this.shiftPreview1){var P=this.view.canvas;null!=P.ownerSVGElement&&(P=P.ownerSVGElement);var d=this.gridSize*this.view.scale*this.view.gridSteps;d=-Math.round(d-mxUtils.mod(this.view.translate.x*this.view.scale+F,d))+"px "+-Math.round(d-mxUtils.mod(this.view.translate.y*this.view.scale+K,d))+"px";P.style.backgroundPosition=d}};mxGraph.prototype.updatePageBreaks=function(F,K,P){var d=this.view.scale,f=this.view.translate,g=this.pageFormat,x=d*this.pageScale,y=this.view.getBackgroundPageBounds(); +K=y.width;P=y.height;var u=new mxRectangle(d*f.x,d*f.y,g.width*x,g.height*x),H=(F=F&&Math.min(u.width,u.height)>this.minPageBreakDist)?Math.ceil(P/u.height)-1:0,J=F?Math.ceil(K/u.width)-1:0,D=y.x+K,G=y.y+P;null==this.horizontalPageBreaks&&0<H&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<J&&(this.verticalPageBreaks=[]);F=mxUtils.bind(this,function(W){if(null!=W){for(var T=W==this.horizontalPageBreaks?H:J,Z=0;Z<=T;Z++){var N=W==this.horizontalPageBreaks?[new mxPoint(Math.round(y.x), +Math.round(y.y+(Z+1)*u.height)),new mxPoint(Math.round(D),Math.round(y.y+(Z+1)*u.height))]:[new mxPoint(Math.round(y.x+(Z+1)*u.width),Math.round(y.y)),new mxPoint(Math.round(y.x+(Z+1)*u.width),Math.round(G))];null!=W[Z]?(W[Z].points=N,W[Z].redraw()):(N=new mxPolyline(N,this.pageBreakColor),N.dialect=this.dialect,N.isDashed=this.pageBreakDashed,N.pointerEvents=!1,N.init(this.view.backgroundPane),N.redraw(),W[Z]=N)}for(Z=T;Z<W.length;Z++)W[Z].destroy();W.splice(T,W.length-T)}});F(this.horizontalPageBreaks); +F(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(F,K,P){for(var d=0;d<K.length;d++){if(this.graph.isTableCell(K[d])||this.graph.isTableRow(K[d]))return!1;if(this.graph.getModel().isVertex(K[d])){var f=this.graph.getCellGeometry(K[d]);if(null!=f&&f.relative)return!1}}return e.apply(this,arguments)};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var F= +k.apply(this,arguments);F.intersects=mxUtils.bind(this,function(K,P){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(F,arguments)});return F};mxGraphView.prototype.createBackgroundPageShape=function(F){return new mxRectangleShape(F,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var F=this.getGraphBounds(),K=0<F.width?F.x/this.scale-this.translate.x:0,P=0<F.height?F.y/this.scale-this.translate.y:0,d=this.graph.pageFormat, +f=this.graph.pageScale,g=d.width*f;d=d.height*f;f=Math.floor(Math.min(0,K)/g);var x=Math.floor(Math.min(0,P)/d);return new mxRectangle(this.scale*(this.translate.x+f*g),this.scale*(this.translate.y+x*d),this.scale*(Math.ceil(Math.max(1,K+F.width/this.scale)/g)-f)*g,this.scale*(Math.ceil(Math.max(1,P+F.height/this.scale)/d)-x)*d)};var m=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(F,K){m.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape|| +this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=F+"px",this.view.backgroundPageShape.node.style.marginTop=K+"px")};var C=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(F,K,P,d,f,g){var x=C.apply(this,arguments);null==g||g||mxEvent.addListener(x,"mousedown",function(y){mxEvent.consume(y)});return x};var p=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell= +function(F,K,P){var d=this.graph.model.getParent(F);if(K){var f=this.graph.model.isEdge(F)?null:this.graph.getCellGeometry(F);f=!this.graph.model.isEdge(d)&&!this.graph.isSiblingSelected(F)&&(null!=f&&f.relative||!this.graph.isContainer(d)||this.graph.isPart(F))}else if(f=p.apply(this,arguments),this.graph.isTableCell(F)||this.graph.isTableRow(F))f=d,this.graph.isTable(f)||(f=this.graph.model.getParent(f)),f=!this.graph.selectionCellsHandler.isHandled(f)||this.graph.isCellSelected(f)&&this.graph.isToggleEvent(P.getEvent())|| +this.graph.isCellSelected(F)&&!this.graph.isToggleEvent(P.getEvent())||this.graph.isTableCell(F)&&this.graph.isCellSelected(d);return f};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(F){F=F.getCell();for(var K=this.graph.getModel(),P=K.getParent(F),d=this.graph.view.getState(P),f=this.graph.isCellSelected(F);null!=d&&(K.isVertex(P)||K.isEdge(P));){var g=this.graph.isCellSelected(P);f=f||g;if(g||!f&&(this.graph.isTableCell(F)||this.graph.isTableRow(F)))F=P;P=K.getParent(P)}return F}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var m=this.editor.graph;m.lightbox=k;var C=m.getGraphBounds;m.getGraphBounds=function(){var X=C.apply(this,arguments),ja=this.backgroundImage;if(null!=ja&&null!=ja.width&&null!=ja.height){var ca=this.view.translate,ka=this.view.scale;X=mxRectangle.fromRectangle(X);X.add(new mxRectangle((ca.x+ja.x)*ka,(ca.y+ja.y)*ka,ja.width*ka,ja.height*ka))}return X};m.useCssTransforms&& +(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(X,ja){this.clearSelectionState()});m.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener); +m.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);m.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);m.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);m.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,m.isEnabled=function(){return!1},m.panningHandler.isForcePanningEvent=function(X){return!mxEvent.isPopupTrigger(X.getEvent())});this.actions=new Actions(this);this.menus= +this.createMenus();if(!m.standalone){var p="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents strokeColor strokeWidth".split(" "),F="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "), +K="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),P=!1,d=!1;this.setDefaultStyle=function(X){try{m.getModel().isEdge(X)?d=!1:P=!1;var ja=m.getCellStyle(X,!1),ca=[],ka=[],q;for(q in ja)ca.push(ja[q]),ka.push(q);m.getModel().isEdge(X)?m.currentEdgeStyle={}:m.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ka,"values",ca,"cells",[X]));m.getModel().isEdge(X)?d=!0:P=!0}catch(E){this.handleError(E)}}; +this.clearDefaultStyle=function(){m.currentEdgeStyle=mxUtils.clone(m.defaultEdgeStyle);m.currentVertexStyle=mxUtils.clone(m.defaultVertexStyle);P=d=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var f=["fontFamily","fontSource","fontSize","fontColor"];for(e=0;e<f.length;e++)0>mxUtils.indexOf(p,f[e])&&p.push(f[e]);var g="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),x=[["startArrow","startFill","endArrow","endFill"],["startSize", +"endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(e=0;e<x.length;e++)for(k=0;k<x[e].length;k++)p.push(x[e][k]);for(e=0;e<F.length;e++)0>mxUtils.indexOf(p,F[e])&&p.push(F[e]);var y=function(X,ja,ca,ka,q,E,Q){ka=null!=ka?ka:m.currentVertexStyle;q=null!=q?q:m.currentEdgeStyle;E=null!=E?E:!0;ca=null!=ca?ca:m.getModel();if(Q){Q=[];for(var Y=0;Y<X.length;Y++)Q=Q.concat(ca.getDescendants(X[Y]));X=Q}ca.beginUpdate(); +try{for(Y=0;Y<X.length;Y++){var R=X[Y];if(ja)var ba=["fontSize","fontFamily","fontColor"];else{var ea=ca.getStyle(R),ra=null!=ea?ea.split(";"):[];ba=p.slice();for(var ta=0;ta<ra.length;ta++){var la=ra[ta],pa=la.indexOf("=");if(0<=pa){var xa=la.substring(0,pa),Ca=mxUtils.indexOf(ba,xa);0<=Ca&&ba.splice(Ca,1);for(Q=0;Q<x.length;Q++){var Ia=x[Q];if(0<=mxUtils.indexOf(Ia,xa))for(var Aa=0;Aa<Ia.length;Aa++){var La=mxUtils.indexOf(ba,Ia[Aa]);0<=La&&ba.splice(La,1)}}}}}var Da=ca.isEdge(R);Q=Da?q:ka;var Sa= +ca.getStyle(R);for(ta=0;ta<ba.length;ta++){xa=ba[ta];var Ra=Q[xa];null!=Ra&&"edgeStyle"!=xa&&("shape"!=xa||Da)&&(!Da||E||0>mxUtils.indexOf(K,xa))&&(Sa=mxUtils.setStyle(Sa,xa,Ra))}Editor.simpleLabels&&(Sa=mxUtils.setStyle(mxUtils.setStyle(Sa,"html",null),"whiteSpace",null));ca.setStyle(R,Sa)}}finally{ca.endUpdate()}return X};m.addListener("cellsInserted",function(X,ja){y(ja.getProperty("cells"),null,null,null,null,!0,!0)});m.addListener("textInserted",function(X,ja){y(ja.getProperty("cells"),!0)}); +this.insertHandler=y;this.createDivs();this.createUi();this.refresh();var u=mxUtils.bind(this,function(X){null==X&&(X=window.event);return m.isEditing()||null!=X&&this.isSelectionAllowed(X)});this.container==document.body&&(this.menubarContainer.onselectstart=u,this.menubarContainer.onmousedown=u,this.toolbarContainer.onselectstart=u,this.toolbarContainer.onmousedown=u,this.diagramContainer.onselectstart=u,this.diagramContainer.onmousedown=u,this.sidebarContainer.onselectstart=u,this.sidebarContainer.onmousedown= +u,this.formatContainer.onselectstart=u,this.formatContainer.onmousedown=u,this.footerContainer.onselectstart=u,this.footerContainer.onmousedown=u,null!=this.tabContainer&&(this.tabContainer.onselectstart=u));!this.editor.chromeless||this.editor.editable?(e=function(X){if(null!=X){var ja=mxEvent.getSource(X);if("A"==ja.nodeName)for(;null!=ja;){if("geHint"==ja.className)return!0;ja=ja.parentNode}}return u(X)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer, +"contextmenu",e):this.diagramContainer.oncontextmenu=e):m.panningHandler.usePopupTrigger=!1;m.init(this.diagramContainer);mxClient.IS_SVG&&null!=m.view.getDrawPane()&&(e=m.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=m.graphHandler){var H=m.graphHandler.start;m.graphHandler.start=function(){null!=fa.hoverIcons&&fa.hoverIcons.reset();H.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this, +function(X){var ja=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(X)-ja.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(X)-ja.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var J=!1,D=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(X,ja){return J||D.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(X){32!=X.which||m.isEditing()? +mxEvent.isConsumed(X)||27!=X.keyCode||this.hideDialog(null,!0):(J=!0,this.hoverIcons.reset(),m.container.style.cursor="move",m.isEditing()||mxEvent.getSource(X)!=m.container||mxEvent.consume(X))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(X){m.container.style.cursor="";J=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var G=m.panningHandler.isForcePanningEvent;m.panningHandler.isForcePanningEvent=function(X){return G.apply(this, +arguments)||J||mxEvent.isMouseEvent(X.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(X.getEvent()))&&(!mxEvent.isControlDown(X.getEvent())&&mxEvent.isRightMouseButton(X.getEvent())||mxEvent.isMiddleMouseButton(X.getEvent()))};var W=m.cellEditor.isStopEditingEvent;m.cellEditor.isStopEditingEvent=function(X){return W.apply(this,arguments)||13==X.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(X)||mxClient.IS_MAC&&mxEvent.isMetaDown(X)||mxClient.IS_SF&&mxEvent.isShiftDown(X))};var T=m.isZoomWheelEvent; +m.isZoomWheelEvent=function(){return J||T.apply(this,arguments)};var Z=!1,N=null,qa=null,oa=null,S=mxUtils.bind(this,function(){if(null!=this.toolbar&&Z!=m.cellEditor.isContentEditing()){for(var X=this.toolbar.container.firstChild,ja=[];null!=X;){var ca=X.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,X)&&(X.parentNode.removeChild(X),ja.push(X));X=ca}X=this.toolbar.fontMenu;ca=this.toolbar.sizeMenu;if(null==oa)this.toolbar.createTextToolbar();else{for(var ka=0;ka<oa.length;ka++)this.toolbar.container.appendChild(oa[ka]); +this.toolbar.fontMenu=N;this.toolbar.sizeMenu=qa}Z=m.cellEditor.isContentEditing();N=X;qa=ca;oa=ja}}),fa=this,ia=m.cellEditor.startEditing;m.cellEditor.startEditing=function(){ia.apply(this,arguments);S();if(m.cellEditor.isContentEditing()){var X=!1,ja=function(){X||(X=!0,window.setTimeout(function(){var ca=m.getSelectedEditingElement();null!=ca&&(ca=mxUtils.getCurrentStyle(ca),null!=ca&&null!=fa.toolbar&&(fa.toolbar.setFontName(Graph.stripQuotes(ca.fontFamily)),fa.toolbar.setFontSize(parseInt(ca.fontSize)))); +X=!1},0))};mxEvent.addListener(m.cellEditor.textarea,"input",ja);mxEvent.addListener(m.cellEditor.textarea,"touchend",ja);mxEvent.addListener(m.cellEditor.textarea,"mouseup",ja);mxEvent.addListener(m.cellEditor.textarea,"keyup",ja);ja()}};var M=m.cellEditor.stopEditing;m.cellEditor.stopEditing=function(X,ja){try{M.apply(this,arguments),S()}catch(ca){fa.handleError(ca)}};m.container.setAttribute("tabindex","0");m.container.style.cursor="default";if(window.self===window.top&&null!=m.container.parentNode)try{m.container.focus()}catch(X){}var aa= +m.fireMouseEvent;m.fireMouseEvent=function(X,ja,ca){X==mxEvent.MOUSE_DOWN&&this.container.focus();aa.apply(this,arguments)};m.popupMenuHandler.autoExpand=!0;null!=this.menus&&(m.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(X,ja,ca){this.menus.createPopupMenu(X,ja,ca)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(X){m.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};m.connectionHandler.addListener(mxEvent.CONNECT, +function(X,ja){var ca=[ja.getProperty("cell")];ja.getProperty("terminalInserted")&&(ca.push(ja.getProperty("terminal")),window.setTimeout(function(){null!=fa.hoverIcons&&fa.hoverIcons.update(m.view.getState(ca[ca.length-1]))},0));y(ca)});this.addListener("styleChanged",mxUtils.bind(this,function(X,ja){var ca=ja.getProperty("cells"),ka=X=!1;if(0<ca.length)for(var q=0;q<ca.length&&(X=m.getModel().isVertex(ca[q])||X,!(ka=m.getModel().isEdge(ca[q])||ka)||!X);q++);else ka=X=!0;X=X&&!P;ka=ka&&!d;ca=ja.getProperty("keys"); +ja=ja.getProperty("values");for(q=0;q<ca.length;q++){var E=0<=mxUtils.indexOf(f,ca[q]);if("strokeColor"!=ca[q]||null!=ja[q]&&"none"!=ja[q])if(0<=mxUtils.indexOf(F,ca[q]))ka||0<=mxUtils.indexOf(g,ca[q])?null==ja[q]?delete m.currentEdgeStyle[ca[q]]:m.currentEdgeStyle[ca[q]]=ja[q]:X&&0<=mxUtils.indexOf(p,ca[q])&&(null==ja[q]?delete m.currentVertexStyle[ca[q]]:m.currentVertexStyle[ca[q]]=ja[q]);else if(0<=mxUtils.indexOf(p,ca[q])){if(X||E)null==ja[q]?delete m.currentVertexStyle[ca[q]]:m.currentVertexStyle[ca[q]]= +ja[q];if(ka||E||0<=mxUtils.indexOf(g,ca[q]))null==ja[q]?delete m.currentEdgeStyle[ca[q]]:m.currentEdgeStyle[ca[q]]=ja[q]}}null!=this.toolbar&&(this.toolbar.setFontName(m.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(m.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==m.currentEdgeStyle.edgeStyle&&"1"==m.currentEdgeStyle.curved? "geSprite geSprite-curved":"straight"==m.currentEdgeStyle.edgeStyle||"none"==m.currentEdgeStyle.edgeStyle||null==m.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==m.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==m.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==m.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==m.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==m.currentEdgeStyle.elbow? -"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==m.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==m.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==m.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var P=m.currentVertexStyle.fontFamily||"Helvetica", -ca=String(m.currentVertexStyle.fontSize||"12"),ja=m.getView().getState(m.getSelectionCell());null!=ja&&(P=ja.style[mxConstants.STYLE_FONTFAMILY]||P,ca=ja.style[mxConstants.STYLE_FONTSIZE]||ca,10<P.length&&(P=P.substring(0,8)+"..."));this.toolbar.setFontName(P);this.toolbar.setFontSize(ca)}),m.getSelectionModel().addListener(mxEvent.CHANGE,b),m.getModel().addListener(mxEvent.CHANGE,b));m.addListener(mxEvent.CELLS_ADDED,function(P,ca){P=ca.getProperty("cells");ca=ca.getProperty("parent");null!=ca&& -m.getModel().isLayer(ca)&&!m.isCellVisible(ca)&&null!=P&&0<P.length&&m.getModel().setVisible(ca,!0)});this.gestureHandler=mxUtils.bind(this,function(P){null!=this.currentMenu&&mxEvent.getSource(P)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler); +"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==m.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==m.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==m.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var X=m.currentVertexStyle.fontFamily||"Helvetica", +ja=String(m.currentVertexStyle.fontSize||"12"),ca=m.getView().getState(m.getSelectionCell());null!=ca&&(X=ca.style[mxConstants.STYLE_FONTFAMILY]||X,ja=ca.style[mxConstants.STYLE_FONTSIZE]||ja,10<X.length&&(X=X.substring(0,8)+"..."));this.toolbar.setFontName(X);this.toolbar.setFontSize(ja)}),m.getSelectionModel().addListener(mxEvent.CHANGE,b),m.getModel().addListener(mxEvent.CHANGE,b));m.addListener(mxEvent.CELLS_ADDED,function(X,ja){X=ja.getProperty("cells");ja=ja.getProperty("parent");null!=ja&& +m.getModel().isLayer(ja)&&!m.isCellVisible(ja)&&null!=X&&0<X.length&&m.getModel().setVisible(ja,!0)});this.gestureHandler=mxUtils.bind(this,function(X){null!=this.currentMenu&&mxEvent.getSource(X)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler); this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this, function(){m.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){m.view.validateBackground()}));m.addListener("gridSizeChanged",mxUtils.bind(this,function(){m.isGridEnabled()&&m.view.validateBackground()}));this.editor.resetGraph()}this.init();m.standalone||this.open()};EditorUi.compactUi=!0; -EditorUi.parsePng=function(b,e,k){function m(K,Q){var d=p;p+=Q;return K.substring(d,p)}function C(K){K=m(K,4);return K.charCodeAt(3)+(K.charCodeAt(2)<<8)+(K.charCodeAt(1)<<16)+(K.charCodeAt(0)<<24)}var p=0;if(m(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(m(b,4),"IHDR"!=m(b,4))null!=k&&k();else{m(b,17);do{k=C(b);var E=m(b,4);if(null!=e&&e(p-8,E,k))break;value=m(b,k);m(b,4);if("IEND"==E)break}while(k)}};mxUtils.extend(EditorUi,mxEventSource); +EditorUi.parsePng=function(b,e,k){function m(K,P){var d=p;p+=P;return K.substring(d,p)}function C(K){K=m(K,4);return K.charCodeAt(3)+(K.charCodeAt(2)<<8)+(K.charCodeAt(1)<<16)+(K.charCodeAt(0)<<24)}var p=0;if(m(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(m(b,4),"IHDR"!=m(b,4))null!=k&&k();else{m(b,17);do{k=C(b);var F=m(b,4);if(null!=e&&e(p-8,F,k))break;value=m(b,k);m(b,4);if("IEND"==F)break}while(k)}};mxUtils.extend(EditorUi,mxEventSource); EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=38;EditorUi.prototype.footerHeight=28;EditorUi.prototype.sidebarFooterHeight=34;EditorUi.prototype.hsplitPosition=640>=screen.width?118:"large"!=urlParams["sidebar-entries"]?212:240;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2; EditorUi.prototype.lightboxVerticalDivider=4;EditorUi.prototype.hsplitClickEnabled=!1; EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(b.container,"scroll",mxUtils.bind(this,function(){b.tooltipHandler.hide();null!=b.connectionHandler&&null!=b.connectionHandler.constraintHandler&&b.connectionHandler.constraintHandler.reset()}));b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){b.tooltipHandler.hide();var m=b.getRubberband();null!=m&&m.cancel()}));mxEvent.addListener(b.container, @@ -2113,23 +2111,23 @@ EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0" arguments);k.updateActionStates()};b.editLink=k.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState}; EditorUi.prototype.createSelectionState=function(){for(var b=this.editor.graph,e=b.getSelectionCells(),k=this.initSelectionState(),m=!0,C=0;C<e.length;C++){var p=b.getCurrentCellStyle(e[C]);"0"!=mxUtils.getValue(p,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(k,e[C],e,m),m=!1)}this.updateSelectionStateForTableCells(k);return k}; EditorUi.prototype.initSelectionState=function(){return{vertices:[],edges:[],cells:[],x:null,y:null,width:null,height:null,style:{},containsImage:!1,containsLabel:!1,fill:!0,glass:!0,rounded:!0,autoSize:!1,image:!0,shadow:!0,lineJumps:!0,resizable:!0,table:!1,cell:!1,row:!1,movable:!0,rotatable:!0,stroke:!0,swimlane:!1,unlocked:this.editor.graph.isEnabled(),connections:!1}}; -EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){for(var e=mxUtils.sortCells(b.cells),k=this.editor.graph.model,m=k.getParent(e[0]),C=k.getParent(m),p=m.getIndex(e[0]),E=C.getIndex(m),K=null,Q=1,d=1,f=0,g=E<C.getChildCount()-1?k.getChildAt(k.getChildAt(C,E+1),p):null;f<e.length-1;){var x=e[++f];null==g||g!=x||null!=K&&Q!=K||(K=Q,Q=0,d++,m=k.getParent(g),g=E+d<C.getChildCount()?k.getChildAt(k.getChildAt(C,E+d),p):null);var z=this.editor.graph.view.getState(x); -if(x==k.getChildAt(m,p+Q)&&null!=z&&1==mxUtils.getValue(z.style,"colspan",1)&&1==mxUtils.getValue(z.style,"rowspan",1))Q++;else break}f==d*Q-1&&(b.mergeCell=e[0],b.colspan=Q,b.rowspan=d)}}; +EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){for(var e=mxUtils.sortCells(b.cells),k=this.editor.graph.model,m=k.getParent(e[0]),C=k.getParent(m),p=m.getIndex(e[0]),F=C.getIndex(m),K=null,P=1,d=1,f=0,g=F<C.getChildCount()-1?k.getChildAt(k.getChildAt(C,F+1),p):null;f<e.length-1;){var x=e[++f];null==g||g!=x||null!=K&&P!=K||(K=P,P=0,d++,m=k.getParent(g),g=F+d<C.getChildCount()?k.getChildAt(k.getChildAt(C,F+d),p):null);var y=this.editor.graph.view.getState(x); +if(x==k.getChildAt(m,p+P)&&null!=y&&1==mxUtils.getValue(y.style,"colspan",1)&&1==mxUtils.getValue(y.style,"rowspan",1))P++;else break}f==d*P-1&&(b.mergeCell=e[0],b.colspan=P,b.rowspan=d)}}; EditorUi.prototype.updateSelectionStateForCell=function(b,e,k,m){k=this.editor.graph;b.cells.push(e);if(k.getModel().isVertex(e)){b.connections=0<k.model.getEdgeCount(e);b.unlocked=b.unlocked&&!k.isCellLocked(e);b.resizable=b.resizable&&k.isCellResizable(e);b.rotatable=b.rotatable&&k.isCellRotatable(e);b.movable=b.movable&&k.isCellMovable(e)&&!k.isTableRow(e)&&!k.isTableCell(e);b.swimlane=b.swimlane||k.isSwimlane(e);b.table=b.table||k.isTable(e);b.cell=b.cell||k.isTableCell(e);b.row=b.row||k.isTableRow(e); b.vertices.push(e);var C=k.getCellGeometry(e);if(null!=C&&(0<C.width?null==b.width?b.width=C.width:b.width!=C.width&&(b.width=""):b.containsLabel=!0,0<C.height?null==b.height?b.height=C.height:b.height!=C.height&&(b.height=""):b.containsLabel=!0,!C.relative||null!=C.offset)){var p=C.relative?C.offset.x:C.x;C=C.relative?C.offset.y:C.y;null==b.x?b.x=p:b.x!=p&&(b.x="");null==b.y?b.y=C:b.y!=C&&(b.y="")}}else k.getModel().isEdge(e)&&(b.edges.push(e),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable= !1);e=k.view.getState(e);null!=e&&(b.autoSize=b.autoSize||k.isAutoSizeState(e),b.glass=b.glass&&k.isGlassState(e),b.rounded=b.rounded&&k.isRoundedState(e),b.lineJumps=b.lineJumps&&k.isLineJumpState(e),b.image=b.image&&k.isImageState(e),b.shadow=b.shadow&&k.isShadowState(e),b.fill=b.fill&&k.isFillState(e),b.stroke=b.stroke&&k.isStrokeState(e),p=mxUtils.getValue(e.style,mxConstants.STYLE_SHAPE,null),b.containsImage=b.containsImage||"image"==p,k.mergeStyle(e.style,b.style,m))}; -EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,e=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(Q,d){"mouseDown"==d.getProperty("eventName")&&e.hideShapePicker()}));var k=mxUtils.bind(this,function(){e.hideShapePicker(!0)});b.addListener("wheel",k);b.addListener(mxEvent.ESCAPE,k);b.view.addListener(mxEvent.SCALE,k);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,k);b.getSelectionModel().addListener(mxEvent.CHANGE,k);var m=b.popupMenuHandler.isMenuShowing; -b.popupMenuHandler.isMenuShowing=function(){return m.apply(this,arguments)||null!=e.shapePicker};var C=b.dblClick;b.dblClick=function(Q,d){if(this.isEnabled())if(null!=d||null==e.sidebar||mxEvent.isShiftDown(Q)||b.isCellLocked(b.getDefaultParent()))C.apply(this,arguments);else{var f=mxUtils.convertPoint(this.container,mxEvent.getClientX(Q),mxEvent.getClientY(Q));mxEvent.consume(Q);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(f.x,f.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset", -k);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();p.apply(this,arguments)};var E=this.hoverIcons.execute;this.hoverIcons.execute=function(Q,d,f){var g=f.getEvent();this.graph.isCloneEvent(g)||mxEvent.isShiftDown(g)?E.apply(this,arguments):this.graph.connectVertex(Q.cell,d,this.graph.defaultEdgeLength,g,null,null,mxUtils.bind(this,function(x,z,u){var H=b.getCompositeParent(Q.cell);x=b.getCellGeometry(H);for(f.consume();null!=H&&b.model.isVertex(H)&&null!=x&&x.relative;)cell= -H,H=b.model.getParent(cell),x=b.getCellGeometry(H);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(f.getGraphX(),f.getGraphY(),H,mxUtils.bind(this,function(J){u(J);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(J))}),d)}),30)}),mxUtils.bind(this,function(x){this.graph.selectCellsForConnectVertex(x,g,this)}))};var K=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(Q,d){null!=K&&window.clearTimeout(K);K=window.setTimeout(mxUtils.bind(this,function(){var f= -d.getProperty("arrow"),g=d.getProperty("direction"),x=d.getProperty("event");f=f.getBoundingClientRect();var z=mxUtils.getOffset(b.container),u=b.container.scrollLeft+f.x-z.x;z=b.container.scrollTop+f.y-z.y;var H=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),J=e.showShapePicker(u,z,H,mxUtils.bind(this,function(D){null!=D&&b.connectVertex(H,g,b.defaultEdgeLength,x,!0,!0,function(G,V,U){U(D);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(D))}, -function(G){b.selectCellsForConnectVertex(G)},x,this.hoverIcons)}),g,!0);this.centerShapePicker(J,f,u,z,g);mxUtils.setOpacity(J,30);mxEvent.addListener(J,"mouseenter",function(){mxUtils.setOpacity(J,100)});mxEvent.addListener(J,"mouseleave",function(){e.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(Q,d){null!=K&&window.clearTimeout(K)}))}}; +EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,e=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(P,d){"mouseDown"==d.getProperty("eventName")&&e.hideShapePicker()}));var k=mxUtils.bind(this,function(){e.hideShapePicker(!0)});b.addListener("wheel",k);b.addListener(mxEvent.ESCAPE,k);b.view.addListener(mxEvent.SCALE,k);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,k);b.getSelectionModel().addListener(mxEvent.CHANGE,k);var m=b.popupMenuHandler.isMenuShowing; +b.popupMenuHandler.isMenuShowing=function(){return m.apply(this,arguments)||null!=e.shapePicker};var C=b.dblClick;b.dblClick=function(P,d){if(this.isEnabled())if(null!=d||null==e.sidebar||mxEvent.isShiftDown(P)||b.isCellLocked(b.getDefaultParent()))C.apply(this,arguments);else{var f=mxUtils.convertPoint(this.container,mxEvent.getClientX(P),mxEvent.getClientY(P));mxEvent.consume(P);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(f.x,f.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset", +k);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();p.apply(this,arguments)};var F=this.hoverIcons.execute;this.hoverIcons.execute=function(P,d,f){var g=f.getEvent();this.graph.isCloneEvent(g)||mxEvent.isShiftDown(g)?F.apply(this,arguments):this.graph.connectVertex(P.cell,d,this.graph.defaultEdgeLength,g,null,null,mxUtils.bind(this,function(x,y,u){var H=b.getCompositeParent(P.cell);x=b.getCellGeometry(H);for(f.consume();null!=H&&b.model.isVertex(H)&&null!=x&&x.relative;)cell= +H,H=b.model.getParent(cell),x=b.getCellGeometry(H);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(f.getGraphX(),f.getGraphY(),H,mxUtils.bind(this,function(J){u(J);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(J))}),d)}),30)}),mxUtils.bind(this,function(x){this.graph.selectCellsForConnectVertex(x,g,this)}))};var K=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(P,d){null!=K&&window.clearTimeout(K);K=window.setTimeout(mxUtils.bind(this,function(){var f= +d.getProperty("arrow"),g=d.getProperty("direction"),x=d.getProperty("event");f=f.getBoundingClientRect();var y=mxUtils.getOffset(b.container),u=b.container.scrollLeft+f.x-y.x;y=b.container.scrollTop+f.y-y.y;var H=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),J=e.showShapePicker(u,y,H,mxUtils.bind(this,function(D){null!=D&&b.connectVertex(H,g,b.defaultEdgeLength,x,!0,!0,function(G,W,T){T(D);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(D))}, +function(G){b.selectCellsForConnectVertex(G)},x,this.hoverIcons)}),g,!0);this.centerShapePicker(J,f,u,y,g);mxUtils.setOpacity(J,30);mxEvent.addListener(J,"mouseenter",function(){mxUtils.setOpacity(J,100)});mxEvent.addListener(J,"mouseleave",function(){e.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(P,d){null!=K&&window.clearTimeout(K)}))}}; EditorUi.prototype.centerShapePicker=function(b,e,k,m,C){if(C==mxConstants.DIRECTION_EAST||C==mxConstants.DIRECTION_WEST)b.style.width="40px";var p=b.getBoundingClientRect();C==mxConstants.DIRECTION_NORTH?(k-=p.width/2-10,m-=p.height+6):C==mxConstants.DIRECTION_SOUTH?(k-=p.width/2-10,m+=e.height+6):C==mxConstants.DIRECTION_WEST?(k-=p.width+6,m-=p.height/2-10):C==mxConstants.DIRECTION_EAST&&(k+=e.width+6,m-=p.height/2-10);b.style.left=k+"px";b.style.top=m+"px"}; EditorUi.prototype.showShapePicker=function(b,e,k,m,C,p){b=this.createShapePicker(b,e,k,m,C,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(k,p),p);null!=b&&(null==this.hoverIcons||p||this.hoverIcons.reset(),p=this.editor.graph,p.popupMenuHandler.hideMenu(),p.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=m,this.shapePicker=b);return b}; -EditorUi.prototype.createShapePicker=function(b,e,k,m,C,p,E,K){var Q=null;if(null!=E&&0<E.length){var d=this,f=this.editor.graph;Q=document.createElement("div");C=f.view.getState(k);var g=null==k||null!=C&&f.isTransparentState(C)?null:f.copyStyle(k);k=6>E.length?35*E.length:140;Q.className="geToolbarContainer geSidebarContainer";Q.style.cssText="position:absolute;left:"+b+"px;top:"+e+"px;width:"+k+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+ -mxPopupMenu.prototype.zIndex+1+";";K||mxUtils.setPrefixedStyle(Q.style,"transform","translate(-22px,-22px)");null!=f.background&&f.background!=mxConstants.NONE&&(Q.style.backgroundColor=f.background);f.container.appendChild(Q);k=mxUtils.bind(this,function(x){var z=document.createElement("a");z.className="geItem";z.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";Q.appendChild(z);null!=g&&"1"!=urlParams.sketch? -this.sidebar.graph.pasteStyle(g,[x]):d.insertHandler([x],""!=x.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([x],25,25,z,null,!0,!1,x.geometry.width,x.geometry.height);mxEvent.addListener(z,"click",function(){var u=f.cloneCell(x);if(null!=m)m(u);else{u.geometry.x=f.snap(Math.round(b/f.view.scale)-f.view.translate.x-x.geometry.width/2);u.geometry.y=f.snap(Math.round(e/f.view.scale)-f.view.translate.y-x.geometry.height/2);f.model.beginUpdate();try{f.addCell(u)}finally{f.model.endUpdate()}f.setSelectionCell(u); -f.scrollCellToVisible(u);f.startEditingAtCell(u);null!=d.hoverIcons&&d.hoverIcons.update(f.view.getState(u))}null!=p&&p()})});for(C=0;C<(K?Math.min(E.length,4):E.length);C++)k(E[C]);E=Q.offsetTop+Q.clientHeight-(f.container.scrollTop+f.container.offsetHeight);0<E&&(Q.style.top=Math.max(f.container.scrollTop+22,e-E)+"px");E=Q.offsetLeft+Q.clientWidth-(f.container.scrollLeft+f.container.offsetWidth);0<E&&(Q.style.left=Math.max(f.container.scrollLeft+22,b-E)+"px")}return Q}; +EditorUi.prototype.createShapePicker=function(b,e,k,m,C,p,F,K){var P=null;if(null!=F&&0<F.length){var d=this,f=this.editor.graph;P=document.createElement("div");C=f.view.getState(k);var g=null==k||null!=C&&f.isTransparentState(C)?null:f.copyStyle(k);k=6>F.length?35*F.length:140;P.className="geToolbarContainer geSidebarContainer";P.style.cssText="position:absolute;left:"+b+"px;top:"+e+"px;width:"+k+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+ +mxPopupMenu.prototype.zIndex+1+";";K||mxUtils.setPrefixedStyle(P.style,"transform","translate(-22px,-22px)");null!=f.background&&f.background!=mxConstants.NONE&&(P.style.backgroundColor=f.background);f.container.appendChild(P);k=mxUtils.bind(this,function(x){var y=document.createElement("a");y.className="geItem";y.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";P.appendChild(y);null!=g&&"1"!=urlParams.sketch? +this.sidebar.graph.pasteStyle(g,[x]):d.insertHandler([x],""!=x.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([x],25,25,y,null,!0,!1,x.geometry.width,x.geometry.height);mxEvent.addListener(y,"click",function(){var u=f.cloneCell(x);if(null!=m)m(u);else{u.geometry.x=f.snap(Math.round(b/f.view.scale)-f.view.translate.x-x.geometry.width/2);u.geometry.y=f.snap(Math.round(e/f.view.scale)-f.view.translate.y-x.geometry.height/2);f.model.beginUpdate();try{f.addCell(u)}finally{f.model.endUpdate()}f.setSelectionCell(u); +f.scrollCellToVisible(u);f.startEditingAtCell(u);null!=d.hoverIcons&&d.hoverIcons.update(f.view.getState(u))}null!=p&&p()})});for(C=0;C<(K?Math.min(F.length,4):F.length);C++)k(F[C]);F=P.offsetTop+P.clientHeight-(f.container.scrollTop+f.container.offsetHeight);0<F&&(P.style.top=Math.max(f.container.scrollTop+22,e-F)+"px");F=P.offsetLeft+P.clientWidth-(f.container.scrollLeft+f.container.offsetWidth);0<F&&(P.style.left=Math.max(f.container.scrollLeft+22,b-F)+"px")}return P}; EditorUi.prototype.getCellsForShapePicker=function(b,e){e=mxUtils.bind(this,function(k,m,C,p){return this.editor.graph.createVertex(null,null,p||"",0,0,m||120,C||60,k,!1)});return[null!=b?this.editor.graph.cloneCell(b):e("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),e("whiteSpace=wrap;html=1;"),e("ellipse;whiteSpace=wrap;html=1;"),e("rhombus;whiteSpace=wrap;html=1;",80,80),e("rounded=1;whiteSpace=wrap;html=1;"),e("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"), e("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),e("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),e("triangle;whiteSpace=wrap;html=1;",60,80),e("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),e("shape=tape;whiteSpace=wrap;html=1;",120,100),e("ellipse;shape=cloud;whiteSpace=wrap;html=1;", 120,80),e("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),e("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",40,40)]};EditorUi.prototype.hideShapePicker=function(b){null!=this.shapePicker&&(this.shapePicker.parentNode.removeChild(this.shapePicker),this.shapePicker=null,b||null==this.shapePickerCallback||this.shapePickerCallback(),this.shapePickerCallback=null)}; @@ -2144,45 +2142,45 @@ b==mxConstants.ARROW_BLOCK_THIN?k="1"!=e?Format.blockThinMarkerImage.src:Format. "box"==b?k=Format.boxMarkerImage.src:"halfCircle"==b?k=Format.halfCircleMarkerImage.src:"openAsync"==b?k=Format.openAsyncFilledMarkerImage.src:"async"==b?k="1"!=e?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==b?k=Format.dashMarkerImage.src:"baseDash"==b?k=Format.baseDashMarkerImage.src:"cross"==b?k=Format.crossMarkerImage.src:"circle"==b?k=Format.circleMarkerImage.src:"circlePlus"==b?k=Format.circlePlusMarkerImage.src:"ERone"==b?k=Format.EROneMarkerImage.src:"ERmandOne"==b? k=Format.ERmandOneMarkerImage.src:"ERmany"==b?k=Format.ERmanyMarkerImage.src:"ERoneToMany"==b?k=Format.ERoneToManyMarkerImage.src:"ERzeroToOne"==b?k=Format.ERzeroToOneMarkerImage.src:"ERzeroToMany"==b&&(k=Format.ERzeroToManyMarkerImage.src);return k};EditorUi.prototype.createMenus=function(){return null}; EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,e=this.actions.get("paste"),k=this.actions.get("pasteHere");e.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));k.setEnabled(e.isEnabled())}; -EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(p){p.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(p){var E=null;if(p.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{E=E||p.getSelectionCells();E=p.getExportableCells(p.model.getTopmostCells(E));for(var K={},Q=p.createCellLookup(E),d=p.cloneCells(E,null,K),f=new mxGraphModel,g=f.getChildAt(f.getRoot(), -0),x=0;x<d.length;x++){f.add(g,d[x]);var z=p.view.getState(E[x]);if(null!=z){var u=p.getCellGeometry(d[x]);null!=u&&u.relative&&!f.isEdge(E[x])&&null==Q[mxObjectIdentity.get(f.getParent(E[x]))]&&(u.offset=null,u.relative=!1,u.x=z.x/z.view.scale-z.view.translate.x,u.y=z.y/z.view.scale-z.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(K,Q),d);mxClipboard.insertCount=1;mxClipboard.setCells(d)}b.updatePasteActionStates();return E};var k=mxClipboard.paste;mxClipboard.paste=function(p){var E= -null;p.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):E=k.apply(this,arguments);b.updatePasteActionStates();return E};var m=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){m.apply(this,arguments);b.updatePasteActionStates()};var C=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(p,E){C.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()}; +EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(p){p.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(p){var F=null;if(p.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{F=F||p.getSelectionCells();F=p.getExportableCells(p.model.getTopmostCells(F));for(var K={},P=p.createCellLookup(F),d=p.cloneCells(F,null,K),f=new mxGraphModel,g=f.getChildAt(f.getRoot(), +0),x=0;x<d.length;x++){f.add(g,d[x]);var y=p.view.getState(F[x]);if(null!=y){var u=p.getCellGeometry(d[x]);null!=u&&u.relative&&!f.isEdge(F[x])&&null==P[mxObjectIdentity.get(f.getParent(F[x]))]&&(u.offset=null,u.relative=!1,u.x=y.x/y.view.scale-y.view.translate.x,u.y=y.y/y.view.scale-y.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(K,P),d);mxClipboard.insertCount=1;mxClipboard.setCells(d)}b.updatePasteActionStates();return F};var k=mxClipboard.paste;mxClipboard.paste=function(p){var F= +null;p.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):F=k.apply(this,arguments);b.updatePasteActionStates();return F};var m=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){m.apply(this,arguments);b.updatePasteActionStates()};var C=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(p,F){C.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()}; EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600; -EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var P=this.graph.getPageLayout(),ca=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+P.x*ca.width),this.scale*(this.translate.y+P.y*ca.height),this.scale*P.width*ca.width, -this.scale*P.height*ca.height)};b.getPreferredPageSize=function(P,ca,ja){P=this.getPageLayout();ca=this.getPageSize();return new mxRectangle(0,0,P.width*ca.width,P.height*ca.height)};var e=null,k=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(P,ca,ja,ka){if(null!=b.container&&!b.isViewer()){ja=null!=ja?ja:0;ka=null!=ka?ka:0;var q=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),F=mxUtils.hasScrollbars(b.container),R=b.view.translate,W=b.view.scale, -T=mxRectangle.fromRectangle(q);T.x=T.x/W-R.x;T.y=T.y/W-R.y;T.width/=W;T.height/=W;R=b.container.scrollTop;var ba=b.container.scrollLeft,ha=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)ha+=3;var ra=b.container.offsetWidth-ha;ha=b.container.offsetHeight-ha;P=P?Math.max(.3,Math.min(ca||1,ra/T.width)):W;ca=(ra-P*T.width)/2/P;var ta=0==this.lightboxVerticalDivider?0:(ha-P*T.height)/this.lightboxVerticalDivider/P;F&&(ca=Math.max(ca,0),ta=Math.max(ta,0));if(F||q.width< -ra||q.height<ha)b.view.scaleAndTranslate(P,Math.floor(ca-T.x),Math.floor(ta-T.y)),b.container.scrollTop=R*P/W,b.container.scrollLeft=ba*P/W;else if(0!=ja||0!=ka)q=b.view.translate,b.view.setTranslate(Math.floor(q.x+ja/W),Math.floor(q.y+ka/W))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var m=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",m);this.destroyFunctions.push(function(){mxEvent.removeListener(window, -"resize",m)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(P){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(P){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var C=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position= +EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var ca=this.graph.getPageLayout(),ka=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+ca.x*ka.width),this.scale*(this.translate.y+ca.y*ka.height),this.scale*ca.width* +ka.width,this.scale*ca.height*ka.height)};b.getPreferredPageSize=function(ca,ka,q){ca=this.getPageLayout();ka=this.getPageSize();return new mxRectangle(0,0,ca.width*ka.width,ca.height*ka.height)};var e=null,k=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(ca,ka,q,E){if(null!=b.container&&!b.isViewer()){q=null!=q?q:0;E=null!=E?E:0;var Q=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),Y=mxUtils.hasScrollbars(b.container),R=b.view.translate, +ba=b.view.scale,ea=mxRectangle.fromRectangle(Q);ea.x=ea.x/ba-R.x;ea.y=ea.y/ba-R.y;ea.width/=ba;ea.height/=ba;R=b.container.scrollTop;var ra=b.container.scrollLeft,ta=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)ta+=3;var la=b.container.offsetWidth-ta;ta=b.container.offsetHeight-ta;ca=ca?Math.max(.3,Math.min(ka||1,la/ea.width)):ba;ka=(la-ca*ea.width)/2/ca;var pa=0==this.lightboxVerticalDivider?0:(ta-ca*ea.height)/this.lightboxVerticalDivider/ca;Y&&(ka=Math.max(ka, +0),pa=Math.max(pa,0));if(Y||Q.width<la||Q.height<ta)b.view.scaleAndTranslate(ca,Math.floor(ka-ea.x),Math.floor(pa-ea.y)),b.container.scrollTop=R*ca/ba,b.container.scrollLeft=ra*ca/ba;else if(0!=q||0!=E)Q=b.view.translate,b.view.setTranslate(Math.floor(Q.x+q/ba),Math.floor(Q.y+E/ba))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var m=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",m);this.destroyFunctions.push(function(){mxEvent.removeListener(window, +"resize",m)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(ca){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(ca){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var C=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position= "fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=b.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style, -"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var P=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=P?parseInt(P["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var E=0;p=mxUtils.bind(this,function(P,ca,ja){E++; -var ka=document.createElement("span");ka.style.paddingLeft="8px";ka.style.paddingRight="8px";ka.style.cursor="pointer";mxEvent.addListener(ka,"click",P);null!=ja&&ka.setAttribute("title",ja);P=document.createElement("img");P.setAttribute("border","0");P.setAttribute("src",ca);P.style.width="36px";P.style.filter="invert(100%)";ka.appendChild(P);this.chromelessToolbar.appendChild(ka);return ka});null!=C.backBtn&&p(mxUtils.bind(this,function(P){window.location.href=C.backBtn.url;mxEvent.consume(P)}), -Editor.backImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var K=p(mxUtils.bind(this,function(P){this.actions.get("previousPage").funct();mxEvent.consume(P)}),Editor.previousImage,mxResources.get("previousPage")),Q=document.createElement("div");Q.style.fontFamily=Editor.defaultHtmlFont;Q.style.display="inline-block";Q.style.verticalAlign="top";Q.style.fontWeight="bold";Q.style.marginTop="8px";Q.style.fontSize="14px";Q.style.color=mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff"; -this.chromelessToolbar.appendChild(Q);var d=p(mxUtils.bind(this,function(P){this.actions.get("nextPage").funct();mxEvent.consume(P)}),Editor.nextImage,mxResources.get("nextPage")),f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(Q.innerText="",mxUtils.write(Q,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});K.style.paddingLeft="0px";K.style.paddingRight="4px";d.style.paddingLeft="4px";d.style.paddingRight="0px";var g=mxUtils.bind(this, -function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(d.style.display="",K.style.display="",Q.style.display="inline-block"):(d.style.display="none",K.style.display="none",Q.style.display="none");f()});this.editor.addListener("resetGraphView",g);this.editor.addListener("pageSelected",f)}p(mxUtils.bind(this,function(P){this.actions.get("zoomOut").funct();mxEvent.consume(P)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(P){this.actions.get("zoomIn").funct(); -mxEvent.consume(P)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(P){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(P)}),Editor.zoomFitImage,mxResources.get("fit"));var x=null,z=null,u=mxUtils.bind(this,function(P){null!=x&&(window.clearTimeout(x),x=null);null!=z&&(window.clearTimeout(z),z=null);x=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar, -0);x=null;z=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";z=null}),600)}),P||200)}),H=mxUtils.bind(this,function(P){null!=x&&(window.clearTimeout(x),x=null);null!=z&&(window.clearTimeout(z),z=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,P||30)});if("1"==urlParams.layers){this.layersDialog=null;var J=p(mxUtils.bind(this,function(P){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog), -this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var ca=J.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding= -"4px 2px 4px 2px";this.layersDialog.style.left=ca.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));ca=mxUtils.getCurrentStyle(this.editor.graph.container); -this.layersDialog.style.zIndex=ca.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(P)}),Editor.layersImage,mxResources.get("layers")),D=b.getModel();D.addListener(mxEvent.CHANGE,function(){J.style.display=1<D.getChildCount(D.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(P){null!= -this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(P)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(g=0;g<this.lightboxToolbarActions.length;g++){var G=this.lightboxToolbarActions[g];G.elem=p(G.fn,G.icon,G.tooltip)}null!=C.refreshBtn&&p(mxUtils.bind(this,function(P){C.refreshBtn.url?window.location.href=C.refreshBtn.url: -window.location.reload();mxEvent.consume(P)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=C.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(P){C.fullscreenBtn.url?b.openLink(C.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(P)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(C.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=document.body))&&p(mxUtils.bind(this, -function(P){"1"==urlParams.close||C.closeBtn?window.close():(this.destroy(),mxEvent.consume(P))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(P){mxEvent.isTouchEvent(P)||(mxEvent.isShiftDown(P)|| -H(30),u())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(P){mxEvent.consume(P)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(P){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(P)?u():H(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(P){mxEvent.isShiftDown(P)?u():H(100);mxEvent.consume(P)}));mxEvent.addListener(this.chromelessToolbar, -"mouseleave",mxUtils.bind(this,function(P){mxEvent.isTouchEvent(P)||H(30)}));var V=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(P,ca){this.startX=ca.getGraphX();this.startY=ca.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(P,ca){},mouseUp:function(P,ca){mxEvent.isTouchEvent(ca.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<V&&Math.abs(this.scrollTop-b.container.scrollTop)< -V&&Math.abs(this.startX-ca.getGraphX())<V&&Math.abs(this.startY-ca.getGraphY())<V&&(0<parseFloat(k.chromelessToolbar.style.opacity||0)?u():H(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var U=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var P=this.graph.getPagePadding(),ca=this.graph.getPageSize();this.translate.x=P.x-(this.x0||0)*ca.width;this.translate.y=P.y-(this.y0||0)* -ca.height}U.apply(this,arguments)};if(!b.isViewer()){var Y=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var P=this.getPageLayout(),ca=this.getPagePadding(),ja=this.getPageSize(),ka=Math.ceil(2*ca.x+P.width*ja.width),q=Math.ceil(2*ca.y+P.height*ja.height),F=b.minimumGraphSize;if(null==F||F.width!=ka||F.height!=q)b.minimumGraphSize=new mxRectangle(0,0,ka,q);ka=ca.x-P.x*ja.width;ca=ca.y-P.y*ja.height;this.autoTranslate||this.view.translate.x== -ka&&this.view.translate.y==ca?Y.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=P.x,this.view.y0=P.y,P=b.view.translate.x,ja=b.view.translate.y,b.view.setTranslate(ka,ca),b.container.scrollLeft+=Math.round((ka-P)*b.view.scale),b.container.scrollTop+=Math.round((ca-ja)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var O=b.view.getBackgroundPane(),qa=b.view.getDrawPane();b.cumulativeZoomFactor=1;var oa=null,aa=null, -da=null,ia=null,L=null,Z=function(P){null!=oa&&window.clearTimeout(oa);0<=P&&window.setTimeout(function(){if(!b.isMouseDown||ia)oa=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),qa.style.transformOrigin="",O.style.transformOrigin="", -mxClient.IS_SF?(qa.style.transform="scale(1)",O.style.transform="scale(1)",window.setTimeout(function(){qa.style.transform="";O.style.transform=""},0)):(qa.style.transform="",O.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var ca=new mxPoint(b.container.scrollLeft,b.container.scrollTop),ja=mxUtils.getOffset(b.container),ka=b.view.scale,q=0,F=0;null!=aa&&(q=b.container.offsetWidth/2-aa.x+ja.x,F=b.container.offsetHeight/2-aa.y+ja.y);b.zoom(b.cumulativeZoomFactor, -null,b.isFastZoomEnabled()?20:null);b.view.scale!=ka&&(null!=da&&(q+=ca.x-da.x,F+=ca.y-da.y),null!=e&&k.chromelessResize(!1,null,q*(b.cumulativeZoomFactor-1),F*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==q&&0==F||(b.container.scrollLeft-=q*(b.cumulativeZoomFactor-1),b.container.scrollTop-=F*(b.cumulativeZoomFactor-1)));null!=L&&qa.setAttribute("filter",L);b.cumulativeZoomFactor=1;L=ia=aa=da=oa=null}),null!=P?P:b.isFastZoomEnabled()?k.wheelZoomDelay:k.lazyZoomDelay)},0)};b.lazyZoom= -function(P,ca,ja,ka){ka=null!=ka?ka:this.zoomFactor;(ca=ca||!b.scrollbars)&&(aa=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));P?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=ka,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*= -(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=ka,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;b.isFastZoomEnabled()&&(null==L&&""!=qa.getAttribute("filter")&&(L=qa.getAttribute("filter"),qa.removeAttribute("filter")),da=new mxPoint(b.container.scrollLeft,b.container.scrollTop),P=ca||null==aa?b.container.scrollLeft+ -b.container.clientWidth/2:aa.x+b.container.scrollLeft-b.container.offsetLeft,ka=ca||null==aa?b.container.scrollTop+b.container.clientHeight/2:aa.y+b.container.scrollTop-b.container.offsetTop,qa.style.transformOrigin=P+"px "+ka+"px",qa.style.transform="scale("+this.cumulativeZoomFactor+")",O.style.transformOrigin=P+"px "+ka+"px",O.style.transform="scale("+this.cumulativeZoomFactor+")",null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(P=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(P.style, -"transform-origin",(ca||null==aa?b.container.clientWidth/2+b.container.scrollLeft-P.offsetLeft+"px":aa.x+b.container.scrollLeft-P.offsetLeft-b.container.offsetLeft+"px")+" "+(ca||null==aa?b.container.clientHeight/2+b.container.scrollTop-P.offsetTop+"px":aa.y+b.container.scrollTop-P.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(P.style,"transform","scale("+this.cumulativeZoomFactor+")")),b.view.getDecoratorPane().style.opacity="0",b.view.getOverlayPane().style.opacity="0",null!=k.hoverIcons&& -k.hoverIcons.reset());Z(b.isFastZoomEnabled()?ja:0)};mxEvent.addGestureListeners(b.container,function(P){null!=oa&&window.clearTimeout(oa)},null,function(P){1!=b.cumulativeZoomFactor&&Z(0)});mxEvent.addListener(b.container,"scroll",function(P){null==oa||b.isMouseDown||1==b.cumulativeZoomFactor||Z(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(P,ca,ja,ka,q){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!ja&&b.isScrollWheelEvent(P))ja= -b.view.getTranslate(),ka=40/b.view.scale,mxEvent.isShiftDown(P)?b.view.setTranslate(ja.x+(ca?-ka:ka),ja.y):b.view.setTranslate(ja.x,ja.y+(ca?ka:-ka));else if(ja||b.isZoomWheelEvent(P))for(var F=mxEvent.getSource(P);null!=F;){if(F==b.container)return b.tooltipHandler.hideTooltip(),aa=null!=ka&&null!=q?new mxPoint(ka,q):new mxPoint(mxEvent.getClientX(P),mxEvent.getClientY(P)),ia=ja,ja=b.zoomFactor,ka=null,P.ctrlKey&&null!=P.deltaY&&40>Math.abs(P.deltaY)&&Math.round(P.deltaY)!=P.deltaY?ja=1+Math.abs(P.deltaY)/ -20*(ja-1):null!=P.movementY&&"pointermove"==P.type&&(ja=1+Math.max(1,Math.abs(P.movementY))/20*(ja-1),ka=-1),b.lazyZoom(ca,null,ka,ja),mxEvent.consume(P),!1;F=F.parentNode}}),b.container);b.panningHandler.zoomGraph=function(P){b.cumulativeZoomFactor=P.scale;b.lazyZoom(0<P.scale,!0);mxEvent.consume(P)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))}; -EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)}; +"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var ca=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=ca?parseInt(ca["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var F=0;p=mxUtils.bind(this,function(ca,ka, +q){F++;var E=document.createElement("span");E.style.paddingLeft="8px";E.style.paddingRight="8px";E.style.cursor="pointer";mxEvent.addListener(E,"click",ca);null!=q&&E.setAttribute("title",q);ca=document.createElement("img");ca.setAttribute("border","0");ca.setAttribute("src",ka);ca.style.width="36px";ca.style.filter="invert(100%)";E.appendChild(ca);this.chromelessToolbar.appendChild(E);return E});if(null!=C.backBtn){var K=Graph.sanitizeLink(C.backBtn.url);null!=K&&p(mxUtils.bind(this,function(ca){window.location.href= +K;mxEvent.consume(ca)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var P=p(mxUtils.bind(this,function(ca){this.actions.get("previousPage").funct();mxEvent.consume(ca)}),Editor.previousImage,mxResources.get("previousPage")),d=document.createElement("div");d.style.fontFamily=Editor.defaultHtmlFont;d.style.display="inline-block";d.style.verticalAlign="top";d.style.fontWeight="bold";d.style.marginTop="8px";d.style.fontSize="14px";d.style.color=mxClient.IS_IE||mxClient.IS_IE11? +"#000000":"#ffffff";this.chromelessToolbar.appendChild(d);var f=p(mxUtils.bind(this,function(ca){this.actions.get("nextPage").funct();mxEvent.consume(ca)}),Editor.nextImage,mxResources.get("nextPage")),g=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(d.innerText="",mxUtils.write(d,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});P.style.paddingLeft="0px";P.style.paddingRight="4px";f.style.paddingLeft="4px";f.style.paddingRight= +"0px";var x=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(f.style.display="",P.style.display="",d.style.display="inline-block"):(f.style.display="none",P.style.display="none",d.style.display="none");g()});this.editor.addListener("resetGraphView",x);this.editor.addListener("pageSelected",g)}p(mxUtils.bind(this,function(ca){this.actions.get("zoomOut").funct();mxEvent.consume(ca)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this, +function(ca){this.actions.get("zoomIn").funct();mxEvent.consume(ca)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(ca){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(ca)}),Editor.zoomFitImage,mxResources.get("fit"));var y=null,u=null,H=mxUtils.bind(this,function(ca){null!=y&&(window.clearTimeout(y),y=null);null!=u&&(window.clearTimeout(u),u=null);y=window.setTimeout(mxUtils.bind(this, +function(){mxUtils.setOpacity(this.chromelessToolbar,0);y=null;u=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";u=null}),600)}),ca||200)}),J=mxUtils.bind(this,function(ca){null!=y&&(window.clearTimeout(y),y=null);null!=u&&(window.clearTimeout(u),u=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,ca||30)});if("1"==urlParams.layers){this.layersDialog=null;var D=p(mxUtils.bind(this,function(ca){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog), +this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var ka=D.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding= +"4px 2px 4px 2px";this.layersDialog.style.left=ka.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));ka=mxUtils.getCurrentStyle(this.editor.graph.container); +this.layersDialog.style.zIndex=ka.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(ca)}),Editor.layersImage,mxResources.get("layers")),G=b.getModel();G.addListener(mxEvent.CHANGE,function(){D.style.display=1<G.getChildCount(G.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this, +function(ca){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(ca)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(x=0;x<this.lightboxToolbarActions.length;x++){var W=this.lightboxToolbarActions[x];W.elem=p(W.fn,W.icon,W.tooltip)}if(null!=C.refreshBtn){var T=null==C.refreshBtn.url?null:Graph.sanitizeLink(C.refreshBtn.url); +p(mxUtils.bind(this,function(ca){null!=T?window.location.href=T:window.location.reload();mxEvent.consume(ca)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=C.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(ca){C.fullscreenBtn.url?b.openLink(C.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(ca)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(C.closeBtn&&window.self===window.top||b.lightbox&&("1"== +urlParams.close||this.container!=document.body))&&p(mxUtils.bind(this,function(ca){"1"==urlParams.close||C.closeBtn?window.close():(this.destroy(),mxEvent.consume(ca))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this, +function(ca){mxEvent.isTouchEvent(ca)||(mxEvent.isShiftDown(ca)||J(30),H())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(ca){mxEvent.consume(ca)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(ca){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(ca)?H():J(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(ca){mxEvent.isShiftDown(ca)?H(): +J(100);mxEvent.consume(ca)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(ca){mxEvent.isTouchEvent(ca)||J(30)}));var Z=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ca,ka){this.startX=ka.getGraphX();this.startY=ka.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(ca,ka){},mouseUp:function(ca,ka){mxEvent.isTouchEvent(ka.getEvent())&&Math.abs(this.scrollLeft- +b.container.scrollLeft)<Z&&Math.abs(this.scrollTop-b.container.scrollTop)<Z&&Math.abs(this.startX-ka.getGraphX())<Z&&Math.abs(this.startY-ka.getGraphY())<Z&&(0<parseFloat(k.chromelessToolbar.style.opacity||0)?H():J(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var N=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var ca=this.graph.getPagePadding(),ka=this.graph.getPageSize();this.translate.x= +ca.x-(this.x0||0)*ka.width;this.translate.y=ca.y-(this.y0||0)*ka.height}N.apply(this,arguments)};if(!b.isViewer()){var qa=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var ca=this.getPageLayout(),ka=this.getPagePadding(),q=this.getPageSize(),E=Math.ceil(2*ka.x+ca.width*q.width),Q=Math.ceil(2*ka.y+ca.height*q.height),Y=b.minimumGraphSize;if(null==Y||Y.width!=E||Y.height!=Q)b.minimumGraphSize=new mxRectangle(0,0,E,Q);E=ka.x-ca.x*q.width;ka= +ka.y-ca.y*q.height;this.autoTranslate||this.view.translate.x==E&&this.view.translate.y==ka?qa.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=ca.x,this.view.y0=ca.y,ca=b.view.translate.x,q=b.view.translate.y,b.view.setTranslate(E,ka),b.container.scrollLeft+=Math.round((E-ca)*b.view.scale),b.container.scrollTop+=Math.round((ka-q)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var oa=b.view.getBackgroundPane(),S=b.view.getDrawPane(); +b.cumulativeZoomFactor=1;var fa=null,ia=null,M=null,aa=null,X=null,ja=function(ca){null!=fa&&window.clearTimeout(fa);0<=ca&&window.setTimeout(function(){if(!b.isMouseDown||aa)fa=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),S.style.transformOrigin= +"",oa.style.transformOrigin="",mxClient.IS_SF?(S.style.transform="scale(1)",oa.style.transform="scale(1)",window.setTimeout(function(){S.style.transform="";oa.style.transform=""},0)):(S.style.transform="",oa.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var ka=new mxPoint(b.container.scrollLeft,b.container.scrollTop),q=mxUtils.getOffset(b.container),E=b.view.scale,Q=0,Y=0;null!=ia&&(Q=b.container.offsetWidth/2-ia.x+q.x,Y=b.container.offsetHeight/ +2-ia.y+q.y);b.zoom(b.cumulativeZoomFactor,null,b.isFastZoomEnabled()?20:null);b.view.scale!=E&&(null!=M&&(Q+=ka.x-M.x,Y+=ka.y-M.y),null!=e&&k.chromelessResize(!1,null,Q*(b.cumulativeZoomFactor-1),Y*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==Q&&0==Y||(b.container.scrollLeft-=Q*(b.cumulativeZoomFactor-1),b.container.scrollTop-=Y*(b.cumulativeZoomFactor-1)));null!=X&&S.setAttribute("filter",X);b.cumulativeZoomFactor=1;X=aa=ia=M=fa=null}),null!=ca?ca:b.isFastZoomEnabled()?k.wheelZoomDelay: +k.lazyZoomDelay)},0)};b.lazyZoom=function(ca,ka,q,E){E=null!=E?E:this.zoomFactor;(ka=ka||!b.scrollbars)&&(ia=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));ca?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=E,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor? +this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=E,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;b.isFastZoomEnabled()&&(null==X&&""!=S.getAttribute("filter")&&(X=S.getAttribute("filter"),S.removeAttribute("filter")),M=new mxPoint(b.container.scrollLeft,b.container.scrollTop),ca=ka||null== +ia?b.container.scrollLeft+b.container.clientWidth/2:ia.x+b.container.scrollLeft-b.container.offsetLeft,E=ka||null==ia?b.container.scrollTop+b.container.clientHeight/2:ia.y+b.container.scrollTop-b.container.offsetTop,S.style.transformOrigin=ca+"px "+E+"px",S.style.transform="scale("+this.cumulativeZoomFactor+")",oa.style.transformOrigin=ca+"px "+E+"px",oa.style.transform="scale("+this.cumulativeZoomFactor+")",null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(ca=b.view.backgroundPageShape.node, +mxUtils.setPrefixedStyle(ca.style,"transform-origin",(ka||null==ia?b.container.clientWidth/2+b.container.scrollLeft-ca.offsetLeft+"px":ia.x+b.container.scrollLeft-ca.offsetLeft-b.container.offsetLeft+"px")+" "+(ka||null==ia?b.container.clientHeight/2+b.container.scrollTop-ca.offsetTop+"px":ia.y+b.container.scrollTop-ca.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(ca.style,"transform","scale("+this.cumulativeZoomFactor+")")),b.view.getDecoratorPane().style.opacity="0",b.view.getOverlayPane().style.opacity= +"0",null!=k.hoverIcons&&k.hoverIcons.reset());ja(b.isFastZoomEnabled()?q:0)};mxEvent.addGestureListeners(b.container,function(ca){null!=fa&&window.clearTimeout(fa)},null,function(ca){1!=b.cumulativeZoomFactor&&ja(0)});mxEvent.addListener(b.container,"scroll",function(ca){null==fa||b.isMouseDown||1==b.cumulativeZoomFactor||ja(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(ca,ka,q,E,Q){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&& +!q&&b.isScrollWheelEvent(ca))q=b.view.getTranslate(),E=40/b.view.scale,mxEvent.isShiftDown(ca)?b.view.setTranslate(q.x+(ka?-E:E),q.y):b.view.setTranslate(q.x,q.y+(ka?E:-E));else if(q||b.isZoomWheelEvent(ca))for(var Y=mxEvent.getSource(ca);null!=Y;){if(Y==b.container)return b.tooltipHandler.hideTooltip(),ia=null!=E&&null!=Q?new mxPoint(E,Q):new mxPoint(mxEvent.getClientX(ca),mxEvent.getClientY(ca)),aa=q,q=b.zoomFactor,E=null,ca.ctrlKey&&null!=ca.deltaY&&40>Math.abs(ca.deltaY)&&Math.round(ca.deltaY)!= +ca.deltaY?q=1+Math.abs(ca.deltaY)/20*(q-1):null!=ca.movementY&&"pointermove"==ca.type&&(q=1+Math.max(1,Math.abs(ca.movementY))/20*(q-1),E=-1),b.lazyZoom(ka,null,E,q),mxEvent.consume(ca),!1;Y=Y.parentNode}}),b.container);b.panningHandler.zoomGraph=function(ca){b.cumulativeZoomFactor=ca.scale;b.lazyZoom(0<ca.scale,!0);mxEvent.consume(ca)}}; +EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)}; EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;null!=this.format&&(this.formatWidth=b?240:0,this.formatContainer.style.display=b?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))}; EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var e=urlParams.border,k=60;null!=e&&(k=parseInt(e));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(k,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))}; EditorUi.prototype.isSelectionAllowed=function(b){return"SELECT"==mxEvent.getSource(b).nodeName||"INPUT"==mxEvent.getSource(b).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(b))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")}; @@ -2197,8 +2195,8 @@ EditorUi.prototype.resetScrollbars=function(){var b=this.editor.graph;if(!this.e b.scrollTileSize.height*b.view.scale))/4)));b.container.scrollLeft=Math.floor(Math.max(0,e.x-Math.max(0,(b.container.clientWidth-k)/2)))}else{e=mxRectangle.fromRectangle(b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds());k=b.view.translate;var m=b.view.scale;e.x=e.x/m-k.x;e.y=e.y/m-k.y;e.width/=m;e.height/=m;b.view.setTranslate(Math.floor(Math.max(0,(b.container.clientWidth-e.width)/2)-e.x+2),Math.floor((b.pageVisible?0:Math.max(0,(b.container.clientHeight-e.height)/4))-e.y+1))}}; EditorUi.prototype.setPageVisible=function(b){var e=this.editor.graph,k=mxUtils.hasScrollbars(e.container),m=0,C=0;k&&(m=e.view.translate.x*e.view.scale-e.container.scrollLeft,C=e.view.translate.y*e.view.scale-e.container.scrollTop);e.pageVisible=b;e.pageBreaksVisible=b;e.preferPageSize=b;e.view.validateBackground();if(k){var p=e.getSelectionCells();e.clearSelection();e.setSelectionCells(p)}e.sizeDidChange();k&&(e.container.scrollLeft=e.view.translate.x*e.view.scale-m,e.container.scrollTop=e.view.translate.y* e.view.scale-C);e.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))}; -EditorUi.prototype.installResizeHandler=function(b,e,k){e&&(b.window.setSize=function(C,p){if(!this.minimized){var E=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;C=Math.min(C,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());p=Math.min(p,E-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(C,p){var E=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth, -K=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,Q=parseInt(this.div.style.width),d=parseInt(this.div.style.height);C=Math.max(0,Math.min(C,E-Q));p=Math.max(0,Math.min(p,K-d));this.getX()==C&&this.getY()==p||mxWindow.prototype.setLocation.apply(this,arguments);e&&!this.minimized&&this.setSize(Q,d)};var m=mxUtils.bind(this,function(){var C=b.window.getX(),p=b.window.getY();b.window.setLocation(C,p)});mxEvent.addListener(window,"resize",m);b.destroy=function(){mxEvent.removeListener(window, +EditorUi.prototype.installResizeHandler=function(b,e,k){e&&(b.window.setSize=function(C,p){if(!this.minimized){var F=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;C=Math.min(C,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());p=Math.min(p,F-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(C,p){var F=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth, +K=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,P=parseInt(this.div.style.width),d=parseInt(this.div.style.height);C=Math.max(0,Math.min(C,F-P));p=Math.max(0,Math.min(p,K-d));this.getX()==C&&this.getY()==p||mxWindow.prototype.setLocation.apply(this,arguments);e&&!this.minimized&&this.setSize(P,d)};var m=mxUtils.bind(this,function(){var C=b.window.getX(),p=b.window.getY();b.window.setLocation(C,p)});mxEvent.addListener(window,"resize",m);b.destroy=function(){mxEvent.removeListener(window, "resize",m);b.window.destroy();null!=k&&k()}};function ChangeGridColor(b,e){this.ui=b;this.color=e}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(b)})(); function ChangePageSetup(b,e,k,m,C){this.ui=b;this.previousColor=this.color=e;this.previousImage=this.image=k;this.previousFormat=this.format=m;this.previousPageScale=this.pageScale=C;this.ignoreImage=this.ignoreColor=!1} ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var e=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=e}if(!this.ignoreImage){this.image=this.previousImage;e=b.backgroundImage;var k=this.previousImage;null!=k&&null!=k.src&&"data:page/id,"==k.src.substring(0,13)&&(k=this.ui.createImageForPageLink(k.src,this.ui.currentPage));this.ui.setBackgroundImage(k);this.previousImage=e}null!=this.previousFormat&& @@ -2208,7 +2206,7 @@ EditorUi.prototype.setBackgroundColor=function(b){this.editor.graph.background=b EditorUi.prototype.setPageFormat=function(b,e){e=null!=e?e:"1"==urlParams.sketch;this.editor.graph.pageFormat=b;e||(this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct());this.fireEvent(new mxEventObject("pageFormatChanged"))}; EditorUi.prototype.setPageScale=function(b){this.editor.graph.pageScale=b;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))};EditorUi.prototype.setGridColor=function(b){this.editor.graph.view.gridColor=b;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))}; EditorUi.prototype.addUndoListener=function(){var b=this.actions.get("undo"),e=this.actions.get("redo"),k=this.editor.undoManager,m=mxUtils.bind(this,function(){b.setEnabled(this.canUndo());e.setEnabled(this.canRedo())});k.addListener(mxEvent.ADD,m);k.addListener(mxEvent.UNDO,m);k.addListener(mxEvent.REDO,m);k.addListener(mxEvent.CLEAR,m);var C=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){C.apply(this,arguments);m()};var p=this.editor.graph.cellEditor.stopEditing; -this.editor.graph.cellEditor.stopEditing=function(E,K){p.apply(this,arguments);m()};m()}; +this.editor.graph.cellEditor.stopEditing=function(F,K){p.apply(this,arguments);m()};m()}; EditorUi.prototype.updateActionStates=function(){for(var b=this.editor.graph,e=this.getSelectionState(),k=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()),m="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded strokeColor sharp snapToGrid".split(" "),C=0;C<m.length;C++)this.actions.get(m[C]).setEnabled(0<e.cells.length); this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);this.actions.get("pasteSize").setEnabled(null!=this.copiedSize&&0<e.vertices.length);this.actions.get("pasteData").setEnabled(null!=this.copiedValue&&0<e.cells.length);this.actions.get("setAsDefaultStyle").setEnabled(1==b.getSelectionCount());this.actions.get("lockUnlock").setEnabled(!b.isSelectionEmpty());this.actions.get("bringForward").setEnabled(1==e.cells.length);this.actions.get("sendBackward").setEnabled(1== e.cells.length);this.actions.get("rotation").setEnabled(1==e.vertices.length);this.actions.get("wordWrap").setEnabled(1==e.vertices.length);this.actions.get("autosize").setEnabled(1==e.vertices.length);this.actions.get("copySize").setEnabled(1==e.vertices.length);this.actions.get("clearWaypoints").setEnabled(e.connections);this.actions.get("curved").setEnabled(0<e.edges.length);this.actions.get("turn").setEnabled(0<e.cells.length);this.actions.get("group").setEnabled(!e.row&&!e.cell&&(1<e.cells.length|| @@ -2217,10 +2215,10 @@ this.actions.get("exitGroup").setEnabled(null!=b.view.currentRoot);this.actions. this.actions.get("selectAll").setEnabled(k);this.actions.get("selectNone").setEnabled(k);m=1==e.vertices.length&&b.isCellFoldable(e.vertices[0]);this.actions.get("expand").setEnabled(m);this.actions.get("collapse").setEnabled(m);this.menus.get("navigation").setEnabled(0<e.cells.length||null!=b.view.currentRoot);this.menus.get("layout").setEnabled(k);this.menus.get("insert").setEnabled(k);this.menus.get("direction").setEnabled(e.unlocked&&1==e.vertices.length);this.menus.get("distribute").setEnabled(e.unlocked&& 1<e.vertices.length);this.menus.get("align").setEnabled(e.unlocked&&0<e.cells.length);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset}; EditorUi.prototype.refresh=function(b){b=null!=b?b:!0;var e=this.container.clientWidth,k=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,k=document.documentElement.clientHeight);var m=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(m=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var C=Math.max(0,Math.min(this.hsplitPosition, -e-this.splitSize-20));e=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",e+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",e+=this.toolbarHeight);0<e&&(e+=1);var p=0;if(null!=this.sidebarFooterContainer){var E=this.footerHeight+m;p=Math.max(0,Math.min(k-e-E,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=C+"px";this.sidebarFooterContainer.style.height= -p+"px";this.sidebarFooterContainer.style.bottom=E+"px"}k=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=e+"px";this.sidebarContainer.style.width=C+"px";this.formatContainer.style.top=e+"px";this.formatContainer.style.width=k+"px";this.formatContainer.style.display=null!=this.format?"":"none";E=this.getDiagramContainerOffset();var K=null!=this.hsplit.parentNode?C+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top; +e-this.splitSize-20));e=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",e+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",e+=this.toolbarHeight);0<e&&(e+=1);var p=0;if(null!=this.sidebarFooterContainer){var F=this.footerHeight+m;p=Math.max(0,Math.min(k-e-F,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=C+"px";this.sidebarFooterContainer.style.height= +p+"px";this.sidebarFooterContainer.style.bottom=F+"px"}k=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=e+"px";this.sidebarContainer.style.width=C+"px";this.formatContainer.style.top=e+"px";this.formatContainer.style.width=k+"px";this.formatContainer.style.display=null!=this.format?"":"none";F=this.getDiagramContainerOffset();var K=null!=this.hsplit.parentNode?C+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top; this.hsplit.style.bottom=this.footerHeight+m+"px";this.hsplit.style.left=C+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=K+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=m+"px");C=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+m+"px",this.tabContainer.style.right=k+"px",C=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+p+m+"px";this.formatContainer.style.bottom= -this.footerHeight+m+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=K+E.x+"px",this.diagramContainer.style.top=e+E.y+"px",this.diagramContainer.style.right=k+"px",this.diagramContainer.style.bottom=this.footerHeight+m+C+"px");b&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null}; +this.footerHeight+m+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=K+F.x+"px",this.diagramContainer.style.top=e+F.y+"px",this.diagramContainer.style.right=k+"px",this.diagramContainer.style.bottom=this.footerHeight+m+C+"px");b&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null}; EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand")); this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom= "0px";this.footerContainer.style.zIndex=mxPopupMenu.prototype.zIndex-3;this.hsplit.style.width=this.splitSize+"px";if(this.sidebarFooterContainer=this.createSidebarFooterContainer())this.sidebarFooterContainer.style.left="0px";this.editor.chromeless?this.diagramContainer.style.border="none":this.tabContainer=this.createTabContainer()}; @@ -2231,19 +2229,19 @@ this.container.appendChild(this.sidebarFooterContainer);this.container.appendChi !0,0,mxUtils.bind(this,function(e){this.hsplitPosition=e;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geItem geStatus";return b};EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=b;0==this.statusContainer.getElementsByTagName("div").length&&(this.statusContainer.innerText="",b=this.createStatusDiv(b),this.statusContainer.appendChild(b))}; EditorUi.prototype.createStatusDiv=function(b){var e=document.createElement("div");e.setAttribute("title",b);e.innerHTML=b;return e};EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")}; EditorUi.prototype.createDiv=function(b){var e=document.createElement("div");e.className=b;return e}; -EditorUi.prototype.addSplitHandler=function(b,e,k,m){function C(g){if(null!=E){var x=new mxPoint(mxEvent.getClientX(g),mxEvent.getClientY(g));m(Math.max(0,K+(e?x.x-E.x:E.y-x.y)-k));mxEvent.consume(g);K!=f()&&(Q=!0,d=null)}}function p(g){C(g);E=K=null}var E=null,K=null,Q=!0,d=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var f=mxUtils.bind(this,function(){var g=parseInt(e?b.style.left:b.style.bottom);e||(g=g+k-this.footerHeight);return g});mxEvent.addGestureListeners(b,function(g){E=new mxPoint(mxEvent.getClientX(g), -mxEvent.getClientY(g));K=f();Q=!1;mxEvent.consume(g)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(g){if(!Q&&this.hsplitClickEnabled){var x=null!=d?d-k:0;d=f();m(x);mxEvent.consume(g)}}));mxEvent.addGestureListeners(document,null,C,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,C,p)})}; +EditorUi.prototype.addSplitHandler=function(b,e,k,m){function C(g){if(null!=F){var x=new mxPoint(mxEvent.getClientX(g),mxEvent.getClientY(g));m(Math.max(0,K+(e?x.x-F.x:F.y-x.y)-k));mxEvent.consume(g);K!=f()&&(P=!0,d=null)}}function p(g){C(g);F=K=null}var F=null,K=null,P=!0,d=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var f=mxUtils.bind(this,function(){var g=parseInt(e?b.style.left:b.style.bottom);e||(g=g+k-this.footerHeight);return g});mxEvent.addGestureListeners(b,function(g){F=new mxPoint(mxEvent.getClientX(g), +mxEvent.getClientY(g));K=f();P=!1;mxEvent.consume(g)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(g){if(!P&&this.hsplitClickEnabled){var x=null!=d?d-k:0;d=f();m(x);mxEvent.consume(g)}}));mxEvent.addGestureListeners(document,null,C,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,C,p)})}; EditorUi.prototype.prompt=function(b,e,k){b=new FilenameDialog(this,e,mxResources.get("apply"),function(m){k(parseFloat(m))},b);this.showDialog(b.container,300,80,!0,!0);b.init()}; EditorUi.prototype.handleError=function(b,e,k,m,C){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=e){C=mxUtils.htmlEntities(mxResources.get("unknownError"));var p=mxResources.get("ok");e=null!=e?e:mxResources.get("error");null!=b&&null!=b.message&&(C=mxUtils.htmlEntities(b.message));this.showError(e,C,p,k,null,null,null,null,null,null,null,null,m?k:null)}else null!=k&&k()}; -EditorUi.prototype.showError=function(b,e,k,m,C,p,E,K,Q,d,f,g,x){b=new ErrorDialog(this,b,e,k||mxResources.get("ok"),m,C,p,E,g,K,Q);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,d||340,f||100+20*e,!0,!1,x);b.init()};EditorUi.prototype.showDialog=function(b,e,k,m,C,p,E,K,Q,d){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,k,m,C,p,E,K,Q,d);this.dialogs.push(this.dialog)}; +EditorUi.prototype.showError=function(b,e,k,m,C,p,F,K,P,d,f,g,x){b=new ErrorDialog(this,b,e,k||mxResources.get("ok"),m,C,p,F,g,K,P);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,d||340,f||100+20*e,!0,!1,x);b.init()};EditorUi.prototype.showDialog=function(b,e,k,m,C,p,F,K,P,d){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,k,m,C,p,F,K,P,d);this.dialogs.push(this.dialog)}; EditorUi.prototype.hideDialog=function(b,e,k){null!=this.dialogs&&0<this.dialogs.length&&(null==k||k==this.dialog.container.firstChild)&&(k=this.dialogs.pop(),0==k.close(b,e)?this.dialogs.push(k):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea? -this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var e=b.getSelectionCells(),k=new mxDictionary,m=[],C=0;C<e.length;C++){var p=b.isTableCell(e[C])?b.model.getParent(e[C]):e[C];null==p||k.get(p)||(k.put(p,!0),m.push(p))}b.setSelectionCells(b.duplicateCells(m,!1))}catch(E){this.handleError(E)}}; +this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var e=b.getSelectionCells(),k=new mxDictionary,m=[],C=0;C<e.length;C++){var p=b.isTableCell(e[C])?b.model.getParent(e[C]):e[C];null==p||k.get(p)||(k.put(p,!0),m.push(p))}b.setSelectionCells(b.duplicateCells(m,!1))}catch(F){this.handleError(F)}}; EditorUi.prototype.pickColor=function(b,e){var k=this.editor.graph,m=k.cellEditor.saveSelection(),C=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,mxUtils.rgba2hex(b)||"none",function(p){k.cellEditor.restoreSelection(m);e(p)},function(){k.cellEditor.restoreSelection(m)});this.showDialog(b.container,230,C,!0,!1);b.init()}; EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})}; EditorUi.prototype.extractGraphModelFromHtml=function(b){var e=null;try{var k=b.indexOf("<mxGraphModel ");if(0<=k){var m=b.lastIndexOf("</mxGraphModel>");m>k&&(e=b.substring(k,m+21).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}}catch(C){}return e}; EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(e){null!=e?b(e):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(k){if(null!=k){var m=decodeURIComponent(k);this.isCompatibleString(m)&&(k=m)}b(k)}),"text")}),"html")}; -EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,e){navigator.clipboard.read().then(mxUtils.bind(this,function(k){if(null!=k&&0<k.length&&"html"==e&&0<=mxUtils.indexOf(k[0].types,"text/html"))k[0].getType("text/html").then(mxUtils.bind(this,function(m){m.text().then(mxUtils.bind(this,function(C){try{var p=this.parseHtmlData(C),E="text/plain"!=p.getAttribute("data-type")?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);try{var K=E.lastIndexOf("%3E"); -0<=K&&K<E.length-3&&(E=E.substring(0,K+3))}catch(f){}try{var Q=p.getElementsByTagName("span"),d=null!=Q&&0<Q.length?mxUtils.trim(decodeURIComponent(Q[0].textContent)):decodeURIComponent(E);this.isCompatibleString(d)&&(E=d)}catch(f){}}catch(f){}b(this.isCompatibleString(E)?E:null)}))["catch"](function(C){b(null)})}))["catch"](function(m){b(null)});else if(null!=k&&0<k.length&&"text"==e&&0<=mxUtils.indexOf(k[0].types,"text/plain"))k[0].getType("text/plain").then(function(m){m.text().then(function(C){b(C)})["catch"](function(){b(null)})})["catch"](function(){b(null)}); +EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,e){navigator.clipboard.read().then(mxUtils.bind(this,function(k){if(null!=k&&0<k.length&&"html"==e&&0<=mxUtils.indexOf(k[0].types,"text/html"))k[0].getType("text/html").then(mxUtils.bind(this,function(m){m.text().then(mxUtils.bind(this,function(C){try{var p=this.parseHtmlData(C),F="text/plain"!=p.getAttribute("data-type")?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);try{var K=F.lastIndexOf("%3E"); +0<=K&&K<F.length-3&&(F=F.substring(0,K+3))}catch(f){}try{var P=p.getElementsByTagName("span"),d=null!=P&&0<P.length?mxUtils.trim(decodeURIComponent(P[0].textContent)):decodeURIComponent(F);this.isCompatibleString(d)&&(F=d)}catch(f){}}catch(f){}b(this.isCompatibleString(F)?F:null)}))["catch"](function(C){b(null)})}))["catch"](function(m){b(null)});else if(null!=k&&0<k.length&&"text"==e&&0<=mxUtils.indexOf(k[0].types,"text/plain"))k[0].getType("text/plain").then(function(m){m.text().then(function(C){b(C)})["catch"](function(){b(null)})})["catch"](function(){b(null)}); else b(null)}))["catch"](function(k){b(null)})}; EditorUi.prototype.parseHtmlData=function(b){var e=null;if(null!=b&&0<b.length){var k="<meta "==b.substring(0,6);e=document.createElement("div");e.innerHTML=(k?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(b);asHtml=!0;b=e.getElementsByTagName("style");if(null!=b)for(;0<b.length;)b[0].parentNode.removeChild(b[0]);null!=e.firstChild&&e.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=e.firstChild.nextSibling&&e.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"== e.firstChild.nodeName&&"A"==e.firstChild.nextSibling.nodeName&&null==e.firstChild.nextSibling.nextSibling&&(b=null==e.firstChild.nextSibling.innerText?mxUtils.getTextContent(e.firstChild.nextSibling):e.firstChild.nextSibling.innerText,b==e.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(e,b),asHtml=!1));k=k&&null!=e.firstChild?e.firstChild.nextSibling:e.firstChild;null!=k&&null==k.nextSibling&&k.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==k.nodeName?(b=k.getAttribute("src"), @@ -2254,18 +2252,18 @@ EditorUi.prototype.save=function(b){if(null!=b){this.editor.graph.isEditing()&&t "_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(e);return}this.editor.setModified(!1);this.editor.setFilename(b);this.updateDocumentTitle()}catch(k){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}}; EditorUi.prototype.executeLayouts=function(b,e){this.executeLayout(mxUtils.bind(this,function(){var k=new mxCompositeLayout(this.editor.graph,b),m=this.editor.graph.getSelectionCells();k.execute(this.editor.graph.getDefaultParent(),0==m.length?null:m)}),!0,e)}; EditorUi.prototype.executeLayout=function(b,e,k){var m=this.editor.graph;m.getModel().beginUpdate();try{b()}catch(C){throw C;}finally{this.allowAnimation&&e&&m.isEnabled()?(b=new mxMorphing(m),b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){m.getModel().endUpdate();null!=k&&k()})),b.startAnimation()):(m.getModel().endUpdate(),null!=k&&k())}}; -EditorUi.prototype.showImageDialog=function(b,e,k,m){m=this.editor.graph.cellEditor;var C=m.saveSelection(),p=mxUtils.prompt(b,e);m.restoreSelection(C);if(null!=p&&0<p.length){var E=new Image;E.onload=function(){k(p,E.width,E.height)};E.onerror=function(){k(null);mxUtils.alert(mxResources.get("fileNotFound"))};E.src=p}else k(null)};EditorUi.prototype.showLinkDialog=function(b,e,k){b=new LinkDialog(this,b,e,k);this.showDialog(b.container,420,90,!0,!0);b.init()}; +EditorUi.prototype.showImageDialog=function(b,e,k,m){m=this.editor.graph.cellEditor;var C=m.saveSelection(),p=mxUtils.prompt(b,e);m.restoreSelection(C);if(null!=p&&0<p.length){var F=new Image;F.onload=function(){k(p,F.width,F.height)};F.onerror=function(){k(null);mxUtils.alert(mxResources.get("fileNotFound"))};F.src=p}else k(null)};EditorUi.prototype.showLinkDialog=function(b,e,k){b=new LinkDialog(this,b,e,k);this.showDialog(b.container,420,90,!0,!0);b.init()}; EditorUi.prototype.showDataDialog=function(b){null!=b&&(b=new EditDataDialog(this,b),this.showDialog(b.container,480,420,!0,!1,null,!1),b.init())}; EditorUi.prototype.showBackgroundImageDialog=function(b,e){b=null!=b?b:mxUtils.bind(this,function(m){m=new ChangePageSetup(this,null,m);m.ignoreColor=!0;this.editor.graph.model.execute(m)});var k=mxUtils.prompt(mxResources.get("backgroundImage"),null!=e?e.src:"");null!=k&&0<k.length?(e=new Image,e.onload=function(){b(new mxImage(k,e.width,e.height),!1)},e.onerror=function(){b(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},e.src=k):b(null)}; EditorUi.prototype.setBackgroundImage=function(b){this.editor.graph.setBackgroundImage(b);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(b,e,k){mxUtils.confirm(b)?null!=e&&e():null!=k&&k()};EditorUi.prototype.createOutline=function(b){var e=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){e.update(!1)});return e}; EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize",66:"copyData",69:"pasteData"}; -EditorUi.prototype.createKeyHandler=function(b){function e(g,x,z){if(!m.isSelectionEmpty()&&m.isEnabled()){x=null!=x?x:1;var u=m.getCompositeParents(m.getSelectionCells()),H=0<u.length?u[0]:null;if(null!=H)if(z){m.getModel().beginUpdate();try{for(H=0;H<u.length;H++)if(m.getModel().isVertex(u[H])&&m.isCellResizable(u[H])){var J=m.getCellGeometry(u[H]);null!=J&&(J=J.clone(),37==g?J.width=Math.max(0,J.width-x):38==g?J.height=Math.max(0,J.height-x):39==g?J.width+=x:40==g&&(J.height+=x),m.getModel().setGeometry(u[H], -J))}}finally{m.getModel().endUpdate()}}else{J=m.model.getParent(H);var D=m.getView().scale;z=null;1==m.getSelectionCount()&&m.model.isVertex(H)&&null!=m.layoutManager&&!m.isCellLocked(H)&&(z=m.layoutManager.getLayout(J));if(null!=z&&z.constructor==mxStackLayout)x=J.getIndex(H),37==g||38==g?m.model.add(J,H,Math.max(0,x-1)):(39==g||40==g)&&m.model.add(J,H,Math.min(m.model.getChildCount(J),x+1));else{var G=m.graphHandler;null!=G&&(null==G.first&&G.start(H,0,0,u),null!=G.first&&(H=u=0,37==g?u=-x:38== -g?H=-x:39==g?u=x:40==g&&(H=x),G.currentDx+=u*D,G.currentDy+=H*D,G.checkPreview(),G.updatePreview()),null!=E&&window.clearTimeout(E),E=window.setTimeout(function(){if(null!=G.first){var V=G.roundLength(G.currentDx/D),U=G.roundLength(G.currentDy/D);G.moveCells(G.cells,V,U);G.reset()}},400))}}}}var k=this,m=this.editor.graph,C=new mxKeyHandler(m),p=C.isEventIgnored;C.isEventIgnored=function(g){return!(mxEvent.isShiftDown(g)&&9==g.keyCode)&&(!this.isControlDown(g)||mxEvent.isShiftDown(g)||90!=g.keyCode&& -89!=g.keyCode&&188!=g.keyCode&&190!=g.keyCode&&85!=g.keyCode)&&(66!=g.keyCode&&73!=g.keyCode||!this.isControlDown(g)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};C.isEnabledForEvent=function(g){return!mxEvent.isConsumed(g)&&this.isGraphEvent(g)&&this.isEnabled()&&(null==k.dialogs||0==k.dialogs.length)};C.isControlDown=function(g){return mxEvent.isControlDown(g)||mxClient.IS_MAC&&g.metaKey};var E=null,K={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH, -39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},Q=C.getFunction;mxKeyHandler.prototype.getFunction=function(g){if(m.isEnabled()){if(mxEvent.isShiftDown(g)&&mxEvent.isAltDown(g)){var x=k.actions.get(k.altShiftActions[g.keyCode]);if(null!=x)return x.funct}if(null!=K[g.keyCode]&&!m.isSelectionEmpty())if(!this.isControlDown(g)&&mxEvent.isShiftDown(g)&&mxEvent.isAltDown(g)){if(m.model.isVertex(m.getSelectionCell()))return function(){var z=m.connectVertex(m.getSelectionCell(),K[g.keyCode], -m.defaultEdgeLength,g,!0);null!=z&&0<z.length&&(1==z.length&&m.model.isEdge(z[0])?m.setSelectionCell(m.model.getTerminal(z[0],!1)):m.setSelectionCell(z[z.length-1]),m.scrollCellToVisible(m.getSelectionCell()),null!=k.hoverIcons&&k.hoverIcons.update(m.view.getState(m.getSelectionCell())))}}else return this.isControlDown(g)?function(){e(g.keyCode,mxEvent.isShiftDown(g)?m.gridSize:null,!0)}:function(){e(g.keyCode,mxEvent.isShiftDown(g)?m.gridSize:null)}}return Q.apply(this,arguments)};C.bindAction=mxUtils.bind(this, -function(g,x,z,u){var H=this.actions.get(z);null!=H&&(z=function(){H.isEnabled()&&H.funct.apply(this,arguments)},x?u?C.bindControlShiftKey(g,z):C.bindControlKey(g,z):u?C.bindShiftKey(g,z):C.bindKey(g,z))});var d=this,f=C.escape;C.escape=function(g){f.apply(this,arguments)};C.enter=function(){};C.bindControlShiftKey(36,function(){m.exitGroup()});C.bindControlShiftKey(35,function(){m.enterGroup()});C.bindShiftKey(36,function(){m.home()});C.bindKey(35,function(){m.refresh()});C.bindAction(107,!0,"zoomIn"); +EditorUi.prototype.createKeyHandler=function(b){function e(g,x,y){if(!m.isSelectionEmpty()&&m.isEnabled()){x=null!=x?x:1;var u=m.getCompositeParents(m.getSelectionCells()),H=0<u.length?u[0]:null;if(null!=H)if(y){m.getModel().beginUpdate();try{for(H=0;H<u.length;H++)if(m.getModel().isVertex(u[H])&&m.isCellResizable(u[H])){var J=m.getCellGeometry(u[H]);null!=J&&(J=J.clone(),37==g?J.width=Math.max(0,J.width-x):38==g?J.height=Math.max(0,J.height-x):39==g?J.width+=x:40==g&&(J.height+=x),m.getModel().setGeometry(u[H], +J))}}finally{m.getModel().endUpdate()}}else{J=m.model.getParent(H);var D=m.getView().scale;y=null;1==m.getSelectionCount()&&m.model.isVertex(H)&&null!=m.layoutManager&&!m.isCellLocked(H)&&(y=m.layoutManager.getLayout(J));if(null!=y&&y.constructor==mxStackLayout)x=J.getIndex(H),37==g||38==g?m.model.add(J,H,Math.max(0,x-1)):(39==g||40==g)&&m.model.add(J,H,Math.min(m.model.getChildCount(J),x+1));else{var G=m.graphHandler;null!=G&&(null==G.first&&G.start(H,0,0,u),null!=G.first&&(H=u=0,37==g?u=-x:38== +g?H=-x:39==g?u=x:40==g&&(H=x),G.currentDx+=u*D,G.currentDy+=H*D,G.checkPreview(),G.updatePreview()),null!=F&&window.clearTimeout(F),F=window.setTimeout(function(){if(null!=G.first){var W=G.roundLength(G.currentDx/D),T=G.roundLength(G.currentDy/D);G.moveCells(G.cells,W,T);G.reset()}},400))}}}}var k=this,m=this.editor.graph,C=new mxKeyHandler(m),p=C.isEventIgnored;C.isEventIgnored=function(g){return!(mxEvent.isShiftDown(g)&&9==g.keyCode)&&(!this.isControlDown(g)||mxEvent.isShiftDown(g)||90!=g.keyCode&& +89!=g.keyCode&&188!=g.keyCode&&190!=g.keyCode&&85!=g.keyCode)&&(66!=g.keyCode&&73!=g.keyCode||!this.isControlDown(g)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};C.isEnabledForEvent=function(g){return!mxEvent.isConsumed(g)&&this.isGraphEvent(g)&&this.isEnabled()&&(null==k.dialogs||0==k.dialogs.length)};C.isControlDown=function(g){return mxEvent.isControlDown(g)||mxClient.IS_MAC&&g.metaKey};var F=null,K={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH, +39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},P=C.getFunction;mxKeyHandler.prototype.getFunction=function(g){if(m.isEnabled()){if(mxEvent.isShiftDown(g)&&mxEvent.isAltDown(g)){var x=k.actions.get(k.altShiftActions[g.keyCode]);if(null!=x)return x.funct}if(null!=K[g.keyCode]&&!m.isSelectionEmpty())if(!this.isControlDown(g)&&mxEvent.isShiftDown(g)&&mxEvent.isAltDown(g)){if(m.model.isVertex(m.getSelectionCell()))return function(){var y=m.connectVertex(m.getSelectionCell(),K[g.keyCode], +m.defaultEdgeLength,g,!0);null!=y&&0<y.length&&(1==y.length&&m.model.isEdge(y[0])?m.setSelectionCell(m.model.getTerminal(y[0],!1)):m.setSelectionCell(y[y.length-1]),m.scrollCellToVisible(m.getSelectionCell()),null!=k.hoverIcons&&k.hoverIcons.update(m.view.getState(m.getSelectionCell())))}}else return this.isControlDown(g)?function(){e(g.keyCode,mxEvent.isShiftDown(g)?m.gridSize:null,!0)}:function(){e(g.keyCode,mxEvent.isShiftDown(g)?m.gridSize:null)}}return P.apply(this,arguments)};C.bindAction=mxUtils.bind(this, +function(g,x,y,u){var H=this.actions.get(y);null!=H&&(y=function(){H.isEnabled()&&H.funct.apply(this,arguments)},x?u?C.bindControlShiftKey(g,y):C.bindControlKey(g,y):u?C.bindShiftKey(g,y):C.bindKey(g,y))});var d=this,f=C.escape;C.escape=function(g){f.apply(this,arguments)};C.enter=function(){};C.bindControlShiftKey(36,function(){m.exitGroup()});C.bindControlShiftKey(35,function(){m.enterGroup()});C.bindShiftKey(36,function(){m.home()});C.bindKey(35,function(){m.refresh()});C.bindAction(107,!0,"zoomIn"); C.bindAction(109,!0,"zoomOut");C.bindAction(80,!0,"print");C.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)C.bindControlKey(36,function(){m.isEnabled()&&m.foldCells(!0)}),C.bindControlKey(35,function(){m.isEnabled()&&m.foldCells(!1)}),C.bindControlKey(13,function(){d.ctrlEnter()}),C.bindAction(8,!1,"delete"),C.bindAction(8,!0,"deleteAll"),C.bindAction(8,!1,"deleteLabels",!0),C.bindAction(46,!1,"delete"),C.bindAction(46,!0,"deleteAll"),C.bindAction(46,!1,"deleteLabels", !0),C.bindAction(36,!1,"resetView"),C.bindAction(72,!0,"fitWindow",!0),C.bindAction(74,!0,"fitPage"),C.bindAction(74,!0,"fitTwoPages",!0),C.bindAction(48,!0,"customZoom"),C.bindAction(82,!0,"turn"),C.bindAction(82,!0,"clearDefaultStyle",!0),C.bindAction(83,!0,"save"),C.bindAction(83,!0,"saveAs",!0),C.bindAction(65,!0,"selectAll"),C.bindAction(65,!0,"selectNone",!0),C.bindAction(73,!0,"selectVertices",!0),C.bindAction(69,!0,"selectEdges",!0),C.bindAction(69,!0,"editStyle"),C.bindAction(66,!0,"bold"), C.bindAction(66,!0,"toBack",!0),C.bindAction(70,!0,"toFront",!0),C.bindAction(68,!0,"duplicate"),C.bindAction(68,!0,"setAsDefaultStyle",!0),C.bindAction(90,!0,"undo"),C.bindAction(89,!0,"autosize",!0),C.bindAction(88,!0,"cut"),C.bindAction(67,!0,"copy"),C.bindAction(86,!0,"paste"),C.bindAction(71,!0,"group"),C.bindAction(77,!0,"editData"),C.bindAction(71,!0,"grid",!0),C.bindAction(73,!0,"italic"),C.bindAction(76,!0,"lockUnlock"),C.bindAction(76,!0,"layers",!0),C.bindAction(80,!0,"formatPanel",!0), @@ -2275,50 +2273,50 @@ null!=this.editor&&(this.editor.destroy(),this.editor=null);null!=this.menubar&& this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.removeListener(window,"resize",this.resizeHandler),this.resizeHandler=null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null);null!=this.orientationChangeHandler&&(mxEvent.removeListener(window,"orientationchange",this.orientationChangeHandler),this.orientationChangeHandler=null);null!=this.scrollHandler&&(mxEvent.removeListener(window,"scroll",this.scrollHandler), this.scrollHandler=null);if(null!=this.destroyFunctions){for(b=0;b<this.destroyFunctions.length;b++)this.destroyFunctions[b]();this.destroyFunctions=null}var e=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog];for(b=0;b<e.length;b++)null!=e[b]&&null!=e[b].parentNode&&e[b].parentNode.removeChild(e[b])};(function(){var b=[["nbsp","160"],["shy","173"]],e=mxUtils.parseXml;mxUtils.parseXml=function(k){for(var m=0;m<b.length;m++)k=k.replace(new RegExp("&"+b[m][0]+";","g"),"&#"+b[m][1]+";");return e(k)}})(); Date.prototype.toISOString||function(){function b(e){e=String(e);1===e.length&&(e="0"+e);return e}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()}); -Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,e=function(m){return"function"===typeof m||"[object Function]"===b.call(m)},k=Math.pow(2,53)-1;return function(m){var C=Object(m);if(null==m)throw new TypeError("Array.from requires an array-like object - not null or undefined");var p=1<arguments.length?arguments[1]:void 0,E;if("undefined"!==typeof p){if(!e(p))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(E= -arguments[2])}var K=Number(C.length);K=isNaN(K)?0:0!==K&&isFinite(K)?(0<K?1:-1)*Math.floor(Math.abs(K)):K;K=Math.min(Math.max(K,0),k);for(var Q=e(this)?Object(new this(K)):Array(K),d=0,f;d<K;)f=C[d],Q[d]=p?"undefined"===typeof E?p(f,d):p.call(E,f,d):f,d+=1;Q.length=K;return Q}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000"; +Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,e=function(m){return"function"===typeof m||"[object Function]"===b.call(m)},k=Math.pow(2,53)-1;return function(m){var C=Object(m);if(null==m)throw new TypeError("Array.from requires an array-like object - not null or undefined");var p=1<arguments.length?arguments[1]:void 0,F;if("undefined"!==typeof p){if(!e(p))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(F= +arguments[2])}var K=Number(C.length);K=isNaN(K)?0:0!==K&&isFinite(K)?(0<K?1:-1)*Math.floor(Math.abs(K)):K;K=Math.min(Math.max(K,0),k);for(var P=e(this)?Object(new this(K)):Array(K),d=0,f;d<K;)f=C[d],P[d]=p?"undefined"===typeof F?p(f,d):p.call(F,f,d):f,d+=1;P.length=K;return P}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000"; mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1; (function(){try{if(null!=navigator&&null!=navigator.language){var b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(e){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1; mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS; mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(b,e,k){return null}; mxImageShape.prototype.getImageDataUri=function(){var b=this.image;if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b,!0),this.clippedImage=b;b=this.clippedSvg}return b}; -Graph=function(b,e,k,m,C,p){mxGraph.call(this,b,e,k,m);this.themes=C||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(L){L=this.getCurrentCellStyle(L); -return null!=L?"1"==L.html||"wrap"==L[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var E=null,K=null,Q=null,d=null,f=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(L,Z){if("mouseDown"==Z.getProperty("eventName")&&this.isEnabled()){L=Z.getProperty("event");var P=L.getState();Z=this.view.scale;if(!mxEvent.isAltDown(L.getEvent())&&null!=P)if(this.model.isEdge(P.cell))if(E=new mxPoint(L.getGraphX(),L.getGraphY()),f=this.isCellSelected(P.cell),Q=P,K=L,null!=P.text&&null!= -P.text.boundingBox&&mxUtils.contains(P.text.boundingBox,L.getGraphX(),L.getGraphY()))d=mxEvent.LABEL_HANDLE;else{var ca=this.selectionCellsHandler.getHandler(P.cell);null!=ca&&null!=ca.bends&&0<ca.bends.length&&(d=ca.getHandleForEvent(L))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(L.getEvent())&&(ca=this.selectionCellsHandler.getHandler(P.cell),null==ca||null==ca.getHandleForEvent(L))){var ja=new mxRectangle(L.getGraphX()-1,L.getGraphY()-1),ka=mxEvent.isTouchEvent(L.getEvent())? -mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;ca=ka+2;ja.grow(ka);if(this.isTableCell(P.cell)&&!this.isCellSelected(P.cell)&&!(mxUtils.contains(P,L.getGraphX()-ca,L.getGraphY()-ca)&&mxUtils.contains(P,L.getGraphX()-ca,L.getGraphY()+ca)&&mxUtils.contains(P,L.getGraphX()+ca,L.getGraphY()+ca)&&mxUtils.contains(P,L.getGraphX()+ca,L.getGraphY()-ca))){var q=this.model.getParent(P.cell);ca=this.model.getParent(q);if(!this.isCellSelected(ca)){ka*=Z;var F=2*ka;if(this.model.getChildAt(ca, -0)!=q&&mxUtils.intersects(ja,new mxRectangle(P.x,P.y-ka,P.width,F))||this.model.getChildAt(q,0)!=P.cell&&mxUtils.intersects(ja,new mxRectangle(P.x-ka,P.y,F,P.height))||mxUtils.intersects(ja,new mxRectangle(P.x,P.y+P.height-ka,P.width,F))||mxUtils.intersects(ja,new mxRectangle(P.x+P.width-ka,P.y,F,P.height)))q=this.selectionCellsHandler.isHandled(ca),this.selectCellForEvent(ca,L.getEvent()),ca=this.selectionCellsHandler.getHandler(ca),null!=ca&&(ka=ca.getHandleForEvent(L),null!=ka&&(ca.start(L.getGraphX(), -L.getGraphY(),ka),ca.blockDelayedSelection=!q,L.consume()))}}for(;!L.isConsumed()&&null!=P&&(this.isTableCell(P.cell)||this.isTableRow(P.cell)||this.isTable(P.cell));)this.isSwimlane(P.cell)&&(ca=this.getActualStartSize(P.cell),(0<ca.x||0<ca.width)&&mxUtils.intersects(ja,new mxRectangle(P.x+(ca.x-ca.width-1)*Z+(0==ca.x?P.width:0),P.y,1,P.height))||(0<ca.y||0<ca.height)&&mxUtils.intersects(ja,new mxRectangle(P.x,P.y+(ca.y-ca.height-1)*Z+(0==ca.y?P.height:0),P.width,1)))&&(this.selectCellForEvent(P.cell, -L.getEvent()),ca=this.selectionCellsHandler.getHandler(P.cell),null!=ca&&(ka=mxEvent.CUSTOM_HANDLE-ca.customHandles.length+1,ca.start(L.getGraphX(),L.getGraphY(),ka),L.consume())),P=this.view.getState(this.model.getParent(P.cell))}}}));this.addMouseListener({mouseDown:function(L,Z){},mouseMove:mxUtils.bind(this,function(L,Z){L=this.selectionCellsHandler.handlers.map;for(var P in L)if(null!=L[P].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(Z.getEvent())){var ca= -this.tolerance;if(null!=E&&null!=Q&&null!=K){if(P=Q,Math.abs(E.x-Z.getGraphX())>ca||Math.abs(E.y-Z.getGraphY())>ca){var ja=this.selectionCellsHandler.getHandler(P.cell);null==ja&&this.model.isEdge(P.cell)&&(ja=this.createHandler(P));if(null!=ja&&null!=ja.bends&&0<ja.bends.length){L=ja.getHandleForEvent(K);var ka=this.view.getEdgeStyle(P);ca=ka==mxEdgeStyle.EntityRelation;f||d!=mxEvent.LABEL_HANDLE||(L=d);if(ca&&0!=L&&L!=ja.bends.length-1&&L!=mxEvent.LABEL_HANDLE)!ca||null==P.visibleSourceState&&null== -P.visibleTargetState||(this.graphHandler.reset(),Z.consume());else if(L==mxEvent.LABEL_HANDLE||0==L||null!=P.visibleSourceState||L==ja.bends.length-1||null!=P.visibleTargetState)ca||L==mxEvent.LABEL_HANDLE||(ca=P.absolutePoints,null!=ca&&(null==ka&&null==L||ka==mxEdgeStyle.OrthConnector)&&(L=d,null==L&&(L=new mxRectangle(E.x,E.y),L.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(L,ca[0].x,ca[0].y)?L=0:mxUtils.contains(L,ca[ca.length-1].x,ca[ca.length-1].y)?L=ja.bends.length-1:null!= -ka&&(2==ca.length||3==ca.length&&(0==Math.round(ca[0].x-ca[1].x)&&0==Math.round(ca[1].x-ca[2].x)||0==Math.round(ca[0].y-ca[1].y)&&0==Math.round(ca[1].y-ca[2].y)))?L=2:(L=mxUtils.findNearestSegment(P,E.x,E.y),L=null==ka?mxEvent.VIRTUAL_HANDLE-L:L+1))),null==L&&(L=mxEvent.VIRTUAL_HANDLE)),ja.start(Z.getGraphX(),Z.getGraphX(),L),Z.consume(),this.graphHandler.reset()}null!=ja&&(this.selectionCellsHandler.isHandlerActive(ja)?this.isCellSelected(P.cell)||(this.selectionCellsHandler.handlers.put(P.cell, -ja),this.selectCellForEvent(P.cell,Z.getEvent())):this.isCellSelected(P.cell)||ja.destroy());f=!1;E=K=Q=d=null}}else if(P=Z.getState(),null!=P&&this.isCellEditable(P.cell)){ja=null;if(this.model.isEdge(P.cell)){if(L=new mxRectangle(Z.getGraphX(),Z.getGraphY()),L.grow(mxEdgeHandler.prototype.handleImage.width/2),ca=P.absolutePoints,null!=ca)if(null!=P.text&&null!=P.text.boundingBox&&mxUtils.contains(P.text.boundingBox,Z.getGraphX(),Z.getGraphY()))ja="move";else if(mxUtils.contains(L,ca[0].x,ca[0].y)|| -mxUtils.contains(L,ca[ca.length-1].x,ca[ca.length-1].y))ja="pointer";else if(null!=P.visibleSourceState||null!=P.visibleTargetState)L=this.view.getEdgeStyle(P),ja="crosshair",L!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(P)&&(Z=mxUtils.findNearestSegment(P,Z.getGraphX(),Z.getGraphY()),Z<ca.length-1&&0<=Z&&(ja=0==Math.round(ca[Z].x-ca[Z+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(Z.getEvent())){ca=mxShape.prototype.svgStrokeTolerance/2;L=new mxRectangle(Z.getGraphX(),Z.getGraphY()); -L.grow(ca);if(this.isTableCell(P.cell)&&(Z=this.model.getParent(P.cell),ca=this.model.getParent(Z),!this.isCellSelected(ca)))if(mxUtils.intersects(L,new mxRectangle(P.x,P.y-2,P.width,4))&&this.model.getChildAt(ca,0)!=Z||mxUtils.intersects(L,new mxRectangle(P.x,P.y+P.height-2,P.width,4)))ja="row-resize";else if(mxUtils.intersects(L,new mxRectangle(P.x-2,P.y,4,P.height))&&this.model.getChildAt(Z,0)!=P.cell||mxUtils.intersects(L,new mxRectangle(P.x+P.width-2,P.y,4,P.height)))ja="col-resize";for(Z=P;null== -ja&&null!=Z&&(this.isTableCell(Z.cell)||this.isTableRow(Z.cell)||this.isTable(Z.cell));)this.isSwimlane(Z.cell)&&(ca=this.getActualStartSize(Z.cell),ka=this.view.scale,(0<ca.x||0<ca.width)&&mxUtils.intersects(L,new mxRectangle(Z.x+(ca.x-ca.width-1)*ka+(0==ca.x?Z.width*ka:0),Z.y,1,Z.height))?ja="col-resize":(0<ca.y||0<ca.height)&&mxUtils.intersects(L,new mxRectangle(Z.x,Z.y+(ca.y-ca.height-1)*ka+(0==ca.y?Z.height:0),Z.width,1))&&(ja="row-resize")),Z=this.view.getState(this.model.getParent(Z.cell))}null!= -ja&&P.setCursor(ja)}}}),mouseUp:mxUtils.bind(this,function(L,Z){d=E=K=Q=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(L){var Z=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);L.view.graph.isHtmlLabel(L.cell)&&(Z=1!=L.style.html?mxUtils.htmlEntities(Z,!1):L.view.graph.sanitizeHtml(Z));return Z};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0); -this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(L,Z){return!1};this.alternateEdgeStyle="vertical";null==m&&this.loadStylesheet();var g=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var L=g.apply(this,arguments); -if(this.graph.pageVisible){var Z=[],P=this.graph.pageFormat,ca=this.graph.pageScale,ja=P.width*ca;P=P.height*ca;ca=this.graph.view.translate;for(var ka=this.graph.view.scale,q=this.graph.getPageLayout(),F=0;F<q.width;F++)Z.push(new mxRectangle(((q.x+F)*ja+ca.x)*ka,(q.y*P+ca.y)*ka,ja*ka,P*ka));for(F=1;F<q.height;F++)Z.push(new mxRectangle((q.x*ja+ca.x)*ka,((q.y+F)*P+ca.y)*ka,ja*ka,P*ka));L=Z.concat(L)}return L};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor= -function(L,Z){return null==L.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(L){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var x=this.graphHandler.getCells;this.graphHandler.getCells=function(L){for(var Z=x.apply(this,arguments),P=new mxDictionary,ca=[],ja=0;ja<Z.length;ja++){var ka=this.graph.isTableCell(L)&&this.graph.isTableCell(Z[ja])&& -this.graph.isCellSelected(Z[ja])?this.graph.model.getParent(Z[ja]):this.graph.isTableRow(L)&&this.graph.isTableRow(Z[ja])&&this.graph.isCellSelected(Z[ja])?Z[ja]:this.graph.getCompositeParent(Z[ja]);null==ka||P.get(ka)||(P.put(ka,!0),ca.push(ka))}return ca};var z=this.graphHandler.start;this.graphHandler.start=function(L,Z,P,ca){var ja=!1;this.graph.isTableCell(L)&&(this.graph.isCellSelected(L)?ja=!0:L=this.graph.model.getParent(L));ja||this.graph.isTableRow(L)&&this.graph.isCellSelected(L)||(L=this.graph.getCompositeParent(L)); -z.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(L,Z){Z=this.graph.getCompositeParent(Z);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var u=new mxRubberband(this);this.getRubberband=function(){return u};var H=(new Date).getTime(),J=0,D=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var L=this.currentState;D.apply(this,arguments);L!=this.currentState?(H=(new Date).getTime(),J=0):J=(new Date).getTime()-H};var G= -this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(L){return mxEvent.isShiftDown(L.getEvent())&&mxEvent.isAltDown(L.getEvent())?!1:null!=this.currentState&&L.getState()==this.currentState&&2E3<J||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&G.apply(this,arguments)};var V=this.isToggleEvent;this.isToggleEvent=function(L){return V.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(L)};var U= -u.isForceRubberbandEvent;u.isForceRubberbandEvent=function(L){return U.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(L.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==L.getState()&&mxEvent.isTouchEvent(L.getEvent())};var Y=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(Y=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END, -mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=Y)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(L){return mxEvent.isMouseEvent(L.getEvent())};var O=this.click;this.click=function(L){var Z=null==L.state&&null!=L.sourceState&&this.isCellLocked(L.sourceState.cell);if(this.isEnabled()&&!Z||L.isConsumed())return O.apply(this,arguments);var P=Z?L.sourceState.cell:L.getCell();null!=P&&(P=this.getClickableLinkForCell(P),null!=P&&(this.isCustomLink(P)? -this.customLinkClicked(P):this.openLink(P)));this.isEnabled()&&Z&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(L){return L.sourceState};var qa=this.tooltipHandler.show;this.tooltipHandler.show=function(){qa.apply(this,arguments);if(null!=this.div)for(var L=this.div.getElementsByTagName("a"),Z=0;Z<L.length;Z++)null!=L[Z].getAttribute("href")&&null==L[Z].getAttribute("target")&&L[Z].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(L){return L.sourceState}; -this.getCursorForMouseEvent=function(L){var Z=null==L.state&&null!=L.sourceState&&this.isCellLocked(L.sourceState.cell);return this.getCursorForCell(Z?L.sourceState.cell:L.getCell())};var oa=this.getCursorForCell;this.getCursorForCell=function(L){if(!this.isEnabled()||this.isCellLocked(L)){if(null!=this.getClickableLinkForCell(L))return"pointer";if(this.isCellLocked(L))return"default"}return oa.apply(this,arguments)};this.selectRegion=function(L,Z){var P=mxEvent.isAltDown(Z)?L:null;L=this.getCells(L.x, -L.y,L.width,L.height,null,null,P,function(ca){return"1"==mxUtils.getValue(ca.style,"locked","0")},!0);if(this.isToggleEvent(Z))for(P=0;P<L.length;P++)this.selectCellForEvent(L[P],Z);else this.selectCellsForEvent(L,Z);return L};var aa=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(L,Z,P){return this.graph.isCellSelected(L)?!1:aa.apply(this,arguments)};this.isCellLocked=function(L){for(;null!=L;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(L), -"locked","0"))return!0;L=this.model.getParent(L)}return!1};var da=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(L,Z){"mouseDown"==Z.getProperty("eventName")&&(L=Z.getProperty("event").getState(),da=null==L||this.isSelectionEmpty()||this.isCellSelected(L.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(L,Z){if(!mxEvent.isMultiTouchEvent(Z)){L=Z.getProperty("event");var P=Z.getProperty("cell");null==P?(L=mxUtils.convertPoint(this.container, -mxEvent.getClientX(L),mxEvent.getClientY(L)),u.start(L.x,L.y)):null!=da?this.addSelectionCells(da):1<this.getSelectionCount()&&this.isCellSelected(P)&&this.removeSelectionCell(P);da=null;Z.consume()}}));this.connectionHandler.selectCells=function(L,Z){this.graph.setSelectionCell(Z||L)};this.connectionHandler.constraintHandler.isStateIgnored=function(L,Z){var P=L.view.graph;return Z&&(P.isCellSelected(L.cell)||P.isTableRow(L.cell)&&P.selectionCellsHandler.isHandled(P.model.getParent(L.cell)))};this.selectionModel.addListener(mxEvent.CHANGE, -mxUtils.bind(this,function(){var L=this.connectionHandler.constraintHandler;null!=L.currentFocus&&L.isStateIgnored(L.currentFocus,!0)&&(L.currentFocus=null,L.constraints=null,L.destroyIcons());L.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var ia=this.updateMouseEvent;this.updateMouseEvent=function(L){L=ia.apply(this,arguments);null!=L.state&&this.isCellLocked(L.getCell())&&(L.state=null);return L}}this.currentTranslate=new mxPoint(0,0)}; -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);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0; -Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than diagrams.net --\x3e"; +Graph=function(b,e,k,m,C,p){mxGraph.call(this,b,e,k,m);this.themes=C||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(M){M=this.getCurrentCellStyle(M); +return null!=M?"1"==M.html||"wrap"==M[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var F=null,K=null,P=null,d=null,f=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(M,aa){if("mouseDown"==aa.getProperty("eventName")&&this.isEnabled()){M=aa.getProperty("event");var X=M.getState();aa=this.view.scale;if(!mxEvent.isAltDown(M.getEvent())&&null!=X)if(this.model.isEdge(X.cell))if(F=new mxPoint(M.getGraphX(),M.getGraphY()),f=this.isCellSelected(X.cell),P=X,K=M,null!=X.text&& +null!=X.text.boundingBox&&mxUtils.contains(X.text.boundingBox,M.getGraphX(),M.getGraphY()))d=mxEvent.LABEL_HANDLE;else{var ja=this.selectionCellsHandler.getHandler(X.cell);null!=ja&&null!=ja.bends&&0<ja.bends.length&&(d=ja.getHandleForEvent(M))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(M.getEvent())&&(ja=this.selectionCellsHandler.getHandler(X.cell),null==ja||null==ja.getHandleForEvent(M))){var ca=new mxRectangle(M.getGraphX()-1,M.getGraphY()-1),ka=mxEvent.isTouchEvent(M.getEvent())? +mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;ja=ka+2;ca.grow(ka);if(this.isTableCell(X.cell)&&!this.isCellSelected(X.cell)&&!(mxUtils.contains(X,M.getGraphX()-ja,M.getGraphY()-ja)&&mxUtils.contains(X,M.getGraphX()-ja,M.getGraphY()+ja)&&mxUtils.contains(X,M.getGraphX()+ja,M.getGraphY()+ja)&&mxUtils.contains(X,M.getGraphX()+ja,M.getGraphY()-ja))){var q=this.model.getParent(X.cell);ja=this.model.getParent(q);if(!this.isCellSelected(ja)){ka*=aa;var E=2*ka;if(this.model.getChildAt(ja, +0)!=q&&mxUtils.intersects(ca,new mxRectangle(X.x,X.y-ka,X.width,E))||this.model.getChildAt(q,0)!=X.cell&&mxUtils.intersects(ca,new mxRectangle(X.x-ka,X.y,E,X.height))||mxUtils.intersects(ca,new mxRectangle(X.x,X.y+X.height-ka,X.width,E))||mxUtils.intersects(ca,new mxRectangle(X.x+X.width-ka,X.y,E,X.height)))q=this.selectionCellsHandler.isHandled(ja),this.selectCellForEvent(ja,M.getEvent()),ja=this.selectionCellsHandler.getHandler(ja),null!=ja&&(ka=ja.getHandleForEvent(M),null!=ka&&(ja.start(M.getGraphX(), +M.getGraphY(),ka),ja.blockDelayedSelection=!q,M.consume()))}}for(;!M.isConsumed()&&null!=X&&(this.isTableCell(X.cell)||this.isTableRow(X.cell)||this.isTable(X.cell));)this.isSwimlane(X.cell)&&(ja=this.getActualStartSize(X.cell),(0<ja.x||0<ja.width)&&mxUtils.intersects(ca,new mxRectangle(X.x+(ja.x-ja.width-1)*aa+(0==ja.x?X.width:0),X.y,1,X.height))||(0<ja.y||0<ja.height)&&mxUtils.intersects(ca,new mxRectangle(X.x,X.y+(ja.y-ja.height-1)*aa+(0==ja.y?X.height:0),X.width,1)))&&(this.selectCellForEvent(X.cell, +M.getEvent()),ja=this.selectionCellsHandler.getHandler(X.cell),null!=ja&&(ka=mxEvent.CUSTOM_HANDLE-ja.customHandles.length+1,ja.start(M.getGraphX(),M.getGraphY(),ka),M.consume())),X=this.view.getState(this.model.getParent(X.cell))}}}));this.addMouseListener({mouseDown:function(M,aa){},mouseMove:mxUtils.bind(this,function(M,aa){M=this.selectionCellsHandler.handlers.map;for(var X in M)if(null!=M[X].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(aa.getEvent())){var ja= +this.tolerance;if(null!=F&&null!=P&&null!=K){if(X=P,Math.abs(F.x-aa.getGraphX())>ja||Math.abs(F.y-aa.getGraphY())>ja){var ca=this.selectionCellsHandler.getHandler(X.cell);null==ca&&this.model.isEdge(X.cell)&&(ca=this.createHandler(X));if(null!=ca&&null!=ca.bends&&0<ca.bends.length){M=ca.getHandleForEvent(K);var ka=this.view.getEdgeStyle(X);ja=ka==mxEdgeStyle.EntityRelation;f||d!=mxEvent.LABEL_HANDLE||(M=d);if(ja&&0!=M&&M!=ca.bends.length-1&&M!=mxEvent.LABEL_HANDLE)!ja||null==X.visibleSourceState&& +null==X.visibleTargetState||(this.graphHandler.reset(),aa.consume());else if(M==mxEvent.LABEL_HANDLE||0==M||null!=X.visibleSourceState||M==ca.bends.length-1||null!=X.visibleTargetState)ja||M==mxEvent.LABEL_HANDLE||(ja=X.absolutePoints,null!=ja&&(null==ka&&null==M||ka==mxEdgeStyle.OrthConnector)&&(M=d,null==M&&(M=new mxRectangle(F.x,F.y),M.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(M,ja[0].x,ja[0].y)?M=0:mxUtils.contains(M,ja[ja.length-1].x,ja[ja.length-1].y)?M=ca.bends.length- +1:null!=ka&&(2==ja.length||3==ja.length&&(0==Math.round(ja[0].x-ja[1].x)&&0==Math.round(ja[1].x-ja[2].x)||0==Math.round(ja[0].y-ja[1].y)&&0==Math.round(ja[1].y-ja[2].y)))?M=2:(M=mxUtils.findNearestSegment(X,F.x,F.y),M=null==ka?mxEvent.VIRTUAL_HANDLE-M:M+1))),null==M&&(M=mxEvent.VIRTUAL_HANDLE)),ca.start(aa.getGraphX(),aa.getGraphX(),M),aa.consume(),this.graphHandler.reset()}null!=ca&&(this.selectionCellsHandler.isHandlerActive(ca)?this.isCellSelected(X.cell)||(this.selectionCellsHandler.handlers.put(X.cell, +ca),this.selectCellForEvent(X.cell,aa.getEvent())):this.isCellSelected(X.cell)||ca.destroy());f=!1;F=K=P=d=null}}else if(X=aa.getState(),null!=X&&this.isCellEditable(X.cell)){ca=null;if(this.model.isEdge(X.cell)){if(M=new mxRectangle(aa.getGraphX(),aa.getGraphY()),M.grow(mxEdgeHandler.prototype.handleImage.width/2),ja=X.absolutePoints,null!=ja)if(null!=X.text&&null!=X.text.boundingBox&&mxUtils.contains(X.text.boundingBox,aa.getGraphX(),aa.getGraphY()))ca="move";else if(mxUtils.contains(M,ja[0].x, +ja[0].y)||mxUtils.contains(M,ja[ja.length-1].x,ja[ja.length-1].y))ca="pointer";else if(null!=X.visibleSourceState||null!=X.visibleTargetState)M=this.view.getEdgeStyle(X),ca="crosshair",M!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(X)&&(aa=mxUtils.findNearestSegment(X,aa.getGraphX(),aa.getGraphY()),aa<ja.length-1&&0<=aa&&(ca=0==Math.round(ja[aa].x-ja[aa+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(aa.getEvent())){ja=mxShape.prototype.svgStrokeTolerance/2;M=new mxRectangle(aa.getGraphX(), +aa.getGraphY());M.grow(ja);if(this.isTableCell(X.cell)&&(aa=this.model.getParent(X.cell),ja=this.model.getParent(aa),!this.isCellSelected(ja)))if(mxUtils.intersects(M,new mxRectangle(X.x,X.y-2,X.width,4))&&this.model.getChildAt(ja,0)!=aa||mxUtils.intersects(M,new mxRectangle(X.x,X.y+X.height-2,X.width,4)))ca="row-resize";else if(mxUtils.intersects(M,new mxRectangle(X.x-2,X.y,4,X.height))&&this.model.getChildAt(aa,0)!=X.cell||mxUtils.intersects(M,new mxRectangle(X.x+X.width-2,X.y,4,X.height)))ca="col-resize"; +for(aa=X;null==ca&&null!=aa&&(this.isTableCell(aa.cell)||this.isTableRow(aa.cell)||this.isTable(aa.cell));)this.isSwimlane(aa.cell)&&(ja=this.getActualStartSize(aa.cell),ka=this.view.scale,(0<ja.x||0<ja.width)&&mxUtils.intersects(M,new mxRectangle(aa.x+(ja.x-ja.width-1)*ka+(0==ja.x?aa.width*ka:0),aa.y,1,aa.height))?ca="col-resize":(0<ja.y||0<ja.height)&&mxUtils.intersects(M,new mxRectangle(aa.x,aa.y+(ja.y-ja.height-1)*ka+(0==ja.y?aa.height:0),aa.width,1))&&(ca="row-resize")),aa=this.view.getState(this.model.getParent(aa.cell))}null!= +ca&&X.setCursor(ca)}}}),mouseUp:mxUtils.bind(this,function(M,aa){d=F=K=P=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(M){var aa=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);M.view.graph.isHtmlLabel(M.cell)&&(aa=1!=M.style.html?mxUtils.htmlEntities(aa,!1):M.view.graph.sanitizeHtml(aa));return aa};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0); +this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(M,aa){return!1};this.alternateEdgeStyle="vertical";null==m&&this.loadStylesheet();var g=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var M=g.apply(this,arguments); +if(this.graph.pageVisible){var aa=[],X=this.graph.pageFormat,ja=this.graph.pageScale,ca=X.width*ja;X=X.height*ja;ja=this.graph.view.translate;for(var ka=this.graph.view.scale,q=this.graph.getPageLayout(),E=0;E<q.width;E++)aa.push(new mxRectangle(((q.x+E)*ca+ja.x)*ka,(q.y*X+ja.y)*ka,ca*ka,X*ka));for(E=1;E<q.height;E++)aa.push(new mxRectangle((q.x*ca+ja.x)*ka,((q.y+E)*X+ja.y)*ka,ca*ka,X*ka));M=aa.concat(M)}return M};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor= +function(M,aa){return null==M.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(M){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var x=this.graphHandler.getCells;this.graphHandler.getCells=function(M){for(var aa=x.apply(this,arguments),X=new mxDictionary,ja=[],ca=0;ca<aa.length;ca++){var ka=this.graph.isTableCell(M)&&this.graph.isTableCell(aa[ca])&& +this.graph.isCellSelected(aa[ca])?this.graph.model.getParent(aa[ca]):this.graph.isTableRow(M)&&this.graph.isTableRow(aa[ca])&&this.graph.isCellSelected(aa[ca])?aa[ca]:this.graph.getCompositeParent(aa[ca]);null==ka||X.get(ka)||(X.put(ka,!0),ja.push(ka))}return ja};var y=this.graphHandler.start;this.graphHandler.start=function(M,aa,X,ja){var ca=!1;this.graph.isTableCell(M)&&(this.graph.isCellSelected(M)?ca=!0:M=this.graph.model.getParent(M));ca||this.graph.isTableRow(M)&&this.graph.isCellSelected(M)|| +(M=this.graph.getCompositeParent(M));y.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(M,aa){aa=this.graph.getCompositeParent(aa);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var u=new mxRubberband(this);this.getRubberband=function(){return u};var H=(new Date).getTime(),J=0,D=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var M=this.currentState;D.apply(this,arguments);M!=this.currentState?(H=(new Date).getTime(), +J=0):J=(new Date).getTime()-H};var G=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(M){return mxEvent.isShiftDown(M.getEvent())&&mxEvent.isAltDown(M.getEvent())?!1:null!=this.currentState&&M.getState()==this.currentState&&2E3<J||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&G.apply(this,arguments)};var W=this.isToggleEvent;this.isToggleEvent=function(M){return W.apply(this,arguments)||!mxClient.IS_CHROMEOS&& +mxEvent.isShiftDown(M)};var T=u.isForceRubberbandEvent;u.isForceRubberbandEvent=function(M){return T.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(M.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==M.getState()&&mxEvent.isTouchEvent(M.getEvent())};var Z=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(Z=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END, +mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=Z)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(M){return mxEvent.isMouseEvent(M.getEvent())};var N=this.click;this.click=function(M){var aa=null==M.state&&null!=M.sourceState&&this.isCellLocked(M.sourceState.cell);if(this.isEnabled()&&!aa||M.isConsumed())return N.apply(this,arguments);var X=aa?M.sourceState.cell:M.getCell();null!=X&&(X=this.getClickableLinkForCell(X),null!=X&&(this.isCustomLink(X)? +this.customLinkClicked(X):this.openLink(X)));this.isEnabled()&&aa&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(M){return M.sourceState};var qa=this.tooltipHandler.show;this.tooltipHandler.show=function(){qa.apply(this,arguments);if(null!=this.div)for(var M=this.div.getElementsByTagName("a"),aa=0;aa<M.length;aa++)null!=M[aa].getAttribute("href")&&null==M[aa].getAttribute("target")&&M[aa].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(M){return M.sourceState}; +this.getCursorForMouseEvent=function(M){var aa=null==M.state&&null!=M.sourceState&&this.isCellLocked(M.sourceState.cell);return this.getCursorForCell(aa?M.sourceState.cell:M.getCell())};var oa=this.getCursorForCell;this.getCursorForCell=function(M){if(!this.isEnabled()||this.isCellLocked(M)){if(null!=this.getClickableLinkForCell(M))return"pointer";if(this.isCellLocked(M))return"default"}return oa.apply(this,arguments)};this.selectRegion=function(M,aa){var X=mxEvent.isAltDown(aa)?M:null;M=this.getCells(M.x, +M.y,M.width,M.height,null,null,X,function(ja){return"1"==mxUtils.getValue(ja.style,"locked","0")},!0);if(this.isToggleEvent(aa))for(X=0;X<M.length;X++)this.selectCellForEvent(M[X],aa);else this.selectCellsForEvent(M,aa);return M};var S=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(M,aa,X){return this.graph.isCellSelected(M)?!1:S.apply(this,arguments)};this.isCellLocked=function(M){for(;null!=M;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(M), +"locked","0"))return!0;M=this.model.getParent(M)}return!1};var fa=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(M,aa){"mouseDown"==aa.getProperty("eventName")&&(M=aa.getProperty("event").getState(),fa=null==M||this.isSelectionEmpty()||this.isCellSelected(M.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(M,aa){if(!mxEvent.isMultiTouchEvent(aa)){M=aa.getProperty("event");var X=aa.getProperty("cell");null==X?(M=mxUtils.convertPoint(this.container, +mxEvent.getClientX(M),mxEvent.getClientY(M)),u.start(M.x,M.y)):null!=fa?this.addSelectionCells(fa):1<this.getSelectionCount()&&this.isCellSelected(X)&&this.removeSelectionCell(X);fa=null;aa.consume()}}));this.connectionHandler.selectCells=function(M,aa){this.graph.setSelectionCell(aa||M)};this.connectionHandler.constraintHandler.isStateIgnored=function(M,aa){var X=M.view.graph;return aa&&(X.isCellSelected(M.cell)||X.isTableRow(M.cell)&&X.selectionCellsHandler.isHandled(X.model.getParent(M.cell)))}; +this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var M=this.connectionHandler.constraintHandler;null!=M.currentFocus&&M.isStateIgnored(M.currentFocus,!0)&&(M.currentFocus=null,M.constraints=null,M.destroyIcons());M.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var ia=this.updateMouseEvent;this.updateMouseEvent=function(M){M=ia.apply(this,arguments);null!=M.state&&this.isCellLocked(M.getCell())&&(M.state=null);return M}}this.currentTranslate=new mxPoint(0, +0)};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);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language; +Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than diagrams.net --\x3e"; Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSource fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" "); Graph.layoutNames="mxHierarchicalLayout mxCircleLayout mxCompactTreeLayout mxEdgeLabelLayout mxFastOrganicLayout mxParallelEdgeLayout mxPartitionLayout mxRadialTreeLayout mxStackLayout".split(" "); Graph.createOffscreenGraph=function(b){var e=new Graph(document.createElement("div"));e.stylesheet.styles=mxUtils.clone(b.styles);e.resetViewOnRootChange=!1;e.setConnectable(!1);e.gridEnabled=!1;e.autoScroll=!1;e.setTooltips(!1);e.setEnabled(!1);e.container.style.visibility="hidden";e.container.style.position="absolute";e.container.style.overflow="hidden";e.container.style.height="1px";e.container.style.width="1px";return e}; Graph.createSvgImage=function(b,e,k,m,C){k=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+b+'px" height="'+e+'px" '+(null!=m&&null!=C?'viewBox="0 0 '+m+" "+C+'" ':"")+'version="1.1">'+k+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(k):Base64.encode(k,!0)),b,e)}; -Graph.createSvgNode=function(b,e,k,m,C){var p=mxUtils.createXmlDocument(),E=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");null!=C&&(null!=E.style?E.style.backgroundColor=C:E.setAttribute("style","background-color:"+C));null==p.createElementNS?(E.setAttribute("xmlns",mxConstants.NS_SVG),E.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):E.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);E.setAttribute("version","1.1"); -E.setAttribute("width",k+"px");E.setAttribute("height",m+"px");E.setAttribute("viewBox",b+" "+e+" "+k+" "+m);p.appendChild(E);return E};Graph.htmlToPng=function(b,e,k,m){var C=document.createElement("canvas");C.width=e;C.height=k;var p=document.createElement("img");p.onload=mxUtils.bind(this,function(){C.getContext("2d").drawImage(p,0,0);m(C.toDataURL())});p.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml"><style>em{color:red;}</style><em>I</em> lick <span>cheese</span></div></foreignObject></svg>')}; +Graph.createSvgNode=function(b,e,k,m,C){var p=mxUtils.createXmlDocument(),F=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");null!=C&&(null!=F.style?F.style.backgroundColor=C:F.setAttribute("style","background-color:"+C));null==p.createElementNS?(F.setAttribute("xmlns",mxConstants.NS_SVG),F.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):F.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);F.setAttribute("version","1.1"); +F.setAttribute("width",k+"px");F.setAttribute("height",m+"px");F.setAttribute("viewBox",b+" "+e+" "+k+" "+m);p.appendChild(F);return F};Graph.htmlToPng=function(b,e,k,m){var C=document.createElement("canvas");C.width=e;C.height=k;var p=document.createElement("img");p.onload=mxUtils.bind(this,function(){C.getContext("2d").drawImage(p,0,0);m(C.toDataURL())});p.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml"><style>em{color:red;}</style><em>I</em> lick <span>cheese</span></div></foreignObject></svg>')}; Graph.zapGremlins=function(b){for(var e=0,k=[],m=0;m<b.length;m++){var C=b.charCodeAt(m);(32<=C||9==C||10==C||13==C)&&65535!=C&&65534!=C||(k.push(b.substring(e,m)),e=m+1)}0<e&&e<b.length&&k.push(b.substring(e));return 0==k.length?b:k.join("")};Graph.stringToBytes=function(b){for(var e=Array(b.length),k=0;k<b.length;k++)e[k]=b.charCodeAt(k);return e};Graph.bytesToString=function(b){for(var e=Array(b.length),k=0;k<b.length;k++)e[k]=String.fromCharCode(b[k]);return e.join("")}; Graph.base64EncodeUnicode=function(b){return btoa(encodeURIComponent(b).replace(/%([0-9A-F]{2})/g,function(e,k){return String.fromCharCode(parseInt(k,16))}))};Graph.base64DecodeUnicode=function(b){return decodeURIComponent(Array.prototype.map.call(atob(b),function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(b,e){b=mxUtils.getXml(b);return Graph.compress(e?b:Graph.zapGremlins(b))}; Graph.arrayBufferToString=function(b){var e="";b=new Uint8Array(b);for(var k=b.byteLength,m=0;m<k;m++)e+=String.fromCharCode(b[m]);return e};Graph.stringToArrayBuffer=function(b){return Uint8Array.from(b,function(e){return e.charCodeAt(0)})}; @@ -2326,36 +2324,36 @@ Graph.arrayBufferIndexOfString=function(b,e,k){var m=e.charCodeAt(0),C=1,p=-1;fo Graph.decompress=function(b,e,k){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=Graph.stringToArrayBuffer(atob(b));e=decodeURIComponent(e?pako.inflate(b,{to:"string"}):pako.inflateRaw(b,{to:"string"}));return k?e:Graph.zapGremlins(e)}; Graph.fadeNodes=function(b,e,k,m,C){C=null!=C?C:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,e);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+C+"ms ease-in-out");Graph.setOpacityForNodes(b,k);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=m&&m()},C)},0)};Graph.removeKeys=function(b,e){for(var k in b)e(k)&&delete b[k]}; Graph.setTransitionForNodes=function(b,e){for(var k=0;k<b.length;k++)mxUtils.setPrefixedStyle(b[k].style,"transition",e)};Graph.setOpacityForNodes=function(b,e){for(var k=0;k<b.length;k++)b[k].style.opacity=e};Graph.removePasteFormatting=function(b){for(;null!=b;)null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild),b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style&&(b.style.whiteSpace="","#000000"==b.style.color&&(b.style.color="")),b=b.nextSibling}; -Graph.sanitizeHtml=function(b,e){return Graph.domPurify(b,!1)};Graph.sanitizeLink=function(b){var e=document.createElement("a");e.setAttribute("href",b);Graph.sanitizeNode(e);return e.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(b){"use"==b.nodeName&&b.hasAttribute("xlink:href")&&!b.getAttribute("xlink:href").match(/^#/)&&b.remove()}); +Graph.sanitizeHtml=function(b,e){return Graph.domPurify(b,!1)};Graph.sanitizeLink=function(b){var e=document.createElement("a");e.setAttribute("href",b);Graph.sanitizeNode(e);return e.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(b){"use"==b.nodeName&&(null!=b.getAttribute("xlink:href")&&!b.getAttribute("xlink:href").startsWith("#")||null!=b.getAttribute("href")&&!b.getAttribute("href").startsWith("#"))&&b.remove()}); Graph.domPurify=function(b,e){window.DOM_PURIFY_CONFIG.IN_PLACE=e;return DOMPurify.sanitize(b,window.DOM_PURIFY_CONFIG)}; Graph.clipSvgDataUri=function(b,e){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var k=document.createElement("div");k.style.position="absolute";k.style.visibility="hidden";var m=decodeURIComponent(escape(atob(b.substring(26)))),C=m.indexOf("<svg");if(0<=C){k.innerHTML=Graph.sanitizeHtml(m.substring(C));var p=k.getElementsByTagName("svg");if(0<p.length){if(e||null!=p[0].getAttribute("preserveAspectRatio")){document.body.appendChild(k);try{m=e= -1;var E=p[0].getAttribute("width"),K=p[0].getAttribute("height");E=null!=E&&"%"!=E.charAt(E.length-1)?parseFloat(E):NaN;K=null!=K&&"%"!=K.charAt(K.length-1)?parseFloat(K):NaN;var Q=p[0].getAttribute("viewBox");if(null!=Q&&!isNaN(E)&&!isNaN(K)){var d=Q.split(" ");4<=Q.length&&(e=parseFloat(d[2])/E,m=parseFloat(d[3])/K)}var f=p[0].getBBox();0<f.width&&0<f.height&&(k.getElementsByTagName("svg")[0].setAttribute("viewBox",f.x+" "+f.y+" "+f.width+" "+f.height),k.getElementsByTagName("svg")[0].setAttribute("width", +1;var F=p[0].getAttribute("width"),K=p[0].getAttribute("height");F=null!=F&&"%"!=F.charAt(F.length-1)?parseFloat(F):NaN;K=null!=K&&"%"!=K.charAt(K.length-1)?parseFloat(K):NaN;var P=p[0].getAttribute("viewBox");if(null!=P&&!isNaN(F)&&!isNaN(K)){var d=P.split(" ");4<=P.length&&(e=parseFloat(d[2])/F,m=parseFloat(d[3])/K)}var f=p[0].getBBox();0<f.width&&0<f.height&&(k.getElementsByTagName("svg")[0].setAttribute("viewBox",f.x+" "+f.y+" "+f.width+" "+f.height),k.getElementsByTagName("svg")[0].setAttribute("width", f.width/e),k.getElementsByTagName("svg")[0].setAttribute("height",f.height/m))}catch(g){}finally{document.body.removeChild(k)}}b=Editor.createSvgDataUri(mxUtils.getXml(p[0]))}}}catch(g){}return b};Graph.stripQuotes=function(b){null!=b&&("'"==b.charAt(0)&&(b=b.substring(1)),"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),'"'==b.charAt(0)&&(b=b.substring(1)),'"'==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)));return b}; Graph.createRemoveIcon=function(b,e){var k=document.createElement("img");k.setAttribute("src",Dialog.prototype.clearImage);k.setAttribute("title",b);k.setAttribute("width","13");k.setAttribute("height","10");k.style.marginLeft="4px";k.style.marginBottom="-1px";k.style.cursor="pointer";mxEvent.addListener(k,"click",e);return k};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};Graph.isLink=function(b){return null!=b&&Graph.linkPattern.test(b)}; Graph.linkPattern=RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i");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.linkRelation="nofollow noopener noreferrer"; Graph.prototype.defaultScrollbars=!0;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled="0"!=urlParams.grid;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.shapeForegroundColor="#000000";Graph.prototype.shapeBackgroundColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1; Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}^ ^\"^ '^=^;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0]; Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;Graph.prototype.enableFlowAnimation=!1;Graph.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput card curlyBracket singleArrow callout doubleArrow flexArrow umlLifeline".split(" "); -Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(k,m){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var C=k.view.graph.tolerance,p=!0,E=null,K=mxUtils.bind(this,function(f){p=!0;E=new mxPoint(mxEvent.getClientX(f),mxEvent.getClientY(f))}),Q=mxUtils.bind(this,function(f){p=p&&null!=E&&Math.abs(E.x-mxEvent.getClientX(f))<C&&Math.abs(E.y-mxEvent.getClientY(f))<C}),d=mxUtils.bind(this,function(f){if(p)for(var g=mxEvent.getSource(f);null!= -g&&g!=m.node;){if("a"==g.nodeName.toLowerCase()){k.view.graph.labelLinkClicked(k,g,f);break}g=g.parentNode}});mxEvent.addGestureListeners(m.node,K,Q,d);mxEvent.addListener(m.node,"click",function(f){mxEvent.consume(f)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(k){var m=mxEvent.getSource(k);"A"==m.nodeName&&(m=m.getAttribute("href"),null!= +Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(k,m){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var C=k.view.graph.tolerance,p=!0,F=null,K=mxUtils.bind(this,function(f){p=!0;F=new mxPoint(mxEvent.getClientX(f),mxEvent.getClientY(f))}),P=mxUtils.bind(this,function(f){p=p&&null!=F&&Math.abs(F.x-mxEvent.getClientX(f))<C&&Math.abs(F.y-mxEvent.getClientY(f))<C}),d=mxUtils.bind(this,function(f){if(p)for(var g=mxEvent.getSource(f);null!= +g&&g!=m.node;){if("a"==g.nodeName.toLowerCase()){k.view.graph.labelLinkClicked(k,g,f);break}g=g.parentNode}});mxEvent.addGestureListeners(m.node,K,P,d);mxEvent.addListener(m.node,"click",function(f){mxEvent.consume(f)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(k){var m=mxEvent.getSource(k);"A"==m.nodeName&&(m=m.getAttribute("href"),null!= m&&this.graph.isCustomLink(m)&&(mxEvent.isTouchEvent(k)||!mxEvent.isPopupTrigger(k))&&this.graph.customLinkClicked(m)&&mxEvent.consume(k))}))}}this.addListener(mxEvent.SIZE,mxUtils.bind(this,function(k,m){null!=this.container&&this.flowAnimationStyle&&(k=this.flowAnimationStyle.getAttribute("id"),this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(k))}));this.initLayoutManager()}; -(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFillState=function(E){return!this.isSpecialColor(E.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(E.style,"lineShape",null)&&(this.model.isVertex(E.cell)||"arrow"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE, -null)||"mxgraph.arrows2.wedgeArrow"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isStrokeState=function(E){return!this.isSpecialColor(E.style[mxConstants.STYLE_STROKECOLOR])};Graph.prototype.isSpecialColor=function(E){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],E)};Graph.prototype.isGlassState=function(E){E=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return"label"==E||"rectangle"==E|| -"internalStorage"==E||"ext"==E||"umlLifeline"==E||"swimlane"==E||"process"==E};Graph.prototype.isRoundedState=function(E){return null!=E.shape?E.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(E){var K=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(E.style,mxConstants.STYLE_CURVED,!1)&&("connector"==K||"filledEdge"==K)};Graph.prototype.isAutoSizeState=function(E){return"1"== -mxUtils.getValue(E.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(E){E=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return"label"==E||"image"==E};Graph.prototype.isShadowState=function(E){return"image"!=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.getVerticesAndEdges=function(E,K){E=null!=E?E:!0;K=null!=K?K:!0;var Q=this.model;return Q.filterDescendants(function(d){return E&&Q.isVertex(d)||K&&Q.isEdge(d)},Q.getRoot())};Graph.prototype.getCommonStyle= -function(E){for(var K={},Q=0;Q<E.length;Q++){var d=this.view.getState(E[Q]);this.mergeStyle(d.style,K,0==Q)}return K};Graph.prototype.mergeStyle=function(E,K,Q){if(null!=E){var d={},f;for(f in E){var g=E[f];null!=g&&(d[f]=!0,null==K[f]&&Q?K[f]=g:K[f]!=g&&delete K[f])}for(f in K)d[f]||delete K[f]}};Graph.prototype.getStartEditingCell=function(E,K){K=this.getCellStyle(E);K=parseInt(mxUtils.getValue(K,mxConstants.STYLE_STARTSIZE,0));this.isTable(E)&&(!this.isSwimlane(E)||0==K)&&""==this.getLabel(E)&& -0<this.model.getChildCount(E)&&(E=this.model.getChildAt(E,0),K=this.getCellStyle(E),K=parseInt(mxUtils.getValue(K,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(E)&&(!this.isSwimlane(E)||0==K)&&""==this.getLabel(E)&&0<this.model.getChildCount(E))for(K=0;K<this.model.getChildCount(E);K++){var Q=this.model.getChildAt(E,K);if(this.isCellEditable(Q)){E=Q;break}}return E};Graph.prototype.copyStyle=function(E){return this.getCellStyle(E,!1)};Graph.prototype.pasteStyle=function(E,K,Q){Q=null!=Q?Q:Graph.pasteStyles; -Graph.removeKeys(E,function(d){return 0>mxUtils.indexOf(Q,d)});this.updateCellStyles(E,K)};Graph.prototype.updateCellStyles=function(E,K){this.model.beginUpdate();try{for(var Q=0;Q<K.length;Q++)if(this.model.isVertex(K[Q])||this.model.isEdge(K[Q])){var d=this.getCellStyle(K[Q],!1),f;for(f in E){var g=E[f];d[f]!=g&&this.setCellStyles(f,g,[K[Q]])}}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&& -(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(E,K,Q,d,f,g){this.useCssTransforms&&(E=E/this.currentScale-this.currentTranslate.x,K=K/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(E,K,Q,d,f,g){d=null!=d?d:!0;f=null!=f?f:!0; -null==Q&&(Q=this.getCurrentRoot(),null==Q&&(Q=this.getModel().getRoot()));if(null!=Q)for(var x=this.model.getChildCount(Q)-1;0<=x;x--){var z=this.model.getChildAt(Q,x),u=this.getScaledCellAt(E,K,z,d,f,g);if(null!=u)return u;if(this.isCellVisible(z)&&(f&&this.model.isEdge(z)||d&&this.model.isVertex(z))&&(u=this.view.getState(z),null!=u&&(null==g||!g(u,E,K))&&this.intersects(u,E,K)))return z}return null};Graph.prototype.isRecursiveVertexResize=function(E){return!this.isSwimlane(E.cell)&&0<this.model.getChildCount(E.cell)&& -!this.isCellCollapsed(E.cell)&&"1"==mxUtils.getValue(E.style,"recursiveResize","1")&&null==mxUtils.getValue(E.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(E){for(var K=this.getCellGeometry(E);null!=K&&K.relative;)E=this.getModel().getParent(E),K=this.getCellGeometry(E);return E};Graph.prototype.isPart=function(E){return"1"==mxUtils.getValue(this.getCurrentCellStyle(E),"part","0")||this.isTableCell(E)||this.isTableRow(E)};Graph.prototype.getCompositeParents=function(E){for(var K= -new mxDictionary,Q=[],d=0;d<E.length;d++){var f=this.getCompositeParent(E[d]);this.isTableCell(f)&&(f=this.graph.model.getParent(f));this.isTableRow(f)&&(f=this.graph.model.getParent(f));null==f||K.get(f)||(K.put(f,!0),Q.push(f))}return Q};Graph.prototype.getCompositeParent=function(E){for(;this.isPart(E);){var K=this.model.getParent(E);if(!this.model.isVertex(K))break;E=K}return E};Graph.prototype.filterSelectionCells=function(E){var K=this.getSelectionCells();if(null!=E){for(var Q=[],d=0;d<K.length;d++)E(K[d])|| -Q.push(K[d]);K=Q}return K};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(E){if(this.useCssTransforms){var K=this.currentScale,Q=this.currentTranslate;E=new mxRectangle((E.x+2*Q.x)*K-Q.x,(E.y+2*Q.y)*K-Q.y,E.width*K,E.height*K)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(E){E=this.strokeWidth;this.graph.useCssTransforms&&(E/=this.graph.currentScale);return E};mxGraphView.prototype.getGraphBounds=function(){var E=this.graphBounds; -if(this.graph.useCssTransforms){var K=this.graph.currentTranslate,Q=this.graph.currentScale;E=new mxRectangle((E.x+K.x)*Q,(E.y+K.y)*Q,E.width*Q,E.height*Q)}return E};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(E){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y= -this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);e.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var k=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(E){E=k.apply(this,arguments);for(var K=[],Q=0;Q<E.length;Q++)this.isTableRow(E[Q])||this.isTableCell(E[Q])||K.push(E[Q]);return K};var m= -mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(E){E=m.apply(this,arguments);for(var K=[],Q=0;Q<E.length;Q++)this.isTable(E[Q])||this.isTableRow(E[Q])||this.isTableCell(E[Q])||K.push(E[Q]);return K};Graph.prototype.updateCssTransform=function(){var E=this.view.getDrawPane();if(null!=E)if(E=E.parentNode,this.useCssTransforms){var K=E.getAttribute("transform");E.setAttribute("transformOrigin","0 0");var Q=Math.round(100*this.currentScale)/100;E.setAttribute("transform", -"scale("+Q+","+Q+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");K!=E.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",E.getAttribute("transform"))}else E.removeAttribute("transformOrigin"),E.removeAttribute("transform")};var C=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var E=this.graph.useCssTransforms,K=this.scale,Q=this.translate; -E&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);C.apply(this,arguments);E&&(this.scale=K,this.translate=Q)};var p=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(E,K,Q){var d=this.useCssTransforms,f=this.view.scale,g=this.view.translate;d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);p.apply(this,arguments);d&&(this.view.scale=f,this.view.translate=g,this.useCssTransforms=!0)}})(); +(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFillState=function(F){return!this.isSpecialColor(F.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(F.style,"lineShape",null)&&(this.model.isVertex(F.cell)||"arrow"==mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE, +null)||"mxgraph.arrows2.wedgeArrow"==mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isStrokeState=function(F){return!this.isSpecialColor(F.style[mxConstants.STYLE_STROKECOLOR])};Graph.prototype.isSpecialColor=function(F){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],F)};Graph.prototype.isGlassState=function(F){F=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null);return"label"==F||"rectangle"==F|| +"internalStorage"==F||"ext"==F||"umlLifeline"==F||"swimlane"==F||"process"==F};Graph.prototype.isRoundedState=function(F){return null!=F.shape?F.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(F){var K=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(F.style,mxConstants.STYLE_CURVED,!1)&&("connector"==K||"filledEdge"==K)};Graph.prototype.isAutoSizeState=function(F){return"1"== +mxUtils.getValue(F.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(F){F=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null);return"label"==F||"image"==F};Graph.prototype.isShadowState=function(F){return"image"!=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.getVerticesAndEdges=function(F,K){F=null!=F?F:!0;K=null!=K?K:!0;var P=this.model;return P.filterDescendants(function(d){return F&&P.isVertex(d)||K&&P.isEdge(d)},P.getRoot())};Graph.prototype.getCommonStyle= +function(F){for(var K={},P=0;P<F.length;P++){var d=this.view.getState(F[P]);this.mergeStyle(d.style,K,0==P)}return K};Graph.prototype.mergeStyle=function(F,K,P){if(null!=F){var d={},f;for(f in F){var g=F[f];null!=g&&(d[f]=!0,null==K[f]&&P?K[f]=g:K[f]!=g&&delete K[f])}for(f in K)d[f]||delete K[f]}};Graph.prototype.getStartEditingCell=function(F,K){K=this.getCellStyle(F);K=parseInt(mxUtils.getValue(K,mxConstants.STYLE_STARTSIZE,0));this.isTable(F)&&(!this.isSwimlane(F)||0==K)&&""==this.getLabel(F)&& +0<this.model.getChildCount(F)&&(F=this.model.getChildAt(F,0),K=this.getCellStyle(F),K=parseInt(mxUtils.getValue(K,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(F)&&(!this.isSwimlane(F)||0==K)&&""==this.getLabel(F)&&0<this.model.getChildCount(F))for(K=0;K<this.model.getChildCount(F);K++){var P=this.model.getChildAt(F,K);if(this.isCellEditable(P)){F=P;break}}return F};Graph.prototype.copyStyle=function(F){return this.getCellStyle(F,!1)};Graph.prototype.pasteStyle=function(F,K,P){P=null!=P?P:Graph.pasteStyles; +Graph.removeKeys(F,function(d){return 0>mxUtils.indexOf(P,d)});this.updateCellStyles(F,K)};Graph.prototype.updateCellStyles=function(F,K){this.model.beginUpdate();try{for(var P=0;P<K.length;P++)if(this.model.isVertex(K[P])||this.model.isEdge(K[P])){var d=this.getCellStyle(K[P],!1),f;for(f in F){var g=F[f];d[f]!=g&&this.setCellStyles(f,g,[K[P]])}}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&& +(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(F,K,P,d,f,g){this.useCssTransforms&&(F=F/this.currentScale-this.currentTranslate.x,K=K/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(F,K,P,d,f,g){d=null!=d?d:!0;f=null!=f?f:!0; +null==P&&(P=this.getCurrentRoot(),null==P&&(P=this.getModel().getRoot()));if(null!=P)for(var x=this.model.getChildCount(P)-1;0<=x;x--){var y=this.model.getChildAt(P,x),u=this.getScaledCellAt(F,K,y,d,f,g);if(null!=u)return u;if(this.isCellVisible(y)&&(f&&this.model.isEdge(y)||d&&this.model.isVertex(y))&&(u=this.view.getState(y),null!=u&&(null==g||!g(u,F,K))&&this.intersects(u,F,K)))return y}return null};Graph.prototype.isRecursiveVertexResize=function(F){return!this.isSwimlane(F.cell)&&0<this.model.getChildCount(F.cell)&& +!this.isCellCollapsed(F.cell)&&"1"==mxUtils.getValue(F.style,"recursiveResize","1")&&null==mxUtils.getValue(F.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(F){for(var K=this.getCellGeometry(F);null!=K&&K.relative;)F=this.getModel().getParent(F),K=this.getCellGeometry(F);return F};Graph.prototype.isPart=function(F){return"1"==mxUtils.getValue(this.getCurrentCellStyle(F),"part","0")||this.isTableCell(F)||this.isTableRow(F)};Graph.prototype.getCompositeParents=function(F){for(var K= +new mxDictionary,P=[],d=0;d<F.length;d++){var f=this.getCompositeParent(F[d]);this.isTableCell(f)&&(f=this.graph.model.getParent(f));this.isTableRow(f)&&(f=this.graph.model.getParent(f));null==f||K.get(f)||(K.put(f,!0),P.push(f))}return P};Graph.prototype.getCompositeParent=function(F){for(;this.isPart(F);){var K=this.model.getParent(F);if(!this.model.isVertex(K))break;F=K}return F};Graph.prototype.filterSelectionCells=function(F){var K=this.getSelectionCells();if(null!=F){for(var P=[],d=0;d<K.length;d++)F(K[d])|| +P.push(K[d]);K=P}return K};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(F){if(this.useCssTransforms){var K=this.currentScale,P=this.currentTranslate;F=new mxRectangle((F.x+2*P.x)*K-P.x,(F.y+2*P.y)*K-P.y,F.width*K,F.height*K)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(F){F=this.strokeWidth;this.graph.useCssTransforms&&(F/=this.graph.currentScale);return F};mxGraphView.prototype.getGraphBounds=function(){var F=this.graphBounds; +if(this.graph.useCssTransforms){var K=this.graph.currentTranslate,P=this.graph.currentScale;F=new mxRectangle((F.x+K.x)*P,(F.y+K.y)*P,F.width*P,F.height*P)}return F};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(F){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y= +this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);e.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var k=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(F){F=k.apply(this,arguments);for(var K=[],P=0;P<F.length;P++)this.isTableRow(F[P])||this.isTableCell(F[P])||K.push(F[P]);return K};var m= +mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(F){F=m.apply(this,arguments);for(var K=[],P=0;P<F.length;P++)this.isTable(F[P])||this.isTableRow(F[P])||this.isTableCell(F[P])||K.push(F[P]);return K};Graph.prototype.updateCssTransform=function(){var F=this.view.getDrawPane();if(null!=F)if(F=F.parentNode,this.useCssTransforms){var K=F.getAttribute("transform");F.setAttribute("transformOrigin","0 0");var P=Math.round(100*this.currentScale)/100;F.setAttribute("transform", +"scale("+P+","+P+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");K!=F.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",F.getAttribute("transform"))}else F.removeAttribute("transformOrigin"),F.removeAttribute("transform")};var C=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var F=this.graph.useCssTransforms,K=this.scale,P=this.translate; +F&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);C.apply(this,arguments);F&&(this.scale=K,this.translate=P)};var p=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(F,K,P){var d=this.useCssTransforms,f=this.view.scale,g=this.view.translate;d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);p.apply(this,arguments);d&&(this.view.scale=f,this.view.translate=g,this.useCssTransforms=!0)}})(); Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};Graph.prototype.labelLinkClicked=function(b,e,k){e=e.getAttribute("href");if(null!=e&&!this.isCustomLink(e)&&(mxEvent.isLeftMouseButton(k)&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(e)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(e),b);mxEvent.consume(k)}}; Graph.prototype.openLink=function(b,e,k){var m=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==e&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==e&&window==window.top){var C=b.split("#")[1];window.location.hash=="#"+C&&(window.location.hash="");window.location.hash=C}else m=window.open(b,null!=e?e:"_blank"),null==m||k||(m.opener=null)}catch(p){}return m}; Graph.prototype.getLinkTitle=function(b){return b.substring(b.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(b){return"data:"==b.substring(0,5)};Graph.prototype.customLinkClicked=function(b){return!1};Graph.prototype.isExternalProtocol=function(b){return"mailto:"===b.substring(0,7)};Graph.prototype.isBlankLink=function(b){return!this.isExternalProtocol(b)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(b)&&b.substring(0,this.domainUrl.length)!==this.domainUrl)}; @@ -2369,10 +2367,10 @@ Graph.prototype.createLayouts=function(b){for(var e=[],k=0;k<b.length;k++)if(0<= Graph.prototype.getDataForCells=function(b){for(var e=[],k=0;k<b.length;k++){var m=null!=b[k].value?b[k].value.attributes:null,C={};C.id=b[k].id;if(null!=m)for(var p=0;p<m.length;p++)C[m[p].nodeName]=m[p].nodeValue;else C.label=this.convertValueToString(b[k]);e.push(C)}return e}; Graph.prototype.getNodesForCells=function(b){for(var e=[],k=0;k<b.length;k++){var m=this.view.getState(b[k]);if(null!=m){for(var C=this.cellRenderer.getShapesForState(m),p=0;p<C.length;p++)null!=C[p]&&null!=C[p].node&&e.push(C[p].node);null!=m.control&&null!=m.control.node&&e.push(m.control.node)}}return e}; Graph.prototype.createWipeAnimations=function(b,e){for(var k=[],m=0;m<b.length;m++){var C=this.view.getState(b[m]);null!=C&&null!=C.shape&&(this.model.isEdge(C.cell)&&null!=C.absolutePoints&&1<C.absolutePoints.length?k.push(this.createEdgeWipeAnimation(C,e)):this.model.isVertex(C.cell)&&null!=C.shape.bounds&&k.push(this.createVertexWipeAnimation(C,e)))}return k}; -Graph.prototype.createEdgeWipeAnimation=function(b,e){var k=b.absolutePoints.slice(),m=b.segments,C=b.length,p=k.length;return{execute:mxUtils.bind(this,function(E,K){if(null!=b.shape){var Q=[k[0]];K=E/K;e||(K=1-K);for(var d=C*K,f=1;f<p;f++)if(d<=m[f-1]){Q.push(new mxPoint(k[f-1].x+(k[f].x-k[f-1].x)*d/m[f-1],k[f-1].y+(k[f].y-k[f-1].y)*d/m[f-1]));break}else d-=m[f-1],Q.push(k[f]);b.shape.points=Q;b.shape.redraw();0==E&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!= +Graph.prototype.createEdgeWipeAnimation=function(b,e){var k=b.absolutePoints.slice(),m=b.segments,C=b.length,p=k.length;return{execute:mxUtils.bind(this,function(F,K){if(null!=b.shape){var P=[k[0]];K=F/K;e||(K=1-K);for(var d=C*K,f=1;f<p;f++)if(d<=m[f-1]){P.push(new mxPoint(k[f-1].x+(k[f].x-k[f-1].x)*d/m[f-1],k[f-1].y+(k[f].y-k[f-1].y)*d/m[f-1]));break}else d-=m[f-1],P.push(k[f]);b.shape.points=P;b.shape.redraw();0==F&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!= b.text.node&&(b.text.node.style.opacity=K)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}}; Graph.prototype.createVertexWipeAnimation=function(b,e){var k=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(m,C){null!=b.shape&&(C=m/C,e||(C=1-C),b.shape.bounds=new mxRectangle(k.x,k.y,k.width*C,k.height),b.shape.redraw(),0==m&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=C))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&& -(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.executeAnimations=function(b,e,k,m){k=null!=k?k:30;m=null!=m?m:30;var C=null,p=0,E=mxUtils.bind(this,function(){if(p==k||this.stoppingCustomActions){window.clearInterval(C);for(var K=0;K<b.length;K++)b[K].stop();null!=e&&e()}else for(K=0;K<b.length;K++)b[K].execute(p,k);p++});C=window.setInterval(E,m);E()}; +(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.executeAnimations=function(b,e,k,m){k=null!=k?k:30;m=null!=m?m:30;var C=null,p=0,F=mxUtils.bind(this,function(){if(p==k||this.stoppingCustomActions){window.clearInterval(C);for(var K=0;K<b.length;K++)b[K].stop();null!=e&&e()}else for(K=0;K<b.length;K++)b[K].execute(p,k);p++});C=window.setInterval(F,m);F()}; Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize}; Graph.prototype.getPageLayout=function(){var b=this.getPageSize(),e=this.getGraphBounds();if(0==e.width||0==e.height)return new mxRectangle(0,0,1,1);var k=Math.floor(Math.ceil(e.x/this.view.scale-this.view.translate.x)/b.width),m=Math.floor(Math.ceil(e.y/this.view.scale-this.view.translate.y)/b.height);return new mxRectangle(k,m,Math.ceil((Math.floor((e.x+e.width)/this.view.scale)-this.view.translate.x)/b.width)-k,Math.ceil((Math.floor((e.y+e.height)/this.view.scale)-this.view.translate.y)/b.height)- m)};Graph.prototype.sanitizeHtml=function(b,e){return Graph.sanitizeHtml(b,e)};Graph.prototype.updatePlaceholders=function(){var b=!1,e;for(e in this.model.cells){var k=this.model.cells[e];this.isReplacePlaceholders(k)&&(this.view.invalidate(k,!1,!1),b=!0)}b&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(b){return null!=b.value&&"object"==typeof b.value&&"1"==b.value.getAttribute("placeholders")}; @@ -2382,28 +2380,28 @@ Graph.prototype.getLabel=function(b){var e=mxGraph.prototype.getLabel.apply(this Graph.prototype.setGridSize=function(b){this.gridSize=b;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(b){this.defaultParent=b;this.fireEvent(new mxEventObject("defaultParentChanged"))};Graph.prototype.getClickableLinkForCell=function(b){do{var e=this.getLinkForCell(b);if(null!=e)return e;b=this.model.getParent(b)}while(null!=b);return null}; Graph.prototype.getGlobalVariable=function(b){var e=null;"date"==b?e=(new Date).toLocaleDateString():"time"==b?e=(new Date).toLocaleTimeString():"timestamp"==b?e=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),e=this.formatDate(new Date,b));return e}; Graph.prototype.formatDate=function(b,e,k){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy", -shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var m=this.dateFormatCache,C=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,p=/[^-+\dA-Z]/g,E=function(D,G){D=String(D);for(G=G||2;D.length<G;)D="0"+D;return D};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)|| -/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(m.masks[e]||e||m.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),k=!0);var K=k?"getUTC":"get",Q=b[K+"Date"](),d=b[K+"Day"](),f=b[K+"Month"](),g=b[K+"FullYear"](),x=b[K+"Hours"](),z=b[K+"Minutes"](),u=b[K+"Seconds"]();K=b[K+"Milliseconds"]();var H=k?0:b.getTimezoneOffset(),J={d:Q,dd:E(Q),ddd:m.i18n.dayNames[d],dddd:m.i18n.dayNames[d+7],m:f+1,mm:E(f+1),mmm:m.i18n.monthNames[f],mmmm:m.i18n.monthNames[f+ -12],yy:String(g).slice(2),yyyy:g,h:x%12||12,hh:E(x%12||12),H:x,HH:E(x),M:z,MM:E(z),s:u,ss:E(u),l:E(K,3),L:E(99<K?Math.round(K/10):K),t:12>x?"a":"p",tt:12>x?"am":"pm",T:12>x?"A":"P",TT:12>x?"AM":"PM",Z:k?"UTC":(String(b).match(C)||[""]).pop().replace(p,""),o:(0<H?"-":"+")+E(100*Math.floor(Math.abs(H)/60)+Math.abs(H)%60,4),S:["th","st","nd","rd"][3<Q%10?0:(10!=Q%100-Q%10)*Q%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(D){return D in J?J[D]:D.slice(1, +shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var m=this.dateFormatCache,C=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,p=/[^-+\dA-Z]/g,F=function(D,G){D=String(D);for(G=G||2;D.length<G;)D="0"+D;return D};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)|| +/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(m.masks[e]||e||m.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),k=!0);var K=k?"getUTC":"get",P=b[K+"Date"](),d=b[K+"Day"](),f=b[K+"Month"](),g=b[K+"FullYear"](),x=b[K+"Hours"](),y=b[K+"Minutes"](),u=b[K+"Seconds"]();K=b[K+"Milliseconds"]();var H=k?0:b.getTimezoneOffset(),J={d:P,dd:F(P),ddd:m.i18n.dayNames[d],dddd:m.i18n.dayNames[d+7],m:f+1,mm:F(f+1),mmm:m.i18n.monthNames[f],mmmm:m.i18n.monthNames[f+ +12],yy:String(g).slice(2),yyyy:g,h:x%12||12,hh:F(x%12||12),H:x,HH:F(x),M:y,MM:F(y),s:u,ss:F(u),l:F(K,3),L:F(99<K?Math.round(K/10):K),t:12>x?"a":"p",tt:12>x?"am":"pm",T:12>x?"A":"P",TT:12>x?"AM":"PM",Z:k?"UTC":(String(b).match(C)||[""]).pop().replace(p,""),o:(0<H?"-":"+")+F(100*Math.floor(Math.abs(H)/60)+Math.abs(H)%60,4),S:["th","st","nd","rd"][3<P%10?0:(10!=P%100-P%10)*P%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(D){return D in J?J[D]:D.slice(1, D.length-1)})};Graph.prototype.getLayerForCells=function(b){var e=null;if(0<b.length){for(e=b[0];!this.model.isLayer(e);)e=this.model.getParent(e);for(var k=1;k<b.length;k++)if(!this.model.isAncestor(e,b[k])){e=null;break}}return e}; -Graph.prototype.createLayersDialog=function(b,e){var k=document.createElement("div");k.style.position="absolute";for(var m=this.getModel(),C=m.getChildCount(m.root),p=0;p<C;p++)mxUtils.bind(this,function(E){function K(){m.isVisible(E)?(f.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(d,75)):(f.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(d,25))}var Q=this.convertValueToString(E)||mxResources.get("background")||"Background",d=document.createElement("div");d.style.overflow= -"hidden";d.style.textOverflow="ellipsis";d.style.padding="2px";d.style.whiteSpace="nowrap";d.style.cursor="pointer";d.setAttribute("title",mxResources.get(m.isVisible(E)?"hideIt":"show",[Q]));var f=document.createElement("img");f.setAttribute("draggable","false");f.setAttribute("align","absmiddle");f.setAttribute("border","0");f.style.position="relative";f.style.width="16px";f.style.padding="0px 6px 0 4px";e&&(f.style.filter="invert(100%)",f.style.top="-2px");d.appendChild(f);mxUtils.write(d,Q);k.appendChild(d); -mxEvent.addListener(d,"click",function(){m.setVisible(E,!m.isVisible(E));K();null!=b&&b(E)});K()})(m.getChildAt(m.root,p));return k}; -Graph.prototype.replacePlaceholders=function(b,e,k,m){m=[];if(null!=e){for(var C=0;match=this.placeholderPattern.exec(e);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var E=null;if(match.index>C&&"%"==e.charAt(match.index-1))E=p.substring(1);else{var K=p.substring(1,p.length-1);if("id"==K)E=b.id;else if(0>K.indexOf("{"))for(var Q=b;null==E&&null!=Q;)null!=Q.value&&"object"==typeof Q.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(E=Q.getAttribute(K+"_"+Graph.diagramLanguage)), -null==E&&(E=Q.hasAttribute(K)?null!=Q.getAttribute(K)?Q.getAttribute(K):"":null)),Q=this.model.getParent(Q);null==E&&(E=this.getGlobalVariable(K));null==E&&null!=k&&(E=k[K])}m.push(e.substring(C,match.index)+(null!=E?E:p));C=match.index+p.length}}m.push(e.substring(C))}return m.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var e=[],k=0;k<b.length;k++){var m=this.model.getCell(b[k].id);null!=m&&e.push(m)}this.setSelectionCells(e)}else this.clearSelection()}; +Graph.prototype.createLayersDialog=function(b,e){var k=document.createElement("div");k.style.position="absolute";for(var m=this.getModel(),C=m.getChildCount(m.root),p=0;p<C;p++)mxUtils.bind(this,function(F){function K(){m.isVisible(F)?(f.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(d,75)):(f.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(d,25))}var P=this.convertValueToString(F)||mxResources.get("background")||"Background",d=document.createElement("div");d.style.overflow= +"hidden";d.style.textOverflow="ellipsis";d.style.padding="2px";d.style.whiteSpace="nowrap";d.style.cursor="pointer";d.setAttribute("title",mxResources.get(m.isVisible(F)?"hideIt":"show",[P]));var f=document.createElement("img");f.setAttribute("draggable","false");f.setAttribute("align","absmiddle");f.setAttribute("border","0");f.style.position="relative";f.style.width="16px";f.style.padding="0px 6px 0 4px";e&&(f.style.filter="invert(100%)",f.style.top="-2px");d.appendChild(f);mxUtils.write(d,P);k.appendChild(d); +mxEvent.addListener(d,"click",function(){m.setVisible(F,!m.isVisible(F));K();null!=b&&b(F)});K()})(m.getChildAt(m.root,p));return k}; +Graph.prototype.replacePlaceholders=function(b,e,k,m){m=[];if(null!=e){for(var C=0;match=this.placeholderPattern.exec(e);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var F=null;if(match.index>C&&"%"==e.charAt(match.index-1))F=p.substring(1);else{var K=p.substring(1,p.length-1);if("id"==K)F=b.id;else if(0>K.indexOf("{"))for(var P=b;null==F&&null!=P;)null!=P.value&&"object"==typeof P.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(F=P.getAttribute(K+"_"+Graph.diagramLanguage)), +null==F&&(F=P.hasAttribute(K)?null!=P.getAttribute(K)?P.getAttribute(K):"":null)),P=this.model.getParent(P);null==F&&(F=this.getGlobalVariable(K));null==F&&null!=k&&(F=k[K])}m.push(e.substring(C,match.index)+(null!=F?F:p));C=match.index+p.length}}m.push(e.substring(C))}return m.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var e=[],k=0;k<b.length;k++){var m=this.model.getCell(b[k].id);null!=m&&e.push(m)}this.setSelectionCells(e)}else this.clearSelection()}; Graph.prototype.selectCellForEvent=function(b,e){mxEvent.isShiftDown(e)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),b)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)}; -Graph.prototype.selectTableRange=function(b,e){var k=!1;if(this.isTableCell(b)&&this.isTableCell(e)){var m=this.model.getParent(b),C=this.model.getParent(m),p=this.model.getParent(e);if(C==this.model.getParent(p)){b=m.getIndex(b);m=C.getIndex(m);var E=p.getIndex(e),K=C.getIndex(p);p=Math.max(m,K);e=Math.min(b,E);b=Math.max(b,E);E=[];for(m=Math.min(m,K);m<=p;m++){K=this.model.getChildAt(C,m);for(var Q=e;Q<=b;Q++)E.push(this.model.getChildAt(K,Q))}0<E.length&&(1<E.length||1<this.getSelectionCount()|| -!this.isCellSelected(E[0]))&&(this.setSelectionCells(E),k=!0)}}return k}; +Graph.prototype.selectTableRange=function(b,e){var k=!1;if(this.isTableCell(b)&&this.isTableCell(e)){var m=this.model.getParent(b),C=this.model.getParent(m),p=this.model.getParent(e);if(C==this.model.getParent(p)){b=m.getIndex(b);m=C.getIndex(m);var F=p.getIndex(e),K=C.getIndex(p);p=Math.max(m,K);e=Math.min(b,F);b=Math.max(b,F);F=[];for(m=Math.min(m,K);m<=p;m++){K=this.model.getChildAt(C,m);for(var P=e;P<=b;P++)F.push(this.model.getChildAt(K,P))}0<F.length&&(1<F.length||1<this.getSelectionCount()|| +!this.isCellSelected(F[0]))&&(this.setSelectionCells(F),k=!0)}}return k}; Graph.prototype.snapCellsToGrid=function(b,e){this.getModel().beginUpdate();try{for(var k=0;k<b.length;k++){var m=b[k],C=this.getCellGeometry(m);if(null!=C){C=C.clone();if(this.getModel().isVertex(m))C.x=Math.round(C.x/e)*e,C.y=Math.round(C.y/e)*e,C.width=Math.round(C.width/e)*e,C.height=Math.round(C.height/e)*e;else if(this.getModel().isEdge(m)&&null!=C.points)for(var p=0;p<C.points.length;p++)C.points[p].x=Math.round(C.points[p].x/e)*e,C.points[p].y=Math.round(C.points[p].y/e)*e;this.getModel().setGeometry(m, C)}}}finally{this.getModel().endUpdate()}};Graph.prototype.selectCellsForConnectVertex=function(b,e,k){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=k&&(mxEvent.isTouchEvent(e)?k.update(k.getState(this.view.getState(b[1]))):k.reset())):this.setSelectionCells(b)}; Graph.prototype.isCloneConnectSource=function(b){var e=null;null!=this.layoutManager&&(e=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=e&&e.constructor==mxStackLayout}; -Graph.prototype.connectVertex=function(b,e,k,m,C,p,E,K){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var Q=this.isCloneConnectSource(b),d=Q?b:this.getCompositeParent(b),f=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(d.geometry.x,d.geometry.y);e==mxConstants.DIRECTION_NORTH?(f.x+=d.geometry.width/2,f.y-=k):e== +Graph.prototype.connectVertex=function(b,e,k,m,C,p,F,K){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var P=this.isCloneConnectSource(b),d=P?b:this.getCompositeParent(b),f=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(d.geometry.x,d.geometry.y);e==mxConstants.DIRECTION_NORTH?(f.x+=d.geometry.width/2,f.y-=k):e== mxConstants.DIRECTION_SOUTH?(f.x+=d.geometry.width/2,f.y+=d.geometry.height+k):(f.x=e==mxConstants.DIRECTION_WEST?f.x-k:f.x+(d.geometry.width+k),f.y+=d.geometry.height/2);var g=this.view.getState(this.model.getParent(b));k=this.view.scale;var x=this.view.translate;d=x.x*k;x=x.y*k;null!=g&&this.model.isVertex(g.cell)&&(d=g.x,x=g.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(f.x+=b.parent.geometry.x,f.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(d+f.x*k,x+f.y*k)).grow(40*k);p=null!=p? -this.getCells(0,0,0,0,null,null,p,null,!0):null;g=this.view.getState(b);var z=null,u=null;if(null!=p){p=p.reverse();for(var H=0;H<p.length;H++)if(!this.isCellLocked(p[H])&&!this.model.isEdge(p[H])&&p[H]!=b)if(!this.model.isAncestor(b,p[H])&&this.isContainer(p[H])&&(null==z||p[H]==this.model.getParent(b)))z=p[H];else if(null==u&&this.isCellConnectable(p[H])&&!this.model.isAncestor(p[H],b)&&!this.isSwimlane(p[H])){var J=this.view.getState(p[H]);null==g||null==J||mxUtils.intersects(g,J)||(u=p[H])}}var D= -!mxEvent.isShiftDown(m)||mxEvent.isControlDown(m)||C;D&&("1"!=urlParams.sketch||C)&&(e==mxConstants.DIRECTION_NORTH?f.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?f.y+=b.geometry.height/2:f.x=e==mxConstants.DIRECTION_WEST?f.x-b.geometry.width/2:f.x+b.geometry.width/2);var G=[],V=u;u=z;C=mxUtils.bind(this,function(U){if(null==E||null!=U||null==u&&Q){this.model.beginUpdate();try{if(null==V&&D){var Y=this.getAbsoluteParent(null!=U?U:b);Y=Q?b:this.getCompositeParent(Y);V=null!=U?U:this.duplicateCells([Y], -!1)[0];null!=U&&this.addCells([V],this.model.getParent(b),null,null,null,!0);var O=this.getCellGeometry(V);null!=O&&(null!=U&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?f.y-=O.height/2:e==mxConstants.DIRECTION_SOUTH?f.y+=O.height/2:f.x=e==mxConstants.DIRECTION_WEST?f.x-O.width/2:f.x+O.width/2),O.x=f.x-O.width/2,O.y=f.y-O.height/2);null!=z?(this.addCells([V],z,null,null,null,!0),u=null):D&&!Q&&this.addCells([V],this.getDefaultParent(),null,null,null,!0)}var qa=mxEvent.isControlDown(m)&& -mxEvent.isShiftDown(m)&&D||null==u&&Q?null:this.insertEdge(this.model.getParent(b),null,"",b,V,this.createCurrentEdgeStyle());if(null!=qa&&this.connectionHandler.insertBeforeSource){var oa=null;for(U=b;null!=U.parent&&null!=U.geometry&&U.geometry.relative&&U.parent!=qa.parent;)U=this.model.getParent(U);null!=U&&null!=U.parent&&U.parent==qa.parent&&(oa=U.parent.getIndex(U),this.model.add(U.parent,qa,oa))}null==u&&null!=V&&null!=b.parent&&Q&&e==mxConstants.DIRECTION_WEST&&(oa=b.parent.getIndex(b),this.model.add(b.parent, -V,oa));null!=qa&&G.push(qa);null==u&&null!=V&&G.push(V);null==V&&null!=qa&&qa.geometry.setTerminalPoint(f,!1);null!=qa&&this.fireEvent(new mxEventObject("cellsInserted","cells",[qa]))}finally{this.model.endUpdate()}}if(null!=K)K(G);else return G});if(null==E||null!=V||!D||null==u&&Q)return C(V);E(d+f.x*k,x+f.y*k,C)}; +this.getCells(0,0,0,0,null,null,p,null,!0):null;g=this.view.getState(b);var y=null,u=null;if(null!=p){p=p.reverse();for(var H=0;H<p.length;H++)if(!this.isCellLocked(p[H])&&!this.model.isEdge(p[H])&&p[H]!=b)if(!this.model.isAncestor(b,p[H])&&this.isContainer(p[H])&&(null==y||p[H]==this.model.getParent(b)))y=p[H];else if(null==u&&this.isCellConnectable(p[H])&&!this.model.isAncestor(p[H],b)&&!this.isSwimlane(p[H])){var J=this.view.getState(p[H]);null==g||null==J||mxUtils.intersects(g,J)||(u=p[H])}}var D= +!mxEvent.isShiftDown(m)||mxEvent.isControlDown(m)||C;D&&("1"!=urlParams.sketch||C)&&(e==mxConstants.DIRECTION_NORTH?f.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?f.y+=b.geometry.height/2:f.x=e==mxConstants.DIRECTION_WEST?f.x-b.geometry.width/2:f.x+b.geometry.width/2);var G=[],W=u;u=y;C=mxUtils.bind(this,function(T){if(null==F||null!=T||null==u&&P){this.model.beginUpdate();try{if(null==W&&D){var Z=this.getAbsoluteParent(null!=T?T:b);Z=P?b:this.getCompositeParent(Z);W=null!=T?T:this.duplicateCells([Z], +!1)[0];null!=T&&this.addCells([W],this.model.getParent(b),null,null,null,!0);var N=this.getCellGeometry(W);null!=N&&(null!=T&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?f.y-=N.height/2:e==mxConstants.DIRECTION_SOUTH?f.y+=N.height/2:f.x=e==mxConstants.DIRECTION_WEST?f.x-N.width/2:f.x+N.width/2),N.x=f.x-N.width/2,N.y=f.y-N.height/2);null!=y?(this.addCells([W],y,null,null,null,!0),u=null):D&&!P&&this.addCells([W],this.getDefaultParent(),null,null,null,!0)}var qa=mxEvent.isControlDown(m)&& +mxEvent.isShiftDown(m)&&D||null==u&&P?null:this.insertEdge(this.model.getParent(b),null,"",b,W,this.createCurrentEdgeStyle());if(null!=qa&&this.connectionHandler.insertBeforeSource){var oa=null;for(T=b;null!=T.parent&&null!=T.geometry&&T.geometry.relative&&T.parent!=qa.parent;)T=this.model.getParent(T);null!=T&&null!=T.parent&&T.parent==qa.parent&&(oa=T.parent.getIndex(T),this.model.add(T.parent,qa,oa))}null==u&&null!=W&&null!=b.parent&&P&&e==mxConstants.DIRECTION_WEST&&(oa=b.parent.getIndex(b),this.model.add(b.parent, +W,oa));null!=qa&&G.push(qa);null==u&&null!=W&&G.push(W);null==W&&null!=qa&&qa.geometry.setTerminalPoint(f,!1);null!=qa&&this.fireEvent(new mxEventObject("cellsInserted","cells",[qa]))}finally{this.model.endUpdate()}}if(null!=K)K(G);else return G});if(null==F||null!=W||!D||null==u&&P)return C(W);F(d+f.x*k,x+f.y*k,C)}; Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var e=document.createElement("div"),k=[],m,C=0;C<b.length;C++)if(m=b[C],this.model.isVertex(m)||this.model.isEdge(m))this.isHtmlLabel(m)?(e.innerHTML=this.sanitizeHtml(this.getLabel(m)),m=mxUtils.extractTextWithWhitespace([e])):m=this.getLabel(m),m=mxUtils.trim(m.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<m.length&&k.push(m);return k.join(" ")}; Graph.prototype.convertValueToString=function(b){var e=this.model.getValue(b);if(null!=e&&"object"==typeof e){var k=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){e=b.getAttribute("placeholder");for(var m=b;null==k&&null!=m;)null!=m.value&&"object"==typeof m.value&&(k=m.hasAttribute(e)?null!=m.getAttribute(e)?m.getAttribute(e):"":null),m=this.model.getParent(m)}else k=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=e.getAttribute("label_"+Graph.diagramLanguage)), null==k&&(k=e.getAttribute("label")||"");return k||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),null!=b&&"javascript:"===b.toLowerCase().substring(0,11)&&(b=b.substring(11)),b):null}; @@ -2412,10 +2410,10 @@ Graph.prototype.updateHorizontalStyle=function(b,e){if(null!=b&&null!=e&&null!=t Graph.prototype.replaceDefaultColors=function(b,e){if(null!=e){b=mxUtils.hex2rgb(this.shapeBackgroundColor);var k=mxUtils.hex2rgb(this.shapeForegroundColor);this.replaceDefaultColor(e,mxConstants.STYLE_FONTCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_FILLCOLOR,b,k);this.replaceDefaultColor(e,mxConstants.STYLE_GRADIENTCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_STROKECOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_IMAGE_BORDER,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_IMAGE_BACKGROUND, b,k);this.replaceDefaultColor(e,mxConstants.STYLE_LABEL_BORDERCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_SWIMLANE_FILLCOLOR,b,k);this.replaceDefaultColor(e,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,b,k)}return e};Graph.prototype.replaceDefaultColor=function(b,e,k,m){null!=b&&"default"==b[e]&&null!=k&&(b[e]=this.getDefaultColor(b,e,k,m))};Graph.prototype.getDefaultColor=function(b,e,k,m){e="default"+e.charAt(0).toUpperCase()+e.substring(1);"invert"==b[e]&&(k=m);return k}; Graph.prototype.updateAlternateBounds=function(b,e,k){if(null!=b&&null!=e&&null!=this.layoutManager&&null!=e.alternateBounds){var m=this.layoutManager.getLayout(this.model.getParent(b));null!=m&&m.constructor==mxStackLayout&&(m.horizontal?e.alternateBounds.height=0:e.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(b,e){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(e.style,"moveCells","0")}; -Graph.prototype.foldCells=function(b,e,k,m,C){e=null!=e?e:!1;null==k&&(k=this.getFoldableCells(this.getSelectionCells(),b));if(null!=k){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<k.length;p++){var E=this.view.getState(k[p]),K=this.getCellGeometry(k[p]);if(null!=E&&null!=K){var Q=Math.round(K.width-E.width/this.view.scale),d=Math.round(K.height-E.height/this.view.scale);if(0!=d||0!=Q){var f=this.model.getParent(k[p]),g=this.layoutManager.getLayout(f); -null==g?null!=C&&this.isMoveCellsEvent(C,E)&&this.moveSiblings(E,f,Q,d):null!=C&&mxEvent.isAltDown(C)||g.constructor!=mxStackLayout||g.resizeLast||this.resizeParentStacks(f,g,Q,d)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(k)}}; -Graph.prototype.moveSiblings=function(b,e,k,m){this.model.beginUpdate();try{var C=this.getCellsBeyond(b.x,b.y,e,!0,!0);for(e=0;e<C.length;e++)if(C[e]!=b.cell){var p=this.view.getState(C[e]),E=this.getCellGeometry(C[e]);null!=p&&null!=E&&(E=E.clone(),E.translate(Math.round(k*Math.max(0,Math.min(1,(p.x-b.x)/b.width))),Math.round(m*Math.max(0,Math.min(1,(p.y-b.y)/b.height)))),this.model.setGeometry(C[e],E))}}finally{this.model.endUpdate()}}; -Graph.prototype.resizeParentStacks=function(b,e,k,m){if(null!=this.layoutManager&&null!=e&&e.constructor==mxStackLayout&&!e.resizeLast){this.model.beginUpdate();try{for(var C=e.horizontal;null!=b&&null!=e&&e.constructor==mxStackLayout&&e.horizontal==C&&!e.resizeLast;){var p=this.getCellGeometry(b),E=this.view.getState(b);null!=E&&null!=p&&(p=p.clone(),e.horizontal?p.width+=k+Math.min(0,E.width/this.view.scale-p.width):p.height+=m+Math.min(0,E.height/this.view.scale-p.height),this.model.setGeometry(b, +Graph.prototype.foldCells=function(b,e,k,m,C){e=null!=e?e:!1;null==k&&(k=this.getFoldableCells(this.getSelectionCells(),b));if(null!=k){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<k.length;p++){var F=this.view.getState(k[p]),K=this.getCellGeometry(k[p]);if(null!=F&&null!=K){var P=Math.round(K.width-F.width/this.view.scale),d=Math.round(K.height-F.height/this.view.scale);if(0!=d||0!=P){var f=this.model.getParent(k[p]),g=this.layoutManager.getLayout(f); +null==g?null!=C&&this.isMoveCellsEvent(C,F)&&this.moveSiblings(F,f,P,d):null!=C&&mxEvent.isAltDown(C)||g.constructor!=mxStackLayout||g.resizeLast||this.resizeParentStacks(f,g,P,d)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(k)}}; +Graph.prototype.moveSiblings=function(b,e,k,m){this.model.beginUpdate();try{var C=this.getCellsBeyond(b.x,b.y,e,!0,!0);for(e=0;e<C.length;e++)if(C[e]!=b.cell){var p=this.view.getState(C[e]),F=this.getCellGeometry(C[e]);null!=p&&null!=F&&(F=F.clone(),F.translate(Math.round(k*Math.max(0,Math.min(1,(p.x-b.x)/b.width))),Math.round(m*Math.max(0,Math.min(1,(p.y-b.y)/b.height)))),this.model.setGeometry(C[e],F))}}finally{this.model.endUpdate()}}; +Graph.prototype.resizeParentStacks=function(b,e,k,m){if(null!=this.layoutManager&&null!=e&&e.constructor==mxStackLayout&&!e.resizeLast){this.model.beginUpdate();try{for(var C=e.horizontal;null!=b&&null!=e&&e.constructor==mxStackLayout&&e.horizontal==C&&!e.resizeLast;){var p=this.getCellGeometry(b),F=this.view.getState(b);null!=F&&null!=p&&(p=p.clone(),e.horizontal?p.width+=k+Math.min(0,F.width/this.view.scale-p.width):p.height+=m+Math.min(0,F.height/this.view.scale-p.height),this.model.setGeometry(b, p));b=this.model.getParent(b);e=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var e=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=e.container:"1"==e.container};Graph.prototype.isCellConnectable=function(b){var e=this.getCurrentCellStyle(b);return null!=e.connectable?"0"!=e.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)}; Graph.prototype.isLabelMovable=function(b){var e=this.getCurrentCellStyle(b);return null!=e.movableLabel?"0"!=e.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(b){b=b||this.getDefaultParent();this.isCellLocked(b)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(b,e,k){k=k||this.getDefaultParent();this.isCellLocked(k)||mxGraph.prototype.selectCells.apply(this,arguments)}; Graph.prototype.getSwimlaneAt=function(b,e,k){var m=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(m)&&(m=null);return m};Graph.prototype.isCellFoldable=function(b){var e=this.getCurrentCellStyle(b);return this.foldingEnabled&&"0"!=mxUtils.getValue(e,mxConstants.STYLE_RESIZABLE,"1")&&("1"==e.treeFolding||!this.isCellLocked(b)&&(this.isContainer(b)&&"0"!=e.collapsible||!this.isContainer(b)&&"1"==e.collapsible))}; @@ -2423,7 +2421,7 @@ Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.esc Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)}; Graph.prototype.fitWindow=function(b,e){e=null!=e?e:10;var k=this.container.clientWidth-e,m=this.container.clientHeight-e,C=Math.floor(20*Math.min(k/b.width,m/b.height))/20;this.zoomTo(C);if(mxUtils.hasScrollbars(this.container)){var p=this.view.translate;this.container.scrollTop=(b.y+p.y)*C-Math.max((m-b.height*C)/2+e/2,0);this.container.scrollLeft=(b.x+p.x)*C-Math.max((k-b.width*C)/2+e/2,0)}}; Graph.prototype.getTooltipForCell=function(b){var e="";if(mxUtils.isNode(b.value)){var k=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=b.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==k&&(k=b.value.getAttribute("tooltip"));if(null!=k)null!=k&&this.isReplacePlaceholders(b)&&(k=this.replacePlaceholders(b,k)),e=this.sanitizeHtml(k);else{k=this.builtInProperties;b=b.value.attributes;var m=[];this.isEnabled()&&(k.push("linkTarget"),k.push("link"));for(var C=0;C<b.length;C++)(Graph.translateDiagram&& -"label"==b[C].nodeName||0>mxUtils.indexOf(k,b[C].nodeName))&&0<b[C].nodeValue.length&&m.push({name:b[C].nodeName,value:b[C].nodeValue});m.sort(function(p,E){return p.name<E.name?-1:p.name>E.name?1:0});for(C=0;C<m.length;C++)"link"==m[C].name&&this.isCustomLink(m[C].value)||(e+=("link"!=m[C].name?"<b>"+mxUtils.htmlEntities(m[C].name)+":</b> ":"")+mxUtils.htmlEntities(m[C].value)+"\n");0<e.length&&(e=e.substring(0,e.length-1),mxClient.IS_SVG&&(e='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+ +"label"==b[C].nodeName||0>mxUtils.indexOf(k,b[C].nodeName))&&0<b[C].nodeValue.length&&m.push({name:b[C].nodeName,value:b[C].nodeValue});m.sort(function(p,F){return p.name<F.name?-1:p.name>F.name?1:0});for(C=0;C<m.length;C++)"link"==m[C].name&&this.isCustomLink(m[C].value)||(e+=("link"!=m[C].name?"<b>"+mxUtils.htmlEntities(m[C].name)+":</b> ":"")+mxUtils.htmlEntities(m[C].value)+"\n");0<e.length&&(e=e.substring(0,e.length-1),mxClient.IS_SVG&&(e='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+ e+"</div>"))}}return e};Graph.prototype.getFlowAnimationStyle=function(){var b=document.getElementsByTagName("head")[0];if(null!=b&&null==this.flowAnimationStyle){this.flowAnimationStyle=document.createElement("style");this.flowAnimationStyle.setAttribute("id","geEditorFlowAnimation-"+Editor.guid());this.flowAnimationStyle.type="text/css";var e=this.flowAnimationStyle.getAttribute("id");this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(e);b.appendChild(this.flowAnimationStyle)}return this.flowAnimationStyle}; Graph.prototype.getFlowAnimationStyleCss=function(b){return"."+b+" {\nanimation: "+b+" 0.5s linear;\nanimation-iteration-count: infinite;\n}\n@keyframes "+b+" {\nto {\nstroke-dashoffset: "+-16*this.view.scale+";\n}\n}"};Graph.prototype.stringToBytes=function(b){return Graph.stringToBytes(b)};Graph.prototype.bytesToString=function(b){return Graph.bytesToString(b)};Graph.prototype.compressNode=function(b){return Graph.compressNode(b)};Graph.prototype.compress=function(b,e){return Graph.compress(b,e)}; Graph.prototype.decompress=function(b,e){return Graph.decompress(b,e)};Graph.prototype.zapGremlins=function(b){return Graph.zapGremlins(b)};HoverIcons=function(b){mxEventSource.call(this);this.graph=b;this.init()};mxUtils.extend(HoverIcons,mxEventSource);HoverIcons.prototype.arrowSpacing=2;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15; @@ -2450,201 +2448,201 @@ HoverIcons.prototype.click=function(b,e,k){var m=k.getEvent(),C=k.getGraphX(),p= HoverIcons.prototype.execute=function(b,e,k){k=k.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,e,this.graph.defaultEdgeLength,k,this.graph.isCloneEvent(k),this.graph.isCloneEvent(k)),k,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))}; HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var b=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(b=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));b.grow(this.graph.tolerance);b.grow(this.arrowSpacing); var e=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(e=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var k=null;null!=e&&(b.x-=e.horizontalOffset/2,b.y-=e.verticalOffset/2,b.width+=e.horizontalOffset,b.height+=e.verticalOffset,null!=e.rotationShape&&null!=e.rotationShape.node&&"hidden"!=e.rotationShape.node.style.visibility&&"none"!=e.rotationShape.node.style.display&&null!=e.rotationShape.boundingBox&& -(k=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(K,Q,d){if(null!=k){var f=new mxRectangle(Q,d,K.clientWidth,K.clientHeight);mxUtils.intersects(f,k)&&(K==this.arrowUp?d-=f.y+f.height-k.y:K==this.arrowRight?Q+=k.x+k.width-f.x:K==this.arrowDown?d+=k.y+k.height-f.y:K==this.arrowLeft&&(Q-=f.x+f.width-k.x))}K.style.left=Q+"px";K.style.top=d+"px";mxUtils.setOpacity(K,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y- +(k=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(K,P,d){if(null!=k){var f=new mxRectangle(P,d,K.clientWidth,K.clientHeight);mxUtils.intersects(f,k)&&(K==this.arrowUp?d-=f.y+f.height-k.y:K==this.arrowRight?P+=k.x+k.width-f.x:K==this.arrowDown?d+=k.y+k.height-f.y:K==this.arrowLeft&&(P-=f.x+f.width-k.x))}K.style.left=P+"px";K.style.top=d+"px";mxUtils.setOpacity(K,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y- this.triangleUp.height-this.tolerance));e(this.arrowRight,Math.round(b.x+b.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));e(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(b.y+b.height-this.tolerance));e(this.arrowLeft,Math.round(b.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){e=this.graph.getCellAt(b.x+b.width+this.triangleRight.width/2,this.currentState.getCenterY()); -var m=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),C=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=e&&e==m&&m==C&&C==b&&(b=C=m=e=null);var p=this.graph.getCellGeometry(this.currentState.cell),E=mxUtils.bind(this,function(K,Q){var d=this.graph.model.isVertex(K)&&this.graph.getCellGeometry(K);null==K||this.graph.model.isAncestor(K, -this.currentState.cell)||this.graph.isSwimlane(K)||!(null==d||null==p||d.height<3*p.height&&d.width<3*p.width)?Q.style.visibility="visible":Q.style.visibility="hidden"});E(e,this.arrowRight);E(m,this.arrowLeft);E(C,this.arrowUp);E(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")), +var m=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),C=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=e&&e==m&&m==C&&C==b&&(b=C=m=e=null);var p=this.graph.getCellGeometry(this.currentState.cell),F=mxUtils.bind(this,function(K,P){var d=this.graph.model.isVertex(K)&&this.graph.getCellGeometry(K);null==K||this.graph.model.isAncestor(K, +this.currentState.cell)||this.graph.isSwimlane(K)||!(null==d||null==p||d.height<3*p.height&&d.width<3*p.width)?P.style.visibility="visible":P.style.visibility="hidden"});F(e,this.arrowRight);F(m,this.arrowLeft);F(C,this.arrowUp);F(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")), this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}}; HoverIcons.prototype.computeBoundingBox=function(){var b=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(e){null!=e.parentNode&&(e=new mxRectangle(e.offsetLeft,e.offsetTop,e.offsetWidth,e.offsetHeight),null==b?b=e:b.add(e))});return b}; HoverIcons.prototype.getState=function(b){if(null!=b)if(b=b.cell,this.graph.getModel().contains(b)){if(this.graph.getModel().isVertex(b)&&!this.graph.isCellConnectable(b)){var e=this.graph.getModel().getParent(b);this.graph.getModel().isVertex(e)&&this.graph.isCellConnectable(e)&&(b=e)}if(this.graph.isCellLocked(b)||this.graph.model.isEdge(b))b=null;b=this.graph.view.getState(b);null!=b&&null==b.style&&(b=null)}else b=null;return b}; -HoverIcons.prototype.update=function(b,e,k){if(!this.graph.connectionArrowsEnabled||null!=b&&"0"==mxUtils.getValue(b.style,"allowArrows","1"))this.reset();else{null!=b&&null!=b.cell.geometry&&b.cell.geometry.relative&&this.graph.model.isEdge(b.cell.parent)&&(b=null);var m=null;this.prev!=b||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=b,m=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=b&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()|| -this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=b,this.update(b,e,k))}),this.updateDelay+10))):null!=this.startTime&&(m=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=b&&m<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,e,k)?this.reset(!1):(null!=this.currentState||m>this.activationDelay)&&this.currentState!=b&&(m>this.updateDelay&&null!=b||null==this.bbox||null==e||null==k||!mxUtils.contains(this.bbox, -e,k))&&(null!=b&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(b),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=b&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}}; -HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};Graph.prototype.createParent=function(b,e,k,m,C){b=this.cloneCell(b);for(var p=0;p<k;p++){var E=this.cloneCell(e),K=this.getCellGeometry(E);null!=K&&(K.x+=p*m,K.y+=p*C);b.insert(E)}return b}; -Graph.prototype.createTable=function(b,e,k,m,C,p,E,K,Q){k=null!=k?k:60;m=null!=m?m:40;p=null!=p?p:30;K=null!=K?K:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";Q=null!=Q?Q:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null, -null,null!=C?C:"",0,0,e*k,b*m+(null!=C?p:0),null!=E?E:"shape=table;startSize="+(null!=C?p:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,e*k,m,K),this.createVertex(null,null,"",0,0,k,m,Q),e,k,0),b,0,m)}; -Graph.prototype.setTableValues=function(b,e,k){for(var m=this.model.getChildCells(b,!0),C=0;C<m.length;C++)if(null!=k&&(m[C].value=k[C]),null!=e)for(var p=this.model.getChildCells(m[C],!0),E=0;E<p.length;E++)null!=e[C][E]&&(p[E].value=e[C][E]);return b}; -Graph.prototype.createCrossFunctionalSwimlane=function(b,e,k,m,C,p,E,K,Q){k=null!=k?k:120;m=null!=m?m:120;E=null!=E?E:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";K=null!=K?K:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;"; -Q=null!=Q?Q:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";C=this.createVertex(null,null,null!=C?C:"",0,0,e*k,b*m,null!=p?p:"shape=table;childLayout=tableLayout;"+(null==C?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");p=mxUtils.getValue(this.getCellStyle(C),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);C.geometry.width+=p;C.geometry.height+=p;E=this.createVertex(null, -null,"",0,p,e*k+p,m,E);C.insert(this.createParent(E,this.createVertex(null,null,"",p,0,k,m,K),e,k,0));return 1<b?(E.geometry.y=m+p,this.createParent(C,this.createParent(E,this.createVertex(null,null,"",p,0,k,m,Q),e,k,0),b-1,0,m)):C}; -Graph.prototype.visitTableCells=function(b,e){var k=null,m=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var C=0;C<m.length;C++){for(var p=this.getActualStartSize(m[C],!0),E=this.model.getChildCells(m[C],!0),K=this.getCellStyle(m[C],!0),Q=null,d=[],f=0;f<E.length;f++){var g=this.getCellGeometry(E[f]),x={cell:E[f],rospan:1,colspan:1,row:C,col:f,geo:g};g=null!=g.alternateBounds?g.alternateBounds:g;x.point=new mxPoint(g.width+(null!=Q?Q.point.x:b.x+p.x),g.height+(null!=k&&null!= -k[0]?k[0].point.y:b.y+p.y));x.actual=x;null!=k&&null!=k[f]&&1<k[f].rowspan?(x.rowspan=k[f].rowspan-1,x.colspan=k[f].colspan,x.actual=k[f].actual):null!=Q&&1<Q.colspan?(x.rowspan=Q.rowspan,x.colspan=Q.colspan-1,x.actual=Q.actual):(Q=this.getCurrentCellStyle(E[f],!0),null!=Q&&(x.rowspan=parseInt(Q.rowspan||1),x.colspan=parseInt(Q.colspan||1)));Q=1==mxUtils.getValue(K,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(K,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(x,E.length, -m.length,b.x+(Q?p.x:0),b.y+(Q?p.y:0));d.push(x);Q=x}k=d}};Graph.prototype.getTableLines=function(b,e,k){var m=[],C=[];(e||k)&&this.visitTableCells(b,mxUtils.bind(this,function(p,E,K,Q,d){e&&p.row<K-1&&(null==m[p.row]&&(m[p.row]=[new mxPoint(Q,p.point.y)]),1<p.rowspan&&m[p.row].push(null),m[p.row].push(p.point));k&&p.col<E-1&&(null==C[p.col]&&(C[p.col]=[new mxPoint(p.point.x,d)]),1<p.colspan&&C[p.col].push(null),C[p.col].push(p.point))}));return m.concat(C)}; +HoverIcons.prototype.update=function(b,e,k){if(!this.graph.connectionArrowsEnabled||null!=this.graph.freehand&&this.graph.freehand.isDrawing()||null!=b&&"0"==mxUtils.getValue(b.style,"allowArrows","1"))this.reset();else{null!=b&&null!=b.cell.geometry&&b.cell.geometry.relative&&this.graph.model.isEdge(b.cell.parent)&&(b=null);var m=null;this.prev!=b||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=b,m=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=b&&(this.updateThread= +window.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=b,this.update(b,e,k))}),this.updateDelay+10))):null!=this.startTime&&(m=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=b&&m<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,e,k)?this.reset(!1):(null!=this.currentState||m>this.activationDelay)&&this.currentState!=b&&(m>this.updateDelay&&null!= +b||null==this.bbox||null==e||null==k||!mxUtils.contains(this.bbox,e,k))&&(null!=b&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(b),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=b&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}}; +HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};Graph.prototype.createParent=function(b,e,k,m,C){b=this.cloneCell(b);for(var p=0;p<k;p++){var F=this.cloneCell(e),K=this.getCellGeometry(F);null!=K&&(K.x+=p*m,K.y+=p*C);b.insert(F)}return b}; +Graph.prototype.createTable=function(b,e,k,m,C,p,F,K,P){k=null!=k?k:60;m=null!=m?m:40;p=null!=p?p:30;K=null!=K?K:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";P=null!=P?P:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null, +null,null!=C?C:"",0,0,e*k,b*m+(null!=C?p:0),null!=F?F:"shape=table;startSize="+(null!=C?p:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,e*k,m,K),this.createVertex(null,null,"",0,0,k,m,P),e,k,0),b,0,m)}; +Graph.prototype.setTableValues=function(b,e,k){for(var m=this.model.getChildCells(b,!0),C=0;C<m.length;C++)if(null!=k&&(m[C].value=k[C]),null!=e)for(var p=this.model.getChildCells(m[C],!0),F=0;F<p.length;F++)null!=e[C][F]&&(p[F].value=e[C][F]);return b}; +Graph.prototype.createCrossFunctionalSwimlane=function(b,e,k,m,C,p,F,K,P){k=null!=k?k:120;m=null!=m?m:120;F=null!=F?F:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";K=null!=K?K:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;"; +P=null!=P?P:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";C=this.createVertex(null,null,null!=C?C:"",0,0,e*k,b*m,null!=p?p:"shape=table;childLayout=tableLayout;"+(null==C?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");p=mxUtils.getValue(this.getCellStyle(C),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);C.geometry.width+=p;C.geometry.height+=p;F=this.createVertex(null, +null,"",0,p,e*k+p,m,F);C.insert(this.createParent(F,this.createVertex(null,null,"",p,0,k,m,K),e,k,0));return 1<b?(F.geometry.y=m+p,this.createParent(C,this.createParent(F,this.createVertex(null,null,"",p,0,k,m,P),e,k,0),b-1,0,m)):C}; +Graph.prototype.visitTableCells=function(b,e){var k=null,m=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var C=0;C<m.length;C++){for(var p=this.getActualStartSize(m[C],!0),F=this.model.getChildCells(m[C],!0),K=this.getCellStyle(m[C],!0),P=null,d=[],f=0;f<F.length;f++){var g=this.getCellGeometry(F[f]),x={cell:F[f],rospan:1,colspan:1,row:C,col:f,geo:g};g=null!=g.alternateBounds?g.alternateBounds:g;x.point=new mxPoint(g.width+(null!=P?P.point.x:b.x+p.x),g.height+(null!=k&&null!= +k[0]?k[0].point.y:b.y+p.y));x.actual=x;null!=k&&null!=k[f]&&1<k[f].rowspan?(x.rowspan=k[f].rowspan-1,x.colspan=k[f].colspan,x.actual=k[f].actual):null!=P&&1<P.colspan?(x.rowspan=P.rowspan,x.colspan=P.colspan-1,x.actual=P.actual):(P=this.getCurrentCellStyle(F[f],!0),null!=P&&(x.rowspan=parseInt(P.rowspan||1),x.colspan=parseInt(P.colspan||1)));P=1==mxUtils.getValue(K,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(K,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(x,F.length, +m.length,b.x+(P?p.x:0),b.y+(P?p.y:0));d.push(x);P=x}k=d}};Graph.prototype.getTableLines=function(b,e,k){var m=[],C=[];(e||k)&&this.visitTableCells(b,mxUtils.bind(this,function(p,F,K,P,d){e&&p.row<K-1&&(null==m[p.row]&&(m[p.row]=[new mxPoint(P,p.point.y)]),1<p.rowspan&&m[p.row].push(null),m[p.row].push(p.point));k&&p.col<F-1&&(null==C[p.col]&&(C[p.col]=[new mxPoint(p.point.x,d)]),1<p.colspan&&C[p.col].push(null),C[p.col].push(p.point))}));return m.concat(C)}; Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};Graph.prototype.isStack=function(b){b=this.getCellStyle(b);return null!=b&&"stackLayout"==b.childLayout}; Graph.prototype.isStackChild=function(b){return this.model.isVertex(b)&&this.isStack(this.model.getParent(b))}; -Graph.prototype.setTableRowHeight=function(b,e,k){k=null!=k?k:!0;var m=this.getModel();m.beginUpdate();try{var C=this.getCellGeometry(b);if(null!=C){C=C.clone();C.height+=e;m.setGeometry(b,C);var p=m.getParent(b),E=m.getChildCells(p,!0);if(!k){var K=mxUtils.indexOf(E,b);if(K<E.length-1){var Q=E[K+1],d=this.getCellGeometry(Q);null!=d&&(d=d.clone(),d.y+=e,d.height-=e,m.setGeometry(Q,d))}}var f=this.getCellGeometry(p);null!=f&&(k||(k=b==E[E.length-1]),k&&(f=f.clone(),f.height+=e,m.setGeometry(p,f)))}}finally{m.endUpdate()}}; -Graph.prototype.setTableColumnWidth=function(b,e,k){k=null!=k?k:!1;var m=this.getModel(),C=m.getParent(b),p=m.getParent(C),E=m.getChildCells(C,!0);b=mxUtils.indexOf(E,b);var K=b==E.length-1;m.beginUpdate();try{for(var Q=m.getChildCells(p,!0),d=0;d<Q.length;d++){C=Q[d];E=m.getChildCells(C,!0);var f=E[b],g=this.getCellGeometry(f);null!=g&&(g=g.clone(),g.width+=e,null!=g.alternateBounds&&(g.alternateBounds.width+=e),m.setGeometry(f,g));b<E.length-1&&(f=E[b+1],g=this.getCellGeometry(f),null!=g&&(g=g.clone(), +Graph.prototype.setTableRowHeight=function(b,e,k){k=null!=k?k:!0;var m=this.getModel();m.beginUpdate();try{var C=this.getCellGeometry(b);if(null!=C){C=C.clone();C.height+=e;m.setGeometry(b,C);var p=m.getParent(b),F=m.getChildCells(p,!0);if(!k){var K=mxUtils.indexOf(F,b);if(K<F.length-1){var P=F[K+1],d=this.getCellGeometry(P);null!=d&&(d=d.clone(),d.y+=e,d.height-=e,m.setGeometry(P,d))}}var f=this.getCellGeometry(p);null!=f&&(k||(k=b==F[F.length-1]),k&&(f=f.clone(),f.height+=e,m.setGeometry(p,f)))}}finally{m.endUpdate()}}; +Graph.prototype.setTableColumnWidth=function(b,e,k){k=null!=k?k:!1;var m=this.getModel(),C=m.getParent(b),p=m.getParent(C),F=m.getChildCells(C,!0);b=mxUtils.indexOf(F,b);var K=b==F.length-1;m.beginUpdate();try{for(var P=m.getChildCells(p,!0),d=0;d<P.length;d++){C=P[d];F=m.getChildCells(C,!0);var f=F[b],g=this.getCellGeometry(f);null!=g&&(g=g.clone(),g.width+=e,null!=g.alternateBounds&&(g.alternateBounds.width+=e),m.setGeometry(f,g));b<F.length-1&&(f=F[b+1],g=this.getCellGeometry(f),null!=g&&(g=g.clone(), g.x+=e,k||(g.width-=e,null!=g.alternateBounds&&(g.alternateBounds.width-=e)),m.setGeometry(f,g)))}if(K||k){var x=this.getCellGeometry(p);null!=x&&(x=x.clone(),x.width+=e,m.setGeometry(p,x))}null!=this.layoutManager&&this.layoutManager.executeLayout(p)}finally{m.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1}; TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,e){for(var k=0,m=0;m<b.length;m++)if(!this.isVertexIgnored(b[m])){var C=this.graph.getCellGeometry(b[m]);null!=C&&(k+=e?C.width:C.height)}return k}; -TableLayout.prototype.getRowLayout=function(b,e){var k=this.graph.model.getChildCells(b,!0),m=this.graph.getActualStartSize(b,!0);b=this.getSize(k,!0);e=e-m.x-m.width;var C=[];m=m.x;for(var p=0;p<k.length;p++){var E=this.graph.getCellGeometry(k[p]);null!=E&&(m+=(null!=E.alternateBounds?E.alternateBounds.width:E.width)*e/b,C.push(Math.round(m)))}return C}; -TableLayout.prototype.layoutRow=function(b,e,k,m){var C=this.graph.getModel(),p=C.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var E=b.x,K=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var Q=0;Q<p.length;Q++){var d=this.graph.getCellGeometry(p[Q]);null!=d&&(d=d.clone(),d.y=b.y,d.height=k-b.y-b.height,null!=e?(d.x=e[Q],d.width=e[Q+1]-d.x,Q==p.length-1&&Q<e.length-2&&(d.width=m-d.x-b.x-b.width)):(d.x=E,E+=d.width,Q==p.length-1?d.width=m-b.x-b.width-K:K+=d.width),d.alternateBounds=new mxRectangle(0, -0,d.width,d.height),C.setGeometry(p[Q],d))}return K}; -TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),k=this.graph.getCellGeometry(b),m=this.graph.getCellStyle(b),C="1"==mxUtils.getValue(m,"resizeLastRow","0"),p="1"==mxUtils.getValue(m,"resizeLast","0");m="1"==mxUtils.getValue(m,"fixedRows","0");var E=this.graph.getModel(),K=0;E.beginUpdate();try{for(var Q=k.height-e.y-e.height,d=k.width-e.x-e.width,f=E.getChildCells(b,!0),g=0;g<f.length;g++)E.setVisible(f[g],!0);var x=this.getSize(f,!1);if(0<Q&&0<d&&0< -f.length&&0<x){if(C){var z=this.graph.getCellGeometry(f[f.length-1]);null!=z&&(z=z.clone(),z.height=Q-x+z.height,E.setGeometry(f[f.length-1],z))}var u=p?null:this.getRowLayout(f[0],d),H=[],J=e.y;for(g=0;g<f.length;g++)z=this.graph.getCellGeometry(f[g]),null!=z&&(z=z.clone(),z.x=e.x,z.width=d,z.y=Math.round(J),J=C||m?J+z.height:J+z.height/x*Q,z.height=Math.round(J)-z.y,E.setGeometry(f[g],z)),K=Math.max(K,this.layoutRow(f[g],u,z.height,d,H));m&&Q<x&&(k=k.clone(),k.height=J+e.height,E.setGeometry(b, -k));p&&d<K+Graph.minTableColumnWidth&&(k=k.clone(),k.width=K+e.width+e.x+Graph.minTableColumnWidth,E.setGeometry(b,k));this.graph.visitTableCells(b,mxUtils.bind(this,function(D){E.setVisible(D.cell,D.actual.cell==D.cell);if(D.actual.cell!=D.cell){if(D.actual.row==D.row){var G=null!=D.geo.alternateBounds?D.geo.alternateBounds:D.geo;D.actual.geo.width+=G.width}D.actual.col==D.col&&(G=null!=D.geo.alternateBounds?D.geo.alternateBounds:D.geo,D.actual.geo.height+=G.height)}}))}else for(g=0;g<f.length;g++)E.setVisible(f[g], -!1)}finally{E.endUpdate()}}}; +TableLayout.prototype.getRowLayout=function(b,e){var k=this.graph.model.getChildCells(b,!0),m=this.graph.getActualStartSize(b,!0);b=this.getSize(k,!0);e=e-m.x-m.width;var C=[];m=m.x;for(var p=0;p<k.length;p++){var F=this.graph.getCellGeometry(k[p]);null!=F&&(m+=(null!=F.alternateBounds?F.alternateBounds.width:F.width)*e/b,C.push(Math.round(m)))}return C}; +TableLayout.prototype.layoutRow=function(b,e,k,m){var C=this.graph.getModel(),p=C.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var F=b.x,K=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var P=0;P<p.length;P++){var d=this.graph.getCellGeometry(p[P]);null!=d&&(d=d.clone(),d.y=b.y,d.height=k-b.y-b.height,null!=e?(d.x=e[P],d.width=e[P+1]-d.x,P==p.length-1&&P<e.length-2&&(d.width=m-d.x-b.x-b.width)):(d.x=F,F+=d.width,P==p.length-1?d.width=m-b.x-b.width-K:K+=d.width),d.alternateBounds=new mxRectangle(0, +0,d.width,d.height),C.setGeometry(p[P],d))}return K}; +TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),k=this.graph.getCellGeometry(b),m=this.graph.getCellStyle(b),C="1"==mxUtils.getValue(m,"resizeLastRow","0"),p="1"==mxUtils.getValue(m,"resizeLast","0");m="1"==mxUtils.getValue(m,"fixedRows","0");var F=this.graph.getModel(),K=0;F.beginUpdate();try{for(var P=k.height-e.y-e.height,d=k.width-e.x-e.width,f=F.getChildCells(b,!0),g=0;g<f.length;g++)F.setVisible(f[g],!0);var x=this.getSize(f,!1);if(0<P&&0<d&&0< +f.length&&0<x){if(C){var y=this.graph.getCellGeometry(f[f.length-1]);null!=y&&(y=y.clone(),y.height=P-x+y.height,F.setGeometry(f[f.length-1],y))}var u=p?null:this.getRowLayout(f[0],d),H=[],J=e.y;for(g=0;g<f.length;g++)y=this.graph.getCellGeometry(f[g]),null!=y&&(y=y.clone(),y.x=e.x,y.width=d,y.y=Math.round(J),J=C||m?J+y.height:J+y.height/x*P,y.height=Math.round(J)-y.y,F.setGeometry(f[g],y)),K=Math.max(K,this.layoutRow(f[g],u,y.height,d,H));m&&P<x&&(k=k.clone(),k.height=J+e.height,F.setGeometry(b, +k));p&&d<K+Graph.minTableColumnWidth&&(k=k.clone(),k.width=K+e.width+e.x+Graph.minTableColumnWidth,F.setGeometry(b,k));this.graph.visitTableCells(b,mxUtils.bind(this,function(D){F.setVisible(D.cell,D.actual.cell==D.cell);if(D.actual.cell!=D.cell){if(D.actual.row==D.row){var G=null!=D.geo.alternateBounds?D.geo.alternateBounds:D.geo;D.actual.geo.width+=G.width}D.actual.col==D.col&&(G=null!=D.geo.alternateBounds?D.geo.alternateBounds:D.geo,D.actual.geo.height+=G.height)}}))}else for(g=0;g<f.length;g++)F.setVisible(f[g], +!1)}finally{F.endUpdate()}}}; (function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(f,g){g=null!=g?g:!0;var x=this.getState(f);null!=x&&g&&this.graph.model.isEdge(x.cell)&&null!=x.style&&1!=x.style[mxConstants.STYLE_CURVED]&&!x.invalid&&this.updateLineJumps(x)&&this.graph.cellRenderer.redraw(x,!1,this.isRendering());x=e.apply(this, arguments);null!=x&&g&&this.graph.model.isEdge(x.cell)&&null!=x.style&&1!=x.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(x);return x};var k=mxShape.prototype.paint;mxShape.prototype.paint=function(){k.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var f=this.node.getElementsByTagName("path");if(1<f.length){"1"!=mxUtils.getValue(this.state.style, mxConstants.STYLE_DASHED,"0")&&f[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var g=this.state.view.graph.getFlowAnimationStyle();null!=g&&f[1].setAttribute("class",g.getAttribute("id"))}}};var m=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(f,g){return m.apply(this,arguments)||null!=f.routedPoints&&null!=g.routedPoints&&!mxUtils.equalPoints(g.routedPoints,f.routedPoints)};var C=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState= -function(f){C.apply(this,arguments);this.graph.model.isEdge(f.cell)&&1!=f.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(f)};mxGraphView.prototype.updateLineJumps=function(f){var g=f.absolutePoints;if(Graph.lineJumpsEnabled){var x=null!=f.routedPoints,z=null;if(null!=g&&null!=this.validEdges&&"none"!==mxUtils.getValue(f.style,"jumpStyle","none")){var u=function(da,ia,L){var Z=new mxPoint(ia,L);Z.type=da;z.push(Z);Z=null!=f.routedPoints?f.routedPoints[z.length-1]:null;return null==Z||Z.type!= -da||Z.x!=ia||Z.y!=L},H=.5*this.scale;x=!1;z=[];for(var J=0;J<g.length-1;J++){for(var D=g[J+1],G=g[J],V=[],U=g[J+2];J<g.length-2&&mxUtils.ptSegDistSq(G.x,G.y,U.x,U.y,D.x,D.y)<1*this.scale*this.scale;)D=U,J++,U=g[J+2];x=u(0,G.x,G.y)||x;for(var Y=0;Y<this.validEdges.length;Y++){var O=this.validEdges[Y],qa=O.absolutePoints;if(null!=qa&&mxUtils.intersects(f,O)&&"1"!=O.style.noJump)for(O=0;O<qa.length-1;O++){var oa=qa[O+1],aa=qa[O];for(U=qa[O+2];O<qa.length-2&&mxUtils.ptSegDistSq(aa.x,aa.y,U.x,U.y,oa.x, -oa.y)<1*this.scale*this.scale;)oa=U,O++,U=qa[O+2];U=mxUtils.intersection(G.x,G.y,D.x,D.y,aa.x,aa.y,oa.x,oa.y);if(null!=U&&(Math.abs(U.x-G.x)>H||Math.abs(U.y-G.y)>H)&&(Math.abs(U.x-D.x)>H||Math.abs(U.y-D.y)>H)&&(Math.abs(U.x-aa.x)>H||Math.abs(U.y-aa.y)>H)&&(Math.abs(U.x-oa.x)>H||Math.abs(U.y-oa.y)>H)){oa=U.x-G.x;aa=U.y-G.y;U={distSq:oa*oa+aa*aa,x:U.x,y:U.y};for(oa=0;oa<V.length;oa++)if(V[oa].distSq>U.distSq){V.splice(oa,0,U);U=null;break}null==U||0!=V.length&&V[V.length-1].x===U.x&&V[V.length-1].y=== -U.y||V.push(U)}}}for(O=0;O<V.length;O++)x=u(1,V[O].x,V[O].y)||x}U=g[g.length-1];x=u(0,U.x,U.y)||x}f.routedPoints=z;return x}return!1};var p=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(f,g,x){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)p.apply(this,arguments);else{var z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/ -2,u=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,H=mxUtils.getValue(this.style,"jumpStyle","none"),J=!0,D=null,G=null,V=[],U=null;f.begin();for(var Y=0;Y<this.state.routedPoints.length;Y++){var O=this.state.routedPoints[Y],qa=new mxPoint(O.x/this.scale,O.y/this.scale);0==Y?qa=g[0]:Y==this.state.routedPoints.length-1&&(qa=g[g.length-1]);var oa=!1;if(null!=D&&1==O.type){var aa=this.state.routedPoints[Y+1];O=aa.x/this.scale-qa.x;aa=aa.y/this.scale-qa.y; -O=O*O+aa*aa;null==U&&(U=new mxPoint(qa.x-D.x,qa.y-D.y),G=Math.sqrt(U.x*U.x+U.y*U.y),0<G?(U.x=U.x*u/G,U.y=U.y*u/G):U=null);O>u*u&&0<G&&(O=D.x-qa.x,aa=D.y-qa.y,O=O*O+aa*aa,O>u*u&&(oa=new mxPoint(qa.x-U.x,qa.y-U.y),O=new mxPoint(qa.x+U.x,qa.y+U.y),V.push(oa),this.addPoints(f,V,x,z,!1,null,J),V=0>Math.round(U.x)||0==Math.round(U.x)&&0>=Math.round(U.y)?1:-1,J=!1,"sharp"==H?(f.lineTo(oa.x-U.y*V,oa.y+U.x*V),f.lineTo(O.x-U.y*V,O.y+U.x*V),f.lineTo(O.x,O.y)):"line"==H?(f.moveTo(oa.x+U.y*V,oa.y-U.x*V),f.lineTo(oa.x- -U.y*V,oa.y+U.x*V),f.moveTo(O.x-U.y*V,O.y+U.x*V),f.lineTo(O.x+U.y*V,O.y-U.x*V),f.moveTo(O.x,O.y)):"arc"==H?(V*=1.3,f.curveTo(oa.x-U.y*V,oa.y+U.x*V,O.x-U.y*V,O.y+U.x*V,O.x,O.y)):(f.moveTo(O.x,O.y),J=!0),V=[O],oa=!0))}else U=null;oa||(V.push(qa),D=qa)}this.addPoints(f,V,x,z,!1,null,J);f.stroke()}};var E=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(f,g,x,z){return null!=g&&"centerPerimeter"==g.style[mxConstants.STYLE_PERIMETER]?new mxPoint(g.getCenterX(), -g.getCenterY()):E.apply(this,arguments)};var K=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(f,g,x,z){if(null==g||null==f||"1"!=g.style.snapToPoint&&"1"!=f.style.snapToPoint)K.apply(this,arguments);else{g=this.getTerminalPort(f,g,z);var u=this.getNextPoint(f,x,z),H=this.graph.isOrthogonal(f),J=mxUtils.toRadians(Number(g.style[mxConstants.STYLE_ROTATION]||"0")),D=new mxPoint(g.getCenterX(),g.getCenterY());if(0!=J){var G=Math.cos(-J),V= -Math.sin(-J);u=mxUtils.getRotatedPoint(u,G,V,D)}G=parseFloat(f.style[mxConstants.STYLE_PERIMETER_SPACING]||0);G+=parseFloat(f.style[z?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);u=this.getPerimeterPoint(g,u,0==J&&H,G);0!=J&&(G=Math.cos(J),V=Math.sin(J),u=mxUtils.getRotatedPoint(u,G,V,D));f.setAbsoluteTerminalPoint(this.snapToAnchorPoint(f,g,x,z,u),z)}};mxGraphView.prototype.snapToAnchorPoint=function(f,g,x,z,u){if(null!=g&&null!=f){f=this.graph.getAllConnectionConstraints(g); -z=x=null;if(null!=f)for(var H=0;H<f.length;H++){var J=this.graph.getConnectionPoint(g,f[H]);if(null!=J){var D=(J.x-u.x)*(J.x-u.x)+(J.y-u.y)*(J.y-u.y);if(null==z||D<z)x=J,z=D}}null!=x&&(u=x)}return u};var Q=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(f,g,x){var z=Q.apply(this,arguments);"1"==f.getAttribute("placeholders")&&null!=x.state&&(z=x.state.view.graph.replacePlaceholders(x.state.cell,z));return z};var d=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape= -function(f){if(null!=f.style&&"undefined"!==typeof pako){var g=mxUtils.getValue(f.style,mxConstants.STYLE_SHAPE,null);if(null!=g&&"string"===typeof g&&"stencil("==g.substring(0,8))try{var x=g.substring(8,g.length-1),z=mxUtils.parseXml(Graph.decompress(x));return new mxShape(new mxStencil(z.documentElement))}catch(u){null!=window.console&&console.log("Error in shape: "+u)}}return d.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0; +function(f){C.apply(this,arguments);this.graph.model.isEdge(f.cell)&&1!=f.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(f)};mxGraphView.prototype.updateLineJumps=function(f){var g=f.absolutePoints;if(Graph.lineJumpsEnabled){var x=null!=f.routedPoints,y=null;if(null!=g&&null!=this.validEdges&&"none"!==mxUtils.getValue(f.style,"jumpStyle","none")){var u=function(fa,ia,M){var aa=new mxPoint(ia,M);aa.type=fa;y.push(aa);aa=null!=f.routedPoints?f.routedPoints[y.length-1]:null;return null==aa||aa.type!= +fa||aa.x!=ia||aa.y!=M},H=.5*this.scale;x=!1;y=[];for(var J=0;J<g.length-1;J++){for(var D=g[J+1],G=g[J],W=[],T=g[J+2];J<g.length-2&&mxUtils.ptSegDistSq(G.x,G.y,T.x,T.y,D.x,D.y)<1*this.scale*this.scale;)D=T,J++,T=g[J+2];x=u(0,G.x,G.y)||x;for(var Z=0;Z<this.validEdges.length;Z++){var N=this.validEdges[Z],qa=N.absolutePoints;if(null!=qa&&mxUtils.intersects(f,N)&&"1"!=N.style.noJump)for(N=0;N<qa.length-1;N++){var oa=qa[N+1],S=qa[N];for(T=qa[N+2];N<qa.length-2&&mxUtils.ptSegDistSq(S.x,S.y,T.x,T.y,oa.x, +oa.y)<1*this.scale*this.scale;)oa=T,N++,T=qa[N+2];T=mxUtils.intersection(G.x,G.y,D.x,D.y,S.x,S.y,oa.x,oa.y);if(null!=T&&(Math.abs(T.x-G.x)>H||Math.abs(T.y-G.y)>H)&&(Math.abs(T.x-D.x)>H||Math.abs(T.y-D.y)>H)&&(Math.abs(T.x-S.x)>H||Math.abs(T.y-S.y)>H)&&(Math.abs(T.x-oa.x)>H||Math.abs(T.y-oa.y)>H)){oa=T.x-G.x;S=T.y-G.y;T={distSq:oa*oa+S*S,x:T.x,y:T.y};for(oa=0;oa<W.length;oa++)if(W[oa].distSq>T.distSq){W.splice(oa,0,T);T=null;break}null==T||0!=W.length&&W[W.length-1].x===T.x&&W[W.length-1].y===T.y|| +W.push(T)}}}for(N=0;N<W.length;N++)x=u(1,W[N].x,W[N].y)||x}T=g[g.length-1];x=u(0,T.x,T.y)||x}f.routedPoints=y;return x}return!1};var p=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(f,g,x){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)p.apply(this,arguments);else{var y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/ +2,u=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,H=mxUtils.getValue(this.style,"jumpStyle","none"),J=!0,D=null,G=null,W=[],T=null;f.begin();for(var Z=0;Z<this.state.routedPoints.length;Z++){var N=this.state.routedPoints[Z],qa=new mxPoint(N.x/this.scale,N.y/this.scale);0==Z?qa=g[0]:Z==this.state.routedPoints.length-1&&(qa=g[g.length-1]);var oa=!1;if(null!=D&&1==N.type){var S=this.state.routedPoints[Z+1];N=S.x/this.scale-qa.x;S=S.y/this.scale-qa.y;N= +N*N+S*S;null==T&&(T=new mxPoint(qa.x-D.x,qa.y-D.y),G=Math.sqrt(T.x*T.x+T.y*T.y),0<G?(T.x=T.x*u/G,T.y=T.y*u/G):T=null);N>u*u&&0<G&&(N=D.x-qa.x,S=D.y-qa.y,N=N*N+S*S,N>u*u&&(oa=new mxPoint(qa.x-T.x,qa.y-T.y),N=new mxPoint(qa.x+T.x,qa.y+T.y),W.push(oa),this.addPoints(f,W,x,y,!1,null,J),W=0>Math.round(T.x)||0==Math.round(T.x)&&0>=Math.round(T.y)?1:-1,J=!1,"sharp"==H?(f.lineTo(oa.x-T.y*W,oa.y+T.x*W),f.lineTo(N.x-T.y*W,N.y+T.x*W),f.lineTo(N.x,N.y)):"line"==H?(f.moveTo(oa.x+T.y*W,oa.y-T.x*W),f.lineTo(oa.x- +T.y*W,oa.y+T.x*W),f.moveTo(N.x-T.y*W,N.y+T.x*W),f.lineTo(N.x+T.y*W,N.y-T.x*W),f.moveTo(N.x,N.y)):"arc"==H?(W*=1.3,f.curveTo(oa.x-T.y*W,oa.y+T.x*W,N.x-T.y*W,N.y+T.x*W,N.x,N.y)):(f.moveTo(N.x,N.y),J=!0),W=[N],oa=!0))}else T=null;oa||(W.push(qa),D=qa)}this.addPoints(f,W,x,y,!1,null,J);f.stroke()}};var F=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(f,g,x,y){return null!=g&&"centerPerimeter"==g.style[mxConstants.STYLE_PERIMETER]?new mxPoint(g.getCenterX(), +g.getCenterY()):F.apply(this,arguments)};var K=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(f,g,x,y){if(null==g||null==f||"1"!=g.style.snapToPoint&&"1"!=f.style.snapToPoint)K.apply(this,arguments);else{g=this.getTerminalPort(f,g,y);var u=this.getNextPoint(f,x,y),H=this.graph.isOrthogonal(f),J=mxUtils.toRadians(Number(g.style[mxConstants.STYLE_ROTATION]||"0")),D=new mxPoint(g.getCenterX(),g.getCenterY());if(0!=J){var G=Math.cos(-J),W= +Math.sin(-J);u=mxUtils.getRotatedPoint(u,G,W,D)}G=parseFloat(f.style[mxConstants.STYLE_PERIMETER_SPACING]||0);G+=parseFloat(f.style[y?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);u=this.getPerimeterPoint(g,u,0==J&&H,G);0!=J&&(G=Math.cos(J),W=Math.sin(J),u=mxUtils.getRotatedPoint(u,G,W,D));f.setAbsoluteTerminalPoint(this.snapToAnchorPoint(f,g,x,y,u),y)}};mxGraphView.prototype.snapToAnchorPoint=function(f,g,x,y,u){if(null!=g&&null!=f){f=this.graph.getAllConnectionConstraints(g); +y=x=null;if(null!=f)for(var H=0;H<f.length;H++){var J=this.graph.getConnectionPoint(g,f[H]);if(null!=J){var D=(J.x-u.x)*(J.x-u.x)+(J.y-u.y)*(J.y-u.y);if(null==y||D<y)x=J,y=D}}null!=x&&(u=x)}return u};var P=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(f,g,x){var y=P.apply(this,arguments);"1"==f.getAttribute("placeholders")&&null!=x.state&&(y=x.state.view.graph.replacePlaceholders(x.state.cell,y));return y};var d=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape= +function(f){if(null!=f.style&&"undefined"!==typeof pako){var g=mxUtils.getValue(f.style,mxConstants.STYLE_SHAPE,null);if(null!=g&&"string"===typeof g&&"stencil("==g.substring(0,8))try{var x=g.substring(8,g.length-1),y=mxUtils.parseXml(Graph.decompress(x));return new mxShape(new mxStencil(y.documentElement))}catch(u){null!=window.console&&console.log("Error in shape: "+u)}}return d.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0; mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={}; mxStencilRegistry.getStencil=function(b){var e=mxStencilRegistry.stencils[b];if(null==e&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var k=mxStencilRegistry.getBasenameForStencil(b);if(null!=k){e=mxStencilRegistry.libraries[k];if(null!=e){if(null==mxStencilRegistry.packages[k]){for(var m=0;m<e.length;m++){var C=e[m];if(!mxStencilRegistry.filesLoaded[C])if(mxStencilRegistry.filesLoaded[C]=!0,".xml"==C.toLowerCase().substring(C.length-4,C.length))mxStencilRegistry.loadStencilSet(C, -null);else if(".js"==C.toLowerCase().substring(C.length-3,C.length))try{if(mxStencilRegistry.allowEval){var p=mxUtils.load(C);null!=p&&200<=p.getStatus()&&299>=p.getStatus()&&eval.call(window,p.getText())}}catch(E){null!=window.console&&console.log("error in getStencil:",b,k,e,C,E)}}mxStencilRegistry.packages[k]=1}}else k=k.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+k+".xml",null);e=mxStencilRegistry.stencils[b]}}return e}; +null);else if(".js"==C.toLowerCase().substring(C.length-3,C.length))try{if(mxStencilRegistry.allowEval){var p=mxUtils.load(C);null!=p&&200<=p.getStatus()&&299>=p.getStatus()&&eval.call(window,p.getText())}}catch(F){null!=window.console&&console.log("error in getStencil:",b,k,e,C,F)}}mxStencilRegistry.packages[k]=1}}else k=k.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+k+".xml",null);e=mxStencilRegistry.stencils[b]}}return e}; mxStencilRegistry.getBasenameForStencil=function(b){var e=null;if(null!=b&&"string"===typeof b&&(b=b.split("."),0<b.length&&"mxgraph"==b[0])){e=b[1];for(var k=2;k<b.length-1;k++)e+="/"+b[k]}return e}; -mxStencilRegistry.loadStencilSet=function(b,e,k,m){var C=mxStencilRegistry.packages[b];if(null!=k&&k||null==C){var p=!1;if(null==C)try{if(m){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(E){null!=E&&null!=E.documentElement&&(mxStencilRegistry.packages[b]=E,p=!0,mxStencilRegistry.parseStencilSet(E.documentElement,e,p))}));return}C=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=C;p=!0}catch(E){null!=window.console&&console.log("error in loadStencilSet:",b,E)}null!=C&&null!= +mxStencilRegistry.loadStencilSet=function(b,e,k,m){var C=mxStencilRegistry.packages[b];if(null!=k&&k||null==C){var p=!1;if(null==C)try{if(m){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(F){null!=F&&null!=F.documentElement&&(mxStencilRegistry.packages[b]=F,p=!0,mxStencilRegistry.parseStencilSet(F.documentElement,e,p))}));return}C=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=C;p=!0}catch(F){null!=window.console&&console.log("error in loadStencilSet:",b,F)}null!=C&&null!= C.documentElement&&mxStencilRegistry.parseStencilSet(C.documentElement,e,p)}};mxStencilRegistry.loadStencil=function(b,e){if(null!=e)mxUtils.get(b,mxUtils.bind(this,function(k){e(200<=k.getStatus()&&299>=k.getStatus()?k.getXml():null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var e=0;e<b.length;e++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[e]).documentElement)}; -mxStencilRegistry.parseStencilSet=function(b,e,k){if("stencils"==b.nodeName)for(var m=b.firstChild;null!=m;)"shapes"==m.nodeName&&mxStencilRegistry.parseStencilSet(m,e,k),m=m.nextSibling;else{k=null!=k?k:!0;m=b.firstChild;var C="";b=b.getAttribute("name");for(null!=b&&(C=b+".");null!=m;){if(m.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=m.getAttribute("name"),null!=b)){C=C.toLowerCase();var p=b.replace(/ /g,"_");k&&mxStencilRegistry.addStencil(C+p.toLowerCase(),new mxStencil(m));if(null!=e){var E=m.getAttribute("w"), -K=m.getAttribute("h");E=null==E?80:parseInt(E,10);K=null==K?80:parseInt(K,10);e(C,p,b,E,K)}}m=m.nextSibling}}}; -"undefined"!==typeof mxVertexHandler&&function(){function b(){var y=document.createElement("div");y.className="geHint";y.style.whiteSpace="nowrap";y.style.position="absolute";return y}function e(y,M){switch(M){case mxConstants.POINTS:return y;case mxConstants.MILLIMETERS:return(y/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(y/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(y/mxConstants.PIXELS_PER_INCH).toFixed(2)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2"; +mxStencilRegistry.parseStencilSet=function(b,e,k){if("stencils"==b.nodeName)for(var m=b.firstChild;null!=m;)"shapes"==m.nodeName&&mxStencilRegistry.parseStencilSet(m,e,k),m=m.nextSibling;else{k=null!=k?k:!0;m=b.firstChild;var C="";b=b.getAttribute("name");for(null!=b&&(C=b+".");null!=m;){if(m.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=m.getAttribute("name"),null!=b)){C=C.toLowerCase();var p=b.replace(/ /g,"_");k&&mxStencilRegistry.addStencil(C+p.toLowerCase(),new mxStencil(m));if(null!=e){var F=m.getAttribute("w"), +K=m.getAttribute("h");F=null==F?80:parseInt(F,10);K=null==K?80:parseInt(K,10);e(C,p,b,F,K)}}m=m.nextSibling}}}; +"undefined"!==typeof mxVertexHandler&&function(){function b(){var z=document.createElement("div");z.className="geHint";z.style.whiteSpace="nowrap";z.style.position="absolute";return z}function e(z,L){switch(L){case mxConstants.POINTS:return z;case mxConstants.MILLIMETERS:return(z/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(z/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(z/mxConstants.PIXELS_PER_INCH).toFixed(2)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2"; mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR="#00a8ff";mxConstants.OUTLINE_COLOR="#00a8ff";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#99ccff";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#00a8ff";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.EDGE_SELECTION_COLOR="#00a8ff";mxConstants.DEFAULT_VALID_COLOR="#00a8ff";mxConstants.LABEL_HANDLE_FILLCOLOR="#cee7ff";mxConstants.GUIDE_COLOR="#0088cf";mxConstants.HIGHLIGHT_OPACITY=30;mxConstants.HIGHLIGHT_SIZE=5;mxEdgeHandler.prototype.snapToTerminals= -!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(y){return!mxEvent.isAltDown(y)};var k=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(y){return k.apply(this,arguments)||this.graph.isTableRow(y)||this.graph.isTableCell(y)};var m=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(y){return m.apply(this,arguments)|| -this.graph.isEdgeIgnored(y)};var C=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(y){return this.graph.isCloneEvent(y)!=C.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var y=new mxEllipse(null,this.highlightColor,this.highlightColor,0);y.opacity=mxConstants.HIGHLIGHT_OPACITY;return y};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState= -function(y){y=this.graph.createCurrentEdgeStyle();y=this.graph.createEdge(null,null,null,null,null,y);y=new mxCellState(this.graph.view,y,this.graph.getCellStyle(y));for(var M in this.graph.currentEdgeStyle)y.style[M]=this.graph.currentEdgeStyle[M];y.style=this.graph.postProcessCellStyle(y.cell,y.style);return y};var p=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var y=p.apply(this,arguments);y.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED]; -return y};mxConnectionHandler.prototype.updatePreview=function(y){};var E=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var y=E.apply(this,arguments),M=y.getCell;y.getCell=mxUtils.bind(this,function(N){var S=M.apply(this,arguments);this.error=null;return S});return y};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle= -function(){for(var y="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",M="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),N=0;N<M.length;N++)null!=this.currentEdgeStyle[M[N]]&&(y+=M[N]+"="+this.currentEdgeStyle[M[N]]+";");null!=this.currentEdgeStyle.orthogonalLoop?y+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&& -(y+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?y+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(y+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(y+="elbow="+this.currentEdgeStyle.elbow+";");return y=null!=this.currentEdgeStyle.html?y+("html="+this.currentEdgeStyle.html+";"):y+"html=1;"}; -Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var y=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=y&&(new mxCodec(y.ownerDocument)).decode(y,this.getStylesheet())};Graph.prototype.createCellLookup=function(y,M){M=null!=M?M:{};for(var N=0;N<y.length;N++){var S=y[N];M[mxObjectIdentity.get(S)]=S.getId();for(var X=this.model.getChildCount(S), -fa=0;fa<X;fa++)this.createCellLookup([this.model.getChildAt(S,fa)],M)}return M};Graph.prototype.createCellMapping=function(y,M,N){N=null!=N?N:{};for(var S in y){var X=M[S];null==N[X]&&(N[X]=y[S].getId()||"")}return N};Graph.prototype.importGraphModel=function(y,M,N,S){M=null!=M?M:0;N=null!=N?N:0;var X=new mxCodec(y.ownerDocument),fa=new mxGraphModel;X.decode(y,fa);y=[];X={};var la={},xa=fa.getChildren(this.cloneCell(fa.root,this.isCloneInvalidEdges(),X));if(null!=xa){var sa=this.createCellLookup([fa.root]); -xa=xa.slice();this.model.beginUpdate();try{if(1!=xa.length||this.isCellLocked(this.getDefaultParent()))for(fa=0;fa<xa.length;fa++)ya=this.model.getChildren(this.moveCells([xa[fa]],M,N,!1,this.model.getRoot())[0]),null!=ya&&(y=y.concat(ya));else{var ya=fa.getChildren(xa[0]);null!=ya&&(y=this.moveCells(ya,M,N,!1,this.getDefaultParent()),la[fa.getChildAt(fa.root,0).getId()]=this.getDefaultParent().getId())}if(null!=y&&(this.createCellMapping(X,sa,la),this.updateCustomLinks(la,y),S)){this.isGridEnabled()&& -(M=this.snap(M),N=this.snap(N));var Fa=this.getBoundingBoxFromGeometry(y,!0);null!=Fa&&this.moveCells(y,M-Fa.x,N-Fa.y)}}finally{this.model.endUpdate()}}return y};Graph.prototype.encodeCells=function(y){for(var M={},N=this.cloneCells(y,null,M),S=new mxDictionary,X=0;X<y.length;X++)S.put(y[X],!0);var fa=new mxCodec,la=new mxGraphModel,xa=la.getChildAt(la.getRoot(),0);for(X=0;X<N.length;X++){la.add(xa,N[X]);var sa=this.view.getState(y[X]);if(null!=sa){var ya=this.getCellGeometry(N[X]);null!=ya&&ya.relative&& -!this.model.isEdge(y[X])&&null==S.get(this.model.getParent(y[X]))&&(ya.offset=null,ya.relative=!1,ya.x=sa.x/sa.view.scale-sa.view.translate.x,ya.y=sa.y/sa.view.scale-sa.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(M,this.createCellLookup(y)),N);return fa.encode(la)};Graph.prototype.isSwimlane=function(y,M){var N=null;null==y||this.model.isEdge(y)||this.model.getParent(y)==this.model.getRoot()||(N=this.getCurrentCellStyle(y,M)[mxConstants.STYLE_SHAPE]);return N==mxConstants.SHAPE_SWIMLANE|| -"table"==N||"tableRow"==N};var K=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(y){var M=this.model.getParent(y);if(null!=M){var N=this.getCurrentCellStyle(M);if(null!=N.expand)return"0"!=N.expand}return K.apply(this,arguments)&&(null==M||!this.isTable(M))};var Q=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(y,M,N,S,X,fa,la,xa){null==xa&&(xa=this.model.getParent(y),this.isTable(xa)||this.isTableRow(xa))&&(xa=this.getCellAt(fa,la,null,!0,!1));N=null;this.model.beginUpdate(); -try{N=Q.apply(this,[y,M,N,S,X,fa,la,xa]);this.model.setValue(N,"");var sa=this.getChildCells(N,!0);for(M=0;M<sa.length;M++){var ya=this.getCellGeometry(sa[M]);null!=ya&&ya.relative&&0<ya.x&&this.model.remove(sa[M])}var Fa=this.getChildCells(y,!0);for(M=0;M<Fa.length;M++)ya=this.getCellGeometry(Fa[M]),null!=ya&&ya.relative&&0>=ya.x&&this.model.remove(Fa[M]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[N]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[N]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING, -null,[y]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[y]);var wa=this.model.getTerminal(N,!1);if(null!=wa){var ua=this.getCurrentCellStyle(wa);null!=ua&&"1"==ua.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[y]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[y]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[N]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[N]))}}finally{this.model.endUpdate()}return N};var d=Graph.prototype.selectCell;Graph.prototype.selectCell= -function(y,M,N){if(M||N)d.apply(this,arguments);else{var S=this.getSelectionCell(),X=null,fa=[],la=mxUtils.bind(this,function(xa){if(null!=this.view.getState(xa)&&(this.model.isVertex(xa)||this.model.isEdge(xa)))if(fa.push(xa),xa==S)X=fa.length-1;else if(y&&null==S&&0<fa.length||null!=X&&y&&fa.length>X||!y&&0<X)return;for(var sa=0;sa<this.model.getChildCount(xa);sa++)la(this.model.getChildAt(xa,sa))});la(this.model.root);0<fa.length&&(X=null!=X?mxUtils.mod(X+(y?1:-1),fa.length):0,this.setSelectionCell(fa[X]))}}; -Graph.prototype.swapShapes=function(y,M,N,S,X,fa,la){M=!1;if(!S&&null!=X&&1==y.length&&(S=this.view.getState(X),N=this.view.getState(y[0]),null!=S&&null!=N&&(null!=fa&&mxEvent.isShiftDown(fa)||"umlLifeline"==S.style.shape&&"umlLifeline"==N.style.shape)&&(S=this.getCellGeometry(X),fa=this.getCellGeometry(y[0]),null!=S&&null!=fa))){M=S.clone();S=fa.clone();S.x=M.x;S.y=M.y;M.x=fa.x;M.y=fa.y;this.model.beginUpdate();try{this.model.setGeometry(X,M),this.model.setGeometry(y[0],S)}finally{this.model.endUpdate()}M= -!0}return M};var f=Graph.prototype.moveCells;Graph.prototype.moveCells=function(y,M,N,S,X,fa,la){if(this.swapShapes(y,M,N,S,X,fa,la))return y;la=null!=la?la:{};if(this.isTable(X)){for(var xa=[],sa=0;sa<y.length;sa++)this.isTable(y[sa])?xa=xa.concat(this.model.getChildCells(y[sa],!0).reverse()):xa.push(y[sa]);y=xa}this.model.beginUpdate();try{xa=[];for(sa=0;sa<y.length;sa++)if(null!=X&&this.isTableRow(y[sa])){var ya=this.model.getParent(y[sa]),Fa=this.getCellGeometry(y[sa]);this.isTable(ya)&&xa.push(ya); -if(null!=ya&&null!=Fa&&this.isTable(ya)&&this.isTable(X)&&(S||ya!=X)){if(!S){var wa=this.getCellGeometry(ya);null!=wa&&(wa=wa.clone(),wa.height-=Fa.height,this.model.setGeometry(ya,wa))}wa=this.getCellGeometry(X);null!=wa&&(wa=wa.clone(),wa.height+=Fa.height,this.model.setGeometry(X,wa));var ua=this.model.getChildCells(X,!0);if(0<ua.length){y[sa]=S?this.cloneCell(y[sa]):y[sa];var La=this.model.getChildCells(y[sa],!0),Oa=this.model.getChildCells(ua[0],!0),Ca=Oa.length-La.length;if(0<Ca)for(var Ma= -0;Ma<Ca;Ma++){var Ga=this.cloneCell(La[La.length-1]);null!=Ga&&(Ga.value="",this.model.add(y[sa],Ga))}else if(0>Ca)for(Ma=0;Ma>Ca;Ma--)this.model.remove(La[La.length+Ma-1]);La=this.model.getChildCells(y[sa],!0);for(Ma=0;Ma<Oa.length;Ma++){var Ya=this.getCellGeometry(Oa[Ma]),db=this.getCellGeometry(La[Ma]);null!=Ya&&null!=db&&(db=db.clone(),db.width=Ya.width,this.model.setGeometry(La[Ma],db))}}}}var eb=f.apply(this,arguments);for(sa=0;sa<xa.length;sa++)!S&&this.model.contains(xa[sa])&&0==this.model.getChildCount(xa[sa])&& -this.model.remove(xa[sa]);S&&this.updateCustomLinks(this.createCellMapping(la,this.createCellLookup(y)),eb)}finally{this.model.endUpdate()}return eb};var g=Graph.prototype.removeCells;Graph.prototype.removeCells=function(y,M){var N=[];this.model.beginUpdate();try{for(var S=0;S<y.length;S++)if(this.isTableCell(y[S])){var X=this.model.getParent(y[S]),fa=this.model.getParent(X);1==this.model.getChildCount(X)&&1==this.model.getChildCount(fa)?0>mxUtils.indexOf(y,fa)&&0>mxUtils.indexOf(N,fa)&&N.push(fa): -this.labelChanged(y[S],"")}else{if(this.isTableRow(y[S])&&(fa=this.model.getParent(y[S]),0>mxUtils.indexOf(y,fa)&&0>mxUtils.indexOf(N,fa))){for(var la=this.model.getChildCells(fa,!0),xa=0,sa=0;sa<la.length;sa++)0<=mxUtils.indexOf(y,la[sa])&&xa++;xa==la.length&&N.push(fa)}N.push(y[S])}N=g.apply(this,[N,M])}finally{this.model.endUpdate()}return N};Graph.prototype.updateCustomLinks=function(y,M,N){N=null!=N?N:new Graph;for(var S=0;S<M.length;S++)null!=M[S]&&N.updateCustomLinksForCell(y,M[S],N)};Graph.prototype.updateCustomLinksForCell= -function(y,M){this.doUpdateCustomLinksForCell(y,M);for(var N=this.model.getChildCount(M),S=0;S<N;S++)this.updateCustomLinksForCell(y,this.model.getChildAt(M,S))};Graph.prototype.doUpdateCustomLinksForCell=function(y,M){};Graph.prototype.getAllConnectionConstraints=function(y,M){if(null!=y){M=mxUtils.getValue(y.style,"points",null);if(null!=M){y=[];try{var N=JSON.parse(M);for(M=0;M<N.length;M++){var S=N[M];y.push(new mxConnectionConstraint(new mxPoint(S[0],S[1]),2<S.length?"0"!=S[2]:!0,null,3<S.length? -S[3]:0,4<S.length?S[4]:0))}}catch(fa){}return y}if(null!=y.shape&&null!=y.shape.bounds){S=y.shape.direction;M=y.shape.bounds;var X=y.shape.scale;N=M.width/X;M=M.height/X;if(S==mxConstants.DIRECTION_NORTH||S==mxConstants.DIRECTION_SOUTH)S=N,N=M,M=S;M=y.shape.getConstraints(y.style,N,M);if(null!=M)return M;if(null!=y.shape.stencil&&null!=y.shape.stencil.constraints)return y.shape.stencil.constraints;if(null!=y.shape.constraints)return y.shape.constraints}}return null};Graph.prototype.flipEdge=function(y){if(null!= -y){var M=this.getCurrentCellStyle(y);M=mxUtils.getValue(M,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,M,[y])}};Graph.prototype.isValidRoot=function(y){for(var M=this.model.getChildCount(y),N=0,S=0;S<M;S++){var X=this.model.getChildAt(y,S);this.model.isVertex(X)&&(X=this.getCellGeometry(X),null==X||X.relative||N++)}return 0<N||this.isContainer(y)};Graph.prototype.isValidDropTarget= -function(y,M,N){for(var S=this.getCurrentCellStyle(y),X=!0,fa=!0,la=0;la<M.length&&fa;la++)X=X&&this.isTable(M[la]),fa=fa&&this.isTableRow(M[la]);return(1==M.length&&null!=N&&mxEvent.isShiftDown(N)&&!mxEvent.isControlDown(N)&&!mxEvent.isAltDown(N)||("1"!=mxUtils.getValue(S,"part","0")||this.isContainer(y))&&"0"!=mxUtils.getValue(S,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(y))&&!this.isTableRow(y)&&(!this.isTable(y)||fa||X))&&!this.isCellLocked(y)}; -Graph.prototype.createGroupCell=function(){var y=mxGraph.prototype.createGroupCell.apply(this,arguments);y.setStyle("group");return y};Graph.prototype.isExtendParentsOnAdd=function(y){var M=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(M&&null!=y&&null!=this.layoutManager){var N=this.model.getParent(y);null!=N&&(N=this.layoutManager.getLayout(N),null!=N&&N.constructor==mxStackLayout&&(M=!1))}return M};Graph.prototype.getPreferredSizeForCell=function(y){var M=mxGraph.prototype.getPreferredSizeForCell.apply(this, -arguments);null!=M&&(M.width+=10,M.height+=4,this.gridEnabled&&(M.width=this.snap(M.width),M.height=this.snap(M.height)));return M};Graph.prototype.turnShapes=function(y,M){var N=this.getModel(),S=[];N.beginUpdate();try{for(var X=0;X<y.length;X++){var fa=y[X];if(N.isEdge(fa)){var la=N.getTerminal(fa,!0),xa=N.getTerminal(fa,!1);N.setTerminal(fa,xa,!0);N.setTerminal(fa,la,!1);var sa=N.getGeometry(fa);if(null!=sa){sa=sa.clone();null!=sa.points&&sa.points.reverse();var ya=sa.getTerminalPoint(!0),Fa=sa.getTerminalPoint(!1); -sa.setTerminalPoint(ya,!1);sa.setTerminalPoint(Fa,!0);N.setGeometry(fa,sa);var wa=this.view.getState(fa),ua=this.view.getState(la),La=this.view.getState(xa);if(null!=wa){var Oa=null!=ua?this.getConnectionConstraint(wa,ua,!0):null,Ca=null!=La?this.getConnectionConstraint(wa,La,!1):null;this.setConnectionConstraint(fa,la,!0,Ca);this.setConnectionConstraint(fa,xa,!1,Oa);var Ma=mxUtils.getValue(wa.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING, -mxUtils.getValue(wa.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[fa]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Ma,[fa])}S.push(fa)}}else if(N.isVertex(fa)&&(sa=this.getCellGeometry(fa),null!=sa)){if(!(this.isTable(fa)||this.isTableRow(fa)||this.isTableCell(fa)||this.isSwimlane(fa))){sa=sa.clone();sa.x+=sa.width/2-sa.height/2;sa.y+=sa.height/2-sa.width/2;var Ga=sa.width;sa.width=sa.height;sa.height=Ga;N.setGeometry(fa,sa)}var Ya=this.view.getState(fa);if(null!=Ya){var db= -[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],eb=mxUtils.getValue(Ya.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,db[mxUtils.mod(mxUtils.indexOf(db,eb)+(M?-1:1),db.length)],[fa])}S.push(fa)}}}finally{N.endUpdate()}return S};Graph.prototype.stencilHasPlaceholders=function(y){if(null!=y&&null!=y.fgNode)for(y=y.fgNode.firstChild;null!=y;){if("text"==y.nodeName&&"1"==y.getAttribute("placeholders"))return!0; -y=y.nextSibling}return!1};var x=Graph.prototype.processChange;Graph.prototype.processChange=function(y){if(y instanceof mxGeometryChange&&(this.isTableCell(y.cell)||this.isTableRow(y.cell))&&(null==y.previous&&null!=y.geometry||null!=y.previous&&!y.previous.equals(y.geometry))){var M=y.cell;this.isTableCell(M)&&(M=this.model.getParent(M));this.isTableRow(M)&&(M=this.model.getParent(M));var N=this.view.getState(M);null!=N&&null!=N.shape&&(this.view.invalidate(M),N.shape.bounds=null)}x.apply(this,arguments); -y instanceof mxValueChange&&null!=y.cell&&null!=y.cell.value&&"object"==typeof y.cell.value&&this.invalidateDescendantsWithPlaceholders(y.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(y){y=this.model.getDescendants(y);if(0<y.length)for(var M=0;M<y.length;M++){var N=this.view.getState(y[M]);null!=N&&null!=N.shape&&null!=N.shape.stencil&&this.stencilHasPlaceholders(N.shape.stencil)?this.removeStateForCell(y[M]):this.isReplacePlaceholders(y[M])&&this.view.invalidate(y[M],!1,!1)}}; -Graph.prototype.replaceElement=function(y,M){M=y.ownerDocument.createElement(null!=M?M:"span");for(var N=Array.prototype.slice.call(y.attributes);attr=N.pop();)M.setAttribute(attr.nodeName,attr.nodeValue);M.innerHTML=y.innerHTML;y.parentNode.replaceChild(M,y)};Graph.prototype.processElements=function(y,M){if(null!=y){y=y.getElementsByTagName("*");for(var N=0;N<y.length;N++)M(y[N])}};Graph.prototype.updateLabelElements=function(y,M,N){y=null!=y?y:this.getSelectionCells();for(var S=document.createElement("div"), -X=0;X<y.length;X++)if(this.isHtmlLabel(y[X])){var fa=this.convertValueToString(y[X]);if(null!=fa&&0<fa.length){S.innerHTML=fa;for(var la=S.getElementsByTagName(null!=N?N:"*"),xa=0;xa<la.length;xa++)M(la[xa]);S.innerHTML!=fa&&this.cellLabelChanged(y[X],S.innerHTML)}}};Graph.prototype.cellLabelChanged=function(y,M,N){M=Graph.zapGremlins(M);this.model.beginUpdate();try{if(null!=y.value&&"object"==typeof y.value){if(this.isReplacePlaceholders(y)&&null!=y.getAttribute("placeholder"))for(var S=y.getAttribute("placeholder"), -X=y;null!=X;){if(X==this.model.getRoot()||null!=X.value&&"object"==typeof X.value&&X.hasAttribute(S)){this.setAttributeForCell(X,S,M);break}X=this.model.getParent(X)}var fa=y.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&fa.hasAttribute("label_"+Graph.diagramLanguage)?fa.setAttribute("label_"+Graph.diagramLanguage,M):fa.setAttribute("label",M);M=fa}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(y){if(null!= -y){for(var M=new mxDictionary,N=0;N<y.length;N++)M.put(y[N],!0);var S=[];for(N=0;N<y.length;N++){var X=this.model.getParent(y[N]);null==X||M.get(X)||(M.put(X,!0),S.push(X))}for(N=0;N<S.length;N++)if(X=this.view.getState(S[N]),null!=X&&(this.model.isEdge(X.cell)||this.model.isVertex(X.cell))&&this.isCellDeletable(X.cell)&&this.isTransparentState(X)){for(var fa=!0,la=0;la<this.model.getChildCount(X.cell)&&fa;la++)M.get(this.model.getChildAt(X.cell,la))||(fa=!1);fa&&y.push(X.cell)}}mxGraph.prototype.cellsRemoved.apply(this, -arguments)};Graph.prototype.removeCellsAfterUngroup=function(y){for(var M=[],N=0;N<y.length;N++)this.isCellDeletable(y[N])&&this.isTransparentState(this.view.getState(y[N]))&&M.push(y[N]);y=M;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(y,M){this.setAttributeForCell(y,"link",M)};Graph.prototype.setTooltipForCell=function(y,M){var N="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(y.value)&&y.value.hasAttribute("tooltip_"+ -Graph.diagramLanguage)&&(N="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(y,N,M)};Graph.prototype.getAttributeForCell=function(y,M,N){y=null!=y.value&&"object"===typeof y.value?y.value.getAttribute(M):null;return null!=y?y:N};Graph.prototype.setAttributeForCell=function(y,M,N){if(null!=y.value&&"object"==typeof y.value)var S=y.value.cloneNode(!0);else S=mxUtils.createXmlDocument().createElement("UserObject"),S.setAttribute("label",y.value||"");null!=N?S.setAttribute(M,N):S.removeAttribute(M); -this.model.setValue(y,S)};var z=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(y,M,N,S){this.getModel();if(mxEvent.isAltDown(M))return null;for(var X=0;X<y.length;X++){var fa=this.model.getParent(y[X]);if(this.model.isEdge(fa)&&0>mxUtils.indexOf(y,fa))return null}fa=z.apply(this,arguments);var la=!0;for(X=0;X<y.length&&la;X++)la=la&&this.isTableRow(y[X]);la&&(this.isTableCell(fa)&&(fa=this.model.getParent(fa)),this.isTableRow(fa)&&(fa=this.model.getParent(fa)),this.isTable(fa)|| -(fa=null));return fa};Graph.prototype.click=function(y){mxGraph.prototype.click.call(this,y);this.firstClickState=y.getState();this.firstClickSource=y.getSource()};Graph.prototype.dblClick=function(y,M){this.isEnabled()&&(M=this.insertTextForEvent(y,M),mxGraph.prototype.dblClick.call(this,y,M))};Graph.prototype.insertTextForEvent=function(y,M){var N=mxUtils.convertPoint(this.container,mxEvent.getClientX(y),mxEvent.getClientY(y));if(null!=y&&!this.model.isVertex(M)){var S=this.model.isEdge(M)?this.view.getState(M): -null,X=mxEvent.getSource(y);this.firstClickState!=S||this.firstClickSource!=X||null!=S&&null!=S.text&&null!=S.text.node&&null!=S.text.boundingBox&&(mxUtils.contains(S.text.boundingBox,N.x,N.y)||mxUtils.isAncestorNode(S.text.node,mxEvent.getSource(y)))||(null!=S||this.isCellLocked(this.getDefaultParent()))&&(null==S||this.isCellLocked(S.cell))||!(null!=S||mxClient.IS_SVG&&X==this.view.getCanvas().ownerSVGElement)||(null==S&&(S=this.view.getState(this.getCellAt(N.x,N.y))),M=this.addText(N.x,N.y,S))}return M}; -Graph.prototype.getInsertPoint=function(){var y=this.getGridSize(),M=this.container.scrollLeft/this.view.scale-this.view.translate.x,N=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var S=this.getPageLayout(),X=this.getPageSize();M=Math.max(M,S.x*X.width);N=Math.max(N,S.y*X.height)}return new mxPoint(this.snap(M+y),this.snap(N+y))};Graph.prototype.getFreeInsertPoint=function(){var y=this.view,M=this.getGraphBounds(),N=this.getInsertPoint(),S=this.snap(Math.round(Math.max(N.x, -M.x/y.scale-y.translate.x+(0==M.width?2*this.gridSize:0))));y=this.snap(Math.round(Math.max(N.y,(M.y+M.height)/y.scale-y.translate.y+2*this.gridSize)));return new mxPoint(S,y)};Graph.prototype.getCenterInsertPoint=function(y){y=null!=y?y:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-y.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/ -2)/this.view.scale-this.view.translate.y-y.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-y.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-y.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(y,M,N){var S=new mxCell;S.value="Text";S.geometry=new mxGeometry(0,0,0,0);S.vertex=!0;if(null!=N&&this.model.isEdge(N.cell)){S.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];"; -S.geometry.relative=!0;S.connectable=!1;var X=this.view.getRelativePoint(N,y,M);S.geometry.x=Math.round(1E4*X.x)/1E4;S.geometry.y=Math.round(X.y);S.geometry.offset=new mxPoint(0,0);X=this.view.getPoint(N,S.geometry);var fa=this.view.scale;S.geometry.offset=new mxPoint(Math.round((y-X.x)/fa),Math.round((M-X.y)/fa))}else X=this.view.translate,S.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",S.geometry.width=40,S.geometry.height=20,S.geometry.x=Math.round(y/this.view.scale)- -X.x-(null!=N?N.origin.x:0),S.geometry.y=Math.round(M/this.view.scale)-X.y-(null!=N?N.origin.y:0),S.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([S],null!=N?N.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[S])),this.autoSizeCell(S)}finally{this.getModel().endUpdate()}return S};Graph.prototype.addClickHandler=function(y,M,N){var S=mxUtils.bind(this,function(){var sa=this.container.getElementsByTagName("a");if(null!=sa)for(var ya=0;ya<sa.length;ya++){var Fa= -this.getAbsoluteUrl(sa[ya].getAttribute("href"));null!=Fa&&(sa[ya].setAttribute("rel",this.linkRelation),sa[ya].setAttribute("href",Fa),null!=M&&mxEvent.addGestureListeners(sa[ya],null,null,M))}});this.model.addListener(mxEvent.CHANGE,S);S();var X=this.container.style.cursor,fa=this.getTolerance(),la=this,xa={currentState:null,currentLink:null,currentTarget:null,highlight:null!=y&&""!=y&&y!=mxConstants.NONE?new mxCellHighlight(la,y,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(sa){var ya= -sa.sourceState;if(null==ya||null==la.getLinkForCell(ya.cell))sa=la.getCellAt(sa.getGraphX(),sa.getGraphY(),null,null,null,function(Fa,wa,ua){return null==la.getLinkForCell(Fa.cell)}),ya=null==ya||la.model.isAncestor(sa,ya.cell)?la.view.getState(sa):null;ya!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ya,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(sa,ya){this.startX=ya.getGraphX();this.startY=ya.getGraphY();this.scrollLeft=la.container.scrollLeft; -this.scrollTop=la.container.scrollTop;null==this.currentLink&&"auto"==la.container.style.overflow&&(la.container.style.cursor="move");this.updateCurrentState(ya)},mouseMove:function(sa,ya){if(la.isMouseDown)null!=this.currentLink&&(sa=Math.abs(this.startX-ya.getGraphX()),ya=Math.abs(this.startY-ya.getGraphY()),(sa>fa||ya>fa)&&this.clear());else{for(sa=ya.getSource();null!=sa&&"a"!=sa.nodeName.toLowerCase();)sa=sa.parentNode;null!=sa?this.clear():(null!=la.tooltipHandler&&null!=this.currentLink&&null!= -this.currentState&&la.tooltipHandler.reset(ya,!0,this.currentState),(null==this.currentState||ya.getState()!=this.currentState&&null!=ya.sourceState||!la.intersects(this.currentState,ya.getGraphX(),ya.getGraphY()))&&this.updateCurrentState(ya))}},mouseUp:function(sa,ya){var Fa=ya.getSource();for(sa=ya.getEvent();null!=Fa&&"a"!=Fa.nodeName.toLowerCase();)Fa=Fa.parentNode;null==Fa&&Math.abs(this.scrollLeft-la.container.scrollLeft)<fa&&Math.abs(this.scrollTop-la.container.scrollTop)<fa&&(null==ya.sourceState|| -!ya.isSource(ya.sourceState.control))&&((mxEvent.isLeftMouseButton(sa)||mxEvent.isMiddleMouseButton(sa))&&!mxEvent.isPopupTrigger(sa)||mxEvent.isTouchEvent(sa))&&(null!=this.currentLink?(Fa=la.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Fa||null==M||M(sa,this.currentLink),mxEvent.isConsumed(sa)||(sa=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(sa)?"_blank":Fa?la.linkTarget:"_top",la.openLink(this.currentLink,sa),ya.consume())):null!=N&&!ya.isConsumed()&& -Math.abs(this.scrollLeft-la.container.scrollLeft)<fa&&Math.abs(this.scrollTop-la.container.scrollTop)<fa&&Math.abs(this.startX-ya.getGraphX())<fa&&Math.abs(this.startY-ya.getGraphY())<fa&&N(ya.getEvent()));this.clear()},activate:function(sa){this.currentLink=la.getAbsoluteUrl(la.getLinkForCell(sa.cell));null!=this.currentLink&&(this.currentTarget=la.getLinkTargetForCell(sa.cell),la.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(sa))},clear:function(){null!=la.container&& -(la.container.style.cursor=X);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=la.tooltipHandler&&la.tooltipHandler.hide()}};la.click=function(sa){};la.addMouseListener(xa);mxEvent.addListener(document,"mouseleave",function(sa){xa.clear()})};Graph.prototype.duplicateCells=function(y,M){y=null!=y?y:this.getSelectionCells();M=null!=M?M:!0;for(var N=0;N<y.length;N++)this.isTableCell(y[N])&&(y[N]=this.model.getParent(y[N]));y=this.model.getTopmostCells(y); -var S=this.getModel(),X=this.gridSize,fa=[];S.beginUpdate();try{var la={},xa=this.createCellLookup(y),sa=this.cloneCells(y,!1,la,!0);for(N=0;N<y.length;N++){var ya=S.getParent(y[N]);if(null!=ya){var Fa=this.moveCells([sa[N]],X,X,!1)[0];fa.push(Fa);if(M)S.add(ya,sa[N]);else{var wa=ya.getIndex(y[N]);S.add(ya,sa[N],wa+1)}if(this.isTable(ya)){var ua=this.getCellGeometry(sa[N]),La=this.getCellGeometry(ya);null!=ua&&null!=La&&(La=La.clone(),La.height+=ua.height,S.setGeometry(ya,La))}}else fa.push(sa[N])}this.updateCustomLinks(this.createCellMapping(la, -xa),sa,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",sa))}finally{S.endUpdate()}return fa};Graph.prototype.insertImage=function(y,M,N){if(null!=y&&null!=this.cellEditor.textarea){for(var S=this.cellEditor.textarea.getElementsByTagName("img"),X=[],fa=0;fa<S.length;fa++)X.push(S[fa]);document.execCommand("insertimage",!1,y);y=this.cellEditor.textarea.getElementsByTagName("img");if(y.length==X.length+1)for(fa=y.length-1;0<=fa;fa--)if(0==fa||y[fa]!=X[fa-1]){y[fa].setAttribute("width", -M);y[fa].setAttribute("height",N);break}}};Graph.prototype.insertLink=function(y){if(null!=this.cellEditor.textarea)if(0==y.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var M=this.cellEditor.textarea.getElementsByTagName("a"),N=[],S=0;S<M.length;S++)N.push(M[S]);document.execCommand("createlink",!1,mxUtils.trim(y));M=this.cellEditor.textarea.getElementsByTagName("a");if(M.length==N.length+1)for(S=M.length-1;0<=S;S--)if(M[S]!=N[S-1]){for(M=M[S].getElementsByTagName("a");0<M.length;){for(N= -M[0].parentNode;null!=M[0].firstChild;)N.insertBefore(M[0].firstChild,M[0]);N.removeChild(M[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(y))};Graph.prototype.isCellResizable=function(y){var M=mxGraph.prototype.isCellResizable.apply(this,arguments),N=this.getCurrentCellStyle(y);return!this.isTableCell(y)&&!this.isTableRow(y)&&(M||"0"!=mxUtils.getValue(N,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==N[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(y,M){null== -M&&(M=this.getSelectionCells());if(null!=M&&1<M.length){for(var N=[],S=null,X=null,fa=0;fa<M.length;fa++)if(this.getModel().isVertex(M[fa])){var la=this.view.getState(M[fa]);if(null!=la){var xa=y?la.getCenterX():la.getCenterY();S=null!=S?Math.max(S,xa):xa;X=null!=X?Math.min(X,xa):xa;N.push(la)}}if(2<N.length){N.sort(function(wa,ua){return y?wa.x-ua.x:wa.y-ua.y});la=this.view.translate;xa=this.view.scale;X=X/xa-(y?la.x:la.y);S=S/xa-(y?la.x:la.y);this.getModel().beginUpdate();try{var sa=(S-X)/(N.length- -1);S=X;for(fa=1;fa<N.length-1;fa++){var ya=this.view.getState(this.model.getParent(N[fa].cell)),Fa=this.getCellGeometry(N[fa].cell);S+=sa;null!=Fa&&null!=ya&&(Fa=Fa.clone(),y?Fa.x=Math.round(S-Fa.width/2)-ya.origin.x:Fa.y=Math.round(S-Fa.height/2)-ya.origin.y,this.getModel().setGeometry(N[fa].cell,Fa))}}finally{this.getModel().endUpdate()}}}return M};Graph.prototype.isCloneEvent=function(y){return mxClient.IS_MAC&&mxEvent.isMetaDown(y)||mxEvent.isControlDown(y)};Graph.prototype.createSvgImageExport= -function(){var y=new mxImageExport;y.getLinkForCellState=mxUtils.bind(this,function(M,N){return this.getLinkForCell(M.cell)});return y};Graph.prototype.parseBackgroundImage=function(y){var M=null;null!=y&&0<y.length&&(y=JSON.parse(y),M=new mxImage(y.src,y.width,y.height));return M};Graph.prototype.getBackgroundImageObject=function(y){return y};Graph.prototype.getSvg=function(y,M,N,S,X,fa,la,xa,sa,ya,Fa,wa,ua,La){var Oa=null;if(null!=La)for(Oa=new mxDictionary,Fa=0;Fa<La.length;Fa++)Oa.put(La[Fa], -!0);if(La=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{M=null!=M?M:1;N=null!=N?N:0;X=null!=X?X:!0;fa=null!=fa?fa:!0;la=null!=la?la:!0;ya=null!=ya?ya:!1;var Ca="page"==ua?this.view.getBackgroundPageBounds():fa&&null==Oa||S||"diagram"==ua?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Ma=this.view.scale;"diagram"==ua&&null!=this.backgroundImage&&(Ca=mxRectangle.fromRectangle(Ca),Ca.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)* -Ma,(this.view.translate.y+this.backgroundImage.y)*Ma,this.backgroundImage.width*Ma,this.backgroundImage.height*Ma)));if(null==Ca)throw Error(mxResources.get("drawingEmpty"));S=M/Ma;ua=X?-.5:0;var Ga=Graph.createSvgNode(ua,ua,Math.max(1,Math.ceil(Ca.width*S)+2*N)+(ya&&0==N?5:0),Math.max(1,Math.ceil(Ca.height*S)+2*N)+(ya&&0==N?5:0),y),Ya=Ga.ownerDocument,db=null!=Ya.createElementNS?Ya.createElementNS(mxConstants.NS_SVG,"g"):Ya.createElement("g");Ga.appendChild(db);var eb=this.createSvgCanvas(db);eb.foOffset= -X?-.5:0;eb.textOffset=X?-.5:0;eb.imageOffset=X?-.5:0;eb.translate(Math.floor(N/M-Ca.x/Ma),Math.floor(N/M-Ca.y/Ma));var cb=document.createElement("div"),ub=eb.getAlternateText;eb.getAlternateText=function(ab,ib,gb,qb,nb,mb,Bb,wb,rb,vb,kb,hb,tb){if(null!=mb&&0<this.state.fontSize)try{mxUtils.isNode(mb)?mb=mb.innerText:(cb.innerHTML=mb,mb=mxUtils.extractTextWithWhitespace(cb.childNodes));for(var Cb=Math.ceil(2*qb/this.state.fontSize),xb=[],zb=0,ob=0;(0==Cb||zb<Cb)&&ob<mb.length;){var yb=mb.charCodeAt(ob); -if(10==yb||13==yb){if(0<zb)break}else xb.push(mb.charAt(ob)),255>yb&&zb++;ob++}xb.length<mb.length&&1<mb.length-xb.length&&(mb=mxUtils.trim(xb.join(""))+"...");return mb}catch(Ab){return ub.apply(this,arguments)}else return ub.apply(this,arguments)};var fb=this.backgroundImage;if(null!=fb){y=Ma/M;var pb=this.view.translate;ua=new mxRectangle((fb.x+pb.x)*y,(fb.y+pb.y)*y,fb.width*y,fb.height*y);mxUtils.intersects(Ca,ua)&&eb.image(fb.x+pb.x,fb.y+pb.y,fb.width,fb.height,fb.src,!0)}eb.scale(S);eb.textEnabled= -la;xa=null!=xa?xa:this.createSvgImageExport();var lb=xa.drawCellState,$a=xa.getLinkForCellState;xa.getLinkForCellState=function(ab,ib){var gb=$a.apply(this,arguments);return null==gb||ab.view.graph.isCustomLink(gb)?null:gb};xa.getLinkTargetForCellState=function(ab,ib){return ab.view.graph.getLinkTargetForCell(ab.cell)};xa.drawCellState=function(ab,ib){for(var gb=ab.view.graph,qb=null!=Oa?Oa.get(ab.cell):gb.isCellSelected(ab.cell),nb=gb.model.getParent(ab.cell);!(fa&&null==Oa||qb)&&null!=nb;)qb=null!= -Oa?Oa.get(nb):gb.isCellSelected(nb),nb=gb.model.getParent(nb);if(fa&&null==Oa||qb)gb.view.redrawEnumerationState(ab),lb.apply(this,arguments),this.doDrawShape(ab.secondLabel,ib)};xa.drawState(this.getView().getState(this.model.root),eb);this.updateSvgLinks(Ga,sa,!0);this.addForeignObjectWarning(eb,Ga);return Ga}finally{La&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(y,M){if("0"!=urlParams["svg-warning"]&&0<M.getElementsByTagName("foreignObject").length){var N= -y.createElement("switch"),S=y.createElement("g");S.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var X=y.createElement("a");X.setAttribute("transform","translate(0,-5)");null==X.setAttributeNS||M.ownerDocument!=document&&null==document.documentMode?(X.setAttribute("xlink:href",Graph.foreignObjectWarningLink),X.setAttribute("target","_blank")):(X.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),X.setAttributeNS(mxConstants.NS_XLINK, -"target","_blank"));y=y.createElement("text");y.setAttribute("text-anchor","middle");y.setAttribute("font-size","10px");y.setAttribute("x","50%");y.setAttribute("y","100%");mxUtils.write(y,Graph.foreignObjectWarningText);N.appendChild(S);X.appendChild(y);N.appendChild(X);M.appendChild(N)}};Graph.prototype.updateSvgLinks=function(y,M,N){y=y.getElementsByTagName("a");for(var S=0;S<y.length;S++)if(null==y[S].getAttribute("target")){var X=y[S].getAttribute("href");null==X&&(X=y[S].getAttribute("xlink:href")); -null!=X&&(null!=M&&/^https?:\/\//.test(X)?y[S].setAttribute("target",M):N&&this.isCustomLink(X)&&y[S].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(y){y=new mxSvgCanvas2D(y);y.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;y.pointerEvents=!0;return y};Graph.prototype.getSelectedElement=function(){var y=null;if(window.getSelection){var M=window.getSelection();M.getRangeAt&&M.rangeCount&&(y=M.getRangeAt(0).commonAncestorContainer)}else document.selection&& -(y=document.selection.createRange().parentElement());return y};Graph.prototype.getSelectedEditingElement=function(){for(var y=this.getSelectedElement();null!=y&&y.nodeType!=mxConstants.NODETYPE_ELEMENT;)y=y.parentNode;null!=y&&y==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(y=this.cellEditor.textarea.firstChild);return y};Graph.prototype.getParentByName=function(y,M,N){for(;null!=y&&y.nodeName!= -M;){if(y==N)return null;y=y.parentNode}return y};Graph.prototype.getParentByNames=function(y,M,N){for(;null!=y&&!(0<=mxUtils.indexOf(M,y.nodeName));){if(y==N)return null;y=y.parentNode}return y};Graph.prototype.selectNode=function(y){var M=null;if(window.getSelection){if(M=window.getSelection(),M.getRangeAt&&M.rangeCount){var N=document.createRange();N.selectNode(y);M.removeAllRanges();M.addRange(N)}}else(M=document.selection)&&"Control"!=M.type&&(y=M.createRange(),y.collapse(!0),N=M.createRange(), -N.setEndPoint("StartToStart",y),N.select())};Graph.prototype.flipEdgePoints=function(y,M,N){var S=this.getCellGeometry(y);if(null!=S){S=S.clone();if(null!=S.points)for(var X=0;X<S.points.length;X++)M?S.points[X].x=N+(N-S.points[X].x):S.points[X].y=N+(N-S.points[X].y);X=function(fa){null!=fa&&(M?fa.x=N+(N-fa.x):fa.y=N+(N-fa.y))};X(S.getTerminalPoint(!0));X(S.getTerminalPoint(!1));this.model.setGeometry(y,S)}};Graph.prototype.flipChildren=function(y,M,N){this.model.beginUpdate();try{for(var S=this.model.getChildCount(y), -X=0;X<S;X++){var fa=this.model.getChildAt(y,X);if(this.model.isEdge(fa))this.flipEdgePoints(fa,M,N);else{var la=this.getCellGeometry(fa);null!=la&&(la=la.clone(),M?la.x=N+(N-la.x-la.width):la.y=N+(N-la.y-la.height),this.model.setGeometry(fa,la))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(y,M){this.model.beginUpdate();try{y=this.model.getTopmostCells(y);for(var N=[],S=0;S<y.length;S++)if(this.model.isEdge(y[S])){var X=this.view.getState(y[S]);null!=X&&this.flipEdgePoints(y[S], -M,(M?X.getCenterX():X.getCenterY())/this.view.scale-(M?X.origin.x:X.origin.y)-(M?this.view.translate.x:this.view.translate.y))}else{var fa=this.getCellGeometry(y[S]);null!=fa&&this.flipChildren(y[S],M,M?fa.getCenterX()-fa.x:fa.getCenterY()-fa.y);N.push(y[S])}this.toggleCellStyles(M?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,N)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(y,M){var N=null;if(null!=y&&0<y.length){this.model.beginUpdate();try{for(var S=0;S<y.length;S++){var X= -this.model.getParent(y[S]);if(this.isTable(X)){var fa=this.getCellGeometry(y[S]),la=this.getCellGeometry(X);null!=fa&&null!=la&&(la=la.clone(),la.height-=fa.height,this.model.setGeometry(X,la))}}var xa=this.selectParentAfterDelete?this.model.getParents(y):null;this.removeCells(y,M)}finally{this.model.endUpdate()}if(null!=xa)for(N=[],S=0;S<xa.length;S++)this.model.contains(xa[S])&&(this.model.isVertex(xa[S])||this.model.isEdge(xa[S]))&&N.push(xa[S])}return N};Graph.prototype.insertTableColumn=function(y, -M){var N=this.getModel();N.beginUpdate();try{var S=y,X=0;if(this.isTableCell(y)){var fa=N.getParent(y);S=N.getParent(fa);X=mxUtils.indexOf(N.getChildCells(fa,!0),y)}else this.isTableRow(y)?S=N.getParent(y):y=N.getChildCells(S,!0)[0],M||(X=N.getChildCells(y,!0).length-1);var la=N.getChildCells(S,!0),xa=Graph.minTableColumnWidth;for(y=0;y<la.length;y++){var sa=N.getChildCells(la[y],!0)[X],ya=N.cloneCell(sa,!1),Fa=this.getCellGeometry(ya);ya.value=null;ya.style=mxUtils.setStyle(mxUtils.setStyle(ya.style, -"rowspan",null),"colspan",null);if(null!=Fa){null!=Fa.alternateBounds&&(Fa.width=Fa.alternateBounds.width,Fa.height=Fa.alternateBounds.height,Fa.alternateBounds=null);xa=Fa.width;var wa=this.getCellGeometry(la[y]);null!=wa&&(Fa.height=wa.height)}N.add(la[y],ya,X+(M?0:1))}var ua=this.getCellGeometry(S);null!=ua&&(ua=ua.clone(),ua.width+=xa,N.setGeometry(S,ua))}finally{N.endUpdate()}};Graph.prototype.deleteLane=function(y){var M=this.getModel();M.beginUpdate();try{var N=null;N="stackLayout"==this.getCurrentCellStyle(y).childLayout? -y:M.getParent(y);var S=M.getChildCells(N,!0);0==S.length?M.remove(N):(N==y&&(y=S[S.length-1]),M.remove(y))}finally{M.endUpdate()}};Graph.prototype.insertLane=function(y,M){var N=this.getModel();N.beginUpdate();try{var S=null;if("stackLayout"==this.getCurrentCellStyle(y).childLayout){S=y;var X=N.getChildCells(S,!0);y=X[M?0:X.length-1]}else S=N.getParent(y);var fa=S.getIndex(y);y=N.cloneCell(y,!1);y.value=null;N.add(S,y,fa+(M?0:1))}finally{N.endUpdate()}};Graph.prototype.insertTableRow=function(y,M){var N= -this.getModel();N.beginUpdate();try{var S=y,X=y;if(this.isTableCell(y))X=N.getParent(y),S=N.getParent(X);else if(this.isTableRow(y))S=N.getParent(y);else{var fa=N.getChildCells(S,!0);X=fa[M?0:fa.length-1]}var la=N.getChildCells(X,!0),xa=S.getIndex(X);X=N.cloneCell(X,!1);X.value=null;var sa=this.getCellGeometry(X);if(null!=sa){for(fa=0;fa<la.length;fa++){y=N.cloneCell(la[fa],!1);y.value=null;y.style=mxUtils.setStyle(mxUtils.setStyle(y.style,"rowspan",null),"colspan",null);var ya=this.getCellGeometry(y); -null!=ya&&(null!=ya.alternateBounds&&(ya.width=ya.alternateBounds.width,ya.height=ya.alternateBounds.height,ya.alternateBounds=null),ya.height=sa.height);X.insert(y)}N.add(S,X,xa+(M?0:1));var Fa=this.getCellGeometry(S);null!=Fa&&(Fa=Fa.clone(),Fa.height+=sa.height,N.setGeometry(S,Fa))}}finally{N.endUpdate()}};Graph.prototype.deleteTableColumn=function(y){var M=this.getModel();M.beginUpdate();try{var N=y,S=y;this.isTableCell(y)&&(S=M.getParent(y));this.isTableRow(S)&&(N=M.getParent(S));var X=M.getChildCells(N, -!0);if(0==X.length)M.remove(N);else{this.isTableRow(S)||(S=X[0]);var fa=M.getChildCells(S,!0);if(1>=fa.length)M.remove(N);else{var la=fa.length-1;this.isTableCell(y)&&(la=mxUtils.indexOf(fa,y));for(S=y=0;S<X.length;S++){var xa=M.getChildCells(X[S],!0)[la];M.remove(xa);var sa=this.getCellGeometry(xa);null!=sa&&(y=Math.max(y,sa.width))}var ya=this.getCellGeometry(N);null!=ya&&(ya=ya.clone(),ya.width-=y,M.setGeometry(N,ya))}}}finally{M.endUpdate()}};Graph.prototype.deleteTableRow=function(y){var M=this.getModel(); -M.beginUpdate();try{var N=y,S=y;this.isTableCell(y)&&(y=S=M.getParent(y));this.isTableRow(y)&&(N=M.getParent(S));var X=M.getChildCells(N,!0);if(1>=X.length)M.remove(N);else{this.isTableRow(S)||(S=X[X.length-1]);M.remove(S);y=0;var fa=this.getCellGeometry(S);null!=fa&&(y=fa.height);var la=this.getCellGeometry(N);null!=la&&(la=la.clone(),la.height-=y,M.setGeometry(N,la))}}finally{M.endUpdate()}};Graph.prototype.insertRow=function(y,M){for(var N=y.tBodies[0],S=N.rows[0].cells,X=y=0;X<S.length;X++){var fa= -S[X].getAttribute("colspan");y+=null!=fa?parseInt(fa):1}M=N.insertRow(M);for(X=0;X<y;X++)mxUtils.br(M.insertCell(-1));return M.cells[0]};Graph.prototype.deleteRow=function(y,M){y.tBodies[0].deleteRow(M)};Graph.prototype.insertColumn=function(y,M){var N=y.tHead;if(null!=N)for(var S=0;S<N.rows.length;S++){var X=document.createElement("th");N.rows[S].appendChild(X);mxUtils.br(X)}y=y.tBodies[0];for(N=0;N<y.rows.length;N++)S=y.rows[N].insertCell(M),mxUtils.br(S);return y.rows[0].cells[0<=M?M:y.rows[0].cells.length- -1]};Graph.prototype.deleteColumn=function(y,M){if(0<=M){y=y.tBodies[0].rows;for(var N=0;N<y.length;N++)y[N].cells.length>M&&y[N].deleteCell(M)}};Graph.prototype.pasteHtmlAtCaret=function(y){if(window.getSelection){var M=window.getSelection();if(M.getRangeAt&&M.rangeCount){M=M.getRangeAt(0);M.deleteContents();var N=document.createElement("div");N.innerHTML=y;y=document.createDocumentFragment();for(var S;S=N.firstChild;)lastNode=y.appendChild(S);M.insertNode(y)}}else(M=document.selection)&&"Control"!= -M.type&&M.createRange().pasteHTML(y)};Graph.prototype.createLinkForHint=function(y,M){function N(X,fa){X.length>fa&&(X=X.substring(0,Math.round(fa/2))+"..."+X.substring(X.length-Math.round(fa/4)));return X}y=null!=y?y:"javascript:void(0);";if(null==M||0==M.length)M=this.isCustomLink(y)?this.getLinkTitle(y):y;var S=document.createElement("a");S.setAttribute("rel",this.linkRelation);S.setAttribute("href",this.getAbsoluteUrl(y));S.setAttribute("title",N(this.isCustomLink(y)?this.getLinkTitle(y):y,80)); -null!=this.linkTarget&&S.setAttribute("target",this.linkTarget);mxUtils.write(S,N(M,40));this.isCustomLink(y)&&mxEvent.addListener(S,"click",mxUtils.bind(this,function(X){this.customLinkClicked(y);mxEvent.consume(X)}));return S};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(fa,la){this.popupMenuHandler.hideMenu()});var y=this.updateMouseEvent;this.updateMouseEvent= -function(fa){fa=y.apply(this,arguments);if(mxEvent.isTouchEvent(fa.getEvent())&&null==fa.getState()){var la=this.getCellAt(fa.graphX,fa.graphY);null!=la&&this.isSwimlane(la)&&this.hitsSwimlaneContent(la,fa.graphX,fa.graphY)||(fa.state=this.view.getState(la),null!=fa.state&&null!=fa.state.shape&&(this.container.style.cursor=fa.state.shape.node.style.cursor))}null==fa.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return fa};var M=!1,N=!1,S=!1,X=this.fireMouseEvent;this.fireMouseEvent= -function(fa,la,xa){fa==mxEvent.MOUSE_DOWN&&(la=this.updateMouseEvent(la),M=this.isCellSelected(la.getCell()),N=this.isSelectionEmpty(),S=this.popupMenuHandler.isMenuShowing());X.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(fa,la){var xa=mxEvent.isMouseEvent(la.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==la.getState()||!la.isSource(la.getState().control))&&(this.popupMenuHandler.popupTrigger||!S&&!xa&&(N&&null==la.getCell()&& -this.isSelectionEmpty()||M&&this.isCellSelected(la.getCell())));xa=!M||xa?null:mxUtils.bind(this,function(sa){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ya=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(la.getX()+ya.x+1,la.getY()+ya.y+1,sa,la.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[fa,la,xa])})};mxCellEditor.prototype.isContentEditing=function(){var y=this.graph.view.getState(this.editingCell);return null!=y&&1== -y.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var y="";window.getSelection?y=window.getSelection():document.getSelection?y=document.getSelection():document.selection&&(y=document.selection.createRange().text);return""!=y};mxCellEditor.prototype.insertTab=function(y){var M=this.textarea.ownerDocument.defaultView.getSelection(),N=M.getRangeAt(0), -S="\t";if(null!=y)for(S="";0<y;)S+=" ",y--;y=document.createElement("span");y.style.whiteSpace="pre";y.appendChild(document.createTextNode(S));N.insertNode(y);N.setStartAfter(y);N.setEndAfter(y);M.removeAllRanges();M.addRange(N)};mxCellEditor.prototype.alignText=function(y,M){var N=null!=M&&mxEvent.isShiftDown(M);if(N||null!=window.getSelection&&null!=window.getSelection().containsNode){var S=!0;this.graph.processElements(this.textarea,function(X){N||window.getSelection().containsNode(X,!0)?(X.removeAttribute("align"), -X.style.textAlign=null):S=!1});S&&this.graph.cellEditor.setAlign(y)}document.execCommand("justify"+y.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var y=window.getSelection();if(y.getRangeAt&&y.rangeCount){for(var M=[],N=0,S=y.rangeCount;N<S;++N)M.push(y.getRangeAt(N));return M}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(y){try{if(y)if(window.getSelection){sel= -window.getSelection();sel.removeAllRanges();for(var M=0,N=y.length;M<N;++M)sel.addRange(y[M])}else document.selection&&y.select&&y.select()}catch(S){}};var u=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(y){null!=y.text&&(y.text.replaceLinefeeds="0"!=mxUtils.getValue(y.style,"nl2Br","1"));u.apply(this,arguments)};var H=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(y,M){this.isKeepFocusEvent(y)||!mxEvent.isAltDown(y.getEvent())? -H.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(y){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var J=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(y,M){y=this.graph.getStartEditingCell(y,M);J.apply(this,arguments);var N=this.graph.view.getState(y);this.textarea.className=null!=N&&1==N.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor"; -this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(y);N=this.graph.getModel().getParent(y);var S=this.graph.getCellGeometry(y);if(this.graph.getModel().isEdge(N)&&null!=S&&S.relative||this.graph.getModel().isEdge(y))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var D=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(y){function M(X,fa){fa.originalNode=X;X=X.firstChild; -for(var la=fa.firstChild;null!=X&&null!=la;)M(X,la),X=X.nextSibling,la=la.nextSibling;return fa}function N(X,fa){if(null!=X)if(fa.originalNode!=X)S(X);else for(X=X.firstChild,fa=fa.firstChild;null!=X;){var la=X.nextSibling;null==fa?S(X):(N(X,fa),fa=fa.nextSibling);X=la}}function S(X){for(var fa=X.firstChild;null!=fa;){var la=fa.nextSibling;S(fa);fa=la}1==X.nodeType&&("BR"===X.nodeName||null!=X.firstChild)||3==X.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(X)).length?(3==X.nodeType&&mxUtils.setTextContent(X, -mxUtils.getTextContent(X).replace(/\n|\r/g,"")),1==X.nodeType&&(X.removeAttribute("style"),X.removeAttribute("class"),X.removeAttribute("width"),X.removeAttribute("cellpadding"),X.removeAttribute("cellspacing"),X.removeAttribute("border"))):X.parentNode.removeChild(X)}D.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(X){var fa=M(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this, -function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?N(this.textarea,fa):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var y=this.graph.view.getState(this.editingCell);if(null!=y){var M=null!=y&&"0"!=mxUtils.getValue(y.style,"nl2Br","1"),N=this.saveSelection();if(this.codeViewMode){xa=mxUtils.extractTextWithWhitespace(this.textarea.childNodes); -0<xa.length&&"\n"==xa.charAt(xa.length-1)&&(xa=xa.substring(0,xa.length-1));xa=this.graph.sanitizeHtml(M?xa.replace(/\n/g,"<br/>"):xa,!0);this.textarea.className="mxCellEditor geContentEditable";sa=mxUtils.getValue(y.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);M=mxUtils.getValue(y.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var S=mxUtils.getValue(y.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),X=(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE, -0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,fa=(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,la=[];(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&la.push("underline");(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&la.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT? -Math.round(sa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(sa)+"px";this.textarea.style.textDecoration=la.join(" ");this.textarea.style.fontWeight=X?"bold":"normal";this.textarea.style.fontStyle=fa?"italic":"";this.textarea.style.fontFamily=M;this.textarea.style.textAlign=S;this.textarea.style.padding="0px";this.textarea.innerHTML!=xa&&(this.textarea.innerHTML=xa,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange= -0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");var xa=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(xa=mxUtils.replaceTrailingNewlines(xa,"<div><br></div>"));xa=this.graph.sanitizeHtml(M?xa.replace(/\n/g,"").replace(/<br\s*.?>/g,"<br>"):xa,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var sa=mxConstants.DEFAULT_FONTSIZE; -this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(sa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(sa)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=xa&&(this.textarea.innerHTML= -xa);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=N;this.resize()}};var G=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(y,M){if(null!=this.textarea)if(y=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=y){var N=y.view.scale;this.bounds=mxRectangle.fromRectangle(y);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*N;this.bounds.height= -60*N;var S=null!=y.text?y.text.margin:null;null==S&&(S=mxUtils.getAlignmentAsPoint(mxUtils.getValue(y.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(y.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=S.x*this.bounds.width;this.bounds.y+=S.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/N)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/N)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight< -this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/N)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*N);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/N)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*N);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top= -Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+N+","+N+")")}else this.textarea.style.height="",this.textarea.style.overflow="",G.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(y,M){if("0"==mxUtils.getValue(y.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var N=this.graph.getEditingValue(y.cell,M);"1"==mxUtils.getValue(y.style,"nl2Br", -"1")&&(N=N.replace(/\n/g,"<br/>"));return N=this.graph.sanitizeHtml(N,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(y){if("0"==mxUtils.getValue(y.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var M=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return M="1"==mxUtils.getValue(y.style,"nl2Br","1")?M.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):M.replace(/\r\n/g,"").replace(/\n/g,"")};var V= -mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(y){this.codeViewMode&&this.toggleViewMode();V.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(y){}};var U=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(y,M){this.graph.getModel().beginUpdate();try{U.apply(this,arguments),""==M&&this.graph.isCellDeletable(y.cell)&&0==this.graph.model.getChildCount(y.cell)&& -this.graph.isTransparentState(y)&&this.graph.removeCells([y.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(y){var M=mxUtils.getValue(y.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=M&&M!=mxConstants.NONE||!(null!=y.cell.geometry&&0<y.cell.geometry.width)||0==mxUtils.getValue(y.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(y.style,mxConstants.STYLE_HORIZONTAL,1)||(M=mxUtils.getValue(y.style,mxConstants.STYLE_FILLCOLOR, -null));M==mxConstants.NONE&&(M=null);return M};mxCellEditor.prototype.getBorderColor=function(y){var M=mxUtils.getValue(y.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);null!=M&&M!=mxConstants.NONE||!(null!=y.cell.geometry&&0<y.cell.geometry.width)||0==mxUtils.getValue(y.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(y.style,mxConstants.STYLE_HORIZONTAL,1)||(M=mxUtils.getValue(y.style,mxConstants.STYLE_STROKECOLOR,null));M==mxConstants.NONE&&(M=null);return M};mxCellEditor.prototype.getMinimumSize= -function(y){var M=this.graph.getView().scale;return new mxRectangle(0,0,null==y.text?30:y.text.size*M+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(y,M){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(M.getEvent)};mxGraphView.prototype.formatUnitText=function(y){return y?e(y,this.unit):y};mxGraphHandler.prototype.updateHint=function(y){if(null!=this.pBounds&&(null!=this.shape|| -this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var M=this.graph.view.translate,N=this.graph.view.scale;y=this.roundLength((this.bounds.x+this.currentDx)/N-M.x);M=this.roundLength((this.bounds.y+this.currentDy)/N-M.y);N=this.graph.view.unit;this.hint.innerHTML=e(y,N)+", "+e(M,N);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+ -Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var Y=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(y,M){Y.apply(this,arguments);var N=this.graph.getCellStyle(y);if(null==N.childLayout){var S=this.graph.model.getParent(y),X=null!=S?this.graph.getCellGeometry(S):null;if(null!=X&&(N=this.graph.getCellStyle(S),"stackLayout"==N.childLayout)){var fa=parseFloat(mxUtils.getValue(N, -"stackBorder",mxStackLayout.prototype.border));N="1"==mxUtils.getValue(N,"horizontalStack","1");var la=this.graph.getActualStartSize(S);X=X.clone();N?X.height=M.height+la.y+la.height+2*fa:X.width=M.width+la.x+la.width+2*fa;this.graph.model.setGeometry(S,X)}}};var O=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function y(xa){N.get(xa)||(N.put(xa,!0),X.push(xa))}for(var M=O.apply(this,arguments),N=new mxDictionary,S= -this.graph.model,X=[],fa=0;fa<M.length;fa++){var la=M[fa];this.graph.isTableCell(la)?y(S.getParent(S.getParent(la))):this.graph.isTableRow(la)&&y(S.getParent(la));y(la)}return X};var qa=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(y){var M=qa.apply(this,arguments);M.stroke="#C0C0C0";M.strokewidth=1;return M};var oa=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(y){var M= -oa.apply(this,arguments);M.stroke="#C0C0C0";M.strokewidth=1;return M};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var y=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+y.x/2,this.bounds.y+this.rotationHandleVSpacing-y.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(y,M){return this.graph.isRecursiveVertexResize(y)&&!mxEvent.isAltDown(M.getEvent())};mxVertexHandler.prototype.isCenteredEvent= -function(y,M){return mxEvent.isControlDown(M.getEvent())||mxEvent.isMetaDown(M.getEvent())};var aa=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return aa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))): -this.bounds};var da=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return da.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var ia=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(y){return y.tableHandle||ia.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset= -function(){var y=0;this.graph.isTableRow(this.state.cell)?y=1:this.graph.isTableCell(this.state.cell)&&(y=2);return y};var L=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return L.apply(this,arguments).grow(-this.getSelectionBorderInset())};var Z=null,P=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==Z&&(Z=mxCellRenderer.defaultShapes.tableLine);var y=P.apply(this,arguments); -if(this.graph.isTable(this.state.cell)){var M=function(Oa,Ca,Ma){for(var Ga=[],Ya=0;Ya<Oa.length;Ya++){var db=Oa[Ya];Ga.push(null==db?null:new mxPoint((sa+db.x+Ca)*fa,(ya+db.y+Ma)*fa))}return Ga},N=this,S=this.graph,X=S.model,fa=S.view.scale,la=this.state,xa=this.selectionBorder,sa=this.state.origin.x+S.view.translate.x,ya=this.state.origin.y+S.view.translate.y;null==y&&(y=[]);var Fa=S.view.getCellStates(X.getChildCells(this.state.cell,!0));if(0<Fa.length){var wa=X.getChildCells(Fa[0].cell,!0),ua= -S.getTableLines(this.state.cell,!1,!0),La=S.getTableLines(this.state.cell,!0,!1);for(X=0;X<Fa.length;X++)mxUtils.bind(this,function(Oa){var Ca=Fa[Oa],Ma=Oa<Fa.length-1?Fa[Oa+1]:null;Ma=null!=Ma?S.getCellGeometry(Ma.cell):null;var Ga=null!=Ma&&null!=Ma.alternateBounds?Ma.alternateBounds:Ma;Ma=null!=La[Oa]?new Z(La[Oa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Ma.isDashed=xa.isDashed;Ma.svgStrokeTolerance++;Ca=new mxHandle(Ca,"row-resize",null,Ma);Ca.tableHandle=!0;var Ya= -0;Ca.shape.node.parentNode.insertBefore(Ca.shape.node,Ca.shape.node.parentNode.firstChild);Ca.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Ya?mxConstants.NONE:xa.stroke;if(this.shape.constructor==Z)this.shape.line=M(La[Oa],0,Ya),this.shape.updateBoundsFromLine();else{var eb=S.getActualStartSize(la.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Ya*fa;this.shape.bounds.x=la.x+(Oa==Fa.length-1?0:eb.x*fa);this.shape.bounds.width=la.width-(Oa==Fa.length- -1?0:eb.width+eb.x+fa)}this.shape.redraw()}};var db=!1;Ca.setPosition=function(eb,cb,ub){Ya=Math.max(Graph.minTableRowHeight-eb.height,cb.y-eb.y-eb.height);db=mxEvent.isShiftDown(ub.getEvent());null!=Ga&&db&&(Ya=Math.min(Ya,Ga.height-Graph.minTableRowHeight))};Ca.execute=function(eb){if(0!=Ya)S.setTableRowHeight(this.state.cell,Ya,!db);else if(!N.blockDelayedSelection){var cb=S.getCellAt(eb.getGraphX(),eb.getGraphY())||la.cell;S.graphHandler.selectCellForEvent(cb,eb)}Ya=0};Ca.reset=function(){Ya=0}; -y.push(Ca)})(X);for(X=0;X<wa.length;X++)mxUtils.bind(this,function(Oa){var Ca=S.view.getState(wa[Oa]),Ma=S.getCellGeometry(wa[Oa]),Ga=null!=Ma.alternateBounds?Ma.alternateBounds:Ma;null==Ca&&(Ca=new mxCellState(S.view,wa[Oa],S.getCellStyle(wa[Oa])),Ca.x=la.x+Ma.x*fa,Ca.y=la.y+Ma.y*fa,Ca.width=Ga.width*fa,Ca.height=Ga.height*fa,Ca.updateCachedBounds());Ma=Oa<wa.length-1?wa[Oa+1]:null;Ma=null!=Ma?S.getCellGeometry(Ma):null;var Ya=null!=Ma&&null!=Ma.alternateBounds?Ma.alternateBounds:Ma;Ma=null!=ua[Oa]? -new Z(ua[Oa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Ma.isDashed=xa.isDashed;Ma.svgStrokeTolerance++;Ca=new mxHandle(Ca,"col-resize",null,Ma);Ca.tableHandle=!0;var db=0;Ca.shape.node.parentNode.insertBefore(Ca.shape.node,Ca.shape.node.parentNode.firstChild);Ca.redraw=function(){if(null!=this.shape){this.shape.stroke=0==db?mxConstants.NONE:xa.stroke;if(this.shape.constructor==Z)this.shape.line=M(ua[Oa],db,0),this.shape.updateBoundsFromLine();else{var cb=S.getActualStartSize(la.cell, -!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Ga.width+db)*fa;this.shape.bounds.y=la.y+(Oa==wa.length-1?0:cb.y*fa);this.shape.bounds.height=la.height-(Oa==wa.length-1?0:(cb.height+cb.y)*fa)}this.shape.redraw()}};var eb=!1;Ca.setPosition=function(cb,ub,fb){db=Math.max(Graph.minTableColumnWidth-Ga.width,ub.x-cb.x-Ga.width);eb=mxEvent.isShiftDown(fb.getEvent());null==Ya||eb||(db=Math.min(db,Ya.width-Graph.minTableColumnWidth))};Ca.execute=function(cb){if(0!=db)S.setTableColumnWidth(this.state.cell, -db,eb);else if(!N.blockDelayedSelection){var ub=S.getCellAt(cb.getGraphX(),cb.getGraphY())||la.cell;S.graphHandler.selectCellForEvent(ub,cb)}db=0};Ca.positionChanged=function(){};Ca.reset=function(){db=0};y.push(Ca)})(X)}}return null!=y?y.reverse():null};var ca=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(y){ca.apply(this,arguments);if(null!=this.moveHandles)for(var M=0;M<this.moveHandles.length;M++)this.moveHandles[M].style.visibility=y?"":"hidden"; -if(null!=this.cornerHandles)for(M=0;M<this.cornerHandles.length;M++)this.cornerHandles[M].node.style.visibility=y?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var y=this.graph.model;if(null!=this.moveHandles){for(var M=0;M<this.moveHandles.length;M++)this.moveHandles[M].parentNode.removeChild(this.moveHandles[M]);this.moveHandles=null}this.moveHandles=[];for(M=0;M<y.getChildCount(this.state.cell);M++)mxUtils.bind(this,function(N){if(null!=N&&y.isVertex(N.cell)){var S=mxUtils.createImage(Editor.rowMoveImage); -S.style.position="absolute";S.style.cursor="pointer";S.style.width="7px";S.style.height="4px";S.style.padding="4px 2px 4px 2px";S.rowState=N;mxEvent.addGestureListeners(S,mxUtils.bind(this,function(X){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(X)&&this.graph.isCellSelected(N.cell)||this.graph.selectCellForEvent(N.cell,X);mxEvent.isPopupTrigger(X)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(X),mxEvent.getClientY(X),this.graph.getSelectionCells()), -this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(X),this.graph.isMouseDown=!0);mxEvent.consume(X)}),null,mxUtils.bind(this,function(X){mxEvent.isPopupTrigger(X)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(X),mxEvent.getClientY(X),N.cell,X),mxEvent.consume(X))}));this.moveHandles.push(S);this.graph.container.appendChild(S)}})(this.graph.view.getState(y.getChildAt(this.state.cell,M)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var y= -0;y<this.customHandles.length;y++)this.customHandles[y].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var ja=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var y=new mxPoint(0,0),M=this.tolerance,N=this.state.style.shape;null==mxCellRenderer.defaultShapes[N]&&mxStencilRegistry.getStencil(N);N=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell; -if(!N&&null!=this.customHandles)for(var S=0;S<this.customHandles.length;S++)if(null!=this.customHandles[S].shape&&null!=this.customHandles[S].shape.bounds){var X=this.customHandles[S].shape.bounds,fa=X.getCenterX(),la=X.getCenterY();if(Math.abs(this.state.x-fa)<X.width/2||Math.abs(this.state.y-la)<X.height/2||Math.abs(this.state.x+this.state.width-fa)<X.width/2||Math.abs(this.state.y+this.state.height-la)<X.height/2){N=!0;break}}N&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(M/= -2,this.graph.isTable(this.state.cell)&&(M+=7),y.x=this.sizers[0].bounds.width+M,y.y=this.sizers[0].bounds.height+M):y=ja.apply(this,arguments);return y};mxVertexHandler.prototype.updateHint=function(y){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"°";else{y=this.state.view.scale;var M=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/ -y),M)+" x "+e(this.roundLength(this.bounds.height/y),M)}y=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==y&&(y=this.bounds);this.hint.style.left=y.x+Math.round((y.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=y.y+y.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments); -null!=this.linkHint&&(this.linkHint.style.display="")};var ka=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(y,M){ka.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var q=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(y,M){q.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display= -"")};mxEdgeHandler.prototype.updateHint=function(y,M){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var N=this.graph.view.translate,S=this.graph.view.scale,X=this.roundLength(M.x/S-N.x);N=this.roundLength(M.y/S-N.y);S=this.graph.view.unit;this.hint.innerHTML=e(X,S)+", "+e(N,S);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(X=this.constraintHandler.currentConstraint.point, -this.hint.innerHTML="["+Math.round(100*X.x)+"%, "+Math.round(100*X.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(y.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(y.getGraphY(),M.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>'); +!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(z){return!mxEvent.isAltDown(z)};var k=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(z){return k.apply(this,arguments)||this.graph.isTableRow(z)||this.graph.isTableCell(z)};var m=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(z){return m.apply(this,arguments)|| +this.graph.isEdgeIgnored(z)};var C=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(z){return this.graph.isCloneEvent(z)!=C.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var z=new mxEllipse(null,this.highlightColor,this.highlightColor,0);z.opacity=mxConstants.HIGHLIGHT_OPACITY;return z};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState= +function(z){z=this.graph.createCurrentEdgeStyle();z=this.graph.createEdge(null,null,null,null,null,z);z=new mxCellState(this.graph.view,z,this.graph.getCellStyle(z));for(var L in this.graph.currentEdgeStyle)z.style[L]=this.graph.currentEdgeStyle[L];z.style=this.graph.postProcessCellStyle(z.cell,z.style);return z};var p=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var z=p.apply(this,arguments);z.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED]; +return z};mxConnectionHandler.prototype.updatePreview=function(z){};var F=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var z=F.apply(this,arguments),L=z.getCell;z.getCell=mxUtils.bind(this,function(O){var V=L.apply(this,arguments);this.error=null;return V});return z};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle= +function(){for(var z="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",L="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),O=0;O<L.length;O++)null!=this.currentEdgeStyle[L[O]]&&(z+=L[O]+"="+this.currentEdgeStyle[L[O]]+";");null!=this.currentEdgeStyle.orthogonalLoop?z+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&& +(z+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?z+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(z+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(z+="elbow="+this.currentEdgeStyle.elbow+";");return z=null!=this.currentEdgeStyle.html?z+("html="+this.currentEdgeStyle.html+";"):z+"html=1;"}; +Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var z=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=z&&(new mxCodec(z.ownerDocument)).decode(z,this.getStylesheet())};Graph.prototype.createCellLookup=function(z,L){L=null!=L?L:{};for(var O=0;O<z.length;O++){var V=z[O];L[mxObjectIdentity.get(V)]=V.getId();for(var U=this.model.getChildCount(V), +ha=0;ha<U;ha++)this.createCellLookup([this.model.getChildAt(V,ha)],L)}return L};Graph.prototype.createCellMapping=function(z,L,O){O=null!=O?O:{};for(var V in z){var U=L[V];null==O[U]&&(O[U]=z[V].getId()||"")}return O};Graph.prototype.importGraphModel=function(z,L,O,V){L=null!=L?L:0;O=null!=O?O:0;var U=new mxCodec(z.ownerDocument),ha=new mxGraphModel;U.decode(z,ha);z=[];U={};var ma={},wa=ha.getChildren(this.cloneCell(ha.root,this.isCloneInvalidEdges(),U));if(null!=wa){var sa=this.createCellLookup([ha.root]); +wa=wa.slice();this.model.beginUpdate();try{if(1!=wa.length||this.isCellLocked(this.getDefaultParent()))for(ha=0;ha<wa.length;ha++)ya=this.model.getChildren(this.moveCells([wa[ha]],L,O,!1,this.model.getRoot())[0]),null!=ya&&(z=z.concat(ya));else{var ya=ha.getChildren(wa[0]);null!=ya&&(z=this.moveCells(ya,L,O,!1,this.getDefaultParent()),ma[ha.getChildAt(ha.root,0).getId()]=this.getDefaultParent().getId())}if(null!=z&&(this.createCellMapping(U,sa,ma),this.updateCustomLinks(ma,z),V)){this.isGridEnabled()&& +(L=this.snap(L),O=this.snap(O));var Ha=this.getBoundingBoxFromGeometry(z,!0);null!=Ha&&this.moveCells(z,L-Ha.x,O-Ha.y)}}finally{this.model.endUpdate()}}return z};Graph.prototype.encodeCells=function(z){for(var L={},O=this.cloneCells(z,null,L),V=new mxDictionary,U=0;U<z.length;U++)V.put(z[U],!0);var ha=new mxCodec,ma=new mxGraphModel,wa=ma.getChildAt(ma.getRoot(),0);for(U=0;U<O.length;U++){ma.add(wa,O[U]);var sa=this.view.getState(z[U]);if(null!=sa){var ya=this.getCellGeometry(O[U]);null!=ya&&ya.relative&& +!this.model.isEdge(z[U])&&null==V.get(this.model.getParent(z[U]))&&(ya.offset=null,ya.relative=!1,ya.x=sa.x/sa.view.scale-sa.view.translate.x,ya.y=sa.y/sa.view.scale-sa.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(L,this.createCellLookup(z)),O);return ha.encode(ma)};Graph.prototype.isSwimlane=function(z,L){var O=null;null==z||this.model.isEdge(z)||this.model.getParent(z)==this.model.getRoot()||(O=this.getCurrentCellStyle(z,L)[mxConstants.STYLE_SHAPE]);return O==mxConstants.SHAPE_SWIMLANE|| +"table"==O||"tableRow"==O};var K=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(z){var L=this.model.getParent(z);if(null!=L){var O=this.getCurrentCellStyle(L);if(null!=O.expand)return"0"!=O.expand}return K.apply(this,arguments)&&(null==L||!this.isTable(L))};var P=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(z,L,O,V,U,ha,ma,wa){null==wa&&(wa=this.model.getParent(z),this.isTable(wa)||this.isTableRow(wa))&&(wa=this.getCellAt(ha,ma,null,!0,!1));O=null;this.model.beginUpdate(); +try{O=P.apply(this,[z,L,O,V,U,ha,ma,wa]);this.model.setValue(O,"");var sa=this.getChildCells(O,!0);for(L=0;L<sa.length;L++){var ya=this.getCellGeometry(sa[L]);null!=ya&&ya.relative&&0<ya.x&&this.model.remove(sa[L])}var Ha=this.getChildCells(z,!0);for(L=0;L<Ha.length;L++)ya=this.getCellGeometry(Ha[L]),null!=ya&&ya.relative&&0>=ya.x&&this.model.remove(Ha[L]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[O]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[O]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING, +null,[z]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[z]);var Qa=this.model.getTerminal(O,!1);if(null!=Qa){var ua=this.getCurrentCellStyle(Qa);null!=ua&&"1"==ua.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[z]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[z]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[O]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[O]))}}finally{this.model.endUpdate()}return O};var d=Graph.prototype.selectCell;Graph.prototype.selectCell= +function(z,L,O){if(L||O)d.apply(this,arguments);else{var V=this.getSelectionCell(),U=null,ha=[],ma=mxUtils.bind(this,function(wa){if(null!=this.view.getState(wa)&&(this.model.isVertex(wa)||this.model.isEdge(wa)))if(ha.push(wa),wa==V)U=ha.length-1;else if(z&&null==V&&0<ha.length||null!=U&&z&&ha.length>U||!z&&0<U)return;for(var sa=0;sa<this.model.getChildCount(wa);sa++)ma(this.model.getChildAt(wa,sa))});ma(this.model.root);0<ha.length&&(U=null!=U?mxUtils.mod(U+(z?1:-1),ha.length):0,this.setSelectionCell(ha[U]))}}; +Graph.prototype.swapShapes=function(z,L,O,V,U,ha,ma){L=!1;if(!V&&null!=U&&1==z.length&&(V=this.view.getState(U),O=this.view.getState(z[0]),null!=V&&null!=O&&(null!=ha&&mxEvent.isShiftDown(ha)||"umlLifeline"==V.style.shape&&"umlLifeline"==O.style.shape)&&(V=this.getCellGeometry(U),ha=this.getCellGeometry(z[0]),null!=V&&null!=ha))){L=V.clone();V=ha.clone();V.x=L.x;V.y=L.y;L.x=ha.x;L.y=ha.y;this.model.beginUpdate();try{this.model.setGeometry(U,L),this.model.setGeometry(z[0],V)}finally{this.model.endUpdate()}L= +!0}return L};var f=Graph.prototype.moveCells;Graph.prototype.moveCells=function(z,L,O,V,U,ha,ma){if(this.swapShapes(z,L,O,V,U,ha,ma))return z;ma=null!=ma?ma:{};if(this.isTable(U)){for(var wa=[],sa=0;sa<z.length;sa++)this.isTable(z[sa])?wa=wa.concat(this.model.getChildCells(z[sa],!0).reverse()):wa.push(z[sa]);z=wa}this.model.beginUpdate();try{wa=[];for(sa=0;sa<z.length;sa++)if(null!=U&&this.isTableRow(z[sa])){var ya=this.model.getParent(z[sa]),Ha=this.getCellGeometry(z[sa]);this.isTable(ya)&&wa.push(ya); +if(null!=ya&&null!=Ha&&this.isTable(ya)&&this.isTable(U)&&(V||ya!=U)){if(!V){var Qa=this.getCellGeometry(ya);null!=Qa&&(Qa=Qa.clone(),Qa.height-=Ha.height,this.model.setGeometry(ya,Qa))}Qa=this.getCellGeometry(U);null!=Qa&&(Qa=Qa.clone(),Qa.height+=Ha.height,this.model.setGeometry(U,Qa));var ua=this.model.getChildCells(U,!0);if(0<ua.length){z[sa]=V?this.cloneCell(z[sa]):z[sa];var za=this.model.getChildCells(z[sa],!0),Fa=this.model.getChildCells(ua[0],!0),Ba=Fa.length-za.length;if(0<Ba)for(var Ea= +0;Ea<Ba;Ea++){var Oa=this.cloneCell(za[za.length-1]);null!=Oa&&(Oa.value="",this.model.add(z[sa],Oa))}else if(0>Ba)for(Ea=0;Ea>Ba;Ea--)this.model.remove(za[za.length+Ea-1]);za=this.model.getChildCells(z[sa],!0);for(Ea=0;Ea<Fa.length;Ea++){var Pa=this.getCellGeometry(Fa[Ea]),bb=this.getCellGeometry(za[Ea]);null!=Pa&&null!=bb&&(bb=bb.clone(),bb.width=Pa.width,this.model.setGeometry(za[Ea],bb))}}}}var eb=f.apply(this,arguments);for(sa=0;sa<wa.length;sa++)!V&&this.model.contains(wa[sa])&&0==this.model.getChildCount(wa[sa])&& +this.model.remove(wa[sa]);V&&this.updateCustomLinks(this.createCellMapping(ma,this.createCellLookup(z)),eb)}finally{this.model.endUpdate()}return eb};var g=Graph.prototype.removeCells;Graph.prototype.removeCells=function(z,L){var O=[];this.model.beginUpdate();try{for(var V=0;V<z.length;V++)if(this.isTableCell(z[V])){var U=this.model.getParent(z[V]),ha=this.model.getParent(U);1==this.model.getChildCount(U)&&1==this.model.getChildCount(ha)?0>mxUtils.indexOf(z,ha)&&0>mxUtils.indexOf(O,ha)&&O.push(ha): +this.labelChanged(z[V],"")}else{if(this.isTableRow(z[V])&&(ha=this.model.getParent(z[V]),0>mxUtils.indexOf(z,ha)&&0>mxUtils.indexOf(O,ha))){for(var ma=this.model.getChildCells(ha,!0),wa=0,sa=0;sa<ma.length;sa++)0<=mxUtils.indexOf(z,ma[sa])&&wa++;wa==ma.length&&O.push(ha)}O.push(z[V])}O=g.apply(this,[O,L])}finally{this.model.endUpdate()}return O};Graph.prototype.updateCustomLinks=function(z,L,O){O=null!=O?O:new Graph;for(var V=0;V<L.length;V++)null!=L[V]&&O.updateCustomLinksForCell(z,L[V],O)};Graph.prototype.updateCustomLinksForCell= +function(z,L){this.doUpdateCustomLinksForCell(z,L);for(var O=this.model.getChildCount(L),V=0;V<O;V++)this.updateCustomLinksForCell(z,this.model.getChildAt(L,V))};Graph.prototype.doUpdateCustomLinksForCell=function(z,L){};Graph.prototype.getAllConnectionConstraints=function(z,L){if(null!=z){L=mxUtils.getValue(z.style,"points",null);if(null!=L){z=[];try{var O=JSON.parse(L);for(L=0;L<O.length;L++){var V=O[L];z.push(new mxConnectionConstraint(new mxPoint(V[0],V[1]),2<V.length?"0"!=V[2]:!0,null,3<V.length? +V[3]:0,4<V.length?V[4]:0))}}catch(ha){}return z}if(null!=z.shape&&null!=z.shape.bounds){V=z.shape.direction;L=z.shape.bounds;var U=z.shape.scale;O=L.width/U;L=L.height/U;if(V==mxConstants.DIRECTION_NORTH||V==mxConstants.DIRECTION_SOUTH)V=O,O=L,L=V;L=z.shape.getConstraints(z.style,O,L);if(null!=L)return L;if(null!=z.shape.stencil&&null!=z.shape.stencil.constraints)return z.shape.stencil.constraints;if(null!=z.shape.constraints)return z.shape.constraints}}return null};Graph.prototype.flipEdge=function(z){if(null!= +z){var L=this.getCurrentCellStyle(z);L=mxUtils.getValue(L,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,L,[z])}};Graph.prototype.isValidRoot=function(z){for(var L=this.model.getChildCount(z),O=0,V=0;V<L;V++){var U=this.model.getChildAt(z,V);this.model.isVertex(U)&&(U=this.getCellGeometry(U),null==U||U.relative||O++)}return 0<O||this.isContainer(z)};Graph.prototype.isValidDropTarget= +function(z,L,O){for(var V=this.getCurrentCellStyle(z),U=!0,ha=!0,ma=0;ma<L.length&&ha;ma++)U=U&&this.isTable(L[ma]),ha=ha&&this.isTableRow(L[ma]);return(1==L.length&&null!=O&&mxEvent.isShiftDown(O)&&!mxEvent.isControlDown(O)&&!mxEvent.isAltDown(O)||("1"!=mxUtils.getValue(V,"part","0")||this.isContainer(z))&&"0"!=mxUtils.getValue(V,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(z))&&!this.isTableRow(z)&&(!this.isTable(z)||ha||U))&&!this.isCellLocked(z)}; +Graph.prototype.createGroupCell=function(){var z=mxGraph.prototype.createGroupCell.apply(this,arguments);z.setStyle("group");return z};Graph.prototype.isExtendParentsOnAdd=function(z){var L=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(L&&null!=z&&null!=this.layoutManager){var O=this.model.getParent(z);null!=O&&(O=this.layoutManager.getLayout(O),null!=O&&O.constructor==mxStackLayout&&(L=!1))}return L};Graph.prototype.getPreferredSizeForCell=function(z){var L=mxGraph.prototype.getPreferredSizeForCell.apply(this, +arguments);null!=L&&(L.width+=10,L.height+=4,this.gridEnabled&&(L.width=this.snap(L.width),L.height=this.snap(L.height)));return L};Graph.prototype.turnShapes=function(z,L){var O=this.getModel(),V=[];O.beginUpdate();try{for(var U=0;U<z.length;U++){var ha=z[U];if(O.isEdge(ha)){var ma=O.getTerminal(ha,!0),wa=O.getTerminal(ha,!1);O.setTerminal(ha,wa,!0);O.setTerminal(ha,ma,!1);var sa=O.getGeometry(ha);if(null!=sa){sa=sa.clone();null!=sa.points&&sa.points.reverse();var ya=sa.getTerminalPoint(!0),Ha=sa.getTerminalPoint(!1); +sa.setTerminalPoint(ya,!1);sa.setTerminalPoint(Ha,!0);O.setGeometry(ha,sa);var Qa=this.view.getState(ha),ua=this.view.getState(ma),za=this.view.getState(wa);if(null!=Qa){var Fa=null!=ua?this.getConnectionConstraint(Qa,ua,!0):null,Ba=null!=za?this.getConnectionConstraint(Qa,za,!1):null;this.setConnectionConstraint(ha,ma,!0,Ba);this.setConnectionConstraint(ha,wa,!1,Fa);var Ea=mxUtils.getValue(Qa.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING, +mxUtils.getValue(Qa.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ha]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Ea,[ha])}V.push(ha)}}else if(O.isVertex(ha)&&(sa=this.getCellGeometry(ha),null!=sa)){if(!(this.isTable(ha)||this.isTableRow(ha)||this.isTableCell(ha)||this.isSwimlane(ha))){sa=sa.clone();sa.x+=sa.width/2-sa.height/2;sa.y+=sa.height/2-sa.width/2;var Oa=sa.width;sa.width=sa.height;sa.height=Oa;O.setGeometry(ha,sa)}var Pa=this.view.getState(ha);if(null!=Pa){var bb= +[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],eb=mxUtils.getValue(Pa.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,bb[mxUtils.mod(mxUtils.indexOf(bb,eb)+(L?-1:1),bb.length)],[ha])}V.push(ha)}}}finally{O.endUpdate()}return V};Graph.prototype.stencilHasPlaceholders=function(z){if(null!=z&&null!=z.fgNode)for(z=z.fgNode.firstChild;null!=z;){if("text"==z.nodeName&&"1"==z.getAttribute("placeholders"))return!0; +z=z.nextSibling}return!1};var x=Graph.prototype.processChange;Graph.prototype.processChange=function(z){if(z instanceof mxGeometryChange&&(this.isTableCell(z.cell)||this.isTableRow(z.cell))&&(null==z.previous&&null!=z.geometry||null!=z.previous&&!z.previous.equals(z.geometry))){var L=z.cell;this.isTableCell(L)&&(L=this.model.getParent(L));this.isTableRow(L)&&(L=this.model.getParent(L));var O=this.view.getState(L);null!=O&&null!=O.shape&&(this.view.invalidate(L),O.shape.bounds=null)}x.apply(this,arguments); +z instanceof mxValueChange&&null!=z.cell&&null!=z.cell.value&&"object"==typeof z.cell.value&&this.invalidateDescendantsWithPlaceholders(z.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(z){z=this.model.getDescendants(z);if(0<z.length)for(var L=0;L<z.length;L++){var O=this.view.getState(z[L]);null!=O&&null!=O.shape&&null!=O.shape.stencil&&this.stencilHasPlaceholders(O.shape.stencil)?this.removeStateForCell(z[L]):this.isReplacePlaceholders(z[L])&&this.view.invalidate(z[L],!1,!1)}}; +Graph.prototype.replaceElement=function(z,L){L=z.ownerDocument.createElement(null!=L?L:"span");for(var O=Array.prototype.slice.call(z.attributes);attr=O.pop();)L.setAttribute(attr.nodeName,attr.nodeValue);L.innerHTML=z.innerHTML;z.parentNode.replaceChild(L,z)};Graph.prototype.processElements=function(z,L){if(null!=z){z=z.getElementsByTagName("*");for(var O=0;O<z.length;O++)L(z[O])}};Graph.prototype.updateLabelElements=function(z,L,O){z=null!=z?z:this.getSelectionCells();for(var V=document.createElement("div"), +U=0;U<z.length;U++)if(this.isHtmlLabel(z[U])){var ha=this.convertValueToString(z[U]);if(null!=ha&&0<ha.length){V.innerHTML=ha;for(var ma=V.getElementsByTagName(null!=O?O:"*"),wa=0;wa<ma.length;wa++)L(ma[wa]);V.innerHTML!=ha&&this.cellLabelChanged(z[U],V.innerHTML)}}};Graph.prototype.cellLabelChanged=function(z,L,O){L=Graph.zapGremlins(L);this.model.beginUpdate();try{if(null!=z.value&&"object"==typeof z.value){if(this.isReplacePlaceholders(z)&&null!=z.getAttribute("placeholder"))for(var V=z.getAttribute("placeholder"), +U=z;null!=U;){if(U==this.model.getRoot()||null!=U.value&&"object"==typeof U.value&&U.hasAttribute(V)){this.setAttributeForCell(U,V,L);break}U=this.model.getParent(U)}var ha=z.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ha.hasAttribute("label_"+Graph.diagramLanguage)?ha.setAttribute("label_"+Graph.diagramLanguage,L):ha.setAttribute("label",L);L=ha}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(z){if(null!= +z){for(var L=new mxDictionary,O=0;O<z.length;O++)L.put(z[O],!0);var V=[];for(O=0;O<z.length;O++){var U=this.model.getParent(z[O]);null==U||L.get(U)||(L.put(U,!0),V.push(U))}for(O=0;O<V.length;O++)if(U=this.view.getState(V[O]),null!=U&&(this.model.isEdge(U.cell)||this.model.isVertex(U.cell))&&this.isCellDeletable(U.cell)&&this.isTransparentState(U)){for(var ha=!0,ma=0;ma<this.model.getChildCount(U.cell)&&ha;ma++)L.get(this.model.getChildAt(U.cell,ma))||(ha=!1);ha&&z.push(U.cell)}}mxGraph.prototype.cellsRemoved.apply(this, +arguments)};Graph.prototype.removeCellsAfterUngroup=function(z){for(var L=[],O=0;O<z.length;O++)this.isCellDeletable(z[O])&&this.isTransparentState(this.view.getState(z[O]))&&L.push(z[O]);z=L;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(z,L){this.setAttributeForCell(z,"link",L)};Graph.prototype.setTooltipForCell=function(z,L){var O="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(z.value)&&z.value.hasAttribute("tooltip_"+ +Graph.diagramLanguage)&&(O="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(z,O,L)};Graph.prototype.getAttributeForCell=function(z,L,O){z=null!=z.value&&"object"===typeof z.value?z.value.getAttribute(L):null;return null!=z?z:O};Graph.prototype.setAttributeForCell=function(z,L,O){if(null!=z.value&&"object"==typeof z.value)var V=z.value.cloneNode(!0);else V=mxUtils.createXmlDocument().createElement("UserObject"),V.setAttribute("label",z.value||"");null!=O?V.setAttribute(L,O):V.removeAttribute(L); +this.model.setValue(z,V)};var y=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(z,L,O,V){this.getModel();if(mxEvent.isAltDown(L))return null;for(var U=0;U<z.length;U++){var ha=this.model.getParent(z[U]);if(this.model.isEdge(ha)&&0>mxUtils.indexOf(z,ha))return null}ha=y.apply(this,arguments);var ma=!0;for(U=0;U<z.length&&ma;U++)ma=ma&&this.isTableRow(z[U]);ma&&(this.isTableCell(ha)&&(ha=this.model.getParent(ha)),this.isTableRow(ha)&&(ha=this.model.getParent(ha)),this.isTable(ha)|| +(ha=null));return ha};Graph.prototype.click=function(z){mxGraph.prototype.click.call(this,z);this.firstClickState=z.getState();this.firstClickSource=z.getSource()};Graph.prototype.dblClick=function(z,L){this.isEnabled()&&(L=this.insertTextForEvent(z,L),mxGraph.prototype.dblClick.call(this,z,L))};Graph.prototype.insertTextForEvent=function(z,L){var O=mxUtils.convertPoint(this.container,mxEvent.getClientX(z),mxEvent.getClientY(z));if(null!=z&&!this.model.isVertex(L)){var V=this.model.isEdge(L)?this.view.getState(L): +null,U=mxEvent.getSource(z);this.firstClickState!=V||this.firstClickSource!=U||null!=V&&null!=V.text&&null!=V.text.node&&null!=V.text.boundingBox&&(mxUtils.contains(V.text.boundingBox,O.x,O.y)||mxUtils.isAncestorNode(V.text.node,mxEvent.getSource(z)))||(null!=V||this.isCellLocked(this.getDefaultParent()))&&(null==V||this.isCellLocked(V.cell))||!(null!=V||mxClient.IS_SVG&&U==this.view.getCanvas().ownerSVGElement)||(null==V&&(V=this.view.getState(this.getCellAt(O.x,O.y))),L=this.addText(O.x,O.y,V))}return L}; +Graph.prototype.getInsertPoint=function(){var z=this.getGridSize(),L=this.container.scrollLeft/this.view.scale-this.view.translate.x,O=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var V=this.getPageLayout(),U=this.getPageSize();L=Math.max(L,V.x*U.width);O=Math.max(O,V.y*U.height)}return new mxPoint(this.snap(L+z),this.snap(O+z))};Graph.prototype.getFreeInsertPoint=function(){var z=this.view,L=this.getGraphBounds(),O=this.getInsertPoint(),V=this.snap(Math.round(Math.max(O.x, +L.x/z.scale-z.translate.x+(0==L.width?2*this.gridSize:0))));z=this.snap(Math.round(Math.max(O.y,(L.y+L.height)/z.scale-z.translate.y+2*this.gridSize)));return new mxPoint(V,z)};Graph.prototype.getCenterInsertPoint=function(z){z=null!=z?z:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/ +2)/this.view.scale-this.view.translate.y-z.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-z.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(z,L,O){var V=new mxCell;V.value="Text";V.geometry=new mxGeometry(0,0,0,0);V.vertex=!0;if(null!=O&&this.model.isEdge(O.cell)){V.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];"; +V.geometry.relative=!0;V.connectable=!1;var U=this.view.getRelativePoint(O,z,L);V.geometry.x=Math.round(1E4*U.x)/1E4;V.geometry.y=Math.round(U.y);V.geometry.offset=new mxPoint(0,0);U=this.view.getPoint(O,V.geometry);var ha=this.view.scale;V.geometry.offset=new mxPoint(Math.round((z-U.x)/ha),Math.round((L-U.y)/ha))}else U=this.view.translate,V.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",V.geometry.width=40,V.geometry.height=20,V.geometry.x=Math.round(z/this.view.scale)- +U.x-(null!=O?O.origin.x:0),V.geometry.y=Math.round(L/this.view.scale)-U.y-(null!=O?O.origin.y:0),V.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([V],null!=O?O.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[V])),this.autoSizeCell(V)}finally{this.getModel().endUpdate()}return V};Graph.prototype.addClickHandler=function(z,L,O){var V=mxUtils.bind(this,function(){var sa=this.container.getElementsByTagName("a");if(null!=sa)for(var ya=0;ya<sa.length;ya++){var Ha= +this.getAbsoluteUrl(sa[ya].getAttribute("href"));null!=Ha&&(sa[ya].setAttribute("rel",this.linkRelation),sa[ya].setAttribute("href",Ha),null!=L&&mxEvent.addGestureListeners(sa[ya],null,null,L))}});this.model.addListener(mxEvent.CHANGE,V);V();var U=this.container.style.cursor,ha=this.getTolerance(),ma=this,wa={currentState:null,currentLink:null,currentTarget:null,highlight:null!=z&&""!=z&&z!=mxConstants.NONE?new mxCellHighlight(ma,z,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(sa){var ya= +sa.sourceState;if(null==ya||null==ma.getLinkForCell(ya.cell))sa=ma.getCellAt(sa.getGraphX(),sa.getGraphY(),null,null,null,function(Ha,Qa,ua){return null==ma.getLinkForCell(Ha.cell)}),ya=null==ya||ma.model.isAncestor(sa,ya.cell)?ma.view.getState(sa):null;ya!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ya,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(sa,ya){this.startX=ya.getGraphX();this.startY=ya.getGraphY();this.scrollLeft=ma.container.scrollLeft; +this.scrollTop=ma.container.scrollTop;null==this.currentLink&&"auto"==ma.container.style.overflow&&(ma.container.style.cursor="move");this.updateCurrentState(ya)},mouseMove:function(sa,ya){if(ma.isMouseDown)null!=this.currentLink&&(sa=Math.abs(this.startX-ya.getGraphX()),ya=Math.abs(this.startY-ya.getGraphY()),(sa>ha||ya>ha)&&this.clear());else{for(sa=ya.getSource();null!=sa&&"a"!=sa.nodeName.toLowerCase();)sa=sa.parentNode;null!=sa?this.clear():(null!=ma.tooltipHandler&&null!=this.currentLink&&null!= +this.currentState&&ma.tooltipHandler.reset(ya,!0,this.currentState),(null==this.currentState||ya.getState()!=this.currentState&&null!=ya.sourceState||!ma.intersects(this.currentState,ya.getGraphX(),ya.getGraphY()))&&this.updateCurrentState(ya))}},mouseUp:function(sa,ya){var Ha=ya.getSource();for(sa=ya.getEvent();null!=Ha&&"a"!=Ha.nodeName.toLowerCase();)Ha=Ha.parentNode;null==Ha&&Math.abs(this.scrollLeft-ma.container.scrollLeft)<ha&&Math.abs(this.scrollTop-ma.container.scrollTop)<ha&&(null==ya.sourceState|| +!ya.isSource(ya.sourceState.control))&&((mxEvent.isLeftMouseButton(sa)||mxEvent.isMiddleMouseButton(sa))&&!mxEvent.isPopupTrigger(sa)||mxEvent.isTouchEvent(sa))&&(null!=this.currentLink?(Ha=ma.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Ha||null==L||L(sa,this.currentLink),mxEvent.isConsumed(sa)||(sa=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(sa)?"_blank":Ha?ma.linkTarget:"_top",ma.openLink(this.currentLink,sa),ya.consume())):null!=O&&!ya.isConsumed()&& +Math.abs(this.scrollLeft-ma.container.scrollLeft)<ha&&Math.abs(this.scrollTop-ma.container.scrollTop)<ha&&Math.abs(this.startX-ya.getGraphX())<ha&&Math.abs(this.startY-ya.getGraphY())<ha&&O(ya.getEvent()));this.clear()},activate:function(sa){this.currentLink=ma.getAbsoluteUrl(ma.getLinkForCell(sa.cell));null!=this.currentLink&&(this.currentTarget=ma.getLinkTargetForCell(sa.cell),ma.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(sa))},clear:function(){null!=ma.container&& +(ma.container.style.cursor=U);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=ma.tooltipHandler&&ma.tooltipHandler.hide()}};ma.click=function(sa){};ma.addMouseListener(wa);mxEvent.addListener(document,"mouseleave",function(sa){wa.clear()})};Graph.prototype.duplicateCells=function(z,L){z=null!=z?z:this.getSelectionCells();L=null!=L?L:!0;for(var O=0;O<z.length;O++)this.isTableCell(z[O])&&(z[O]=this.model.getParent(z[O]));z=this.model.getTopmostCells(z); +var V=this.getModel(),U=this.gridSize,ha=[];V.beginUpdate();try{var ma={},wa=this.createCellLookup(z),sa=this.cloneCells(z,!1,ma,!0);for(O=0;O<z.length;O++){var ya=V.getParent(z[O]);if(null!=ya){var Ha=this.moveCells([sa[O]],U,U,!1)[0];ha.push(Ha);if(L)V.add(ya,sa[O]);else{var Qa=ya.getIndex(z[O]);V.add(ya,sa[O],Qa+1)}if(this.isTable(ya)){var ua=this.getCellGeometry(sa[O]),za=this.getCellGeometry(ya);null!=ua&&null!=za&&(za=za.clone(),za.height+=ua.height,V.setGeometry(ya,za))}}else ha.push(sa[O])}this.updateCustomLinks(this.createCellMapping(ma, +wa),sa,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",sa))}finally{V.endUpdate()}return ha};Graph.prototype.insertImage=function(z,L,O){if(null!=z&&null!=this.cellEditor.textarea){for(var V=this.cellEditor.textarea.getElementsByTagName("img"),U=[],ha=0;ha<V.length;ha++)U.push(V[ha]);document.execCommand("insertimage",!1,z);z=this.cellEditor.textarea.getElementsByTagName("img");if(z.length==U.length+1)for(ha=z.length-1;0<=ha;ha--)if(0==ha||z[ha]!=U[ha-1]){z[ha].setAttribute("width", +L);z[ha].setAttribute("height",O);break}}};Graph.prototype.insertLink=function(z){if(null!=this.cellEditor.textarea)if(0==z.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var L=this.cellEditor.textarea.getElementsByTagName("a"),O=[],V=0;V<L.length;V++)O.push(L[V]);document.execCommand("createlink",!1,mxUtils.trim(z));L=this.cellEditor.textarea.getElementsByTagName("a");if(L.length==O.length+1)for(V=L.length-1;0<=V;V--)if(L[V]!=O[V-1]){for(L=L[V].getElementsByTagName("a");0<L.length;){for(O= +L[0].parentNode;null!=L[0].firstChild;)O.insertBefore(L[0].firstChild,L[0]);O.removeChild(L[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(z))};Graph.prototype.isCellResizable=function(z){var L=mxGraph.prototype.isCellResizable.apply(this,arguments),O=this.getCurrentCellStyle(z);return!this.isTableCell(z)&&!this.isTableRow(z)&&(L||"0"!=mxUtils.getValue(O,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==O[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(z,L){null== +L&&(L=this.getSelectionCells());if(null!=L&&1<L.length){for(var O=[],V=null,U=null,ha=0;ha<L.length;ha++)if(this.getModel().isVertex(L[ha])){var ma=this.view.getState(L[ha]);if(null!=ma){var wa=z?ma.getCenterX():ma.getCenterY();V=null!=V?Math.max(V,wa):wa;U=null!=U?Math.min(U,wa):wa;O.push(ma)}}if(2<O.length){O.sort(function(Qa,ua){return z?Qa.x-ua.x:Qa.y-ua.y});ma=this.view.translate;wa=this.view.scale;U=U/wa-(z?ma.x:ma.y);V=V/wa-(z?ma.x:ma.y);this.getModel().beginUpdate();try{var sa=(V-U)/(O.length- +1);V=U;for(ha=1;ha<O.length-1;ha++){var ya=this.view.getState(this.model.getParent(O[ha].cell)),Ha=this.getCellGeometry(O[ha].cell);V+=sa;null!=Ha&&null!=ya&&(Ha=Ha.clone(),z?Ha.x=Math.round(V-Ha.width/2)-ya.origin.x:Ha.y=Math.round(V-Ha.height/2)-ya.origin.y,this.getModel().setGeometry(O[ha].cell,Ha))}}finally{this.getModel().endUpdate()}}}return L};Graph.prototype.isCloneEvent=function(z){return mxClient.IS_MAC&&mxEvent.isMetaDown(z)||mxEvent.isControlDown(z)};Graph.prototype.createSvgImageExport= +function(){var z=new mxImageExport;z.getLinkForCellState=mxUtils.bind(this,function(L,O){return this.getLinkForCell(L.cell)});return z};Graph.prototype.parseBackgroundImage=function(z){var L=null;null!=z&&0<z.length&&(z=JSON.parse(z),L=new mxImage(z.src,z.width,z.height));return L};Graph.prototype.getBackgroundImageObject=function(z){return z};Graph.prototype.getSvg=function(z,L,O,V,U,ha,ma,wa,sa,ya,Ha,Qa,ua,za){var Fa=null;if(null!=za)for(Fa=new mxDictionary,Ha=0;Ha<za.length;Ha++)Fa.put(za[Ha], +!0);if(za=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{L=null!=L?L:1;O=null!=O?O:0;U=null!=U?U:!0;ha=null!=ha?ha:!0;ma=null!=ma?ma:!0;ya=null!=ya?ya:!1;var Ba="page"==ua?this.view.getBackgroundPageBounds():ha&&null==Fa||V||"diagram"==ua?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Ea=this.view.scale;"diagram"==ua&&null!=this.backgroundImage&&(Ba=mxRectangle.fromRectangle(Ba),Ba.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)* +Ea,(this.view.translate.y+this.backgroundImage.y)*Ea,this.backgroundImage.width*Ea,this.backgroundImage.height*Ea)));if(null==Ba)throw Error(mxResources.get("drawingEmpty"));V=L/Ea;ua=U?-.5:0;var Oa=Graph.createSvgNode(ua,ua,Math.max(1,Math.ceil(Ba.width*V)+2*O)+(ya&&0==O?5:0),Math.max(1,Math.ceil(Ba.height*V)+2*O)+(ya&&0==O?5:0),z),Pa=Oa.ownerDocument,bb=null!=Pa.createElementNS?Pa.createElementNS(mxConstants.NS_SVG,"g"):Pa.createElement("g");Oa.appendChild(bb);var eb=this.createSvgCanvas(bb);eb.foOffset= +U?-.5:0;eb.textOffset=U?-.5:0;eb.imageOffset=U?-.5:0;eb.translate(Math.floor(O/L-Ba.x/Ea),Math.floor(O/L-Ba.y/Ea));var db=document.createElement("div"),ub=eb.getAlternateText;eb.getAlternateText=function(ab,ib,gb,qb,nb,mb,Bb,wb,rb,vb,kb,hb,tb){if(null!=mb&&0<this.state.fontSize)try{mxUtils.isNode(mb)?mb=mb.innerText:(db.innerHTML=mb,mb=mxUtils.extractTextWithWhitespace(db.childNodes));for(var Cb=Math.ceil(2*qb/this.state.fontSize),xb=[],zb=0,ob=0;(0==Cb||zb<Cb)&&ob<mb.length;){var yb=mb.charCodeAt(ob); +if(10==yb||13==yb){if(0<zb)break}else xb.push(mb.charAt(ob)),255>yb&&zb++;ob++}xb.length<mb.length&&1<mb.length-xb.length&&(mb=mxUtils.trim(xb.join(""))+"...");return mb}catch(Ab){return ub.apply(this,arguments)}else return ub.apply(this,arguments)};var fb=this.backgroundImage;if(null!=fb){z=Ea/L;var pb=this.view.translate;ua=new mxRectangle((fb.x+pb.x)*z,(fb.y+pb.y)*z,fb.width*z,fb.height*z);mxUtils.intersects(Ba,ua)&&eb.image(fb.x+pb.x,fb.y+pb.y,fb.width,fb.height,fb.src,!0)}eb.scale(V);eb.textEnabled= +ma;wa=null!=wa?wa:this.createSvgImageExport();var lb=wa.drawCellState,$a=wa.getLinkForCellState;wa.getLinkForCellState=function(ab,ib){var gb=$a.apply(this,arguments);return null==gb||ab.view.graph.isCustomLink(gb)?null:gb};wa.getLinkTargetForCellState=function(ab,ib){return ab.view.graph.getLinkTargetForCell(ab.cell)};wa.drawCellState=function(ab,ib){for(var gb=ab.view.graph,qb=null!=Fa?Fa.get(ab.cell):gb.isCellSelected(ab.cell),nb=gb.model.getParent(ab.cell);!(ha&&null==Fa||qb)&&null!=nb;)qb=null!= +Fa?Fa.get(nb):gb.isCellSelected(nb),nb=gb.model.getParent(nb);if(ha&&null==Fa||qb)gb.view.redrawEnumerationState(ab),lb.apply(this,arguments),this.doDrawShape(ab.secondLabel,ib)};wa.drawState(this.getView().getState(this.model.root),eb);this.updateSvgLinks(Oa,sa,!0);this.addForeignObjectWarning(eb,Oa);return Oa}finally{za&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(z,L){if("0"!=urlParams["svg-warning"]&&0<L.getElementsByTagName("foreignObject").length){var O= +z.createElement("switch"),V=z.createElement("g");V.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var U=z.createElement("a");U.setAttribute("transform","translate(0,-5)");null==U.setAttributeNS||L.ownerDocument!=document&&null==document.documentMode?(U.setAttribute("xlink:href",Graph.foreignObjectWarningLink),U.setAttribute("target","_blank")):(U.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),U.setAttributeNS(mxConstants.NS_XLINK, +"target","_blank"));z=z.createElement("text");z.setAttribute("text-anchor","middle");z.setAttribute("font-size","10px");z.setAttribute("x","50%");z.setAttribute("y","100%");mxUtils.write(z,Graph.foreignObjectWarningText);O.appendChild(V);U.appendChild(z);O.appendChild(U);L.appendChild(O)}};Graph.prototype.updateSvgLinks=function(z,L,O){z=z.getElementsByTagName("a");for(var V=0;V<z.length;V++)if(null==z[V].getAttribute("target")){var U=z[V].getAttribute("href");null==U&&(U=z[V].getAttribute("xlink:href")); +null!=U&&(null!=L&&/^https?:\/\//.test(U)?z[V].setAttribute("target",L):O&&this.isCustomLink(U)&&z[V].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(z){z=new mxSvgCanvas2D(z);z.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;z.pointerEvents=!0;return z};Graph.prototype.getSelectedElement=function(){var z=null;if(window.getSelection){var L=window.getSelection();L.getRangeAt&&L.rangeCount&&(z=L.getRangeAt(0).commonAncestorContainer)}else document.selection&& +(z=document.selection.createRange().parentElement());return z};Graph.prototype.getSelectedEditingElement=function(){for(var z=this.getSelectedElement();null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=z.parentNode;null!=z&&z==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(z=this.cellEditor.textarea.firstChild);return z};Graph.prototype.getParentByName=function(z,L,O){for(;null!=z&&z.nodeName!= +L;){if(z==O)return null;z=z.parentNode}return z};Graph.prototype.getParentByNames=function(z,L,O){for(;null!=z&&!(0<=mxUtils.indexOf(L,z.nodeName));){if(z==O)return null;z=z.parentNode}return z};Graph.prototype.selectNode=function(z){var L=null;if(window.getSelection){if(L=window.getSelection(),L.getRangeAt&&L.rangeCount){var O=document.createRange();O.selectNode(z);L.removeAllRanges();L.addRange(O)}}else(L=document.selection)&&"Control"!=L.type&&(z=L.createRange(),z.collapse(!0),O=L.createRange(), +O.setEndPoint("StartToStart",z),O.select())};Graph.prototype.flipEdgePoints=function(z,L,O){var V=this.getCellGeometry(z);if(null!=V){V=V.clone();if(null!=V.points)for(var U=0;U<V.points.length;U++)L?V.points[U].x=O+(O-V.points[U].x):V.points[U].y=O+(O-V.points[U].y);U=function(ha){null!=ha&&(L?ha.x=O+(O-ha.x):ha.y=O+(O-ha.y))};U(V.getTerminalPoint(!0));U(V.getTerminalPoint(!1));this.model.setGeometry(z,V)}};Graph.prototype.flipChildren=function(z,L,O){this.model.beginUpdate();try{for(var V=this.model.getChildCount(z), +U=0;U<V;U++){var ha=this.model.getChildAt(z,U);if(this.model.isEdge(ha))this.flipEdgePoints(ha,L,O);else{var ma=this.getCellGeometry(ha);null!=ma&&(ma=ma.clone(),L?ma.x=O+(O-ma.x-ma.width):ma.y=O+(O-ma.y-ma.height),this.model.setGeometry(ha,ma))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(z,L){this.model.beginUpdate();try{z=this.model.getTopmostCells(z);for(var O=[],V=0;V<z.length;V++)if(this.model.isEdge(z[V])){var U=this.view.getState(z[V]);null!=U&&this.flipEdgePoints(z[V], +L,(L?U.getCenterX():U.getCenterY())/this.view.scale-(L?U.origin.x:U.origin.y)-(L?this.view.translate.x:this.view.translate.y))}else{var ha=this.getCellGeometry(z[V]);null!=ha&&this.flipChildren(z[V],L,L?ha.getCenterX()-ha.x:ha.getCenterY()-ha.y);O.push(z[V])}this.toggleCellStyles(L?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,O)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(z,L){var O=null;if(null!=z&&0<z.length){this.model.beginUpdate();try{for(var V=0;V<z.length;V++){var U= +this.model.getParent(z[V]);if(this.isTable(U)){var ha=this.getCellGeometry(z[V]),ma=this.getCellGeometry(U);null!=ha&&null!=ma&&(ma=ma.clone(),ma.height-=ha.height,this.model.setGeometry(U,ma))}}var wa=this.selectParentAfterDelete?this.model.getParents(z):null;this.removeCells(z,L)}finally{this.model.endUpdate()}if(null!=wa)for(O=[],V=0;V<wa.length;V++)this.model.contains(wa[V])&&(this.model.isVertex(wa[V])||this.model.isEdge(wa[V]))&&O.push(wa[V])}return O};Graph.prototype.insertTableColumn=function(z, +L){var O=this.getModel();O.beginUpdate();try{var V=z,U=0;if(this.isTableCell(z)){var ha=O.getParent(z);V=O.getParent(ha);U=mxUtils.indexOf(O.getChildCells(ha,!0),z)}else this.isTableRow(z)?V=O.getParent(z):z=O.getChildCells(V,!0)[0],L||(U=O.getChildCells(z,!0).length-1);var ma=O.getChildCells(V,!0),wa=Graph.minTableColumnWidth;for(z=0;z<ma.length;z++){var sa=O.getChildCells(ma[z],!0)[U],ya=O.cloneCell(sa,!1),Ha=this.getCellGeometry(ya);ya.value=null;ya.style=mxUtils.setStyle(mxUtils.setStyle(ya.style, +"rowspan",null),"colspan",null);if(null!=Ha){null!=Ha.alternateBounds&&(Ha.width=Ha.alternateBounds.width,Ha.height=Ha.alternateBounds.height,Ha.alternateBounds=null);wa=Ha.width;var Qa=this.getCellGeometry(ma[z]);null!=Qa&&(Ha.height=Qa.height)}O.add(ma[z],ya,U+(L?0:1))}var ua=this.getCellGeometry(V);null!=ua&&(ua=ua.clone(),ua.width+=wa,O.setGeometry(V,ua))}finally{O.endUpdate()}};Graph.prototype.deleteLane=function(z){var L=this.getModel();L.beginUpdate();try{var O=null;O="stackLayout"==this.getCurrentCellStyle(z).childLayout? +z:L.getParent(z);var V=L.getChildCells(O,!0);0==V.length?L.remove(O):(O==z&&(z=V[V.length-1]),L.remove(z))}finally{L.endUpdate()}};Graph.prototype.insertLane=function(z,L){var O=this.getModel();O.beginUpdate();try{var V=null;if("stackLayout"==this.getCurrentCellStyle(z).childLayout){V=z;var U=O.getChildCells(V,!0);z=U[L?0:U.length-1]}else V=O.getParent(z);var ha=V.getIndex(z);z=O.cloneCell(z,!1);z.value=null;O.add(V,z,ha+(L?0:1))}finally{O.endUpdate()}};Graph.prototype.insertTableRow=function(z,L){var O= +this.getModel();O.beginUpdate();try{var V=z,U=z;if(this.isTableCell(z))U=O.getParent(z),V=O.getParent(U);else if(this.isTableRow(z))V=O.getParent(z);else{var ha=O.getChildCells(V,!0);U=ha[L?0:ha.length-1]}var ma=O.getChildCells(U,!0),wa=V.getIndex(U);U=O.cloneCell(U,!1);U.value=null;var sa=this.getCellGeometry(U);if(null!=sa){for(ha=0;ha<ma.length;ha++){z=O.cloneCell(ma[ha],!1);z.value=null;z.style=mxUtils.setStyle(mxUtils.setStyle(z.style,"rowspan",null),"colspan",null);var ya=this.getCellGeometry(z); +null!=ya&&(null!=ya.alternateBounds&&(ya.width=ya.alternateBounds.width,ya.height=ya.alternateBounds.height,ya.alternateBounds=null),ya.height=sa.height);U.insert(z)}O.add(V,U,wa+(L?0:1));var Ha=this.getCellGeometry(V);null!=Ha&&(Ha=Ha.clone(),Ha.height+=sa.height,O.setGeometry(V,Ha))}}finally{O.endUpdate()}};Graph.prototype.deleteTableColumn=function(z){var L=this.getModel();L.beginUpdate();try{var O=z,V=z;this.isTableCell(z)&&(V=L.getParent(z));this.isTableRow(V)&&(O=L.getParent(V));var U=L.getChildCells(O, +!0);if(0==U.length)L.remove(O);else{this.isTableRow(V)||(V=U[0]);var ha=L.getChildCells(V,!0);if(1>=ha.length)L.remove(O);else{var ma=ha.length-1;this.isTableCell(z)&&(ma=mxUtils.indexOf(ha,z));for(V=z=0;V<U.length;V++){var wa=L.getChildCells(U[V],!0)[ma];L.remove(wa);var sa=this.getCellGeometry(wa);null!=sa&&(z=Math.max(z,sa.width))}var ya=this.getCellGeometry(O);null!=ya&&(ya=ya.clone(),ya.width-=z,L.setGeometry(O,ya))}}}finally{L.endUpdate()}};Graph.prototype.deleteTableRow=function(z){var L=this.getModel(); +L.beginUpdate();try{var O=z,V=z;this.isTableCell(z)&&(z=V=L.getParent(z));this.isTableRow(z)&&(O=L.getParent(V));var U=L.getChildCells(O,!0);if(1>=U.length)L.remove(O);else{this.isTableRow(V)||(V=U[U.length-1]);L.remove(V);z=0;var ha=this.getCellGeometry(V);null!=ha&&(z=ha.height);var ma=this.getCellGeometry(O);null!=ma&&(ma=ma.clone(),ma.height-=z,L.setGeometry(O,ma))}}finally{L.endUpdate()}};Graph.prototype.insertRow=function(z,L){for(var O=z.tBodies[0],V=O.rows[0].cells,U=z=0;U<V.length;U++){var ha= +V[U].getAttribute("colspan");z+=null!=ha?parseInt(ha):1}L=O.insertRow(L);for(U=0;U<z;U++)mxUtils.br(L.insertCell(-1));return L.cells[0]};Graph.prototype.deleteRow=function(z,L){z.tBodies[0].deleteRow(L)};Graph.prototype.insertColumn=function(z,L){var O=z.tHead;if(null!=O)for(var V=0;V<O.rows.length;V++){var U=document.createElement("th");O.rows[V].appendChild(U);mxUtils.br(U)}z=z.tBodies[0];for(O=0;O<z.rows.length;O++)V=z.rows[O].insertCell(L),mxUtils.br(V);return z.rows[0].cells[0<=L?L:z.rows[0].cells.length- +1]};Graph.prototype.deleteColumn=function(z,L){if(0<=L){z=z.tBodies[0].rows;for(var O=0;O<z.length;O++)z[O].cells.length>L&&z[O].deleteCell(L)}};Graph.prototype.pasteHtmlAtCaret=function(z){if(window.getSelection){var L=window.getSelection();if(L.getRangeAt&&L.rangeCount){L=L.getRangeAt(0);L.deleteContents();var O=document.createElement("div");O.innerHTML=z;z=document.createDocumentFragment();for(var V;V=O.firstChild;)lastNode=z.appendChild(V);L.insertNode(z)}}else(L=document.selection)&&"Control"!= +L.type&&L.createRange().pasteHTML(z)};Graph.prototype.createLinkForHint=function(z,L){function O(U,ha){U.length>ha&&(U=U.substring(0,Math.round(ha/2))+"..."+U.substring(U.length-Math.round(ha/4)));return U}z=null!=z?z:"javascript:void(0);";if(null==L||0==L.length)L=this.isCustomLink(z)?this.getLinkTitle(z):z;var V=document.createElement("a");V.setAttribute("rel",this.linkRelation);V.setAttribute("href",this.getAbsoluteUrl(z));V.setAttribute("title",O(this.isCustomLink(z)?this.getLinkTitle(z):z,80)); +null!=this.linkTarget&&V.setAttribute("target",this.linkTarget);mxUtils.write(V,O(L,40));this.isCustomLink(z)&&mxEvent.addListener(V,"click",mxUtils.bind(this,function(U){this.customLinkClicked(z);mxEvent.consume(U)}));return V};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ha,ma){this.popupMenuHandler.hideMenu()});var z=this.updateMouseEvent;this.updateMouseEvent= +function(ha){ha=z.apply(this,arguments);if(mxEvent.isTouchEvent(ha.getEvent())&&null==ha.getState()){var ma=this.getCellAt(ha.graphX,ha.graphY);null!=ma&&this.isSwimlane(ma)&&this.hitsSwimlaneContent(ma,ha.graphX,ha.graphY)||(ha.state=this.view.getState(ma),null!=ha.state&&null!=ha.state.shape&&(this.container.style.cursor=ha.state.shape.node.style.cursor))}null==ha.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ha};var L=!1,O=!1,V=!1,U=this.fireMouseEvent;this.fireMouseEvent= +function(ha,ma,wa){ha==mxEvent.MOUSE_DOWN&&(ma=this.updateMouseEvent(ma),L=this.isCellSelected(ma.getCell()),O=this.isSelectionEmpty(),V=this.popupMenuHandler.isMenuShowing());U.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(ha,ma){var wa=mxEvent.isMouseEvent(ma.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==ma.getState()||!ma.isSource(ma.getState().control))&&(this.popupMenuHandler.popupTrigger||!V&&!wa&&(O&&null==ma.getCell()&& +this.isSelectionEmpty()||L&&this.isCellSelected(ma.getCell())));wa=!L||wa?null:mxUtils.bind(this,function(sa){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ya=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(ma.getX()+ya.x+1,ma.getY()+ya.y+1,sa,ma.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ha,ma,wa])})};mxCellEditor.prototype.isContentEditing=function(){var z=this.graph.view.getState(this.editingCell);return null!=z&&1== +z.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var z="";window.getSelection?z=window.getSelection():document.getSelection?z=document.getSelection():document.selection&&(z=document.selection.createRange().text);return""!=z};mxCellEditor.prototype.insertTab=function(z){var L=this.textarea.ownerDocument.defaultView.getSelection(),O=L.getRangeAt(0), +V="\t";if(null!=z)for(V="";0<z;)V+=" ",z--;z=document.createElement("span");z.style.whiteSpace="pre";z.appendChild(document.createTextNode(V));O.insertNode(z);O.setStartAfter(z);O.setEndAfter(z);L.removeAllRanges();L.addRange(O)};mxCellEditor.prototype.alignText=function(z,L){var O=null!=L&&mxEvent.isShiftDown(L);if(O||null!=window.getSelection&&null!=window.getSelection().containsNode){var V=!0;this.graph.processElements(this.textarea,function(U){O||window.getSelection().containsNode(U,!0)?(U.removeAttribute("align"), +U.style.textAlign=null):V=!1});V&&this.graph.cellEditor.setAlign(z)}document.execCommand("justify"+z.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var z=window.getSelection();if(z.getRangeAt&&z.rangeCount){for(var L=[],O=0,V=z.rangeCount;O<V;++O)L.push(z.getRangeAt(O));return L}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(z){try{if(z)if(window.getSelection){sel= +window.getSelection();sel.removeAllRanges();for(var L=0,O=z.length;L<O;++L)sel.addRange(z[L])}else document.selection&&z.select&&z.select()}catch(V){}};var u=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(z){null!=z.text&&(z.text.replaceLinefeeds="0"!=mxUtils.getValue(z.style,"nl2Br","1"));u.apply(this,arguments)};var H=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(z,L){this.isKeepFocusEvent(z)||!mxEvent.isAltDown(z.getEvent())? +H.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(z){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var J=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(z,L){z=this.graph.getStartEditingCell(z,L);J.apply(this,arguments);var O=this.graph.view.getState(z);this.textarea.className=null!=O&&1==O.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor"; +this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(z);O=this.graph.getModel().getParent(z);var V=this.graph.getCellGeometry(z);if(this.graph.getModel().isEdge(O)&&null!=V&&V.relative||this.graph.getModel().isEdge(z))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var D=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(z){function L(U,ha){ha.originalNode=U;U=U.firstChild; +for(var ma=ha.firstChild;null!=U&&null!=ma;)L(U,ma),U=U.nextSibling,ma=ma.nextSibling;return ha}function O(U,ha){if(null!=U)if(ha.originalNode!=U)V(U);else for(U=U.firstChild,ha=ha.firstChild;null!=U;){var ma=U.nextSibling;null==ha?V(U):(O(U,ha),ha=ha.nextSibling);U=ma}}function V(U){for(var ha=U.firstChild;null!=ha;){var ma=ha.nextSibling;V(ha);ha=ma}1==U.nodeType&&("BR"===U.nodeName||null!=U.firstChild)||3==U.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(U)).length?(3==U.nodeType&&mxUtils.setTextContent(U, +mxUtils.getTextContent(U).replace(/\n|\r/g,"")),1==U.nodeType&&(U.removeAttribute("style"),U.removeAttribute("class"),U.removeAttribute("width"),U.removeAttribute("cellpadding"),U.removeAttribute("cellspacing"),U.removeAttribute("border"))):U.parentNode.removeChild(U)}D.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(U){var ha=L(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this, +function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?O(this.textarea,ha):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var z=this.graph.view.getState(this.editingCell);if(null!=z){var L=null!=z&&"0"!=mxUtils.getValue(z.style,"nl2Br","1"),O=this.saveSelection();if(this.codeViewMode){wa=mxUtils.extractTextWithWhitespace(this.textarea.childNodes); +0<wa.length&&"\n"==wa.charAt(wa.length-1)&&(wa=wa.substring(0,wa.length-1));wa=this.graph.sanitizeHtml(L?wa.replace(/\n/g,"<br/>"):wa,!0);this.textarea.className="mxCellEditor geContentEditable";sa=mxUtils.getValue(z.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);L=mxUtils.getValue(z.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var V=mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),U=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE, +0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ha=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,ma=[];(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&ma.push("underline");(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&ma.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT? +Math.round(sa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(sa)+"px";this.textarea.style.textDecoration=ma.join(" ");this.textarea.style.fontWeight=U?"bold":"normal";this.textarea.style.fontStyle=ha?"italic":"";this.textarea.style.fontFamily=L;this.textarea.style.textAlign=V;this.textarea.style.padding="0px";this.textarea.innerHTML!=wa&&(this.textarea.innerHTML=wa,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange= +0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");var wa=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(wa=mxUtils.replaceTrailingNewlines(wa,"<div><br></div>"));wa=this.graph.sanitizeHtml(L?wa.replace(/\n/g,"").replace(/<br\s*.?>/g,"<br>"):wa,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var sa=mxConstants.DEFAULT_FONTSIZE; +this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(sa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(sa)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=wa&&(this.textarea.innerHTML= +wa);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=O;this.resize()}};var G=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(z,L){if(null!=this.textarea)if(z=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=z){var O=z.view.scale;this.bounds=mxRectangle.fromRectangle(z);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*O;this.bounds.height= +60*O;var V=null!=z.text?z.text.margin:null;null==V&&(V=mxUtils.getAlignmentAsPoint(mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(z.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=V.x*this.bounds.width;this.bounds.y+=V.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/O)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/O)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight< +this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/O)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*O);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/O)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*O);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top= +Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+O+","+O+")")}else this.textarea.style.height="",this.textarea.style.overflow="",G.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(z,L){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var O=this.graph.getEditingValue(z.cell,L);"1"==mxUtils.getValue(z.style,"nl2Br", +"1")&&(O=O.replace(/\n/g,"<br/>"));return O=this.graph.sanitizeHtml(O,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(z){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var L=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return L="1"==mxUtils.getValue(z.style,"nl2Br","1")?L.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):L.replace(/\r\n/g,"").replace(/\n/g,"")};var W= +mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(z){this.codeViewMode&&this.toggleViewMode();W.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(z){}};var T=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(z,L){this.graph.getModel().beginUpdate();try{T.apply(this,arguments),""==L&&this.graph.isCellDeletable(z.cell)&&0==this.graph.model.getChildCount(z.cell)&& +this.graph.isTransparentState(z)&&this.graph.removeCells([z.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(z){var L=mxUtils.getValue(z.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=L&&L!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(L=mxUtils.getValue(z.style,mxConstants.STYLE_FILLCOLOR, +null));L==mxConstants.NONE&&(L=null);return L};mxCellEditor.prototype.getBorderColor=function(z){var L=mxUtils.getValue(z.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);null!=L&&L!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(L=mxUtils.getValue(z.style,mxConstants.STYLE_STROKECOLOR,null));L==mxConstants.NONE&&(L=null);return L};mxCellEditor.prototype.getMinimumSize= +function(z){var L=this.graph.getView().scale;return new mxRectangle(0,0,null==z.text?30:z.text.size*L+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(z,L){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(L.getEvent)};mxGraphView.prototype.formatUnitText=function(z){return z?e(z,this.unit):z};mxGraphHandler.prototype.updateHint=function(z){if(null!=this.pBounds&&(null!=this.shape|| +this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var L=this.graph.view.translate,O=this.graph.view.scale;z=this.roundLength((this.bounds.x+this.currentDx)/O-L.x);L=this.roundLength((this.bounds.y+this.currentDy)/O-L.y);O=this.graph.view.unit;this.hint.innerHTML=e(z,O)+", "+e(L,O);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+ +Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var Z=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(z,L){Z.apply(this,arguments);var O=this.graph.getCellStyle(z);if(null==O.childLayout){var V=this.graph.model.getParent(z),U=null!=V?this.graph.getCellGeometry(V):null;if(null!=U&&(O=this.graph.getCellStyle(V),"stackLayout"==O.childLayout)){var ha=parseFloat(mxUtils.getValue(O, +"stackBorder",mxStackLayout.prototype.border));O="1"==mxUtils.getValue(O,"horizontalStack","1");var ma=this.graph.getActualStartSize(V);U=U.clone();O?U.height=L.height+ma.y+ma.height+2*ha:U.width=L.width+ma.x+ma.width+2*ha;this.graph.model.setGeometry(V,U)}}};var N=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function z(wa){O.get(wa)||(O.put(wa,!0),U.push(wa))}for(var L=N.apply(this,arguments),O=new mxDictionary,V= +this.graph.model,U=[],ha=0;ha<L.length;ha++){var ma=L[ha];this.graph.isTableCell(ma)?z(V.getParent(V.getParent(ma))):this.graph.isTableRow(ma)&&z(V.getParent(ma));z(ma)}return U};var qa=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(z){var L=qa.apply(this,arguments);L.stroke="#C0C0C0";L.strokewidth=1;return L};var oa=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(z){var L= +oa.apply(this,arguments);L.stroke="#C0C0C0";L.strokewidth=1;return L};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var z=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+z.x/2,this.bounds.y+this.rotationHandleVSpacing-z.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(z,L){return this.graph.isRecursiveVertexResize(z)&&!mxEvent.isAltDown(L.getEvent())};mxVertexHandler.prototype.isCenteredEvent= +function(z,L){return mxEvent.isControlDown(L.getEvent())||mxEvent.isMetaDown(L.getEvent())};var S=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return S.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))): +this.bounds};var fa=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return fa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var ia=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(z){return z.tableHandle||ia.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset= +function(){var z=0;this.graph.isTableRow(this.state.cell)?z=1:this.graph.isTableCell(this.state.cell)&&(z=2);return z};var M=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return M.apply(this,arguments).grow(-this.getSelectionBorderInset())};var aa=null,X=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==aa&&(aa=mxCellRenderer.defaultShapes.tableLine);var z=X.apply(this,arguments); +if(this.graph.isTable(this.state.cell)){var L=function(Fa,Ba,Ea){for(var Oa=[],Pa=0;Pa<Fa.length;Pa++){var bb=Fa[Pa];Oa.push(null==bb?null:new mxPoint((sa+bb.x+Ba)*ha,(ya+bb.y+Ea)*ha))}return Oa},O=this,V=this.graph,U=V.model,ha=V.view.scale,ma=this.state,wa=this.selectionBorder,sa=this.state.origin.x+V.view.translate.x,ya=this.state.origin.y+V.view.translate.y;null==z&&(z=[]);var Ha=V.view.getCellStates(U.getChildCells(this.state.cell,!0));if(0<Ha.length){var Qa=U.getChildCells(Ha[0].cell,!0),ua= +V.getTableLines(this.state.cell,!1,!0),za=V.getTableLines(this.state.cell,!0,!1);for(U=0;U<Ha.length;U++)mxUtils.bind(this,function(Fa){var Ba=Ha[Fa],Ea=Fa<Ha.length-1?Ha[Fa+1]:null;Ea=null!=Ea?V.getCellGeometry(Ea.cell):null;var Oa=null!=Ea&&null!=Ea.alternateBounds?Ea.alternateBounds:Ea;Ea=null!=za[Fa]?new aa(za[Fa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Ea.isDashed=wa.isDashed;Ea.svgStrokeTolerance++;Ba=new mxHandle(Ba,"row-resize",null,Ea);Ba.tableHandle=!0;var Pa= +0;Ba.shape.node.parentNode.insertBefore(Ba.shape.node,Ba.shape.node.parentNode.firstChild);Ba.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Pa?mxConstants.NONE:wa.stroke;if(this.shape.constructor==aa)this.shape.line=L(za[Fa],0,Pa),this.shape.updateBoundsFromLine();else{var eb=V.getActualStartSize(ma.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Pa*ha;this.shape.bounds.x=ma.x+(Fa==Ha.length-1?0:eb.x*ha);this.shape.bounds.width=ma.width-(Fa==Ha.length- +1?0:eb.width+eb.x+ha)}this.shape.redraw()}};var bb=!1;Ba.setPosition=function(eb,db,ub){Pa=Math.max(Graph.minTableRowHeight-eb.height,db.y-eb.y-eb.height);bb=mxEvent.isShiftDown(ub.getEvent());null!=Oa&&bb&&(Pa=Math.min(Pa,Oa.height-Graph.minTableRowHeight))};Ba.execute=function(eb){if(0!=Pa)V.setTableRowHeight(this.state.cell,Pa,!bb);else if(!O.blockDelayedSelection){var db=V.getCellAt(eb.getGraphX(),eb.getGraphY())||ma.cell;V.graphHandler.selectCellForEvent(db,eb)}Pa=0};Ba.reset=function(){Pa=0}; +z.push(Ba)})(U);for(U=0;U<Qa.length;U++)mxUtils.bind(this,function(Fa){var Ba=V.view.getState(Qa[Fa]),Ea=V.getCellGeometry(Qa[Fa]),Oa=null!=Ea.alternateBounds?Ea.alternateBounds:Ea;null==Ba&&(Ba=new mxCellState(V.view,Qa[Fa],V.getCellStyle(Qa[Fa])),Ba.x=ma.x+Ea.x*ha,Ba.y=ma.y+Ea.y*ha,Ba.width=Oa.width*ha,Ba.height=Oa.height*ha,Ba.updateCachedBounds());Ea=Fa<Qa.length-1?Qa[Fa+1]:null;Ea=null!=Ea?V.getCellGeometry(Ea):null;var Pa=null!=Ea&&null!=Ea.alternateBounds?Ea.alternateBounds:Ea;Ea=null!=ua[Fa]? +new aa(ua[Fa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Ea.isDashed=wa.isDashed;Ea.svgStrokeTolerance++;Ba=new mxHandle(Ba,"col-resize",null,Ea);Ba.tableHandle=!0;var bb=0;Ba.shape.node.parentNode.insertBefore(Ba.shape.node,Ba.shape.node.parentNode.firstChild);Ba.redraw=function(){if(null!=this.shape){this.shape.stroke=0==bb?mxConstants.NONE:wa.stroke;if(this.shape.constructor==aa)this.shape.line=L(ua[Fa],bb,0),this.shape.updateBoundsFromLine();else{var db=V.getActualStartSize(ma.cell, +!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Oa.width+bb)*ha;this.shape.bounds.y=ma.y+(Fa==Qa.length-1?0:db.y*ha);this.shape.bounds.height=ma.height-(Fa==Qa.length-1?0:(db.height+db.y)*ha)}this.shape.redraw()}};var eb=!1;Ba.setPosition=function(db,ub,fb){bb=Math.max(Graph.minTableColumnWidth-Oa.width,ub.x-db.x-Oa.width);eb=mxEvent.isShiftDown(fb.getEvent());null==Pa||eb||(bb=Math.min(bb,Pa.width-Graph.minTableColumnWidth))};Ba.execute=function(db){if(0!=bb)V.setTableColumnWidth(this.state.cell, +bb,eb);else if(!O.blockDelayedSelection){var ub=V.getCellAt(db.getGraphX(),db.getGraphY())||ma.cell;V.graphHandler.selectCellForEvent(ub,db)}bb=0};Ba.positionChanged=function(){};Ba.reset=function(){bb=0};z.push(Ba)})(U)}}return null!=z?z.reverse():null};var ja=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(z){ja.apply(this,arguments);if(null!=this.moveHandles)for(var L=0;L<this.moveHandles.length;L++)this.moveHandles[L].style.visibility=z?"":"hidden"; +if(null!=this.cornerHandles)for(L=0;L<this.cornerHandles.length;L++)this.cornerHandles[L].node.style.visibility=z?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var z=this.graph.model;if(null!=this.moveHandles){for(var L=0;L<this.moveHandles.length;L++)this.moveHandles[L].parentNode.removeChild(this.moveHandles[L]);this.moveHandles=null}this.moveHandles=[];for(L=0;L<z.getChildCount(this.state.cell);L++)mxUtils.bind(this,function(O){if(null!=O&&z.isVertex(O.cell)){var V=mxUtils.createImage(Editor.rowMoveImage); +V.style.position="absolute";V.style.cursor="pointer";V.style.width="7px";V.style.height="4px";V.style.padding="4px 2px 4px 2px";V.rowState=O;mxEvent.addGestureListeners(V,mxUtils.bind(this,function(U){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(U)&&this.graph.isCellSelected(O.cell)||this.graph.selectCellForEvent(O.cell,U);mxEvent.isPopupTrigger(U)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(U),mxEvent.getClientY(U),this.graph.getSelectionCells()), +this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(U),this.graph.isMouseDown=!0);mxEvent.consume(U)}),null,mxUtils.bind(this,function(U){mxEvent.isPopupTrigger(U)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(U),mxEvent.getClientY(U),O.cell,U),mxEvent.consume(U))}));this.moveHandles.push(V);this.graph.container.appendChild(V)}})(this.graph.view.getState(z.getChildAt(this.state.cell,L)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var z= +0;z<this.customHandles.length;z++)this.customHandles[z].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var ca=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var z=new mxPoint(0,0),L=this.tolerance,O=this.state.style.shape;null==mxCellRenderer.defaultShapes[O]&&mxStencilRegistry.getStencil(O);O=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell; +if(!O&&null!=this.customHandles)for(var V=0;V<this.customHandles.length;V++)if(null!=this.customHandles[V].shape&&null!=this.customHandles[V].shape.bounds){var U=this.customHandles[V].shape.bounds,ha=U.getCenterX(),ma=U.getCenterY();if(Math.abs(this.state.x-ha)<U.width/2||Math.abs(this.state.y-ma)<U.height/2||Math.abs(this.state.x+this.state.width-ha)<U.width/2||Math.abs(this.state.y+this.state.height-ma)<U.height/2){O=!0;break}}O&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(L/= +2,this.graph.isTable(this.state.cell)&&(L+=7),z.x=this.sizers[0].bounds.width+L,z.y=this.sizers[0].bounds.height+L):z=ca.apply(this,arguments);return z};mxVertexHandler.prototype.updateHint=function(z){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"°";else{z=this.state.view.scale;var L=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/ +z),L)+" x "+e(this.roundLength(this.bounds.height/z),L)}z=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==z&&(z=this.bounds);this.hint.style.left=z.x+Math.round((z.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=z.y+z.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments); +null!=this.linkHint&&(this.linkHint.style.display="")};var ka=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(z,L){ka.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var q=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(z,L){q.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display= +"")};mxEdgeHandler.prototype.updateHint=function(z,L){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var O=this.graph.view.translate,V=this.graph.view.scale,U=this.roundLength(L.x/V-O.x);O=this.roundLength(L.y/V-O.y);V=this.graph.view.unit;this.hint.innerHTML=e(U,V)+", "+e(O,V);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(U=this.constraintHandler.currentConstraint.point, +this.hint.innerHTML="["+Math.round(100*U.x)+"%, "+Math.round(100*U.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(z.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(z.getGraphY(),L.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>'); Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 4.5 2 L 4.5 7 M 2 4.5 L 7 4.5 z" stroke="#000"/>');mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle= Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.endMainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.secondaryHandle=Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>');HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>'); HoverIcons.prototype.endFixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');HoverIcons.prototype.terminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>');HoverIcons.prototype.endTerminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="'+ @@ -2653,67 +2651,67 @@ HoverIcons.prototype.arrowFill+'"/><circle cx="11" cy="11" r="3" stroke="#fff" f mxEdgeHandler.prototype.endHandleImage=HoverIcons.prototype.endMainHandle;mxEdgeHandler.prototype.terminalHandleImage=HoverIcons.prototype.terminalHandle;mxEdgeHandler.prototype.endTerminalHandleImage=HoverIcons.prototype.endTerminalHandle;mxEdgeHandler.prototype.fixedHandleImage=HoverIcons.prototype.fixedHandle;mxEdgeHandler.prototype.endFixedHandleImage=HoverIcons.prototype.endFixedHandle;mxEdgeHandler.prototype.labelHandleImage=HoverIcons.prototype.secondaryHandle;mxOutline.prototype.sizerImage= HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers= !0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled= -!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(y){return!mxEvent.isShiftDown(y.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(y){return!mxEvent.isShiftDown(y.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance= -12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(y){return mxEvent.isMouseEvent(y.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(y){var M=y.getEvent();return null==y.getState()&&!mxEvent.isMouseEvent(M)||mxEvent.isPopupTrigger(M)&&(null==y.getState()||mxEvent.isControlDown(M)||mxEvent.isShiftDown(M))};var F=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown= -function(y,M){F.apply(this,arguments);mxEvent.isTouchEvent(M.getEvent())&&this.graph.isCellSelected(M.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(y){var M=y.getEvent();return mxEvent.isLeftMouseButton(M)&&(this.useLeftButtonForPanning&&null==y.getState()||mxEvent.isControlDown(M)&&!mxEvent.isShiftDown(M))||this.usePopupTrigger&&mxEvent.isPopupTrigger(M)};mxRubberband.prototype.isSpaceEvent=function(y){return this.graph.isEnabled()&& -!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(y.getEvent())||mxEvent.isMetaDown(y.getEvent()))&&mxEvent.isShiftDown(y.getEvent())&&mxEvent.isAltDown(y.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(y,M){if(this.cancelled)this.cancelled=!1,M.consume();else{var N=null!=this.div&&"none"!=this.div.style.display,S=null,X=null,fa=y=null; -null!=this.first&&null!=this.currentX&&null!=this.currentY&&(S=this.first.x,X=this.first.y,y=(this.currentX-S)/this.graph.view.scale,fa=(this.currentY-X)/this.graph.view.scale,mxEvent.isAltDown(M.getEvent())||(y=this.graph.snap(y),fa=this.graph.snap(fa),this.graph.isGridEnabled()||(Math.abs(y)<this.graph.tolerance&&(y=0),Math.abs(fa)<this.graph.tolerance&&(fa=0))));this.reset();if(N){if(this.isSpaceEvent(M)){this.graph.model.beginUpdate();try{var la=this.graph.getCellsBeyond(S,X,this.graph.getDefaultParent(), -!0,!0);for(N=0;N<la.length;N++)if(this.graph.isCellMovable(la[N])){var xa=this.graph.view.getState(la[N]),sa=this.graph.getCellGeometry(la[N]);null!=xa&&null!=sa&&(sa=sa.clone(),sa.translate(y,fa),this.graph.model.setGeometry(la[N],sa))}}finally{this.graph.model.endUpdate()}}else la=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(la,M.getEvent());M.consume()}}};mxRubberband.prototype.mouseMove=function(y,M){if(!M.isConsumed()&&null!=this.first){var N=mxUtils.getScrollOrigin(this.graph.container); -y=mxUtils.getOffset(this.graph.container);N.x-=y.x;N.y-=y.y;y=M.getX()+N.x;N=M.getY()+N.y;var S=this.first.x-y,X=this.first.y-N,fa=this.graph.tolerance;if(null!=this.div||Math.abs(S)>fa||Math.abs(X)>fa)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(y,N),this.isSpaceEvent(M)?(y=this.x+this.width,N=this.y+this.height,S=this.graph.view.scale,mxEvent.isAltDown(M.getEvent())||(this.width=this.graph.snap(this.width/S)*S,this.height=this.graph.snap(this.height/S)*S,this.graph.isGridEnabled()|| -(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=y-this.width),this.y<this.first.y&&(this.y=N-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px", +!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(z){return!mxEvent.isShiftDown(z.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(z){return!mxEvent.isShiftDown(z.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance= +12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(z){return mxEvent.isMouseEvent(z.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(z){var L=z.getEvent();return null==z.getState()&&!mxEvent.isMouseEvent(L)||mxEvent.isPopupTrigger(L)&&(null==z.getState()||mxEvent.isControlDown(L)||mxEvent.isShiftDown(L))};var E=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown= +function(z,L){E.apply(this,arguments);mxEvent.isTouchEvent(L.getEvent())&&this.graph.isCellSelected(L.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(z){var L=z.getEvent();return mxEvent.isLeftMouseButton(L)&&(this.useLeftButtonForPanning&&null==z.getState()||mxEvent.isControlDown(L)&&!mxEvent.isShiftDown(L))||this.usePopupTrigger&&mxEvent.isPopupTrigger(L)};mxRubberband.prototype.isSpaceEvent=function(z){return this.graph.isEnabled()&& +!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(z.getEvent())||mxEvent.isMetaDown(z.getEvent()))&&mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(z,L){if(this.cancelled)this.cancelled=!1,L.consume();else{var O=null!=this.div&&"none"!=this.div.style.display,V=null,U=null,ha=z=null; +null!=this.first&&null!=this.currentX&&null!=this.currentY&&(V=this.first.x,U=this.first.y,z=(this.currentX-V)/this.graph.view.scale,ha=(this.currentY-U)/this.graph.view.scale,mxEvent.isAltDown(L.getEvent())||(z=this.graph.snap(z),ha=this.graph.snap(ha),this.graph.isGridEnabled()||(Math.abs(z)<this.graph.tolerance&&(z=0),Math.abs(ha)<this.graph.tolerance&&(ha=0))));this.reset();if(O){if(this.isSpaceEvent(L)){this.graph.model.beginUpdate();try{var ma=this.graph.getCellsBeyond(V,U,this.graph.getDefaultParent(), +!0,!0);for(O=0;O<ma.length;O++)if(this.graph.isCellMovable(ma[O])){var wa=this.graph.view.getState(ma[O]),sa=this.graph.getCellGeometry(ma[O]);null!=wa&&null!=sa&&(sa=sa.clone(),sa.translate(z,ha),this.graph.model.setGeometry(ma[O],sa))}}finally{this.graph.model.endUpdate()}}else ma=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(ma,L.getEvent());L.consume()}}};mxRubberband.prototype.mouseMove=function(z,L){if(!L.isConsumed()&&null!=this.first){var O=mxUtils.getScrollOrigin(this.graph.container); +z=mxUtils.getOffset(this.graph.container);O.x-=z.x;O.y-=z.y;z=L.getX()+O.x;O=L.getY()+O.y;var V=this.first.x-z,U=this.first.y-O,ha=this.graph.tolerance;if(null!=this.div||Math.abs(V)>ha||Math.abs(U)>ha)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(z,O),this.isSpaceEvent(L)?(z=this.x+this.width,O=this.y+this.height,V=this.graph.view.scale,mxEvent.isAltDown(L.getEvent())||(this.width=this.graph.snap(this.width/V)*V,this.height=this.graph.snap(this.height/V)*V,this.graph.isGridEnabled()|| +(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=z-this.width),this.y<this.first.y&&(this.y=O-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px", null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&& -(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),M.consume()}};var R=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);R.apply(this,arguments)};var W=(new Date).getTime(),T=0,ba=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(y,M,N,S){ba.apply(this,arguments);N!=this.currentTerminalState?(W=(new Date).getTime(), -T=0):T=(new Date).getTime()-W;this.currentTerminalState=N};var ha=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(y){return mxEvent.isShiftDown(y.getEvent())&&mxEvent.isAltDown(y.getEvent())?!1:null!=this.currentTerminalState&&y.getState()==this.currentTerminalState&&2E3<T||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&ha.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape= -function(y,M,N){M=null!=y&&0==y;var S=this.state.getVisibleTerminalState(M);y=null!=y&&(0==y||y>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==y)?this.graph.getConnectionConstraint(this.state,S,M):null;N=null!=(null!=y?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(M),y):null)?N?this.endFixedHandleImage:this.fixedHandleImage:null!=y&&null!=S?N?this.endTerminalHandleImage:this.terminalHandleImage:N?this.endHandleImage:this.handleImage;if(null!=N)return N= -new mxImageShape(new mxRectangle(0,0,N.width,N.height),N.src),N.preserveImageAspect=!1,N;N=mxConstants.HANDLE_SIZE;this.preferHtml&&--N;return new mxRectangleShape(new mxRectangle(0,0,N,N),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var ra=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(y,M,N){this.handleImage=M==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:M==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage; -return ra.apply(this,arguments)};var ta=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(y){if(null!=y&&1==y.length){var M=this.graph.getModel(),N=M.getParent(y[0]),S=this.graph.getCellGeometry(y[0]);if(M.isEdge(N)&&null!=S&&S.relative&&(M=this.graph.view.getState(y[0]),null!=M&&2>M.width&&2>M.height&&null!=M.text&&null!=M.text.boundingBox))return mxRectangle.fromRectangle(M.text.boundingBox)}return ta.apply(this,arguments)};var ma=mxGraphHandler.prototype.getGuideStates; -mxGraphHandler.prototype.getGuideStates=function(){for(var y=ma.apply(this,arguments),M=[],N=0;N<y.length;N++)"1"!=mxUtils.getValue(y[N].style,"part","0")&&M.push(y[N]);return M};var pa=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(y){var M=this.graph.getModel(),N=M.getParent(y.cell),S=this.graph.getCellGeometry(y.cell);return M.isEdge(N)&&null!=S&&S.relative&&2>y.width&&2>y.height&&null!=y.text&&null!=y.text.boundingBox?(M=y.text.unrotatedBoundingBox|| -y.text.boundingBox,new mxRectangle(Math.round(M.x),Math.round(M.y),Math.round(M.width),Math.round(M.height))):pa.apply(this,arguments)};var za=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(y,M){var N=this.graph.getModel(),S=N.getParent(this.state.cell),X=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(M)==mxEvent.ROTATION_HANDLE||!N.isEdge(S)||null==X||!X.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&za.apply(this,arguments)}; -mxVertexHandler.prototype.rotateClick=function(){var y=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),M=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&y==mxConstants.NONE&&M==mxConstants.NONE?(y=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,y,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])}; -var Ba=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(y,M){Ba.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var Ia=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(y,M){Ia.apply(this,arguments);null!=this.rotationShape&&null!= -this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var Aa=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){Aa.apply(this,arguments);var y=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles(); -else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var M=0;4>M;M++){var N=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);N.dialect=mxConstants.DIALECT_SVG;N.init(this.graph.view.getOverlayPane());this.cornerHandles.push(N)}}var S=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()< -this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(X,fa){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));S()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(X,fa){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler); -M=this.graph.getLinkForCell(this.state.cell);N=this.graph.getLinksForState(this.state);this.updateLinkHint(M,N);if(null!=M||null!=N&&0<N.length)y=!0;y&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(y,M){try{if(null==y&&(null==M||0==M.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=y||null!=M&&0<M.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding= -"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=y&&(this.linkHint.appendChild(this.graph.createLinkForHint(y)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var N=document.createElement("img");N.className="geAdaptiveAsset";N.setAttribute("src",Editor.editImage); -N.setAttribute("title",mxResources.get("editLink"));N.setAttribute("width","11");N.setAttribute("height","11");N.style.marginLeft="10px";N.style.marginBottom="-1px";N.style.cursor="pointer";this.linkHint.appendChild(N);mxEvent.addListener(N,"click",mxUtils.bind(this,function(fa){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(fa)}));var S=N.cloneNode(!0);S.setAttribute("src",Editor.trashImage);S.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")])); -S.style.marginLeft="4px";this.linkHint.appendChild(S);mxEvent.addListener(S,"click",mxUtils.bind(this,function(fa){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(fa)}))}if(null!=M)for(N=0;N<M.length;N++){var X=document.createElement("div");X.style.marginTop=null!=y||0<N?"6px":"0px";X.appendChild(this.graph.createLinkForHint(M[N].getAttribute("href"),mxUtils.getTextContent(M[N])));this.linkHint.appendChild(X)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(fa){}};mxEdgeHandler.prototype.updateLinkHint= -mxVertexHandler.prototype.updateLinkHint;var Ka=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){Ka.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var y=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()< -this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(S,X){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));y();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var M=this.graph.getLinkForCell(this.state.cell),N=this.graph.getLinksForState(this.state);if(null!=M||null!=N&&0<N.length)this.updateLinkHint(M, -N),this.redrawHandles()};var Da=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Da.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Ra=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var y=0;y<this.moveHandles.length;y++)this.moveHandles[y].style.left=this.moveHandles[y].rowState.x+this.moveHandles[y].rowState.width- -5+"px",this.moveHandles[y].style.top=this.moveHandles[y].rowState.y+this.moveHandles[y].rowState.height/2-6+"px";if(null!=this.cornerHandles){y=this.getSelectionBorderInset();var M=this.cornerHandles,N=M[0].bounds.height/2;M[0].bounds.x=this.state.x-M[0].bounds.width/2+y;M[0].bounds.y=this.state.y-N+y;M[0].redraw();M[1].bounds.x=M[0].bounds.x+this.state.width-2*y;M[1].bounds.y=M[0].bounds.y;M[1].redraw();M[2].bounds.x=M[0].bounds.x;M[2].bounds.y=this.state.y+this.state.height-2*y;M[2].redraw();M[3].bounds.x= -M[1].bounds.x;M[3].bounds.y=M[2].bounds.y;M[3].redraw();for(y=0;y<this.cornerHandles.length;y++)this.cornerHandles[y].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Ra.apply(this);null!=this.state&&null!=this.linkHint&&(y=new mxPoint(this.state.getCenterX(),this.state.getCenterY()), -M=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),N=mxUtils.getBoundingBox(M,this.state.style[mxConstants.STYLE_ROTATION]||"0",y),y=null!=N?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,M=null!=this.state.text?this.state.text.boundingBox:null,null==N&&(N=this.state),N=N.y+N.height,null!=M&&(N=Math.max(N,M.y+M.height)),this.linkHint.style.left=Math.max(0,Math.round(y.x+(y.width-this.linkHint.clientWidth)/2))+"px", -this.linkHint.style.top=Math.round(N+this.verticalOffset/2+Editor.hintOffset)+"px")};var Qa=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Qa.apply(this,arguments);if(null!=this.moveHandles){for(var y=0;y<this.moveHandles.length;y++)null!=this.moveHandles[y]&&null!=this.moveHandles[y].parentNode&&this.moveHandles[y].parentNode.removeChild(this.moveHandles[y]);this.moveHandles=null}if(null!=this.cornerHandles){for(y=0;y<this.cornerHandles.length;y++)null!=this.cornerHandles[y]&& -null!=this.cornerHandles[y].node&&null!=this.cornerHandles[y].node.parentNode&&this.cornerHandles[y].node.parentNode.removeChild(this.cornerHandles[y].node);this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&& -(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Ta=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Ta.apply(this),null!=this.state&&null!=this.linkHint)){var y=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(y=new mxRectangle(y.x,y.y,y.width,y.height),y.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(y.x+(y.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top= -Math.round(y.y+y.height+Editor.hintOffset)+"px"}};var Za=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){Za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Pa=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Pa.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler), -this.changeHandler=null)}}();(function(){function b(c,l,v){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=v?v:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function m(){mxCylinder.call(this)}function C(){mxCylinder.call(this)}function p(){mxActor.call(this)}function E(){mxCylinder.call(this)}function K(){mxCylinder.call(this)}function Q(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxShape.call(this)}function g(){mxShape.call(this)} -function x(c,l,v,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=v;this.strokewidth=null!=n?n:1}function z(){mxActor.call(this)}function u(){mxCylinder.call(this)}function H(){mxCylinder.call(this)}function J(){mxActor.call(this)}function D(){mxActor.call(this)}function G(){mxActor.call(this)}function V(){mxActor.call(this)}function U(){mxActor.call(this)}function Y(){mxActor.call(this)}function O(){mxActor.call(this)}function qa(c,l){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round"); +(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),L.consume()}};var Q=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);Q.apply(this,arguments)};var Y=(new Date).getTime(),R=0,ba=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(z,L,O,V){ba.apply(this,arguments);O!=this.currentTerminalState?(Y=(new Date).getTime(), +R=0):R=(new Date).getTime()-Y;this.currentTerminalState=O};var ea=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(z){return mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())?!1:null!=this.currentTerminalState&&z.getState()==this.currentTerminalState&&2E3<R||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&ea.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape= +function(z,L,O){L=null!=z&&0==z;var V=this.state.getVisibleTerminalState(L);z=null!=z&&(0==z||z>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==z)?this.graph.getConnectionConstraint(this.state,V,L):null;O=null!=(null!=z?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(L),z):null)?O?this.endFixedHandleImage:this.fixedHandleImage:null!=z&&null!=V?O?this.endTerminalHandleImage:this.terminalHandleImage:O?this.endHandleImage:this.handleImage;if(null!=O)return O= +new mxImageShape(new mxRectangle(0,0,O.width,O.height),O.src),O.preserveImageAspect=!1,O;O=mxConstants.HANDLE_SIZE;this.preferHtml&&--O;return new mxRectangleShape(new mxRectangle(0,0,O,O),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var ra=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(z,L,O){this.handleImage=L==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:L==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage; +return ra.apply(this,arguments)};var ta=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(z){if(null!=z&&1==z.length){var L=this.graph.getModel(),O=L.getParent(z[0]),V=this.graph.getCellGeometry(z[0]);if(L.isEdge(O)&&null!=V&&V.relative&&(L=this.graph.view.getState(z[0]),null!=L&&2>L.width&&2>L.height&&null!=L.text&&null!=L.text.boundingBox))return mxRectangle.fromRectangle(L.text.boundingBox)}return ta.apply(this,arguments)};var la=mxGraphHandler.prototype.getGuideStates; +mxGraphHandler.prototype.getGuideStates=function(){for(var z=la.apply(this,arguments),L=[],O=0;O<z.length;O++)"1"!=mxUtils.getValue(z[O].style,"part","0")&&L.push(z[O]);return L};var pa=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(z){var L=this.graph.getModel(),O=L.getParent(z.cell),V=this.graph.getCellGeometry(z.cell);return L.isEdge(O)&&null!=V&&V.relative&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox?(L=z.text.unrotatedBoundingBox|| +z.text.boundingBox,new mxRectangle(Math.round(L.x),Math.round(L.y),Math.round(L.width),Math.round(L.height))):pa.apply(this,arguments)};var xa=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(z,L){var O=this.graph.getModel(),V=O.getParent(this.state.cell),U=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(L)==mxEvent.ROTATION_HANDLE||!O.isEdge(V)||null==U||!U.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&xa.apply(this,arguments)}; +mxVertexHandler.prototype.rotateClick=function(){var z=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),L=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&z==mxConstants.NONE&&L==mxConstants.NONE?(z=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,z,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])}; +var Ca=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(z,L){Ca.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var Ia=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(z,L){Ia.apply(this,arguments);null!=this.rotationShape&&null!= +this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var Aa=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){Aa.apply(this,arguments);var z=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles(); +else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var L=0;4>L;L++){var O=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);O.dialect=mxConstants.DIALECT_SVG;O.init(this.graph.view.getOverlayPane());this.cornerHandles.push(O)}}var V=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()< +this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(U,ha){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));V()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(U,ha){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler); +L=this.graph.getLinkForCell(this.state.cell);O=this.graph.getLinksForState(this.state);this.updateLinkHint(L,O);if(null!=L||null!=O&&0<O.length)z=!0;z&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(z,L){try{if(null==z&&(null==L||0==L.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=z||null!=L&&0<L.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding= +"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=z&&(this.linkHint.appendChild(this.graph.createLinkForHint(z)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var O=document.createElement("img");O.className="geAdaptiveAsset";O.setAttribute("src",Editor.editImage); +O.setAttribute("title",mxResources.get("editLink"));O.setAttribute("width","11");O.setAttribute("height","11");O.style.marginLeft="10px";O.style.marginBottom="-1px";O.style.cursor="pointer";this.linkHint.appendChild(O);mxEvent.addListener(O,"click",mxUtils.bind(this,function(ha){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(ha)}));var V=O.cloneNode(!0);V.setAttribute("src",Editor.trashImage);V.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")])); +V.style.marginLeft="4px";this.linkHint.appendChild(V);mxEvent.addListener(V,"click",mxUtils.bind(this,function(ha){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(ha)}))}if(null!=L)for(O=0;O<L.length;O++){var U=document.createElement("div");U.style.marginTop=null!=z||0<O?"6px":"0px";U.appendChild(this.graph.createLinkForHint(L[O].getAttribute("href"),mxUtils.getTextContent(L[O])));this.linkHint.appendChild(U)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(ha){}};mxEdgeHandler.prototype.updateLinkHint= +mxVertexHandler.prototype.updateLinkHint;var La=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){La.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var z=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()< +this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(V,U){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));z();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var L=this.graph.getLinkForCell(this.state.cell),O=this.graph.getLinksForState(this.state);if(null!=L||null!=O&&0<O.length)this.updateLinkHint(L, +O),this.redrawHandles()};var Da=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Da.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Sa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.left=this.moveHandles[z].rowState.x+this.moveHandles[z].rowState.width- +5+"px",this.moveHandles[z].style.top=this.moveHandles[z].rowState.y+this.moveHandles[z].rowState.height/2-6+"px";if(null!=this.cornerHandles){z=this.getSelectionBorderInset();var L=this.cornerHandles,O=L[0].bounds.height/2;L[0].bounds.x=this.state.x-L[0].bounds.width/2+z;L[0].bounds.y=this.state.y-O+z;L[0].redraw();L[1].bounds.x=L[0].bounds.x+this.state.width-2*z;L[1].bounds.y=L[0].bounds.y;L[1].redraw();L[2].bounds.x=L[0].bounds.x;L[2].bounds.y=this.state.y+this.state.height-2*z;L[2].redraw();L[3].bounds.x= +L[1].bounds.x;L[3].bounds.y=L[2].bounds.y;L[3].redraw();for(z=0;z<this.cornerHandles.length;z++)this.cornerHandles[z].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Sa.apply(this);null!=this.state&&null!=this.linkHint&&(z=new mxPoint(this.state.getCenterX(),this.state.getCenterY()), +L=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),O=mxUtils.getBoundingBox(L,this.state.style[mxConstants.STYLE_ROTATION]||"0",z),z=null!=O?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,L=null!=this.state.text?this.state.text.boundingBox:null,null==O&&(O=this.state),O=O.y+O.height,null!=L&&(O=Math.max(O,L.y+L.height)),this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/2))+"px", +this.linkHint.style.top=Math.round(O+this.verticalOffset/2+Editor.hintOffset)+"px")};var Ra=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Ra.apply(this,arguments);if(null!=this.moveHandles){for(var z=0;z<this.moveHandles.length;z++)null!=this.moveHandles[z]&&null!=this.moveHandles[z].parentNode&&this.moveHandles[z].parentNode.removeChild(this.moveHandles[z]);this.moveHandles=null}if(null!=this.cornerHandles){for(z=0;z<this.cornerHandles.length;z++)null!=this.cornerHandles[z]&& +null!=this.cornerHandles[z].node&&null!=this.cornerHandles[z].node.parentNode&&this.cornerHandles[z].node.parentNode.removeChild(this.cornerHandles[z].node);this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&& +(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Ta=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Ta.apply(this),null!=this.state&&null!=this.linkHint)){var z=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(z=new mxRectangle(z.x,z.y,z.width,z.height),z.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top= +Math.round(z.y+z.height+Editor.hintOffset)+"px"}};var Za=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){Za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Na=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Na.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler), +this.changeHandler=null)}}();(function(){function b(c,l,v){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=v?v:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function m(){mxCylinder.call(this)}function C(){mxCylinder.call(this)}function p(){mxActor.call(this)}function F(){mxCylinder.call(this)}function K(){mxCylinder.call(this)}function P(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxShape.call(this)}function g(){mxShape.call(this)} +function x(c,l,v,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=v;this.strokewidth=null!=n?n:1}function y(){mxActor.call(this)}function u(){mxCylinder.call(this)}function H(){mxCylinder.call(this)}function J(){mxActor.call(this)}function D(){mxActor.call(this)}function G(){mxActor.call(this)}function W(){mxActor.call(this)}function T(){mxActor.call(this)}function Z(){mxActor.call(this)}function N(){mxActor.call(this)}function qa(c,l){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round"); this.defaultVariation=l;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,qa.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,qa.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,qa.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,qa.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,qa.prototype.curveTo); -this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,qa.prototype.arcTo)}function oa(){mxRectangleShape.call(this)}function aa(){mxRectangleShape.call(this)}function da(){mxActor.call(this)}function ia(){mxActor.call(this)}function L(){mxActor.call(this)}function Z(){mxRectangleShape.call(this)}function P(){mxRectangleShape.call(this)}function ca(){mxCylinder.call(this)}function ja(){mxShape.call(this)}function ka(){mxShape.call(this)}function q(){mxEllipse.call(this)}function F(){mxShape.call(this)} -function R(){mxShape.call(this)}function W(){mxRectangleShape.call(this)}function T(){mxShape.call(this)}function ba(){mxShape.call(this)}function ha(){mxShape.call(this)}function ra(){mxShape.call(this)}function ta(){mxShape.call(this)}function ma(){mxCylinder.call(this)}function pa(){mxCylinder.call(this)}function za(){mxRectangleShape.call(this)}function Ba(){mxDoubleEllipse.call(this)}function Ia(){mxDoubleEllipse.call(this)}function Aa(){mxArrowConnector.call(this);this.spacing=0}function Ka(){mxArrowConnector.call(this); -this.spacing=0}function Da(){mxActor.call(this)}function Ra(){mxRectangleShape.call(this)}function Qa(){mxActor.call(this)}function Ta(){mxActor.call(this)}function Za(){mxActor.call(this)}function Pa(){mxActor.call(this)}function y(){mxActor.call(this)}function M(){mxActor.call(this)}function N(){mxActor.call(this)}function S(){mxActor.call(this)}function X(){mxActor.call(this)}function fa(){mxActor.call(this)}function la(){mxEllipse.call(this)}function xa(){mxEllipse.call(this)}function sa(){mxEllipse.call(this)} -function ya(){mxRhombus.call(this)}function Fa(){mxEllipse.call(this)}function wa(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function La(){mxEllipse.call(this)}function Oa(){mxActor.call(this)}function Ca(){mxActor.call(this)}function Ma(){mxActor.call(this)}function Ga(c,l,v,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=v;this.strokewidth=null!=n?n:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Ya(){mxConnector.call(this)} -function db(c,l,v,n,t,A,B,ea,I,va){B+=I;var na=n.clone();n.x-=t*(2*B+I);n.y-=A*(2*B+I);t*=B+I;A*=B+I;return function(){c.ellipse(na.x-t-B,na.y-A-B,2*B,2*B);va?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var l=0;l<this.line.length;l++){var v=this.line[l];null!=v&&(v=new mxRectangle(v.x,v.y,this.strokewidth,this.strokewidth),null==c?c=v:c.add(v))}this.bounds=null!=c?c:new mxRectangle};b.prototype.paintVertexShape= +this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,qa.prototype.arcTo)}function oa(){mxRectangleShape.call(this)}function S(){mxRectangleShape.call(this)}function fa(){mxActor.call(this)}function ia(){mxActor.call(this)}function M(){mxActor.call(this)}function aa(){mxRectangleShape.call(this)}function X(){mxRectangleShape.call(this)}function ja(){mxCylinder.call(this)}function ca(){mxShape.call(this)}function ka(){mxShape.call(this)}function q(){mxEllipse.call(this)}function E(){mxShape.call(this)} +function Q(){mxShape.call(this)}function Y(){mxRectangleShape.call(this)}function R(){mxShape.call(this)}function ba(){mxShape.call(this)}function ea(){mxShape.call(this)}function ra(){mxShape.call(this)}function ta(){mxShape.call(this)}function la(){mxCylinder.call(this)}function pa(){mxCylinder.call(this)}function xa(){mxRectangleShape.call(this)}function Ca(){mxDoubleEllipse.call(this)}function Ia(){mxDoubleEllipse.call(this)}function Aa(){mxArrowConnector.call(this);this.spacing=0}function La(){mxArrowConnector.call(this); +this.spacing=0}function Da(){mxActor.call(this)}function Sa(){mxRectangleShape.call(this)}function Ra(){mxActor.call(this)}function Ta(){mxActor.call(this)}function Za(){mxActor.call(this)}function Na(){mxActor.call(this)}function z(){mxActor.call(this)}function L(){mxActor.call(this)}function O(){mxActor.call(this)}function V(){mxActor.call(this)}function U(){mxActor.call(this)}function ha(){mxActor.call(this)}function ma(){mxEllipse.call(this)}function wa(){mxEllipse.call(this)}function sa(){mxEllipse.call(this)} +function ya(){mxRhombus.call(this)}function Ha(){mxEllipse.call(this)}function Qa(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function za(){mxEllipse.call(this)}function Fa(){mxActor.call(this)}function Ba(){mxActor.call(this)}function Ea(){mxActor.call(this)}function Oa(c,l,v,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=v;this.strokewidth=null!=n?n:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Pa(){mxConnector.call(this)} +function bb(c,l,v,n,t,A,B,da,I,va){B+=I;var na=n.clone();n.x-=t*(2*B+I);n.y-=A*(2*B+I);t*=B+I;A*=B+I;return function(){c.ellipse(na.x-t-B,na.y-A-B,2*B,2*B);va?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var l=0;l<this.line.length;l++){var v=this.line[l];null!=v&&(v=new mxRectangle(v.x,v.y,this.strokewidth,this.strokewidth),null==c?c=v:c.add(v))}this.bounds=null!=c?c:new mxRectangle};b.prototype.paintVertexShape= function(c,l,v,n,t){this.paintTableLine(c,this.line,0,0)};b.prototype.paintTableLine=function(c,l,v,n){if(null!=l){var t=null;c.begin();for(var A=0;A<l.length;A++){var B=l[A];null!=B&&(null==t?c.moveTo(B.x+v,B.y+n):null!=t&&c.lineTo(B.x+v,B.y+n));t=B}c.end();c.stroke()}};b.prototype.intersectsRectangle=function(c){var l=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var v=null,n=0;n<this.line.length&&!l;n++){var t=this.line[n];null!=t&&null!=v&&(l=mxUtils.rectangleIntersectsSegment(c, -v,t));v=t}return l};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(c,l,v,n,t){var A=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,B=this.isHorizontal(),ea=this.getTitleSize();0==ea||this.outline?ua.prototype.paintVertexShape.apply(this, -arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-l,-v));A||this.outline||!(B&&ea<t||!B&&ea<n)||this.paintForeground(c,l,v,n,t)};e.prototype.paintForeground=function(c,l,v,n,t){if(null!=this.state){var A=this.flipH,B=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ea=A;A=B;B=ea}c.rotate(-this.getShapeRotation(),A,B,l+n/2,v+t/2);s=this.scale;l=this.bounds.x/s;v=this.bounds.y/s;n=this.bounds.width/s;t=this.bounds.height/ +v,t));v=t}return l};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(c,l,v,n,t){var A=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,B=this.isHorizontal(),da=this.getTitleSize();0==da||this.outline?ua.prototype.paintVertexShape.apply(this, +arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-l,-v));A||this.outline||!(B&&da<t||!B&&da<n)||this.paintForeground(c,l,v,n,t)};e.prototype.paintForeground=function(c,l,v,n,t){if(null!=this.state){var A=this.flipH,B=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var da=A;A=B;B=da}c.rotate(-this.getShapeRotation(),A,B,l+n/2,v+t/2);s=this.scale;l=this.bounds.x/s;v=this.bounds.y/s;n=this.bounds.width/s;t=this.bounds.height/ s;this.paintTableForeground(c,l,v,n,t)}};e.prototype.paintTableForeground=function(c,l,v,n,t){n=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(t=0;t<n.length;t++)b.prototype.paintTableLine(c,n[t],l,v)};e.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table", -e);mxUtils.extend(k,e);k.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",k);mxUtils.extend(m,mxCylinder);m.prototype.size=20;m.prototype.darkOpacity=0;m.prototype.darkOpacity2=0;m.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ea=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style, -"darkOpacity2",this.darkOpacity2))));c.translate(l,v);c.begin();c.moveTo(0,0);c.lineTo(n-A,0);c.lineTo(n,A);c.lineTo(n,t);c.lineTo(A,t);c.lineTo(0,t-A);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(n-A,0),c.lineTo(n,A),c.lineTo(A,A),c.close(),c.fill()),0!=ea&&(c.setFillAlpha(Math.abs(ea)),c.setFillColor(0>ea?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(A, -A),c.lineTo(A,t),c.lineTo(0,t-A),c.close(),c.fill()),c.begin(),c.moveTo(A,t),c.lineTo(A,A),c.lineTo(0,0),c.moveTo(A,A),c.lineTo(n,A),c.end(),c.stroke())};m.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",m);var eb=Math.tan(mxUtils.toRadians(30)),cb=(.5-eb)/2;mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(C, +e);mxUtils.extend(k,e);k.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",k);mxUtils.extend(m,mxCylinder);m.prototype.size=20;m.prototype.darkOpacity=0;m.prototype.darkOpacity2=0;m.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),da=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style, +"darkOpacity2",this.darkOpacity2))));c.translate(l,v);c.begin();c.moveTo(0,0);c.lineTo(n-A,0);c.lineTo(n,A);c.lineTo(n,t);c.lineTo(A,t);c.lineTo(0,t-A);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(n-A,0),c.lineTo(n,A),c.lineTo(A,A),c.close(),c.fill()),0!=da&&(c.setFillAlpha(Math.abs(da)),c.setFillColor(0>da?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(A, +A),c.lineTo(A,t),c.lineTo(0,t-A),c.close(),c.fill()),c.begin(),c.moveTo(A,t),c.lineTo(A,A),c.lineTo(0,0),c.moveTo(A,A),c.lineTo(n,A),c.end(),c.stroke())};m.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",m);var eb=Math.tan(mxUtils.toRadians(30)),db=(.5-eb)/2;mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(C, mxCylinder);C.prototype.size=6;C.prototype.paintVertexShape=function(c,l,v,n,t){c.setFillColor(this.stroke);var A=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(l+.5*(n-A),v+.5*(t-A),A,A);c.fill();c.setFillColor(mxConstants.NONE);c.rect(l,v,n,t);c.fill()};mxCellRenderer.registerShape("waypoint",C);mxUtils.extend(p,mxActor);p.prototype.size=20;p.prototype.redrawPath=function(c,l,v,n,t){l=Math.min(n,t/eb);c.translate((n-l)/2,(t-l)/2+l/4);c.moveTo(0, -.25*l);c.lineTo(.5*l,l*cb);c.lineTo(l,.25*l);c.lineTo(.5*l,(.5-cb)*l);c.lineTo(0,.25*l);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(E,mxCylinder);E.prototype.size=20;E.prototype.redrawPath=function(c,l,v,n,t,A){l=Math.min(n,t/(.5+eb));A?(c.moveTo(0,.25*l),c.lineTo(.5*l,(.5-cb)*l),c.lineTo(l,.25*l),c.moveTo(.5*l,(.5-cb)*l),c.lineTo(.5*l,(1-cb)*l)):(c.translate((n-l)/2,(t-l)/2),c.moveTo(0,.25*l),c.lineTo(.5*l,l*cb),c.lineTo(l,.25*l),c.lineTo(l,.75*l),c.lineTo(.5* -l,(1-cb)*l),c.lineTo(0,.75*l),c.close());c.end()};mxCellRenderer.registerShape("isoCube",E);mxUtils.extend(K,mxCylinder);K.prototype.redrawPath=function(c,l,v,n,t,A){l=Math.min(t/2,Math.round(t/8)+this.strokewidth-1);if(A&&null!=this.fill||!A&&null==this.fill)c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0, --l);A||(c.moveTo(0,l),c.curveTo(0,-l/3,n,-l/3,n,l),c.lineTo(n,t-l),c.curveTo(n,t+l/3,0,t+l/3,0,t-l),c.close())};K.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",K);mxUtils.extend(Q,mxCylinder);Q.prototype.size=30;Q.prototype.darkOpacity=0;Q.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size", +.25*l);c.lineTo(.5*l,l*db);c.lineTo(l,.25*l);c.lineTo(.5*l,(.5-db)*l);c.lineTo(0,.25*l);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(F,mxCylinder);F.prototype.size=20;F.prototype.redrawPath=function(c,l,v,n,t,A){l=Math.min(n,t/(.5+eb));A?(c.moveTo(0,.25*l),c.lineTo(.5*l,(.5-db)*l),c.lineTo(l,.25*l),c.moveTo(.5*l,(.5-db)*l),c.lineTo(.5*l,(1-db)*l)):(c.translate((n-l)/2,(t-l)/2),c.moveTo(0,.25*l),c.lineTo(.5*l,l*db),c.lineTo(l,.25*l),c.lineTo(l,.75*l),c.lineTo(.5* +l,(1-db)*l),c.lineTo(0,.75*l),c.close());c.end()};mxCellRenderer.registerShape("isoCube",F);mxUtils.extend(K,mxCylinder);K.prototype.redrawPath=function(c,l,v,n,t,A){l=Math.min(t/2,Math.round(t/8)+this.strokewidth-1);if(A&&null!=this.fill||!A&&null==this.fill)c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0, +-l);A||(c.moveTo(0,l),c.curveTo(0,-l/3,n,-l/3,n,l),c.lineTo(n,t-l),c.curveTo(n,t+l/3,0,t+l/3,0,t-l),c.close())};K.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",K);mxUtils.extend(P,mxCylinder);P.prototype.size=30;P.prototype.darkOpacity=0;P.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size", this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(l,v);c.begin();c.moveTo(0,0);c.lineTo(n-A,0);c.lineTo(n,A);c.lineTo(n,t);c.lineTo(0,t);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(n-A,0),c.lineTo(n-A,A),c.lineTo(n,A),c.close(),c.fill()),c.begin(),c.moveTo(n-A,0),c.lineTo(n-A,A),c.lineTo(n,A), -c.end(),c.stroke())};mxCellRenderer.registerShape("note",Q);mxUtils.extend(d,Q);mxCellRenderer.registerShape("note2",d);d.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,0)}return null};mxUtils.extend(f,mxShape);f.prototype.isoAngle=15;f.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style, +c.end(),c.stroke())};mxCellRenderer.registerShape("note",P);mxUtils.extend(d,P);mxCellRenderer.registerShape("note2",d);d.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,0)}return null};mxUtils.extend(f,mxShape);f.prototype.isoAngle=15;f.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style, "isoAngle",this.isoAngle))))*Math.PI/200;A=Math.min(n*Math.tan(A),.5*t);c.translate(l,v);c.begin();c.moveTo(.5*n,0);c.lineTo(n,A);c.lineTo(n,t-A);c.lineTo(.5*n,t);c.lineTo(0,t-A);c.lineTo(0,A);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,A);c.lineTo(.5*n,2*A);c.lineTo(n,A);c.moveTo(.5*n,2*A);c.lineTo(.5*n,t);c.stroke()};mxCellRenderer.registerShape("isoCube2",f);mxUtils.extend(g,mxShape);g.prototype.size=15;g.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(0,Math.min(.5* t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(l,v);0==A?(c.rect(0,0,n,t),c.fillAndStroke()):(c.begin(),c.moveTo(0,A),c.arcTo(.5*n,A,0,0,1,.5*n,0),c.arcTo(.5*n,A,0,0,1,n,A),c.lineTo(n,t-A),c.arcTo(.5*n,A,0,0,1,.5*n,t),c.arcTo(.5*n,A,0,0,1,0,t-A),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(n,A),c.arcTo(.5*n,A,0,0,1,.5*n,2*A),c.arcTo(.5*n,A,0,0,1,0,A),c.stroke())};mxCellRenderer.registerShape("cylinder2",g);mxUtils.extend(x,mxCylinder);x.prototype.size= 15;x.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(0,Math.min(.5*t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"lid",!0);c.translate(l,v);0==A?(c.rect(0,0,n,t),c.fillAndStroke()):(c.begin(),B?(c.moveTo(0,A),c.arcTo(.5*n,A,0,0,1,.5*n,0),c.arcTo(.5*n,A,0,0,1,n,A)):(c.moveTo(0,0),c.arcTo(.5*n,A,0,0,0,.5*n,A),c.arcTo(.5*n,A,0,0,0,n,0)),c.lineTo(n,t-A),c.arcTo(.5*n,A,0,0,1,.5*n,t),c.arcTo(.5*n,A,0,0,1,0,t-A),c.close(),c.fillAndStroke(),c.setShadow(!1), -B&&(c.begin(),c.moveTo(n,A),c.arcTo(.5*n,A,0,0,1,.5*n,2*A),c.arcTo(.5*n,A,0,0,1,0,A),c.stroke()))};mxCellRenderer.registerShape("cylinder3",x);mxUtils.extend(z,mxActor);z.prototype.redrawPath=function(c,l,v,n,t){c.moveTo(0,0);c.quadTo(n/2,.5*t,n,0);c.quadTo(.5*n,t/2,n,t);c.quadTo(n/2,.5*t,0,t);c.quadTo(.5*n,t/2,0,0);c.end()};mxCellRenderer.registerShape("switch",z);mxUtils.extend(u,mxCylinder);u.prototype.tabWidth=60;u.prototype.tabHeight=20;u.prototype.tabPosition="right";u.prototype.arcSize=.1; -u.prototype.paintVertexShape=function(c,l,v,n,t){c.translate(l,v);l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));v=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var A=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),B=mxUtils.getValue(this.style,"rounded",!1),ea=mxUtils.getValue(this.style,"absoluteArcSize",!1),I=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));ea||(I*=Math.min(n,t)); +B&&(c.begin(),c.moveTo(n,A),c.arcTo(.5*n,A,0,0,1,.5*n,2*A),c.arcTo(.5*n,A,0,0,1,0,A),c.stroke()))};mxCellRenderer.registerShape("cylinder3",x);mxUtils.extend(y,mxActor);y.prototype.redrawPath=function(c,l,v,n,t){c.moveTo(0,0);c.quadTo(n/2,.5*t,n,0);c.quadTo(.5*n,t/2,n,t);c.quadTo(n/2,.5*t,0,t);c.quadTo(.5*n,t/2,0,0);c.end()};mxCellRenderer.registerShape("switch",y);mxUtils.extend(u,mxCylinder);u.prototype.tabWidth=60;u.prototype.tabHeight=20;u.prototype.tabPosition="right";u.prototype.arcSize=.1; +u.prototype.paintVertexShape=function(c,l,v,n,t){c.translate(l,v);l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));v=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var A=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),B=mxUtils.getValue(this.style,"rounded",!1),da=mxUtils.getValue(this.style,"absoluteArcSize",!1),I=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));da||(I*=Math.min(n,t)); I=Math.min(I,.5*n,.5*(t-v));l=Math.max(l,I);l=Math.min(n-I,l);B||(I=0);c.begin();"left"==A?(c.moveTo(Math.max(I,0),v),c.lineTo(Math.max(I,0),0),c.lineTo(l,0),c.lineTo(l,v)):(c.moveTo(n-l,v),c.lineTo(n-l,0),c.lineTo(n-Math.max(I,0),0),c.lineTo(n-Math.max(I,0),v));B?(c.moveTo(0,I+v),c.arcTo(I,I,0,0,1,I,v),c.lineTo(n-I,v),c.arcTo(I,I,0,0,1,n,I+v),c.lineTo(n,t-I),c.arcTo(I,I,0,0,1,n-I,t),c.lineTo(I,t),c.arcTo(I,I,0,0,1,0,t-I)):(c.moveTo(0,v),c.lineTo(n,v),c.lineTo(n,t),c.lineTo(0,t));c.close();c.fillAndStroke(); c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(n-30,v+20),c.lineTo(n-20,v+10),c.lineTo(n-10,v+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",u);u.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var v=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style, "tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),t=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));t||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));n||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-v),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-v),0,A,Math.min(c.height,c.height- @@ -2727,13 +2725,13 @@ n,new mxRectangle(c.x,c.y+l,v,n-2*l);l*=v;return new mxRectangle(c.x+l,c.y,v-2*l "size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*l),0,0)}return null};x.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(l/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*l*this.scale),0,Math.max(0,.3*l*this.scale))}return null};u.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style, "tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var v=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),t=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));t||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));n||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition", this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-v),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-v),0,A,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};H.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};d.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style, -"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,Math.max(0,l*this.scale))}return null};mxUtils.extend(V,mxActor);V.prototype.size=.2;V.prototype.fixedSize=20;V.prototype.isRoundable=function(){return!0};V.prototype.redrawPath=function(c,l,v,n,t){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style, -"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,t),new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n-l,t)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("parallelogram",V);mxUtils.extend(U,mxActor);U.prototype.size=.2;U.prototype.fixedSize=20;U.prototype.isRoundable=function(){return!0};U.prototype.redrawPath=function(c,l,v,n,t){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5* -n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,t),new mxPoint(l,0),new mxPoint(n-l,0),new mxPoint(n,t)],this.isRounded,v,!0)};mxCellRenderer.registerShape("trapezoid",U);mxUtils.extend(Y,mxActor);Y.prototype.size=.5;Y.prototype.redrawPath=function(c,l,v,n,t){c.setFillColor(null); -l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(n,0),new mxPoint(l,0),new mxPoint(l,t/2),new mxPoint(0,t/2),new mxPoint(l,t/2),new mxPoint(l,t),new mxPoint(n,t)],this.isRounded,v,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",Y);mxUtils.extend(O,mxActor);O.prototype.redrawPath=function(c,l,v,n,t){c.setStrokeWidth(1);c.setFillColor(this.stroke); -l=n/5;c.rect(0,0,l,t);c.fillAndStroke();c.rect(2*l,0,l,t);c.fillAndStroke();c.rect(4*l,0,l,t);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",O);qa.prototype.moveTo=function(c,l){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;this.firstX=c;this.firstY=l};qa.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)}; +"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,Math.max(0,l*this.scale))}return null};mxUtils.extend(W,mxActor);W.prototype.size=.2;W.prototype.fixedSize=20;W.prototype.isRoundable=function(){return!0};W.prototype.redrawPath=function(c,l,v,n,t){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style, +"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,t),new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n-l,t)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("parallelogram",W);mxUtils.extend(T,mxActor);T.prototype.size=.2;T.prototype.fixedSize=20;T.prototype.isRoundable=function(){return!0};T.prototype.redrawPath=function(c,l,v,n,t){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5* +n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,t),new mxPoint(l,0),new mxPoint(n-l,0),new mxPoint(n,t)],this.isRounded,v,!0)};mxCellRenderer.registerShape("trapezoid",T);mxUtils.extend(Z,mxActor);Z.prototype.size=.5;Z.prototype.redrawPath=function(c,l,v,n,t){c.setFillColor(null); +l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(n,0),new mxPoint(l,0),new mxPoint(l,t/2),new mxPoint(0,t/2),new mxPoint(l,t/2),new mxPoint(l,t),new mxPoint(n,t)],this.isRounded,v,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",Z);mxUtils.extend(N,mxActor);N.prototype.redrawPath=function(c,l,v,n,t){c.setStrokeWidth(1);c.setFillColor(this.stroke); +l=n/5;c.rect(0,0,l,t);c.fillAndStroke();c.rect(2*l,0,l,t);c.fillAndStroke();c.rect(4*l,0,l,t);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",N);qa.prototype.moveTo=function(c,l){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;this.firstX=c;this.firstY=l};qa.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)}; qa.prototype.quadTo=function(c,l,v,n){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=n};qa.prototype.curveTo=function(c,l,v,n,t,A){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=t;this.lastY=A};qa.prototype.arcTo=function(c,l,v,n,t,A,B){this.originalArcTo.apply(this.canvas,arguments);this.lastX=A;this.lastY=B};qa.prototype.lineTo=function(c,l){if(null!=this.lastX&&null!=this.lastY){var v=function(na){return"number"===typeof na?na?0>na?-1:1:na===na?0:NaN:NaN}, -n=Math.abs(c-this.lastX),t=Math.abs(l-this.lastY),A=Math.sqrt(n*n+t*t);if(2>A){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;return}var B=Math.round(A/10),ea=this.defaultVariation;5>B&&(B=5,ea/=3);var I=v(c-this.lastX)*n/B;v=v(l-this.lastY)*t/B;n/=A;t/=A;for(A=0;A<B;A++){var va=(Math.random()-.5)*ea;this.originalLineTo.call(this.canvas,I*A+this.lastX-va*t,v*A+this.lastY-va*n)}this.originalLineTo.call(this.canvas,c,l)}else this.originalLineTo.apply(this.canvas,arguments); +n=Math.abs(c-this.lastX),t=Math.abs(l-this.lastY),A=Math.sqrt(n*n+t*t);if(2>A){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;return}var B=Math.round(A/10),da=this.defaultVariation;5>B&&(B=5,da/=3);var I=v(c-this.lastX)*n/B;v=v(l-this.lastY)*t/B;n/=A;t/=A;for(A=0;A<B;A++){var va=(Math.random()-.5)*da;this.originalLineTo.call(this.canvas,I*A+this.lastX-va*t,v*A+this.lastY-va*n)}this.originalLineTo.call(this.canvas,c,l)}else this.originalLineTo.apply(this.canvas,arguments); this.lastX=c;this.lastY=l};qa.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var fb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){fb.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};var pb=mxShape.prototype.afterPaint; mxShape.prototype.afterPaint=function(c){pb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new qa(c,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};mxRhombus.prototype.defaultJiggle=2;var lb=mxRectangleShape.prototype.isHtmlAllowed; mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&lb.apply(this,arguments)};var $a=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,l,v,n,t){if(null==c.handJiggle||c.handJiggle.constructor!=qa)$a.apply(this,arguments);else{var A=!0;null!=this.style&&(A="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS, @@ -2741,178 +2739,178 @@ mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null== A,t*A)),c.moveTo(l+A,v),c.lineTo(l+n-A,v),c.quadTo(l+n,v,l+n,v+A),c.lineTo(l+n,v+t-A),c.quadTo(l+n,v+t,l+n-A,v+t),c.lineTo(l+A,v+t),c.quadTo(l,v+t,l,v+t-A),c.lineTo(l,v+A),c.quadTo(l,v,l+A,v)):(c.moveTo(l,v),c.lineTo(l+n,v),c.lineTo(l+n,v+t),c.lineTo(l,v+t),c.lineTo(l,v)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(oa,mxRectangleShape);oa.prototype.size=.1;oa.prototype.fixedSize=!1;oa.prototype.isHtmlAllowed=function(){return!1};oa.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style, mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var l=c.width,v=c.height;c=new mxRectangle(c.x,c.y,l,v);var n=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;n=Math.max(n,Math.min(l*t,v*t))}c.x+=Math.round(n);c.width-=Math.round(2*n);return c}return c}; oa.prototype.paintForeground=function(c,l,v,n,t){var A=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),B=parseFloat(mxUtils.getValue(this.style,"size",this.size));B=A?Math.max(0,Math.min(n,B)):n*Math.max(0,Math.min(1,B));this.isRounded&&(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,B=Math.max(B,Math.min(n*A,t*A)));B=Math.round(B);c.begin();c.moveTo(l+B,v);c.lineTo(l+B,v+t);c.moveTo(l+n-B,v);c.lineTo(l+n-B,v+t);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this, -arguments)};mxCellRenderer.registerShape("process",oa);mxCellRenderer.registerShape("process2",oa);mxUtils.extend(aa,mxRectangleShape);aa.prototype.paintBackground=function(c,l,v,n,t){c.setFillColor(mxConstants.NONE);c.rect(l,v,n,t);c.fill()};aa.prototype.paintForeground=function(c,l,v,n,t){};mxCellRenderer.registerShape("transparent",aa);mxUtils.extend(da,mxHexagon);da.prototype.size=30;da.prototype.position=.5;da.prototype.position2=.5;da.prototype.base=20;da.prototype.getLabelMargins=function(){return new mxRectangle(0, -0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};da.prototype.isRoundable=function(){return!0};da.prototype.redrawPath=function(c,l,v,n,t){l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;v=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var A=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),B=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2", -this.position2)))),ea=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,t-v),new mxPoint(Math.min(n,A+ea),t-v),new mxPoint(B,t),new mxPoint(Math.max(0,A),t-v),new mxPoint(0,t-v)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",da);mxUtils.extend(ia,mxActor);ia.prototype.size=.2;ia.prototype.fixedSize=20;ia.prototype.isRoundable=function(){return!0};ia.prototype.redrawPath=function(c, +arguments)};mxCellRenderer.registerShape("process",oa);mxCellRenderer.registerShape("process2",oa);mxUtils.extend(S,mxRectangleShape);S.prototype.paintBackground=function(c,l,v,n,t){c.setFillColor(mxConstants.NONE);c.rect(l,v,n,t);c.fill()};S.prototype.paintForeground=function(c,l,v,n,t){};mxCellRenderer.registerShape("transparent",S);mxUtils.extend(fa,mxHexagon);fa.prototype.size=30;fa.prototype.position=.5;fa.prototype.position2=.5;fa.prototype.base=20;fa.prototype.getLabelMargins=function(){return new mxRectangle(0, +0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};fa.prototype.isRoundable=function(){return!0};fa.prototype.redrawPath=function(c,l,v,n,t){l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;v=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var A=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),B=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2", +this.position2)))),da=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,t-v),new mxPoint(Math.min(n,A+da),t-v),new mxPoint(B,t),new mxPoint(Math.max(0,A),t-v),new mxPoint(0,t-v)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",fa);mxUtils.extend(ia,mxActor);ia.prototype.size=.2;ia.prototype.fixedSize=20;ia.prototype.isRoundable=function(){return!0};ia.prototype.redrawPath=function(c, l,v,n,t){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n-l,0),new mxPoint(n,t/2),new mxPoint(n-l,t),new mxPoint(0,t),new mxPoint(l,t/2)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("step", -ia);mxUtils.extend(L,mxHexagon);L.prototype.size=.25;L.prototype.fixedSize=20;L.prototype.isRoundable=function(){return!0};L.prototype.redrawPath=function(c,l,v,n,t){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l, -0),new mxPoint(n-l,0),new mxPoint(n,.5*t),new mxPoint(n-l,t),new mxPoint(l,t),new mxPoint(0,.5*t)],this.isRounded,v,!0)};mxCellRenderer.registerShape("hexagon",L);mxUtils.extend(Z,mxRectangleShape);Z.prototype.isHtmlAllowed=function(){return!1};Z.prototype.paintForeground=function(c,l,v,n,t){var A=Math.min(n/5,t/5)+1;c.begin();c.moveTo(l+n/2,v+A);c.lineTo(l+n/2,v+t-A);c.moveTo(l+A,v+t/2);c.lineTo(l+n-A,v+t/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus", -Z);var ab=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};mxRhombus.prototype.paintVertexShape=function(c,l,v,n,t){ab.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var A=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]|| -0);l+=A;v+=A;n-=2*A;t-=2*A;0<n&&0<t&&(c.setShadow(!1),ab.apply(this,[c,l,v,n,t]))}};mxUtils.extend(P,mxRectangleShape);P.prototype.isHtmlAllowed=function(){return!1};P.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};P.prototype.paintForeground=function(c,l,v,n,t){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var A= -Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=A;v+=A;n-=2*A;t-=2*A;0<n&&0<t&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);A=0;do{var B=mxCellRenderer.defaultShapes[this.style["symbol"+A]];if(null!=B){var ea=this.style["symbol"+A+"Align"],I=this.style["symbol"+A+"VerticalAlign"],va=this.style["symbol"+A+"Width"],na=this.style["symbol"+A+"Height"],Xa=this.style["symbol"+A+"Spacing"]||0,jb=this.style["symbol"+A+"VSpacing"]|| -Xa,bb=this.style["symbol"+A+"ArcSpacing"];null!=bb&&(bb*=this.getArcSize(n+this.strokewidth,t+this.strokewidth),Xa+=bb,jb+=bb);bb=l;var Ea=v;bb=ea==mxConstants.ALIGN_CENTER?bb+(n-va)/2:ea==mxConstants.ALIGN_RIGHT?bb+(n-va-Xa):bb+Xa;Ea=I==mxConstants.ALIGN_MIDDLE?Ea+(t-na)/2:I==mxConstants.ALIGN_BOTTOM?Ea+(t-na-jb):Ea+jb;c.save();ea=new B;ea.style=this.style;B.prototype.paintVertexShape.call(ea,c,bb,Ea,va,na);c.restore()}A++}while(null!=B)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)}; -mxCellRenderer.registerShape("ext",P);mxUtils.extend(ca,mxCylinder);ca.prototype.redrawPath=function(c,l,v,n,t,A){A?(c.moveTo(0,0),c.lineTo(n/2,t/2),c.lineTo(n,0),c.end()):(c.moveTo(0,0),c.lineTo(n,0),c.lineTo(n,t),c.lineTo(0,t),c.close())};mxCellRenderer.registerShape("message",ca);mxUtils.extend(ja,mxShape);ja.prototype.paintBackground=function(c,l,v,n,t){c.translate(l,v);c.ellipse(n/4,0,n/2,t/4);c.fillAndStroke();c.begin();c.moveTo(n/2,t/4);c.lineTo(n/2,2*t/3);c.moveTo(n/2,t/3);c.lineTo(0,t/3); -c.moveTo(n/2,t/3);c.lineTo(n,t/3);c.moveTo(n/2,2*t/3);c.lineTo(0,t);c.moveTo(n/2,2*t/3);c.lineTo(n,t);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",ja);mxUtils.extend(ka,mxShape);ka.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};ka.prototype.paintBackground=function(c,l,v,n,t){c.translate(l,v);c.begin();c.moveTo(0,t/4);c.lineTo(0,3*t/4);c.end();c.stroke();c.begin();c.moveTo(0,t/2);c.lineTo(n/6,t/2);c.end();c.stroke();c.ellipse(n/6,0,5*n/6,t);c.fillAndStroke()}; -mxCellRenderer.registerShape("umlBoundary",ka);mxUtils.extend(q,mxEllipse);q.prototype.paintVertexShape=function(c,l,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/8,v+t);c.lineTo(l+7*n/8,v+t);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",q);mxUtils.extend(F,mxShape);F.prototype.paintVertexShape=function(c,l,v,n,t){c.translate(l,v);c.begin();c.moveTo(n,0);c.lineTo(0,t);c.moveTo(0,0);c.lineTo(n,t);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy", -F);mxUtils.extend(R,mxShape);R.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};R.prototype.paintBackground=function(c,l,v,n,t){c.translate(l,v);c.begin();c.moveTo(3*n/8,t/8*1.1);c.lineTo(5*n/8,0);c.end();c.stroke();c.ellipse(0,t/8,n,7*t/8);c.fillAndStroke()};R.prototype.paintForeground=function(c,l,v,n,t){c.begin();c.moveTo(3*n/8,t/8*1.1);c.lineTo(5*n/8,t/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",R);mxUtils.extend(W,mxRectangleShape); -W.prototype.size=40;W.prototype.isHtmlAllowed=function(){return!1};W.prototype.getLabelBounds=function(c){var l=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,l)};W.prototype.paintBackground=function(c,l,v,n,t){var A=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"participant");null==B||null==this.state?mxRectangleShape.prototype.paintBackground.call(this, -c,l,v,n,A):(B=this.state.view.graph.cellRenderer.getShape(B),null!=B&&B!=W&&(B=new B,B.apply(this.state),c.save(),B.paintVertexShape(c,l,v,n,A),c.restore()));A<t&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(l+n/2,v+A),c.lineTo(l+n/2,v+t),c.end(),c.stroke())};W.prototype.paintForeground=function(c,l,v,n,t){var A=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,l,v,n,Math.min(t, -A))};mxCellRenderer.registerShape("umlLifeline",W);mxUtils.extend(T,mxShape);T.prototype.width=60;T.prototype.height=30;T.prototype.corner=10;T.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};T.prototype.paintBackground=function(c,l,v,n,t){var A=this.corner,B=Math.min(n,Math.max(A,parseFloat(mxUtils.getValue(this.style, -"width",this.width)))),ea=Math.min(t,Math.max(1.5*A,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),I=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);I!=mxConstants.NONE&&(c.setFillColor(I),c.rect(l,v,n,t),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,l,v,n,t),c.setGradient(this.fill,this.gradient,l,v,n,t,this.gradientDirection)):c.setFillColor(this.fill);c.begin(); -c.moveTo(l,v);c.lineTo(l+B,v);c.lineTo(l+B,v+Math.max(0,ea-1.5*A));c.lineTo(l+Math.max(0,B-A),v+ea);c.lineTo(l,v+ea);c.close();c.fillAndStroke();c.begin();c.moveTo(l+B,v);c.lineTo(l+n,v);c.lineTo(l+n,v+t);c.lineTo(l,v+t);c.lineTo(l,v+ea);c.stroke()};mxCellRenderer.registerShape("umlFrame",T);mxPerimeter.CenterPerimeter=function(c,l,v,n){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c, -l,v,n){n=W.prototype.size;null!=l&&(n=mxUtils.getValue(l.style,"size",n)*l.view.scale);l=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*l.view.scale/2-1;v.x<c.getCenterX()&&(l=-1*(l+1));return new mxPoint(c.getCenterX()+l,Math.min(c.y+c.height,Math.max(c.y+n,v.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,l,v,n){n=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter", +ia);mxUtils.extend(M,mxHexagon);M.prototype.size=.25;M.prototype.fixedSize=20;M.prototype.isRoundable=function(){return!0};M.prototype.redrawPath=function(c,l,v,n,t){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l, +0),new mxPoint(n-l,0),new mxPoint(n,.5*t),new mxPoint(n-l,t),new mxPoint(l,t),new mxPoint(0,.5*t)],this.isRounded,v,!0)};mxCellRenderer.registerShape("hexagon",M);mxUtils.extend(aa,mxRectangleShape);aa.prototype.isHtmlAllowed=function(){return!1};aa.prototype.paintForeground=function(c,l,v,n,t){var A=Math.min(n/5,t/5)+1;c.begin();c.moveTo(l+n/2,v+A);c.lineTo(l+n/2,v+t-A);c.moveTo(l+A,v+t/2);c.lineTo(l+n-A,v+t/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)}; +mxCellRenderer.registerShape("plus",aa);var ab=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};mxRhombus.prototype.paintVertexShape=function(c,l,v,n,t){ab.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var A=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]|| +0);l+=A;v+=A;n-=2*A;t-=2*A;0<n&&0<t&&(c.setShadow(!1),ab.apply(this,[c,l,v,n,t]))}};mxUtils.extend(X,mxRectangleShape);X.prototype.isHtmlAllowed=function(){return!1};X.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};X.prototype.paintForeground=function(c,l,v,n,t){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var A= +Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=A;v+=A;n-=2*A;t-=2*A;0<n&&0<t&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);A=0;do{var B=mxCellRenderer.defaultShapes[this.style["symbol"+A]];if(null!=B){var da=this.style["symbol"+A+"Align"],I=this.style["symbol"+A+"VerticalAlign"],va=this.style["symbol"+A+"Width"],na=this.style["symbol"+A+"Height"],Ya=this.style["symbol"+A+"Spacing"]||0,jb=this.style["symbol"+A+"VSpacing"]|| +Ya,cb=this.style["symbol"+A+"ArcSpacing"];null!=cb&&(cb*=this.getArcSize(n+this.strokewidth,t+this.strokewidth),Ya+=cb,jb+=cb);cb=l;var Ga=v;cb=da==mxConstants.ALIGN_CENTER?cb+(n-va)/2:da==mxConstants.ALIGN_RIGHT?cb+(n-va-Ya):cb+Ya;Ga=I==mxConstants.ALIGN_MIDDLE?Ga+(t-na)/2:I==mxConstants.ALIGN_BOTTOM?Ga+(t-na-jb):Ga+jb;c.save();da=new B;da.style=this.style;B.prototype.paintVertexShape.call(da,c,cb,Ga,va,na);c.restore()}A++}while(null!=B)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)}; +mxCellRenderer.registerShape("ext",X);mxUtils.extend(ja,mxCylinder);ja.prototype.redrawPath=function(c,l,v,n,t,A){A?(c.moveTo(0,0),c.lineTo(n/2,t/2),c.lineTo(n,0),c.end()):(c.moveTo(0,0),c.lineTo(n,0),c.lineTo(n,t),c.lineTo(0,t),c.close())};mxCellRenderer.registerShape("message",ja);mxUtils.extend(ca,mxShape);ca.prototype.paintBackground=function(c,l,v,n,t){c.translate(l,v);c.ellipse(n/4,0,n/2,t/4);c.fillAndStroke();c.begin();c.moveTo(n/2,t/4);c.lineTo(n/2,2*t/3);c.moveTo(n/2,t/3);c.lineTo(0,t/3); +c.moveTo(n/2,t/3);c.lineTo(n,t/3);c.moveTo(n/2,2*t/3);c.lineTo(0,t);c.moveTo(n/2,2*t/3);c.lineTo(n,t);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",ca);mxUtils.extend(ka,mxShape);ka.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};ka.prototype.paintBackground=function(c,l,v,n,t){c.translate(l,v);c.begin();c.moveTo(0,t/4);c.lineTo(0,3*t/4);c.end();c.stroke();c.begin();c.moveTo(0,t/2);c.lineTo(n/6,t/2);c.end();c.stroke();c.ellipse(n/6,0,5*n/6,t);c.fillAndStroke()}; +mxCellRenderer.registerShape("umlBoundary",ka);mxUtils.extend(q,mxEllipse);q.prototype.paintVertexShape=function(c,l,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/8,v+t);c.lineTo(l+7*n/8,v+t);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",q);mxUtils.extend(E,mxShape);E.prototype.paintVertexShape=function(c,l,v,n,t){c.translate(l,v);c.begin();c.moveTo(n,0);c.lineTo(0,t);c.moveTo(0,0);c.lineTo(n,t);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy", +E);mxUtils.extend(Q,mxShape);Q.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};Q.prototype.paintBackground=function(c,l,v,n,t){c.translate(l,v);c.begin();c.moveTo(3*n/8,t/8*1.1);c.lineTo(5*n/8,0);c.end();c.stroke();c.ellipse(0,t/8,n,7*t/8);c.fillAndStroke()};Q.prototype.paintForeground=function(c,l,v,n,t){c.begin();c.moveTo(3*n/8,t/8*1.1);c.lineTo(5*n/8,t/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",Q);mxUtils.extend(Y,mxRectangleShape); +Y.prototype.size=40;Y.prototype.isHtmlAllowed=function(){return!1};Y.prototype.getLabelBounds=function(c){var l=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,l)};Y.prototype.paintBackground=function(c,l,v,n,t){var A=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"participant");null==B||null==this.state?mxRectangleShape.prototype.paintBackground.call(this, +c,l,v,n,A):(B=this.state.view.graph.cellRenderer.getShape(B),null!=B&&B!=Y&&(B=new B,B.apply(this.state),c.save(),B.paintVertexShape(c,l,v,n,A),c.restore()));A<t&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(l+n/2,v+A),c.lineTo(l+n/2,v+t),c.end(),c.stroke())};Y.prototype.paintForeground=function(c,l,v,n,t){var A=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,l,v,n,Math.min(t, +A))};mxCellRenderer.registerShape("umlLifeline",Y);mxUtils.extend(R,mxShape);R.prototype.width=60;R.prototype.height=30;R.prototype.corner=10;R.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};R.prototype.paintBackground=function(c,l,v,n,t){var A=this.corner,B=Math.min(n,Math.max(A,parseFloat(mxUtils.getValue(this.style, +"width",this.width)))),da=Math.min(t,Math.max(1.5*A,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),I=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);I!=mxConstants.NONE&&(c.setFillColor(I),c.rect(l,v,n,t),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,l,v,n,t),c.setGradient(this.fill,this.gradient,l,v,n,t,this.gradientDirection)):c.setFillColor(this.fill);c.begin(); +c.moveTo(l,v);c.lineTo(l+B,v);c.lineTo(l+B,v+Math.max(0,da-1.5*A));c.lineTo(l+Math.max(0,B-A),v+da);c.lineTo(l,v+da);c.close();c.fillAndStroke();c.begin();c.moveTo(l+B,v);c.lineTo(l+n,v);c.lineTo(l+n,v+t);c.lineTo(l,v+t);c.lineTo(l,v+da);c.stroke()};mxCellRenderer.registerShape("umlFrame",R);mxPerimeter.CenterPerimeter=function(c,l,v,n){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c, +l,v,n){n=Y.prototype.size;null!=l&&(n=mxUtils.getValue(l.style,"size",n)*l.view.scale);l=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*l.view.scale/2-1;v.x<c.getCenterX()&&(l=-1*(l+1));return new mxPoint(c.getCenterX()+l,Math.min(c.y+c.height,Math.max(c.y+n,v.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,l,v,n){n=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter", mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(c,l,v,n){n=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*l.view.scale/2-1;null!=l.style.backboneSize&&(n+=parseFloat(l.style.backboneSize)*l.view.scale/2-1);if("south"==l.style[mxConstants.STYLE_DIRECTION]||"north"==l.style[mxConstants.STYLE_DIRECTION])return v.x<c.getCenterX()&&(n=-1*(n+1)),new mxPoint(c.getCenterX()+n,Math.min(c.y+c.height,Math.max(c.y,v.y)));v.y<c.getCenterY()&&(n=-1*(n+1));return new mxPoint(Math.min(c.x+ -c.width,Math.max(c.x,v.x)),c.getCenterY()+n)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,l,v,n){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(l.style,"size",da.prototype.size))*l.view.scale))),l.style),l,v,n)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c, -l,v,n){var t="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=t?V.prototype.fixedSize:V.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));t&&(A*=l.view.scale);var B=c.x,ea=c.y,I=c.width,va=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),ea=[new mxPoint(B,ea),new mxPoint(B+I,ea+t),new mxPoint(B+ -I,ea+va),new mxPoint(B,ea+va-t),new mxPoint(B,ea)]):(t=t?Math.max(0,Math.min(.5*I,A)):I*Math.max(0,Math.min(1,A)),ea=[new mxPoint(B+t,ea),new mxPoint(B+I,ea),new mxPoint(B+I-t,ea+va),new mxPoint(B,ea+va),new mxPoint(B+t,ea)]);va=c.getCenterX();c=c.getCenterY();c=new mxPoint(va,c);n&&(v.x<B||v.x>B+I?c.y=v.y:c.x=v.x);return mxUtils.getPerimeterPoint(ea,c,v)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,l,v,n){var t="0"!= -mxUtils.getValue(l.style,"fixedSize","0"),A=t?U.prototype.fixedSize:U.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));t&&(A*=l.view.scale);var B=c.x,ea=c.y,I=c.width,va=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(t=t?Math.max(0,Math.min(.5*I,A)):I*Math.max(0,Math.min(1,A)),ea=[new mxPoint(B+t,ea),new mxPoint(B+I-t,ea),new mxPoint(B+I,ea+va),new mxPoint(B,ea+va),new mxPoint(B+ -t,ea)]):l==mxConstants.DIRECTION_WEST?(t=t?Math.max(0,Math.min(I,A)):I*Math.max(0,Math.min(1,A)),ea=[new mxPoint(B,ea),new mxPoint(B+I,ea),new mxPoint(B+I-t,ea+va),new mxPoint(B+t,ea+va),new mxPoint(B,ea)]):l==mxConstants.DIRECTION_NORTH?(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),ea=[new mxPoint(B,ea+t),new mxPoint(B+I,ea),new mxPoint(B+I,ea+va),new mxPoint(B,ea+va-t),new mxPoint(B,ea+t)]):(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),ea=[new mxPoint(B,ea),new mxPoint(B+ -I,ea+t),new mxPoint(B+I,ea+va-t),new mxPoint(B,ea+va),new mxPoint(B,ea)]);va=c.getCenterX();c=c.getCenterY();c=new mxPoint(va,c);n&&(v.x<B||v.x>B+I?c.y=v.y:c.x=v.x);return mxUtils.getPerimeterPoint(ea,c,v)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,v,n){var t="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=t?ia.prototype.fixedSize:ia.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));t&&(A*=l.view.scale);var B= -c.x,ea=c.y,I=c.width,va=c.height,na=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(t=t?Math.max(0,Math.min(I,A)):I*Math.max(0,Math.min(1,A)),ea=[new mxPoint(B,ea),new mxPoint(B+I-t,ea),new mxPoint(B+I,c),new mxPoint(B+I-t,ea+va),new mxPoint(B,ea+va),new mxPoint(B+t,c),new mxPoint(B,ea)]):l==mxConstants.DIRECTION_WEST?(t=t?Math.max(0,Math.min(I,A)):I*Math.max(0,Math.min(1, -A)),ea=[new mxPoint(B+t,ea),new mxPoint(B+I,ea),new mxPoint(B+I-t,c),new mxPoint(B+I,ea+va),new mxPoint(B+t,ea+va),new mxPoint(B,c),new mxPoint(B+t,ea)]):l==mxConstants.DIRECTION_NORTH?(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),ea=[new mxPoint(B,ea+t),new mxPoint(na,ea),new mxPoint(B+I,ea+t),new mxPoint(B+I,ea+va),new mxPoint(na,ea+va-t),new mxPoint(B,ea+va),new mxPoint(B,ea+t)]):(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),ea=[new mxPoint(B,ea),new mxPoint(na,ea+ -t),new mxPoint(B+I,ea),new mxPoint(B+I,ea+va-t),new mxPoint(na,ea+va),new mxPoint(B,ea+va-t),new mxPoint(B,ea)]);na=new mxPoint(na,c);n&&(v.x<B||v.x>B+I?na.y=v.y:na.x=v.x);return mxUtils.getPerimeterPoint(ea,na,v)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,l,v,n){var t="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=t?L.prototype.fixedSize:L.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));t&&(A*=l.view.scale);var B= -c.x,ea=c.y,I=c.width,va=c.height,na=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),ea=[new mxPoint(na,ea),new mxPoint(B+I,ea+t),new mxPoint(B+I,ea+va-t),new mxPoint(na,ea+va),new mxPoint(B,ea+va-t),new mxPoint(B,ea+t),new mxPoint(na,ea)]):(t=t?Math.max(0,Math.min(I,A)):I*Math.max(0, -Math.min(1,A)),ea=[new mxPoint(B+t,ea),new mxPoint(B+I-t,ea),new mxPoint(B+I,c),new mxPoint(B+I-t,ea+va),new mxPoint(B+t,ea+va),new mxPoint(B,c),new mxPoint(B+t,ea)]);na=new mxPoint(na,c);n&&(v.x<B||v.x>B+I?na.y=v.y:na.x=v.x);return mxUtils.getPerimeterPoint(ea,na,v)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ba,mxShape);ba.prototype.size=10;ba.prototype.paintBackground=function(c,l,v,n,t){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size)); -c.translate(l,v);c.ellipse((n-A)/2,0,A,A);c.fillAndStroke();c.begin();c.moveTo(n/2,A);c.lineTo(n/2,t);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",ba);mxUtils.extend(ha,mxShape);ha.prototype.size=10;ha.prototype.inset=2;ha.prototype.paintBackground=function(c,l,v,n,t){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size)),B=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,v);c.begin();c.moveTo(n/2,A+B);c.lineTo(n/2,t);c.end();c.stroke(); -c.begin();c.moveTo((n-A)/2-B,A/2);c.quadTo((n-A)/2-B,A+B,n/2,A+B);c.quadTo((n+A)/2+B,A+B,(n+A)/2+B,A/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",ha);mxUtils.extend(ra,mxShape);ra.prototype.paintBackground=function(c,l,v,n,t){c.translate(l,v);c.begin();c.moveTo(0,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,0,t);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",ra);mxUtils.extend(ta,mxShape);ta.prototype.inset=2;ta.prototype.paintBackground=function(c,l,v,n,t){var A=parseFloat(mxUtils.getValue(this.style, -"inset",this.inset))+this.strokewidth;c.translate(l,v);c.ellipse(0,A,n-2*A,t-2*A);c.fillAndStroke();c.begin();c.moveTo(n/2,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,n/2,t);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",ta);mxUtils.extend(ma,mxCylinder);ma.prototype.jettyWidth=20;ma.prototype.jettyHeight=10;ma.prototype.redrawPath=function(c,l,v,n,t,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight", -this.jettyHeight));v=B/2;B=v+B/2;var ea=Math.min(l,t-l),I=Math.min(ea+2*l,t-l);A?(c.moveTo(v,ea),c.lineTo(B,ea),c.lineTo(B,ea+l),c.lineTo(v,ea+l),c.moveTo(v,I),c.lineTo(B,I),c.lineTo(B,I+l),c.lineTo(v,I+l)):(c.moveTo(v,0),c.lineTo(n,0),c.lineTo(n,t),c.lineTo(v,t),c.lineTo(v,I+l),c.lineTo(0,I+l),c.lineTo(0,I),c.lineTo(v,I),c.lineTo(v,ea+l),c.lineTo(0,ea+l),c.lineTo(0,ea),c.lineTo(v,ea),c.close());c.end()};mxCellRenderer.registerShape("module",ma);mxUtils.extend(pa,mxCylinder);pa.prototype.jettyWidth= -32;pa.prototype.jettyHeight=12;pa.prototype.redrawPath=function(c,l,v,n,t,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));v=B/2;B=v+B/2;var ea=.3*t-l/2,I=.7*t-l/2;A?(c.moveTo(v,ea),c.lineTo(B,ea),c.lineTo(B,ea+l),c.lineTo(v,ea+l),c.moveTo(v,I),c.lineTo(B,I),c.lineTo(B,I+l),c.lineTo(v,I+l)):(c.moveTo(v,0),c.lineTo(n,0),c.lineTo(n,t),c.lineTo(v,t),c.lineTo(v,I+l),c.lineTo(0,I+l),c.lineTo(0,I),c.lineTo(v, -I),c.lineTo(v,ea+l),c.lineTo(0,ea+l),c.lineTo(0,ea),c.lineTo(v,ea),c.close());c.end()};mxCellRenderer.registerShape("component",pa);mxUtils.extend(za,mxRectangleShape);za.prototype.paintForeground=function(c,l,v,n,t){var A=n/2,B=t/2,ea=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(l+A,v),new mxPoint(l+n,v+B),new mxPoint(l+A,v+t),new mxPoint(l,v+B)],this.isRounded,ea,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this, -arguments)};mxCellRenderer.registerShape("associativeEntity",za);mxUtils.extend(Ba,mxDoubleEllipse);Ba.prototype.outerStroke=!0;Ba.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.min(4,Math.min(n/5,t/5));0<n&&0<t&&(c.ellipse(l+A,v+A,n-2*A,t-2*A),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(l,v,n,t),c.stroke())};mxCellRenderer.registerShape("endState",Ba);mxUtils.extend(Ia,Ba);Ia.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Ia);mxUtils.extend(Aa,mxArrowConnector); -Aa.prototype.defaultWidth=4;Aa.prototype.isOpenEnded=function(){return!0};Aa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};Aa.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",Aa);mxUtils.extend(Ka,mxArrowConnector);Ka.prototype.defaultWidth=10;Ka.prototype.defaultArrowWidth=20;Ka.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style, -"startWidth",this.defaultArrowWidth)};Ka.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ka.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Ka);mxUtils.extend(Da,mxActor);Da.prototype.size=30;Da.prototype.isRoundable=function(){return!0};Da.prototype.redrawPath=function(c,l,v,n,t){l=Math.min(t,parseFloat(mxUtils.getValue(this.style, -"size",this.size)));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,t),new mxPoint(0,l),new mxPoint(n,0),new mxPoint(n,t)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("manualInput",Da);mxUtils.extend(Ra,mxRectangleShape);Ra.prototype.dx=20;Ra.prototype.dy=20;Ra.prototype.isHtmlAllowed=function(){return!1};Ra.prototype.paintForeground=function(c,l,v,n,t){mxRectangleShape.prototype.paintForeground.apply(this,arguments); -var A=0;if(this.isRounded){var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;A=Math.max(A,Math.min(n*B,t*B))}B=Math.max(A,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(A,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(l,v+A);c.lineTo(l+n,v+A);c.end();c.stroke();c.begin();c.moveTo(l+B,v);c.lineTo(l+B,v+t);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Ra); -mxUtils.extend(Qa,mxActor);Qa.prototype.dx=20;Qa.prototype.dy=20;Qa.prototype.redrawPath=function(c,l,v,n,t){l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));v=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,v),new mxPoint(l,v), -new mxPoint(l,t),new mxPoint(0,t)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",Qa);mxUtils.extend(Ta,mxActor);Ta.prototype.redrawPath=function(c,l,v,n,t){c.moveTo(0,0);c.lineTo(0,t);c.end();c.moveTo(n,0);c.lineTo(n,t);c.end();c.moveTo(0,t/2);c.lineTo(n,t/2);c.end()};mxCellRenderer.registerShape("crossbar",Ta);mxUtils.extend(Za,mxActor);Za.prototype.dx=20;Za.prototype.dy=20;Za.prototype.redrawPath=function(c,l,v,n,t){l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style, -"dx",this.dx))));v=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,v),new mxPoint((n+l)/2,v),new mxPoint((n+l)/2,t),new mxPoint((n-l)/2,t),new mxPoint((n-l)/2,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("tee",Za);mxUtils.extend(Pa, -mxActor);Pa.prototype.arrowWidth=.3;Pa.prototype.arrowSize=.2;Pa.prototype.redrawPath=function(c,l,v,n,t){var A=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));v=(t-A)/2;A=v+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(n-l,v),new mxPoint(n-l,0),new mxPoint(n,t/2),new mxPoint(n- -l,t),new mxPoint(n-l,A),new mxPoint(0,A)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("singleArrow",Pa);mxUtils.extend(y,mxActor);y.prototype.redrawPath=function(c,l,v,n,t){var A=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Pa.prototype.arrowWidth))));l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Pa.prototype.arrowSize))));v=(t-A)/2;A=v+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/ -2;this.addPoints(c,[new mxPoint(0,t/2),new mxPoint(l,0),new mxPoint(l,v),new mxPoint(n-l,v),new mxPoint(n-l,0),new mxPoint(n,t/2),new mxPoint(n-l,t),new mxPoint(n-l,A),new mxPoint(l,A),new mxPoint(l,t)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",y);mxUtils.extend(M,mxActor);M.prototype.size=.1;M.prototype.fixedSize=20;M.prototype.redrawPath=function(c,l,v,n,t){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style, -"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(l,0);c.lineTo(n,0);c.quadTo(n-2*l,t/2,n,t);c.lineTo(l,t);c.quadTo(l-2*l,t/2,l,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",M);mxUtils.extend(N,mxActor);N.prototype.redrawPath=function(c,l,v,n,t){c.moveTo(0,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,0,t);c.close();c.end()};mxCellRenderer.registerShape("or",N);mxUtils.extend(S,mxActor);S.prototype.redrawPath=function(c, -l,v,n,t){c.moveTo(0,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,0,t);c.quadTo(n/2,t/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",S);mxUtils.extend(X,mxActor);X.prototype.size=20;X.prototype.isRoundable=function(){return!0};X.prototype.redrawPath=function(c,l,v,n,t){l=Math.min(n/2,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(n-l,0),new mxPoint(n, -.8*l),new mxPoint(n,t),new mxPoint(0,t),new mxPoint(0,.8*l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("loopLimit",X);mxUtils.extend(fa,mxActor);fa.prototype.size=.375;fa.prototype.isRoundable=function(){return!0};fa.prototype.redrawPath=function(c,l,v,n,t){l=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n, -t-l),new mxPoint(n/2,t),new mxPoint(0,t-l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",fa);mxUtils.extend(la,mxEllipse);la.prototype.paintVertexShape=function(c,l,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/2,v+t);c.lineTo(l+n,v+t);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",la);mxUtils.extend(xa,mxEllipse);xa.prototype.paintVertexShape=function(c,l,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this, -arguments);c.setShadow(!1);c.begin();c.moveTo(l,v+t/2);c.lineTo(l+n,v+t/2);c.end();c.stroke();c.begin();c.moveTo(l+n/2,v);c.lineTo(l+n/2,v+t);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",xa);mxUtils.extend(sa,mxEllipse);sa.prototype.paintVertexShape=function(c,l,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l+.145*n,v+.145*t);c.lineTo(l+.855*n,v+.855*t);c.end();c.stroke();c.begin();c.moveTo(l+.855*n,v+.145*t);c.lineTo(l+.145*n, -v+.855*t);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",sa);mxUtils.extend(ya,mxRhombus);ya.prototype.paintVertexShape=function(c,l,v,n,t){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,v+t/2);c.lineTo(l+n,v+t/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ya);mxUtils.extend(Fa,mxEllipse);Fa.prototype.paintVertexShape=function(c,l,v,n,t){c.begin();c.moveTo(l,v);c.lineTo(l+n,v);c.lineTo(l+n/2,v+t/2);c.close();c.fillAndStroke(); -c.begin();c.moveTo(l,v+t);c.lineTo(l+n,v+t);c.lineTo(l+n/2,v+t/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",Fa);mxUtils.extend(wa,mxEllipse);wa.prototype.paintVertexShape=function(c,l,v,n,t){var A=c.state.strokeWidth/2,B=10+2*A,ea=v+t-B/2;c.begin();c.moveTo(l,v);c.lineTo(l,v+t);c.moveTo(l+A,ea);c.lineTo(l+A+B,ea-B/2);c.moveTo(l+A,ea);c.lineTo(l+A+B,ea+B/2);c.moveTo(l+A,ea);c.lineTo(l+n-A,ea);c.moveTo(l+n,v);c.lineTo(l+n,v+t);c.moveTo(l+n-A,ea);c.lineTo(l+n-B-A,ea-B/2);c.moveTo(l+ -n-A,ea);c.lineTo(l+n-B-A,ea+B/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",wa);mxUtils.extend(ua,mxEllipse);ua.prototype.drawHidden=!0;ua.prototype.paintVertexShape=function(c,l,v,n,t){this.outline||c.setStrokeColor(null);if(null!=this.style){var A=c.pointerEvents,B=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||B||(c.pointerEvents=!1);var ea="1"==mxUtils.getValue(this.style,"top","1"),I="1"==mxUtils.getValue(this.style, -"left","1"),va="1"==mxUtils.getValue(this.style,"right","1"),na="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||B||this.outline||ea||va||na||I?(c.rect(l,v,n,t),c.fill(),c.pointerEvents=A,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,v),this.outline||ea?c.lineTo(l+n,v):c.moveTo(l+n,v),this.outline||va?c.lineTo(l+n,v+t):c.moveTo(l+n,v+t),this.outline||na?c.lineTo(l,v+t):c.moveTo(l,v+t),(this.outline||I)&&c.lineTo(l,v),c.end(),c.stroke(),c.setLineCap("flat")): -c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",ua);mxUtils.extend(La,mxEllipse);La.prototype.paintVertexShape=function(c,l,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(l+n/2,v),c.lineTo(l+n/2,v+t)):(c.moveTo(l,v+t/2),c.lineTo(l+n,v+t/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",La);mxUtils.extend(Oa,mxActor);Oa.prototype.redrawPath=function(c, -l,v,n,t){l=Math.min(n,t/2);c.moveTo(0,0);c.lineTo(n-l,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,n-l,t);c.lineTo(0,t);c.close();c.end()};mxCellRenderer.registerShape("delay",Oa);mxUtils.extend(Ca,mxActor);Ca.prototype.size=.2;Ca.prototype.redrawPath=function(c,l,v,n,t){l=Math.min(t,n);var A=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(t-A)/2;v=l+A;var B=(n-A)/2;A=B+A;c.moveTo(0,l);c.lineTo(B,l);c.lineTo(B,0);c.lineTo(A,0);c.lineTo(A,l);c.lineTo(n,l);c.lineTo(n,v); -c.lineTo(A,v);c.lineTo(A,t);c.lineTo(B,t);c.lineTo(B,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("cross",Ca);mxUtils.extend(Ma,mxActor);Ma.prototype.size=.25;Ma.prototype.redrawPath=function(c,l,v,n,t){l=Math.min(n,t/2);v=Math.min(n-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*n);c.moveTo(0,t/2);c.lineTo(v,0);c.lineTo(n-l,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,n-l,t);c.lineTo(v,t);c.close();c.end()};mxCellRenderer.registerShape("display",Ma);mxUtils.extend(Ga, -mxActor);Ga.prototype.cst={RECT2:"mxgraph.basic.rect"};Ga.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float", +c.width,Math.max(c.x,v.x)),c.getCenterY()+n)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,l,v,n){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(l.style,"size",fa.prototype.size))*l.view.scale))),l.style),l,v,n)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c, +l,v,n){var t="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=t?W.prototype.fixedSize:W.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));t&&(A*=l.view.scale);var B=c.x,da=c.y,I=c.width,va=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),da=[new mxPoint(B,da),new mxPoint(B+I,da+t),new mxPoint(B+ +I,da+va),new mxPoint(B,da+va-t),new mxPoint(B,da)]):(t=t?Math.max(0,Math.min(.5*I,A)):I*Math.max(0,Math.min(1,A)),da=[new mxPoint(B+t,da),new mxPoint(B+I,da),new mxPoint(B+I-t,da+va),new mxPoint(B,da+va),new mxPoint(B+t,da)]);va=c.getCenterX();c=c.getCenterY();c=new mxPoint(va,c);n&&(v.x<B||v.x>B+I?c.y=v.y:c.x=v.x);return mxUtils.getPerimeterPoint(da,c,v)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,l,v,n){var t="0"!= +mxUtils.getValue(l.style,"fixedSize","0"),A=t?T.prototype.fixedSize:T.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));t&&(A*=l.view.scale);var B=c.x,da=c.y,I=c.width,va=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(t=t?Math.max(0,Math.min(.5*I,A)):I*Math.max(0,Math.min(1,A)),da=[new mxPoint(B+t,da),new mxPoint(B+I-t,da),new mxPoint(B+I,da+va),new mxPoint(B,da+va),new mxPoint(B+ +t,da)]):l==mxConstants.DIRECTION_WEST?(t=t?Math.max(0,Math.min(I,A)):I*Math.max(0,Math.min(1,A)),da=[new mxPoint(B,da),new mxPoint(B+I,da),new mxPoint(B+I-t,da+va),new mxPoint(B+t,da+va),new mxPoint(B,da)]):l==mxConstants.DIRECTION_NORTH?(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),da=[new mxPoint(B,da+t),new mxPoint(B+I,da),new mxPoint(B+I,da+va),new mxPoint(B,da+va-t),new mxPoint(B,da+t)]):(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),da=[new mxPoint(B,da),new mxPoint(B+ +I,da+t),new mxPoint(B+I,da+va-t),new mxPoint(B,da+va),new mxPoint(B,da)]);va=c.getCenterX();c=c.getCenterY();c=new mxPoint(va,c);n&&(v.x<B||v.x>B+I?c.y=v.y:c.x=v.x);return mxUtils.getPerimeterPoint(da,c,v)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,v,n){var t="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=t?ia.prototype.fixedSize:ia.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));t&&(A*=l.view.scale);var B= +c.x,da=c.y,I=c.width,va=c.height,na=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(t=t?Math.max(0,Math.min(I,A)):I*Math.max(0,Math.min(1,A)),da=[new mxPoint(B,da),new mxPoint(B+I-t,da),new mxPoint(B+I,c),new mxPoint(B+I-t,da+va),new mxPoint(B,da+va),new mxPoint(B+t,c),new mxPoint(B,da)]):l==mxConstants.DIRECTION_WEST?(t=t?Math.max(0,Math.min(I,A)):I*Math.max(0,Math.min(1, +A)),da=[new mxPoint(B+t,da),new mxPoint(B+I,da),new mxPoint(B+I-t,c),new mxPoint(B+I,da+va),new mxPoint(B+t,da+va),new mxPoint(B,c),new mxPoint(B+t,da)]):l==mxConstants.DIRECTION_NORTH?(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),da=[new mxPoint(B,da+t),new mxPoint(na,da),new mxPoint(B+I,da+t),new mxPoint(B+I,da+va),new mxPoint(na,da+va-t),new mxPoint(B,da+va),new mxPoint(B,da+t)]):(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),da=[new mxPoint(B,da),new mxPoint(na,da+ +t),new mxPoint(B+I,da),new mxPoint(B+I,da+va-t),new mxPoint(na,da+va),new mxPoint(B,da+va-t),new mxPoint(B,da)]);na=new mxPoint(na,c);n&&(v.x<B||v.x>B+I?na.y=v.y:na.x=v.x);return mxUtils.getPerimeterPoint(da,na,v)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,l,v,n){var t="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=t?M.prototype.fixedSize:M.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));t&&(A*=l.view.scale);var B= +c.x,da=c.y,I=c.width,va=c.height,na=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),da=[new mxPoint(na,da),new mxPoint(B+I,da+t),new mxPoint(B+I,da+va-t),new mxPoint(na,da+va),new mxPoint(B,da+va-t),new mxPoint(B,da+t),new mxPoint(na,da)]):(t=t?Math.max(0,Math.min(I,A)):I*Math.max(0, +Math.min(1,A)),da=[new mxPoint(B+t,da),new mxPoint(B+I-t,da),new mxPoint(B+I,c),new mxPoint(B+I-t,da+va),new mxPoint(B+t,da+va),new mxPoint(B,c),new mxPoint(B+t,da)]);na=new mxPoint(na,c);n&&(v.x<B||v.x>B+I?na.y=v.y:na.x=v.x);return mxUtils.getPerimeterPoint(da,na,v)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ba,mxShape);ba.prototype.size=10;ba.prototype.paintBackground=function(c,l,v,n,t){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size)); +c.translate(l,v);c.ellipse((n-A)/2,0,A,A);c.fillAndStroke();c.begin();c.moveTo(n/2,A);c.lineTo(n/2,t);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",ba);mxUtils.extend(ea,mxShape);ea.prototype.size=10;ea.prototype.inset=2;ea.prototype.paintBackground=function(c,l,v,n,t){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size)),B=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,v);c.begin();c.moveTo(n/2,A+B);c.lineTo(n/2,t);c.end();c.stroke(); +c.begin();c.moveTo((n-A)/2-B,A/2);c.quadTo((n-A)/2-B,A+B,n/2,A+B);c.quadTo((n+A)/2+B,A+B,(n+A)/2+B,A/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",ea);mxUtils.extend(ra,mxShape);ra.prototype.paintBackground=function(c,l,v,n,t){c.translate(l,v);c.begin();c.moveTo(0,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,0,t);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",ra);mxUtils.extend(ta,mxShape);ta.prototype.inset=2;ta.prototype.paintBackground=function(c,l,v,n,t){var A=parseFloat(mxUtils.getValue(this.style, +"inset",this.inset))+this.strokewidth;c.translate(l,v);c.ellipse(0,A,n-2*A,t-2*A);c.fillAndStroke();c.begin();c.moveTo(n/2,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,n/2,t);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",ta);mxUtils.extend(la,mxCylinder);la.prototype.jettyWidth=20;la.prototype.jettyHeight=10;la.prototype.redrawPath=function(c,l,v,n,t,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight", +this.jettyHeight));v=B/2;B=v+B/2;var da=Math.min(l,t-l),I=Math.min(da+2*l,t-l);A?(c.moveTo(v,da),c.lineTo(B,da),c.lineTo(B,da+l),c.lineTo(v,da+l),c.moveTo(v,I),c.lineTo(B,I),c.lineTo(B,I+l),c.lineTo(v,I+l)):(c.moveTo(v,0),c.lineTo(n,0),c.lineTo(n,t),c.lineTo(v,t),c.lineTo(v,I+l),c.lineTo(0,I+l),c.lineTo(0,I),c.lineTo(v,I),c.lineTo(v,da+l),c.lineTo(0,da+l),c.lineTo(0,da),c.lineTo(v,da),c.close());c.end()};mxCellRenderer.registerShape("module",la);mxUtils.extend(pa,mxCylinder);pa.prototype.jettyWidth= +32;pa.prototype.jettyHeight=12;pa.prototype.redrawPath=function(c,l,v,n,t,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));v=B/2;B=v+B/2;var da=.3*t-l/2,I=.7*t-l/2;A?(c.moveTo(v,da),c.lineTo(B,da),c.lineTo(B,da+l),c.lineTo(v,da+l),c.moveTo(v,I),c.lineTo(B,I),c.lineTo(B,I+l),c.lineTo(v,I+l)):(c.moveTo(v,0),c.lineTo(n,0),c.lineTo(n,t),c.lineTo(v,t),c.lineTo(v,I+l),c.lineTo(0,I+l),c.lineTo(0,I),c.lineTo(v, +I),c.lineTo(v,da+l),c.lineTo(0,da+l),c.lineTo(0,da),c.lineTo(v,da),c.close());c.end()};mxCellRenderer.registerShape("component",pa);mxUtils.extend(xa,mxRectangleShape);xa.prototype.paintForeground=function(c,l,v,n,t){var A=n/2,B=t/2,da=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(l+A,v),new mxPoint(l+n,v+B),new mxPoint(l+A,v+t),new mxPoint(l,v+B)],this.isRounded,da,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this, +arguments)};mxCellRenderer.registerShape("associativeEntity",xa);mxUtils.extend(Ca,mxDoubleEllipse);Ca.prototype.outerStroke=!0;Ca.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.min(4,Math.min(n/5,t/5));0<n&&0<t&&(c.ellipse(l+A,v+A,n-2*A,t-2*A),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(l,v,n,t),c.stroke())};mxCellRenderer.registerShape("endState",Ca);mxUtils.extend(Ia,Ca);Ia.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Ia);mxUtils.extend(Aa,mxArrowConnector); +Aa.prototype.defaultWidth=4;Aa.prototype.isOpenEnded=function(){return!0};Aa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};Aa.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",Aa);mxUtils.extend(La,mxArrowConnector);La.prototype.defaultWidth=10;La.prototype.defaultArrowWidth=20;La.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style, +"startWidth",this.defaultArrowWidth)};La.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};La.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",La);mxUtils.extend(Da,mxActor);Da.prototype.size=30;Da.prototype.isRoundable=function(){return!0};Da.prototype.redrawPath=function(c,l,v,n,t){l=Math.min(t,parseFloat(mxUtils.getValue(this.style, +"size",this.size)));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,t),new mxPoint(0,l),new mxPoint(n,0),new mxPoint(n,t)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("manualInput",Da);mxUtils.extend(Sa,mxRectangleShape);Sa.prototype.dx=20;Sa.prototype.dy=20;Sa.prototype.isHtmlAllowed=function(){return!1};Sa.prototype.paintForeground=function(c,l,v,n,t){mxRectangleShape.prototype.paintForeground.apply(this,arguments); +var A=0;if(this.isRounded){var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;A=Math.max(A,Math.min(n*B,t*B))}B=Math.max(A,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(A,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(l,v+A);c.lineTo(l+n,v+A);c.end();c.stroke();c.begin();c.moveTo(l+B,v);c.lineTo(l+B,v+t);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Sa); +mxUtils.extend(Ra,mxActor);Ra.prototype.dx=20;Ra.prototype.dy=20;Ra.prototype.redrawPath=function(c,l,v,n,t){l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));v=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,v),new mxPoint(l,v), +new mxPoint(l,t),new mxPoint(0,t)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",Ra);mxUtils.extend(Ta,mxActor);Ta.prototype.redrawPath=function(c,l,v,n,t){c.moveTo(0,0);c.lineTo(0,t);c.end();c.moveTo(n,0);c.lineTo(n,t);c.end();c.moveTo(0,t/2);c.lineTo(n,t/2);c.end()};mxCellRenderer.registerShape("crossbar",Ta);mxUtils.extend(Za,mxActor);Za.prototype.dx=20;Za.prototype.dy=20;Za.prototype.redrawPath=function(c,l,v,n,t){l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style, +"dx",this.dx))));v=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,v),new mxPoint((n+l)/2,v),new mxPoint((n+l)/2,t),new mxPoint((n-l)/2,t),new mxPoint((n-l)/2,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("tee",Za);mxUtils.extend(Na, +mxActor);Na.prototype.arrowWidth=.3;Na.prototype.arrowSize=.2;Na.prototype.redrawPath=function(c,l,v,n,t){var A=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));v=(t-A)/2;A=v+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(n-l,v),new mxPoint(n-l,0),new mxPoint(n,t/2),new mxPoint(n- +l,t),new mxPoint(n-l,A),new mxPoint(0,A)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("singleArrow",Na);mxUtils.extend(z,mxActor);z.prototype.redrawPath=function(c,l,v,n,t){var A=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Na.prototype.arrowWidth))));l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Na.prototype.arrowSize))));v=(t-A)/2;A=v+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/ +2;this.addPoints(c,[new mxPoint(0,t/2),new mxPoint(l,0),new mxPoint(l,v),new mxPoint(n-l,v),new mxPoint(n-l,0),new mxPoint(n,t/2),new mxPoint(n-l,t),new mxPoint(n-l,A),new mxPoint(l,A),new mxPoint(l,t)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",z);mxUtils.extend(L,mxActor);L.prototype.size=.1;L.prototype.fixedSize=20;L.prototype.redrawPath=function(c,l,v,n,t){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style, +"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(l,0);c.lineTo(n,0);c.quadTo(n-2*l,t/2,n,t);c.lineTo(l,t);c.quadTo(l-2*l,t/2,l,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",L);mxUtils.extend(O,mxActor);O.prototype.redrawPath=function(c,l,v,n,t){c.moveTo(0,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,0,t);c.close();c.end()};mxCellRenderer.registerShape("or",O);mxUtils.extend(V,mxActor);V.prototype.redrawPath=function(c, +l,v,n,t){c.moveTo(0,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,0,t);c.quadTo(n/2,t/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",V);mxUtils.extend(U,mxActor);U.prototype.size=20;U.prototype.isRoundable=function(){return!0};U.prototype.redrawPath=function(c,l,v,n,t){l=Math.min(n/2,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(n-l,0),new mxPoint(n, +.8*l),new mxPoint(n,t),new mxPoint(0,t),new mxPoint(0,.8*l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("loopLimit",U);mxUtils.extend(ha,mxActor);ha.prototype.size=.375;ha.prototype.isRoundable=function(){return!0};ha.prototype.redrawPath=function(c,l,v,n,t){l=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n, +t-l),new mxPoint(n/2,t),new mxPoint(0,t-l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",ha);mxUtils.extend(ma,mxEllipse);ma.prototype.paintVertexShape=function(c,l,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/2,v+t);c.lineTo(l+n,v+t);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",ma);mxUtils.extend(wa,mxEllipse);wa.prototype.paintVertexShape=function(c,l,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this, +arguments);c.setShadow(!1);c.begin();c.moveTo(l,v+t/2);c.lineTo(l+n,v+t/2);c.end();c.stroke();c.begin();c.moveTo(l+n/2,v);c.lineTo(l+n/2,v+t);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",wa);mxUtils.extend(sa,mxEllipse);sa.prototype.paintVertexShape=function(c,l,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l+.145*n,v+.145*t);c.lineTo(l+.855*n,v+.855*t);c.end();c.stroke();c.begin();c.moveTo(l+.855*n,v+.145*t);c.lineTo(l+.145*n, +v+.855*t);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",sa);mxUtils.extend(ya,mxRhombus);ya.prototype.paintVertexShape=function(c,l,v,n,t){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,v+t/2);c.lineTo(l+n,v+t/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ya);mxUtils.extend(Ha,mxEllipse);Ha.prototype.paintVertexShape=function(c,l,v,n,t){c.begin();c.moveTo(l,v);c.lineTo(l+n,v);c.lineTo(l+n/2,v+t/2);c.close();c.fillAndStroke(); +c.begin();c.moveTo(l,v+t);c.lineTo(l+n,v+t);c.lineTo(l+n/2,v+t/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",Ha);mxUtils.extend(Qa,mxEllipse);Qa.prototype.paintVertexShape=function(c,l,v,n,t){var A=c.state.strokeWidth/2,B=10+2*A,da=v+t-B/2;c.begin();c.moveTo(l,v);c.lineTo(l,v+t);c.moveTo(l+A,da);c.lineTo(l+A+B,da-B/2);c.moveTo(l+A,da);c.lineTo(l+A+B,da+B/2);c.moveTo(l+A,da);c.lineTo(l+n-A,da);c.moveTo(l+n,v);c.lineTo(l+n,v+t);c.moveTo(l+n-A,da);c.lineTo(l+n-B-A,da-B/2);c.moveTo(l+ +n-A,da);c.lineTo(l+n-B-A,da+B/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Qa);mxUtils.extend(ua,mxEllipse);ua.prototype.drawHidden=!0;ua.prototype.paintVertexShape=function(c,l,v,n,t){this.outline||c.setStrokeColor(null);if(null!=this.style){var A=c.pointerEvents,B=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||B||(c.pointerEvents=!1);var da="1"==mxUtils.getValue(this.style,"top","1"),I="1"==mxUtils.getValue(this.style, +"left","1"),va="1"==mxUtils.getValue(this.style,"right","1"),na="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||B||this.outline||da||va||na||I?(c.rect(l,v,n,t),c.fill(),c.pointerEvents=A,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,v),this.outline||da?c.lineTo(l+n,v):c.moveTo(l+n,v),this.outline||va?c.lineTo(l+n,v+t):c.moveTo(l+n,v+t),this.outline||na?c.lineTo(l,v+t):c.moveTo(l,v+t),(this.outline||I)&&c.lineTo(l,v),c.end(),c.stroke(),c.setLineCap("flat")): +c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",ua);mxUtils.extend(za,mxEllipse);za.prototype.paintVertexShape=function(c,l,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(l+n/2,v),c.lineTo(l+n/2,v+t)):(c.moveTo(l,v+t/2),c.lineTo(l+n,v+t/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",za);mxUtils.extend(Fa,mxActor);Fa.prototype.redrawPath=function(c, +l,v,n,t){l=Math.min(n,t/2);c.moveTo(0,0);c.lineTo(n-l,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,n-l,t);c.lineTo(0,t);c.close();c.end()};mxCellRenderer.registerShape("delay",Fa);mxUtils.extend(Ba,mxActor);Ba.prototype.size=.2;Ba.prototype.redrawPath=function(c,l,v,n,t){l=Math.min(t,n);var A=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(t-A)/2;v=l+A;var B=(n-A)/2;A=B+A;c.moveTo(0,l);c.lineTo(B,l);c.lineTo(B,0);c.lineTo(A,0);c.lineTo(A,l);c.lineTo(n,l);c.lineTo(n,v); +c.lineTo(A,v);c.lineTo(A,t);c.lineTo(B,t);c.lineTo(B,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("cross",Ba);mxUtils.extend(Ea,mxActor);Ea.prototype.size=.25;Ea.prototype.redrawPath=function(c,l,v,n,t){l=Math.min(n,t/2);v=Math.min(n-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*n);c.moveTo(0,t/2);c.lineTo(v,0);c.lineTo(n-l,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,n-l,t);c.lineTo(v,t);c.close();c.end()};mxCellRenderer.registerShape("display",Ea);mxUtils.extend(Oa, +mxActor);Oa.prototype.cst={RECT2:"mxgraph.basic.rect"};Oa.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float", defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",dispName:"Frame"}]},{name:"fillColor2",dispName:"Inside Fill Color",type:"color",defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"}, {val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"}, {val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square", -dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Ga.prototype.paintVertexShape=function(c,l,v,n,t){c.translate(l, -v);this.strictDrawShape(c,0,0,n,t)};Ga.prototype.strictDrawShape=function(c,l,v,n,t,A){var B=A&&A.rectStyle?A.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ea=A&&A.absoluteCornerSize?A.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),I=A&&A.size?A.size:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),va=A&&A.rectOutline?A.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),na=A&&A.indent? -A.indent:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Xa=A&&A.dashed?A.dashed:mxUtils.getValue(this.style,"dashed",!1),jb=A&&A.dashPattern?A.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),bb=A&&A.relIndent?A.relIndent:Math.max(0,Math.min(50,na)),Ea=A&&A.top?A.top:mxUtils.getValue(this.style,"top",!0),Na=A&&A.right?A.right:mxUtils.getValue(this.style,"right",!0),Ja=A&&A.bottom?A.bottom:mxUtils.getValue(this.style,"bottom",!0),Ha=A&&A.left?A.left: -mxUtils.getValue(this.style,"left",!0),Sa=A&&A.topLeftStyle?A.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Ua=A&&A.topRightStyle?A.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Va=A&&A.bottomRightStyle?A.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Wa=A&&A.bottomLeftStyle?A.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Fb=A&&A.fillColor?A.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff"); +dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Oa.prototype.paintVertexShape=function(c,l,v,n,t){c.translate(l, +v);this.strictDrawShape(c,0,0,n,t)};Oa.prototype.strictDrawShape=function(c,l,v,n,t,A){var B=A&&A.rectStyle?A.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),da=A&&A.absoluteCornerSize?A.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),I=A&&A.size?A.size:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),va=A&&A.rectOutline?A.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),na=A&&A.indent? +A.indent:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Ya=A&&A.dashed?A.dashed:mxUtils.getValue(this.style,"dashed",!1),jb=A&&A.dashPattern?A.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),cb=A&&A.relIndent?A.relIndent:Math.max(0,Math.min(50,na)),Ga=A&&A.top?A.top:mxUtils.getValue(this.style,"top",!0),Ma=A&&A.right?A.right:mxUtils.getValue(this.style,"right",!0),Ka=A&&A.bottom?A.bottom:mxUtils.getValue(this.style,"bottom",!0),Ja=A&&A.left?A.left: +mxUtils.getValue(this.style,"left",!0),Ua=A&&A.topLeftStyle?A.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Va=A&&A.topRightStyle?A.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Wa=A&&A.bottomRightStyle?A.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Xa=A&&A.bottomLeftStyle?A.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Fb=A&&A.fillColor?A.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff"); A&&A.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Gb=A&&A.strokeWidth?A.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),Db=A&&A.fillColor2?A.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Eb=A&&A.gradientColor2?A.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Hb=A&&A.gradientDirection2?A.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Ib=A&&A.opacity?A.opacity:mxUtils.getValue(this.style,"opacity","100"), -Jb=Math.max(0,Math.min(50,I));A=Ga.prototype;c.setDashed(Xa);jb&&""!=jb&&c.setDashPattern(jb);c.setStrokeWidth(Gb);I=Math.min(.5*t,.5*n,I);ea||(I=Jb*Math.min(n,t)/100);I=Math.min(I,.5*Math.min(n,t));ea||(na=Math.min(bb*Math.min(n,t)/100));na=Math.min(na,.5*Math.min(n,t)-I);(Ea||Na||Ja||Ha)&&"frame"!=va&&(c.begin(),Ea?A.moveNW(c,l,v,n,t,B,Sa,I,Ha):c.moveTo(0,0),Ea&&A.paintNW(c,l,v,n,t,B,Sa,I,Ha),A.paintTop(c,l,v,n,t,B,Ua,I,Na),Na&&A.paintNE(c,l,v,n,t,B,Ua,I,Ea),A.paintRight(c,l,v,n,t,B,Va,I,Ja),Ja&& -A.paintSE(c,l,v,n,t,B,Va,I,Na),A.paintBottom(c,l,v,n,t,B,Wa,I,Ha),Ha&&A.paintSW(c,l,v,n,t,B,Wa,I,Ja),A.paintLeft(c,l,v,n,t,B,Sa,I,Ea),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(Db),Xa=ea=Ib,"none"==Db&&(ea=0),"none"==Eb&&(Xa=0),c.setGradient(Db,Eb,0,0,n,t,Hb,ea,Xa),c.begin(),Ea?A.moveNWInner(c,l,v,n,t,B,Sa,I,na,Ea,Ha):c.moveTo(na,0),A.paintLeftInner(c,l,v,n,t,B,Wa,I,na,Ja,Ha),Ha&&Ja&&A.paintSWInner(c,l,v,n,t,B,Wa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Va,I,na,Na,Ja),Ja&&Na&&A.paintSEInner(c, -l,v,n,t,B,Va,I,na),A.paintRightInner(c,l,v,n,t,B,Ua,I,na,Ea,Na),Na&&Ea&&A.paintNEInner(c,l,v,n,t,B,Ua,I,na),A.paintTopInner(c,l,v,n,t,B,Sa,I,na,Ha,Ea),Ea&&Ha&&A.paintNWInner(c,l,v,n,t,B,Sa,I,na),c.fill(),"none"==Fb&&(c.begin(),A.paintFolds(c,l,v,n,t,B,Sa,Ua,Va,Wa,I,Ea,Na,Ja,Ha),c.stroke()));Ea||Na||Ja||!Ha?Ea||Na||!Ja||Ha?!Ea&&!Na&&Ja&&Ha?"frame"!=va?(c.begin(),A.moveSE(c,l,v,n,t,B,Va,I,Na),A.paintBottom(c,l,v,n,t,B,Wa,I,Ha),A.paintSW(c,l,v,n,t,B,Wa,I,Ja),A.paintLeft(c,l,v,n,t,B,Sa,I,Ea),"double"== -va&&(A.moveNWInner(c,l,v,n,t,B,Sa,I,na,Ea,Ha),A.paintLeftInner(c,l,v,n,t,B,Wa,I,na,Ja,Ha),A.paintSWInner(c,l,v,n,t,B,Wa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Va,I,na,Na,Ja)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,t,B,Va,I,Na),A.paintBottom(c,l,v,n,t,B,Wa,I,Ha),A.paintSW(c,l,v,n,t,B,Wa,I,Ja),A.paintLeft(c,l,v,n,t,B,Sa,I,Ea),A.lineNWInner(c,l,v,n,t,B,Sa,I,na,Ea,Ha),A.paintLeftInner(c,l,v,n,t,B,Wa,I,na,Ja,Ha),A.paintSWInner(c,l,v,n,t,B,Wa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Va,I,na,Na,Ja),c.close(), -c.fillAndStroke()):Ea||!Na||Ja||Ha?!Ea&&Na&&!Ja&&Ha?"frame"!=va?(c.begin(),A.moveSW(c,l,v,n,t,B,Sa,I,Ja),A.paintLeft(c,l,v,n,t,B,Sa,I,Ea),"double"==va&&(A.moveNWInner(c,l,v,n,t,B,Sa,I,na,Ea,Ha),A.paintLeftInner(c,l,v,n,t,B,Wa,I,na,Ja,Ha)),c.stroke(),c.begin(),A.moveNE(c,l,v,n,t,B,Ua,I,Ea),A.paintRight(c,l,v,n,t,B,Va,I,Ja),"double"==va&&(A.moveSEInner(c,l,v,n,t,B,Va,I,na,Ja),A.paintRightInner(c,l,v,n,t,B,Ua,I,na,Ea,Na)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,t,B,Sa,I,Ja),A.paintLeft(c,l,v,n,t,B,Sa, -I,Ea),A.lineNWInner(c,l,v,n,t,B,Sa,I,na,Ea,Ha),A.paintLeftInner(c,l,v,n,t,B,Wa,I,na,Ja,Ha),c.close(),c.fillAndStroke(),c.begin(),A.moveNE(c,l,v,n,t,B,Ua,I,Ea),A.paintRight(c,l,v,n,t,B,Va,I,Ja),A.lineSEInner(c,l,v,n,t,B,Va,I,na,Ja),A.paintRightInner(c,l,v,n,t,B,Ua,I,na,Ea,Na),c.close(),c.fillAndStroke()):!Ea&&Na&&Ja&&!Ha?"frame"!=va?(c.begin(),A.moveNE(c,l,v,n,t,B,Ua,I,Ea),A.paintRight(c,l,v,n,t,B,Va,I,Ja),A.paintSE(c,l,v,n,t,B,Va,I,Na),A.paintBottom(c,l,v,n,t,B,Wa,I,Ha),"double"==va&&(A.moveSWInner(c, -l,v,n,t,B,Wa,I,na,Ha),A.paintBottomInner(c,l,v,n,t,B,Va,I,na,Na,Ja),A.paintSEInner(c,l,v,n,t,B,Va,I,na),A.paintRightInner(c,l,v,n,t,B,Ua,I,na,Ea,Na)),c.stroke()):(c.begin(),A.moveNE(c,l,v,n,t,B,Ua,I,Ea),A.paintRight(c,l,v,n,t,B,Va,I,Ja),A.paintSE(c,l,v,n,t,B,Va,I,Na),A.paintBottom(c,l,v,n,t,B,Wa,I,Ha),A.lineSWInner(c,l,v,n,t,B,Wa,I,na,Ha),A.paintBottomInner(c,l,v,n,t,B,Va,I,na,Na,Ja),A.paintSEInner(c,l,v,n,t,B,Va,I,na),A.paintRightInner(c,l,v,n,t,B,Ua,I,na,Ea,Na),c.close(),c.fillAndStroke()):!Ea&& -Na&&Ja&&Ha?"frame"!=va?(c.begin(),A.moveNE(c,l,v,n,t,B,Ua,I,Ea),A.paintRight(c,l,v,n,t,B,Va,I,Ja),A.paintSE(c,l,v,n,t,B,Va,I,Na),A.paintBottom(c,l,v,n,t,B,Wa,I,Ha),A.paintSW(c,l,v,n,t,B,Wa,I,Ja),A.paintLeft(c,l,v,n,t,B,Sa,I,Ea),"double"==va&&(A.moveNWInner(c,l,v,n,t,B,Sa,I,na,Ea,Ha),A.paintLeftInner(c,l,v,n,t,B,Wa,I,na,Ja,Ha),A.paintSWInner(c,l,v,n,t,B,Wa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Va,I,na,Na,Ja),A.paintSEInner(c,l,v,n,t,B,Va,I,na),A.paintRightInner(c,l,v,n,t,B,Ua,I,na,Ea,Na)),c.stroke()): -(c.begin(),A.moveNE(c,l,v,n,t,B,Ua,I,Ea),A.paintRight(c,l,v,n,t,B,Va,I,Ja),A.paintSE(c,l,v,n,t,B,Va,I,Na),A.paintBottom(c,l,v,n,t,B,Wa,I,Ha),A.paintSW(c,l,v,n,t,B,Wa,I,Ja),A.paintLeft(c,l,v,n,t,B,Sa,I,Ea),A.lineNWInner(c,l,v,n,t,B,Sa,I,na,Ea,Ha),A.paintLeftInner(c,l,v,n,t,B,Wa,I,na,Ja,Ha),A.paintSWInner(c,l,v,n,t,B,Wa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Va,I,na,Na,Ja),A.paintSEInner(c,l,v,n,t,B,Va,I,na),A.paintRightInner(c,l,v,n,t,B,Ua,I,na,Ea,Na),c.close(),c.fillAndStroke()):!Ea||Na||Ja||Ha? -Ea&&!Na&&!Ja&&Ha?"frame"!=va?(c.begin(),A.moveSW(c,l,v,n,t,B,Wa,I,Ja),A.paintLeft(c,l,v,n,t,B,Sa,I,Ea),A.paintNW(c,l,v,n,t,B,Sa,I,Ha),A.paintTop(c,l,v,n,t,B,Ua,I,Na),"double"==va&&(A.moveNEInner(c,l,v,n,t,B,Ua,I,na,Na),A.paintTopInner(c,l,v,n,t,B,Sa,I,na,Ha,Ea),A.paintNWInner(c,l,v,n,t,B,Sa,I,na),A.paintLeftInner(c,l,v,n,t,B,Wa,I,na,Ja,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,t,B,Wa,I,Ja),A.paintLeft(c,l,v,n,t,B,Sa,I,Ea),A.paintNW(c,l,v,n,t,B,Sa,I,Ha),A.paintTop(c,l,v,n,t,B,Ua,I,Na),A.lineNEInner(c, -l,v,n,t,B,Ua,I,na,Na),A.paintTopInner(c,l,v,n,t,B,Sa,I,na,Ha,Ea),A.paintNWInner(c,l,v,n,t,B,Sa,I,na),A.paintLeftInner(c,l,v,n,t,B,Wa,I,na,Ja,Ha),c.close(),c.fillAndStroke()):Ea&&!Na&&Ja&&!Ha?"frame"!=va?(c.begin(),A.moveNW(c,l,v,n,t,B,Sa,I,Ha),A.paintTop(c,l,v,n,t,B,Ua,I,Na),"double"==va&&(A.moveNEInner(c,l,v,n,t,B,Ua,I,na,Na),A.paintTopInner(c,l,v,n,t,B,Sa,I,na,Ha,Ea)),c.stroke(),c.begin(),A.moveSE(c,l,v,n,t,B,Va,I,Na),A.paintBottom(c,l,v,n,t,B,Wa,I,Ha),"double"==va&&(A.moveSWInner(c,l,v,n,t,B,Wa, -I,na,Ha),A.paintBottomInner(c,l,v,n,t,B,Va,I,na,Na,Ja)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,t,B,Sa,I,Ha),A.paintTop(c,l,v,n,t,B,Ua,I,Na),A.lineNEInner(c,l,v,n,t,B,Ua,I,na,Na),A.paintTopInner(c,l,v,n,t,B,Sa,I,na,Ha,Ea),c.close(),c.fillAndStroke(),c.begin(),A.moveSE(c,l,v,n,t,B,Va,I,Na),A.paintBottom(c,l,v,n,t,B,Wa,I,Ha),A.lineSWInner(c,l,v,n,t,B,Wa,I,na,Ha),A.paintBottomInner(c,l,v,n,t,B,Va,I,na,Na,Ja),c.close(),c.fillAndStroke()):Ea&&!Na&&Ja&&Ha?"frame"!=va?(c.begin(),A.moveSE(c,l,v,n,t,B,Va, -I,Na),A.paintBottom(c,l,v,n,t,B,Wa,I,Ha),A.paintSW(c,l,v,n,t,B,Wa,I,Ja),A.paintLeft(c,l,v,n,t,B,Sa,I,Ea),A.paintNW(c,l,v,n,t,B,Sa,I,Ha),A.paintTop(c,l,v,n,t,B,Ua,I,Na),"double"==va&&(A.moveNEInner(c,l,v,n,t,B,Ua,I,na,Na),A.paintTopInner(c,l,v,n,t,B,Sa,I,na,Ha,Ea),A.paintNWInner(c,l,v,n,t,B,Sa,I,na),A.paintLeftInner(c,l,v,n,t,B,Wa,I,na,Ja,Ha),A.paintSWInner(c,l,v,n,t,B,Wa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Va,I,na,Na,Ja)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,t,B,Va,I,Na),A.paintBottom(c,l, -v,n,t,B,Wa,I,Ha),A.paintSW(c,l,v,n,t,B,Wa,I,Ja),A.paintLeft(c,l,v,n,t,B,Sa,I,Ea),A.paintNW(c,l,v,n,t,B,Sa,I,Ha),A.paintTop(c,l,v,n,t,B,Ua,I,Na),A.lineNEInner(c,l,v,n,t,B,Ua,I,na,Na),A.paintTopInner(c,l,v,n,t,B,Sa,I,na,Ha,Ea),A.paintNWInner(c,l,v,n,t,B,Sa,I,na),A.paintLeftInner(c,l,v,n,t,B,Wa,I,na,Ja,Ha),A.paintSWInner(c,l,v,n,t,B,Wa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Va,I,na,Na,Ja),c.close(),c.fillAndStroke()):Ea&&Na&&!Ja&&!Ha?"frame"!=va?(c.begin(),A.moveNW(c,l,v,n,t,B,Sa,I,Ha),A.paintTop(c, -l,v,n,t,B,Ua,I,Na),A.paintNE(c,l,v,n,t,B,Ua,I,Ea),A.paintRight(c,l,v,n,t,B,Va,I,Ja),"double"==va&&(A.moveSEInner(c,l,v,n,t,B,Va,I,na,Ja),A.paintRightInner(c,l,v,n,t,B,Ua,I,na,Ea,Na),A.paintNEInner(c,l,v,n,t,B,Ua,I,na),A.paintTopInner(c,l,v,n,t,B,Sa,I,na,Ha,Ea)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,t,B,Sa,I,Ha),A.paintTop(c,l,v,n,t,B,Ua,I,Na),A.paintNE(c,l,v,n,t,B,Ua,I,Ea),A.paintRight(c,l,v,n,t,B,Va,I,Ja),A.lineSEInner(c,l,v,n,t,B,Va,I,na,Ja),A.paintRightInner(c,l,v,n,t,B,Ua,I,na,Ea,Na),A.paintNEInner(c, -l,v,n,t,B,Ua,I,na),A.paintTopInner(c,l,v,n,t,B,Sa,I,na,Ha,Ea),c.close(),c.fillAndStroke()):Ea&&Na&&!Ja&&Ha?"frame"!=va?(c.begin(),A.moveSW(c,l,v,n,t,B,Wa,I,Ja),A.paintLeft(c,l,v,n,t,B,Sa,I,Ea),A.paintNW(c,l,v,n,t,B,Sa,I,Ha),A.paintTop(c,l,v,n,t,B,Ua,I,Na),A.paintNE(c,l,v,n,t,B,Ua,I,Ea),A.paintRight(c,l,v,n,t,B,Va,I,Ja),"double"==va&&(A.moveSEInner(c,l,v,n,t,B,Va,I,na,Ja),A.paintRightInner(c,l,v,n,t,B,Ua,I,na,Ea,Na),A.paintNEInner(c,l,v,n,t,B,Ua,I,na),A.paintTopInner(c,l,v,n,t,B,Sa,I,na,Ha,Ea),A.paintNWInner(c, -l,v,n,t,B,Sa,I,na),A.paintLeftInner(c,l,v,n,t,B,Wa,I,na,Ja,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,t,B,Wa,I,Ja),A.paintLeft(c,l,v,n,t,B,Sa,I,Ea),A.paintNW(c,l,v,n,t,B,Sa,I,Ha),A.paintTop(c,l,v,n,t,B,Ua,I,Na),A.paintNE(c,l,v,n,t,B,Ua,I,Ea),A.paintRight(c,l,v,n,t,B,Va,I,Ja),A.lineSEInner(c,l,v,n,t,B,Va,I,na,Ja),A.paintRightInner(c,l,v,n,t,B,Ua,I,na,Ea,Na),A.paintNEInner(c,l,v,n,t,B,Ua,I,na),A.paintTopInner(c,l,v,n,t,B,Sa,I,na,Ha,Ea),A.paintNWInner(c,l,v,n,t,B,Sa,I,na),A.paintLeftInner(c,l,v,n, -t,B,Wa,I,na,Ja,Ha),c.close(),c.fillAndStroke()):Ea&&Na&&Ja&&!Ha?"frame"!=va?(c.begin(),A.moveNW(c,l,v,n,t,B,Sa,I,Ha),A.paintTop(c,l,v,n,t,B,Ua,I,Na),A.paintNE(c,l,v,n,t,B,Ua,I,Ea),A.paintRight(c,l,v,n,t,B,Va,I,Ja),A.paintSE(c,l,v,n,t,B,Va,I,Na),A.paintBottom(c,l,v,n,t,B,Wa,I,Ha),"double"==va&&(A.moveSWInner(c,l,v,n,t,B,Wa,I,na,Ha),A.paintBottomInner(c,l,v,n,t,B,Va,I,na,Na,Ja),A.paintSEInner(c,l,v,n,t,B,Va,I,na),A.paintRightInner(c,l,v,n,t,B,Ua,I,na,Ea,Na),A.paintNEInner(c,l,v,n,t,B,Ua,I,na),A.paintTopInner(c, -l,v,n,t,B,Sa,I,na,Ha,Ea)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,t,B,Sa,I,Ha),A.paintTop(c,l,v,n,t,B,Ua,I,Na),A.paintNE(c,l,v,n,t,B,Ua,I,Ea),A.paintRight(c,l,v,n,t,B,Va,I,Ja),A.paintSE(c,l,v,n,t,B,Va,I,Na),A.paintBottom(c,l,v,n,t,B,Wa,I,Ha),A.lineSWInner(c,l,v,n,t,B,Wa,I,na,Ha),A.paintBottomInner(c,l,v,n,t,B,Va,I,na,Na,Ja),A.paintSEInner(c,l,v,n,t,B,Va,I,na),A.paintRightInner(c,l,v,n,t,B,Ua,I,na,Ea,Na),A.paintNEInner(c,l,v,n,t,B,Ua,I,na),A.paintTopInner(c,l,v,n,t,B,Sa,I,na,Ha,Ea),c.close(),c.fillAndStroke()): -Ea&&Na&&Ja&&Ha&&("frame"!=va?(c.begin(),A.moveNW(c,l,v,n,t,B,Sa,I,Ha),A.paintNW(c,l,v,n,t,B,Sa,I,Ha),A.paintTop(c,l,v,n,t,B,Ua,I,Na),A.paintNE(c,l,v,n,t,B,Ua,I,Ea),A.paintRight(c,l,v,n,t,B,Va,I,Ja),A.paintSE(c,l,v,n,t,B,Va,I,Na),A.paintBottom(c,l,v,n,t,B,Wa,I,Ha),A.paintSW(c,l,v,n,t,B,Wa,I,Ja),A.paintLeft(c,l,v,n,t,B,Sa,I,Ea),c.close(),"double"==va&&(A.moveSWInner(c,l,v,n,t,B,Wa,I,na,Ha),A.paintSWInner(c,l,v,n,t,B,Wa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Va,I,na,Na,Ja),A.paintSEInner(c,l,v,n,t, -B,Va,I,na),A.paintRightInner(c,l,v,n,t,B,Ua,I,na,Ea,Na),A.paintNEInner(c,l,v,n,t,B,Ua,I,na),A.paintTopInner(c,l,v,n,t,B,Sa,I,na,Ha,Ea),A.paintNWInner(c,l,v,n,t,B,Sa,I,na),A.paintLeftInner(c,l,v,n,t,B,Wa,I,na,Ja,Ha),c.close()),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,t,B,Sa,I,Ha),A.paintNW(c,l,v,n,t,B,Sa,I,Ha),A.paintTop(c,l,v,n,t,B,Ua,I,Na),A.paintNE(c,l,v,n,t,B,Ua,I,Ea),A.paintRight(c,l,v,n,t,B,Va,I,Ja),A.paintSE(c,l,v,n,t,B,Va,I,Na),A.paintBottom(c,l,v,n,t,B,Wa,I,Ha),A.paintSW(c,l,v,n,t,B,Wa,I,Ja), -A.paintLeft(c,l,v,n,t,B,Sa,I,Ea),c.close(),A.moveSWInner(c,l,v,n,t,B,Wa,I,na,Ha),A.paintSWInner(c,l,v,n,t,B,Wa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Va,I,na,Na,Ja),A.paintSEInner(c,l,v,n,t,B,Va,I,na),A.paintRightInner(c,l,v,n,t,B,Ua,I,na,Ea,Na),A.paintNEInner(c,l,v,n,t,B,Ua,I,na),A.paintTopInner(c,l,v,n,t,B,Sa,I,na,Ha,Ea),A.paintNWInner(c,l,v,n,t,B,Sa,I,na),A.paintLeftInner(c,l,v,n,t,B,Wa,I,na,Ja,Ha),c.close(),c.fillAndStroke())):"frame"!=va?(c.begin(),A.moveNW(c,l,v,n,t,B,Sa,I,Ha),A.paintTop(c, -l,v,n,t,B,Ua,I,Na),"double"==va&&(A.moveNEInner(c,l,v,n,t,B,Ua,I,na,Na),A.paintTopInner(c,l,v,n,t,B,Sa,I,na,Ha,Ea)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,t,B,Sa,I,Ha),A.paintTop(c,l,v,n,t,B,Ua,I,Na),A.lineNEInner(c,l,v,n,t,B,Ua,I,na,Na),A.paintTopInner(c,l,v,n,t,B,Sa,I,na,Ha,Ea),c.close(),c.fillAndStroke()):"frame"!=va?(c.begin(),A.moveNE(c,l,v,n,t,B,Ua,I,Ea),A.paintRight(c,l,v,n,t,B,Va,I,Ja),"double"==va&&(A.moveSEInner(c,l,v,n,t,B,Va,I,na,Ja),A.paintRightInner(c,l,v,n,t,B,Ua,I,na,Ea,Na)),c.stroke()): -(c.begin(),A.moveNE(c,l,v,n,t,B,Ua,I,Ea),A.paintRight(c,l,v,n,t,B,Va,I,Ja),A.lineSEInner(c,l,v,n,t,B,Va,I,na,Ja),A.paintRightInner(c,l,v,n,t,B,Ua,I,na,Ea,Na),c.close(),c.fillAndStroke()):"frame"!=va?(c.begin(),A.moveSE(c,l,v,n,t,B,Va,I,Na),A.paintBottom(c,l,v,n,t,B,Wa,I,Ha),"double"==va&&(A.moveSWInner(c,l,v,n,t,B,Wa,I,na,Ha),A.paintBottomInner(c,l,v,n,t,B,Va,I,na,Na,Ja)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,t,B,Va,I,Na),A.paintBottom(c,l,v,n,t,B,Wa,I,Ha),A.lineSWInner(c,l,v,n,t,B,Wa,I,na,Ha), -A.paintBottomInner(c,l,v,n,t,B,Va,I,na,Na,Ja),c.close(),c.fillAndStroke()):"frame"!=va?(c.begin(),A.moveSW(c,l,v,n,t,B,Sa,I,Ja),A.paintLeft(c,l,v,n,t,B,Sa,I,Ea),"double"==va&&(A.moveNWInner(c,l,v,n,t,B,Sa,I,na,Ea,Ha),A.paintLeftInner(c,l,v,n,t,B,Wa,I,na,Ja,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,t,B,Sa,I,Ja),A.paintLeft(c,l,v,n,t,B,Sa,I,Ea),A.lineNWInner(c,l,v,n,t,B,Sa,I,na,Ea,Ha),A.paintLeftInner(c,l,v,n,t,B,Wa,I,na,Ja,Ha),c.close(),c.fillAndStroke());c.begin();A.paintFolds(c,l,v,n,t,B,Sa,Ua, -Va,Wa,I,Ea,Na,Ja,Ha);c.stroke()};Ga.prototype.moveNW=function(c,l,v,n,t,A,B,ea,I){"square"==B||"default"==B&&"square"==A||!I?c.moveTo(0,0):c.moveTo(0,ea)};Ga.prototype.moveNE=function(c,l,v,n,t,A,B,ea,I){"square"==B||"default"==B&&"square"==A||!I?c.moveTo(n,0):c.moveTo(n-ea,0)};Ga.prototype.moveSE=function(c,l,v,n,t,A,B,ea,I){"square"==B||"default"==B&&"square"==A||!I?c.moveTo(n,t):c.moveTo(n,t-ea)};Ga.prototype.moveSW=function(c,l,v,n,t,A,B,ea,I){"square"==B||"default"==B&&"square"==A||!I?c.moveTo(0, -t):c.moveTo(ea,t)};Ga.prototype.paintNW=function(c,l,v,n,t,A,B,ea,I){if(I)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ea,ea,0,0,l,ea,0)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(ea,0);else c.lineTo(0,0)};Ga.prototype.paintTop=function(c,l,v,n,t,A,B,ea,I){"square"==B||"default"==B&&"square"==A||!I?c.lineTo(n,0):c.lineTo(n-ea,0)};Ga.prototype.paintNE= -function(c,l,v,n,t,A,B,ea,I){if(I)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ea,ea,0,0,l,n,ea)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n,ea);else c.lineTo(n,0)};Ga.prototype.paintRight=function(c,l,v,n,t,A,B,ea,I){"square"==B||"default"==B&&"square"==A||!I?c.lineTo(n,t):c.lineTo(n,t-ea)};Ga.prototype.paintLeft=function(c,l,v,n,t,A,B,ea,I){"square"== -B||"default"==B&&"square"==A||!I?c.lineTo(0,0):c.lineTo(0,ea)};Ga.prototype.paintSE=function(c,l,v,n,t,A,B,ea,I){if(I)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ea,ea,0,0,l,n-ea,t)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-ea,t);else c.lineTo(n,t)};Ga.prototype.paintBottom=function(c,l,v,n,t,A,B,ea,I){"square"==B||"default"==B&&"square"==A||!I?c.lineTo(0, -t):c.lineTo(ea,t)};Ga.prototype.paintSW=function(c,l,v,n,t,A,B,ea,I){if(I)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ea,ea,0,0,l,0,t-ea)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(0,t-ea);else c.lineTo(0,t)};Ga.prototype.paintNWInner=function(c,l,v,n,t,A,B,ea,I){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ea-.5*I,ea-.5*I,0,0,0,I,.5*I+ea);else if("invRound"== -B||"default"==B&&"invRound"==A)c.arcTo(ea+I,ea+I,0,0,1,I,I+ea);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(I,.5*I+ea);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(I+ea,I+ea),c.lineTo(I,I+ea)};Ga.prototype.paintTopInner=function(c,l,v,n,t,A,B,ea,I,va,na){va||na?!va&&na?c.lineTo(0,I):va&&!na?c.lineTo(I,0):va?"square"==B||"default"==B&&"square"==A?c.lineTo(I,I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(ea+.5*I,I):c.lineTo(ea+I,I):c.lineTo(0, -I):c.lineTo(0,0)};Ga.prototype.paintNEInner=function(c,l,v,n,t,A,B,ea,I){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ea-.5*I,ea-.5*I,0,0,0,n-ea-.5*I,I);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ea+I,ea+I,0,0,1,n-ea-I,I);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(n-ea-.5*I,I);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(n-ea-I,ea+I),c.lineTo(n-ea-I,I)};Ga.prototype.paintRightInner=function(c,l,v,n,t,A,B,ea,I,va,na){va||na?!va&&na?c.lineTo(n-I,0):va&&!na?c.lineTo(n, -I):va?"square"==B||"default"==B&&"square"==A?c.lineTo(n-I,I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-I,ea+.5*I):c.lineTo(n-I,ea+I):c.lineTo(n-I,0):c.lineTo(n,0)};Ga.prototype.paintLeftInner=function(c,l,v,n,t,A,B,ea,I,va,na){va||na?!va&&na?c.lineTo(I,t):va&&!na?c.lineTo(0,t-I):va?"square"==B||"default"==B&&"square"==A?c.lineTo(I,t-I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(I,t-ea-.5*I):c.lineTo(I,t-ea-I): -c.lineTo(I,t):c.lineTo(0,t)};Ga.prototype.paintSEInner=function(c,l,v,n,t,A,B,ea,I){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ea-.5*I,ea-.5*I,0,0,0,n-I,t-ea-.5*I);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ea+I,ea+I,0,0,1,n-I,t-ea-I);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(n-I,t-ea-.5*I);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(n-ea-I,t-ea-I),c.lineTo(n-I,t-ea-I)};Ga.prototype.paintBottomInner=function(c,l,v,n,t,A,B,ea,I,va,na){va||na?!va&&na?c.lineTo(n, -t-I):va&&!na?c.lineTo(n-I,t):"square"==B||"default"==B&&"square"==A||!va?c.lineTo(n-I,t-I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-ea-.5*I,t-I):c.lineTo(n-ea-I,t-I):c.lineTo(n,t)};Ga.prototype.paintSWInner=function(c,l,v,n,t,A,B,ea,I,va){if(!va)c.lineTo(I,t);else if("square"==B||"default"==B&&"square"==A)c.lineTo(I,t-I);else if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ea-.5*I,ea-.5*I,0,0,0,ea+.5*I,t-I);else if("invRound"==B||"default"==B&&"invRound"== -A)c.arcTo(ea+I,ea+I,0,0,1,ea+I,t-I);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(ea+.5*I,t-I);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(I+ea,t-ea-I),c.lineTo(I+ea,t-I)};Ga.prototype.moveSWInner=function(c,l,v,n,t,A,B,ea,I,va){va?"square"==B||"default"==B&&"square"==A?c.moveTo(I,t-I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(I,t-ea-.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(I,t-ea-I): -c.moveTo(0,t-I)};Ga.prototype.lineSWInner=function(c,l,v,n,t,A,B,ea,I,va){va?"square"==B||"default"==B&&"square"==A?c.lineTo(I,t-I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(I,t-ea-.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(I,t-ea-I):c.lineTo(0,t-I)};Ga.prototype.moveSEInner=function(c,l,v,n,t,A,B,ea,I,va){va?"square"==B||"default"==B&&"square"==A?c.moveTo(n-I,t-I):"rounded"==B||"default"==B&&"rounded"== -A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(n-I,t-ea-.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(n-I,t-ea-I):c.moveTo(n-I,t)};Ga.prototype.lineSEInner=function(c,l,v,n,t,A,B,ea,I,va){va?"square"==B||"default"==B&&"square"==A?c.lineTo(n-I,t-I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-I,t-ea-.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-I,t-ea-I): -c.lineTo(n-I,t)};Ga.prototype.moveNEInner=function(c,l,v,n,t,A,B,ea,I,va){va?"square"==B||"default"==B&&"square"==A||va?c.moveTo(n-I,I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(n-I,ea+.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(n-I,ea+I):c.moveTo(n,I)};Ga.prototype.lineNEInner=function(c,l,v,n,t,A,B,ea,I,va){va?"square"==B||"default"==B&&"square"==A||va?c.lineTo(n-I,I):"rounded"==B||"default"==B&&"rounded"== -A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-I,ea+.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-I,ea+I):c.lineTo(n,I)};Ga.prototype.moveNWInner=function(c,l,v,n,t,A,B,ea,I,va,na){va||na?!va&&na?c.moveTo(I,0):va&&!na?c.moveTo(0,I):"square"==B||"default"==B&&"square"==A?c.moveTo(I,I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(I,ea+.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"== -B&&"fold"==A)&&c.moveTo(I,ea+I):c.moveTo(0,0)};Ga.prototype.lineNWInner=function(c,l,v,n,t,A,B,ea,I,va,na){va||na?!va&&na?c.lineTo(I,0):va&&!na?c.lineTo(0,I):"square"==B||"default"==B&&"square"==A?c.lineTo(I,I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(I,ea+.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(I,ea+I):c.lineTo(0,0)};Ga.prototype.paintFolds=function(c,l,v,n,t,A,B,ea,I,va,na,Xa,jb,bb,Ea){if("fold"== -A||"fold"==B||"fold"==ea||"fold"==I||"fold"==va)("fold"==B||"default"==B&&"fold"==A)&&Xa&&Ea&&(c.moveTo(0,na),c.lineTo(na,na),c.lineTo(na,0)),("fold"==ea||"default"==ea&&"fold"==A)&&Xa&&jb&&(c.moveTo(n-na,0),c.lineTo(n-na,na),c.lineTo(n,na)),("fold"==I||"default"==I&&"fold"==A)&&bb&&jb&&(c.moveTo(n-na,t),c.lineTo(n-na,t-na),c.lineTo(n,t-na)),("fold"==va||"default"==va&&"fold"==A)&&bb&&Ea&&(c.moveTo(0,t-na),c.lineTo(na,t-na),c.lineTo(na,t))};mxCellRenderer.registerShape(Ga.prototype.cst.RECT2,Ga); -Ga.prototype.constraints=null;mxUtils.extend(Ya,mxConnector);Ya.prototype.origPaintEdgeShape=Ya.prototype.paintEdgeShape;Ya.prototype.paintEdgeShape=function(c,l,v){for(var n=[],t=0;t<l.length;t++)n.push(mxUtils.clone(l[t]));t=c.state.dashed;var A=c.state.fixDash;Ya.prototype.origPaintEdgeShape.apply(this,[c,n,v]);3<=c.state.strokeWidth&&(n=mxUtils.getValue(this.style,"fillColor",null),null!=n&&(c.setStrokeColor(n),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(t,A),Ya.prototype.origPaintEdgeShape.apply(this, -[c,l,v])))};mxCellRenderer.registerShape("filledEdge",Ya);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),v=c.apply(this,arguments);"umlFrame"==l.style.shape&&v.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return v}}();mxMarker.addMarker("dash",function(c,l,v,n,t,A,B,ea,I,va){var na=t*(B+I+1),Xa=A*(B+I+1);return function(){c.begin(); -c.moveTo(n.x-na/2-Xa/2,n.y-Xa/2+na/2);c.lineTo(n.x+Xa/2-3*na/2,n.y-3*Xa/2-na/2);c.stroke()}});mxMarker.addMarker("box",function(c,l,v,n,t,A,B,ea,I,va){var na=t*(B+I+1),Xa=A*(B+I+1),jb=n.x+na/2,bb=n.y+Xa/2;n.x-=na;n.y-=Xa;return function(){c.begin();c.moveTo(jb-na/2-Xa/2,bb-Xa/2+na/2);c.lineTo(jb-na/2+Xa/2,bb-Xa/2-na/2);c.lineTo(jb+Xa/2-3*na/2,bb-3*Xa/2-na/2);c.lineTo(jb-Xa/2-3*na/2,bb-3*Xa/2+na/2);c.close();va?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,v,n,t,A,B,ea,I, -va){var na=t*(B+I+1),Xa=A*(B+I+1);return function(){c.begin();c.moveTo(n.x-na/2-Xa/2,n.y-Xa/2+na/2);c.lineTo(n.x+Xa/2-3*na/2,n.y-3*Xa/2-na/2);c.moveTo(n.x-na/2+Xa/2,n.y-Xa/2-na/2);c.lineTo(n.x-Xa/2-3*na/2,n.y-3*Xa/2+na/2);c.stroke()}});mxMarker.addMarker("circle",db);mxMarker.addMarker("circlePlus",function(c,l,v,n,t,A,B,ea,I,va){var na=n.clone(),Xa=db.apply(this,arguments),jb=t*(B+2*I),bb=A*(B+2*I);return function(){Xa.apply(this,arguments);c.begin();c.moveTo(na.x-t*I,na.y-A*I);c.lineTo(na.x-2*jb+ -t*I,na.y-2*bb+A*I);c.moveTo(na.x-jb-bb+A*I,na.y-bb+jb-t*I);c.lineTo(na.x+bb-jb-A*I,na.y-bb-jb+t*I);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,l,v,n,t,A,B,ea,I,va){var na=t*(B+I+1),Xa=A*(B+I+1),jb=n.clone();n.x-=na;n.y-=Xa;return function(){c.begin();c.moveTo(jb.x-Xa,jb.y+na);c.quadTo(n.x-Xa,n.y+na,n.x,n.y);c.quadTo(n.x+Xa,n.y-na,jb.x+Xa,jb.y-na);c.stroke()}});mxMarker.addMarker("async",function(c,l,v,n,t,A,B,ea,I,va){l=t*I*1.118;v=A*I*1.118;t*=B+I;A*=B+I;var na=n.clone();na.x-=l;na.y-= -v;n.x+=-t-l;n.y+=-A-v;return function(){c.begin();c.moveTo(na.x,na.y);ea?c.lineTo(na.x-t-A/2,na.y-A+t/2):c.lineTo(na.x+A/2-t,na.y-A-t/2);c.lineTo(na.x-t,na.y-A);c.close();va?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,v,n,t,A,B,ea,I,va,na){A*=ea+va;B*=ea+va;var Xa=t.clone();return function(){l.begin();l.moveTo(Xa.x,Xa.y);I?l.lineTo(Xa.x-A-B/c,Xa.y-B+A/c):l.lineTo(Xa.x+B/c-A,Xa.y-B-A/c);l.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var ib= -function(c,l,v){return gb(c,["width"],l,function(n,t,A,B,ea){ea=c.shape.getEdgeWidth()*c.view.scale+v;return new mxPoint(B.x+t*n/4+A*ea/2,B.y+A*n/4-t*ea/2)},function(n,t,A,B,ea,I){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ea.x,ea.y,I.x,I.y));c.style.width=Math.round(2*n)/c.view.scale-v})},gb=function(c,l,v,n,t){return hb(c,l,function(A){var B=c.absolutePoints,ea=B.length-1;A=c.view.translate;var I=c.view.scale,va=v?B[0]:B[ea];B=v?B[1]:B[ea-1];ea=B.x-va.x;var na=B.y-va.y,Xa=Math.sqrt(ea*ea+na*na);va= -n.call(this,Xa,ea/Xa,na/Xa,va,B);return new mxPoint(va.x/I-A.x,va.y/I-A.y)},function(A,B,ea){var I=c.absolutePoints,va=I.length-1;A=c.view.translate;var na=c.view.scale,Xa=v?I[0]:I[va];I=v?I[1]:I[va-1];va=I.x-Xa.x;var jb=I.y-Xa.y,bb=Math.sqrt(va*va+jb*jb);B.x=(B.x+A.x)*na;B.y=(B.y+A.y)*na;t.call(this,bb,va/bb,jb/bb,Xa,I,B,ea)})},qb=function(c,l){return function(v){return[gb(v,["startWidth"],!0,function(n,t,A,B,ea){ea=mxUtils.getNumber(v.style,"startWidth",c)*v.view.scale+l;return new mxPoint(B.x+ -t*n/4+A*ea/2,B.y+A*n/4-t*ea/2)},function(n,t,A,B,ea,I){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ea.x,ea.y,I.x,I.y));v.style.startWidth=Math.round(2*n)/v.view.scale-l})]}},nb=function(c){return function(l){return[hb(l,["arrowWidth","arrowSize"],function(v){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Pa.prototype.arrowWidth))),t=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",Pa.prototype.arrowSize)));return new mxPoint(v.x+(1-t)*v.width,v.y+(1-n)*v.height/ +Jb=Math.max(0,Math.min(50,I));A=Oa.prototype;c.setDashed(Ya);jb&&""!=jb&&c.setDashPattern(jb);c.setStrokeWidth(Gb);I=Math.min(.5*t,.5*n,I);da||(I=Jb*Math.min(n,t)/100);I=Math.min(I,.5*Math.min(n,t));da||(na=Math.min(cb*Math.min(n,t)/100));na=Math.min(na,.5*Math.min(n,t)-I);(Ga||Ma||Ka||Ja)&&"frame"!=va&&(c.begin(),Ga?A.moveNW(c,l,v,n,t,B,Ua,I,Ja):c.moveTo(0,0),Ga&&A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),Ma&&A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),Ka&& +A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),Ja&&A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(Db),Ya=da=Ib,"none"==Db&&(da=0),"none"==Eb&&(Ya=0),c.setGradient(Db,Eb,0,0,n,t,Hb,da,Ya),c.begin(),Ga?A.moveNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja):c.moveTo(na,0),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),Ja&&Ka&&A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),Ka&&Ma&&A.paintSEInner(c, +l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),Ma&&Ga&&A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),Ga&&Ja&&A.paintNWInner(c,l,v,n,t,B,Ua,I,na),c.fill(),"none"==Fb&&(c.begin(),A.paintFolds(c,l,v,n,t,B,Ua,Va,Wa,Xa,I,Ga,Ma,Ka,Ja),c.stroke()));Ga||Ma||Ka||!Ja?Ga||Ma||!Ka||Ja?!Ga&&!Ma&&Ka&&Ja?"frame"!=va?(c.begin(),A.moveSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),"double"== +va&&(A.moveNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.lineNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),c.close(), +c.fillAndStroke()):Ga||!Ma||Ka||Ja?!Ga&&Ma&&!Ka&&Ja?"frame"!=va?(c.begin(),A.moveSW(c,l,v,n,t,B,Ua,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),"double"==va&&(A.moveNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja)),c.stroke(),c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),"double"==va&&(A.moveSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,t,B,Ua,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua, +I,Ga),A.lineNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),c.close(),c.fillAndStroke(),c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.lineSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),c.close(),c.fillAndStroke()):!Ga&&Ma&&Ka&&!Ja?"frame"!=va?(c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),"double"==va&&(A.moveSWInner(c, +l,v,n,t,B,Xa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma)),c.stroke()):(c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.lineSWInner(c,l,v,n,t,B,Xa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),c.close(),c.fillAndStroke()):!Ga&& +Ma&&Ka&&Ja?"frame"!=va?(c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),"double"==va&&(A.moveNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma)),c.stroke()): +(c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.lineNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),c.close(),c.fillAndStroke()):!Ga||Ma||Ka||Ja? +Ga&&!Ma&&!Ka&&Ja?"frame"!=va?(c.begin(),A.moveSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),"double"==va&&(A.moveNEInner(c,l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c,l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.lineNEInner(c, +l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c,l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),c.close(),c.fillAndStroke()):Ga&&!Ma&&Ka&&!Ja?"frame"!=va?(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),"double"==va&&(A.moveNEInner(c,l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga)),c.stroke(),c.begin(),A.moveSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),"double"==va&&(A.moveSWInner(c,l,v,n,t,B,Xa, +I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.lineNEInner(c,l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),c.close(),c.fillAndStroke(),c.begin(),A.moveSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.lineSWInner(c,l,v,n,t,B,Xa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),c.close(),c.fillAndStroke()):Ga&&!Ma&&Ka&&Ja?"frame"!=va?(c.begin(),A.moveSE(c,l,v,n,t,B,Wa, +I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),"double"==va&&(A.moveNEInner(c,l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c,l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l, +v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.lineNEInner(c,l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c,l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),c.close(),c.fillAndStroke()):Ga&&Ma&&!Ka&&!Ja?"frame"!=va?(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c, +l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),"double"==va&&(A.moveSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.lineSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c, +l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),c.close(),c.fillAndStroke()):Ga&&Ma&&!Ka&&Ja?"frame"!=va?(c.begin(),A.moveSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),"double"==va&&(A.moveSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c, +l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.lineSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c,l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n, +t,B,Xa,I,na,Ka,Ja),c.close(),c.fillAndStroke()):Ga&&Ma&&Ka&&!Ja?"frame"!=va?(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),"double"==va&&(A.moveSWInner(c,l,v,n,t,B,Xa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c, +l,v,n,t,B,Ua,I,na,Ja,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.lineSWInner(c,l,v,n,t,B,Xa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),c.close(),c.fillAndStroke()): +Ga&&Ma&&Ka&&Ja&&("frame"!=va?(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),c.close(),"double"==va&&(A.moveSWInner(c,l,v,n,t,B,Xa,I,na,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t, +B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c,l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),c.close()),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka), +A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),c.close(),A.moveSWInner(c,l,v,n,t,B,Xa,I,na,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c,l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),c.close(),c.fillAndStroke())):"frame"!=va?(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c, +l,v,n,t,B,Va,I,Ma),"double"==va&&(A.moveNEInner(c,l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.lineNEInner(c,l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),c.close(),c.fillAndStroke()):"frame"!=va?(c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),"double"==va&&(A.moveSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma)),c.stroke()): +(c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.lineSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),c.close(),c.fillAndStroke()):"frame"!=va?(c.begin(),A.moveSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),"double"==va&&(A.moveSWInner(c,l,v,n,t,B,Xa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.lineSWInner(c,l,v,n,t,B,Xa,I,na,Ja), +A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),c.close(),c.fillAndStroke()):"frame"!=va?(c.begin(),A.moveSW(c,l,v,n,t,B,Ua,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),"double"==va&&(A.moveNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,t,B,Ua,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.lineNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),c.close(),c.fillAndStroke());c.begin();A.paintFolds(c,l,v,n,t,B,Ua,Va, +Wa,Xa,I,Ga,Ma,Ka,Ja);c.stroke()};Oa.prototype.moveNW=function(c,l,v,n,t,A,B,da,I){"square"==B||"default"==B&&"square"==A||!I?c.moveTo(0,0):c.moveTo(0,da)};Oa.prototype.moveNE=function(c,l,v,n,t,A,B,da,I){"square"==B||"default"==B&&"square"==A||!I?c.moveTo(n,0):c.moveTo(n-da,0)};Oa.prototype.moveSE=function(c,l,v,n,t,A,B,da,I){"square"==B||"default"==B&&"square"==A||!I?c.moveTo(n,t):c.moveTo(n,t-da)};Oa.prototype.moveSW=function(c,l,v,n,t,A,B,da,I){"square"==B||"default"==B&&"square"==A||!I?c.moveTo(0, +t):c.moveTo(da,t)};Oa.prototype.paintNW=function(c,l,v,n,t,A,B,da,I){if(I)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(da,da,0,0,l,da,0)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(da,0);else c.lineTo(0,0)};Oa.prototype.paintTop=function(c,l,v,n,t,A,B,da,I){"square"==B||"default"==B&&"square"==A||!I?c.lineTo(n,0):c.lineTo(n-da,0)};Oa.prototype.paintNE= +function(c,l,v,n,t,A,B,da,I){if(I)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(da,da,0,0,l,n,da)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n,da);else c.lineTo(n,0)};Oa.prototype.paintRight=function(c,l,v,n,t,A,B,da,I){"square"==B||"default"==B&&"square"==A||!I?c.lineTo(n,t):c.lineTo(n,t-da)};Oa.prototype.paintLeft=function(c,l,v,n,t,A,B,da,I){"square"== +B||"default"==B&&"square"==A||!I?c.lineTo(0,0):c.lineTo(0,da)};Oa.prototype.paintSE=function(c,l,v,n,t,A,B,da,I){if(I)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(da,da,0,0,l,n-da,t)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-da,t);else c.lineTo(n,t)};Oa.prototype.paintBottom=function(c,l,v,n,t,A,B,da,I){"square"==B||"default"==B&&"square"==A||!I?c.lineTo(0, +t):c.lineTo(da,t)};Oa.prototype.paintSW=function(c,l,v,n,t,A,B,da,I){if(I)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(da,da,0,0,l,0,t-da)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(0,t-da);else c.lineTo(0,t)};Oa.prototype.paintNWInner=function(c,l,v,n,t,A,B,da,I){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(da-.5*I,da-.5*I,0,0,0,I,.5*I+da);else if("invRound"== +B||"default"==B&&"invRound"==A)c.arcTo(da+I,da+I,0,0,1,I,I+da);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(I,.5*I+da);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(I+da,I+da),c.lineTo(I,I+da)};Oa.prototype.paintTopInner=function(c,l,v,n,t,A,B,da,I,va,na){va||na?!va&&na?c.lineTo(0,I):va&&!na?c.lineTo(I,0):va?"square"==B||"default"==B&&"square"==A?c.lineTo(I,I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(da+.5*I,I):c.lineTo(da+I,I):c.lineTo(0, +I):c.lineTo(0,0)};Oa.prototype.paintNEInner=function(c,l,v,n,t,A,B,da,I){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(da-.5*I,da-.5*I,0,0,0,n-da-.5*I,I);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(da+I,da+I,0,0,1,n-da-I,I);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(n-da-.5*I,I);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(n-da-I,da+I),c.lineTo(n-da-I,I)};Oa.prototype.paintRightInner=function(c,l,v,n,t,A,B,da,I,va,na){va||na?!va&&na?c.lineTo(n-I,0):va&&!na?c.lineTo(n, +I):va?"square"==B||"default"==B&&"square"==A?c.lineTo(n-I,I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-I,da+.5*I):c.lineTo(n-I,da+I):c.lineTo(n-I,0):c.lineTo(n,0)};Oa.prototype.paintLeftInner=function(c,l,v,n,t,A,B,da,I,va,na){va||na?!va&&na?c.lineTo(I,t):va&&!na?c.lineTo(0,t-I):va?"square"==B||"default"==B&&"square"==A?c.lineTo(I,t-I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(I,t-da-.5*I):c.lineTo(I,t-da-I): +c.lineTo(I,t):c.lineTo(0,t)};Oa.prototype.paintSEInner=function(c,l,v,n,t,A,B,da,I){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(da-.5*I,da-.5*I,0,0,0,n-I,t-da-.5*I);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(da+I,da+I,0,0,1,n-I,t-da-I);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(n-I,t-da-.5*I);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(n-da-I,t-da-I),c.lineTo(n-I,t-da-I)};Oa.prototype.paintBottomInner=function(c,l,v,n,t,A,B,da,I,va,na){va||na?!va&&na?c.lineTo(n, +t-I):va&&!na?c.lineTo(n-I,t):"square"==B||"default"==B&&"square"==A||!va?c.lineTo(n-I,t-I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-da-.5*I,t-I):c.lineTo(n-da-I,t-I):c.lineTo(n,t)};Oa.prototype.paintSWInner=function(c,l,v,n,t,A,B,da,I,va){if(!va)c.lineTo(I,t);else if("square"==B||"default"==B&&"square"==A)c.lineTo(I,t-I);else if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(da-.5*I,da-.5*I,0,0,0,da+.5*I,t-I);else if("invRound"==B||"default"==B&&"invRound"== +A)c.arcTo(da+I,da+I,0,0,1,da+I,t-I);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(da+.5*I,t-I);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(I+da,t-da-I),c.lineTo(I+da,t-I)};Oa.prototype.moveSWInner=function(c,l,v,n,t,A,B,da,I,va){va?"square"==B||"default"==B&&"square"==A?c.moveTo(I,t-I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(I,t-da-.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(I,t-da-I): +c.moveTo(0,t-I)};Oa.prototype.lineSWInner=function(c,l,v,n,t,A,B,da,I,va){va?"square"==B||"default"==B&&"square"==A?c.lineTo(I,t-I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(I,t-da-.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(I,t-da-I):c.lineTo(0,t-I)};Oa.prototype.moveSEInner=function(c,l,v,n,t,A,B,da,I,va){va?"square"==B||"default"==B&&"square"==A?c.moveTo(n-I,t-I):"rounded"==B||"default"==B&&"rounded"== +A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(n-I,t-da-.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(n-I,t-da-I):c.moveTo(n-I,t)};Oa.prototype.lineSEInner=function(c,l,v,n,t,A,B,da,I,va){va?"square"==B||"default"==B&&"square"==A?c.lineTo(n-I,t-I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-I,t-da-.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-I,t-da-I): +c.lineTo(n-I,t)};Oa.prototype.moveNEInner=function(c,l,v,n,t,A,B,da,I,va){va?"square"==B||"default"==B&&"square"==A||va?c.moveTo(n-I,I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(n-I,da+.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(n-I,da+I):c.moveTo(n,I)};Oa.prototype.lineNEInner=function(c,l,v,n,t,A,B,da,I,va){va?"square"==B||"default"==B&&"square"==A||va?c.lineTo(n-I,I):"rounded"==B||"default"==B&&"rounded"== +A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-I,da+.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-I,da+I):c.lineTo(n,I)};Oa.prototype.moveNWInner=function(c,l,v,n,t,A,B,da,I,va,na){va||na?!va&&na?c.moveTo(I,0):va&&!na?c.moveTo(0,I):"square"==B||"default"==B&&"square"==A?c.moveTo(I,I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(I,da+.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"== +B&&"fold"==A)&&c.moveTo(I,da+I):c.moveTo(0,0)};Oa.prototype.lineNWInner=function(c,l,v,n,t,A,B,da,I,va,na){va||na?!va&&na?c.lineTo(I,0):va&&!na?c.lineTo(0,I):"square"==B||"default"==B&&"square"==A?c.lineTo(I,I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(I,da+.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(I,da+I):c.lineTo(0,0)};Oa.prototype.paintFolds=function(c,l,v,n,t,A,B,da,I,va,na,Ya,jb,cb,Ga){if("fold"== +A||"fold"==B||"fold"==da||"fold"==I||"fold"==va)("fold"==B||"default"==B&&"fold"==A)&&Ya&&Ga&&(c.moveTo(0,na),c.lineTo(na,na),c.lineTo(na,0)),("fold"==da||"default"==da&&"fold"==A)&&Ya&&jb&&(c.moveTo(n-na,0),c.lineTo(n-na,na),c.lineTo(n,na)),("fold"==I||"default"==I&&"fold"==A)&&cb&&jb&&(c.moveTo(n-na,t),c.lineTo(n-na,t-na),c.lineTo(n,t-na)),("fold"==va||"default"==va&&"fold"==A)&&cb&&Ga&&(c.moveTo(0,t-na),c.lineTo(na,t-na),c.lineTo(na,t))};mxCellRenderer.registerShape(Oa.prototype.cst.RECT2,Oa); +Oa.prototype.constraints=null;mxUtils.extend(Pa,mxConnector);Pa.prototype.origPaintEdgeShape=Pa.prototype.paintEdgeShape;Pa.prototype.paintEdgeShape=function(c,l,v){for(var n=[],t=0;t<l.length;t++)n.push(mxUtils.clone(l[t]));t=c.state.dashed;var A=c.state.fixDash;Pa.prototype.origPaintEdgeShape.apply(this,[c,n,v]);3<=c.state.strokeWidth&&(n=mxUtils.getValue(this.style,"fillColor",null),null!=n&&(c.setStrokeColor(n),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(t,A),Pa.prototype.origPaintEdgeShape.apply(this, +[c,l,v])))};mxCellRenderer.registerShape("filledEdge",Pa);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),v=c.apply(this,arguments);"umlFrame"==l.style.shape&&v.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return v}}();mxMarker.addMarker("dash",function(c,l,v,n,t,A,B,da,I,va){var na=t*(B+I+1),Ya=A*(B+I+1);return function(){c.begin(); +c.moveTo(n.x-na/2-Ya/2,n.y-Ya/2+na/2);c.lineTo(n.x+Ya/2-3*na/2,n.y-3*Ya/2-na/2);c.stroke()}});mxMarker.addMarker("box",function(c,l,v,n,t,A,B,da,I,va){var na=t*(B+I+1),Ya=A*(B+I+1),jb=n.x+na/2,cb=n.y+Ya/2;n.x-=na;n.y-=Ya;return function(){c.begin();c.moveTo(jb-na/2-Ya/2,cb-Ya/2+na/2);c.lineTo(jb-na/2+Ya/2,cb-Ya/2-na/2);c.lineTo(jb+Ya/2-3*na/2,cb-3*Ya/2-na/2);c.lineTo(jb-Ya/2-3*na/2,cb-3*Ya/2+na/2);c.close();va?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,v,n,t,A,B,da,I, +va){var na=t*(B+I+1),Ya=A*(B+I+1);return function(){c.begin();c.moveTo(n.x-na/2-Ya/2,n.y-Ya/2+na/2);c.lineTo(n.x+Ya/2-3*na/2,n.y-3*Ya/2-na/2);c.moveTo(n.x-na/2+Ya/2,n.y-Ya/2-na/2);c.lineTo(n.x-Ya/2-3*na/2,n.y-3*Ya/2+na/2);c.stroke()}});mxMarker.addMarker("circle",bb);mxMarker.addMarker("circlePlus",function(c,l,v,n,t,A,B,da,I,va){var na=n.clone(),Ya=bb.apply(this,arguments),jb=t*(B+2*I),cb=A*(B+2*I);return function(){Ya.apply(this,arguments);c.begin();c.moveTo(na.x-t*I,na.y-A*I);c.lineTo(na.x-2*jb+ +t*I,na.y-2*cb+A*I);c.moveTo(na.x-jb-cb+A*I,na.y-cb+jb-t*I);c.lineTo(na.x+cb-jb-A*I,na.y-cb-jb+t*I);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,l,v,n,t,A,B,da,I,va){var na=t*(B+I+1),Ya=A*(B+I+1),jb=n.clone();n.x-=na;n.y-=Ya;return function(){c.begin();c.moveTo(jb.x-Ya,jb.y+na);c.quadTo(n.x-Ya,n.y+na,n.x,n.y);c.quadTo(n.x+Ya,n.y-na,jb.x+Ya,jb.y-na);c.stroke()}});mxMarker.addMarker("async",function(c,l,v,n,t,A,B,da,I,va){l=t*I*1.118;v=A*I*1.118;t*=B+I;A*=B+I;var na=n.clone();na.x-=l;na.y-= +v;n.x+=-t-l;n.y+=-A-v;return function(){c.begin();c.moveTo(na.x,na.y);da?c.lineTo(na.x-t-A/2,na.y-A+t/2):c.lineTo(na.x+A/2-t,na.y-A-t/2);c.lineTo(na.x-t,na.y-A);c.close();va?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,v,n,t,A,B,da,I,va,na){A*=da+va;B*=da+va;var Ya=t.clone();return function(){l.begin();l.moveTo(Ya.x,Ya.y);I?l.lineTo(Ya.x-A-B/c,Ya.y-B+A/c):l.lineTo(Ya.x+B/c-A,Ya.y-B-A/c);l.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var ib= +function(c,l,v){return gb(c,["width"],l,function(n,t,A,B,da){da=c.shape.getEdgeWidth()*c.view.scale+v;return new mxPoint(B.x+t*n/4+A*da/2,B.y+A*n/4-t*da/2)},function(n,t,A,B,da,I){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,da.x,da.y,I.x,I.y));c.style.width=Math.round(2*n)/c.view.scale-v})},gb=function(c,l,v,n,t){return hb(c,l,function(A){var B=c.absolutePoints,da=B.length-1;A=c.view.translate;var I=c.view.scale,va=v?B[0]:B[da];B=v?B[1]:B[da-1];da=B.x-va.x;var na=B.y-va.y,Ya=Math.sqrt(da*da+na*na);va= +n.call(this,Ya,da/Ya,na/Ya,va,B);return new mxPoint(va.x/I-A.x,va.y/I-A.y)},function(A,B,da){var I=c.absolutePoints,va=I.length-1;A=c.view.translate;var na=c.view.scale,Ya=v?I[0]:I[va];I=v?I[1]:I[va-1];va=I.x-Ya.x;var jb=I.y-Ya.y,cb=Math.sqrt(va*va+jb*jb);B.x=(B.x+A.x)*na;B.y=(B.y+A.y)*na;t.call(this,cb,va/cb,jb/cb,Ya,I,B,da)})},qb=function(c,l){return function(v){return[gb(v,["startWidth"],!0,function(n,t,A,B,da){da=mxUtils.getNumber(v.style,"startWidth",c)*v.view.scale+l;return new mxPoint(B.x+ +t*n/4+A*da/2,B.y+A*n/4-t*da/2)},function(n,t,A,B,da,I){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,da.x,da.y,I.x,I.y));v.style.startWidth=Math.round(2*n)/v.view.scale-l})]}},nb=function(c){return function(l){return[hb(l,["arrowWidth","arrowSize"],function(v){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Na.prototype.arrowWidth))),t=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",Na.prototype.arrowSize)));return new mxPoint(v.x+(1-t)*v.width,v.y+(1-n)*v.height/ 2)},function(v,n){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(v.y+v.height/2-n.y)/v.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(v.x+v.width-n.x)/v.width))})]}},mb=function(c){return function(l){return[hb(l,["size"],function(v){var n=Math.max(0,Math.min(.5*v.height,parseFloat(mxUtils.getValue(this.state.style,"size",c))));return new mxPoint(v.x,v.y+n)},function(v,n){this.state.style.size=Math.max(0,n.y-v.y)},!0)]}},Bb=function(c,l,v){return function(n){var t=[hb(n,["size"], -function(A){var B=Math.max(0,Math.min(A.width,Math.min(A.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(A.x+B,A.y+B)},function(A,B){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(A.width,B.x-A.x),Math.min(A.height,B.y-A.y)))/c)},!1)];v&&mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&t.push(kb(n));return t}},wb=function(c,l,v,n,t){v=null!=v?v:.5;return function(A){var B=[hb(A,["size"],function(ea){var I=null!=t?"0"!=mxUtils.getValue(this.state.style, -"fixedSize","0"):null,va=parseFloat(mxUtils.getValue(this.state.style,"size",I?t:c));return new mxPoint(ea.x+Math.max(0,Math.min(.5*ea.width,va*(I?1:ea.width))),ea.getCenterY())},function(ea,I,va){ea=null!=t&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?I.x-ea.x:Math.max(0,Math.min(v,(I.x-ea.x)/ea.width));this.state.style.size=ea},!1,n)];l&&mxUtils.getValue(A.style,mxConstants.STYLE_ROUNDED,!1)&&B.push(kb(A));return B}},rb=function(c,l,v){c=null!=c?c:.5;return function(n){var t=[hb(n,["size"], -function(A){var B=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ea=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",B?v:l)));return new mxPoint(A.x+Math.min(.75*A.width*c,ea*(B?.75:.75*A.width)),A.y+A.height/4)},function(A,B){A=null!=v&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?B.x-A.x:Math.max(0,Math.min(c,(B.x-A.x)/A.width*.75));this.state.style.size=A},!1,!0)];mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&t.push(kb(n));return t}},vb= +function(A){var B=Math.max(0,Math.min(A.width,Math.min(A.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(A.x+B,A.y+B)},function(A,B){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(A.width,B.x-A.x),Math.min(A.height,B.y-A.y)))/c)},!1)];v&&mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&t.push(kb(n));return t}},wb=function(c,l,v,n,t){v=null!=v?v:.5;return function(A){var B=[hb(A,["size"],function(da){var I=null!=t?"0"!=mxUtils.getValue(this.state.style, +"fixedSize","0"):null,va=parseFloat(mxUtils.getValue(this.state.style,"size",I?t:c));return new mxPoint(da.x+Math.max(0,Math.min(.5*da.width,va*(I?1:da.width))),da.getCenterY())},function(da,I,va){da=null!=t&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?I.x-da.x:Math.max(0,Math.min(v,(I.x-da.x)/da.width));this.state.style.size=da},!1,n)];l&&mxUtils.getValue(A.style,mxConstants.STYLE_ROUNDED,!1)&&B.push(kb(A));return B}},rb=function(c,l,v){c=null!=c?c:.5;return function(n){var t=[hb(n,["size"], +function(A){var B=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,da=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",B?v:l)));return new mxPoint(A.x+Math.min(.75*A.width*c,da*(B?.75:.75*A.width)),A.y+A.height/4)},function(A,B){A=null!=v&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?B.x-A.x:Math.max(0,Math.min(c,(B.x-A.x)/A.width*.75));this.state.style.size=A},!1,!0)];mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&t.push(kb(n));return t}},vb= function(){return function(c){var l=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l}},kb=function(c,l){return hb(c,[mxConstants.STYLE_ARCSIZE],function(v){var n=null!=l?l:v.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var t=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(v.x+v.width-Math.min(v.width/2,t),v.y+n)}t=Math.max(0,parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE, 100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(v.x+v.width-Math.min(Math.max(v.width/2,v.height/2),Math.min(v.width,v.height)*t),v.y+n)},function(v,n,t){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(v.width,2*(v.x+v.width-n.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(v.width-n.x+v.x)/Math.min(v.width,v.height))))})},hb=function(c,l,v,n, -t,A,B){var ea=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);ea.execute=function(va){for(var na=0;na<l.length;na++)this.copyStyle(l[na]);B&&B(va)};ea.getPosition=v;ea.setPosition=n;ea.ignoreGrid=null!=t?t:!0;if(A){var I=ea.positionChanged;ea.positionChanged=function(){I.apply(this,arguments);c.view.invalidate(this.state.cell);c.view.validate()}}return ea},tb={link:function(c){return[ib(c,!0,10),ib(c,!1,10)]},flexArrow:function(c){var l=c.view.graph.gridSize/c.view.scale,v=[]; -mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(v.push(gb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,t,A,B,ea){n=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ea=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+t*(ea+c.shape.strokewidth*c.view.scale)+A*n/2,B.y+A*(ea+c.shape.strokewidth*c.view.scale)-t*n/2)},function(n,t,A,B,ea,I,va){n=Math.sqrt(mxUtils.ptSegDistSq(B.x, -B.y,ea.x,ea.y,I.x,I.y));t=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-t,I.x,I.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(t-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*n)/c.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(va.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))< -l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),v.push(gb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,t,A,B,ea){n=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;ea=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+t*(ea+c.shape.strokewidth*c.view.scale)+A*n/2,B.y+A*(ea+c.shape.strokewidth*c.view.scale)-t*n/2)},function(n,t,A,B,ea, -I,va){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ea.x,ea.y,I.x,I.y));t=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-t,I.x,I.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(t-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(va.getEvent())|| -(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<l&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(v.push(gb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,t,A,B,ea){n=(c.shape.getEdgeWidth()- -c.shape.strokewidth)*c.view.scale;ea=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+t*(ea+c.shape.strokewidth*c.view.scale)-A*n/2,B.y+A*(ea+c.shape.strokewidth*c.view.scale)+t*n/2)},function(n,t,A,B,ea,I,va){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ea.x,ea.y,I.x,I.y));t=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-t,I.x,I.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(t-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2* -n)/c.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(va.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),v.push(gb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,t,A,B,ea){n= -(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;ea=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+t*(ea+c.shape.strokewidth*c.view.scale)-A*n/2,B.y+A*(ea+c.shape.strokewidth*c.view.scale)+t*n/2)},function(n,t,A,B,ea,I,va){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ea.x,ea.y,I.x,I.y));t=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-t,I.x,I.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(t-c.shape.strokewidth)/3)/100/c.view.scale; +t,A,B){var da=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);da.execute=function(va){for(var na=0;na<l.length;na++)this.copyStyle(l[na]);B&&B(va)};da.getPosition=v;da.setPosition=n;da.ignoreGrid=null!=t?t:!0;if(A){var I=da.positionChanged;da.positionChanged=function(){I.apply(this,arguments);c.view.invalidate(this.state.cell);c.view.validate()}}return da},tb={link:function(c){return[ib(c,!0,10),ib(c,!1,10)]},flexArrow:function(c){var l=c.view.graph.gridSize/c.view.scale,v=[]; +mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(v.push(gb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,t,A,B,da){n=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;da=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+t*(da+c.shape.strokewidth*c.view.scale)+A*n/2,B.y+A*(da+c.shape.strokewidth*c.view.scale)-t*n/2)},function(n,t,A,B,da,I,va){n=Math.sqrt(mxUtils.ptSegDistSq(B.x, +B.y,da.x,da.y,I.x,I.y));t=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-t,I.x,I.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(t-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*n)/c.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(va.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))< +l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),v.push(gb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,t,A,B,da){n=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;da=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+t*(da+c.shape.strokewidth*c.view.scale)+A*n/2,B.y+A*(da+c.shape.strokewidth*c.view.scale)-t*n/2)},function(n,t,A,B,da, +I,va){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,da.x,da.y,I.x,I.y));t=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-t,I.x,I.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(t-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(va.getEvent())|| +(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<l&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(v.push(gb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,t,A,B,da){n=(c.shape.getEdgeWidth()- +c.shape.strokewidth)*c.view.scale;da=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+t*(da+c.shape.strokewidth*c.view.scale)-A*n/2,B.y+A*(da+c.shape.strokewidth*c.view.scale)+t*n/2)},function(n,t,A,B,da,I,va){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,da.x,da.y,I.x,I.y));t=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-t,I.x,I.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(t-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2* +n)/c.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(va.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),v.push(gb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,t,A,B,da){n= +(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;da=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+t*(da+c.shape.strokewidth*c.view.scale)-A*n/2,B.y+A*(da+c.shape.strokewidth*c.view.scale)+t*n/2)},function(n,t,A,B,da,I,va){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,da.x,da.y,I.x,I.y));t=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-t,I.x,I.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(t-c.shape.strokewidth)/3)/100/c.view.scale; c.style.endWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(va.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)- parseFloat(c.style.startWidth))<l&&(c.style.endWidth=c.style.startWidth))})));return v},swimlane:function(c){var l=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var v=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));l.push(kb(c,v/2))}l.push(hb(c,[mxConstants.STYLE_STARTSIZE],function(n){var t=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(c.style,mxConstants.STYLE_HORIZONTAL, 1)?new mxPoint(n.getCenterX(),n.y+Math.max(0,Math.min(n.height,t))):new mxPoint(n.x+Math.max(0,Math.min(n.width,t)),n.getCenterY())},function(n,t){c.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(n.height,t.y-n.y))):Math.round(Math.max(0,Math.min(n.width,t.x-n.x)))},!1,null,function(n){var t=c.view.graph;if(!mxEvent.isShiftDown(n.getEvent())&&!mxEvent.isControlDown(n.getEvent())&&(t.isTableRow(c.cell)||t.isTableCell(c.cell))){n= -t.getSwimlaneDirection(c.style);var A=t.model.getParent(c.cell);A=t.model.getChildCells(A,!0);for(var B=[],ea=0;ea<A.length;ea++)A[ea]!=c.cell&&t.isSwimlane(A[ea])&&t.getSwimlaneDirection(t.getCurrentCellStyle(A[ea]))==n&&B.push(A[ea]);t.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],B)}}));return l},label:vb(),ext:vb(),rectangle:vb(),triangle:vb(),rhombus:vb(),umlLifeline:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style, -"size",W.prototype.size))));return new mxPoint(l.getCenterX(),l.y+v)},function(l,v){this.state.style.size=Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},umlFrame:function(c){return[hb(c,["width","height"],function(l){var v=Math.max(T.prototype.corner,Math.min(l.width,mxUtils.getValue(this.state.style,"width",T.prototype.width))),n=Math.max(1.5*T.prototype.corner,Math.min(l.height,mxUtils.getValue(this.state.style,"height",T.prototype.height)));return new mxPoint(l.x+v,l.y+n)},function(l, -v){this.state.style.width=Math.round(Math.max(T.prototype.corner,Math.min(l.width,v.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*T.prototype.corner,Math.min(l.height,v.y-l.y)))},!1)]},process:function(c){var l=[hb(c,["size"],function(v){var n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),t=parseFloat(mxUtils.getValue(this.state.style,"size",oa.prototype.size));return n?new mxPoint(v.x+t,v.y+v.height/4):new mxPoint(v.x+v.width*t,v.y+v.height/4)},function(v,n){v="0"!=mxUtils.getValue(this.state.style, -"fixedSize","0")?Math.max(0,Math.min(.5*v.width,n.x-v.x)):Math.max(0,Math.min(.5,(n.x-v.x)/v.width));this.state.style.size=v},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},cross:function(c){return[hb(c,["size"],function(l){var v=Math.min(l.width,l.height);v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Ca.prototype.size)))*v/2;return new mxPoint(l.getCenterX()-v,l.getCenterY()-v)},function(l,v){var n=Math.min(l.width,l.height);this.state.style.size= -Math.max(0,Math.min(1,Math.min(Math.max(0,l.getCenterY()-v.y)/n*2,Math.max(0,l.getCenterX()-v.x)/n*2)))})]},note:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",Q.prototype.size)))));return new mxPoint(l.x+l.width-v,l.y+v)},function(l,v){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-v.x),Math.min(l.height,v.y-l.y))))})]},note2:function(c){return[hb(c,["size"],function(l){var v= +t.getSwimlaneDirection(c.style);var A=t.model.getParent(c.cell);A=t.model.getChildCells(A,!0);for(var B=[],da=0;da<A.length;da++)A[da]!=c.cell&&t.isSwimlane(A[da])&&t.getSwimlaneDirection(t.getCurrentCellStyle(A[da]))==n&&B.push(A[da]);t.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],B)}}));return l},label:vb(),ext:vb(),rectangle:vb(),triangle:vb(),rhombus:vb(),umlLifeline:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style, +"size",Y.prototype.size))));return new mxPoint(l.getCenterX(),l.y+v)},function(l,v){this.state.style.size=Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},umlFrame:function(c){return[hb(c,["width","height"],function(l){var v=Math.max(R.prototype.corner,Math.min(l.width,mxUtils.getValue(this.state.style,"width",R.prototype.width))),n=Math.max(1.5*R.prototype.corner,Math.min(l.height,mxUtils.getValue(this.state.style,"height",R.prototype.height)));return new mxPoint(l.x+v,l.y+n)},function(l, +v){this.state.style.width=Math.round(Math.max(R.prototype.corner,Math.min(l.width,v.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*R.prototype.corner,Math.min(l.height,v.y-l.y)))},!1)]},process:function(c){var l=[hb(c,["size"],function(v){var n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),t=parseFloat(mxUtils.getValue(this.state.style,"size",oa.prototype.size));return n?new mxPoint(v.x+t,v.y+v.height/4):new mxPoint(v.x+v.width*t,v.y+v.height/4)},function(v,n){v="0"!=mxUtils.getValue(this.state.style, +"fixedSize","0")?Math.max(0,Math.min(.5*v.width,n.x-v.x)):Math.max(0,Math.min(.5,(n.x-v.x)/v.width));this.state.style.size=v},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},cross:function(c){return[hb(c,["size"],function(l){var v=Math.min(l.width,l.height);v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Ba.prototype.size)))*v/2;return new mxPoint(l.getCenterX()-v,l.getCenterY()-v)},function(l,v){var n=Math.min(l.width,l.height);this.state.style.size= +Math.max(0,Math.min(1,Math.min(Math.max(0,l.getCenterY()-v.y)/n*2,Math.max(0,l.getCenterX()-v.x)/n*2)))})]},note:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",P.prototype.size)))));return new mxPoint(l.x+l.width-v,l.y+v)},function(l,v){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-v.x),Math.min(l.height,v.y-l.y))))})]},note2:function(c){return[hb(c,["size"],function(l){var v= Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",d.prototype.size)))));return new mxPoint(l.x+l.width-v,l.y+v)},function(l,v){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-v.x),Math.min(l.height,v.y-l.y))))})]},manualInput:function(c){var l=[hb(c,["size"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",Da.prototype.size)));return new mxPoint(v.x+v.width/4,v.y+3*n/4)},function(v, -n){this.state.style.size=Math.round(Math.max(0,Math.min(v.height,4*(n.y-v.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},dataStorage:function(c){return[hb(c,["size"],function(l){var v="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),n=parseFloat(mxUtils.getValue(this.state.style,"size",v?M.prototype.fixedSize:M.prototype.size));return new mxPoint(l.x+l.width-n*(v?1:l.width),l.getCenterY())},function(l,v){l="0"!=mxUtils.getValue(this.state.style, -"fixedSize","0")?Math.max(0,Math.min(l.width,l.x+l.width-v.x)):Math.max(0,Math.min(1,(l.x+l.width-v.x)/l.width));this.state.style.size=l},!1)]},callout:function(c){var l=[hb(c,["size","position"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",da.prototype.size))),t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",da.prototype.position)));mxUtils.getValue(this.state.style,"base",da.prototype.base);return new mxPoint(v.x+t*v.width,v.y+v.height- -n)},function(v,n){mxUtils.getValue(this.state.style,"base",da.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(v.height,v.y+v.height-n.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(n.x-v.x)/v.width)))/100},!1),hb(c,["position2"],function(v){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",da.prototype.position2)));return new mxPoint(v.x+n*v.width,v.y+v.height)},function(v,n){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1, -(n.x-v.x)/v.width)))/100},!1),hb(c,["base"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",da.prototype.size))),t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",da.prototype.position))),A=Math.max(0,Math.min(v.width,mxUtils.getValue(this.state.style,"base",da.prototype.base)));return new mxPoint(v.x+Math.min(v.width,t*v.width+A),v.y+v.height-n)},function(v,n){var t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",da.prototype.position))); -this.state.style.base=Math.round(Math.max(0,Math.min(v.width,n.x-v.x-t*v.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},internalStorage:function(c){var l=[hb(c,["dx","dy"],function(v){var n=Math.max(0,Math.min(v.width,mxUtils.getValue(this.state.style,"dx",Ra.prototype.dx))),t=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"dy",Ra.prototype.dy)));return new mxPoint(v.x+n,v.y+t)},function(v,n){this.state.style.dx=Math.round(Math.max(0, -Math.min(v.width,n.x-v.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(v.height,n.y-v.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},module:function(c){return[hb(c,["jettyWidth","jettyHeight"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",ma.prototype.jettyWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"jettyHeight",ma.prototype.jettyHeight)));return new mxPoint(l.x+v/2,l.y+ -2*n)},function(l,v){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,v.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,v.y-l.y))/2)})]},corner:function(c){return[hb(c,["dx","dy"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Qa.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",Qa.prototype.dy)));return new mxPoint(l.x+v,l.y+n)},function(l,v){this.state.style.dx=Math.round(Math.max(0, +n){this.state.style.size=Math.round(Math.max(0,Math.min(v.height,4*(n.y-v.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},dataStorage:function(c){return[hb(c,["size"],function(l){var v="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),n=parseFloat(mxUtils.getValue(this.state.style,"size",v?L.prototype.fixedSize:L.prototype.size));return new mxPoint(l.x+l.width-n*(v?1:l.width),l.getCenterY())},function(l,v){l="0"!=mxUtils.getValue(this.state.style, +"fixedSize","0")?Math.max(0,Math.min(l.width,l.x+l.width-v.x)):Math.max(0,Math.min(1,(l.x+l.width-v.x)/l.width));this.state.style.size=l},!1)]},callout:function(c){var l=[hb(c,["size","position"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",fa.prototype.size))),t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",fa.prototype.position)));mxUtils.getValue(this.state.style,"base",fa.prototype.base);return new mxPoint(v.x+t*v.width,v.y+v.height- +n)},function(v,n){mxUtils.getValue(this.state.style,"base",fa.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(v.height,v.y+v.height-n.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(n.x-v.x)/v.width)))/100},!1),hb(c,["position2"],function(v){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",fa.prototype.position2)));return new mxPoint(v.x+n*v.width,v.y+v.height)},function(v,n){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1, +(n.x-v.x)/v.width)))/100},!1),hb(c,["base"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",fa.prototype.size))),t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",fa.prototype.position))),A=Math.max(0,Math.min(v.width,mxUtils.getValue(this.state.style,"base",fa.prototype.base)));return new mxPoint(v.x+Math.min(v.width,t*v.width+A),v.y+v.height-n)},function(v,n){var t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",fa.prototype.position))); +this.state.style.base=Math.round(Math.max(0,Math.min(v.width,n.x-v.x-t*v.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},internalStorage:function(c){var l=[hb(c,["dx","dy"],function(v){var n=Math.max(0,Math.min(v.width,mxUtils.getValue(this.state.style,"dx",Sa.prototype.dx))),t=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"dy",Sa.prototype.dy)));return new mxPoint(v.x+n,v.y+t)},function(v,n){this.state.style.dx=Math.round(Math.max(0, +Math.min(v.width,n.x-v.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(v.height,n.y-v.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},module:function(c){return[hb(c,["jettyWidth","jettyHeight"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",la.prototype.jettyWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"jettyHeight",la.prototype.jettyHeight)));return new mxPoint(l.x+v/2,l.y+ +2*n)},function(l,v){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,v.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,v.y-l.y))/2)})]},corner:function(c){return[hb(c,["dx","dy"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Ra.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",Ra.prototype.dy)));return new mxPoint(l.x+v,l.y+n)},function(l,v){this.state.style.dx=Math.round(Math.max(0, Math.min(l.width,v.x-l.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},tee:function(c){return[hb(c,["dx","dy"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Za.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",Za.prototype.dy)));return new mxPoint(l.x+(l.width+v)/2,l.y+n)},function(l,v){this.state.style.dx=Math.round(Math.max(0,2*Math.min(l.width/2,v.x-l.x-l.width/2)));this.state.style.dy= Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},singleArrow:nb(1),doubleArrow:nb(.5),"mxgraph.arrows2.wedgeArrow":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":qb(20,20),folder:function(c){return[hb(c,["tabWidth","tabHeight"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",u.prototype.tabWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",u.prototype.tabHeight)));mxUtils.getValue(this.state.style, "tabPosition",u.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(v=l.width-v);return new mxPoint(l.x+v,l.y+n)},function(l,v){var n=Math.max(0,Math.min(l.width,v.x-l.x));mxUtils.getValue(this.state.style,"tabPosition",u.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(n=l.width-n);this.state.style.tabWidth=Math.round(n);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},document:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style, "size",G.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-v)*l.height)},function(l,v){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-v.y)/l.height))},!1)]},tape:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",D.prototype.size))));return new mxPoint(l.getCenterX(),l.y+v*l.height/2)},function(l,v){this.state.style.size=Math.max(0,Math.min(1,(v.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[hb(c, -["isoAngle"],function(l){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",f.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(v),.5*l.height))},function(l,v){this.state.style.isoAngle=Math.max(0,50*(v.y-l.y)/l.height)},!0)]},cylinder2:mb(g.prototype.size),cylinder3:mb(x.prototype.size),offPageConnector:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",fa.prototype.size)))); +["isoAngle"],function(l){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",f.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(v),.5*l.height))},function(l,v){this.state.style.isoAngle=Math.max(0,50*(v.y-l.y)/l.height)},!0)]},cylinder2:mb(g.prototype.size),cylinder3:mb(x.prototype.size),offPageConnector:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ha.prototype.size)))); return new mxPoint(l.getCenterX(),l.y+(1-v)*l.height)},function(l,v){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-v.y)/l.height))},!1)]},"mxgraph.basic.rect":function(c){var l=[Graph.createHandle(c,["size"],function(v){var n=Math.max(0,Math.min(v.width/2,v.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(v.x+n,v.y+n)},function(v,n){this.state.style.size=Math.round(100*Math.max(0,Math.min(v.height/2,v.width/2,n.x-v.x)))/100})];c=Graph.createHandle(c, -["indent"],function(v){var n=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(v.x+.75*v.width,v.y+n*v.height/200)},function(v,n){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(n.y-v.y)/v.height)))/100});l.push(c);return l},step:wb(ia.prototype.size,!0,null,!0,ia.prototype.fixedSize),hexagon:wb(L.prototype.size,!0,.5,!0,L.prototype.fixedSize),curlyBracket:wb(Y.prototype.size,!1),display:wb(Ma.prototype.size,!1),cube:Bb(1, -m.prototype.size,!1),card:Bb(.5,J.prototype.size,!0),loopLimit:Bb(.5,X.prototype.size,!0),trapezoid:rb(.5,U.prototype.size,U.prototype.fixedSize),parallelogram:rb(1,V.prototype.size,V.prototype.fixedSize)};Graph.createHandle=hb;Graph.handleFactory=tb;var Cb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=Cb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&& +["indent"],function(v){var n=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(v.x+.75*v.width,v.y+n*v.height/200)},function(v,n){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(n.y-v.y)/v.height)))/100});l.push(c);return l},step:wb(ia.prototype.size,!0,null,!0,ia.prototype.fixedSize),hexagon:wb(M.prototype.size,!0,.5,!0,M.prototype.fixedSize),curlyBracket:wb(Z.prototype.size,!1),display:wb(Ea.prototype.size,!1),cube:Bb(1, +m.prototype.size,!1),card:Bb(.5,J.prototype.size,!0),loopLimit:Bb(.5,U.prototype.size,!0),trapezoid:rb(.5,T.prototype.size,T.prototype.fixedSize),parallelogram:rb(1,W.prototype.size,W.prototype.fixedSize)};Graph.createHandle=hb;Graph.handleFactory=tb;var Cb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=Cb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&& null==mxStencilRegistry.getStencil(l)?l=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(l=mxConstants.SHAPE_SWIMLANE);l=tb[l];null==l&&null!=this.state.shape&&this.state.shape.isRoundable()&&(l=tb[mxConstants.SHAPE_RECTANGLE]);null!=l&&(l=l(this.state),null!=l&&(c=null==c?l:c.concat(l)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR); -c=tb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var xb=new mxPoint(1,0),zb=new mxPoint(1,0),ob=mxUtils.toRadians(-30);xb=mxUtils.getRotatedPoint(xb,Math.cos(ob),Math.sin(ob));var yb=mxUtils.toRadians(-150);zb=mxUtils.getRotatedPoint(zb,Math.cos(yb),Math.sin(yb));mxEdgeStyle.IsometricConnector=function(c,l,v,n,t){var A=c.view;n=null!=n&&0<n.length?n[0]:null;var B=c.absolutePoints,ea=B[0];B=B[B.length-1];null!=n&&(n=A.transformControlPoint(c,n)); -null==ea&&null!=l&&(ea=new mxPoint(l.getCenterX(),l.getCenterY()));null==B&&null!=v&&(B=new mxPoint(v.getCenterX(),v.getCenterY()));var I=xb.x,va=xb.y,na=zb.x,Xa=zb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=ea){c=function(Ea,Na,Ja){Ea-=bb.x;var Ha=Na-bb.y;Na=(Xa*Ea-na*Ha)/(I*Xa-va*na);Ea=(va*Ea-I*Ha)/(va*na-I*Xa);jb?(Ja&&(bb=new mxPoint(bb.x+I*Na,bb.y+va*Na),t.push(bb)),bb=new mxPoint(bb.x+na*Ea,bb.y+Xa*Ea)):(Ja&&(bb=new mxPoint(bb.x+na*Ea,bb.y+Xa*Ea),t.push(bb)), -bb=new mxPoint(bb.x+I*Na,bb.y+va*Na));t.push(bb)};var bb=ea;null==n&&(n=new mxPoint(ea.x+(B.x-ea.x)/2,ea.y+(B.y-ea.y)/2));c(n.x,n.y,!0);c(B.x,B.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ab=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var v=new mxElbowEdgeHandler(c);v.snapToTerminals=!1;return v}return Ab.apply(this,arguments)};p.prototype.constraints=[];E.prototype.getConstraints= +c=tb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var xb=new mxPoint(1,0),zb=new mxPoint(1,0),ob=mxUtils.toRadians(-30);xb=mxUtils.getRotatedPoint(xb,Math.cos(ob),Math.sin(ob));var yb=mxUtils.toRadians(-150);zb=mxUtils.getRotatedPoint(zb,Math.cos(yb),Math.sin(yb));mxEdgeStyle.IsometricConnector=function(c,l,v,n,t){var A=c.view;n=null!=n&&0<n.length?n[0]:null;var B=c.absolutePoints,da=B[0];B=B[B.length-1];null!=n&&(n=A.transformControlPoint(c,n)); +null==da&&null!=l&&(da=new mxPoint(l.getCenterX(),l.getCenterY()));null==B&&null!=v&&(B=new mxPoint(v.getCenterX(),v.getCenterY()));var I=xb.x,va=xb.y,na=zb.x,Ya=zb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=da){c=function(Ga,Ma,Ka){Ga-=cb.x;var Ja=Ma-cb.y;Ma=(Ya*Ga-na*Ja)/(I*Ya-va*na);Ga=(va*Ga-I*Ja)/(va*na-I*Ya);jb?(Ka&&(cb=new mxPoint(cb.x+I*Ma,cb.y+va*Ma),t.push(cb)),cb=new mxPoint(cb.x+na*Ga,cb.y+Ya*Ga)):(Ka&&(cb=new mxPoint(cb.x+na*Ga,cb.y+Ya*Ga),t.push(cb)), +cb=new mxPoint(cb.x+I*Ma,cb.y+va*Ma));t.push(cb)};var cb=da;null==n&&(n=new mxPoint(da.x+(B.x-da.x)/2,da.y+(B.y-da.y)/2));c(n.x,n.y,!0);c(B.x,B.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ab=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var v=new mxElbowEdgeHandler(c);v.snapToTerminals=!1;return v}return Ab.apply(this,arguments)};p.prototype.constraints=[];F.prototype.getConstraints= function(c,l,v){c=[];var n=Math.tan(mxUtils.toRadians(30)),t=(.5-n)/2;n=Math.min(l,v/(.5+n));l=(l-n)/2;v=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*n,v+n*t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+n,v+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+n,v+.75*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*n,v+(1-t)*n));c.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,l,v+.75*n));return c};f.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;n=Math.min(l*Math.tan(n),.5*v);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v-n));c.push(new mxConnectionConstraint(new mxPoint(.5, -1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));return c};da.prototype.getConstraints=function(c,l,v){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var n=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var t=l*Math.max(0, +1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));return c};fa.prototype.getConstraints=function(c,l,v){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var n=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var t=l*Math.max(0, Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(v-n)));c.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,l,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-n)));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75, 0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75, 1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];ua.prototype.constraints=mxRectangleShape.prototype.constraints; -mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;Q.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0, +mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;aa.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;P.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,.5*(l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(v+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0, .5),!1));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};J.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v+n)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};m.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,Math.min(v,parseFloat(mxUtils.getValue(this.style, @@ -2923,50 +2921,50 @@ mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwim function(c,l,v){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),t=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0)),c.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,n,t)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),t))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,t)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),t)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t));c.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,l,.25*(v-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(v-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.75*(v-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(v-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,0,.75*(v-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Ra.prototype.constraints=mxRectangleShape.prototype.constraints;M.prototype.constraints=mxRectangleShape.prototype.constraints;la.prototype.constraints=mxEllipse.prototype.constraints;xa.prototype.constraints=mxEllipse.prototype.constraints; -sa.prototype.constraints=mxEllipse.prototype.constraints;La.prototype.constraints=mxEllipse.prototype.constraints;Da.prototype.constraints=mxRectangleShape.prototype.constraints;Oa.prototype.constraints=mxRectangleShape.prototype.constraints;Ma.prototype.getConstraints=function(c,l,v){c=[];var n=Math.min(l,v/2),t=Math.min(l-n,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,t,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(t+l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(t+l-n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,v));return c};ma.prototype.getConstraints=function(c,l,v){l=parseFloat(mxUtils.getValue(c, -"jettyWidth",ma.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",ma.prototype.jettyHeight));var n=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1, +0),!1,null,0,.75*(v-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Sa.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;ma.prototype.constraints=mxEllipse.prototype.constraints;wa.prototype.constraints=mxEllipse.prototype.constraints; +sa.prototype.constraints=mxEllipse.prototype.constraints;za.prototype.constraints=mxEllipse.prototype.constraints;Da.prototype.constraints=mxRectangleShape.prototype.constraints;Fa.prototype.constraints=mxRectangleShape.prototype.constraints;Ea.prototype.getConstraints=function(c,l,v){c=[];var n=Math.min(l,v/2),t=Math.min(l-n,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,t,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(t+l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(t+l-n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,v));return c};la.prototype.getConstraints=function(c,l,v){l=parseFloat(mxUtils.getValue(c, +"jettyWidth",la.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",la.prototype.jettyHeight));var n=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1, .75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(v-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(v-.5*c,3.5*c))];v>5*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,l));v>8*c&&n.push(new mxConnectionConstraint(new mxPoint(0, -.5),!1,null,l));v>15*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,l));return n};X.prototype.constraints=mxRectangleShape.prototype.constraints;fa.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0, -.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];ja.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75, +.5),!1,null,l));v>15*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,l));return n};U.prototype.constraints=mxRectangleShape.prototype.constraints;ha.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0, +.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75, .1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];pa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0, .7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0, -.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];z.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25, +.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25, .5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];D.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1, .65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];ia.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0, .5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5, 0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1, .5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375, 1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55, -.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];V.prototype.constraints=mxRectangleShape.prototype.constraints;U.prototype.constraints=mxRectangleShape.prototype.constraints;G.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75, +.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];W.prototype.constraints=mxRectangleShape.prototype.constraints;T.prototype.constraints=mxRectangleShape.prototype.constraints;G.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75, 0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;Za.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),t=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style, "dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*l+.25*n,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),t));c.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,.5*(l+n),.5*(v+t)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),v));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),.5*(v+t)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*l-.25*n,t));c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,0,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*t));return c};Qa.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),t=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,0,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*t));return c};Ra.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),t=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,l,.5*t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*(v+t)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,v));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0, -1),!1));return c};Ta.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];Pa.prototype.getConstraints= +1),!1));return c};Ta.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];Na.prototype.getConstraints= function(c,l,v){c=[];var n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),t=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));n=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-t),n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-t,0));c.push(new mxConnectionConstraint(new mxPoint(1, -.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-t,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-t),v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));return c};y.prototype.getConstraints=function(c,l,v){c=[];var n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Pa.prototype.arrowWidth)))),t=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Pa.prototype.arrowSize))));n=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0, -.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-t,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-t,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,v));return c};Ca.prototype.getConstraints= +.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-t,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-t),v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));return c};z.prototype.getConstraints=function(c,l,v){c=[];var n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Na.prototype.arrowWidth)))),t=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Na.prototype.arrowSize))));n=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0, +.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-t,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-t,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,v));return c};Ba.prototype.getConstraints= function(c,l,v){c=[];var n=Math.min(v,l),t=Math.max(0,Math.min(n,n*parseFloat(mxUtils.getValue(this.style,"size",this.size))));n=(v-t)/2;var A=n+t,B=(l-t)/2;t=B+t;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,t,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,v));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+t),n));c.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+t),A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,0,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,n));return c};W.prototype.constraints=null;N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7, -.9),!1)];S.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];ra.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ta.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0, +0),!1,null,0,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,n));return c};Y.prototype.constraints=null;O.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7, +.9),!1)];V.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];ra.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ta.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0, .5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(b){this.editorUi=b;this.actions={};this.init()} -Actions.prototype.init=function(){function b(d){p.escape();d=p.deleteCells(p.getDeletableCells(p.getSelectionCells()),d);null!=d&&p.setSelectionCells(d)}function e(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{for(var d=p.getSelectionCells(),f=0;f<d.length;f++)p.cellLabelChanged(d[f],"")}finally{p.getModel().endUpdate()}}}function k(d,f,g,x,z){z.getModel().beginUpdate();try{var u=z.getCellGeometry(d);null!=u&&g&&x&&(g/=x,u=u.clone(),1<g?u.height=u.width/g:u.width=u.height*g,z.getModel().setGeometry(d, -u));z.setCellStyles(mxConstants.STYLE_CLIP_PATH,f,[d]);z.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[d])}finally{z.getModel().endUpdate()}}var m=this.editorUi,C=m.editor,p=C.graph,E=function(){return Action.prototype.isEnabled.apply(this,arguments)&&p.isEnabled()};this.addAction("new...",function(){p.openLink(m.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";m.openFile()});this.addAction("smartFit",function(){p.popupMenuHandler.hideMenu();var d=p.view.scale, +Actions.prototype.init=function(){function b(d){p.escape();d=p.deleteCells(p.getDeletableCells(p.getSelectionCells()),d);null!=d&&p.setSelectionCells(d)}function e(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{for(var d=p.getSelectionCells(),f=0;f<d.length;f++)p.cellLabelChanged(d[f],"")}finally{p.getModel().endUpdate()}}}function k(d,f,g,x,y){y.getModel().beginUpdate();try{var u=y.getCellGeometry(d);null!=u&&g&&x&&(g/=x,u=u.clone(),1<g?u.height=u.width/g:u.width=u.height*g,y.getModel().setGeometry(d, +u));y.setCellStyles(mxConstants.STYLE_CLIP_PATH,f,[d]);y.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[d])}finally{y.getModel().endUpdate()}}var m=this.editorUi,C=m.editor,p=C.graph,F=function(){return Action.prototype.isEnabled.apply(this,arguments)&&p.isEnabled()};this.addAction("new...",function(){p.openLink(m.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";m.openFile()});this.addAction("smartFit",function(){p.popupMenuHandler.hideMenu();var d=p.view.scale, f=p.view.translate.x,g=p.view.translate.y;m.actions.get("resetView").funct();1E-5>Math.abs(d-p.view.scale)&&f==p.view.translate.x&&g==p.view.translate.y&&m.actions.get(p.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){p.isEnabled()&&(p.isSelectionEmpty()?m.actions.get("smartFit").funct():p.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){m.hideDialog()})); -window.openFile.setConsumer(mxUtils.bind(this,function(d,f){try{var g=mxUtils.parseXml(d);C.graph.setSelectionCells(C.graph.importGraphModel(g.documentElement))}catch(x){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+x.message)}}));m.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=E;this.addAction("save",function(){m.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=E;this.addAction("saveAs...",function(){m.saveFile(!0)},null, -null,Editor.ctrlKey+"+Shift+S").isEnabled=E;this.addAction("export...",function(){m.showDialog((new ExportDialog(m)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var d=new EditDiagramDialog(m);m.showDialog(d.container,620,420,!0,!1);d.init()});this.addAction("pageSetup...",function(){m.showDialog((new PageSetupDialog(m)).container,320,240,!0,!0)}).isEnabled=E;this.addAction("print...",function(){m.showDialog((new PrintDialog(m)).container,300,180,!0,!0)},null,"sprite-print", +window.openFile.setConsumer(mxUtils.bind(this,function(d,f){try{var g=mxUtils.parseXml(d);C.graph.setSelectionCells(C.graph.importGraphModel(g.documentElement))}catch(x){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+x.message)}}));m.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=F;this.addAction("save",function(){m.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=F;this.addAction("saveAs...",function(){m.saveFile(!0)},null, +null,Editor.ctrlKey+"+Shift+S").isEnabled=F;this.addAction("export...",function(){m.showDialog((new ExportDialog(m)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var d=new EditDiagramDialog(m);m.showDialog(d.container,620,420,!0,!1);d.init()});this.addAction("pageSetup...",function(){m.showDialog((new PageSetupDialog(m)).container,320,240,!0,!0)}).isEnabled=F;this.addAction("print...",function(){m.showDialog((new PrintDialog(m)).container,300,180,!0,!0)},null,"sprite-print", Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(p,null,10,10)});this.addAction("undo",function(){m.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){m.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var d=null;try{d=m.copyXml(),null!=d&&p.removeCells(d,!1)}catch(f){}null==d&&mxClipboard.cut(p)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{m.copyXml()}catch(d){}try{mxClipboard.copy(p)}catch(d){m.handleError(d)}}, -null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var d=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(f){if(null!=f){p.getModel().beginUpdate();try{m.pasteXml(f,!0)}finally{p.getModel().endUpdate()}}else mxClipboard.paste(p)}),d=!0)}catch(f){}d||mxClipboard.paste(p)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(d){function f(x){if(null!=x){for(var z=!0,u=0;u< -x.length&&z;u++)z=z&&p.model.isEdge(x[u]);var H=p.view.translate;u=p.view.scale;var J=H.x,D=H.y;H=null;if(1==x.length&&z){var G=p.getCellGeometry(x[0]);null!=G&&(H=G.getTerminalPoint(!0))}H=null!=H?H:p.getBoundingBoxFromGeometry(x,z);null!=H&&(z=Math.round(p.snap(p.popupMenuHandler.triggerX/u-J)),u=Math.round(p.snap(p.popupMenuHandler.triggerY/u-D)),p.cellsMoved(x,z-H.x,u-H.y))}}function g(){p.getModel().beginUpdate();try{f(mxClipboard.paste(p))}finally{p.getModel().endUpdate()}}if(p.isEnabled()&& +null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var d=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(f){if(null!=f){p.getModel().beginUpdate();try{m.pasteXml(f,!0)}finally{p.getModel().endUpdate()}}else mxClipboard.paste(p)}),d=!0)}catch(f){}d||mxClipboard.paste(p)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(d){function f(x){if(null!=x){for(var y=!0,u=0;u< +x.length&&y;u++)y=y&&p.model.isEdge(x[u]);var H=p.view.translate;u=p.view.scale;var J=H.x,D=H.y;H=null;if(1==x.length&&y){var G=p.getCellGeometry(x[0]);null!=G&&(H=G.getTerminalPoint(!0))}H=null!=H?H:p.getBoundingBoxFromGeometry(x,y);null!=H&&(y=Math.round(p.snap(p.popupMenuHandler.triggerX/u-J)),u=Math.round(p.snap(p.popupMenuHandler.triggerY/u-D)),p.cellsMoved(x,y-H.x,u-H.y))}}function g(){p.getModel().beginUpdate();try{f(mxClipboard.paste(p))}finally{p.getModel().endUpdate()}}if(p.isEnabled()&& !p.isCellLocked(p.getDefaultParent())){d=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(x){if(null!=x){p.getModel().beginUpdate();try{f(m.pasteXml(x,!0))}finally{p.getModel().endUpdate()}}else g()}),d=!0)}catch(x){}d||g()}});this.addAction("copySize",function(){var d=p.getSelectionCell();p.isEnabled()&&null!=d&&p.getModel().isVertex(d)&&(d=p.getCellGeometry(d),null!=d&&(m.copiedSize=new mxRectangle(d.x,d.y,d.width,d.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize", function(){if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedSize){p.getModel().beginUpdate();try{for(var d=p.getResizableCells(p.getSelectionCells()),f=0;f<d.length;f++)if(p.getModel().isVertex(d[f])){var g=p.getCellGeometry(d[f]);null!=g&&(g=g.clone(),g.width=m.copiedSize.width,g.height=m.copiedSize.height,p.getModel().setGeometry(d[f],g))}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var d=p.getSelectionCell()||p.getModel().getRoot();p.isEnabled()&& null!=d&&(d=d.cloneValue(),null==d||isNaN(d.nodeType)||(m.copiedValue=d))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(d,f){function g(u,H){var J=x.getValue(u);H=u.cloneValue(H);H.removeAttribute("placeholders");null==J||isNaN(J.nodeType)||H.setAttribute("placeholders",J.getAttribute("placeholders"));null!=d&&mxEvent.isShiftDown(d)||H.setAttribute("label",p.convertValueToString(u));x.setValue(u,H)}d=null!=f?f:d;var x=p.getModel();if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedValue){x.beginUpdate(); -try{var z=p.getEditableCells(p.getSelectionCells());if(0==z.length)g(x.getRoot(),m.copiedValue);else for(f=0;f<z.length;f++)g(z[f],m.copiedValue)}finally{x.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(d,f){d=null!=f?f:d;null!=d&&mxEvent.isShiftDown(d)?e():b(null!=d&&(mxEvent.isControlDown(d)||mxEvent.isMetaDown(d)||mxEvent.isAltDown(d)))},null,null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){e()},null,null,Editor.ctrlKey+ +try{var y=p.getEditableCells(p.getSelectionCells());if(0==y.length)g(x.getRoot(),m.copiedValue);else for(f=0;f<y.length;f++)g(y[f],m.copiedValue)}finally{x.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(d,f){d=null!=f?f:d;null!=d&&mxEvent.isShiftDown(d)?e():b(null!=d&&(mxEvent.isControlDown(d)||mxEvent.isMetaDown(d)||mxEvent.isAltDown(d)))},null,null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){e()},null,null,Editor.ctrlKey+ "+Delete");this.addAction("duplicate",function(){try{p.setSelectionCells(p.duplicateCells()),p.scrollCellToVisible(p.getSelectionCell())}catch(d){m.handleError(d)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var d=m.getSelectionState();if(null!=d.mergeCell){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",d.rowspan,[d.mergeCell]),p.setCellStyles("colspan",d.colspan,[d.mergeCell])}finally{p.getModel().endUpdate()}}}));this.put("unmergeCells", new Action(mxResources.get("unmerge"),function(){var d=m.getSelectionState();if(0<d.cells.length){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",null,d.cells),p.setCellStyles("colspan",null,d.cells)}finally{p.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(d,f){d=null!=f?f:d;p.turnShapes(p.getResizableCells(p.getSelectionCells()),null!=d?mxEvent.isShiftDown(d):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R")); this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(d){d=p.getSelectionCell();p.isEnabled()&&null!=d&&p.addSelectionCells(p.getEdges(d))}));this.addAction("selectVertices",function(){p.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){p.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){p.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){p.clearSelection()}, @@ -2976,14 +2974,14 @@ null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){p.orderCell (d=p.getCellsForGroup(d),1<d.length&&p.setSelectionCell(p.groupCells(null,0,d))):p.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(p.isEnabled()){var d=p.getEditableCells(p.getSelectionCells());p.model.beginUpdate();try{var f=p.ungroupCells();if(null!=d)for(var g=0;g<d.length;g++)p.model.contains(d[g])&&(0==p.model.getChildCount(d[g])&&p.model.isVertex(d[g])&&p.setCellStyles("container","0",[d[g]]),f.push(d[g]))}finally{p.model.endUpdate()}0< f.length&&p.setSelectionCells(f)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(p.isEnabled()){var d=p.getSelectionCells();if(null!=d){for(var f=[],g=0;g<d.length;g++)p.isTableRow(d[g])||p.isTableCell(d[g])||f.push(d[g]);p.removeCellsFromParent(f)}}});this.addAction("edit",function(){p.isEnabled()&&p.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var d=p.getSelectionCell()||p.getModel().getRoot();m.showDataDialog(d)},null, null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var d=p.getSelectionCell();if(p.isEnabled()&&null!=d&&p.isCellEditable(d)){var f="";if(mxUtils.isNode(d.value)){var g=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&d.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(g=d.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==g&&(g=d.value.getAttribute("tooltip"));null!=g&&(f=g)}f=new TextareaDialog(m,mxResources.get("editTooltip")+":",f,function(x){p.setTooltipForCell(d, -x)});m.showDialog(f.container,320,200,!0,!0);f.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var d=p.getLinkForCell(p.getSelectionCell());null!=d&&p.openLink(d)});this.addAction("editLink...",function(){var d=p.getSelectionCell();if(p.isEnabled()&&null!=d&&p.isCellEditable(d)){var f=p.getLinkForCell(d)||"";m.showLinkDialog(f,mxResources.get("apply"),function(g,x,z){g=mxUtils.trim(g);p.setLinkForCell(d,0<g.length?g:null);p.setAttributeForCell(d,"linkTarget",z)},!0,p.getLinkTargetForCell(d))}}, -null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&(p.clearSelection(),m.actions.get("image").funct())})).isEnabled=E;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&m.showLinkDialog("",mxResources.get("insert"),function(d,f,g){d=mxUtils.trim(d);if(0<d.length){var x=null,z=p.getLinkTitle(d);null!=f&&0<f.length&&(x=f[0].iconUrl, -z=f[0].name||f[0].type,z=z.charAt(0).toUpperCase()+z.substring(1),30<z.length&&(z=z.substring(0,30)+"..."));f=new mxCell(z,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=x?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+x:"spacing=10;"));f.vertex=!0;x=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([f],!0));f.geometry.x=x.x;f.geometry.y=x.y;p.setAttributeForCell(f,"linkTarget",g);p.setLinkForCell(f,d);p.cellSizeUpdated(f, -!0);p.getModel().beginUpdate();try{f=p.addCell(f),p.fireEvent(new mxEventObject("cellsInserted","cells",[f]))}finally{p.getModel().endUpdate()}p.setSelectionCell(f);p.scrollCellToVisible(p.getSelectionCell())}},!0)})).isEnabled=E;this.addAction("link...",mxUtils.bind(this,function(){if(p.isEnabled())if(p.cellEditor.isContentEditing()){var d=p.getSelectedElement(),f=p.getParentByName(d,"A",p.cellEditor.textarea),g="";if(null==f&&null!=d&&null!=d.getElementsByTagName)for(var x=d.getElementsByTagName("a"), -z=0;z<x.length&&null==f;z++)x[z].textContent==d.textContent&&(f=x[z]);null!=f&&"A"==f.nodeName&&(g=f.getAttribute("href")||"",p.selectNode(f));var u=p.cellEditor.saveSelection();m.showLinkDialog(g,mxResources.get("apply"),mxUtils.bind(this,function(H){p.cellEditor.restoreSelection(u);null!=H&&p.insertLink(H)}))}else p.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=E;this.addAction("autosize",function(){var d=p.getSelectionCells();if(null!=d){p.getModel().beginUpdate(); +x)});m.showDialog(f.container,320,200,!0,!0);f.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var d=p.getLinkForCell(p.getSelectionCell());null!=d&&p.openLink(d)});this.addAction("editLink...",function(){var d=p.getSelectionCell();if(p.isEnabled()&&null!=d&&p.isCellEditable(d)){var f=p.getLinkForCell(d)||"";m.showLinkDialog(f,mxResources.get("apply"),function(g,x,y){g=mxUtils.trim(g);p.setLinkForCell(d,0<g.length?g:null);p.setAttributeForCell(d,"linkTarget",y)},!0,p.getLinkTargetForCell(d))}}, +null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&(p.clearSelection(),m.actions.get("image").funct())})).isEnabled=F;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&m.showLinkDialog("",mxResources.get("insert"),function(d,f,g){d=mxUtils.trim(d);if(0<d.length){var x=null,y=p.getLinkTitle(d);null!=f&&0<f.length&&(x=f[0].iconUrl, +y=f[0].name||f[0].type,y=y.charAt(0).toUpperCase()+y.substring(1),30<y.length&&(y=y.substring(0,30)+"..."));f=new mxCell(y,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=x?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+x:"spacing=10;"));f.vertex=!0;x=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([f],!0));f.geometry.x=x.x;f.geometry.y=x.y;p.setAttributeForCell(f,"linkTarget",g);p.setLinkForCell(f,d);p.cellSizeUpdated(f, +!0);p.getModel().beginUpdate();try{f=p.addCell(f),p.fireEvent(new mxEventObject("cellsInserted","cells",[f]))}finally{p.getModel().endUpdate()}p.setSelectionCell(f);p.scrollCellToVisible(p.getSelectionCell())}},!0)})).isEnabled=F;this.addAction("link...",mxUtils.bind(this,function(){if(p.isEnabled())if(p.cellEditor.isContentEditing()){var d=p.getSelectedElement(),f=p.getParentByName(d,"A",p.cellEditor.textarea),g="";if(null==f&&null!=d&&null!=d.getElementsByTagName)for(var x=d.getElementsByTagName("a"), +y=0;y<x.length&&null==f;y++)x[y].textContent==d.textContent&&(f=x[y]);null!=f&&"A"==f.nodeName&&(g=f.getAttribute("href")||"",p.selectNode(f));var u=p.cellEditor.saveSelection();m.showLinkDialog(g,mxResources.get("apply"),mxUtils.bind(this,function(H){p.cellEditor.restoreSelection(u);null!=H&&p.insertLink(H)}))}else p.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=F;this.addAction("autosize",function(){var d=p.getSelectionCells();if(null!=d){p.getModel().beginUpdate(); try{for(var f=0;f<d.length;f++){var g=d[f];0<p.getModel().getChildCount(g)?p.updateGroupBounds([g],0,!0):p.updateCellSize(g)}}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){p.snapCellsToGrid(p.getSelectionCells(),p.gridSize)});this.addAction("formattedText",function(){p.stopEditing();var d=p.getCommonStyle(p.getSelectionCells());d="1"==mxUtils.getValue(d,"html","0")?null:"1";p.getModel().beginUpdate();try{for(var f=p.getEditableCells(p.getSelectionCells()), -g=0;g<f.length;g++)if(state=p.getView().getState(f[g]),null!=state){var x=mxUtils.getValue(state.style,"html","0");if("1"==x&&null==d){var z=p.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(z=z.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var u=document.createElement("div");u.innerHTML=p.sanitizeHtml(z);z=mxUtils.extractTextWithWhitespace(u.childNodes);p.cellLabelChanged(state.cell,z);p.setCellStyles("html",d,[f[g]])}else"0"==x&&"1"==d&&(z=mxUtils.htmlEntities(p.convertValueToString(state.cell), -!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(z=z.replace(/\n/g,"<br/>")),p.cellLabelChanged(state.cell,p.sanitizeHtml(z)),p.setCellStyles("html",d,[f[g]]))}m.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=d?d:"0"],"cells",f))}finally{p.getModel().endUpdate()}});this.addAction("wordWrap",function(){var d=p.getView().getState(p.getSelectionCell()),f="wrap";p.stopEditing();null!=d&&"wrap"==d.style[mxConstants.STYLE_WHITE_SPACE]&&(f=null);p.setCellStyles(mxConstants.STYLE_WHITE_SPACE, +g=0;g<f.length;g++)if(state=p.getView().getState(f[g]),null!=state){var x=mxUtils.getValue(state.style,"html","0");if("1"==x&&null==d){var y=p.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(y=y.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var u=document.createElement("div");u.innerHTML=p.sanitizeHtml(y);y=mxUtils.extractTextWithWhitespace(u.childNodes);p.cellLabelChanged(state.cell,y);p.setCellStyles("html",d,[f[g]])}else"0"==x&&"1"==d&&(y=mxUtils.htmlEntities(p.convertValueToString(state.cell), +!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(y=y.replace(/\n/g,"<br/>")),p.cellLabelChanged(state.cell,p.sanitizeHtml(y)),p.setCellStyles("html",d,[f[g]]))}m.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=d?d:"0"],"cells",f))}finally{p.getModel().endUpdate()}});this.addAction("wordWrap",function(){var d=p.getView().getState(p.getSelectionCell()),f="wrap";p.stopEditing();null!=d&&"wrap"==d.style[mxConstants.STYLE_WHITE_SPACE]&&(f=null);p.setCellStyles(mxConstants.STYLE_WHITE_SPACE, f)});this.addAction("rotation",function(){var d="0",f=p.getView().getState(p.getSelectionCell());null!=f&&(d=f.style[mxConstants.STYLE_ROTATION]||d);d=new FilenameDialog(m,d,mxResources.get("apply"),function(g){null!=g&&0<g.length&&p.setCellStyles(mxConstants.STYLE_ROTATION,g)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");m.showDialog(d.container,375,80,!0,!0);d.init()});this.addAction("resetView",function(){p.zoomTo(1);m.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn", function(d){p.isFastZoomEnabled()?p.lazyZoom(!0,!0,m.buttonZoomDelay):p.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(d){p.isFastZoomEnabled()?p.lazyZoom(!1,!0,m.buttonZoomDelay):p.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var d=p.isSelectionEmpty()?p.getGraphBounds():p.getBoundingBox(p.getSelectionCells()),f=p.view.translate,g=p.view.scale;d.x=d.x/g-f.x;d.y=d.y/g-f.y;d.width/=g; d.height/=g;null!=p.backgroundImage&&(d=mxRectangle.fromRectangle(d),d.add(new mxRectangle(0,0,p.backgroundImage.width,p.backgroundImage.height)));0==d.width||0==d.height?(p.zoomTo(1),m.resetScrollbars()):(f=Editor.fitWindowBorders,null!=f&&(d.x-=f.x,d.y-=f.y,d.width+=f.width+f.x,d.height+=f.height+f.y),p.fitWindow(d))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();var d=p.pageFormat,f=p.pageScale;p.zoomTo(Math.floor(20* @@ -2993,11 +2991,11 @@ p.pageScale)/20);if(mxUtils.hasScrollbars(p.container)){var d=p.getPagePadding() 300,80,!0,!0);d.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var d=new FilenameDialog(this.editorUi,parseInt(100*p.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(f){f=parseInt(f);!isNaN(f)&&0<f&&(f=new ChangePageSetup(m,null,null,null,f/100),f.ignoreColor=!0,f.ignoreImage=!0,p.model.execute(f))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(d.container,300,80,!0,!0);d.init()}));var K=null;K=this.addAction("grid", function(){p.setGridEnabled(!p.isGridEnabled());p.defaultGridEnabled=p.isGridEnabled();m.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");K.setToggleAction(!0);K.setSelectedCallback(function(){return p.isGridEnabled()});K.setEnabled(!1);K=this.addAction("guides",function(){p.graphHandler.guidesEnabled=!p.graphHandler.guidesEnabled;m.fireEvent(new mxEventObject("guidesEnabledChanged"))});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.graphHandler.guidesEnabled}); K.setEnabled(!1);K=this.addAction("tooltips",function(){p.tooltipHandler.setEnabled(!p.tooltipHandler.isEnabled());m.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.tooltipHandler.isEnabled()});K=this.addAction("collapseExpand",function(){var d=new ChangePageSetup(m);d.ignoreColor=!0;d.ignoreImage=!0;d.foldingEnabled=!p.foldingEnabled;p.model.execute(d)});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.foldingEnabled}); -K.isEnabled=E;K=this.addAction("scrollbars",function(){m.setScrollbars(!m.hasScrollbars())});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.scrollbars});K=this.addAction("pageView",mxUtils.bind(this,function(){m.setPageVisible(!p.pageVisible)}));K.setToggleAction(!0);K.setSelectedCallback(function(){return p.pageVisible});K=this.addAction("connectionArrows",function(){p.connectionArrowsEnabled=!p.connectionArrowsEnabled;m.fireEvent(new mxEventObject("connectionArrowsChanged"))},null, +K.isEnabled=F;K=this.addAction("scrollbars",function(){m.setScrollbars(!m.hasScrollbars())});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.scrollbars});K=this.addAction("pageView",mxUtils.bind(this,function(){m.setPageVisible(!p.pageVisible)}));K.setToggleAction(!0);K.setSelectedCallback(function(){return p.pageVisible});K=this.addAction("connectionArrows",function(){p.connectionArrowsEnabled=!p.connectionArrowsEnabled;m.fireEvent(new mxEventObject("connectionArrowsChanged"))},null, null,"Alt+Shift+A");K.setToggleAction(!0);K.setSelectedCallback(function(){return p.connectionArrowsEnabled});K=this.addAction("connectionPoints",function(){p.setConnectable(!p.connectionHandler.isEnabled());m.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");K.setToggleAction(!0);K.setSelectedCallback(function(){return p.connectionHandler.isEnabled()});K=this.addAction("copyConnect",function(){p.connectionHandler.setCreateTarget(!p.connectionHandler.isCreateTarget()); -m.fireEvent(new mxEventObject("copyConnectChanged"))});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.connectionHandler.isCreateTarget()});K.isEnabled=E;K=this.addAction("autosave",function(){m.editor.setAutosave(!m.editor.autosave)});K.setToggleAction(!0);K.setSelectedCallback(function(){return m.editor.autosave});K.isEnabled=E;K.visible=!1;this.addAction("help",function(){var d="";mxResources.isLanguageSupported(mxClient.language)&&(d="_"+mxClient.language);p.openLink(RESOURCES_PATH+ -"/help"+d+".html")});var Q=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){Q||(m.showDialog((new AboutDialog(m)).container,320,280,!0,!0,function(){Q=!1}),Q=!0)}));K=mxUtils.bind(this,function(d,f,g,x){return this.addAction(d,function(){if(null!=g&&p.cellEditor.isContentEditing())g();else{p.stopEditing(!1);p.getModel().beginUpdate();try{var z=p.getEditableCells(p.getSelectionCells());p.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,f,z);(f&mxConstants.FONT_BOLD)== -mxConstants.FONT_BOLD?p.updateLabelElements(z,function(H){H.style.fontWeight=null;"B"==H.nodeName&&p.replaceElement(H)}):(f&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?p.updateLabelElements(z,function(H){H.style.fontStyle=null;"I"==H.nodeName&&p.replaceElement(H)}):(f&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&p.updateLabelElements(z,function(H){H.style.textDecoration=null;"U"==H.nodeName&&p.replaceElement(H)});for(var u=0;u<z.length;u++)0==p.model.getChildCount(z[u])&&p.autoSizeCell(z[u], +m.fireEvent(new mxEventObject("copyConnectChanged"))});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.connectionHandler.isCreateTarget()});K.isEnabled=F;K=this.addAction("autosave",function(){m.editor.setAutosave(!m.editor.autosave)});K.setToggleAction(!0);K.setSelectedCallback(function(){return m.editor.autosave});K.isEnabled=F;K.visible=!1;this.addAction("help",function(){var d="";mxResources.isLanguageSupported(mxClient.language)&&(d="_"+mxClient.language);p.openLink(RESOURCES_PATH+ +"/help"+d+".html")});var P=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){P||(m.showDialog((new AboutDialog(m)).container,320,280,!0,!0,function(){P=!1}),P=!0)}));K=mxUtils.bind(this,function(d,f,g,x){return this.addAction(d,function(){if(null!=g&&p.cellEditor.isContentEditing())g();else{p.stopEditing(!1);p.getModel().beginUpdate();try{var y=p.getEditableCells(p.getSelectionCells());p.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,f,y);(f&mxConstants.FONT_BOLD)== +mxConstants.FONT_BOLD?p.updateLabelElements(y,function(H){H.style.fontWeight=null;"B"==H.nodeName&&p.replaceElement(H)}):(f&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?p.updateLabelElements(y,function(H){H.style.fontStyle=null;"I"==H.nodeName&&p.replaceElement(H)}):(f&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&p.updateLabelElements(y,function(H){H.style.textDecoration=null;"U"==H.nodeName&&p.replaceElement(H)});for(var u=0;u<y.length;u++)0==p.model.getChildCount(y[u])&&p.autoSizeCell(y[u], !1)}finally{p.getModel().endUpdate()}}},null,null,x)});K("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");K("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");K("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){m.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...", function(){m.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){m.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){m.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){m.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL, !0)});this.addAction("shadow",function(){m.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,null),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dashed",function(){p.getModel().beginUpdate(); @@ -3007,18 +3005,18 @@ this.addAction("rounded",function(){p.getModel().beginUpdate();try{p.setCellStyl g="1"==mxUtils.getValue(f,mxConstants.STYLE_ROUNDED,"0")?"0":"1";p.setCellStyles(mxConstants.STYLE_ROUNDED,g);p.setCellStyles(mxConstants.STYLE_CURVED,null);m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[g,"0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}}});this.addAction("curved",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),p.setCellStyles(mxConstants.STYLE_CURVED, "1"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("collapsible",function(){var d=p.view.getState(p.getSelectionCell()),f="1";null!=d&&null!=p.getFoldingImage(d)&&(f="0");p.setCellStyles("collapsible",f);m.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[f],"cells",p.getSelectionCells()))});this.addAction("editStyle...", mxUtils.bind(this,function(){var d=p.getEditableCells(p.getSelectionCells());if(null!=d&&0<d.length){var f=p.getModel();f=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",f.getStyle(d[0])||"",function(g){null!=g&&p.setCellStyle(mxUtils.trim(g),d)},null,null,400,220);this.editorUi.showDialog(f.container,420,300,!0,!0);f.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){p.isEnabled()&&!p.isSelectionEmpty()&&m.setDefaultStyle(p.getSelectionCell())}, -null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){p.isEnabled()&&m.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var d=p.getSelectionCell();if(null!=d&&p.getModel().isEdge(d)){var f=C.graph.selectionCellsHandler.getHandler(d);if(f instanceof mxEdgeHandler){var g=p.view.translate,x=p.view.scale,z=g.x;g=g.y;d=p.getModel().getParent(d);for(var u=p.getCellGeometry(d);p.getModel().isVertex(d)&&null!=u;)z+=u.x,g+=u.y,d= -p.getModel().getParent(d),u=p.getCellGeometry(d);z=Math.round(p.snap(p.popupMenuHandler.triggerX/x-z));x=Math.round(p.snap(p.popupMenuHandler.triggerY/x-g));f.addPointAt(f.state,z,x)}}});this.addAction("removeWaypoint",function(){var d=m.actions.get("removeWaypoint");null!=d.handler&&d.handler.removePoint(d.handler.state,d.index)});this.addAction("clearWaypoints",function(d,f){d=null!=f?f:d;var g=p.getSelectionCells();if(null!=g){g=p.getEditableCells(p.addAllEdges(g));p.getModel().beginUpdate();try{for(var x= -0;x<g.length;x++){var z=g[x];if(p.getModel().isEdge(z)){var u=p.getCellGeometry(z);null!=f&&mxEvent.isShiftDown(d)?(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[z]),p.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[z]),p.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[z]),p.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[z])):null!=u&&(u=u.clone(),u.points=null,u.x=0,u.y=0,u.offset=null,p.getModel().setGeometry(z,u))}}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+C");K=this.addAction("subscript", +null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){p.isEnabled()&&m.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var d=p.getSelectionCell();if(null!=d&&p.getModel().isEdge(d)){var f=C.graph.selectionCellsHandler.getHandler(d);if(f instanceof mxEdgeHandler){var g=p.view.translate,x=p.view.scale,y=g.x;g=g.y;d=p.getModel().getParent(d);for(var u=p.getCellGeometry(d);p.getModel().isVertex(d)&&null!=u;)y+=u.x,g+=u.y,d= +p.getModel().getParent(d),u=p.getCellGeometry(d);y=Math.round(p.snap(p.popupMenuHandler.triggerX/x-y));x=Math.round(p.snap(p.popupMenuHandler.triggerY/x-g));f.addPointAt(f.state,y,x)}}});this.addAction("removeWaypoint",function(){var d=m.actions.get("removeWaypoint");null!=d.handler&&d.handler.removePoint(d.handler.state,d.index)});this.addAction("clearWaypoints",function(d,f){d=null!=f?f:d;var g=p.getSelectionCells();if(null!=g){g=p.getEditableCells(p.addAllEdges(g));p.getModel().beginUpdate();try{for(var x= +0;x<g.length;x++){var y=g[x];if(p.getModel().isEdge(y)){var u=p.getCellGeometry(y);null!=f&&mxEvent.isShiftDown(d)?(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[y]),p.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[y]),p.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[y]),p.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[y])):null!=u&&(u=u.clone(),u.points=null,u.x=0,u.y=0,u.offset=null,p.getModel().setGeometry(y,u))}}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+C");K=this.addAction("subscript", mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");K=this.addAction("superscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var d=mxResources.get("image")+" ("+mxResources.get("url")+"):",f=p.getView().getState(p.getSelectionCell()), -g="",x=null;null!=f&&(g=f.style[mxConstants.STYLE_IMAGE]||g,x=f.style[mxConstants.STYLE_CLIP_PATH]||x);var z=p.cellEditor.saveSelection();m.showImageDialog(d,g,function(u,H,J,D,G,V){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(z),p.insertImage(u,H,J);else{var U=p.getSelectionCells();if(null!=u&&(0<u.length||0<U.length)){var Y=null;p.getModel().beginUpdate();try{if(0==U.length){U=[p.insertVertex(p.getDefaultParent(),null,"",0,0,H,J,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")]; -var O=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(U,!0));U[0].geometry.x=O.x;U[0].geometry.y=O.y;null!=D&&k(U[0],D,G,V,p);Y=U;p.fireEvent(new mxEventObject("cellsInserted","cells",Y))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<u.length?u:null,U);var qa=p.getCurrentCellStyle(U[0]);"image"!=qa[mxConstants.STYLE_SHAPE]&&"label"!=qa[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",U):0==u.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,U);null==D&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH, -null,U);if(null!=H&&null!=J)for(u=0;u<U.length;u++){var oa=U[u];if("0"!=p.getCurrentCellStyle(oa).expand){var aa=p.getModel().getGeometry(oa);null!=aa&&(aa=aa.clone(),aa.width=H,aa.height=J,p.getModel().setGeometry(oa,aa))}null!=D&&k(oa,D,G,V,p)}}finally{p.getModel().endUpdate()}null!=Y&&(p.setSelectionCells(Y),p.scrollCellToVisible(Y[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,x)}}).isEnabled=E;this.addAction("crop...",function(){var d=p.getSelectionCell();if(p.isEnabled()&& -!p.isCellLocked(p.getDefaultParent())&&null!=d){var f=p.getCurrentCellStyle(d),g=f[mxConstants.STYLE_IMAGE],x=f[mxConstants.STYLE_SHAPE];g&&"image"==x&&(f=new CropImageDialog(m,g,f[mxConstants.STYLE_CLIP_PATH],function(z,u,H){k(d,z,u,H,p)}),m.showDialog(f.container,300,390,!0,!0))}}).isEnabled=E;K=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(m,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show", +g="",x=null;null!=f&&(g=f.style[mxConstants.STYLE_IMAGE]||g,x=f.style[mxConstants.STYLE_CLIP_PATH]||x);var y=p.cellEditor.saveSelection();m.showImageDialog(d,g,function(u,H,J,D,G,W){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(y),p.insertImage(u,H,J);else{var T=p.getSelectionCells();if(null!=u&&(0<u.length||0<T.length)){var Z=null;p.getModel().beginUpdate();try{if(0==T.length){T=[p.insertVertex(p.getDefaultParent(),null,"",0,0,H,J,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")]; +var N=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(T,!0));T[0].geometry.x=N.x;T[0].geometry.y=N.y;null!=D&&k(T[0],D,G,W,p);Z=T;p.fireEvent(new mxEventObject("cellsInserted","cells",Z))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<u.length?u:null,T);var qa=p.getCurrentCellStyle(T[0]);"image"!=qa[mxConstants.STYLE_SHAPE]&&"label"!=qa[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",T):0==u.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,T);null==D&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH, +null,T);if(null!=H&&null!=J)for(u=0;u<T.length;u++){var oa=T[u];if("0"!=p.getCurrentCellStyle(oa).expand){var S=p.getModel().getGeometry(oa);null!=S&&(S=S.clone(),S.width=H,S.height=J,p.getModel().setGeometry(oa,S))}null!=D&&k(oa,D,G,W,p)}}finally{p.getModel().endUpdate()}null!=Z&&(p.setSelectionCells(Z),p.scrollCellToVisible(Z[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,x)}}).isEnabled=F;this.addAction("crop...",function(){var d=p.getSelectionCell();if(p.isEnabled()&& +!p.isCellLocked(p.getDefaultParent())&&null!=d){var f=p.getCurrentCellStyle(d),g=f[mxConstants.STYLE_IMAGE],x=f[mxConstants.STYLE_SHAPE];g&&"image"==x&&(f=new CropImageDialog(m,g,f[mxConstants.STYLE_CLIP_PATH],function(y,u,H){k(d,y,u,H,p)}),m.showDialog(f.container,300,390,!0,!0))}}).isEnabled=F;K=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(m,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show", mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");K.setToggleAction(!0);K.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()})); K=this.addAction("formatPanel",mxUtils.bind(this,function(){m.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");K.setToggleAction(!0);K.setSelectedCallback(mxUtils.bind(this,function(){return 0<m.formatWidth}));K=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(m,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("outline"))})), this.outlineWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");K.setToggleAction(!0);K.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var d= -p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=d){var f=new ConnectionPointsDialog(m,d);m.showDialog(f.container,350,450,!0,!1,function(){f.destroy()});f.init()}}).isEnabled=E};Actions.prototype.addAction=function(b,e,k,m,C){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var p=mxResources.get(b)+"..."}else p=mxResources.get(b);return this.put(b,new Action(p,e,k,m,C))};Actions.prototype.put=function(b,e){return this.actions[b]=e}; +p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=d){var f=new ConnectionPointsDialog(m,d);m.showDialog(f.container,350,450,!0,!1,function(){f.destroy()});f.init()}}).isEnabled=F};Actions.prototype.addAction=function(b,e,k,m,C){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var p=mxResources.get(b)+"..."}else p=mxResources.get(b);return this.put(b,new Action(p,e,k,m,C))};Actions.prototype.put=function(b,e){return this.actions[b]=e}; Actions.prototype.get=function(b){return this.actions[b]};function Action(b,e,k,m,C){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(e);this.enabled=null!=k?k:!0;this.iconCls=m;this.shortcut=C;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(b){return b};Action.prototype.setEnabled=function(b){this.enabled!=b&&(this.enabled=b,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled}; Action.prototype.setToggleAction=function(b){this.toggleAction=b};Action.prototype.setSelectedCallback=function(b){this.selectedCallback=b};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(b,e){mxEventSource.call(this);this.ui=b;this.setData(e||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource); DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1; @@ -3026,28 +3024,28 @@ DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};DrawioFile.prototype.synchronizeFile=function(b,e){this.savingFile?null!=e&&e({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,function(k){this.sync.cleanup(b,e,k)}),e):this.updateFile(b,e)}; DrawioFile.prototype.updateFile=function(b,e,k,m){null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(C){try{null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[C]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=C?this.mergeFile(C,b,e,m):this.reloadFile(b, e))}catch(p){null!=e&&e(p)}}),e))}; -DrawioFile.prototype.mergeFile=function(b,e,k,m){var C=!0;try{this.stats.fileMerged++;var p=this.getShadowPages(),E=b.getShadowPages();if(null!=E&&0<E.length){var K=[this.ui.diffPages(null!=m?m:p,E)],Q=this.ignorePatches(K);this.setShadowPages(E);if(Q)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",Q);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(p,this.ui.pages):null;m={};Q={};var d=this.ui.patchPages(p,K[0]),f=this.ui.getHashValueForPages(d, -m),g=this.ui.getHashValueForPages(E,Q);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",p,"pages",this.ui.pages,"patches",K,"backup",this.backupPatch,"checksum",f,"current",g,"valid",f==g,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=f&&f!=g){var x=this.compressReportData(this.getAnonymizedXmlForPages(E)),z=this.compressReportData(this.getAnonymizedXmlForPages(d)),u=this.ui.hashValue(b.getCurrentEtag()),H=this.ui.hashValue(this.getCurrentEtag()); -this.checksumError(k,K,"Shadow Details: "+JSON.stringify(m)+"\nChecksum: "+f+"\nCurrent: "+g+"\nCurrent Details: "+JSON.stringify(Q)+"\nFrom: "+u+"\nTo: "+H+"\n\nFile Data:\n"+x+"\nPatched Shadow:\n"+z,null,"mergeFile",f,g,b.getCurrentRevisionId());return}if(null!=this.sync){var J=this.sync.patchRealtime(K,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==J||mxUtils.isEmptyObject(J)||K.push(J)}this.patch(K,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw C=!1,Error(mxResources.get("notADiagramFile")); -this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(V){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(V);try{if(C)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,V);else{var D=this.getCurrentUser(),G=null!=D?D.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),G,V)}}catch(U){}}}; +DrawioFile.prototype.mergeFile=function(b,e,k,m){var C=!0;try{this.stats.fileMerged++;var p=this.getShadowPages(),F=b.getShadowPages();if(null!=F&&0<F.length){var K=[this.ui.diffPages(null!=m?m:p,F)],P=this.ignorePatches(K);this.setShadowPages(F);if(P)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",P);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(p,this.ui.pages):null;m={};P={};var d=this.ui.patchPages(p,K[0]),f=this.ui.getHashValueForPages(d, +m),g=this.ui.getHashValueForPages(F,P);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",p,"pages",this.ui.pages,"patches",K,"backup",this.backupPatch,"checksum",f,"current",g,"valid",f==g,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=f&&f!=g){var x=this.compressReportData(this.getAnonymizedXmlForPages(F)),y=this.compressReportData(this.getAnonymizedXmlForPages(d)),u=this.ui.hashValue(b.getCurrentEtag()),H=this.ui.hashValue(this.getCurrentEtag()); +this.checksumError(k,K,"Shadow Details: "+JSON.stringify(m)+"\nChecksum: "+f+"\nCurrent: "+g+"\nCurrent Details: "+JSON.stringify(P)+"\nFrom: "+u+"\nTo: "+H+"\n\nFile Data:\n"+x+"\nPatched Shadow:\n"+y,null,"mergeFile",f,g,b.getCurrentRevisionId());return}if(null!=this.sync){var J=this.sync.patchRealtime(K,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==J||mxUtils.isEmptyObject(J)||K.push(J)}this.patch(K,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw C=!1,Error(mxResources.get("notADiagramFile")); +this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(W){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(W);try{if(C)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,W);else{var D=this.getCurrentUser(),G=null!=D?D.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),G,W)}}catch(T){}}}; DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),k=e.document.createElement("mxfile");if(null!=b)for(var m=0;m<b.length;m++){var C=e.encode(new mxGraphModel(b[m].root));"1"!=urlParams.dev&&(C=this.ui.anonymizeNode(C,!0));C.setAttribute("id",b[m].getId());b[m].viewState&&this.ui.editor.graph.saveViewState(b[m].viewState,C,!0);k.appendChild(C)}return mxUtils.getPrettyXml(k)}; DrawioFile.prototype.compressReportData=function(b,e,k){e=null!=e?e:1E4;null!=k&&null!=b&&b.length>k?b=b.substring(0,k)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b}; -DrawioFile.prototype.checksumError=function(b,e,k,m,C,p,E,K){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(var Q=0;Q<e.length;Q++)this.ui.anonymizePatch(e[Q]);var d=mxUtils.bind(this,function(H){var J=this.compressReportData(JSON.stringify(e,null,2));H=null==H?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(H.data)), -25E3);this.sendErrorReport("Checksum Error in "+C+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+J+(null!=H?"\n\nRemote:\n"+H:""),null,7E4)});null==m?d(null):this.getLatestVersion(mxUtils.bind(this,function(H){null!=H&&H.getCurrentEtag()==m?d(H):d(null)}),function(){})}else{var f=this.getCurrentUser(),g=null!=f?f.id:"unknown",x=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",z=JSON.stringify(e).length,u=null;if(null!=e&&this.constructor==DriveFile&&400>z){for(Q=0;Q<e.length;Q++)this.ui.anonymizePatch(e[Q]); -u=JSON.stringify(e);u=null!=u&&250>u.length?Graph.compress(u):null}this.getLatestVersion(mxUtils.bind(this,function(H){try{var J=null!=u?"Report":"Error",D=this.ui.getHashValueForPages(H.getShadowPages());EditorUi.logError("Checksum "+J+" in "+C+" "+x,null,this.getMode()+"."+this.getId(),"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+z+"-patches_"+e.length+(null!=u?"-json_"+u:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=E?"-current_"+E:"")+(null!=K? -"-rev_"+this.ui.hashValue(K):"")+(null!=D?"-latest_"+D:"")+(null!=H?"-latestRev_"+this.ui.hashValue(H.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+x,action:C,label:"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+z+"-patches_"+e.length+"-size_"+this.getSize()})}catch(G){}}),b)}}catch(H){}}; -DrawioFile.prototype.sendErrorReport=function(b,e,k,m){try{var C=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),E=this.getCurrentUser(),K=null!=E?this.ui.hashValue(E.id):"unknown",Q=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",d=this.getTitle(),f=d.lastIndexOf(".");E="xml";0<f&&(E=d.substring(f));var g=null!=k?k.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+ -":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+E+")\nUser="+K+Q+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e: +DrawioFile.prototype.checksumError=function(b,e,k,m,C,p,F,K){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(var P=0;P<e.length;P++)this.ui.anonymizePatch(e[P]);var d=mxUtils.bind(this,function(H){var J=this.compressReportData(JSON.stringify(e,null,2));H=null==H?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(H.data)), +25E3);this.sendErrorReport("Checksum Error in "+C+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+J+(null!=H?"\n\nRemote:\n"+H:""),null,7E4)});null==m?d(null):this.getLatestVersion(mxUtils.bind(this,function(H){null!=H&&H.getCurrentEtag()==m?d(H):d(null)}),function(){})}else{var f=this.getCurrentUser(),g=null!=f?f.id:"unknown",x=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",y=JSON.stringify(e).length,u=null;if(null!=e&&this.constructor==DriveFile&&400>y){for(P=0;P<e.length;P++)this.ui.anonymizePatch(e[P]); +u=JSON.stringify(e);u=null!=u&&250>u.length?Graph.compress(u):null}this.getLatestVersion(mxUtils.bind(this,function(H){try{var J=null!=u?"Report":"Error",D=this.ui.getHashValueForPages(H.getShadowPages());EditorUi.logError("Checksum "+J+" in "+C+" "+x,null,this.getMode()+"."+this.getId(),"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+y+"-patches_"+e.length+(null!=u?"-json_"+u:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=F?"-current_"+F:"")+(null!=K? +"-rev_"+this.ui.hashValue(K):"")+(null!=D?"-latest_"+D:"")+(null!=H?"-latestRev_"+this.ui.hashValue(H.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+x,action:C,label:"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+y+"-patches_"+e.length+"-size_"+this.getSize()})}catch(G){}}),b)}}catch(H){}}; +DrawioFile.prototype.sendErrorReport=function(b,e,k,m){try{var C=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),F=this.getCurrentUser(),K=null!=F?this.ui.hashValue(F.id):"unknown",P=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",d=this.getTitle(),f=d.lastIndexOf(".");F="xml";0<f&&(F=d.substring(f));var g=null!=k?k.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+ +":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+F+")\nUser="+K+P+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e: "")+(null!=k?"\n\nError: "+k.message:"")+"\n\nStack:\n"+g+"\n\nShadow:\n"+C+"\n\nData:\n"+p,m)}catch(x){}}; -DrawioFile.prototype.reloadFile=function(b,e){try{this.ui.spinner.stop();var k=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),e);else{var m=this.ui.editor.graph,C=m.getSelectionCells(),p=m.getViewState(),E= -this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(E,p,C);null!=this.backupPatch&&this.patch([this.backupPatch]);var K=this.ui.getCurrentFile();null!=K&&(K.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),k,mxResources.get("cancel"),mxResources.get("discardChanges")): +DrawioFile.prototype.reloadFile=function(b,e){try{this.ui.spinner.stop();var k=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),e);else{var m=this.ui.editor.graph,C=m.getSelectionCells(),p=m.getViewState(),F= +this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(F,p,C);null!=this.backupPatch&&this.patch([this.backupPatch]);var K=this.ui.getCurrentFile();null!=K&&(K.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),k,mxResources.get("cancel"),mxResources.get("discardChanges")): k()}catch(m){null!=e&&e(m)}};DrawioFile.prototype.mergeLatestVersion=function(b,e,k){this.getLatestVersion(mxUtils.bind(this,function(m){this.ui.editor.graph.model.beginUpdate();try{this.ui.replaceFileData(m.getData()),null!=b&&this.patch(b)}finally{this.ui.editor.graph.model.endUpdate()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(m.getDescriptor());this.descriptorChanged();null!=e&&e()}),k)}; DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var e=!0;if(null!=b)for(var k=0;k<b.length&&e;k++)e=e&&mxUtils.isEmptyObject(b[k]);return e}; -DrawioFile.prototype.patch=function(b,e,k){if(null!=b){var m=this.ui.editor.undoManager,C=m.history.slice(),p=m.indexOfNextAdd,E=this.ui.editor.graph;E.container.style.visibility="hidden";var K=this.changeListenerEnabled;this.changeListenerEnabled=k;var Q=E.foldingEnabled,d=E.mathEnabled,f=E.cellRenderer.redraw;E.cellRenderer.redraw=function(g){g.view.graph.isEditing(g.cell)&&(g.view.graph.scrollCellToVisible(g.cell),g.view.graph.cellEditor.resize());f.apply(this,arguments)};E.model.beginUpdate(); -try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{E.container.style.visibility="";E.model.endUpdate();E.cellRenderer.redraw=f;this.changeListenerEnabled=K;k||(m.history=C,m.indexOfNextAdd=p,m.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)d!=E.mathEnabled? -(this.ui.editor.updateGraphComponents(),E.refresh()):(Q!=E.foldingEnabled?E.view.revalidate():E.view.validate(),E.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",k)}return b}; +DrawioFile.prototype.patch=function(b,e,k){if(null!=b){var m=this.ui.editor.undoManager,C=m.history.slice(),p=m.indexOfNextAdd,F=this.ui.editor.graph;F.container.style.visibility="hidden";var K=this.changeListenerEnabled;this.changeListenerEnabled=k;var P=F.foldingEnabled,d=F.mathEnabled,f=F.cellRenderer.redraw;F.cellRenderer.redraw=function(g){g.view.graph.isEditing(g.cell)&&(g.view.graph.scrollCellToVisible(g.cell),g.view.graph.cellEditor.resize());f.apply(this,arguments)};F.model.beginUpdate(); +try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{F.container.style.visibility="";F.model.endUpdate();F.cellRenderer.redraw=f;this.changeListenerEnabled=K;k||(m.history=C,m.indexOfNextAdd=p,m.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)d!=F.mathEnabled? +(this.ui.editor.updateGraphComponents(),F.refresh()):(P!=F.foldingEnabled?F.view.revalidate():F.view.validate(),F.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",k)}return b}; DrawioFile.prototype.save=function(b,e,k,m,C,p){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",m,"overwrite",C,"manual",p,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!C&&this.invalidChecksum)if(null!=k)k({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=k)k({message:mxResources.get("readOnly")}); -else throw Error(mxResources.get("readOnly"));}catch(E){if(null!=k)k(E);else throw E;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var e=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=e&&(e.viewState=this.ui.editor.graph.getViewState(),e.needsUpdate=!0)}e=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return e}; +else throw Error(mxResources.get("readOnly"));}catch(F){if(null!=k)k(F);else throw F;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var e=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=e&&(e.viewState=this.ui.editor.graph.getViewState(),e.needsUpdate=!0)}e=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return e}; DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,e,k){}; DrawioFile.prototype.saveFile=function(b,e,k,m){};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};DrawioFile.prototype.isAutosaveOptional=function(){return!1}; DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,e,k){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,e,k){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""}; @@ -3084,26 +3082,26 @@ DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.u !1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))}; DrawioFile.prototype.handleFileError=function(b,e){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,e):(this.isModified()&&this.addUnsavedStatus(b),e?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||(b=this.getErrorMessage(b),null!=b&&60<b.length&&(b=b.substring(0,60)+"..."),this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+(null!=b?" ("+mxUtils.htmlEntities(b)+ ")":"")+"</div>"))))}; -DrawioFile.prototype.handleConflictError=function(b,e){var k=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),m=mxUtils.bind(this,function(E){this.handleFileError(E,!0)}),C=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,k,m,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),p=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&& +DrawioFile.prototype.handleConflictError=function(b,e){var k=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),m=mxUtils.bind(this,function(F){this.handleFileError(F,!0)}),C=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,k,m,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),p=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&& this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,k,m,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),m)});"none"==DrawioFile.SYNC?this.showCopyDialog(k,m,C):this.invalidChecksum?this.showRefreshDialog(k,m,this.getErrorMessage(b)):e?this.showConflictDialog(C,p):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument"))); this.synchronizeFile(k,m)}),this.getErrorMessage(b))};DrawioFile.prototype.getErrorMessage=function(b){var e=null!=b?null!=b.error?b.error.message:b.message:null;null==e&&null!=b&&b.code==App.ERROR_TIMEOUT&&(e=mxResources.get("timeout"));return e};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval}; DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(e){this.ui.stopSanityCheck(); null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(e){this.handleFileError(e)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()}; DrawioFile.prototype.createSecret=function(b){var e=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(e):this.sync.createToken(e,mxUtils.bind(this,function(k){b(e,k)}),mxUtils.bind(this,function(){b(e)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()}; -DrawioFile.prototype.fileSaved=function(b,e,k,m,C){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var p=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(p),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=k&&k()):this.sync.fileSaved(p,e,k,m,C)}catch(Q){this.invalidChecksum=this.inConflictState= -!0;this.descriptorChanged();null!=m&&m(Q);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,Q);else{var E=this.getCurrentUser(),K=null!=E?E.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),K,Q)}}catch(d){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}; +DrawioFile.prototype.fileSaved=function(b,e,k,m,C){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var p=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(p),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=k&&k()):this.sync.fileSaved(p,e,k,m,C)}catch(P){this.invalidChecksum=this.inConflictState= +!0;this.descriptorChanged();null!=m&&m(P);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,P);else{var F=this.getCurrentUser(),K=null!=F?F.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),K,P)}}catch(d){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}; DrawioFile.prototype.autosave=function(b,e,k,m){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var C=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==C&&(this.autosaveThread=null);EditorUi.debug("DrawioFile.autosave",[this],"thread",C,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile);if(this.isModified()&&this.isAutosaveNow()){var p=this.isAutosaveRevision(); -p&&(this.lastAutosaveRevision=(new Date).getTime());this.save(p,mxUtils.bind(this,function(E){this.autosaveCompleted();null!=k&&k(E)}),mxUtils.bind(this,function(E){null!=m&&m(E)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=k&&k(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",C,"delay",b,"saving",this.savingFile);this.autosaveThread=C};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){}; +p&&(this.lastAutosaveRevision=(new Date).getTime());this.save(p,mxUtils.bind(this,function(F){this.autosaveCompleted();null!=k&&k(F)}),mxUtils.bind(this,function(F){null!=m&&m(F)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=k&&k(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",C,"delay",b,"saving",this.savingFile);this.autosaveThread=C};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){}; DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))}; DrawioFile.prototype.close=function(b){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,b);this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,e){if(null!=b&&null!=e){var k=b.lastIndexOf(".");b=0<k?b.substring(k):"";k=e.lastIndexOf(".");return b===(0<k?e.substring(k):"")}return b==e}; DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.clearAutosave();this.removeListeners();this.stats.destroyed++;null!=this.sync&&(this.sync.destroy(),this.sync=null)};DrawioFile.prototype.commentsSupported=function(){return!1}; DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,e){b([])};DrawioFile.prototype.addComment=function(b,e,k){e(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,e){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,e)};LocalFile=function(b,e,k,m,C,p){DrawioFile.call(this,b,e);this.title=k;this.mode=m?null:App.MODE_DEVICE;this.fileHandle=C;this.desc=p};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title}; LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,e,k){this.saveAs(this.title,e,k)};LocalFile.prototype.saveAs=function(b,e,k){this.saveFile(b,!1,e,k)};LocalFile.prototype.saveAs=function(b,e,k){this.saveFile(b,!1,e,k)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b}; LocalFile.prototype.getLatestVersion=function(b,e){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,e)}; -LocalFile.prototype.saveFile=function(b,e,k,m,C){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;C||this.updateFileData();var p=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var E=this.getData(),K=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),Q=mxUtils.bind(this,function(d){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var f=mxUtils.bind(this, -function(x){this.savingFile=!1;null!=m&&m({error:x})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(x){this.fileHandle.getFile().then(mxUtils.bind(this,function(z){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[z],"conflict",this.desc.lastModified!=z.lastModified);this.desc.lastModified==z.lastModified?x.write(p?this.ui.base64ToBlob(d,"image/png"):d).then(mxUtils.bind(this,function(){x.close().then(mxUtils.bind(this, -function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(u){try{var H=this.desc;this.savingFile=!1;this.desc=u;this.fileSaved(E,H,K,f);this.removeDraft()}catch(J){f(J)}}),f)}),f)}),f):(this.inConflictState=!0,f())}),mxUtils.bind(this,function(z){this.invalidFileHandle=!0;f(z)}))}),f)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(d,b,p?"image/png":"text/xml",p);else if(d.length<MAX_REQUEST_SIZE){var g=b.lastIndexOf(".");g=0<g?b.substring(g+1):"xml"; -(new mxXmlRequest(SAVE_URL,"format="+g+"&xml="+encodeURIComponent(d)+"&filename="+encodeURIComponent(b)+(p?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}));K()}});p?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(d){Q(d)}),m,this.ui.getCurrentFile()!=this?E:null,e.scale,e.border)):Q(E)}; +LocalFile.prototype.saveFile=function(b,e,k,m,C){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;C||this.updateFileData();var p=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var F=this.getData(),K=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),P=mxUtils.bind(this,function(d){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var f=mxUtils.bind(this, +function(x){this.savingFile=!1;null!=m&&m({error:x})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(x){this.fileHandle.getFile().then(mxUtils.bind(this,function(y){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[y],"conflict",this.desc.lastModified!=y.lastModified);this.desc.lastModified==y.lastModified?x.write(p?this.ui.base64ToBlob(d,"image/png"):d).then(mxUtils.bind(this,function(){x.close().then(mxUtils.bind(this, +function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(u){try{var H=this.desc;this.savingFile=!1;this.desc=u;this.fileSaved(F,H,K,f);this.removeDraft()}catch(J){f(J)}}),f)}),f)}),f):(this.inConflictState=!0,f())}),mxUtils.bind(this,function(y){this.invalidFileHandle=!0;f(y)}))}),f)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(d,b,p?"image/png":"text/xml",p);else if(d.length<MAX_REQUEST_SIZE){var g=b.lastIndexOf(".");g=0<g?b.substring(g+1):"xml"; +(new mxXmlRequest(SAVE_URL,"format="+g+"&xml="+encodeURIComponent(d)+"&filename="+encodeURIComponent(b)+(p?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}));K()}});p?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(d){P(d)}),m,this.ui.getCurrentFile()!=this?F:null,e.scale,e.border)):P(F)}; LocalFile.prototype.rename=function(b,e,k){this.title=b;this.descriptorChanged();null!=e&&e()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"}, {description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}}, {commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"}, @@ -3116,7 +3114,6 @@ Editor.commentImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53M Editor.shareImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTggMTYuMDhjLS43NiAwLTEuNDQuMy0xLjk2Ljc3TDguOTEgMTIuN2MuMDUtLjIzLjA5LS40Ni4wOS0uN3MtLjA0LS40Ny0uMDktLjdsNy4wNS00LjExYy41NC41IDEuMjUuODEgMi4wNC44MSAxLjY2IDAgMy0xLjM0IDMtM3MtMS4zNC0zLTMtMy0zIDEuMzQtMyAzYzAgLjI0LjA0LjQ3LjA5LjdMOC4wNCA5LjgxQzcuNSA5LjMxIDYuNzkgOSA2IDljLTEuNjYgMC0zIDEuMzQtMyAzczEuMzQgMyAzIDNjLjc5IDAgMS41LS4zMSAyLjA0LS44MWw3LjEyIDQuMTZjLS4wNS4yMS0uMDguNDMtLjA4LjY1IDAgMS42MSAxLjMxIDIuOTIgMi45MiAyLjkyIDEuNjEgMCAyLjkyLTEuMzEgMi45Mi0yLjkycy0xLjMxLTIuOTItMi45Mi0yLjkyeiIvPjwvc3ZnPg=="; Editor.syncImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgNFYxTDggNWw0IDRWNmMzLjMxIDAgNiAyLjY5IDYgNiAwIDEuMDEtLjI1IDEuOTctLjcgMi44bDEuNDYgMS40NkMxOS41NCAxNS4wMyAyMCAxMy41NyAyMCAxMmMwLTQuNDItMy41OC04LTgtOHptMCAxNGMtMy4zMSAwLTYtMi42OS02LTYgMC0xLjAxLjI1LTEuOTcuNy0yLjhMNS4yNCA3Ljc0QzQuNDYgOC45NyA0IDEwLjQzIDQgMTJjMCA0LjQyIDMuNTggOCA4IDh2M2w0LTQtNC00djN6Ii8+PC9zdmc+";Editor.cloudImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEyIDZjMi42MiAwIDQuODggMS44NiA1LjM5IDQuNDNsLjMgMS41IDEuNTMuMTFjMS41Ni4xIDIuNzggMS40MSAyLjc4IDIuOTYgMCAxLjY1LTEuMzUgMy0zIDNINmMtMi4yMSAwLTQtMS43OS00LTQgMC0yLjA1IDEuNTMtMy43NiAzLjU2LTMuOTdsMS4wNy0uMTEuNS0uOTVDOC4wOCA3LjE0IDkuOTQgNiAxMiA2bTAtMkM5LjExIDQgNi42IDUuNjQgNS4zNSA4LjA0IDIuMzQgOC4zNiAwIDEwLjkxIDAgMTRjMCAzLjMxIDIuNjkgNiA2IDZoMTNjMi43NiAwIDUtMi4yNCA1LTUgMC0yLjY0LTIuMDUtNC43OC00LjY1LTQuOTZDMTguNjcgNi41OSAxNS42NCA0IDEyIDR6Ii8+PC9zdmc+"; Editor.cloudOffImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTI0IDE1YzAtMi42NC0yLjA1LTQuNzgtNC42NS00Ljk2QzE4LjY3IDYuNTkgMTUuNjQgNCAxMiA0Yy0xLjMzIDAtMi41Ny4zNi0zLjY1Ljk3bDEuNDkgMS40OUMxMC41MSA2LjE3IDExLjIzIDYgMTIgNmMzLjA0IDAgNS41IDIuNDYgNS41IDUuNXYuNUgxOWMxLjY2IDAgMyAxLjM0IDMgMyAwIC45OS0uNDggMS44NS0xLjIxIDIuNGwxLjQxIDEuNDFjMS4wOS0uOTIgMS44LTIuMjcgMS44LTMuODF6TTQuNDEgMy44NkwzIDUuMjdsMi43NyAyLjc3aC0uNDJDMi4zNCA4LjM2IDAgMTAuOTEgMCAxNGMwIDMuMzEgMi42OSA2IDYgNmgxMS43M2wyIDIgMS40MS0xLjQxTDQuNDEgMy44NnpNNiAxOGMtMi4yMSAwLTQtMS43OS00LTRzMS43OS00IDQtNGgxLjczbDggOEg2eiIvPjwvc3ZnPg=="; -Editor.syncDisabledImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTAgNi4zNVY0LjI2Yy0uOC4yMS0xLjU1LjU0LTIuMjMuOTZsMS40NiAxLjQ2Yy4yNS0uMTIuNS0uMjQuNzctLjMzem0tNy4xNC0uOTRsMi4zNiAyLjM2QzQuNDUgOC45OSA0IDEwLjQ0IDQgMTJjMCAyLjIxLjkxIDQuMiAyLjM2IDUuNjRMNCAyMGg2di02bC0yLjI0IDIuMjRDNi42OCAxNS4xNSA2IDEzLjY2IDYgMTJjMC0xIC4yNS0xLjk0LjY4LTIuNzdsOC4wOCA4LjA4Yy0uMjUuMTMtLjUuMjUtLjc3LjM0djIuMDljLjgtLjIxIDEuNTUtLjU0IDIuMjMtLjk2bDIuMzYgMi4zNiAxLjI3LTEuMjdMNC4xNCA0LjE0IDIuODYgNS40MXpNMjAgNGgtNnY2bDIuMjQtMi4yNEMxNy4zMiA4Ljg1IDE4IDEwLjM0IDE4IDEyYzAgMS0uMjUgMS45NC0uNjggMi43N2wxLjQ2IDEuNDZDMTkuNTUgMTUuMDEgMjAgMTMuNTYgMjAgMTJjMC0yLjIxLS45MS00LjItMi4zNi01LjY0TDIwIDR6Ii8+PC9zdmc+"; Editor.calendarImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48cGF0aCBkPSJNMjAsNEg0QzIuOSw0LDIsNC45LDIsNnYxMmMwLDEuMSwwLjksMiwyLDJoMTZjMS4xLDAsMi0wLjksMi0yVjZDMjIsNC45LDIxLjEsNCwyMCw0eiBNOCwxMUg0VjZoNFYxMXogTTE0LDExaC00VjZoNFYxMXogTTIwLDExaC00VjZoNFYxMXogTTgsMThINHYtNWg0VjE4eiBNMTQsMThoLTR2LTVoNFYxOHogTTIwLDE4aC00di01aDRWMTh6Ii8+PC9nPjwvc3ZnPg=="; Editor.syncProblemImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyAxMmMwIDIuMjEuOTEgNC4yIDIuMzYgNS42NEwzIDIwaDZ2LTZsLTIuMjQgMi4yNEM1LjY4IDE1LjE1IDUgMTMuNjYgNSAxMmMwLTIuNjEgMS42Ny00LjgzIDQtNS42NVY0LjI2QzUuNTUgNS4xNSAzIDguMjcgMyAxMnptOCA1aDJ2LTJoLTJ2MnpNMjEgNGgtNnY2bDIuMjQtMi4yNEMxOC4zMiA4Ljg1IDE5IDEwLjM0IDE5IDEyYzAgMi42MS0xLjY3IDQuODMtNCA1LjY1djIuMDljMy40NS0uODkgNi00LjAxIDYtNy43NCAwLTIuMjEtLjkxLTQuMi0yLjM2LTUuNjRMMjEgNHptLTEwIDloMlY3aC0ydjZ6Ii8+PC9zdmc+"; Editor.tailSpin="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9Ii0yIC0yIDQ0IDQ0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogICAgPGRlZnM+CiAgICAgICAgPGxpbmVhckdyYWRpZW50IHgxPSI4LjA0MiUiIHkxPSIwJSIgeDI9IjY1LjY4MiUiIHkyPSIyMy44NjUlIiBpZD0iYSI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiM4MDgwODAiIHN0b3Atb3BhY2l0eT0iMCIgb2Zmc2V0PSIwJSIvPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjODA4MDgwIiBzdG9wLW9wYWNpdHk9Ii42MzEiIG9mZnNldD0iNjMuMTQ2JSIvPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjODA4MDgwIiBvZmZzZXQ9IjEwMCUiLz4KICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPC9kZWZzPgogICAgPGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxIDEpIj4KICAgICAgICAgICAgPHBhdGggZD0iTTM2IDE4YzAtOS45NC04LjA2LTE4LTE4LTE4IiBzdHJva2U9InVybCgjYSkiIHN0cm9rZS13aWR0aD0iNiI+CiAgICAgICAgICAgICAgICA8YW5pbWF0ZVRyYW5zZm9ybQogICAgICAgICAgICAgICAgICAgIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIKICAgICAgICAgICAgICAgICAgICB0eXBlPSJyb3RhdGUiCiAgICAgICAgICAgICAgICAgICAgZnJvbT0iMCAxOCAxOCIKICAgICAgICAgICAgICAgICAgICB0bz0iMzYwIDE4IDE4IgogICAgICAgICAgICAgICAgICAgIGR1cj0iMC45cyIKICAgICAgICAgICAgICAgICAgICByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgLz4KICAgICAgICAgICAgPC9wYXRoPgogICAgICAgICAgICA8Y2lyY2xlIGZpbGw9IiM4MDgwODAiIGN4PSIzNiIgY3k9IjE4IiByPSIxIj4KICAgICAgICAgICAgICAgIDxhbmltYXRlVHJhbnNmb3JtCiAgICAgICAgICAgICAgICAgICAgYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIgogICAgICAgICAgICAgICAgICAgIHR5cGU9InJvdGF0ZSIKICAgICAgICAgICAgICAgICAgICBmcm9tPSIwIDE4IDE4IgogICAgICAgICAgICAgICAgICAgIHRvPSIzNjAgMTggMTgiCiAgICAgICAgICAgICAgICAgICAgZHVyPSIwLjlzIgogICAgICAgICAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPgogICAgICAgICAgICA8L2NpcmNsZT4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPgo="; @@ -3131,111 +3128,111 @@ Editor.hiResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAAC Editor.loResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg=="; Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker= "0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.enableWebFonts="1"!=urlParams["safe-style-src"];Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion= -null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(q){q.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(q,F){return"1"!=mxUtils.getValue(q.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(q, -F){return"1"==mxUtils.getValue(q.style,"comic","0")||"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureAngle", -dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough? -"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(q,F){return"1"== -mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum", -defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"}, +null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(q){q.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(q,E){return"1"!=mxUtils.getValue(q.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(q, +E){return"1"==mxUtils.getValue(q.style,"comic","0")||"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureAngle", +dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough? +"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(q,E){return"1"== +mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum", +defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"}, {val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(q){return"orthogonalEdgeStyle"==mxUtils.getValue(q.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity", dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash", dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"noJump", -dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&& -0==q.edges.length&&F.isTableCell(q.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&F.isTableCell(q.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(q,F){q=F.editorUi.editor.graph.getCellStyle(1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null);return"1"==mxUtils.getValue(q,"resizeLastRow","0")}, -isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&F.isTable(q.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(q,F){q=F.editorUi.editor.graph.getCellStyle(1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null);return"1"==mxUtils.getValue(q,"resizeLast","0")},isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&F.isTable(q.vertices[0])}},{name:"fillOpacity", +dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(q,E){E=E.editorUi.editor.graph;return 1==q.vertices.length&& +0==q.edges.length&&E.isTableCell(q.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(q,E){E=E.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&E.isTableCell(q.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(q,E){q=E.editorUi.editor.graph.getCellStyle(1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null);return"1"==mxUtils.getValue(q,"resizeLastRow","0")}, +isVisible:function(q,E){E=E.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&E.isTable(q.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(q,E){q=E.editorUi.editor.graph.getCellStyle(1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null);return"1"==mxUtils.getValue(q,"resizeLast","0")},isVisible:function(q,E){E=E.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&E.isTable(q.vertices[0])}},{name:"fillOpacity", dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float", defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool", -defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(q,F){return F.editorUi.editor.graph.isCellConnectable(0<q.vertices.length&&0==q.edges.length?q.vertices[0]:null)},isVisible:function(q,F){return 0<q.vertices.length&&0==q.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"}, +defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(q,E){return E.editorUi.editor.graph.isCellConnectable(0<q.vertices.length&&0==q.edges.length?q.vertices[0]:null)},isVisible:function(q,E){return 0<q.vertices.length&&0==q.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"}, {val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"}, -{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(q,F){q=1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null;F=F.editorUi.editor.graph;return null!=q&&(F.isSwimlane(q)||0<F.model.getChildCount(q))}, -isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(q,F){var R=1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null;F=F.editorUi.editor.graph;return null!=R&&(F.isContainer(R)&&"0"!=q.style.collapsible||!F.isContainer(R)&&"1"==q.style.collapsible)},isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0, -isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length&&!F.editorUi.editor.graph.isSwimlane(q.vertices[0])&&null==mxUtils.getValue(q.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(q,F){F=F.editorUi.editor.graph.model;return 0<q.vertices.length?F.isVertex(F.getParent(q.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog", -type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(q,F){q=0<q.vertices.length?F.editorUi.editor.graph.getCellGeometry(q.vertices[0]):null;return null!=q&&!q.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable", +{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(q,E){return 1==q.vertices.length&&0==q.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(q,E){q=1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null;E=E.editorUi.editor.graph;return null!=q&&(E.isSwimlane(q)||0<E.model.getChildCount(q))}, +isVisible:function(q,E){return 1==q.vertices.length&&0==q.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(q,E){var Q=1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null;E=E.editorUi.editor.graph;return null!=Q&&(E.isContainer(Q)&&"0"!=q.style.collapsible||!E.isContainer(Q)&&"1"==q.style.collapsible)},isVisible:function(q,E){return 1==q.vertices.length&&0==q.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0, +isVisible:function(q,E){return 1==q.vertices.length&&0==q.edges.length&&!E.editorUi.editor.graph.isSwimlane(q.vertices[0])&&null==mxUtils.getValue(q.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(q,E){E=E.editorUi.editor.graph.model;return 0<q.vertices.length?E.isVertex(E.getParent(q.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog", +type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(q,E){q=0<q.vertices.length?E.editorUi.editor.graph.getCellGeometry(q.vertices[0]):null;return null!=q&&!q.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable", dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents", -dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(q,F){var R=mxUtils.getValue(q.style,mxConstants.STYLE_FILLCOLOR,null);return F.editorUi.editor.graph.isSwimlane(q.vertices[0])||null==R||R==mxConstants.NONE||0==mxUtils.getValue(q.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(q.style,mxConstants.STYLE_OPACITY,100)||null!=q.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(q,F){return 0<q.vertices.length&& -F.editorUi.editor.graph.isContainer(q.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n'; -Editor.createRoughCanvas=function(q){var F=rough.canvas({getContext:function(){return q}});F.draw=function(R){var W=R.sets||[];R=R.options||this.getDefaultOptions();for(var T=0;T<W.length;T++){var ba=W[T];switch(ba.type){case "path":null!=R.stroke&&this._drawToContext(q,ba,R);break;case "fillPath":this._drawToContext(q,ba,R);break;case "fillSketch":this.fillSketch(q,ba,R)}}};F.fillSketch=function(R,W,T){var ba=q.state.strokeColor,ha=q.state.strokeWidth,ra=q.state.strokeAlpha,ta=q.state.dashed,ma= -T.fillWeight;0>ma&&(ma=T.strokeWidth/2);q.setStrokeAlpha(q.state.fillAlpha);q.setStrokeColor(T.fill||"");q.setStrokeWidth(ma);q.setDashed(!1);this._drawToContext(R,W,T);q.setDashed(ta);q.setStrokeWidth(ha);q.setStrokeColor(ba);q.setStrokeAlpha(ra)};F._drawToContext=function(R,W,T){R.begin();for(var ba=0;ba<W.ops.length;ba++){var ha=W.ops[ba],ra=ha.data;switch(ha.op){case "move":R.moveTo(ra[0],ra[1]);break;case "bcurveTo":R.curveTo(ra[0],ra[1],ra[2],ra[3],ra[4],ra[5]);break;case "lineTo":R.lineTo(ra[0], -ra[1])}}R.end();"fillPath"===W.type&&T.filled?R.fill():R.stroke()};return F};(function(){function q(ba,ha,ra){this.canvas=ba;this.rc=ha;this.shape=ra;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,q.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,q.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,q.prototype.rect);this.originalRoundrect= +dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(q,E){var Q=mxUtils.getValue(q.style,mxConstants.STYLE_FILLCOLOR,null);return E.editorUi.editor.graph.isSwimlane(q.vertices[0])||null==Q||Q==mxConstants.NONE||0==mxUtils.getValue(q.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(q.style,mxConstants.STYLE_OPACITY,100)||null!=q.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(q,E){return 0<q.vertices.length&& +E.editorUi.editor.graph.isContainer(q.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n'; +Editor.createRoughCanvas=function(q){var E=rough.canvas({getContext:function(){return q}});E.draw=function(Q){var Y=Q.sets||[];Q=Q.options||this.getDefaultOptions();for(var R=0;R<Y.length;R++){var ba=Y[R];switch(ba.type){case "path":null!=Q.stroke&&this._drawToContext(q,ba,Q);break;case "fillPath":this._drawToContext(q,ba,Q);break;case "fillSketch":this.fillSketch(q,ba,Q)}}};E.fillSketch=function(Q,Y,R){var ba=q.state.strokeColor,ea=q.state.strokeWidth,ra=q.state.strokeAlpha,ta=q.state.dashed,la= +R.fillWeight;0>la&&(la=R.strokeWidth/2);q.setStrokeAlpha(q.state.fillAlpha);q.setStrokeColor(R.fill||"");q.setStrokeWidth(la);q.setDashed(!1);this._drawToContext(Q,Y,R);q.setDashed(ta);q.setStrokeWidth(ea);q.setStrokeColor(ba);q.setStrokeAlpha(ra)};E._drawToContext=function(Q,Y,R){Q.begin();for(var ba=0;ba<Y.ops.length;ba++){var ea=Y.ops[ba],ra=ea.data;switch(ea.op){case "move":Q.moveTo(ra[0],ra[1]);break;case "bcurveTo":Q.curveTo(ra[0],ra[1],ra[2],ra[3],ra[4],ra[5]);break;case "lineTo":Q.lineTo(ra[0], +ra[1])}}Q.end();"fillPath"===Y.type&&R.filled?Q.fill():Q.stroke()};return E};(function(){function q(ba,ea,ra){this.canvas=ba;this.rc=ea;this.shape=ra;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,q.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,q.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,q.prototype.rect);this.originalRoundrect= this.canvas.roundrect;this.canvas.roundrect=mxUtils.bind(this,q.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,q.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,q.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,q.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,q.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo; this.canvas.curveTo=mxUtils.bind(this,q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,q.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,q.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,q.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke= -mxUtils.bind(this,q.prototype.fillAndStroke);this.path=[];this.passThrough=!1}q.prototype.moveOp="M";q.prototype.lineOp="L";q.prototype.quadOp="Q";q.prototype.curveOp="C";q.prototype.closeOp="Z";q.prototype.getStyle=function(ba,ha){var ra=1;if(null!=this.shape.state){var ta=this.shape.state.cell.id;if(null!=ta)for(var ma=0;ma<ta.length;ma++)ra=(ra<<5)-ra+ta.charCodeAt(ma)<<0}ra={strokeWidth:this.canvas.state.strokeWidth,seed:ra,preserveVertices:!0};ta=this.rc.getDefaultOptions();ra.stroke=ba?this.canvas.state.strokeColor=== -mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;ba=null;(ra.filled=ha)?(ra.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,ba=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):ra.fill="";ra.bowing=mxUtils.getValue(this.shape.style,"bowing",ta.bowing);ra.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ta.hachureAngle);ra.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting", -ta.curveFitting);ra.roughness=mxUtils.getValue(this.shape.style,"jiggle",ta.roughness);ra.simplification=mxUtils.getValue(this.shape.style,"simplification",ta.simplification);ra.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",ta.disableMultiStroke);ra.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",ta.disableMultiStrokeFill);ha=mxUtils.getValue(this.shape.style,"hachureGap",-1);ra.hachureGap="auto"==ha?-1:ha;ra.dashGap=mxUtils.getValue(this.shape.style, -"dashGap",ha);ra.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",ha);ra.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",ha);ha=mxUtils.getValue(this.shape.style,"fillWeight",-1);ra.fillWeight="auto"==ha?-1:ha;ha=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==ha&&(ha=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),ha=null!=ra.fill&&(null!=ba||null!=ha&&ra.fill==ha)?"solid": -ta.fillStyle);ra.fillStyle=ha;return ra};q.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};q.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};q.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var ba=2;ba<arguments.length;ba+=2)this.lastX=arguments[ba-1],this.lastY=arguments[ba],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))}; -q.prototype.lineTo=function(ba,ha){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,ba,ha),this.lastX=ba,this.lastY=ha)};q.prototype.moveTo=function(ba,ha){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,ba,ha),this.lastX=ba,this.lastY=ha,this.firstX=ba,this.firstY=ha)};q.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};q.prototype.quadTo=function(ba, -ha,ra,ta){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,ba,ha,ra,ta),this.lastX=ra,this.lastY=ta)};q.prototype.curveTo=function(ba,ha,ra,ta,ma,pa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,ba,ha,ra,ta,ma,pa),this.lastX=ma,this.lastY=pa)};q.prototype.arcTo=function(ba,ha,ra,ta,ma,pa,za){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var Ba=mxUtils.arcToCurves(this.lastX,this.lastY, -ba,ha,ra,ta,ma,pa,za);if(null!=Ba)for(var Ia=0;Ia<Ba.length;Ia+=6)this.curveTo(Ba[Ia],Ba[Ia+1],Ba[Ia+2],Ba[Ia+3],Ba[Ia+4],Ba[Ia+5]);this.lastX=pa;this.lastY=za}};q.prototype.rect=function(ba,ha,ra,ta){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(ba,ha,ra,ta,this.getStyle(!0,!0)))};q.prototype.ellipse=function(ba,ha,ra,ta){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(ba+ -ra/2,ha+ta/2,ra,ta,this.getStyle(!0,!0)))};q.prototype.roundrect=function(ba,ha,ra,ta,ma,pa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(ba+ma,ha),this.lineTo(ba+ra-ma,ha),this.quadTo(ba+ra,ha,ba+ra,ha+pa),this.lineTo(ba+ra,ha+ta-pa),this.quadTo(ba+ra,ha+ta,ba+ra-ma,ha+ta),this.lineTo(ba+ma,ha+ta),this.quadTo(ba,ha+ta,ba,ha+ta-pa),this.lineTo(ba,ha+pa),this.quadTo(ba,ha,ba+ma,ha))};q.prototype.drawPath=function(ba){if(0<this.path.length){this.passThrough= -!0;try{this.rc.path(this.path.join(" "),ba)}catch(ra){}this.passThrough=!1}else if(null!=this.nextShape){for(var ha in ba)this.nextShape.options[ha]=ba[ha];ba.stroke!=mxConstants.NONE&&null!=ba.stroke||delete this.nextShape.options.stroke;ba.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};q.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};q.prototype.fill= +mxUtils.bind(this,q.prototype.fillAndStroke);this.path=[];this.passThrough=!1}q.prototype.moveOp="M";q.prototype.lineOp="L";q.prototype.quadOp="Q";q.prototype.curveOp="C";q.prototype.closeOp="Z";q.prototype.getStyle=function(ba,ea){var ra=1;if(null!=this.shape.state){var ta=this.shape.state.cell.id;if(null!=ta)for(var la=0;la<ta.length;la++)ra=(ra<<5)-ra+ta.charCodeAt(la)<<0}ra={strokeWidth:this.canvas.state.strokeWidth,seed:ra,preserveVertices:!0};ta=this.rc.getDefaultOptions();ra.stroke=ba?this.canvas.state.strokeColor=== +mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;ba=null;(ra.filled=ea)?(ra.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,ba=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):ra.fill="";ra.bowing=mxUtils.getValue(this.shape.style,"bowing",ta.bowing);ra.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ta.hachureAngle);ra.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting", +ta.curveFitting);ra.roughness=mxUtils.getValue(this.shape.style,"jiggle",ta.roughness);ra.simplification=mxUtils.getValue(this.shape.style,"simplification",ta.simplification);ra.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",ta.disableMultiStroke);ra.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",ta.disableMultiStrokeFill);ea=mxUtils.getValue(this.shape.style,"hachureGap",-1);ra.hachureGap="auto"==ea?-1:ea;ra.dashGap=mxUtils.getValue(this.shape.style, +"dashGap",ea);ra.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",ea);ra.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",ea);ea=mxUtils.getValue(this.shape.style,"fillWeight",-1);ra.fillWeight="auto"==ea?-1:ea;ea=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==ea&&(ea=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),ea=null!=ra.fill&&(null!=ba||null!=ea&&ra.fill==ea)?"solid": +ta.fillStyle);ra.fillStyle=ea;return ra};q.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};q.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};q.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var ba=2;ba<arguments.length;ba+=2)this.lastX=arguments[ba-1],this.lastY=arguments[ba],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))}; +q.prototype.lineTo=function(ba,ea){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,ba,ea),this.lastX=ba,this.lastY=ea)};q.prototype.moveTo=function(ba,ea){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,ba,ea),this.lastX=ba,this.lastY=ea,this.firstX=ba,this.firstY=ea)};q.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};q.prototype.quadTo=function(ba, +ea,ra,ta){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,ba,ea,ra,ta),this.lastX=ra,this.lastY=ta)};q.prototype.curveTo=function(ba,ea,ra,ta,la,pa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,ba,ea,ra,ta,la,pa),this.lastX=la,this.lastY=pa)};q.prototype.arcTo=function(ba,ea,ra,ta,la,pa,xa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var Ca=mxUtils.arcToCurves(this.lastX,this.lastY, +ba,ea,ra,ta,la,pa,xa);if(null!=Ca)for(var Ia=0;Ia<Ca.length;Ia+=6)this.curveTo(Ca[Ia],Ca[Ia+1],Ca[Ia+2],Ca[Ia+3],Ca[Ia+4],Ca[Ia+5]);this.lastX=pa;this.lastY=xa}};q.prototype.rect=function(ba,ea,ra,ta){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(ba,ea,ra,ta,this.getStyle(!0,!0)))};q.prototype.ellipse=function(ba,ea,ra,ta){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(ba+ +ra/2,ea+ta/2,ra,ta,this.getStyle(!0,!0)))};q.prototype.roundrect=function(ba,ea,ra,ta,la,pa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(ba+la,ea),this.lineTo(ba+ra-la,ea),this.quadTo(ba+ra,ea,ba+ra,ea+pa),this.lineTo(ba+ra,ea+ta-pa),this.quadTo(ba+ra,ea+ta,ba+ra-la,ea+ta),this.lineTo(ba+la,ea+ta),this.quadTo(ba,ea+ta,ba,ea+ta-pa),this.lineTo(ba,ea+pa),this.quadTo(ba,ea,ba+la,ea))};q.prototype.drawPath=function(ba){if(0<this.path.length){this.passThrough= +!0;try{this.rc.path(this.path.join(" "),ba)}catch(ra){}this.passThrough=!1}else if(null!=this.nextShape){for(var ea in ba)this.nextShape.options[ea]=ba[ea];ba.stroke!=mxConstants.NONE&&null!=ba.stroke||delete this.nextShape.options.stroke;ba.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};q.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};q.prototype.fill= function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};q.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};q.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo= -this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(ba){return new q(ba,Editor.createRoughCanvas(ba),this)};var F=mxShape.prototype.createHandJiggle; -mxShape.prototype.createHandJiggle=function(ba){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?F.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(ba):this.createRoughCanvas(ba)};var R=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(ba,ha,ra,ta,ma){null!=ba.handJiggle&&ba.handJiggle.passThrough||R.apply(this,arguments)};var W=mxShape.prototype.paint;mxShape.prototype.paint= -function(ba){var ha=ba.addTolerance,ra=!0;null!=this.style&&(ra="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=ba.handJiggle&&ba.handJiggle.constructor==q&&!this.outline){ba.save();var ta=this.fill,ma=this.stroke;this.stroke=this.fill=null;var pa=this.configurePointerEvents,za=ba.setStrokeColor;ba.setStrokeColor=function(){};var Ba=ba.setFillColor;ba.setFillColor=function(){};ra||null==ta||(this.configurePointerEvents=function(){});ba.handJiggle.passThrough=!0;W.apply(this, -arguments);ba.handJiggle.passThrough=!1;ba.setFillColor=Ba;ba.setStrokeColor=za;this.configurePointerEvents=pa;this.stroke=ma;this.fill=ta;ba.restore();ra&&null!=ta&&(ba.addTolerance=function(){})}W.apply(this,arguments);ba.addTolerance=ha};var T=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(ba,ha,ra,ta,ma,pa){null!=ba.handJiggle&&ba.handJiggle.constructor==q?(ba.handJiggle.passThrough=!0,T.apply(this,arguments),ba.handJiggle.passThrough=!1):T.apply(this,arguments)}})(); -Editor.fastCompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?q:Graph.arrayBufferToString(pako.deflateRaw(q))};Editor.fastDecompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?q:pako.inflateRaw(Graph.stringToArrayBuffer(atob(q)),{to:"string"})};Editor.extractGraphModel=function(q,F,R){if(null!=q&&"undefined"!==typeof pako){var W=q.ownerDocument.getElementsByTagName("div"),T=[];if(null!=W&&0<W.length)for(var ba=0;ba<W.length;ba++)if("mxgraph"==W[ba].getAttribute("class")){T.push(W[ba]); -break}0<T.length&&(W=T[0].getAttribute("data-mxgraph"),null!=W?(T=JSON.parse(W),null!=T&&null!=T.xml&&(q=mxUtils.parseXml(T.xml),q=q.documentElement)):(T=T[0].getElementsByTagName("div"),0<T.length&&(W=mxUtils.getTextContent(T[0]),W=Graph.decompress(W,null,R),0<W.length&&(q=mxUtils.parseXml(W),q=q.documentElement))))}if(null!=q&&"svg"==q.nodeName)if(W=q.getAttribute("content"),null!=W&&"<"!=W.charAt(0)&&"%"!=W.charAt(0)&&(W=unescape(window.atob?atob(W):Base64.decode(cont,W))),null!=W&&"%"==W.charAt(0)&& -(W=decodeURIComponent(W)),null!=W&&0<W.length)q=mxUtils.parseXml(W).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==q||F||(T=null,"diagram"==q.nodeName?T=q:"mxfile"==q.nodeName&&(W=q.getElementsByTagName("diagram"),0<W.length&&(T=W[Math.max(0,Math.min(W.length-1,urlParams.page||0))])),null!=T&&(q=Editor.parseDiagramNode(T,R)));null==q||"mxGraphModel"==q.nodeName||F&&"mxfile"==q.nodeName||(q=null);return q};Editor.parseDiagramNode=function(q,F){var R=mxUtils.trim(mxUtils.getTextContent(q)), -W=null;0<R.length?(q=Graph.decompress(R,null,F),null!=q&&0<q.length&&(W=mxUtils.parseXml(q).documentElement)):(q=mxUtils.getChildNodes(q),0<q.length&&(W=mxUtils.createXmlDocument(),W.appendChild(W.importNode(q[0],!0)),W=W.documentElement));return W};Editor.getDiagramNodeXml=function(q){var F=mxUtils.getTextContent(q),R=null;0<F.length?R=Graph.decompress(F):null!=q.firstChild&&(R=mxUtils.getXml(q.firstChild));return R};Editor.extractGraphModelFromPdf=function(q){q=q.substring(q.indexOf(",")+1);q=window.atob&& -!mxClient.IS_SF?atob(q):Base64.decode(q,!0);if("%PDF-1.7"==q.substring(0,8)){var F=q.indexOf("EmbeddedFile");if(-1<F){var R=q.indexOf("stream",F)+9;if(0<q.substring(F,R).indexOf("application#2Fvnd.jgraph.mxfile"))return F=q.indexOf("endstream",R-1),pako.inflateRaw(Graph.stringToArrayBuffer(q.substring(R,F)),{to:"string"})}return null}R=null;F="";for(var W=0,T=0,ba=[],ha=null;T<q.length;){var ra=q.charCodeAt(T);T+=1;10!=ra&&(F+=String.fromCharCode(ra));ra=="/Subject (%3Cmxfile".charCodeAt(W)?W++:W= -0;if(19==W){var ta=q.indexOf("%3C%2Fmxfile%3E)",T)+15;T-=9;if(ta>T){R=q.substring(T,ta);break}}10==ra&&("endobj"==F?ha=null:"obj"==F.substring(F.length-3,F.length)||"xref"==F||"trailer"==F?(ha=[],ba[F.split(" ")[0]]=ha):null!=ha&&ha.push(F),F="")}null==R&&(R=Editor.extractGraphModelFromXref(ba));null!=R&&(R=decodeURIComponent(R.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return R};Editor.extractGraphModelFromXref=function(q){var F=q.trailer,R=null;null!=F&&(F=/.* \/Info (\d+) (\d+) R/g.exec(F.join("\n")), -null!=F&&0<F.length&&(F=q[F[1]],null!=F&&(F=/.* \/Subject (\d+) (\d+) R/g.exec(F.join("\n")),null!=F&&0<F.length&&(q=q[F[1]],null!=q&&(q=q.join("\n"),R=q.substring(1,q.length-1))))));return R};Editor.extractParserError=function(q,F){var R=null;q=null!=q?q.getElementsByTagName("parsererror"):null;null!=q&&0<q.length&&(R=F||mxResources.get("invalidChars"),F=q[0].getElementsByTagName("div"),0<F.length&&(R=mxUtils.getTextContent(F[0])));return null!=R?mxUtils.trim(R):R};Editor.addRetryToError=function(q, -F){null!=q&&(q=null!=q.error?q.error:q,null==q.retry&&(q.retry=F))};Editor.configure=function(q,F){if(null!=q){Editor.config=q;Editor.configVersion=q.version;Menus.prototype.defaultFonts=q.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=q.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=q.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=q.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes= +this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(ba){return new q(ba,Editor.createRoughCanvas(ba),this)};var E=mxShape.prototype.createHandJiggle; +mxShape.prototype.createHandJiggle=function(ba){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?E.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(ba):this.createRoughCanvas(ba)};var Q=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(ba,ea,ra,ta,la){null!=ba.handJiggle&&ba.handJiggle.passThrough||Q.apply(this,arguments)};var Y=mxShape.prototype.paint;mxShape.prototype.paint= +function(ba){var ea=ba.addTolerance,ra=!0;null!=this.style&&(ra="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=ba.handJiggle&&ba.handJiggle.constructor==q&&!this.outline){ba.save();var ta=this.fill,la=this.stroke;this.stroke=this.fill=null;var pa=this.configurePointerEvents,xa=ba.setStrokeColor;ba.setStrokeColor=function(){};var Ca=ba.setFillColor;ba.setFillColor=function(){};ra||null==ta||(this.configurePointerEvents=function(){});ba.handJiggle.passThrough=!0;Y.apply(this, +arguments);ba.handJiggle.passThrough=!1;ba.setFillColor=Ca;ba.setStrokeColor=xa;this.configurePointerEvents=pa;this.stroke=la;this.fill=ta;ba.restore();ra&&null!=ta&&(ba.addTolerance=function(){})}Y.apply(this,arguments);ba.addTolerance=ea};var R=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(ba,ea,ra,ta,la,pa){null!=ba.handJiggle&&ba.handJiggle.constructor==q?(ba.handJiggle.passThrough=!0,R.apply(this,arguments),ba.handJiggle.passThrough=!1):R.apply(this,arguments)}})(); +Editor.fastCompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?q:Graph.arrayBufferToString(pako.deflateRaw(q))};Editor.fastDecompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?q:pako.inflateRaw(Graph.stringToArrayBuffer(atob(q)),{to:"string"})};Editor.extractGraphModel=function(q,E,Q){if(null!=q&&"undefined"!==typeof pako){var Y=q.ownerDocument.getElementsByTagName("div"),R=[];if(null!=Y&&0<Y.length)for(var ba=0;ba<Y.length;ba++)if("mxgraph"==Y[ba].getAttribute("class")){R.push(Y[ba]); +break}0<R.length&&(Y=R[0].getAttribute("data-mxgraph"),null!=Y?(R=JSON.parse(Y),null!=R&&null!=R.xml&&(q=mxUtils.parseXml(R.xml),q=q.documentElement)):(R=R[0].getElementsByTagName("div"),0<R.length&&(Y=mxUtils.getTextContent(R[0]),Y=Graph.decompress(Y,null,Q),0<Y.length&&(q=mxUtils.parseXml(Y),q=q.documentElement))))}if(null!=q&&"svg"==q.nodeName)if(Y=q.getAttribute("content"),null!=Y&&"<"!=Y.charAt(0)&&"%"!=Y.charAt(0)&&(Y=unescape(window.atob?atob(Y):Base64.decode(cont,Y))),null!=Y&&"%"==Y.charAt(0)&& +(Y=decodeURIComponent(Y)),null!=Y&&0<Y.length)q=mxUtils.parseXml(Y).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==q||E||(R=null,"diagram"==q.nodeName?R=q:"mxfile"==q.nodeName&&(Y=q.getElementsByTagName("diagram"),0<Y.length&&(R=Y[Math.max(0,Math.min(Y.length-1,urlParams.page||0))])),null!=R&&(q=Editor.parseDiagramNode(R,Q)));null==q||"mxGraphModel"==q.nodeName||E&&"mxfile"==q.nodeName||(q=null);return q};Editor.parseDiagramNode=function(q,E){var Q=mxUtils.trim(mxUtils.getTextContent(q)), +Y=null;0<Q.length?(q=Graph.decompress(Q,null,E),null!=q&&0<q.length&&(Y=mxUtils.parseXml(q).documentElement)):(q=mxUtils.getChildNodes(q),0<q.length&&(Y=mxUtils.createXmlDocument(),Y.appendChild(Y.importNode(q[0],!0)),Y=Y.documentElement));return Y};Editor.getDiagramNodeXml=function(q){var E=mxUtils.getTextContent(q),Q=null;0<E.length?Q=Graph.decompress(E):null!=q.firstChild&&(Q=mxUtils.getXml(q.firstChild));return Q};Editor.extractGraphModelFromPdf=function(q){q=q.substring(q.indexOf(",")+1);q=window.atob&& +!mxClient.IS_SF?atob(q):Base64.decode(q,!0);if("%PDF-1.7"==q.substring(0,8)){var E=q.indexOf("EmbeddedFile");if(-1<E){var Q=q.indexOf("stream",E)+9;if(0<q.substring(E,Q).indexOf("application#2Fvnd.jgraph.mxfile"))return E=q.indexOf("endstream",Q-1),pako.inflateRaw(Graph.stringToArrayBuffer(q.substring(Q,E)),{to:"string"})}return null}Q=null;E="";for(var Y=0,R=0,ba=[],ea=null;R<q.length;){var ra=q.charCodeAt(R);R+=1;10!=ra&&(E+=String.fromCharCode(ra));ra=="/Subject (%3Cmxfile".charCodeAt(Y)?Y++:Y= +0;if(19==Y){var ta=q.indexOf("%3C%2Fmxfile%3E)",R)+15;R-=9;if(ta>R){Q=q.substring(R,ta);break}}10==ra&&("endobj"==E?ea=null:"obj"==E.substring(E.length-3,E.length)||"xref"==E||"trailer"==E?(ea=[],ba[E.split(" ")[0]]=ea):null!=ea&&ea.push(E),E="")}null==Q&&(Q=Editor.extractGraphModelFromXref(ba));null!=Q&&(Q=decodeURIComponent(Q.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return Q};Editor.extractGraphModelFromXref=function(q){var E=q.trailer,Q=null;null!=E&&(E=/.* \/Info (\d+) (\d+) R/g.exec(E.join("\n")), +null!=E&&0<E.length&&(E=q[E[1]],null!=E&&(E=/.* \/Subject (\d+) (\d+) R/g.exec(E.join("\n")),null!=E&&0<E.length&&(q=q[E[1]],null!=q&&(q=q.join("\n"),Q=q.substring(1,q.length-1))))));return Q};Editor.extractParserError=function(q,E){var Q=null;q=null!=q?q.getElementsByTagName("parsererror"):null;null!=q&&0<q.length&&(Q=E||mxResources.get("invalidChars"),E=q[0].getElementsByTagName("div"),0<E.length&&(Q=mxUtils.getTextContent(E[0])));return null!=Q?mxUtils.trim(Q):Q};Editor.addRetryToError=function(q, +E){null!=q&&(q=null!=q.error?q.error:q,null==q.retry&&(q.retry=E))};Editor.configure=function(q){if(null!=q){Editor.config=q;Editor.configVersion=q.version;Menus.prototype.defaultFonts=q.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=q.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=q.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=q.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes= q.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=q.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=q.autosaveDelay||DrawioFile.prototype.autosaveDelay;q.debug&&(urlParams.test="1");null!=q.templateFile&&(EditorUi.templateFile=q.templateFile);null!=q.styles&&(Array.isArray(q.styles)?Editor.styles=q.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=q.globalVars&&(Editor.globalVars= q.globalVars);null!=q.compressXml&&(Editor.compressXml=q.compressXml);null!=q.includeDiagram&&(Editor.defaultIncludeDiagram=q.includeDiagram);null!=q.simpleLabels&&(Editor.simpleLabels=q.simpleLabels);null!=q.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=q.oneDriveInlinePicker);null!=q.darkColor&&(Editor.darkColor=q.darkColor);null!=q.lightColor&&(Editor.lightColor=q.lightColor);null!=q.settingsName&&(Editor.configurationKey="."+q.settingsName+"-configuration",Editor.settingsKey="."+q.settingsName+ -"-config",mxSettings.key=Editor.settingsKey);q.customFonts&&(Menus.prototype.defaultFonts=q.customFonts.concat(Menus.prototype.defaultFonts));q.customPresetColors&&(ColorDialog.prototype.presetColors=q.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=q.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=q.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=q.css){var R=document.createElement("style");R.setAttribute("type","text/css"); -R.appendChild(document.createTextNode(q.css));var W=document.getElementsByTagName("script")[0];W.parentNode.insertBefore(R,W)}null!=q.libraries&&(Sidebar.prototype.customEntries=q.libraries);null!=q.enabledLibraries&&(Array.isArray(q.enabledLibraries)?Sidebar.prototype.enabledLibraries=q.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=q.defaultLibraries&&(Sidebar.prototype.defaultEntries=q.defaultLibraries);null!=q.defaultCustomLibraries&&(Editor.defaultCustomLibraries= +"-config",mxSettings.key=Editor.settingsKey);q.customFonts&&(Menus.prototype.defaultFonts=q.customFonts.concat(Menus.prototype.defaultFonts));q.customPresetColors&&(ColorDialog.prototype.presetColors=q.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=q.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=q.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=q.css){var E=document.createElement("style");E.setAttribute("type","text/css"); +E.appendChild(document.createTextNode(q.css));var Q=document.getElementsByTagName("script")[0];Q.parentNode.insertBefore(E,Q)}null!=q.libraries&&(Sidebar.prototype.customEntries=q.libraries);null!=q.enabledLibraries&&(Array.isArray(q.enabledLibraries)?Sidebar.prototype.enabledLibraries=q.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=q.defaultLibraries&&(Sidebar.prototype.defaultEntries=q.defaultLibraries);null!=q.defaultCustomLibraries&&(Editor.defaultCustomLibraries= q.defaultCustomLibraries);null!=q.enableCustomLibraries&&(Editor.enableCustomLibraries=q.enableCustomLibraries);null!=q.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=q.defaultVertexStyle);null!=q.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=q.defaultEdgeStyle);null!=q.defaultPageVisible&&(Graph.prototype.defaultPageVisible=q.defaultPageVisible);null!=q.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=q.defaultGridEnabled);null!=q.zoomWheel&&(Graph.zoomWheel=q.zoomWheel);null!= -q.zoomFactor&&(R=parseFloat(q.zoomFactor),!isNaN(R)&&1<R?Graph.prototype.zoomFactor=R:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=q.gridSteps&&(R=parseInt(q.gridSteps),!isNaN(R)&&0<R?mxGraphView.prototype.gridSteps=R:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=q.pageFormat&&(R=parseInt(q.pageFormat.width),W=parseInt(q.pageFormat.height),!isNaN(R)&&0<R&&!isNaN(W)&&0<W?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,R,W), +q.zoomFactor&&(E=parseFloat(q.zoomFactor),!isNaN(E)&&1<E?Graph.prototype.zoomFactor=E:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=q.gridSteps&&(E=parseInt(q.gridSteps),!isNaN(E)&&0<E?mxGraphView.prototype.gridSteps=E:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=q.pageFormat&&(E=parseInt(q.pageFormat.width),Q=parseInt(q.pageFormat.height),!isNaN(E)&&0<E&&!isNaN(Q)&&0<Q?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,E,Q), mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));q.thumbWidth&&(Sidebar.prototype.thumbWidth=q.thumbWidth);q.thumbHeight&&(Sidebar.prototype.thumbHeight=q.thumbHeight);q.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=q.emptyLibraryXml);q.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=q.emptyDiagramXml);q.sidebarWidth&&(EditorUi.prototype.hsplitPosition=q.sidebarWidth);q.sidebarTitles&& -(Sidebar.prototype.sidebarTitles=q.sidebarTitles);q.sidebarTitleSize&&(R=parseInt(q.sidebarTitleSize),!isNaN(R)&&0<R?Sidebar.prototype.sidebarTitleSize=R:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));q.fontCss&&("string"===typeof q.fontCss?Editor.configureFontCss(q.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=q.autosaveDelay&&(R=parseInt(q.autosaveDelay),!isNaN(R)&&0<R?DrawioFile.prototype.autosaveDelay=R:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay")); -if(null!=q.plugins&&!F)for(App.initPluginCallback(),F=0;F<q.plugins.length;F++)mxscript(q.plugins[F]);null!=q.maxImageBytes&&(EditorUi.prototype.maxImageBytes=q.maxImageBytes);null!=q.maxImageSize&&(EditorUi.prototype.maxImageSize=q.maxImageSize);null!=q.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=q.shareCursorPosition);null!=q.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=q.showRemoteCursors)}};Editor.configureFontCss=function(q){if(null!=q){Editor.prototype.fontCss=q; -var F=document.getElementsByTagName("script")[0];if(null!=F&&null!=F.parentNode){var R=document.createElement("style");R.setAttribute("type","text/css");R.appendChild(document.createTextNode(q));F.parentNode.insertBefore(R,F);q=q.split("url(");for(R=1;R<q.length;R++){var W=q[R].indexOf(")");W=Editor.trimCssUrl(q[R].substring(0,W));var T=document.createElement("link");T.setAttribute("rel","preload");T.setAttribute("href",W);T.setAttribute("as","font");T.setAttribute("crossorigin","");F.parentNode.insertBefore(T, -F)}}}};Editor.trimCssUrl=function(q){return q.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(q){q=null!=q?q:Editor.GUID_LENGTH;for(var F=[],R=0;R<q;R++)F.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return F.join("")};Editor.prototype.timeout= -25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(q){q=null!=q&&"mxlibrary"!=q.nodeName?this.extractGraphModel(q):null;if(null!=q){var F=Editor.extractParserError(q,mxResources.get("invalidOrMissingFile"));if(F)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[q],"cause",[F]),Error(mxResources.get("notADiagramFile")+ -" ("+F+")");if("mxGraphModel"==q.nodeName){F=q.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=F&&""!=F)F!=this.graph.currentStyle&&(R=null!=this.graph.themes?this.graph.themes[F]:mxUtils.load(STYLE_PATH+"/"+F+".xml").getDocumentElement(),null!=R&&(W=new mxCodec(R.ownerDocument),W.decode(R,this.graph.getStylesheet())));else{var R=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=R){var W=new mxCodec(R.ownerDocument); -W.decode(R,this.graph.getStylesheet())}}this.graph.currentStyle=F;this.graph.mathEnabled="1"==urlParams.math||"1"==q.getAttribute("math");F=q.getAttribute("backgroundImage");null!=F?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(F)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==q.getAttribute("shadow"),!1);if(F=q.getAttribute("extFonts"))try{for(F= -F.split("|").map(function(T){T=T.split("^");return{name:T[0],url:T[1]}}),R=0;R<F.length;R++)this.graph.addExtFont(F[R].name,F[R].url)}catch(T){console.log("ExtFonts format error: "+T.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(q,F){q=null!= -q?q:!0;var R=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&R.setAttribute("style",this.graph.currentStyle);var W=this.graph.getBackgroundImageObject(this.graph.backgroundImage,F);null!=W&&R.setAttribute("backgroundImage",JSON.stringify(W));R.setAttribute("math",this.graph.mathEnabled?"1":"0");R.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(W=this.graph.extFonts.map(function(T){return T.name+ -"^"+T.url}),R.setAttribute("extFonts",W.join("|")));return R};Editor.prototype.isDataSvg=function(q){try{var F=mxUtils.parseXml(q).documentElement.getAttribute("content");if(null!=F&&(null!=F&&"<"!=F.charAt(0)&&"%"!=F.charAt(0)&&(F=unescape(window.atob?atob(F):Base64.decode(cont,F))),null!=F&&"%"==F.charAt(0)&&(F=decodeURIComponent(F)),null!=F&&0<F.length)){var R=mxUtils.parseXml(F).documentElement;return"mxfile"==R.nodeName||"mxGraphModel"==R.nodeName}}catch(W){}return!1};Editor.prototype.extractGraphModel= -function(q,F,R){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();k.apply(this,arguments)};var m=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){m.apply(this, -arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(q,F){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){q=null!=q?q:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(T){try{MathJax.typesetClear([T]),MathJax.typeset([T]),Editor.onMathJaxDone()}catch(ba){MathJax.typesetClear([T]),null!=ba.retry?ba.retry.then(function(){MathJax.typesetPromise([T]).then(Editor.onMathJaxDone)}): -null!=window.console&&console.log("Error in MathJax: "+ba.toString())}};window.MathJax=null!=F?F:{options:{skipHtmlTags:{"[+]":["text"]}},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath"]},startup:{pageReady:function(){for(var T=0;T<Editor.mathJaxQueue.length;T++)Editor.doMathJaxRender(Editor.mathJaxQueue[T])}}};Editor.MathJaxRender=function(T){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(T):Editor.mathJaxQueue.push(T)}; -Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var R=Editor.prototype.init;Editor.prototype.init=function(){R.apply(this,arguments);var T=mxUtils.bind(this,function(ba,ha){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,T);this.graph.addListener(mxEvent.REFRESH,T)};F=document.getElementsByTagName("script");if(null!=F&&0<F.length){var W= -document.createElement("script");W.setAttribute("type","text/javascript");W.setAttribute("src",q);F[0].parentNode.appendChild(W)}}};Editor.prototype.csvToArray=function(q){if(0<q.length){var F="",R=[""],W=0,T=!0,ba;q=$jscomp.makeIterator(q);for(ba=q.next();!ba.done;ba=q.next())ba=ba.value,'"'===ba?(T&&ba===F&&(R[W]+=ba),T=!T):","===ba&&T?ba=R[++W]="":R[W]+=ba,F=ba;return R}return[]};Editor.prototype.getProxiedUrl=function(q){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&& -!this.isCorsEnabledForUrl(q)){var F=/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q);F=/\.png$/i.test(q)||/\.pdf$/i.test(q)||F;var R="t="+(new Date).getTime();q=PROXY_URL+"?url="+encodeURIComponent(q)+"&"+R+(F?"&base64=1":"")}return q};Editor.prototype.isCorsEnabledForUrl=function(q){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||q.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors))); -return null!=this.corsRegExp&&this.corsRegExp.test(q)||"https://raw.githubusercontent.com/"===q.substring(0,34)||"https://fonts.googleapis.com/"===q.substring(0,29)||"https://fonts.gstatic.com/"===q.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var q=new mxUrlConverter;q.updateBaseUrl();var F=q.convert,R=this;q.convert=function(W){if(null!=W){var T="http://"==W.substring(0,7)||"https://"==W.substring(0,8);T&&!navigator.onLine?W=Editor.svgBrokenImage.src:!T||W.substring(0,q.baseUrl.length)== -q.baseUrl||R.crossOriginImages&&R.isCorsEnabledForUrl(W)?"chrome-extension://"==W.substring(0,19)||mxClient.IS_CHROMEAPP||(W=F.apply(this,arguments)):W=PROXY_URL+"?url="+encodeURIComponent(W)}return W};return q};Editor.createSvgDataUri=function(q){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(q)))};Editor.prototype.convertImageToDataUri=function(q,F){try{var R=!0,W=window.setTimeout(mxUtils.bind(this,function(){R=!1;F(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(q))mxUtils.get(q, -mxUtils.bind(this,function(ba){window.clearTimeout(W);R&&F(Editor.createSvgDataUri(ba.getText()))}),function(){window.clearTimeout(W);R&&F(Editor.svgBrokenImage.src)});else{var T=new Image;this.crossOriginImages&&(T.crossOrigin="anonymous");T.onload=function(){window.clearTimeout(W);if(R)try{var ba=document.createElement("canvas"),ha=ba.getContext("2d");ba.height=T.height;ba.width=T.width;ha.drawImage(T,0,0);F(ba.toDataURL())}catch(ra){F(Editor.svgBrokenImage.src)}};T.onerror=function(){window.clearTimeout(W); -R&&F(Editor.svgBrokenImage.src)};T.src=q}}catch(ba){F(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(q,F,R,W){null==W&&(W=this.createImageUrlConverter());var T=0,ba=R||{};R=mxUtils.bind(this,function(ha,ra){ha=q.getElementsByTagName(ha);for(var ta=0;ta<ha.length;ta++)mxUtils.bind(this,function(ma){try{if(null!=ma){var pa=W.convert(ma.getAttribute(ra));if(null!=pa&&"data:"!=pa.substring(0,5)){var za=ba[pa];null==za?(T++,this.convertImageToDataUri(pa,function(Ba){null!=Ba&&(ba[pa]= -Ba,ma.setAttribute(ra,Ba));T--;0==T&&F(q)})):ma.setAttribute(ra,za)}else null!=pa&&ma.setAttribute(ra,pa)}}catch(Ba){}})(ha[ta])});R("image","xlink:href");R("img","src");0==T&&F(q)};Editor.base64Encode=function(q){for(var F="",R=0,W=q.length,T,ba,ha;R<W;){T=q.charCodeAt(R++)&255;if(R==W){F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&3)<<4);F+="==";break}ba=q.charCodeAt(R++);if(R==W){F+= -"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&3)<<4|(ba&240)>>4);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((ba&15)<<2);F+="=";break}ha=q.charCodeAt(R++);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&3)<<4|(ba&240)>>4);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((ba& -15)<<2|(ha&192)>>6);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(ha&63)}return F};Editor.prototype.loadUrl=function(q,F,R,W,T,ba,ha,ra){try{var ta=!ha&&(W||/(\.png)($|\?)/i.test(q)||/(\.jpe?g)($|\?)/i.test(q)||/(\.gif)($|\?)/i.test(q)||/(\.pdf)($|\?)/i.test(q));T=null!=T?T:!0;var ma=mxUtils.bind(this,function(){mxUtils.get(q,mxUtils.bind(this,function(pa){if(200<=pa.getStatus()&&299>=pa.getStatus()){if(null!=F){var za=pa.getText();if(ta){if((9==document.documentMode|| -10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){pa=mxUtilsBinaryToArray(pa.request.responseBody).toArray();za=Array(pa.length);for(var Ba=0;Ba<pa.length;Ba++)za[Ba]=String.fromCharCode(pa[Ba]);za=za.join("")}ba=null!=ba?ba:"data:image/png;base64,";za=ba+Editor.base64Encode(za)}F(za)}}else null!=R&&(0==pa.getStatus()?R({message:mxResources.get("accessDenied")},pa):404==pa.getStatus()?R({code:pa.getStatus()},pa):R({message:mxResources.get("error")+" "+pa.getStatus()},pa))}), -function(pa){null!=R&&R({message:mxResources.get("error")+" "+pa.getStatus()})},ta,this.timeout,function(){T&&null!=R&&R({code:App.ERROR_TIMEOUT,retry:ma})},ra)});ma()}catch(pa){null!=R&&R(pa)}};Editor.prototype.absoluteCssFonts=function(q){var F=null;if(null!=q){var R=q.split("url(");if(0<R.length){F=[R[0]];q=window.location.pathname;var W=null!=q?q.lastIndexOf("/"):-1;0<=W&&(q=q.substring(0,W+1));W=document.getElementsByTagName("base");var T=null;null!=W&&0<W.length&&(T=W[0].getAttribute("href")); -for(var ba=1;ba<R.length;ba++)if(W=R[ba].indexOf(")"),0<W){var ha=Editor.trimCssUrl(R[ba].substring(0,W));this.graph.isRelativeUrl(ha)&&(ha=null!=T?T+ha:window.location.protocol+"//"+window.location.hostname+("/"==ha.charAt(0)?"":q)+ha);F.push('url("'+ha+'"'+R[ba].substring(W))}else F.push(R[ba])}else F=[q]}return null!=F?F.join(""):null};Editor.prototype.mapFontUrl=function(q,F,R){/^https?:\/\//.test(F)&&!this.isCorsEnabledForUrl(F)&&(F=PROXY_URL+"?url="+encodeURIComponent(F));R(q,F)};Editor.prototype.embedCssFonts= -function(q,F){var R=q.split("url("),W=0;null==this.cachedFonts&&(this.cachedFonts={});var T=mxUtils.bind(this,function(){if(0==W){for(var ta=[R[0]],ma=1;ma<R.length;ma++){var pa=R[ma].indexOf(")");ta.push('url("');ta.push(this.cachedFonts[Editor.trimCssUrl(R[ma].substring(0,pa))]);ta.push('"'+R[ma].substring(pa))}F(ta.join(""))}});if(0<R.length){for(q=1;q<R.length;q++){var ba=R[q].indexOf(")"),ha=null,ra=R[q].indexOf("format(",ba);0<ra&&(ha=Editor.trimCssUrl(R[q].substring(ra+7,R[q].indexOf(")",ra)))); -mxUtils.bind(this,function(ta){if(null==this.cachedFonts[ta]){this.cachedFonts[ta]=ta;W++;var ma="application/x-font-ttf";if("svg"==ha||/(\.svg)($|\?)/i.test(ta))ma="image/svg+xml";else if("otf"==ha||"embedded-opentype"==ha||/(\.otf)($|\?)/i.test(ta))ma="application/x-font-opentype";else if("woff"==ha||/(\.woff)($|\?)/i.test(ta))ma="application/font-woff";else if("woff2"==ha||/(\.woff2)($|\?)/i.test(ta))ma="application/font-woff2";else if("eot"==ha||/(\.eot)($|\?)/i.test(ta))ma="application/vnd.ms-fontobject"; -else if("sfnt"==ha||/(\.sfnt)($|\?)/i.test(ta))ma="application/font-sfnt";this.mapFontUrl(ma,ta,mxUtils.bind(this,function(pa,za){this.loadUrl(za,mxUtils.bind(this,function(Ba){this.cachedFonts[ta]=Ba;W--;T()}),mxUtils.bind(this,function(Ba){W--;T()}),!0,null,"data:"+pa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(R[q].substring(0,ba)),ha)}T()}else F(q)};Editor.prototype.loadFonts=function(q){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(F){this.resolvedFontCss= -F;null!=q&&q()})):null!=q&&q()};Editor.prototype.createGoogleFontCache=function(){var q={},F;for(F in Graph.fontMapping)Graph.isCssFontUrl(F)&&(q[F]=Graph.fontMapping[F]);return q};Editor.prototype.embedExtFonts=function(q){var F=this.graph.getCustomFonts();if(0<F.length){var R=[],W=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var T=mxUtils.bind(this,function(){0==W&&this.embedCssFonts(R.join(""),q)}),ba=0;ba<F.length;ba++)mxUtils.bind(this,function(ha, -ra){Graph.isCssFontUrl(ra)?null==this.cachedGoogleFonts[ra]?(W++,this.loadUrl(ra,mxUtils.bind(this,function(ta){this.cachedGoogleFonts[ra]=ta;R.push(ta+"\n");W--;T()}),mxUtils.bind(this,function(ta){W--;R.push("@import url("+ra+");\n");T()}))):R.push(this.cachedGoogleFonts[ra]+"\n"):R.push('@font-face {font-family: "'+ha+'";src: url("'+ra+'")}\n')})(F[ba].name,F[ba].url);T()}else q()};Editor.prototype.addMathCss=function(q){q=q.getElementsByTagName("defs");if(null!=q&&0<q.length)for(var F=document.getElementsByTagName("style"), -R=0;R<F.length;R++){var W=mxUtils.getTextContent(F[R]);0>W.indexOf("mxPageSelector")&&0<W.indexOf("MathJax")&&q[0].appendChild(F[R].cloneNode(!0))}};Editor.prototype.addFontCss=function(q,F){F=null!=F?F:this.absoluteCssFonts(this.fontCss);if(null!=F){var R=q.getElementsByTagName("defs"),W=q.ownerDocument;0==R.length?(R=null!=W.createElementNS?W.createElementNS(mxConstants.NS_SVG,"defs"):W.createElement("defs"),null!=q.firstChild?q.insertBefore(R,q.firstChild):q.appendChild(R)):R=R[0];q=null!=W.createElementNS? -W.createElementNS(mxConstants.NS_SVG,"style"):W.createElement("style");q.setAttribute("type","text/css");mxUtils.setTextContent(q,F);R.appendChild(q)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(q,F,R){var W=mxClient.IS_FF?8192:16384;return Math.min(R,Math.min(W/q,W/F))};Editor.prototype.exportToCanvas=function(q,F,R,W,T,ba,ha,ra,ta,ma,pa,za,Ba,Ia,Aa,Ka,Da,Ra){try{ba=null!=ba?ba:!0;ha=null!=ha?ha: -!0;za=null!=za?za:this.graph;Ba=null!=Ba?Ba:0;var Qa=ta?null:za.background;Qa==mxConstants.NONE&&(Qa=null);null==Qa&&(Qa=W);null==Qa&&0==ta&&(Qa=Ka?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(za.getSvg(null,null,Ba,Ia,null,ha,null,null,null,ma,null,Ka,Da,Ra),mxUtils.bind(this,function(Ta){try{var Za=new Image;Za.onload=mxUtils.bind(this,function(){try{var y=function(){mxClient.IS_SF?window.setTimeout(function(){X.drawImage(Za,0,0);q(M,Ta)},0):(X.drawImage(Za,0,0),q(M,Ta))}, -M=document.createElement("canvas"),N=parseInt(Ta.getAttribute("width")),S=parseInt(Ta.getAttribute("height"));ra=null!=ra?ra:1;null!=F&&(ra=ba?Math.min(1,Math.min(3*F/(4*S),F/N)):F/N);ra=this.getMaxCanvasScale(N,S,ra);N=Math.ceil(ra*N);S=Math.ceil(ra*S);M.setAttribute("width",N);M.setAttribute("height",S);var X=M.getContext("2d");null!=Qa&&(X.beginPath(),X.rect(0,0,N,S),X.fillStyle=Qa,X.fill());1!=ra&&X.scale(ra,ra);if(Aa){var fa=za.view,la=fa.scale;fa.scale=1;var xa=btoa(unescape(encodeURIComponent(fa.createSvgGrid(fa.gridColor)))); -fa.scale=la;xa="data:image/svg+xml;base64,"+xa;var sa=za.gridSize*fa.gridSteps*ra,ya=za.getGraphBounds(),Fa=fa.translate.x*la,wa=fa.translate.y*la,ua=Fa+(ya.x-Fa)/la-Ba,La=wa+(ya.y-wa)/la-Ba,Oa=new Image;Oa.onload=function(){try{for(var Ca=-Math.round(sa-mxUtils.mod((Fa-ua)*ra,sa)),Ma=-Math.round(sa-mxUtils.mod((wa-La)*ra,sa));Ca<N;Ca+=sa)for(var Ga=Ma;Ga<S;Ga+=sa)X.drawImage(Oa,Ca/ra,Ga/ra);y()}catch(Ya){null!=T&&T(Ya)}};Oa.onerror=function(Ca){null!=T&&T(Ca)};Oa.src=xa}else y()}catch(Ca){null!= -T&&T(Ca)}});Za.onerror=function(y){null!=T&&T(y)};ma&&this.graph.addSvgShadow(Ta);this.graph.mathEnabled&&this.addMathCss(Ta);var Pa=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ta,this.resolvedFontCss),Za.src=Editor.createSvgDataUri(mxUtils.getXml(Ta))}catch(y){null!=T&&T(y)}});this.embedExtFonts(mxUtils.bind(this,function(y){try{null!=y&&this.addFontCss(Ta,y),this.loadFonts(Pa)}catch(M){null!=T&&T(M)}}))}catch(y){null!=T&&T(y)}}),R,pa)}catch(Ta){null!=T&&T(Ta)}}; -Editor.crcTable=[];for(var C=0;256>C;C++)for(var p=C,E=0;8>E;E++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[C]=p;Editor.updateCRC=function(q,F,R,W){for(var T=0;T<W;T++)q=Editor.crcTable[(q^F.charCodeAt(R+T))&255]^q>>>8;return q};Editor.crc32=function(q){for(var F=-1,R=0;R<q.length;R++)F=F>>>8^Editor.crcTable[(F^q.charCodeAt(R))&255];return(F^-1)>>>0};Editor.writeGraphModelToPng=function(q,F,R,W,T){function ba(pa,za){var Ba=ta;ta+=za;return pa.substring(Ba,ta)}function ha(pa){pa=ba(pa,4);return pa.charCodeAt(3)+ -(pa.charCodeAt(2)<<8)+(pa.charCodeAt(1)<<16)+(pa.charCodeAt(0)<<24)}function ra(pa){return String.fromCharCode(pa>>24&255,pa>>16&255,pa>>8&255,pa&255)}q=q.substring(q.indexOf(",")+1);q=window.atob?atob(q):Base64.decode(q,!0);var ta=0;if(ba(q,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=T&&T();else if(ba(q,4),"IHDR"!=ba(q,4))null!=T&&T();else{ba(q,17);T=q.substring(0,ta);do{var ma=ha(q);if("IDAT"==ba(q,4)){T=q.substring(0,ta-8);"pHYs"==F&&"dpi"==R?(R=Math.round(W/.0254), -R=ra(R)+ra(R)+String.fromCharCode(1)):R=R+String.fromCharCode(0)+("zTXt"==F?String.fromCharCode(0):"")+W;W=4294967295;W=Editor.updateCRC(W,F,0,4);W=Editor.updateCRC(W,R,0,R.length);T+=ra(R.length)+F+R+ra(W^4294967295);T+=q.substring(ta-8,q.length);break}T+=q.substring(ta-8,ta-4+ma);ba(q,ma);ba(q,4)}while(ma);return"data:image/png;base64,"+(window.btoa?btoa(T):Base64.encode(T,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var K=ColorDialog.addRecentColor; -ColorDialog.addRecentColor=function(q,F){K.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var Q=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){Q.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(q,F){var R=null;null!=q.editor.graph.getModel().getParent(F)?R=F.getId():null!=q.currentPage&&(R=q.currentPage.getId());return R}); +(Sidebar.prototype.sidebarTitles=q.sidebarTitles);q.sidebarTitleSize&&(E=parseInt(q.sidebarTitleSize),!isNaN(E)&&0<E?Sidebar.prototype.sidebarTitleSize=E:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));q.fontCss&&("string"===typeof q.fontCss?Editor.configureFontCss(q.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=q.autosaveDelay&&(E=parseInt(q.autosaveDelay),!isNaN(E)&&0<E?DrawioFile.prototype.autosaveDelay=E:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay")); +null!=q.maxImageBytes&&(EditorUi.prototype.maxImageBytes=q.maxImageBytes);null!=q.maxImageSize&&(EditorUi.prototype.maxImageSize=q.maxImageSize);null!=q.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=q.shareCursorPosition);null!=q.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=q.showRemoteCursors)}};Editor.configureFontCss=function(q){if(null!=q){Editor.prototype.fontCss=q;var E=document.getElementsByTagName("script")[0];if(null!=E&&null!=E.parentNode){var Q=document.createElement("style"); +Q.setAttribute("type","text/css");Q.appendChild(document.createTextNode(q));E.parentNode.insertBefore(Q,E);q=q.split("url(");for(Q=1;Q<q.length;Q++){var Y=q[Q].indexOf(")");Y=Editor.trimCssUrl(q[Q].substring(0,Y));var R=document.createElement("link");R.setAttribute("rel","preload");R.setAttribute("href",Y);R.setAttribute("as","font");R.setAttribute("crossorigin","");E.parentNode.insertBefore(R,E)}}}};Editor.trimCssUrl=function(q){return q.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$", +"g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(q){q=null!=q?q:Editor.GUID_LENGTH;for(var E=[],Q=0;Q<q;Q++)E.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return E.join("")};Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages= +!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(q){q=null!=q&&"mxlibrary"!=q.nodeName?this.extractGraphModel(q):null;if(null!=q){var E=Editor.extractParserError(q,mxResources.get("invalidOrMissingFile"));if(E)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[q],"cause",[E]),Error(mxResources.get("notADiagramFile")+" ("+E+")");if("mxGraphModel"==q.nodeName){E=q.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=E&&""!= +E)E!=this.graph.currentStyle&&(Q=null!=this.graph.themes?this.graph.themes[E]:mxUtils.load(STYLE_PATH+"/"+E+".xml").getDocumentElement(),null!=Q&&(Y=new mxCodec(Q.ownerDocument),Y.decode(Q,this.graph.getStylesheet())));else{var Q=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=Q){var Y=new mxCodec(Q.ownerDocument);Y.decode(Q,this.graph.getStylesheet())}}this.graph.currentStyle=E;this.graph.mathEnabled="1"==urlParams.math|| +"1"==q.getAttribute("math");E=q.getAttribute("backgroundImage");null!=E?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(E)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==q.getAttribute("shadow"),!1);if(E=q.getAttribute("extFonts"))try{for(E=E.split("|").map(function(R){R=R.split("^");return{name:R[0],url:R[1]}}),Q=0;Q<E.length;Q++)this.graph.addExtFont(E[Q].name, +E[Q].url)}catch(R){console.log("ExtFonts format error: "+R.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(q,E){q=null!=q?q:!0;var Q=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&Q.setAttribute("style", +this.graph.currentStyle);var Y=this.graph.getBackgroundImageObject(this.graph.backgroundImage,E);null!=Y&&Q.setAttribute("backgroundImage",JSON.stringify(Y));Q.setAttribute("math",this.graph.mathEnabled?"1":"0");Q.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(Y=this.graph.extFonts.map(function(R){return R.name+"^"+R.url}),Q.setAttribute("extFonts",Y.join("|")));return Q};Editor.prototype.isDataSvg=function(q){try{var E=mxUtils.parseXml(q).documentElement.getAttribute("content"); +if(null!=E&&(null!=E&&"<"!=E.charAt(0)&&"%"!=E.charAt(0)&&(E=unescape(window.atob?atob(E):Base64.decode(cont,E))),null!=E&&"%"==E.charAt(0)&&(E=decodeURIComponent(E)),null!=E&&0<E.length)){var Q=mxUtils.parseXml(E).documentElement;return"mxfile"==Q.nodeName||"mxGraphModel"==Q.nodeName}}catch(Y){}return!1};Editor.prototype.extractGraphModel=function(q,E,Q){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled= +"1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();k.apply(this,arguments)};var m=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){m.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath= +function(q,E){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){q=null!=q?q:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(R){try{MathJax.typesetClear([R]),MathJax.typeset([R]),Editor.onMathJaxDone()}catch(ba){MathJax.typesetClear([R]),null!=ba.retry?ba.retry.then(function(){MathJax.typesetPromise([R]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+ba.toString())}};window.MathJax=null!=E?E:{options:{skipHtmlTags:{"[+]":["text"]}}, +loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath"]},startup:{pageReady:function(){for(var R=0;R<Editor.mathJaxQueue.length;R++)Editor.doMathJaxRender(Editor.mathJaxQueue[R])}}};Editor.MathJaxRender=function(R){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(R):Editor.mathJaxQueue.push(R)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var Q=Editor.prototype.init; +Editor.prototype.init=function(){Q.apply(this,arguments);var R=mxUtils.bind(this,function(ba,ea){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,R);this.graph.addListener(mxEvent.REFRESH,R)};E=document.getElementsByTagName("script");if(null!=E&&0<E.length){var Y=document.createElement("script");Y.setAttribute("type","text/javascript");Y.setAttribute("src",q);E[0].parentNode.appendChild(Y)}}}; +Editor.prototype.csvToArray=function(q){if(0<q.length){var E="",Q=[""],Y=0,R=!0,ba;q=$jscomp.makeIterator(q);for(ba=q.next();!ba.done;ba=q.next())ba=ba.value,'"'===ba?(R&&ba===E&&(Q[Y]+=ba),R=!R):","===ba&&R?ba=Q[++Y]="":Q[Y]+=ba,E=ba;return Q}return[]};Editor.prototype.getProxiedUrl=function(q){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(q)){var E=/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q); +E=/\.png$/i.test(q)||/\.pdf$/i.test(q)||E;var Q="t="+(new Date).getTime();q=PROXY_URL+"?url="+encodeURIComponent(q)+"&"+Q+(E?"&base64=1":"")}return q};Editor.prototype.isCorsEnabledForUrl=function(q){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||q.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(q)||"https://raw.githubusercontent.com/"=== +q.substring(0,34)||"https://fonts.googleapis.com/"===q.substring(0,29)||"https://fonts.gstatic.com/"===q.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var q=new mxUrlConverter;q.updateBaseUrl();var E=q.convert,Q=this;q.convert=function(Y){if(null!=Y){var R="http://"==Y.substring(0,7)||"https://"==Y.substring(0,8);R&&!navigator.onLine?Y=Editor.svgBrokenImage.src:!R||Y.substring(0,q.baseUrl.length)==q.baseUrl||Q.crossOriginImages&&Q.isCorsEnabledForUrl(Y)?"chrome-extension://"== +Y.substring(0,19)||mxClient.IS_CHROMEAPP||(Y=E.apply(this,arguments)):Y=PROXY_URL+"?url="+encodeURIComponent(Y)}return Y};return q};Editor.createSvgDataUri=function(q){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(q)))};Editor.prototype.convertImageToDataUri=function(q,E){try{var Q=!0,Y=window.setTimeout(mxUtils.bind(this,function(){Q=!1;E(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(q))mxUtils.get(q,mxUtils.bind(this,function(ba){window.clearTimeout(Y);Q&& +E(Editor.createSvgDataUri(ba.getText()))}),function(){window.clearTimeout(Y);Q&&E(Editor.svgBrokenImage.src)});else{var R=new Image;this.crossOriginImages&&(R.crossOrigin="anonymous");R.onload=function(){window.clearTimeout(Y);if(Q)try{var ba=document.createElement("canvas"),ea=ba.getContext("2d");ba.height=R.height;ba.width=R.width;ea.drawImage(R,0,0);E(ba.toDataURL())}catch(ra){E(Editor.svgBrokenImage.src)}};R.onerror=function(){window.clearTimeout(Y);Q&&E(Editor.svgBrokenImage.src)};R.src=q}}catch(ba){E(Editor.svgBrokenImage.src)}}; +Editor.prototype.convertImages=function(q,E,Q,Y){null==Y&&(Y=this.createImageUrlConverter());var R=0,ba=Q||{};Q=mxUtils.bind(this,function(ea,ra){ea=q.getElementsByTagName(ea);for(var ta=0;ta<ea.length;ta++)mxUtils.bind(this,function(la){try{if(null!=la){var pa=Y.convert(la.getAttribute(ra));if(null!=pa&&"data:"!=pa.substring(0,5)){var xa=ba[pa];null==xa?(R++,this.convertImageToDataUri(pa,function(Ca){null!=Ca&&(ba[pa]=Ca,la.setAttribute(ra,Ca));R--;0==R&&E(q)})):la.setAttribute(ra,xa)}else null!= +pa&&la.setAttribute(ra,pa)}}catch(Ca){}})(ea[ta])});Q("image","xlink:href");Q("img","src");0==R&&E(q)};Editor.base64Encode=function(q){for(var E="",Q=0,Y=q.length,R,ba,ea;Q<Y;){R=q.charCodeAt(Q++)&255;if(Q==Y){E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4);E+="==";break}ba=q.charCodeAt(Q++);if(Q==Y){E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>> +2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4|(ba&240)>>4);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((ba&15)<<2);E+="=";break}ea=q.charCodeAt(Q++);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4|(ba&240)>>4);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((ba&15)<<2|(ea&192)>> +6);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(ea&63)}return E};Editor.prototype.loadUrl=function(q,E,Q,Y,R,ba,ea,ra){try{var ta=!ea&&(Y||/(\.png)($|\?)/i.test(q)||/(\.jpe?g)($|\?)/i.test(q)||/(\.gif)($|\?)/i.test(q)||/(\.pdf)($|\?)/i.test(q));R=null!=R?R:!0;var la=mxUtils.bind(this,function(){mxUtils.get(q,mxUtils.bind(this,function(pa){if(200<=pa.getStatus()&&299>=pa.getStatus()){if(null!=E){var xa=pa.getText();if(ta){if((9==document.documentMode||10==document.documentMode)&& +"undefined"!==typeof window.mxUtilsBinaryToArray){pa=mxUtilsBinaryToArray(pa.request.responseBody).toArray();xa=Array(pa.length);for(var Ca=0;Ca<pa.length;Ca++)xa[Ca]=String.fromCharCode(pa[Ca]);xa=xa.join("")}ba=null!=ba?ba:"data:image/png;base64,";xa=ba+Editor.base64Encode(xa)}E(xa)}}else null!=Q&&(0==pa.getStatus()?Q({message:mxResources.get("accessDenied")},pa):404==pa.getStatus()?Q({code:pa.getStatus()},pa):Q({message:mxResources.get("error")+" "+pa.getStatus()},pa))}),function(pa){null!=Q&& +Q({message:mxResources.get("error")+" "+pa.getStatus()})},ta,this.timeout,function(){R&&null!=Q&&Q({code:App.ERROR_TIMEOUT,retry:la})},ra)});la()}catch(pa){null!=Q&&Q(pa)}};Editor.prototype.absoluteCssFonts=function(q){var E=null;if(null!=q){var Q=q.split("url(");if(0<Q.length){E=[Q[0]];q=window.location.pathname;var Y=null!=q?q.lastIndexOf("/"):-1;0<=Y&&(q=q.substring(0,Y+1));Y=document.getElementsByTagName("base");var R=null;null!=Y&&0<Y.length&&(R=Y[0].getAttribute("href"));for(var ba=1;ba<Q.length;ba++)if(Y= +Q[ba].indexOf(")"),0<Y){var ea=Editor.trimCssUrl(Q[ba].substring(0,Y));this.graph.isRelativeUrl(ea)&&(ea=null!=R?R+ea:window.location.protocol+"//"+window.location.hostname+("/"==ea.charAt(0)?"":q)+ea);E.push('url("'+ea+'"'+Q[ba].substring(Y))}else E.push(Q[ba])}else E=[q]}return null!=E?E.join(""):null};Editor.prototype.mapFontUrl=function(q,E,Q){/^https?:\/\//.test(E)&&!this.isCorsEnabledForUrl(E)&&(E=PROXY_URL+"?url="+encodeURIComponent(E));Q(q,E)};Editor.prototype.embedCssFonts=function(q,E){var Q= +q.split("url("),Y=0;null==this.cachedFonts&&(this.cachedFonts={});var R=mxUtils.bind(this,function(){if(0==Y){for(var ta=[Q[0]],la=1;la<Q.length;la++){var pa=Q[la].indexOf(")");ta.push('url("');ta.push(this.cachedFonts[Editor.trimCssUrl(Q[la].substring(0,pa))]);ta.push('"'+Q[la].substring(pa))}E(ta.join(""))}});if(0<Q.length){for(q=1;q<Q.length;q++){var ba=Q[q].indexOf(")"),ea=null,ra=Q[q].indexOf("format(",ba);0<ra&&(ea=Editor.trimCssUrl(Q[q].substring(ra+7,Q[q].indexOf(")",ra))));mxUtils.bind(this, +function(ta){if(null==this.cachedFonts[ta]){this.cachedFonts[ta]=ta;Y++;var la="application/x-font-ttf";if("svg"==ea||/(\.svg)($|\?)/i.test(ta))la="image/svg+xml";else if("otf"==ea||"embedded-opentype"==ea||/(\.otf)($|\?)/i.test(ta))la="application/x-font-opentype";else if("woff"==ea||/(\.woff)($|\?)/i.test(ta))la="application/font-woff";else if("woff2"==ea||/(\.woff2)($|\?)/i.test(ta))la="application/font-woff2";else if("eot"==ea||/(\.eot)($|\?)/i.test(ta))la="application/vnd.ms-fontobject";else if("sfnt"== +ea||/(\.sfnt)($|\?)/i.test(ta))la="application/font-sfnt";this.mapFontUrl(la,ta,mxUtils.bind(this,function(pa,xa){this.loadUrl(xa,mxUtils.bind(this,function(Ca){this.cachedFonts[ta]=Ca;Y--;R()}),mxUtils.bind(this,function(Ca){Y--;R()}),!0,null,"data:"+pa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(Q[q].substring(0,ba)),ea)}R()}else E(q)};Editor.prototype.loadFonts=function(q){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(E){this.resolvedFontCss= +E;null!=q&&q()})):null!=q&&q()};Editor.prototype.createGoogleFontCache=function(){var q={},E;for(E in Graph.fontMapping)Graph.isCssFontUrl(E)&&(q[E]=Graph.fontMapping[E]);return q};Editor.prototype.embedExtFonts=function(q){var E=this.graph.getCustomFonts();if(0<E.length){var Q=[],Y=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var R=mxUtils.bind(this,function(){0==Y&&this.embedCssFonts(Q.join(""),q)}),ba=0;ba<E.length;ba++)mxUtils.bind(this,function(ea, +ra){Graph.isCssFontUrl(ra)?null==this.cachedGoogleFonts[ra]?(Y++,this.loadUrl(ra,mxUtils.bind(this,function(ta){this.cachedGoogleFonts[ra]=ta;Q.push(ta+"\n");Y--;R()}),mxUtils.bind(this,function(ta){Y--;Q.push("@import url("+ra+");\n");R()}))):Q.push(this.cachedGoogleFonts[ra]+"\n"):Q.push('@font-face {font-family: "'+ea+'";src: url("'+ra+'")}\n')})(E[ba].name,E[ba].url);R()}else q()};Editor.prototype.addMathCss=function(q){q=q.getElementsByTagName("defs");if(null!=q&&0<q.length)for(var E=document.getElementsByTagName("style"), +Q=0;Q<E.length;Q++){var Y=mxUtils.getTextContent(E[Q]);0>Y.indexOf("mxPageSelector")&&0<Y.indexOf("MathJax")&&q[0].appendChild(E[Q].cloneNode(!0))}};Editor.prototype.addFontCss=function(q,E){E=null!=E?E:this.absoluteCssFonts(this.fontCss);if(null!=E){var Q=q.getElementsByTagName("defs"),Y=q.ownerDocument;0==Q.length?(Q=null!=Y.createElementNS?Y.createElementNS(mxConstants.NS_SVG,"defs"):Y.createElement("defs"),null!=q.firstChild?q.insertBefore(Q,q.firstChild):q.appendChild(Q)):Q=Q[0];q=null!=Y.createElementNS? +Y.createElementNS(mxConstants.NS_SVG,"style"):Y.createElement("style");q.setAttribute("type","text/css");mxUtils.setTextContent(q,E);Q.appendChild(q)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(q,E,Q){var Y=mxClient.IS_FF?8192:16384;return Math.min(Q,Math.min(Y/q,Y/E))};Editor.prototype.exportToCanvas=function(q,E,Q,Y,R,ba,ea,ra,ta,la,pa,xa,Ca,Ia,Aa,La,Da,Sa){try{ba=null!=ba?ba:!0;ea=null!=ea?ea: +!0;xa=null!=xa?xa:this.graph;Ca=null!=Ca?Ca:0;var Ra=ta?null:xa.background;Ra==mxConstants.NONE&&(Ra=null);null==Ra&&(Ra=Y);null==Ra&&0==ta&&(Ra=La?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(xa.getSvg(null,null,Ca,Ia,null,ea,null,null,null,la,null,La,Da,Sa),mxUtils.bind(this,function(Ta){try{var Za=new Image;Za.onload=mxUtils.bind(this,function(){try{var z=function(){mxClient.IS_SF?window.setTimeout(function(){U.drawImage(Za,0,0);q(L,Ta)},0):(U.drawImage(Za,0,0),q(L,Ta))}, +L=document.createElement("canvas"),O=parseInt(Ta.getAttribute("width")),V=parseInt(Ta.getAttribute("height"));ra=null!=ra?ra:1;null!=E&&(ra=ba?Math.min(1,Math.min(3*E/(4*V),E/O)):E/O);ra=this.getMaxCanvasScale(O,V,ra);O=Math.ceil(ra*O);V=Math.ceil(ra*V);L.setAttribute("width",O);L.setAttribute("height",V);var U=L.getContext("2d");null!=Ra&&(U.beginPath(),U.rect(0,0,O,V),U.fillStyle=Ra,U.fill());1!=ra&&U.scale(ra,ra);if(Aa){var ha=xa.view,ma=ha.scale;ha.scale=1;var wa=btoa(unescape(encodeURIComponent(ha.createSvgGrid(ha.gridColor)))); +ha.scale=ma;wa="data:image/svg+xml;base64,"+wa;var sa=xa.gridSize*ha.gridSteps*ra,ya=xa.getGraphBounds(),Ha=ha.translate.x*ma,Qa=ha.translate.y*ma,ua=Ha+(ya.x-Ha)/ma-Ca,za=Qa+(ya.y-Qa)/ma-Ca,Fa=new Image;Fa.onload=function(){try{for(var Ba=-Math.round(sa-mxUtils.mod((Ha-ua)*ra,sa)),Ea=-Math.round(sa-mxUtils.mod((Qa-za)*ra,sa));Ba<O;Ba+=sa)for(var Oa=Ea;Oa<V;Oa+=sa)U.drawImage(Fa,Ba/ra,Oa/ra);z()}catch(Pa){null!=R&&R(Pa)}};Fa.onerror=function(Ba){null!=R&&R(Ba)};Fa.src=wa}else z()}catch(Ba){null!= +R&&R(Ba)}});Za.onerror=function(z){null!=R&&R(z)};la&&this.graph.addSvgShadow(Ta);this.graph.mathEnabled&&this.addMathCss(Ta);var Na=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ta,this.resolvedFontCss),Za.src=Editor.createSvgDataUri(mxUtils.getXml(Ta))}catch(z){null!=R&&R(z)}});this.embedExtFonts(mxUtils.bind(this,function(z){try{null!=z&&this.addFontCss(Ta,z),this.loadFonts(Na)}catch(L){null!=R&&R(L)}}))}catch(z){null!=R&&R(z)}}),Q,pa)}catch(Ta){null!=R&&R(Ta)}}; +Editor.crcTable=[];for(var C=0;256>C;C++)for(var p=C,F=0;8>F;F++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[C]=p;Editor.updateCRC=function(q,E,Q,Y){for(var R=0;R<Y;R++)q=Editor.crcTable[(q^E.charCodeAt(Q+R))&255]^q>>>8;return q};Editor.crc32=function(q){for(var E=-1,Q=0;Q<q.length;Q++)E=E>>>8^Editor.crcTable[(E^q.charCodeAt(Q))&255];return(E^-1)>>>0};Editor.writeGraphModelToPng=function(q,E,Q,Y,R){function ba(pa,xa){var Ca=ta;ta+=xa;return pa.substring(Ca,ta)}function ea(pa){pa=ba(pa,4);return pa.charCodeAt(3)+ +(pa.charCodeAt(2)<<8)+(pa.charCodeAt(1)<<16)+(pa.charCodeAt(0)<<24)}function ra(pa){return String.fromCharCode(pa>>24&255,pa>>16&255,pa>>8&255,pa&255)}q=q.substring(q.indexOf(",")+1);q=window.atob?atob(q):Base64.decode(q,!0);var ta=0;if(ba(q,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=R&&R();else if(ba(q,4),"IHDR"!=ba(q,4))null!=R&&R();else{ba(q,17);R=q.substring(0,ta);do{var la=ea(q);if("IDAT"==ba(q,4)){R=q.substring(0,ta-8);"pHYs"==E&&"dpi"==Q?(Q=Math.round(Y/.0254), +Q=ra(Q)+ra(Q)+String.fromCharCode(1)):Q=Q+String.fromCharCode(0)+("zTXt"==E?String.fromCharCode(0):"")+Y;Y=4294967295;Y=Editor.updateCRC(Y,E,0,4);Y=Editor.updateCRC(Y,Q,0,Q.length);R+=ra(Q.length)+E+Q+ra(Y^4294967295);R+=q.substring(ta-8,q.length);break}R+=q.substring(ta-8,ta-4+la);ba(q,la);ba(q,4)}while(la);return"data:image/png;base64,"+(window.btoa?btoa(R):Base64.encode(R,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var K=ColorDialog.addRecentColor; +ColorDialog.addRecentColor=function(q,E){K.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var P=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){P.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(q,E){var Q=null;null!=q.editor.graph.getModel().getParent(E)?Q=E.getId():null!=q.currentPage&&(Q=q.currentPage.getId());return Q}); if(null!=window.StyleFormatPanel){var d=Format.prototype.init;Format.prototype.init=function(){d.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var f=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?f.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var q=this.editorUi.getCurrentFile();return"1"==urlParams.embed|| -null!=q&&q.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(q){return!1};var g=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(q){q=g.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var F=this.editorUi,R=F.editor.graph,W=this.createOption(mxResources.get("shadow"),function(){return R.shadowVisible},function(T){var ba=new ChangePageSetup(F);ba.ignoreColor=!0;ba.ignoreImage=!0;ba.shadowVisible= -T;R.model.execute(ba)},{install:function(T){this.listener=function(){T(R.shadowVisible)};F.addListener("shadowVisibleChanged",this.listener)},destroy:function(){F.removeListener(this.listener)}});Editor.enableShadowOption||(W.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(W,60));q.appendChild(W)}return q};var x=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(q){q=x.apply(this,arguments);var F=this.editorUi,R=F.editor.graph; -if(R.isEnabled()){var W=F.getCurrentFile();if(null!=W&&W.isAutosaveOptional()){var T=this.createOption(mxResources.get("autosave"),function(){return F.editor.autosave},function(ha){F.editor.setAutosave(ha);F.editor.autosave&&W.isModified()&&W.fileChanged()},{install:function(ha){this.listener=function(){ha(F.editor.autosave)};F.editor.addListener("autosaveChanged",this.listener)},destroy:function(){F.editor.removeListener(this.listener)}});q.appendChild(T)}}if(this.isMathOptionVisible()&&R.isEnabled()&& -"undefined"!==typeof MathJax){T=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return R.mathEnabled},function(ha){F.actions.get("mathematicalTypesetting").funct()},{install:function(ha){this.listener=function(){ha(R.mathEnabled)};F.addListener("mathEnabledChanged",this.listener)},destroy:function(){F.removeListener(this.listener)}});T.style.paddingTop="5px";q.appendChild(T);var ba=F.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");ba.style.position= -"relative";ba.style.marginLeft="6px";ba.style.top="2px";T.appendChild(ba)}return q};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties= +null!=q&&q.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(q){return!1};var g=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(q){q=g.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var E=this.editorUi,Q=E.editor.graph,Y=this.createOption(mxResources.get("shadow"),function(){return Q.shadowVisible},function(R){var ba=new ChangePageSetup(E);ba.ignoreColor=!0;ba.ignoreImage=!0;ba.shadowVisible= +R;Q.model.execute(ba)},{install:function(R){this.listener=function(){R(Q.shadowVisible)};E.addListener("shadowVisibleChanged",this.listener)},destroy:function(){E.removeListener(this.listener)}});Editor.enableShadowOption||(Y.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(Y,60));q.appendChild(Y)}return q};var x=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(q){q=x.apply(this,arguments);var E=this.editorUi,Q=E.editor.graph; +if(Q.isEnabled()){var Y=E.getCurrentFile();if(null!=Y&&Y.isAutosaveOptional()){var R=this.createOption(mxResources.get("autosave"),function(){return E.editor.autosave},function(ea){E.editor.setAutosave(ea);E.editor.autosave&&Y.isModified()&&Y.fileChanged()},{install:function(ea){this.listener=function(){ea(E.editor.autosave)};E.editor.addListener("autosaveChanged",this.listener)},destroy:function(){E.editor.removeListener(this.listener)}});q.appendChild(R)}}if(this.isMathOptionVisible()&&Q.isEnabled()&& +"undefined"!==typeof MathJax){R=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return Q.mathEnabled},function(ea){E.actions.get("mathematicalTypesetting").funct()},{install:function(ea){this.listener=function(){ea(Q.mathEnabled)};E.addListener("mathEnabledChanged",this.listener)},destroy:function(){E.removeListener(this.listener)}});R.style.paddingTop="5px";q.appendChild(R);var ba=E.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");ba.style.position= +"relative";ba.style.marginLeft="6px";ba.style.top="2px";R.appendChild(ba)}return q};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties= [{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double", dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}, {name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties= @@ -3257,93 +3254,93 @@ min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name: stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000", font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3", stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"}, -{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(q,F,R){if(null!=F){var W=function(ba){if(null!=ba)if(R)for(var ha=0;ha<ba.length;ha++)F[ba[ha].name]=ba[ha];else for(var ra in F){var ta=!1;for(ha=0;ha<ba.length;ha++)if(ba[ha].name==ra&&ba[ha].type==F[ra].type){ta=!0;break}ta|| -delete F[ra]}},T=this.editorUi.editor.graph.view.getState(q);null!=T&&null!=T.shape&&(T.shape.commonCustomPropAdded||(T.shape.commonCustomPropAdded=!0,T.shape.customProperties=T.shape.customProperties||[],T.cell.vertex?Array.prototype.push.apply(T.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(T.shape.customProperties,Editor.commonEdgeProperties)),W(T.shape.customProperties));q=q.getAttribute("customProperties");if(null!=q)try{W(JSON.parse(q))}catch(ba){}}};var z= -StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var q=this.editorUi.getSelectionState();"image"!=q.style.shape&&!q.containsLabel&&0<q.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));z.apply(this,arguments);if(Editor.enableCustomProperties){for(var F={},R=q.vertices,W=q.edges,T=0;T<R.length;T++)this.findCommonProperties(R[T],F,0==T);for(T=0;T<W.length;T++)this.findCommonProperties(W[T],F,0==R.length&&0==T);null!=Object.getOwnPropertyNames&&0< -Object.getOwnPropertyNames(F).length&&this.container.appendChild(this.addProperties(this.createPanel(),F,q))}};var u=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(q){this.addActions(q,["copyStyle","pasteStyle"]);return u.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(q,F,R){function W(X,fa,la,xa){za.getModel().beginUpdate();try{var sa=[],ya=[];if(null!=la.index){for(var Fa=[],wa=la.parentRow.nextSibling;wa&& -wa.getAttribute("data-pName")==X;)Fa.push(wa.getAttribute("data-pValue")),wa=wa.nextSibling;la.index<Fa.length?null!=xa?Fa.splice(xa,1):Fa[la.index]=fa:Fa.push(fa);null!=la.size&&Fa.length>la.size&&(Fa=Fa.slice(0,la.size));fa=Fa.join(",");null!=la.countProperty&&(za.setCellStyles(la.countProperty,Fa.length,za.getSelectionCells()),sa.push(la.countProperty),ya.push(Fa.length))}za.setCellStyles(X,fa,za.getSelectionCells());sa.push(X);ya.push(fa);if(null!=la.dependentProps)for(X=0;X<la.dependentProps.length;X++){var ua= -la.dependentPropsDefVal[X],La=la.dependentPropsVals[X];if(La.length>fa)La=La.slice(0,fa);else for(var Oa=La.length;Oa<fa;Oa++)La.push(ua);La=La.join(",");za.setCellStyles(la.dependentProps[X],La,za.getSelectionCells());sa.push(la.dependentProps[X]);ya.push(La)}if("function"==typeof la.onChange)la.onChange(za,fa);pa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",sa,"values",ya,"cells",za.getSelectionCells()))}finally{za.getModel().endUpdate()}}function T(X,fa,la){var xa=mxUtils.getOffset(q, -!0),sa=mxUtils.getOffset(X,!0);fa.style.position="absolute";fa.style.left=sa.x-xa.x+"px";fa.style.top=sa.y-xa.y+"px";fa.style.width=X.offsetWidth+"px";fa.style.height=X.offsetHeight-(la?4:0)+"px";fa.style.zIndex=5}function ba(X,fa,la){var xa=document.createElement("div");xa.style.width="32px";xa.style.height="4px";xa.style.margin="2px";xa.style.border="1px solid black";xa.style.background=fa&&"none"!=fa?fa:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(pa,function(sa){this.editorUi.pickColor(fa, -function(ya){xa.style.background="none"==ya?"url('"+Dialog.prototype.noColorImage+"')":ya;W(X,ya,la)});mxEvent.consume(sa)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(xa);return btn}function ha(X,fa,la,xa,sa,ya,Fa){null!=fa&&(fa=fa.split(","),Ba.push({name:X,values:fa,type:la,defVal:xa,countProperty:sa,parentRow:ya,isDeletable:!0,flipBkg:Fa}));btn=mxUtils.button("+",mxUtils.bind(pa,function(wa){for(var ua=ya,La=0;null!=ua.nextSibling;)if(ua.nextSibling.getAttribute("data-pName")== -X)ua=ua.nextSibling,La++;else break;var Oa={type:la,parentRow:ya,index:La,isDeletable:!0,defVal:xa,countProperty:sa};La=ma(X,"",Oa,0==La%2,Fa);W(X,xa,Oa);ua.parentNode.insertBefore(La,ua.nextSibling);mxEvent.consume(wa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function ra(X,fa,la,xa,sa,ya,Fa){if(0<sa){var wa=Array(sa);fa=null!=fa?fa.split(","):[];for(var ua=0;ua<sa;ua++)wa[ua]=null!=fa[ua]?fa[ua]:null!=xa?xa:"";Ba.push({name:X,values:wa,type:la,defVal:xa, -parentRow:ya,flipBkg:Fa,size:sa})}return document.createElement("div")}function ta(X,fa,la){var xa=document.createElement("input");xa.type="checkbox";xa.checked="1"==fa;mxEvent.addListener(xa,"change",function(){W(X,xa.checked?"1":"0",la)});return xa}function ma(X,fa,la,xa,sa){var ya=la.dispName,Fa=la.type,wa=document.createElement("tr");wa.className="gePropRow"+(sa?"Dark":"")+(xa?"Alt":"")+" gePropNonHeaderRow";wa.setAttribute("data-pName",X);wa.setAttribute("data-pValue",fa);xa=!1;null!=la.index&& -(wa.setAttribute("data-index",la.index),ya=(null!=ya?ya:"")+"["+la.index+"]",xa=!0);var ua=document.createElement("td");ua.className="gePropRowCell";ya=mxResources.get(ya,null,ya);mxUtils.write(ua,ya);ua.setAttribute("title",ya);xa&&(ua.style.textAlign="right");wa.appendChild(ua);ua=document.createElement("td");ua.className="gePropRowCell";if("color"==Fa)ua.appendChild(ba(X,fa,la));else if("bool"==Fa||"boolean"==Fa)ua.appendChild(ta(X,fa,la));else if("enum"==Fa){var La=la.enumList;for(sa=0;sa<La.length;sa++)if(ya= -La[sa],ya.val==fa){mxUtils.write(ua,mxResources.get(ya.dispName,null,ya.dispName));break}mxEvent.addListener(ua,"click",mxUtils.bind(pa,function(){var Oa=document.createElement("select");T(ua,Oa);for(var Ca=0;Ca<La.length;Ca++){var Ma=La[Ca],Ga=document.createElement("option");Ga.value=mxUtils.htmlEntities(Ma.val);mxUtils.write(Ga,mxResources.get(Ma.dispName,null,Ma.dispName));Oa.appendChild(Ga)}Oa.value=fa;q.appendChild(Oa);mxEvent.addListener(Oa,"change",function(){var Ya=mxUtils.htmlEntities(Oa.value); -W(X,Ya,la)});Oa.focus();mxEvent.addListener(Oa,"blur",function(){q.removeChild(Oa)})}))}else"dynamicArr"==Fa?ua.appendChild(ha(X,fa,la.subType,la.subDefVal,la.countProperty,wa,sa)):"staticArr"==Fa?ua.appendChild(ra(X,fa,la.subType,la.subDefVal,la.size,wa,sa)):"readOnly"==Fa?(sa=document.createElement("input"),sa.setAttribute("readonly",""),sa.value=fa,sa.style.width="96px",sa.style.borderWidth="0px",ua.appendChild(sa)):(ua.innerHTML=mxUtils.htmlEntities(decodeURIComponent(fa)),mxEvent.addListener(ua, -"click",mxUtils.bind(pa,function(){function Oa(){var Ma=Ca.value;Ma=0==Ma.length&&"string"!=Fa?0:Ma;la.allowAuto&&(null!=Ma.trim&&"auto"==Ma.trim().toLowerCase()?(Ma="auto",Fa="string"):(Ma=parseFloat(Ma),Ma=isNaN(Ma)?0:Ma));null!=la.min&&Ma<la.min?Ma=la.min:null!=la.max&&Ma>la.max&&(Ma=la.max);Ma=encodeURIComponent(("int"==Fa?parseInt(Ma):Ma)+"");W(X,Ma,la)}var Ca=document.createElement("input");T(ua,Ca,!0);Ca.value=decodeURIComponent(fa);Ca.className="gePropEditor";"int"!=Fa&&"float"!=Fa||la.allowAuto|| -(Ca.type="number",Ca.step="int"==Fa?"1":"any",null!=la.min&&(Ca.min=parseFloat(la.min)),null!=la.max&&(Ca.max=parseFloat(la.max)));q.appendChild(Ca);mxEvent.addListener(Ca,"keypress",function(Ma){13==Ma.keyCode&&Oa()});Ca.focus();mxEvent.addListener(Ca,"blur",function(){Oa()})})));la.isDeletable&&(sa=mxUtils.button("-",mxUtils.bind(pa,function(Oa){W(X,"",la,la.index);mxEvent.consume(Oa)})),sa.style.height="16px",sa.style.width="25px",sa.style.float="right",sa.className="geColorBtn",ua.appendChild(sa)); -wa.appendChild(ua);return wa}var pa=this,za=this.editorUi.editor.graph,Ba=[];q.style.position="relative";q.style.padding="0";var Ia=document.createElement("table");Ia.className="geProperties";Ia.style.whiteSpace="nowrap";Ia.style.width="100%";var Aa=document.createElement("tr");Aa.className="gePropHeader";var Ka=document.createElement("th");Ka.className="gePropHeaderCell";var Da=document.createElement("img");Da.src=Sidebar.prototype.expandedImage;Da.style.verticalAlign="middle";Ka.appendChild(Da); -mxUtils.write(Ka,mxResources.get("property"));Aa.style.cursor="pointer";var Ra=function(){var X=Ia.querySelectorAll(".gePropNonHeaderRow");if(pa.editorUi.propertiesCollapsed){Da.src=Sidebar.prototype.collapsedImage;var fa="none";for(var la=q.childNodes.length-1;0<=la;la--)try{var xa=q.childNodes[la],sa=xa.nodeName.toUpperCase();"INPUT"!=sa&&"SELECT"!=sa||q.removeChild(xa)}catch(ya){}}else Da.src=Sidebar.prototype.expandedImage,fa="";for(la=0;la<X.length;la++)X[la].style.display=fa};mxEvent.addListener(Aa, -"click",function(){pa.editorUi.propertiesCollapsed=!pa.editorUi.propertiesCollapsed;Ra()});Aa.appendChild(Ka);Ka=document.createElement("th");Ka.className="gePropHeaderCell";Ka.innerHTML=mxResources.get("value");Aa.appendChild(Ka);Ia.appendChild(Aa);var Qa=!1,Ta=!1;Aa=null;1==R.vertices.length&&0==R.edges.length?Aa=R.vertices[0].id:0==R.vertices.length&&1==R.edges.length&&(Aa=R.edges[0].id);null!=Aa&&Ia.appendChild(ma("id",mxUtils.htmlEntities(Aa),{dispName:"ID",type:"readOnly"},!0,!1));for(var Za in F)if(Aa= -F[Za],"function"!=typeof Aa.isVisible||Aa.isVisible(R,this)){var Pa=null!=R.style[Za]?mxUtils.htmlEntities(R.style[Za]+""):null!=Aa.getDefaultValue?Aa.getDefaultValue(R,this):Aa.defVal;if("separator"==Aa.type)Ta=!Ta;else{if("staticArr"==Aa.type)Aa.size=parseInt(R.style[Aa.sizeProperty]||F[Aa.sizeProperty].defVal)||0;else if(null!=Aa.dependentProps){var y=Aa.dependentProps,M=[],N=[];for(Ka=0;Ka<y.length;Ka++){var S=R.style[y[Ka]];N.push(F[y[Ka]].subDefVal);M.push(null!=S?S.split(","):[])}Aa.dependentPropsDefVal= -N;Aa.dependentPropsVals=M}Ia.appendChild(ma(Za,Pa,Aa,Qa,Ta));Qa=!Qa}}for(Ka=0;Ka<Ba.length;Ka++)for(Aa=Ba[Ka],F=Aa.parentRow,R=0;R<Aa.values.length;R++)Za=ma(Aa.name,Aa.values[R],{type:Aa.type,parentRow:Aa.parentRow,isDeletable:Aa.isDeletable,index:R,defVal:Aa.defVal,countProperty:Aa.countProperty,size:Aa.size},0==R%2,Aa.flipBkg),F.parentNode.insertBefore(Za,F.nextSibling),F=Za;q.appendChild(Ia);Ra();return q};StyleFormatPanel.prototype.addStyles=function(q){function F(Aa){mxEvent.addListener(Aa, -"mouseenter",function(){Aa.style.opacity="1"});mxEvent.addListener(Aa,"mouseleave",function(){Aa.style.opacity="0.5"})}var R=this.editorUi,W=R.editor.graph,T=document.createElement("div");T.style.whiteSpace="nowrap";T.style.paddingLeft="24px";T.style.paddingRight="20px";q.style.paddingLeft="16px";q.style.paddingBottom="6px";q.style.position="relative";q.appendChild(T);var ba="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "), -ha=document.createElement("div");ha.style.whiteSpace="nowrap";ha.style.position="relative";ha.style.textAlign="center";ha.style.width="210px";for(var ra=[],ta=0;ta<this.defaultColorSchemes.length;ta++){var ma=document.createElement("div");ma.style.display="inline-block";ma.style.width="6px";ma.style.height="6px";ma.style.marginLeft="4px";ma.style.marginRight="3px";ma.style.borderRadius="3px";ma.style.cursor="pointer";ma.style.background="transparent";ma.style.border="1px solid #b5b6b7";mxUtils.bind(this, -function(Aa){mxEvent.addListener(ma,"click",mxUtils.bind(this,function(){pa(Aa)}))})(ta);ra.push(ma);ha.appendChild(ma)}var pa=mxUtils.bind(this,function(Aa){null!=ra[Aa]&&(null!=this.format.currentScheme&&null!=ra[this.format.currentScheme]&&(ra[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=Aa,za(this.defaultColorSchemes[this.format.currentScheme]),ra[this.format.currentScheme].style.background="#84d7ff")}),za=mxUtils.bind(this,function(Aa){var Ka=mxUtils.bind(this, -function(Ra){var Qa=mxUtils.button("",mxUtils.bind(this,function(Pa){W.getModel().beginUpdate();try{for(var y=R.getSelectionState().cells,M=0;M<y.length;M++){for(var N=W.getModel().getStyle(y[M]),S=0;S<ba.length;S++)N=mxUtils.removeStylename(N,ba[S]);var X=W.getModel().isVertex(y[M])?W.defaultVertexStyle:W.defaultEdgeStyle;null!=Ra?(mxEvent.isShiftDown(Pa)||(N=""==Ra.fill?mxUtils.setStyle(N,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(N,mxConstants.STYLE_FILLCOLOR,Ra.fill||mxUtils.getValue(X, -mxConstants.STYLE_FILLCOLOR,null)),N=mxUtils.setStyle(N,mxConstants.STYLE_GRADIENTCOLOR,Ra.gradient||mxUtils.getValue(X,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(Pa)||mxClient.IS_MAC&&mxEvent.isMetaDown(Pa)||!W.getModel().isVertex(y[M])||(N=mxUtils.setStyle(N,mxConstants.STYLE_FONTCOLOR,Ra.font||mxUtils.getValue(X,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(Pa)||(N=""==Ra.stroke?mxUtils.setStyle(N,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(N,mxConstants.STYLE_STROKECOLOR, -Ra.stroke||mxUtils.getValue(X,mxConstants.STYLE_STROKECOLOR,null)))):(N=mxUtils.setStyle(N,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(X,mxConstants.STYLE_FILLCOLOR,"#ffffff")),N=mxUtils.setStyle(N,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(X,mxConstants.STYLE_STROKECOLOR,"#000000")),N=mxUtils.setStyle(N,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(X,mxConstants.STYLE_GRADIENTCOLOR,null)),W.getModel().isVertex(y[M])&&(N=mxUtils.setStyle(N,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(X,mxConstants.STYLE_FONTCOLOR, -null))));W.getModel().setStyle(y[M],N)}}finally{W.getModel().endUpdate()}}));Qa.className="geStyleButton";Qa.style.width="36px";Qa.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Qa.style.margin="0px 6px 6px 0px";if(null!=Ra){var Ta="1"==urlParams.sketch?"2px solid":"1px solid";null!=Ra.border&&(Ta=Ra.border);null!=Ra.gradient?mxClient.IS_IE&&10>document.documentMode?Qa.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Ra.fill+"', EndColorStr='"+Ra.gradient+ -"', GradientType=0)":Qa.style.backgroundImage="linear-gradient("+Ra.fill+" 0px,"+Ra.gradient+" 100%)":Ra.fill==mxConstants.NONE?Qa.style.background="url('"+Dialog.prototype.noColorImage+"')":Qa.style.backgroundColor=""==Ra.fill?mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Ra.fill||mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Qa.style.border=Ra.stroke==mxConstants.NONE? -Ta+" transparent":""==Ra.stroke?Ta+" "+mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Ta+" "+(Ra.stroke||mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Ra.title&&Qa.setAttribute("title",Ra.title)}else{Ta=mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Za=mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR, -"#000000");Qa.style.backgroundColor=Ta;Qa.style.border="1px solid "+Za}Qa.style.borderRadius="0";T.appendChild(Qa)});T.innerText="";for(var Da=0;Da<Aa.length;Da++)0<Da&&0==mxUtils.mod(Da,4)&&mxUtils.br(T),Ka(Aa[Da])});null==this.format.currentScheme?pa(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):pa(this.format.currentScheme);ta=10>=this.defaultColorSchemes.length?28:8;var Ba=document.createElement("div");Ba.style.cssText="position:absolute;left:10px;top:8px;bottom:"+ta+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);"; -mxEvent.addListener(Ba,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Ia=document.createElement("div");Ia.style.cssText="position:absolute;left:202px;top:8px;bottom:"+ta+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);"; -1<this.defaultColorSchemes.length&&(q.appendChild(Ba),q.appendChild(Ia));mxEvent.addListener(Ia,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));F(Ba);F(Ia);za(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&q.appendChild(ha);return q};StyleFormatPanel.prototype.addEditOps=function(q){var F=this.editorUi.getSelectionState(),R=this.editorUi.editor.graph,W=null;1==F.cells.length&&(W=mxUtils.button(mxResources.get("editStyle"), -mxUtils.bind(this,function(T){this.editorUi.actions.get("editStyle").funct()})),W.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),W.style.width="210px",W.style.marginBottom="2px",q.appendChild(W));R=1==F.cells.length?R.view.getState(F.cells[0]):null;null!=R&&null!=R.shape&&null!=R.shape.stencil?(F=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(T){this.editorUi.actions.get("editShape").funct()})),F.setAttribute("title", -mxResources.get("editShape")),F.style.marginBottom="2px",null==W?F.style.width="210px":(W.style.width="104px",F.style.width="104px",F.style.marginLeft="2px"),q.appendChild(F)):F.image&&0<F.cells.length&&(F=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(T){this.editorUi.actions.get("image").funct()})),F.setAttribute("title",mxResources.get("editImage")),F.style.marginBottom="2px",null==W?F.style.width="210px":(W.style.width="104px",F.style.width="104px",F.style.marginLeft="2px"), -q.appendChild(F));return q}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(q){return q.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(q){return Graph.isGoogleFontUrl(q)};Graph.createFontElement=function(q, -F){var R=Graph.fontMapping[F];null==R&&Graph.isCssFontUrl(F)?(q=document.createElement("link"),q.setAttribute("rel","stylesheet"),q.setAttribute("type","text/css"),q.setAttribute("charset","UTF-8"),q.setAttribute("href",F)):(null==R&&(R='@font-face {\nfont-family: "'+q+'";\nsrc: url("'+F+'");\n}'),q=document.createElement("style"),mxUtils.write(q,R));return q};Graph.addFont=function(q,F,R){if(null!=q&&0<q.length&&null!=F&&0<F.length){var W=q.toLowerCase();if("helvetica"!=W&&"arial"!=q&&"sans-serif"!= -W){var T=Graph.customFontElements[W];null!=T&&T.url!=F&&(T.elt.parentNode.removeChild(T.elt),T=null);null==T?(T=F,"http:"==F.substring(0,5)&&(T=PROXY_URL+"?url="+encodeURIComponent(F)),T={name:q,url:F,elt:Graph.createFontElement(q,T)},Graph.customFontElements[W]=T,Graph.recentCustomFonts[W]=T,F=document.getElementsByTagName("head")[0],null!=R&&("link"==T.elt.nodeName.toLowerCase()?(T.elt.onload=R,T.elt.onerror=R):R()),null!=F&&F.appendChild(T.elt)):null!=R&&R()}else null!=R&&R()}else null!=R&&R(); -return q};Graph.getFontUrl=function(q,F){q=Graph.customFontElements[q.toLowerCase()];null!=q&&(F=q.url);return F};Graph.processFontAttributes=function(q){q=q.getElementsByTagName("*");for(var F=0;F<q.length;F++){var R=q[F].getAttribute("data-font-src");if(null!=R){var W="FONT"==q[F].nodeName?q[F].getAttribute("face"):q[F].style.fontFamily;null!=W&&Graph.addFont(W,R)}}};Graph.processFontStyle=function(q){if(null!=q){var F=mxUtils.getValue(q,"fontSource",null);if(null!=F){var R=mxUtils.getValue(q,mxConstants.STYLE_FONTFAMILY, -null);null!=R&&Graph.addFont(R,decodeURIComponent(F))}}return q};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!= -urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var H=Graph.prototype.init;Graph.prototype.init=function(){function q(T){F=T}H.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var F=null;mxEvent.addListener(this.container,"mouseenter",q);mxEvent.addListener(this.container,"mousemove",q);mxEvent.addListener(this.container,"mouseleave",function(T){F=null});this.isMouseInsertPoint=function(){return null!=F};var R=this.getInsertPoint; -this.getInsertPoint=function(){return null!=F?this.getPointForEvent(F):R.apply(this,arguments)};var W=this.layoutManager.getLayout;this.layoutManager.getLayout=function(T){var ba=this.graph.getCellStyle(T);if(null!=ba&&"rack"==ba.childLayout){var ha=new mxStackLayout(this.graph,!1);ha.gridSize=null!=ba.rackUnitSize?parseFloat(ba.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;ha.marginLeft=ba.marginLeft||0;ha.marginRight=ba.marginRight||0;ha.marginTop=ba.marginTop|| -0;ha.marginBottom=ba.marginBottom||0;ha.allowGaps=ba.allowGaps||0;ha.horizontal="1"==mxUtils.getValue(ba,"horizontalRack","0");ha.resizeParent=!1;ha.fill=!0;return ha}return W.apply(this,arguments)};this.updateGlobalUrlVariables()};var J=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(q,F){return Graph.processFontStyle(J.apply(this,arguments))};var D=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(q,F,R,W,T,ba,ha,ra,ta,ma, -pa){D.apply(this,arguments);Graph.processFontAttributes(pa)};var G=mxText.prototype.redraw;mxText.prototype.redraw=function(){G.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(q,F,R){function W(){for(var Aa=ha.getSelectionCells(),Ka=[],Da=0;Da<Aa.length;Da++)ha.isCellVisible(Aa[Da])&&Ka.push(Aa[Da]);ha.setSelectionCells(Ka)}function T(Aa){ha.setHiddenTags(Aa?[]:ra.slice());W();ha.refresh()}function ba(Aa, -Ka){ma.innerText="";if(0<Aa.length){var Da=document.createElement("table");Da.setAttribute("cellpadding","2");Da.style.boxSizing="border-box";Da.style.tableLayout="fixed";Da.style.width="100%";var Ra=document.createElement("tbody");if(null!=Aa&&0<Aa.length)for(var Qa=0;Qa<Aa.length;Qa++)(function(Ta){var Za=0>mxUtils.indexOf(ha.hiddenTags,Ta),Pa=document.createElement("tr"),y=document.createElement("td");y.style.align="center";y.style.width="16px";var M=document.createElement("img");M.setAttribute("src", -Za?Editor.visibleImage:Editor.hiddenImage);M.setAttribute("title",mxResources.get(Za?"hideIt":"show",[Ta]));mxUtils.setOpacity(M,Za?75:25);M.style.verticalAlign="middle";M.style.cursor="pointer";M.style.width="16px";if(F||Editor.isDarkMode())M.style.filter="invert(100%)";y.appendChild(M);mxEvent.addListener(M,"click",function(S){mxEvent.isShiftDown(S)?T(0<=mxUtils.indexOf(ha.hiddenTags,Ta)):(ha.toggleHiddenTag(Ta),W(),ha.refresh());mxEvent.consume(S)});Pa.appendChild(y);y=document.createElement("td"); -y.style.overflow="hidden";y.style.whiteSpace="nowrap";y.style.textOverflow="ellipsis";y.style.verticalAlign="middle";y.style.cursor="pointer";y.setAttribute("title",Ta);a=document.createElement("a");mxUtils.write(a,Ta);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Za?100:40);y.appendChild(a);mxEvent.addListener(y,"click",function(S){if(mxEvent.isShiftDown(S)){T(!0);var X=ha.getCellsForTags([Ta],null,null,!0);ha.isEnabled()?ha.setSelectionCells(X):ha.highlightCells(X)}else if(Za&& -0<ha.hiddenTags.length)T(!0);else{X=ra.slice();var fa=mxUtils.indexOf(X,Ta);X.splice(fa,1);ha.setHiddenTags(X);W();ha.refresh()}mxEvent.consume(S)});Pa.appendChild(y);if(ha.isEnabled()){y=document.createElement("td");y.style.verticalAlign="middle";y.style.textAlign="center";y.style.width="18px";if(null==Ka){y.style.align="center";y.style.width="16px";M=document.createElement("img");M.setAttribute("src",Editor.crossImage);M.setAttribute("title",mxResources.get("removeIt",[Ta]));mxUtils.setOpacity(M, -Za?75:25);M.style.verticalAlign="middle";M.style.cursor="pointer";M.style.width="16px";if(F||Editor.isDarkMode())M.style.filter="invert(100%)";mxEvent.addListener(M,"click",function(S){var X=mxUtils.indexOf(ra,Ta);0<=X&&ra.splice(X,1);ha.removeTagsForCells(ha.model.getDescendants(ha.model.getRoot()),[Ta]);ha.refresh();mxEvent.consume(S)});y.appendChild(M)}else{var N=document.createElement("input");N.setAttribute("type","checkbox");N.style.margin="0px";N.defaultChecked=null!=Ka&&0<=mxUtils.indexOf(Ka, -Ta);N.checked=N.defaultChecked;N.style.background="transparent";N.setAttribute("title",mxResources.get(N.defaultChecked?"removeIt":"add",[Ta]));mxEvent.addListener(N,"change",function(S){N.checked?ha.addTagsForCells(ha.getSelectionCells(),[Ta]):ha.removeTagsForCells(ha.getSelectionCells(),[Ta]);mxEvent.consume(S)});y.appendChild(N)}Pa.appendChild(y)}Ra.appendChild(Pa)})(Aa[Qa]);Da.appendChild(Ra);ma.appendChild(Da)}}var ha=this,ra=ha.hiddenTags.slice(),ta=document.createElement("div");ta.style.userSelect= -"none";ta.style.overflow="hidden";ta.style.padding="10px";ta.style.height="100%";var ma=document.createElement("div");ma.style.boxSizing="border-box";ma.style.borderRadius="4px";ma.style.userSelect="none";ma.style.overflow="auto";ma.style.position="absolute";ma.style.left="10px";ma.style.right="10px";ma.style.top="10px";ma.style.border=ha.isEnabled()?"1px solid #808080":"none";ma.style.bottom=ha.isEnabled()?"48px":"10px";ta.appendChild(ma);var pa=mxUtils.button(mxResources.get("reset"),function(Aa){ha.setHiddenTags([]); -mxEvent.isShiftDown(Aa)||(ra=ha.hiddenTags.slice());W();ha.refresh()});pa.setAttribute("title",mxResources.get("reset"));pa.className="geBtn";pa.style.margin="0 4px 0 0";var za=mxUtils.button(mxResources.get("add"),function(){null!=R&&R(ra,function(Aa){ra=Aa;Ba()})});za.setAttribute("title",mxResources.get("add"));za.className="geBtn";za.style.margin="0";ha.addListener(mxEvent.ROOT,function(){ra=ha.hiddenTags.slice()});var Ba=mxUtils.bind(this,function(Aa,Ka){if(q()){Aa=ha.getAllTags();for(Ka=0;Ka< -Aa.length;Ka++)0>mxUtils.indexOf(ra,Aa[Ka])&&ra.push(Aa[Ka]);ra.sort();ha.isSelectionEmpty()?ba(ra):ba(ra,ha.getCommonTagsForCells(ha.getSelectionCells()))}});ha.selectionModel.addListener(mxEvent.CHANGE,Ba);ha.model.addListener(mxEvent.CHANGE,Ba);ha.addListener(mxEvent.REFRESH,Ba);var Ia=document.createElement("div");Ia.style.boxSizing="border-box";Ia.style.whiteSpace="nowrap";Ia.style.position="absolute";Ia.style.overflow="hidden";Ia.style.bottom="0px";Ia.style.height="42px";Ia.style.right="10px"; -Ia.style.left="10px";ha.isEnabled()&&(Ia.appendChild(pa),Ia.appendChild(za),ta.appendChild(Ia));return{div:ta,refresh:Ba}};Graph.prototype.getCustomFonts=function(){var q=this.extFonts;q=null!=q?q.slice():[];for(var F in Graph.customFontElements){var R=Graph.customFontElements[F];q.push({name:R.name,url:R.url})}return q};Graph.prototype.setFont=function(q,F){Graph.addFont(q,F);document.execCommand("fontname",!1,q);if(null!=F){var R=this.cellEditor.textarea.getElementsByTagName("font");F=Graph.getFontUrl(q, -F);for(var W=0;W<R.length;W++)R[W].getAttribute("face")==q&&R[W].getAttribute("data-font-src")!=F&&R[W].setAttribute("data-font-src",F)}};var V=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return V.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var q=JSON.parse(decodeURIComponent(urlParams.vars)); -if(null!=q)for(var F in q)this.globalVars[F]=q[F]}catch(R){null!=window.console&&console.log("Error in vars URL parameter: "+R)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var U=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(q){var F=U.apply(this,arguments);null==F&&null!=this.globalVars&&(F=this.globalVars[q]);return F};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var q= -this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(q.ownerDocument)).decode(q)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var Y=Graph.prototype.getSvg;Graph.prototype.getSvg=function(q,F,R,W,T,ba,ha,ra,ta,ma,pa,za,Ba,Ia){var Aa=null,Ka=null,Da=null;za||null==this.themes||"darkTheme"!=this.defaultThemeName||(Aa=this.stylesheet,Ka=this.shapeForegroundColor,Da=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName? -"#000000":Editor.lightColor,this.shapeBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Ra=Y.apply(this,arguments),Qa=this.getCustomFonts();if(pa&&0<Qa.length){var Ta=Ra.ownerDocument,Za=null!=Ta.createElementNS?Ta.createElementNS(mxConstants.NS_SVG,"style"):Ta.createElement("style");null!=Ta.setAttributeNS?Za.setAttributeNS("type","text/css"):Za.setAttribute("type","text/css");for(var Pa="",y="",M=0;M<Qa.length;M++){var N= -Qa[M].name,S=Qa[M].url;Graph.isCssFontUrl(S)?Pa+="@import url("+S+");\n":y+='@font-face {\nfont-family: "'+N+'";\nsrc: url("'+S+'");\n}\n'}Za.appendChild(Ta.createTextNode(Pa+y));Ra.getElementsByTagName("defs")[0].appendChild(Za)}this.mathEnabled&&(document.body.appendChild(Ra),Editor.MathJaxRender(Ra),Ra.parentNode.removeChild(Ra));null!=Aa&&(this.shapeBackgroundColor=Da,this.shapeForegroundColor=Ka,this.stylesheet=Aa,this.refresh());return Ra};var O=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy= -function(q){O.apply(this,arguments);null!=q.secondLabel&&(q.secondLabel.destroy(),q.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(q){return[q.shape,q.text,q.secondLabel,q.control]};var qa=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){qa.apply(this,arguments);this.enumerationState=0};var oa=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(q){null!=q.shape&&this.redrawEnumerationState(q);return oa.apply(this, -arguments)};mxGraphView.prototype.createEnumerationValue=function(q){q=decodeURIComponent(mxUtils.getValue(q.style,"enumerateValue",""));""==q&&(q=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(q)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(q){var F="1"==mxUtils.getValue(q.style,"enumerate",0);F&&null==q.secondLabel?(q.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM), -q.secondLabel.size=12,q.secondLabel.state=q,q.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(q,q.secondLabel)):F||null==q.secondLabel||(q.secondLabel.destroy(),q.secondLabel=null);F=q.secondLabel;if(null!=F){var R=q.view.scale,W=this.createEnumerationValue(q);q=this.graph.model.isVertex(q.cell)?new mxRectangle(q.x+q.width-4*R,q.y+4*R,0,0):mxRectangle.fromPoint(q.view.getPoint(q));F.bounds.equals(q)&&F.value==W&&F.scale==R||(F.bounds=q,F.value=W,F.scale= -R,F.redraw())}};var aa=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){aa.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var q=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName|| -this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",q.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,q.ownerSVGElement))}};var da=Graph.prototype.refresh;Graph.prototype.refresh=function(){da.apply(this, +{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(q,E,Q){if(null!=E){var Y=function(ba){if(null!=ba)if(Q)for(var ea=0;ea<ba.length;ea++)E[ba[ea].name]=ba[ea];else for(var ra in E){var ta=!1;for(ea=0;ea<ba.length;ea++)if(ba[ea].name==ra&&ba[ea].type==E[ra].type){ta=!0;break}ta|| +delete E[ra]}},R=this.editorUi.editor.graph.view.getState(q);null!=R&&null!=R.shape&&(R.shape.commonCustomPropAdded||(R.shape.commonCustomPropAdded=!0,R.shape.customProperties=R.shape.customProperties||[],R.cell.vertex?Array.prototype.push.apply(R.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(R.shape.customProperties,Editor.commonEdgeProperties)),Y(R.shape.customProperties));q=q.getAttribute("customProperties");if(null!=q)try{Y(JSON.parse(q))}catch(ba){}}};var y= +StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var q=this.editorUi.getSelectionState();"image"!=q.style.shape&&!q.containsLabel&&0<q.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));y.apply(this,arguments);if(Editor.enableCustomProperties){for(var E={},Q=q.vertices,Y=q.edges,R=0;R<Q.length;R++)this.findCommonProperties(Q[R],E,0==R);for(R=0;R<Y.length;R++)this.findCommonProperties(Y[R],E,0==Q.length&&0==R);null!=Object.getOwnPropertyNames&&0< +Object.getOwnPropertyNames(E).length&&this.container.appendChild(this.addProperties(this.createPanel(),E,q))}};var u=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(q){this.addActions(q,["copyStyle","pasteStyle"]);return u.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(q,E,Q){function Y(U,ha,ma,wa){xa.getModel().beginUpdate();try{var sa=[],ya=[];if(null!=ma.index){for(var Ha=[],Qa=ma.parentRow.nextSibling;Qa&& +Qa.getAttribute("data-pName")==U;)Ha.push(Qa.getAttribute("data-pValue")),Qa=Qa.nextSibling;ma.index<Ha.length?null!=wa?Ha.splice(wa,1):Ha[ma.index]=ha:Ha.push(ha);null!=ma.size&&Ha.length>ma.size&&(Ha=Ha.slice(0,ma.size));ha=Ha.join(",");null!=ma.countProperty&&(xa.setCellStyles(ma.countProperty,Ha.length,xa.getSelectionCells()),sa.push(ma.countProperty),ya.push(Ha.length))}xa.setCellStyles(U,ha,xa.getSelectionCells());sa.push(U);ya.push(ha);if(null!=ma.dependentProps)for(U=0;U<ma.dependentProps.length;U++){var ua= +ma.dependentPropsDefVal[U],za=ma.dependentPropsVals[U];if(za.length>ha)za=za.slice(0,ha);else for(var Fa=za.length;Fa<ha;Fa++)za.push(ua);za=za.join(",");xa.setCellStyles(ma.dependentProps[U],za,xa.getSelectionCells());sa.push(ma.dependentProps[U]);ya.push(za)}if("function"==typeof ma.onChange)ma.onChange(xa,ha);pa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",sa,"values",ya,"cells",xa.getSelectionCells()))}finally{xa.getModel().endUpdate()}}function R(U,ha,ma){var wa=mxUtils.getOffset(q, +!0),sa=mxUtils.getOffset(U,!0);ha.style.position="absolute";ha.style.left=sa.x-wa.x+"px";ha.style.top=sa.y-wa.y+"px";ha.style.width=U.offsetWidth+"px";ha.style.height=U.offsetHeight-(ma?4:0)+"px";ha.style.zIndex=5}function ba(U,ha,ma){var wa=document.createElement("div");wa.style.width="32px";wa.style.height="4px";wa.style.margin="2px";wa.style.border="1px solid black";wa.style.background=ha&&"none"!=ha?ha:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(pa,function(sa){this.editorUi.pickColor(ha, +function(ya){wa.style.background="none"==ya?"url('"+Dialog.prototype.noColorImage+"')":ya;Y(U,ya,ma)});mxEvent.consume(sa)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(wa);return btn}function ea(U,ha,ma,wa,sa,ya,Ha){null!=ha&&(ha=ha.split(","),Ca.push({name:U,values:ha,type:ma,defVal:wa,countProperty:sa,parentRow:ya,isDeletable:!0,flipBkg:Ha}));btn=mxUtils.button("+",mxUtils.bind(pa,function(Qa){for(var ua=ya,za=0;null!=ua.nextSibling;)if(ua.nextSibling.getAttribute("data-pName")== +U)ua=ua.nextSibling,za++;else break;var Fa={type:ma,parentRow:ya,index:za,isDeletable:!0,defVal:wa,countProperty:sa};za=la(U,"",Fa,0==za%2,Ha);Y(U,wa,Fa);ua.parentNode.insertBefore(za,ua.nextSibling);mxEvent.consume(Qa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function ra(U,ha,ma,wa,sa,ya,Ha){if(0<sa){var Qa=Array(sa);ha=null!=ha?ha.split(","):[];for(var ua=0;ua<sa;ua++)Qa[ua]=null!=ha[ua]?ha[ua]:null!=wa?wa:"";Ca.push({name:U,values:Qa,type:ma,defVal:wa, +parentRow:ya,flipBkg:Ha,size:sa})}return document.createElement("div")}function ta(U,ha,ma){var wa=document.createElement("input");wa.type="checkbox";wa.checked="1"==ha;mxEvent.addListener(wa,"change",function(){Y(U,wa.checked?"1":"0",ma)});return wa}function la(U,ha,ma,wa,sa){var ya=ma.dispName,Ha=ma.type,Qa=document.createElement("tr");Qa.className="gePropRow"+(sa?"Dark":"")+(wa?"Alt":"")+" gePropNonHeaderRow";Qa.setAttribute("data-pName",U);Qa.setAttribute("data-pValue",ha);wa=!1;null!=ma.index&& +(Qa.setAttribute("data-index",ma.index),ya=(null!=ya?ya:"")+"["+ma.index+"]",wa=!0);var ua=document.createElement("td");ua.className="gePropRowCell";ya=mxResources.get(ya,null,ya);mxUtils.write(ua,ya);ua.setAttribute("title",ya);wa&&(ua.style.textAlign="right");Qa.appendChild(ua);ua=document.createElement("td");ua.className="gePropRowCell";if("color"==Ha)ua.appendChild(ba(U,ha,ma));else if("bool"==Ha||"boolean"==Ha)ua.appendChild(ta(U,ha,ma));else if("enum"==Ha){var za=ma.enumList;for(sa=0;sa<za.length;sa++)if(ya= +za[sa],ya.val==ha){mxUtils.write(ua,mxResources.get(ya.dispName,null,ya.dispName));break}mxEvent.addListener(ua,"click",mxUtils.bind(pa,function(){var Fa=document.createElement("select");R(ua,Fa);for(var Ba=0;Ba<za.length;Ba++){var Ea=za[Ba],Oa=document.createElement("option");Oa.value=mxUtils.htmlEntities(Ea.val);mxUtils.write(Oa,mxResources.get(Ea.dispName,null,Ea.dispName));Fa.appendChild(Oa)}Fa.value=ha;q.appendChild(Fa);mxEvent.addListener(Fa,"change",function(){var Pa=mxUtils.htmlEntities(Fa.value); +Y(U,Pa,ma)});Fa.focus();mxEvent.addListener(Fa,"blur",function(){q.removeChild(Fa)})}))}else"dynamicArr"==Ha?ua.appendChild(ea(U,ha,ma.subType,ma.subDefVal,ma.countProperty,Qa,sa)):"staticArr"==Ha?ua.appendChild(ra(U,ha,ma.subType,ma.subDefVal,ma.size,Qa,sa)):"readOnly"==Ha?(sa=document.createElement("input"),sa.setAttribute("readonly",""),sa.value=ha,sa.style.width="96px",sa.style.borderWidth="0px",ua.appendChild(sa)):(ua.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ha)),mxEvent.addListener(ua, +"click",mxUtils.bind(pa,function(){function Fa(){var Ea=Ba.value;Ea=0==Ea.length&&"string"!=Ha?0:Ea;ma.allowAuto&&(null!=Ea.trim&&"auto"==Ea.trim().toLowerCase()?(Ea="auto",Ha="string"):(Ea=parseFloat(Ea),Ea=isNaN(Ea)?0:Ea));null!=ma.min&&Ea<ma.min?Ea=ma.min:null!=ma.max&&Ea>ma.max&&(Ea=ma.max);Ea=encodeURIComponent(("int"==Ha?parseInt(Ea):Ea)+"");Y(U,Ea,ma)}var Ba=document.createElement("input");R(ua,Ba,!0);Ba.value=decodeURIComponent(ha);Ba.className="gePropEditor";"int"!=Ha&&"float"!=Ha||ma.allowAuto|| +(Ba.type="number",Ba.step="int"==Ha?"1":"any",null!=ma.min&&(Ba.min=parseFloat(ma.min)),null!=ma.max&&(Ba.max=parseFloat(ma.max)));q.appendChild(Ba);mxEvent.addListener(Ba,"keypress",function(Ea){13==Ea.keyCode&&Fa()});Ba.focus();mxEvent.addListener(Ba,"blur",function(){Fa()})})));ma.isDeletable&&(sa=mxUtils.button("-",mxUtils.bind(pa,function(Fa){Y(U,"",ma,ma.index);mxEvent.consume(Fa)})),sa.style.height="16px",sa.style.width="25px",sa.style.float="right",sa.className="geColorBtn",ua.appendChild(sa)); +Qa.appendChild(ua);return Qa}var pa=this,xa=this.editorUi.editor.graph,Ca=[];q.style.position="relative";q.style.padding="0";var Ia=document.createElement("table");Ia.className="geProperties";Ia.style.whiteSpace="nowrap";Ia.style.width="100%";var Aa=document.createElement("tr");Aa.className="gePropHeader";var La=document.createElement("th");La.className="gePropHeaderCell";var Da=document.createElement("img");Da.src=Sidebar.prototype.expandedImage;Da.style.verticalAlign="middle";La.appendChild(Da); +mxUtils.write(La,mxResources.get("property"));Aa.style.cursor="pointer";var Sa=function(){var U=Ia.querySelectorAll(".gePropNonHeaderRow");if(pa.editorUi.propertiesCollapsed){Da.src=Sidebar.prototype.collapsedImage;var ha="none";for(var ma=q.childNodes.length-1;0<=ma;ma--)try{var wa=q.childNodes[ma],sa=wa.nodeName.toUpperCase();"INPUT"!=sa&&"SELECT"!=sa||q.removeChild(wa)}catch(ya){}}else Da.src=Sidebar.prototype.expandedImage,ha="";for(ma=0;ma<U.length;ma++)U[ma].style.display=ha};mxEvent.addListener(Aa, +"click",function(){pa.editorUi.propertiesCollapsed=!pa.editorUi.propertiesCollapsed;Sa()});Aa.appendChild(La);La=document.createElement("th");La.className="gePropHeaderCell";La.innerHTML=mxResources.get("value");Aa.appendChild(La);Ia.appendChild(Aa);var Ra=!1,Ta=!1;Aa=null;1==Q.vertices.length&&0==Q.edges.length?Aa=Q.vertices[0].id:0==Q.vertices.length&&1==Q.edges.length&&(Aa=Q.edges[0].id);null!=Aa&&Ia.appendChild(la("id",mxUtils.htmlEntities(Aa),{dispName:"ID",type:"readOnly"},!0,!1));for(var Za in E)if(Aa= +E[Za],"function"!=typeof Aa.isVisible||Aa.isVisible(Q,this)){var Na=null!=Q.style[Za]?mxUtils.htmlEntities(Q.style[Za]+""):null!=Aa.getDefaultValue?Aa.getDefaultValue(Q,this):Aa.defVal;if("separator"==Aa.type)Ta=!Ta;else{if("staticArr"==Aa.type)Aa.size=parseInt(Q.style[Aa.sizeProperty]||E[Aa.sizeProperty].defVal)||0;else if(null!=Aa.dependentProps){var z=Aa.dependentProps,L=[],O=[];for(La=0;La<z.length;La++){var V=Q.style[z[La]];O.push(E[z[La]].subDefVal);L.push(null!=V?V.split(","):[])}Aa.dependentPropsDefVal= +O;Aa.dependentPropsVals=L}Ia.appendChild(la(Za,Na,Aa,Ra,Ta));Ra=!Ra}}for(La=0;La<Ca.length;La++)for(Aa=Ca[La],E=Aa.parentRow,Q=0;Q<Aa.values.length;Q++)Za=la(Aa.name,Aa.values[Q],{type:Aa.type,parentRow:Aa.parentRow,isDeletable:Aa.isDeletable,index:Q,defVal:Aa.defVal,countProperty:Aa.countProperty,size:Aa.size},0==Q%2,Aa.flipBkg),E.parentNode.insertBefore(Za,E.nextSibling),E=Za;q.appendChild(Ia);Sa();return q};StyleFormatPanel.prototype.addStyles=function(q){function E(Aa){mxEvent.addListener(Aa, +"mouseenter",function(){Aa.style.opacity="1"});mxEvent.addListener(Aa,"mouseleave",function(){Aa.style.opacity="0.5"})}var Q=this.editorUi,Y=Q.editor.graph,R=document.createElement("div");R.style.whiteSpace="nowrap";R.style.paddingLeft="24px";R.style.paddingRight="20px";q.style.paddingLeft="16px";q.style.paddingBottom="6px";q.style.position="relative";q.appendChild(R);var ba="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "), +ea=document.createElement("div");ea.style.whiteSpace="nowrap";ea.style.position="relative";ea.style.textAlign="center";ea.style.width="210px";for(var ra=[],ta=0;ta<this.defaultColorSchemes.length;ta++){var la=document.createElement("div");la.style.display="inline-block";la.style.width="6px";la.style.height="6px";la.style.marginLeft="4px";la.style.marginRight="3px";la.style.borderRadius="3px";la.style.cursor="pointer";la.style.background="transparent";la.style.border="1px solid #b5b6b7";mxUtils.bind(this, +function(Aa){mxEvent.addListener(la,"click",mxUtils.bind(this,function(){pa(Aa)}))})(ta);ra.push(la);ea.appendChild(la)}var pa=mxUtils.bind(this,function(Aa){null!=ra[Aa]&&(null!=this.format.currentScheme&&null!=ra[this.format.currentScheme]&&(ra[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=Aa,xa(this.defaultColorSchemes[this.format.currentScheme]),ra[this.format.currentScheme].style.background="#84d7ff")}),xa=mxUtils.bind(this,function(Aa){var La=mxUtils.bind(this, +function(Sa){var Ra=mxUtils.button("",mxUtils.bind(this,function(Na){Y.getModel().beginUpdate();try{for(var z=Q.getSelectionState().cells,L=0;L<z.length;L++){for(var O=Y.getModel().getStyle(z[L]),V=0;V<ba.length;V++)O=mxUtils.removeStylename(O,ba[V]);var U=Y.getModel().isVertex(z[L])?Y.defaultVertexStyle:Y.defaultEdgeStyle;null!=Sa?(mxEvent.isShiftDown(Na)||(O=""==Sa.fill?mxUtils.setStyle(O,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(O,mxConstants.STYLE_FILLCOLOR,Sa.fill||mxUtils.getValue(U, +mxConstants.STYLE_FILLCOLOR,null)),O=mxUtils.setStyle(O,mxConstants.STYLE_GRADIENTCOLOR,Sa.gradient||mxUtils.getValue(U,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(Na)||mxClient.IS_MAC&&mxEvent.isMetaDown(Na)||!Y.getModel().isVertex(z[L])||(O=mxUtils.setStyle(O,mxConstants.STYLE_FONTCOLOR,Sa.font||mxUtils.getValue(U,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(Na)||(O=""==Sa.stroke?mxUtils.setStyle(O,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(O,mxConstants.STYLE_STROKECOLOR, +Sa.stroke||mxUtils.getValue(U,mxConstants.STYLE_STROKECOLOR,null)))):(O=mxUtils.setStyle(O,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(U,mxConstants.STYLE_FILLCOLOR,"#ffffff")),O=mxUtils.setStyle(O,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(U,mxConstants.STYLE_STROKECOLOR,"#000000")),O=mxUtils.setStyle(O,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(U,mxConstants.STYLE_GRADIENTCOLOR,null)),Y.getModel().isVertex(z[L])&&(O=mxUtils.setStyle(O,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(U,mxConstants.STYLE_FONTCOLOR, +null))));Y.getModel().setStyle(z[L],O)}}finally{Y.getModel().endUpdate()}}));Ra.className="geStyleButton";Ra.style.width="36px";Ra.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ra.style.margin="0px 6px 6px 0px";if(null!=Sa){var Ta="1"==urlParams.sketch?"2px solid":"1px solid";null!=Sa.border&&(Ta=Sa.border);null!=Sa.gradient?mxClient.IS_IE&&10>document.documentMode?Ra.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Sa.fill+"', EndColorStr='"+Sa.gradient+ +"', GradientType=0)":Ra.style.backgroundImage="linear-gradient("+Sa.fill+" 0px,"+Sa.gradient+" 100%)":Sa.fill==mxConstants.NONE?Ra.style.background="url('"+Dialog.prototype.noColorImage+"')":Ra.style.backgroundColor=""==Sa.fill?mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Sa.fill||mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Ra.style.border=Sa.stroke==mxConstants.NONE? +Ta+" transparent":""==Sa.stroke?Ta+" "+mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Ta+" "+(Sa.stroke||mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Sa.title&&Ra.setAttribute("title",Sa.title)}else{Ta=mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Za=mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR, +"#000000");Ra.style.backgroundColor=Ta;Ra.style.border="1px solid "+Za}Ra.style.borderRadius="0";R.appendChild(Ra)});R.innerText="";for(var Da=0;Da<Aa.length;Da++)0<Da&&0==mxUtils.mod(Da,4)&&mxUtils.br(R),La(Aa[Da])});null==this.format.currentScheme?pa(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):pa(this.format.currentScheme);ta=10>=this.defaultColorSchemes.length?28:8;var Ca=document.createElement("div");Ca.style.cssText="position:absolute;left:10px;top:8px;bottom:"+ta+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);"; +mxEvent.addListener(Ca,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Ia=document.createElement("div");Ia.style.cssText="position:absolute;left:202px;top:8px;bottom:"+ta+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);"; +1<this.defaultColorSchemes.length&&(q.appendChild(Ca),q.appendChild(Ia));mxEvent.addListener(Ia,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));E(Ca);E(Ia);xa(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&q.appendChild(ea);return q};StyleFormatPanel.prototype.addEditOps=function(q){var E=this.editorUi.getSelectionState(),Q=this.editorUi.editor.graph,Y=null;1==E.cells.length&&(Y=mxUtils.button(mxResources.get("editStyle"), +mxUtils.bind(this,function(R){this.editorUi.actions.get("editStyle").funct()})),Y.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),Y.style.width="210px",Y.style.marginBottom="2px",q.appendChild(Y));Q=1==E.cells.length?Q.view.getState(E.cells[0]):null;null!=Q&&null!=Q.shape&&null!=Q.shape.stencil?(E=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(R){this.editorUi.actions.get("editShape").funct()})),E.setAttribute("title", +mxResources.get("editShape")),E.style.marginBottom="2px",null==Y?E.style.width="210px":(Y.style.width="104px",E.style.width="104px",E.style.marginLeft="2px"),q.appendChild(E)):E.image&&0<E.cells.length&&(E=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(R){this.editorUi.actions.get("image").funct()})),E.setAttribute("title",mxResources.get("editImage")),E.style.marginBottom="2px",null==Y?E.style.width="210px":(Y.style.width="104px",E.style.width="104px",E.style.marginLeft="2px"), +q.appendChild(E));return q}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(q){return q.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(q){return Graph.isGoogleFontUrl(q)};Graph.createFontElement=function(q, +E){var Q=Graph.fontMapping[E];null==Q&&Graph.isCssFontUrl(E)?(q=document.createElement("link"),q.setAttribute("rel","stylesheet"),q.setAttribute("type","text/css"),q.setAttribute("charset","UTF-8"),q.setAttribute("href",E)):(null==Q&&(Q='@font-face {\nfont-family: "'+q+'";\nsrc: url("'+E+'");\n}'),q=document.createElement("style"),mxUtils.write(q,Q));return q};Graph.addFont=function(q,E,Q){if(null!=q&&0<q.length&&null!=E&&0<E.length){var Y=q.toLowerCase();if("helvetica"!=Y&&"arial"!=q&&"sans-serif"!= +Y){var R=Graph.customFontElements[Y];null!=R&&R.url!=E&&(R.elt.parentNode.removeChild(R.elt),R=null);null==R?(R=E,"http:"==E.substring(0,5)&&(R=PROXY_URL+"?url="+encodeURIComponent(E)),R={name:q,url:E,elt:Graph.createFontElement(q,R)},Graph.customFontElements[Y]=R,Graph.recentCustomFonts[Y]=R,E=document.getElementsByTagName("head")[0],null!=Q&&("link"==R.elt.nodeName.toLowerCase()?(R.elt.onload=Q,R.elt.onerror=Q):Q()),null!=E&&E.appendChild(R.elt)):null!=Q&&Q()}else null!=Q&&Q()}else null!=Q&&Q(); +return q};Graph.getFontUrl=function(q,E){q=Graph.customFontElements[q.toLowerCase()];null!=q&&(E=q.url);return E};Graph.processFontAttributes=function(q){q=q.getElementsByTagName("*");for(var E=0;E<q.length;E++){var Q=q[E].getAttribute("data-font-src");if(null!=Q){var Y="FONT"==q[E].nodeName?q[E].getAttribute("face"):q[E].style.fontFamily;null!=Y&&Graph.addFont(Y,Q)}}};Graph.processFontStyle=function(q){if(null!=q){var E=mxUtils.getValue(q,"fontSource",null);if(null!=E){var Q=mxUtils.getValue(q,mxConstants.STYLE_FONTFAMILY, +null);null!=Q&&Graph.addFont(Q,decodeURIComponent(E))}}return q};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!= +urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var H=Graph.prototype.init;Graph.prototype.init=function(){function q(R){E=R}H.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var E=null;mxEvent.addListener(this.container,"mouseenter",q);mxEvent.addListener(this.container,"mousemove",q);mxEvent.addListener(this.container,"mouseleave",function(R){E=null});this.isMouseInsertPoint=function(){return null!=E};var Q=this.getInsertPoint; +this.getInsertPoint=function(){return null!=E?this.getPointForEvent(E):Q.apply(this,arguments)};var Y=this.layoutManager.getLayout;this.layoutManager.getLayout=function(R){var ba=this.graph.getCellStyle(R);if(null!=ba&&"rack"==ba.childLayout){var ea=new mxStackLayout(this.graph,!1);ea.gridSize=null!=ba.rackUnitSize?parseFloat(ba.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;ea.marginLeft=ba.marginLeft||0;ea.marginRight=ba.marginRight||0;ea.marginTop=ba.marginTop|| +0;ea.marginBottom=ba.marginBottom||0;ea.allowGaps=ba.allowGaps||0;ea.horizontal="1"==mxUtils.getValue(ba,"horizontalRack","0");ea.resizeParent=!1;ea.fill=!0;return ea}return Y.apply(this,arguments)};this.updateGlobalUrlVariables()};var J=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(q,E){return Graph.processFontStyle(J.apply(this,arguments))};var D=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(q,E,Q,Y,R,ba,ea,ra,ta,la, +pa){D.apply(this,arguments);Graph.processFontAttributes(pa)};var G=mxText.prototype.redraw;mxText.prototype.redraw=function(){G.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(q,E,Q){function Y(){for(var Aa=ea.getSelectionCells(),La=[],Da=0;Da<Aa.length;Da++)ea.isCellVisible(Aa[Da])&&La.push(Aa[Da]);ea.setSelectionCells(La)}function R(Aa){ea.setHiddenTags(Aa?[]:ra.slice());Y();ea.refresh()}function ba(Aa, +La){la.innerText="";if(0<Aa.length){var Da=document.createElement("table");Da.setAttribute("cellpadding","2");Da.style.boxSizing="border-box";Da.style.tableLayout="fixed";Da.style.width="100%";var Sa=document.createElement("tbody");if(null!=Aa&&0<Aa.length)for(var Ra=0;Ra<Aa.length;Ra++)(function(Ta){var Za=0>mxUtils.indexOf(ea.hiddenTags,Ta),Na=document.createElement("tr"),z=document.createElement("td");z.style.align="center";z.style.width="16px";var L=document.createElement("img");L.setAttribute("src", +Za?Editor.visibleImage:Editor.hiddenImage);L.setAttribute("title",mxResources.get(Za?"hideIt":"show",[Ta]));mxUtils.setOpacity(L,Za?75:25);L.style.verticalAlign="middle";L.style.cursor="pointer";L.style.width="16px";if(E||Editor.isDarkMode())L.style.filter="invert(100%)";z.appendChild(L);mxEvent.addListener(L,"click",function(V){mxEvent.isShiftDown(V)?R(0<=mxUtils.indexOf(ea.hiddenTags,Ta)):(ea.toggleHiddenTag(Ta),Y(),ea.refresh());mxEvent.consume(V)});Na.appendChild(z);z=document.createElement("td"); +z.style.overflow="hidden";z.style.whiteSpace="nowrap";z.style.textOverflow="ellipsis";z.style.verticalAlign="middle";z.style.cursor="pointer";z.setAttribute("title",Ta);a=document.createElement("a");mxUtils.write(a,Ta);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Za?100:40);z.appendChild(a);mxEvent.addListener(z,"click",function(V){if(mxEvent.isShiftDown(V)){R(!0);var U=ea.getCellsForTags([Ta],null,null,!0);ea.isEnabled()?ea.setSelectionCells(U):ea.highlightCells(U)}else if(Za&& +0<ea.hiddenTags.length)R(!0);else{U=ra.slice();var ha=mxUtils.indexOf(U,Ta);U.splice(ha,1);ea.setHiddenTags(U);Y();ea.refresh()}mxEvent.consume(V)});Na.appendChild(z);if(ea.isEnabled()){z=document.createElement("td");z.style.verticalAlign="middle";z.style.textAlign="center";z.style.width="18px";if(null==La){z.style.align="center";z.style.width="16px";L=document.createElement("img");L.setAttribute("src",Editor.crossImage);L.setAttribute("title",mxResources.get("removeIt",[Ta]));mxUtils.setOpacity(L, +Za?75:25);L.style.verticalAlign="middle";L.style.cursor="pointer";L.style.width="16px";if(E||Editor.isDarkMode())L.style.filter="invert(100%)";mxEvent.addListener(L,"click",function(V){var U=mxUtils.indexOf(ra,Ta);0<=U&&ra.splice(U,1);ea.removeTagsForCells(ea.model.getDescendants(ea.model.getRoot()),[Ta]);ea.refresh();mxEvent.consume(V)});z.appendChild(L)}else{var O=document.createElement("input");O.setAttribute("type","checkbox");O.style.margin="0px";O.defaultChecked=null!=La&&0<=mxUtils.indexOf(La, +Ta);O.checked=O.defaultChecked;O.style.background="transparent";O.setAttribute("title",mxResources.get(O.defaultChecked?"removeIt":"add",[Ta]));mxEvent.addListener(O,"change",function(V){O.checked?ea.addTagsForCells(ea.getSelectionCells(),[Ta]):ea.removeTagsForCells(ea.getSelectionCells(),[Ta]);mxEvent.consume(V)});z.appendChild(O)}Na.appendChild(z)}Sa.appendChild(Na)})(Aa[Ra]);Da.appendChild(Sa);la.appendChild(Da)}}var ea=this,ra=ea.hiddenTags.slice(),ta=document.createElement("div");ta.style.userSelect= +"none";ta.style.overflow="hidden";ta.style.padding="10px";ta.style.height="100%";var la=document.createElement("div");la.style.boxSizing="border-box";la.style.borderRadius="4px";la.style.userSelect="none";la.style.overflow="auto";la.style.position="absolute";la.style.left="10px";la.style.right="10px";la.style.top="10px";la.style.border=ea.isEnabled()?"1px solid #808080":"none";la.style.bottom=ea.isEnabled()?"48px":"10px";ta.appendChild(la);var pa=mxUtils.button(mxResources.get("reset"),function(Aa){ea.setHiddenTags([]); +mxEvent.isShiftDown(Aa)||(ra=ea.hiddenTags.slice());Y();ea.refresh()});pa.setAttribute("title",mxResources.get("reset"));pa.className="geBtn";pa.style.margin="0 4px 0 0";var xa=mxUtils.button(mxResources.get("add"),function(){null!=Q&&Q(ra,function(Aa){ra=Aa;Ca()})});xa.setAttribute("title",mxResources.get("add"));xa.className="geBtn";xa.style.margin="0";ea.addListener(mxEvent.ROOT,function(){ra=ea.hiddenTags.slice()});var Ca=mxUtils.bind(this,function(Aa,La){if(q()){Aa=ea.getAllTags();for(La=0;La< +Aa.length;La++)0>mxUtils.indexOf(ra,Aa[La])&&ra.push(Aa[La]);ra.sort();ea.isSelectionEmpty()?ba(ra):ba(ra,ea.getCommonTagsForCells(ea.getSelectionCells()))}});ea.selectionModel.addListener(mxEvent.CHANGE,Ca);ea.model.addListener(mxEvent.CHANGE,Ca);ea.addListener(mxEvent.REFRESH,Ca);var Ia=document.createElement("div");Ia.style.boxSizing="border-box";Ia.style.whiteSpace="nowrap";Ia.style.position="absolute";Ia.style.overflow="hidden";Ia.style.bottom="0px";Ia.style.height="42px";Ia.style.right="10px"; +Ia.style.left="10px";ea.isEnabled()&&(Ia.appendChild(pa),Ia.appendChild(xa),ta.appendChild(Ia));return{div:ta,refresh:Ca}};Graph.prototype.getCustomFonts=function(){var q=this.extFonts;q=null!=q?q.slice():[];for(var E in Graph.customFontElements){var Q=Graph.customFontElements[E];q.push({name:Q.name,url:Q.url})}return q};Graph.prototype.setFont=function(q,E){Graph.addFont(q,E);document.execCommand("fontname",!1,q);if(null!=E){var Q=this.cellEditor.textarea.getElementsByTagName("font");E=Graph.getFontUrl(q, +E);for(var Y=0;Y<Q.length;Y++)Q[Y].getAttribute("face")==q&&Q[Y].getAttribute("data-font-src")!=E&&Q[Y].setAttribute("data-font-src",E)}};var W=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return W.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var q=JSON.parse(decodeURIComponent(urlParams.vars)); +if(null!=q)for(var E in q)this.globalVars[E]=q[E]}catch(Q){null!=window.console&&console.log("Error in vars URL parameter: "+Q)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var T=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(q){var E=T.apply(this,arguments);null==E&&null!=this.globalVars&&(E=this.globalVars[q]);return E};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var q= +this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(q.ownerDocument)).decode(q)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var Z=Graph.prototype.getSvg;Graph.prototype.getSvg=function(q,E,Q,Y,R,ba,ea,ra,ta,la,pa,xa,Ca,Ia){var Aa=null,La=null,Da=null;xa||null==this.themes||"darkTheme"!=this.defaultThemeName||(Aa=this.stylesheet,La=this.shapeForegroundColor,Da=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName? +"#000000":Editor.lightColor,this.shapeBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Sa=Z.apply(this,arguments),Ra=this.getCustomFonts();if(pa&&0<Ra.length){var Ta=Sa.ownerDocument,Za=null!=Ta.createElementNS?Ta.createElementNS(mxConstants.NS_SVG,"style"):Ta.createElement("style");null!=Ta.setAttributeNS?Za.setAttributeNS("type","text/css"):Za.setAttribute("type","text/css");for(var Na="",z="",L=0;L<Ra.length;L++){var O= +Ra[L].name,V=Ra[L].url;Graph.isCssFontUrl(V)?Na+="@import url("+V+");\n":z+='@font-face {\nfont-family: "'+O+'";\nsrc: url("'+V+'");\n}\n'}Za.appendChild(Ta.createTextNode(Na+z));Sa.getElementsByTagName("defs")[0].appendChild(Za)}this.mathEnabled&&(document.body.appendChild(Sa),Editor.MathJaxRender(Sa),Sa.parentNode.removeChild(Sa));null!=Aa&&(this.shapeBackgroundColor=Da,this.shapeForegroundColor=La,this.stylesheet=Aa,this.refresh());return Sa};var N=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy= +function(q){N.apply(this,arguments);null!=q.secondLabel&&(q.secondLabel.destroy(),q.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(q){return[q.shape,q.text,q.secondLabel,q.control]};var qa=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){qa.apply(this,arguments);this.enumerationState=0};var oa=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(q){null!=q.shape&&this.redrawEnumerationState(q);return oa.apply(this, +arguments)};mxGraphView.prototype.createEnumerationValue=function(q){q=decodeURIComponent(mxUtils.getValue(q.style,"enumerateValue",""));""==q&&(q=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(q)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(q){var E="1"==mxUtils.getValue(q.style,"enumerate",0);E&&null==q.secondLabel?(q.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM), +q.secondLabel.size=12,q.secondLabel.state=q,q.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(q,q.secondLabel)):E||null==q.secondLabel||(q.secondLabel.destroy(),q.secondLabel=null);E=q.secondLabel;if(null!=E){var Q=q.view.scale,Y=this.createEnumerationValue(q);q=this.graph.model.isVertex(q.cell)?new mxRectangle(q.x+q.width-4*Q,q.y+4*Q,0,0):mxRectangle.fromPoint(q.view.getPoint(q));E.bounds.equals(q)&&E.value==Y&&E.scale==Q||(E.bounds=q,E.value=Y,E.scale= +Q,E.redraw())}};var S=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){S.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var q=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName|| +this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",q.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,q.ownerSVGElement))}};var fa=Graph.prototype.refresh;Graph.prototype.refresh=function(){fa.apply(this, arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var ia=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){ia.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(q){"data:action/json,"==q.substring(0,17)&&(q=JSON.parse(q.substring(17)), -null!=q.actions&&this.executeCustomActions(q.actions))};Graph.prototype.executeCustomActions=function(q,F){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var R=!1,W=0,T=0,ba=mxUtils.bind(this,function(){R||(R=!0,this.model.beginUpdate())}),ha=mxUtils.bind(this, -function(){R&&(R=!1,this.model.endUpdate())}),ra=mxUtils.bind(this,function(){0<W&&W--;0==W&&ta()}),ta=mxUtils.bind(this,function(){if(T<q.length){var ma=this.stoppingCustomActions,pa=q[T++],za=[];if(null!=pa.open)if(ha(),this.isCustomLink(pa.open)){if(!this.customLinkClicked(pa.open))return}else this.openLink(pa.open);null==pa.wait||ma||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;ra()}),W++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction, -""!=pa.wait?parseInt(pa.wait):1E3),ha());null!=pa.opacity&&null!=pa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(pa.opacity,!0)),pa.opacity.value);null!=pa.fadeIn&&(W++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(pa.fadeIn,!0)),0,1,ra,ma?0:pa.fadeIn.delay));null!=pa.fadeOut&&(W++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(pa.fadeOut,!0)),1,0,ra,ma?0:pa.fadeOut.delay));null!=pa.wipeIn&&(za=za.concat(this.createWipeAnimations(this.getCellsForAction(pa.wipeIn, -!0),!0)));null!=pa.wipeOut&&(za=za.concat(this.createWipeAnimations(this.getCellsForAction(pa.wipeOut,!0),!1)));null!=pa.toggle&&(ba(),this.toggleCells(this.getCellsForAction(pa.toggle,!0)));if(null!=pa.show){ba();var Ba=this.getCellsForAction(pa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(Ba),1);this.setCellsVisible(Ba,!0)}null!=pa.hide&&(ba(),Ba=this.getCellsForAction(pa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(Ba),0),this.setCellsVisible(Ba,!1));null!=pa.toggleStyle&& -null!=pa.toggleStyle.key&&(ba(),this.toggleCellStyles(pa.toggleStyle.key,null!=pa.toggleStyle.defaultValue?pa.toggleStyle.defaultValue:"0",this.getCellsForAction(pa.toggleStyle,!0)));null!=pa.style&&null!=pa.style.key&&(ba(),this.setCellStyles(pa.style.key,pa.style.value,this.getCellsForAction(pa.style,!0)));Ba=[];null!=pa.select&&this.isEnabled()&&(Ba=this.getCellsForAction(pa.select),this.setSelectionCells(Ba));null!=pa.highlight&&(Ba=this.getCellsForAction(pa.highlight),this.highlightCells(Ba, -pa.highlight.color,pa.highlight.duration,pa.highlight.opacity));null!=pa.scroll&&(Ba=this.getCellsForAction(pa.scroll));null!=pa.viewbox&&this.fitWindow(pa.viewbox,pa.viewbox.border);0<Ba.length&&this.scrollCellToVisible(Ba[0]);if(null!=pa.tags){Ba=[];null!=pa.tags.hidden&&(Ba=Ba.concat(pa.tags.hidden));if(null!=pa.tags.visible)for(var Ia=this.getAllTags(),Aa=0;Aa<Ia.length;Aa++)0>mxUtils.indexOf(pa.tags.visible,Ia[Aa])&&0>mxUtils.indexOf(Ba,Ia[Aa])&&Ba.push(Ia[Aa]);this.setHiddenTags(Ba);this.refresh()}0< -za.length&&(W++,this.executeAnimations(za,ra,ma?1:pa.steps,ma?0:pa.delay));0==W?ta():ha()}else this.stoppingCustomActions=this.executingCustomActions=!1,ha(),null!=F&&F()});ta()}};Graph.prototype.doUpdateCustomLinksForCell=function(q,F){var R=this.getLinkForCell(F);null!=R&&"data:action/json,"==R.substring(0,17)&&this.setLinkForCell(F,this.updateCustomLink(q,R));if(this.isHtmlLabel(F)){var W=document.createElement("div");W.innerHTML=this.sanitizeHtml(this.getLabel(F));for(var T=W.getElementsByTagName("a"), -ba=!1,ha=0;ha<T.length;ha++)R=T[ha].getAttribute("href"),null!=R&&"data:action/json,"==R.substring(0,17)&&(T[ha].setAttribute("href",this.updateCustomLink(q,R)),ba=!0);ba&&this.labelChanged(F,W.innerHTML)}};Graph.prototype.updateCustomLink=function(q,F){if("data:action/json,"==F.substring(0,17))try{var R=JSON.parse(F.substring(17));null!=R.actions&&(this.updateCustomLinkActions(q,R.actions),F="data:action/json,"+JSON.stringify(R))}catch(W){}return F};Graph.prototype.updateCustomLinkActions=function(q, -F){for(var R=0;R<F.length;R++){var W=F[R],T;for(T in W)this.updateCustomLinkAction(q,W[T],"cells"),this.updateCustomLinkAction(q,W[T],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(q,F,R){if(null!=F&&null!=F[R]){for(var W=[],T=0;T<F[R].length;T++)if("*"==F[R][T])W.push(F[R][T]);else{var ba=q[F[R][T]];null!=ba?""!=ba&&W.push(ba):W.push(F[R][T])}F[R]=W}};Graph.prototype.getCellsForAction=function(q,F){F=this.getCellsById(q.cells).concat(this.getCellsForTags(q.tags,null,F));if(null!= -q.excludeCells){for(var R=[],W=0;W<F.length;W++)0>q.excludeCells.indexOf(F[W].id)&&R.push(F[W]);F=R}return F};Graph.prototype.getCellsById=function(q){var F=[];if(null!=q)for(var R=0;R<q.length;R++)if("*"==q[R]){var W=this.model.getRoot();F=F.concat(this.model.filterDescendants(function(ba){return ba!=W},W))}else{var T=this.model.getCell(q[R]);null!=T&&F.push(T)}return F};var L=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(q){return L.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(q))}; -Graph.prototype.setHiddenTags=function(q){this.hiddenTags=q;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(q){var F=mxUtils.indexOf(this.hiddenTags,q);0>F?this.hiddenTags.push(q):0<=F&&this.hiddenTags.splice(F,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(q){if(null==q||0==q.length||0==this.hiddenTags.length)return!1;q=q.split(" ");if(q.length>this.hiddenTags.length)return!1;for(var F=0;F<q.length;F++)if(0> -mxUtils.indexOf(this.hiddenTags,q[F]))return!1;return!0};Graph.prototype.getCellsForTags=function(q,F,R,W){var T=[];if(null!=q){F=null!=F?F:this.model.getDescendants(this.model.getRoot());for(var ba=0,ha={},ra=0;ra<q.length;ra++)0<q[ra].length&&(ha[q[ra]]=!0,ba++);for(ra=0;ra<F.length;ra++)if(R&&this.model.getParent(F[ra])==this.model.root||this.model.isVertex(F[ra])||this.model.isEdge(F[ra])){var ta=this.getTagsForCell(F[ra]),ma=!1;if(0<ta.length&&(ta=ta.split(" "),ta.length>=q.length)){for(var pa= -ma=0;pa<ta.length&&ma<ba;pa++)null!=ha[ta[pa]]&&ma++;ma=ma==ba}ma&&(1!=W||this.isCellVisible(F[ra]))&&T.push(F[ra])}}return T};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(q){for(var F=null,R=[],W=0;W<q.length;W++){var T=this.getTagsForCell(q[W]);R=[];if(0<T.length){T=T.split(" ");for(var ba={},ha=0;ha<T.length;ha++)if(null==F||null!=F[T[ha]])ba[T[ha]]=!0,R.push(T[ha]);F=ba}else return[]}return R}; -Graph.prototype.getTagsForCells=function(q){for(var F=[],R={},W=0;W<q.length;W++){var T=this.getTagsForCell(q[W]);if(0<T.length){T=T.split(" ");for(var ba=0;ba<T.length;ba++)null==R[T[ba]]&&(R[T[ba]]=!0,F.push(T[ba]))}}return F};Graph.prototype.getTagsForCell=function(q){return this.getAttributeForCell(q,"tags","")};Graph.prototype.addTagsForCells=function(q,F){if(0<q.length&&0<F.length){this.model.beginUpdate();try{for(var R=0;R<q.length;R++){for(var W=this.getTagsForCell(q[R]),T=W.split(" "),ba= -!1,ha=0;ha<F.length;ha++){var ra=mxUtils.trim(F[ha]);""!=ra&&0>mxUtils.indexOf(T,ra)&&(W=0<W.length?W+" "+ra:ra,ba=!0)}ba&&this.setAttributeForCell(q[R],"tags",W)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(q,F){if(0<q.length&&0<F.length){this.model.beginUpdate();try{for(var R=0;R<q.length;R++){var W=this.getTagsForCell(q[R]);if(0<W.length){for(var T=W.split(" "),ba=!1,ha=0;ha<F.length;ha++){var ra=mxUtils.indexOf(T,F[ha]);0<=ra&&(T.splice(ra,1),ba=!0)}ba&&this.setAttributeForCell(q[R], -"tags",T.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(q){this.model.beginUpdate();try{for(var F=0;F<q.length;F++)this.model.setVisible(q[F],!this.model.isVisible(q[F]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(q,F){this.model.beginUpdate();try{for(var R=0;R<q.length;R++)this.model.setVisible(q[R],F)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(q,F,R,W){for(var T=0;T<q.length;T++)this.highlightCell(q[T], -F,R,W)};Graph.prototype.highlightCell=function(q,F,R,W,T){F=null!=F?F:mxConstants.DEFAULT_VALID_COLOR;R=null!=R?R:1E3;q=this.view.getState(q);var ba=null;null!=q&&(T=null!=T?T:4,T=Math.max(T+1,mxUtils.getValue(q.style,mxConstants.STYLE_STROKEWIDTH,1)+T),ba=new mxCellHighlight(this,F,T,!1),null!=W&&(ba.opacity=W),ba.highlight(q),window.setTimeout(function(){null!=ba.shape&&(mxUtils.setPrefixedStyle(ba.shape.node.style,"transition","all 1200ms ease-in-out"),ba.shape.node.style.opacity=0);window.setTimeout(function(){ba.destroy()}, -1200)},R));return ba};Graph.prototype.addSvgShadow=function(q,F,R,W){R=null!=R?R:!1;W=null!=W?W:!0;var T=q.ownerDocument,ba=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"filter"):T.createElement("filter");ba.setAttribute("id",this.shadowId);var ha=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):T.createElement("feGaussianBlur");ha.setAttribute("in","SourceAlpha");ha.setAttribute("stdDeviation",this.svgShadowBlur);ha.setAttribute("result","blur");ba.appendChild(ha); -ha=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"feOffset"):T.createElement("feOffset");ha.setAttribute("in","blur");ha.setAttribute("dx",this.svgShadowSize);ha.setAttribute("dy",this.svgShadowSize);ha.setAttribute("result","offsetBlur");ba.appendChild(ha);ha=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"feFlood"):T.createElement("feFlood");ha.setAttribute("flood-color",this.svgShadowColor);ha.setAttribute("flood-opacity",this.svgShadowOpacity);ha.setAttribute("result", -"offsetColor");ba.appendChild(ha);ha=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"feComposite"):T.createElement("feComposite");ha.setAttribute("in","offsetColor");ha.setAttribute("in2","offsetBlur");ha.setAttribute("operator","in");ha.setAttribute("result","offsetBlur");ba.appendChild(ha);ha=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"feBlend"):T.createElement("feBlend");ha.setAttribute("in","SourceGraphic");ha.setAttribute("in2","offsetBlur");ba.appendChild(ha); -ha=q.getElementsByTagName("defs");0==ha.length?(T=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"defs"):T.createElement("defs"),null!=q.firstChild?q.insertBefore(T,q.firstChild):q.appendChild(T)):T=ha[0];T.appendChild(ba);R||(F=null!=F?F:q.getElementsByTagName("g")[0],null!=F&&(F.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(q.getAttribute("width")))&&W&&(q.setAttribute("width",parseInt(q.getAttribute("width"))+6),q.setAttribute("height",parseInt(q.getAttribute("height"))+ -6),F=q.getAttribute("viewBox"),null!=F&&0<F.length&&(F=F.split(" "),3<F.length&&(w=parseFloat(F[2])+6,h=parseFloat(F[3])+6,q.setAttribute("viewBox",F[0]+" "+F[1]+" "+w+" "+h))))));return ba};Graph.prototype.setShadowVisible=function(q,F){mxClient.IS_SVG&&!mxClient.IS_SF&&(F=null!=F?F:!0,(this.shadowVisible=q)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),F&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer= -function(){if(null==this.defaultParent){var q=this.model.getChildCount(this.model.root),F=0;do var R=this.model.getChildAt(this.model.root,F);while(F++<q&&"1"==mxUtils.getValue(this.getCellStyle(R),"locked","0"));null!=R&&this.setDefaultParent(R)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn= +null!=q.actions&&this.executeCustomActions(q.actions))};Graph.prototype.executeCustomActions=function(q,E){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var Q=!1,Y=0,R=0,ba=mxUtils.bind(this,function(){Q||(Q=!0,this.model.beginUpdate())}),ea=mxUtils.bind(this, +function(){Q&&(Q=!1,this.model.endUpdate())}),ra=mxUtils.bind(this,function(){0<Y&&Y--;0==Y&&ta()}),ta=mxUtils.bind(this,function(){if(R<q.length){var la=this.stoppingCustomActions,pa=q[R++],xa=[];if(null!=pa.open)if(ea(),this.isCustomLink(pa.open)){if(!this.customLinkClicked(pa.open))return}else this.openLink(pa.open);null==pa.wait||la||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;ra()}),Y++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction, +""!=pa.wait?parseInt(pa.wait):1E3),ea());null!=pa.opacity&&null!=pa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(pa.opacity,!0)),pa.opacity.value);null!=pa.fadeIn&&(Y++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(pa.fadeIn,!0)),0,1,ra,la?0:pa.fadeIn.delay));null!=pa.fadeOut&&(Y++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(pa.fadeOut,!0)),1,0,ra,la?0:pa.fadeOut.delay));null!=pa.wipeIn&&(xa=xa.concat(this.createWipeAnimations(this.getCellsForAction(pa.wipeIn, +!0),!0)));null!=pa.wipeOut&&(xa=xa.concat(this.createWipeAnimations(this.getCellsForAction(pa.wipeOut,!0),!1)));null!=pa.toggle&&(ba(),this.toggleCells(this.getCellsForAction(pa.toggle,!0)));if(null!=pa.show){ba();var Ca=this.getCellsForAction(pa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(Ca),1);this.setCellsVisible(Ca,!0)}null!=pa.hide&&(ba(),Ca=this.getCellsForAction(pa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(Ca),0),this.setCellsVisible(Ca,!1));null!=pa.toggleStyle&& +null!=pa.toggleStyle.key&&(ba(),this.toggleCellStyles(pa.toggleStyle.key,null!=pa.toggleStyle.defaultValue?pa.toggleStyle.defaultValue:"0",this.getCellsForAction(pa.toggleStyle,!0)));null!=pa.style&&null!=pa.style.key&&(ba(),this.setCellStyles(pa.style.key,pa.style.value,this.getCellsForAction(pa.style,!0)));Ca=[];null!=pa.select&&this.isEnabled()&&(Ca=this.getCellsForAction(pa.select),this.setSelectionCells(Ca));null!=pa.highlight&&(Ca=this.getCellsForAction(pa.highlight),this.highlightCells(Ca, +pa.highlight.color,pa.highlight.duration,pa.highlight.opacity));null!=pa.scroll&&(Ca=this.getCellsForAction(pa.scroll));null!=pa.viewbox&&this.fitWindow(pa.viewbox,pa.viewbox.border);0<Ca.length&&this.scrollCellToVisible(Ca[0]);if(null!=pa.tags){Ca=[];null!=pa.tags.hidden&&(Ca=Ca.concat(pa.tags.hidden));if(null!=pa.tags.visible)for(var Ia=this.getAllTags(),Aa=0;Aa<Ia.length;Aa++)0>mxUtils.indexOf(pa.tags.visible,Ia[Aa])&&0>mxUtils.indexOf(Ca,Ia[Aa])&&Ca.push(Ia[Aa]);this.setHiddenTags(Ca);this.refresh()}0< +xa.length&&(Y++,this.executeAnimations(xa,ra,la?1:pa.steps,la?0:pa.delay));0==Y?ta():ea()}else this.stoppingCustomActions=this.executingCustomActions=!1,ea(),null!=E&&E()});ta()}};Graph.prototype.doUpdateCustomLinksForCell=function(q,E){var Q=this.getLinkForCell(E);null!=Q&&"data:action/json,"==Q.substring(0,17)&&this.setLinkForCell(E,this.updateCustomLink(q,Q));if(this.isHtmlLabel(E)){var Y=document.createElement("div");Y.innerHTML=this.sanitizeHtml(this.getLabel(E));for(var R=Y.getElementsByTagName("a"), +ba=!1,ea=0;ea<R.length;ea++)Q=R[ea].getAttribute("href"),null!=Q&&"data:action/json,"==Q.substring(0,17)&&(R[ea].setAttribute("href",this.updateCustomLink(q,Q)),ba=!0);ba&&this.labelChanged(E,Y.innerHTML)}};Graph.prototype.updateCustomLink=function(q,E){if("data:action/json,"==E.substring(0,17))try{var Q=JSON.parse(E.substring(17));null!=Q.actions&&(this.updateCustomLinkActions(q,Q.actions),E="data:action/json,"+JSON.stringify(Q))}catch(Y){}return E};Graph.prototype.updateCustomLinkActions=function(q, +E){for(var Q=0;Q<E.length;Q++){var Y=E[Q],R;for(R in Y)this.updateCustomLinkAction(q,Y[R],"cells"),this.updateCustomLinkAction(q,Y[R],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(q,E,Q){if(null!=E&&null!=E[Q]){for(var Y=[],R=0;R<E[Q].length;R++)if("*"==E[Q][R])Y.push(E[Q][R]);else{var ba=q[E[Q][R]];null!=ba?""!=ba&&Y.push(ba):Y.push(E[Q][R])}E[Q]=Y}};Graph.prototype.getCellsForAction=function(q,E){E=this.getCellsById(q.cells).concat(this.getCellsForTags(q.tags,null,E));if(null!= +q.excludeCells){for(var Q=[],Y=0;Y<E.length;Y++)0>q.excludeCells.indexOf(E[Y].id)&&Q.push(E[Y]);E=Q}return E};Graph.prototype.getCellsById=function(q){var E=[];if(null!=q)for(var Q=0;Q<q.length;Q++)if("*"==q[Q]){var Y=this.model.getRoot();E=E.concat(this.model.filterDescendants(function(ba){return ba!=Y},Y))}else{var R=this.model.getCell(q[Q]);null!=R&&E.push(R)}return E};var M=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(q){return M.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(q))}; +Graph.prototype.setHiddenTags=function(q){this.hiddenTags=q;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(q){var E=mxUtils.indexOf(this.hiddenTags,q);0>E?this.hiddenTags.push(q):0<=E&&this.hiddenTags.splice(E,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(q){if(null==q||0==q.length||0==this.hiddenTags.length)return!1;q=q.split(" ");if(q.length>this.hiddenTags.length)return!1;for(var E=0;E<q.length;E++)if(0> +mxUtils.indexOf(this.hiddenTags,q[E]))return!1;return!0};Graph.prototype.getCellsForTags=function(q,E,Q,Y){var R=[];if(null!=q){E=null!=E?E:this.model.getDescendants(this.model.getRoot());for(var ba=0,ea={},ra=0;ra<q.length;ra++)0<q[ra].length&&(ea[q[ra]]=!0,ba++);for(ra=0;ra<E.length;ra++)if(Q&&this.model.getParent(E[ra])==this.model.root||this.model.isVertex(E[ra])||this.model.isEdge(E[ra])){var ta=this.getTagsForCell(E[ra]),la=!1;if(0<ta.length&&(ta=ta.split(" "),ta.length>=q.length)){for(var pa= +la=0;pa<ta.length&&la<ba;pa++)null!=ea[ta[pa]]&&la++;la=la==ba}la&&(1!=Y||this.isCellVisible(E[ra]))&&R.push(E[ra])}}return R};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(q){for(var E=null,Q=[],Y=0;Y<q.length;Y++){var R=this.getTagsForCell(q[Y]);Q=[];if(0<R.length){R=R.split(" ");for(var ba={},ea=0;ea<R.length;ea++)if(null==E||null!=E[R[ea]])ba[R[ea]]=!0,Q.push(R[ea]);E=ba}else return[]}return Q}; +Graph.prototype.getTagsForCells=function(q){for(var E=[],Q={},Y=0;Y<q.length;Y++){var R=this.getTagsForCell(q[Y]);if(0<R.length){R=R.split(" ");for(var ba=0;ba<R.length;ba++)null==Q[R[ba]]&&(Q[R[ba]]=!0,E.push(R[ba]))}}return E};Graph.prototype.getTagsForCell=function(q){return this.getAttributeForCell(q,"tags","")};Graph.prototype.addTagsForCells=function(q,E){if(0<q.length&&0<E.length){this.model.beginUpdate();try{for(var Q=0;Q<q.length;Q++){for(var Y=this.getTagsForCell(q[Q]),R=Y.split(" "),ba= +!1,ea=0;ea<E.length;ea++){var ra=mxUtils.trim(E[ea]);""!=ra&&0>mxUtils.indexOf(R,ra)&&(Y=0<Y.length?Y+" "+ra:ra,ba=!0)}ba&&this.setAttributeForCell(q[Q],"tags",Y)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(q,E){if(0<q.length&&0<E.length){this.model.beginUpdate();try{for(var Q=0;Q<q.length;Q++){var Y=this.getTagsForCell(q[Q]);if(0<Y.length){for(var R=Y.split(" "),ba=!1,ea=0;ea<E.length;ea++){var ra=mxUtils.indexOf(R,E[ea]);0<=ra&&(R.splice(ra,1),ba=!0)}ba&&this.setAttributeForCell(q[Q], +"tags",R.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(q){this.model.beginUpdate();try{for(var E=0;E<q.length;E++)this.model.setVisible(q[E],!this.model.isVisible(q[E]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(q,E){this.model.beginUpdate();try{for(var Q=0;Q<q.length;Q++)this.model.setVisible(q[Q],E)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(q,E,Q,Y){for(var R=0;R<q.length;R++)this.highlightCell(q[R], +E,Q,Y)};Graph.prototype.highlightCell=function(q,E,Q,Y,R){E=null!=E?E:mxConstants.DEFAULT_VALID_COLOR;Q=null!=Q?Q:1E3;q=this.view.getState(q);var ba=null;null!=q&&(R=null!=R?R:4,R=Math.max(R+1,mxUtils.getValue(q.style,mxConstants.STYLE_STROKEWIDTH,1)+R),ba=new mxCellHighlight(this,E,R,!1),null!=Y&&(ba.opacity=Y),ba.highlight(q),window.setTimeout(function(){null!=ba.shape&&(mxUtils.setPrefixedStyle(ba.shape.node.style,"transition","all 1200ms ease-in-out"),ba.shape.node.style.opacity=0);window.setTimeout(function(){ba.destroy()}, +1200)},Q));return ba};Graph.prototype.addSvgShadow=function(q,E,Q,Y){Q=null!=Q?Q:!1;Y=null!=Y?Y:!0;var R=q.ownerDocument,ba=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"filter"):R.createElement("filter");ba.setAttribute("id",this.shadowId);var ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):R.createElement("feGaussianBlur");ea.setAttribute("in","SourceAlpha");ea.setAttribute("stdDeviation",this.svgShadowBlur);ea.setAttribute("result","blur");ba.appendChild(ea); +ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feOffset"):R.createElement("feOffset");ea.setAttribute("in","blur");ea.setAttribute("dx",this.svgShadowSize);ea.setAttribute("dy",this.svgShadowSize);ea.setAttribute("result","offsetBlur");ba.appendChild(ea);ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feFlood"):R.createElement("feFlood");ea.setAttribute("flood-color",this.svgShadowColor);ea.setAttribute("flood-opacity",this.svgShadowOpacity);ea.setAttribute("result", +"offsetColor");ba.appendChild(ea);ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feComposite"):R.createElement("feComposite");ea.setAttribute("in","offsetColor");ea.setAttribute("in2","offsetBlur");ea.setAttribute("operator","in");ea.setAttribute("result","offsetBlur");ba.appendChild(ea);ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feBlend"):R.createElement("feBlend");ea.setAttribute("in","SourceGraphic");ea.setAttribute("in2","offsetBlur");ba.appendChild(ea); +ea=q.getElementsByTagName("defs");0==ea.length?(R=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"defs"):R.createElement("defs"),null!=q.firstChild?q.insertBefore(R,q.firstChild):q.appendChild(R)):R=ea[0];R.appendChild(ba);Q||(E=null!=E?E:q.getElementsByTagName("g")[0],null!=E&&(E.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(q.getAttribute("width")))&&Y&&(q.setAttribute("width",parseInt(q.getAttribute("width"))+6),q.setAttribute("height",parseInt(q.getAttribute("height"))+ +6),E=q.getAttribute("viewBox"),null!=E&&0<E.length&&(E=E.split(" "),3<E.length&&(w=parseFloat(E[2])+6,h=parseFloat(E[3])+6,q.setAttribute("viewBox",E[0]+" "+E[1]+" "+w+" "+h))))));return ba};Graph.prototype.setShadowVisible=function(q,E){mxClient.IS_SVG&&!mxClient.IS_SF&&(E=null!=E?E:!0,(this.shadowVisible=q)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),E&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer= +function(){if(null==this.defaultParent){var q=this.model.getChildCount(this.model.root),E=0;do var Q=this.model.getChildAt(this.model.root,E);while(E++<q&&"1"==mxUtils.getValue(this.getCellStyle(Q),"locked","0"));null!=Q&&this.setDefaultParent(Q)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn= [SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml", STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=[SHAPES_PATH+"/mxKubernetes.js", STENCIL_PATH+"/kubernetes.xml"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic= @@ -3354,322 +3351,330 @@ STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[S STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.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.aws4= [SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+ -"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(q){var F=null;null!=q&&0<q.length&&("ER"==q.substring(0,2)?F="mxgraph.er":"sysML"==q.substring(0,5)&&(F="mxgraph.sysml"));return F};var Z=mxMarker.createMarker;mxMarker.createMarker= -function(q,F,R,W,T,ba,ha,ra,ta,ma){if(null!=R&&null==mxMarker.markers[R]){var pa=this.getPackageForType(R);null!=pa&&mxStencilRegistry.getStencil(pa)}return Z.apply(this,arguments)};var P=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(q,F,R,W,T,ba){"1"==mxUtils.getValue(F.style,"lineShape",null)&&q.setFillColor(mxUtils.getValue(F.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return P.apply(this,arguments)};PrintDialog.prototype.create=function(q,F){function R(){Ba.value= -Math.max(1,Math.min(ra,Math.max(parseInt(Ba.value),parseInt(za.value))));za.value=Math.max(1,Math.min(ra,Math.min(parseInt(Ba.value),parseInt(za.value))))}function W(ya){function Fa($a,ab,ib){var gb=$a.useCssTransforms,qb=$a.currentTranslate,nb=$a.currentScale,mb=$a.view.translate,Bb=$a.view.scale;$a.useCssTransforms&&($a.useCssTransforms=!1,$a.currentTranslate=new mxPoint(0,0),$a.currentScale=1,$a.view.translate=new mxPoint(0,0),$a.view.scale=1);var wb=$a.getGraphBounds(),rb=0,vb=0,kb=xa.get(),hb= -1/$a.pageScale,tb=Ra.checked;if(tb){hb=parseInt(fa.value);var Cb=parseInt(la.value);hb=Math.min(kb.height*Cb/(wb.height/$a.view.scale),kb.width*hb/(wb.width/$a.view.scale))}else hb=parseInt(Da.value)/(100*$a.pageScale),isNaN(hb)&&(wa=1/$a.pageScale,Da.value="100 %");kb=mxRectangle.fromRectangle(kb);kb.width=Math.ceil(kb.width*wa);kb.height=Math.ceil(kb.height*wa);hb*=wa;!tb&&$a.pageVisible?(wb=$a.getPageLayout(),rb-=wb.x*kb.width,vb-=wb.y*kb.height):tb=!0;if(null==ab){ab=PrintDialog.createPrintPreview($a, +"/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(q){var E=null;null!=q&&0<q.length&&("ER"==q.substring(0,2)?E="mxgraph.er":"sysML"==q.substring(0,5)&&(E="mxgraph.sysml"));return E};var aa=mxMarker.createMarker;mxMarker.createMarker= +function(q,E,Q,Y,R,ba,ea,ra,ta,la){if(null!=Q&&null==mxMarker.markers[Q]){var pa=this.getPackageForType(Q);null!=pa&&mxStencilRegistry.getStencil(pa)}return aa.apply(this,arguments)};var X=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(q,E,Q,Y,R,ba){"1"==mxUtils.getValue(E.style,"lineShape",null)&&q.setFillColor(mxUtils.getValue(E.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return X.apply(this,arguments)};PrintDialog.prototype.create=function(q,E){function Q(){Ca.value= +Math.max(1,Math.min(ra,Math.max(parseInt(Ca.value),parseInt(xa.value))));xa.value=Math.max(1,Math.min(ra,Math.min(parseInt(Ca.value),parseInt(xa.value))))}function Y(ya){function Ha($a,ab,ib){var gb=$a.useCssTransforms,qb=$a.currentTranslate,nb=$a.currentScale,mb=$a.view.translate,Bb=$a.view.scale;$a.useCssTransforms&&($a.useCssTransforms=!1,$a.currentTranslate=new mxPoint(0,0),$a.currentScale=1,$a.view.translate=new mxPoint(0,0),$a.view.scale=1);var wb=$a.getGraphBounds(),rb=0,vb=0,kb=wa.get(),hb= +1/$a.pageScale,tb=Sa.checked;if(tb){hb=parseInt(ha.value);var Cb=parseInt(ma.value);hb=Math.min(kb.height*Cb/(wb.height/$a.view.scale),kb.width*hb/(wb.width/$a.view.scale))}else hb=parseInt(Da.value)/(100*$a.pageScale),isNaN(hb)&&(Qa=1/$a.pageScale,Da.value="100 %");kb=mxRectangle.fromRectangle(kb);kb.width=Math.ceil(kb.width*Qa);kb.height=Math.ceil(kb.height*Qa);hb*=Qa;!tb&&$a.pageVisible?(wb=$a.getPageLayout(),rb-=wb.x*kb.width,vb-=wb.y*kb.height):tb=!0;if(null==ab){ab=PrintDialog.createPrintPreview($a, hb,kb,0,rb,vb,tb);ab.pageSelector=!1;ab.mathEnabled=!1;Ia.checked&&(ab.isCellVisible=function(ob){return $a.isCellSelected(ob)});rb=q.getCurrentFile();null!=rb&&(ab.title=rb.getTitle());var xb=ab.writeHead;ab.writeHead=function(ob){xb.apply(this,arguments);mxClient.IS_GC&&(ob.writeln('<style type="text/css">'),ob.writeln("@media print {"),ob.writeln(".MathJax svg { shape-rendering: crispEdges; }"),ob.writeln("}"),ob.writeln("</style>"));null!=q.editor.fontCss&&(ob.writeln('<style type="text/css">'), ob.writeln(q.editor.fontCss),ob.writeln("</style>"));for(var yb=$a.getCustomFonts(),Ab=0;Ab<yb.length;Ab++){var c=yb[Ab].name,l=yb[Ab].url;Graph.isCssFontUrl(l)?ob.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(l)+'" charset="UTF-8" type="text/css">'):(ob.writeln('<style type="text/css">'),ob.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(c)+'";\nsrc: url("'+mxUtils.htmlEntities(l)+'");\n}'),ob.writeln("</style>"))}};if("undefined"!==typeof MathJax){var zb=ab.renderPage; -ab.renderPage=function(ob,yb,Ab,c,l,v){var n=mxClient.NO_FO,t=zb.apply(this,arguments);mxClient.NO_FO=n;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:t.className="geDisableMathJax";return t}}rb=null;vb=T.shapeForegroundColor;tb=T.shapeBackgroundColor;kb=T.enableFlowAnimation;T.enableFlowAnimation=!1;null!=T.themes&&"darkTheme"==T.defaultThemeName&&(rb=T.stylesheet,T.stylesheet=T.getDefaultStylesheet(),T.shapeForegroundColor="#000000",T.shapeBackgroundColor="#ffffff",T.refresh());ab.open(null, -null,ib,!0);T.enableFlowAnimation=kb;null!=rb&&(T.shapeForegroundColor=vb,T.shapeBackgroundColor=tb,T.stylesheet=rb,T.refresh())}else{kb=$a.background;if(null==kb||""==kb||kb==mxConstants.NONE)kb="#ffffff";ab.backgroundColor=kb;ab.autoOrigin=tb;ab.appendGraph($a,hb,rb,vb,ib,!0);ib=$a.getCustomFonts();if(null!=ab.wnd)for(rb=0;rb<ib.length;rb++)vb=ib[rb].name,tb=ib[rb].url,Graph.isCssFontUrl(tb)?ab.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(tb)+'" charset="UTF-8" type="text/css">'): -(ab.wnd.document.writeln('<style type="text/css">'),ab.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(vb)+'";\nsrc: url("'+mxUtils.htmlEntities(tb)+'");\n}'),ab.wnd.document.writeln("</style>"))}gb&&($a.useCssTransforms=gb,$a.currentTranslate=qb,$a.currentScale=nb,$a.view.translate=mb,$a.view.scale=Bb);return ab}var wa=parseInt(sa.value)/100;isNaN(wa)&&(wa=1,sa.value="100 %");wa*=.75;var ua=null,La=T.shapeForegroundColor,Oa=T.shapeBackgroundColor;null!=T.themes&&"darkTheme"== -T.defaultThemeName&&(ua=T.stylesheet,T.stylesheet=T.getDefaultStylesheet(),T.shapeForegroundColor="#000000",T.shapeBackgroundColor="#ffffff",T.refresh());var Ca=za.value,Ma=Ba.value,Ga=!ma.checked,Ya=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(q,ma.checked,Ca,Ma,Ra.checked,fa.value,la.value,parseInt(Da.value)/100,parseInt(sa.value)/100,xa.get());else{Ga&&(Ga=Ia.checked||Ca==ta&&Ma==ta);if(!Ga&&null!=q.pages&&q.pages.length){var db=0;Ga=q.pages.length-1;ma.checked||(db=parseInt(Ca)-1, -Ga=parseInt(Ma)-1);for(var eb=db;eb<=Ga;eb++){var cb=q.pages[eb];Ca=cb==q.currentPage?T:null;if(null==Ca){Ca=q.createTemporaryGraph(T.stylesheet);Ca.shapeForegroundColor=T.shapeForegroundColor;Ca.shapeBackgroundColor=T.shapeBackgroundColor;Ma=!0;db=!1;var ub=null,fb=null;null==cb.viewState&&null==cb.root&&q.updatePageRoot(cb);null!=cb.viewState&&(Ma=cb.viewState.pageVisible,db=cb.viewState.mathEnabled,ub=cb.viewState.background,fb=cb.viewState.backgroundImage,Ca.extFonts=cb.viewState.extFonts);null!= -fb&&null!=fb.originalSrc&&(fb=q.createImageForPageLink(fb.originalSrc,cb));Ca.background=ub;Ca.backgroundImage=null!=fb?new mxImage(fb.src,fb.width,fb.height,fb.x,fb.y):null;Ca.pageVisible=Ma;Ca.mathEnabled=db;var pb=Ca.getGraphBounds;Ca.getGraphBounds=function(){var $a=pb.apply(this,arguments),ab=this.backgroundImage;if(null!=ab&&null!=ab.width&&null!=ab.height){var ib=this.view.translate,gb=this.view.scale;$a=mxRectangle.fromRectangle($a);$a.add(new mxRectangle((ib.x+ab.x)*gb,(ib.y+ab.y)*gb,ab.width* -gb,ab.height*gb))}return $a};var lb=Ca.getGlobalVariable;Ca.getGlobalVariable=function($a){return"page"==$a?cb.getName():"pagenumber"==$a?eb+1:"pagecount"==$a?null!=q.pages?q.pages.length:1:lb.apply(this,arguments)};document.body.appendChild(Ca.container);q.updatePageRoot(cb);Ca.model.setRoot(cb.root)}Ya=Fa(Ca,Ya,eb!=Ga);Ca!=T&&Ca.container.parentNode.removeChild(Ca.container)}}else Ya=Fa(T);null==Ya?q.handleError({message:mxResources.get("errorUpdatingPreview")}):(Ya.mathEnabled&&(Ga=Ya.wnd.document, -ya&&(Ya.wnd.IMMEDIATE_PRINT=!0),Ga.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),Ya.closeDocument(),!Ya.mathEnabled&&ya&&PrintDialog.printPreview(Ya));null!=ua&&(T.shapeForegroundColor=La,T.shapeBackgroundColor=Oa,T.stylesheet=ua,T.refresh())}}var T=q.editor.graph,ba=document.createElement("div"),ha=document.createElement("h3");ha.style.width="100%";ha.style.textAlign="center";ha.style.marginTop="0px";mxUtils.write(ha,F||mxResources.get("print")); -ba.appendChild(ha);var ra=1,ta=1;ha=document.createElement("div");ha.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var ma=document.createElement("input");ma.style.cssText="margin-right:8px;margin-bottom:8px;";ma.setAttribute("value","all");ma.setAttribute("type","radio");ma.setAttribute("name","pages-printdialog");ha.appendChild(ma);F=document.createElement("span");mxUtils.write(F,mxResources.get("printAllPages"));ha.appendChild(F);mxUtils.br(ha);var pa= -ma.cloneNode(!0);ma.setAttribute("checked","checked");pa.setAttribute("value","range");ha.appendChild(pa);F=document.createElement("span");mxUtils.write(F,mxResources.get("pages")+":");ha.appendChild(F);var za=document.createElement("input");za.style.cssText="margin:0 8px 0 8px;";za.setAttribute("value","1");za.setAttribute("type","number");za.setAttribute("min","1");za.style.width="50px";ha.appendChild(za);F=document.createElement("span");mxUtils.write(F,mxResources.get("to"));ha.appendChild(F); -var Ba=za.cloneNode(!0);ha.appendChild(Ba);mxEvent.addListener(za,"focus",function(){pa.checked=!0});mxEvent.addListener(Ba,"focus",function(){pa.checked=!0});mxEvent.addListener(za,"change",R);mxEvent.addListener(Ba,"change",R);if(null!=q.pages&&(ra=q.pages.length,null!=q.currentPage))for(F=0;F<q.pages.length;F++)if(q.currentPage==q.pages[F]){ta=F+1;za.value=ta;Ba.value=ta;break}za.setAttribute("max",ra);Ba.setAttribute("max",ra);q.isPagesEnabled()?1<ra&&(ba.appendChild(ha),pa.checked=!0):pa.checked= -!0;mxUtils.br(ha);var Ia=document.createElement("input");Ia.setAttribute("value","all");Ia.setAttribute("type","radio");Ia.style.marginRight="8px";T.isSelectionEmpty()&&Ia.setAttribute("disabled","disabled");var Aa=document.createElement("div");Aa.style.marginBottom="10px";1==ra?(Ia.setAttribute("type","checkbox"),Ia.style.marginBottom="12px",Aa.appendChild(Ia)):(Ia.setAttribute("name","pages-printdialog"),Ia.style.marginBottom="8px",ha.appendChild(Ia));F=document.createElement("span");mxUtils.write(F, -mxResources.get("selectionOnly"));Ia.parentNode.appendChild(F);1==ra&&mxUtils.br(Ia.parentNode);var Ka=document.createElement("input");Ka.style.marginRight="8px";Ka.setAttribute("value","adjust");Ka.setAttribute("type","radio");Ka.setAttribute("name","printZoom");Aa.appendChild(Ka);F=document.createElement("span");mxUtils.write(F,mxResources.get("adjustTo"));Aa.appendChild(F);var Da=document.createElement("input");Da.style.cssText="margin:0 8px 0 8px;";Da.setAttribute("value","100 %");Da.style.width= -"50px";Aa.appendChild(Da);mxEvent.addListener(Da,"focus",function(){Ka.checked=!0});ba.appendChild(Aa);ha=ha.cloneNode(!1);var Ra=Ka.cloneNode(!0);Ra.setAttribute("value","fit");Ka.setAttribute("checked","checked");F=document.createElement("div");F.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";F.appendChild(Ra);ha.appendChild(F);Aa=document.createElement("table");Aa.style.display="inline-block";var Qa=document.createElement("tbody"),Ta=document.createElement("tr"),Za=Ta.cloneNode(!0), -Pa=document.createElement("td"),y=Pa.cloneNode(!0),M=Pa.cloneNode(!0),N=Pa.cloneNode(!0),S=Pa.cloneNode(!0),X=Pa.cloneNode(!0);Pa.style.textAlign="right";N.style.textAlign="right";mxUtils.write(Pa,mxResources.get("fitTo"));var fa=document.createElement("input");fa.style.cssText="margin:0 8px 0 8px;";fa.setAttribute("value","1");fa.setAttribute("min","1");fa.setAttribute("type","number");fa.style.width="40px";y.appendChild(fa);F=document.createElement("span");mxUtils.write(F,mxResources.get("fitToSheetsAcross")); -M.appendChild(F);mxUtils.write(N,mxResources.get("fitToBy"));var la=fa.cloneNode(!0);S.appendChild(la);mxEvent.addListener(fa,"focus",function(){Ra.checked=!0});mxEvent.addListener(la,"focus",function(){Ra.checked=!0});F=document.createElement("span");mxUtils.write(F,mxResources.get("fitToSheetsDown"));X.appendChild(F);Ta.appendChild(Pa);Ta.appendChild(y);Ta.appendChild(M);Za.appendChild(N);Za.appendChild(S);Za.appendChild(X);Qa.appendChild(Ta);Qa.appendChild(Za);Aa.appendChild(Qa);ha.appendChild(Aa); -ba.appendChild(ha);ha=document.createElement("div");F=document.createElement("div");F.style.fontWeight="bold";F.style.marginBottom="12px";mxUtils.write(F,mxResources.get("paperSize"));ha.appendChild(F);F=document.createElement("div");F.style.marginBottom="12px";var xa=PageSetupDialog.addPageFormatPanel(F,"printdialog",q.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);ha.appendChild(F);F=document.createElement("span");mxUtils.write(F,mxResources.get("pageScale"));ha.appendChild(F);var sa= -document.createElement("input");sa.style.cssText="margin:0 8px 0 8px;";sa.setAttribute("value","100 %");sa.style.width="60px";ha.appendChild(sa);ba.appendChild(ha);F=document.createElement("div");F.style.cssText="text-align:right;margin:48px 0 0 0;";ha=mxUtils.button(mxResources.get("cancel"),function(){q.hideDialog()});ha.className="geBtn";q.editor.cancelFirst&&F.appendChild(ha);q.isOffline()||(Aa=mxUtils.button(mxResources.get("help"),function(){T.openLink("https://www.diagrams.net/doc/faq/print-diagram")}), -Aa.className="geBtn",F.appendChild(Aa));PrintDialog.previewEnabled&&(Aa=mxUtils.button(mxResources.get("preview"),function(){q.hideDialog();W(!1)}),Aa.className="geBtn",F.appendChild(Aa));Aa=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){q.hideDialog();W(!0)});Aa.className="geBtn gePrimaryBtn";F.appendChild(Aa);q.editor.cancelFirst||F.appendChild(ha);ba.appendChild(F);this.container=ba};var ca=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute= +ab.renderPage=function(ob,yb,Ab,c,l,v){var n=mxClient.NO_FO,t=zb.apply(this,arguments);mxClient.NO_FO=n;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:t.className="geDisableMathJax";return t}}rb=null;vb=R.shapeForegroundColor;tb=R.shapeBackgroundColor;kb=R.enableFlowAnimation;R.enableFlowAnimation=!1;null!=R.themes&&"darkTheme"==R.defaultThemeName&&(rb=R.stylesheet,R.stylesheet=R.getDefaultStylesheet(),R.shapeForegroundColor="#000000",R.shapeBackgroundColor="#ffffff",R.refresh());ab.open(null, +null,ib,!0);R.enableFlowAnimation=kb;null!=rb&&(R.shapeForegroundColor=vb,R.shapeBackgroundColor=tb,R.stylesheet=rb,R.refresh())}else{kb=$a.background;if(null==kb||""==kb||kb==mxConstants.NONE)kb="#ffffff";ab.backgroundColor=kb;ab.autoOrigin=tb;ab.appendGraph($a,hb,rb,vb,ib,!0);ib=$a.getCustomFonts();if(null!=ab.wnd)for(rb=0;rb<ib.length;rb++)vb=ib[rb].name,tb=ib[rb].url,Graph.isCssFontUrl(tb)?ab.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(tb)+'" charset="UTF-8" type="text/css">'): +(ab.wnd.document.writeln('<style type="text/css">'),ab.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(vb)+'";\nsrc: url("'+mxUtils.htmlEntities(tb)+'");\n}'),ab.wnd.document.writeln("</style>"))}gb&&($a.useCssTransforms=gb,$a.currentTranslate=qb,$a.currentScale=nb,$a.view.translate=mb,$a.view.scale=Bb);return ab}var Qa=parseInt(sa.value)/100;isNaN(Qa)&&(Qa=1,sa.value="100 %");Qa*=.75;var ua=null,za=R.shapeForegroundColor,Fa=R.shapeBackgroundColor;null!=R.themes&&"darkTheme"== +R.defaultThemeName&&(ua=R.stylesheet,R.stylesheet=R.getDefaultStylesheet(),R.shapeForegroundColor="#000000",R.shapeBackgroundColor="#ffffff",R.refresh());var Ba=xa.value,Ea=Ca.value,Oa=!la.checked,Pa=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(q,la.checked,Ba,Ea,Sa.checked,ha.value,ma.value,parseInt(Da.value)/100,parseInt(sa.value)/100,wa.get());else{Oa&&(Oa=Ia.checked||Ba==ta&&Ea==ta);if(!Oa&&null!=q.pages&&q.pages.length){var bb=0;Oa=q.pages.length-1;la.checked||(bb=parseInt(Ba)-1, +Oa=parseInt(Ea)-1);for(var eb=bb;eb<=Oa;eb++){var db=q.pages[eb];Ba=db==q.currentPage?R:null;if(null==Ba){Ba=q.createTemporaryGraph(R.stylesheet);Ba.shapeForegroundColor=R.shapeForegroundColor;Ba.shapeBackgroundColor=R.shapeBackgroundColor;Ea=!0;bb=!1;var ub=null,fb=null;null==db.viewState&&null==db.root&&q.updatePageRoot(db);null!=db.viewState&&(Ea=db.viewState.pageVisible,bb=db.viewState.mathEnabled,ub=db.viewState.background,fb=db.viewState.backgroundImage,Ba.extFonts=db.viewState.extFonts);null!= +fb&&null!=fb.originalSrc&&(fb=q.createImageForPageLink(fb.originalSrc,db));Ba.background=ub;Ba.backgroundImage=null!=fb?new mxImage(fb.src,fb.width,fb.height,fb.x,fb.y):null;Ba.pageVisible=Ea;Ba.mathEnabled=bb;var pb=Ba.getGraphBounds;Ba.getGraphBounds=function(){var $a=pb.apply(this,arguments),ab=this.backgroundImage;if(null!=ab&&null!=ab.width&&null!=ab.height){var ib=this.view.translate,gb=this.view.scale;$a=mxRectangle.fromRectangle($a);$a.add(new mxRectangle((ib.x+ab.x)*gb,(ib.y+ab.y)*gb,ab.width* +gb,ab.height*gb))}return $a};var lb=Ba.getGlobalVariable;Ba.getGlobalVariable=function($a){return"page"==$a?db.getName():"pagenumber"==$a?eb+1:"pagecount"==$a?null!=q.pages?q.pages.length:1:lb.apply(this,arguments)};document.body.appendChild(Ba.container);q.updatePageRoot(db);Ba.model.setRoot(db.root)}Pa=Ha(Ba,Pa,eb!=Oa);Ba!=R&&Ba.container.parentNode.removeChild(Ba.container)}}else Pa=Ha(R);null==Pa?q.handleError({message:mxResources.get("errorUpdatingPreview")}):(Pa.mathEnabled&&(Oa=Pa.wnd.document, +ya&&(Pa.wnd.IMMEDIATE_PRINT=!0),Oa.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),Pa.closeDocument(),!Pa.mathEnabled&&ya&&PrintDialog.printPreview(Pa));null!=ua&&(R.shapeForegroundColor=za,R.shapeBackgroundColor=Fa,R.stylesheet=ua,R.refresh())}}var R=q.editor.graph,ba=document.createElement("div"),ea=document.createElement("h3");ea.style.width="100%";ea.style.textAlign="center";ea.style.marginTop="0px";mxUtils.write(ea,E||mxResources.get("print")); +ba.appendChild(ea);var ra=1,ta=1;ea=document.createElement("div");ea.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var la=document.createElement("input");la.style.cssText="margin-right:8px;margin-bottom:8px;";la.setAttribute("value","all");la.setAttribute("type","radio");la.setAttribute("name","pages-printdialog");ea.appendChild(la);E=document.createElement("span");mxUtils.write(E,mxResources.get("printAllPages"));ea.appendChild(E);mxUtils.br(ea);var pa= +la.cloneNode(!0);la.setAttribute("checked","checked");pa.setAttribute("value","range");ea.appendChild(pa);E=document.createElement("span");mxUtils.write(E,mxResources.get("pages")+":");ea.appendChild(E);var xa=document.createElement("input");xa.style.cssText="margin:0 8px 0 8px;";xa.setAttribute("value","1");xa.setAttribute("type","number");xa.setAttribute("min","1");xa.style.width="50px";ea.appendChild(xa);E=document.createElement("span");mxUtils.write(E,mxResources.get("to"));ea.appendChild(E); +var Ca=xa.cloneNode(!0);ea.appendChild(Ca);mxEvent.addListener(xa,"focus",function(){pa.checked=!0});mxEvent.addListener(Ca,"focus",function(){pa.checked=!0});mxEvent.addListener(xa,"change",Q);mxEvent.addListener(Ca,"change",Q);if(null!=q.pages&&(ra=q.pages.length,null!=q.currentPage))for(E=0;E<q.pages.length;E++)if(q.currentPage==q.pages[E]){ta=E+1;xa.value=ta;Ca.value=ta;break}xa.setAttribute("max",ra);Ca.setAttribute("max",ra);q.isPagesEnabled()?1<ra&&(ba.appendChild(ea),pa.checked=!0):pa.checked= +!0;mxUtils.br(ea);var Ia=document.createElement("input");Ia.setAttribute("value","all");Ia.setAttribute("type","radio");Ia.style.marginRight="8px";R.isSelectionEmpty()&&Ia.setAttribute("disabled","disabled");var Aa=document.createElement("div");Aa.style.marginBottom="10px";1==ra?(Ia.setAttribute("type","checkbox"),Ia.style.marginBottom="12px",Aa.appendChild(Ia)):(Ia.setAttribute("name","pages-printdialog"),Ia.style.marginBottom="8px",ea.appendChild(Ia));E=document.createElement("span");mxUtils.write(E, +mxResources.get("selectionOnly"));Ia.parentNode.appendChild(E);1==ra&&mxUtils.br(Ia.parentNode);var La=document.createElement("input");La.style.marginRight="8px";La.setAttribute("value","adjust");La.setAttribute("type","radio");La.setAttribute("name","printZoom");Aa.appendChild(La);E=document.createElement("span");mxUtils.write(E,mxResources.get("adjustTo"));Aa.appendChild(E);var Da=document.createElement("input");Da.style.cssText="margin:0 8px 0 8px;";Da.setAttribute("value","100 %");Da.style.width= +"50px";Aa.appendChild(Da);mxEvent.addListener(Da,"focus",function(){La.checked=!0});ba.appendChild(Aa);ea=ea.cloneNode(!1);var Sa=La.cloneNode(!0);Sa.setAttribute("value","fit");La.setAttribute("checked","checked");E=document.createElement("div");E.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";E.appendChild(Sa);ea.appendChild(E);Aa=document.createElement("table");Aa.style.display="inline-block";var Ra=document.createElement("tbody"),Ta=document.createElement("tr"),Za=Ta.cloneNode(!0), +Na=document.createElement("td"),z=Na.cloneNode(!0),L=Na.cloneNode(!0),O=Na.cloneNode(!0),V=Na.cloneNode(!0),U=Na.cloneNode(!0);Na.style.textAlign="right";O.style.textAlign="right";mxUtils.write(Na,mxResources.get("fitTo"));var ha=document.createElement("input");ha.style.cssText="margin:0 8px 0 8px;";ha.setAttribute("value","1");ha.setAttribute("min","1");ha.setAttribute("type","number");ha.style.width="40px";z.appendChild(ha);E=document.createElement("span");mxUtils.write(E,mxResources.get("fitToSheetsAcross")); +L.appendChild(E);mxUtils.write(O,mxResources.get("fitToBy"));var ma=ha.cloneNode(!0);V.appendChild(ma);mxEvent.addListener(ha,"focus",function(){Sa.checked=!0});mxEvent.addListener(ma,"focus",function(){Sa.checked=!0});E=document.createElement("span");mxUtils.write(E,mxResources.get("fitToSheetsDown"));U.appendChild(E);Ta.appendChild(Na);Ta.appendChild(z);Ta.appendChild(L);Za.appendChild(O);Za.appendChild(V);Za.appendChild(U);Ra.appendChild(Ta);Ra.appendChild(Za);Aa.appendChild(Ra);ea.appendChild(Aa); +ba.appendChild(ea);ea=document.createElement("div");E=document.createElement("div");E.style.fontWeight="bold";E.style.marginBottom="12px";mxUtils.write(E,mxResources.get("paperSize"));ea.appendChild(E);E=document.createElement("div");E.style.marginBottom="12px";var wa=PageSetupDialog.addPageFormatPanel(E,"printdialog",q.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);ea.appendChild(E);E=document.createElement("span");mxUtils.write(E,mxResources.get("pageScale"));ea.appendChild(E);var sa= +document.createElement("input");sa.style.cssText="margin:0 8px 0 8px;";sa.setAttribute("value","100 %");sa.style.width="60px";ea.appendChild(sa);ba.appendChild(ea);E=document.createElement("div");E.style.cssText="text-align:right;margin:48px 0 0 0;";ea=mxUtils.button(mxResources.get("cancel"),function(){q.hideDialog()});ea.className="geBtn";q.editor.cancelFirst&&E.appendChild(ea);q.isOffline()||(Aa=mxUtils.button(mxResources.get("help"),function(){R.openLink("https://www.diagrams.net/doc/faq/print-diagram")}), +Aa.className="geBtn",E.appendChild(Aa));PrintDialog.previewEnabled&&(Aa=mxUtils.button(mxResources.get("preview"),function(){q.hideDialog();Y(!1)}),Aa.className="geBtn",E.appendChild(Aa));Aa=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){q.hideDialog();Y(!0)});Aa.className="geBtn gePrimaryBtn";E.appendChild(Aa);q.editor.cancelFirst||E.appendChild(ea);ba.appendChild(E);this.container=ba};var ja=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute= function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var q=this.image;null!=q&&null!=q.src&&Graph.isPageLink(q.src)&&(q={originalSrc:q.src});this.page.viewState.backgroundImage=q}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible= -this.shadowVisible)}}else ca.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var ja=document.createElement("canvas"),ka=new Image;ka.onload=function(){try{ja.getContext("2d").drawImage(ka, -0,0);var q=ja.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=q&&6<q.length}catch(F){}};ka.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(q){}Editor.prototype.useCanvasForExport=!1})(); +this.shadowVisible)}}else ja.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var ca=document.createElement("canvas"),ka=new Image;ka.onload=function(){try{ca.getContext("2d").drawImage(ka, +0,0);var q=ca.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=q&&6<q.length}catch(E){}};ka.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(q){}Editor.prototype.useCanvasForExport=!1})(); (function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};b.afterDecode=function(e,k,m){m.previousColor=m.color;m.previousImage=m.image;m.previousFormat=m.format;null!=m.foldingEnabled&&(m.foldingEnabled=!m.foldingEnabled);null!=m.mathEnabled&&(m.mathEnabled=!m.mathEnabled);null!=m.shadowVisible&&(m.shadowVisible=!m.shadowVisible);return m};mxCodecRegistry.register(b)})(); -(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.2.8";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage= +(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.3.0";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage= null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&& "1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35, -mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(d,f,g,x,z,u,H){u=null!=u?u:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&& -"1"!=urlParams.dev)try{if(d!=EditorUi.lastErrorMessage&&(null==d||null==f||-1==d.indexOf("Script error")&&-1==d.indexOf("extension"))&&null!=d&&0>d.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=d;var J=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";z=null!=z?z:Error(d);(new Image).src=J+"/log?severity="+u+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=x?":colno:"+ -encodeURIComponent(x):"")+(null!=z&&null!=z.stack?"&stack="+encodeURIComponent(z.stack):"")}}catch(D){}try{H||null==window.console||console.error(u,d,f,g,x,z)}catch(D){}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(g){}};EditorUi.sendReport= +mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(d,f,g,x,y,u,H){u=null!=u?u:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&& +"1"!=urlParams.dev)try{if(d!=EditorUi.lastErrorMessage&&(null==d||null==f||-1==d.indexOf("Script error")&&-1==d.indexOf("extension"))&&null!=d&&0>d.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=d;var J=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";y=null!=y?y:Error(d);(new Image).src=J+"/log?severity="+u+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=x?":colno:"+ +encodeURIComponent(x):"")+(null!=y&&null!=y.stack?"&stack="+encodeURIComponent(y.stack):"")}}catch(D){}try{H||null==window.console||console.error(u,d,f,g,x,y)}catch(D){}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(g){}};EditorUi.sendReport= function(d,f){if("1"==urlParams.dev)EditorUi.debug("sendReport",d);else if(EditorUi.enableLogging)try{f=null!=f?f:5E4,d.length>f&&(d=d.substring(0,f)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(d))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var d=[(new Date).toISOString()],f=0;f<arguments.length;f++)d.push(arguments[f]);console.log.apply(console, d)}}catch(g){}};EditorUi.removeChildNodes=function(d){for(;null!=d.firstChild;)d.removeChild(d.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;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.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad= -!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var d=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!d.getContext||!d.getContext("2d"))}catch(z){}try{var f=document.createElement("canvas"),g=new Image;g.onload=function(){try{f.getContext("2d").drawImage(g,0,0);var z= -f.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=z&&6<z.length}catch(u){}};g.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(z){}try{f=document.createElement("canvas");f.width=f.height=1;var x=f.toDataURL("image/jpeg"); -EditorUi.prototype.jpgSupported=null!==x.match("image/jpeg")}catch(z){}})();EditorUi.prototype.openLink=function(d,f,g){return this.editor.graph.openLink(d,f,g)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalData=function(d,f){f(localStorage.getItem(d))};EditorUi.prototype.setLocalData=function(d,f,g){localStorage.setItem(d,f);null!=g&&g()};EditorUi.prototype.removeLocalData=function(d,f){localStorage.removeItem(d);f()};EditorUi.prototype.setShareCursorPosition=function(d){this.shareCursorPosition= +!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var d=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!d.getContext||!d.getContext("2d"))}catch(y){}try{var f=document.createElement("canvas"),g=new Image;g.onload=function(){try{f.getContext("2d").drawImage(g,0,0);var y= +f.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=y&&6<y.length}catch(u){}};g.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(y){}try{f=document.createElement("canvas");f.width=f.height=1;var x=f.toDataURL("image/jpeg"); +EditorUi.prototype.jpgSupported=null!==x.match("image/jpeg")}catch(y){}})();EditorUi.prototype.openLink=function(d,f,g){return this.editor.graph.openLink(d,f,g)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalData=function(d,f){f(localStorage.getItem(d))};EditorUi.prototype.setLocalData=function(d,f,g){localStorage.setItem(d,f);null!=g&&g()};EditorUi.prototype.removeLocalData=function(d,f){localStorage.removeItem(d);f()};EditorUi.prototype.setShareCursorPosition=function(d){this.shareCursorPosition= d;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(d){this.showRemoteCursors=d;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(d){this.editor.graph.mathEnabled=d;this.editor.updateGraphComponents();this.editor.graph.refresh(); this.editor.graph.defaultMathEnabled=d;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(d){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(d){return this.isOfflineApp()||!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()}; -EditorUi.prototype.createSpinner=function(d,f,g){var x=null==d||null==f;g=null!=g?g:24;var z=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),u=z.spin;z.spin=function(J,D){var G=!1;this.active||(u.call(this,J),this.active=!0,null!=D&&(x&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),G=document.createElement("div"), +EditorUi.prototype.createSpinner=function(d,f,g){var x=null==d||null==f;g=null!=g?g:24;var y=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),u=y.spin;y.spin=function(J,D){var G=!1;this.active||(u.call(this,J),this.active=!0,null!=D&&(x&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),G=document.createElement("div"), G.style.position="absolute",G.style.whiteSpace="nowrap",G.style.background="#4B4243",G.style.color="white",G.style.fontFamily=Editor.defaultHtmlFont,G.style.fontSize="9pt",G.style.padding="6px",G.style.paddingLeft="10px",G.style.paddingRight="10px",G.style.zIndex=2E9,G.style.left=Math.max(0,d)+"px",G.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(G.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(G.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(G.style, -"boxShadow","2px 2px 3px 0px #ddd"),"..."!=D.substring(D.length-3,D.length)&&"!"!=D.charAt(D.length-1)&&(D+="..."),G.innerHTML=D,J.appendChild(G),z.status=G),this.pause=mxUtils.bind(this,function(){var V=function(){};this.active&&(V=mxUtils.bind(this,function(){this.spin(J,D)}));this.stop();return V}),G=!0);return G};var H=z.stop;z.stop=function(){H.call(this);this.active=!1;null!=z.status&&null!=z.status.parentNode&&z.status.parentNode.removeChild(z.status);z.status=null};z.pause=function(){return function(){}}; -return z};EditorUi.prototype.isCompatibleString=function(d){try{var f=mxUtils.parseXml(d),g=this.editor.extractGraphModel(f.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(x){}return!1};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&& +"boxShadow","2px 2px 3px 0px #ddd"),"..."!=D.substring(D.length-3,D.length)&&"!"!=D.charAt(D.length-1)&&(D+="..."),G.innerHTML=D,J.appendChild(G),y.status=G),this.pause=mxUtils.bind(this,function(){var W=function(){};this.active&&(W=mxUtils.bind(this,function(){this.spin(J,D)}));this.stop();return W}),G=!0);return G};var H=y.stop;y.stop=function(){H.call(this);this.active=!1;null!=y.status&&null!=y.status.parentNode&&y.status.parentNode.removeChild(y.status);y.status=null};y.pause=function(){return function(){}}; +return y};EditorUi.prototype.isCompatibleString=function(d){try{var f=mxUtils.parseXml(d),g=this.editor.extractGraphModel(f.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(x){}return!1};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&& 3==d.charCodeAt(2)&&4==d.charCodeAt(3)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&6==d.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||60==d.charCodeAt(0)&&63==d.charCodeAt(1)&&120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler; -EditorUi.prototype.createKeyHandler=function(d){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=f.getFunction,x=this.editor.graph,z=this;f.getFunction=function(u){if(x.isSelectionEmpty()&&null!=z.pages&&0<z.pages.length){var H=z.getSelectedPageIndex();if(mxEvent.isShiftDown(u)){if(37==u.keyCode)return function(){0<H&&z.movePage(H,H-1)};if(38==u.keyCode)return function(){0<H&&z.movePage(H,0)};if(39==u.keyCode)return function(){H<z.pages.length-1&&z.movePage(H, -H+1)};if(40==u.keyCode)return function(){H<z.pages.length-1&&z.movePage(H,z.pages.length-1)}}else if(mxEvent.isControlDown(u)||mxClient.IS_MAC&&mxEvent.isMetaDown(u)){if(37==u.keyCode)return function(){0<H&&z.selectNextPage(!1)};if(38==u.keyCode)return function(){0<H&&z.selectPage(z.pages[0])};if(39==u.keyCode)return function(){H<z.pages.length-1&&z.selectNextPage(!0)};if(40==u.keyCode)return function(){H<z.pages.length-1&&z.selectPage(z.pages[z.pages.length-1])}}}return!(65<=u.keyCode&&90>=u.keyCode)|| +EditorUi.prototype.createKeyHandler=function(d){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=f.getFunction,x=this.editor.graph,y=this;f.getFunction=function(u){if(x.isSelectionEmpty()&&null!=y.pages&&0<y.pages.length){var H=y.getSelectedPageIndex();if(mxEvent.isShiftDown(u)){if(37==u.keyCode)return function(){0<H&&y.movePage(H,H-1)};if(38==u.keyCode)return function(){0<H&&y.movePage(H,0)};if(39==u.keyCode)return function(){H<y.pages.length-1&&y.movePage(H, +H+1)};if(40==u.keyCode)return function(){H<y.pages.length-1&&y.movePage(H,y.pages.length-1)}}else if(mxEvent.isControlDown(u)||mxClient.IS_MAC&&mxEvent.isMetaDown(u)){if(37==u.keyCode)return function(){0<H&&y.selectNextPage(!1)};if(38==u.keyCode)return function(){0<H&&y.selectPage(y.pages[0])};if(39==u.keyCode)return function(){H<y.pages.length-1&&y.selectNextPage(!0)};if(40==u.keyCode)return function(){H<y.pages.length-1&&y.selectPage(y.pages[y.pages.length-1])}}}return!(65<=u.keyCode&&90>=u.keyCode)|| x.isSelectionEmpty()||mxEvent.isAltDown(u)||mxEvent.isShiftDown(u)||mxEvent.isControlDown(u)||mxClient.IS_MAC&&mxEvent.isMetaDown(u)?g.apply(this,arguments):null}}return f};var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var f=e.apply(this,arguments);if(null==f)try{var g=d.indexOf("<mxfile ");if(0<=g){var x=d.lastIndexOf("</mxfile>");x>g&&(f=d.substring(g,x+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g, -""))}else{var z=mxUtils.parseXml(d),u=this.editor.extractGraphModel(z.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=u?mxUtils.getXml(u):""}}catch(H){}return f};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var f=d.indexOf('<meta charset="utf-8">');0<=f&&(d=d.slice(0,f)+'<meta charset="utf-8"/>'+d.slice(f+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d){d=this.validateFileData(d); -d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var f=null!=d?this.editor.extractGraphModel(d,!0):null;null!=f&&(d=f);if(null!=d){f=this.editor.graph;f.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,x=d.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<x.length||1==x.length&&x[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var z=x.length-1;0<=z;z--){var u=this.updatePageRoot(new DiagramPage(x[z]));null==u.getName()&& -u.setName(mxResources.get("pageWithNumber",[z+1]));f.model.execute(new ChangePage(this,u,0==z?u:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root); -if(null!=g)for(z=0;z<g.length;z++)f.model.execute(new ChangePage(this,g[z],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,f,g,x,z,u,H,J,D,G,V){f=null!=f?f:this.editor.graph;z=null!=z?z:!1;D=null!=D?D:!0;var U=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var Y="_blank";else U=Y=x;if(null==d)return"";var O=d;if("mxfile"!=O.nodeName.toLowerCase()){if(V){var qa=d.ownerDocument.createElement("diagram");qa.setAttribute("id",Editor.guid()); -qa.appendChild(d)}else{qa=Graph.zapGremlins(mxUtils.getXml(d));O=Graph.compress(qa);if(Graph.decompress(O)!=qa)return qa;qa=d.ownerDocument.createElement("diagram");qa.setAttribute("id",Editor.guid());mxUtils.setTextContent(qa,O)}O=d.ownerDocument.createElement("mxfile");O.appendChild(qa)}G?(O=O.cloneNode(!0),O.removeAttribute("modified"),O.removeAttribute("host"),O.removeAttribute("agent"),O.removeAttribute("etag"),O.removeAttribute("userAgent"),O.removeAttribute("version"),O.removeAttribute("editor"), -O.removeAttribute("type")):(O.removeAttribute("userAgent"),O.removeAttribute("version"),O.removeAttribute("editor"),O.removeAttribute("pages"),O.removeAttribute("type"),mxClient.IS_CHROMEAPP?O.setAttribute("host","Chrome"):EditorUi.isElectronApp?O.setAttribute("host","Electron"):O.setAttribute("host",window.location.hostname),O.setAttribute("modified",(new Date).toISOString()),O.setAttribute("agent",navigator.appVersion),O.setAttribute("version",EditorUi.VERSION),O.setAttribute("etag",Editor.guid()), -d=null!=g?g.getMode():this.mode,null!=d&&O.setAttribute("type",d),1<O.getElementsByTagName("diagram").length&&null!=this.pages&&O.setAttribute("pages",this.pages.length));V=V?mxUtils.getPrettyXml(O):mxUtils.getXml(O);if(!u&&!z&&(H||null!=g&&/(\.html)$/i.test(g.getTitle())))V=this.getHtml2(mxUtils.getXml(O),f,null!=g?g.getTitle():null,Y,U);else if(u||!z&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(x=null),V=this.getEmbeddedSvg(V,f, -x,null,J,D,U);return V};EditorUi.prototype.getXmlFileData=function(d,f,g,x){d=null!=d?d:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var z=this.editor.getGraphXml(d,x);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(D){var G=D.getElementsByTagName("mxGraphModel");G=0<G.length?G[0]:null;null==G&&g?(G=mxUtils.trim(mxUtils.getTextContent(D)),D=D.cloneNode(!1),0<G.length&&(G=Graph.decompress(G),null!=G&&0<G.length&&D.appendChild(mxUtils.parseXml(G).documentElement))):null==G||g?D= -D.cloneNode(!0):(D=D.cloneNode(!1),mxUtils.setTextContent(D,Graph.compressNode(G)));z.appendChild(D)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(z)),z=this.fileNode.cloneNode(!1),f)d(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var u=this.pages[f],H=u.node;if(u!=this.currentPage)if(u.needsUpdate){var J=new mxCodec(mxUtils.createXmlDocument());J=J.encode(new mxGraphModel(u.root));this.editor.graph.saveViewState(u.viewState, +""))}else{var y=mxUtils.parseXml(d),u=this.editor.extractGraphModel(y.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=u?mxUtils.getXml(u):""}}catch(H){}return f};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var f=d.indexOf('<meta charset="utf-8">');0<=f&&(d=d.slice(0,f)+'<meta charset="utf-8"/>'+d.slice(f+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d){d=this.validateFileData(d); +d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var f=null!=d?this.editor.extractGraphModel(d,!0):null;null!=f&&(d=f);if(null!=d){f=this.editor.graph;f.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,x=d.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<x.length||1==x.length&&x[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var y=x.length-1;0<=y;y--){var u=this.updatePageRoot(new DiagramPage(x[y]));null==u.getName()&& +u.setName(mxResources.get("pageWithNumber",[y+1]));f.model.execute(new ChangePage(this,u,0==y?u:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root); +if(null!=g)for(y=0;y<g.length;y++)f.model.execute(new ChangePage(this,g[y],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,f,g,x,y,u,H,J,D,G,W){f=null!=f?f:this.editor.graph;y=null!=y?y:!1;D=null!=D?D:!0;var T=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var Z="_blank";else T=Z=x;if(null==d)return"";var N=d;if("mxfile"!=N.nodeName.toLowerCase()){if(W){var qa=d.ownerDocument.createElement("diagram");qa.setAttribute("id",Editor.guid()); +qa.appendChild(d)}else{qa=Graph.zapGremlins(mxUtils.getXml(d));N=Graph.compress(qa);if(Graph.decompress(N)!=qa)return qa;qa=d.ownerDocument.createElement("diagram");qa.setAttribute("id",Editor.guid());mxUtils.setTextContent(qa,N)}N=d.ownerDocument.createElement("mxfile");N.appendChild(qa)}G?(N=N.cloneNode(!0),N.removeAttribute("modified"),N.removeAttribute("host"),N.removeAttribute("agent"),N.removeAttribute("etag"),N.removeAttribute("userAgent"),N.removeAttribute("version"),N.removeAttribute("editor"), +N.removeAttribute("type")):(N.removeAttribute("userAgent"),N.removeAttribute("version"),N.removeAttribute("editor"),N.removeAttribute("pages"),N.removeAttribute("type"),mxClient.IS_CHROMEAPP?N.setAttribute("host","Chrome"):EditorUi.isElectronApp?N.setAttribute("host","Electron"):N.setAttribute("host",window.location.hostname),N.setAttribute("modified",(new Date).toISOString()),N.setAttribute("agent",navigator.appVersion),N.setAttribute("version",EditorUi.VERSION),N.setAttribute("etag",Editor.guid()), +d=null!=g?g.getMode():this.mode,null!=d&&N.setAttribute("type",d),1<N.getElementsByTagName("diagram").length&&null!=this.pages&&N.setAttribute("pages",this.pages.length));W=W?mxUtils.getPrettyXml(N):mxUtils.getXml(N);if(!u&&!y&&(H||null!=g&&/(\.html)$/i.test(g.getTitle())))W=this.getHtml2(mxUtils.getXml(N),f,null!=g?g.getTitle():null,Z,T);else if(u||!y&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(x=null),W=this.getEmbeddedSvg(W,f, +x,null,J,D,T);return W};EditorUi.prototype.getXmlFileData=function(d,f,g,x){d=null!=d?d:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var y=this.editor.getGraphXml(d,x);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(D){var G=D.getElementsByTagName("mxGraphModel");G=0<G.length?G[0]:null;null==G&&g?(G=mxUtils.trim(mxUtils.getTextContent(D)),D=D.cloneNode(!1),0<G.length&&(G=Graph.decompress(G),null!=G&&0<G.length&&D.appendChild(mxUtils.parseXml(G).documentElement))):null==G||g?D= +D.cloneNode(!0):(D=D.cloneNode(!1),mxUtils.setTextContent(D,Graph.compressNode(G)));y.appendChild(D)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(y)),y=this.fileNode.cloneNode(!1),f)d(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var u=this.pages[f],H=u.node;if(u!=this.currentPage)if(u.needsUpdate){var J=new mxCodec(mxUtils.createXmlDocument());J=J.encode(new mxGraphModel(u.root));this.editor.graph.saveViewState(u.viewState, J,null,x);EditorUi.removeChildNodes(H);mxUtils.setTextContent(H,Graph.compressNode(J));delete u.needsUpdate}else x&&(this.updatePageRoot(u),null!=u.viewState.backgroundImage&&(null!=u.viewState.backgroundImage.originalSrc?u.viewState.backgroundImage=this.createImageForPageLink(u.viewState.backgroundImage.originalSrc,u):Graph.isPageLink(u.viewState.backgroundImage.src)&&(u.viewState.backgroundImage=this.createImageForPageLink(u.viewState.backgroundImage.src,u))),null!=u.viewState.backgroundImage&& -null!=u.viewState.backgroundImage.originalSrc&&(J=new mxCodec(mxUtils.createXmlDocument()),J=J.encode(new mxGraphModel(u.root)),this.editor.graph.saveViewState(u.viewState,J,null,x),H=H.cloneNode(!1),mxUtils.setTextContent(H,Graph.compressNode(J))));d(H)}return z};EditorUi.prototype.anonymizeString=function(d,f){for(var g=[],x=0;x<d.length;x++){var z=d.charAt(x);0<=EditorUi.ignoredAnonymizedChars.indexOf(z)?g.push(z):isNaN(parseInt(z))?z.toLowerCase()!=z?g.push(String.fromCharCode(65+Math.round(25* -Math.random()))):z.toUpperCase()!=z?g.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(z)?g.push(" "):g.push("?"):g.push(f?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var f=0;f<d[EditorUi.DIFF_INSERT].length;f++)try{var g=mxUtils.parseXml(d[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name"))); -d[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(g)}catch(u){d[EditorUi.DIFF_INSERT][f].data=u.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var x in d[EditorUi.DIFF_UPDATE]){var z=d[EditorUi.DIFF_UPDATE][x];null!=z.name&&(z.name=this.anonymizeString(z.name));null!=z.cells&&(f=mxUtils.bind(this,function(u){var H=z.cells[u];if(null!=H){for(var J in H)null!=H[J].value&&(H[J].value="["+H[J].value.length+"]"),null!=H[J].xmlValue&&(H[J].xmlValue="["+H[J].xmlValue.length+"]"),null!=H[J].style&&(H[J].style= -"["+H[J].style.length+"]"),mxUtils.isEmptyObject(H[J])&&delete H[J];mxUtils.isEmptyObject(H)&&delete z.cells[u]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(z.cells)&&delete z.cells);mxUtils.isEmptyObject(z)&&delete d[EditorUi.DIFF_UPDATE][x]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,f){if(null!=d.attributes)for(var g=0;g<d.attributes.length;g++)"as"!=d.attributes[g].name&& +null!=u.viewState.backgroundImage.originalSrc&&(J=new mxCodec(mxUtils.createXmlDocument()),J=J.encode(new mxGraphModel(u.root)),this.editor.graph.saveViewState(u.viewState,J,null,x),H=H.cloneNode(!1),mxUtils.setTextContent(H,Graph.compressNode(J))));d(H)}return y};EditorUi.prototype.anonymizeString=function(d,f){for(var g=[],x=0;x<d.length;x++){var y=d.charAt(x);0<=EditorUi.ignoredAnonymizedChars.indexOf(y)?g.push(y):isNaN(parseInt(y))?y.toLowerCase()!=y?g.push(String.fromCharCode(65+Math.round(25* +Math.random()))):y.toUpperCase()!=y?g.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(y)?g.push(" "):g.push("?"):g.push(f?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var f=0;f<d[EditorUi.DIFF_INSERT].length;f++)try{var g=mxUtils.parseXml(d[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name"))); +d[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(g)}catch(u){d[EditorUi.DIFF_INSERT][f].data=u.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var x in d[EditorUi.DIFF_UPDATE]){var y=d[EditorUi.DIFF_UPDATE][x];null!=y.name&&(y.name=this.anonymizeString(y.name));null!=y.cells&&(f=mxUtils.bind(this,function(u){var H=y.cells[u];if(null!=H){for(var J in H)null!=H[J].value&&(H[J].value="["+H[J].value.length+"]"),null!=H[J].xmlValue&&(H[J].xmlValue="["+H[J].xmlValue.length+"]"),null!=H[J].style&&(H[J].style= +"["+H[J].style.length+"]"),mxUtils.isEmptyObject(H[J])&&delete H[J];mxUtils.isEmptyObject(H)&&delete y.cells[u]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(y.cells)&&delete y.cells);mxUtils.isEmptyObject(y)&&delete d[EditorUi.DIFF_UPDATE][x]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,f){if(null!=d.attributes)for(var g=0;g<d.attributes.length;g++)"as"!=d.attributes[g].name&& d.setAttribute(d.attributes[g].name,this.anonymizeString(d.attributes[g].value,f));if(null!=d.childNodes)for(g=0;g<d.childNodes.length;g++)this.anonymizeAttributes(d.childNodes[g],f)};EditorUi.prototype.anonymizeNode=function(d,f){f=d.getElementsByTagName("mxCell");for(var g=0;g<f.length;g++)null!=f[g].getAttribute("value")&&f[g].setAttribute("value","["+f[g].getAttribute("value").length+"]"),null!=f[g].getAttribute("xmlValue")&&f[g].setAttribute("xmlValue","["+f[g].getAttribute("xmlValue").length+ "]"),null!=f[g].getAttribute("style")&&f[g].setAttribute("style","["+f[g].getAttribute("style").length+"]"),null!=f[g].parentNode&&"root"!=f[g].parentNode.nodeName&&null!=f[g].parentNode.parentNode&&(f[g].setAttribute("id",f[g].parentNode.getAttribute("id")),f[g].parentNode.parentNode.replaceChild(f[g],f[g].parentNode));return d};EditorUi.prototype.synchronizeCurrentFile=function(d){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!d&&f.invalidChecksum? -f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),d?f.reloadFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(d,f,g,x,z,u,H, -J,D,G,V){z=null!=z?z:!0;u=null!=u?u:!1;var U=this.editor.graph;if(f||!d&&null!=D&&/(\.svg)$/i.test(D.getTitle())){var Y=null!=U.themes&&"darkTheme"==U.defaultThemeName;G=!1;if(Y||null!=this.pages&&this.currentPage!=this.pages[0]){var O=U.getGlobalVariable;U=this.createTemporaryGraph(Y?U.getDefaultStylesheet():U.getStylesheet());U.setBackgroundImage=this.editor.graph.setBackgroundImage;U.background=this.editor.graph.background;var qa=this.pages[0];this.currentPage==qa?U.setBackgroundImage(this.editor.graph.backgroundImage): -null!=qa.viewState&&null!=qa.viewState&&U.setBackgroundImage(qa.viewState.backgroundImage);U.getGlobalVariable=function(oa){return"page"==oa?qa.getName():"pagenumber"==oa?1:O.apply(this,arguments)};document.body.appendChild(U.container);U.model.setRoot(qa.root)}}H=null!=H?H:this.getXmlFileData(z,u,G,V);D=null!=D?D:this.getCurrentFile();d=this.createFileData(H,U,D,window.location.href,d,f,g,x,z,J,G);U!=this.editor.graph&&U.container.parentNode.removeChild(U.container);return d};EditorUi.prototype.getHtml= -function(d,f,g,x,z,u){u=null!=u?u:!0;var H=null,J=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){H=u?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var D=f.view.scale;u=Math.floor(H.x/D-f.view.translate.x);D=Math.floor(H.y/D-f.view.translate.y);H=f.background;null==z&&(f=this.getBasenames().join(";"),0<f.length&&(J=EditorUi.drawHost+"/embed.js?s="+f));d.setAttribute("x0",u);d.setAttribute("y0",D)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize", -"0"),d.setAttribute("fit","0"),d.setAttribute("border","20"),d.setAttribute("links","1"),null!=x&&d.setAttribute("edit",x));null!=z&&(z=z.replace(/&/g,"&"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";x=Graph.compress(d);Graph.decompress(x)!=d&&(x=encodeURIComponent(d));return(null==z?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=z?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==z?null!=g? -"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=z?'<meta http-equiv="refresh" content="0;URL=\''+z+"'\"/>\n":"")+"</head>\n<body"+(null==z&&null!=H&&H!=mxConstants.NONE?' style="background-color:'+H+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+x+"</div>\n</div>\n"+(null==z?'<script type="text/javascript" src="'+J+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+ -z+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,f,g,x,z){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=z&&(z=z.replace(/&/g,"&"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(d),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage)); -return(null==z?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=z?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==z?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=z?'<meta http-equiv="refresh" content="0;URL=\''+z+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+ -mxUtils.htmlEntities(JSON.stringify(d))+'"></div>\n'+(null==z?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+z+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPage=null;var f=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement: +f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),d?f.reloadFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(d,f,g,x,y,u,H, +J,D,G,W){y=null!=y?y:!0;u=null!=u?u:!1;var T=this.editor.graph;if(f||!d&&null!=D&&/(\.svg)$/i.test(D.getTitle())){var Z=null!=T.themes&&"darkTheme"==T.defaultThemeName;G=!1;if(Z||null!=this.pages&&this.currentPage!=this.pages[0]){var N=T.getGlobalVariable;T=this.createTemporaryGraph(Z?T.getDefaultStylesheet():T.getStylesheet());T.setBackgroundImage=this.editor.graph.setBackgroundImage;T.background=this.editor.graph.background;var qa=this.pages[0];this.currentPage==qa?T.setBackgroundImage(this.editor.graph.backgroundImage): +null!=qa.viewState&&null!=qa.viewState&&T.setBackgroundImage(qa.viewState.backgroundImage);T.getGlobalVariable=function(oa){return"page"==oa?qa.getName():"pagenumber"==oa?1:N.apply(this,arguments)};document.body.appendChild(T.container);T.model.setRoot(qa.root)}}H=null!=H?H:this.getXmlFileData(y,u,G,W);D=null!=D?D:this.getCurrentFile();d=this.createFileData(H,T,D,window.location.href,d,f,g,x,y,J,G);T!=this.editor.graph&&T.container.parentNode.removeChild(T.container);return d};EditorUi.prototype.getHtml= +function(d,f,g,x,y,u){u=null!=u?u:!0;var H=null,J=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){H=u?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var D=f.view.scale;u=Math.floor(H.x/D-f.view.translate.x);D=Math.floor(H.y/D-f.view.translate.y);H=f.background;null==y&&(f=this.getBasenames().join(";"),0<f.length&&(J=EditorUi.drawHost+"/embed.js?s="+f));d.setAttribute("x0",u);d.setAttribute("y0",D)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize", +"0"),d.setAttribute("fit","0"),d.setAttribute("border","20"),d.setAttribute("links","1"),null!=x&&d.setAttribute("edit",x));null!=y&&(y=y.replace(/&/g,"&"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";x=Graph.compress(d);Graph.decompress(x)!=d&&(x=encodeURIComponent(d));return(null==y?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=y?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==y?null!=g? +"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=y?'<meta http-equiv="refresh" content="0;URL=\''+y+"'\"/>\n":"")+"</head>\n<body"+(null==y&&null!=H&&H!=mxConstants.NONE?' style="background-color:'+H+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+x+"</div>\n</div>\n"+(null==y?'<script type="text/javascript" src="'+J+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+ +y+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,f,g,x,y){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=y&&(y=y.replace(/&/g,"&"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(d),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage)); +return(null==y?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=y?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==y?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=y?'<meta http-equiv="refresh" content="0;URL=\''+y+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+ +mxUtils.htmlEntities(JSON.stringify(d))+'"></div>\n'+(null==y?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+y+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPage=null;var f=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement: null,g=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(g)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[d],"node",[f],"cause",[g]),Error(mxResources.get("notADiagramFile")+" ("+g+")");d=null!=f?this.editor.extractGraphModel(f,!0):null;null!=d&&(f=d);if(null!=f&&"mxfile"==f.nodeName&&(d=f.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){g=null;this.fileNode=f;this.pages=[];for(var x=0;x<d.length;x++)null== d[x].getAttribute("id")&&d[x].setAttribute("id",x),f=new DiagramPage(d[x]),null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[x+1])),this.pages.push(f),null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]&&(g=f);this.currentPage=null!=g?g:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")), -this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var z=urlParams["layer-ids"].split(" ");f={};for(x=0;x<z.length;x++)f[z[x]]=!0;var u=this.editor.graph.getModel(),H=u.getChildren(u.root);for(x=0;x<H.length;x++){var J=H[x];u.setVisible(J,f[J.id]||!1)}}catch(D){}};EditorUi.prototype.getBaseFilename=function(d){var f= +this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var y=urlParams["layer-ids"].split(" ");f={};for(x=0;x<y.length;x++)f[y[x]]=!0;var u=this.editor.graph.getModel(),H=u.getChildren(u.root);for(x=0;x<H.length;x++){var J=H[x];u.setVisible(J,f[J.id]||!1)}}catch(D){}};EditorUi.prototype.getBaseFilename=function(d){var f= this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile= -function(d,f,g,x,z,u,H,J,D,G,V,U){try{x=null!=x?x:this.editor.graph.isSelectionEmpty();var Y=this.getBaseFilename("remoteSvg"==d?!1:!z),O=Y+("xml"==d||"pdf"==d&&V?".drawio":"")+"."+d;if("xml"==d){var qa=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,x,z,null,null,null,f);this.saveData(O,d,qa,"text/xml")}else if("html"==d)qa=this.getHtml2(this.getFileData(!0),this.editor.graph,Y),this.saveData(O,d,qa,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"== -d)O=Y+".png";else if("jpeg"==d)O=Y+".jpg";else if("remoteSvg"==d){O=Y+".svg";d="svg";var oa=parseInt(D);"string"===typeof J&&0<J.indexOf("%")&&(J=parseInt(J)/100);if(0<oa){var aa=this.editor.graph,da=aa.getGraphBounds();var ia=Math.ceil(da.width*J/aa.view.scale+2*oa);var L=Math.ceil(da.height*J/aa.view.scale+2*oa)}}this.saveRequest(O,d,mxUtils.bind(this,function(ka,q){try{var F=this.editor.graph.pageVisible;0==u&&(this.editor.graph.pageVisible=u);var R=this.createDownloadRequest(ka,d,x,q,H,z,J,D, -G,V,U,ia,L);this.editor.graph.pageVisible=F;return R}catch(W){this.handleError(W)}}))}else{var Z=null,P=mxUtils.bind(this,function(ka){ka.length<=MAX_REQUEST_SIZE?this.saveData(O,"svg",ka,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(Z)}))});if("svg"==d){var ca=this.editor.graph.background;if(H||ca==mxConstants.NONE)ca=null;var ja=this.editor.graph.getSvg(ca,null,null,null,null,x);g&&this.editor.graph.addSvgShadow(ja); -this.editor.convertImages(ja,mxUtils.bind(this,mxUtils.bind(this,function(ka){this.spinner.stop();P(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(ka))})))}else O=Y+".svg",Z=this.getFileData(!1,!0,null,mxUtils.bind(this,function(ka){this.spinner.stop();P(ka)}),x)}}catch(ka){this.handleError(ka)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,x,z,u,H,J,D,G,V,U,Y){var O=this.editor.graph,qa=O.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==u?!1:"xmlpng"!=f,null, -null,null,!1,"pdf"==f);var oa="",aa="";if(qa.width*qa.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};G=G?"1":"0";"pdf"==f&&(null!=V?aa="&from="+V.from+"&to="+V.to:0==u&&(aa="&allPages=1"));"xmlpng"==f&&(G="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(u=0;u<this.pages.length;u++)if(this.pages[u]==this.currentPage){oa="&from="+u;break}u=O.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!z?z||null!=u&&u!=mxConstants.NONE|| -(u="#ffffff"):u=mxConstants.NONE;z={globalVars:O.getExportVariables()};D&&(z.grid={size:O.gridSize,steps:O.view.gridSteps,color:O.view.gridColor});Graph.translateDiagram&&(z.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+oa+aa+"&bg="+(null!=u?u:mxConstants.NONE)+"&base64="+x+"&embedXml="+G+"&xml="+encodeURIComponent(g)+(null!=d?"&filename="+encodeURIComponent(d):"")+"&extras="+encodeURIComponent(JSON.stringify(z))+(null!=H?"&scale="+H:"")+(null!=J?"&border="+ -J:"")+(U&&isFinite(U)?"&w="+U:"")+(Y&&isFinite(Y)?"&h="+Y:""))};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,f,g){var x=window.location.hash,z=mxUtils.bind(this,function(H){var J=null!=d.data?d.data:"";null!=H&&0<H.length&&(0<J.length&&(J+="\n"),J+=H);H=new LocalFile(this,"csv"!=d.format&&0<J.length?J:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);H.getHash=function(){return x};this.fileLoaded(H); -"csv"==d.format&&this.importCsv(J,mxUtils.bind(this,function(Y){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var D=null!=d.interval?parseInt(d.interval):6E4,G=null,V=mxUtils.bind(this,function(){var Y=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(O){Y===this.currentPage&&(200<=O.getStatus()&&300>=O.getStatus()?(this.updateDiagram(O.getText()),U()): -this.handleError({message:mxResources.get("error")+" "+O.getStatus()}))}),mxUtils.bind(this,function(O){this.handleError(O)}))}),U=mxUtils.bind(this,function(){window.clearTimeout(G);G=window.setTimeout(V,D)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){U();V()}));U();V()}null!=f&&f()});if(null!=d.url&&0<d.url.length){var u=this.editor.getProxiedUrl(d.url);this.editor.loadUrl(u,mxUtils.bind(this,function(H){z(H)}),mxUtils.bind(this,function(H){null!=g&&g(H)}))}else z("")}; -EditorUi.prototype.updateDiagram=function(d){function f(L){var Z=new mxCellOverlay(L.image||z.warningImage,L.tooltip,L.align,L.valign,L.offset);Z.addListener(mxEvent.CLICK,function(P,ca){x.alert(L.tooltip)});return Z}var g=null,x=this;if(null!=d&&0<d.length&&(g=mxUtils.parseXml(d),d=null!=g?g.documentElement:null,null!=d&&"updates"==d.nodeName)){var z=this.editor.graph,u=z.getModel();u.beginUpdate();var H=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var J=u.getCell(d.getAttribute("id")); -if(null!=J){try{var D=d.getAttribute("value");if(null!=D){var G=mxUtils.parseXml(D).documentElement;if(null!=G)if("1"==G.getAttribute("replace-value"))u.setValue(J,G);else for(var V=G.attributes,U=0;U<V.length;U++)z.setAttributeForCell(J,V[U].nodeName,0<V[U].nodeValue.length?V[U].nodeValue:null)}}catch(L){null!=window.console&&console.log("Error in value for "+J.id+": "+L)}try{var Y=d.getAttribute("style");null!=Y&&z.model.setStyle(J,Y)}catch(L){null!=window.console&&console.log("Error in style for "+ -J.id+": "+L)}try{var O=d.getAttribute("icon");if(null!=O){var qa=0<O.length?JSON.parse(O):null;null!=qa&&qa.append||z.removeCellOverlays(J);null!=qa&&z.addCellOverlay(J,f(qa))}}catch(L){null!=window.console&&console.log("Error in icon for "+J.id+": "+L)}try{var oa=d.getAttribute("geometry");if(null!=oa){oa=JSON.parse(oa);var aa=z.getCellGeometry(J);if(null!=aa){aa=aa.clone();for(key in oa){var da=parseFloat(oa[key]);"dx"==key?aa.x+=da:"dy"==key?aa.y+=da:"dw"==key?aa.width+=da:"dh"==key?aa.height+= -da:aa[key]=parseFloat(oa[key])}z.model.setGeometry(J,aa)}}}catch(L){null!=window.console&&console.log("Error in icon for "+J.id+": "+L)}}}else if("model"==d.nodeName){for(var ia=d.firstChild;null!=ia&&ia.nodeType!=mxConstants.NODETYPE_ELEMENT;)ia=ia.nextSibling;null!=ia&&(new mxCodec(d.firstChild)).decode(ia,u)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(z.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))z.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")|| -0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(H=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{u.endUpdate()}null!=H&&this.chromelessResize&&this.chromelessResize(!0,H)}return g};EditorUi.prototype.getCopyFilename=function(d,f){var g=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var x=g.lastIndexOf(".");0<=x&&(d=g.substring(x),g=g.substring(0,x));if(f){f=g;var z=new Date;g=z.getFullYear();x=z.getMonth()+1;var u= -z.getDate(),H=z.getHours(),J=z.getMinutes();z=z.getSeconds();g=f+(" "+(g+"-"+x+"-"+u+"-"+H+"-"+J+"-"+z))}return g=mxResources.get("copyOf",[g])+d};EditorUi.prototype.fileLoaded=function(d,f){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var x=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var z=mxUtils.bind(this, +function(d,f,g,x,y,u,H,J,D,G,W,T){try{x=null!=x?x:this.editor.graph.isSelectionEmpty();var Z=this.getBaseFilename("remoteSvg"==d?!1:!y),N=Z+("xml"==d||"pdf"==d&&W?".drawio":"")+"."+d;if("xml"==d){var qa=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,x,y,null,null,null,f);this.saveData(N,d,qa,"text/xml")}else if("html"==d)qa=this.getHtml2(this.getFileData(!0),this.editor.graph,Z),this.saveData(N,d,qa,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"== +d)N=Z+".png";else if("jpeg"==d)N=Z+".jpg";else if("remoteSvg"==d){N=Z+".svg";d="svg";var oa=parseInt(D);"string"===typeof J&&0<J.indexOf("%")&&(J=parseInt(J)/100);if(0<oa){var S=this.editor.graph,fa=S.getGraphBounds();var ia=Math.ceil(fa.width*J/S.view.scale+2*oa);var M=Math.ceil(fa.height*J/S.view.scale+2*oa)}}this.saveRequest(N,d,mxUtils.bind(this,function(ka,q){try{var E=this.editor.graph.pageVisible;0==u&&(this.editor.graph.pageVisible=u);var Q=this.createDownloadRequest(ka,d,x,q,H,y,J,D,G,W, +T,ia,M);this.editor.graph.pageVisible=E;return Q}catch(Y){this.handleError(Y)}}))}else{var aa=null,X=mxUtils.bind(this,function(ka){ka.length<=MAX_REQUEST_SIZE?this.saveData(N,"svg",ka,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(aa)}))});if("svg"==d){var ja=this.editor.graph.background;if(H||ja==mxConstants.NONE)ja=null;var ca=this.editor.graph.getSvg(ja,null,null,null,null,x);g&&this.editor.graph.addSvgShadow(ca); +this.editor.convertImages(ca,mxUtils.bind(this,mxUtils.bind(this,function(ka){this.spinner.stop();X(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(ka))})))}else N=Z+".svg",aa=this.getFileData(!1,!0,null,mxUtils.bind(this,function(ka){this.spinner.stop();X(ka)}),x)}}catch(ka){this.handleError(ka)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,x,y,u,H,J,D,G,W,T,Z){var N=this.editor.graph,qa=N.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==u?!1:"xmlpng"!=f,null, +null,null,!1,"pdf"==f);var oa="",S="";if(qa.width*qa.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};G=G?"1":"0";"pdf"==f&&(null!=W?S="&from="+W.from+"&to="+W.to:0==u&&(S="&allPages=1"));"xmlpng"==f&&(G="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(u=0;u<this.pages.length;u++)if(this.pages[u]==this.currentPage){oa="&from="+u;break}u=N.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!y?y||null!=u&&u!=mxConstants.NONE||(u= +"#ffffff"):u=mxConstants.NONE;y={globalVars:N.getExportVariables()};D&&(y.grid={size:N.gridSize,steps:N.view.gridSteps,color:N.view.gridColor});Graph.translateDiagram&&(y.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+oa+S+"&bg="+(null!=u?u:mxConstants.NONE)+"&base64="+x+"&embedXml="+G+"&xml="+encodeURIComponent(g)+(null!=d?"&filename="+encodeURIComponent(d):"")+"&extras="+encodeURIComponent(JSON.stringify(y))+(null!=H?"&scale="+H:"")+(null!=J?"&border="+J:"")+ +(T&&isFinite(T)?"&w="+T:"")+(Z&&isFinite(Z)?"&h="+Z:""))};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,f,g){var x=window.location.hash,y=mxUtils.bind(this,function(H){var J=null!=d.data?d.data:"";null!=H&&0<H.length&&(0<J.length&&(J+="\n"),J+=H);H=new LocalFile(this,"csv"!=d.format&&0<J.length?J:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);H.getHash=function(){return x};this.fileLoaded(H); +"csv"==d.format&&this.importCsv(J,mxUtils.bind(this,function(Z){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var D=null!=d.interval?parseInt(d.interval):6E4,G=null,W=mxUtils.bind(this,function(){var Z=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(N){Z===this.currentPage&&(200<=N.getStatus()&&300>=N.getStatus()?(this.updateDiagram(N.getText()),T()): +this.handleError({message:mxResources.get("error")+" "+N.getStatus()}))}),mxUtils.bind(this,function(N){this.handleError(N)}))}),T=mxUtils.bind(this,function(){window.clearTimeout(G);G=window.setTimeout(W,D)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){T();W()}));T();W()}null!=f&&f()});if(null!=d.url&&0<d.url.length){var u=this.editor.getProxiedUrl(d.url);this.editor.loadUrl(u,mxUtils.bind(this,function(H){y(H)}),mxUtils.bind(this,function(H){null!=g&&g(H)}))}else y("")}; +EditorUi.prototype.updateDiagram=function(d){function f(M){var aa=new mxCellOverlay(M.image||y.warningImage,M.tooltip,M.align,M.valign,M.offset);aa.addListener(mxEvent.CLICK,function(X,ja){x.alert(M.tooltip)});return aa}var g=null,x=this;if(null!=d&&0<d.length&&(g=mxUtils.parseXml(d),d=null!=g?g.documentElement:null,null!=d&&"updates"==d.nodeName)){var y=this.editor.graph,u=y.getModel();u.beginUpdate();var H=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var J=u.getCell(d.getAttribute("id")); +if(null!=J){try{var D=d.getAttribute("value");if(null!=D){var G=mxUtils.parseXml(D).documentElement;if(null!=G)if("1"==G.getAttribute("replace-value"))u.setValue(J,G);else for(var W=G.attributes,T=0;T<W.length;T++)y.setAttributeForCell(J,W[T].nodeName,0<W[T].nodeValue.length?W[T].nodeValue:null)}}catch(M){null!=window.console&&console.log("Error in value for "+J.id+": "+M)}try{var Z=d.getAttribute("style");null!=Z&&y.model.setStyle(J,Z)}catch(M){null!=window.console&&console.log("Error in style for "+ +J.id+": "+M)}try{var N=d.getAttribute("icon");if(null!=N){var qa=0<N.length?JSON.parse(N):null;null!=qa&&qa.append||y.removeCellOverlays(J);null!=qa&&y.addCellOverlay(J,f(qa))}}catch(M){null!=window.console&&console.log("Error in icon for "+J.id+": "+M)}try{var oa=d.getAttribute("geometry");if(null!=oa){oa=JSON.parse(oa);var S=y.getCellGeometry(J);if(null!=S){S=S.clone();for(key in oa){var fa=parseFloat(oa[key]);"dx"==key?S.x+=fa:"dy"==key?S.y+=fa:"dw"==key?S.width+=fa:"dh"==key?S.height+=fa:S[key]= +parseFloat(oa[key])}y.model.setGeometry(J,S)}}}catch(M){null!=window.console&&console.log("Error in icon for "+J.id+": "+M)}}}else if("model"==d.nodeName){for(var ia=d.firstChild;null!=ia&&ia.nodeType!=mxConstants.NODETYPE_ELEMENT;)ia=ia.nextSibling;null!=ia&&(new mxCodec(d.firstChild)).decode(ia,u)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(y.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))y.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")|| +0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(H=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{u.endUpdate()}null!=H&&this.chromelessResize&&this.chromelessResize(!0,H)}return g};EditorUi.prototype.getCopyFilename=function(d,f){var g=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var x=g.lastIndexOf(".");0<=x&&(d=g.substring(x),g=g.substring(0,x));if(f){f=g;var y=new Date;g=y.getFullYear();x=y.getMonth()+1;var u= +y.getDate(),H=y.getHours(),J=y.getMinutes();y=y.getSeconds();g=f+(" "+(g+"-"+x+"-"+u+"-"+H+"-"+J+"-"+y))}return g=mxResources.get("copyOf",[g])+d};EditorUi.prototype.fileLoaded=function(d,f){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var x=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var y=mxUtils.bind(this, function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=g&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!f&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();f||this.showSplash()});if(null!=d)try{mxClient.IS_SF&& "min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(d);d.addListener("descriptorChanged",this.descriptorChangedListener);d.addListener("contentChanged",this.descriptorChangedListener);d.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(d.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();d.isEditable()?d.isModified()?(d.addUnsavedStatus(),null!=d.backupPatch&& d.patch([d.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded")); x=!0;if(!this.isOffline()&&null!=d.getMode()){var u="1"==urlParams.sketch?"sketch":uiTheme;if(null==u)u="default";else if("sketch"==u||"min"==u)u+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:d.getMode().toUpperCase()+"-OPEN-FILE-"+d.getHash(),action:"size_"+d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+u})}EditorUi.debug("File.opened",[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode== d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=d.getMode())try{this.addRecent({id:d.getHash(),title:d.getTitle(),mode:d.getMode()})}catch(H){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(H){}}catch(H){this.fileLoadedError=H;if(null!=d)try{d.close()}catch(J){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+H.message,label:"stack_"+H.stack})}catch(J){}d=mxUtils.bind(this, -function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||z():z()});f?d():this.handleError(H,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else z();return x};EditorUi.prototype.getHashValueForPages=function(d,f){var g=0,x=new mxGraphModel,z=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var u=0;u<d.length;u++){this.updatePageRoot(d[u]);var H= -d[u].node.cloneNode(!1);H.removeAttribute("name");x.root=d[u].root;var J=z.encode(x);this.editor.graph.saveViewState(d[u].viewState,J,!0);J.removeAttribute("pageWidth");J.removeAttribute("pageHeight");H.appendChild(J);null!=f&&(f.eltCount+=H.getElementsByTagName("*").length,f.nodeCount+=H.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(H,function(D,G,V,U){return!U||"mxGeometry"!=D.nodeName&&"mxPoint"!=D.nodeName||"x"!=G&&"y"!=G&&"width"!=G&&"height"!=G?U&&"mxCell"==D.nodeName&&"previous"== -G?null:V:Math.round(V)},f)<<0}return g};EditorUi.prototype.hashValue=function(d,f,g){var x=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(x^=this.hashValue(d.nodeName,f,g));if(null!=d.attributes){null!=g&&(g.attrCount+=d.attributes.length);for(var z=0;z<d.attributes.length;z++){var u=d.attributes[z].name,H=null!=f?f(d,u,d.attributes[z].value,!0):d.attributes[z].value;null!=H&&(x^=this.hashValue(u, -f,g)+this.hashValue(H,f,g))}}if(null!=d.childNodes)for(z=0;z<d.childNodes.length;z++)x=(x<<5)-x+this.hashValue(d.childNodes[z],f,g)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);f=0;null!=g&&(g.byteCount+=d.length);for(z=0;z<d.length;z++)f=(f<<5)-f+d.charCodeAt(z)<<0;x^=f}return x};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,f,g,x,z,u,H){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage|| +function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||y():y()});f?d():this.handleError(H,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else y();return x};EditorUi.prototype.getHashValueForPages=function(d,f){var g=0,x=new mxGraphModel,y=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var u=0;u<d.length;u++){this.updatePageRoot(d[u]);var H= +d[u].node.cloneNode(!1);H.removeAttribute("name");x.root=d[u].root;var J=y.encode(x);this.editor.graph.saveViewState(d[u].viewState,J,!0);J.removeAttribute("pageWidth");J.removeAttribute("pageHeight");H.appendChild(J);null!=f&&(f.eltCount+=H.getElementsByTagName("*").length,f.nodeCount+=H.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(H,function(D,G,W,T){return!T||"mxGeometry"!=D.nodeName&&"mxPoint"!=D.nodeName||"x"!=G&&"y"!=G&&"width"!=G&&"height"!=G?T&&"mxCell"==D.nodeName&&"previous"== +G?null:W:Math.round(W)},f)<<0}return g};EditorUi.prototype.hashValue=function(d,f,g){var x=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(x^=this.hashValue(d.nodeName,f,g));if(null!=d.attributes){null!=g&&(g.attrCount+=d.attributes.length);for(var y=0;y<d.attributes.length;y++){var u=d.attributes[y].name,H=null!=f?f(d,u,d.attributes[y].value,!0):d.attributes[y].value;null!=H&&(x^=this.hashValue(u, +f,g)+this.hashValue(H,f,g))}}if(null!=d.childNodes)for(y=0;y<d.childNodes.length;y++)x=(x<<5)-x+this.hashValue(d.childNodes[y],f,g)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);f=0;null!=g&&(g.byteCount+=d.length);for(y=0;y<d.length;y++)f=(f<<5)-f+d.charCodeAt(y)<<0;x^=f}return x};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,f,g,x,y,u,H){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage|| mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(d){null==d&&(d=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,d,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(d){var f=mxUtils.createXmlDocument(),g=f.createElement("mxlibrary");mxUtils.setTextContent(g,JSON.stringify(d));f.appendChild(g); return mxUtils.getXml(f)};EditorUi.prototype.closeLibrary=function(d){null!=d&&(this.removeLibrarySidebar(d.getHash()),d.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(d.getHash()),".scratchpad"==d.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(d){var f=this.sidebar.palettes[d];if(null!=f){for(var g=0;g<f.length;g++)f[g].parentNode.removeChild(f[g]);delete this.sidebar.palettes[d]}};EditorUi.prototype.repositionLibrary=function(d){var f=this.sidebar.container; if(null==d){var g=this.sidebar.palettes["L.scratchpad"];null==g&&(g=this.sidebar.palettes.search);null!=g&&(d=g[g.length-1].nextSibling)}d=null!=d?d:f.firstChild.nextSibling.nextSibling;g=f.lastChild;var x=g.previousSibling;f.insertBefore(g,d);f.insertBefore(x,g)};EditorUi.prototype.loadLibrary=function(d,f){var g=mxUtils.parseXml(d.getData());if("mxlibrary"==g.documentElement.nodeName){var x=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(d,x,g.documentElement.getAttribute("title"), -f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.libraryLoaded=function(d,f,g,x){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var z=this.sidebar.palettes[d.getHash()];z=null!=z?z[z.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var u=null,H=mxUtils.bind(this,function(ia,L){0==ia.length&&d.isEditable()? -(null==u&&(u=document.createElement("div"),u.className="geDropTarget",mxUtils.write(u,mxResources.get("dragElementsHere"))),L.appendChild(u)):this.addLibraryEntries(ia,L)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==g&&(g=d.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var J=this.sidebar.addPalette(d.getHash(),g,null!=x?x:!0,mxUtils.bind(this,function(ia){H(f,ia)}));this.repositionLibrary(z);var D=J.parentNode.previousSibling;x=D.getAttribute("title"); -null!=x&&0<x.length&&".scratchpad"!=d.title&&D.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+x);var G=document.createElement("div");G.style.position="absolute";G.style.right="0px";G.style.top="0px";G.style.padding="8px";G.style.backgroundColor="inherit";D.style.position="relative";var V=document.createElement("img");V.className="geAdaptiveAsset";V.setAttribute("src",Editor.crossImage);V.setAttribute("title",mxResources.get("close"));V.setAttribute("valign","absmiddle");V.setAttribute("border", -"0");V.style.position="relative";V.style.top="2px";V.style.width="14px";V.style.cursor="pointer";V.style.margin="0 3px";var U=null;if(".scratchpad"!=d.title||this.closableScratchpad)G.appendChild(V),mxEvent.addListener(V,"click",mxUtils.bind(this,function(ia){if(!mxEvent.isConsumed(ia)){var L=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=U?this.confirm(mxResources.get("allChangesLost"),null,L,mxResources.get("cancel"),mxResources.get("discardChanges")):L();mxEvent.consume(ia)}}));if(d.isEditable()){var Y= -this.editor.graph,O=null,qa=mxUtils.bind(this,function(ia){this.showLibraryDialog(d.getTitle(),J,f,d,d.getMode());mxEvent.consume(ia)}),oa=mxUtils.bind(this,function(ia){d.setModified(!0);d.isAutosave()?(null!=O&&null!=O.parentNode&&O.parentNode.removeChild(O),O=V.cloneNode(!1),O.setAttribute("src",Editor.spinImage),O.setAttribute("title",mxResources.get("saving")),O.style.cursor="default",O.style.marginRight="2px",O.style.marginTop="-2px",G.insertBefore(O,G.firstChild),D.style.paddingRight=18*G.childNodes.length+ -"px",this.saveLibrary(d.getTitle(),f,d,d.getMode(),!0,!0,function(){null!=O&&null!=O.parentNode&&(O.parentNode.removeChild(O),D.style.paddingRight=18*G.childNodes.length+"px")})):null==U&&(U=V.cloneNode(!1),U.setAttribute("src",Editor.saveImage),U.setAttribute("title",mxResources.get("save")),G.insertBefore(U,G.firstChild),mxEvent.addListener(U,"click",mxUtils.bind(this,function(L){this.saveLibrary(d.getTitle(),f,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==U||d.isModified()||(D.style.paddingRight= -18*G.childNodes.length+"px",U.parentNode.removeChild(U),U=null)});mxEvent.consume(L)})),D.style.paddingRight=18*G.childNodes.length+"px")}),aa=mxUtils.bind(this,function(ia,L,Z,P){ia=Y.cloneCells(mxUtils.sortCells(Y.model.getTopmostCells(ia)));for(var ca=0;ca<ia.length;ca++){var ja=Y.getCellGeometry(ia[ca]);null!=ja&&ja.translate(-L.x,-L.y)}J.appendChild(this.sidebar.createVertexTemplateFromCells(ia,L.width,L.height,P||"",!0,null,!1));ia={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(ia))), -w:L.width,h:L.height};null!=P&&(ia.title=P);f.push(ia);oa(Z);null!=u&&null!=u.parentNode&&0<f.length&&(u.parentNode.removeChild(u),u=null)}),da=mxUtils.bind(this,function(ia){if(Y.isSelectionEmpty())Y.getRubberband().isActive()?(Y.getRubberband().execute(ia),Y.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var L=Y.getSelectionCells(),Z=Y.view.getBounds(L),P=Y.view.scale;Z.x/=P;Z.y/=P;Z.width/=P;Z.height/=P;Z.x-=Y.view.translate.x; -Z.y-=Y.view.translate.y;aa(L,Z)}mxEvent.consume(ia)});mxEvent.addGestureListeners(J,function(){},mxUtils.bind(this,function(ia){Y.isMouseDown&&null!=Y.panningManager&&null!=Y.graphHandler.first&&(Y.graphHandler.suspend(),null!=Y.graphHandler.hint&&(Y.graphHandler.hint.style.visibility="hidden"),J.style.backgroundColor="#f1f3f4",J.style.cursor="copy",Y.panningManager.stop(),Y.autoScroll=!1,mxEvent.consume(ia))}),mxUtils.bind(this,function(ia){Y.isMouseDown&&null!=Y.panningManager&&null!=Y.graphHandler&& -(J.style.backgroundColor="",J.style.cursor="default",this.sidebar.showTooltips=!0,Y.panningManager.stop(),Y.graphHandler.reset(),Y.isMouseDown=!1,Y.autoScroll=!0,da(ia),mxEvent.consume(ia))}));mxEvent.addListener(J,"mouseleave",mxUtils.bind(this,function(ia){Y.isMouseDown&&null!=Y.graphHandler.first&&(Y.graphHandler.resume(),null!=Y.graphHandler.hint&&(Y.graphHandler.hint.style.visibility="visible"),J.style.backgroundColor="",J.style.cursor="",Y.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(J, -"dragover",mxUtils.bind(this,function(ia){J.style.backgroundColor="#f1f3f4";ia.dataTransfer.dropEffect="copy";J.style.cursor="copy";this.sidebar.hideTooltip();ia.stopPropagation();ia.preventDefault()})),mxEvent.addListener(J,"drop",mxUtils.bind(this,function(ia){J.style.cursor="";J.style.backgroundColor="";0<ia.dataTransfer.files.length&&this.importFiles(ia.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(L,Z,P,ca,ja,ka,q,F,R){if(null!=L&&"image/"==Z.substring(0,6))L="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+ -this.convertDataUri(L),L=[new mxCell("",new mxGeometry(0,0,ja,ka),L)],L[0].vertex=!0,aa(L,new mxRectangle(0,0,ja,ka),ia,mxEvent.isAltDown(ia)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),null!=u&&null!=u.parentNode&&0<f.length&&(u.parentNode.removeChild(u),u=null);else{var W=!1,T=mxUtils.bind(this,function(ba,ha){null!=ba&&"application/pdf"==ha&&(ha=Editor.extractGraphModelFromPdf(ba),null!=ha&&0<ha.length&&(ba=ha));if(null!=ba)if(ba=mxUtils.parseXml(ba),"mxlibrary"==ba.documentElement.nodeName)try{var ra= -JSON.parse(mxUtils.getTextContent(ba.documentElement));H(ra,J);f=f.concat(ra);oa(ia);this.spinner.stop();W=!0}catch(za){}else if("mxfile"==ba.documentElement.nodeName)try{var ta=ba.documentElement.getElementsByTagName("diagram");for(ra=0;ra<ta.length;ra++){var ma=this.stringToCells(Editor.getDiagramNodeXml(ta[ra])),pa=this.editor.graph.getBoundingBoxFromGeometry(ma);aa(ma,new mxRectangle(0,0,pa.width,pa.height),ia)}W=!0}catch(za){null!=window.console&&console.log("error in drop handler:",za)}W||(this.spinner.stop(), -this.handleError({message:mxResources.get("errorLoadingFile")}));null!=u&&null!=u.parentNode&&0<f.length&&(u.parentNode.removeChild(u),u=null)});null!=R&&null!=q&&(/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q))?this.importVisio(R,function(ba){T(ba,"text/xml")},null,q):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(L,q)&&null!=R?this.isExternalDataComms()?this.parseFile(R,mxUtils.bind(this,function(ba){4==ba.readyState&&(this.spinner.stop(),200<=ba.status&&299>=ba.status?T(ba.responseText, -"text/xml"):this.handleError({message:mxResources.get(413==ba.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):T(L,Z)}}));ia.stopPropagation();ia.preventDefault()})),mxEvent.addListener(J,"dragleave",function(ia){J.style.cursor="";J.style.backgroundColor="";ia.stopPropagation();ia.preventDefault()}));V=V.cloneNode(!1);V.setAttribute("src",Editor.editImage);V.setAttribute("title", -mxResources.get("edit"));G.insertBefore(V,G.firstChild);mxEvent.addListener(V,"click",qa);mxEvent.addListener(J,"dblclick",function(ia){mxEvent.getSource(ia)==J&&qa(ia)});x=V.cloneNode(!1);x.setAttribute("src",Editor.plusImage);x.setAttribute("title",mxResources.get("add"));G.insertBefore(x,G.firstChild);mxEvent.addListener(x,"click",da);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(x=document.createElement("span"),x.setAttribute("title",mxResources.get("help")),x.style.cssText= -"color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(x,"?"),mxEvent.addGestureListeners(x,mxUtils.bind(this,function(ia){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(ia)})),G.insertBefore(x,G.firstChild))}D.appendChild(G);D.style.paddingRight=18*G.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,f){for(var g=0;g<d.length;g++){var x=d[g],z=x.data;if(null!=z){z=this.convertDataUri(z);var u="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;"; -"fixed"==x.aspect&&(u+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(u+"image="+z,x.w,x.h,"",x.title||"",!1,null,!0))}else null!=x.xml&&(z=this.stringToCells(Graph.decompress(x.xml)),0<z.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(z,x.w,x.h,x.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(d){return null!=d?d[mxLanguage]||d.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight= -64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="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):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor= -Editor.darkColor,Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.shapeBackgroundColor=Editor.darkColor,Graph.prototype.shapeForegroundColor=Editor.lightColor,Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor=Editor.darkColor,mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR= -"#00ff00");Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];"1"==urlParams.sketch&&("undefined"!==typeof Menus&&(Menus.prototype.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts)),Graph.prototype.defaultVertexStyle={hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none", -rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d, -f,g,x,z,u,H){d=new ImageDialog(this,d,f,g,x,z,u,H);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,f){d=null!=d?d:mxUtils.bind(this,function(g,x){x||(g=new ChangePageSetup(this,null,g),g.ignoreColor=!0,this.editor.graph.model.execute(g))});d=new BackgroundImageDialog(this,d,f);this.showDialog(d.container,400,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,f,g,x,z){d=new LibraryDialog(this, -d,f,g,x,z);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(u){u&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var f=k.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&f.refresh()}));return f};EditorUi.prototype.createSidebarFooterContainer=function(){var d=this.createDiv("geSidebarContainer geSidebarFooter"); -d.style.position="absolute";d.style.overflow="hidden";var f=document.createElement("a");f.className="geTitle";f.style.color="#DF6C0C";f.style.fontWeight="bold";f.style.height="100%";f.style.paddingTop="9px";f.innerHTML="<span>+</span>";var g=f.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(f,mxResources.get("moreShapes")+"...");mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(x){x.preventDefault()}));mxEvent.addListener(f, -"click",mxUtils.bind(this,function(x){this.actions.get("shapes").funct();mxEvent.consume(x)}));d.appendChild(f);return d};EditorUi.prototype.handleError=function(d,f,g,x,z,u,H){var J=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},D=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{H?null!=window.console&&console.error("EditorUi.handleError:",d):EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message, -d.filename,d.lineNumber,d.columnNumber,d,"INFO")}catch(O){}if(null!=D||null!=f){H=mxUtils.htmlEntities(mxResources.get("unknownError"));var G=mxResources.get("ok"),V=null;f=null!=f?f:mxResources.get("error");if(null!=D){null!=D.retry&&(G=mxResources.get("cancel"),V=function(){J();D.retry()});if(404==D.code||404==D.status||403==D.code){H=403==D.code?null!=D.message?mxUtils.htmlEntities(D.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=z?z:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+ -(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var U=null!=z?null:null!=u?u:window.location.hash;if(null!=U&&("#G"==U.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==U.substring(0,45))&&(null!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&&"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.error.data[0].reason)||404==D.code||404==D.status)){U="#U"==U.substring(0, -2)?U.substring(45,U.lastIndexOf("%26ex")):U.substring(2);this.showError(f,H,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+U);this.handleError(d,f,g,x,z)}),V,mxResources.get("changeUser"),mxUtils.bind(this,function(){function O(){da.innerText="";for(var ia=0;ia<qa.length;ia++){var L=document.createElement("option");mxUtils.write(L,qa[ia].displayName);L.value=ia;da.appendChild(L);L=document.createElement("option");L.innerHTML= -" ";mxUtils.write(L,"<"+qa[ia].email+">");L.setAttribute("disabled","disabled");da.appendChild(L)}L=document.createElement("option");mxUtils.write(L,mxResources.get("addAccount"));L.value=qa.length;da.appendChild(L)}var qa=this.drive.getUsersList(),oa=document.createElement("div"),aa=document.createElement("span");aa.style.marginTop="6px";mxUtils.write(aa,mxResources.get("changeUser")+": ");oa.appendChild(aa);var da=document.createElement("select");da.style.width="200px";O();mxEvent.addListener(da, -"change",mxUtils.bind(this,function(){var ia=da.value,L=qa.length!=ia;L&&this.drive.setUser(qa[ia]);this.drive.authorize(L,mxUtils.bind(this,function(){L||(qa=this.drive.getUsersList(),O())}),mxUtils.bind(this,function(Z){this.handleError(Z)}),!0)}));oa.appendChild(da);oa=new CustomDialog(this,oa,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(oa.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!= -g&&g()}),480,150);return}}null!=D.message?H=""==D.message&&null!=D.name?mxUtils.htmlEntities(D.name):mxUtils.htmlEntities(D.message):null!=D.response&&null!=D.response.error?H=mxUtils.htmlEntities(D.response.error):"undefined"!==typeof window.App&&(D.code==App.ERROR_TIMEOUT?H=mxUtils.htmlEntities(mxResources.get("timeout")):D.code==App.ERROR_BUSY?H=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof D&&0<D.length&&(H=mxUtils.htmlEntities(D)))}var Y=u=null;null!=D&&null!=D.helpLink?(u= -mxResources.get("help"),Y=mxUtils.bind(this,function(){return this.editor.graph.openLink(D.helpLink)})):null!=D&&null!=D.ownerEmail&&(u=mxResources.get("contactOwner"),H+=mxUtils.htmlEntities(" ("+u+": "+D.ownerEmail+")"),Y=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(D.ownerEmail))}));this.showError(f,H,G,g,V,null,null,u,Y,null,null,null,x?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(d,f,g){d=new ErrorDialog(this,null,d,mxResources.get("ok"),f); -this.showDialog(d.container,g||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,f,g,x,z,u){var H=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},J=Math.min(200,28*Math.ceil(d.length/50));d=new ConfirmDialog(this,d,function(){H();null!=f&&f()},function(){H();null!=g&&g()},x,z,null,null,null,null,J);this.showDialog(d.container,340,46+J,!0,u);d.init()};EditorUi.prototype.showBanner=function(d,f,g,x){var z=!1;if(!(this.bannerShowing||this["hideBanner"+d]|| -isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){var u=document.createElement("div");u.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(u.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(u.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(u.style,"transition", -"all 1s ease");u.className="geBtn gePrimaryBtn";z=document.createElement("img");z.setAttribute("src",IMAGE_PATH+"/logo.png");z.setAttribute("border","0");z.setAttribute("align","absmiddle");z.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";u.appendChild(z);z=document.createElement("img");z.setAttribute("src",Dialog.prototype.closeImage);z.setAttribute("title",mxResources.get(x?"doNotShowAgain":"close"));z.setAttribute("border","0");z.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;"; -u.appendChild(z);mxUtils.write(u,f);document.body.appendChild(u);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var H=document.createElement("input");H.setAttribute("type","checkbox");H.setAttribute("id","geDoNotShowAgainCheckbox");H.style.marginRight="6px";if(!x){f.appendChild(H);var J=document.createElement("label");J.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(J,mxResources.get("doNotShowAgain"));f.appendChild(J); -u.style.paddingBottom="30px";u.appendChild(f)}var D=mxUtils.bind(this,function(){null!=u.parentNode&&(u.parentNode.removeChild(u),this.bannerShowing=!1,H.checked||x)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});mxEvent.addListener(z,"click",mxUtils.bind(this,function(V){mxEvent.consume(V);D()}));var G=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(u.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this, -function(){D()}),1E3)});mxEvent.addListener(u,"click",mxUtils.bind(this,function(V){var U=mxEvent.getSource(V);U!=H&&U!=J?(null!=g&&g(),D(),mxEvent.consume(V)):G()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(u.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(G,3E4);z=!0}return z};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas= -function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,f,g,x){d=d.toDataURL("image/"+g);if(null!=d&&6<d.length)null!=f&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(f))),0<x&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",x));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,f,g,x,z){var u="jpeg"==g?"jpg":g;x=this.getBaseFilename(x)+(null!=f?".drawio":"")+"."+u;d=this.createImageDataUri(d, -f,g,z);this.saveData(x,u,d.substring(d.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,f){d=new TextareaDialog(this,d,f,null,null,mxResources.get("close"));this.showDialog(d.container,620,460, -!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,f,g,x,z,u){"text/xml"!=g||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=u?u:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=x?this.base64ToBlob(d,g):new Blob([d],{type:g}),navigator.msSaveOrOpenBlob(d,f);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(d,!0):(g.document.write(d), -g.document.close(),g.document.execCommand("SaveAs",!0,f),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(f+":",d):this.openInNewWindow(d,g,x);else{var H=document.createElement("a");u=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof H.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var J=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);u=65==(J?parseInt(J[2],10): -!1)?!1:u}if(u||this.isOffline()){H.href=URL.createObjectURL(x?this.base64ToBlob(d,g):new Blob([d],{type:g}));u?H.download=f:H.setAttribute("target","_blank");document.body.appendChild(H);try{window.setTimeout(function(){URL.revokeObjectURL(H.href)},2E4),H.click(),H.parentNode.removeChild(H)}catch(D){}}else this.createEchoRequest(d,f,g,x,z).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,f,g,x,z,u){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!= -g?"&mime="+g:"")+(null!=z?"&format="+z:"")+(null!=u?"&base64="+u:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(x?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,f){f=f||"";d=atob(d);for(var g=d.length,x=Math.ceil(g/1024),z=Array(x),u=0;u<x;++u){for(var H=1024*u,J=Math.min(H+1024,g),D=Array(J-H),G=0;H<J;++G,++H)D[G]=d[H].charCodeAt(0);z[u]=new Uint8Array(D)}return new Blob(z,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,g,x,z,u,H,J){u=null!=u?u:!1;H=null!=H?H:"vsdx"!= -z&&(!mxClient.IS_IOS||!navigator.standalone);z=this.getServiceCount(u);isLocalStorage&&z++;var D=4>=z?2:6<z?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(G,V){try{if("_blank"==V)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(d,g,x);else if(null!=g&&"text/html"==g.substring(0,9)){var U=new EmbedDialog(this,d);this.showDialog(U.container,450,240,!0,!0);U.init()}else{var Y=window.open("about:blank");null==Y?mxUtils.popup(d,!0):(Y.document.write("<pre>"+mxUtils.htmlEntities(d, -!1)+"</pre>"),Y.document.close())}else V==App.MODE_DEVICE||"download"==V?this.doSaveLocalFile(d,G,g,x,null,J):null!=G&&0<G.length&&this.pickFolder(V,mxUtils.bind(this,function(O){try{this.exportFile(d,G,g,x,V,O)}catch(qa){this.handleError(qa)}}))}catch(O){this.handleError(O)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,u,H,null,1<z,D,d,g,x);u=this.isServices(z)?z>D?390:280:160;this.showDialog(f.container,420,u,!0,!0);f.init()};EditorUi.prototype.openInNewWindow= -function(d,f,g){var x=window.open("about:blank");null==x||null==x.document?mxUtils.popup(d,!0):("image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||g?(d=g?d:btoa(unescape(encodeURIComponent(d))),x.document.write('<html><img style="max-width:100%;" src="data:'+f+";base64,"+d+'"/></html>')):x.document.write("<html>"+d+"</html>"):x.document.write("<html><pre>"+mxUtils.htmlEntities(d,!1)+"</pre></html>"),x.document.close())};var m=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled= -function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(d){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=d(mxUtils.bind(this,function(x){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position= -"",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor= -"#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&& -(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var z=f.getBoundingClientRect();this.tagsDialog.style.left=z.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";z=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=z.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(x)}), -Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var x=this.editor.graph.getAllTags();f.style.display=0<x.length?"":"none"}))}m.apply(this,arguments);this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&& -(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog), -this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var g=d(mxUtils.bind(this,function(x){var z=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",z);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)z.apply(this); -else{this.exportDialog=document.createElement("div");var u=g.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color= -"#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=u.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";u=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=u.zIndex;var H=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});H.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this, -function(J){H.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var D=this.createImageDataUri(J,null,"png");J=document.createElement("img");J.style.maxWidth="140px";J.style.maxHeight="140px";J.style.cursor="pointer";J.style.backgroundColor="white";J.setAttribute("title",mxResources.get("openInNewWindow"));J.setAttribute("border","0");J.setAttribute("src",D);this.exportDialog.appendChild(J);mxEvent.addListener(J,"click",mxUtils.bind(this, -function(){this.openInNewWindow(D.substring(D.indexOf(",")+1),"image/png",!0);z.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(J){this.spinner.stop();this.handleError(J)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",z);document.body.appendChild(this.exportDialog)}mxEvent.consume(x)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,f,g,x,z){this.isLocalFileSave()? -this.saveLocalFile(g,d,x,z,f):this.saveRequest(d,f,mxUtils.bind(this,function(u,H){return this.createEchoRequest(g,u,x,z,f,H)}),g,z,x)};EditorUi.prototype.saveRequest=function(d,f,g,x,z,u,H){H=null!=H?H:!mxClient.IS_IOS||!navigator.standalone;var J=this.getServiceCount(!1);isLocalStorage&&J++;var D=4>=J?2:6<J?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(G,V){if("_blank"==V||null!=G&&0<G.length){var U=g("_blank"==V?null:G,V==App.MODE_DEVICE||"download"==V||null==V||"_blank"==V?"0":"1"); -null!=U&&(V==App.MODE_DEVICE||"download"==V||"_blank"==V?U.simulate(document,"_blank"):this.pickFolder(V,mxUtils.bind(this,function(Y){u=null!=u?u:"pdf"==f?"application/pdf":"image/"+f;if(null!=x)try{this.exportFile(x,G,u,!0,V,Y)}catch(O){this.handleError(O)}else this.spinner.spin(document.body,mxResources.get("saving"))&&U.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=U.getStatus()&&299>=U.getStatus())try{this.exportFile(U.getText(),G,u,!0,V,Y)}catch(O){this.handleError(O)}else this.handleError({message:mxResources.get("errorSavingFile")})}), -function(O){this.spinner.stop();this.handleError(O)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,H,null,1<J,D,x,u,z);J=this.isServices(J)?4<J?390:280:160;this.showDialog(d.container,420,J,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,f,g,x,z,u){};EditorUi.prototype.pickFolder=function(d, -f,g){f(null)};EditorUi.prototype.exportSvg=function(d,f,g,x,z,u,H,J,D,G,V,U,Y,O){if(this.spinner.spin(document.body,mxResources.get("export")))try{var qa=this.editor.graph.isSelectionEmpty();g=null!=g?g:qa;var oa=f?null:this.editor.graph.background;oa==mxConstants.NONE&&(oa=null);null==oa&&0==f&&(oa=V?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var aa=this.editor.graph.getSvg(oa,d,H,J,null,g,null,null,"blank"==G?"_blank":"self"==G?"_top":null,null,!Y,V,U);x&&this.editor.graph.addSvgShadow(aa); -var da=this.getBaseFilename()+(z?".drawio":"")+".svg";O=null!=O?O:mxUtils.bind(this,function(Z){this.isLocalFileSave()||Z.length<=MAX_REQUEST_SIZE?this.saveData(da,"svg",Z,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(Z)}))});var ia=mxUtils.bind(this,function(Z){this.spinner.stop();z&&Z.setAttribute("content",this.getFileData(!0,null,null,null,g,D,null,null,null,!1));O(Graph.xmlDeclaration+"\n"+(z? -Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(Z))});this.editor.graph.mathEnabled&&this.editor.addMathCss(aa);var L=mxUtils.bind(this,function(Z){u?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(Z,ia,this.thumbImageCache)):ia(Z)});Y?this.embedFonts(aa,L):(this.editor.addFontCss(aa),L(aa))}catch(Z){this.handleError(Z)}};EditorUi.prototype.addRadiobox=function(d,f,g,x,z,u,H){return this.addCheckbox(d,g,x,z,u,H,!0,f)};EditorUi.prototype.addCheckbox= -function(d,f,g,x,z,u,H,J){u=null!=u?u:!0;var D=document.createElement("input");D.style.marginRight="8px";D.style.marginTop="16px";D.setAttribute("type",H?"radio":"checkbox");H="geCheckbox-"+Editor.guid();D.id=H;null!=J&&D.setAttribute("name",J);g&&(D.setAttribute("checked","checked"),D.defaultChecked=!0);x&&D.setAttribute("disabled","disabled");u&&(d.appendChild(D),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",H),d.appendChild(g),z||mxUtils.br(d));return D};EditorUi.prototype.addEditButton= -function(d,f){var g=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var x=this.getCurrentFile(),z="";null!=x&&x.getMode()!=App.MODE_DEVICE&&x.getMode()!=App.MODE_BROWSER&&(z=window.location.href);var u=document.createElement("select");u.style.maxWidth="200px";u.style.width="auto";u.style.marginLeft="8px";u.style.marginRight="10px";u.className="geBtn";x=document.createElement("option");x.setAttribute("value","blank");mxUtils.write(x,mxResources.get("makeCopy")); -u.appendChild(x);x=document.createElement("option");x.setAttribute("value","custom");mxUtils.write(x,mxResources.get("custom")+"...");u.appendChild(x);d.appendChild(u);mxEvent.addListener(u,"change",mxUtils.bind(this,function(){if("custom"==u.value){var H=new FilenameDialog(this,z,mxResources.get("ok"),function(J){null!=J?z=J:u.value="blank"},mxResources.get("url"),null,null,null,null,function(){u.value="blank"});this.showDialog(H.container,300,80,!0,!1);H.init()}}));mxEvent.addListener(g,"change", -mxUtils.bind(this,function(){g.checked&&(null==f||f.checked)?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return g.checked?"blank"===u.value?"_blank":z:null},getEditInput:function(){return g},getEditSelect:function(){return u}}};EditorUi.prototype.addLinkSection=function(d,f){function g(){var J=document.createElement("div");J.style.width="100%";J.style.height="100%";J.style.boxSizing="border-box";null!=u&&u!=mxConstants.NONE?(J.style.border= -"1px solid black",J.style.backgroundColor=u):(J.style.backgroundPosition="center center",J.style.backgroundRepeat="no-repeat",J.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");H.innerText="";H.appendChild(J)}mxUtils.write(d,mxResources.get("links")+":");var x=document.createElement("select");x.style.width="100px";x.style.padding="0px";x.style.marginLeft="8px";x.style.marginRight="10px";x.className="geBtn";var z=document.createElement("option");z.setAttribute("value","auto");mxUtils.write(z, -mxResources.get("automatic"));x.appendChild(z);z=document.createElement("option");z.setAttribute("value","blank");mxUtils.write(z,mxResources.get("openInNewWindow"));x.appendChild(z);z=document.createElement("option");z.setAttribute("value","self");mxUtils.write(z,mxResources.get("openInThisWindow"));x.appendChild(z);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),x.appendChild(f));d.appendChild(x); -mxUtils.write(d,mxResources.get("borderColor")+":");var u="#0000ff",H=null;H=mxUtils.button("",mxUtils.bind(this,function(J){this.pickColor(u||"none",function(D){u=D;g()});mxEvent.consume(J)}));g();H.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";H.style.marginLeft="4px";H.style.height="22px";H.style.width="22px";H.style.position="relative";H.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";H.className="geColorBtn";d.appendChild(H);mxUtils.br(d);return{getColor:function(){return u}, -getTarget:function(){return x.value},focus:function(){x.focus()}}};EditorUi.prototype.createUrlParameters=function(d,f,g,x,z,u,H){H=null!=H?H:[];x&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||H.push("lightbox=1"),"auto"!=d&&H.push("target="+d),null!=f&&f!=mxConstants.NONE&&H.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=z&&0<z.length&&H.push("edit="+encodeURIComponent(z)),u&&H.push("layers=1"),this.editor.graph.foldingEnabled&&H.push("nav=1"));g&&null!= -this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&H.push("page-id="+this.currentPage.getId());return H};EditorUi.prototype.createLink=function(d,f,g,x,z,u,H,J,D,G){D=this.createUrlParameters(d,f,g,x,z,u,D);d=this.getCurrentFile();f=!0;null!=H?g="#U"+encodeURIComponent(H):(d=this.getCurrentFile(),J||null==d||d.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))): -(g="#"+d.getHash(),f=!1));f&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&D.push("title="+encodeURIComponent(d.getTitle()));G&&1<g.length&&(D.push("open="+g.substring(1)),g="");return(x&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<D.length?"?"+D.join("&"):"")+g};EditorUi.prototype.createHtml=function(d,f,g,x,z,u,H,J,D,G,V,U){this.getBasenames(); -var Y={};""!=z&&z!=mxConstants.NONE&&(Y.highlight=z);"auto"!==x&&(Y.target=x);G||(Y.lightbox=!1);Y.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(Y.zoom=g/100);g=[];H&&(g.push("pages"),Y.resize=!0,null!=this.pages&&null!=this.currentPage&&(Y.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(g.push("zoom"),Y.resize=!0);J&&g.push("layers");D&&g.push("tags");0<g.length&&(G&&g.push("lightbox"),Y.toolbar=g.join(" "));null!=V&&0<V.length&&(Y.edit=V);null!=d?Y.url=d:Y.xml=this.getFileData(!0, -null,null,null,null,!H);f='<div class="mxgraph" style="'+(u?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(Y))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";U(f,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL: -EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,f,g,x){var z=document.createElement("div");z.style.whiteSpace="nowrap";var u=document.createElement("h3");mxUtils.write(u,mxResources.get("html"));u.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";z.appendChild(u);var H=document.createElement("div");H.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var J=document.createElement("input"); -J.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";J.setAttribute("value","url");J.setAttribute("type","radio");J.setAttribute("name","type-embedhtmldialog");u=J.cloneNode(!0);u.setAttribute("value","copy");H.appendChild(u);var D=document.createElement("span");mxUtils.write(D,mxResources.get("includeCopyOfMyDiagram"));H.appendChild(D);mxUtils.br(H);H.appendChild(J);D=document.createElement("span");mxUtils.write(D,mxResources.get("publicDiagramUrl"));H.appendChild(D);var G=this.getCurrentFile(); -null==g&&null!=G&&G.constructor==window.DriveFile&&(D=document.createElement("a"),D.style.paddingLeft="12px",D.style.color="gray",D.style.cursor="pointer",mxUtils.write(D,mxResources.get("share")),H.appendChild(D),mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(G.getId())})));u.setAttribute("checked","checked");null==g&&J.setAttribute("disabled","disabled");z.appendChild(H);var V=this.addLinkSection(z),U=this.addCheckbox(z,mxResources.get("zoom"), -!0,null,!0);mxUtils.write(z,":");var Y=document.createElement("input");Y.setAttribute("type","text");Y.style.marginRight="16px";Y.style.width="60px";Y.style.marginLeft="4px";Y.style.marginRight="12px";Y.value="100%";z.appendChild(Y);var O=this.addCheckbox(z,mxResources.get("fit"),!0);H=null!=this.pages&&1<this.pages.length;var qa=qa=this.addCheckbox(z,mxResources.get("allPages"),H,!H),oa=this.addCheckbox(z,mxResources.get("layers"),!0),aa=this.addCheckbox(z,mxResources.get("tags"),!0),da=this.addCheckbox(z, -mxResources.get("lightbox"),!0),ia=null;H=380;if(EditorUi.enableHtmlEditOption){ia=this.addEditButton(z,da);var L=ia.getEditInput();L.style.marginBottom="16px";H+=50;mxEvent.addListener(da,"change",function(){da.checked?L.removeAttribute("disabled"):L.setAttribute("disabled","disabled");L.checked&&da.checked?ia.getEditSelect().removeAttribute("disabled"):ia.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,z,mxUtils.bind(this,function(){x(J.checked?g:null,U.checked,Y.value, -V.getTarget(),V.getColor(),O.checked,qa.checked,oa.checked,aa.checked,da.checked,null!=ia?ia.getLink():null)}),null,d,f);this.showDialog(d.container,340,H,!0,!0);u.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,f,g,x,z,u,H,J){var D=document.createElement("div");D.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,d||mxResources.get("link"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";D.appendChild(G);var V=this.getCurrentFile(); -d=0;if(null==V||V.constructor!=window.DriveFile||f)H=null!=H?H:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{d=80;H=null!=H?H:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";G=document.createElement("div");G.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var U=document.createElement("div");U.style.whiteSpace="normal";mxUtils.write(U,mxResources.get("linkAccountRequired"));G.appendChild(U); -U=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(V.getId())}));U.style.marginTop="12px";U.className="geBtn";G.appendChild(U);D.appendChild(G);U=document.createElement("a");U.style.paddingLeft="12px";U.style.color="gray";U.style.fontSize="11px";U.style.cursor="pointer";mxUtils.write(U,mxResources.get("check"));G.appendChild(U);mxEvent.addListener(U,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(), -mxUtils.bind(this,function(P){this.spinner.stop();P=new ErrorDialog(this,null,mxResources.get(null!=P?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(P.container,300,80,!0,!1);P.init()}))}))}var Y=null,O=null;if(null!=g||null!=x)d+=30,mxUtils.write(D,mxResources.get("width")+":"),Y=document.createElement("input"),Y.setAttribute("type","text"),Y.style.marginRight="16px",Y.style.width="50px",Y.style.marginLeft="6px",Y.style.marginRight="16px",Y.style.marginBottom="10px", -Y.value="100%",D.appendChild(Y),mxUtils.write(D,mxResources.get("height")+":"),O=document.createElement("input"),O.setAttribute("type","text"),O.style.width="50px",O.style.marginLeft="6px",O.style.marginBottom="10px",O.value=x+"px",D.appendChild(O),mxUtils.br(D);var qa=this.addLinkSection(D,u);g=null!=this.pages&&1<this.pages.length;var oa=null;if(null==V||V.constructor!=window.DriveFile||f)oa=this.addCheckbox(D,mxResources.get("allPages"),g,!g);var aa=this.addCheckbox(D,mxResources.get("lightbox"), -!0,null,null,!u),da=this.addEditButton(D,aa),ia=da.getEditInput();u&&(ia.style.marginLeft=aa.style.marginLeft,aa.style.display="none",d-=20);var L=this.addCheckbox(D,mxResources.get("layers"),!0);L.style.marginLeft=ia.style.marginLeft;L.style.marginTop="8px";var Z=this.addCheckbox(D,mxResources.get("tags"),!0);Z.style.marginLeft=ia.style.marginLeft;Z.style.marginBottom="16px";Z.style.marginTop="16px";mxEvent.addListener(aa,"change",function(){aa.checked?(L.removeAttribute("disabled"),ia.removeAttribute("disabled")): -(L.setAttribute("disabled","disabled"),ia.setAttribute("disabled","disabled"));ia.checked&&aa.checked?da.getEditSelect().removeAttribute("disabled"):da.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,D,mxUtils.bind(this,function(){z(qa.getTarget(),qa.getColor(),null==oa?!0:oa.checked,aa.checked,da.getLink(),L.checked,null!=Y?Y.value:null,null!=O?O.value:null,Z.checked)}),null,mxResources.get("create"),H,J);this.showDialog(f.container,340,300+d,!0,!0);null!=Y?(Y.focus(), -mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Y.select():document.execCommand("selectAll",!1,null)):qa.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,g,x,z){var u=document.createElement("div");u.style.whiteSpace="nowrap";var H=document.createElement("h3");mxUtils.write(H,mxResources.get("image"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(z?"10":"4")+"px";u.appendChild(H);if(z){mxUtils.write(u,mxResources.get("zoom")+":");var J=document.createElement("input"); -J.setAttribute("type","text");J.style.marginRight="16px";J.style.width="60px";J.style.marginLeft="4px";J.style.marginRight="12px";J.value=this.lastExportZoom||"100%";u.appendChild(J);mxUtils.write(u,mxResources.get("borderWidth")+":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";D.style.width="60px";D.style.marginLeft="4px";D.value=this.lastExportBorder||"0";u.appendChild(D);mxUtils.br(u)}var G=this.addCheckbox(u,mxResources.get("selectionOnly"),!1, -this.editor.graph.isSelectionEmpty()),V=x?null:this.addCheckbox(u,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);H=this.editor.graph;var U=x?null:this.addCheckbox(u,mxResources.get("transparentBackground"),H.background==mxConstants.NONE||null==H.background);null!=U&&(U.style.marginBottom="16px");d=new CustomDialog(this,u,mxUtils.bind(this,function(){var Y=parseInt(J.value)/100||1,O=parseInt(D.value)||0;g(!G.checked,null!=V?V.checked:!1,null!=U?U.checked:!1,Y,O)}),null,d,f); -this.showDialog(d.container,300,(z?25:0)+(x?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,f,g,x,z,u,H,J,D){H=null!=H?H:Editor.defaultIncludeDiagram;var G=document.createElement("div");G.style.whiteSpace="nowrap";var V=this.editor.graph,U="jpeg"==J?220:300,Y=document.createElement("h3");mxUtils.write(Y,d);Y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";G.appendChild(Y);mxUtils.write(G,mxResources.get("zoom")+":");var O=document.createElement("input"); -O.setAttribute("type","text");O.style.marginRight="16px";O.style.width="60px";O.style.marginLeft="4px";O.style.marginRight="12px";O.value=this.lastExportZoom||"100%";G.appendChild(O);mxUtils.write(G,mxResources.get("borderWidth")+":");var qa=document.createElement("input");qa.setAttribute("type","text");qa.style.marginRight="16px";qa.style.width="60px";qa.style.marginLeft="4px";qa.value=this.lastExportBorder||"0";G.appendChild(qa);mxUtils.br(G);var oa=this.addCheckbox(G,mxResources.get("selectionOnly"), -!1,V.isSelectionEmpty()),aa=document.createElement("input");aa.style.marginTop="16px";aa.style.marginRight="8px";aa.style.marginLeft="24px";aa.setAttribute("disabled","disabled");aa.setAttribute("type","checkbox");var da=document.createElement("select");da.style.marginTop="16px";da.style.marginLeft="8px";d=["selectionOnly","diagram","page"];var ia={};for(Y=0;Y<d.length;Y++)if(!V.isSelectionEmpty()||"selectionOnly"!=d[Y]){var L=document.createElement("option");mxUtils.write(L,mxResources.get(d[Y])); -L.setAttribute("value",d[Y]);da.appendChild(L);ia[d[Y]]=L}D?(mxUtils.write(G,mxResources.get("size")+":"),G.appendChild(da),mxUtils.br(G),U+=26,mxEvent.addListener(da,"change",function(){"selectionOnly"==da.value&&(oa.checked=!0)})):u&&(G.appendChild(aa),mxUtils.write(G,mxResources.get("crop")),mxUtils.br(G),U+=30,mxEvent.addListener(oa,"change",function(){oa.checked?aa.removeAttribute("disabled"):aa.setAttribute("disabled","disabled")}));V.isSelectionEmpty()?D&&(oa.style.display="none",oa.nextSibling.style.display= -"none",oa.nextSibling.nextSibling.style.display="none",U-=30):(da.value="diagram",aa.setAttribute("checked","checked"),aa.defaultChecked=!0,mxEvent.addListener(oa,"change",function(){da.value=oa.checked?"selectionOnly":"diagram"}));var Z=this.addCheckbox(G,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=J),P=null;Editor.isDarkMode()&&(P=this.addCheckbox(G,mxResources.get("dark"),!0),U+=26);var ca=this.addCheckbox(G,mxResources.get("shadow"),V.shadowVisible),ja=null;if("png"==J||"jpeg"== -J)ja=this.addCheckbox(G,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),U+=30;var ka=this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram"),H,null,null,"jpeg"!=J);ka.style.marginBottom="16px";var q=document.createElement("input");q.style.marginBottom="16px";q.style.marginRight="8px";q.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||q.setAttribute("disabled","disabled");var F=document.createElement("select");F.style.maxWidth="260px";F.style.marginLeft= -"8px";F.style.marginRight="10px";F.style.marginBottom="16px";F.className="geBtn";u=document.createElement("option");u.setAttribute("value","none");mxUtils.write(u,mxResources.get("noChange"));F.appendChild(u);u=document.createElement("option");u.setAttribute("value","embedFonts");mxUtils.write(u,mxResources.get("embedFonts"));F.appendChild(u);u=document.createElement("option");u.setAttribute("value","lblToSvg");mxUtils.write(u,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp|| -F.appendChild(u);mxEvent.addListener(F,"change",mxUtils.bind(this,function(){"lblToSvg"==F.value?(q.checked=!0,q.setAttribute("disabled","disabled"),ia.page.style.display="none","page"==da.value&&(da.value="diagram"),ca.checked=!1,ca.setAttribute("disabled","disabled"),W.style.display="inline-block",R.style.display="none"):"disabled"==q.getAttribute("disabled")&&(q.checked=!1,q.removeAttribute("disabled"),ca.removeAttribute("disabled"),ia.page.style.display="",W.style.display="none",R.style.display= -"")}));f&&(G.appendChild(q),mxUtils.write(G,mxResources.get("embedImages")),mxUtils.br(G),mxUtils.write(G,mxResources.get("txtSettings")+":"),G.appendChild(F),mxUtils.br(G),U+=60);var R=document.createElement("select");R.style.maxWidth="260px";R.style.marginLeft="8px";R.style.marginRight="10px";R.className="geBtn";f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));R.appendChild(f);f=document.createElement("option");f.setAttribute("value", -"blank");mxUtils.write(f,mxResources.get("openInNewWindow"));R.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));R.appendChild(f);var W=document.createElement("div");mxUtils.write(W,mxResources.get("LinksLost"));W.style.margin="7px";W.style.display="none";"svg"==J&&(mxUtils.write(G,mxResources.get("links")+":"),G.appendChild(R),G.appendChild(W),mxUtils.br(G),mxUtils.br(G),U+=50);g=new CustomDialog(this,G,mxUtils.bind(this, -function(){this.lastExportBorder=qa.value;this.lastExportZoom=O.value;z(O.value,Z.checked,!oa.checked,ca.checked,ka.checked,q.checked,qa.value,aa.checked,!1,R.value,null!=ja?ja.checked:null,null!=P?P.checked:null,da.value,"embedFonts"==F.value,"lblToSvg"==F.value)}),null,g,x);this.showDialog(g.container,340,U,!0,!0,null,null,null,null,!0);O.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?O.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog= -function(d,f,g,x,z){var u=document.createElement("div");u.style.whiteSpace="nowrap";var H=this.editor.graph;if(null!=f){var J=document.createElement("h3");mxUtils.write(J,f);J.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";u.appendChild(J)}var D=this.addCheckbox(u,mxResources.get("fit"),!0),G=this.addCheckbox(u,mxResources.get("shadow"),H.shadowVisible&&x,!x),V=this.addCheckbox(u,g),U=this.addCheckbox(u,mxResources.get("lightbox"),!0),Y=this.addEditButton(u,U),O=Y.getEditInput(), -qa=1<H.model.getChildCount(H.model.getRoot()),oa=this.addCheckbox(u,mxResources.get("layers"),qa,!qa);oa.style.marginLeft=O.style.marginLeft;oa.style.marginBottom="12px";oa.style.marginTop="8px";mxEvent.addListener(U,"change",function(){U.checked?(qa&&oa.removeAttribute("disabled"),O.removeAttribute("disabled")):(oa.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"));O.checked&&U.checked?Y.getEditSelect().removeAttribute("disabled"):Y.getEditSelect().setAttribute("disabled", -"disabled")});f=new CustomDialog(this,u,mxUtils.bind(this,function(){d(D.checked,G.checked,V.checked,U.checked,Y.getLink(),oa.checked)}),null,mxResources.get("embed"),z);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,g,x,z,u,H,J){function D(O){var qa=" ",oa="";x&&(qa=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+ -EditorUi.lightboxHost+"/?client=1"+(null!=V?"&page="+V:"")+(z?"&edit=_blank":"")+(u?"&layers=1":"")+"');}})(this);\"",oa+="cursor:pointer;");d&&(oa+="max-width:100%;");var aa="";g&&(aa=' width="'+Math.round(G.width)+'" height="'+Math.round(G.height)+'"');H('<img src="'+O+'"'+aa+(""!=oa?' style="'+oa+'"':"")+qa+"/>")}var G=this.editor.graph.getGraphBounds(),V=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(O){var qa=x?this.getFileData(!0): -null;O=this.createImageDataUri(O,qa,"png");D(O)}),null,null,null,mxUtils.bind(this,function(O){J({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),G.width*G.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var U="";g&&(U="&w="+Math.round(2*G.width)+"&h="+Math.round(2*G.height));var Y=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(x?"1":"0")+U+"&xml="+encodeURIComponent(f));Y.send(mxUtils.bind(this,function(){200<= -Y.getStatus()&&299>=Y.getStatus()?D("data:image/png;base64,"+Y.getText()):J({message:mxResources.get("unknownError")})}))}else J({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(d,f,g,x,z,u,H){var J=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),D=J.getElementsByTagName("a");if(null!=D)for(var G=0;G<D.length;G++){var V=D[G].getAttribute("href");null!=V&&"#"==V.charAt(0)&&"_blank"==D[G].getAttribute("target")&&D[G].removeAttribute("target")}x&& -J.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(J);if(g){var U=" ",Y="";x&&(U="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(z?"&edit=_blank":"")+(u?"&layers=1": -"")+"');}})(this);\"",Y+="cursor:pointer;");d&&(Y+="max-width:100%;");this.editor.convertImages(J,mxUtils.bind(this,function(O){H('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(O))+'"'+(""!=Y?' style="'+Y+'"':"")+U+"/>")}))}else Y="",x&&(f=this.getSelectedPageIndex(),J.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+ -EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(z?"&edit=_blank":"")+(u?"&layers=1":"")+"');}}})(this);"),Y+="cursor:pointer;"),d&&(d=parseInt(J.getAttribute("width")),z=parseInt(J.getAttribute("height")),J.setAttribute("viewBox","-0.5 -0.5 "+d+" "+z),Y+="max-width:100%;max-height:"+z+"px;",J.removeAttribute("height")),""!=Y&&J.setAttribute("style",Y),this.editor.addFontCss(J),this.editor.graph.mathEnabled&&this.editor.addMathCss(J),H(mxUtils.getXml(J))};EditorUi.prototype.timeSince=function(d){d= +f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.libraryLoaded=function(d,f,g,x){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var y=this.sidebar.palettes[d.getHash()];y=null!=y?y[y.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var u=null,H=mxUtils.bind(this,function(ia,M){0==ia.length&&d.isEditable()? +(null==u&&(u=document.createElement("div"),u.className="geDropTarget",mxUtils.write(u,mxResources.get("dragElementsHere"))),M.appendChild(u)):this.addLibraryEntries(ia,M)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==g&&(g=d.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var J=this.sidebar.addPalette(d.getHash(),g,null!=x?x:!0,mxUtils.bind(this,function(ia){H(f,ia)}));this.repositionLibrary(y);var D=J.parentNode.previousSibling;x=D.getAttribute("title"); +null!=x&&0<x.length&&".scratchpad"!=d.title&&D.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+x);var G=document.createElement("div");G.style.position="absolute";G.style.right="0px";G.style.top="0px";G.style.padding="8px";G.style.backgroundColor="inherit";D.style.position="relative";var W=document.createElement("img");W.className="geAdaptiveAsset";W.setAttribute("src",Editor.crossImage);W.setAttribute("title",mxResources.get("close"));W.setAttribute("valign","absmiddle");W.setAttribute("border", +"0");W.style.position="relative";W.style.top="2px";W.style.width="14px";W.style.cursor="pointer";W.style.margin="0 3px";var T=null;if(".scratchpad"!=d.title||this.closableScratchpad)G.appendChild(W),mxEvent.addListener(W,"click",mxUtils.bind(this,function(ia){if(!mxEvent.isConsumed(ia)){var M=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=T?this.confirm(mxResources.get("allChangesLost"),null,M,mxResources.get("cancel"),mxResources.get("discardChanges")):M();mxEvent.consume(ia)}}));if(d.isEditable()){var Z= +this.editor.graph,N=null,qa=mxUtils.bind(this,function(ia){this.showLibraryDialog(d.getTitle(),J,f,d,d.getMode());mxEvent.consume(ia)}),oa=mxUtils.bind(this,function(ia){d.setModified(!0);d.isAutosave()?(null!=N&&null!=N.parentNode&&N.parentNode.removeChild(N),N=W.cloneNode(!1),N.setAttribute("src",Editor.spinImage),N.setAttribute("title",mxResources.get("saving")),N.style.cursor="default",N.style.marginRight="2px",N.style.marginTop="-2px",G.insertBefore(N,G.firstChild),D.style.paddingRight=18*G.childNodes.length+ +"px",this.saveLibrary(d.getTitle(),f,d,d.getMode(),!0,!0,function(){null!=N&&null!=N.parentNode&&(N.parentNode.removeChild(N),D.style.paddingRight=18*G.childNodes.length+"px")})):null==T&&(T=W.cloneNode(!1),T.setAttribute("src",Editor.saveImage),T.setAttribute("title",mxResources.get("save")),G.insertBefore(T,G.firstChild),mxEvent.addListener(T,"click",mxUtils.bind(this,function(M){this.saveLibrary(d.getTitle(),f,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==T||d.isModified()||(D.style.paddingRight= +18*G.childNodes.length+"px",T.parentNode.removeChild(T),T=null)});mxEvent.consume(M)})),D.style.paddingRight=18*G.childNodes.length+"px")}),S=mxUtils.bind(this,function(ia,M,aa,X){ia=Z.cloneCells(mxUtils.sortCells(Z.model.getTopmostCells(ia)));for(var ja=0;ja<ia.length;ja++){var ca=Z.getCellGeometry(ia[ja]);null!=ca&&ca.translate(-M.x,-M.y)}J.appendChild(this.sidebar.createVertexTemplateFromCells(ia,M.width,M.height,X||"",!0,null,!1));ia={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(ia))), +w:M.width,h:M.height};null!=X&&(ia.title=X);f.push(ia);oa(aa);null!=u&&null!=u.parentNode&&0<f.length&&(u.parentNode.removeChild(u),u=null)}),fa=mxUtils.bind(this,function(ia){if(Z.isSelectionEmpty())Z.getRubberband().isActive()?(Z.getRubberband().execute(ia),Z.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var M=Z.getSelectionCells(),aa=Z.view.getBounds(M),X=Z.view.scale;aa.x/=X;aa.y/=X;aa.width/=X;aa.height/=X;aa.x-= +Z.view.translate.x;aa.y-=Z.view.translate.y;S(M,aa)}mxEvent.consume(ia)});mxEvent.addGestureListeners(J,function(){},mxUtils.bind(this,function(ia){Z.isMouseDown&&null!=Z.panningManager&&null!=Z.graphHandler.first&&(Z.graphHandler.suspend(),null!=Z.graphHandler.hint&&(Z.graphHandler.hint.style.visibility="hidden"),J.style.backgroundColor="#f1f3f4",J.style.cursor="copy",Z.panningManager.stop(),Z.autoScroll=!1,mxEvent.consume(ia))}),mxUtils.bind(this,function(ia){Z.isMouseDown&&null!=Z.panningManager&& +null!=Z.graphHandler&&(J.style.backgroundColor="",J.style.cursor="default",this.sidebar.showTooltips=!0,Z.panningManager.stop(),Z.graphHandler.reset(),Z.isMouseDown=!1,Z.autoScroll=!0,fa(ia),mxEvent.consume(ia))}));mxEvent.addListener(J,"mouseleave",mxUtils.bind(this,function(ia){Z.isMouseDown&&null!=Z.graphHandler.first&&(Z.graphHandler.resume(),null!=Z.graphHandler.hint&&(Z.graphHandler.hint.style.visibility="visible"),J.style.backgroundColor="",J.style.cursor="",Z.autoScroll=!0)}));Graph.fileSupport&& +(mxEvent.addListener(J,"dragover",mxUtils.bind(this,function(ia){J.style.backgroundColor="#f1f3f4";ia.dataTransfer.dropEffect="copy";J.style.cursor="copy";this.sidebar.hideTooltip();ia.stopPropagation();ia.preventDefault()})),mxEvent.addListener(J,"drop",mxUtils.bind(this,function(ia){J.style.cursor="";J.style.backgroundColor="";0<ia.dataTransfer.files.length&&this.importFiles(ia.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(M,aa,X,ja,ca,ka,q,E,Q){if(null!=M&&"image/"==aa.substring(0, +6))M="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(M),M=[new mxCell("",new mxGeometry(0,0,ca,ka),M)],M[0].vertex=!0,S(M,new mxRectangle(0,0,ca,ka),ia,mxEvent.isAltDown(ia)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),null!=u&&null!=u.parentNode&&0<f.length&&(u.parentNode.removeChild(u),u=null);else{var Y=!1,R=mxUtils.bind(this,function(ba,ea){null!=ba&&"application/pdf"==ea&&(ea=Editor.extractGraphModelFromPdf(ba),null!= +ea&&0<ea.length&&(ba=ea));if(null!=ba)if(ba=mxUtils.parseXml(ba),"mxlibrary"==ba.documentElement.nodeName)try{var ra=JSON.parse(mxUtils.getTextContent(ba.documentElement));H(ra,J);f=f.concat(ra);oa(ia);this.spinner.stop();Y=!0}catch(xa){}else if("mxfile"==ba.documentElement.nodeName)try{var ta=ba.documentElement.getElementsByTagName("diagram");for(ra=0;ra<ta.length;ra++){var la=this.stringToCells(Editor.getDiagramNodeXml(ta[ra])),pa=this.editor.graph.getBoundingBoxFromGeometry(la);S(la,new mxRectangle(0, +0,pa.width,pa.height),ia)}Y=!0}catch(xa){null!=window.console&&console.log("error in drop handler:",xa)}Y||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=u&&null!=u.parentNode&&0<f.length&&(u.parentNode.removeChild(u),u=null)});null!=Q&&null!=q&&(/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q))?this.importVisio(Q,function(ba){R(ba,"text/xml")},null,q):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(M,q)&&null!=Q?this.isExternalDataComms()? +this.parseFile(Q,mxUtils.bind(this,function(ba){4==ba.readyState&&(this.spinner.stop(),200<=ba.status&&299>=ba.status?R(ba.responseText,"text/xml"):this.handleError({message:mxResources.get(413==ba.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):R(M,aa)}}));ia.stopPropagation();ia.preventDefault()})),mxEvent.addListener(J,"dragleave",function(ia){J.style.cursor= +"";J.style.backgroundColor="";ia.stopPropagation();ia.preventDefault()}));W=W.cloneNode(!1);W.setAttribute("src",Editor.editImage);W.setAttribute("title",mxResources.get("edit"));G.insertBefore(W,G.firstChild);mxEvent.addListener(W,"click",qa);mxEvent.addListener(J,"dblclick",function(ia){mxEvent.getSource(ia)==J&&qa(ia)});x=W.cloneNode(!1);x.setAttribute("src",Editor.plusImage);x.setAttribute("title",mxResources.get("add"));G.insertBefore(x,G.firstChild);mxEvent.addListener(x,"click",fa);this.isOffline()|| +".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(x=document.createElement("span"),x.setAttribute("title",mxResources.get("help")),x.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(x,"?"),mxEvent.addGestureListeners(x,mxUtils.bind(this,function(ia){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(ia)})),G.insertBefore(x,G.firstChild))}D.appendChild(G);D.style.paddingRight=18*G.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries= +function(d,f){for(var g=0;g<d.length;g++){var x=d[g],y=x.data;if(null!=y){y=this.convertDataUri(y);var u="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==x.aspect&&(u+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(u+"image="+y,x.w,x.h,"",x.title||"",!1,null,!0))}else null!=x.xml&&(y=this.stringToCells(Graph.decompress(x.xml)),0<y.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(y,x.w,x.h,x.title||"",!0,null,!0)))}};EditorUi.prototype.getResource= +function(d){return null!=d?d[mxLanguage]||d.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="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):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor=Editor.darkColor,Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.shapeBackgroundColor=Editor.darkColor,Graph.prototype.shapeForegroundColor=Editor.lightColor,Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor= +Editor.darkColor,mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];"1"==urlParams.sketch&&("undefined"!==typeof Menus&&(Menus.prototype.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts)), +Graph.prototype.defaultVertexStyle={hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders= +new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,f,g,x,y,u,H){d=new ImageDialog(this,d,f,g,x,y,u,H);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,f){d=null!=d?d:mxUtils.bind(this,function(g,x){x||(g=new ChangePageSetup(this,null,g),g.ignoreColor=!0,this.editor.graph.model.execute(g))});d=new BackgroundImageDialog(this,d,f);this.showDialog(d.container, +400,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,f,g,x,y){d=new LibraryDialog(this,d,f,g,x,y);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(u){u&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var f=k.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&& +f.refresh()}));return f};EditorUi.prototype.createSidebarFooterContainer=function(){var d=this.createDiv("geSidebarContainer geSidebarFooter");d.style.position="absolute";d.style.overflow="hidden";var f=document.createElement("a");f.className="geTitle";f.style.color="#DF6C0C";f.style.fontWeight="bold";f.style.height="100%";f.style.paddingTop="9px";f.innerHTML="<span>+</span>";var g=f.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(f,mxResources.get("moreShapes")+ +"...");mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(x){x.preventDefault()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(x){this.actions.get("shapes").funct();mxEvent.consume(x)}));d.appendChild(f);return d};EditorUi.prototype.handleError=function(d,f,g,x,y,u,H){var J=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},D=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!= +d.message)try{H?null!=window.console&&console.error("EditorUi.handleError:",d):EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,d.columnNumber,d,"INFO")}catch(N){}if(null!=D||null!=f){H=mxUtils.htmlEntities(mxResources.get("unknownError"));var G=mxResources.get("ok"),W=null;f=null!=f?f:mxResources.get("error");if(null!=D){null!=D.retry&&(G=mxResources.get("cancel"),W=function(){J();D.retry()});if(404==D.code||404==D.status||403==D.code){H=403==D.code? +null!=D.message?mxUtils.htmlEntities(D.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=y?y:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var T=null!=y?null:null!=u?u:window.location.hash;if(null!=T&&("#G"==T.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==T.substring(0,45))&&(null!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&& +"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.error.data[0].reason)||404==D.code||404==D.status)){T="#U"==T.substring(0,2)?T.substring(45,T.lastIndexOf("%26ex")):T.substring(2);this.showError(f,H,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+T);this.handleError(d,f,g,x,y)}),W,mxResources.get("changeUser"),mxUtils.bind(this,function(){function N(){fa.innerText="";for(var ia= +0;ia<qa.length;ia++){var M=document.createElement("option");mxUtils.write(M,qa[ia].displayName);M.value=ia;fa.appendChild(M);M=document.createElement("option");M.innerHTML=" ";mxUtils.write(M,"<"+qa[ia].email+">");M.setAttribute("disabled","disabled");fa.appendChild(M)}M=document.createElement("option");mxUtils.write(M,mxResources.get("addAccount"));M.value=qa.length;fa.appendChild(M)}var qa=this.drive.getUsersList(),oa=document.createElement("div"),S=document.createElement("span"); +S.style.marginTop="6px";mxUtils.write(S,mxResources.get("changeUser")+": ");oa.appendChild(S);var fa=document.createElement("select");fa.style.width="200px";N();mxEvent.addListener(fa,"change",mxUtils.bind(this,function(){var ia=fa.value,M=qa.length!=ia;M&&this.drive.setUser(qa[ia]);this.drive.authorize(M,mxUtils.bind(this,function(){M||(qa=this.drive.getUsersList(),N())}),mxUtils.bind(this,function(aa){this.handleError(aa)}),!0)}));oa.appendChild(fa);oa=new CustomDialog(this,oa,mxUtils.bind(this, +function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(oa.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=D.message?H=""==D.message&&null!=D.name?mxUtils.htmlEntities(D.name):mxUtils.htmlEntities(D.message):null!=D.response&&null!=D.response.error?H=mxUtils.htmlEntities(D.response.error):"undefined"!==typeof window.App&&(D.code==App.ERROR_TIMEOUT?H=mxUtils.htmlEntities(mxResources.get("timeout")): +D.code==App.ERROR_BUSY?H=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof D&&0<D.length&&(H=mxUtils.htmlEntities(D)))}var Z=u=null;null!=D&&null!=D.helpLink?(u=mxResources.get("help"),Z=mxUtils.bind(this,function(){return this.editor.graph.openLink(D.helpLink)})):null!=D&&null!=D.ownerEmail&&(u=mxResources.get("contactOwner"),H+=mxUtils.htmlEntities(" ("+u+": "+D.ownerEmail+")"),Z=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(D.ownerEmail))}));this.showError(f, +H,G,g,W,null,null,u,Z,null,null,null,x?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(d,f,g){d=new ErrorDialog(this,null,d,mxResources.get("ok"),f);this.showDialog(d.container,g||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,f,g,x,y,u){var H=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},J=Math.min(200,28*Math.ceil(d.length/50));d=new ConfirmDialog(this,d,function(){H();null!=f&&f()},function(){H();null!=g&&g()},x,y,null,null,null,null, +J);this.showDialog(d.container,340,46+J,!0,u);d.init()};EditorUi.prototype.showBanner=function(d,f,g,x){var y=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){var u=document.createElement("div");u.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(u.style, +"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(u.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(u.style,"transition","all 1s ease");u.className="geBtn gePrimaryBtn";y=document.createElement("img");y.setAttribute("src",IMAGE_PATH+"/logo.png");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";u.appendChild(y);y=document.createElement("img");y.setAttribute("src", +Dialog.prototype.closeImage);y.setAttribute("title",mxResources.get(x?"doNotShowAgain":"close"));y.setAttribute("border","0");y.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";u.appendChild(y);mxUtils.write(u,f);document.body.appendChild(u);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var H=document.createElement("input");H.setAttribute("type","checkbox"); +H.setAttribute("id","geDoNotShowAgainCheckbox");H.style.marginRight="6px";if(!x){f.appendChild(H);var J=document.createElement("label");J.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(J,mxResources.get("doNotShowAgain"));f.appendChild(J);u.style.paddingBottom="30px";u.appendChild(f)}var D=mxUtils.bind(this,function(){null!=u.parentNode&&(u.parentNode.removeChild(u),this.bannerShowing=!1,H.checked||x)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+ +d]=Date.now(),mxSettings.save()))});mxEvent.addListener(y,"click",mxUtils.bind(this,function(W){mxEvent.consume(W);D()}));var G=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(u.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){D()}),1E3)});mxEvent.addListener(u,"click",mxUtils.bind(this,function(W){var T=mxEvent.getSource(W);T!=H&&T!=J?(null!=g&&g(),D(),mxEvent.consume(W)):G()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(u.style, +"transform","translate(-50%,0%)")}),500);window.setTimeout(G,3E4);y=!0}return y};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,f,g,x){d=d.toDataURL("image/"+g);if(null!=d&&6<d.length)null!=f&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(f))), +0<x&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",x));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,f,g,x,y){var u="jpeg"==g?"jpg":g;x=this.getBaseFilename(x)+(null!=f?".drawio":"")+"."+u;d=this.createImageDataUri(d,f,g,y);this.saveData(x,u,d.substring(d.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&& +9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,f){d=new TextareaDialog(this,d,f,null,null,mxResources.get("close"));this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,f,g,x,y,u){"text/xml"!=g||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)|| +(f=f+"."+(null!=u?u:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=x?this.base64ToBlob(d,g):new Blob([d],{type:g}),navigator.msSaveOrOpenBlob(d,f);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(d,!0):(g.document.write(d),g.document.close(),g.document.execCommand("SaveAs",!0,f),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(f+":",d):this.openInNewWindow(d,g,x);else{var H= +document.createElement("a");u=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof H.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var J=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);u=65==(J?parseInt(J[2],10):!1)?!1:u}if(u||this.isOffline()){H.href=URL.createObjectURL(x?this.base64ToBlob(d,g):new Blob([d],{type:g}));u?H.download=f:H.setAttribute("target","_blank");document.body.appendChild(H);try{window.setTimeout(function(){URL.revokeObjectURL(H.href)}, +2E4),H.click(),H.parentNode.removeChild(H)}catch(D){}}else this.createEchoRequest(d,f,g,x,y).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,f,g,x,y,u){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=g?"&mime="+g:"")+(null!=y?"&format="+y:"")+(null!=u?"&base64="+u:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(x?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,f){f=f||"";d=atob(d);for(var g=d.length,x=Math.ceil(g/1024),y=Array(x), +u=0;u<x;++u){for(var H=1024*u,J=Math.min(H+1024,g),D=Array(J-H),G=0;H<J;++G,++H)D[G]=d[H].charCodeAt(0);y[u]=new Uint8Array(D)}return new Blob(y,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,g,x,y,u,H,J){u=null!=u?u:!1;H=null!=H?H:"vsdx"!=y&&(!mxClient.IS_IOS||!navigator.standalone);y=this.getServiceCount(u);isLocalStorage&&y++;var D=4>=y?2:6<y?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(G,W){try{if("_blank"==W)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(d, +g,x);else if(null!=g&&"text/html"==g.substring(0,9)){var T=new EmbedDialog(this,d);this.showDialog(T.container,450,240,!0,!0);T.init()}else{var Z=window.open("about:blank");null==Z?mxUtils.popup(d,!0):(Z.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),Z.document.close())}else W==App.MODE_DEVICE||"download"==W?this.doSaveLocalFile(d,G,g,x,null,J):null!=G&&0<G.length&&this.pickFolder(W,mxUtils.bind(this,function(N){try{this.exportFile(d,G,g,x,W,N)}catch(qa){this.handleError(qa)}}))}catch(N){this.handleError(N)}}), +mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,u,H,null,1<y,D,d,g,x);u=this.isServices(y)?y>D?390:280:160;this.showDialog(f.container,420,u,!0,!0);f.init()};EditorUi.prototype.openInNewWindow=function(d,f,g){var x=window.open("about:blank");null==x||null==x.document?mxUtils.popup(d,!0):("image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||g?(d=g?d:btoa(unescape(encodeURIComponent(d))),x.document.write('<html><img style="max-width:100%;" src="data:'+ +f+";base64,"+d+'"/></html>')):x.document.write("<html>"+d+"</html>"):x.document.write("<html><pre>"+mxUtils.htmlEntities(d,!1)+"</pre></html>"),x.document.close())};var m=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(d){if(null!=urlParams.tags){this.tagsDialog= +this.tagsComponent=null;var f=d(mxUtils.bind(this,function(x){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding= +"4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor="#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div, +80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var y=f.getBoundingClientRect();this.tagsDialog.style.left=y.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+ +4+"px";y=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=y.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(x)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var x=this.editor.graph.getAllTags();f.style.display=0<x.length?"":"none"}))}m.apply(this,arguments);this.editor.addListener("tagsDialogShown", +mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&& +(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var g=d(mxUtils.bind(this, +function(x){var y=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",y);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)y.apply(this);else{this.exportDialog=document.createElement("div");var u=g.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center"; +this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=u.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";u=mxUtils.getCurrentStyle(this.editor.graph.container); +this.exportDialog.style.zIndex=u.zIndex;var H=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});H.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(J){H.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var D=this.createImageDataUri(J,null,"png");J=document.createElement("img");J.style.maxWidth="140px";J.style.maxHeight= +"140px";J.style.cursor="pointer";J.style.backgroundColor="white";J.setAttribute("title",mxResources.get("openInNewWindow"));J.setAttribute("border","0");J.setAttribute("src",D);this.exportDialog.appendChild(J);mxEvent.addListener(J,"click",mxUtils.bind(this,function(){this.openInNewWindow(D.substring(D.indexOf(",")+1),"image/png",!0);y.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(J){this.spinner.stop();this.handleError(J)}),null,null,null,null,null,null,null, +Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",y);document.body.appendChild(this.exportDialog)}mxEvent.consume(x)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,f,g,x,y){this.isLocalFileSave()?this.saveLocalFile(g,d,x,y,f):this.saveRequest(d,f,mxUtils.bind(this,function(u,H){return this.createEchoRequest(g,u,x,y,f,H)}),g,y,x)};EditorUi.prototype.saveRequest=function(d,f,g,x,y,u,H){H=null!=H?H:!mxClient.IS_IOS||!navigator.standalone; +var J=this.getServiceCount(!1);isLocalStorage&&J++;var D=4>=J?2:6<J?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(G,W){if("_blank"==W||null!=G&&0<G.length){var T=g("_blank"==W?null:G,W==App.MODE_DEVICE||"download"==W||null==W||"_blank"==W?"0":"1");null!=T&&(W==App.MODE_DEVICE||"download"==W||"_blank"==W?T.simulate(document,"_blank"):this.pickFolder(W,mxUtils.bind(this,function(Z){u=null!=u?u:"pdf"==f?"application/pdf":"image/"+f;if(null!=x)try{this.exportFile(x,G,u,!0,W,Z)}catch(N){this.handleError(N)}else this.spinner.spin(document.body, +mxResources.get("saving"))&&T.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=T.getStatus()&&299>=T.getStatus())try{this.exportFile(T.getText(),G,u,!0,W,Z)}catch(N){this.handleError(N)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(N){this.spinner.stop();this.handleError(N)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,H,null,1<J,D,x,u,y);J=this.isServices(J)?4<J?390:280:160;this.showDialog(d.container, +420,J,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,f,g,x,y,u){};EditorUi.prototype.pickFolder=function(d,f,g){f(null)};EditorUi.prototype.exportSvg=function(d,f,g,x,y,u,H,J,D,G,W,T,Z,N){if(this.spinner.spin(document.body,mxResources.get("export")))try{var qa=this.editor.graph.isSelectionEmpty();g=null!=g?g:qa;var oa=f?null:this.editor.graph.background;oa== +mxConstants.NONE&&(oa=null);null==oa&&0==f&&(oa=W?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var S=this.editor.graph.getSvg(oa,d,H,J,null,g,null,null,"blank"==G?"_blank":"self"==G?"_top":null,null,!Z,W,T);x&&this.editor.graph.addSvgShadow(S);var fa=this.getBaseFilename()+(y?".drawio":"")+".svg";N=null!=N?N:mxUtils.bind(this,function(aa){this.isLocalFileSave()||aa.length<=MAX_REQUEST_SIZE?this.saveData(fa,"svg",aa,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")}, +mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(aa)}))});var ia=mxUtils.bind(this,function(aa){this.spinner.stop();y&&aa.setAttribute("content",this.getFileData(!0,null,null,null,g,D,null,null,null,!1));N(Graph.xmlDeclaration+"\n"+(y?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(aa))});this.editor.graph.mathEnabled&&this.editor.addMathCss(S);var M=mxUtils.bind(this,function(aa){u?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(aa, +ia,this.thumbImageCache)):ia(aa)});Z?this.embedFonts(S,M):(this.editor.addFontCss(S),M(S))}catch(aa){this.handleError(aa)}};EditorUi.prototype.addRadiobox=function(d,f,g,x,y,u,H){return this.addCheckbox(d,g,x,y,u,H,!0,f)};EditorUi.prototype.addCheckbox=function(d,f,g,x,y,u,H,J){u=null!=u?u:!0;var D=document.createElement("input");D.style.marginRight="8px";D.style.marginTop="16px";D.setAttribute("type",H?"radio":"checkbox");H="geCheckbox-"+Editor.guid();D.id=H;null!=J&&D.setAttribute("name",J);g&& +(D.setAttribute("checked","checked"),D.defaultChecked=!0);x&&D.setAttribute("disabled","disabled");u&&(d.appendChild(D),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",H),d.appendChild(g),y||mxUtils.br(d));return D};EditorUi.prototype.addEditButton=function(d,f){var g=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var x=this.getCurrentFile(),y="";null!=x&&x.getMode()!=App.MODE_DEVICE&&x.getMode()!=App.MODE_BROWSER&&(y=window.location.href); +var u=document.createElement("select");u.style.maxWidth="200px";u.style.width="auto";u.style.marginLeft="8px";u.style.marginRight="10px";u.className="geBtn";x=document.createElement("option");x.setAttribute("value","blank");mxUtils.write(x,mxResources.get("makeCopy"));u.appendChild(x);x=document.createElement("option");x.setAttribute("value","custom");mxUtils.write(x,mxResources.get("custom")+"...");u.appendChild(x);d.appendChild(u);mxEvent.addListener(u,"change",mxUtils.bind(this,function(){if("custom"== +u.value){var H=new FilenameDialog(this,y,mxResources.get("ok"),function(J){null!=J?y=J:u.value="blank"},mxResources.get("url"),null,null,null,null,function(){u.value="blank"});this.showDialog(H.container,300,80,!0,!1);H.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,function(){g.checked&&(null==f||f.checked)?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return g.checked?"blank"===u.value?"_blank":y:null},getEditInput:function(){return g}, +getEditSelect:function(){return u}}};EditorUi.prototype.addLinkSection=function(d,f){function g(){var J=document.createElement("div");J.style.width="100%";J.style.height="100%";J.style.boxSizing="border-box";null!=u&&u!=mxConstants.NONE?(J.style.border="1px solid black",J.style.backgroundColor=u):(J.style.backgroundPosition="center center",J.style.backgroundRepeat="no-repeat",J.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");H.innerText="";H.appendChild(J)}mxUtils.write(d,mxResources.get("links")+ +":");var x=document.createElement("select");x.style.width="100px";x.style.padding="0px";x.style.marginLeft="8px";x.style.marginRight="10px";x.className="geBtn";var y=document.createElement("option");y.setAttribute("value","auto");mxUtils.write(y,mxResources.get("automatic"));x.appendChild(y);y=document.createElement("option");y.setAttribute("value","blank");mxUtils.write(y,mxResources.get("openInNewWindow"));x.appendChild(y);y=document.createElement("option");y.setAttribute("value","self");mxUtils.write(y, +mxResources.get("openInThisWindow"));x.appendChild(y);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),x.appendChild(f));d.appendChild(x);mxUtils.write(d,mxResources.get("borderColor")+":");var u="#0000ff",H=null;H=mxUtils.button("",mxUtils.bind(this,function(J){this.pickColor(u||"none",function(D){u=D;g()});mxEvent.consume(J)}));g();H.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px"; +H.style.marginLeft="4px";H.style.height="22px";H.style.width="22px";H.style.position="relative";H.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";H.className="geColorBtn";d.appendChild(H);mxUtils.br(d);return{getColor:function(){return u},getTarget:function(){return x.value},focus:function(){x.focus()}}};EditorUi.prototype.createUrlParameters=function(d,f,g,x,y,u,H){H=null!=H?H:[];x&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||H.push("lightbox=1"), +"auto"!=d&&H.push("target="+d),null!=f&&f!=mxConstants.NONE&&H.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=y&&0<y.length&&H.push("edit="+encodeURIComponent(y)),u&&H.push("layers=1"),this.editor.graph.foldingEnabled&&H.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&H.push("page-id="+this.currentPage.getId());return H};EditorUi.prototype.createLink=function(d,f,g,x,y,u,H,J,D,G){D=this.createUrlParameters(d,f,g,x,y,u,D);d=this.getCurrentFile(); +f=!0;null!=H?g="#U"+encodeURIComponent(H):(d=this.getCurrentFile(),J||null==d||d.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+d.getHash(),f=!1));f&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&D.push("title="+encodeURIComponent(d.getTitle()));G&&1<g.length&&(D.push("open="+g.substring(1)),g="");return(x&&"1"!=urlParams.dev?EditorUi.lightboxHost: +mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<D.length?"?"+D.join("&"):"")+g};EditorUi.prototype.createHtml=function(d,f,g,x,y,u,H,J,D,G,W,T){this.getBasenames();var Z={};""!=y&&y!=mxConstants.NONE&&(Z.highlight=y);"auto"!==x&&(Z.target=x);G||(Z.lightbox=!1);Z.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(Z.zoom=g/100);g=[];H&&(g.push("pages"),Z.resize=!0,null!=this.pages&& +null!=this.currentPage&&(Z.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(g.push("zoom"),Z.resize=!0);J&&g.push("layers");D&&g.push("tags");0<g.length&&(G&&g.push("lightbox"),Z.toolbar=g.join(" "));null!=W&&0<W.length&&(Z.edit=W);null!=d?Z.url=d:Z.xml=this.getFileData(!0,null,null,null,null,!H);f='<div class="mxgraph" style="'+(u?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(Z))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d): +"";T(f,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,f,g,x){var y=document.createElement("div");y.style.whiteSpace="nowrap";var u=document.createElement("h3");mxUtils.write(u, +mxResources.get("html"));u.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";y.appendChild(u);var H=document.createElement("div");H.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var J=document.createElement("input");J.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";J.setAttribute("value","url");J.setAttribute("type","radio");J.setAttribute("name","type-embedhtmldialog");u=J.cloneNode(!0);u.setAttribute("value", +"copy");H.appendChild(u);var D=document.createElement("span");mxUtils.write(D,mxResources.get("includeCopyOfMyDiagram"));H.appendChild(D);mxUtils.br(H);H.appendChild(J);D=document.createElement("span");mxUtils.write(D,mxResources.get("publicDiagramUrl"));H.appendChild(D);var G=this.getCurrentFile();null==g&&null!=G&&G.constructor==window.DriveFile&&(D=document.createElement("a"),D.style.paddingLeft="12px",D.style.color="gray",D.style.cursor="pointer",mxUtils.write(D,mxResources.get("share")),H.appendChild(D), +mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(G.getId())})));u.setAttribute("checked","checked");null==g&&J.setAttribute("disabled","disabled");y.appendChild(H);var W=this.addLinkSection(y),T=this.addCheckbox(y,mxResources.get("zoom"),!0,null,!0);mxUtils.write(y,":");var Z=document.createElement("input");Z.setAttribute("type","text");Z.style.marginRight="16px";Z.style.width="60px";Z.style.marginLeft="4px";Z.style.marginRight="12px";Z.value= +"100%";y.appendChild(Z);var N=this.addCheckbox(y,mxResources.get("fit"),!0);H=null!=this.pages&&1<this.pages.length;var qa=qa=this.addCheckbox(y,mxResources.get("allPages"),H,!H),oa=this.addCheckbox(y,mxResources.get("layers"),!0),S=this.addCheckbox(y,mxResources.get("tags"),!0),fa=this.addCheckbox(y,mxResources.get("lightbox"),!0),ia=null;H=380;if(EditorUi.enableHtmlEditOption){ia=this.addEditButton(y,fa);var M=ia.getEditInput();M.style.marginBottom="16px";H+=50;mxEvent.addListener(fa,"change",function(){fa.checked? +M.removeAttribute("disabled"):M.setAttribute("disabled","disabled");M.checked&&fa.checked?ia.getEditSelect().removeAttribute("disabled"):ia.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,y,mxUtils.bind(this,function(){x(J.checked?g:null,T.checked,Z.value,W.getTarget(),W.getColor(),N.checked,qa.checked,oa.checked,S.checked,fa.checked,null!=ia?ia.getLink():null)}),null,d,f);this.showDialog(d.container,340,H,!0,!0);u.focus()};EditorUi.prototype.showPublishLinkDialog=function(d, +f,g,x,y,u,H,J){var D=document.createElement("div");D.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,d||mxResources.get("link"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";D.appendChild(G);var W=this.getCurrentFile();d=0;if(null==W||W.constructor!=window.DriveFile||f)H=null!=H?H:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{d=80;H=null!=H?H:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram"; +G=document.createElement("div");G.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var T=document.createElement("div");T.style.whiteSpace="normal";mxUtils.write(T,mxResources.get("linkAccountRequired"));G.appendChild(T);T=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(W.getId())}));T.style.marginTop="12px";T.className="geBtn";G.appendChild(T);D.appendChild(G);T=document.createElement("a"); +T.style.paddingLeft="12px";T.style.color="gray";T.style.fontSize="11px";T.style.cursor="pointer";mxUtils.write(T,mxResources.get("check"));G.appendChild(T);mxEvent.addListener(T,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(X){this.spinner.stop();X=new ErrorDialog(this,null,mxResources.get(null!=X?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(X.container, +300,80,!0,!1);X.init()}))}))}var Z=null,N=null;if(null!=g||null!=x)d+=30,mxUtils.write(D,mxResources.get("width")+":"),Z=document.createElement("input"),Z.setAttribute("type","text"),Z.style.marginRight="16px",Z.style.width="50px",Z.style.marginLeft="6px",Z.style.marginRight="16px",Z.style.marginBottom="10px",Z.value="100%",D.appendChild(Z),mxUtils.write(D,mxResources.get("height")+":"),N=document.createElement("input"),N.setAttribute("type","text"),N.style.width="50px",N.style.marginLeft="6px",N.style.marginBottom= +"10px",N.value=x+"px",D.appendChild(N),mxUtils.br(D);var qa=this.addLinkSection(D,u);g=null!=this.pages&&1<this.pages.length;var oa=null;if(null==W||W.constructor!=window.DriveFile||f)oa=this.addCheckbox(D,mxResources.get("allPages"),g,!g);var S=this.addCheckbox(D,mxResources.get("lightbox"),!0,null,null,!u),fa=this.addEditButton(D,S),ia=fa.getEditInput();u&&(ia.style.marginLeft=S.style.marginLeft,S.style.display="none",d-=20);var M=this.addCheckbox(D,mxResources.get("layers"),!0);M.style.marginLeft= +ia.style.marginLeft;M.style.marginTop="8px";var aa=this.addCheckbox(D,mxResources.get("tags"),!0);aa.style.marginLeft=ia.style.marginLeft;aa.style.marginBottom="16px";aa.style.marginTop="16px";mxEvent.addListener(S,"change",function(){S.checked?(M.removeAttribute("disabled"),ia.removeAttribute("disabled")):(M.setAttribute("disabled","disabled"),ia.setAttribute("disabled","disabled"));ia.checked&&S.checked?fa.getEditSelect().removeAttribute("disabled"):fa.getEditSelect().setAttribute("disabled","disabled")}); +f=new CustomDialog(this,D,mxUtils.bind(this,function(){y(qa.getTarget(),qa.getColor(),null==oa?!0:oa.checked,S.checked,fa.getLink(),M.checked,null!=Z?Z.value:null,null!=N?N.value:null,aa.checked)}),null,mxResources.get("create"),H,J);this.showDialog(f.container,340,300+d,!0,!0);null!=Z?(Z.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Z.select():document.execCommand("selectAll",!1,null)):qa.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,g,x,y){var u=document.createElement("div"); +u.style.whiteSpace="nowrap";var H=document.createElement("h3");mxUtils.write(H,mxResources.get("image"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(y?"10":"4")+"px";u.appendChild(H);if(y){mxUtils.write(u,mxResources.get("zoom")+":");var J=document.createElement("input");J.setAttribute("type","text");J.style.marginRight="16px";J.style.width="60px";J.style.marginLeft="4px";J.style.marginRight="12px";J.value=this.lastExportZoom||"100%";u.appendChild(J);mxUtils.write(u, +mxResources.get("borderWidth")+":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";D.style.width="60px";D.style.marginLeft="4px";D.value=this.lastExportBorder||"0";u.appendChild(D);mxUtils.br(u)}var G=this.addCheckbox(u,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),W=x?null:this.addCheckbox(u,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);H=this.editor.graph;var T=x?null:this.addCheckbox(u,mxResources.get("transparentBackground"), +H.background==mxConstants.NONE||null==H.background);null!=T&&(T.style.marginBottom="16px");d=new CustomDialog(this,u,mxUtils.bind(this,function(){var Z=parseInt(J.value)/100||1,N=parseInt(D.value)||0;g(!G.checked,null!=W?W.checked:!1,null!=T?T.checked:!1,Z,N)}),null,d,f);this.showDialog(d.container,300,(y?25:0)+(x?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,f,g,x,y,u,H,J,D){H=null!=H?H:Editor.defaultIncludeDiagram;var G=document.createElement("div");G.style.whiteSpace="nowrap"; +var W=this.editor.graph,T="jpeg"==J?220:300,Z=document.createElement("h3");mxUtils.write(Z,d);Z.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";G.appendChild(Z);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=this.lastExportZoom||"100%";G.appendChild(N);mxUtils.write(G,mxResources.get("borderWidth")+ +":");var qa=document.createElement("input");qa.setAttribute("type","text");qa.style.marginRight="16px";qa.style.width="60px";qa.style.marginLeft="4px";qa.value=this.lastExportBorder||"0";G.appendChild(qa);mxUtils.br(G);var oa=this.addCheckbox(G,mxResources.get("selectionOnly"),!1,W.isSelectionEmpty()),S=document.createElement("input");S.style.marginTop="16px";S.style.marginRight="8px";S.style.marginLeft="24px";S.setAttribute("disabled","disabled");S.setAttribute("type","checkbox");var fa=document.createElement("select"); +fa.style.marginTop="16px";fa.style.marginLeft="8px";d=["selectionOnly","diagram","page"];var ia={};for(Z=0;Z<d.length;Z++)if(!W.isSelectionEmpty()||"selectionOnly"!=d[Z]){var M=document.createElement("option");mxUtils.write(M,mxResources.get(d[Z]));M.setAttribute("value",d[Z]);fa.appendChild(M);ia[d[Z]]=M}D?(mxUtils.write(G,mxResources.get("size")+":"),G.appendChild(fa),mxUtils.br(G),T+=26,mxEvent.addListener(fa,"change",function(){"selectionOnly"==fa.value&&(oa.checked=!0)})):u&&(G.appendChild(S), +mxUtils.write(G,mxResources.get("crop")),mxUtils.br(G),T+=30,mxEvent.addListener(oa,"change",function(){oa.checked?S.removeAttribute("disabled"):S.setAttribute("disabled","disabled")}));W.isSelectionEmpty()?D&&(oa.style.display="none",oa.nextSibling.style.display="none",oa.nextSibling.nextSibling.style.display="none",T-=30):(fa.value="diagram",S.setAttribute("checked","checked"),S.defaultChecked=!0,mxEvent.addListener(oa,"change",function(){fa.value=oa.checked?"selectionOnly":"diagram"}));var aa= +this.addCheckbox(G,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=J),X=null;Editor.isDarkMode()&&(X=this.addCheckbox(G,mxResources.get("dark"),!0),T+=26);var ja=this.addCheckbox(G,mxResources.get("shadow"),W.shadowVisible),ca=null;if("png"==J||"jpeg"==J)ca=this.addCheckbox(G,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),T+=30;var ka=this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram"),H,null,null,"jpeg"!=J);ka.style.marginBottom="16px";var q=document.createElement("input"); +q.style.marginBottom="16px";q.style.marginRight="8px";q.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||q.setAttribute("disabled","disabled");var E=document.createElement("select");E.style.maxWidth="260px";E.style.marginLeft="8px";E.style.marginRight="10px";E.style.marginBottom="16px";E.className="geBtn";u=document.createElement("option");u.setAttribute("value","none");mxUtils.write(u,mxResources.get("noChange"));E.appendChild(u);u=document.createElement("option");u.setAttribute("value", +"embedFonts");mxUtils.write(u,mxResources.get("embedFonts"));E.appendChild(u);u=document.createElement("option");u.setAttribute("value","lblToSvg");mxUtils.write(u,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||E.appendChild(u);mxEvent.addListener(E,"change",mxUtils.bind(this,function(){"lblToSvg"==E.value?(q.checked=!0,q.setAttribute("disabled","disabled"),ia.page.style.display="none","page"==fa.value&&(fa.value="diagram"),ja.checked=!1,ja.setAttribute("disabled","disabled"), +Y.style.display="inline-block",Q.style.display="none"):"disabled"==q.getAttribute("disabled")&&(q.checked=!1,q.removeAttribute("disabled"),ja.removeAttribute("disabled"),ia.page.style.display="",Y.style.display="none",Q.style.display="")}));f&&(G.appendChild(q),mxUtils.write(G,mxResources.get("embedImages")),mxUtils.br(G),mxUtils.write(G,mxResources.get("txtSettings")+":"),G.appendChild(E),mxUtils.br(G),T+=60);var Q=document.createElement("select");Q.style.maxWidth="260px";Q.style.marginLeft="8px"; +Q.style.marginRight="10px";Q.className="geBtn";f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));Q.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));Q.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));Q.appendChild(f);var Y=document.createElement("div");mxUtils.write(Y,mxResources.get("LinksLost")); +Y.style.margin="7px";Y.style.display="none";"svg"==J&&(mxUtils.write(G,mxResources.get("links")+":"),G.appendChild(Q),G.appendChild(Y),mxUtils.br(G),mxUtils.br(G),T+=50);g=new CustomDialog(this,G,mxUtils.bind(this,function(){this.lastExportBorder=qa.value;this.lastExportZoom=N.value;y(N.value,aa.checked,!oa.checked,ja.checked,ka.checked,q.checked,qa.value,S.checked,!1,Q.value,null!=ca?ca.checked:null,null!=X?X.checked:null,fa.value,"embedFonts"==E.value,"lblToSvg"==E.value)}),null,g,x);this.showDialog(g.container, +340,T,!0,!0,null,null,null,null,!0);N.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?N.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,f,g,x,y){var u=document.createElement("div");u.style.whiteSpace="nowrap";var H=this.editor.graph;if(null!=f){var J=document.createElement("h3");mxUtils.write(J,f);J.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";u.appendChild(J)}var D=this.addCheckbox(u,mxResources.get("fit"), +!0),G=this.addCheckbox(u,mxResources.get("shadow"),H.shadowVisible&&x,!x),W=this.addCheckbox(u,g),T=this.addCheckbox(u,mxResources.get("lightbox"),!0),Z=this.addEditButton(u,T),N=Z.getEditInput(),qa=1<H.model.getChildCount(H.model.getRoot()),oa=this.addCheckbox(u,mxResources.get("layers"),qa,!qa);oa.style.marginLeft=N.style.marginLeft;oa.style.marginBottom="12px";oa.style.marginTop="8px";mxEvent.addListener(T,"change",function(){T.checked?(qa&&oa.removeAttribute("disabled"),N.removeAttribute("disabled")): +(oa.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"));N.checked&&T.checked?Z.getEditSelect().removeAttribute("disabled"):Z.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,u,mxUtils.bind(this,function(){d(D.checked,G.checked,W.checked,T.checked,Z.getLink(),oa.checked)}),null,mxResources.get("embed"),y);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,g,x,y,u,H,J){function D(N){var qa=" ",oa="";x&&(qa= +" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(null!=W?"&page="+W:"")+(y?"&edit=_blank":"")+(u?"&layers=1":"")+"');}})(this);\"",oa+="cursor:pointer;");d&&(oa+="max-width:100%;");var S="";g&&(S= +' width="'+Math.round(G.width)+'" height="'+Math.round(G.height)+'"');H('<img src="'+N+'"'+S+(""!=oa?' style="'+oa+'"':"")+qa+"/>")}var G=this.editor.graph.getGraphBounds(),W=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(N){var qa=x?this.getFileData(!0):null;N=this.createImageDataUri(N,qa,"png");D(N)}),null,null,null,mxUtils.bind(this,function(N){J({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,f,null,null,Editor.defaultBorder); +else if(f=this.getFileData(!0),G.width*G.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var T="";g&&(T="&w="+Math.round(2*G.width)+"&h="+Math.round(2*G.height));var Z=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(x?"1":"0")+T+"&xml="+encodeURIComponent(f));Z.send(mxUtils.bind(this,function(){200<=Z.getStatus()&&299>=Z.getStatus()?D("data:image/png;base64,"+Z.getText()):J({message:mxResources.get("unknownError")})}))}else J({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg= +function(d,f,g,x,y,u,H){var J=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),D=J.getElementsByTagName("a");if(null!=D)for(var G=0;G<D.length;G++){var W=D[G].getAttribute("href");null!=W&&"#"==W.charAt(0)&&"_blank"==D[G].getAttribute("target")&&D[G].removeAttribute("target")}x&&J.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(J);if(g){var T=" ",Z="";x&&(T="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+ +EditorUi.lightboxHost+"/?client=1"+(y?"&edit=_blank":"")+(u?"&layers=1":"")+"');}})(this);\"",Z+="cursor:pointer;");d&&(Z+="max-width:100%;");this.editor.convertImages(J,mxUtils.bind(this,function(N){H('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(N))+'"'+(""!=Z?' style="'+Z+'"':"")+T+"/>")}))}else Z="",x&&(f=this.getSelectedPageIndex(),J.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+ +EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(y?"&edit=_blank":"")+(u?"&layers=1":"")+"');}}})(this);"),Z+="cursor:pointer;"),d&&(d=parseInt(J.getAttribute("width")),y=parseInt(J.getAttribute("height")),J.setAttribute("viewBox","-0.5 -0.5 "+d+" "+y),Z+="max-width:100%;max-height:"+y+"px;",J.removeAttribute("height")),""!=Z&&J.setAttribute("style",Z),this.editor.addFontCss(J),this.editor.graph.mathEnabled&&this.editor.addMathCss(J),H(mxUtils.getXml(J))};EditorUi.prototype.timeSince=function(d){d= Math.floor((new Date-d)/1E3);var f=Math.floor(d/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(d/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(d/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(d/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(d/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(d,f){if(null!=d){var g=null;if("diagram"==d.nodeName)g= -d;else if("mxfile"==d.nodeName){var x=d.getElementsByTagName("diagram");if(0<x.length){g=x[0];var z=f.getGlobalVariable;f.getGlobalVariable=function(u){return"page"==u?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==u?1:z.apply(this,arguments)}}}null!=g&&(d=Editor.parseDiagramNode(g))}x=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(d)}catch(u){}finally{this.editor.graph=x}return d};EditorUi.prototype.getPngFileProperties=function(d){var f=1,g=0;if(null!= -d){if(d.hasAttribute("scale")){var x=parseFloat(d.getAttribute("scale"));!isNaN(x)&&0<x&&(f=x)}d.hasAttribute("border")&&(x=parseInt(d.getAttribute("border")),!isNaN(x)&&0<x&&(g=x))}return{scale:f,border:g}};EditorUi.prototype.getEmbeddedPng=function(d,f,g,x,z){try{var u=this.editor.graph,H=null!=u.themes&&"darkTheme"==u.defaultThemeName,J=null;if(null!=g&&0<g.length)u=this.createTemporaryGraph(H?u.getDefaultStylesheet():u.getStylesheet()),document.body.appendChild(u.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement, -!0),u),J=g;else if(H||null!=this.pages&&this.currentPage!=this.pages[0]){u=this.createTemporaryGraph(H?u.getDefaultStylesheet():u.getStylesheet());var D=u.getGlobalVariable;u.setBackgroundImage=this.editor.graph.setBackgroundImage;var G=this.pages[0];this.currentPage==G?u.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&u.setBackgroundImage(G.viewState.backgroundImage);u.getGlobalVariable=function(V){return"page"==V?G.getName():"pagenumber"==V?1:D.apply(this, -arguments)};document.body.appendChild(u.container);u.model.setRoot(G.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(V){try{null==J&&(J=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var U=V.toDataURL("image/png");U=Editor.writeGraphModelToPng(U,"tEXt","mxfile",encodeURIComponent(J));d(U.substring(U.lastIndexOf(",")+1));u!=this.editor.graph&&u.container.parentNode.removeChild(u.container)}catch(Y){null!=f&&f(Y)}}),null,null,null,mxUtils.bind(this,function(V){null!=f&& -f(V)}),null,null,x,null,u.shadowVisible,null,u,z,null,null,null,"diagram",null)}catch(V){null!=f&&f(V)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,g,x,z,u,H,J,D,G,V,U,Y){J=null!=J?J:!0;V=null!=V?V:0;H=null!=D?D:f.background;H==mxConstants.NONE&&(H=null);u=f.getSvg(H,G,V,null,null,u,null,null,null,f.shadowVisible||U,null,Y,"diagram");(f.shadowVisible||U)&&f.addSvgShadow(u,null,null,0==V);null!=d&&u.setAttribute("content",d);null!=g&&u.setAttribute("resource",g);var O=mxUtils.bind(this,function(qa){qa= -(x?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(qa);null!=z&&z(qa);return qa});f.mathEnabled&&this.editor.addMathCss(u);if(null!=z)this.embedFonts(u,mxUtils.bind(this,function(qa){J?this.editor.convertImages(qa,mxUtils.bind(this,function(oa){O(oa)})):O(qa)}));else return O(u)};EditorUi.prototype.embedFonts=function(d,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss), -this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(d,g),f(d)}catch(x){f(d)}}))}catch(g){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,g,x,z,u,H,J,D,G,V,U,Y){D=null!=D?D:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var O=this.editor.graph.isSelectionEmpty();g=null!=g?g:O;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(qa){this.spinner.stop();try{this.saveCanvas(qa, -z?this.getFileData(!0,null,null,null,g,J):null,D,null==this.pages||0==this.pages.length,V)}catch(oa){this.handleError(oa)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(qa){this.spinner.stop();this.handleError(qa)}),null,g,d||1,f,x,null,null,u,H,G,U,Y)}catch(qa){this.spinner.stop(),this.handleError(qa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,f,g,x,z,u,H){f=null!=f?f:0;g=null!=g?g:0;var J= -[];try{var D=this.editor.graph;if(null!=d&&0<d.length){D.model.beginUpdate();try{var G=mxUtils.parseXml(d);d={};var V=this.editor.extractGraphModel(G.documentElement,null!=this.pages);if(null!=V&&"mxfile"==V.nodeName&&null!=this.pages){var U=V.getElementsByTagName("diagram");if(1==U.length&&!u){if(V=Editor.parseDiagramNode(U[0]),null!=this.currentPage&&(d[U[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var Y=U[0].getAttribute("name");null!=Y&&""!=Y&&this.editor.graph.model.execute(new RenamePage(this, -this.currentPage,Y))}}else if(0<U.length){u=[];var O=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[U[0].getAttribute("id")]=this.pages[0].getId(),V=Editor.parseDiagramNode(U[0]),x=!1,O=1);for(;O<U.length;O++){var qa=U[O].getAttribute("id");U[O].removeAttribute("id");var oa=this.updatePageRoot(new DiagramPage(U[O]));d[qa]=U[O].getAttribute("id");var aa=this.pages.length;null==oa.getName()&&oa.setName(mxResources.get("pageWithNumber",[aa+1]));D.model.execute(new ChangePage(this, -oa,oa,aa,!0));u.push(oa)}this.updatePageLinks(d,u)}}if(null!=V&&"mxGraphModel"===V.nodeName){J=D.importGraphModel(V,f,g,x);if(null!=J)for(O=0;O<J.length;O++)this.updatePageLinksForCell(d,J[O]);var da=D.parseBackgroundImage(V.getAttribute("backgroundImage"));if(null!=da&&null!=da.originalSrc){this.updateBackgroundPageLink(d,da);var ia=new ChangePageSetup(this,null,da);ia.ignoreColor=!0;D.model.execute(ia)}}H&&this.insertHandler(J,null,null,D.defaultVertexStyle,D.defaultEdgeStyle,!1,!0)}finally{D.model.endUpdate()}}}catch(L){if(z)throw L; -this.handleError(L)}return J};EditorUi.prototype.updatePageLinks=function(d,f){for(var g=0;g<f.length;g++)this.updatePageLinksForCell(d,f[g].root),null!=f[g].viewState&&this.updateBackgroundPageLink(d,f[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var g=d[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=g&&(f.originalSrc="data:page/id,"+g)}}catch(x){}};EditorUi.prototype.updatePageLinksForCell= -function(d,f){var g=document.createElement("div"),x=this.editor.graph,z=x.getLinkForCell(f);null!=z&&x.setLinkForCell(f,this.updatePageLink(d,z));if(x.isHtmlLabel(f)){g.innerHTML=x.sanitizeHtml(x.getLabel(f));for(var u=g.getElementsByTagName("a"),H=!1,J=0;J<u.length;J++)z=u[J].getAttribute("href"),null!=z&&(u[J].setAttribute("href",this.updatePageLink(d,z)),H=!0);H&&x.labelChanged(f,g.innerHTML)}for(J=0;J<x.model.getChildCount(f);J++)this.updatePageLinksForCell(d,x.model.getChildAt(f,J))};EditorUi.prototype.updatePageLink= -function(d,f){if(Graph.isPageLink(f)){var g=d[f.substring(f.indexOf(",")+1)];f=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==f.substring(0,17))try{var x=JSON.parse(f.substring(17));if(null!=x.actions){for(var z=0;z<x.actions.length;z++){var u=x.actions[z];if(null!=u.open&&Graph.isPageLink(u.open)){var H=u.open.substring(u.open.indexOf(",")+1);g=d[H];null!=g?u.open="data:page/id,"+g:null==this.getPageById(H)&&delete u.open}}f="data:action/json,"+JSON.stringify(x)}}catch(J){}return f}; -EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,f,g,x,z){x=null!=x?x:d.name;g=null!=g?g:mxUtils.bind(this,function(H){this.handleError(H)});var u=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var H=this.isRemoteVisioFormat(x);try{var J="UNKNOWN-VISIO",D=x.lastIndexOf(".");if(0<=D&&D<x.length)J=x.substring(D+1).toUpperCase();else{var G=x.lastIndexOf("/");0<= -G&&G<x.length&&(x=x.substring(G+1))}EditorUi.logEvent({category:J+"-MS-IMPORT-FILE",action:"filename_"+x,label:H?"remote":"local"})}catch(U){}if(H)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{H=new FormData;H.append("file1",d,x);var V=new XMLHttpRequest;V.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(x)?"?stencil=1":""));V.responseType="blob";this.addRemoteServiceSecurityCheck(V); -null!=z&&V.setRequestHeader("x-convert-custom",z);V.onreadystatechange=mxUtils.bind(this,function(){if(4==V.readyState)if(200<=V.status&&299>=V.status)try{var U=V.response;if("text/xml"==U.type){var Y=new FileReader;Y.onload=mxUtils.bind(this,function(O){try{f(O.target.result)}catch(qa){g({message:mxResources.get("errorLoadingFile")})}});Y.readAsText(U)}else this.doImportVisio(U,f,g,x)}catch(O){g(O)}else try{""==V.responseType||"text"==V.responseType?g({message:V.responseText}):(Y=new FileReader, -Y.onload=function(){g({message:JSON.parse(Y.result).Message})},Y.readAsText(V.response))}catch(O){g({})}});V.send(H)}else try{this.doImportVisio(d,f,g,x)}catch(U){g(U)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?u():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",u))};EditorUi.prototype.importGraphML=function(d,f,g){g=null!=g?g:mxUtils.bind(this,function(z){this.handleError(z)}); -var x=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(d,f,g)}catch(z){g(z)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?x():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",x))};EditorUi.prototype.exportVisio=function(d){var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(d)|| -this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.convertLucidChart=function(d,f,g){var x=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var z= -JSON.parse(d);f(LucidImporter.importState(z));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var u=[(new Date).toISOString(),"convertLucidChart",z];null!=z.state&&u.push(JSON.parse(z.state));if(null!=z.svgThumbs)for(var H=0;H<z.svgThumbs.length;H++)u.push(Editor.createSvgDataUri(z.svgThumbs[H]));null!=z.thumb&&u.push(z.thumb);console.log.apply(console,u)}}catch(J){}}catch(J){null!=window.console&&console.error(J),g(J)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})}); +d;else if("mxfile"==d.nodeName){var x=d.getElementsByTagName("diagram");if(0<x.length){g=x[0];var y=f.getGlobalVariable;f.getGlobalVariable=function(u){return"page"==u?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==u?1:y.apply(this,arguments)}}}null!=g&&(d=Editor.parseDiagramNode(g))}x=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(d)}catch(u){}finally{this.editor.graph=x}return d};EditorUi.prototype.getPngFileProperties=function(d){var f=1,g=0;if(null!= +d){if(d.hasAttribute("scale")){var x=parseFloat(d.getAttribute("scale"));!isNaN(x)&&0<x&&(f=x)}d.hasAttribute("border")&&(x=parseInt(d.getAttribute("border")),!isNaN(x)&&0<x&&(g=x))}return{scale:f,border:g}};EditorUi.prototype.getEmbeddedPng=function(d,f,g,x,y){try{var u=this.editor.graph,H=null!=u.themes&&"darkTheme"==u.defaultThemeName,J=null;if(null!=g&&0<g.length)u=this.createTemporaryGraph(H?u.getDefaultStylesheet():u.getStylesheet()),document.body.appendChild(u.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement, +!0),u),J=g;else if(H||null!=this.pages&&this.currentPage!=this.pages[0]){u=this.createTemporaryGraph(H?u.getDefaultStylesheet():u.getStylesheet());var D=u.getGlobalVariable;u.setBackgroundImage=this.editor.graph.setBackgroundImage;var G=this.pages[0];this.currentPage==G?u.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&u.setBackgroundImage(G.viewState.backgroundImage);u.getGlobalVariable=function(W){return"page"==W?G.getName():"pagenumber"==W?1:D.apply(this, +arguments)};document.body.appendChild(u.container);u.model.setRoot(G.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(W){try{null==J&&(J=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var T=W.toDataURL("image/png");T=Editor.writeGraphModelToPng(T,"tEXt","mxfile",encodeURIComponent(J));d(T.substring(T.lastIndexOf(",")+1));u!=this.editor.graph&&u.container.parentNode.removeChild(u.container)}catch(Z){null!=f&&f(Z)}}),null,null,null,mxUtils.bind(this,function(W){null!=f&& +f(W)}),null,null,x,null,u.shadowVisible,null,u,y,null,null,null,"diagram",null)}catch(W){null!=f&&f(W)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,g,x,y,u,H,J,D,G,W,T,Z){J=null!=J?J:!0;W=null!=W?W:0;H=null!=D?D:f.background;H==mxConstants.NONE&&(H=null);u=f.getSvg(H,G,W,null,null,u,null,null,null,f.shadowVisible||T,null,Z,"diagram");(f.shadowVisible||T)&&f.addSvgShadow(u,null,null,0==W);null!=d&&u.setAttribute("content",d);null!=g&&u.setAttribute("resource",g);var N=mxUtils.bind(this,function(qa){qa= +(x?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(qa);null!=y&&y(qa);return qa});f.mathEnabled&&this.editor.addMathCss(u);if(null!=y)this.embedFonts(u,mxUtils.bind(this,function(qa){J?this.editor.convertImages(qa,mxUtils.bind(this,function(oa){N(oa)})):N(qa)}));else return N(u)};EditorUi.prototype.embedFonts=function(d,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss), +this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(d,g),f(d)}catch(x){f(d)}}))}catch(g){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,g,x,y,u,H,J,D,G,W,T,Z){D=null!=D?D:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var N=this.editor.graph.isSelectionEmpty();g=null!=g?g:N;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(qa){this.spinner.stop();try{this.saveCanvas(qa, +y?this.getFileData(!0,null,null,null,g,J):null,D,null==this.pages||0==this.pages.length,W)}catch(oa){this.handleError(oa)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(qa){this.spinner.stop();this.handleError(qa)}),null,g,d||1,f,x,null,null,u,H,G,T,Z)}catch(qa){this.spinner.stop(),this.handleError(qa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,f,g,x,y,u,H){f=null!=f?f:0;g=null!=g?g:0;var J= +[];try{var D=this.editor.graph;if(null!=d&&0<d.length){D.model.beginUpdate();try{var G=mxUtils.parseXml(d);d={};var W=this.editor.extractGraphModel(G.documentElement,null!=this.pages);if(null!=W&&"mxfile"==W.nodeName&&null!=this.pages){var T=W.getElementsByTagName("diagram");if(1==T.length&&!u){if(W=Editor.parseDiagramNode(T[0]),null!=this.currentPage&&(d[T[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var Z=T[0].getAttribute("name");null!=Z&&""!=Z&&this.editor.graph.model.execute(new RenamePage(this, +this.currentPage,Z))}}else if(0<T.length){u=[];var N=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[T[0].getAttribute("id")]=this.pages[0].getId(),W=Editor.parseDiagramNode(T[0]),x=!1,N=1);for(;N<T.length;N++){var qa=T[N].getAttribute("id");T[N].removeAttribute("id");var oa=this.updatePageRoot(new DiagramPage(T[N]));d[qa]=T[N].getAttribute("id");var S=this.pages.length;null==oa.getName()&&oa.setName(mxResources.get("pageWithNumber",[S+1]));D.model.execute(new ChangePage(this, +oa,oa,S,!0));u.push(oa)}this.updatePageLinks(d,u)}}if(null!=W&&"mxGraphModel"===W.nodeName){J=D.importGraphModel(W,f,g,x);if(null!=J)for(N=0;N<J.length;N++)this.updatePageLinksForCell(d,J[N]);var fa=D.parseBackgroundImage(W.getAttribute("backgroundImage"));if(null!=fa&&null!=fa.originalSrc){this.updateBackgroundPageLink(d,fa);var ia=new ChangePageSetup(this,null,fa);ia.ignoreColor=!0;D.model.execute(ia)}}H&&this.insertHandler(J,null,null,D.defaultVertexStyle,D.defaultEdgeStyle,!1,!0)}finally{D.model.endUpdate()}}}catch(M){if(y)throw M; +this.handleError(M)}return J};EditorUi.prototype.updatePageLinks=function(d,f){for(var g=0;g<f.length;g++)this.updatePageLinksForCell(d,f[g].root),null!=f[g].viewState&&this.updateBackgroundPageLink(d,f[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var g=d[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=g&&(f.originalSrc="data:page/id,"+g)}}catch(x){}};EditorUi.prototype.updatePageLinksForCell= +function(d,f){var g=document.createElement("div"),x=this.editor.graph,y=x.getLinkForCell(f);null!=y&&x.setLinkForCell(f,this.updatePageLink(d,y));if(x.isHtmlLabel(f)){g.innerHTML=x.sanitizeHtml(x.getLabel(f));for(var u=g.getElementsByTagName("a"),H=!1,J=0;J<u.length;J++)y=u[J].getAttribute("href"),null!=y&&(u[J].setAttribute("href",this.updatePageLink(d,y)),H=!0);H&&x.labelChanged(f,g.innerHTML)}for(J=0;J<x.model.getChildCount(f);J++)this.updatePageLinksForCell(d,x.model.getChildAt(f,J))};EditorUi.prototype.updatePageLink= +function(d,f){if(Graph.isPageLink(f)){var g=d[f.substring(f.indexOf(",")+1)];f=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==f.substring(0,17))try{var x=JSON.parse(f.substring(17));if(null!=x.actions){for(var y=0;y<x.actions.length;y++){var u=x.actions[y];if(null!=u.open&&Graph.isPageLink(u.open)){var H=u.open.substring(u.open.indexOf(",")+1);g=d[H];null!=g?u.open="data:page/id,"+g:null==this.getPageById(H)&&delete u.open}}f="data:action/json,"+JSON.stringify(x)}}catch(J){}return f}; +EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,f,g,x,y){x=null!=x?x:d.name;g=null!=g?g:mxUtils.bind(this,function(H){this.handleError(H)});var u=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var H=this.isRemoteVisioFormat(x);try{var J="UNKNOWN-VISIO",D=x.lastIndexOf(".");if(0<=D&&D<x.length)J=x.substring(D+1).toUpperCase();else{var G=x.lastIndexOf("/");0<= +G&&G<x.length&&(x=x.substring(G+1))}EditorUi.logEvent({category:J+"-MS-IMPORT-FILE",action:"filename_"+x,label:H?"remote":"local"})}catch(T){}if(H)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{H=new FormData;H.append("file1",d,x);var W=new XMLHttpRequest;W.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(x)?"?stencil=1":""));W.responseType="blob";this.addRemoteServiceSecurityCheck(W); +null!=y&&W.setRequestHeader("x-convert-custom",y);W.onreadystatechange=mxUtils.bind(this,function(){if(4==W.readyState)if(200<=W.status&&299>=W.status)try{var T=W.response;if("text/xml"==T.type){var Z=new FileReader;Z.onload=mxUtils.bind(this,function(N){try{f(N.target.result)}catch(qa){g({message:mxResources.get("errorLoadingFile")})}});Z.readAsText(T)}else this.doImportVisio(T,f,g,x)}catch(N){g(N)}else try{""==W.responseType||"text"==W.responseType?g({message:W.responseText}):(Z=new FileReader, +Z.onload=function(){g({message:JSON.parse(Z.result).Message})},Z.readAsText(W.response))}catch(N){g({})}});W.send(H)}else try{this.doImportVisio(d,f,g,x)}catch(T){g(T)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?u():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",u))};EditorUi.prototype.importGraphML=function(d,f,g){g=null!=g?g:mxUtils.bind(this,function(y){this.handleError(y)}); +var x=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(d,f,g)}catch(y){g(y)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?x():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",x))};EditorUi.prototype.exportVisio=function(d){var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(d)|| +this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.convertLucidChart=function(d,f,g){var x=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var y= +JSON.parse(d);f(LucidImporter.importState(y));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var u=[(new Date).toISOString(),"convertLucidChart",y];null!=y.state&&u.push(JSON.parse(y.state));if(null!=y.svgThumbs)for(var H=0;H<y.svgThumbs.length;H++)u.push(Editor.createSvgDataUri(y.svgThumbs[H]));null!=y.thumb&&u.push(y.thumb);console.log.apply(console,u)}}catch(J){}}catch(J){null!=window.console&&console.error(J),g(J)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})}); "undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(x,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",x)})})})}):mxscript("js/extensions.min.js",x))};EditorUi.prototype.generateMermaidImage=function(d, -f,g,x){var z=this,u=function(){try{this.loadingMermaid=!1,f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig),f.securityLevel="strict",f.startOnLoad=!1,Editor.isDarkMode()&&(f.theme="dark"),mermaid.mermaidAPI.initialize(f),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(H){try{if(mxClient.IS_IE||mxClient.IS_IE11)H=H.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var J=mxUtils.parseXml(H).getElementsByTagName("svg"); -if(0<J.length){var D=parseFloat(J[0].getAttribute("width")),G=parseFloat(J[0].getAttribute("height"));if(isNaN(D)||isNaN(G))try{var V=J[0].getAttribute("viewBox").split(/\s+/);D=parseFloat(V[2]);G=parseFloat(V[3])}catch(U){D=D||100,G=G||100}g(z.convertDataUri(Editor.createSvgDataUri(H)),D,G)}else x({message:mxResources.get("invalidInput")})}catch(U){x(U)}})}catch(H){x(H)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?u():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js", -u):mxscript("js/extensions.min.js",u))};EditorUi.prototype.generatePlantUmlImage=function(d,f,g,x){function z(J,D,G){c1=J>>2;c2=(J&3)<<4|D>>4;c3=(D&15)<<2|G>>6;c4=G&63;r="";r+=u(c1&63);r+=u(c2&63);r+=u(c3&63);return r+=u(c4&63)}function u(J){if(10>J)return String.fromCharCode(48+J);J-=10;if(26>J)return String.fromCharCode(65+J);J-=26;if(26>J)return String.fromCharCode(97+J);J-=26;return 0==J?"-":1==J?"_":"?"}var H=new XMLHttpRequest;H.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/": -PLANT_URL+"/svg/")+function(J){r="";for(i=0;i<J.length;i+=3)r=i+2==J.length?r+z(J.charCodeAt(i),J.charCodeAt(i+1),0):i+1==J.length?r+z(J.charCodeAt(i),0,0):r+z(J.charCodeAt(i),J.charCodeAt(i+1),J.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(H.responseType="blob");H.onload=function(J){if(200<=this.status&&300>this.status)if("txt"==f)g(this.response);else{var D=new FileReader;D.readAsDataURL(this.response);D.onloadend=function(G){var V=new Image;V.onload= -function(){try{var U=V.width,Y=V.height;if(0==U&&0==Y){var O=D.result,qa=O.indexOf(","),oa=decodeURIComponent(escape(atob(O.substring(qa+1)))),aa=mxUtils.parseXml(oa).getElementsByTagName("svg");0<aa.length&&(U=parseFloat(aa[0].getAttribute("width")),Y=parseFloat(aa[0].getAttribute("height")))}g(D.result,U,Y)}catch(da){x(da)}};V.src=D.result};D.onerror=function(G){x(G)}}else x(J)};H.onerror=function(J){x(J)};H.send()};EditorUi.prototype.insertAsPreText=function(d,f,g){var x=this.editor.graph,z=null; -x.getModel().beginUpdate();try{z=x.insertVertex(null,null,"<pre>"+d+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),x.updateCellSize(z,!0)}finally{x.getModel().endUpdate()}return z};EditorUi.prototype.insertTextAt=function(d,f,g,x,z,u,H,J){u=null!=u?u:!0;H=null!=H?H:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g," "), -mxUtils.bind(this,function(Y){4==Y.readyState&&200<=Y.status&&299>=Y.status&&this.editor.graph.setSelectionCells(this.insertTextAt(Y.responseText,f,g,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(z||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var D=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var G=Editor.extractGraphModelFromPdf(d);if(null!=G&&0<G.length)return this.importXml(G,f,g,u,!0,J)}if(Editor.isPngDataUrl(d)&&(G=Editor.extractGraphModelFromPng(d), -null!=G&&0<G.length))return this.importXml(G,f,g,u,!0,J);if("data:image/svg+xml;"==d.substring(0,19))try{G=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(G=d.substring(d.indexOf(",")+1),G=window.atob&&!mxClient.IS_SF?atob(G):Base64.decode(G,!0)):G=decodeURIComponent(d.substring(d.indexOf(",")+1));var V=this.importXml(G,f,g,u,!0,J);if(0<V.length)return V}catch(Y){}this.loadImage(d,mxUtils.bind(this,function(Y){if("data:"==d.substring(0,5))this.resizeImage(Y,d,mxUtils.bind(this,function(oa,aa, -da){D.setSelectionCell(D.insertVertex(null,null,"",D.snap(f),D.snap(g),aa,da,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(oa)+";"))}),H,this.maxImageSize);else{var O=Math.min(1,Math.min(this.maxImageSize/Y.width,this.maxImageSize/Y.height)),qa=Math.round(Y.width*O);Y=Math.round(Y.height*O);D.setSelectionCell(D.insertVertex(null,null,"",D.snap(f),D.snap(g),qa,Y,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+ -d+";"))}}),mxUtils.bind(this,function(){var Y=null;D.getModel().beginUpdate();try{Y=D.insertVertex(D.getDefaultParent(),null,d,D.snap(f),D.snap(g),1,1,"text;"+(x?"html=1;":"")),D.updateCellSize(Y),D.fireEvent(new mxEventObject("textInserted","cells",[Y]))}finally{D.getModel().endUpdate()}D.setSelectionCell(Y)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,g,u,null,J);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this, -function(Y){this.editor.graph.setSelectionCells(this.importXml(Y,f,g,u,null,J))}),mxUtils.bind(this,function(Y){this.handleError(Y)}));else{D=this.editor.graph;z=null;D.getModel().beginUpdate();try{z=D.insertVertex(D.getDefaultParent(),null,"",D.snap(f),D.snap(g),1,1,"text;whiteSpace=wrap;"+(x?"html=1;":""));D.fireEvent(new mxEventObject("textInserted","cells",[z]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+ -"...");z.value=d;D.updateCellSize(z);if(0<this.maxTextWidth&&z.geometry.width>this.maxTextWidth){var U=D.getPreferredSizeForCell(z,this.maxTextWidth);z.geometry.width=U.width;z.geometry.height=U.height}Graph.isLink(z.value)&&D.setLinkForCell(z,z.value);z.geometry.width+=D.gridSize;z.geometry.height+=D.gridSize}finally{D.getModel().endUpdate()}return[z]}}return[]};EditorUi.prototype.formatFileSize=function(d){var f=-1;do d/=1024,f++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]}; +f,g,x){var y=this,u=function(){try{this.loadingMermaid=!1,f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig),f.securityLevel="strict",f.startOnLoad=!1,Editor.isDarkMode()&&(f.theme="dark"),mermaid.mermaidAPI.initialize(f),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(H){try{if(mxClient.IS_IE||mxClient.IS_IE11)H=H.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var J=mxUtils.parseXml(H).getElementsByTagName("svg"); +if(0<J.length){var D=parseFloat(J[0].getAttribute("width")),G=parseFloat(J[0].getAttribute("height"));if(isNaN(D)||isNaN(G))try{var W=J[0].getAttribute("viewBox").split(/\s+/);D=parseFloat(W[2]);G=parseFloat(W[3])}catch(T){D=D||100,G=G||100}g(y.convertDataUri(Editor.createSvgDataUri(H)),D,G)}else x({message:mxResources.get("invalidInput")})}catch(T){x(T)}})}catch(H){x(H)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?u():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js", +u):mxscript("js/extensions.min.js",u))};EditorUi.prototype.generatePlantUmlImage=function(d,f,g,x){function y(J,D,G){c1=J>>2;c2=(J&3)<<4|D>>4;c3=(D&15)<<2|G>>6;c4=G&63;r="";r+=u(c1&63);r+=u(c2&63);r+=u(c3&63);return r+=u(c4&63)}function u(J){if(10>J)return String.fromCharCode(48+J);J-=10;if(26>J)return String.fromCharCode(65+J);J-=26;if(26>J)return String.fromCharCode(97+J);J-=26;return 0==J?"-":1==J?"_":"?"}var H=new XMLHttpRequest;H.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/": +PLANT_URL+"/svg/")+function(J){r="";for(i=0;i<J.length;i+=3)r=i+2==J.length?r+y(J.charCodeAt(i),J.charCodeAt(i+1),0):i+1==J.length?r+y(J.charCodeAt(i),0,0):r+y(J.charCodeAt(i),J.charCodeAt(i+1),J.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(H.responseType="blob");H.onload=function(J){if(200<=this.status&&300>this.status)if("txt"==f)g(this.response);else{var D=new FileReader;D.readAsDataURL(this.response);D.onloadend=function(G){var W=new Image;W.onload= +function(){try{var T=W.width,Z=W.height;if(0==T&&0==Z){var N=D.result,qa=N.indexOf(","),oa=decodeURIComponent(escape(atob(N.substring(qa+1)))),S=mxUtils.parseXml(oa).getElementsByTagName("svg");0<S.length&&(T=parseFloat(S[0].getAttribute("width")),Z=parseFloat(S[0].getAttribute("height")))}g(D.result,T,Z)}catch(fa){x(fa)}};W.src=D.result};D.onerror=function(G){x(G)}}else x(J)};H.onerror=function(J){x(J)};H.send()};EditorUi.prototype.insertAsPreText=function(d,f,g){var x=this.editor.graph,y=null;x.getModel().beginUpdate(); +try{y=x.insertVertex(null,null,"<pre>"+d+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),x.updateCellSize(y,!0)}finally{x.getModel().endUpdate()}return y};EditorUi.prototype.insertTextAt=function(d,f,g,x,y,u,H,J){u=null!=u?u:!0;H=null!=H?H:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g," "),mxUtils.bind(this,function(Z){4== +Z.readyState&&200<=Z.status&&299>=Z.status&&this.editor.graph.setSelectionCells(this.insertTextAt(Z.responseText,f,g,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(y||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var D=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var G=Editor.extractGraphModelFromPdf(d);if(null!=G&&0<G.length)return this.importXml(G,f,g,u,!0,J)}if(Editor.isPngDataUrl(d)&&(G=Editor.extractGraphModelFromPng(d),null!=G&&0<G.length))return this.importXml(G, +f,g,u,!0,J);if("data:image/svg+xml;"==d.substring(0,19))try{G=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(G=d.substring(d.indexOf(",")+1),G=window.atob&&!mxClient.IS_SF?atob(G):Base64.decode(G,!0)):G=decodeURIComponent(d.substring(d.indexOf(",")+1));var W=this.importXml(G,f,g,u,!0,J);if(0<W.length)return W}catch(Z){}this.loadImage(d,mxUtils.bind(this,function(Z){if("data:"==d.substring(0,5))this.resizeImage(Z,d,mxUtils.bind(this,function(oa,S,fa){D.setSelectionCell(D.insertVertex(null,null, +"",D.snap(f),D.snap(g),S,fa,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(oa)+";"))}),H,this.maxImageSize);else{var N=Math.min(1,Math.min(this.maxImageSize/Z.width,this.maxImageSize/Z.height)),qa=Math.round(Z.width*N);Z=Math.round(Z.height*N);D.setSelectionCell(D.insertVertex(null,null,"",D.snap(f),D.snap(g),qa,Z,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+ +d+";"))}}),mxUtils.bind(this,function(){var Z=null;D.getModel().beginUpdate();try{Z=D.insertVertex(D.getDefaultParent(),null,d,D.snap(f),D.snap(g),1,1,"text;"+(x?"html=1;":"")),D.updateCellSize(Z),D.fireEvent(new mxEventObject("textInserted","cells",[Z]))}finally{D.getModel().endUpdate()}D.setSelectionCell(Z)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,g,u,null,J);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this, +function(Z){this.editor.graph.setSelectionCells(this.importXml(Z,f,g,u,null,J))}),mxUtils.bind(this,function(Z){this.handleError(Z)}));else{D=this.editor.graph;y=null;D.getModel().beginUpdate();try{y=D.insertVertex(D.getDefaultParent(),null,"",D.snap(f),D.snap(g),1,1,"text;whiteSpace=wrap;"+(x?"html=1;":""));D.fireEvent(new mxEventObject("textInserted","cells",[y]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+ +"...");y.value=d;D.updateCellSize(y);if(0<this.maxTextWidth&&y.geometry.width>this.maxTextWidth){var T=D.getPreferredSizeForCell(y,this.maxTextWidth);y.geometry.width=T.width;y.geometry.height=T.height}Graph.isLink(y.value)&&D.setLinkForCell(y,y.value);y.geometry.width+=D.gridSize;y.geometry.height+=D.gridSize}finally{D.getModel().endUpdate()}return[y]}}return[]};EditorUi.prototype.formatFileSize=function(d){var f=-1;do d/=1024,f++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]}; EditorUi.prototype.convertDataUri=function(d){if("data:"==d.substring(0,5)){var f=d.indexOf(";");0<f&&(d=d.substring(0,f)+d.substring(d.indexOf(",",f+1)))}return d};EditorUi.prototype.isRemoteFileFormat=function(d,f){return/("contentType":\s*"application\/gliffy\+json")/.test(d)};EditorUi.prototype.isLucidChartData=function(d){return null!=d&&('{"state":"{\\"Properties\\":'==d.substring(0,26)||'{"Properties":'==d.substring(0,14))};EditorUi.prototype.importLocalFile=function(d,f){if(d&&Graph.fileSupport){if(null== this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display="none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(H,J){StorageFile.listFiles(this, "F",H,J)});window.openBrowserFile=mxUtils.bind(this,function(H,J,D){StorageFile.getFileContent(this,H,J,D)});window.deleteBrowserFile=mxUtils.bind(this,function(H,J,D){StorageFile.deleteFile(this,H,J,D)});if(!f){var x=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(H){this.hideDialog(H)}));window.openFile.setConsumer(mxUtils.bind(this,function(H,J){null!=J&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(J)?(H=new Blob([H],{type:"application/octet-stream"}), -this.importVisio(H,mxUtils.bind(this,function(D){this.importXml(D,0,0,!0)}),null,J)):this.editor.graph.setSelectionCells(this.importXml(H,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var z=this.dialog,u=z.close;this.dialog.close=mxUtils.bind(this,function(H){Editor.useLocalStorage=x;u.apply(z,arguments);H&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}}; -EditorUi.prototype.importZipFile=function(d,f,g){var x=this,z=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(u){if(mxUtils.isEmptyObject(u.files))g();else{var H=0,J,D=!1;u.forEach(function(G,V){G=V.name.toLowerCase();"diagram/diagram.xml"==G?(D=!0,V.async("string").then(function(U){0==U.indexOf("<mxfile ")?f(U):g()})):0==G.indexOf("versions/")&&(G=parseInt(G.substr(9)),G>H&&(H=G,J=V))});0<H?J.async("string").then(function(G){(new XMLHttpRequest).upload&& -x.isRemoteFileFormat(G,d.name)?x.isOffline()?x.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):x.parseFileData(G,mxUtils.bind(this,function(V){4==V.readyState&&(200<=V.status&&299>=V.status?f(V.responseText):g())}),d.name):g()}):D||g()}},function(u){g(u)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?z():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",z))};EditorUi.prototype.importFile=function(d,f,g,x,z,u,H,J,D,G,V,U){G=null!= -G?G:!0;var Y=!1,O=null,qa=mxUtils.bind(this,function(oa){var aa=null;null!=oa&&"<mxlibrary"==oa.substring(0,10)?this.loadLibrary(new LocalLibrary(this,oa,H)):aa=this.importXml(oa,g,x,G,null,null!=U?mxEvent.isControlDown(U):null);null!=J&&J(aa)});"image"==f.substring(0,5)?(D=!1,"image/png"==f.substring(0,9)&&(f=V?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(O=this.importXml(f,g,x,G,null,null!=U?mxEvent.isControlDown(U):null),D=!0)),D||(f=this.editor.graph,D=d.indexOf(";"),0<D&&(d=d.substring(0, -D)+d.substring(d.indexOf(",",D+1))),G&&f.isGridEnabled()&&(g=f.snap(g),x=f.snap(x)),O=[f.insertVertex(null,null,"",g,x,z,u,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";")])):/(\.*<graphml )/.test(d)?(Y=!0,this.importGraphML(d,qa)):null!=D&&null!=H&&(/(\.v(dx|sdx?))($|\?)/i.test(H)||/(\.vs(x|sx?))($|\?)/i.test(H))?(Y=!0,this.importVisio(D,qa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,H)?this.isOffline()? -this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(Y=!0,z=mxUtils.bind(this,function(oa){4==oa.readyState&&(200<=oa.status&&299>=oa.status?qa(oa.responseText):null!=J&&J(null))}),null!=d?this.parseFileData(d,z,H):this.parseFile(D,z,H)):0==d.indexOf("PK")&&null!=D?(Y=!0,this.importZipFile(D,qa,mxUtils.bind(this,function(){O=this.insertTextAt(this.validateFileData(d),g,x,!0,null,G);J(O)}))):/(\.v(sd|dx))($|\?)/i.test(H)||/(\.vs(s|x))($|\?)/i.test(H)||(O=this.insertTextAt(this.validateFileData(d), -g,x,!0,null,G,null,null!=U?mxEvent.isControlDown(U):null));Y||null==J||J(O);return O};EditorUi.prototype.importFiles=function(d,f,g,x,z,u,H,J,D,G,V,U,Y){x=null!=x?x:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var O=null!=f&&null!=g,qa=!0;f=null!=f?f:0;g=null!=g?g:0;var oa=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var aa=V||this.resampleThreshold,da=0;da<d.length;da++)if("image/svg"!==d[da].type.substring(0,9)&&"image/"===d[da].type.substring(0,6)&&d[da].size>aa){oa=!0;break}var ia=mxUtils.bind(this, -function(){var L=this.editor.graph,Z=L.gridSize;z=null!=z?z:mxUtils.bind(this,function(F,R,W,T,ba,ha,ra,ta,ma){try{return null!=F&&"<mxlibrary"==F.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,F,ra)),null):this.isCompatibleString(F)&&1==d.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,F,ra,!0)),null):this.importFile(F,R,W,T,ba,ha,ra,ta,ma,O,U,Y)}catch(pa){return this.handleError(pa),null}});u=null!=u?u:mxUtils.bind(this, -function(F){L.setSelectionCells(F)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var P=d.length,ca=P,ja=[],ka=mxUtils.bind(this,function(F,R){ja[F]=R;if(0==--ca){this.spinner.stop();if(null!=J)J(ja);else{var W=[];L.getModel().beginUpdate();try{for(F=0;F<ja.length;F++){var T=ja[F]();null!=T&&(W=W.concat(T))}}finally{L.getModel().endUpdate()}}u(W)}}),q=0;q<P;q++)mxUtils.bind(this,function(F){var R=d[F];if(null!=R){var W=new FileReader;W.onload=mxUtils.bind(this,function(T){if(null== -H||H(R))if("image/"==R.type.substring(0,6))if("image/svg"==R.type.substring(0,9)){var ba=Graph.clipSvgDataUri(T.target.result),ha=ba.indexOf(",");ha=decodeURIComponent(escape(atob(ba.substring(ha+1))));var ra=mxUtils.parseXml(ha);ha=ra.getElementsByTagName("svg");if(0<ha.length){ha=ha[0];var ta=U?null:ha.getAttribute("content");null!=ta&&"<"!=ta.charAt(0)&&"%"!=ta.charAt(0)&&(ta=unescape(window.atob?atob(ta):Base64.decode(ta,!0)));null!=ta&&"%"==ta.charAt(0)&&(ta=decodeURIComponent(ta));null==ta|| -"<mxfile "!==ta.substring(0,8)&&"<mxGraphModel "!==ta.substring(0,14)?ka(F,mxUtils.bind(this,function(){try{if(null!=ra){var za=ra.getElementsByTagName("svg");if(0<za.length){var Ba=za[0],Ia=Ba.getAttribute("width"),Aa=Ba.getAttribute("height");Ia=null!=Ia&&"%"!=Ia.charAt(Ia.length-1)?parseFloat(Ia):NaN;Aa=null!=Aa&&"%"!=Aa.charAt(Aa.length-1)?parseFloat(Aa):NaN;var Ka=Ba.getAttribute("viewBox");if(null==Ka||0==Ka.length)Ba.setAttribute("viewBox","0 0 "+Ia+" "+Aa);else if(isNaN(Ia)||isNaN(Aa)){var Da= -Ka.split(" ");3<Da.length&&(Ia=parseFloat(Da[2]),Aa=parseFloat(Da[3]))}ba=Editor.createSvgDataUri(mxUtils.getXml(Ba));var Ra=Math.min(1,Math.min(x/Math.max(1,Ia)),x/Math.max(1,Aa)),Qa=z(ba,R.type,f+F*Z,g+F*Z,Math.max(1,Math.round(Ia*Ra)),Math.max(1,Math.round(Aa*Ra)),R.name);if(isNaN(Ia)||isNaN(Aa)){var Ta=new Image;Ta.onload=mxUtils.bind(this,function(){Ia=Math.max(1,Ta.width);Aa=Math.max(1,Ta.height);Qa[0].geometry.width=Ia;Qa[0].geometry.height=Aa;Ba.setAttribute("viewBox","0 0 "+Ia+" "+Aa);ba= -Editor.createSvgDataUri(mxUtils.getXml(Ba));var Za=ba.indexOf(";");0<Za&&(ba=ba.substring(0,Za)+ba.substring(ba.indexOf(",",Za+1)));L.setCellStyles("image",ba,[Qa[0]])});Ta.src=Editor.createSvgDataUri(mxUtils.getXml(Ba))}return Qa}}}catch(Za){}return null})):ka(F,mxUtils.bind(this,function(){return z(ta,"text/xml",f+F*Z,g+F*Z,0,0,R.name)}))}else ka(F,mxUtils.bind(this,function(){return null}))}else{ha=!1;if("image/png"==R.type){var ma=U?null:this.extractGraphModelFromPng(T.target.result);if(null!= -ma&&0<ma.length){var pa=new Image;pa.src=T.target.result;ka(F,mxUtils.bind(this,function(){return z(ma,"text/xml",f+F*Z,g+F*Z,pa.width,pa.height,R.name)}));ha=!0}}ha||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(T.target.result,mxUtils.bind(this,function(za){this.resizeImage(za, -T.target.result,mxUtils.bind(this,function(Ba,Ia,Aa){ka(F,mxUtils.bind(this,function(){if(null!=Ba&&Ba.length<G){var Ka=qa&&this.isResampleImageSize(R.size,V)?Math.min(1,Math.min(x/Ia,x/Aa)):1;return z(Ba,R.type,f+F*Z,g+F*Z,Math.round(Ia*Ka),Math.round(Aa*Ka),R.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),qa,x,V,R.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else ba=T.target.result,z(ba,R.type,f+F* -Z,g+F*Z,240,160,R.name,function(za){ka(F,function(){return za})},R)});/(\.v(dx|sdx?))($|\?)/i.test(R.name)||/(\.vs(x|sx?))($|\?)/i.test(R.name)?z(null,R.type,f+F*Z,g+F*Z,240,160,R.name,function(T){ka(F,function(){return T})},R):"image"==R.type.substring(0,5)||"application/pdf"==R.type?W.readAsDataURL(R):W.readAsText(R)}})(q)});if(oa){oa=[];for(da=0;da<d.length;da++)oa.push(d[da]);d=oa;this.confirmImageResize(function(L){qa=L;ia()},D)}else ia()};EditorUi.prototype.isBlankFile=function(){return null!= -this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,f){f=null!=f?f:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},x=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,z=function(u,H){if(u||f)mxSettings.setResizeImages(u?H:null),mxSettings.save();g();d(H)};null==x||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"), -function(u){z(u,!0)},function(u){z(u,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):z(!1,x)};EditorUi.prototype.parseFile=function(d,f,g){g=null!=g?g:d.name;var x=new FileReader;x.onload=mxUtils.bind(this,function(){this.parseFileData(x.result,f,g)});x.readAsText(d)}; -EditorUi.prototype.parseFileData=function(d,f,g){var x=new XMLHttpRequest;x.open("POST",OPEN_URL);x.setRequestHeader("Content-Type","application/x-www-form-urlencoded");x.onreadystatechange=function(){f(x)};x.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(z){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>f};EditorUi.prototype.resizeImage= -function(d,f,g,x,z,u,H){z=null!=z?z:this.maxImageSize;var J=Math.max(1,d.width),D=Math.max(1,d.height);if(x&&this.isResampleImageSize(null!=H?H:f.length,u))try{var G=Math.max(J/z,D/z);if(1<G){var V=Math.round(J/G),U=Math.round(D/G),Y=document.createElement("canvas");Y.width=V;Y.height=U;Y.getContext("2d").drawImage(d,0,0,V,U);var O=Y.toDataURL();if(O.length<f.length){var qa=document.createElement("canvas");qa.width=V;qa.height=U;var oa=qa.toDataURL();O!==oa&&(f=O,J=V,D=U)}}}catch(aa){}g(f,J,D)};EditorUi.prototype.extractGraphModelFromPng= -function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,g){try{var x=new Image;x.onload=function(){x.width=0<x.width?x.width:120;x.height=0<x.height?x.height:120;f(x)};null!=g&&(x.onerror=g);x.src=d}catch(z){if(null!=g)g(z);else throw z;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var C=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval= -mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var d=this,f=this.editor.graph;Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(aa){var da=aa.getEvent(); -return null==aa.getState()&&!mxEvent.isMouseEvent(da)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(da)&&(null==aa.getState()||mxEvent.isControlDown(da)||mxEvent.isShiftDown(da))});f.cellEditor.editPlantUmlData=function(aa,da,ia){var L=JSON.parse(ia);da=new TextareaDialog(d,mxResources.get("plantUml")+":",L.data,function(Z){null!=Z&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(Z,L.format,function(P,ca,ja){d.spinner.stop();f.getModel().beginUpdate();try{if("txt"== -L.format)f.labelChanged(aa,"<pre>"+P+"</pre>"),f.updateCellSize(aa,!0);else{f.setCellStyles("image",d.convertDataUri(P),[aa]);var ka=f.model.getGeometry(aa);null!=ka&&(ka=ka.clone(),ka.width=ca,ka.height=ja,f.cellsResized([aa],[ka],!1))}f.setAttributeForCell(aa,"plantUmlData",JSON.stringify({data:Z,format:L.format}))}finally{f.getModel().endUpdate()}},function(P){d.handleError(P)})},null,null,400,220);d.showDialog(da.container,420,300,!0,!0);da.init()};f.cellEditor.editMermaidData=function(aa,da, -ia){var L=JSON.parse(ia);da=new TextareaDialog(d,mxResources.get("mermaid")+":",L.data,function(Z){null!=Z&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(Z,L.config,function(P,ca,ja){d.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",P,[aa]);var ka=f.model.getGeometry(aa);null!=ka&&(ka=ka.clone(),ka.width=Math.max(ka.width,ca),ka.height=Math.max(ka.height,ja),f.cellsResized([aa],[ka],!1));f.setAttributeForCell(aa,"mermaidData",JSON.stringify({data:Z, -config:L.config},null,2))}finally{f.getModel().endUpdate()}},function(P){d.handleError(P)})},null,null,400,220);d.showDialog(da.container,420,300,!0,!0);da.init()};var g=f.cellEditor.startEditing;f.cellEditor.startEditing=function(aa,da){try{var ia=this.graph.getAttributeForCell(aa,"plantUmlData");if(null!=ia)this.editPlantUmlData(aa,da,ia);else if(ia=this.graph.getAttributeForCell(aa,"mermaidData"),null!=ia)this.editMermaidData(aa,da,ia);else{var L=f.getCellStyle(aa);"1"==mxUtils.getValue(L,"metaEdit", -"0")?d.showDataDialog(aa):g.apply(this,arguments)}}catch(Z){d.handleError(Z)}};f.getLinkTitle=function(aa){return d.getLinkTitle(aa)};f.customLinkClicked=function(aa){var da=!1;try{d.handleCustomLink(aa),da=!0}catch(ia){d.handleError(ia)}return da};var x=f.parseBackgroundImage;f.parseBackgroundImage=function(aa){var da=x.apply(this,arguments);null!=da&&null!=da.src&&Graph.isPageLink(da.src)&&(da={originalSrc:da.src});return da};var z=f.setBackgroundImage;f.setBackgroundImage=function(aa){null!=aa&& -null!=aa.originalSrc&&(aa=d.createImageForPageLink(aa.originalSrc,d.currentPage,this));z.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(aa,da){aa=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=aa){var ia=aa.indexOf(",");if(0<ia)for(aa=aa.substring(ia+ -1),da=da.getProperty("patches"),ia=0;ia<da.length;ia++)if(null!=da[ia][EditorUi.DIFF_UPDATE]&&null!=da[ia][EditorUi.DIFF_UPDATE][aa]||null!=da[ia][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(da[ia][EditorUi.DIFF_REMOVE],aa)){f.refreshBackgroundImage();break}}}));var u=f.getBackgroundImageObject;f.getBackgroundImageObject=function(aa,da){var ia=u.apply(this,arguments);if(null!=ia&&null!=ia.originalSrc)if(!da)ia={src:ia.originalSrc};else if(da&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var L= -this.stylesheet,Z=this.shapeForegroundColor,P=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";ia=d.createImageForPageLink(ia.originalSrc);this.shapeBackgroundColor=P;this.shapeForegroundColor=Z;this.stylesheet=L}return ia};var H=this.clearDefaultStyle;this.clearDefaultStyle=function(){H.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink= -"https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var J=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(aa){aa=null!=aa?aa:"";"1"==urlParams.dev&&(aa+=(0<aa.length?"&":"?")+"dev=1");return J.apply(this,arguments)};var D=f.addClickHandler;f.addClickHandler=function(aa,da,ia){var L=da;da=function(Z,P){if(null== -P){var ca=mxEvent.getSource(Z);"a"==ca.nodeName.toLowerCase()&&(P=ca.getAttribute("href"))}null!=P&&f.isCustomLink(P)&&(mxEvent.isTouchEvent(Z)||!mxEvent.isPopupTrigger(Z))&&f.customLinkClicked(P)&&mxEvent.consume(Z);null!=L&&L(Z,P)};D.call(this,aa,da,ia)};C.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var G=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(aa,da,ia){d.editor.graph.isSelectionEmpty()? -G.apply(this,arguments):d.menus.addMenuItems(aa,"delete - cut copy copyAsImage - duplicate".split(" "),null,ia)}}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,null!=d.pages&&1<d.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var V=f.getExportVariables;f.getExportVariables=function(){var aa=V.apply(this,arguments),da=d.getCurrentFile();null!=da&&(aa.filename=da.getTitle());aa.pagecount=null!=d.pages?d.pages.length:1;aa.page= -null!=d.currentPage?d.currentPage.getName():"";aa.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return aa};var U=f.getGlobalVariable;f.getGlobalVariable=function(aa){var da=d.getCurrentFile();return"filename"==aa&&null!=da?da.getTitle():"page"==aa&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==aa?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==aa?null!=d.pages?d.pages.length:1:U.apply(this,arguments)}; -var Y=f.labelLinkClicked;f.labelLinkClicked=function(aa,da,ia){var L=da.getAttribute("href");if(null==L||!f.isCustomLink(L)||!mxEvent.isTouchEvent(ia)&&mxEvent.isPopupTrigger(ia))Y.apply(this,arguments);else{if(!f.isEnabled()||null!=aa&&f.isCellLocked(aa.cell))f.customLinkClicked(L),f.getRubberband().reset();mxEvent.consume(ia)}};this.editor.getOrCreateFilename=function(){var aa=d.defaultFilename,da=d.getCurrentFile();null!=da&&(aa=null!=da.getTitle()?da.getTitle():aa);return aa};var O=this.actions.get("print"); -O.setEnabled(!mxClient.IS_IOS||!navigator.standalone);O.visible=O.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"), -this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED, -mxUtils.bind(this,function(aa){var da=f.cellEditor.text2,ia=null;null!=da&&(mxEvent.addListener(da,"dragleave",function(L){null!=ia&&(ia.parentNode.removeChild(ia),ia=null);L.stopPropagation();L.preventDefault()}),mxEvent.addListener(da,"dragover",mxUtils.bind(this,function(L){null==ia&&(!mxClient.IS_IE||10<document.documentMode)&&(ia=this.highlightElement(da));L.stopPropagation();L.preventDefault()})),mxEvent.addListener(da,"drop",mxUtils.bind(this,function(L){null!=ia&&(ia.parentNode.removeChild(ia), -ia=null);if(0<L.dataTransfer.files.length)this.importFiles(L.dataTransfer.files,0,0,this.maxImageSize,function(P,ca,ja,ka,q,F){f.insertImage(P,q,F)},function(){},function(P){return"image/"==P.type.substring(0,6)},function(P){for(var ca=0;ca<P.length;ca++)P[ca]()},mxEvent.isControlDown(L));else if(0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")){var Z=L.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(Z)?this.loadImage(decodeURIComponent(Z),mxUtils.bind(this,function(P){var ca= -Math.max(1,P.width);P=Math.max(1,P.height);var ja=this.maxImageSize;ja=Math.min(1,Math.min(ja/Math.max(1,ca)),ja/Math.max(1,P));f.insertImage(decodeURIComponent(Z),ca*ja,P*ja)})):document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(L.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(L.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/plain")); -L.stopPropagation();L.preventDefault()})))}));this.isSettingsEnabled()&&(O=this.editor.graph.view,O.setUnit(mxSettings.getUnit()),O.addListener("unitChanged",function(aa,da){mxSettings.setUnit(da.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,O.unit),this.refresh());if("1"==urlParams.styledev){O=document.getElementById("geFooter"); -null!=O&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),O.appendChild(this.styleInput), -this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(aa,da){0<this.editor.graph.getSelectionCount()?(aa=this.editor.graph.getSelectionCell(),aa=this.editor.graph.getModel().getStyle(aa),this.styleInput.value=aa||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var qa=this.isSelectionAllowed;this.isSelectionAllowed=function(aa){return mxEvent.getSource(aa)==this.styleInput?!0:qa.apply(this,arguments)}}O=document.getElementById("geInfo"); -null!=O&&O.parentNode.removeChild(O);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var oa=null;mxEvent.addListener(f.container,"dragleave",function(aa){f.isEnabled()&&(null!=oa&&(oa.parentNode.removeChild(oa),oa=null),aa.stopPropagation(),aa.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(aa){null==oa&&(!mxClient.IS_IE||10<document.documentMode)&&(oa=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip(); -aa.stopPropagation();aa.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(aa){null!=oa&&(oa.parentNode.removeChild(oa),oa=null);if(f.isEnabled()){var da=mxUtils.convertPoint(f.container,mxEvent.getClientX(aa),mxEvent.getClientY(aa)),ia=aa.dataTransfer.files,L=f.view.translate,Z=f.view.scale,P=da.x/Z-L.x,ca=da.y/Z-L.y;if(0<ia.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(aa)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null), -this.openFiles(ia,!0)):(mxEvent.isAltDown(aa)&&(ca=P=null),this.importFiles(ia,P,ca,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(aa),null,null,mxEvent.isShiftDown(aa),aa));else{mxEvent.isAltDown(aa)&&(ca=P=0);var ja=0<=mxUtils.indexOf(aa.dataTransfer.types,"text/uri-list")?aa.dataTransfer.getData("text/uri-list"):null;da=this.extractGraphModelFromEvent(aa,null!=this.pages);if(null!=da)f.setSelectionCells(this.importXml(da,P,ca,!0));else if(0<=mxUtils.indexOf(aa.dataTransfer.types,"text/html")){var ka= -aa.dataTransfer.getData("text/html");da=document.createElement("div");da.innerHTML=f.sanitizeHtml(ka);var q=null;ia=da.getElementsByTagName("img");null!=ia&&1==ia.length?(ka=ia[0].getAttribute("src"),null==ka&&(ka=ia[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(ka)||(q=!0)):(ia=da.getElementsByTagName("a"),null!=ia&&1==ia.length?ka=ia[0].getAttribute("href"):(da=da.getElementsByTagName("pre"),null!=da&&1==da.length&&(ka=mxUtils.getTextContent(da[0]))));var F=!0,R=mxUtils.bind(this, -function(){f.setSelectionCells(this.insertTextAt(ka,P,ca,!0,q,null,F,mxEvent.isControlDown(aa)))});q&&null!=ka&&ka.length>this.resampleThreshold?this.confirmImageResize(function(W){F=W;R()},mxEvent.isControlDown(aa)):R()}else null!=ja&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(ja)?this.loadImage(decodeURIComponent(ja),mxUtils.bind(this,function(W){var T=Math.max(1,W.width);W=Math.max(1,W.height);var ba=this.maxImageSize;ba=Math.min(1,Math.min(ba/Math.max(1,T)),ba/Math.max(1,W));f.setSelectionCell(f.insertVertex(null, -null,"",P,ca,T*ba,W*ba,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+ja+";"))}),mxUtils.bind(this,function(W){f.setSelectionCells(this.insertTextAt(ja,P,ca,!0))})):0<=mxUtils.indexOf(aa.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(aa.dataTransfer.getData("text/plain"),P,ca,!0))}}aa.stopPropagation();aa.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode(); -O=mxUtils.bind(this,function(){f.refresh();f.view.validateBackground();this.updateTabContainer()});this.addListener("darkModeChanged",O);this.addListener("sketchModeChanged",O);"dark"==uiTheme?(this.doSetDarkMode(!0),this.fireEvent(new mxEventObject("darkModeChanged"))):"min"==uiTheme&&"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches); -this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var g=f.clipboardData||f.originalEvent.clipboardData,x=!1,z=0;z<g.types.length;z++)if("text/"===g.types[z].substring(0,5)){x=!0;break}if(!x){var u=g.items;for(index in u){var H=u[index];if("file"===H.kind){if(d.isEditing())this.importFiles([H.getAsFile()],0,0,this.maxImageSize, -function(D,G,V,U,Y,O){d.insertImage(D,Y,O)},function(){},function(D){return"image/"==D.type.substring(0,6)},function(D){for(var G=0;G<D.length;G++)D[G]()});else{var J=this.editor.graph.getInsertPoint();this.importFiles([H.getAsFile()],J.x,J.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(D){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){g.innerHTML=" ";g.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph, -g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize= -"none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML=" ";var x=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(u){var H=mxEvent.getSource(u);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==H.nodeName||"TEXTAREA"==H.nodeName||224!=u.keyCode&& -(mxClient.IS_MAC||17!=u.keyCode)&&(!mxClient.IS_MAC||91!=u.keyCode&&93!=u.keyCode)||x||(g.style.left=f.container.scrollLeft+10+"px",g.style.top=f.container.scrollTop+10+"px",f.container.appendChild(g),x=!0,g.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(u){var H=u.keyCode;window.setTimeout(mxUtils.bind(this,function(){!x||224!=H&&17!=H&&91!=H&&93!=H||(x=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(), -g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(u){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g),d()}catch(H){this.handleError(H)}}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(u){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g,!0),d()}catch(H){this.handleError(H)}}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(u){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&& -(g.innerHTML=" ",g.focus(),null!=u.clipboardData&&this.pasteCells(u,g,!0,!0),mxEvent.isConsumed(u)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(u,g,!1,!0)}),0))}),!0);var z=this.isSelectionAllowed;this.isSelectionAllowed=function(u){return mxEvent.getSource(u)==g?!0:z.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(d,f){mxSettings.setUi(d);this.doSetCurrentTheme(d);this.fireEvent(new mxEventObject("currentThemeChanged"));f||this.alert(mxResources.get("restartForChangeRequired"))}; -EditorUi.prototype.doSetCurrentTheme=function(d){Editor.currentTheme!=d&&(Editor.currentTheme=d)};EditorUi.prototype.setSketchMode=function(d){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+ -(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }": +this.importVisio(H,mxUtils.bind(this,function(D){this.importXml(D,0,0,!0)}),null,J)):this.editor.graph.setSelectionCells(this.importXml(H,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var y=this.dialog,u=y.close;this.dialog.close=mxUtils.bind(this,function(H){Editor.useLocalStorage=x;u.apply(y,arguments);H&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}}; +EditorUi.prototype.importZipFile=function(d,f,g){var x=this,y=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(u){if(mxUtils.isEmptyObject(u.files))g();else{var H=0,J,D=!1;u.forEach(function(G,W){G=W.name.toLowerCase();"diagram/diagram.xml"==G?(D=!0,W.async("string").then(function(T){0==T.indexOf("<mxfile ")?f(T):g()})):0==G.indexOf("versions/")&&(G=parseInt(G.substr(9)),G>H&&(H=G,J=W))});0<H?J.async("string").then(function(G){(new XMLHttpRequest).upload&& +x.isRemoteFileFormat(G,d.name)?x.isOffline()?x.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):x.parseFileData(G,mxUtils.bind(this,function(W){4==W.readyState&&(200<=W.status&&299>=W.status?f(W.responseText):g())}),d.name):g()}):D||g()}},function(u){g(u)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?y():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",y))};EditorUi.prototype.importFile=function(d,f,g,x,y,u,H,J,D,G,W,T){G=null!= +G?G:!0;var Z=!1,N=null,qa=mxUtils.bind(this,function(oa){var S=null;null!=oa&&"<mxlibrary"==oa.substring(0,10)?this.loadLibrary(new LocalLibrary(this,oa,H)):S=this.importXml(oa,g,x,G,null,null!=T?mxEvent.isControlDown(T):null);null!=J&&J(S)});"image"==f.substring(0,5)?(D=!1,"image/png"==f.substring(0,9)&&(f=W?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(N=this.importXml(f,g,x,G,null,null!=T?mxEvent.isControlDown(T):null),D=!0)),D||(f=this.editor.graph,D=d.indexOf(";"),0<D&&(d=d.substring(0, +D)+d.substring(d.indexOf(",",D+1))),G&&f.isGridEnabled()&&(g=f.snap(g),x=f.snap(x)),N=[f.insertVertex(null,null,"",g,x,y,u,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";")])):/(\.*<graphml )/.test(d)?(Z=!0,this.importGraphML(d,qa)):null!=D&&null!=H&&(/(\.v(dx|sdx?))($|\?)/i.test(H)||/(\.vs(x|sx?))($|\?)/i.test(H))?(Z=!0,this.importVisio(D,qa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,H)?this.isOffline()? +this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(Z=!0,y=mxUtils.bind(this,function(oa){4==oa.readyState&&(200<=oa.status&&299>=oa.status?qa(oa.responseText):null!=J&&J(null))}),null!=d?this.parseFileData(d,y,H):this.parseFile(D,y,H)):0==d.indexOf("PK")&&null!=D?(Z=!0,this.importZipFile(D,qa,mxUtils.bind(this,function(){N=this.insertTextAt(this.validateFileData(d),g,x,!0,null,G);J(N)}))):/(\.v(sd|dx))($|\?)/i.test(H)||/(\.vs(s|x))($|\?)/i.test(H)||(N=this.insertTextAt(this.validateFileData(d), +g,x,!0,null,G,null,null!=T?mxEvent.isControlDown(T):null));Z||null==J||J(N);return N};EditorUi.prototype.importFiles=function(d,f,g,x,y,u,H,J,D,G,W,T,Z){x=null!=x?x:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var N=null!=f&&null!=g,qa=!0;f=null!=f?f:0;g=null!=g?g:0;var oa=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var S=W||this.resampleThreshold,fa=0;fa<d.length;fa++)if("image/svg"!==d[fa].type.substring(0,9)&&"image/"===d[fa].type.substring(0,6)&&d[fa].size>S){oa=!0;break}var ia=mxUtils.bind(this, +function(){var M=this.editor.graph,aa=M.gridSize;y=null!=y?y:mxUtils.bind(this,function(E,Q,Y,R,ba,ea,ra,ta,la){try{return null!=E&&"<mxlibrary"==E.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,E,ra)),null):this.isCompatibleString(E)&&1==d.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,E,ra,!0)),null):this.importFile(E,Q,Y,R,ba,ea,ra,ta,la,N,T,Z)}catch(pa){return this.handleError(pa),null}});u=null!=u?u:mxUtils.bind(this, +function(E){M.setSelectionCells(E)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var X=d.length,ja=X,ca=[],ka=mxUtils.bind(this,function(E,Q){ca[E]=Q;if(0==--ja){this.spinner.stop();if(null!=J)J(ca);else{var Y=[];M.getModel().beginUpdate();try{for(E=0;E<ca.length;E++){var R=ca[E]();null!=R&&(Y=Y.concat(R))}}finally{M.getModel().endUpdate()}}u(Y)}}),q=0;q<X;q++)mxUtils.bind(this,function(E){var Q=d[E];if(null!=Q){var Y=new FileReader;Y.onload=mxUtils.bind(this,function(R){if(null== +H||H(Q))if("image/"==Q.type.substring(0,6))if("image/svg"==Q.type.substring(0,9)){var ba=Graph.clipSvgDataUri(R.target.result),ea=ba.indexOf(",");ea=decodeURIComponent(escape(atob(ba.substring(ea+1))));var ra=mxUtils.parseXml(ea);ea=ra.getElementsByTagName("svg");if(0<ea.length){ea=ea[0];var ta=T?null:ea.getAttribute("content");null!=ta&&"<"!=ta.charAt(0)&&"%"!=ta.charAt(0)&&(ta=unescape(window.atob?atob(ta):Base64.decode(ta,!0)));null!=ta&&"%"==ta.charAt(0)&&(ta=decodeURIComponent(ta));null==ta|| +"<mxfile "!==ta.substring(0,8)&&"<mxGraphModel "!==ta.substring(0,14)?ka(E,mxUtils.bind(this,function(){try{if(null!=ra){var xa=ra.getElementsByTagName("svg");if(0<xa.length){var Ca=xa[0],Ia=Ca.getAttribute("width"),Aa=Ca.getAttribute("height");Ia=null!=Ia&&"%"!=Ia.charAt(Ia.length-1)?parseFloat(Ia):NaN;Aa=null!=Aa&&"%"!=Aa.charAt(Aa.length-1)?parseFloat(Aa):NaN;var La=Ca.getAttribute("viewBox");if(null==La||0==La.length)Ca.setAttribute("viewBox","0 0 "+Ia+" "+Aa);else if(isNaN(Ia)||isNaN(Aa)){var Da= +La.split(" ");3<Da.length&&(Ia=parseFloat(Da[2]),Aa=parseFloat(Da[3]))}ba=Editor.createSvgDataUri(mxUtils.getXml(Ca));var Sa=Math.min(1,Math.min(x/Math.max(1,Ia)),x/Math.max(1,Aa)),Ra=y(ba,Q.type,f+E*aa,g+E*aa,Math.max(1,Math.round(Ia*Sa)),Math.max(1,Math.round(Aa*Sa)),Q.name);if(isNaN(Ia)||isNaN(Aa)){var Ta=new Image;Ta.onload=mxUtils.bind(this,function(){Ia=Math.max(1,Ta.width);Aa=Math.max(1,Ta.height);Ra[0].geometry.width=Ia;Ra[0].geometry.height=Aa;Ca.setAttribute("viewBox","0 0 "+Ia+" "+Aa); +ba=Editor.createSvgDataUri(mxUtils.getXml(Ca));var Za=ba.indexOf(";");0<Za&&(ba=ba.substring(0,Za)+ba.substring(ba.indexOf(",",Za+1)));M.setCellStyles("image",ba,[Ra[0]])});Ta.src=Editor.createSvgDataUri(mxUtils.getXml(Ca))}return Ra}}}catch(Za){}return null})):ka(E,mxUtils.bind(this,function(){return y(ta,"text/xml",f+E*aa,g+E*aa,0,0,Q.name)}))}else ka(E,mxUtils.bind(this,function(){return null}))}else{ea=!1;if("image/png"==Q.type){var la=T?null:this.extractGraphModelFromPng(R.target.result);if(null!= +la&&0<la.length){var pa=new Image;pa.src=R.target.result;ka(E,mxUtils.bind(this,function(){return y(la,"text/xml",f+E*aa,g+E*aa,pa.width,pa.height,Q.name)}));ea=!0}}ea||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(R.target.result,mxUtils.bind(this,function(xa){this.resizeImage(xa, +R.target.result,mxUtils.bind(this,function(Ca,Ia,Aa){ka(E,mxUtils.bind(this,function(){if(null!=Ca&&Ca.length<G){var La=qa&&this.isResampleImageSize(Q.size,W)?Math.min(1,Math.min(x/Ia,x/Aa)):1;return y(Ca,Q.type,f+E*aa,g+E*aa,Math.round(Ia*La),Math.round(Aa*La),Q.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),qa,x,W,Q.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else ba=R.target.result,y(ba,Q.type,f+ +E*aa,g+E*aa,240,160,Q.name,function(xa){ka(E,function(){return xa})},Q)});/(\.v(dx|sdx?))($|\?)/i.test(Q.name)||/(\.vs(x|sx?))($|\?)/i.test(Q.name)?y(null,Q.type,f+E*aa,g+E*aa,240,160,Q.name,function(R){ka(E,function(){return R})},Q):"image"==Q.type.substring(0,5)||"application/pdf"==Q.type?Y.readAsDataURL(Q):Y.readAsText(Q)}})(q)});if(oa){oa=[];for(fa=0;fa<d.length;fa++)oa.push(d[fa]);d=oa;this.confirmImageResize(function(M){qa=M;ia()},D)}else ia()};EditorUi.prototype.isBlankFile=function(){return null!= +this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,f){f=null!=f?f:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},x=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,y=function(u,H){if(u||f)mxSettings.setResizeImages(u?H:null),mxSettings.save();g();d(H)};null==x||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"), +function(u){y(u,!0)},function(u){y(u,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):y(!1,x)};EditorUi.prototype.parseFile=function(d,f,g){g=null!=g?g:d.name;var x=new FileReader;x.onload=mxUtils.bind(this,function(){this.parseFileData(x.result,f,g)});x.readAsText(d)}; +EditorUi.prototype.parseFileData=function(d,f,g){var x=new XMLHttpRequest;x.open("POST",OPEN_URL);x.setRequestHeader("Content-Type","application/x-www-form-urlencoded");x.onreadystatechange=function(){f(x)};x.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(y){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>f};EditorUi.prototype.resizeImage= +function(d,f,g,x,y,u,H){y=null!=y?y:this.maxImageSize;var J=Math.max(1,d.width),D=Math.max(1,d.height);if(x&&this.isResampleImageSize(null!=H?H:f.length,u))try{var G=Math.max(J/y,D/y);if(1<G){var W=Math.round(J/G),T=Math.round(D/G),Z=document.createElement("canvas");Z.width=W;Z.height=T;Z.getContext("2d").drawImage(d,0,0,W,T);var N=Z.toDataURL();if(N.length<f.length){var qa=document.createElement("canvas");qa.width=W;qa.height=T;var oa=qa.toDataURL();N!==oa&&(f=N,J=W,D=T)}}}catch(S){}g(f,J,D)};EditorUi.prototype.extractGraphModelFromPng= +function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,g){try{var x=new Image;x.onload=function(){x.width=0<x.width?x.width:120;x.height=0<x.height?x.height:120;f(x)};null!=g&&(x.onerror=g);x.src=d}catch(y){if(null!=g)g(y);else throw y;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var C=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval= +mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var d=this,f=this.editor.graph;Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(S){var fa=S.getEvent(); +return null==S.getState()&&!mxEvent.isMouseEvent(fa)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(fa)&&(null==S.getState()||mxEvent.isControlDown(fa)||mxEvent.isShiftDown(fa))});f.cellEditor.editPlantUmlData=function(S,fa,ia){var M=JSON.parse(ia);fa=new TextareaDialog(d,mxResources.get("plantUml")+":",M.data,function(aa){null!=aa&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(aa,M.format,function(X,ja,ca){d.spinner.stop();f.getModel().beginUpdate();try{if("txt"== +M.format)f.labelChanged(S,"<pre>"+X+"</pre>"),f.updateCellSize(S,!0);else{f.setCellStyles("image",d.convertDataUri(X),[S]);var ka=f.model.getGeometry(S);null!=ka&&(ka=ka.clone(),ka.width=ja,ka.height=ca,f.cellsResized([S],[ka],!1))}f.setAttributeForCell(S,"plantUmlData",JSON.stringify({data:aa,format:M.format}))}finally{f.getModel().endUpdate()}},function(X){d.handleError(X)})},null,null,400,220);d.showDialog(fa.container,420,300,!0,!0);fa.init()};f.cellEditor.editMermaidData=function(S,fa,ia){var M= +JSON.parse(ia);fa=new TextareaDialog(d,mxResources.get("mermaid")+":",M.data,function(aa){null!=aa&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(aa,M.config,function(X,ja,ca){d.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",X,[S]);var ka=f.model.getGeometry(S);null!=ka&&(ka=ka.clone(),ka.width=Math.max(ka.width,ja),ka.height=Math.max(ka.height,ca),f.cellsResized([S],[ka],!1));f.setAttributeForCell(S,"mermaidData",JSON.stringify({data:aa, +config:M.config},null,2))}finally{f.getModel().endUpdate()}},function(X){d.handleError(X)})},null,null,400,220);d.showDialog(fa.container,420,300,!0,!0);fa.init()};var g=f.cellEditor.startEditing;f.cellEditor.startEditing=function(S,fa){try{var ia=this.graph.getAttributeForCell(S,"plantUmlData");if(null!=ia)this.editPlantUmlData(S,fa,ia);else if(ia=this.graph.getAttributeForCell(S,"mermaidData"),null!=ia)this.editMermaidData(S,fa,ia);else{var M=f.getCellStyle(S);"1"==mxUtils.getValue(M,"metaEdit", +"0")?d.showDataDialog(S):g.apply(this,arguments)}}catch(aa){d.handleError(aa)}};f.getLinkTitle=function(S){return d.getLinkTitle(S)};f.customLinkClicked=function(S){var fa=!1;try{d.handleCustomLink(S),fa=!0}catch(ia){d.handleError(ia)}return fa};var x=f.parseBackgroundImage;f.parseBackgroundImage=function(S){var fa=x.apply(this,arguments);null!=fa&&null!=fa.src&&Graph.isPageLink(fa.src)&&(fa={originalSrc:fa.src});return fa};var y=f.setBackgroundImage;f.setBackgroundImage=function(S){null!=S&&null!= +S.originalSrc&&(S=d.createImageForPageLink(S.originalSrc,d.currentPage,this));y.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(S,fa){S=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=S){var ia=S.indexOf(",");if(0<ia)for(S=S.substring(ia+1),fa=fa.getProperty("patches"), +ia=0;ia<fa.length;ia++)if(null!=fa[ia][EditorUi.DIFF_UPDATE]&&null!=fa[ia][EditorUi.DIFF_UPDATE][S]||null!=fa[ia][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(fa[ia][EditorUi.DIFF_REMOVE],S)){f.refreshBackgroundImage();break}}}));var u=f.getBackgroundImageObject;f.getBackgroundImageObject=function(S,fa){var ia=u.apply(this,arguments);if(null!=ia&&null!=ia.originalSrc)if(!fa)ia={src:ia.originalSrc};else if(fa&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var M=this.stylesheet,aa=this.shapeForegroundColor, +X=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";ia=d.createImageForPageLink(ia.originalSrc);this.shapeBackgroundColor=X;this.shapeForegroundColor=aa;this.stylesheet=M}return ia};var H=this.clearDefaultStyle;this.clearDefaultStyle=function(){H.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders"); +if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var J=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(S){S=null!=S?S:"";"1"==urlParams.dev&&(S+=(0<S.length?"&":"?")+"dev=1");return J.apply(this,arguments)};var D=f.addClickHandler;f.addClickHandler=function(S,fa,ia){var M=fa;fa=function(aa,X){if(null==X){var ja=mxEvent.getSource(aa);"a"==ja.nodeName.toLowerCase()&&(X= +ja.getAttribute("href"))}null!=X&&f.isCustomLink(X)&&(mxEvent.isTouchEvent(aa)||!mxEvent.isPopupTrigger(aa))&&f.customLinkClicked(X)&&mxEvent.consume(aa);null!=M&&M(aa,X)};D.call(this,S,fa,ia)};C.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var G=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(S,fa,ia){d.editor.graph.isSelectionEmpty()?G.apply(this,arguments):d.menus.addMenuItems(S, +"delete - cut copy copyAsImage - duplicate".split(" "),null,ia)}}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,null!=d.pages&&1<d.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var W=f.getExportVariables;f.getExportVariables=function(){var S=W.apply(this,arguments),fa=d.getCurrentFile();null!=fa&&(S.filename=fa.getTitle());S.pagecount=null!=d.pages?d.pages.length:1;S.page=null!=d.currentPage?d.currentPage.getName():""; +S.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return S};var T=f.getGlobalVariable;f.getGlobalVariable=function(S){var fa=d.getCurrentFile();return"filename"==S&&null!=fa?fa.getTitle():"page"==S&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==S?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==S?null!=d.pages?d.pages.length:1:T.apply(this,arguments)};var Z=f.labelLinkClicked;f.labelLinkClicked=function(S, +fa,ia){var M=fa.getAttribute("href");if(null==M||!f.isCustomLink(M)||!mxEvent.isTouchEvent(ia)&&mxEvent.isPopupTrigger(ia))Z.apply(this,arguments);else{if(!f.isEnabled()||null!=S&&f.isCellLocked(S.cell))f.customLinkClicked(M),f.getRubberband().reset();mxEvent.consume(ia)}};this.editor.getOrCreateFilename=function(){var S=d.defaultFilename,fa=d.getCurrentFile();null!=fa&&(S=null!=fa.getTitle()?fa.getTitle():S);return S};var N=this.actions.get("print");N.setEnabled(!mxClient.IS_IOS||!navigator.standalone); +N.visible=N.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"), +this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(S){var fa=f.cellEditor.text2, +ia=null;null!=fa&&(mxEvent.addListener(fa,"dragleave",function(M){null!=ia&&(ia.parentNode.removeChild(ia),ia=null);M.stopPropagation();M.preventDefault()}),mxEvent.addListener(fa,"dragover",mxUtils.bind(this,function(M){null==ia&&(!mxClient.IS_IE||10<document.documentMode)&&(ia=this.highlightElement(fa));M.stopPropagation();M.preventDefault()})),mxEvent.addListener(fa,"drop",mxUtils.bind(this,function(M){null!=ia&&(ia.parentNode.removeChild(ia),ia=null);if(0<M.dataTransfer.files.length)this.importFiles(M.dataTransfer.files, +0,0,this.maxImageSize,function(X,ja,ca,ka,q,E){f.insertImage(X,q,E)},function(){},function(X){return"image/"==X.type.substring(0,6)},function(X){for(var ja=0;ja<X.length;ja++)X[ja]()},mxEvent.isControlDown(M));else if(0<=mxUtils.indexOf(M.dataTransfer.types,"text/uri-list")){var aa=M.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(aa)?this.loadImage(decodeURIComponent(aa),mxUtils.bind(this,function(X){var ja=Math.max(1,X.width);X=Math.max(1,X.height);var ca=this.maxImageSize; +ca=Math.min(1,Math.min(ca/Math.max(1,ja)),ca/Math.max(1,X));f.insertImage(decodeURIComponent(aa),ja*ca,X*ca)})):document.execCommand("insertHTML",!1,M.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(M.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,M.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(M.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,M.dataTransfer.getData("text/plain"));M.stopPropagation();M.preventDefault()})))}));this.isSettingsEnabled()&& +(N=this.editor.graph.view,N.setUnit(mxSettings.getUnit()),N.addListener("unitChanged",function(S,fa){mxSettings.setUnit(fa.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,N.unit),this.refresh());if("1"==urlParams.styledev){N=document.getElementById("geFooter");null!=N&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type", +"text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),N.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this, +function(S,fa){0<this.editor.graph.getSelectionCount()?(S=this.editor.graph.getSelectionCell(),S=this.editor.graph.getModel().getStyle(S),this.styleInput.value=S||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var qa=this.isSelectionAllowed;this.isSelectionAllowed=function(S){return mxEvent.getSource(S)==this.styleInput?!0:qa.apply(this,arguments)}}N=document.getElementById("geInfo");null!=N&&N.parentNode.removeChild(N);if(Graph.fileSupport&&(!this.editor.chromeless|| +this.editor.editable)){var oa=null;mxEvent.addListener(f.container,"dragleave",function(S){f.isEnabled()&&(null!=oa&&(oa.parentNode.removeChild(oa),oa=null),S.stopPropagation(),S.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(S){null==oa&&(!mxClient.IS_IE||10<document.documentMode)&&(oa=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();S.stopPropagation();S.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this, +function(S){null!=oa&&(oa.parentNode.removeChild(oa),oa=null);if(f.isEnabled()){var fa=mxUtils.convertPoint(f.container,mxEvent.getClientX(S),mxEvent.getClientY(S)),ia=S.dataTransfer.files,M=f.view.translate,aa=f.view.scale,X=fa.x/aa-M.x,ja=fa.y/aa-M.y;if(0<ia.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(S)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(ia,!0)):(mxEvent.isAltDown(S)&&(ja=X=null),this.importFiles(ia,X,ja,this.maxImageSize, +null,null,null,null,mxEvent.isControlDown(S),null,null,mxEvent.isShiftDown(S),S));else{mxEvent.isAltDown(S)&&(ja=X=0);var ca=0<=mxUtils.indexOf(S.dataTransfer.types,"text/uri-list")?S.dataTransfer.getData("text/uri-list"):null;fa=this.extractGraphModelFromEvent(S,null!=this.pages);if(null!=fa)f.setSelectionCells(this.importXml(fa,X,ja,!0));else if(0<=mxUtils.indexOf(S.dataTransfer.types,"text/html")){var ka=S.dataTransfer.getData("text/html");fa=document.createElement("div");fa.innerHTML=f.sanitizeHtml(ka); +var q=null;ia=fa.getElementsByTagName("img");null!=ia&&1==ia.length?(ka=ia[0].getAttribute("src"),null==ka&&(ka=ia[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(ka)||(q=!0)):(ia=fa.getElementsByTagName("a"),null!=ia&&1==ia.length?ka=ia[0].getAttribute("href"):(fa=fa.getElementsByTagName("pre"),null!=fa&&1==fa.length&&(ka=mxUtils.getTextContent(fa[0]))));var E=!0,Q=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(ka,X,ja,!0,q,null,E,mxEvent.isControlDown(S)))}); +q&&null!=ka&&ka.length>this.resampleThreshold?this.confirmImageResize(function(Y){E=Y;Q()},mxEvent.isControlDown(S)):Q()}else null!=ca&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(ca)?this.loadImage(decodeURIComponent(ca),mxUtils.bind(this,function(Y){var R=Math.max(1,Y.width);Y=Math.max(1,Y.height);var ba=this.maxImageSize;ba=Math.min(1,Math.min(ba/Math.max(1,R)),ba/Math.max(1,Y));f.setSelectionCell(f.insertVertex(null,null,"",X,ja,R*ba,Y*ba,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+ +ca+";"))}),mxUtils.bind(this,function(Y){f.setSelectionCells(this.insertTextAt(ca,X,ja,!0))})):0<=mxUtils.indexOf(S.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(S.dataTransfer.getData("text/plain"),X,ja,!0))}}S.stopPropagation();S.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();N=mxUtils.bind(this,function(){f.refresh();f.view.validateBackground();this.updateTabContainer()});this.addListener("darkModeChanged", +N);this.addListener("sketchModeChanged",N);"dark"==uiTheme?(this.doSetDarkMode(!0),this.fireEvent(new mxEventObject("darkModeChanged"))):"min"==uiTheme&&"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d= +this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var g=f.clipboardData||f.originalEvent.clipboardData,x=!1,y=0;y<g.types.length;y++)if("text/"===g.types[y].substring(0,5)){x=!0;break}if(!x){var u=g.items;for(index in u){var H=u[index];if("file"===H.kind){if(d.isEditing())this.importFiles([H.getAsFile()],0,0,this.maxImageSize,function(D,G,W,T,Z,N){d.insertImage(D,Z,N)},function(){},function(D){return"image/"==D.type.substring(0, +6)},function(D){for(var G=0;G<D.length;G++)D[G]()});else{var J=this.editor.graph.getInsertPoint();this.importFiles([H.getAsFile()],J.x,J.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(D){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){g.innerHTML=" ";g.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect", +"off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable= +!0;g.innerHTML=" ";var x=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(u){var H=mxEvent.getSource(u);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==H.nodeName||"TEXTAREA"==H.nodeName||224!=u.keyCode&&(mxClient.IS_MAC||17!=u.keyCode)&&(!mxClient.IS_MAC||91!=u.keyCode&&93!=u.keyCode)||x||(g.style.left=f.container.scrollLeft+ +10+"px",g.style.top=f.container.scrollTop+10+"px",f.container.appendChild(g),x=!0,g.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(u){var H=u.keyCode;window.setTimeout(mxUtils.bind(this,function(){!x||224!=H&&17!=H&&91!=H&&93!=H||(x=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this, +function(u){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g),d()}catch(H){this.handleError(H)}}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(u){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g,!0),d()}catch(H){this.handleError(H)}}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(u){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(g.innerHTML=" ",g.focus(),null!=u.clipboardData&&this.pasteCells(u,g,!0,!0),mxEvent.isConsumed(u)||window.setTimeout(mxUtils.bind(this, +function(){this.pasteCells(u,g,!1,!0)}),0))}),!0);var y=this.isSelectionAllowed;this.isSelectionAllowed=function(u){return mxEvent.getSource(u)==g?!0:y.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(d,f){mxSettings.setUi(d);f=f||this.doSetCurrentTheme(d);this.fireEvent(new mxEventObject("currentThemeChanged"));f||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.doSetCurrentTheme=function(d){var f=Editor.currentTheme,g=!1;if(f!=d){if("1"==urlParams["live-ui"]){var x= +function(y){return null==y||""==y||"dark"==y||"kennedy"==y};console.log("doSetCurrentTheme",f,d);d=x(d)?"default":d;f=x(f)?"default":f;"sketch"==f&&"default"==d?(this.sidebarFooterContainer.style.display="block",this.menubarContainer.style.display="block",this.toolbarContainer.style.display="block",this.sidebarContainer.style.display="block",this.tabContainer.style.display="block",this.hsplit.style.display="block",this.hsplitPosition=EditorUi.prototype.hsplitPosition,this.menubarHeight=App.prototype.menubarHeight, +this.formatWidth=EditorUi.prototype.formatWidth,g=!0):"default"==f&&"sketch"==d&&(this.sidebarFooterContainer.style.display="none",this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.sidebarContainer.style.display="none",this.tabContainer.style.display="none",this.hsplit.style.display="none",this.formatWidth=this.menubarHeight=this.hsplitPosition=0,g=!0);this.switchTheme(d)}Editor.currentTheme=d}return g};EditorUi.prototype.switchTheme=function(d){this.createMenubarForTheme(d); +this.switchCssForTheme(d);"sketch"==d?(this.refresh(),this.createFormatWindow(),this.formatContainer.style.left="0px",this.formatContainer.style.top="0px",this.formatContainer.style.width=""):"default"==d&&(null!=this.formatContainer&&(this.formatContainer.style.left="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.formatWindow&&(this.formatWindow.destroy(), +this.formatWindow=null)),this.refresh())};EditorUi.prototype.switchCssForTheme=function(d){"sketch"==d?null==this.sketchStyleElt&&(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),this.sketchStyleElt=null)};EditorUi.prototype.createMenubarForTheme= +function(d){"sketch"==d?null==this.sketchMenubarElt&&(this.sketchMenubarElt=document.createElement("div"),this.sketchMenubarElt.className="geToolbarContainer",this.sketchMenubarElt.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;padding:6px;border:1px solid #c0c0c0;overflow:hidden;text-align:right;white-space:nowrap;user-select:none;",null!=this.switchThemeElt&&(this.switchThemeElt.style.position="relative",this.switchThemeElt.style.width="22px",this.switchThemeElt.style.height= +"22px",this.switchThemeElt.style.top="0px",this.switchThemeElt.style.right="6px",this.sketchMenubarElt.appendChild(this.switchThemeElt)),this.diagramContainer.parentNode.appendChild(this.sketchMenubarElt)):(null!=this.switchThemeElt&&(this.switchThemeElt.style.position="absolute",this.switchThemeElt.style.width="19px",this.switchThemeElt.style.height="19px",this.switchThemeElt.style.top="0px",this.switchThemeElt.style.right="17px",document.body.appendChild(this.switchThemeElt)),null!=this.sketchMenubarElt&& +(this.sketchMenubarElt.parentNode.removeChild(this.sketchMenubarElt),this.sketchMenubarElt=null))};EditorUi.prototype.addMenuToMenubar=function(d,f,g,x){var y=this.menus.get(f);d=d.addMenu(mxResources.get(f),y.funct);d.className=g;d.style.display="inline-block";d.style.boxSizing="border-box";d.style.top="6px";d.style.marginRight="6px";d.style.height="30px";d.style.paddingTop="6px";d.style.paddingBottom="6px";d.style.cursor="pointer";d.setAttribute("title",mxResources.get(f));this.menus.menuCreated(y, +d,"geMenuItem");null!=x&&(d.style.backgroundImage="url("+x+")",d.style.backgroundPosition="center center",d.style.backgroundRepeat="no-repeat",d.style.backgroundSize="24px 24px",d.style.width="34px",d.innerText="");return d};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var d="1"==urlParams.sketch?Math.max(10,this.diagramContainer.clientWidth-241):Math.max(10,this.diagramContainer.clientWidth-248),f="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60,g="1"==urlParams.embedInline? +580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),d,f,240,g,mxUtils.bind(this,function(x){x.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}};EditorUi.prototype.setSketchMode=function(d){this.spinner.spin(document.body,mxResources.get("working")+ +"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }": "html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body .geSidebarContainer *:not(svg *) { font-size:9pt; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }html body .geMenubarContainer .geStatus { margin-top: 0px !important; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+ (Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; border: none !important; }html body .geToolbarContainer a div { color: "+(Editor.isDarkMode()?"#707070":Editor.darkColor)+" }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: "+(Editor.isDarkMode()? "#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } html body div.geToolbarContainer a.geColorBtn { margin: 2px; } html body .mxWindow td.mxWindowPane input, html body .mxWindow td.mxWindowPane select, html body .mxWindow td.mxWindowPane textarea, html body .mxWindow td.mxWindowPane radio { padding: 0px; box-sizing: border-box; }.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); "+ @@ -3684,8 +3689,8 @@ p.setAttribute("charset","UTF-8");p.setAttribute("type","text/css");EditorUi.pro f.defaultPageBorderColor;Graph.prototype.shapeBackgroundColor=f.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=f.shapeForegroundColor;Graph.prototype.defaultThemeName=f.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor: "white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;null!=Editor.styleElt&&(Editor.styleElt.innerHTML=Editor.createMinimalCss());Editor.isDarkMode()?null==p.parentNode&&document.getElementsByTagName("head")[0].appendChild(p):null!=p.parentNode&&p.parentNode.removeChild(p)}}; EditorUi.prototype.setPagesVisible=function(d){Editor.pagesVisible!=d&&(Editor.pagesVisible=d,mxSettings.settings.pagesVisible=d,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(d,f){this.sidebar.sidebarTitles!=d&&(this.sidebar.sidebarTitles=d,this.sidebar.refresh(),this.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen= -function(d){Editor.inlineFullscreen!=d&&(Editor.inlineFullscreen=d,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(d){if(Editor.sketchMode!=d){var f=function(x,z,u){null== -x[z]&&(x[z]=u)},g=this.editor.graph;Editor.sketchMode=d;this.menus.defaultFontSize=d?20:16;g.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);f(g.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);g.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);f(g.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);f(g.defaultEdgeStyle,"edgeStyle","none");f(g.defaultEdgeStyle,"rounded","0");f(g.defaultEdgeStyle,"curved","1");f(g.defaultEdgeStyle,"jettySize","auto"); +function(d){Editor.inlineFullscreen!=d&&(Editor.inlineFullscreen=d,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(d){if(Editor.sketchMode!=d){var f=function(x,y,u){null== +x[y]&&(x[y]=u)},g=this.editor.graph;Editor.sketchMode=d;this.menus.defaultFontSize=d?20:16;g.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);f(g.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);g.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);f(g.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);f(g.defaultEdgeStyle,"edgeStyle","none");f(g.defaultEdgeStyle,"rounded","0");f(g.defaultEdgeStyle,"curved","1");f(g.defaultEdgeStyle,"jettySize","auto"); f(g.defaultEdgeStyle,"orthogonalLoop","1");f(g.defaultEdgeStyle,"endArrow","open");f(g.defaultEdgeStyle,"endSize","14");f(g.defaultEdgeStyle,"startSize","14");d&&(f(g.defaultVertexStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultVertexStyle,"fontSource",Editor.sketchFontSource),f(g.defaultVertexStyle,"hachureGap","4"),f(g.defaultVertexStyle,"sketch","1"),f(g.defaultEdgeStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultEdgeStyle,"fontSource",Editor.sketchFontSource),f(g.defaultEdgeStyle, "sketch","1"),f(g.defaultEdgeStyle,"hachureGap","4"),f(g.defaultEdgeStyle,"sourcePerimeterSpacing","8"),f(g.defaultEdgeStyle,"targetPerimeterSpacing","8"));g.currentVertexStyle=mxUtils.clone(g.defaultVertexStyle);g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=function(d){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var g=d.indexOf(",");0<g&&(f=this.getPageById(d.substring(g+1)),f=null!=f?f.getName(): mxResources.get("pageNotFound"))}else"data:"==d.substring(0,5)&&(f=mxResources.get("action"));return f};EditorUi.prototype.handleCustomLink=function(d){if(Graph.isPageLink(d)){var f=d.indexOf(",");if(d=this.getPageById(d.substring(f+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(d)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)}; @@ -3694,155 +3699,156 @@ EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Edito function(d,f){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,f){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor= mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",mxUtils.bind(this,function(d,f){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(d,f){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!= this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth); -mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,f,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(x,z){try{this.spinner.stop();var u=this.createImageDataUri(x,f,"png"),H=parseInt(z.getAttribute("width")),J=parseInt(z.getAttribute("height"));this.writeImageToClipboard(u,H,J,mxUtils.bind(this,function(D){this.handleError(D)}))}catch(D){this.handleError(D)}}),null,null,null,mxUtils.bind(this, -function(x){this.spinner.stop();this.handleError(x)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(x){this.handleError(x)}};EditorUi.prototype.writeImageToClipboard=function(d,f,g,x){var z=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":z,"text/html":new Blob(['<img src="'+d+'" width="'+f+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](x)}; -EditorUi.prototype.copyCells=function(d,f){var g=this.editor.graph;if(g.isSelectionEmpty())d.innerText="";else{var x=mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),z=mxUtils.getXml(g.encodeCells(x));mxUtils.setTextContent(d,encodeURIComponent(z));f?(g.removeCells(x,!1),g.lastPasteXml=null):(g.lastPasteXml=z,g.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var f=this.editor.graph; -f.isSelectionEmpty()||(d=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(d)),navigator.clipboard.writeText(f))}return d};EditorUi.prototype.pasteXml=function(d,f,g,x){var z=this.editor.graph,u=null;z.lastPasteXml==d?z.pasteCounter++:(z.lastPasteXml=d,z.pasteCounter=0);var H=z.pasteCounter*z.gridSize;if(g||this.isCompatibleString(d))u=this.importXml(d,H,H),z.setSelectionCells(u);else if(f&&1==z.getSelectionCount()){H=z.getStartEditingCell(z.getSelectionCell(), -x);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==z.getCurrentCellStyle(H)[mxConstants.STYLE_SHAPE])z.setCellStyles(mxConstants.STYLE_IMAGE,d,[H]);else{z.model.beginUpdate();try{z.labelChanged(H,d),Graph.isLink(d)&&z.setLinkForCell(H,d)}finally{z.model.endUpdate()}}z.setSelectionCell(H)}else u=z.getInsertPoint(),z.isMouseInsertPoint()&&(H=0,z.lastPasteXml==d&&0<z.pasteCounter&&z.pasteCounter--),u=this.insertTextAt(d,u.x+H,u.y+H,!0),z.setSelectionCells(u);z.isSelectionEmpty()||(z.scrollCellToVisible(z.getSelectionCell()), -null!=this.hoverIcons&&this.hoverIcons.update(z.view.getState(z.getSelectionCell())));return u};EditorUi.prototype.pasteCells=function(d,f,g,x){if(!mxEvent.isConsumed(d)){var z=f,u=!1;if(g&&null!=d.clipboardData&&d.clipboardData.getData){var H=d.clipboardData.getData("text/plain"),J=!1;if(null!=H&&0<H.length&&"%3CmxGraphModel%3E"==H.substring(0,18))try{var D=decodeURIComponent(H);this.isCompatibleString(D)&&(J=!0,H=D)}catch(qa){}J=J?null:d.clipboardData.getData("text/html");null!=J&&0<J.length?(z= -this.parseHtmlData(J),u="text/plain"!=z.getAttribute("data-type")):null!=H&&0<H.length&&(z=document.createElement("div"),mxUtils.setTextContent(z,J))}H=z.getElementsByTagName("span");if(null!=H&&0<H.length&&"application/vnd.lucid.chart.objects"===H[0].getAttribute("data-lucid-type"))g=H[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(qa){var oa=this.editor.graph;oa.lastPasteXml==qa?oa.pasteCounter++:(oa.lastPasteXml=qa,oa.pasteCounter= -0);var aa=oa.pasteCounter*oa.gridSize;oa.setSelectionCells(this.importXml(qa,aa,aa));oa.scrollCellToVisible(oa.getSelectionCell())}),mxUtils.bind(this,function(qa){this.handleError(qa)})),mxEvent.consume(d));else{var G=u?z.innerHTML:mxUtils.trim(null==z.innerText?mxUtils.getTextContent(z):z.innerText),V=!1;try{var U=G.lastIndexOf("%3E");0<=U&&U<G.length-3&&(G=G.substring(0,U+3))}catch(qa){}try{H=z.getElementsByTagName("span"),(D=null!=H&&0<H.length?mxUtils.trim(decodeURIComponent(H[0].textContent)): -decodeURIComponent(G))&&(this.isCompatibleString(D)||0==D.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(V=!0,G=D)}catch(qa){}try{if(null!=G&&0<G.length){if(0==G.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var Y=mxUtils.bind(this,function(){try{G=(new MiroImporter).importMiroJson(JSON.parse(G)),this.pasteXml(G,x,V,d)}catch(qa){console.log("Miro import error:",qa)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",Y):Y()}else this.pasteXml(G, -x,V,d);try{mxEvent.consume(d)}catch(qa){}}else if(!g){var O=this.editor.graph;O.lastPasteXml=null;O.pasteCounter=0}}catch(qa){this.handleError(qa)}}}f.innerHTML=" "};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var f=null,g=0;g<d.length;g++)mxEvent.addListener(d[g],"dragleave",function(x){null!=f&&(f.parentNode.removeChild(f),f=null);x.stopPropagation();x.preventDefault()}),mxEvent.addListener(d[g],"dragover",mxUtils.bind(this,function(x){(this.editor.graph.isEnabled()|| +mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,f,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(x,y){try{this.spinner.stop();var u=this.createImageDataUri(x,f,"png"),H=parseInt(y.getAttribute("width")),J=parseInt(y.getAttribute("height"));this.writeImageToClipboard(u,H,J,mxUtils.bind(this,function(D){this.handleError(D)}))}catch(D){this.handleError(D)}}),null,null,null,mxUtils.bind(this, +function(x){this.spinner.stop();this.handleError(x)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(x){this.handleError(x)}};EditorUi.prototype.writeImageToClipboard=function(d,f,g,x){var y=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":y,"text/html":new Blob(['<img src="'+d+'" width="'+f+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](x)}; +EditorUi.prototype.copyCells=function(d,f){var g=this.editor.graph;if(g.isSelectionEmpty())d.innerText="";else{var x=mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),y=mxUtils.getXml(g.encodeCells(x));mxUtils.setTextContent(d,encodeURIComponent(y));f?(g.removeCells(x,!1),g.lastPasteXml=null):(g.lastPasteXml=y,g.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var f=this.editor.graph; +f.isSelectionEmpty()||(d=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(d)),navigator.clipboard.writeText(f))}return d};EditorUi.prototype.pasteXml=function(d,f,g,x){var y=this.editor.graph,u=null;y.lastPasteXml==d?y.pasteCounter++:(y.lastPasteXml=d,y.pasteCounter=0);var H=y.pasteCounter*y.gridSize;if(g||this.isCompatibleString(d))u=this.importXml(d,H,H),y.setSelectionCells(u);else if(f&&1==y.getSelectionCount()){H=y.getStartEditingCell(y.getSelectionCell(), +x);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==y.getCurrentCellStyle(H)[mxConstants.STYLE_SHAPE])y.setCellStyles(mxConstants.STYLE_IMAGE,d,[H]);else{y.model.beginUpdate();try{y.labelChanged(H,d),Graph.isLink(d)&&y.setLinkForCell(H,d)}finally{y.model.endUpdate()}}y.setSelectionCell(H)}else u=y.getInsertPoint(),y.isMouseInsertPoint()&&(H=0,y.lastPasteXml==d&&0<y.pasteCounter&&y.pasteCounter--),u=this.insertTextAt(d,u.x+H,u.y+H,!0),y.setSelectionCells(u);y.isSelectionEmpty()||(y.scrollCellToVisible(y.getSelectionCell()), +null!=this.hoverIcons&&this.hoverIcons.update(y.view.getState(y.getSelectionCell())));return u};EditorUi.prototype.pasteCells=function(d,f,g,x){if(!mxEvent.isConsumed(d)){var y=f,u=!1;if(g&&null!=d.clipboardData&&d.clipboardData.getData){var H=d.clipboardData.getData("text/plain"),J=!1;if(null!=H&&0<H.length&&"%3CmxGraphModel%3E"==H.substring(0,18))try{var D=decodeURIComponent(H);this.isCompatibleString(D)&&(J=!0,H=D)}catch(qa){}J=J?null:d.clipboardData.getData("text/html");null!=J&&0<J.length?(y= +this.parseHtmlData(J),u="text/plain"!=y.getAttribute("data-type")):null!=H&&0<H.length&&(y=document.createElement("div"),mxUtils.setTextContent(y,J))}H=y.getElementsByTagName("span");if(null!=H&&0<H.length&&"application/vnd.lucid.chart.objects"===H[0].getAttribute("data-lucid-type"))g=H[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(qa){var oa=this.editor.graph;oa.lastPasteXml==qa?oa.pasteCounter++:(oa.lastPasteXml=qa,oa.pasteCounter= +0);var S=oa.pasteCounter*oa.gridSize;oa.setSelectionCells(this.importXml(qa,S,S));oa.scrollCellToVisible(oa.getSelectionCell())}),mxUtils.bind(this,function(qa){this.handleError(qa)})),mxEvent.consume(d));else{var G=u?y.innerHTML:mxUtils.trim(null==y.innerText?mxUtils.getTextContent(y):y.innerText),W=!1;try{var T=G.lastIndexOf("%3E");0<=T&&T<G.length-3&&(G=G.substring(0,T+3))}catch(qa){}try{H=y.getElementsByTagName("span"),(D=null!=H&&0<H.length?mxUtils.trim(decodeURIComponent(H[0].textContent)): +decodeURIComponent(G))&&(this.isCompatibleString(D)||0==D.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(W=!0,G=D)}catch(qa){}try{if(null!=G&&0<G.length){if(0==G.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var Z=mxUtils.bind(this,function(){try{G=(new MiroImporter).importMiroJson(JSON.parse(G)),this.pasteXml(G,x,W,d)}catch(qa){console.log("Miro import error:",qa)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",Z):Z()}else this.pasteXml(G, +x,W,d);try{mxEvent.consume(d)}catch(qa){}}else if(!g){var N=this.editor.graph;N.lastPasteXml=null;N.pasteCounter=0}}catch(qa){this.handleError(qa)}}}f.innerHTML=" "};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var f=null,g=0;g<d.length;g++)mxEvent.addListener(d[g],"dragleave",function(x){null!=f&&(f.parentNode.removeChild(f),f=null);x.stopPropagation();x.preventDefault()}),mxEvent.addListener(d[g],"dragover",mxUtils.bind(this,function(x){(this.editor.graph.isEnabled()|| "1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());x.stopPropagation();x.preventDefault()})),mxEvent.addListener(d[g],"drop",mxUtils.bind(this,function(x){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<x.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(x.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(x)&& -!mxEvent.isShiftDown(x)):this.openFiles(x.dataTransfer.files,!0);else{var z=this.extractGraphModelFromEvent(x);if(null==z){var u=null!=x.dataTransfer?x.dataTransfer:x.clipboardData;null!=u&&(10==document.documentMode||11==document.documentMode?z=u.getData("Text"):(z=null,z=0<=mxUtils.indexOf(u.types,"text/uri-list")?x.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(u.types,"text/html")?u.getData("text/html"):null,null!=z&&0<z.length?(u=document.createElement("div"),u.innerHTML=this.editor.graph.sanitizeHtml(z), -u=u.getElementsByTagName("img"),0<u.length&&(z=u[0].getAttribute("src"))):0<=mxUtils.indexOf(u.types,"text/plain")&&(z=u.getData("text/plain"))),null!=z&&(Editor.isPngDataUrl(z)?(z=Editor.extractGraphModelFromPng(z),null!=z&&0<z.length&&this.openLocalFile(z,null,!0)):this.isRemoteFileFormat(z)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(z))).send(mxUtils.bind(this,function(H){200<=H.getStatus()&& -299>=H.getStatus()&&this.openLocalFile(H.getText(),null,!0)})):/^https?:\/\//.test(z)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(z):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(z)))))}else this.openLocalFile(z,null,!0)}x.stopPropagation();x.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var f=0,g=0;if(null==d){var x=document.body;var z=document.documentElement; -var u=(x.clientWidth||z.clientWidth)-3;x=Math.max(x.clientHeight||0,z.clientHeight)-3}else f=d.offsetTop,g=d.offsetLeft,u=d.clientWidth,x=d.clientHeight;z=document.createElement("div");z.style.zIndex=mxPopupMenu.prototype.zIndex+2;z.style.border="3px dotted rgb(254, 137, 12)";z.style.pointerEvents="none";z.style.position="absolute";z.style.top=f+"px";z.style.left=g+"px";z.style.width=Math.max(0,u-3)+"px";z.style.height=Math.max(0,x-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(z): -document.body.appendChild(z);return z};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var f=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=f){var g=new mxCodec(f.ownerDocument),x=new mxGraphModel;g.decode(f,x);f=x.getChildAt(x.getRoot(),0);for(g=0;g<x.getChildCount(f);g++)d.push(x.getChildAt(f,g))}return d};EditorUi.prototype.openFileHandle=function(d,f,g,x,z){if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)?f=f.substring(0,f.length-4)+".drawio": +!mxEvent.isShiftDown(x)):this.openFiles(x.dataTransfer.files,!0);else{var y=this.extractGraphModelFromEvent(x);if(null==y){var u=null!=x.dataTransfer?x.dataTransfer:x.clipboardData;null!=u&&(10==document.documentMode||11==document.documentMode?y=u.getData("Text"):(y=null,y=0<=mxUtils.indexOf(u.types,"text/uri-list")?x.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(u.types,"text/html")?u.getData("text/html"):null,null!=y&&0<y.length?(u=document.createElement("div"),u.innerHTML=this.editor.graph.sanitizeHtml(y), +u=u.getElementsByTagName("img"),0<u.length&&(y=u[0].getAttribute("src"))):0<=mxUtils.indexOf(u.types,"text/plain")&&(y=u.getData("text/plain"))),null!=y&&(Editor.isPngDataUrl(y)?(y=Editor.extractGraphModelFromPng(y),null!=y&&0<y.length&&this.openLocalFile(y,null,!0)):this.isRemoteFileFormat(y)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(y))).send(mxUtils.bind(this,function(H){200<=H.getStatus()&& +299>=H.getStatus()&&this.openLocalFile(H.getText(),null,!0)})):/^https?:\/\//.test(y)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(y):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(y)))))}else this.openLocalFile(y,null,!0)}x.stopPropagation();x.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var f=0,g=0;if(null==d){var x=document.body;var y=document.documentElement; +var u=(x.clientWidth||y.clientWidth)-3;x=Math.max(x.clientHeight||0,y.clientHeight)-3}else f=d.offsetTop,g=d.offsetLeft,u=d.clientWidth,x=d.clientHeight;y=document.createElement("div");y.style.zIndex=mxPopupMenu.prototype.zIndex+2;y.style.border="3px dotted rgb(254, 137, 12)";y.style.pointerEvents="none";y.style.position="absolute";y.style.top=f+"px";y.style.left=g+"px";y.style.width=Math.max(0,u-3)+"px";y.style.height=Math.max(0,x-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(y): +document.body.appendChild(y);return y};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var f=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=f){var g=new mxCodec(f.ownerDocument),x=new mxGraphModel;g.decode(f,x);f=x.getChildAt(x.getRoot(),0);for(g=0;g<x.getChildCount(f);g++)d.push(x.getChildAt(f,g))}return d};EditorUi.prototype.openFileHandle=function(d,f,g,x,y){if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)?f=f.substring(0,f.length-4)+".drawio": /(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var u=mxUtils.bind(this,function(J){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==J.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,x);try{this.loadLibrary(new LocalLibrary(this,J,f))}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(J,f,x)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)|| /(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(g,mxUtils.bind(this,function(J){this.spinner.stop();u(J)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(J){this.spinner.stop();u(J)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(J){4==J.readyState&&(this.spinner.stop(), 200<=J.status&&299>=J.status?u(J.responseText):this.handleError({message:mxResources.get(413==J.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(J){this.spinner.stop();this.openLocalFile(J,f,x)}),mxUtils.bind(this,function(J){this.spinner.stop();this.handleError(J)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop(); null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,x);try{this.loadLibrary(new LocalLibrary(this,d,g.name))}catch(J){this.handleError(J,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(J){this.spinner.stop();u(J)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,x)}));else{if("image/png"==g.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"== -g.type){var H=Editor.extractGraphModelFromPdf(d);null!=H&&(z=null,x=!0,d=H)}this.spinner.stop();this.openLocalFile(d,f,x,z,null!=z?g:null)}}};EditorUi.prototype.openFiles=function(d,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<d.length;g++)mxUtils.bind(this,function(x){var z=new FileReader;z.onload=mxUtils.bind(this,function(u){try{this.openFileHandle(u.target.result,x.name,x,f)}catch(H){this.handleError(H)}});z.onerror=mxUtils.bind(this,function(u){this.spinner.stop(); -this.handleError(u);window.openFile=null});"image"!==x.type.substring(0,5)&&"application/pdf"!==x.type||"image/svg"===x.type.substring(0,9)?z.readAsText(x):z.readAsDataURL(x)})(d[g])};EditorUi.prototype.openLocalFile=function(d,f,g,x,z){var u=this.getCurrentFile(),H=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var J=mxUtils.parseXml(d);null!=J&&(this.editor.setGraphXml(J.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this, -d,f||this.defaultFilename,g,x,z))});if(null!=d&&0<d.length)null==u||!u.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=x)?H():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=x)&&null!=u&&u.isModified()?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!= +g.type){var H=Editor.extractGraphModelFromPdf(d);null!=H&&(y=null,x=!0,d=H)}this.spinner.stop();this.openLocalFile(d,f,x,y,null!=y?g:null)}}};EditorUi.prototype.openFiles=function(d,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<d.length;g++)mxUtils.bind(this,function(x){var y=new FileReader;y.onload=mxUtils.bind(this,function(u){try{this.openFileHandle(u.target.result,x.name,x,f)}catch(H){this.handleError(H)}});y.onerror=mxUtils.bind(this,function(u){this.spinner.stop(); +this.handleError(u);window.openFile=null});"image"!==x.type.substring(0,5)&&"application/pdf"!==x.type||"image/svg"===x.type.substring(0,9)?y.readAsText(x):y.readAsDataURL(x)})(d[g])};EditorUi.prototype.openLocalFile=function(d,f,g,x,y){var u=this.getCurrentFile(),H=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var J=mxUtils.parseXml(d);null!=J&&(this.editor.setGraphXml(J.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this, +d,f||this.defaultFilename,g,x,y))});if(null!=d&&0<d.length)null==u||!u.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=x)?H():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=x)&&null!=u&&u.isModified()?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!= u&&u.isModified()?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):H()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);f=[];for(var g in d)f.push(g);return f};EditorUi.prototype.addBasenamesForCell= -function(d,f){function g(H){if(null!=H){var J=H.lastIndexOf(".");0<J&&(H=H.substring(J+1,H.length));null==f[H]&&(f[H]=!0)}}var x=this.editor.graph,z=x.getCellStyle(d);g(mxStencilRegistry.getBasenameForStencil(z[mxConstants.STYLE_SHAPE]));x.model.isEdge(d)&&(g(mxMarker.getPackageForType(z[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(z[mxConstants.STYLE_ENDARROW])));z=x.model.getChildCount(d);for(var u=0;u<z;u++)this.addBasenamesForCell(x.model.getChildAt(d,u),f)};EditorUi.prototype.setGraphEnabled= +function(d,f){function g(H){if(null!=H){var J=H.lastIndexOf(".");0<J&&(H=H.substring(J+1,H.length));null==f[H]&&(f[H]=!0)}}var x=this.editor.graph,y=x.getCellStyle(d);g(mxStencilRegistry.getBasenameForStencil(y[mxConstants.STYLE_SHAPE]));x.model.isEdge(d)&&(g(mxMarker.getPackageForType(y[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(y[mxConstants.STYLE_ENDARROW])));y=x.model.getChildCount(d);for(var u=0;u<y;u++)this.addBasenamesForCell(x.model.getChildAt(d,u),f)};EditorUi.prototype.setGraphEnabled= function(d){this.diagramContainer.style.visibility=d?"":"hidden";this.formatContainer.style.visibility=d?"":"hidden";this.sidebarFooterContainer.style.display=d?"":"none";this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=d?"":"none";this.editor.graph.setEnabled(d);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=d?"":"hidden",this.ruler.vRuler.container.style.visibility=d?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=d?"":"hidden"); d||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!= -window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=!1;this.installMessageHandler(mxUtils.bind(this,function(f,g,x,z){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(z)try{var u=this.editor.graph;u.setGridEnabled(!1);u.pageVisible=!1;var H=u.model.cells,J;for(J in H){var D=H[J];null!= +window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=!1;this.installMessageHandler(mxUtils.bind(this,function(f,g,x,y){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(y)try{var u=this.editor.graph;u.setGridEnabled(!1);u.pageVisible=!1;var H=u.model.cells,J;for(J in H){var D=H[J];null!= D&&null!=D.style&&(D.style+=";sketch=1;"+(-1==D.style.indexOf("fontFamily=")||-1<D.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(G){console.log(G)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=x?x:!1;this.updateUi(); window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(d,f){null!=d?d.getPublicUrl(f):f(null)};EditorUi.prototype.createLoadMessage=function(d){var f=this.editor.graph;return{event:d, pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(d){var f=this.editor.graph;f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var x=f.background;if(null==x||x==mxConstants.NONE)x=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null, -null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(z){g.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(z)}),"*")}),null,null,!0,x,1,this.embedExportBorder)}else d||g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified= -!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(d){var f=null,g=!1,x=!1,z=null,u=mxUtils.bind(this,function(D,G){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,u);mxEvent.addListener(window,"message",mxUtils.bind(this,function(D){if(D.source== -(window.opener||window.parent)){var G=D.data,V=null,U=mxUtils.bind(this,function(ma){if(null!=ma&&"function"===typeof ma.charAt&&"<"!=ma.charAt(0))try{Editor.isPngDataUrl(ma)?ma=Editor.extractGraphModelFromPng(ma):"data:image/svg+xml;base64,"==ma.substring(0,26)?ma=atob(ma.substring(26)):"data:image/svg+xml;utf8,"==ma.substring(0,24)&&(ma=ma.substring(24)),null!=ma&&("%"==ma.charAt(0)?ma=decodeURIComponent(ma):"<"!=ma.charAt(0)&&(ma=Graph.decompress(ma)))}catch(pa){}return ma});if("json"==urlParams.proto){var Y= -!1;try{G=JSON.parse(G),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[D],"data",[G])}catch(ma){G=null}try{if(null==G)return;if("dialog"==G.action){this.showError(null!=G.titleKey?mxResources.get(G.titleKey):G.title,null!=G.messageKey?mxResources.get(G.messageKey):G.message,null!=G.buttonKey?mxResources.get(G.buttonKey):G.button);null!=G.modified&&(this.editor.modified=G.modified);return}if("layout"==G.action){this.executeLayouts(this.editor.graph.createLayouts(G.layouts));return}if("prompt"== -G.action){this.spinner.stop();var O=new FilenameDialog(this,G.defaultValue||"",null!=G.okKey?mxResources.get(G.okKey):G.ok,function(ma){null!=ma?H.postMessage(JSON.stringify({event:"prompt",value:ma,message:G}),"*"):H.postMessage(JSON.stringify({event:"prompt-cancel",message:G}),"*")},null!=G.titleKey?mxResources.get(G.titleKey):G.title);this.showDialog(O.container,300,80,!0,!1);O.init();return}if("draft"==G.action){var qa=U(G.xml);this.spinner.stop();O=new DraftDialog(this,mxResources.get("draftFound", +null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(y){g.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(y)}),"*")}),null,null,!0,x,1,this.embedExportBorder)}else d||g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified= +!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(d){var f=null,g=!1,x=!1,y=null,u=mxUtils.bind(this,function(D,G){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,u);mxEvent.addListener(window,"message",mxUtils.bind(this,function(D){if(D.source== +(window.opener||window.parent)){var G=D.data,W=null,T=mxUtils.bind(this,function(la){if(null!=la&&"function"===typeof la.charAt&&"<"!=la.charAt(0))try{Editor.isPngDataUrl(la)?la=Editor.extractGraphModelFromPng(la):"data:image/svg+xml;base64,"==la.substring(0,26)?la=atob(la.substring(26)):"data:image/svg+xml;utf8,"==la.substring(0,24)&&(la=la.substring(24)),null!=la&&("%"==la.charAt(0)?la=decodeURIComponent(la):"<"!=la.charAt(0)&&(la=Graph.decompress(la)))}catch(pa){}return la});if("json"==urlParams.proto){var Z= +!1;try{G=JSON.parse(G),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[D],"data",[G])}catch(la){G=null}try{if(null==G)return;if("dialog"==G.action){this.showError(null!=G.titleKey?mxResources.get(G.titleKey):G.title,null!=G.messageKey?mxResources.get(G.messageKey):G.message,null!=G.buttonKey?mxResources.get(G.buttonKey):G.button);null!=G.modified&&(this.editor.modified=G.modified);return}if("layout"==G.action){this.executeLayouts(this.editor.graph.createLayouts(G.layouts));return}if("prompt"== +G.action){this.spinner.stop();var N=new FilenameDialog(this,G.defaultValue||"",null!=G.okKey?mxResources.get(G.okKey):G.ok,function(la){null!=la?H.postMessage(JSON.stringify({event:"prompt",value:la,message:G}),"*"):H.postMessage(JSON.stringify({event:"prompt-cancel",message:G}),"*")},null!=G.titleKey?mxResources.get(G.titleKey):G.title);this.showDialog(N.container,300,80,!0,!1);N.init();return}if("draft"==G.action){var qa=T(G.xml);this.spinner.stop();N=new DraftDialog(this,mxResources.get("draftFound", [G.name||this.defaultFilename]),qa,mxUtils.bind(this,function(){this.hideDialog();H.postMessage(JSON.stringify({event:"draft",result:"edit",message:G}),"*")}),mxUtils.bind(this,function(){this.hideDialog();H.postMessage(JSON.stringify({event:"draft",result:"discard",message:G}),"*")}),G.editKey?mxResources.get(G.editKey):null,G.discardKey?mxResources.get(G.discardKey):null,G.ignore?mxUtils.bind(this,function(){this.hideDialog();H.postMessage(JSON.stringify({event:"draft",result:"ignore",message:G}), -"*")}):null);this.showDialog(O.container,640,480,!0,!1,mxUtils.bind(this,function(ma){ma&&this.actions.get("exit").funct()}));try{O.init()}catch(ma){H.postMessage(JSON.stringify({event:"draft",error:ma.toString(),message:G}),"*")}return}if("template"==G.action){this.spinner.stop();var oa=1==G.enableRecent,aa=1==G.enableSearch,da=1==G.enableCustomTemp;if("1"==urlParams.newTempDlg&&!G.templatesOnly&&null!=G.callback){var ia=this.getCurrentUser(),L=new TemplatesDialog(this,function(ma,pa,za){ma=ma|| -this.emptyDiagramXml;H.postMessage(JSON.stringify({event:"template",xml:ma,blank:ma==this.emptyDiagramXml,name:pa,tempUrl:za.url,libs:za.libs,builtIn:null!=za.info&&null!=za.info.custContentId,message:G}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=ia?ia.id:null,oa?mxUtils.bind(this,function(ma,pa,za){this.remoteInvoke("getRecentDiagrams",[za],null,ma,pa)}):null,aa?mxUtils.bind(this,function(ma,pa,za,Ba){this.remoteInvoke("searchDiagrams",[ma,Ba],null,pa, -za)}):null,mxUtils.bind(this,function(ma,pa,za){this.remoteInvoke("getFileContent",[ma.url],null,pa,za)}),null,da?mxUtils.bind(this,function(ma){this.remoteInvoke("getCustomTemplates",null,null,ma,function(){ma({},0)})}):null,!1,!1,!0,!0);this.showDialog(L.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}O=new NewDialog(this,!1,G.templatesOnly?!1:null!=G.callback,mxUtils.bind(this,function(ma,pa,za,Ba){ma=ma||this.emptyDiagramXml;null!=G.callback?H.postMessage(JSON.stringify({event:"template", -xml:ma,blank:ma==this.emptyDiagramXml,name:pa,tempUrl:za,libs:Ba,builtIn:!0,message:G}),"*"):(d(ma,D,ma!=this.emptyDiagramXml,G.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,oa?mxUtils.bind(this,function(ma){this.remoteInvoke("getRecentDiagrams",[null],null,ma,function(){ma(null,"Network Error!")})}):null,aa?mxUtils.bind(this,function(ma,pa){this.remoteInvoke("searchDiagrams",[ma,null],null,pa,function(){pa(null,"Network Error!")})}):null,mxUtils.bind(this, -function(ma,pa,za){H.postMessage(JSON.stringify({event:"template",docUrl:ma,info:pa,name:za}),"*")}),null,null,da?mxUtils.bind(this,function(ma){this.remoteInvoke("getCustomTemplates",null,null,ma,function(){ma({},0)})}):null,1==G.withoutType);this.showDialog(O.container,620,460,!0,!1,mxUtils.bind(this,function(ma){this.sidebar.hideTooltip();ma&&this.actions.get("exit").funct()}));O.init();return}if("textContent"==G.action){var Z=this.getDiagramTextContent();H.postMessage(JSON.stringify({event:"textContent", -data:Z,message:G}),"*");return}if("status"==G.action){null!=G.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(G.messageKey))):null!=G.message&&this.editor.setStatus(mxUtils.htmlEntities(G.message));null!=G.modified&&(this.editor.modified=G.modified);return}if("spinner"==G.action){var P=null!=G.messageKey?mxResources.get(G.messageKey):G.message;null==G.show||G.show?this.spinner.spin(document.body,P):this.spinner.stop();return}if("exit"==G.action){this.actions.get("exit").funct(); -return}if("viewport"==G.action){null!=G.viewport&&(this.embedViewport=G.viewport);return}if("snapshot"==G.action){this.sendEmbeddedSvgExport(!0);return}if("export"==G.action){if("png"==G.format||"xmlpng"==G.format){if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin)){var ca=null!=G.xml?G.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var ja=this.editor.graph,ka=mxUtils.bind(this,function(ma){this.editor.graph.setEnabled(!0); -this.spinner.stop();var pa=this.createLoadMessage("export");pa.format=G.format;pa.message=G;pa.data=ma;pa.xml=ca;H.postMessage(JSON.stringify(pa),"*")}),q=mxUtils.bind(this,function(ma){null==ma&&(ma=Editor.blankImage);"xmlpng"==G.format&&(ma=Editor.writeGraphModelToPng(ma,"tEXt","mxfile",encodeURIComponent(ca)));ja!=this.editor.graph&&ja.container.parentNode.removeChild(ja.container);ka(ma)}),F=G.pageId||(null!=this.pages?G.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var R= -mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=F){var ma=ja.getGlobalVariable;ja=this.createTemporaryGraph(ja.getStylesheet());for(var pa,za=0;za<this.pages.length;za++)if(this.pages[za].getId()==F){pa=this.updatePageRoot(this.pages[za]);break}null==pa&&(pa=this.currentPage);ja.getGlobalVariable=function(Ka){return"page"==Ka?pa.getName():"pagenumber"==Ka?1:ma.apply(this,arguments)};document.body.appendChild(ja.container);ja.model.setRoot(pa.root)}if(null!=G.layerIds){var Ba= -ja.model,Ia=Ba.getChildCells(Ba.getRoot()),Aa={};for(za=0;za<G.layerIds.length;za++)Aa[G.layerIds[za]]=!0;for(za=0;za<Ia.length;za++)Ba.setVisible(Ia[za],Aa[Ia[za].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(Ka){q(Ka.toDataURL("image/png"))}),G.width,null,G.background,mxUtils.bind(this,function(){q(null)}),null,null,G.scale,G.transparent,G.shadow,null,ja,G.border,null,G.grid,G.keepTheme)});null!=G.xml&&0<G.xml.length&&(g=!0,this.setFileData(ca),g=!1);R()}else(new mxXmlRequest(EXPORT_URL, -"format=png&embedXml="+("xmlpng"==G.format?"1":"0")+(null!=F?"&pageId="+F:"")+(null!=G.layerIds&&0<G.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:G.layerIds})):"")+(null!=G.scale?"&scale="+G.scale:"")+"&base64=1&xml="+encodeURIComponent(ca))).send(mxUtils.bind(this,function(ma){200<=ma.getStatus()&&299>=ma.getStatus()?ka("data:image/png;base64,"+ma.getText()):q(null)}),mxUtils.bind(this,function(){q(null)}))}}else if(R=mxUtils.bind(this,function(){var ma=this.createLoadMessage("export"); -ma.message=G;if("html2"==G.format||"html"==G.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var pa=this.getXmlFileData();ma.xml=mxUtils.getXml(pa);ma.data=this.getFileData(null,null,!0,null,null,null,pa);ma.format=G.format}else if("html"==G.format)pa=this.editor.getGraphXml(),ma.data=this.getHtml(pa,this.editor.graph),ma.xml=mxUtils.getXml(pa),ma.format=G.format;else{mxSvgCanvas2D.prototype.foAltText=null;pa=null!=G.background?G.background:this.editor.graph.background;pa== -mxConstants.NONE&&(pa=null);ma.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);ma.format="svg";var za=mxUtils.bind(this,function(Ba){this.editor.graph.setEnabled(!0);this.spinner.stop();ma.data=Editor.createSvgDataUri(Ba);H.postMessage(JSON.stringify(ma),"*")});if("xmlsvg"==G.format)(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))&&this.getEmbeddedSvg(ma.xml,this.editor.graph,null,!0,za,null,null,G.embedImages, -pa,G.scale,G.border,G.shadow,G.keepTheme);else if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))this.editor.graph.setEnabled(!1),pa=this.editor.graph.getSvg(pa,G.scale,G.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||G.shadow,null,G.keepTheme),(this.editor.graph.shadowVisible||G.shadow)&&this.editor.graph.addSvgShadow(pa),this.embedFonts(pa,mxUtils.bind(this,function(Ba){G.embedImages||null==G.embedImages?this.editor.convertImages(Ba, -mxUtils.bind(this,function(Ia){za(mxUtils.getXml(Ia))})):za(mxUtils.getXml(Ba))}));return}H.postMessage(JSON.stringify(ma),"*")}),null!=G.xml&&0<G.xml.length){if(this.editor.graph.mathEnabled){var W=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){W.apply(this,arguments);R()}}g=!0;this.setFileData(G.xml);g=!1;this.editor.graph.mathEnabled||R()}else R();return}if("load"==G.action){Y=G.toSketch;x=1==G.autosave;this.hideDialog();null!=G.modified&&null==urlParams.modified&&(urlParams.modified=G.modified); -null!=G.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=G.saveAndExit);null!=G.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=G.noSaveBtn);if(null!=G.rough){var T=Editor.sketchMode;this.doSetSketchMode(G.rough);T!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=G.dark&&(T=Editor.darkMode,this.doSetDarkMode(G.dark),T!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=G.border&&(this.embedExportBorder=G.border); +"*")}):null);this.showDialog(N.container,640,480,!0,!1,mxUtils.bind(this,function(la){la&&this.actions.get("exit").funct()}));try{N.init()}catch(la){H.postMessage(JSON.stringify({event:"draft",error:la.toString(),message:G}),"*")}return}if("template"==G.action){this.spinner.stop();var oa=1==G.enableRecent,S=1==G.enableSearch,fa=1==G.enableCustomTemp;if("1"==urlParams.newTempDlg&&!G.templatesOnly&&null!=G.callback){var ia=this.getCurrentUser(),M=new TemplatesDialog(this,function(la,pa,xa){la=la||this.emptyDiagramXml; +H.postMessage(JSON.stringify({event:"template",xml:la,blank:la==this.emptyDiagramXml,name:pa,tempUrl:xa.url,libs:xa.libs,builtIn:null!=xa.info&&null!=xa.info.custContentId,message:G}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=ia?ia.id:null,oa?mxUtils.bind(this,function(la,pa,xa){this.remoteInvoke("getRecentDiagrams",[xa],null,la,pa)}):null,S?mxUtils.bind(this,function(la,pa,xa,Ca){this.remoteInvoke("searchDiagrams",[la,Ca],null,pa,xa)}):null,mxUtils.bind(this, +function(la,pa,xa){this.remoteInvoke("getFileContent",[la.url],null,pa,xa)}),null,fa?mxUtils.bind(this,function(la){this.remoteInvoke("getCustomTemplates",null,null,la,function(){la({},0)})}):null,!1,!1,!0,!0);this.showDialog(M.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}N=new NewDialog(this,!1,G.templatesOnly?!1:null!=G.callback,mxUtils.bind(this,function(la,pa,xa,Ca){la=la||this.emptyDiagramXml;null!=G.callback?H.postMessage(JSON.stringify({event:"template",xml:la,blank:la== +this.emptyDiagramXml,name:pa,tempUrl:xa,libs:Ca,builtIn:!0,message:G}),"*"):(d(la,D,la!=this.emptyDiagramXml,G.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,oa?mxUtils.bind(this,function(la){this.remoteInvoke("getRecentDiagrams",[null],null,la,function(){la(null,"Network Error!")})}):null,S?mxUtils.bind(this,function(la,pa){this.remoteInvoke("searchDiagrams",[la,null],null,pa,function(){pa(null,"Network Error!")})}):null,mxUtils.bind(this,function(la, +pa,xa){H.postMessage(JSON.stringify({event:"template",docUrl:la,info:pa,name:xa}),"*")}),null,null,fa?mxUtils.bind(this,function(la){this.remoteInvoke("getCustomTemplates",null,null,la,function(){la({},0)})}):null,1==G.withoutType);this.showDialog(N.container,620,460,!0,!1,mxUtils.bind(this,function(la){this.sidebar.hideTooltip();la&&this.actions.get("exit").funct()}));N.init();return}if("textContent"==G.action){var aa=this.getDiagramTextContent();H.postMessage(JSON.stringify({event:"textContent", +data:aa,message:G}),"*");return}if("status"==G.action){null!=G.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(G.messageKey))):null!=G.message&&this.editor.setStatus(mxUtils.htmlEntities(G.message));null!=G.modified&&(this.editor.modified=G.modified);return}if("spinner"==G.action){var X=null!=G.messageKey?mxResources.get(G.messageKey):G.message;null==G.show||G.show?this.spinner.spin(document.body,X):this.spinner.stop();return}if("exit"==G.action){this.actions.get("exit").funct(); +return}if("viewport"==G.action){null!=G.viewport&&(this.embedViewport=G.viewport);return}if("snapshot"==G.action){this.sendEmbeddedSvgExport(!0);return}if("export"==G.action){if("png"==G.format||"xmlpng"==G.format){if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin)){var ja=null!=G.xml?G.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var ca=this.editor.graph,ka=mxUtils.bind(this,function(la){this.editor.graph.setEnabled(!0); +this.spinner.stop();var pa=this.createLoadMessage("export");pa.format=G.format;pa.message=G;pa.data=la;pa.xml=ja;H.postMessage(JSON.stringify(pa),"*")}),q=mxUtils.bind(this,function(la){null==la&&(la=Editor.blankImage);"xmlpng"==G.format&&(la=Editor.writeGraphModelToPng(la,"tEXt","mxfile",encodeURIComponent(ja)));ca!=this.editor.graph&&ca.container.parentNode.removeChild(ca.container);ka(la)}),E=G.pageId||(null!=this.pages?G.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var Q= +mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=E){var la=ca.getGlobalVariable;ca=this.createTemporaryGraph(ca.getStylesheet());for(var pa,xa=0;xa<this.pages.length;xa++)if(this.pages[xa].getId()==E){pa=this.updatePageRoot(this.pages[xa]);break}null==pa&&(pa=this.currentPage);ca.getGlobalVariable=function(La){return"page"==La?pa.getName():"pagenumber"==La?1:la.apply(this,arguments)};document.body.appendChild(ca.container);ca.model.setRoot(pa.root)}if(null!=G.layerIds){var Ca= +ca.model,Ia=Ca.getChildCells(Ca.getRoot()),Aa={};for(xa=0;xa<G.layerIds.length;xa++)Aa[G.layerIds[xa]]=!0;for(xa=0;xa<Ia.length;xa++)Ca.setVisible(Ia[xa],Aa[Ia[xa].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(La){q(La.toDataURL("image/png"))}),G.width,null,G.background,mxUtils.bind(this,function(){q(null)}),null,null,G.scale,G.transparent,G.shadow,null,ca,G.border,null,G.grid,G.keepTheme)});null!=G.xml&&0<G.xml.length&&(g=!0,this.setFileData(ja),g=!1);Q()}else(new mxXmlRequest(EXPORT_URL, +"format=png&embedXml="+("xmlpng"==G.format?"1":"0")+(null!=E?"&pageId="+E:"")+(null!=G.layerIds&&0<G.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:G.layerIds})):"")+(null!=G.scale?"&scale="+G.scale:"")+"&base64=1&xml="+encodeURIComponent(ja))).send(mxUtils.bind(this,function(la){200<=la.getStatus()&&299>=la.getStatus()?ka("data:image/png;base64,"+la.getText()):q(null)}),mxUtils.bind(this,function(){q(null)}))}}else if(Q=mxUtils.bind(this,function(){var la=this.createLoadMessage("export"); +la.message=G;if("html2"==G.format||"html"==G.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var pa=this.getXmlFileData();la.xml=mxUtils.getXml(pa);la.data=this.getFileData(null,null,!0,null,null,null,pa);la.format=G.format}else if("html"==G.format)pa=this.editor.getGraphXml(),la.data=this.getHtml(pa,this.editor.graph),la.xml=mxUtils.getXml(pa),la.format=G.format;else{mxSvgCanvas2D.prototype.foAltText=null;pa=null!=G.background?G.background:this.editor.graph.background;pa== +mxConstants.NONE&&(pa=null);la.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);la.format="svg";var xa=mxUtils.bind(this,function(Ca){this.editor.graph.setEnabled(!0);this.spinner.stop();la.data=Editor.createSvgDataUri(Ca);H.postMessage(JSON.stringify(la),"*")});if("xmlsvg"==G.format)(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))&&this.getEmbeddedSvg(la.xml,this.editor.graph,null,!0,xa,null,null,G.embedImages, +pa,G.scale,G.border,G.shadow,G.keepTheme);else if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))this.editor.graph.setEnabled(!1),pa=this.editor.graph.getSvg(pa,G.scale,G.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||G.shadow,null,G.keepTheme),(this.editor.graph.shadowVisible||G.shadow)&&this.editor.graph.addSvgShadow(pa),this.embedFonts(pa,mxUtils.bind(this,function(Ca){G.embedImages||null==G.embedImages?this.editor.convertImages(Ca, +mxUtils.bind(this,function(Ia){xa(mxUtils.getXml(Ia))})):xa(mxUtils.getXml(Ca))}));return}H.postMessage(JSON.stringify(la),"*")}),null!=G.xml&&0<G.xml.length){if(this.editor.graph.mathEnabled){var Y=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){Y.apply(this,arguments);Q()}}g=!0;this.setFileData(G.xml);g=!1;this.editor.graph.mathEnabled||Q()}else Q();return}if("load"==G.action){Z=G.toSketch;x=1==G.autosave;this.hideDialog();null!=G.modified&&null==urlParams.modified&&(urlParams.modified=G.modified); +null!=G.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=G.saveAndExit);null!=G.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=G.noSaveBtn);if(null!=G.rough){var R=Editor.sketchMode;this.doSetSketchMode(G.rough);R!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=G.dark&&(R=Editor.darkMode,this.doSetDarkMode(G.dark),R!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=G.border&&(this.embedExportBorder=G.border); null!=G.background&&(this.embedExportBackground=G.background);null!=G.viewport&&(this.embedViewport=G.viewport);this.embedExitPoint=null;if(null!=G.rect){var ba=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=G.rect.top+"px";this.diagramContainer.style.left=G.rect.left+"px";this.diagramContainer.style.height=G.rect.height+"px";this.diagramContainer.style.width=G.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right= -"";V=mxUtils.bind(this,function(){var ma=this.editor.graph,pa=ma.maxFitScale;ma.maxFitScale=G.maxFitScale;ma.fit(2*ba);ma.maxFitScale=pa;ma.container.scrollTop-=2*ba;ma.container.scrollLeft-=2*ba;this.fireEvent(new mxEventObject("editInlineStart","data",[G]))})}null!=G.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=G.noExitBtn);null!=G.title&&null!=this.buttonContainer&&(qa=document.createElement("span"),mxUtils.write(qa,G.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan), -this.buttonContainer.appendChild(qa),this.embedFilenameSpan=qa);try{G.libs&&this.sidebar.showEntries(G.libs)}catch(ma){}G=null!=G.xmlpng?this.extractGraphModelFromPng(G.xmlpng):null!=G.descriptor?G.descriptor:G.xml}else{if("merge"==G.action){var ha=this.getCurrentFile();null!=ha&&(qa=U(G.xml),null!=qa&&""!=qa&&ha.mergeFile(new LocalFile(this,qa),function(){H.postMessage(JSON.stringify({event:"merge",message:G}),"*")},function(ma){H.postMessage(JSON.stringify({event:"merge",message:G,error:ma}),"*")}))}else"remoteInvokeReady"== -G.action?this.handleRemoteInvokeReady(H):"remoteInvoke"==G.action?this.handleRemoteInvoke(G,D.origin):"remoteInvokeResponse"==G.action?this.handleRemoteInvokeResponse(G):H.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(G)}),"*");return}}catch(ma){this.handleError(ma)}}var ra=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),ta=mxUtils.bind(this,function(ma,pa){g=!0; -try{d(ma,pa,null,Y)}catch(za){this.handleError(za)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");z=ra();x&&null==f&&(f=mxUtils.bind(this,function(za,Ba){za=ra();za==z||g||(Ba=this.createLoadMessage("autosave"),Ba.xml=za,(window.opener||window.parent).postMessage(JSON.stringify(Ba),"*"));z=za}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged", -f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)pa=this.createLoadMessage("load"),pa.xml=ma,H.postMessage(JSON.stringify(pa),"*");null!=V&&V()});null!=G&& -"function"===typeof G.substring&&"data:application/vnd.visio;base64,"==G.substring(0,34)?(U="0M8R4KGxGuE"==G.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(G.substring(G.indexOf(",")+1)),function(ma){ta(ma,D)},mxUtils.bind(this,function(ma){this.handleError(ma)}),U)):null!=G&&"function"===typeof G.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(G,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(G, -mxUtils.bind(this,function(ma){4==ma.readyState&&200<=ma.status&&299>=ma.status&&"<mxGraphModel"==ma.responseText.substring(0,13)&&ta(ma.responseText,D)}),""):null!=G&&"function"===typeof G.substring&&this.isLucidChartData(G)?this.convertLucidChart(G,mxUtils.bind(this,function(ma){ta(ma)}),mxUtils.bind(this,function(ma){this.handleError(ma)})):null==G||"object"!==typeof G||null==G.format||null==G.data&&null==G.url?(G=U(G),ta(G,D)):this.loadDescriptor(G,mxUtils.bind(this,function(ma){ta(ra(),D)}), -mxUtils.bind(this,function(ma){this.handleError(ma,mxResources.get("errorLoadingFile"))}))}}));var H=window.opener||window.parent;u="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";H.postMessage(u,"*");if("json"==urlParams.proto){var J=this.editor.graph.openLink;this.editor.graph.openLink=function(D,G,V){J.apply(this,arguments);H.postMessage(JSON.stringify({event:"openLink",href:D,target:G,allowOpener:V}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!= -this.menubar&&"1"!=urlParams.embedInline){var d=document.createElement("div");d.style.display="inline-block";d.style.position="absolute";d.style.paddingTop="2px";d.style.paddingLeft="8px";d.style.paddingBottom="2px";var f=document.createElement("button");f.className="geBigButton";var g=f;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var x="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(f,x);f.setAttribute("title",x);mxEvent.addListener(f, -"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));d.appendChild(f)}}else mxUtils.write(f,mxResources.get("save")),f.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),d.appendChild(f),"1"==urlParams.saveAndExit&&(f=document.createElement("a"),mxUtils.write(f,mxResources.get("saveAndExit")),f.setAttribute("title",mxResources.get("saveAndExit")),f.className= -"geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),d.appendChild(f),g=f);"1"!=urlParams.noExitBtn&&(f=document.createElement("a"),g="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(f,g),f.setAttribute("title",g),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})), -d.appendChild(f),g=f);g.style.marginRight="20px";this.toolbar.container.appendChild(d);this.toolbar.staticElements.push(d);d.style.right="atlas"==uiTheme||"1"==urlParams.atlas?"62px":"72px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(d){this.importCsv(d)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/")); -this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(d){var f=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();d()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?f():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js", -function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",f)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",f))};EditorUi.prototype.importCsv=function(d,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,f)}))};EditorUi.prototype.doImportCsv=function(d,f){try{var g=d.split("\n"),x=[],z=[],u=[],H={};if(0<g.length){var J={},D=this.editor.graph,G=null,V=null,U=null,Y=null,O=null,qa=null,oa=null,aa="whiteSpace=wrap;html=1;", -da=null,ia=null,L="",Z="auto",P="auto",ca=!1,ja=null,ka=null,q=40,F=40,R=100,W=0,T=mxUtils.bind(this,function(){null!=f?f(ya):(D.setSelectionCells(ya),D.scrollCellToVisible(D.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),ba=D.getFreeInsertPoint(),ha=ba.x,ra=ba.y;ba=ra;var ta=null,ma="auto";ia=null;for(var pa=[],za=null,Ba=null,Ia=0;Ia<g.length&&"#"==g[Ia].charAt(0);){d=g[Ia].replace(/\r$/,"");for(Ia++;Ia<g.length&& -"\\"==d.charAt(d.length-1)&&"#"==g[Ia].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(g[Ia].substring(1)),Ia++;if("#"!=d.charAt(1)){var Aa=d.indexOf(":");if(0<Aa){var Ka=mxUtils.trim(d.substring(1,Aa)),Da=mxUtils.trim(d.substring(Aa+1));"label"==Ka?ta=D.sanitizeHtml(Da):"labelname"==Ka&&0<Da.length&&"-"!=Da?O=Da:"labels"==Ka&&0<Da.length&&"-"!=Da?oa=JSON.parse(Da):"style"==Ka?V=Da:"parentstyle"==Ka?aa=Da:"unknownStyle"==Ka&&"-"!=Da?qa=Da:"stylename"==Ka&&0<Da.length&&"-"!=Da?Y=Da:"styles"==Ka&& -0<Da.length&&"-"!=Da?U=JSON.parse(Da):"vars"==Ka&&0<Da.length&&"-"!=Da?G=JSON.parse(Da):"identity"==Ka&&0<Da.length&&"-"!=Da?da=Da:"parent"==Ka&&0<Da.length&&"-"!=Da?ia=Da:"namespace"==Ka&&0<Da.length&&"-"!=Da?L=Da:"width"==Ka?Z=Da:"height"==Ka?P=Da:"collapsed"==Ka&&"-"!=Da?ca="true"==Da:"left"==Ka&&0<Da.length?ja=Da:"top"==Ka&&0<Da.length?ka=Da:"ignore"==Ka?Ba=Da.split(","):"connect"==Ka?pa.push(JSON.parse(Da)):"link"==Ka?za=Da:"padding"==Ka?W=parseFloat(Da):"edgespacing"==Ka?q=parseFloat(Da):"nodespacing"== -Ka?F=parseFloat(Da):"levelspacing"==Ka?R=parseFloat(Da):"layout"==Ka&&(ma=Da)}}}if(null==g[Ia])throw Error(mxResources.get("invalidOrMissingFile"));var Ra=this.editor.csvToArray(g[Ia].replace(/\r$/,""));Aa=d=null;Ka=[];for(Da=0;Da<Ra.length;Da++)da==Ra[Da]&&(d=Da),ia==Ra[Da]&&(Aa=Da),Ka.push(mxUtils.trim(Ra[Da]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ta&&(ta="%"+Ka[0]+"%");if(null!=pa)for(var Qa=0;Qa<pa.length;Qa++)null==J[pa[Qa].to]&&(J[pa[Qa].to]={});da=[];for(Da= -Ia+1;Da<g.length;Da++){var Ta=this.editor.csvToArray(g[Da].replace(/\r$/,""));if(null==Ta){var Za=40<g[Da].length?g[Da].substring(0,40)+"...":g[Da];throw Error(Za+" ("+Da+"):\n"+mxResources.get("containsValidationErrors"));}0<Ta.length&&da.push(Ta)}D.model.beginUpdate();try{for(Da=0;Da<da.length;Da++){Ta=da[Da];var Pa=null,y=null!=d?L+Ta[d]:null;g=!1;null!=y&&(Pa=D.model.getCell(y),g=null==Pa||0<=mxUtils.indexOf(x,Pa));var M=new mxCell(ta,new mxGeometry(ha,ba,0,0),V||"whiteSpace=wrap;html=1;");M.collapsed= -ca;M.vertex=!0;M.id=y;null==Pa||g||D.model.setCollapsed(Pa,ca);for(var N=0;N<Ta.length;N++)D.setAttributeForCell(M,Ka[N],Ta[N]),null==Pa||g||D.setAttributeForCell(Pa,Ka[N],Ta[N]);if(null!=O&&null!=oa){var S=oa[M.getAttribute(O)];null!=S&&(D.labelChanged(M,S),null==Pa||g||D.cellLabelChanged(Pa,S))}if(null!=Y&&null!=U){var X=U[M.getAttribute(Y)];null!=X&&(M.style=X)}D.setAttributeForCell(M,"placeholders","1");M.style=D.replacePlaceholders(M,M.style,G);null==Pa||g?D.fireEvent(new mxEventObject("cellsInserted", -"cells",[M])):(D.model.setStyle(Pa,M.style),0>mxUtils.indexOf(u,Pa)&&u.push(Pa),D.fireEvent(new mxEventObject("cellsInserted","cells",[Pa])));g=null!=Pa;Pa=M;if(!g)for(Qa=0;Qa<pa.length;Qa++)J[pa[Qa].to][Pa.getAttribute(pa[Qa].to)]=Pa;null!=za&&"link"!=za&&(D.setLinkForCell(Pa,Pa.getAttribute(za)),D.setAttributeForCell(Pa,za,null));var fa=this.editor.graph.getPreferredSizeForCell(Pa);ia=null!=Aa?D.model.getCell(L+Ta[Aa]):null;if(Pa.vertex){Za=null!=ia?0:ha;Ia=null!=ia?0:ra;null!=ja&&null!=Pa.getAttribute(ja)&& -(Pa.geometry.x=Za+parseFloat(Pa.getAttribute(ja)));null!=ka&&null!=Pa.getAttribute(ka)&&(Pa.geometry.y=Ia+parseFloat(Pa.getAttribute(ka)));var la="@"==Z.charAt(0)?Pa.getAttribute(Z.substring(1)):null;Pa.geometry.width=null!=la&&"auto"!=la?parseFloat(Pa.getAttribute(Z.substring(1))):"auto"==Z||"auto"==la?fa.width+W:parseFloat(Z);var xa="@"==P.charAt(0)?Pa.getAttribute(P.substring(1)):null;Pa.geometry.height=null!=xa&&"auto"!=xa?parseFloat(xa):"auto"==P||"auto"==xa?fa.height+W:parseFloat(P);ba+=Pa.geometry.height+ -F}g?(null==H[y]&&(H[y]=[]),H[y].push(Pa)):(x.push(Pa),null!=ia?(ia.style=D.replacePlaceholders(ia,aa,G),D.addCell(Pa,ia),z.push(ia)):u.push(D.addCell(Pa)))}for(Da=0;Da<z.length;Da++)la="@"==Z.charAt(0)?z[Da].getAttribute(Z.substring(1)):null,xa="@"==P.charAt(0)?z[Da].getAttribute(P.substring(1)):null,"auto"!=Z&&"auto"!=la||"auto"!=P&&"auto"!=xa||D.updateGroupBounds([z[Da]],W,!0);var sa=u.slice(),ya=u.slice();for(Qa=0;Qa<pa.length;Qa++){var Fa=pa[Qa];for(Da=0;Da<x.length;Da++){Pa=x[Da];var wa=mxUtils.bind(this, -function(fb,pb,lb){var $a=pb.getAttribute(lb.from);if(null!=$a&&""!=$a){$a=$a.split(",");for(var ab=0;ab<$a.length;ab++){var ib=J[lb.to][$a[ab]];if(null==ib&&null!=qa){ib=new mxCell($a[ab],new mxGeometry(ha,ra,0,0),qa);ib.style=D.replacePlaceholders(pb,ib.style,G);var gb=this.editor.graph.getPreferredSizeForCell(ib);ib.geometry.width=gb.width+W;ib.geometry.height=gb.height+W;J[lb.to][$a[ab]]=ib;ib.vertex=!0;ib.id=$a[ab];u.push(D.addCell(ib))}if(null!=ib){gb=lb.label;null!=lb.fromlabel&&(gb=(pb.getAttribute(lb.fromlabel)|| -"")+(gb||""));null!=lb.sourcelabel&&(gb=D.replacePlaceholders(pb,lb.sourcelabel,G)+(gb||""));null!=lb.tolabel&&(gb=(gb||"")+(ib.getAttribute(lb.tolabel)||""));null!=lb.targetlabel&&(gb=(gb||"")+D.replacePlaceholders(ib,lb.targetlabel,G));var qb="target"==lb.placeholders==!lb.invert?ib:fb;qb=null!=lb.style?D.replacePlaceholders(qb,lb.style,G):D.createCurrentEdgeStyle();gb=D.insertEdge(null,null,gb||"",lb.invert?ib:fb,lb.invert?fb:ib,qb);if(null!=lb.labels)for(qb=0;qb<lb.labels.length;qb++){var nb= -lb.labels[qb],mb=new mxCell(nb.label||qb,new mxGeometry(null!=nb.x?nb.x:0,null!=nb.y?nb.y:0,0,0),"resizable=0;html=1;");mb.vertex=!0;mb.connectable=!1;mb.geometry.relative=!0;null!=nb.placeholders&&(mb.value=D.replacePlaceholders("target"==nb.placeholders==!lb.invert?ib:fb,mb.value,G));if(null!=nb.dx||null!=nb.dy)mb.geometry.offset=new mxPoint(null!=nb.dx?nb.dx:0,null!=nb.dy?nb.dy:0);gb.insert(mb)}ya.push(gb);mxUtils.remove(lb.invert?fb:ib,sa)}}}});wa(Pa,Pa,Fa);if(null!=H[Pa.id])for(N=0;N<H[Pa.id].length;N++)wa(Pa, -H[Pa.id][N],Fa)}}if(null!=Ba)for(Da=0;Da<x.length;Da++)for(Pa=x[Da],N=0;N<Ba.length;N++)D.setAttributeForCell(Pa,mxUtils.trim(Ba[N]),null);if(0<u.length){var ua=new mxParallelEdgeLayout(D);ua.spacing=q;ua.checkOverlap=!0;var La=function(){0<ua.spacing&&ua.execute(D.getDefaultParent());for(var fb=0;fb<u.length;fb++){var pb=D.getCellGeometry(u[fb]);pb.x=Math.round(D.snap(pb.x));pb.y=Math.round(D.snap(pb.y));"auto"==Z&&(pb.width=Math.round(D.snap(pb.width)));"auto"==P&&(pb.height=Math.round(D.snap(pb.height)))}}; -if("["==ma.charAt(0)){var Oa=T;D.view.validate();this.executeLayouts(D.createLayouts(JSON.parse(ma)),function(){La();Oa()});T=null}else if("circle"==ma){var Ca=new mxCircleLayout(D);Ca.disableEdgeStyle=!1;Ca.resetEdges=!1;var Ma=Ca.isVertexIgnored;Ca.isVertexIgnored=function(fb){return Ma.apply(this,arguments)||0>mxUtils.indexOf(u,fb)};this.executeLayout(function(){Ca.execute(D.getDefaultParent());La()},!0,T);T=null}else if("horizontaltree"==ma||"verticaltree"==ma||"auto"==ma&&ya.length==2*u.length- -1&&1==sa.length){D.view.validate();var Ga=new mxCompactTreeLayout(D,"horizontaltree"==ma);Ga.levelDistance=F;Ga.edgeRouting=!1;Ga.resetEdges=!1;this.executeLayout(function(){Ga.execute(D.getDefaultParent(),0<sa.length?sa[0]:null)},!0,T);T=null}else if("horizontalflow"==ma||"verticalflow"==ma||"auto"==ma&&1==sa.length){D.view.validate();var Ya=new mxHierarchicalLayout(D,"horizontalflow"==ma?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);Ya.intraCellSpacing=F;Ya.parallelEdgeSpacing=q;Ya.interRankCellSpacing= -R;Ya.disableEdgeStyle=!1;this.executeLayout(function(){Ya.execute(D.getDefaultParent(),ya);D.moveCells(ya,ha,ra)},!0,T);T=null}else if("orgchart"==ma){D.view.validate();var db=new mxOrgChartLayout(D,2,R,F),eb=db.isVertexIgnored;db.isVertexIgnored=function(fb){return eb.apply(this,arguments)||0>mxUtils.indexOf(u,fb)};this.executeLayout(function(){db.execute(D.getDefaultParent());La()},!0,T);T=null}else if("organic"==ma||"auto"==ma&&ya.length>u.length){D.view.validate();var cb=new mxFastOrganicLayout(D); -cb.forceConstant=3*F;cb.disableEdgeStyle=!1;cb.resetEdges=!1;var ub=cb.isVertexIgnored;cb.isVertexIgnored=function(fb){return ub.apply(this,arguments)||0>mxUtils.indexOf(u,fb)};this.executeLayout(function(){cb.execute(D.getDefaultParent());La()},!0,T);T=null}}this.hideDialog()}finally{D.model.endUpdate()}null!=T&&T()}}catch(fb){this.handleError(fb)}};EditorUi.prototype.getSearch=function(d){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var g="?", -x;for(x in urlParams)0>mxUtils.indexOf(d,x)&&null!=urlParams[x]&&(f+=g+x+"="+urlParams[x],g="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var f=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),x;for(x in urlParams)0>mxUtils.indexOf(g,x)&&(d=0==f?d+"?":d+"&",null!=urlParams[x]&&(d+=x+"="+urlParams[x], -f++))}return d};EditorUi.prototype.showLinkDialog=function(d,f,g,x,z){d=new LinkDialog(this,d,f,g,!0,x,z);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;d&&isLocalStorage&&"1"==urlParams.browser&&f++; -return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),f=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!g);this.actions.get("print").setEnabled(!g);this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g); -g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);this.actions.get("resetView").setEnabled(f);this.actions.get("undo").setEnabled(this.canUndo()&& -d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement= -function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var E=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=function(d){var f=E.apply(this,arguments);this.addListener("darkModeChanged",mxUtils.bind(this,function(){f.refresh()}));this.addListener("sketchModeChanged", -mxUtils.bind(this,function(){f.refresh()}));return f};var K=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){K.apply(this,arguments);var d=this.editor.graph,f=this.getCurrentFile(),g=this.getSelectionState(),x=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(x);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(x);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(x); -this.actions.get("connectionArrows").setEnabled(x);this.actions.get("connectionPoints").setEnabled(x);this.actions.get("copyStyle").setEnabled(x&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(x&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(x);this.actions.get("createRevision").setEnabled(x);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted()); -this.actions.get("editDiagram").setEnabled(x&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!= -f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"");d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(x&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};var Q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog), -this.exportDialog=null);Q.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,f,g,x,z,u,H,J){var D=d.editor.graph;if("xml"==g)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==g)d.hideDialog(),d.saveData(f,"svg",mxUtils.getXml(D.getSvg(x,z,u)),"image/svg+xml");else{var G=d.getFileData(!0,null,null,null,null,!0),V=D.getGraphBounds(),U=Math.floor(V.width*z/ -D.view.scale),Y=Math.floor(V.height*z/D.view.scale);if(G.length<=MAX_REQUEST_SIZE&&U*Y<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!d.isExportToCanvas()){var O={globalVars:D.getExportVariables()};J&&(O.grid={size:D.gridSize,steps:D.view.gridSteps,color:D.view.gridColor});d.saveRequest(f,g,function(qa,oa){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(oa||"0")+(null!=qa?"&filename="+encodeURIComponent(qa):"")+"&extras="+encodeURIComponent(JSON.stringify(O))+(0<H?"&dpi="+H: -"")+"&bg="+(null!=x?x:"none")+"&w="+U+"&h="+Y+"&border="+u+"&xml="+encodeURIComponent(G))})}else"png"==g?d.exportImage(z,null==x||"none"==x,!0,!1,!1,u,!0,!1,null,J,H):d.exportImage(z,!1,!0,!1,!1,u,!0,!1,"jpeg",J);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,f="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var x=d;this.currentPage!=this.pages[g]&&(x=this.createTemporaryGraph(d.getStylesheet()), -this.updatePageRoot(this.pages[g]),x.model.setRoot(this.pages[g].root));f+=this.pages[g].getName()+" "+x.getIndexableText()+" "}else f=d.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var f={},g=document.createElement("div");g.style.whiteSpace="nowrap";var x=document.createElement("h3");mxUtils.write(x,mxUtils.htmlEntities(d));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(x);var z= -document.createElement("div");z.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";z.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var u={};try{var H=mxSettings.getCustomLibraries();for(d=0;d<H.length;d++){var J=H[d];if("R"==J.substring(0,1)){var D=JSON.parse(decodeURIComponent(J.substring(1)));u[D[0]]={id:D[0],title:D[1],downloadUrl:D[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){z.innerText=""; -if(0==G.length)z.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var V=0;V<G.length;V++){var U=G[V];u[U.id]&&(f[U.id]=U);var Y=this.addCheckbox(z,U.title,u[U.id]);(function(O,qa){mxEvent.addListener(qa,"change",function(){this.checked?f[O.id]=O:delete f[O.id]})})(U,Y)}},mxUtils.bind(this,function(G){z.innerText="";var V=document.createElement("div");V.style.padding="8px";V.style.textAlign="center";mxUtils.write(V, -mxResources.get("error")+": ");mxUtils.write(V,null!=G&&null!=G.message?G.message:mxResources.get("unknownError"));z.appendChild(V)}));g.appendChild(z);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var G=0,V;for(V in f)null==u[V]&&(G++,mxUtils.bind(this,function(U){this.remoteInvoke("getFileContent",[U.downloadUrl],null,mxUtils.bind(this,function(Y){G--;0==G&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,Y,U))}catch(O){this.handleError(O, -mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){G--;0==G&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[V]));for(V in u)f[V]||this.closeLibrary(new RemoteLibrary(this,null,u[V]));0==G&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(g.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1, -allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin=d;for(var f=0;f<this.remoteInvokeQueue.length;f++)d.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var f= -d.msgMarkers,g=this.remoteInvokeCallbacks[f.callbackId];if(null==g)throw Error("No callback for "+(null!=f?f.callbackId:"null"));d.error?g.error&&g.error(d.error.errResp):g.callback&&g.callback.apply(this,d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,g,x,z){var u=!0,H=window.setTimeout(mxUtils.bind(this,function(){u=!1;z({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),J=mxUtils.bind(this,function(){window.clearTimeout(H); -u&&x.apply(this,arguments)}),D=mxUtils.bind(this,function(){window.clearTimeout(H);u&&z.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:J,error:D});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var g=mxUtils.bind(this,function(G,V){var U={event:"remoteInvokeResponse", -msgMarkers:d.msgMarkers};null!=V?U.error={errResp:V}:null!=G&&(U.resp=G);this.remoteWin.postMessage(JSON.stringify(U),"*")});try{var x=d.funtionName,z=this.remoteInvokableFns[x];if(null!=z&&"function"===typeof this[x]){if(z.allowedDomains){for(var u=!1,H=0;H<z.allowedDomains.length;H++)if(f=="https://"+z.allowedDomains[H]){u=!0;break}if(!u){g(null,"Invalid Call: "+x+" is not allowed.");return}}var J=d.functionArgs;Array.isArray(J)||(J=[]);if(z.isAsync)J.push(function(){g(Array.prototype.slice.apply(arguments))}), -J.push(function(G){g(null,G||"Unkown Error")}),this[x].apply(this,J);else{var D=this[x].apply(this,J);g([D])}}else g(null,"Invalid Call: "+x+" is not found.")}catch(G){g(null,"Invalid Call: An error occurred, "+G.message)}};EditorUi.prototype.openDatabase=function(d,f){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var x=g.open("database",2);x.onupgradeneeded=function(z){try{var u=x.result;1>z.oldVersion&&u.createObjectStore("objects",{keyPath:"key"}); -2>z.oldVersion&&(u.createObjectStore("files",{keyPath:"title"}),u.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(H){null!=f&&f(H)}};x.onsuccess=mxUtils.bind(this,function(z){var u=x.result;this.database=u;EditorUi.migrateStorageFiles&&(StorageFile.migrate(u),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(H){if(!H|| -"1"==urlParams.forceMigration){var J=document.createElement("iframe");J.style.display="none";J.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(J);var D=!0,G=!1,V,U=0,Y=mxUtils.bind(this,function(){G=!0;this.setDatabaseItem(".drawioMigrated3",!0);J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),O=mxUtils.bind(this,function(){U++;qa()}),qa=mxUtils.bind(this,function(){try{if(U>= -V.length)Y();else{var aa=V[U];StorageFile.getFileContent(this,aa,mxUtils.bind(this,function(da){null==da||".scratchpad"==aa&&da==this.emptyLibraryXml?J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[aa]}),"*"):O()}),O)}}catch(da){console.log(da)}}),oa=mxUtils.bind(this,function(aa){try{this.setDatabaseItem(null,[{title:aa.title,size:aa.data.length,lastModified:Date.now(),type:aa.isLib?"L":"F"},{title:aa.title,data:aa.data}],O,O,["filesInfo", -"files"])}catch(da){console.log(da)}});H=mxUtils.bind(this,function(aa){try{if(aa.source==J.contentWindow){var da={};try{da=JSON.parse(aa.data)}catch(ia){}"init"==da.event?(J.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=da.event||G||(D?null!=da.resp&&0<da.resp.length&&null!=da.resp[0]?(V=da.resp[0],D=!1,qa()):Y():null!=da.resp&&0<da.resp.length&& -null!=da.resp[0]?oa(da.resp[0]):O())}}catch(ia){console.log(ia)}});window.addEventListener("message",H)}})));d(u);u.onversionchange=function(){u.close()}});x.onerror=f;x.onblocked=function(){}}catch(z){null!=f&&f(z)}else null!=f&&f()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,f,g,x,z){this.openDatabase(mxUtils.bind(this,function(u){try{z=z||"objects";Array.isArray(z)||(z=[z],d=[d],f=[f]);var H=u.transaction(z,"readwrite");H.oncomplete=g;H.onerror=x;for(u=0;u<z.length;u++)H.objectStore(z[u]).put(null!= -d&&null!=d[u]?{key:d[u],data:f[u]}:f[u])}catch(J){null!=x&&x(J)}}),x)};EditorUi.prototype.removeDatabaseItem=function(d,f,g,x){this.openDatabase(mxUtils.bind(this,function(z){x=x||"objects";Array.isArray(x)||(x=[x],d=[d]);z=z.transaction(x,"readwrite");z.oncomplete=f;z.onerror=g;for(var u=0;u<x.length;u++)z.objectStore(x[u]).delete(d[u])}),g)};EditorUi.prototype.getDatabaseItem=function(d,f,g,x){this.openDatabase(mxUtils.bind(this,function(z){try{x=x||"objects";var u=z.transaction([x],"readonly").objectStore(x).get(d); -u.onsuccess=function(){f(u.result)};u.onerror=g}catch(H){null!=g&&g(H)}}),g)};EditorUi.prototype.getDatabaseItems=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(x){try{g=g||"objects";var z=x.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),u=[];z.onsuccess=function(H){null==H.target.result?d(u):(u.push(H.target.result.value),H.target.result.continue())};z.onerror=f}catch(H){null!=f&&f(H)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(d,f,g){this.openDatabase(mxUtils.bind(this, -function(x){try{g=g||"objects";var z=x.transaction([g],"readonly").objectStore(g).getAllKeys();z.onsuccess=function(){d(z.result)};z.onerror=f}catch(u){null!=f&&f(u)}}),f)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!= -d?d.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(d,f){var g=this.getCurrentFile();null!=g?g.getComments(d,f):d([])};EditorUi.prototype.addComment=function(d,f,g){var x=this.getCurrentFile();null!=x?x.addComment(d,f,g):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment= -function(d,f){var g=this.getCurrentFile();return null!=g?g.newComment(d,f):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(d,f){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(d,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile(); -return null!=d&&(d.constructor==DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,f,g,x,z,u,H,J){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,x,z,u,H,J)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts"); -return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d, -f,g,x,z,u,H,J,D,G,V,U,Y,O,qa,oa){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,g,x,z,u,H,J,D,G,V,U,Y,O,qa,oa)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,f,g,x){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,f,g,x)};EditorUi.prototype.convertImageToDataUri= -function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,f)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,f,g,x){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,f,g,x)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)}; -EditorUi.prototype.writeGraphModelToPng=function(d,f,g,x,z){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,f,g,x,z)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],f=0;f<localStorage.length;f++){var g=localStorage.key(f),x=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<x.length){var z="<mxfile "=== -x.substring(0,8)||"<?xml"===x.substring(0,5)||"\x3c!--[if IE]>"===x.substring(0,12);x="<mxlibrary>"===x.substring(0,11);(z||x)&&d.push(g)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(d);return{title:d,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})(); -var CommentsWindow=function(b,e,k,m,C,p){function E(){for(var aa=G.getElementsByTagName("div"),da=0,ia=0;ia<aa.length;ia++)"none"!=aa[ia].style.display&&aa[ia].parentNode==G&&da++;V.style.display=0==da?"block":"none"}function K(aa,da,ia,L){function Z(){da.removeChild(ja);da.removeChild(ka);ca.style.display="block";P.style.display="block"}H={div:da,comment:aa,saveCallback:ia,deleteOnCancel:L};var P=da.querySelector(".geCommentTxt"),ca=da.querySelector(".geCommentActionsList"),ja=document.createElement("textarea"); -ja.className="geCommentEditTxtArea";ja.style.minHeight=P.offsetHeight+"px";ja.value=aa.content;da.insertBefore(ja,P);var ka=document.createElement("div");ka.className="geCommentEditBtns";var q=mxUtils.button(mxResources.get("cancel"),function(){L?(da.parentNode.removeChild(da),E()):Z();H=null});q.className="geCommentEditBtn";ka.appendChild(q);var F=mxUtils.button(mxResources.get("save"),function(){P.innerText="";aa.content=ja.value;mxUtils.write(P,aa.content);Z();ia(aa);H=null});mxEvent.addListener(ja, -"keydown",mxUtils.bind(this,function(R){mxEvent.isConsumed(R)||((mxEvent.isControlDown(R)||mxClient.IS_MAC&&mxEvent.isMetaDown(R))&&13==R.keyCode?(F.click(),mxEvent.consume(R)):27==R.keyCode&&(q.click(),mxEvent.consume(R)))}));F.focus();F.className="geCommentEditBtn gePrimaryBtn";ka.appendChild(F);da.insertBefore(ka,P);ca.style.display="none";P.style.display="none";ja.focus()}function Q(aa,da){da.innerText="";aa=new Date(aa.modifiedDate);var ia=b.timeSince(aa);null==ia&&(ia=mxResources.get("lessThanAMinute")); -mxUtils.write(da,mxResources.get("timeAgo",[ia],"{1} ago"));da.setAttribute("title",aa.toLocaleDateString()+" "+aa.toLocaleTimeString())}function d(aa){var da=document.createElement("img");da.className="geCommentBusyImg";da.src=IMAGE_PATH+"/spin.gif";aa.appendChild(da);aa.busyImg=da}function f(aa){aa.style.border="1px solid red";aa.removeChild(aa.busyImg)}function g(aa){aa.style.border="";aa.removeChild(aa.busyImg)}function x(aa,da,ia,L,Z){function P(T,ba,ha){var ra=document.createElement("li");ra.className= -"geCommentAction";var ta=document.createElement("a");ta.className="geCommentActionLnk";mxUtils.write(ta,T);ra.appendChild(ta);mxEvent.addListener(ta,"click",function(ma){ba(ma,aa);ma.preventDefault();mxEvent.consume(ma)});W.appendChild(ra);ha&&(ra.style.display="none")}function ca(){function T(ra){ba.push(ha);if(null!=ra.replies)for(var ta=0;ta<ra.replies.length;ta++)ha=ha.nextSibling,T(ra.replies[ta])}var ba=[],ha=ka;T(aa);return{pdiv:ha,replies:ba}}function ja(T,ba,ha,ra,ta){function ma(){d(Ia); -aa.addReply(Ba,function(Aa){Ba.id=Aa;aa.replies.push(Ba);g(Ia);ha&&ha()},function(Aa){pa();f(Ia);b.handleError(Aa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},ra,ta)}function pa(){K(Ba,Ia,function(Aa){ma()},!0)}var za=ca().pdiv,Ba=b.newComment(T,b.getCurrentUser());Ba.pCommentId=aa.id;null==aa.replies&&(aa.replies=[]);var Ia=x(Ba,aa.replies,za,L+1);ba?pa():ma()}if(Z||!aa.isResolved){V.style.display="none";var ka=document.createElement("div");ka.className="geCommentContainer"; -ka.setAttribute("data-commentId",aa.id);ka.style.marginLeft=20*L+5+"px";aa.isResolved&&!Editor.isDarkMode()&&(ka.style.backgroundColor="ghostWhite");var q=document.createElement("div");q.className="geCommentHeader";var F=document.createElement("img");F.className="geCommentUserImg";F.src=aa.user.pictureUrl||Editor.userImage;q.appendChild(F);F=document.createElement("div");F.className="geCommentHeaderTxt";q.appendChild(F);var R=document.createElement("div");R.className="geCommentUsername";mxUtils.write(R, -aa.user.displayName||"");F.appendChild(R);R=document.createElement("div");R.className="geCommentDate";R.setAttribute("data-commentId",aa.id);Q(aa,R);F.appendChild(R);ka.appendChild(q);q=document.createElement("div");q.className="geCommentTxt";mxUtils.write(q,aa.content||"");ka.appendChild(q);aa.isLocked&&(ka.style.opacity="0.5");q=document.createElement("div");q.className="geCommentActions";var W=document.createElement("ul");W.className="geCommentActionsList";q.appendChild(W);z||aa.isLocked||0!=L&& -!u||P(mxResources.get("reply"),function(){ja("",!0)},aa.isResolved);F=b.getCurrentUser();null==F||F.id!=aa.user.id||z||aa.isLocked||(P(mxResources.get("edit"),function(){function T(){K(aa,ka,function(){d(ka);aa.editComment(aa.content,function(){g(ka)},function(ba){f(ka);T();b.handleError(ba,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}T()},aa.isResolved),P(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){d(ka);aa.deleteComment(function(T){if(!0=== -T){T=ka.querySelector(".geCommentTxt");T.innerText="";mxUtils.write(T,mxResources.get("msgDeleted"));var ba=ka.querySelectorAll(".geCommentAction");for(T=0;T<ba.length;T++)ba[T].parentNode.removeChild(ba[T]);g(ka);ka.style.opacity="0.5"}else{ba=ca(aa).replies;for(T=0;T<ba.length;T++)G.removeChild(ba[T]);for(T=0;T<da.length;T++)if(da[T]==aa){da.splice(T,1);break}V.style.display=0==G.getElementsByTagName("div").length?"block":"none"}},function(T){f(ka);b.handleError(T,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}, -aa.isResolved));z||aa.isLocked||0!=L||P(aa.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(T){function ba(){var ha=T.target;ha.innerText="";aa.isResolved=!aa.isResolved;mxUtils.write(ha,aa.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var ra=aa.isResolved?"none":"",ta=ca(aa).replies,ma=Editor.isDarkMode()?"transparent":aa.isResolved?"ghostWhite":"white",pa=0;pa<ta.length;pa++){ta[pa].style.backgroundColor=ma;for(var za=ta[pa].querySelectorAll(".geCommentAction"), -Ba=0;Ba<za.length;Ba++)za[Ba]!=ha.parentNode&&(za[Ba].style.display=ra);O||(ta[pa].style.display="none")}E()}aa.isResolved?ja(mxResources.get("reOpened")+": ",!0,ba,!1,!0):ja(mxResources.get("markedAsResolved"),!1,ba,!0)});ka.appendChild(q);null!=ia?G.insertBefore(ka,ia.nextSibling):G.appendChild(ka);for(ia=0;null!=aa.replies&&ia<aa.replies.length;ia++)q=aa.replies[ia],q.isResolved=aa.isResolved,x(q,aa.replies,null,L+1,Z);null!=H&&(H.comment.id==aa.id?(Z=aa.content,aa.content=H.comment.content,K(aa, -ka,H.saveCallback,H.deleteOnCancel),aa.content=Z):null==H.comment.id&&H.comment.pCommentId==aa.id&&(G.appendChild(H.div),K(H.comment,H.div,H.saveCallback,H.deleteOnCancel)));return ka}}var z=!b.canComment(),u=b.canReplyToReplies(),H=null,J=document.createElement("div");J.className="geCommentsWin";J.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var D=EditorUi.compactUi?"26px":"30px",G=document.createElement("div");G.className="geCommentsList";G.style.backgroundColor=Editor.isDarkMode()? -Dialog.backdropColor:"whiteSmoke";G.style.bottom=parseInt(D)+7+"px";J.appendChild(G);var V=document.createElement("span");V.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(V,mxResources.get("noCommentsFound"));var U=document.createElement("div");U.className="geToolbarContainer geCommentsToolbar";U.style.height=D;U.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";U.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";D=document.createElement("a"); -D.className="geButton";if(!z){var Y=D.cloneNode();Y.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';Y.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(Y,"click",function(aa){function da(){K(ia,L,function(Z){d(L);b.addComment(Z,function(P){Z.id=P;qa.push(Z);g(L)},function(P){f(L);da();b.handleError(P,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var ia=b.newComment("",b.getCurrentUser()),L=x(ia,qa,null,0); -da();aa.preventDefault();mxEvent.consume(aa)});U.appendChild(Y)}Y=D.cloneNode();Y.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';Y.setAttribute("title",mxResources.get("showResolved"));Y.className="geAdaptiveAsset";var O=!1;mxEvent.addListener(Y,"click",function(aa){this.className=(O=!O)?"geButton geCheckedBtn":"geButton";oa();aa.preventDefault();mxEvent.consume(aa)});U.appendChild(Y);b.commentsRefreshNeeded()&&(Y=D.cloneNode(),Y.innerHTML='<img src="'+IMAGE_PATH+ -'/update16.png" style="width: 16px; padding: 2px;">',Y.setAttribute("title",mxResources.get("refresh")),Y.className="geAdaptiveAsset",mxEvent.addListener(Y,"click",function(aa){oa();aa.preventDefault();mxEvent.consume(aa)}),U.appendChild(Y));b.commentsSaveNeeded()&&(D=D.cloneNode(),D.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',D.setAttribute("title",mxResources.get("save")),D.className="geAdaptiveAsset",mxEvent.addListener(D,"click",function(aa){p();aa.preventDefault(); -mxEvent.consume(aa)}),U.appendChild(D));J.appendChild(U);var qa=[],oa=mxUtils.bind(this,function(){this.hasError=!1;if(null!=H)try{H.div=H.div.cloneNode(!0);var aa=H.div.querySelector(".geCommentEditTxtArea"),da=H.div.querySelector(".geCommentEditBtns");H.comment.content=aa.value;aa.parentNode.removeChild(aa);da.parentNode.removeChild(da)}catch(ia){b.handleError(ia)}G.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+ -"...</div>";u=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(ia){function L(Z){if(null!=Z){Z.sort(function(ca,ja){return new Date(ca.modifiedDate)-new Date(ja.modifiedDate)});for(var P=0;P<Z.length;P++)L(Z[P].replies)}}ia.sort(function(Z,P){return new Date(Z.modifiedDate)-new Date(P.modifiedDate)});G.innerText="";G.appendChild(V);V.style.display="block";qa=ia;for(ia=0;ia<qa.length;ia++)L(qa[ia].replies),x(qa[ia],qa,null,0,O);null!=H&&null==H.comment.id&&null==H.comment.pCommentId&& -(G.appendChild(H.div),K(H.comment,H.div,H.saveCallback,H.deleteOnCancel))},mxUtils.bind(this,function(ia){G.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(ia&&ia.message?": "+ia.message:""));this.hasError=!0})):G.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});oa();this.refreshComments=oa;U=mxUtils.bind(this,function(){function aa(P){var ca=ia[P.id];if(null!=ca)for(Q(P,ca),ca=0;null!=P.replies&&ca<P.replies.length;ca++)aa(P.replies[ca])}if(this.window.isVisible()){for(var da= -G.querySelectorAll(".geCommentDate"),ia={},L=0;L<da.length;L++){var Z=da[L];ia[Z.getAttribute("data-commentId")]=Z}for(L=0;L<qa.length;L++)aa(qa[L])}});setInterval(U,6E4);this.refreshCommentsTime=U;this.window=new mxWindow(mxResources.get("comments"),J,e,k,m,C,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW, -mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,k,m,C,p,E,K,Q,d,f){var g=document.createElement("div");g.style.textAlign="center";f=null!=f?f:44;var x=document.createElement("div");x.style.padding="6px";x.style.overflow="auto";x.style.maxHeight=f+"px";x.style.lineHeight="1.2em";mxUtils.write(x,e);g.appendChild(x);null!=d&&(x=document.createElement("div"),x.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src", -d),x.appendChild(e),g.appendChild(x));d=document.createElement("div");d.style.textAlign="center";d.style.whiteSpace="nowrap";var z=document.createElement("input");z.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=m&&m(z.checked)});p.className="geBtn";null!=K&&(p.innerHTML=K+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&d.appendChild(p);var u=mxUtils.button(C|| -mxResources.get("ok"),function(){b.hideDialog();null!=k&&k(z.checked)});d.appendChild(u);null!=E?(u.innerHTML=E+"<br>"+u.innerHTML+"<br>",u.style.paddingBottom="8px",u.style.paddingTop="8px",u.style.height="auto",u.className="geBtn",u.style.width="40%"):u.className="geBtn gePrimaryBtn";b.editor.cancelFirst||d.appendChild(p);g.appendChild(d);Q?(d.style.marginTop="10px",x=document.createElement("p"),x.style.marginTop="20px",x.style.marginBottom="0px",x.appendChild(z),C=document.createElement("span"), -mxUtils.write(C," "+mxResources.get("rememberThisSetting")),x.appendChild(C),g.appendChild(x),mxEvent.addListener(C,"click",function(H){z.checked=!z.checked;mxEvent.consume(H)})):d.style.marginTop="12px";this.init=function(){u.focus()};this.container=g};function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")}; +"";W=mxUtils.bind(this,function(){var la=this.editor.graph,pa=la.maxFitScale;la.maxFitScale=G.maxFitScale;la.fit(2*ba);la.maxFitScale=pa;la.container.scrollTop-=2*ba;la.container.scrollLeft-=2*ba;this.fireEvent(new mxEventObject("editInlineStart","data",[G]))})}null!=G.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=G.noExitBtn);null!=G.title&&null!=this.buttonContainer&&(qa=document.createElement("span"),mxUtils.write(qa,G.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan), +this.buttonContainer.appendChild(qa),this.embedFilenameSpan=qa);try{G.libs&&this.sidebar.showEntries(G.libs)}catch(la){}G=null!=G.xmlpng?this.extractGraphModelFromPng(G.xmlpng):null!=G.descriptor?G.descriptor:G.xml}else{if("merge"==G.action){var ea=this.getCurrentFile();null!=ea&&(qa=T(G.xml),null!=qa&&""!=qa&&ea.mergeFile(new LocalFile(this,qa),function(){H.postMessage(JSON.stringify({event:"merge",message:G}),"*")},function(la){H.postMessage(JSON.stringify({event:"merge",message:G,error:la}),"*")}))}else"remoteInvokeReady"== +G.action?this.handleRemoteInvokeReady(H):"remoteInvoke"==G.action?this.handleRemoteInvoke(G,D.origin):"remoteInvokeResponse"==G.action?this.handleRemoteInvokeResponse(G):H.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(G)}),"*");return}}catch(la){this.handleError(la)}}var ra=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),ta=mxUtils.bind(this,function(la,pa){g=!0; +try{d(la,pa,null,Z)}catch(xa){this.handleError(xa)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");y=ra();x&&null==f&&(f=mxUtils.bind(this,function(xa,Ca){xa=ra();xa==y||g||(Ca=this.createLoadMessage("autosave"),Ca.xml=xa,(window.opener||window.parent).postMessage(JSON.stringify(Ca),"*"));y=xa}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged", +f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)pa=this.createLoadMessage("load"),pa.xml=la,H.postMessage(JSON.stringify(pa),"*");null!=W&&W()});null!=G&& +"function"===typeof G.substring&&"data:application/vnd.visio;base64,"==G.substring(0,34)?(T="0M8R4KGxGuE"==G.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(G.substring(G.indexOf(",")+1)),function(la){ta(la,D)},mxUtils.bind(this,function(la){this.handleError(la)}),T)):null!=G&&"function"===typeof G.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(G,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(G, +mxUtils.bind(this,function(la){4==la.readyState&&200<=la.status&&299>=la.status&&"<mxGraphModel"==la.responseText.substring(0,13)&&ta(la.responseText,D)}),""):null!=G&&"function"===typeof G.substring&&this.isLucidChartData(G)?this.convertLucidChart(G,mxUtils.bind(this,function(la){ta(la)}),mxUtils.bind(this,function(la){this.handleError(la)})):null==G||"object"!==typeof G||null==G.format||null==G.data&&null==G.url?(G=T(G),ta(G,D)):this.loadDescriptor(G,mxUtils.bind(this,function(la){ta(ra(),D)}), +mxUtils.bind(this,function(la){this.handleError(la,mxResources.get("errorLoadingFile"))}))}}));var H=window.opener||window.parent;u="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";H.postMessage(u,"*");if("json"==urlParams.proto){var J=this.editor.graph.openLink;this.editor.graph.openLink=function(D,G,W){J.apply(this,arguments);H.postMessage(JSON.stringify({event:"openLink",href:D,target:G,allowOpener:W}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!= +this.menubar&&"1"!=urlParams.embedInline){var d=document.createElement("div");d.style.display="inline-block";d.style.position="absolute";d.style.paddingTop="2px";d.style.paddingLeft="8px";d.style.paddingBottom="2px";d.style.marginRight="12px";d.style.right="atlas"==uiTheme||"1"==urlParams.atlas||"1"==urlParams["live-ui"]?"52px":"72px";var f=document.createElement("button");f.className="geBigButton";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var g="1"==urlParams.publishClose?mxResources.get("publish"): +mxResources.get("saveAndExit");mxUtils.write(f,g);f.setAttribute("title",g);mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));d.appendChild(f)}}else mxUtils.write(f,mxResources.get("save")),f.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),d.appendChild(f),"1"==urlParams.saveAndExit&&(f=document.createElement("a"),mxUtils.write(f, +mxResources.get("saveAndExit")),f.setAttribute("title",mxResources.get("saveAndExit")),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),d.appendChild(f));"1"!=urlParams.noExitBtn&&(f=document.createElement("a"),g="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(f,g),f.setAttribute("title",g),f.className="geBigButton geBigStandardButton", +f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),d.appendChild(f));this.toolbar.container.appendChild(d);this.toolbar.staticElements.push(d)}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(d){this.importCsv(d)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()? +null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(d){var f=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();d()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?f():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js", +function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",f)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",f))};EditorUi.prototype.importCsv=function(d,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,f)}))};EditorUi.prototype.doImportCsv=function(d,f){try{var g=d.split("\n"),x=[],y=[],u=[],H={};if(0<g.length){var J={},D=this.editor.graph,G=null,W=null, +T=null,Z=null,N=null,qa=null,oa=null,S="whiteSpace=wrap;html=1;",fa=null,ia=null,M="",aa="auto",X="auto",ja=!1,ca=null,ka=null,q=40,E=40,Q=100,Y=0,R=mxUtils.bind(this,function(){null!=f?f(ya):(D.setSelectionCells(ya),D.scrollCellToVisible(D.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),ba=D.getFreeInsertPoint(),ea=ba.x,ra=ba.y;ba=ra;var ta=null,la="auto";ia=null;for(var pa=[],xa=null,Ca=null,Ia=0;Ia<g.length&&"#"== +g[Ia].charAt(0);){d=g[Ia].replace(/\r$/,"");for(Ia++;Ia<g.length&&"\\"==d.charAt(d.length-1)&&"#"==g[Ia].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(g[Ia].substring(1)),Ia++;if("#"!=d.charAt(1)){var Aa=d.indexOf(":");if(0<Aa){var La=mxUtils.trim(d.substring(1,Aa)),Da=mxUtils.trim(d.substring(Aa+1));"label"==La?ta=D.sanitizeHtml(Da):"labelname"==La&&0<Da.length&&"-"!=Da?N=Da:"labels"==La&&0<Da.length&&"-"!=Da?oa=JSON.parse(Da):"style"==La?W=Da:"parentstyle"==La?S=Da:"unknownStyle"==La&&"-"!= +Da?qa=Da:"stylename"==La&&0<Da.length&&"-"!=Da?Z=Da:"styles"==La&&0<Da.length&&"-"!=Da?T=JSON.parse(Da):"vars"==La&&0<Da.length&&"-"!=Da?G=JSON.parse(Da):"identity"==La&&0<Da.length&&"-"!=Da?fa=Da:"parent"==La&&0<Da.length&&"-"!=Da?ia=Da:"namespace"==La&&0<Da.length&&"-"!=Da?M=Da:"width"==La?aa=Da:"height"==La?X=Da:"collapsed"==La&&"-"!=Da?ja="true"==Da:"left"==La&&0<Da.length?ca=Da:"top"==La&&0<Da.length?ka=Da:"ignore"==La?Ca=Da.split(","):"connect"==La?pa.push(JSON.parse(Da)):"link"==La?xa=Da:"padding"== +La?Y=parseFloat(Da):"edgespacing"==La?q=parseFloat(Da):"nodespacing"==La?E=parseFloat(Da):"levelspacing"==La?Q=parseFloat(Da):"layout"==La&&(la=Da)}}}if(null==g[Ia])throw Error(mxResources.get("invalidOrMissingFile"));var Sa=this.editor.csvToArray(g[Ia].replace(/\r$/,""));Aa=d=null;La=[];for(Da=0;Da<Sa.length;Da++)fa==Sa[Da]&&(d=Da),ia==Sa[Da]&&(Aa=Da),La.push(mxUtils.trim(Sa[Da]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ta&&(ta="%"+La[0]+"%");if(null!=pa)for(var Ra= +0;Ra<pa.length;Ra++)null==J[pa[Ra].to]&&(J[pa[Ra].to]={});fa=[];for(Da=Ia+1;Da<g.length;Da++){var Ta=this.editor.csvToArray(g[Da].replace(/\r$/,""));if(null==Ta){var Za=40<g[Da].length?g[Da].substring(0,40)+"...":g[Da];throw Error(Za+" ("+Da+"):\n"+mxResources.get("containsValidationErrors"));}0<Ta.length&&fa.push(Ta)}D.model.beginUpdate();try{for(Da=0;Da<fa.length;Da++){Ta=fa[Da];var Na=null,z=null!=d?M+Ta[d]:null;g=!1;null!=z&&(Na=D.model.getCell(z),g=null==Na||0<=mxUtils.indexOf(x,Na));var L=new mxCell(ta, +new mxGeometry(ea,ba,0,0),W||"whiteSpace=wrap;html=1;");L.collapsed=ja;L.vertex=!0;L.id=z;null==Na||g||D.model.setCollapsed(Na,ja);for(var O=0;O<Ta.length;O++)D.setAttributeForCell(L,La[O],Ta[O]),null==Na||g||D.setAttributeForCell(Na,La[O],Ta[O]);if(null!=N&&null!=oa){var V=oa[L.getAttribute(N)];null!=V&&(D.labelChanged(L,V),null==Na||g||D.cellLabelChanged(Na,V))}if(null!=Z&&null!=T){var U=T[L.getAttribute(Z)];null!=U&&(L.style=U)}D.setAttributeForCell(L,"placeholders","1");L.style=D.replacePlaceholders(L, +L.style,G);null==Na||g?D.fireEvent(new mxEventObject("cellsInserted","cells",[L])):(D.model.setStyle(Na,L.style),0>mxUtils.indexOf(u,Na)&&u.push(Na),D.fireEvent(new mxEventObject("cellsInserted","cells",[Na])));g=null!=Na;Na=L;if(!g)for(Ra=0;Ra<pa.length;Ra++)J[pa[Ra].to][Na.getAttribute(pa[Ra].to)]=Na;null!=xa&&"link"!=xa&&(D.setLinkForCell(Na,Na.getAttribute(xa)),D.setAttributeForCell(Na,xa,null));var ha=this.editor.graph.getPreferredSizeForCell(Na);ia=null!=Aa?D.model.getCell(M+Ta[Aa]):null;if(Na.vertex){Za= +null!=ia?0:ea;Ia=null!=ia?0:ra;null!=ca&&null!=Na.getAttribute(ca)&&(Na.geometry.x=Za+parseFloat(Na.getAttribute(ca)));null!=ka&&null!=Na.getAttribute(ka)&&(Na.geometry.y=Ia+parseFloat(Na.getAttribute(ka)));var ma="@"==aa.charAt(0)?Na.getAttribute(aa.substring(1)):null;Na.geometry.width=null!=ma&&"auto"!=ma?parseFloat(Na.getAttribute(aa.substring(1))):"auto"==aa||"auto"==ma?ha.width+Y:parseFloat(aa);var wa="@"==X.charAt(0)?Na.getAttribute(X.substring(1)):null;Na.geometry.height=null!=wa&&"auto"!= +wa?parseFloat(wa):"auto"==X||"auto"==wa?ha.height+Y:parseFloat(X);ba+=Na.geometry.height+E}g?(null==H[z]&&(H[z]=[]),H[z].push(Na)):(x.push(Na),null!=ia?(ia.style=D.replacePlaceholders(ia,S,G),D.addCell(Na,ia),y.push(ia)):u.push(D.addCell(Na)))}for(Da=0;Da<y.length;Da++)ma="@"==aa.charAt(0)?y[Da].getAttribute(aa.substring(1)):null,wa="@"==X.charAt(0)?y[Da].getAttribute(X.substring(1)):null,"auto"!=aa&&"auto"!=ma||"auto"!=X&&"auto"!=wa||D.updateGroupBounds([y[Da]],Y,!0);var sa=u.slice(),ya=u.slice(); +for(Ra=0;Ra<pa.length;Ra++){var Ha=pa[Ra];for(Da=0;Da<x.length;Da++){Na=x[Da];var Qa=mxUtils.bind(this,function(fb,pb,lb){var $a=pb.getAttribute(lb.from);if(null!=$a&&""!=$a){$a=$a.split(",");for(var ab=0;ab<$a.length;ab++){var ib=J[lb.to][$a[ab]];if(null==ib&&null!=qa){ib=new mxCell($a[ab],new mxGeometry(ea,ra,0,0),qa);ib.style=D.replacePlaceholders(pb,ib.style,G);var gb=this.editor.graph.getPreferredSizeForCell(ib);ib.geometry.width=gb.width+Y;ib.geometry.height=gb.height+Y;J[lb.to][$a[ab]]=ib; +ib.vertex=!0;ib.id=$a[ab];u.push(D.addCell(ib))}if(null!=ib){gb=lb.label;null!=lb.fromlabel&&(gb=(pb.getAttribute(lb.fromlabel)||"")+(gb||""));null!=lb.sourcelabel&&(gb=D.replacePlaceholders(pb,lb.sourcelabel,G)+(gb||""));null!=lb.tolabel&&(gb=(gb||"")+(ib.getAttribute(lb.tolabel)||""));null!=lb.targetlabel&&(gb=(gb||"")+D.replacePlaceholders(ib,lb.targetlabel,G));var qb="target"==lb.placeholders==!lb.invert?ib:fb;qb=null!=lb.style?D.replacePlaceholders(qb,lb.style,G):D.createCurrentEdgeStyle();gb= +D.insertEdge(null,null,gb||"",lb.invert?ib:fb,lb.invert?fb:ib,qb);if(null!=lb.labels)for(qb=0;qb<lb.labels.length;qb++){var nb=lb.labels[qb],mb=new mxCell(nb.label||qb,new mxGeometry(null!=nb.x?nb.x:0,null!=nb.y?nb.y:0,0,0),"resizable=0;html=1;");mb.vertex=!0;mb.connectable=!1;mb.geometry.relative=!0;null!=nb.placeholders&&(mb.value=D.replacePlaceholders("target"==nb.placeholders==!lb.invert?ib:fb,mb.value,G));if(null!=nb.dx||null!=nb.dy)mb.geometry.offset=new mxPoint(null!=nb.dx?nb.dx:0,null!=nb.dy? +nb.dy:0);gb.insert(mb)}ya.push(gb);mxUtils.remove(lb.invert?fb:ib,sa)}}}});Qa(Na,Na,Ha);if(null!=H[Na.id])for(O=0;O<H[Na.id].length;O++)Qa(Na,H[Na.id][O],Ha)}}if(null!=Ca)for(Da=0;Da<x.length;Da++)for(Na=x[Da],O=0;O<Ca.length;O++)D.setAttributeForCell(Na,mxUtils.trim(Ca[O]),null);if(0<u.length){var ua=new mxParallelEdgeLayout(D);ua.spacing=q;ua.checkOverlap=!0;var za=function(){0<ua.spacing&&ua.execute(D.getDefaultParent());for(var fb=0;fb<u.length;fb++){var pb=D.getCellGeometry(u[fb]);pb.x=Math.round(D.snap(pb.x)); +pb.y=Math.round(D.snap(pb.y));"auto"==aa&&(pb.width=Math.round(D.snap(pb.width)));"auto"==X&&(pb.height=Math.round(D.snap(pb.height)))}};if("["==la.charAt(0)){var Fa=R;D.view.validate();this.executeLayouts(D.createLayouts(JSON.parse(la)),function(){za();Fa()});R=null}else if("circle"==la){var Ba=new mxCircleLayout(D);Ba.disableEdgeStyle=!1;Ba.resetEdges=!1;var Ea=Ba.isVertexIgnored;Ba.isVertexIgnored=function(fb){return Ea.apply(this,arguments)||0>mxUtils.indexOf(u,fb)};this.executeLayout(function(){Ba.execute(D.getDefaultParent()); +za()},!0,R);R=null}else if("horizontaltree"==la||"verticaltree"==la||"auto"==la&&ya.length==2*u.length-1&&1==sa.length){D.view.validate();var Oa=new mxCompactTreeLayout(D,"horizontaltree"==la);Oa.levelDistance=E;Oa.edgeRouting=!1;Oa.resetEdges=!1;this.executeLayout(function(){Oa.execute(D.getDefaultParent(),0<sa.length?sa[0]:null)},!0,R);R=null}else if("horizontalflow"==la||"verticalflow"==la||"auto"==la&&1==sa.length){D.view.validate();var Pa=new mxHierarchicalLayout(D,"horizontalflow"==la?mxConstants.DIRECTION_WEST: +mxConstants.DIRECTION_NORTH);Pa.intraCellSpacing=E;Pa.parallelEdgeSpacing=q;Pa.interRankCellSpacing=Q;Pa.disableEdgeStyle=!1;this.executeLayout(function(){Pa.execute(D.getDefaultParent(),ya);D.moveCells(ya,ea,ra)},!0,R);R=null}else if("orgchart"==la){D.view.validate();var bb=new mxOrgChartLayout(D,2,Q,E),eb=bb.isVertexIgnored;bb.isVertexIgnored=function(fb){return eb.apply(this,arguments)||0>mxUtils.indexOf(u,fb)};this.executeLayout(function(){bb.execute(D.getDefaultParent());za()},!0,R);R=null}else if("organic"== +la||"auto"==la&&ya.length>u.length){D.view.validate();var db=new mxFastOrganicLayout(D);db.forceConstant=3*E;db.disableEdgeStyle=!1;db.resetEdges=!1;var ub=db.isVertexIgnored;db.isVertexIgnored=function(fb){return ub.apply(this,arguments)||0>mxUtils.indexOf(u,fb)};this.executeLayout(function(){db.execute(D.getDefaultParent());za()},!0,R);R=null}}this.hideDialog()}finally{D.model.endUpdate()}null!=R&&R()}}catch(fb){this.handleError(fb)}};EditorUi.prototype.getSearch=function(d){var f="";if("1"!=urlParams.offline&& +"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var g="?",x;for(x in urlParams)0>mxUtils.indexOf(d,x)&&null!=urlParams[x]&&(f+=g+x+"="+urlParams[x],g="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var f=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),x;for(x in urlParams)0>mxUtils.indexOf(g, +x)&&(d=0==f?d+"?":d+"&",null!=urlParams[x]&&(d+=x+"="+urlParams[x],f++))}return d};EditorUi.prototype.showLinkDialog=function(d,f,g,x,y){d=new LinkDialog(this,d,f,g,!0,x,y);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||f++;null!=this.gitHub&&f++;null!= +this.gitLab&&f++;d&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),f=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!g);this.actions.get("print").setEnabled(!g); +this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);this.actions.get("resetView").setEnabled(f); +this.actions.get("toggleDarkMode").setEnabled("atlas"!=uiTheme);this.actions.get("undo").setEnabled(this.canUndo()&&d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(d)); +this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var F=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=function(d){var f=F.apply(this,arguments); +this.addListener("darkModeChanged",mxUtils.bind(this,function(){f.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){f.refresh()}));return f};var K=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){K.apply(this,arguments);var d=this.editor.graph,f=this.getCurrentFile(),g=this.getSelectionState(),x=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(x);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional()); +this.actions.get("guides").setEnabled(x);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(x);this.actions.get("connectionArrows").setEnabled(x);this.actions.get("connectionPoints").setEnabled(x);this.actions.get("copyStyle").setEnabled(x&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(x&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(x);this.actions.get("createRevision").setEnabled(x); +this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(x&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility); +this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"");d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(x&&null!=d&&null!=d.shape&&null!=d.shape.stencil)}; +var P=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);P.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,f,g,x,y,u,H,J){var D=d.editor.graph;if("xml"==g)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==g)d.hideDialog(),d.saveData(f, +"svg",mxUtils.getXml(D.getSvg(x,y,u)),"image/svg+xml");else{var G=d.getFileData(!0,null,null,null,null,!0),W=D.getGraphBounds(),T=Math.floor(W.width*y/D.view.scale),Z=Math.floor(W.height*y/D.view.scale);if(G.length<=MAX_REQUEST_SIZE&&T*Z<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!d.isExportToCanvas()){var N={globalVars:D.getExportVariables()};J&&(N.grid={size:D.gridSize,steps:D.view.gridSteps,color:D.view.gridColor});d.saveRequest(f,g,function(qa,oa){return new mxXmlRequest(EXPORT_URL, +"format="+g+"&base64="+(oa||"0")+(null!=qa?"&filename="+encodeURIComponent(qa):"")+"&extras="+encodeURIComponent(JSON.stringify(N))+(0<H?"&dpi="+H:"")+"&bg="+(null!=x?x:"none")+"&w="+T+"&h="+Z+"&border="+u+"&xml="+encodeURIComponent(G))})}else"png"==g?d.exportImage(y,null==x||"none"==x,!0,!1,!1,u,!0,!1,null,J,H):d.exportImage(y,!1,!0,!1,!1,u,!0,!1,"jpeg",J);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1); +var d=this.editor.graph,f="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var x=d;this.currentPage!=this.pages[g]&&(x=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[g]),x.model.setRoot(this.pages[g].root));f+=this.pages[g].getName()+" "+x.getIndexableText()+" "}else f=d.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var f={},g=document.createElement("div");g.style.whiteSpace="nowrap";var x= +document.createElement("h3");mxUtils.write(x,mxUtils.htmlEntities(d));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(x);var y=document.createElement("div");y.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";y.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var u={};try{var H=mxSettings.getCustomLibraries();for(d=0;d<H.length;d++){var J=H[d];if("R"==J.substring(0,1)){var D=JSON.parse(decodeURIComponent(J.substring(1))); +u[D[0]]={id:D[0],title:D[1],downloadUrl:D[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){y.innerText="";if(0==G.length)y.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var W=0;W<G.length;W++){var T=G[W];u[T.id]&&(f[T.id]=T);var Z=this.addCheckbox(y,T.title,u[T.id]);(function(N,qa){mxEvent.addListener(qa,"change",function(){this.checked?f[N.id]=N:delete f[N.id]})})(T,Z)}}, +mxUtils.bind(this,function(G){y.innerText="";var W=document.createElement("div");W.style.padding="8px";W.style.textAlign="center";mxUtils.write(W,mxResources.get("error")+": ");mxUtils.write(W,null!=G&&null!=G.message?G.message:mxResources.get("unknownError"));y.appendChild(W)}));g.appendChild(y);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var G=0,W;for(W in f)null==u[W]&&(G++,mxUtils.bind(this,function(T){this.remoteInvoke("getFileContent", +[T.downloadUrl],null,mxUtils.bind(this,function(Z){G--;0==G&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,Z,T))}catch(N){this.handleError(N,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){G--;0==G&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[W]));for(W in u)f[W]||this.closeLibrary(new RemoteLibrary(this,null,u[W]));0==G&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud"); +this.showDialog(g.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin= +d;for(var f=0;f<this.remoteInvokeQueue.length;f++)d.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var f=d.msgMarkers,g=this.remoteInvokeCallbacks[f.callbackId];if(null==g)throw Error("No callback for "+(null!=f?f.callbackId:"null"));d.error?g.error&&g.error(d.error.errResp):g.callback&&g.callback.apply(this,d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,g,x,y){var u= +!0,H=window.setTimeout(mxUtils.bind(this,function(){u=!1;y({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),J=mxUtils.bind(this,function(){window.clearTimeout(H);u&&x.apply(this,arguments)}),D=mxUtils.bind(this,function(){window.clearTimeout(H);u&&y.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:J,error:D});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:g});null!=this.remoteWin? +this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var g=mxUtils.bind(this,function(G,W){var T={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=W?T.error={errResp:W}:null!=G&&(T.resp=G);this.remoteWin.postMessage(JSON.stringify(T),"*")});try{var x=d.funtionName,y=this.remoteInvokableFns[x];if(null!=y&&"function"===typeof this[x]){if(y.allowedDomains){for(var u=!1,H=0;H<y.allowedDomains.length;H++)if(f=="https://"+y.allowedDomains[H]){u= +!0;break}if(!u){g(null,"Invalid Call: "+x+" is not allowed.");return}}var J=d.functionArgs;Array.isArray(J)||(J=[]);if(y.isAsync)J.push(function(){g(Array.prototype.slice.apply(arguments))}),J.push(function(G){g(null,G||"Unkown Error")}),this[x].apply(this,J);else{var D=this[x].apply(this,J);g([D])}}else g(null,"Invalid Call: "+x+" is not found.")}catch(G){g(null,"Invalid Call: An error occurred, "+G.message)}};EditorUi.prototype.openDatabase=function(d,f){if(null==this.database){var g=window.indexedDB|| +window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var x=g.open("database",2);x.onupgradeneeded=function(y){try{var u=x.result;1>y.oldVersion&&u.createObjectStore("objects",{keyPath:"key"});2>y.oldVersion&&(u.createObjectStore("files",{keyPath:"title"}),u.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(H){null!=f&&f(H)}};x.onsuccess=mxUtils.bind(this,function(y){var u=x.result;this.database=u;EditorUi.migrateStorageFiles&&(StorageFile.migrate(u), +EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(H){if(!H||"1"==urlParams.forceMigration){var J=document.createElement("iframe");J.style.display="none";J.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(J);var D=!0,G=!1,W,T=0,Z=mxUtils.bind(this,function(){G=!0;this.setDatabaseItem(".drawioMigrated3", +!0);J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),N=mxUtils.bind(this,function(){T++;qa()}),qa=mxUtils.bind(this,function(){try{if(T>=W.length)Z();else{var S=W[T];StorageFile.getFileContent(this,S,mxUtils.bind(this,function(fa){null==fa||".scratchpad"==S&&fa==this.emptyLibraryXml?J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[S]}),"*"):N()}),N)}}catch(fa){console.log(fa)}}), +oa=mxUtils.bind(this,function(S){try{this.setDatabaseItem(null,[{title:S.title,size:S.data.length,lastModified:Date.now(),type:S.isLib?"L":"F"},{title:S.title,data:S.data}],N,N,["filesInfo","files"])}catch(fa){console.log(fa)}});H=mxUtils.bind(this,function(S){try{if(S.source==J.contentWindow){var fa={};try{fa=JSON.parse(S.data)}catch(ia){}"init"==fa.event?(J.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke", +funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=fa.event||G||(D?null!=fa.resp&&0<fa.resp.length&&null!=fa.resp[0]?(W=fa.resp[0],D=!1,qa()):Z():null!=fa.resp&&0<fa.resp.length&&null!=fa.resp[0]?oa(fa.resp[0]):N())}}catch(ia){console.log(ia)}});window.addEventListener("message",H)}})));d(u);u.onversionchange=function(){u.close()}});x.onerror=f;x.onblocked=function(){}}catch(y){null!=f&&f(y)}else null!=f&&f()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d, +f,g,x,y){this.openDatabase(mxUtils.bind(this,function(u){try{y=y||"objects";Array.isArray(y)||(y=[y],d=[d],f=[f]);var H=u.transaction(y,"readwrite");H.oncomplete=g;H.onerror=x;for(u=0;u<y.length;u++)H.objectStore(y[u]).put(null!=d&&null!=d[u]?{key:d[u],data:f[u]}:f[u])}catch(J){null!=x&&x(J)}}),x)};EditorUi.prototype.removeDatabaseItem=function(d,f,g,x){this.openDatabase(mxUtils.bind(this,function(y){x=x||"objects";Array.isArray(x)||(x=[x],d=[d]);y=y.transaction(x,"readwrite");y.oncomplete=f;y.onerror= +g;for(var u=0;u<x.length;u++)y.objectStore(x[u]).delete(d[u])}),g)};EditorUi.prototype.getDatabaseItem=function(d,f,g,x){this.openDatabase(mxUtils.bind(this,function(y){try{x=x||"objects";var u=y.transaction([x],"readonly").objectStore(x).get(d);u.onsuccess=function(){f(u.result)};u.onerror=g}catch(H){null!=g&&g(H)}}),g)};EditorUi.prototype.getDatabaseItems=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(x){try{g=g||"objects";var y=x.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)), +u=[];y.onsuccess=function(H){null==H.target.result?d(u):(u.push(H.target.result.value),H.target.result.continue())};y.onerror=f}catch(H){null!=f&&f(H)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(x){try{g=g||"objects";var y=x.transaction([g],"readonly").objectStore(g).getAllKeys();y.onsuccess=function(){d(y.result)};y.onerror=f}catch(u){null!=f&&f(u)}}),f)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!= +d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(d,f){var g=this.getCurrentFile();null!=g?g.getComments(d,f):d([])};EditorUi.prototype.addComment=function(d,f,g){var x=this.getCurrentFile();null!=x?x.addComment(d,f,g):f(Date.now())};EditorUi.prototype.canReplyToReplies= +function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,f){var g=this.getCurrentFile();return null!=g?g.newComment(d,f):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions= +function(d,f){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(d,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl= +function(d,f,g,x,y,u,H,J){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,x,y,u,H,J)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d, +f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,f,g,x,y,u,H,J,D,G,W,T,Z,N,qa,oa){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,g,x,y,u,H,J,D,G,W,T,Z,N,qa,oa)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()}; +EditorUi.prototype.convertImages=function(d,f,g,x){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,f,g,x)};EditorUi.prototype.convertImageToDataUri=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,f)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,f,g,x){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC"); +return Editor.updateCRC(d,f,g,x)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,f,g,x,y){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,f,g,x,y)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],f=0;f<localStorage.length;f++){var g= +localStorage.key(f),x=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<x.length){var y="<mxfile "===x.substring(0,8)||"<?xml"===x.substring(0,5)||"\x3c!--[if IE]>"===x.substring(0,12);x="<mxlibrary>"===x.substring(0,11);(y||x)&&d.push(g)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(d);return{title:d,data:f,isLib:"<mxlibrary>"=== +f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})(); +var CommentsWindow=function(b,e,k,m,C,p){function F(){for(var S=G.getElementsByTagName("div"),fa=0,ia=0;ia<S.length;ia++)"none"!=S[ia].style.display&&S[ia].parentNode==G&&fa++;W.style.display=0==fa?"block":"none"}function K(S,fa,ia,M){function aa(){fa.removeChild(ca);fa.removeChild(ka);ja.style.display="block";X.style.display="block"}H={div:fa,comment:S,saveCallback:ia,deleteOnCancel:M};var X=fa.querySelector(".geCommentTxt"),ja=fa.querySelector(".geCommentActionsList"),ca=document.createElement("textarea"); +ca.className="geCommentEditTxtArea";ca.style.minHeight=X.offsetHeight+"px";ca.value=S.content;fa.insertBefore(ca,X);var ka=document.createElement("div");ka.className="geCommentEditBtns";var q=mxUtils.button(mxResources.get("cancel"),function(){M?(fa.parentNode.removeChild(fa),F()):aa();H=null});q.className="geCommentEditBtn";ka.appendChild(q);var E=mxUtils.button(mxResources.get("save"),function(){X.innerText="";S.content=ca.value;mxUtils.write(X,S.content);aa();ia(S);H=null});mxEvent.addListener(ca, +"keydown",mxUtils.bind(this,function(Q){mxEvent.isConsumed(Q)||((mxEvent.isControlDown(Q)||mxClient.IS_MAC&&mxEvent.isMetaDown(Q))&&13==Q.keyCode?(E.click(),mxEvent.consume(Q)):27==Q.keyCode&&(q.click(),mxEvent.consume(Q)))}));E.focus();E.className="geCommentEditBtn gePrimaryBtn";ka.appendChild(E);fa.insertBefore(ka,X);ja.style.display="none";X.style.display="none";ca.focus()}function P(S,fa){fa.innerText="";S=new Date(S.modifiedDate);var ia=b.timeSince(S);null==ia&&(ia=mxResources.get("lessThanAMinute")); +mxUtils.write(fa,mxResources.get("timeAgo",[ia],"{1} ago"));fa.setAttribute("title",S.toLocaleDateString()+" "+S.toLocaleTimeString())}function d(S){var fa=document.createElement("img");fa.className="geCommentBusyImg";fa.src=IMAGE_PATH+"/spin.gif";S.appendChild(fa);S.busyImg=fa}function f(S){S.style.border="1px solid red";S.removeChild(S.busyImg)}function g(S){S.style.border="";S.removeChild(S.busyImg)}function x(S,fa,ia,M,aa){function X(R,ba,ea){var ra=document.createElement("li");ra.className="geCommentAction"; +var ta=document.createElement("a");ta.className="geCommentActionLnk";mxUtils.write(ta,R);ra.appendChild(ta);mxEvent.addListener(ta,"click",function(la){ba(la,S);la.preventDefault();mxEvent.consume(la)});Y.appendChild(ra);ea&&(ra.style.display="none")}function ja(){function R(ra){ba.push(ea);if(null!=ra.replies)for(var ta=0;ta<ra.replies.length;ta++)ea=ea.nextSibling,R(ra.replies[ta])}var ba=[],ea=ka;R(S);return{pdiv:ea,replies:ba}}function ca(R,ba,ea,ra,ta){function la(){d(Ia);S.addReply(Ca,function(Aa){Ca.id= +Aa;S.replies.push(Ca);g(Ia);ea&&ea()},function(Aa){pa();f(Ia);b.handleError(Aa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},ra,ta)}function pa(){K(Ca,Ia,function(Aa){la()},!0)}var xa=ja().pdiv,Ca=b.newComment(R,b.getCurrentUser());Ca.pCommentId=S.id;null==S.replies&&(S.replies=[]);var Ia=x(Ca,S.replies,xa,M+1);ba?pa():la()}if(aa||!S.isResolved){W.style.display="none";var ka=document.createElement("div");ka.className="geCommentContainer";ka.setAttribute("data-commentId", +S.id);ka.style.marginLeft=20*M+5+"px";S.isResolved&&!Editor.isDarkMode()&&(ka.style.backgroundColor="ghostWhite");var q=document.createElement("div");q.className="geCommentHeader";var E=document.createElement("img");E.className="geCommentUserImg";E.src=S.user.pictureUrl||Editor.userImage;q.appendChild(E);E=document.createElement("div");E.className="geCommentHeaderTxt";q.appendChild(E);var Q=document.createElement("div");Q.className="geCommentUsername";mxUtils.write(Q,S.user.displayName||"");E.appendChild(Q); +Q=document.createElement("div");Q.className="geCommentDate";Q.setAttribute("data-commentId",S.id);P(S,Q);E.appendChild(Q);ka.appendChild(q);q=document.createElement("div");q.className="geCommentTxt";mxUtils.write(q,S.content||"");ka.appendChild(q);S.isLocked&&(ka.style.opacity="0.5");q=document.createElement("div");q.className="geCommentActions";var Y=document.createElement("ul");Y.className="geCommentActionsList";q.appendChild(Y);y||S.isLocked||0!=M&&!u||X(mxResources.get("reply"),function(){ca("", +!0)},S.isResolved);E=b.getCurrentUser();null==E||E.id!=S.user.id||y||S.isLocked||(X(mxResources.get("edit"),function(){function R(){K(S,ka,function(){d(ka);S.editComment(S.content,function(){g(ka)},function(ba){f(ka);R();b.handleError(ba,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}R()},S.isResolved),X(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){d(ka);S.deleteComment(function(R){if(!0===R){R=ka.querySelector(".geCommentTxt"); +R.innerText="";mxUtils.write(R,mxResources.get("msgDeleted"));var ba=ka.querySelectorAll(".geCommentAction");for(R=0;R<ba.length;R++)ba[R].parentNode.removeChild(ba[R]);g(ka);ka.style.opacity="0.5"}else{ba=ja(S).replies;for(R=0;R<ba.length;R++)G.removeChild(ba[R]);for(R=0;R<fa.length;R++)if(fa[R]==S){fa.splice(R,1);break}W.style.display=0==G.getElementsByTagName("div").length?"block":"none"}},function(R){f(ka);b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}, +S.isResolved));y||S.isLocked||0!=M||X(S.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(R){function ba(){var ea=R.target;ea.innerText="";S.isResolved=!S.isResolved;mxUtils.write(ea,S.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var ra=S.isResolved?"none":"",ta=ja(S).replies,la=Editor.isDarkMode()?"transparent":S.isResolved?"ghostWhite":"white",pa=0;pa<ta.length;pa++){ta[pa].style.backgroundColor=la;for(var xa=ta[pa].querySelectorAll(".geCommentAction"), +Ca=0;Ca<xa.length;Ca++)xa[Ca]!=ea.parentNode&&(xa[Ca].style.display=ra);N||(ta[pa].style.display="none")}F()}S.isResolved?ca(mxResources.get("reOpened")+": ",!0,ba,!1,!0):ca(mxResources.get("markedAsResolved"),!1,ba,!0)});ka.appendChild(q);null!=ia?G.insertBefore(ka,ia.nextSibling):G.appendChild(ka);for(ia=0;null!=S.replies&&ia<S.replies.length;ia++)q=S.replies[ia],q.isResolved=S.isResolved,x(q,S.replies,null,M+1,aa);null!=H&&(H.comment.id==S.id?(aa=S.content,S.content=H.comment.content,K(S,ka,H.saveCallback, +H.deleteOnCancel),S.content=aa):null==H.comment.id&&H.comment.pCommentId==S.id&&(G.appendChild(H.div),K(H.comment,H.div,H.saveCallback,H.deleteOnCancel)));return ka}}var y=!b.canComment(),u=b.canReplyToReplies(),H=null,J=document.createElement("div");J.className="geCommentsWin";J.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var D=EditorUi.compactUi?"26px":"30px",G=document.createElement("div");G.className="geCommentsList";G.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor: +"whiteSmoke";G.style.bottom=parseInt(D)+7+"px";J.appendChild(G);var W=document.createElement("span");W.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(W,mxResources.get("noCommentsFound"));var T=document.createElement("div");T.className="geToolbarContainer geCommentsToolbar";T.style.height=D;T.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";T.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";D=document.createElement("a");D.className= +"geButton";if(!y){var Z=D.cloneNode();Z.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';Z.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(Z,"click",function(S){function fa(){K(ia,M,function(aa){d(M);b.addComment(aa,function(X){aa.id=X;qa.push(aa);g(M)},function(X){f(M);fa();b.handleError(X,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var ia=b.newComment("",b.getCurrentUser()),M=x(ia,qa,null,0);fa();S.preventDefault(); +mxEvent.consume(S)});T.appendChild(Z)}Z=D.cloneNode();Z.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';Z.setAttribute("title",mxResources.get("showResolved"));Z.className="geAdaptiveAsset";var N=!1;mxEvent.addListener(Z,"click",function(S){this.className=(N=!N)?"geButton geCheckedBtn":"geButton";oa();S.preventDefault();mxEvent.consume(S)});T.appendChild(Z);b.commentsRefreshNeeded()&&(Z=D.cloneNode(),Z.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">', +Z.setAttribute("title",mxResources.get("refresh")),Z.className="geAdaptiveAsset",mxEvent.addListener(Z,"click",function(S){oa();S.preventDefault();mxEvent.consume(S)}),T.appendChild(Z));b.commentsSaveNeeded()&&(D=D.cloneNode(),D.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',D.setAttribute("title",mxResources.get("save")),D.className="geAdaptiveAsset",mxEvent.addListener(D,"click",function(S){p();S.preventDefault();mxEvent.consume(S)}),T.appendChild(D));J.appendChild(T); +var qa=[],oa=mxUtils.bind(this,function(){this.hasError=!1;if(null!=H)try{H.div=H.div.cloneNode(!0);var S=H.div.querySelector(".geCommentEditTxtArea"),fa=H.div.querySelector(".geCommentEditBtns");H.comment.content=S.value;S.parentNode.removeChild(S);fa.parentNode.removeChild(fa)}catch(ia){b.handleError(ia)}G.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";u=b.canReplyToReplies(); +b.commentsSupported()?b.getComments(function(ia){function M(aa){if(null!=aa){aa.sort(function(ja,ca){return new Date(ja.modifiedDate)-new Date(ca.modifiedDate)});for(var X=0;X<aa.length;X++)M(aa[X].replies)}}ia.sort(function(aa,X){return new Date(aa.modifiedDate)-new Date(X.modifiedDate)});G.innerText="";G.appendChild(W);W.style.display="block";qa=ia;for(ia=0;ia<qa.length;ia++)M(qa[ia].replies),x(qa[ia],qa,null,0,N);null!=H&&null==H.comment.id&&null==H.comment.pCommentId&&(G.appendChild(H.div),K(H.comment, +H.div,H.saveCallback,H.deleteOnCancel))},mxUtils.bind(this,function(ia){G.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(ia&&ia.message?": "+ia.message:""));this.hasError=!0})):G.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});oa();this.refreshComments=oa;T=mxUtils.bind(this,function(){function S(X){var ja=ia[X.id];if(null!=ja)for(P(X,ja),ja=0;null!=X.replies&&ja<X.replies.length;ja++)S(X.replies[ja])}if(this.window.isVisible()){for(var fa=G.querySelectorAll(".geCommentDate"), +ia={},M=0;M<fa.length;M++){var aa=fa[M];ia[aa.getAttribute("data-commentId")]=aa}for(M=0;M<qa.length;M++)S(qa[M])}});setInterval(T,6E4);this.refreshCommentsTime=T;this.window=new mxWindow(mxResources.get("comments"),J,e,k,m,C,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()})); +b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,k,m,C,p,F,K,P,d,f){var g=document.createElement("div");g.style.textAlign="center";f=null!=f?f:44;var x=document.createElement("div");x.style.padding="6px";x.style.overflow="auto";x.style.maxHeight=f+"px";x.style.lineHeight="1.2em";mxUtils.write(x,e);g.appendChild(x);null!=d&&(x=document.createElement("div"),x.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",d),x.appendChild(e),g.appendChild(x));d=document.createElement("div"); +d.style.textAlign="center";d.style.whiteSpace="nowrap";var y=document.createElement("input");y.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=m&&m(y.checked)});p.className="geBtn";null!=K&&(p.innerHTML=K+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&d.appendChild(p);var u=mxUtils.button(C||mxResources.get("ok"),function(){b.hideDialog();null!=k&& +k(y.checked)});d.appendChild(u);null!=F?(u.innerHTML=F+"<br>"+u.innerHTML+"<br>",u.style.paddingBottom="8px",u.style.paddingTop="8px",u.style.height="auto",u.className="geBtn",u.style.width="40%"):u.className="geBtn gePrimaryBtn";b.editor.cancelFirst||d.appendChild(p);g.appendChild(d);P?(d.style.marginTop="10px",x=document.createElement("p"),x.style.marginTop="20px",x.style.marginBottom="0px",x.appendChild(y),C=document.createElement("span"),mxUtils.write(C," "+mxResources.get("rememberThisSetting")), +x.appendChild(C),g.appendChild(x),mxEvent.addListener(C,"click",function(H){y.checked=!y.checked;mxEvent.consume(H)})):d.style.marginTop="12px";this.init=function(){u.focus()};this.container=g};function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")}; DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,e,k){this.ui=b;this.page=e;this.previous=this.name=k}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))}; function MovePage(b,e,k){this.ui=b;this.oldIndex=e;this.newIndex=k}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))}; function SelectPage(b,e,k){this.ui=b;this.previousPage=this.page=e;this.neverShown=!0;null!=e&&(this.neverShown=null==e.viewState,this.ui.updatePageRoot(e),null!=k&&(e.viewState=k,this.neverShown=!1))} @@ -3853,14 +3859,14 @@ ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObje EditorUi.prototype.getPageIndex=function(b){var e=null;if(null!=this.pages&&null!=b)for(var k=0;k<this.pages.length;k++)if(this.pages[k]==b){e=k;break}return e};EditorUi.prototype.getPageById=function(b,e){e=null!=e?e:this.pages;if(null!=e)for(var k=0;k<e.length;k++)if(e[k].getId()==b)return e[k];return null}; EditorUi.prototype.createImageForPageLink=function(b,e,k){var m=b.indexOf(","),C=null;0<m&&(m=this.getPageById(b.substring(m+1)),null!=m&&m!=e&&(C=this.getImageForPage(m,e,k),C.originalSrc=b));null==C&&(C={originalSrc:b});return C}; EditorUi.prototype.getImageForPage=function(b,e,k){k=null!=k?k:this.editor.graph;var m=k.getGlobalVariable,C=this.createTemporaryGraph(k.getStylesheet());C.defaultPageBackgroundColor=k.defaultPageBackgroundColor;C.shapeBackgroundColor=k.shapeBackgroundColor;C.shapeForegroundColor=k.shapeForegroundColor;var p=this.getPageIndex(null!=e?e:this.currentPage);C.getGlobalVariable=function(K){return"pagenumber"==K?p+1:"page"==K&&null!=e?e.getName():m.apply(this,arguments)};document.body.appendChild(C.container); -this.updatePageRoot(b);C.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";k=C.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var E=C.getGraphBounds();document.body.removeChild(C.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(k)),E.width,E.height,E.x,E.y)}; +this.updatePageRoot(b);C.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";k=C.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var F=C.getGraphBounds();document.body.removeChild(C.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(k)),F.width,F.height,F.x,F.y)}; EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,e=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var C= this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";C!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(b.view,arguments)});var k=null,m=mxUtils.bind(this,function(){this.updateTabContainer();var C=this.currentPage;null!=C&&C!=k&&(null==C.viewState||null==C.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&& (b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+C.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+C.viewState.scrollTop),k=C);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"===typeof Editor.MathJaxClear||this.editor.graph.mathEnabled&&null!=this.editor||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(C, p){C=p.getProperty("edit").changes;for(p=0;p<C.length;p++)if(C[p]instanceof SelectPage||C[p]instanceof RenamePage||C[p]instanceof MovePage||C[p]instanceof mxRootChange){m();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}}; EditorUi.prototype.restoreViewState=function(b,e,k){b=null!=b?this.getPageById(b.getId()):null;var m=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,e):(m.setViewState(e),this.editor.updateGraphComponents(),m.view.revalidate(),m.sizeDidChange()),m.container.scrollLeft=m.view.translate.x*m.view.scale+e.scrollLeft,m.container.scrollTop=m.view.translate.y*m.view.scale+e.scrollTop,m.restoreSelection(k))}; -Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),k=parseFloat(b.getAttribute("pageScale")),m=parseFloat(b.getAttribute("pageWidth")),C=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),E=this.parseBackgroundImage(b.getAttribute("backgroundImage")),K=b.getAttribute("extFonts");if(K)try{K=K.split("|").map(function(Q){Q=Q.split("^");return{name:Q[0],url:Q[1]}})}catch(Q){console.log("ExtFonts format error: "+Q.message)}return{gridEnabled:"0"!=b.getAttribute("grid"), -gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=p&&0<p.length?p:null,backgroundImage:E,pageScale:isNaN(k)?mxGraph.prototype.pageScale:k,pageFormat:isNaN(m)||isNaN(C)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat: +Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),k=parseFloat(b.getAttribute("pageScale")),m=parseFloat(b.getAttribute("pageWidth")),C=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),F=this.parseBackgroundImage(b.getAttribute("backgroundImage")),K=b.getAttribute("extFonts");if(K)try{K=K.split("|").map(function(P){P=P.split("^");return{name:P[0],url:P[1]}})}catch(P){console.log("ExtFonts format error: "+P.message)}return{gridEnabled:"0"!=b.getAttribute("grid"), +gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=p&&0<p.length?p:null,backgroundImage:F,pageScale:isNaN(k)?mxGraph.prototype.pageScale:k,pageFormat:isNaN(m)||isNaN(C)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat: mxSettings.getPageFormat():new mxRectangle(0,0,m,C),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:K||[]}}; Graph.prototype.saveViewState=function(b,e,k,m){k||(e.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),e.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),e.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),e.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),e.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),e.setAttribute("connect",null==b||b.connect?"1":"0"),e.setAttribute("arrows",null==b||b.arrows?"1":"0"),e.setAttribute("fold", null==b||b.foldingEnabled?"1":"0"));e.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);k=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=k&&(e.setAttribute("pageWidth",k.width),e.setAttribute("pageHeight",k.height));null!=b&&(null!=b.background&&e.setAttribute("background",b.background),m=this.getBackgroundImageObject(b.backgroundImage,m),null!=m&&e.setAttribute("backgroundImage", @@ -3881,209 +3887,208 @@ EditorUi.prototype.selectNextPage=function(b){var e=this.currentPage;null!=e&&nu EditorUi.prototype.insertPage=function(b,e){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId()),e=null!=e?e:this.pages.length,e=new ChangePage(this,b,b,e),this.editor.graph.model.execute(e));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b}; EditorUi.prototype.createPage=function(b,e){e=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),e);e.setName(null!=b?b:this.createPageName());this.initDiagramNode(e);return e};EditorUi.prototype.createPageName=function(){for(var b={},e=0;e<this.pages.length;e++){var k=this.pages[e].getName();null!=k&&0<k.length&&(b[k]=k)}e=this.pages.length;do k=mxResources.get("pageWithNumber",[++e]);while(null!=b[k]);return k}; EditorUi.prototype.removePage=function(b){try{var e=this.editor.graph,k=mxUtils.indexOf(this.pages,b);if(e.isEnabled()&&0<=k){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e.model.beginUpdate();try{var m=this.currentPage;m==b&&1<this.pages.length?(k==this.pages.length-1?k--:k++,m=this.pages[k]):1>=this.pages.length&&(m=this.insertPage(),e.model.execute(new RenamePage(this,m,mxResources.get("pageWithNumber",[1]))));e.model.execute(new ChangePage(this,b,m))}finally{e.model.endUpdate()}}}catch(C){this.handleError(C)}return b}; -EditorUi.prototype.duplicatePage=function(b,e){var k=null;try{var m=this.editor.graph;if(m.isEnabled()){m.isEditing()&&m.stopEditing();var C=b.node.cloneNode(!1);C.removeAttribute("id");var p={},E=m.createCellLookup([m.model.root]);k=new DiagramPage(C);k.root=m.cloneCell(m.model.root,null,p);var K=new mxGraphModel;K.prefix=Editor.guid()+"-";K.setRoot(k.root);m.updateCustomLinks(m.createCellMapping(p,E),[k.root]);k.viewState=b==this.currentPage?m.getViewState():b.viewState;this.initDiagramNode(k); -k.viewState.scale=1;k.viewState.scrollLeft=null;k.viewState.scrollTop=null;k.viewState.currentRoot=null;k.viewState.defaultParent=null;k.setName(e);k=this.insertPage(k,mxUtils.indexOf(this.pages,b)+1)}}catch(Q){this.handleError(Q)}return k};EditorUi.prototype.initDiagramNode=function(b){var e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,e);mxUtils.setTextContent(b.node,Graph.compressNode(e))}; +EditorUi.prototype.duplicatePage=function(b,e){var k=null;try{var m=this.editor.graph;if(m.isEnabled()){m.isEditing()&&m.stopEditing();var C=b.node.cloneNode(!1);C.removeAttribute("id");var p={},F=m.createCellLookup([m.model.root]);k=new DiagramPage(C);k.root=m.cloneCell(m.model.root,null,p);var K=new mxGraphModel;K.prefix=Editor.guid()+"-";K.setRoot(k.root);m.updateCustomLinks(m.createCellMapping(p,F),[k.root]);k.viewState=b==this.currentPage?m.getViewState():b.viewState;this.initDiagramNode(k); +k.viewState.scale=1;k.viewState.scrollLeft=null;k.viewState.scrollTop=null;k.viewState.currentRoot=null;k.viewState.defaultParent=null;k.setName(e);k=this.insertPage(k,mxUtils.indexOf(this.pages,b)+1)}}catch(P){this.handleError(P)}return k};EditorUi.prototype.initDiagramNode=function(b){var e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,e);mxUtils.setTextContent(b.node,Graph.compressNode(e))}; EditorUi.prototype.clonePages=function(b){for(var e=[],k=0;k<b.length;k++)e.push(this.clonePage(b[k]));return e};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var e=new DiagramPage(b.node.cloneNode(!0)),k=b==this.currentPage?this.editor.graph.getViewState():b.viewState;e.viewState=mxUtils.clone(k,EditorUi.transientViewStateProperties);e.root=this.editor.graph.model.cloneCell(b.root,null,!0);return e}; EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(k){null!=k&&0<k.length&&this.editor.graph.model.execute(new RenamePage(this,b,k))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return b};EditorUi.prototype.movePage=function(b,e){this.editor.graph.model.execute(new MovePage(this,b,e))}; EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer";b.style.position="absolute";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.height="0px";return b}; EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,e=document.createElement("div");e.style.position="relative";e.style.display="inline-block";e.style.verticalAlign="top";e.style.height=this.tabContainer.style.height;e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.fontSize="13px";e.style.marginLeft="30px";for(var k=this.editor.isChromelessView()?29:59,m=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-k)/this.pages.length)+ 1),C=null,p=0;p<this.pages.length;p++)mxUtils.bind(this,function(d,f){this.pages[d]==this.currentPage?(f.className="geActivePage",f.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):f.className="geInactivePage";f.setAttribute("draggable","true");mxEvent.addListener(f,"dragstart",mxUtils.bind(this,function(g){b.isEnabled()?(mxClient.IS_FF&&g.dataTransfer.setData("Text","<diagram/>"),C=d):mxEvent.consume(g)}));mxEvent.addListener(f,"dragend",mxUtils.bind(this,function(g){C=null;g.stopPropagation(); g.preventDefault()}));mxEvent.addListener(f,"dragover",mxUtils.bind(this,function(g){null!=C&&(g.dataTransfer.dropEffect="move");g.stopPropagation();g.preventDefault()}));mxEvent.addListener(f,"drop",mxUtils.bind(this,function(g){null!=C&&d!=C&&this.movePage(C,d);g.stopPropagation();g.preventDefault()}));e.appendChild(f)})(p,this.createTabForPage(this.pages[p],m,this.pages[p]!=this.currentPage,p+1));this.tabContainer.innerText="";this.tabContainer.appendChild(e);m=this.createPageMenuTab();this.tabContainer.appendChild(m); -m=null;this.isPageInsertTabVisible()&&(m=this.createPageInsertTab(),this.tabContainer.appendChild(m));if(e.clientWidth>this.tabContainer.clientWidth-k){null!=m&&(m.style.position="absolute",m.style.right="0px",e.style.marginRight="30px");var E=this.createControlTab(4," ❮ ");E.style.position="absolute";E.style.right=this.editor.chromeless?"29px":"55px";E.style.fontSize="13pt";this.tabContainer.appendChild(E);var K=this.createControlTab(4," ❯");K.style.position="absolute"; -K.style.right=this.editor.chromeless?"0px":"29px";K.style.fontSize="13pt";this.tabContainer.appendChild(K);var Q=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=Q+"px";mxEvent.addListener(E,"click",mxUtils.bind(this,function(d){e.scrollLeft-=Math.max(20,Q-20);mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(K,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}));mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(K, -e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(K,"click",mxUtils.bind(this,function(d){e.scrollLeft+=Math.max(20,Q-20);mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(K,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()}; +m=null;this.isPageInsertTabVisible()&&(m=this.createPageInsertTab(),this.tabContainer.appendChild(m));if(e.clientWidth>this.tabContainer.clientWidth-k){null!=m&&(m.style.position="absolute",m.style.right="0px",e.style.marginRight="30px");var F=this.createControlTab(4," ❮ ");F.style.position="absolute";F.style.right=this.editor.chromeless?"29px":"55px";F.style.fontSize="13pt";this.tabContainer.appendChild(F);var K=this.createControlTab(4," ❯");K.style.position="absolute"; +K.style.right=this.editor.chromeless?"0px":"29px";K.style.fontSize="13pt";this.tabContainer.appendChild(K);var P=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=P+"px";mxEvent.addListener(F,"click",mxUtils.bind(this,function(d){e.scrollLeft-=Math.max(20,P-20);mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(K,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}));mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(K, +e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(K,"click",mxUtils.bind(this,function(d){e.scrollLeft+=Math.max(20,P-20);mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(K,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()}; EditorUi.prototype.createTab=function(b){var e=document.createElement("div");e.style.display="inline-block";e.style.whiteSpace="nowrap";e.style.boxSizing="border-box";e.style.position="relative";e.style.overflow="hidden";e.style.textAlign="center";e.style.marginLeft="-1px";e.style.height=this.tabContainer.clientHeight+"px";e.style.padding="12px 4px 8px 4px";e.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";e.style.borderTopStyle="none";e.style.borderBottomStyle="none";e.style.backgroundColor= this.tabContainer.style.backgroundColor;e.style.cursor="move";e.style.color="gray";b&&(mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(k){this.editor.graph.isMouseDown||(e.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(k))})),mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(k){e.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(k)})));return e}; EditorUi.prototype.createControlTab=function(b,e,k){k=this.createTab(null!=k?k:!0);k.style.lineHeight=this.tabContainerHeight+"px";k.style.paddingTop=b+"px";k.style.cursor="pointer";k.style.width="30px";k.innerHTML=e;null!=k.firstChild&&null!=k.firstChild.style&&mxUtils.setOpacity(k.firstChild,40);return k};EditorUi.prototype.getShortPageName=function(b){b=b.getName();36<b.length&&(b=b.substring(0,34)+"...");return b}; EditorUi.prototype.createPageMenuTab=function(b,e){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var k=b.getElementsByTagName("div")[0];k.style.display="inline-block";k.style.marginTop="5px";k.style.width="21px";k.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(m){this.editor.graph.popupMenuHandler.hideMenu(); -var C=new mxPopupMenu(mxUtils.bind(this,function(K,Q){var d=mxUtils.bind(this,function(){for(var z=0;z<this.pages.length;z++)mxUtils.bind(this,function(u){var H=K.addItem(this.getShortPageName(this.pages[u]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[u])}),Q),J=this.pages[u].getId();H.setAttribute("title",this.pages[u].getName()+" ("+(u+1)+"/"+this.pages.length+")"+(null!=J?" ["+J+"]":""));this.pages[u]==this.currentPage&&K.addCheckmark(H,Editor.checkmarkImage)})(z)}),f=mxUtils.bind(this, -function(){K.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),Q)});e||d();if(this.editor.graph.isEnabled()){e||(K.addSeparator(Q),f());var g=this.currentPage;if(null!=g){K.addSeparator(Q);var x=this.getShortPageName(g);K.addItem(mxResources.get("removeIt",[x]),null,mxUtils.bind(this,function(){this.removePage(g)}),Q);K.addItem(mxResources.get("renameIt",[x]),null,mxUtils.bind(this,function(){this.renamePage(g,g.getName())}),Q);e||K.addSeparator(Q);K.addItem(mxResources.get("duplicateIt", -[x]),null,mxUtils.bind(this,function(){this.duplicatePage(g,mxResources.get("copyOf",[g.getName()]))}),Q)}}e&&(K.addSeparator(Q),f(),K.addSeparator(Q),d())}));C.div.className+=" geMenubarMenu";C.smartSeparators=!0;C.showDisabled=!0;C.autoExpand=!0;C.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(C,arguments);C.destroy()});var p=mxEvent.getClientX(m),E=mxEvent.getClientY(m);C.popup(p,E,null,m);this.setCurrentMenu(C);mxEvent.consume(m)}));return b}; +var C=new mxPopupMenu(mxUtils.bind(this,function(K,P){var d=mxUtils.bind(this,function(){for(var y=0;y<this.pages.length;y++)mxUtils.bind(this,function(u){var H=K.addItem(this.getShortPageName(this.pages[u]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[u])}),P),J=this.pages[u].getId();H.setAttribute("title",this.pages[u].getName()+" ("+(u+1)+"/"+this.pages.length+")"+(null!=J?" ["+J+"]":""));this.pages[u]==this.currentPage&&K.addCheckmark(H,Editor.checkmarkImage)})(y)}),f=mxUtils.bind(this, +function(){K.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),P)});e||d();if(this.editor.graph.isEnabled()){e||(K.addSeparator(P),f());var g=this.currentPage;if(null!=g){K.addSeparator(P);var x=this.getShortPageName(g);K.addItem(mxResources.get("removeIt",[x]),null,mxUtils.bind(this,function(){this.removePage(g)}),P);K.addItem(mxResources.get("renameIt",[x]),null,mxUtils.bind(this,function(){this.renamePage(g,g.getName())}),P);e||K.addSeparator(P);K.addItem(mxResources.get("duplicateIt", +[x]),null,mxUtils.bind(this,function(){this.duplicatePage(g,mxResources.get("copyOf",[g.getName()]))}),P)}}e&&(K.addSeparator(P),f(),K.addSeparator(P),d())}));C.div.className+=" geMenubarMenu";C.smartSeparators=!0;C.showDisabled=!0;C.autoExpand=!0;C.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(C,arguments);C.destroy()});var p=mxEvent.getClientX(m),F=mxEvent.getClientY(m);C.popup(p,F,null,m);this.setCurrentMenu(C);mxEvent.consume(m)}));return b}; EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(k){this.insertPage();mxEvent.consume(k)}));var e=b.getElementsByTagName("div")[0];e.style.display="inline-block";e.style.width="21px";e.style.height="21px";return b}; EditorUi.prototype.createTabForPage=function(b,e,k,m){k=this.createTab(k);var C=b.getName()||mxResources.get("untitled"),p=b.getId();k.setAttribute("title",C+(null!=p?" ("+p+")":"")+" ["+m+"]");mxUtils.write(k,C);k.style.maxWidth=e+"px";k.style.width=e+"px";this.addTabListeners(b,k);42<e&&(k.style.textOverflow="ellipsis");return k}; EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var k=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(p){this.renamePage(b);mxEvent.consume(p)}));var m=!1,C=!1;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(p){m=null!=this.currentMenu;C=b==this.currentPage;k.isMouseDown||C||this.selectPage(b)}),null,mxUtils.bind(this,function(p){if(k.isEnabled()&&!k.isMouseDown&&(mxEvent.isTouchEvent(p)&&C||mxEvent.isPopupTrigger(p))){k.popupMenuHandler.hideMenu(); -this.hideCurrentMenu();if(!mxEvent.isTouchEvent(p)||!m){var E=new mxPopupMenu(this.createPageMenu(b));E.div.className+=" geMenubarMenu";E.smartSeparators=!0;E.showDisabled=!0;E.autoExpand=!0;E.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(E,arguments);this.resetCurrentMenu();E.destroy()});var K=mxEvent.getClientX(p),Q=mxEvent.getClientY(p);E.popup(K,Q,null,p);this.setCurrentMenu(E,e)}mxEvent.consume(p)}}))}; +this.hideCurrentMenu();if(!mxEvent.isTouchEvent(p)||!m){var F=new mxPopupMenu(this.createPageMenu(b));F.div.className+=" geMenubarMenu";F.smartSeparators=!0;F.showDisabled=!0;F.autoExpand=!0;F.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(F,arguments);this.resetCurrentMenu();F.destroy()});var K=mxEvent.getClientX(p),P=mxEvent.getClientY(p);F.popup(K,P,null,p);this.setCurrentMenu(F,e)}mxEvent.consume(p)}}))}; EditorUi.prototype.getLinkForPage=function(b,e,k){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var m=this.getCurrentFile();if(null!=m&&m.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var C=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));C+=(0==C.length?"?":"&")+"page-id="+b.getId();null!=e&&(C+="&"+e.join("&"));return(k&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)? EditorUi.drawHost:"https://"+window.location.host)+"/"+C+"#"+m.getHash()}}return null}; EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(k,m){var C=this.editor.graph;k.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),m);k.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),m);k.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,e)}),m);null!=this.getLinkForPage(b)&&(k.addSeparator(m),k.addItem(mxResources.get("link"), -null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(p,E,K,Q,d,f){p=this.createUrlParameters(p,E,K,Q,d,f);K||p.push("hide-pages=1");C.isSelectionEmpty()||(K=C.getBoundingBox(C.getSelectionCells()),E=C.view.translate,d=C.view.scale,K.width/=d,K.height/=d,K.x=K.x/d-E.x,K.y=K.y/d-E.y,p.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(K.x),y:Math.round(K.y),width:Math.round(K.width),height:Math.round(K.height),border:100})))); -Q=new EmbedDialog(this,this.getLinkForPage(b,p,Q));this.showDialog(Q.container,450,240,!0,!0);Q.init()}))})));k.addSeparator(m);k.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),m);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(k.addSeparator(m),k.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null, +null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(p,F,K,P,d,f){p=this.createUrlParameters(p,F,K,P,d,f);K||p.push("hide-pages=1");C.isSelectionEmpty()||(K=C.getBoundingBox(C.getSelectionCells()),F=C.view.translate,d=C.view.scale,K.width/=d,K.height/=d,K.x=K.x/d-F.x,K.y=K.y/d-F.y,p.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(K.x),y:Math.round(K.y),width:Math.round(K.width),height:Math.round(K.height),border:100})))); +P=new EmbedDialog(this,this.getLinkForPage(b,p,P));this.showDialog(P.container,450,240,!0,!0);P.init()}))})));k.addSeparator(m);k.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),m);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(k.addSeparator(m),k.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null, !0,!0))}),m))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};b.afterDecode=function(e,k,m){e=m.oldIndex;m.oldIndex=m.newIndex;m.newIndex=e;return m};mxCodecRegistry.register(b)})(); (function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};b.afterDecode=function(e,k,m){e=m.previous;m.previous=m.name;m.name=e;return m};mxCodecRegistry.register(b)})(); (function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(e,k,m){m.setAttribute("relatedPage",k.relatedPage.getId());null==k.index&&(m.setAttribute("name",k.relatedPage.getName()),null!=k.relatedPage.viewState&&m.setAttribute("viewState",JSON.stringify(k.relatedPage.viewState,function(C,p){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,C)?p:void 0})),null!=k.relatedPage.root&&e.encodeCell(k.relatedPage.root, m));return m};b.beforeDecode=function(e,k,m){m.ui=e.ui;m.relatedPage=m.ui.getPageById(k.getAttribute("relatedPage"));if(null==m.relatedPage){var C=k.ownerDocument.createElement("diagram");C.setAttribute("id",k.getAttribute("relatedPage"));C.setAttribute("name",k.getAttribute("name"));m.relatedPage=new DiagramPage(C);C=k.getAttribute("viewState");null!=C&&(m.relatedPage.viewState=JSON.parse(C),k.removeAttribute("viewState"));k=k.cloneNode(!0);C=k.firstChild;if(null!=C)for(m.relatedPage.root=e.decodeCell(C, -!1),m=C.nextSibling,C.parentNode.removeChild(C),C=m;null!=C;){m=C.nextSibling;if(C.nodeType==mxConstants.NODETYPE_ELEMENT){var p=C.getAttribute("id");null==e.lookup(p)&&e.decodeCell(C)}C.parentNode.removeChild(C);C=m}}return k};b.afterDecode=function(e,k,m){m.index=m.previousIndex;return m};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(m,C,p,E,K){C=null!=C?C:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),m));this.stopEditing();this.model.beginUpdate();try{for(var Q=p.slice(),d=0;d<p.length;d++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[d]),"treeFolding","0")&&this.foldTreeCell(m,p[d]);p=Q;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell= -function(m,C){this.model.beginUpdate();try{var p=[];this.traverse(C,!0,mxUtils.bind(this,function(K,Q){var d=null!=Q&&this.isTreeEdge(Q);d&&p.push(Q);K==C||null!=Q&&!d||p.push(K);return(null==Q||d)&&(K==C||!this.model.isCollapsed(K))}));this.model.setCollapsed(C,m);for(var E=0;E<p.length;E++)this.model.setVisible(p[E],!m)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(m){return!this.isEdgeIgnored(m)};Graph.prototype.getTreeEdges=function(m,C,p,E,K,Q){return this.model.filterCells(this.getEdges(m, -C,p,E,K,Q),mxUtils.bind(this,function(d){return this.isTreeEdge(d)}))};Graph.prototype.getIncomingTreeEdges=function(m,C){return this.getTreeEdges(m,C,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(m,C){return this.getTreeEdges(m,C,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function m(L){return H.isVertex(L)&&p(L)}function C(L){var Z= -!1;null!=L&&(Z="1"==u.getCurrentCellStyle(L).treeMoving);return Z}function p(L){var Z=!1;null!=L&&(L=H.getParent(L),Z=u.view.getState(L),Z="tree"==(null!=Z?Z.style:u.getCellStyle(L)).containerType);return Z}function E(L){var Z=!1;null!=L&&(L=H.getParent(L),Z=u.view.getState(L),u.view.getState(L),Z=null!=(null!=Z?Z.style:u.getCellStyle(L)).childLayout);return Z}function K(L){L=u.view.getState(L);if(null!=L){var Z=u.getIncomingTreeEdges(L.cell);if(0<Z.length&&(Z=u.view.getState(Z[0]),null!=Z&&(Z=Z.absolutePoints, -null!=Z&&0<Z.length&&(Z=Z[Z.length-1],null!=Z)))){if(Z.y==L.y&&Math.abs(Z.x-L.getCenterX())<L.width/2)return mxConstants.DIRECTION_SOUTH;if(Z.y==L.y+L.height&&Math.abs(Z.x-L.getCenterX())<L.width/2)return mxConstants.DIRECTION_NORTH;if(Z.x>L.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function Q(L,Z){Z=null!=Z?Z:!0;u.model.beginUpdate();try{var P=u.model.getParent(L),ca=u.getIncomingTreeEdges(L),ja=u.cloneCells([ca[0],L]);u.model.setTerminal(ja[0],u.model.getTerminal(ca[0], -!0),!0);var ka=K(L),q=P.geometry;ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH?ja[1].geometry.x+=Z?L.geometry.width+10:-ja[1].geometry.width-10:ja[1].geometry.y+=Z?L.geometry.height+10:-ja[1].geometry.height-10;u.view.currentRoot!=P&&(ja[1].geometry.x-=q.x,ja[1].geometry.y-=q.y);var F=u.view.getState(L),R=u.view.scale;if(null!=F){var W=mxRectangle.fromRectangle(F);ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH?W.x+=(Z?L.geometry.width+10:-ja[1].geometry.width- -10)*R:W.y+=(Z?L.geometry.height+10:-ja[1].geometry.height-10)*R;var T=u.getOutgoingTreeEdges(u.model.getTerminal(ca[0],!0));if(null!=T){for(var ba=ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH,ha=q=ca=0;ha<T.length;ha++){var ra=u.model.getTerminal(T[ha],!1);if(ka==K(ra)){var ta=u.view.getState(ra);ra!=L&&null!=ta&&(ba&&Z!=ta.getCenterX()<F.getCenterX()||!ba&&Z!=ta.getCenterY()<F.getCenterY())&&mxUtils.intersects(W,ta)&&(ca=10+Math.max(ca,(Math.min(W.x+W.width,ta.x+ta.width)-Math.max(W.x, -ta.x))/R),q=10+Math.max(q,(Math.min(W.y+W.height,ta.y+ta.height)-Math.max(W.y,ta.y))/R))}}ba?q=0:ca=0;for(ha=0;ha<T.length;ha++)if(ra=u.model.getTerminal(T[ha],!1),ka==K(ra)&&(ta=u.view.getState(ra),ra!=L&&null!=ta&&(ba&&Z!=ta.getCenterX()<F.getCenterX()||!ba&&Z!=ta.getCenterY()<F.getCenterY()))){var ma=[];u.traverse(ta.cell,!0,function(pa,za){var Ba=null!=za&&u.isTreeEdge(za);Ba&&ma.push(za);(null==za||Ba)&&ma.push(pa);return null==za||Ba});u.moveCells(ma,(Z?1:-1)*ca,(Z?1:-1)*q)}}}return u.addCells(ja, -P)}finally{u.model.endUpdate()}}function d(L){u.model.beginUpdate();try{var Z=K(L),P=u.getIncomingTreeEdges(L),ca=u.cloneCells([P[0],L]);u.model.setTerminal(P[0],ca[1],!1);u.model.setTerminal(ca[0],ca[1],!0);u.model.setTerminal(ca[0],L,!1);var ja=u.model.getParent(L),ka=ja.geometry,q=[];u.view.currentRoot!=ja&&(ca[1].geometry.x-=ka.x,ca[1].geometry.y-=ka.y);u.traverse(L,!0,function(W,T){var ba=null!=T&&u.isTreeEdge(T);ba&&q.push(T);(null==T||ba)&&q.push(W);return null==T||ba});var F=L.geometry.width+ -40,R=L.geometry.height+40;Z==mxConstants.DIRECTION_SOUTH?F=0:Z==mxConstants.DIRECTION_NORTH?(F=0,R=-R):Z==mxConstants.DIRECTION_WEST?(F=-F,R=0):Z==mxConstants.DIRECTION_EAST&&(R=0);u.moveCells(q,F,R);return u.addCells(ca,ja)}finally{u.model.endUpdate()}}function f(L,Z){u.model.beginUpdate();try{var P=u.model.getParent(L),ca=u.getIncomingTreeEdges(L),ja=K(L);0==ca.length&&(ca=[u.createEdge(P,null,"",null,null,u.createCurrentEdgeStyle())],ja=Z);var ka=u.cloneCells([ca[0],L]);u.model.setTerminal(ka[0], -L,!0);if(null==u.model.getTerminal(ka[0],!1)){u.model.setTerminal(ka[0],ka[1],!1);var q=u.getCellStyle(ka[1]).newEdgeStyle;if(null!=q)try{var F=JSON.parse(q),R;for(R in F)u.setCellStyles(R,F[R],[ka[0]]),"edgeStyle"==R&&"elbowEdgeStyle"==F[R]&&u.setCellStyles("elbow",ja==mxConstants.DIRECTION_SOUTH||ja==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[ka[0]])}catch(ta){}}ca=u.getOutgoingTreeEdges(L);var W=P.geometry;Z=[];u.view.currentRoot==P&&(W=new mxRectangle);for(q=0;q<ca.length;q++){var T= -u.model.getTerminal(ca[q],!1);null!=T&&Z.push(T)}var ba=u.view.getBounds(Z),ha=u.view.translate,ra=u.view.scale;ja==mxConstants.DIRECTION_SOUTH?(ka[1].geometry.x=null==ba?L.geometry.x+(L.geometry.width-ka[1].geometry.width)/2:(ba.x+ba.width)/ra-ha.x-W.x+10,ka[1].geometry.y+=ka[1].geometry.height-W.y+40):ja==mxConstants.DIRECTION_NORTH?(ka[1].geometry.x=null==ba?L.geometry.x+(L.geometry.width-ka[1].geometry.width)/2:(ba.x+ba.width)/ra-ha.x+-W.x+10,ka[1].geometry.y-=ka[1].geometry.height+W.y+40):(ka[1].geometry.x= -ja==mxConstants.DIRECTION_WEST?ka[1].geometry.x-(ka[1].geometry.width+W.x+40):ka[1].geometry.x+(ka[1].geometry.width-W.x+40),ka[1].geometry.y=null==ba?L.geometry.y+(L.geometry.height-ka[1].geometry.height)/2:(ba.y+ba.height)/ra-ha.y+-W.y+10);return u.addCells(ka,P)}finally{u.model.endUpdate()}}function g(L,Z,P){L=u.getOutgoingTreeEdges(L);P=u.view.getState(P);var ca=[];if(null!=P&&null!=L){for(var ja=0;ja<L.length;ja++){var ka=u.view.getState(u.model.getTerminal(L[ja],!1));null!=ka&&(!Z&&Math.min(ka.x+ -ka.width,P.x+P.width)>=Math.max(ka.x,P.x)||Z&&Math.min(ka.y+ka.height,P.y+P.height)>=Math.max(ka.y,P.y))&&ca.push(ka)}ca.sort(function(q,F){return Z?q.x+q.width-F.x-F.width:q.y+q.height-F.y-F.height})}return ca}function x(L,Z){var P=K(L),ca=Z==mxConstants.DIRECTION_EAST||Z==mxConstants.DIRECTION_WEST;(P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST)==ca&&P!=Z?z.actions.get("selectParent").funct():P==Z?(Z=u.getOutgoingTreeEdges(L),null!=Z&&0<Z.length&&u.setSelectionCell(u.model.getTerminal(Z[0], -!1))):(P=u.getIncomingTreeEdges(L),null!=P&&0<P.length&&(ca=g(u.model.getTerminal(P[0],!0),ca,L),L=u.view.getState(L),null!=L&&(L=mxUtils.indexOf(ca,L),0<=L&&(L+=Z==mxConstants.DIRECTION_NORTH||Z==mxConstants.DIRECTION_WEST?-1:1,0<=L&&L<=ca.length-1&&u.setSelectionCell(ca[L].cell)))))}var z=this,u=z.editor.graph,H=u.getModel(),J=z.menus.createPopupMenu;z.menus.createPopupMenu=function(L,Z,P){J.apply(this,arguments);if(1==u.getSelectionCount()){Z=u.getSelectionCell();var ca=u.getOutgoingTreeEdges(Z); -L.addSeparator();0<ca.length&&(m(u.getSelectionCell())&&this.addMenuItems(L,["selectChildren"],null,P),this.addMenuItems(L,["selectDescendants"],null,P));m(u.getSelectionCell())?(L.addSeparator(),0<u.getIncomingTreeEdges(Z).length&&this.addMenuItems(L,["selectSiblings","selectParent"],null,P)):0<u.model.getEdgeCount(Z)&&this.addMenuItems(L,["selectConnections"],null,P)}};z.actions.addAction("selectChildren",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var L=u.getSelectionCell();L=u.getOutgoingTreeEdges(L); -if(null!=L){for(var Z=[],P=0;P<L.length;P++)Z.push(u.model.getTerminal(L[P],!1));u.setSelectionCells(Z)}}},null,null,"Alt+Shift+X");z.actions.addAction("selectSiblings",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var L=u.getSelectionCell();L=u.getIncomingTreeEdges(L);if(null!=L&&0<L.length&&(L=u.getOutgoingTreeEdges(u.model.getTerminal(L[0],!0)),null!=L)){for(var Z=[],P=0;P<L.length;P++)Z.push(u.model.getTerminal(L[P],!1));u.setSelectionCells(Z)}}},null,null,"Alt+Shift+S");z.actions.addAction("selectParent", -function(){if(u.isEnabled()&&1==u.getSelectionCount()){var L=u.getSelectionCell();L=u.getIncomingTreeEdges(L);null!=L&&0<L.length&&u.setSelectionCell(u.model.getTerminal(L[0],!0))}},null,null,"Alt+Shift+P");z.actions.addAction("selectDescendants",function(L,Z){L=u.getSelectionCell();if(u.isEnabled()&&u.model.isVertex(L)){if(null!=Z&&mxEvent.isAltDown(Z))u.setSelectionCells(u.model.getTreeEdges(L,null==Z||!mxEvent.isShiftDown(Z),null==Z||!mxEvent.isControlDown(Z)));else{var P=[];u.traverse(L,!0,function(ca, -ja){var ka=null!=ja&&u.isTreeEdge(ja);ka&&P.push(ja);null!=ja&&!ka||null!=Z&&mxEvent.isShiftDown(Z)||P.push(ca);return null==ja||ka})}u.setSelectionCells(P)}},null,null,"Alt+Shift+D");var D=u.removeCells;u.removeCells=function(L,Z){Z=null!=Z?Z:!0;null==L&&(L=this.getDeletableCells(this.getSelectionCells()));Z&&(L=this.getDeletableCells(this.addAllEdges(L)));for(var P=[],ca=0;ca<L.length;ca++){var ja=L[ca];H.isEdge(ja)&&p(ja)&&(P.push(ja),ja=H.getTerminal(ja,!1));if(m(ja)){var ka=[];u.traverse(ja, -!0,function(q,F){var R=null!=F&&u.isTreeEdge(F);R&&ka.push(F);(null==F||R)&&ka.push(q);return null==F||R});0<ka.length&&(P=P.concat(ka),ja=u.getIncomingTreeEdges(L[ca]),L=L.concat(ja))}else null!=ja&&P.push(L[ca])}L=P;return D.apply(this,arguments)};z.hoverIcons.getStateAt=function(L,Z,P){return m(L.cell)?null:this.graph.view.getState(this.graph.getCellAt(Z,P))};var G=u.duplicateCells;u.duplicateCells=function(L,Z){L=null!=L?L:this.getSelectionCells();for(var P=L.slice(0),ca=0;ca<P.length;ca++){var ja= -u.view.getState(P[ca]);if(null!=ja&&m(ja.cell)){var ka=u.getIncomingTreeEdges(ja.cell);for(ja=0;ja<ka.length;ja++)mxUtils.remove(ka[ja],L)}}this.model.beginUpdate();try{var q=G.call(this,L,Z);if(q.length==L.length)for(ca=0;ca<L.length;ca++)if(m(L[ca])){var F=u.getIncomingTreeEdges(q[ca]);ka=u.getIncomingTreeEdges(L[ca]);if(0==F.length&&0<ka.length){var R=this.cloneCell(ka[0]);this.addEdge(R,u.getDefaultParent(),this.model.getTerminal(ka[0],!0),q[ca])}}}finally{this.model.endUpdate()}return q};var V= -u.moveCells;u.moveCells=function(L,Z,P,ca,ja,ka,q){var F=null;this.model.beginUpdate();try{var R=ja,W=this.getCurrentCellStyle(ja);if(null!=L&&m(ja)&&"1"==mxUtils.getValue(W,"treeFolding","0")){for(var T=0;T<L.length;T++)if(m(L[T])||u.model.isEdge(L[T])&&null==u.model.getTerminal(L[T],!0)){ja=u.model.getParent(L[T]);break}if(null!=R&&ja!=R&&null!=this.view.getState(L[0])){var ba=u.getIncomingTreeEdges(L[0]);if(0<ba.length){var ha=u.view.getState(u.model.getTerminal(ba[0],!0));if(null!=ha){var ra= -u.view.getState(R);null!=ra&&(Z=(ra.getCenterX()-ha.getCenterX())/u.view.scale,P=(ra.getCenterY()-ha.getCenterY())/u.view.scale)}}}}F=V.apply(this,arguments);if(null!=F&&null!=L&&F.length==L.length)for(T=0;T<F.length;T++)if(this.model.isEdge(F[T]))m(R)&&0>mxUtils.indexOf(F,this.model.getTerminal(F[T],!0))&&this.model.setTerminal(F[T],R,!0);else if(m(L[T])&&(ba=u.getIncomingTreeEdges(L[T]),0<ba.length))if(!ca)m(R)&&0>mxUtils.indexOf(L,this.model.getTerminal(ba[0],!0))&&this.model.setTerminal(ba[0], -R,!0);else if(0==u.getIncomingTreeEdges(F[T]).length){W=R;if(null==W||W==u.model.getParent(L[T]))W=u.model.getTerminal(ba[0],!0);ca=this.cloneCell(ba[0]);this.addEdge(ca,u.getDefaultParent(),W,F[T])}}finally{this.model.endUpdate()}return F};if(null!=z.sidebar){var U=z.sidebar.dropAndConnect;z.sidebar.dropAndConnect=function(L,Z,P,ca){var ja=u.model,ka=null;ja.beginUpdate();try{if(ka=U.apply(this,arguments),m(L))for(var q=0;q<ka.length;q++)if(ja.isEdge(ka[q])&&null==ja.getTerminal(ka[q],!0)){ja.setTerminal(ka[q], -L,!0);var F=u.getCellGeometry(ka[q]);F.points=null;null!=F.getTerminalPoint(!0)&&F.setTerminalPoint(null,!0)}}finally{ja.endUpdate()}return ka}}var Y={88:z.actions.get("selectChildren"),84:z.actions.get("selectSubtree"),80:z.actions.get("selectParent"),83:z.actions.get("selectSiblings")},O=z.onKeyDown;z.onKeyDown=function(L){try{if(u.isEnabled()&&!u.isEditing()&&m(u.getSelectionCell())&&1==u.getSelectionCount()){var Z=null;0<u.getIncomingTreeEdges(u.getSelectionCell()).length&&(9==L.which?Z=mxEvent.isShiftDown(L)? -d(u.getSelectionCell()):f(u.getSelectionCell()):13==L.which&&(Z=Q(u.getSelectionCell(),!mxEvent.isShiftDown(L))));if(null!=Z&&0<Z.length)1==Z.length&&u.model.isEdge(Z[0])?u.setSelectionCell(u.model.getTerminal(Z[0],!1)):u.setSelectionCell(Z[Z.length-1]),null!=z.hoverIcons&&z.hoverIcons.update(u.view.getState(u.getSelectionCell())),u.startEditingAtCell(u.getSelectionCell()),mxEvent.consume(L);else if(mxEvent.isAltDown(L)&&mxEvent.isShiftDown(L)){var P=Y[L.keyCode];null!=P&&(P.funct(L),mxEvent.consume(L))}else 37== -L.keyCode?(x(u.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(L)):38==L.keyCode?(x(u.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(L)):39==L.keyCode?(x(u.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(L)):40==L.keyCode&&(x(u.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(L))}}catch(ca){z.handleError(ca)}mxEvent.isConsumed(L)||O.apply(this,arguments)};var qa=u.connectVertex;u.connectVertex=function(L,Z,P,ca,ja,ka,q){var F=u.getIncomingTreeEdges(L); -if(m(L)){var R=K(L),W=R==mxConstants.DIRECTION_EAST||R==mxConstants.DIRECTION_WEST,T=Z==mxConstants.DIRECTION_EAST||Z==mxConstants.DIRECTION_WEST;return R==Z||0==F.length?f(L,Z):W==T?d(L):Q(L,Z!=mxConstants.DIRECTION_NORTH&&Z!=mxConstants.DIRECTION_WEST)}return qa.apply(this,arguments)};u.getSubtree=function(L){var Z=[L];!C(L)&&!m(L)||E(L)||u.traverse(L,!0,function(P,ca){var ja=null!=ca&&u.isTreeEdge(ca);ja&&0>mxUtils.indexOf(Z,ca)&&Z.push(ca);(null==ca||ja)&&0>mxUtils.indexOf(Z,P)&&Z.push(P);return null== -ca||ja});return Z};var oa=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){oa.apply(this,arguments);(C(this.state.cell)||m(this.state.cell))&&!E(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px", -this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(L){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(L),mxEvent.getClientY(L),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(L);this.graph.isMouseDown=!0;z.hoverIcons.reset();mxEvent.consume(L)})))};var aa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles= -function(){aa.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var da=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(L){da.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=L?"":"none")};var ia=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy= -function(L,Z){ia.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var m=k.apply(this,arguments),C=this.graph;return m.concat([this.addEntry("tree container",function(){var p=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex= -!0;var E=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');E.vertex=!0;var K=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');K.vertex=!0;var Q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;"); -Q.geometry.relative=!0;Q.edge=!0;E.insertEdge(Q,!0);K.insertEdge(Q,!1);p.insert(Q);p.insert(E);p.insert(K);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var p=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var E=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); -E.vertex=!0;var K=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');K.vertex=!0;var Q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");Q.geometry.relative=!0;Q.edge=!0; -E.insertEdge(Q,!0);K.insertEdge(Q,!1);var d=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;"); -f.geometry.relative=!0;f.edge=!0;E.insertEdge(f,!0);d.insertEdge(f,!1);var g=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');g.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;"); -x.geometry.relative=!0;x.edge=!0;E.insertEdge(x,!0);g.insertEdge(x,!1);var z=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');z.vertex=!0;var u=new mxCell("",new mxGeometry(0, -0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");u.geometry.relative=!0;u.edge=!0;E.insertEdge(u,!0);z.insertEdge(u,!1);p.insert(Q);p.insert(f);p.insert(x);p.insert(u);p.insert(E);p.insert(K);p.insert(d);p.insert(g);p.insert(z);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var p=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;'); -p.vertex=!0;return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var p=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); -p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");E.geometry.setTerminalPoint(new mxPoint(-40,40),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);return sb.createVertexTemplateFromCells([p,E],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var p=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); -p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");E.geometry.setTerminalPoint(new mxPoint(-40,40),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);return sb.createVertexTemplateFromCells([p,E],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree orgchart organization division",function(){var p=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};'); -p.vertex=!0;var E=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.setAttributeForCell(E,"treeRoot","1");E.vertex=!0;var K=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};'); -K.vertex=!0;var Q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");Q.geometry.relative=!0;Q.edge=!0;E.insertEdge(Q,!0);K.insertEdge(Q,!1);var d=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;"); -f.geometry.relative=!0;f.edge=!0;E.insertEdge(f,!0);d.insertEdge(f,!1);p.insert(Q);p.insert(f);p.insert(E);p.insert(K);p.insert(d);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree root",function(){var p=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.setAttributeForCell(p,"treeRoot", -"1");p.vertex=!0;return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree division",function(){var p=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;"); -E.geometry.setTerminalPoint(new mxPoint(0,0),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);return sb.createVertexTemplateFromCells([p,E],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree sub sections",function(){var p=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;"); -E.geometry.setTerminalPoint(new mxPoint(110,-40),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);var K=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");K.vertex=!0;var Q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");Q.geometry.setTerminalPoint(new mxPoint(110,-40),!0);Q.geometry.relative= -!0;Q.edge=!0;K.insertEdge(Q,!1);return sb.createVertexTemplateFromCells([E,Q,p,K],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows; -EditorUi.initMinimalTheme=function(){function b(D,G){if(EditorUi.windowed){var V=D.editor.graph;V.popupMenuHandler.hideMenu();if(null==D.formatWindow){G="1"==urlParams.sketch?Math.max(10,D.diagramContainer.clientWidth-241):Math.max(10,D.diagramContainer.clientWidth-248);var U="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;V="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,V.container.clientHeight-10);D.formatWindow=new WrapperWindow(D,mxResources.get("format"),G,U,240,V, -function(Y){Y=D.createFormat(Y);Y.init();return Y});D.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){D.formatWindow.window.fit()}));D.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else D.formatWindow.window.setVisible(null!=G?G:!D.formatWindow.window.isVisible())}else null==D.formatElt&&(D.formatElt=D.createSidebarContainer(),D.createFormat(D.formatElt).init(),D.formatElt.style.border="none",D.formatElt.style.width="240px",D.formatElt.style.borderLeft="1px solid gray", -D.formatElt.style.right="0px"),V=D.diagramContainer.parentNode,null!=D.formatElt.parentNode?(D.formatElt.parentNode.removeChild(D.formatElt),V.style.right="0px"):(V.parentNode.appendChild(D.formatElt),V.style.right=D.formatElt.style.width)}function e(D,G){function V(qa,oa){var aa=D.menus.get(qa);qa=O.addMenu(oa,mxUtils.bind(this,function(){aa.funct.apply(this,arguments)}));qa.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;"; -qa.className="geTitle";G.appendChild(qa);return qa}var U=document.createElement("div");U.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";U.className="geTitle";var Y=document.createElement("span");Y.style.fontSize="18px";Y.style.marginRight="5px";Y.innerHTML="+";U.appendChild(Y);mxUtils.write(U,mxResources.get("moreShapes"));G.appendChild(U);mxEvent.addListener(U,"click",function(){D.actions.get("shapes").funct()}); -var O=new Menubar(D,G);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?U.style.bottom="0":null!=D.actions.get("newLibrary")?(U=document.createElement("div"),U.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",U.className="geTitle",Y=document.createElement("span"),Y.style.cssText="position:relative;top:6px;",mxUtils.write(Y,mxResources.get("newLibrary")),U.appendChild(Y), -G.appendChild(U),mxEvent.addListener(U,"click",D.actions.get("newLibrary").funct),U=document.createElement("div"),U.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",U.className="geTitle",Y=document.createElement("span"),Y.style.cssText="position:relative;top:6px;",mxUtils.write(Y,mxResources.get("openLibrary")),U.appendChild(Y),G.appendChild(U),mxEvent.addListener(U, -"click",D.actions.get("openLibrary").funct)):(U=V("newLibrary",mxResources.get("newLibrary")),U.style.boxSizing="border-box",U.style.paddingRight="6px",U.style.paddingLeft="6px",U.style.height="32px",U.style.left="0",U=V("openLibraryFrom",mxResources.get("openLibraryFrom")),U.style.borderLeft="1px solid lightgray",U.style.boxSizing="border-box",U.style.paddingRight="6px",U.style.paddingLeft="6px",U.style.height="32px",U.style.left="50%");G.appendChild(D.sidebar.container);G.style.overflow="hidden"} -function k(D,G){if(EditorUi.windowed){var V=D.editor.graph;V.popupMenuHandler.hideMenu();if(null==D.sidebarWindow){G=Math.min(V.container.clientWidth-10,218);var U="1"==urlParams.embedInline?650:Math.min(V.container.clientHeight-40,650);D.sidebarWindow=new WrapperWindow(D,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(V.container.clientHeight-U)/2):56,G-6,U-6,function(Y){e(D,Y)});D.sidebarWindow.window.addListener(mxEvent.SHOW, -mxUtils.bind(this,function(){D.sidebarWindow.window.fit()}));D.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);D.sidebarWindow.window.setVisible(!0);isLocalStorage&&D.getLocalData("sidebar",function(Y){D.sidebar.showEntries(Y,null,!0)});D.restoreLibraries()}else D.sidebarWindow.window.setVisible(null!=G?G:!D.sidebarWindow.window.isVisible())}else null==D.sidebarElt&&(D.sidebarElt=D.createSidebarContainer(),e(D,D.sidebarElt),D.sidebarElt.style.border="none",D.sidebarElt.style.width="210px", -D.sidebarElt.style.borderRight="1px solid gray"),V=D.diagramContainer.parentNode,null!=D.sidebarElt.parentNode?(D.sidebarElt.parentNode.removeChild(D.sidebarElt),V.style.left="0px"):(V.parentNode.appendChild(D.sidebarElt),V.style.left=D.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var m=0;try{m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(D){}Editor.checkmarkImage= +!1),m=C.nextSibling,C.parentNode.removeChild(C),C=m;null!=C;){m=C.nextSibling;if(C.nodeType==mxConstants.NODETYPE_ELEMENT){var p=C.getAttribute("id");null==e.lookup(p)&&e.decodeCell(C)}C.parentNode.removeChild(C);C=m}}return k};b.afterDecode=function(e,k,m){m.index=m.previousIndex;return m};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(m,C,p,F,K){C=null!=C?C:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),m));this.stopEditing();this.model.beginUpdate();try{for(var P=p.slice(),d=0;d<p.length;d++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[d]),"treeFolding","0")&&this.foldTreeCell(m,p[d]);p=P;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell= +function(m,C){this.model.beginUpdate();try{var p=[];this.traverse(C,!0,mxUtils.bind(this,function(K,P){var d=null!=P&&this.isTreeEdge(P);d&&p.push(P);K==C||null!=P&&!d||p.push(K);return(null==P||d)&&(K==C||!this.model.isCollapsed(K))}));this.model.setCollapsed(C,m);for(var F=0;F<p.length;F++)this.model.setVisible(p[F],!m)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(m){return!this.isEdgeIgnored(m)};Graph.prototype.getTreeEdges=function(m,C,p,F,K,P){return this.model.filterCells(this.getEdges(m, +C,p,F,K,P),mxUtils.bind(this,function(d){return this.isTreeEdge(d)}))};Graph.prototype.getIncomingTreeEdges=function(m,C){return this.getTreeEdges(m,C,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(m,C){return this.getTreeEdges(m,C,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function m(M){return H.isVertex(M)&&p(M)}function C(M){var aa= +!1;null!=M&&(aa="1"==u.getCurrentCellStyle(M).treeMoving);return aa}function p(M){var aa=!1;null!=M&&(M=H.getParent(M),aa=u.view.getState(M),aa="tree"==(null!=aa?aa.style:u.getCellStyle(M)).containerType);return aa}function F(M){var aa=!1;null!=M&&(M=H.getParent(M),aa=u.view.getState(M),u.view.getState(M),aa=null!=(null!=aa?aa.style:u.getCellStyle(M)).childLayout);return aa}function K(M){M=u.view.getState(M);if(null!=M){var aa=u.getIncomingTreeEdges(M.cell);if(0<aa.length&&(aa=u.view.getState(aa[0]), +null!=aa&&(aa=aa.absolutePoints,null!=aa&&0<aa.length&&(aa=aa[aa.length-1],null!=aa)))){if(aa.y==M.y&&Math.abs(aa.x-M.getCenterX())<M.width/2)return mxConstants.DIRECTION_SOUTH;if(aa.y==M.y+M.height&&Math.abs(aa.x-M.getCenterX())<M.width/2)return mxConstants.DIRECTION_NORTH;if(aa.x>M.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function P(M,aa){aa=null!=aa?aa:!0;u.model.beginUpdate();try{var X=u.model.getParent(M),ja=u.getIncomingTreeEdges(M),ca=u.cloneCells([ja[0], +M]);u.model.setTerminal(ca[0],u.model.getTerminal(ja[0],!0),!0);var ka=K(M),q=X.geometry;ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH?ca[1].geometry.x+=aa?M.geometry.width+10:-ca[1].geometry.width-10:ca[1].geometry.y+=aa?M.geometry.height+10:-ca[1].geometry.height-10;u.view.currentRoot!=X&&(ca[1].geometry.x-=q.x,ca[1].geometry.y-=q.y);var E=u.view.getState(M),Q=u.view.scale;if(null!=E){var Y=mxRectangle.fromRectangle(E);ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH? +Y.x+=(aa?M.geometry.width+10:-ca[1].geometry.width-10)*Q:Y.y+=(aa?M.geometry.height+10:-ca[1].geometry.height-10)*Q;var R=u.getOutgoingTreeEdges(u.model.getTerminal(ja[0],!0));if(null!=R){for(var ba=ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH,ea=q=ja=0;ea<R.length;ea++){var ra=u.model.getTerminal(R[ea],!1);if(ka==K(ra)){var ta=u.view.getState(ra);ra!=M&&null!=ta&&(ba&&aa!=ta.getCenterX()<E.getCenterX()||!ba&&aa!=ta.getCenterY()<E.getCenterY())&&mxUtils.intersects(Y,ta)&&(ja=10+ +Math.max(ja,(Math.min(Y.x+Y.width,ta.x+ta.width)-Math.max(Y.x,ta.x))/Q),q=10+Math.max(q,(Math.min(Y.y+Y.height,ta.y+ta.height)-Math.max(Y.y,ta.y))/Q))}}ba?q=0:ja=0;for(ea=0;ea<R.length;ea++)if(ra=u.model.getTerminal(R[ea],!1),ka==K(ra)&&(ta=u.view.getState(ra),ra!=M&&null!=ta&&(ba&&aa!=ta.getCenterX()<E.getCenterX()||!ba&&aa!=ta.getCenterY()<E.getCenterY()))){var la=[];u.traverse(ta.cell,!0,function(pa,xa){var Ca=null!=xa&&u.isTreeEdge(xa);Ca&&la.push(xa);(null==xa||Ca)&&la.push(pa);return null== +xa||Ca});u.moveCells(la,(aa?1:-1)*ja,(aa?1:-1)*q)}}}return u.addCells(ca,X)}finally{u.model.endUpdate()}}function d(M){u.model.beginUpdate();try{var aa=K(M),X=u.getIncomingTreeEdges(M),ja=u.cloneCells([X[0],M]);u.model.setTerminal(X[0],ja[1],!1);u.model.setTerminal(ja[0],ja[1],!0);u.model.setTerminal(ja[0],M,!1);var ca=u.model.getParent(M),ka=ca.geometry,q=[];u.view.currentRoot!=ca&&(ja[1].geometry.x-=ka.x,ja[1].geometry.y-=ka.y);u.traverse(M,!0,function(Y,R){var ba=null!=R&&u.isTreeEdge(R);ba&&q.push(R); +(null==R||ba)&&q.push(Y);return null==R||ba});var E=M.geometry.width+40,Q=M.geometry.height+40;aa==mxConstants.DIRECTION_SOUTH?E=0:aa==mxConstants.DIRECTION_NORTH?(E=0,Q=-Q):aa==mxConstants.DIRECTION_WEST?(E=-E,Q=0):aa==mxConstants.DIRECTION_EAST&&(Q=0);u.moveCells(q,E,Q);return u.addCells(ja,ca)}finally{u.model.endUpdate()}}function f(M,aa){u.model.beginUpdate();try{var X=u.model.getParent(M),ja=u.getIncomingTreeEdges(M),ca=K(M);0==ja.length&&(ja=[u.createEdge(X,null,"",null,null,u.createCurrentEdgeStyle())], +ca=aa);var ka=u.cloneCells([ja[0],M]);u.model.setTerminal(ka[0],M,!0);if(null==u.model.getTerminal(ka[0],!1)){u.model.setTerminal(ka[0],ka[1],!1);var q=u.getCellStyle(ka[1]).newEdgeStyle;if(null!=q)try{var E=JSON.parse(q),Q;for(Q in E)u.setCellStyles(Q,E[Q],[ka[0]]),"edgeStyle"==Q&&"elbowEdgeStyle"==E[Q]&&u.setCellStyles("elbow",ca==mxConstants.DIRECTION_SOUTH||ca==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[ka[0]])}catch(ta){}}ja=u.getOutgoingTreeEdges(M);var Y=X.geometry;aa=[];u.view.currentRoot== +X&&(Y=new mxRectangle);for(q=0;q<ja.length;q++){var R=u.model.getTerminal(ja[q],!1);null!=R&&aa.push(R)}var ba=u.view.getBounds(aa),ea=u.view.translate,ra=u.view.scale;ca==mxConstants.DIRECTION_SOUTH?(ka[1].geometry.x=null==ba?M.geometry.x+(M.geometry.width-ka[1].geometry.width)/2:(ba.x+ba.width)/ra-ea.x-Y.x+10,ka[1].geometry.y+=ka[1].geometry.height-Y.y+40):ca==mxConstants.DIRECTION_NORTH?(ka[1].geometry.x=null==ba?M.geometry.x+(M.geometry.width-ka[1].geometry.width)/2:(ba.x+ba.width)/ra-ea.x+-Y.x+ +10,ka[1].geometry.y-=ka[1].geometry.height+Y.y+40):(ka[1].geometry.x=ca==mxConstants.DIRECTION_WEST?ka[1].geometry.x-(ka[1].geometry.width+Y.x+40):ka[1].geometry.x+(ka[1].geometry.width-Y.x+40),ka[1].geometry.y=null==ba?M.geometry.y+(M.geometry.height-ka[1].geometry.height)/2:(ba.y+ba.height)/ra-ea.y+-Y.y+10);return u.addCells(ka,X)}finally{u.model.endUpdate()}}function g(M,aa,X){M=u.getOutgoingTreeEdges(M);X=u.view.getState(X);var ja=[];if(null!=X&&null!=M){for(var ca=0;ca<M.length;ca++){var ka= +u.view.getState(u.model.getTerminal(M[ca],!1));null!=ka&&(!aa&&Math.min(ka.x+ka.width,X.x+X.width)>=Math.max(ka.x,X.x)||aa&&Math.min(ka.y+ka.height,X.y+X.height)>=Math.max(ka.y,X.y))&&ja.push(ka)}ja.sort(function(q,E){return aa?q.x+q.width-E.x-E.width:q.y+q.height-E.y-E.height})}return ja}function x(M,aa){var X=K(M),ja=aa==mxConstants.DIRECTION_EAST||aa==mxConstants.DIRECTION_WEST;(X==mxConstants.DIRECTION_EAST||X==mxConstants.DIRECTION_WEST)==ja&&X!=aa?y.actions.get("selectParent").funct():X==aa? +(aa=u.getOutgoingTreeEdges(M),null!=aa&&0<aa.length&&u.setSelectionCell(u.model.getTerminal(aa[0],!1))):(X=u.getIncomingTreeEdges(M),null!=X&&0<X.length&&(ja=g(u.model.getTerminal(X[0],!0),ja,M),M=u.view.getState(M),null!=M&&(M=mxUtils.indexOf(ja,M),0<=M&&(M+=aa==mxConstants.DIRECTION_NORTH||aa==mxConstants.DIRECTION_WEST?-1:1,0<=M&&M<=ja.length-1&&u.setSelectionCell(ja[M].cell)))))}var y=this,u=y.editor.graph,H=u.getModel(),J=y.menus.createPopupMenu;y.menus.createPopupMenu=function(M,aa,X){J.apply(this, +arguments);if(1==u.getSelectionCount()){aa=u.getSelectionCell();var ja=u.getOutgoingTreeEdges(aa);M.addSeparator();0<ja.length&&(m(u.getSelectionCell())&&this.addMenuItems(M,["selectChildren"],null,X),this.addMenuItems(M,["selectDescendants"],null,X));m(u.getSelectionCell())?(M.addSeparator(),0<u.getIncomingTreeEdges(aa).length&&this.addMenuItems(M,["selectSiblings","selectParent"],null,X)):0<u.model.getEdgeCount(aa)&&this.addMenuItems(M,["selectConnections"],null,X)}};y.actions.addAction("selectChildren", +function(){if(u.isEnabled()&&1==u.getSelectionCount()){var M=u.getSelectionCell();M=u.getOutgoingTreeEdges(M);if(null!=M){for(var aa=[],X=0;X<M.length;X++)aa.push(u.model.getTerminal(M[X],!1));u.setSelectionCells(aa)}}},null,null,"Alt+Shift+X");y.actions.addAction("selectSiblings",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var M=u.getSelectionCell();M=u.getIncomingTreeEdges(M);if(null!=M&&0<M.length&&(M=u.getOutgoingTreeEdges(u.model.getTerminal(M[0],!0)),null!=M)){for(var aa=[],X=0;X< +M.length;X++)aa.push(u.model.getTerminal(M[X],!1));u.setSelectionCells(aa)}}},null,null,"Alt+Shift+S");y.actions.addAction("selectParent",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var M=u.getSelectionCell();M=u.getIncomingTreeEdges(M);null!=M&&0<M.length&&u.setSelectionCell(u.model.getTerminal(M[0],!0))}},null,null,"Alt+Shift+P");y.actions.addAction("selectDescendants",function(M,aa){M=u.getSelectionCell();if(u.isEnabled()&&u.model.isVertex(M)){if(null!=aa&&mxEvent.isAltDown(aa))u.setSelectionCells(u.model.getTreeEdges(M, +null==aa||!mxEvent.isShiftDown(aa),null==aa||!mxEvent.isControlDown(aa)));else{var X=[];u.traverse(M,!0,function(ja,ca){var ka=null!=ca&&u.isTreeEdge(ca);ka&&X.push(ca);null!=ca&&!ka||null!=aa&&mxEvent.isShiftDown(aa)||X.push(ja);return null==ca||ka})}u.setSelectionCells(X)}},null,null,"Alt+Shift+D");var D=u.removeCells;u.removeCells=function(M,aa){aa=null!=aa?aa:!0;null==M&&(M=this.getDeletableCells(this.getSelectionCells()));aa&&(M=this.getDeletableCells(this.addAllEdges(M)));for(var X=[],ja=0;ja< +M.length;ja++){var ca=M[ja];H.isEdge(ca)&&p(ca)&&(X.push(ca),ca=H.getTerminal(ca,!1));if(m(ca)){var ka=[];u.traverse(ca,!0,function(q,E){var Q=null!=E&&u.isTreeEdge(E);Q&&ka.push(E);(null==E||Q)&&ka.push(q);return null==E||Q});0<ka.length&&(X=X.concat(ka),ca=u.getIncomingTreeEdges(M[ja]),M=M.concat(ca))}else null!=ca&&X.push(M[ja])}M=X;return D.apply(this,arguments)};y.hoverIcons.getStateAt=function(M,aa,X){return m(M.cell)?null:this.graph.view.getState(this.graph.getCellAt(aa,X))};var G=u.duplicateCells; +u.duplicateCells=function(M,aa){M=null!=M?M:this.getSelectionCells();for(var X=M.slice(0),ja=0;ja<X.length;ja++){var ca=u.view.getState(X[ja]);if(null!=ca&&m(ca.cell)){var ka=u.getIncomingTreeEdges(ca.cell);for(ca=0;ca<ka.length;ca++)mxUtils.remove(ka[ca],M)}}this.model.beginUpdate();try{var q=G.call(this,M,aa);if(q.length==M.length)for(ja=0;ja<M.length;ja++)if(m(M[ja])){var E=u.getIncomingTreeEdges(q[ja]);ka=u.getIncomingTreeEdges(M[ja]);if(0==E.length&&0<ka.length){var Q=this.cloneCell(ka[0]);this.addEdge(Q, +u.getDefaultParent(),this.model.getTerminal(ka[0],!0),q[ja])}}}finally{this.model.endUpdate()}return q};var W=u.moveCells;u.moveCells=function(M,aa,X,ja,ca,ka,q){var E=null;this.model.beginUpdate();try{var Q=ca,Y=this.getCurrentCellStyle(ca);if(null!=M&&m(ca)&&"1"==mxUtils.getValue(Y,"treeFolding","0")){for(var R=0;R<M.length;R++)if(m(M[R])||u.model.isEdge(M[R])&&null==u.model.getTerminal(M[R],!0)){ca=u.model.getParent(M[R]);break}if(null!=Q&&ca!=Q&&null!=this.view.getState(M[0])){var ba=u.getIncomingTreeEdges(M[0]); +if(0<ba.length){var ea=u.view.getState(u.model.getTerminal(ba[0],!0));if(null!=ea){var ra=u.view.getState(Q);null!=ra&&(aa=(ra.getCenterX()-ea.getCenterX())/u.view.scale,X=(ra.getCenterY()-ea.getCenterY())/u.view.scale)}}}}E=W.apply(this,arguments);if(null!=E&&null!=M&&E.length==M.length)for(R=0;R<E.length;R++)if(this.model.isEdge(E[R]))m(Q)&&0>mxUtils.indexOf(E,this.model.getTerminal(E[R],!0))&&this.model.setTerminal(E[R],Q,!0);else if(m(M[R])&&(ba=u.getIncomingTreeEdges(M[R]),0<ba.length))if(!ja)m(Q)&& +0>mxUtils.indexOf(M,this.model.getTerminal(ba[0],!0))&&this.model.setTerminal(ba[0],Q,!0);else if(0==u.getIncomingTreeEdges(E[R]).length){Y=Q;if(null==Y||Y==u.model.getParent(M[R]))Y=u.model.getTerminal(ba[0],!0);ja=this.cloneCell(ba[0]);this.addEdge(ja,u.getDefaultParent(),Y,E[R])}}finally{this.model.endUpdate()}return E};if(null!=y.sidebar){var T=y.sidebar.dropAndConnect;y.sidebar.dropAndConnect=function(M,aa,X,ja){var ca=u.model,ka=null;ca.beginUpdate();try{if(ka=T.apply(this,arguments),m(M))for(var q= +0;q<ka.length;q++)if(ca.isEdge(ka[q])&&null==ca.getTerminal(ka[q],!0)){ca.setTerminal(ka[q],M,!0);var E=u.getCellGeometry(ka[q]);E.points=null;null!=E.getTerminalPoint(!0)&&E.setTerminalPoint(null,!0)}}finally{ca.endUpdate()}return ka}}var Z={88:y.actions.get("selectChildren"),84:y.actions.get("selectSubtree"),80:y.actions.get("selectParent"),83:y.actions.get("selectSiblings")},N=y.onKeyDown;y.onKeyDown=function(M){try{if(u.isEnabled()&&!u.isEditing()&&m(u.getSelectionCell())&&1==u.getSelectionCount()){var aa= +null;0<u.getIncomingTreeEdges(u.getSelectionCell()).length&&(9==M.which?aa=mxEvent.isShiftDown(M)?d(u.getSelectionCell()):f(u.getSelectionCell()):13==M.which&&(aa=P(u.getSelectionCell(),!mxEvent.isShiftDown(M))));if(null!=aa&&0<aa.length)1==aa.length&&u.model.isEdge(aa[0])?u.setSelectionCell(u.model.getTerminal(aa[0],!1)):u.setSelectionCell(aa[aa.length-1]),null!=y.hoverIcons&&y.hoverIcons.update(u.view.getState(u.getSelectionCell())),u.startEditingAtCell(u.getSelectionCell()),mxEvent.consume(M); +else if(mxEvent.isAltDown(M)&&mxEvent.isShiftDown(M)){var X=Z[M.keyCode];null!=X&&(X.funct(M),mxEvent.consume(M))}else 37==M.keyCode?(x(u.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(M)):38==M.keyCode?(x(u.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(M)):39==M.keyCode?(x(u.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(M)):40==M.keyCode&&(x(u.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(M))}}catch(ja){y.handleError(ja)}mxEvent.isConsumed(M)|| +N.apply(this,arguments)};var qa=u.connectVertex;u.connectVertex=function(M,aa,X,ja,ca,ka,q){var E=u.getIncomingTreeEdges(M);if(m(M)){var Q=K(M),Y=Q==mxConstants.DIRECTION_EAST||Q==mxConstants.DIRECTION_WEST,R=aa==mxConstants.DIRECTION_EAST||aa==mxConstants.DIRECTION_WEST;return Q==aa||0==E.length?f(M,aa):Y==R?d(M):P(M,aa!=mxConstants.DIRECTION_NORTH&&aa!=mxConstants.DIRECTION_WEST)}return qa.apply(this,arguments)};u.getSubtree=function(M){var aa=[M];!C(M)&&!m(M)||F(M)||u.traverse(M,!0,function(X, +ja){var ca=null!=ja&&u.isTreeEdge(ja);ca&&0>mxUtils.indexOf(aa,ja)&&aa.push(ja);(null==ja||ca)&&0>mxUtils.indexOf(aa,X)&&aa.push(X);return null==ja||ca});return aa};var oa=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){oa.apply(this,arguments);(C(this.state.cell)||m(this.state.cell))&&!F(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position= +"absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(M){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(M),mxEvent.getClientY(M),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(M);this.graph.isMouseDown=!0;y.hoverIcons.reset(); +mxEvent.consume(M)})))};var S=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){S.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var fa=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(M){fa.apply(this,arguments);null!=this.moveHandle&& +(this.moveHandle.style.display=M?"":"none")};var ia=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(M,aa){ia.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var m=k.apply(this,arguments),C=this.graph;return m.concat([this.addEntry("tree container",function(){var p=new mxCell("Tree Container", +new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var F=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');F.vertex=!0;var K=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');K.vertex= +!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");P.geometry.relative=!0;P.edge=!0;F.insertEdge(P,!0);K.insertEdge(P,!1);p.insert(P);p.insert(F);p.insert(K);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var p=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;"); +p.vertex=!0;var F=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');F.vertex=!0;var K=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); +K.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");P.geometry.relative=!0;P.edge=!0;F.insertEdge(P,!0);K.insertEdge(P,!1);var d=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); +d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");f.geometry.relative=!0;f.edge=!0;F.insertEdge(f,!0);d.insertEdge(f,!1);var g=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); +g.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");x.geometry.relative=!0;x.edge=!0;F.insertEdge(x,!0);g.insertEdge(x,!1);var y=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); +y.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");u.geometry.relative=!0;u.edge=!0;F.insertEdge(u,!0);y.insertEdge(u,!1);p.insert(P);p.insert(f);p.insert(x);p.insert(u);p.insert(F);p.insert(K);p.insert(d);p.insert(g);p.insert(y);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var p=new mxCell("Central Idea", +new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');p.vertex=!0;return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var p=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); +p.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");F.geometry.setTerminalPoint(new mxPoint(-40,40),!0);F.geometry.relative=!0;F.edge=!0;p.insertEdge(F,!1);return sb.createVertexTemplateFromCells([p,F],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var p=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); +p.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");F.geometry.setTerminalPoint(new mxPoint(-40,40),!0);F.geometry.relative=!0;F.edge=!0;p.insertEdge(F,!1);return sb.createVertexTemplateFromCells([p,F],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree orgchart organization division",function(){var p=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};'); +p.vertex=!0;var F=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.setAttributeForCell(F,"treeRoot","1");F.vertex=!0;var K=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};'); +K.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");P.geometry.relative=!0;P.edge=!0;F.insertEdge(P,!0);K.insertEdge(P,!1);var d=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;"); +f.geometry.relative=!0;f.edge=!0;F.insertEdge(f,!0);d.insertEdge(f,!1);p.insert(P);p.insert(f);p.insert(F);p.insert(K);p.insert(d);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree root",function(){var p=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.setAttributeForCell(p,"treeRoot", +"1");p.vertex=!0;return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree division",function(){var p=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');p.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;"); +F.geometry.setTerminalPoint(new mxPoint(0,0),!0);F.geometry.relative=!0;F.edge=!0;p.insertEdge(F,!1);return sb.createVertexTemplateFromCells([p,F],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree sub sections",function(){var p=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");p.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;"); +F.geometry.setTerminalPoint(new mxPoint(110,-40),!0);F.geometry.relative=!0;F.edge=!0;p.insertEdge(F,!1);var K=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");K.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");P.geometry.setTerminalPoint(new mxPoint(110,-40),!0);P.geometry.relative= +!0;P.edge=!0;K.insertEdge(P,!1);return sb.createVertexTemplateFromCells([F,P,p,K],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows; +EditorUi.initMinimalTheme=function(){function b(D,G){if(EditorUi.windowed){var W=D.editor.graph;W.popupMenuHandler.hideMenu();if(null==D.formatWindow){G="1"==urlParams.sketch?Math.max(10,D.diagramContainer.clientWidth-241):Math.max(10,D.diagramContainer.clientWidth-248);var T="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;W="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,W.container.clientHeight-10);D.formatWindow=new WrapperWindow(D,mxResources.get("format"),G,T,240,W, +function(Z){D.createFormat(Z).init()});D.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){D.formatWindow.window.fit()}));D.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else D.formatWindow.window.setVisible(null!=G?G:!D.formatWindow.window.isVisible())}else null==D.formatElt&&(D.formatElt=D.createSidebarContainer(),D.createFormat(D.formatElt).init(),D.formatElt.style.border="none",D.formatElt.style.width="240px",D.formatElt.style.borderLeft="1px solid gray", +D.formatElt.style.right="0px"),W=D.diagramContainer.parentNode,null!=D.formatElt.parentNode?(D.formatElt.parentNode.removeChild(D.formatElt),W.style.right="0px"):(W.parentNode.appendChild(D.formatElt),W.style.right=D.formatElt.style.width)}function e(D,G){function W(qa,oa){var S=D.menus.get(qa);qa=N.addMenu(oa,mxUtils.bind(this,function(){S.funct.apply(this,arguments)}));qa.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;"; +qa.className="geTitle";G.appendChild(qa);return qa}var T=document.createElement("div");T.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";T.className="geTitle";var Z=document.createElement("span");Z.style.fontSize="18px";Z.style.marginRight="5px";Z.innerHTML="+";T.appendChild(Z);mxUtils.write(T,mxResources.get("moreShapes"));G.appendChild(T);mxEvent.addListener(T,"click",function(){D.actions.get("shapes").funct()}); +var N=new Menubar(D,G);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?T.style.bottom="0":null!=D.actions.get("newLibrary")?(T=document.createElement("div"),T.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",T.className="geTitle",Z=document.createElement("span"),Z.style.cssText="position:relative;top:6px;",mxUtils.write(Z,mxResources.get("newLibrary")),T.appendChild(Z), +G.appendChild(T),mxEvent.addListener(T,"click",D.actions.get("newLibrary").funct),T=document.createElement("div"),T.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",T.className="geTitle",Z=document.createElement("span"),Z.style.cssText="position:relative;top:6px;",mxUtils.write(Z,mxResources.get("openLibrary")),T.appendChild(Z),G.appendChild(T),mxEvent.addListener(T, +"click",D.actions.get("openLibrary").funct)):(T=W("newLibrary",mxResources.get("newLibrary")),T.style.boxSizing="border-box",T.style.paddingRight="6px",T.style.paddingLeft="6px",T.style.height="32px",T.style.left="0",T=W("openLibraryFrom",mxResources.get("openLibraryFrom")),T.style.borderLeft="1px solid lightgray",T.style.boxSizing="border-box",T.style.paddingRight="6px",T.style.paddingLeft="6px",T.style.height="32px",T.style.left="50%");G.appendChild(D.sidebar.container);G.style.overflow="hidden"} +function k(D,G){if(EditorUi.windowed){var W=D.editor.graph;W.popupMenuHandler.hideMenu();if(null==D.sidebarWindow){G=Math.min(W.container.clientWidth-10,218);var T="1"==urlParams.embedInline?650:Math.min(W.container.clientHeight-40,650);D.sidebarWindow=new WrapperWindow(D,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(W.container.clientHeight-T)/2):56,G-6,T-6,function(Z){e(D,Z)});D.sidebarWindow.window.addListener(mxEvent.SHOW, +mxUtils.bind(this,function(){D.sidebarWindow.window.fit()}));D.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);D.sidebarWindow.window.setVisible(!0);isLocalStorage&&D.getLocalData("sidebar",function(Z){D.sidebar.showEntries(Z,null,!0)});D.restoreLibraries()}else D.sidebarWindow.window.setVisible(null!=G?G:!D.sidebarWindow.window.isVisible())}else null==D.sidebarElt&&(D.sidebarElt=D.createSidebarContainer(),e(D,D.sidebarElt),D.sidebarElt.style.border="none",D.sidebarElt.style.width="210px", +D.sidebarElt.style.borderRight="1px solid gray"),W=D.diagramContainer.parentNode,null!=D.sidebarElt.parentNode?(D.sidebarElt.parentNode.removeChild(D.sidebarElt),W.style.left="0px"):(W.parentNode.appendChild(D.sidebarElt),W.style.left=D.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var m=0;try{m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(D){}Editor.checkmarkImage= Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src; mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR= "#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor= "#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight="1"==urlParams.sketch?1:46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert="1"!=urlParams.sketch&&!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.styleElt=document.createElement("style");Editor.styleElt.type="text/css";Editor.styleElt.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(Editor.styleElt); Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var C=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");C.apply(this,arguments)};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);this.menus.get("save").setEnabled(null!= -this.getCurrentFile()||"1"==urlParams.embed)};var E=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(D,G){null!=G.shortcut&&900>m&&!mxClient.IS_IOS?D.firstChild.nextSibling.setAttribute("title",G.shortcut):E.apply(this,arguments)};var K=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){K.apply(this,arguments);if(null!=this.userElement){var D=this.userElement;D.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+D.style.display;D.className= -"geToolbarButton";D.innerText="";D.style.backgroundImage="url("+Editor.userImage+")";D.style.backgroundPosition="center center";D.style.backgroundRepeat="no-repeat";D.style.backgroundSize="24px 24px";D.style.height="24px";D.style.width="24px";D.style.cssFloat="right";D.setAttribute("title",mxResources.get("changeUser"));if("none"!=D.style.display){D.style.display="inline-block";var G=this.getCurrentFile();if(null!=G&&G.isRealtimeEnabled()&&G.isRealtimeSupported()){var V=document.createElement("img"); -V.setAttribute("border","0");V.style.position="absolute";V.style.left="18px";V.style.top="2px";V.style.width="12px";V.style.height="12px";var U=G.getRealtimeError();G=G.getRealtimeState();var Y=mxResources.get("realtimeCollaboration");1==G?(V.src=Editor.syncImage,Y+=" ("+mxResources.get("online")+")"):(V.src=Editor.syncProblemImage,Y=null!=U&&null!=U.message?Y+(" ("+U.message+")"):Y+(" ("+mxResources.get("disconnected")+")"));V.setAttribute("title",Y);D.style.paddingRight="4px";D.appendChild(V)}}}}; -var Q=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){Q.apply(this,arguments);if(null!=this.shareButton){var D=this.shareButton;D.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";D.className="geToolbarButton";D.innerText="";D.style.backgroundImage="url("+Editor.shareImage+")";D.style.backgroundPosition="center center";D.style.backgroundRepeat="no-repeat";D.style.backgroundSize="24px 24px";D.style.height= -"24px";D.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop="-2px",this.buttonContainer.style.paddingTop="4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var D=document.createElement("div");D.style.display="inline-block";D.style.position="relative";D.style.marginTop="6px";D.style.marginRight="4px";var G=document.createElement("a");G.className= -"geMenuItem gePrimaryBtn";G.style.marginLeft="8px";G.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var V="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(G,V);G.setAttribute("title",V);mxEvent.addListener(G,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));D.appendChild(G)}}else mxUtils.write(G,mxResources.get("save")),G.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+ -"+S)"),mxEvent.addListener(G,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),D.appendChild(G),"1"==urlParams.saveAndExit&&(G=document.createElement("a"),mxUtils.write(G,mxResources.get("saveAndExit")),G.setAttribute("title",mxResources.get("saveAndExit")),G.className="geMenuItem",G.style.marginLeft="6px",G.style.padding="6px",mxEvent.addListener(G,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),D.appendChild(G));"1"!=urlParams.noExitBtn&&(G= -document.createElement("a"),V="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(G,V),G.setAttribute("title",V),G.className="geMenuItem",G.style.marginLeft="6px",G.style.padding="6px",mxEvent.addListener(G,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),D.appendChild(G));this.buttonContainer.appendChild(D);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var d=Sidebar.prototype.getTooltipOffset; -Sidebar.prototype.getTooltipOffset=function(D,G){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,D)){var V=mxUtils.getOffset(this.editorUi.picker);V.x+=this.editorUi.picker.offsetWidth+4;V.y+=D.offsetTop-G.height/2+16;return V}var U=d.apply(this,arguments);V=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);U.x+=V.x-16;U.y+=V.y;return U};var f=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(D,G,V){var U=this.editorUi.editor.graph; -D.smartSeparators=!0;f.apply(this,arguments);"1"==urlParams.sketch?U.isEnabled()&&(D.addSeparator(),1==U.getSelectionCount()&&this.addMenuItems(D,["-","lockUnlock"],null,V)):1==U.getSelectionCount()?(U.isCellFoldable(U.getSelectionCell())&&this.addMenuItems(D,U.isCellCollapsed(G)?["expand"]:["collapse"],null,V),this.addMenuItems(D,["collapsible","-","lockUnlock","enterGroup"],null,V),D.addSeparator(),this.addSubmenu("layout",D)):U.isSelectionEmpty()&&U.isEnabled()?(D.addSeparator(),this.addMenuItems(D, -["editData"],null,V),D.addSeparator(),this.addSubmenu("layout",D),this.addSubmenu("insert",D),this.addMenuItems(D,["-","exitGroup"],null,V)):U.isEnabled()&&this.addMenuItems(D,["-","lockUnlock"],null,V)};var g=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(D,G,V){g.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(D,["copyAsImage"],null,V)};EditorUi.prototype.toggleFormatPanel=function(D){null!=this.formatWindow?this.formatWindow.window.setVisible(null!= -D?D:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var x=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1), -this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow= -null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.window.setVisible(!1),this.menus.findReplaceWindow.window.destroy(),this.menus.findReplaceWindow=null);x.apply(this,arguments)};var z=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(D){z.apply(this,arguments);if(D){var G=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=G&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0); -null!=this.formatWindow&&(1E3<=G||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var u=Menus.prototype.init;Menus.prototype.init=function(){u.apply(this,arguments);var D=this.editorUi,G=D.editor.graph,V=D.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(da){D.setPagesVisible(!Editor.pagesVisible)})); -V.setToggleAction(!0);V.setSelectedCallback(function(){return Editor.pagesVisible});D.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){G.popupMenuHandler.hideMenu();D.showImportCsvDialog()}));D.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var da=new ParseDialog(D,"Insert from Text");D.showDialog(da.container,620,420,!0,!1);da.init()}));D.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var da=new ParseDialog(D, -"Insert from Text","formatSql");D.showDialog(da.container,620,420,!0,!1);da.init()}));D.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){k(D)},null,null,Editor.ctrlKey+"+Shift+K"));V=D.actions.put("toggleFormat",new Action(mxResources.get("format"),function(){b(D)}));V.shortcut=D.actions.get("formatPanel").shortcut;V.setToggleAction(!0);V.setSelectedCallback(mxUtils.bind(this,function(){return null!=D.formatWindow&&D.formatWindow.window.isVisible()})); -EditorUi.enablePlantUml&&!D.isOffline()&&D.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var da=new ParseDialog(D,mxResources.get("plantUml")+"...","plantUml");D.showDialog(da.container,620,420,!0,!1);da.init()}));D.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var da=new ParseDialog(D,mxResources.get("mermaid")+"...","mermaid");D.showDialog(da.container,620,420,!0,!1);da.init()}));var U=this.addPopupMenuCellEditItems;this.put("editCell", -new Menu(mxUtils.bind(this,function(da,ia){var L=this.editorUi.editor.graph,Z=L.getSelectionCell();U.call(this,da,Z,null,ia);this.addMenuItems(da,["editTooltip"],ia);L.model.isVertex(Z)&&this.addMenuItems(da,["editGeometry"],ia);this.addMenuItems(da,["-","edit"],ia)})));this.addPopupMenuCellEditItems=function(da,ia,L,Z){da.addSeparator();this.addSubmenu("editCell",da,Z,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,function(da,ia){var L=D.getCurrentFile();D.menus.addMenuItems(da, -["new"],ia);D.menus.addSubmenu("openFrom",da,ia);isLocalStorage&&this.addSubmenu("openRecent",da,ia);da.addSeparator(ia);D.menus.addMenuItems(da,["-","save"],ia);null!=L&&L.constructor==DriveFile||D.menus.addMenuItems(da,["saveAs"],ia);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||L.constructor==LocalFile&&null==L.fileHandle||D.menus.addMenuItems(da,["synchronize"],ia);null!=L&&L.constructor==DriveFile?D.menus.addMenuItems(da,"- rename makeCopy - moveToFolder openFolder".split(" "),ia):(D.menus.addMenuItems(da, -["-","rename"],ia),D.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(da,["upload"],ia):D.menus.addMenuItems(da,["makeCopy"],ia));null!=L&&L.isRevisionHistorySupported()&&D.menus.addMenuItems(da,["-","revisionHistory"],ia);if(null!=L){if(null!=D.fileNode&&"1"!=urlParams.embedInline){var Z=null!=L.getTitle()?L.getTitle():D.defaultFilename;(L.constructor==DriveFile&&null!=L.sync&&L.sync.isConnected()||!/(\.html)$/i.test(Z)&&!/(\.svg)$/i.test(Z))&&this.addMenuItems(da, -["properties"],ia)}L.constructor==DriveFile&&D.menus.addMenuItems(da,["share"],ia)}D.menus.addMenuItems(da,["-","autosave"],ia)})));this.put("diagram",new Menu(mxUtils.bind(this,function(da,ia){var L=D.getCurrentFile();D.menus.addSubmenu("extras",da,ia,mxResources.get("preferences"));da.addSeparator(ia);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)D.menus.addMenuItems(da,"new open - synchronize - save saveAs -".split(" "),ia);else if("1"==urlParams.embed||D.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&& -"1"!=urlParams.embedInline&&D.menus.addMenuItems(da,["-","save"],ia);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||D.mode==App.MODE_ATLAS)D.menus.addMenuItems(da,["saveAndExit"],ia),null!=L&&L.isRevisionHistorySupported()&&D.menus.addMenuItems(da,["revisionHistory"],ia);da.addSeparator(ia)}else D.mode==App.MODE_ATLAS?D.menus.addMenuItems(da,["save","synchronize","-"],ia):"1"!=urlParams.noFileMenu&&("1"!=urlParams.sketch?(D.menus.addMenuItems(da,["new"],ia),D.menus.addSubmenu("openFrom", -da,ia),isLocalStorage&&this.addSubmenu("openRecent",da,ia),da.addSeparator(ia),null!=L&&(L.constructor==DriveFile&&D.menus.addMenuItems(da,["share"],ia),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||L.constructor==LocalFile||D.menus.addMenuItems(da,["synchronize"],ia)),da.addSeparator(ia),D.menus.addSubmenu("save",da,ia)):D.menus.addSubmenu("file",da,ia));D.menus.addSubmenu("exportAs",da,ia);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?D.menus.addMenuItems(da,["import"],ia):"1"!=urlParams.noFileMenu&& -D.menus.addSubmenu("importFrom",da,ia);D.menus.addMenuItems(da,["-","findReplace"],ia);D.commentsSupported()&&D.menus.addMenuItems(da,["comments","-"],ia);D.menus.addMenuItems(da,["toggleFormat","layers","tags","-","pageSetup"],ia);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||D.menus.addMenuItems(da,["print"],ia);"1"!=urlParams.sketch&&null!=L&&null!=D.fileNode&&"1"!=urlParams.embedInline&&(L=null!=L.getTitle()?L.getTitle():D.defaultFilename,/(\.html)$/i.test(L)||/(\.svg)$/i.test(L)|| -this.addMenuItems(da,["-","properties"]));da.addSeparator(ia);D.menus.addSubmenu("help",da,ia);"1"==urlParams.embed||D.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||D.mode==App.MODE_ATLAS)&&D.menus.addMenuItems(da,["-","exit"],ia):"1"!=urlParams.noFileMenu&&D.menus.addMenuItems(da,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(da,ia){var L=D.getCurrentFile();null!=L&&L.constructor==DriveFile?D.menus.addMenuItems(da,["save","makeCopy","-","rename","moveToFolder"],ia):(D.menus.addMenuItems(da, -["save","saveAs","-","rename"],ia),D.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(da,["upload"],ia):D.menus.addMenuItems(da,["makeCopy"],ia));D.menus.addMenuItems(da,["-","autosave"],ia);null!=L&&L.isRevisionHistorySupported()&&D.menus.addMenuItems(da,["-","revisionHistory"],ia)})));var Y=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(da,ia){Y.funct(da,ia);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||D.menus.addMenuItems(da, -["publishLink"],ia);D.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(da.addSeparator(ia),D.menus.addSubmenu("embed",da,ia))})));var O=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(da,ia){D.menus.addInsertTableCellItem(da,ia)})));var qa=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(da,ia){qa.funct(da,ia);this.addMenuItems(da,["-","ruler","-","pageScale"],ia)})));this.put("extras",new Menu(mxUtils.bind(this,function(da,ia){null!=O&&D.menus.addSubmenu("language", -da,ia);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&D.mode!=App.MODE_ATLAS&&D.menus.addSubmenu("theme",da,ia);D.menus.addSubmenu("units",da,ia);da.addSeparator(ia);"1"!=urlParams.sketch&&D.menus.addMenuItems(da,["scrollbars","-","tooltips","copyConnect","collapseExpand"],ia);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&D.mode!=App.MODE_ATLAS&&D.menus.addMenuItems(da,["-","showStartScreen","search","scratchpad"],ia);da.addSeparator(ia); -"1"==urlParams.sketch&&D.menus.addMenuItems(da,["copyConnect","collapseExpand","tooltips","-"],ia);EditorUi.isElectronApp&&D.menus.addMenuItems(da,["-","spellCheck","autoBkp","drafts","-"],ia);var L=D.getCurrentFile();null!=L&&L.isRealtimeEnabled()&&L.isRealtimeSupported()&&this.addMenuItems(da,["-","showRemoteCursors","shareCursor","-"],ia);Graph.translateDiagram&&D.menus.addMenuItems(da,["diagramLanguage"],ia);D.mode!=App.MODE_ATLAS&&D.menus.addMenuItem(da,"configuration",ia);"1"!=urlParams.sketch&& -!D.isOfflineApp()&&isLocalStorage&&D.mode!=App.MODE_ATLAS&&D.menus.addMenuItem(da,"plugins",ia);da.addSeparator(ia)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(da,ia){D.menus.addMenuItems(da,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),ia)})));mxUtils.bind(this,function(){var da=this.get("insert"),ia=da.funct;da.funct=function(L,Z){"1"==urlParams.sketch?(D.menus.addMenuItems(L,["toggleShapes"],Z),D.menus.addSubmenu("table",L,Z),L.addSeparator(Z), -D.insertTemplateEnabled&&!D.isOffline()&&D.menus.addMenuItems(L,["insertTemplate"],Z),D.menus.addMenuItems(L,["insertImage","insertLink","-"],Z),D.menus.addSubmenu("insertAdvanced",L,Z,mxResources.get("advanced")),D.menus.addSubmenu("layout",L,Z)):(ia.apply(this,arguments),D.menus.addSubmenu("table",L,Z))}})();var oa="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),aa=function(da,ia,L,Z){da.addItem(L,null,mxUtils.bind(this,function(){var P=new CreateGraphDialog(D, -L,Z);D.showDialog(P.container,620,420,!0,!1);P.init()}),ia)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(da,ia){for(var L=0;L<oa.length;L++)"-"==oa[L]?da.addSeparator(ia):aa(da,ia,mxResources.get(oa[L])+"...",oa[L])})))};EditorUi.prototype.installFormatToolbar=function(D){var G=this.editor.graph,V=document.createElement("div");V.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;"; -G.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(U,Y){0<G.getSelectionCount()?(D.appendChild(V),V.innerHTML="Selected: "+G.getSelectionCount()):null!=V.parentNode&&V.parentNode.removeChild(V)}))};var H=!1;EditorUi.prototype.initFormatWindow=function(){if(!H&&null!=this.formatWindow){H=!0;var D=this.formatWindow.window.toggleMinimized,G=240;this.formatWindow.window.toggleMinimized=function(){D.apply(this,arguments);this.minimized?(G=parseInt(this.div.style.width),this.div.style.width= -"140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+G-140+"px"):(this.div.style.width=G+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-G+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(V){mxEvent.getSource(V)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var J=EditorUi.prototype.init;EditorUi.prototype.init= -function(){function D(wa,ua,La){var Oa=O.menus.get(wa),Ca=da.addMenu(mxResources.get(wa),mxUtils.bind(this,function(){Oa.funct.apply(this,arguments)}),aa);Ca.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ca.style.display="inline-block";Ca.style.boxSizing="border-box";Ca.style.top="6px";Ca.style.marginRight="6px";Ca.style.height="30px";Ca.style.paddingTop="6px";Ca.style.paddingBottom="6px";Ca.style.cursor="pointer";Ca.setAttribute("title",mxResources.get(wa));O.menus.menuCreated(Oa, -Ca,"geMenuItem");null!=La?(Ca.style.backgroundImage="url("+La+")",Ca.style.backgroundPosition="center center",Ca.style.backgroundRepeat="no-repeat",Ca.style.backgroundSize="24px 24px",Ca.style.width="34px",Ca.innerText=""):ua||(Ca.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Ca.style.backgroundPosition="right 6px center",Ca.style.backgroundRepeat="no-repeat",Ca.style.paddingRight="22px");return Ca}function G(wa,ua,La,Oa,Ca,Ma){var Ga=document.createElement("a");Ga.className= -"1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ga.style.display="inline-block";Ga.style.boxSizing="border-box";Ga.style.height="30px";Ga.style.padding="6px";Ga.style.position="relative";Ga.style.verticalAlign="top";Ga.style.top="0px";"1"==urlParams.sketch&&(Ga.style.borderStyle="none",Ga.style.boxShadow="none",Ga.style.padding="6px",Ga.style.margin="0px");null!=O.statusContainer?oa.insertBefore(Ga,O.statusContainer):oa.appendChild(Ga);null!=Ma?(Ga.style.backgroundImage="url("+Ma+")",Ga.style.backgroundPosition= -"center center",Ga.style.backgroundRepeat="no-repeat",Ga.style.backgroundSize="24px 24px",Ga.style.width="34px"):mxUtils.write(Ga,wa);mxEvent.addListener(Ga,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Ya){Ya.preventDefault()}));mxEvent.addListener(Ga,"click",function(Ya){"disabled"!=Ga.getAttribute("disabled")&&ua(Ya);mxEvent.consume(Ya)});null==La&&(Ga.style.marginRight="4px");null!=Oa&&Ga.setAttribute("title",Oa);null!=Ca&&(wa=function(){Ca.isEnabled()?(Ga.removeAttribute("disabled"), -Ga.style.cursor="pointer"):(Ga.setAttribute("disabled","disabled"),Ga.style.cursor="default")},Ca.addListener("stateChanged",wa),qa.addListener("enabledChanged",wa),wa());return Ga}function V(wa,ua,La){La=document.createElement("div");La.className="geMenuItem";La.style.display="inline-block";La.style.verticalAlign="top";La.style.marginRight="6px";La.style.padding="0 4px 0 4px";La.style.height="30px";La.style.position="relative";La.style.top="0px";"1"==urlParams.sketch&&(La.style.boxShadow="none"); -for(var Oa=0;Oa<wa.length;Oa++)null!=wa[Oa]&&("1"==urlParams.sketch&&(wa[Oa].style.padding="10px 8px",wa[Oa].style.width="30px"),wa[Oa].style.margin="0px",wa[Oa].style.boxShadow="none",La.appendChild(wa[Oa]));null!=ua&&mxUtils.setOpacity(La,ua);null!=O.statusContainer&&"1"!=urlParams.sketch?oa.insertBefore(La,O.statusContainer):oa.appendChild(La);return La}function U(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(F.style.left=58>q.offsetTop-q.offsetHeight/2?"70px":"10px");else{for(var wa= -oa.firstChild;null!=wa;){var ua=wa.nextSibling;"geMenuItem"!=wa.className&&"geItem"!=wa.className||wa.parentNode.removeChild(wa);wa=ua}aa=oa.firstChild;m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;wa=1E3>m||"1"==urlParams.sketch;var La=null;wa||(La=D("diagram"));ua=wa?D("diagram",null,Editor.menuImage):null;null!=ua&&(La=ua);V([La,G(mxResources.get("shapes"),O.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),O.actions.get("image"),wa?Editor.shapesImage: -null),G(mxResources.get("format"),O.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+O.actions.get("formatPanel").shortcut+")",O.actions.get("image"),wa?Editor.formatImage:null)],wa?60:null);ua=D("insert",!0,wa?ja:null);V([ua,G(mxResources.get("delete"),O.actions.get("delete").funct,null,mxResources.get("delete"),O.actions.get("delete"),wa?Editor.trashImage:null)],wa?60:null);411<=m&&(V([Qa,Ta],60),520<=m&&V([X,640<=m?G("",Aa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+ -" +)",Aa,Editor.zoomInImage):null,640<=m?G("",Ka.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Ka,Editor.zoomOutImage):null],60))}null!=La&&(mxEvent.disableContextMenu(La),mxEvent.addGestureListeners(La,mxUtils.bind(this,function(Oa){(mxEvent.isShiftDown(Oa)||mxEvent.isAltDown(Oa)||mxEvent.isMetaDown(Oa)||mxEvent.isControlDown(Oa)||mxEvent.isPopupTrigger(Oa))&&O.appIconClicked(Oa)}),null,null));ua=O.menus.get("language");null!=ua&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<= -m&&"1"!=urlParams.sketch?(null==la&&(ua=da.addMenu("",ua.funct),ua.setAttribute("title",mxResources.get("language")),ua.className="geToolbarButton",ua.style.backgroundImage="url("+Editor.globeImage+")",ua.style.backgroundPosition="center center",ua.style.backgroundRepeat="no-repeat",ua.style.backgroundSize="24px 24px",ua.style.position="absolute",ua.style.height="24px",ua.style.width="24px",ua.style.zIndex="1",ua.style.right="8px",ua.style.cursor="pointer",ua.style.top="1"==urlParams.embed?"12px": -"11px",oa.appendChild(ua),la=ua),O.buttonContainer.style.paddingRight="34px"):(O.buttonContainer.style.paddingRight="4px",null!=la&&(la.parentNode.removeChild(la),la=null))}J.apply(this,arguments);var Y=document.createElement("div");Y.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";Y.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(Y);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&& -(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=m||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search")); -var O=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==O.embedViewport)mxUtils.fit(this.div);else{var wa=parseInt(this.div.offsetLeft),ua=parseInt(this.div.offsetWidth),La=O.embedViewport.x+O.embedViewport.width,Oa=parseInt(this.div.offsetTop),Ca=parseInt(this.div.offsetHeight),Ma=O.embedViewport.y+O.embedViewport.height;this.div.style.left=Math.max(O.embedViewport.x,Math.min(wa,La-ua))+"px";this.div.style.top=Math.max(O.embedViewport.y,Math.min(Oa,Ma-Ca))+"px";this.div.style.height= -Math.min(O.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(O.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=m)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),Y=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>m||708>Y)?this.formatWindow.window.toggleMinimized(): -this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));O=this;var qa=O.editor.graph;O.toolbar=this.createToolbar(O.createDiv("geToolbar"));O.defaultLibraryName=mxResources.get("untitledLibrary");var oa=document.createElement("div");oa.className="geMenubarContainer";var aa=null,da=new Menubar(O,oa);O.statusContainer=O.createStatusContainer();O.statusContainer.style.position="relative";O.statusContainer.style.maxWidth="";O.statusContainer.style.marginTop="7px";O.statusContainer.style.marginLeft= -"6px";O.statusContainer.style.color="gray";O.statusContainer.style.cursor="default";var ia=O.hideCurrentMenu;O.hideCurrentMenu=function(){ia.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var L=O.descriptorChanged;O.descriptorChanged=function(){L.apply(this,arguments);var wa=O.getCurrentFile();if(null!=wa&&null!=wa.getTitle()){var ua=wa.getMode();"google"==ua?ua="googleDrive":"github"==ua?ua="gitHub":"gitlab"==ua?ua="gitLab":"onedrive"==ua&&(ua="oneDrive");ua=mxResources.get(ua); -oa.setAttribute("title",wa.getTitle()+(null!=ua?" ("+ua+")":""))}else oa.removeAttribute("title")};O.setStatusText(O.editor.getStatus());oa.appendChild(O.statusContainer);O.buttonContainer=document.createElement("div");O.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";oa.appendChild(O.buttonContainer);O.menubarContainer=O.buttonContainer;O.tabContainer=document.createElement("div");O.tabContainer.className= -"geTabContainer";O.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";Y=O.diagramContainer.parentNode;var Z=document.createElement("div");Z.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";O.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){Z.style.top="20px";O.titlebar=document.createElement("div");O.titlebar.style.cssText= -"position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var P=document.createElement("div");P.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";O.titlebar.appendChild(P);Y.appendChild(O.titlebar)}P=O.menus.get("viewZoom");var ca=P.funct;P.funct=function(wa,ua){ca.apply(this,arguments);O.menus.addMenuItems(wa,["-","outline","fullscreen"], -ua)};var ja="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,ka="1"==urlParams.sketch?document.createElement("div"):null,q="1"==urlParams.sketch?document.createElement("div"):null,F="1"==urlParams.sketch?document.createElement("div"):null,R=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)F.style.left="10px",F.style.top="10px",q.style.left="10px",q.style.top="60px",ka.style.top="10px",ka.style.right="12px",ka.style.left="",O.diagramContainer.setAttribute("data-bounds",O.diagramContainer.style.top+ -" "+O.diagramContainer.style.left+" "+O.diagramContainer.style.width+" "+O.diagramContainer.style.height),O.diagramContainer.style.top="0px",O.diagramContainer.style.left="0px",O.diagramContainer.style.bottom="0px",O.diagramContainer.style.right="0px",O.diagramContainer.style.width="",O.diagramContainer.style.height="";else{var wa=O.diagramContainer.getAttribute("data-bounds");if(null!=wa){O.diagramContainer.style.background="transparent";O.diagramContainer.removeAttribute("data-bounds");var ua=qa.getGraphBounds(); -wa=wa.split(" ");O.diagramContainer.style.top=wa[0];O.diagramContainer.style.left=wa[1];O.diagramContainer.style.width=ua.width+50+"px";O.diagramContainer.style.height=ua.height+46+"px";O.diagramContainer.style.bottom="";O.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:O.diagramContainer.getBoundingClientRect()}),"*");O.refresh()}F.style.left=O.diagramContainer.offsetLeft+"px";F.style.top=O.diagramContainer.offsetTop-F.offsetHeight-4+ -"px";q.style.display="";q.style.left=O.diagramContainer.offsetLeft-q.offsetWidth-4+"px";q.style.top=O.diagramContainer.offsetTop+"px";ka.style.left=O.diagramContainer.offsetLeft+O.diagramContainer.offsetWidth-ka.offsetWidth+"px";ka.style.top=F.style.top;ka.style.right="";O.bottomResizer.style.left=O.diagramContainer.offsetLeft+(O.diagramContainer.offsetWidth-O.bottomResizer.offsetWidth)/2+"px";O.bottomResizer.style.top=O.diagramContainer.offsetTop+O.diagramContainer.offsetHeight-O.bottomResizer.offsetHeight/ -2-1+"px";O.rightResizer.style.left=O.diagramContainer.offsetLeft+O.diagramContainer.offsetWidth-O.rightResizer.offsetWidth/2-1+"px";O.rightResizer.style.top=O.diagramContainer.offsetTop+(O.diagramContainer.offsetHeight-O.bottomResizer.offsetHeight)/2+"px"}O.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";O.rightResizer.style.visibility=O.bottomResizer.style.visibility;oa.style.display="none";F.style.visibility="";ka.style.visibility=""}),W=O.actions.get("fullscreen"),T=G("",W.funct, -null,mxResources.get(""),W,Editor.fullscreenImage),ba=mxUtils.bind(this,function(){T.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";R()});W=mxUtils.bind(this,function(){b(O,!0);O.initFormatWindow();var wa=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(wa.x+wa.width+4,wa.y);ba()}); -O.addListener("inlineFullscreenChanged",ba);O.addListener("editInlineStart",W);"1"==urlParams.embedInline&&O.addListener("darkModeChanged",W);O.addListener("editInlineStop",mxUtils.bind(this,function(wa){O.diagramContainer.style.width="10px";O.diagramContainer.style.height="10px";O.diagramContainer.style.border="";O.bottomResizer.style.visibility="hidden";O.rightResizer.style.visibility="hidden";F.style.visibility="hidden";ka.style.visibility="hidden";q.style.display="none"}));if(null!=O.hoverIcons){var ha= -O.hoverIcons.update;O.hoverIcons.update=function(){qa.freehand.isDrawing()||ha.apply(this,arguments)}}if(null!=qa.freehand){var ra=qa.freehand.createStyle;qa.freehand.createStyle=function(wa){return ra.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){q.className="geToolbarContainer";ka.className="geToolbarContainer";F.className="geToolbarContainer";oa.className="geToolbarContainer";O.picker=q;var ta=!1;"1"!=urlParams.embed&&"atlassian"!=O.getServiceName()&&(mxEvent.addListener(oa,"mouseenter", -function(){O.statusContainer.style.display="inline-block"}),mxEvent.addListener(oa,"mouseleave",function(){ta||(O.statusContainer.style.display="none")}));var ma=mxUtils.bind(this,function(wa){null!=O.notificationBtn&&(null!=wa?O.notificationBtn.setAttribute("title",wa):O.notificationBtn.removeAttribute("title"))});oa.style.visibility=20>oa.clientWidth?"hidden":"";O.editor.addListener("statusChanged",mxUtils.bind(this,function(){O.setStatusText(O.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!= -O.getServiceName())if(O.statusContainer.style.display="inline-block",ta=!0,1==O.statusContainer.children.length&&""==O.editor.getStatus())oa.style.visibility="hidden";else{if(0==O.statusContainer.children.length||1==O.statusContainer.children.length&&"function"===typeof O.statusContainer.firstChild.getAttribute&&null==O.statusContainer.firstChild.getAttribute("class")){var wa=null!=O.statusContainer.firstChild&&"function"===typeof O.statusContainer.firstChild.getAttribute?O.statusContainer.firstChild.getAttribute("title"): -O.editor.getStatus();ma(wa);var ua=O.getCurrentFile();ua=null!=ua?ua.savingStatusKey:DrawioFile.prototype.savingStatusKey;wa==mxResources.get(ua)+"..."?(O.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(ua))+'..."src="'+Editor.tailSpin+'">',O.statusContainer.style.display="inline-block",ta=!0):6<O.buttonContainer.clientWidth&&(O.statusContainer.style.display="none",ta=!1)}else O.statusContainer.style.display="inline-block",ma(null),ta=!0;oa.style.visibility=20>oa.clientWidth&& -!ta?"hidden":""}}));S=D("diagram",null,Editor.menuImage);S.style.boxShadow="none";S.style.padding="6px";S.style.margin="0px";F.appendChild(S);mxEvent.disableContextMenu(S);mxEvent.addGestureListeners(S,mxUtils.bind(this,function(wa){(mxEvent.isShiftDown(wa)||mxEvent.isAltDown(wa)||mxEvent.isMetaDown(wa)||mxEvent.isControlDown(wa)||mxEvent.isPopupTrigger(wa))&&this.appIconClicked(wa)}),null,null);O.statusContainer.style.position="";O.statusContainer.style.display="none";O.statusContainer.style.margin= -"0px";O.statusContainer.style.padding="6px 0px";O.statusContainer.style.maxWidth=Math.min(m-240,280)+"px";O.statusContainer.style.display="inline-block";O.statusContainer.style.textOverflow="ellipsis";O.buttonContainer.style.position="";O.buttonContainer.style.paddingRight="0px";O.buttonContainer.style.display="inline-block";var pa=document.createElement("a");pa.style.padding="0px";pa.style.boxShadow="none";pa.className="geMenuItem";pa.style.display="inline-block";pa.style.width="40px";pa.style.height= -"12px";pa.style.marginBottom="-2px";pa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";pa.style.backgroundPosition="top center";pa.style.backgroundRepeat="no-repeat";pa.setAttribute("title","Minimize");var za=!1,Ba=mxUtils.bind(this,function(){q.innerText="";if(!za){var wa=function(ua,La,Oa,Ca){null!=La&&ua.setAttribute("title",La);ua.style.cursor=null!=Oa?Oa:"default";ua.style.margin="2px 0px";q.appendChild(ua);mxUtils.br(q);null!=Ca&&(ua.style.position="relative",ua.style.overflow= -"visible",La=document.createElement("div"),La.style.position="absolute",La.style.left="34px",La.style.top="28px",La.style.fontSize="8px",mxUtils.write(La,Ca),ua.appendChild(La));return ua};wa(O.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+" (A)",null,"A");wa(O.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;", -140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");wa(O.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");wa(O.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");(function(){var ua=new mxCell("",new mxGeometry(0,0,qa.defaultEdgeLength, -0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");ua.geometry.setTerminalPoint(new mxPoint(0,0),!0);ua.geometry.setTerminalPoint(new mxPoint(ua.geometry.width,0),!1);ua.geometry.points=[];ua.geometry.relative=!0;ua.edge=!0;wa(O.sidebar.createEdgeTemplateFromCells([ua],ua.geometry.width,ua.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");ua=ua.clone();ua.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;"; -ua.geometry.width=qa.defaultEdgeLength+20;ua.geometry.setTerminalPoint(new mxPoint(0,20),!0);ua.geometry.setTerminalPoint(new mxPoint(ua.geometry.width,20),!1);wa(O.sidebar.createEdgeTemplateFromCells([ua],ua.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"))})();(function(ua,La,Oa,Ca){ua=G("",ua.funct,null,La,ua,Oa);ua.style.width="40px";ua.style.height="34px";ua.style.opacity="0.7";return wa(ua,null,"pointer",Ca)})(O.actions.get("insertFreehand"),mxResources.get("freehand")+ -" (X)",Editor.freehandImage,"X");S=D("insert",null,Editor.plusImage);S.style.boxShadow="none";S.style.opacity="0.7";S.style.padding="6px";S.style.margin="0px";S.style.height="34px";S.style.width="37px";wa(S,null,"pointer")}"1"!=urlParams.embedInline&&q.appendChild(pa)});mxEvent.addListener(pa,"click",mxUtils.bind(this,function(){za?(mxUtils.setPrefixedStyle(q.style,"transform","translate(0, -50%)"),q.style.padding="8px 6px 4px",q.style.top="50%",q.style.bottom="",q.style.height="",pa.style.backgroundImage= -"url("+mxWindow.prototype.normalizeImage+")",pa.style.width="40px",pa.style.height="12px",pa.setAttribute("title","Minimize"),za=!1,Ba()):(q.innerText="",q.appendChild(pa),mxUtils.setPrefixedStyle(q.style,"transform","translate(0, 0)"),q.style.top="",q.style.bottom="12px",q.style.padding="0px",q.style.height="24px",pa.style.height="24px",pa.style.backgroundImage="url("+Editor.plusImage+")",pa.setAttribute("title",mxResources.get("insert")),pa.style.width="24px",za=!0)}));Ba();O.addListener("darkModeChanged", -Ba);O.addListener("sketchModeChanged",Ba)}else O.editor.addListener("statusChanged",mxUtils.bind(this,function(){O.setStatusText(O.editor.getStatus())}));if(null!=P){var Ia=function(wa){if(mxEvent.isAltDown(wa))O.hideCurrentMenu(),O.actions.get("customZoom").funct(),mxEvent.consume(wa);else if("geItem"!=mxEvent.getSource(wa).className||mxEvent.isShiftDown(wa))O.hideCurrentMenu(),O.actions.get("smartFit").funct(),mxEvent.consume(wa)},Aa=O.actions.get("zoomIn"),Ka=O.actions.get("zoomOut");W=O.actions.get("resetView"); -var Da=O.actions.get("undo"),Ra=O.actions.get("redo"),Qa=G("",Da.funct,null,mxResources.get("undo")+" ("+Da.shortcut+")",Da,Editor.undoImage),Ta=G("",Ra.funct,null,mxResources.get("redo")+" ("+Ra.shortcut+")",Ra,Editor.redoImage);if(null!=ka){W=function(){N.style.display=null!=O.pages&&("0"!=urlParams.pages||1<O.pages.length||Editor.pagesVisible)?"inline-block":"none"};var Za=function(){N.innerText="";if(null!=O.currentPage){mxUtils.write(N,O.currentPage.getName());var wa=null!=O.pages?O.pages.length: -1,ua=O.getPageIndex(O.currentPage);ua=null!=ua?ua+1:1;var La=O.currentPage.getId();N.setAttribute("title",O.currentPage.getName()+" ("+ua+"/"+wa+")"+(null!=La?" ["+La+"]":""))}},Pa=O.actions.get("delete"),y=G("",Pa.funct,null,mxResources.get("delete"),Pa,Editor.trashImage);y.style.opacity="0.1";F.appendChild(y);Pa.addListener("stateChanged",function(){y.style.opacity=Pa.enabled?"":"0.1"});var M=function(){Qa.style.display=0<O.editor.undoManager.history.length||qa.isEditing()?"inline-block":"none"; -Ta.style.display=Qa.style.display;Qa.style.opacity=Da.enabled?"":"0.1";Ta.style.opacity=Ra.enabled?"":"0.1"};F.appendChild(Qa);F.appendChild(Ta);Da.addListener("stateChanged",M);Ra.addListener("stateChanged",M);M();var N=this.createPageMenuTab(!1,!0);N.style.display="none";N.style.position="";N.style.marginLeft="";N.style.top="";N.style.left="";N.style.height="100%";N.style.lineHeight="";N.style.borderStyle="none";N.style.padding="3px 0";N.style.margin="0px";N.style.background="";N.style.border=""; -N.style.boxShadow="none";N.style.verticalAlign="top";N.style.width="auto";N.style.maxWidth="160px";N.style.position="relative";N.style.padding="6px";N.style.textOverflow="ellipsis";N.style.opacity="0.8";ka.appendChild(N);O.editor.addListener("pagesPatched",Za);O.editor.addListener("pageSelected",Za);O.editor.addListener("pageRenamed",Za);O.editor.addListener("fileLoaded",Za);Za();O.addListener("fileDescriptorChanged",W);O.addListener("pagesVisibleChanged",W);O.editor.addListener("pagesPatched",W); -W();W=G("",Ka.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",Ka,Editor.zoomOutImage);ka.appendChild(W);var S=da.addMenu("100%",P.funct);S.setAttribute("title",mxResources.get("zoom"));S.innerHTML="100%";S.style.display="inline-block";S.style.color="inherit";S.style.cursor="pointer";S.style.textAlign="center";S.style.whiteSpace="nowrap";S.style.paddingRight="10px";S.style.textDecoration="none";S.style.verticalAlign="top";S.style.padding="6px 0";S.style.fontSize="14px"; -S.style.width="40px";S.style.opacity="0.4";ka.appendChild(S);P=G("",Aa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Aa,Editor.zoomInImage);ka.appendChild(P);"1"==urlParams.embedInline?(ka.appendChild(T),P=O.actions.get("exit"),ka.appendChild(G("",P.funct,null,mxResources.get("exit"),P,Editor.closeImage))):T.parentNode.removeChild(T);O.tabContainer.style.visibility="hidden";oa.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;"; -F.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";ka.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";Z.appendChild(F);Z.appendChild(ka);q.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;"; -mxClient.IS_POINTER&&(q.style.touchAction="none");Z.appendChild(q);window.setTimeout(function(){mxUtils.setPrefixedStyle(q.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(Z)}else{var X=G("",Ia,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",W,Editor.zoomFitImage);oa.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";S=da.addMenu("100%", -P.funct);S.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");S.style.whiteSpace="nowrap";S.style.paddingRight="10px";S.style.textDecoration="none";S.style.textDecoration="none";S.style.overflow="hidden";S.style.visibility="hidden";S.style.textAlign="center";S.style.cursor="pointer";S.style.height=parseInt(O.tabContainerHeight)-1+"px";S.style.lineHeight=parseInt(O.tabContainerHeight)+1+"px";S.style.position="absolute";S.style.display="block";S.style.fontSize="12px";S.style.width="59px"; -S.style.right="0px";S.style.bottom="0px";S.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";S.style.backgroundPosition="right 6px center";S.style.backgroundRepeat="no-repeat";Z.appendChild(S)}(function(wa){mxEvent.addListener(wa,"click",Ia);var ua=mxUtils.bind(this,function(){wa.innerText="";mxUtils.write(wa,Math.round(100*O.editor.graph.view.scale)+"%")});O.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ua);O.editor.addListener("resetGraphView",ua);O.editor.addListener("pageSelected", -ua)})(S);var fa=O.setGraphEnabled;O.setGraphEnabled=function(){fa.apply(this,arguments);null!=this.tabContainer&&(S.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==ka?this.tabContainerHeight+"px":"0px")}}Z.appendChild(oa);Z.appendChild(O.diagramContainer);Y.appendChild(Z);O.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=m)&&"1"!=urlParams.embedInline&&b(this,!0);null==ka&&Z.appendChild(O.tabContainer); -var la=null;U();mxEvent.addListener(window,"resize",function(){U();null!=O.sidebarWindow&&O.sidebarWindow.window.fit();null!=O.formatWindow&&O.formatWindow.window.fit();null!=O.actions.outlineWindow&&O.actions.outlineWindow.window.fit();null!=O.actions.layersWindow&&O.actions.layersWindow.window.fit();null!=O.menus.tagsWindow&&O.menus.tagsWindow.window.fit();null!=O.menus.findWindow&&O.menus.findWindow.window.fit();null!=O.menus.findReplaceWindow&&O.menus.findReplaceWindow.window.fit()});if("1"== -urlParams.embedInline){document.body.style.cursor="text";q.style.transform="";mxEvent.addGestureListeners(O.diagramContainer.parentNode,function(wa){mxEvent.getSource(wa)==O.diagramContainer.parentNode&&(O.embedExitPoint=new mxPoint(mxEvent.getClientX(wa),mxEvent.getClientY(wa)),O.sendEmbeddedSvgExport())});Y=document.createElement("div");Y.style.position="absolute";Y.style.width="10px";Y.style.height="10px";Y.style.borderRadius="5px";Y.style.border="1px solid gray";Y.style.background="#ffffff";Y.style.cursor= -"row-resize";O.diagramContainer.parentNode.appendChild(Y);O.bottomResizer=Y;var xa=null,sa=null,ya=null,Fa=null;mxEvent.addGestureListeners(Y,function(wa){Fa=parseInt(O.diagramContainer.style.height);sa=mxEvent.getClientY(wa);qa.popupMenuHandler.hideMenu();mxEvent.consume(wa)});Y=Y.cloneNode(!1);Y.style.cursor="col-resize";O.diagramContainer.parentNode.appendChild(Y);O.rightResizer=Y;mxEvent.addGestureListeners(Y,function(wa){ya=parseInt(O.diagramContainer.style.width);xa=mxEvent.getClientX(wa);qa.popupMenuHandler.hideMenu(); -mxEvent.consume(wa)});mxEvent.addGestureListeners(document.body,null,function(wa){var ua=!1;null!=xa&&(O.diagramContainer.style.width=Math.max(20,ya+mxEvent.getClientX(wa)-xa)+"px",ua=!0);null!=sa&&(O.diagramContainer.style.height=Math.max(20,Fa+mxEvent.getClientY(wa)-sa)+"px",ua=!0);ua&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:O.diagramContainer.getBoundingClientRect()}),"*"),R(),O.refresh())},function(wa){null==xa&&null== -sa||mxEvent.consume(wa);sa=xa=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";O.bottomResizer.style.visibility="hidden";O.rightResizer.style.visibility="hidden";F.style.visibility="hidden";ka.style.visibility="hidden";q.style.display="none"}"1"==urlParams.prefetchFonts&&O.editor.loadFonts()}}}; -(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,e,k,m,C,p,E){this.file=b;this.id=e;this.content=k;this.modifiedDate=m;this.createdDate=C;this.isResolved=p;this.user=E;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,k,m,C){e()};DrawioComment.prototype.editComment=function(b,e,k){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,k,m,C){this.id=b;this.email=e;this.displayName=k;this.pictureUrl=m;this.locale=C};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfDraftTooBigErr=Draft size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration?\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement; +this.getCurrentFile()||"1"==urlParams.embed)};var F=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(D,G){null!=G.shortcut&&900>m&&!mxClient.IS_IOS?D.firstChild.nextSibling.setAttribute("title",G.shortcut):F.apply(this,arguments)};var K=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){K.apply(this,arguments);if(null!=this.userElement){var D=this.userElement;D.style.cssText="position:relative;cursor:pointer;display:"+D.style.display;D.className="geToolbarButton"; +D.innerText="";D.style.backgroundImage="url("+Editor.userImage+")";D.style.backgroundPosition="center center";D.style.backgroundRepeat="no-repeat";D.style.backgroundSize="24px 24px";D.style.height="24px";D.style.width="24px";var G=mxResources.get("changeUser");if("none"!=D.style.display){D.style.display="inline-block";var W=this.getCurrentFile();if(null!=W&&W.isRealtimeEnabled()&&W.isRealtimeSupported()){var T=document.createElement("img");T.setAttribute("border","0");T.style.position="absolute"; +T.style.left="18px";T.style.top="2px";T.style.width="12px";T.style.height="12px";var Z=W.getRealtimeError();W=W.getRealtimeState();G+=" ("+mxResources.get("realtimeCollaboration");1==W?(T.src=Editor.syncImage,G+=mxResources.get("online")):(T.src=Editor.syncProblemImage,G=null!=Z&&null!=Z.message?G+Z.message:G+mxResources.get("disconnected"));D.style.marginRight="6px";D.appendChild(T);G+=")"}}D.setAttribute("title",G)}};var P=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer= +function(){P.apply(this,arguments);null!=this.shareButton&&(this.shareButton.style.display="none")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var D=document.createElement("div");D.style.display="inline-block";D.style.position="relative";D.style.marginTop="6px";D.style.marginRight="4px";var G=document.createElement("a");G.className="geMenuItem gePrimaryBtn";G.style.marginLeft="8px";G.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!= +urlParams.saveAndExit){var W="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(G,W);G.setAttribute("title",W);mxEvent.addListener(G,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));D.appendChild(G)}}else mxUtils.write(G,mxResources.get("save")),G.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(G,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),D.appendChild(G), +"1"==urlParams.saveAndExit&&(G=document.createElement("a"),mxUtils.write(G,mxResources.get("saveAndExit")),G.setAttribute("title",mxResources.get("saveAndExit")),G.className="geMenuItem",G.style.marginLeft="6px",G.style.padding="6px",mxEvent.addListener(G,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),D.appendChild(G));"1"!=urlParams.noExitBtn&&(G=document.createElement("a"),W="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(G, +W),G.setAttribute("title",W),G.className="geMenuItem",G.style.marginLeft="6px",G.style.padding="6px",mxEvent.addListener(G,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),D.appendChild(G));this.buttonContainer.appendChild(D);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var d=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(D,G){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker, +D)){var W=mxUtils.getOffset(this.editorUi.picker);W.x+=this.editorUi.picker.offsetWidth+4;W.y+=D.offsetTop-G.height/2+16;return W}var T=d.apply(this,arguments);W=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);T.x+=W.x-16;T.y+=W.y;return T};var f=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(D,G,W){var T=this.editorUi.editor.graph;D.smartSeparators=!0;f.apply(this,arguments);"1"==urlParams.sketch?T.isEnabled()&&(D.addSeparator(),1==T.getSelectionCount()&&this.addMenuItems(D, +["-","lockUnlock"],null,W)):1==T.getSelectionCount()?(T.isCellFoldable(T.getSelectionCell())&&this.addMenuItems(D,T.isCellCollapsed(G)?["expand"]:["collapse"],null,W),this.addMenuItems(D,["collapsible","-","lockUnlock","enterGroup"],null,W),D.addSeparator(),this.addSubmenu("layout",D)):T.isSelectionEmpty()&&T.isEnabled()?(D.addSeparator(),this.addMenuItems(D,["editData"],null,W),D.addSeparator(),this.addSubmenu("layout",D),this.addSubmenu("insert",D),this.addMenuItems(D,["-","exitGroup"],null,W)): +T.isEnabled()&&this.addMenuItems(D,["-","lockUnlock"],null,W)};var g=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(D,G,W){g.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(D,["copyAsImage"],null,W)};EditorUi.prototype.toggleFormatPanel=function(D){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=D?D:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0}; +var x=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&& +(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null);x.apply(this,arguments)};var y=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(D){y.apply(this,arguments);if(D){var G=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=G&& +null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=G||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var u=Menus.prototype.init;Menus.prototype.init=function(){u.apply(this,arguments);var D=this.editorUi,G=D.actions.put("togglePagesVisible", +new Action(mxResources.get("pages"),function(S){D.setPagesVisible(!Editor.pagesVisible)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.pagesVisible});D.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){k(D)},null,null,Editor.ctrlKey+"+Shift+K"));G=D.actions.put("toggleFormat",new Action(mxResources.get("format"),function(){b(D)}));G.shortcut=D.actions.get("formatPanel").shortcut;G.setToggleAction(!0);G.setSelectedCallback(mxUtils.bind(this,function(){return null!= +D.formatWindow&&D.formatWindow.window.isVisible()}));EditorUi.enablePlantUml&&!D.isOffline()&&D.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var S=new ParseDialog(D,mxResources.get("plantUml")+"...","plantUml");D.showDialog(S.container,620,420,!0,!1);S.init()}));D.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var S=new ParseDialog(D,mxResources.get("mermaid")+"...","mermaid");D.showDialog(S.container,620,420,!0,!1);S.init()}));var W= +this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(S,fa){var ia=this.editorUi.editor.graph,M=ia.getSelectionCell();W.call(this,S,M,null,fa);this.addMenuItems(S,["editTooltip"],fa);ia.model.isVertex(M)&&this.addMenuItems(S,["editGeometry"],fa);this.addMenuItems(S,["-","edit"],fa)})));this.addPopupMenuCellEditItems=function(S,fa,ia,M){S.addSeparator();this.addSubmenu("editCell",S,M,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,function(S,fa){var ia= +D.getCurrentFile();D.menus.addMenuItems(S,["new"],fa);D.menus.addSubmenu("openFrom",S,fa);isLocalStorage&&this.addSubmenu("openRecent",S,fa);S.addSeparator(fa);D.menus.addMenuItems(S,["-","save"],fa);null!=ia&&ia.constructor==DriveFile||D.menus.addMenuItems(S,["saveAs"],fa);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||ia.constructor==LocalFile&&null==ia.fileHandle||D.menus.addMenuItems(S,["synchronize"],fa);null!=ia&&ia.constructor==DriveFile?D.menus.addMenuItems(S,"- rename makeCopy - moveToFolder openFolder".split(" "), +fa):(D.menus.addMenuItems(S,["-","rename"],fa),D.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(S,["upload"],fa):D.menus.addMenuItems(S,["makeCopy"],fa));null!=ia&&ia.isRevisionHistorySupported()&&D.menus.addMenuItems(S,["-","revisionHistory"],fa);if(null!=ia){if(null!=D.fileNode&&"1"!=urlParams.embedInline){var M=null!=ia.getTitle()?ia.getTitle():D.defaultFilename;(ia.constructor==DriveFile&&null!=ia.sync&&ia.sync.isConnected()||!/(\.html)$/i.test(M)&& +!/(\.svg)$/i.test(M))&&this.addMenuItems(S,["properties"],fa)}ia.constructor==DriveFile&&D.menus.addMenuItems(S,["share"],fa)}D.menus.addMenuItems(S,["-","autosave"],fa)})));this.put("diagram",new Menu(mxUtils.bind(this,function(S,fa){var ia=D.getCurrentFile();D.menus.addSubmenu("extras",S,fa,mxResources.get("preferences"));S.addSeparator(fa);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)D.menus.addMenuItems(S,"new open - synchronize - save saveAs -".split(" "),fa);else if("1"==urlParams.embed|| +D.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&D.menus.addMenuItems(S,["-","save"],fa);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||D.mode==App.MODE_ATLAS)D.menus.addMenuItems(S,["saveAndExit"],fa),null!=ia&&ia.isRevisionHistorySupported()&&D.menus.addMenuItems(S,["revisionHistory"],fa);S.addSeparator(fa)}else D.mode==App.MODE_ATLAS?D.menus.addMenuItems(S,["save","synchronize","-"],fa):"1"!=urlParams.noFileMenu&&("1"!=urlParams.sketch? +(D.menus.addMenuItems(S,["new"],fa),D.menus.addSubmenu("openFrom",S,fa),isLocalStorage&&this.addSubmenu("openRecent",S,fa),S.addSeparator(fa),null!=ia&&(ia.constructor==DriveFile&&D.menus.addMenuItems(S,["share"],fa),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||ia.constructor==LocalFile||D.menus.addMenuItems(S,["synchronize"],fa)),S.addSeparator(fa),D.menus.addSubmenu("save",S,fa)):D.menus.addSubmenu("file",S,fa));D.menus.addSubmenu("exportAs",S,fa);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp? +D.menus.addMenuItems(S,["import"],fa):"1"!=urlParams.noFileMenu&&D.menus.addSubmenu("importFrom",S,fa);D.menus.addMenuItems(S,["-","findReplace"],fa);D.commentsSupported()&&D.menus.addMenuItems(S,["comments","-"],fa);D.menus.addMenuItems(S,["toggleFormat","layers","tags","-","pageSetup"],fa);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||D.menus.addMenuItems(S,["print"],fa);"1"!=urlParams.sketch&&null!=ia&&null!=D.fileNode&&"1"!=urlParams.embedInline&&(ia=null!=ia.getTitle()?ia.getTitle(): +D.defaultFilename,/(\.html)$/i.test(ia)||/(\.svg)$/i.test(ia)||this.addMenuItems(S,["-","properties"]));S.addSeparator(fa);D.menus.addSubmenu("help",S,fa);"1"==urlParams.embed||D.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||D.mode==App.MODE_ATLAS)&&D.menus.addMenuItems(S,["-","exit"],fa):"1"!=urlParams.noFileMenu&&D.menus.addMenuItems(S,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(S,fa){var ia=D.getCurrentFile();null!=ia&&ia.constructor==DriveFile?D.menus.addMenuItems(S, +["save","makeCopy","-","rename","moveToFolder"],fa):(D.menus.addMenuItems(S,["save","saveAs","-","rename"],fa),D.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(S,["upload"],fa):D.menus.addMenuItems(S,["makeCopy"],fa));D.menus.addMenuItems(S,["-","autosave"],fa);null!=ia&&ia.isRevisionHistorySupported()&&D.menus.addMenuItems(S,["-","revisionHistory"],fa)})));var T=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(S,fa){T.funct(S, +fa);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||D.menus.addMenuItems(S,["publishLink"],fa);D.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(S.addSeparator(fa),D.menus.addSubmenu("embed",S,fa))})));var Z=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(S,fa){D.menus.addInsertTableCellItem(S,fa)})));var N=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(S,fa){N.funct(S,fa);this.addMenuItems(S,["-","ruler","-","pageScale"],fa)})));this.put("extras",new Menu(mxUtils.bind(this, +function(S,fa){null==Z||"1"==urlParams.embed&&null!=urlParams.lang||D.menus.addSubmenu("language",S,fa);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&D.mode!=App.MODE_ATLAS&&D.menus.addSubmenu("theme",S,fa);D.menus.addSubmenu("units",S,fa);S.addSeparator(fa);"1"!=urlParams.sketch&&D.menus.addMenuItems(S,["scrollbars","-","tooltips","copyConnect","collapseExpand"],fa);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&D.mode!=App.MODE_ATLAS&& +D.menus.addMenuItems(S,["-","showStartScreen","search","scratchpad"],fa);S.addSeparator(fa);"1"==urlParams.sketch&&D.menus.addMenuItems(S,["copyConnect","collapseExpand","tooltips","-"],fa);EditorUi.isElectronApp&&D.menus.addMenuItems(S,["-","spellCheck","autoBkp","drafts","-"],fa);var ia=D.getCurrentFile();null!=ia&&ia.isRealtimeEnabled()&&ia.isRealtimeSupported()&&this.addMenuItems(S,["-","showRemoteCursors","shareCursor","-"],fa);Graph.translateDiagram&&D.menus.addMenuItems(S,["diagramLanguage"], +fa);D.mode!=App.MODE_ATLAS&&D.menus.addMenuItem(S,"configuration",fa);"1"!=urlParams.sketch&&!D.isOfflineApp()&&isLocalStorage&&D.mode!=App.MODE_ATLAS&&D.menus.addMenuItem(S,"plugins",fa);S.addSeparator(fa)})));mxUtils.bind(this,function(){var S=this.get("insert"),fa=S.funct;S.funct=function(ia,M){"1"==urlParams.sketch?(D.menus.addMenuItems(ia,["toggleShapes"],M),D.menus.addSubmenu("table",ia,M),ia.addSeparator(M),D.insertTemplateEnabled&&!D.isOffline()&&D.menus.addMenuItems(ia,["insertTemplate"], +M),D.menus.addMenuItems(ia,["insertImage","insertLink","-"],M),D.menus.addSubmenu("insertAdvanced",ia,M,mxResources.get("advanced")),D.menus.addSubmenu("layout",ia,M)):(fa.apply(this,arguments),D.menus.addSubmenu("table",ia,M))}})();var qa="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),oa=function(S,fa,ia,M){S.addItem(ia,null,mxUtils.bind(this,function(){var aa=new CreateGraphDialog(D,ia,M);D.showDialog(aa.container,620,420,!0,!1);aa.init()}),fa)}; +this.put("insertLayout",new Menu(mxUtils.bind(this,function(S,fa){for(var ia=0;ia<qa.length;ia++)"-"==qa[ia]?S.addSeparator(fa):oa(S,fa,mxResources.get(qa[ia])+"...",qa[ia])})))};EditorUi.prototype.installFormatToolbar=function(D){var G=this.editor.graph,W=document.createElement("div");W.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";G.getSelectionModel().addListener(mxEvent.CHANGE, +mxUtils.bind(this,function(T,Z){0<G.getSelectionCount()?(D.appendChild(W),W.innerHTML="Selected: "+G.getSelectionCount()):null!=W.parentNode&&W.parentNode.removeChild(W)}))};var H=!1;EditorUi.prototype.initFormatWindow=function(){if(!H&&null!=this.formatWindow){H=!0;var D=this.formatWindow.window.toggleMinimized,G=240;this.formatWindow.window.toggleMinimized=function(){D.apply(this,arguments);this.minimized?(G=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px", +this.div.style.left=parseInt(this.div.style.left)+G-140+"px"):(this.div.style.width=G+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-G+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(W){mxEvent.getSource(W)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var J=EditorUi.prototype.init;EditorUi.prototype.init=function(){function D(ua,za,Fa){var Ba= +N.menus.get(ua),Ea=fa.addMenu(mxResources.get(ua),mxUtils.bind(this,function(){Ba.funct.apply(this,arguments)}),S);Ea.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ea.style.display="inline-block";Ea.style.boxSizing="border-box";Ea.style.top="6px";Ea.style.marginRight="6px";Ea.style.height="30px";Ea.style.paddingTop="6px";Ea.style.paddingBottom="6px";Ea.style.cursor="pointer";Ea.setAttribute("title",mxResources.get(ua));N.menus.menuCreated(Ba,Ea,"geMenuItem");null!=Fa?(Ea.style.backgroundImage= +"url("+Fa+")",Ea.style.backgroundPosition="center center",Ea.style.backgroundRepeat="no-repeat",Ea.style.backgroundSize="24px 24px",Ea.style.width="34px",Ea.innerText=""):za||(Ea.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Ea.style.backgroundPosition="right 6px center",Ea.style.backgroundRepeat="no-repeat",Ea.style.paddingRight="22px");return Ea}function G(ua,za,Fa,Ba,Ea,Oa){var Pa=document.createElement("a");Pa.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem"; +Pa.style.display="inline-block";Pa.style.boxSizing="border-box";Pa.style.height="30px";Pa.style.padding="6px";Pa.style.position="relative";Pa.style.verticalAlign="top";Pa.style.top="0px";"1"==urlParams.sketch&&(Pa.style.borderStyle="none",Pa.style.boxShadow="none",Pa.style.padding="6px",Pa.style.margin="0px");null!=N.statusContainer?oa.insertBefore(Pa,N.statusContainer):oa.appendChild(Pa);null!=Oa?(Pa.style.backgroundImage="url("+Oa+")",Pa.style.backgroundPosition="center center",Pa.style.backgroundRepeat= +"no-repeat",Pa.style.backgroundSize="24px 24px",Pa.style.width="34px"):mxUtils.write(Pa,ua);mxEvent.addListener(Pa,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(bb){bb.preventDefault()}));mxEvent.addListener(Pa,"click",function(bb){"disabled"!=Pa.getAttribute("disabled")&&za(bb);mxEvent.consume(bb)});null==Fa&&(Pa.style.marginRight="4px");null!=Ba&&Pa.setAttribute("title",Ba);null!=Ea&&(ua=function(){Ea.isEnabled()?(Pa.removeAttribute("disabled"),Pa.style.cursor="pointer"): +(Pa.setAttribute("disabled","disabled"),Pa.style.cursor="default")},Ea.addListener("stateChanged",ua),qa.addListener("enabledChanged",ua),ua());return Pa}function W(ua,za,Fa){Fa=document.createElement("div");Fa.className="geMenuItem";Fa.style.display="inline-block";Fa.style.verticalAlign="top";Fa.style.marginRight="6px";Fa.style.padding="0 4px 0 4px";Fa.style.height="30px";Fa.style.position="relative";Fa.style.top="0px";"1"==urlParams.sketch&&(Fa.style.boxShadow="none");for(var Ba=0;Ba<ua.length;Ba++)null!= +ua[Ba]&&("1"==urlParams.sketch&&(ua[Ba].style.padding="10px 8px",ua[Ba].style.width="30px"),ua[Ba].style.margin="0px",ua[Ba].style.boxShadow="none",Fa.appendChild(ua[Ba]));null!=za&&mxUtils.setOpacity(Fa,za);null!=N.statusContainer&&"1"!=urlParams.sketch?oa.insertBefore(Fa,N.statusContainer):oa.appendChild(Fa);return Fa}function T(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(E.style.left=58>q.offsetTop-q.offsetHeight/2?"70px":"10px");else{for(var ua=oa.firstChild;null!=ua;){var za=ua.nextSibling; +"geMenuItem"!=ua.className&&"geItem"!=ua.className||ua.parentNode.removeChild(ua);ua=za}S=oa.firstChild;m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;ua=1E3>m||"1"==urlParams.sketch;var Fa=null;ua||(Fa=D("diagram"));za=ua?D("diagram",null,Editor.menuImage):null;null!=za&&(Fa=za);W([Fa,G(mxResources.get("shapes"),N.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),N.actions.get("image"),ua?Editor.shapesImage:null),G(mxResources.get("format"),N.actions.get("toggleFormat").funct, +null,mxResources.get("format")+" ("+N.actions.get("formatPanel").shortcut+")",N.actions.get("image"),ua?Editor.formatImage:null)],ua?60:null);var Ba=D("insert",!0,ua?ca:null);W([Ba,G(mxResources.get("delete"),N.actions.get("delete").funct,null,mxResources.get("delete"),N.actions.get("delete"),ua?Editor.trashImage:null)],ua?60:null);411<=m&&(W([Ta,Za],60),520<=m&&W([ha,640<=m?G("",La.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",La,Editor.zoomInImage):null,640<=m?G("",Da.funct,!0,mxResources.get("zoomOut")+ +" ("+Editor.ctrlKey+" -)",Da,Editor.zoomOutImage):null],60))}null!=Fa&&(mxEvent.disableContextMenu(Fa),mxEvent.addGestureListeners(Fa,mxUtils.bind(this,function(Ea){(mxEvent.isShiftDown(Ea)||mxEvent.isAltDown(Ea)||mxEvent.isMetaDown(Ea)||mxEvent.isControlDown(Ea)||mxEvent.isPopupTrigger(Ea))&&N.appIconClicked(Ea)}),null,null));za=N.menus.get("1"==urlParams["live-ui"]?"theme":"language");null!=za&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=m&&"1"!=urlParams.embed&&"1"!=urlParams.sketch? +(null==wa&&(Ba=fa.addMenu("",za.funct),Ba.setAttribute("title",mxResources.get("1"==urlParams["live-ui"]?"preferences":"language")),Ba.className="geToolbarButton",Ba.style.backgroundImage="url("+Editor.globeImage+")",Ba.style.backgroundPosition="center center",Ba.style.backgroundRepeat="no-repeat",Ba.style.backgroundSize="22px 22px",Ba.style.position="absolute",Ba.style.height="24px",Ba.style.width="24px",Ba.style.zIndex="1",Ba.style.right="8px",Ba.style.cursor="pointer",Ba.style.top="12px",oa.appendChild(Ba), +wa=Ba,"1"==urlParams["live-ui"]&&(za=mxUtils.bind(this,function(){Ba.style.backgroundImage="url('"+(Editor.isDarkMode()?Editor.lightModeImage:Editor.darkModeImage)+"')"}),N.addListener("darkModeChanged",za),za())),N.buttonContainer.style.paddingRight="34px"):(N.buttonContainer.style.paddingRight="4px",null!=wa&&(wa.parentNode.removeChild(wa),wa=null))}J.apply(this,arguments);var Z=document.createElement("div");Z.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;"; +Z.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(Z);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=m||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this, +!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var N=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==N.embedViewport)mxUtils.fit(this.div);else{var ua=parseInt(this.div.offsetLeft),za=parseInt(this.div.offsetWidth),Fa=N.embedViewport.x+N.embedViewport.width,Ba=parseInt(this.div.offsetTop),Ea=parseInt(this.div.offsetHeight),Oa=N.embedViewport.y+ +N.embedViewport.height;this.div.style.left=Math.max(N.embedViewport.x,Math.min(ua,Fa-za))+"px";this.div.style.top=Math.max(N.embedViewport.y,Math.min(Ba,Oa-Ea))+"px";this.div.style.height=Math.min(N.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(N.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=m)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch? +(this.initFormatWindow(),Z=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>m||708>Z)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));N=this;var qa=N.editor.graph;N.toolbar=this.createToolbar(N.createDiv("geToolbar"));N.defaultLibraryName=mxResources.get("untitledLibrary");var oa=document.createElement("div");oa.className="geMenubarContainer";var S=null, +fa=new Menubar(N,oa);N.statusContainer=N.createStatusContainer();N.statusContainer.style.position="relative";N.statusContainer.style.maxWidth="";N.statusContainer.style.marginTop="7px";N.statusContainer.style.marginLeft="6px";N.statusContainer.style.color="gray";N.statusContainer.style.cursor="default";var ia=N.hideCurrentMenu;N.hideCurrentMenu=function(){ia.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var M=N.descriptorChanged;N.descriptorChanged=function(){M.apply(this,arguments); +var ua=N.getCurrentFile();if(null!=ua&&null!=ua.getTitle()){var za=ua.getMode();"google"==za?za="googleDrive":"github"==za?za="gitHub":"gitlab"==za?za="gitLab":"onedrive"==za&&(za="oneDrive");za=mxResources.get(za);oa.setAttribute("title",ua.getTitle()+(null!=za?" ("+za+")":""))}else oa.removeAttribute("title")};N.setStatusText(N.editor.getStatus());oa.appendChild(N.statusContainer);N.buttonContainer=document.createElement("div");N.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;"; +oa.appendChild(N.buttonContainer);N.menubarContainer=N.buttonContainer;N.tabContainer=document.createElement("div");N.tabContainer.className="geTabContainer";N.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";Z=N.diagramContainer.parentNode;var aa=document.createElement("div");aa.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";N.diagramContainer.style.top="1"== +urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){aa.style.top="20px";N.titlebar=document.createElement("div");N.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var X=document.createElement("div");X.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";N.titlebar.appendChild(X); +Z.appendChild(N.titlebar)}X=N.menus.get("viewZoom");var ja=X.funct;X.funct=function(ua,za){ja.apply(this,arguments);N.menus.addMenuItems(ua,["-","outline","fullscreen"],za)};var ca="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,ka="1"==urlParams.sketch?document.createElement("div"):null,q="1"==urlParams.sketch?document.createElement("div"):null,E="1"==urlParams.sketch?document.createElement("div"):null,Q=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)E.style.left="10px",E.style.top= +"10px",q.style.left="10px",q.style.top="60px",ka.style.top="10px",ka.style.right="12px",ka.style.left="",N.diagramContainer.setAttribute("data-bounds",N.diagramContainer.style.top+" "+N.diagramContainer.style.left+" "+N.diagramContainer.style.width+" "+N.diagramContainer.style.height),N.diagramContainer.style.top="0px",N.diagramContainer.style.left="0px",N.diagramContainer.style.bottom="0px",N.diagramContainer.style.right="0px",N.diagramContainer.style.width="",N.diagramContainer.style.height=""; +else{var ua=N.diagramContainer.getAttribute("data-bounds");if(null!=ua){N.diagramContainer.style.background="transparent";N.diagramContainer.removeAttribute("data-bounds");var za=qa.getGraphBounds();ua=ua.split(" ");N.diagramContainer.style.top=ua[0];N.diagramContainer.style.left=ua[1];N.diagramContainer.style.width=za.width+50+"px";N.diagramContainer.style.height=za.height+46+"px";N.diagramContainer.style.bottom="";N.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize", +rect:N.diagramContainer.getBoundingClientRect()}),"*");N.refresh()}E.style.left=N.diagramContainer.offsetLeft+"px";E.style.top=N.diagramContainer.offsetTop-E.offsetHeight-4+"px";q.style.display="";q.style.left=N.diagramContainer.offsetLeft-q.offsetWidth-4+"px";q.style.top=N.diagramContainer.offsetTop+"px";ka.style.left=N.diagramContainer.offsetLeft+N.diagramContainer.offsetWidth-ka.offsetWidth+"px";ka.style.top=E.style.top;ka.style.right="";N.bottomResizer.style.left=N.diagramContainer.offsetLeft+ +(N.diagramContainer.offsetWidth-N.bottomResizer.offsetWidth)/2+"px";N.bottomResizer.style.top=N.diagramContainer.offsetTop+N.diagramContainer.offsetHeight-N.bottomResizer.offsetHeight/2-1+"px";N.rightResizer.style.left=N.diagramContainer.offsetLeft+N.diagramContainer.offsetWidth-N.rightResizer.offsetWidth/2-1+"px";N.rightResizer.style.top=N.diagramContainer.offsetTop+(N.diagramContainer.offsetHeight-N.bottomResizer.offsetHeight)/2+"px"}N.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden": +"";N.rightResizer.style.visibility=N.bottomResizer.style.visibility;oa.style.display="none";E.style.visibility="";ka.style.visibility=""}),Y=N.actions.get("fullscreen"),R=G("",Y.funct,null,mxResources.get(""),Y,Editor.fullscreenImage),ba=mxUtils.bind(this,function(){R.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent"; +Q()});Y=mxUtils.bind(this,function(){b(N,!0);N.initFormatWindow();var ua=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(ua.x+ua.width+4,ua.y);ba()});N.addListener("inlineFullscreenChanged",ba);N.addListener("editInlineStart",Y);"1"==urlParams.embedInline&&N.addListener("darkModeChanged",Y);N.addListener("editInlineStop",mxUtils.bind(this,function(ua){N.diagramContainer.style.width="10px";N.diagramContainer.style.height="10px";N.diagramContainer.style.border=""; +N.bottomResizer.style.visibility="hidden";N.rightResizer.style.visibility="hidden";E.style.visibility="hidden";ka.style.visibility="hidden";q.style.display="none"}));if(null!=N.hoverIcons){var ea=N.hoverIcons.update;N.hoverIcons.update=function(){qa.freehand.isDrawing()||ea.apply(this,arguments)}}if(null!=qa.freehand){var ra=qa.freehand.createStyle;qa.freehand.createStyle=function(ua){return ra.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){q.className="geToolbarContainer";ka.className= +"geToolbarContainer";E.className="geToolbarContainer";oa.className="geToolbarContainer";N.picker=q;var ta=!1;"1"!=urlParams.embed&&"atlassian"!=N.getServiceName()&&(mxEvent.addListener(oa,"mouseenter",function(){N.statusContainer.style.display="inline-block"}),mxEvent.addListener(oa,"mouseleave",function(){ta||(N.statusContainer.style.display="none")}));var la=mxUtils.bind(this,function(ua){null!=N.notificationBtn&&(null!=ua?N.notificationBtn.setAttribute("title",ua):N.notificationBtn.removeAttribute("title"))}); +if("1"!=urlParams.embed&&"1"==urlParams["live-ui"]){var pa=D("theme",null,Editor.darkModeImage);null!=pa&&(pa.style.position="relative",pa.style.backgroundPosition="top center",pa.style.backgroundSize="22px 22px",pa.style.width="24px",pa.style.height="28px",pa.style.top="4px",oa.appendChild(pa),Y=mxUtils.bind(this,function(){pa.style.backgroundImage="url('"+(Editor.isDarkMode()?Editor.lightModeImage:Editor.darkModeImage)+"')"}),N.addListener("darkModeChanged",Y),Y())}oa.style.visibility=20>oa.clientWidth? +"hidden":"";N.editor.addListener("statusChanged",mxUtils.bind(this,function(){N.setStatusText(N.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=N.getServiceName())if(N.statusContainer.style.display="inline-block",ta=!0,1==N.statusContainer.children.length&&""==N.editor.getStatus())oa.style.visibility="hidden";else{if(0==N.statusContainer.children.length||1==N.statusContainer.children.length&&"function"===typeof N.statusContainer.firstChild.getAttribute&&null==N.statusContainer.firstChild.getAttribute("class")){var ua= +null!=N.statusContainer.firstChild&&"function"===typeof N.statusContainer.firstChild.getAttribute?N.statusContainer.firstChild.getAttribute("title"):N.editor.getStatus();la(ua);var za=N.getCurrentFile();za=null!=za?za.savingStatusKey:DrawioFile.prototype.savingStatusKey;ua==mxResources.get(za)+"..."?(N.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(za))+'..."src="'+Editor.tailSpin+'">',N.statusContainer.style.display="inline-block",ta=!0):6<N.buttonContainer.clientWidth&& +(N.statusContainer.style.display="none",ta=!1)}else N.statusContainer.style.display="inline-block",la(null),ta=!0;oa.style.visibility=20>oa.clientWidth&&!ta?"hidden":""}}));U=D("diagram",null,Editor.menuImage);U.style.boxShadow="none";U.style.padding="6px";U.style.margin="0px";E.appendChild(U);mxEvent.disableContextMenu(U);mxEvent.addGestureListeners(U,mxUtils.bind(this,function(ua){(mxEvent.isShiftDown(ua)||mxEvent.isAltDown(ua)||mxEvent.isMetaDown(ua)||mxEvent.isControlDown(ua)||mxEvent.isPopupTrigger(ua))&& +this.appIconClicked(ua)}),null,null);N.statusContainer.style.position="";N.statusContainer.style.display="none";N.statusContainer.style.margin="0px";N.statusContainer.style.padding="6px 0px";N.statusContainer.style.maxWidth=Math.min(m-240,280)+"px";N.statusContainer.style.display="inline-block";N.statusContainer.style.textOverflow="ellipsis";N.buttonContainer.style.display="inline-block";N.buttonContainer.style.position="relative";N.buttonContainer.style.paddingRight="0px";N.buttonContainer.style.top= +"0px";var xa=document.createElement("a");xa.style.padding="0px";xa.style.boxShadow="none";xa.className="geMenuItem";xa.style.display="inline-block";xa.style.width="40px";xa.style.height="12px";xa.style.marginBottom="-2px";xa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";xa.style.backgroundPosition="top center";xa.style.backgroundRepeat="no-repeat";xa.setAttribute("title","Minimize");var Ca=!1,Ia=mxUtils.bind(this,function(){q.innerText="";if(!Ca){var ua=function(za,Fa,Ba,Ea){null!= +Fa&&za.setAttribute("title",Fa);za.style.cursor=null!=Ba?Ba:"default";za.style.margin="2px 0px";q.appendChild(za);mxUtils.br(q);null!=Ea&&(za.style.position="relative",za.style.overflow="visible",Fa=document.createElement("div"),Fa.style.position="absolute",Fa.style.left="34px",Fa.style.top="28px",Fa.style.fontSize="8px",mxUtils.write(Fa,Ea),za.appendChild(Fa));return za};ua(N.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;", +60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+" (A)",null,"A");ua(N.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");ua(N.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;", +160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");ua(N.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");(function(){var za=new mxCell("",new mxGeometry(0,0,qa.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");za.geometry.setTerminalPoint(new mxPoint(0,0),!0);za.geometry.setTerminalPoint(new mxPoint(za.geometry.width, +0),!1);za.geometry.points=[];za.geometry.relative=!0;za.edge=!0;ua(N.sidebar.createEdgeTemplateFromCells([za],za.geometry.width,za.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");za=za.clone();za.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";za.geometry.width=qa.defaultEdgeLength+20;za.geometry.setTerminalPoint(new mxPoint(0,20),!0);za.geometry.setTerminalPoint(new mxPoint(za.geometry.width, +20),!1);ua(N.sidebar.createEdgeTemplateFromCells([za],za.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"))})();(function(za,Fa,Ba,Ea){za=G("",za.funct,null,Fa,za,Ba);za.style.width="40px";za.style.height="34px";za.style.opacity="0.7";return ua(za,null,"pointer",Ea)})(N.actions.get("insertFreehand"),mxResources.get("freehand")+" (X)",Editor.freehandImage,"X");U=D("insert",null,Editor.plusImage);U.style.boxShadow="none";U.style.opacity="0.7";U.style.padding="6px";U.style.margin= +"0px";U.style.height="34px";U.style.width="37px";ua(U,null,"pointer")}"1"!=urlParams.embedInline&&q.appendChild(xa)});mxEvent.addListener(xa,"click",mxUtils.bind(this,function(){Ca?(mxUtils.setPrefixedStyle(q.style,"transform","translate(0, -50%)"),q.style.padding="8px 6px 4px",q.style.top="50%",q.style.bottom="",q.style.height="",xa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",xa.style.width="40px",xa.style.height="12px",xa.setAttribute("title","Minimize"),Ca=!1,Ia()):(q.innerText= +"",q.appendChild(xa),mxUtils.setPrefixedStyle(q.style,"transform","translate(0, 0)"),q.style.top="",q.style.bottom="12px",q.style.padding="0px",q.style.height="24px",xa.style.height="24px",xa.style.backgroundImage="url("+Editor.plusImage+")",xa.setAttribute("title",mxResources.get("insert")),xa.style.width="24px",Ca=!0)}));Ia();N.addListener("darkModeChanged",Ia);N.addListener("sketchModeChanged",Ia)}else N.editor.addListener("statusChanged",mxUtils.bind(this,function(){N.setStatusText(N.editor.getStatus())})); +if(null!=X){var Aa=function(ua){if(mxEvent.isAltDown(ua))N.hideCurrentMenu(),N.actions.get("customZoom").funct(),mxEvent.consume(ua);else if("geItem"!=mxEvent.getSource(ua).className||mxEvent.isShiftDown(ua))N.hideCurrentMenu(),N.actions.get("smartFit").funct(),mxEvent.consume(ua)},La=N.actions.get("zoomIn"),Da=N.actions.get("zoomOut");Y=N.actions.get("resetView");var Sa=N.actions.get("undo"),Ra=N.actions.get("redo"),Ta=G("",Sa.funct,null,mxResources.get("undo")+" ("+Sa.shortcut+")",Sa,Editor.undoImage), +Za=G("",Ra.funct,null,mxResources.get("redo")+" ("+Ra.shortcut+")",Ra,Editor.redoImage);if(null!=ka){Y=function(){V.style.display=null!=N.pages&&("0"!=urlParams.pages||1<N.pages.length||Editor.pagesVisible)?"inline-block":"none"};var Na=function(){V.innerText="";if(null!=N.currentPage){mxUtils.write(V,N.currentPage.getName());var ua=null!=N.pages?N.pages.length:1,za=N.getPageIndex(N.currentPage);za=null!=za?za+1:1;var Fa=N.currentPage.getId();V.setAttribute("title",N.currentPage.getName()+" ("+za+ +"/"+ua+")"+(null!=Fa?" ["+Fa+"]":""))}},z=N.actions.get("delete"),L=G("",z.funct,null,mxResources.get("delete"),z,Editor.trashImage);L.style.opacity="0.1";E.appendChild(L);z.addListener("stateChanged",function(){L.style.opacity=z.enabled?"":"0.1"});var O=function(){Ta.style.display=0<N.editor.undoManager.history.length||qa.isEditing()?"inline-block":"none";Za.style.display=Ta.style.display;Ta.style.opacity=Sa.enabled?"":"0.1";Za.style.opacity=Ra.enabled?"":"0.1"};E.appendChild(Ta);E.appendChild(Za); +Sa.addListener("stateChanged",O);Ra.addListener("stateChanged",O);O();var V=this.createPageMenuTab(!1,!0);V.style.display="none";V.style.position="";V.style.marginLeft="";V.style.top="";V.style.left="";V.style.height="100%";V.style.lineHeight="";V.style.borderStyle="none";V.style.padding="3px 0";V.style.margin="0px";V.style.background="";V.style.border="";V.style.boxShadow="none";V.style.verticalAlign="top";V.style.width="auto";V.style.maxWidth="160px";V.style.position="relative";V.style.padding= +"6px";V.style.textOverflow="ellipsis";V.style.opacity="0.8";ka.appendChild(V);N.editor.addListener("pagesPatched",Na);N.editor.addListener("pageSelected",Na);N.editor.addListener("pageRenamed",Na);N.editor.addListener("fileLoaded",Na);Na();N.addListener("fileDescriptorChanged",Y);N.addListener("pagesVisibleChanged",Y);N.editor.addListener("pagesPatched",Y);Y();Y=G("",Da.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",Da,Editor.zoomOutImage);ka.appendChild(Y);var U=fa.addMenu("100%", +X.funct);U.setAttribute("title",mxResources.get("zoom"));U.innerHTML="100%";U.style.display="inline-block";U.style.color="inherit";U.style.cursor="pointer";U.style.textAlign="center";U.style.whiteSpace="nowrap";U.style.paddingRight="10px";U.style.textDecoration="none";U.style.verticalAlign="top";U.style.padding="6px 0";U.style.fontSize="14px";U.style.width="40px";U.style.opacity="0.4";ka.appendChild(U);X=G("",La.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",La,Editor.zoomInImage); +ka.appendChild(X);"1"==urlParams.embedInline?(ka.appendChild(R),X=N.actions.get("exit"),ka.appendChild(G("",X.funct,null,mxResources.get("exit"),X,Editor.closeImage))):R.parentNode.removeChild(R);N.tabContainer.style.visibility="hidden";oa.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";E.style.cssText= +"position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";ka.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";aa.appendChild(E);aa.appendChild(ka);q.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;"; +mxClient.IS_POINTER&&(q.style.touchAction="none");aa.appendChild(q);window.setTimeout(function(){mxUtils.setPrefixedStyle(q.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(aa)}else{var ha=G("",Aa,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Y,Editor.zoomFitImage);oa.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";U=fa.addMenu("100%", +X.funct);U.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");U.style.whiteSpace="nowrap";U.style.paddingRight="10px";U.style.textDecoration="none";U.style.textDecoration="none";U.style.overflow="hidden";U.style.visibility="hidden";U.style.textAlign="center";U.style.cursor="pointer";U.style.height=parseInt(N.tabContainerHeight)-1+"px";U.style.lineHeight=parseInt(N.tabContainerHeight)+1+"px";U.style.position="absolute";U.style.display="block";U.style.fontSize="12px";U.style.width="59px"; +U.style.right="0px";U.style.bottom="0px";U.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";U.style.backgroundPosition="right 6px center";U.style.backgroundRepeat="no-repeat";aa.appendChild(U)}(function(ua){mxEvent.addListener(ua,"click",Aa);var za=mxUtils.bind(this,function(){ua.innerText="";mxUtils.write(ua,Math.round(100*N.editor.graph.view.scale)+"%")});N.editor.graph.view.addListener(mxEvent.EVENT_SCALE,za);N.editor.addListener("resetGraphView",za);N.editor.addListener("pageSelected", +za)})(U);var ma=N.setGraphEnabled;N.setGraphEnabled=function(){ma.apply(this,arguments);null!=this.tabContainer&&(U.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==ka?this.tabContainerHeight+"px":"0px")}}aa.appendChild(oa);aa.appendChild(N.diagramContainer);Z.appendChild(aa);N.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=m)&&"1"!=urlParams.embedInline&&b(this,!0);null==ka&&aa.appendChild(N.tabContainer); +var wa=null;T();mxEvent.addListener(window,"resize",function(){T();null!=N.sidebarWindow&&N.sidebarWindow.window.fit();null!=N.formatWindow&&N.formatWindow.window.fit();null!=N.actions.outlineWindow&&N.actions.outlineWindow.window.fit();null!=N.actions.layersWindow&&N.actions.layersWindow.window.fit();null!=N.menus.tagsWindow&&N.menus.tagsWindow.window.fit();null!=N.menus.findWindow&&N.menus.findWindow.window.fit();null!=N.menus.findReplaceWindow&&N.menus.findReplaceWindow.window.fit()});if("1"== +urlParams.embedInline){document.body.style.cursor="text";q.style.transform="";mxEvent.addGestureListeners(N.diagramContainer.parentNode,function(ua){mxEvent.getSource(ua)==N.diagramContainer.parentNode&&(N.embedExitPoint=new mxPoint(mxEvent.getClientX(ua),mxEvent.getClientY(ua)),N.sendEmbeddedSvgExport())});Z=document.createElement("div");Z.style.position="absolute";Z.style.width="10px";Z.style.height="10px";Z.style.borderRadius="5px";Z.style.border="1px solid gray";Z.style.background="#ffffff";Z.style.cursor= +"row-resize";N.diagramContainer.parentNode.appendChild(Z);N.bottomResizer=Z;var sa=null,ya=null,Ha=null,Qa=null;mxEvent.addGestureListeners(Z,function(ua){Qa=parseInt(N.diagramContainer.style.height);ya=mxEvent.getClientY(ua);qa.popupMenuHandler.hideMenu();mxEvent.consume(ua)});Z=Z.cloneNode(!1);Z.style.cursor="col-resize";N.diagramContainer.parentNode.appendChild(Z);N.rightResizer=Z;mxEvent.addGestureListeners(Z,function(ua){Ha=parseInt(N.diagramContainer.style.width);sa=mxEvent.getClientX(ua);qa.popupMenuHandler.hideMenu(); +mxEvent.consume(ua)});mxEvent.addGestureListeners(document.body,null,function(ua){var za=!1;null!=sa&&(N.diagramContainer.style.width=Math.max(20,Ha+mxEvent.getClientX(ua)-sa)+"px",za=!0);null!=ya&&(N.diagramContainer.style.height=Math.max(20,Qa+mxEvent.getClientY(ua)-ya)+"px",za=!0);za&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:N.diagramContainer.getBoundingClientRect()}),"*"),Q(),N.refresh())},function(ua){null==sa&&null== +ya||mxEvent.consume(ua);ya=sa=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";N.bottomResizer.style.visibility="hidden";N.rightResizer.style.visibility="hidden";E.style.visibility="hidden";ka.style.visibility="hidden";q.style.display="none"}"1"==urlParams.prefetchFonts&&N.editor.loadFonts()}}}; +(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,e,k,m,C,p,F){this.file=b;this.id=e;this.content=k;this.modifiedDate=m;this.createdDate=C;this.isResolved=p;this.user=F;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,k,m,C){e()};DrawioComment.prototype.editComment=function(b,e,k){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,k,m,C){this.id=b;this.email=e;this.displayName=k;this.pictureUrl=m;this.locale=C};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfDraftTooBigErr=Draft size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration?\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement; Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];GraphViewer=function(b,e,k){this.init(b,e,k)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://viewer.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.autoCrop=!1; GraphViewer.prototype.autoOrigin=!0;GraphViewer.prototype.center=!1;GraphViewer.prototype.forceCenter=!1;GraphViewer.prototype.allowZoomIn=!1;GraphViewer.prototype.allowZoomOut=!0;GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100;GraphViewer.prototype.responsive=!1; GraphViewer.prototype.init=function(b,e,k){this.graphConfig=null!=k?k:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.autoCrop=null!=this.graphConfig["auto-crop"]?this.graphConfig["auto-crop"]:this.autoCrop;this.autoOrigin=null!=this.graphConfig["auto-origin"]?this.graphConfig["auto-origin"]:this.autoOrigin;this.allowZoomOut=null!=this.graphConfig["allow-zoom-out"]?this.graphConfig["allow-zoom-out"]:this.allowZoomOut;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]? this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.forceCenter=null!=this.graphConfig.forceCenter?this.graphConfig.forceCenter:this.forceCenter;this.center=null!=this.graphConfig.center?this.graphConfig.center:this.center||this.forceCenter;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled=0<=mxUtils.indexOf(this.toolbarItems, "zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.tagsEnabled=0<=mxUtils.indexOf(this.toolbarItems,"tags");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialOverflow=document.body.style.overflow;this.initialWidth=null!=b?b.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.responsive=(null!=this.graphConfig.responsive? this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageId=this.graphConfig.pageId;this.editor=null;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=e&&(this.xmlDocument=e.ownerDocument,this.xmlNode=e,this.xml=mxUtils.getXml(e),null!=b)){var m=mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.graph.defaultPageBackgroundColor="transparent";this.graph.transparentBackground= -!1;if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var E=this.graph.view.getDrawPane().ownerSVGElement;this.graph.view.getCanvas();null!=this.graphConfig.border?E.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(E.style.padding="8px");E.style.boxSizing="border-box";E.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var H=this.view.graphBounds,J=this.view.translate;E.setAttribute("viewBox",H.x+J.x-this.panDx+" "+(H.y+J.y-this.panDy)+ -" "+(H.width+1)+" "+(H.height+1));this.container.style.backgroundColor=E.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",H))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(H){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1== -this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=e&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var K=this;this.graph.getImageFromBundles=function(H){return K.getImageUrl(H)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var Q=this.xmlNode.getElementsByTagName("diagram");if(0< -Q.length){if(null!=this.pageId)for(var d=0;d<Q.length;d++)if(this.pageId==Q[d].getAttribute("id")){this.currentPage=d;break}var f=this.graph.getGlobalVariable;K=this;this.graph.getGlobalVariable=function(H){var J=Q[K.currentPage];return"page"==H?J.getAttribute("name")||"Page-"+(K.currentPage+1):"pagenumber"==H?K.currentPage+1:"pagecount"==H?Q.length:f.apply(this,arguments)}}}this.diagrams=[];var g=null;this.selectPage=function(H){this.handlingResize||(this.currentPage=mxUtils.mod(H,this.diagrams.length), +!1;if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var F=this.graph.view.getDrawPane().ownerSVGElement;this.graph.view.getCanvas();null!=this.graphConfig.border?F.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(F.style.padding="8px");F.style.boxSizing="border-box";F.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var H=this.view.graphBounds,J=this.view.translate;F.setAttribute("viewBox",H.x+J.x-this.panDx+" "+(H.y+J.y-this.panDy)+ +" "+(H.width+1)+" "+(H.height+1));this.container.style.backgroundColor=F.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",H))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(H){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1== +this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=e&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var K=this;this.graph.getImageFromBundles=function(H){return K.getImageUrl(H)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var P=this.xmlNode.getElementsByTagName("diagram");if(0< +P.length){if(null!=this.pageId)for(var d=0;d<P.length;d++)if(this.pageId==P[d].getAttribute("id")){this.currentPage=d;break}var f=this.graph.getGlobalVariable;K=this;this.graph.getGlobalVariable=function(H){var J=P[K.currentPage];return"page"==H?J.getAttribute("name")||"Page-"+(K.currentPage+1):"pagenumber"==H?K.currentPage+1:"pagecount"==H?P.length:f.apply(this,arguments)}}}this.diagrams=[];var g=null;this.selectPage=function(H){this.handlingResize||(this.currentPage=mxUtils.mod(H,this.diagrams.length), this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(H){H=this.getIndexById(H);var J=0<=H;J&&this.selectPage(H);return J};d=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=g&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),g=this.xmlNode)});var x=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(H){if(null!=H&&Graph.isPageLink(H.src)){var J=H.src, -D=J.indexOf(",");0<D&&(D=K.getIndexById(J.substring(D+1)),0<=D&&(H=K.getImageForGraphModel(Editor.parseDiagramNode(K.diagrams[D])),H.originalSrc=J))}x.apply(this,arguments)};var z=this.graph.getGraphBounds;this.graph.getGraphBounds=function(H){var J=z.apply(this,arguments);H=this.backgroundImage;if(null!=H){var D=this.view.translate,G=this.view.scale;J=mxRectangle.fromRectangle(J);J.add(new mxRectangle((D.x+H.x)*G,(D.y+H.y)*G,H.width*G,H.height*G))}return J};this.addListener("xmlNodeChanged",d);d(); +D=J.indexOf(",");0<D&&(D=K.getIndexById(J.substring(D+1)),0<=D&&(H=K.getImageForGraphModel(Editor.parseDiagramNode(K.diagrams[D])),H.originalSrc=J))}x.apply(this,arguments)};var y=this.graph.getGraphBounds;this.graph.getGraphBounds=function(H){var J=y.apply(this,arguments);H=this.backgroundImage;if(null!=H){var D=this.view.translate,G=this.view.scale;J=mxRectangle.fromRectangle(J);J.add(new mxRectangle((D.x+H.x)*G,(D.y+H.y)*G,H.width*G,H.height*G))}return J};this.addListener("xmlNodeChanged",d);d(); urlParams.page=K.currentPage;d=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,d=this.setLayersVisible(),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.graph.panningHandler.isForcePanningEvent=function(H){return!mxEvent.isPopupTrigger(H.getEvent())&&"auto"==this.graph.container.style.overflow}, this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.panningHandler.ignoreCell=!0,this.graph.panningHandler.usePopupTrigger=!1,this.graph.panningHandler.pinchEnabled=!1);this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&b.setAttribute("title",this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph); this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=d&&this.setLayersVisible(d);this.graph.customLinkClicked=function(H){if(Graph.isPageLink(H)){var J=H.indexOf(",");K.selectPageById(H.substring(J+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(H);return!0};var u=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded= -!0;return u.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});k=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&"undefined"!==typeof k){var C=this.getObservableParent(b),p=new k(mxUtils.bind(this,function(E){0<b.offsetWidth&&(p.disconnect(),m())}));p.observe(C,{attributes:!0})}else m()}}; +!0;return u.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});k=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&"undefined"!==typeof k){var C=this.getObservableParent(b),p=new k(mxUtils.bind(this,function(F){0<b.offsetWidth&&(p.disconnect(),m())}));p.observe(C,{attributes:!0})}else m()}}; GraphViewer.prototype.getObservableParent=function(b){for(b=b.parentNode;b!=document.body&&null!=b.parentNode&&"none"!==mxUtils.getCurrentStyle(b).display;)b=b.parentNode;return b};GraphViewer.prototype.getImageUrl=function(b){null!=b&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)&&"data:image"!=b.substring(0,10)&&("/"==b.charAt(0)&&(b=b.substring(1,b.length)),b=this.imageBaseUrl+b);return b}; GraphViewer.prototype.getImageForGraphModel=function(b){var e=Graph.createOffscreenGraph(this.graph.getStylesheet());e.getGlobalVariable=this.graph.getGlobalVariable;document.body.appendChild(e.container);b=(new mxCodec(b.ownerDocument)).decode(b).root;e.model.setRoot(b);b=e.getSvg();var k=e.getGraphBounds();document.body.removeChild(e.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),k.width,k.height,k.x,k.y)}; GraphViewer.prototype.getIndexById=function(b){if(null!=this.diagrams)for(var e=0;e<this.diagrams.length;e++)if(this.diagrams[e].getAttribute("id")==b)return e;return-1};GraphViewer.prototype.setXmlNode=function(b){b=this.editor.extractGraphModel(b,!0);this.xmlDocument=b.ownerDocument;this.xml=mxUtils.getXml(b);this.xmlNode=b;this.updateGraphXml(b);this.fireEvent(new mxEventObject("xmlNodeChanged"))}; @@ -4091,35 +4096,35 @@ GraphViewer.prototype.setFileNode=function(b){null==this.xmlNode&&(this.xmlDocum GraphViewer.prototype.setLayersVisible=function(b){var e=!0;if(!this.autoOrigin){var k=[],m=this.graph.getModel();m.beginUpdate();try{for(var C=0;C<m.getChildCount(m.root);C++){var p=m.getChildAt(m.root,C);e=e&&m.isVisible(p);k.push(m.isVisible(p));m.setVisible(p,null!=b?b[C]:!0)}}finally{m.endUpdate()}}return e?null:k}; GraphViewer.prototype.setGraphXml=function(b){if(null!=this.graph){this.graph.view.translate=new mxPoint;this.graph.view.scale=1;var e=null;this.graph.getModel().beginUpdate();try{this.graph.getModel().clear(),this.editor.setGraphXml(b),e=this.setLayersVisible(!0)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph());this.graph.initialViewState= {translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};e&&this.setLayersVisible(e)}}; -GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,e=this.graph.getGraphBounds(),k=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var m=mxUtils.bind(this,function(){if(!k){k=!0;var K=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?K.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){K=b.getBoundingClientRect();var Q=mxUtils.getScrollOrigin(document.body); -Q="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-Q.x,top:-Q.y};K={left:K.left-Q.left,top:K.top-Q.top,bottom:K.bottom-Q.top,right:K.right-Q.left};this.toolbar.style.left=K.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=K.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=K.top+1+"px"):this.toolbar.style.top=K.top+"px"}else null!= -this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());k=!1}}),C=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(K){var Q=b.offsetWidth;Q==C||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=K?K:this.graphConfig.zoom|| -(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},C=Q,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize= +GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,e=this.graph.getGraphBounds(),k=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var m=mxUtils.bind(this,function(){if(!k){k=!0;var K=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?K.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){K=b.getBoundingClientRect();var P=mxUtils.getScrollOrigin(document.body); +P="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-P.x,top:-P.y};K={left:K.left-P.left,top:K.top-P.top,bottom:K.bottom-P.top,right:K.right-P.left};this.toolbar.style.left=K.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=K.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=K.top+1+"px"):this.toolbar.style.top=K.top+"px"}else null!= +this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());k=!1}}),C=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(K){var P=b.offsetWidth;P==C||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=K?K:this.graphConfig.zoom|| +(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},C=P,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize= !1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",m),this.graph.addListener("size",m)):new ResizeSensor(this.graph.container,m));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=b.style.height&&this.autoFit||this.updateContainerWidth(b,e.width+2*this.graph.border), 0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,e.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var p=C=null;m=mxUtils.bind(this,function(){window.clearTimeout(p);this.handlingResize||(p=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",m):new ResizeSensor(this.graph.container,m))}else 9>=document.documentMode||this.graph.addListener("size", -m);var E=mxUtils.bind(this,function(K){var Q=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var d=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==K&&this.allowZoomOut&&(this.allowZoomIn||e.width+2*this.graph.border>b.offsetWidth||e.height+2*this.graph.border>d)?(K=null,null!=d&&e.height+2*this.graph.border>d-2&&(K=(d-2*this.graph.border-2)/e.height),this.fitGraph(K)):this.widthIsEmpty|| -null!=K||0!=this.graphConfig.resize||""==b.style.height?(K=null!=K?K:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-e.x/this.graph.view.scale)+K.x,Math.floor(this.graph.border-e.y/this.graph.view.scale)+K.y),C=b.offsetWidth):this.graph.center((!this.widthIsEmpty||e.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=Q});8==document.documentMode?window.setTimeout(E,0):E();this.positionGraph=function(K){e=this.graph.getGraphBounds();C=null;E(K)}}; +m);var F=mxUtils.bind(this,function(K){var P=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var d=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==K&&this.allowZoomOut&&(this.allowZoomIn||e.width+2*this.graph.border>b.offsetWidth||e.height+2*this.graph.border>d)?(K=null,null!=d&&e.height+2*this.graph.border>d-2&&(K=(d-2*this.graph.border-2)/e.height),this.fitGraph(K)):this.widthIsEmpty|| +null!=K||0!=this.graphConfig.resize||""==b.style.height?(K=null!=K?K:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-e.x/this.graph.view.scale)+K.x,Math.floor(this.graph.border-e.y/this.graph.view.scale)+K.y),C=b.offsetWidth):this.graph.center((!this.widthIsEmpty||e.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=P});8==document.documentMode?window.setTimeout(F,0):F();this.positionGraph=function(K){e=this.graph.getGraphBounds();C=null;F(K)}}; GraphViewer.prototype.crop=function(){var b=this.graph,e=b.getGraphBounds(),k=b.border,m=b.view.scale;b.view.setTranslate(null!=e.x?Math.floor(b.view.translate.x-e.x/m+k):k,null!=e.y?Math.floor(b.view.translate.y-e.y/m+k):k)};GraphViewer.prototype.updateContainerWidth=function(b,e){b.style.width=e+"px"};GraphViewer.prototype.updateContainerHeight=function(b,e){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=e+"px"}; -GraphViewer.prototype.showLayers=function(b,e){var k=this.graphConfig.layers;k=null!=k&&0<k.length?k.split(" "):[];var m=this.graphConfig.layerIds,C=null!=m&&0<m.length,p=!1;if(0<k.length||C||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var E=b.getChildCount(b.root);if(null==e){e=!1;p={};if(C)for(var K=0;K<m.length;K++){var Q=b.getCell(m[K]);null!=Q&&(e=!0,p[Q.id]=!0)}else for(K=0;K<k.length;K++)Q=b.getChildAt(b.root,parseInt(k[K])),null!=Q&&(e=!0,p[Q.id]=!0);for(K=0;e&& -K<E;K++)Q=b.getChildAt(b.root,K),b.setVisible(Q,p[Q.id]||!1)}else for(K=0;K<E;K++)b.setVisible(b.getChildAt(b.root,K),e.isVisible(e.getChildAt(e.root,K)))}finally{b.endUpdate()}p=!0}return p}; +GraphViewer.prototype.showLayers=function(b,e){var k=this.graphConfig.layers;k=null!=k&&0<k.length?k.split(" "):[];var m=this.graphConfig.layerIds,C=null!=m&&0<m.length,p=!1;if(0<k.length||C||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var F=b.getChildCount(b.root);if(null==e){e=!1;p={};if(C)for(var K=0;K<m.length;K++){var P=b.getCell(m[K]);null!=P&&(e=!0,p[P.id]=!0)}else for(K=0;K<k.length;K++)P=b.getChildAt(b.root,parseInt(k[K])),null!=P&&(e=!0,p[P.id]=!0);for(K=0;e&& +K<F;K++)P=b.getChildAt(b.root,K),b.setVisible(P,p[P.id]||!1)}else for(K=0;K<F;K++)b.setVisible(b.getChildAt(b.root,K),e.isVisible(e.getChildAt(e.root,K)))}finally{b.endUpdate()}p=!0}return p}; GraphViewer.prototype.addToolbar=function(){var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee"; e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var k=null,m=null,C=mxUtils.bind(this,function(oa){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=m&&(window.clearTimeout(m),fadeThead2=null);k=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,0);k=null;m=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none"; m=null}),100)}),oa||200)}),p=mxUtils.bind(this,function(oa){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=m&&(window.clearTimeout(m),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,oa||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(oa){mxEvent.isTouchEvent(oa)||(p(30),C())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":"mousemove",function(oa){mxEvent.consume(oa)});mxEvent.addListener(e,"mouseenter", -mxUtils.bind(this,function(oa){p(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(oa){p(100);mxEvent.consume(oa)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(oa){mxEvent.isTouchEvent(oa)||p(30)}));var E=this.graph,K=E.getTolerance();E.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(oa,aa){this.startX=aa.getGraphX();this.startY=aa.getGraphY();this.scrollLeft=E.container.scrollLeft;this.scrollTop=E.container.scrollTop},mouseMove:function(oa, -aa){},mouseUp:function(oa,aa){mxEvent.isTouchEvent(aa.getEvent())&&Math.abs(this.scrollLeft-E.container.scrollLeft)<K&&Math.abs(this.scrollTop-E.container.scrollTop)<K&&Math.abs(this.startX-aa.getGraphX())<K&&Math.abs(this.startY-aa.getGraphY())<K&&(0<parseFloat(e.style.opacity||0)?C():p(30))}})}for(var Q=this.toolbarItems,d=0,f=mxUtils.bind(this,function(oa,aa,da,ia){oa=this.createToolbarButton(oa,aa,da,ia);e.appendChild(oa);d++;return oa}),g=null,x=null,z=null,u=null,H=0;H<Q.length;H++){var J=Q[H]; -if("pages"==J){u=b.ownerDocument.createElement("div");u.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;";mxUtils.setOpacity(u,70);var D=f(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");D.style.borderRightStyle="none";D.style.paddingLeft="0px";D.style.paddingRight="0px";e.appendChild(u);var G=f(mxUtils.bind(this, +mxUtils.bind(this,function(oa){p(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(oa){p(100);mxEvent.consume(oa)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(oa){mxEvent.isTouchEvent(oa)||p(30)}));var F=this.graph,K=F.getTolerance();F.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(oa,S){this.startX=S.getGraphX();this.startY=S.getGraphY();this.scrollLeft=F.container.scrollLeft;this.scrollTop=F.container.scrollTop},mouseMove:function(oa, +S){},mouseUp:function(oa,S){mxEvent.isTouchEvent(S.getEvent())&&Math.abs(this.scrollLeft-F.container.scrollLeft)<K&&Math.abs(this.scrollTop-F.container.scrollTop)<K&&Math.abs(this.startX-S.getGraphX())<K&&Math.abs(this.startY-S.getGraphY())<K&&(0<parseFloat(e.style.opacity||0)?C():p(30))}})}for(var P=this.toolbarItems,d=0,f=mxUtils.bind(this,function(oa,S,fa,ia){oa=this.createToolbarButton(oa,S,fa,ia);e.appendChild(oa);d++;return oa}),g=null,x=null,y=null,u=null,H=0;H<P.length;H++){var J=P[H];if("pages"== +J){u=b.ownerDocument.createElement("div");u.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;";mxUtils.setOpacity(u,70);var D=f(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");D.style.borderRightStyle="none";D.style.paddingLeft="0px";D.style.paddingRight="0px";e.appendChild(u);var G=f(mxUtils.bind(this, function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");G.style.paddingLeft="0px";G.style.paddingRight="0px";J=mxUtils.bind(this,function(){u.innerText="";mxUtils.write(u,this.currentPage+1+" / "+this.diagrams.length);u.style.display=1<this.diagrams.length?"inline-block":"none";D.style.display=u.style.display;G.style.display=u.style.display});this.addListener("graphChanged",J);J()}else if("zoom"==J)this.zoomEnabled&&(f(mxUtils.bind(this,function(){this.graph.zoomOut()}), -Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),f(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),f(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==J){if(this.layersEnabled){var V=this.graph.getModel(),U=f(mxUtils.bind(this,function(oa){if(null!= -g)g.parentNode.removeChild(g),g=null;else{g=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var da=this.graph.getGraphBounds(),ia=this.graph.view;0>da.x||0>da.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:ia.translate.clone(),scale:ia.scale}):null!=this.graph.originalViewState&&0<da.x/ia.scale+this.graph.originalViewState.translate.x-ia.translate.x&&0<da.y/ia.scale+this.graph.originalViewState.translate.y- -ia.translate.y&&(ia.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ia.translate.clone(),scale:ia.scale})}}));mxEvent.addListener(g,"mouseleave",function(){g.parentNode.removeChild(g);g=null});oa=U.getBoundingClientRect();g.style.width="140px";g.style.padding="2px 0px 2px 0px";g.style.border="1px solid #d0d0d0";g.style.backgroundColor="#eee";g.style.fontFamily=Editor.defaultHtmlFont; -g.style.fontSize="11px";g.style.overflowY="auto";g.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";g.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(g,80);var aa=mxUtils.getDocumentScrollOrigin(document);g.style.left=aa.x+oa.left-1+"px";g.style.top=aa.y+oa.bottom-2+"px";document.body.appendChild(g)}}),Editor.layersImage,mxResources.get("layers")||"Layers");V.addListener(mxEvent.CHANGE,function(){U.style.display=1<V.getChildCount(V.root)?"inline-block":"none"});U.style.display= -1<V.getChildCount(V.root)?"inline-block":"none"}}else if("tags"==J){if(this.tagsEnabled){var Y=f(mxUtils.bind(this,function(oa){null==x&&(x=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),x.div.getElementsByTagName("div")[0].style.position="",x.div.style.maxHeight="160px",x.div.style.maxWidth="120px",x.div.style.padding="2px",x.div.style.overflow="auto",x.div.style.height="auto",x.div.style.position="fixed",x.div.style.fontFamily=Editor.defaultHtmlFont,x.div.style.fontSize="11px", -x.div.style.backgroundColor="#eee",x.div.style.color="#000",x.div.style.border="1px solid #d0d0d0",x.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(x.div,80));if(null!=z)z.parentNode.removeChild(z),z=null;else{z=x.div;mxEvent.addListener(z,"mouseleave",function(){z.parentNode.removeChild(z);z=null});oa=Y.getBoundingClientRect();var aa=mxUtils.getDocumentScrollOrigin(document);z.style.left=aa.x+oa.left-1+"px";z.style.top=aa.y+oa.bottom-2+"px";document.body.appendChild(z);x.refresh()}}),Editor.tagsImage, -mxResources.get("tags")||"Tags");V.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){Y.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));Y.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==J?this.lightboxEnabled&&f(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(J=this.graphConfig["toolbar-buttons"][J],null!=J&&(J.elem=f(null== -J.enabled||J.enabled?J.handler:function(){},J.image,J.title,J.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*d);null!=this.graphConfig.title&&(Q=b.ownerDocument.createElement("div"),Q.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",Q.setAttribute("title",this.graphConfig.title),mxUtils.write(Q,this.graphConfig.title),mxUtils.setOpacity(Q,70), -e.appendChild(Q),this.filename=Q);this.minToolbarWidth=34*d;var O=b.style.border,qa=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var oa=b.getBoundingClientRect(),aa=mxUtils.getScrollOrigin(document.body);aa="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-aa.x,top:-aa.y};oa={left:oa.left- -aa.left,top:oa.top-aa.top,bottom:oa.bottom-aa.top,right:oa.right-aa.left};e.style.left=oa.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=oa.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=oa.top+1+"px"):e.style.top=oa.top+"px";"1px solid transparent"==O&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var da=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!= -g&&(g.parentNode.removeChild(g),g=null);b.style.border=O});mxEvent.addListener(document,"mousemove",function(ia){for(ia=mxEvent.getSource(ia);null!=ia;){if(ia==b||ia==e||ia==g)return;ia=ia.parentNode}da()});mxEvent.addListener(document.body,"mouseleave",function(ia){da()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",qa):qa();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!= +Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),f(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),f(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==J){if(this.layersEnabled){var W=this.graph.getModel(),T=f(mxUtils.bind(this,function(oa){if(null!= +g)g.parentNode.removeChild(g),g=null;else{g=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var fa=this.graph.getGraphBounds(),ia=this.graph.view;0>fa.x||0>fa.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:ia.translate.clone(),scale:ia.scale}):null!=this.graph.originalViewState&&0<fa.x/ia.scale+this.graph.originalViewState.translate.x-ia.translate.x&&0<fa.y/ia.scale+this.graph.originalViewState.translate.y- +ia.translate.y&&(ia.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ia.translate.clone(),scale:ia.scale})}}));mxEvent.addListener(g,"mouseleave",function(){g.parentNode.removeChild(g);g=null});oa=T.getBoundingClientRect();g.style.width="140px";g.style.padding="2px 0px 2px 0px";g.style.border="1px solid #d0d0d0";g.style.backgroundColor="#eee";g.style.fontFamily=Editor.defaultHtmlFont; +g.style.fontSize="11px";g.style.overflowY="auto";g.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";g.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(g,80);var S=mxUtils.getDocumentScrollOrigin(document);g.style.left=S.x+oa.left-1+"px";g.style.top=S.y+oa.bottom-2+"px";document.body.appendChild(g)}}),Editor.layersImage,mxResources.get("layers")||"Layers");W.addListener(mxEvent.CHANGE,function(){T.style.display=1<W.getChildCount(W.root)?"inline-block":"none"});T.style.display= +1<W.getChildCount(W.root)?"inline-block":"none"}}else if("tags"==J){if(this.tagsEnabled){var Z=f(mxUtils.bind(this,function(oa){null==x&&(x=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),x.div.getElementsByTagName("div")[0].style.position="",x.div.style.maxHeight="160px",x.div.style.maxWidth="120px",x.div.style.padding="2px",x.div.style.overflow="auto",x.div.style.height="auto",x.div.style.position="fixed",x.div.style.fontFamily=Editor.defaultHtmlFont,x.div.style.fontSize="11px", +x.div.style.backgroundColor="#eee",x.div.style.color="#000",x.div.style.border="1px solid #d0d0d0",x.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(x.div,80));if(null!=y)y.parentNode.removeChild(y),y=null;else{y=x.div;mxEvent.addListener(y,"mouseleave",function(){y.parentNode.removeChild(y);y=null});oa=Z.getBoundingClientRect();var S=mxUtils.getDocumentScrollOrigin(document);y.style.left=S.x+oa.left-1+"px";y.style.top=S.y+oa.bottom-2+"px";document.body.appendChild(y);x.refresh()}}),Editor.tagsImage, +mxResources.get("tags")||"Tags");W.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){Z.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));Z.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==J?this.lightboxEnabled&&f(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(J=this.graphConfig["toolbar-buttons"][J],null!=J&&(J.elem=f(null== +J.enabled||J.enabled?J.handler:function(){},J.image,J.title,J.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*d);null!=this.graphConfig.title&&(P=b.ownerDocument.createElement("div"),P.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",P.setAttribute("title",this.graphConfig.title),mxUtils.write(P,this.graphConfig.title),mxUtils.setOpacity(P,70), +e.appendChild(P),this.filename=P);this.minToolbarWidth=34*d;var N=b.style.border,qa=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var oa=b.getBoundingClientRect(),S=mxUtils.getScrollOrigin(document.body);S="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-S.x,top:-S.y};oa={left:oa.left- +S.left,top:oa.top-S.top,bottom:oa.bottom-S.top,right:oa.right-S.left};e.style.left=oa.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=oa.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=oa.top+1+"px"):e.style.top=oa.top+"px";"1px solid transparent"==N&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var fa=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=g&& +(g.parentNode.removeChild(g),g=null);b.style.border=N});mxEvent.addListener(document,"mousemove",function(ia){for(ia=mxEvent.getSource(ia);null!=ia;){if(ia==b||ia==e||ia==g)return;ia=ia.parentNode}fa()});mxEvent.addListener(document.body,"mouseleave",function(ia){fa()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",qa):qa();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!= e.parentNode&&qa()})).observe(b)}; GraphViewer.prototype.createToolbarButton=function(b,e,k,m){var C=document.createElement("div");C.style.borderRight="1px solid #d0d0d0";C.style.padding="3px 6px 3px 6px";mxEvent.addListener(C,"click",b);null!=k&&C.setAttribute("title",k);C.style.display="inline-block";b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",e);b.style.width="18px";null==m||m?(mxEvent.addListener(C,"mouseenter",function(){C.style.backgroundColor="#ddd"}),mxEvent.addListener(C,"mouseleave", function(){C.style.backgroundColor="#eee"}),mxUtils.setOpacity(b,60),C.style.cursor="pointer"):mxUtils.setOpacity(C,30);C.appendChild(b);return C};GraphViewer.prototype.disableButton=function(b){var e=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=e&&(mxUtils.setOpacity(e.elem,30),mxEvent.removeListener(e.elem,"click",e.handler),mxEvent.addListener(e.elem,"mouseenter",function(){e.elem.style.backgroundColor="#eee"}))}; @@ -4131,9 +4136,9 @@ this.graphConfig.highlight&&(k.highlight=this.graphConfig.highlight.substring(1) GraphViewer.prototype.showLocalLightbox=function(){mxUtils.getDocumentScrollOrigin(document);var b=document.createElement("div");b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeBlackImage);e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer"; mxEvent.addListener(e,"click",function(){m.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink= this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var k=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";var m=new EditorUi(new Editor(!0),document.createElement("div"),!0);m.editor.editBlankUrl=this.editBlankUrl;m.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=k; -m.refresh=function(){};var C=mxUtils.bind(this,function(g){27==g.keyCode&&m.destroy()}),p=this.initialOverflow,E=m.destroy;m.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",C);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow=p;GraphViewer.resizeSensorEnabled=!0;E.apply(this,arguments)};var K=m.editor.graph,Q=K.container;Q.style.overflow="hidden";this.lightboxChrome?(Q.style.border="1px solid #c0c0c0",Q.style.margin="40px",mxEvent.addListener(document.documentElement, -"keydown",C)):(b.style.display="none",e.style.display="none");var d=this;K.getImageFromBundles=function(g){return d.getImageUrl(g)};var f=m.createTemporaryGraph;m.createTemporaryGraph=function(){var g=f.apply(this,arguments);g.getImageFromBundles=function(x){return d.getImageUrl(x)};return g};this.graphConfig.move&&(K.isMoveCellsEvent=function(g){return!0});mxUtils.setPrefixedStyle(Q.style,"border-radius","4px");Q.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow= -"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(Q.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(Q.style,"transition","all .25s ease-in-out"));this.addClickHandler(K,m);window.setTimeout(mxUtils.bind(this,function(){Q.style.outline="none";Q.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(Q);document.body.appendChild(e);m.setFileData(this.xml);mxUtils.setPrefixedStyle(Q.style,"transform","rotateY(0deg)");m.chromelessToolbar.style.bottom= +m.refresh=function(){};var C=mxUtils.bind(this,function(g){27==g.keyCode&&m.destroy()}),p=this.initialOverflow,F=m.destroy;m.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",C);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow=p;GraphViewer.resizeSensorEnabled=!0;F.apply(this,arguments)};var K=m.editor.graph,P=K.container;P.style.overflow="hidden";this.lightboxChrome?(P.style.border="1px solid #c0c0c0",P.style.margin="40px",mxEvent.addListener(document.documentElement, +"keydown",C)):(b.style.display="none",e.style.display="none");var d=this;K.getImageFromBundles=function(g){return d.getImageUrl(g)};var f=m.createTemporaryGraph;m.createTemporaryGraph=function(){var g=f.apply(this,arguments);g.getImageFromBundles=function(x){return d.getImageUrl(x)};return g};this.graphConfig.move&&(K.isMoveCellsEvent=function(g){return!0});mxUtils.setPrefixedStyle(P.style,"border-radius","4px");P.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow= +"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(P.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(P.style,"transition","all .25s ease-in-out"));this.addClickHandler(K,m);window.setTimeout(mxUtils.bind(this,function(){P.style.outline="none";P.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(P);document.body.appendChild(e);m.setFileData(this.xml);mxUtils.setPrefixedStyle(P.style,"transform","rotateY(0deg)");m.chromelessToolbar.style.bottom= "60px";m.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(m.chromelessToolbar);m.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});m.lightboxFit();m.chromelessResize();this.showLayers(K,this.graph);mxEvent.addListener(b,"click",function(){m.destroy()})}),0);return m}; GraphViewer.prototype.updateTitle=function(b){b=b||"";this.showTitleAsTooltip&&null!=this.graph&&null!=this.graph.container&&this.graph.container.setAttribute("title",b);null!=this.filename&&(this.filename.innerText="",mxUtils.write(this.filename,b),this.filename.setAttribute("title",b))}; GraphViewer.processElements=function(b){mxUtils.forEach(GraphViewer.getElementsByClassName(b||"mxgraph"),function(e){try{e.innerText="",GraphViewer.createViewerForElement(e)}catch(k){e.innerText=k.message,null!=window.console&&console.error(k)}})}; @@ -4141,9 +4146,9 @@ GraphViewer.getElementsByClassName=function(b){if(document.getElementsByClassNam GraphViewer.createViewerForElement=function(b,e){var k=b.getAttribute("data-mxgraph");if(null!=k){var m=JSON.parse(k),C=function(p){p=mxUtils.parseXml(p);p=new GraphViewer(b,p.documentElement,m);null!=e&&e(p)};null!=m.url?GraphViewer.getUrl(m.url,function(p){C(p)}):C(m.xml)}}; GraphViewer.initCss=function(){try{var b=document.createElement("style");b.type="text/css";b.innerHTML="div.mxTooltip {\n-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n-moz-box-shadow: 3px 3px 12px #C0C0C0;\nbox-shadow: 3px 3px 12px #C0C0C0;\nbackground: #FFFFCC;\nborder-style: solid;\nborder-width: 1px;\nborder-color: black;\nfont-family: Arial;\nfont-size: 8pt;\nposition: absolute;\ncursor: default;\npadding: 4px;\ncolor: black;}\ntd.mxPopupMenuIcon div {\nwidth:16px;\nheight:16px;}\nhtml div.mxPopupMenu {\n-webkit-box-shadow:2px 2px 3px #d5d5d5;\n-moz-box-shadow:2px 2px 3px #d5d5d5;\nbox-shadow:2px 2px 3px #d5d5d5;\n_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0',Positive='true');\nbackground:white;\nposition:absolute;\nborder:3px solid #e7e7e7;\npadding:3px;}\nhtml table.mxPopupMenu {\nborder-collapse:collapse;\nmargin:0px;}\nhtml td.mxPopupMenuItem {\npadding:7px 30px 7px 30px;\nfont-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;}\nhtml td.mxPopupMenuIcon {\nbackground-color:white;\npadding:0px;}\ntd.mxPopupMenuIcon .geIcon {\npadding:2px;\npadding-bottom:4px;\nmargin:2px;\nborder:1px solid transparent;\nopacity:0.5;\n_width:26px;\n_height:26px;}\ntd.mxPopupMenuIcon .geIcon:hover {\nborder:1px solid gray;\nborder-radius:2px;\nopacity:1;}\nhtml tr.mxPopupMenuItemHover {\nbackground-color: #eeeeee;\ncolor: black;}\ntable.mxPopupMenu hr {\ncolor:#cccccc;\nbackground-color:#cccccc;\nborder:none;\nheight:1px;}\ntable.mxPopupMenu tr {\tfont-size:4pt;}\n.geDialog, .geDialog table { font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;\nborder:none;\nmargin:0px;}\n.geDialog {\tposition:absolute;\tbackground:white;\toverflow:hidden;\tpadding:30px;\tborder:1px solid #acacac;\t-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;\t-moz-box-shadow:0px 0px 2px 2px #d5d5d5;\tbox-shadow:0px 0px 2px 2px #d5d5d5;\t_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');\tz-index: 2;}.geDialogClose {\tposition:absolute;\twidth:9px;\theight:9px;\topacity:0.5;\tcursor:pointer;\t_filter:alpha(opacity=50);}.geDialogClose:hover {\topacity:1;}.geDialogTitle {\tbox-sizing:border-box;\twhite-space:nowrap;\tbackground:rgb(229, 229, 229);\tborder-bottom:1px solid rgb(192, 192, 192);\tfont-size:15px;\tfont-weight:bold;\ttext-align:center;\tcolor:rgb(35, 86, 149);}.geDialogFooter {\tbackground:whiteSmoke;\twhite-space:nowrap;\ttext-align:right;\tbox-sizing:border-box;\tborder-top:1px solid #e5e5e5;\tcolor:darkGray;}\n.geBtn {\tbackground-color: #f5f5f5;\tborder-radius: 2px;\tborder: 1px solid #d8d8d8;\tcolor: #333;\tcursor: default;\tfont-size: 11px;\tfont-weight: bold;\theight: 29px;\tline-height: 27px;\tmargin: 0 0 0 8px;\tmin-width: 72px;\toutline: 0;\tpadding: 0 8px;\tcursor: pointer;}.geBtn:hover, .geBtn:focus {\t-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\t-moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tbox-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tborder: 1px solid #c6c6c6;\tbackground-color: #f8f8f8;\tbackground-image: linear-gradient(#f8f8f8 0px,#f1f1f1 100%);\tcolor: #111;}.geBtn:disabled {\topacity: .5;}.gePrimaryBtn {\tbackground-color: #4d90fe;\tbackground-image: linear-gradient(#4d90fe 0px,#4787ed 100%);\tborder: 1px solid #3079ed;\tcolor: #fff;}.gePrimaryBtn:hover, .gePrimaryBtn:focus {\tbackground-color: #357ae8;\tbackground-image: linear-gradient(#4d90fe 0px,#357ae8 100%);\tborder: 1px solid #2f5bb7;\tcolor: #fff;}.gePrimaryBtn:disabled {\topacity: .5;}";document.getElementsByTagName("head")[0].appendChild(b)}catch(e){}}; GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,e,k){if(null!=GraphViewer.cachedUrls[b])e(GraphViewer.cachedUrls[b]);else{var m=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;m.open("GET",b);m.onload=function(){e(null!=m.getText?m.getText():m.responseText)};m.onerror=k;m.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0; -(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(k){return window.setTimeout(k,20)},e=function(k,m){function C(){this.q=[];this.add=function(z){this.q.push(z)};var g,x;this.call=function(){g=0;for(x=this.q.length;g<x;g++)this.q[g].call()}}function p(g,x){return g.currentStyle?g.currentStyle[x]:window.getComputedStyle?window.getComputedStyle(g,null).getPropertyValue(x):g.style[x]}function E(g,x){if(!g.resizedAttached)g.resizedAttached= +(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(k){return window.setTimeout(k,20)},e=function(k,m){function C(){this.q=[];this.add=function(y){this.q.push(y)};var g,x;this.call=function(){g=0;for(x=this.q.length;g<x;g++)this.q[g].call()}}function p(g,x){return g.currentStyle?g.currentStyle[x]:window.getComputedStyle?window.getComputedStyle(g,null).getPropertyValue(x):g.style[x]}function F(g,x){if(!g.resizedAttached)g.resizedAttached= new C,g.resizedAttached.add(x);else if(g.resizedAttached){g.resizedAttached.add(x);return}g.resizeSensor=document.createElement("div");g.resizeSensor.className="resize-sensor";g.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";g.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>'; -g.appendChild(g.resizeSensor);"static"==p(g,"position")&&(g.style.position="relative");var z=g.resizeSensor.childNodes[0],u=z.childNodes[0],H=g.resizeSensor.childNodes[1],J=function(){u.style.width="100000px";u.style.height="100000px";z.scrollLeft=1E5;z.scrollTop=1E5;H.scrollLeft=1E5;H.scrollTop=1E5};J();var D=!1,G=function(){g.resizedAttached&&(D&&(g.resizedAttached.call(),D=!1),b(G))};b(G);var V,U,Y,O;x=function(){if((Y=g.offsetWidth)!=V||(O=g.offsetHeight)!=U)D=!0,V=Y,U=O;J()};var qa=function(oa, -aa,da){oa.attachEvent?oa.attachEvent("on"+aa,da):oa.addEventListener(aa,da)};qa(z,"scroll",x);qa(H,"scroll",x)}var K=function(){GraphViewer.resizeSensorEnabled&&m()},Q=Object.prototype.toString.call(k),d="[object Array]"===Q||"[object NodeList]"===Q||"[object HTMLCollection]"===Q||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(d){Q=0;for(var f=k.length;Q<f;Q++)E(k[Q],K)}else E(k,K);this.detach=function(){if(d)for(var g=0,x=k.length;g<x;g++)e.detach(k[g]); +g.appendChild(g.resizeSensor);"static"==p(g,"position")&&(g.style.position="relative");var y=g.resizeSensor.childNodes[0],u=y.childNodes[0],H=g.resizeSensor.childNodes[1],J=function(){u.style.width="100000px";u.style.height="100000px";y.scrollLeft=1E5;y.scrollTop=1E5;H.scrollLeft=1E5;H.scrollTop=1E5};J();var D=!1,G=function(){g.resizedAttached&&(D&&(g.resizedAttached.call(),D=!1),b(G))};b(G);var W,T,Z,N;x=function(){if((Z=g.offsetWidth)!=W||(N=g.offsetHeight)!=T)D=!0,W=Z,T=N;J()};var qa=function(oa, +S,fa){oa.attachEvent?oa.attachEvent("on"+S,fa):oa.addEventListener(S,fa)};qa(y,"scroll",x);qa(H,"scroll",x)}var K=function(){GraphViewer.resizeSensorEnabled&&m()},P=Object.prototype.toString.call(k),d="[object Array]"===P||"[object NodeList]"===P||"[object HTMLCollection]"===P||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(d){P=0;for(var f=k.length;P<f;P++)F(k[P],K)}else F(k,K);this.detach=function(){if(d)for(var g=0,x=k.length;g<x;g++)e.detach(k[g]); else e.detach(k)}};e.detach=function(k){k.resizeSensor&&(k.removeChild(k.resizeSensor),delete k.resizeSensor,delete k.resizedAttached)};window.ResizeSensor=e})(); (function(){Editor.initMath();GraphViewer.initCss();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})(); diff --git a/src/main/webapp/mxgraph/mxClient.js b/src/main/webapp/mxgraph/mxClient.js index 625e4bfc..c971901a 100644 --- a/src/main/webapp/mxgraph/mxClient.js +++ b/src/main/webapp/mxgraph/mxClient.js @@ -1,4 +1,4 @@ -var mxClient={VERSION:"20.2.8",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"), +var mxClient={VERSION:"20.3.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"), IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor), IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&& 0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!== diff --git a/src/main/webapp/resources/dia_eu.txt b/src/main/webapp/resources/dia_eu.txt index cff2acd2..4c21a0c2 100644 --- a/src/main/webapp/resources/dia_eu.txt +++ b/src/main/webapp/resources/dia_eu.txt @@ -527,7 +527,7 @@ notAvailable=Ez dago eskuragarri notAUtf8File=Ez da UTF-8 fitxategia notConnected=Konektatu gabe note=Oharra -notion=Notion +notion=Ideia notSatisfiedWithImport=Inportazioak ez zaitu gogobete? notUsingService=Ez duzu {1} erabiltzen? numberedList=Zerrenda zenbakitua @@ -569,9 +569,9 @@ pan=Panoramika panTooltip=Zuriunea+Arrastatu panorama egiteko paperSize=Paperaren tamaina pattern=Txantiloia -parallels=Parallels +parallels=Paraleloak paste=Itsatsi -pasteData=Paste Data +pasteData=Itsatsi data pasteHere=Itsatsi hemen pasteSize=Itsatsi tamaina pasteStyle=Itsatsi estiloa @@ -1162,10 +1162,10 @@ changedBy=Honek aldatu du: lastModifiedOn=Azken aldaketaren data: searchResults=Bilatu emaitzak showAllTemps=Erakutsi txantiloi guztiak -notionToken=Notion Token +notionToken=Ideien tokena selectDB=Hautatu datubasea noDBs=Ez dago datubaserik -diagramEdited={1} diagram "{2}" edited +diagramEdited={1} diagrama "{2}" editatua confDraftPermissionErr=Zirriborroa ezin da idatzi. Eranskinak idazteko/irakurtzeko baimenik al duzu orrialde honetan? confDraftTooBigErr=Zirriborroaren tamaina handiegia da. Egiaztatu "Eranskinaren gehieneko tamaina" "Eranskinen ezarpenak" Confluence konfigurazioan? owner=Jabea @@ -1198,14 +1198,14 @@ confACleanOnly=Garbitu Dsigram zirriborroak bakarrik brush=Brotxa openDevTools=Ireki garatzaileen tresnak autoBkp=Babeskopia automatikoa -confAIgnoreCollectErr=Ignore collecting current pages errors -drafts=Drafts -draftSaveInt=Draft save interval [sec] (0 to disable) -pluginsDisabled=External plugins disabled. -extExpNotConfigured=External image service is not configured -pathFilename=Path/Filename -confAHugeInstances=Very Large Instances -confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details. -choosePageIDsFile=Choose current page IDs csv file -chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file -private=Private +confAIgnoreCollectErr=Ez ikusi uneko orrialdeen akatsak biltzea +drafts=Ziriborroak +draftSaveInt=Zirriborroa gordetzeko tartea [seg] (0 desgaitzeko) +pluginsDisabled=Kanpoko pluginak desgaituta daude. +extExpNotConfigured=Kanpoko irudi-zerbitzua ez dago konfiguratuta +pathFilename=Fitxategiaren bidea/izena +confAHugeInstances=Instantzia oso handiak +confAHugeInstancesDesc=Instantzia honek 100.000 orrialde baino gehiago baditu, azkarragoa da Atlassian-i uneko instantzien orrien zerrenda eskatzea. Mesedez, jarri harremanetan gure laguntza zerbitzuarekin xehetasun gehiago lortzeko. +choosePageIDsFile=Aukeratu uneko orriaren IDak csv fitxategia +chooseDrawioPsgesFile=Aukeratu draw.io diagramak csv fitxategia duten orrialdeak +private=Pribatua diff --git a/src/main/webapp/resources/dia_fr.txt b/src/main/webapp/resources/dia_fr.txt index a26d4e28..2461bf1f 100644 --- a/src/main/webapp/resources/dia_fr.txt +++ b/src/main/webapp/resources/dia_fr.txt @@ -89,7 +89,7 @@ cannotOpenFile=Impossible d'ouvrir le fichier change=Modifier changeOrientation=Modifier l’orientation changeUser=Modifier l'utilisateur -changeStorage=Change storage +changeStorage=Modifier le stockage changesNotSaved=Les modifcations n'ont pas été enregistrées classDiagram=Class Diagram userJoined={1} a rejoint @@ -195,7 +195,7 @@ discardChanges=Annuler les changements disconnected=Déconnecté distribute=Distribuer done=Termine -doNotShowAgain=Do not show again +doNotShowAgain=Ne plus afficher dotted=Pointillé doubleClickOrientation=Double-cliquer pour modifier l’orientation doubleClickTooltip=Double-cliquer pour insérer du texte @@ -238,7 +238,7 @@ googleImages=Google Images imageSearch=Recherche d'image eip=EIP embed=Intégrer -embedFonts=Embed Fonts +embedFonts=Intégrer les polices embedImages=Intégrer les images mainEmbedNotice=Coller cet élément dans la page electrical=Électricité @@ -688,7 +688,7 @@ shadow=Ombre shape=Forme shapes=Formes share=Partager -shareCursor=Share Mouse Cursor +shareCursor=Partager le curseur de la souris shareLink=Lien pour l'édition partagée sharingAvailable=Sharing available for Google Drive and OneDrive files. sharp=Dur @@ -760,7 +760,7 @@ uml=UML underline=Souligner undo=Annuler ungroup=Dissocier -unmerge=Unmerge +unmerge=Démêler unsavedChanges=Modifications non enregistrées unsavedChangesClickHereToSave=Modifications non enregistrées. Cliquez ici pour enregistrer. untitled=Sans nom @@ -1042,7 +1042,7 @@ smart=Smart parentChildSpacing=Parent Child Spacing siblingSpacing=Espace entre colatéraux confNoPermErr=Sorry, you don't have enough permissions to view this embedded diagram from page {1} -copyAsImage=Copy as Image +copyAsImage=Copier en tant qu'image lucidImport=Lucidchart Import lucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams. installFirst=Please install {1} first @@ -1103,7 +1103,7 @@ unsupportedFileChckUrl=Unsupported file. Please check the specified URL diagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL csvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL cantReadUpload=Cannot read the uploaded diagram -select=Select +select=Sélectionner errCantGetIdType=Unexpected Error: Cannot get content id or type. errGAuthWinBlocked=Error: Google Authentication window blocked authDrawAccess=Authorize draw.io to access {1} @@ -1161,22 +1161,22 @@ linkToDiagram=Link to Diagram changedBy=Changed By lastModifiedOn=Last modified on searchResults=Search Results -showAllTemps=Show all templates +showAllTemps=Afficher tous les modèles notionToken=Notion Token selectDB=Sélectionner une base de données noDBs=Aucune base de données diagramEdited={1} diagram "{2}" edited confDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page? confDraftTooBigErr=Draft size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration? -owner=Owner +owner=Propriétaire repository=Repository branch=Branch -meters=Meters +meters=Mètres teamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser) contactOwner=Contact Owner viewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser. -website=Website -check4Updates=Check for updates +website=Site web +check4Updates=Rechercher les mises à jour attWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds... confPartialPageList=We couldn't fetch all pages due to an error in Confluence. Continuing using {1} pages only. spellCheck=Spell checker @@ -1199,7 +1199,7 @@ brush=Brush openDevTools=Open Developer Tools autoBkp=Automatic Backup confAIgnoreCollectErr=Ignore collecting current pages errors -drafts=Drafts +drafts=Brouillons draftSaveInt=Draft save interval [sec] (0 to disable) pluginsDisabled=External plugins disabled. extExpNotConfigured=External image service is not configured @@ -1208,4 +1208,4 @@ confAHugeInstances=Very Large Instances confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details. choosePageIDsFile=Choose current page IDs csv file chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file -private=Private +private=Privé diff --git a/src/main/webapp/service-worker.js b/src/main/webapp/service-worker.js index 10836156..1f22a41e 100644 --- a/src/main/webapp/service-worker.js +++ b/src/main/webapp/service-worker.js @@ -1,2 +1,2 @@ -if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let r=Promise.resolve();return i[e]||(r=new Promise((async r=>{if("document"in self){const i=document.createElement("script");i.src=e,document.head.appendChild(i),i.onload=r}else importScripts(e),r()}))),r.then((()=>{if(!i[e])throw new Error(`Module ${e} didn’t register its module`);return i[e]}))},r=(r,i)=>{Promise.all(r.map(e)).then((e=>i(1===e.length?e[0]:e)))},i={require:Promise.resolve(r)};self.define=(r,c,a)=>{i[r]||(i[r]=Promise.resolve().then((()=>{let i={};const s={uri:location.origin+r.slice(1)};return Promise.all(c.map((r=>{switch(r){case"exports":return i;case"module":return s;default:return e(r)}}))).then((e=>{const r=a(...e);return i.default||(i.default=r),i}))})))}}define("./service-worker.js",["./workbox-4768a546"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"js/app.min.js",revision:"251d94e98424fa06a49467f7c9570cdb"},{url:"js/extensions.min.js",revision:"a6b272e834a0a5032db20b0c99ec7ce6"},{url:"js/stencils.min.js",revision:"3d96d1eb82e1110df9f3a549d83d19db"},{url:"js/shapes-14-6-5.min.js",revision:"5f31b0ee8f38bb810dca0906e86300f2"},{url:"js/math-print.js",revision:"acea91d5b3b68fdec3f02c08a087aeb0"},{url:"index.html",revision:"8b5b1cf07fc74454cf354717e9d18534"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"4f2c07c4585347249c95cd9158872fb2"},{url:"styles/atlas.css",revision:"e8152cda9233d3a3af017422993abfce"},{url:"styles/dark.css",revision:"06d77cbda9c3ebf49e244567f20e5dbc"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"84c2007a05b742a84a50a47fc05de66c"},{url:"connect/jira/editor-1-3-3.html",revision:"a2b0e7267a08a838f3cc404eba831ec0"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"c96db1790184cb35781f791e8d1dafd9"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"ba7ece2dfb2833b72f97280d7092f25e"},{url:"connect/jira/viewerPanel.js",revision:"df9ba18d1f247c069258c13516f78a9d"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"01caa325f3ad3f6565e0b4228907fb63"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"e00ad51fc16b87c362d6eaf930ab1fa5"},{url:"connect/jira/fullscreen-viewer.js",revision:"4e0775a6c156a803e777870623ac7c3e"},{url:"plugins/connectJira.js",revision:"4cefa13414e0d406550f3c073923080c"},{url:"plugins/cConf-comments.js",revision:"c787357209cff2986dcca567b599e2ef"},{url:"plugins/cConf-1-4-8.js",revision:"5cbc270aa83ca3972060fac0317d47aa"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"38d6ec07d4fe5dbb99dcde29a84a1447"},{url:"connect/new_common/cac.js",revision:"3d8c436c566db645fb1e6e6ba9f69bbc"},{url:"connect/gdrive_common/gac.js",revision:"38f1df3ecc4d78290493f47e62202138"},{url:"connect/onedrive_common/ac.js",revision:"d089f12446d443ca01752a5115456fcc"},{url:"connect/confluence/viewer-init.js",revision:"8aa8d02147def4535563bc65632a3e6d"},{url:"connect/confluence/viewer.js",revision:"3e57b80290703eb71edc942d86e2e385"},{url:"connect/confluence/viewer-1-4-42.html",revision:"c14807286438f2236b44c9fb78eb4bb3"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"8cd74a2fb60bf2e3e86026d66107cf11"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"c8411f9ffe8d33c461676508f1c2d388"},{url:"connect/confluence/includeDiagram.html",revision:"1f2e4d088a8a1525ba047239643f3f4f"},{url:"connect/confluence/macro-editor.js",revision:"412bc4b87e630b697a40f247c579d398"},{url:"math/es5/startup.js",revision:"dc7130cdc866593293dbb5dde11ceb40"},{url:"math/es5/core.js",revision:"f71bc0bfb7d2ac8261747f97a5d47dd4"},{url:"math/es5/output/svg.js",revision:"4f55967d16197ebb01b86356d8ab179a"},{url:"math/es5/input/tex.js",revision:"5c4f470da2ccb1acf85041fcecd6fff6"},{url:"math/es5/input/asciimath.js",revision:"c2d4076dd8e26d509bfe3a378e71cfa7"},{url:"math/es5/output/svg/fonts/tex.js",revision:"6eab785a3788ea805bd2b552d1f0aab8"},{url:"resources/dia.txt",revision:"b4882fa73042c95c33e2b0d423f3489a"},{url:"resources/dia_am.txt",revision:"28ac9e18c8a09680714c474d7312b79b"},{url:"resources/dia_ar.txt",revision:"e6372c6fd658fe2f57ec33e55820a20b"},{url:"resources/dia_bg.txt",revision:"943ce2c53ecd94f5395a2d9c889af908"},{url:"resources/dia_bn.txt",revision:"d1cf44cc4b9b72f76d55d6dc5022cdc9"},{url:"resources/dia_bs.txt",revision:"039ab75e9330bb0e3f8d9e98cfbe3dab"},{url:"resources/dia_ca.txt",revision:"b955242f6e100ced4c965bfbc7aee610"},{url:"resources/dia_cs.txt",revision:"376b21e08a50c1a3cd12461dc8ae4137"},{url:"resources/dia_da.txt",revision:"331e73df843d992999b7b15e846f9ea9"},{url:"resources/dia_de.txt",revision:"75313e231874d093176e2e849b66c43f"},{url:"resources/dia_el.txt",revision:"16c64fde35cf6dc8530651c39df83eba"},{url:"resources/dia_eo.txt",revision:"b4c5f45691abf8f4d6ac7d721d6790f5"},{url:"resources/dia_es.txt",revision:"808abd0f3bc5cc76f2882742a2b9fb77"},{url:"resources/dia_et.txt",revision:"9fd5d06f519256e4913feea4a9739eff"},{url:"resources/dia_eu.txt",revision:"e209045f62ccf5aa4e6d3bab98a38f38"},{url:"resources/dia_fa.txt",revision:"3e3cbd19c527489dfda1f8e630c988ae"},{url:"resources/dia_fi.txt",revision:"96eaa2f5b2f0adbe943994fce638b616"},{url:"resources/dia_fil.txt",revision:"8cc7d2ea86d9826f1c3e022f018c03cd"},{url:"resources/dia_fr.txt",revision:"7620ed9bf78c10351f0d58da4597e97a"},{url:"resources/dia_gl.txt",revision:"210c259d3999c9a69babec4657e41ca7"},{url:"resources/dia_gu.txt",revision:"ec928ded61681856c7cf597007e813e6"},{url:"resources/dia_he.txt",revision:"1574e96fe2a62a079855dddeff8ed525"},{url:"resources/dia_hi.txt",revision:"6a6468379a5c34f729a7aefe7e89ee51"},{url:"resources/dia_hr.txt",revision:"11410eaeccedd4bc69bb9b4f9b2f2333"},{url:"resources/dia_hu.txt",revision:"f0ef067bd037594e12fb8d51a82b4602"},{url:"resources/dia_id.txt",revision:"9a4ef05dfb8084dc3badaea323920e1b"},{url:"resources/dia_it.txt",revision:"bfd27e3d624bc04b5900e8312a43cc53"},{url:"resources/dia_ja.txt",revision:"70ab707c2be3e7d6a3a3f842f7a3634b"},{url:"resources/dia_kn.txt",revision:"7010d08f01632c36b6fa0e8797f90757"},{url:"resources/dia_ko.txt",revision:"7cd9ed0c6977e012f78f029e2aa34c44"},{url:"resources/dia_lt.txt",revision:"a86d4b49a7ba3c63232bc73ff09ada10"},{url:"resources/dia_lv.txt",revision:"11977900dfe9818ec8dc875660b98506"},{url:"resources/dia_ml.txt",revision:"6c293d98312d34ba69b5ac2f5a76e383"},{url:"resources/dia_mr.txt",revision:"a5195f46b671284a6f4ae440274c2e85"},{url:"resources/dia_ms.txt",revision:"74b3057d958779d892246ee63188c6c6"},{url:"resources/dia_my.txt",revision:"b4882fa73042c95c33e2b0d423f3489a"},{url:"resources/dia_nl.txt",revision:"56cbe24705df20d692d622d29b3533ea"},{url:"resources/dia_no.txt",revision:"30df0498ebcc2eb59f81b1d691b69ff1"},{url:"resources/dia_pl.txt",revision:"b514a4ec516d8184ad2ff4a65a60cda5"},{url:"resources/dia_pt-br.txt",revision:"f798286d581a0e74fe1d5d9c6c396a41"},{url:"resources/dia_pt.txt",revision:"5565ccf82e7cfe9e2e121774610eda45"},{url:"resources/dia_ro.txt",revision:"151ee594248acdbe158e88842cb2ff7a"},{url:"resources/dia_ru.txt",revision:"631a424b62199bbe1367a965f87812ee"},{url:"resources/dia_si.txt",revision:"b4882fa73042c95c33e2b0d423f3489a"},{url:"resources/dia_sk.txt",revision:"99f16f5c7664920e2654dc6e5376e25e"},{url:"resources/dia_sl.txt",revision:"3c02f3678d513130dedefdfe343947e0"},{url:"resources/dia_sr.txt",revision:"09bd67f9ec4fc5d3be6f0c8a7d5e659b"},{url:"resources/dia_sv.txt",revision:"dff62533d217d37f125611646e2f6c95"},{url:"resources/dia_sw.txt",revision:"7ec1bc477d8da9df5cbf875b14ce194d"},{url:"resources/dia_ta.txt",revision:"75c252159b55a44128bea76a28067a24"},{url:"resources/dia_te.txt",revision:"b07781b7a16832b05e5fb8314b20557d"},{url:"resources/dia_th.txt",revision:"51ac0a933b02010c21267dd35355f99b"},{url:"resources/dia_tr.txt",revision:"f1fc3b9d9c9f6cc16cb8479f6aece146"},{url:"resources/dia_uk.txt",revision:"cff00ca7d00c63f3c4034c31bf07d593"},{url:"resources/dia_vi.txt",revision:"51794054cc1717fc8b3fd033f3f56669"},{url:"resources/dia_zh-tw.txt",revision:"8b826b67aa047030a3bc97fc7759ec30"},{url:"resources/dia_zh.txt",revision:"28f6868d073105e3365f87342fc6c6d8"},{url:"favicon.ico",revision:"fab2d88b37c72d83607527573de45281"},{url:"images/manifest.json",revision:"c6236bde53ed79aaaec60a1aca8ee2ef"},{url:"images/logo.png",revision:"89630b64b911ebe0daa3dfe442087cfa"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/drawlogo48.png",revision:"8b13428373aca67b895364d025f42417"},{url:"images/drawlogo-gray.svg",revision:"0aabacbc0873816e1e09e4736ae44c7d"},{url:"images/drawlogo-text-bottom.svg",revision:"f6c438823ab31f290940bd4feb8dd9c2"},{url:"images/default-user.jpg",revision:"2c399696a87c8921f12d2f9e1990cc6e"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"73da7989a23ce9a4be565ec65658a239"},{url:"images/favicon-16x16.png",revision:"1a79d5461a5d2bf21f6652e0ac20d6e5"},{url:"images/favicon-32x32.png",revision:"e3b92da2febe70bad5372f6f3474b034"},{url:"images/android-chrome-196x196.png",revision:"f8c045b2d7b1c719fda64edab04c415c"},{url:"images/android-chrome-512x512.png",revision:"959b5fac2453963ff6d60fb85e4b73fd"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/help.png",revision:"9266c6c3915bd33c243d80037d37bf61"},{url:"images/download.png",revision:"35418dd7bd48d87502c71b578cc6c37f"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",revision:"c350d9d9b95f37b6cfe798b40ede5fb0"},{url:"images/google-drive-logo-white.svg",revision:"f329d8b1be7778515a85b93fc35d9f26"},{url:"images/dropbox-logo-white.svg",revision:"4ea8299ac3bc31a16f199ee3aec223bf"},{url:"images/onedrive-logo-white.svg",revision:"b3602fa0fc947009cff3f33a581cff4d"},{url:"images/github-logo-white.svg",revision:"537b1127b3ca0f95b45782d1304fb77a"},{url:"images/gitlab-logo-white.svg",revision:"5fede9ac2f394c716b8c23e3fddc3910"},{url:"images/trello-logo-white-orange.svg",revision:"e2a0a52ba3766682f138138d10a75eb5"},{url:"images/logo-confluence.png",revision:"ed1e55d44ae5eba8f999aba2c93e8331"},{url:"images/logo-jira.png",revision:"f8d460555a0d1f87cfd901e940666629"},{url:"images/clear.gif",revision:"db13c778e4382e0b55258d0f811d5d70"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/checkmark.gif",revision:"ba764ce62f2bf952df5bbc2bb4d381c5"},{url:"images/hs.png",revision:"fefa1a03d92ebad25c88dca94a0b63db"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"b5b7280ec98671bb6c3847a36bc7ea12"},{url:"mxgraph/images/expanded.gif",revision:"2b67c2c035af1e9a5cc814f0d22074cf"},{url:"mxgraph/images/collapsed.gif",revision:"73cc826da002a3d740ca4ce6ec5c1f4a"},{url:"mxgraph/images/maximize.gif",revision:"5cd13d6925493ab51e876694cc1c2ec2"},{url:"mxgraph/images/minimize.gif",revision:"8957741b9b0f86af9438775f2aadbb54"},{url:"mxgraph/images/close.gif",revision:"8b84669812ac7382984fca35de8da48b"},{url:"mxgraph/images/resize.gif",revision:"a6477612b3567a34033f9cac6184eed3"},{url:"mxgraph/images/separator.gif",revision:"7819742ff106c97da7a801c2372bbbe5"},{url:"mxgraph/images/window.gif",revision:"fd9a21dd4181f98052a202a0a01f18ab"},{url:"mxgraph/images/window-title.gif",revision:"3fb1d6c43246cdf991a11dfe826dfe99"},{url:"mxgraph/images/button.gif",revision:"00759bdc3ad218fa739f584369541809"},{url:"mxgraph/images/point.gif",revision:"83a43717b284902442620f61bc4e9fa6"}],{ignoreURLParametersMatching:[/.*/]})})); +if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let r=Promise.resolve();return i[e]||(r=new Promise((async r=>{if("document"in self){const i=document.createElement("script");i.src=e,document.head.appendChild(i),i.onload=r}else importScripts(e),r()}))),r.then((()=>{if(!i[e])throw new Error(`Module ${e} didn’t register its module`);return i[e]}))},r=(r,i)=>{Promise.all(r.map(e)).then((e=>i(1===e.length?e[0]:e)))},i={require:Promise.resolve(r)};self.define=(r,c,a)=>{i[r]||(i[r]=Promise.resolve().then((()=>{let i={};const s={uri:location.origin+r.slice(1)};return Promise.all(c.map((r=>{switch(r){case"exports":return i;case"module":return s;default:return e(r)}}))).then((e=>{const r=a(...e);return i.default||(i.default=r),i}))})))}}define("./service-worker.js",["./workbox-4768a546"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"js/app.min.js",revision:"bd7965a97ad4dda04d5cc5112c0897e1"},{url:"js/extensions.min.js",revision:"a6b272e834a0a5032db20b0c99ec7ce6"},{url:"js/stencils.min.js",revision:"3d96d1eb82e1110df9f3a549d83d19db"},{url:"js/shapes-14-6-5.min.js",revision:"5f31b0ee8f38bb810dca0906e86300f2"},{url:"js/math-print.js",revision:"acea91d5b3b68fdec3f02c08a087aeb0"},{url:"index.html",revision:"ce45ae8650f5c256034bb1cb01a8278b"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"4f2c07c4585347249c95cd9158872fb2"},{url:"styles/atlas.css",revision:"47f4071d6d5308d3469de007d510ea12"},{url:"styles/dark.css",revision:"06d77cbda9c3ebf49e244567f20e5dbc"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"74a0628d7ed019faac08680c1e5eda18"},{url:"connect/jira/editor-1-3-3.html",revision:"a2b0e7267a08a838f3cc404eba831ec0"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"c96db1790184cb35781f791e8d1dafd9"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"ba7ece2dfb2833b72f97280d7092f25e"},{url:"connect/jira/viewerPanel.js",revision:"df9ba18d1f247c069258c13516f78a9d"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"36146c8b69293c22554aa861de8a5e71"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"e00ad51fc16b87c362d6eaf930ab1fa5"},{url:"connect/jira/fullscreen-viewer.js",revision:"4e0775a6c156a803e777870623ac7c3e"},{url:"plugins/connectJira.js",revision:"4cefa13414e0d406550f3c073923080c"},{url:"plugins/cConf-comments.js",revision:"c787357209cff2986dcca567b599e2ef"},{url:"plugins/cConf-1-4-8.js",revision:"5cbc270aa83ca3972060fac0317d47aa"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"6028a57f97e49ee6fc173dcae2e9c8e8"},{url:"connect/new_common/cac.js",revision:"3d8c436c566db645fb1e6e6ba9f69bbc"},{url:"connect/gdrive_common/gac.js",revision:"38f1df3ecc4d78290493f47e62202138"},{url:"connect/onedrive_common/ac.js",revision:"d089f12446d443ca01752a5115456fcc"},{url:"connect/confluence/viewer-init.js",revision:"8aa8d02147def4535563bc65632a3e6d"},{url:"connect/confluence/viewer.js",revision:"3e57b80290703eb71edc942d86e2e385"},{url:"connect/confluence/viewer-1-4-42.html",revision:"c14807286438f2236b44c9fb78eb4bb3"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"8cd74a2fb60bf2e3e86026d66107cf11"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"c8411f9ffe8d33c461676508f1c2d388"},{url:"connect/confluence/includeDiagram.html",revision:"1f2e4d088a8a1525ba047239643f3f4f"},{url:"connect/confluence/macro-editor.js",revision:"412bc4b87e630b697a40f247c579d398"},{url:"math/es5/startup.js",revision:"dc7130cdc866593293dbb5dde11ceb40"},{url:"math/es5/core.js",revision:"f71bc0bfb7d2ac8261747f97a5d47dd4"},{url:"math/es5/output/svg.js",revision:"4f55967d16197ebb01b86356d8ab179a"},{url:"math/es5/input/tex.js",revision:"5c4f470da2ccb1acf85041fcecd6fff6"},{url:"math/es5/input/asciimath.js",revision:"c2d4076dd8e26d509bfe3a378e71cfa7"},{url:"math/es5/output/svg/fonts/tex.js",revision:"6eab785a3788ea805bd2b552d1f0aab8"},{url:"resources/dia.txt",revision:"b4882fa73042c95c33e2b0d423f3489a"},{url:"resources/dia_am.txt",revision:"28ac9e18c8a09680714c474d7312b79b"},{url:"resources/dia_ar.txt",revision:"e6372c6fd658fe2f57ec33e55820a20b"},{url:"resources/dia_bg.txt",revision:"943ce2c53ecd94f5395a2d9c889af908"},{url:"resources/dia_bn.txt",revision:"d1cf44cc4b9b72f76d55d6dc5022cdc9"},{url:"resources/dia_bs.txt",revision:"039ab75e9330bb0e3f8d9e98cfbe3dab"},{url:"resources/dia_ca.txt",revision:"b955242f6e100ced4c965bfbc7aee610"},{url:"resources/dia_cs.txt",revision:"376b21e08a50c1a3cd12461dc8ae4137"},{url:"resources/dia_da.txt",revision:"331e73df843d992999b7b15e846f9ea9"},{url:"resources/dia_de.txt",revision:"75313e231874d093176e2e849b66c43f"},{url:"resources/dia_el.txt",revision:"16c64fde35cf6dc8530651c39df83eba"},{url:"resources/dia_eo.txt",revision:"b4c5f45691abf8f4d6ac7d721d6790f5"},{url:"resources/dia_es.txt",revision:"808abd0f3bc5cc76f2882742a2b9fb77"},{url:"resources/dia_et.txt",revision:"9fd5d06f519256e4913feea4a9739eff"},{url:"resources/dia_eu.txt",revision:"7c7596c99a5a0cedc0b6cba6559c4940"},{url:"resources/dia_fa.txt",revision:"3e3cbd19c527489dfda1f8e630c988ae"},{url:"resources/dia_fi.txt",revision:"96eaa2f5b2f0adbe943994fce638b616"},{url:"resources/dia_fil.txt",revision:"8cc7d2ea86d9826f1c3e022f018c03cd"},{url:"resources/dia_fr.txt",revision:"98efe277ec681a6484f1d2e591cfeb8d"},{url:"resources/dia_gl.txt",revision:"210c259d3999c9a69babec4657e41ca7"},{url:"resources/dia_gu.txt",revision:"ec928ded61681856c7cf597007e813e6"},{url:"resources/dia_he.txt",revision:"1574e96fe2a62a079855dddeff8ed525"},{url:"resources/dia_hi.txt",revision:"6a6468379a5c34f729a7aefe7e89ee51"},{url:"resources/dia_hr.txt",revision:"11410eaeccedd4bc69bb9b4f9b2f2333"},{url:"resources/dia_hu.txt",revision:"f0ef067bd037594e12fb8d51a82b4602"},{url:"resources/dia_id.txt",revision:"9a4ef05dfb8084dc3badaea323920e1b"},{url:"resources/dia_it.txt",revision:"bfd27e3d624bc04b5900e8312a43cc53"},{url:"resources/dia_ja.txt",revision:"70ab707c2be3e7d6a3a3f842f7a3634b"},{url:"resources/dia_kn.txt",revision:"7010d08f01632c36b6fa0e8797f90757"},{url:"resources/dia_ko.txt",revision:"7cd9ed0c6977e012f78f029e2aa34c44"},{url:"resources/dia_lt.txt",revision:"a86d4b49a7ba3c63232bc73ff09ada10"},{url:"resources/dia_lv.txt",revision:"11977900dfe9818ec8dc875660b98506"},{url:"resources/dia_ml.txt",revision:"6c293d98312d34ba69b5ac2f5a76e383"},{url:"resources/dia_mr.txt",revision:"a5195f46b671284a6f4ae440274c2e85"},{url:"resources/dia_ms.txt",revision:"74b3057d958779d892246ee63188c6c6"},{url:"resources/dia_my.txt",revision:"b4882fa73042c95c33e2b0d423f3489a"},{url:"resources/dia_nl.txt",revision:"56cbe24705df20d692d622d29b3533ea"},{url:"resources/dia_no.txt",revision:"30df0498ebcc2eb59f81b1d691b69ff1"},{url:"resources/dia_pl.txt",revision:"b514a4ec516d8184ad2ff4a65a60cda5"},{url:"resources/dia_pt-br.txt",revision:"f798286d581a0e74fe1d5d9c6c396a41"},{url:"resources/dia_pt.txt",revision:"5565ccf82e7cfe9e2e121774610eda45"},{url:"resources/dia_ro.txt",revision:"151ee594248acdbe158e88842cb2ff7a"},{url:"resources/dia_ru.txt",revision:"631a424b62199bbe1367a965f87812ee"},{url:"resources/dia_si.txt",revision:"b4882fa73042c95c33e2b0d423f3489a"},{url:"resources/dia_sk.txt",revision:"99f16f5c7664920e2654dc6e5376e25e"},{url:"resources/dia_sl.txt",revision:"3c02f3678d513130dedefdfe343947e0"},{url:"resources/dia_sr.txt",revision:"09bd67f9ec4fc5d3be6f0c8a7d5e659b"},{url:"resources/dia_sv.txt",revision:"dff62533d217d37f125611646e2f6c95"},{url:"resources/dia_sw.txt",revision:"7ec1bc477d8da9df5cbf875b14ce194d"},{url:"resources/dia_ta.txt",revision:"75c252159b55a44128bea76a28067a24"},{url:"resources/dia_te.txt",revision:"b07781b7a16832b05e5fb8314b20557d"},{url:"resources/dia_th.txt",revision:"51ac0a933b02010c21267dd35355f99b"},{url:"resources/dia_tr.txt",revision:"f1fc3b9d9c9f6cc16cb8479f6aece146"},{url:"resources/dia_uk.txt",revision:"cff00ca7d00c63f3c4034c31bf07d593"},{url:"resources/dia_vi.txt",revision:"51794054cc1717fc8b3fd033f3f56669"},{url:"resources/dia_zh-tw.txt",revision:"8b826b67aa047030a3bc97fc7759ec30"},{url:"resources/dia_zh.txt",revision:"28f6868d073105e3365f87342fc6c6d8"},{url:"favicon.ico",revision:"fab2d88b37c72d83607527573de45281"},{url:"images/manifest.json",revision:"c6236bde53ed79aaaec60a1aca8ee2ef"},{url:"images/logo.png",revision:"89630b64b911ebe0daa3dfe442087cfa"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/drawlogo48.png",revision:"8b13428373aca67b895364d025f42417"},{url:"images/drawlogo-gray.svg",revision:"0aabacbc0873816e1e09e4736ae44c7d"},{url:"images/drawlogo-text-bottom.svg",revision:"f6c438823ab31f290940bd4feb8dd9c2"},{url:"images/default-user.jpg",revision:"2c399696a87c8921f12d2f9e1990cc6e"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"73da7989a23ce9a4be565ec65658a239"},{url:"images/favicon-16x16.png",revision:"1a79d5461a5d2bf21f6652e0ac20d6e5"},{url:"images/favicon-32x32.png",revision:"e3b92da2febe70bad5372f6f3474b034"},{url:"images/android-chrome-196x196.png",revision:"f8c045b2d7b1c719fda64edab04c415c"},{url:"images/android-chrome-512x512.png",revision:"959b5fac2453963ff6d60fb85e4b73fd"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/help.png",revision:"9266c6c3915bd33c243d80037d37bf61"},{url:"images/download.png",revision:"35418dd7bd48d87502c71b578cc6c37f"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",revision:"c350d9d9b95f37b6cfe798b40ede5fb0"},{url:"images/google-drive-logo-white.svg",revision:"f329d8b1be7778515a85b93fc35d9f26"},{url:"images/dropbox-logo-white.svg",revision:"4ea8299ac3bc31a16f199ee3aec223bf"},{url:"images/onedrive-logo-white.svg",revision:"b3602fa0fc947009cff3f33a581cff4d"},{url:"images/github-logo-white.svg",revision:"537b1127b3ca0f95b45782d1304fb77a"},{url:"images/gitlab-logo-white.svg",revision:"5fede9ac2f394c716b8c23e3fddc3910"},{url:"images/trello-logo-white-orange.svg",revision:"e2a0a52ba3766682f138138d10a75eb5"},{url:"images/logo-confluence.png",revision:"ed1e55d44ae5eba8f999aba2c93e8331"},{url:"images/logo-jira.png",revision:"f8d460555a0d1f87cfd901e940666629"},{url:"images/clear.gif",revision:"db13c778e4382e0b55258d0f811d5d70"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/checkmark.gif",revision:"ba764ce62f2bf952df5bbc2bb4d381c5"},{url:"images/hs.png",revision:"fefa1a03d92ebad25c88dca94a0b63db"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"b5b7280ec98671bb6c3847a36bc7ea12"},{url:"mxgraph/images/expanded.gif",revision:"2b67c2c035af1e9a5cc814f0d22074cf"},{url:"mxgraph/images/collapsed.gif",revision:"73cc826da002a3d740ca4ce6ec5c1f4a"},{url:"mxgraph/images/maximize.gif",revision:"5cd13d6925493ab51e876694cc1c2ec2"},{url:"mxgraph/images/minimize.gif",revision:"8957741b9b0f86af9438775f2aadbb54"},{url:"mxgraph/images/close.gif",revision:"8b84669812ac7382984fca35de8da48b"},{url:"mxgraph/images/resize.gif",revision:"a6477612b3567a34033f9cac6184eed3"},{url:"mxgraph/images/separator.gif",revision:"7819742ff106c97da7a801c2372bbbe5"},{url:"mxgraph/images/window.gif",revision:"fd9a21dd4181f98052a202a0a01f18ab"},{url:"mxgraph/images/window-title.gif",revision:"3fb1d6c43246cdf991a11dfe826dfe99"},{url:"mxgraph/images/button.gif",revision:"00759bdc3ad218fa739f584369541809"},{url:"mxgraph/images/point.gif",revision:"83a43717b284902442620f61bc4e9fa6"}],{ignoreURLParametersMatching:[/.*/]})})); //# sourceMappingURL=service-worker.js.map diff --git a/src/main/webapp/service-worker.js.map b/src/main/webapp/service-worker.js.map index d4ed138c..50a0a899 100644 --- a/src/main/webapp/service-worker.js.map +++ b/src/main/webapp/service-worker.js.map @@ -1 +1 @@ -{"version":3,"file":"service-worker.js","sources":["../../../../../../../tmp/4e85f95a695a68d7cd3d6d6a08eb6f14/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/opt/hostedtoolcache/node/14.20.0/x64/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.addEventListener('message', (event) => {\n if (event.data && event.data.type === 'SKIP_WAITING') {\n self.skipWaiting();\n }\n});\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"251d94e98424fa06a49467f7c9570cdb\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"a6b272e834a0a5032db20b0c99ec7ce6\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"3d96d1eb82e1110df9f3a549d83d19db\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"5f31b0ee8f38bb810dca0906e86300f2\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"acea91d5b3b68fdec3f02c08a087aeb0\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"8b5b1cf07fc74454cf354717e9d18534\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"styles/fonts/ArchitectsDaughter-Regular.ttf\",\n \"revision\": \"31c2153c0530e32553b31a49b3d70736\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"4f2c07c4585347249c95cd9158872fb2\"\n },\n {\n \"url\": \"styles/atlas.css\",\n \"revision\": \"e8152cda9233d3a3af017422993abfce\"\n },\n {\n \"url\": \"styles/dark.css\",\n \"revision\": \"06d77cbda9c3ebf49e244567f20e5dbc\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"84c2007a05b742a84a50a47fc05de66c\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"a2b0e7267a08a838f3cc404eba831ec0\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"c96db1790184cb35781f791e8d1dafd9\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"ba7ece2dfb2833b72f97280d7092f25e\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"df9ba18d1f247c069258c13516f78a9d\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"01caa325f3ad3f6565e0b4228907fb63\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"e00ad51fc16b87c362d6eaf930ab1fa5\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"4e0775a6c156a803e777870623ac7c3e\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"4cefa13414e0d406550f3c073923080c\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"c787357209cff2986dcca567b599e2ef\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"5cbc270aa83ca3972060fac0317d47aa\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"38d6ec07d4fe5dbb99dcde29a84a1447\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"3d8c436c566db645fb1e6e6ba9f69bbc\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"38f1df3ecc4d78290493f47e62202138\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"d089f12446d443ca01752a5115456fcc\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"8aa8d02147def4535563bc65632a3e6d\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"3e57b80290703eb71edc942d86e2e385\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"c14807286438f2236b44c9fb78eb4bb3\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"8cd74a2fb60bf2e3e86026d66107cf11\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"c8411f9ffe8d33c461676508f1c2d388\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"1f2e4d088a8a1525ba047239643f3f4f\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"412bc4b87e630b697a40f247c579d398\"\n },\n {\n \"url\": \"math/es5/startup.js\",\n \"revision\": \"dc7130cdc866593293dbb5dde11ceb40\"\n },\n {\n \"url\": \"math/es5/core.js\",\n \"revision\": \"f71bc0bfb7d2ac8261747f97a5d47dd4\"\n },\n {\n \"url\": \"math/es5/output/svg.js\",\n \"revision\": \"4f55967d16197ebb01b86356d8ab179a\"\n },\n {\n \"url\": \"math/es5/input/tex.js\",\n \"revision\": \"5c4f470da2ccb1acf85041fcecd6fff6\"\n },\n {\n \"url\": \"math/es5/input/asciimath.js\",\n \"revision\": \"c2d4076dd8e26d509bfe3a378e71cfa7\"\n },\n {\n \"url\": \"math/es5/output/svg/fonts/tex.js\",\n \"revision\": \"6eab785a3788ea805bd2b552d1f0aab8\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"b4882fa73042c95c33e2b0d423f3489a\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"28ac9e18c8a09680714c474d7312b79b\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"e6372c6fd658fe2f57ec33e55820a20b\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"943ce2c53ecd94f5395a2d9c889af908\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"d1cf44cc4b9b72f76d55d6dc5022cdc9\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"039ab75e9330bb0e3f8d9e98cfbe3dab\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"b955242f6e100ced4c965bfbc7aee610\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"376b21e08a50c1a3cd12461dc8ae4137\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"331e73df843d992999b7b15e846f9ea9\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"75313e231874d093176e2e849b66c43f\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"16c64fde35cf6dc8530651c39df83eba\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"b4c5f45691abf8f4d6ac7d721d6790f5\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"808abd0f3bc5cc76f2882742a2b9fb77\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"9fd5d06f519256e4913feea4a9739eff\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"e209045f62ccf5aa4e6d3bab98a38f38\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"3e3cbd19c527489dfda1f8e630c988ae\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"96eaa2f5b2f0adbe943994fce638b616\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"8cc7d2ea86d9826f1c3e022f018c03cd\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"7620ed9bf78c10351f0d58da4597e97a\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"210c259d3999c9a69babec4657e41ca7\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"ec928ded61681856c7cf597007e813e6\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"1574e96fe2a62a079855dddeff8ed525\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"6a6468379a5c34f729a7aefe7e89ee51\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"11410eaeccedd4bc69bb9b4f9b2f2333\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"f0ef067bd037594e12fb8d51a82b4602\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"9a4ef05dfb8084dc3badaea323920e1b\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"bfd27e3d624bc04b5900e8312a43cc53\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"70ab707c2be3e7d6a3a3f842f7a3634b\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"7010d08f01632c36b6fa0e8797f90757\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"7cd9ed0c6977e012f78f029e2aa34c44\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"a86d4b49a7ba3c63232bc73ff09ada10\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"11977900dfe9818ec8dc875660b98506\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"6c293d98312d34ba69b5ac2f5a76e383\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"a5195f46b671284a6f4ae440274c2e85\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"74b3057d958779d892246ee63188c6c6\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"b4882fa73042c95c33e2b0d423f3489a\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"56cbe24705df20d692d622d29b3533ea\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"30df0498ebcc2eb59f81b1d691b69ff1\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"b514a4ec516d8184ad2ff4a65a60cda5\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"f798286d581a0e74fe1d5d9c6c396a41\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"5565ccf82e7cfe9e2e121774610eda45\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"151ee594248acdbe158e88842cb2ff7a\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"631a424b62199bbe1367a965f87812ee\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"b4882fa73042c95c33e2b0d423f3489a\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"99f16f5c7664920e2654dc6e5376e25e\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"3c02f3678d513130dedefdfe343947e0\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"09bd67f9ec4fc5d3be6f0c8a7d5e659b\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"dff62533d217d37f125611646e2f6c95\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"7ec1bc477d8da9df5cbf875b14ce194d\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"75c252159b55a44128bea76a28067a24\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"b07781b7a16832b05e5fb8314b20557d\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"51ac0a933b02010c21267dd35355f99b\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"f1fc3b9d9c9f6cc16cb8479f6aece146\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"cff00ca7d00c63f3c4034c31bf07d593\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"51794054cc1717fc8b3fd033f3f56669\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"8b826b67aa047030a3bc97fc7759ec30\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"28f6868d073105e3365f87342fc6c6d8\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"fab2d88b37c72d83607527573de45281\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"c6236bde53ed79aaaec60a1aca8ee2ef\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"89630b64b911ebe0daa3dfe442087cfa\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/drawlogo48.png\",\n \"revision\": \"8b13428373aca67b895364d025f42417\"\n },\n {\n \"url\": \"images/drawlogo-gray.svg\",\n \"revision\": \"0aabacbc0873816e1e09e4736ae44c7d\"\n },\n {\n \"url\": \"images/drawlogo-text-bottom.svg\",\n \"revision\": \"f6c438823ab31f290940bd4feb8dd9c2\"\n },\n {\n \"url\": \"images/default-user.jpg\",\n \"revision\": \"2c399696a87c8921f12d2f9e1990cc6e\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"73da7989a23ce9a4be565ec65658a239\"\n },\n {\n \"url\": \"images/favicon-16x16.png\",\n \"revision\": \"1a79d5461a5d2bf21f6652e0ac20d6e5\"\n },\n {\n \"url\": \"images/favicon-32x32.png\",\n \"revision\": \"e3b92da2febe70bad5372f6f3474b034\"\n },\n {\n \"url\": \"images/android-chrome-196x196.png\",\n \"revision\": \"f8c045b2d7b1c719fda64edab04c415c\"\n },\n {\n \"url\": \"images/android-chrome-512x512.png\",\n \"revision\": \"959b5fac2453963ff6d60fb85e4b73fd\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/help.png\",\n \"revision\": \"9266c6c3915bd33c243d80037d37bf61\"\n },\n {\n \"url\": \"images/download.png\",\n \"revision\": \"35418dd7bd48d87502c71b578cc6c37f\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/logo-confluence.png\",\n \"revision\": \"ed1e55d44ae5eba8f999aba2c93e8331\"\n },\n {\n \"url\": \"images/logo-jira.png\",\n \"revision\": \"f8d460555a0d1f87cfd901e940666629\"\n },\n {\n \"url\": \"images/clear.gif\",\n \"revision\": \"db13c778e4382e0b55258d0f811d5d70\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/checkmark.gif\",\n \"revision\": \"ba764ce62f2bf952df5bbc2bb4d381c5\"\n },\n {\n \"url\": \"images/hs.png\",\n \"revision\": \"fefa1a03d92ebad25c88dca94a0b63db\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"b5b7280ec98671bb6c3847a36bc7ea12\"\n },\n {\n \"url\": \"mxgraph/images/expanded.gif\",\n \"revision\": \"2b67c2c035af1e9a5cc814f0d22074cf\"\n },\n {\n \"url\": \"mxgraph/images/collapsed.gif\",\n \"revision\": \"73cc826da002a3d740ca4ce6ec5c1f4a\"\n },\n {\n \"url\": \"mxgraph/images/maximize.gif\",\n \"revision\": \"5cd13d6925493ab51e876694cc1c2ec2\"\n },\n {\n \"url\": \"mxgraph/images/minimize.gif\",\n \"revision\": \"8957741b9b0f86af9438775f2aadbb54\"\n },\n {\n \"url\": \"mxgraph/images/close.gif\",\n \"revision\": \"8b84669812ac7382984fca35de8da48b\"\n },\n {\n \"url\": \"mxgraph/images/resize.gif\",\n \"revision\": \"a6477612b3567a34033f9cac6184eed3\"\n },\n {\n \"url\": \"mxgraph/images/separator.gif\",\n \"revision\": \"7819742ff106c97da7a801c2372bbbe5\"\n },\n {\n \"url\": \"mxgraph/images/window.gif\",\n \"revision\": \"fd9a21dd4181f98052a202a0a01f18ab\"\n },\n {\n \"url\": \"mxgraph/images/window-title.gif\",\n \"revision\": \"3fb1d6c43246cdf991a11dfe826dfe99\"\n },\n {\n \"url\": \"mxgraph/images/button.gif\",\n \"revision\": \"00759bdc3ad218fa739f584369541809\"\n },\n {\n \"url\": \"mxgraph/images/point.gif\",\n \"revision\": \"83a43717b284902442620f61bc4e9fa6\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","addEventListener","event","data","type","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"szBAmBAA,KAAKC,iBAAiB,WAAYC,IAC5BA,EAAMC,MAA4B,iBAApBD,EAAMC,KAAKC,MAC3BJ,KAAKK,aACN,IAWHC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,qBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,YACPC,SAAY,oCAEd,CACED,IAAO,8CACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,wCACPC,SAAY,oCAEd,CACED,IAAO,4CACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,mCACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,cACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,sCACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,qCAEb,CACDC,4BAA+B,CAAC"}
\ No newline at end of file +{"version":3,"file":"service-worker.js","sources":["../../../../../../../tmp/a2b08e7755f882c79d7f949f10b24de8/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/opt/hostedtoolcache/node/14.20.0/x64/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.addEventListener('message', (event) => {\n if (event.data && event.data.type === 'SKIP_WAITING') {\n self.skipWaiting();\n }\n});\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"bd7965a97ad4dda04d5cc5112c0897e1\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"a6b272e834a0a5032db20b0c99ec7ce6\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"3d96d1eb82e1110df9f3a549d83d19db\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"5f31b0ee8f38bb810dca0906e86300f2\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"acea91d5b3b68fdec3f02c08a087aeb0\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"ce45ae8650f5c256034bb1cb01a8278b\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"styles/fonts/ArchitectsDaughter-Regular.ttf\",\n \"revision\": \"31c2153c0530e32553b31a49b3d70736\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"4f2c07c4585347249c95cd9158872fb2\"\n },\n {\n \"url\": \"styles/atlas.css\",\n \"revision\": \"47f4071d6d5308d3469de007d510ea12\"\n },\n {\n \"url\": \"styles/dark.css\",\n \"revision\": \"06d77cbda9c3ebf49e244567f20e5dbc\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"74a0628d7ed019faac08680c1e5eda18\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"a2b0e7267a08a838f3cc404eba831ec0\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"c96db1790184cb35781f791e8d1dafd9\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"ba7ece2dfb2833b72f97280d7092f25e\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"df9ba18d1f247c069258c13516f78a9d\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"36146c8b69293c22554aa861de8a5e71\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"e00ad51fc16b87c362d6eaf930ab1fa5\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"4e0775a6c156a803e777870623ac7c3e\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"4cefa13414e0d406550f3c073923080c\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"c787357209cff2986dcca567b599e2ef\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"5cbc270aa83ca3972060fac0317d47aa\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"6028a57f97e49ee6fc173dcae2e9c8e8\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"3d8c436c566db645fb1e6e6ba9f69bbc\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"38f1df3ecc4d78290493f47e62202138\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"d089f12446d443ca01752a5115456fcc\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"8aa8d02147def4535563bc65632a3e6d\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"3e57b80290703eb71edc942d86e2e385\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"c14807286438f2236b44c9fb78eb4bb3\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"8cd74a2fb60bf2e3e86026d66107cf11\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"c8411f9ffe8d33c461676508f1c2d388\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"1f2e4d088a8a1525ba047239643f3f4f\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"412bc4b87e630b697a40f247c579d398\"\n },\n {\n \"url\": \"math/es5/startup.js\",\n \"revision\": \"dc7130cdc866593293dbb5dde11ceb40\"\n },\n {\n \"url\": \"math/es5/core.js\",\n \"revision\": \"f71bc0bfb7d2ac8261747f97a5d47dd4\"\n },\n {\n \"url\": \"math/es5/output/svg.js\",\n \"revision\": \"4f55967d16197ebb01b86356d8ab179a\"\n },\n {\n \"url\": \"math/es5/input/tex.js\",\n \"revision\": \"5c4f470da2ccb1acf85041fcecd6fff6\"\n },\n {\n \"url\": \"math/es5/input/asciimath.js\",\n \"revision\": \"c2d4076dd8e26d509bfe3a378e71cfa7\"\n },\n {\n \"url\": \"math/es5/output/svg/fonts/tex.js\",\n \"revision\": \"6eab785a3788ea805bd2b552d1f0aab8\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"b4882fa73042c95c33e2b0d423f3489a\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"28ac9e18c8a09680714c474d7312b79b\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"e6372c6fd658fe2f57ec33e55820a20b\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"943ce2c53ecd94f5395a2d9c889af908\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"d1cf44cc4b9b72f76d55d6dc5022cdc9\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"039ab75e9330bb0e3f8d9e98cfbe3dab\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"b955242f6e100ced4c965bfbc7aee610\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"376b21e08a50c1a3cd12461dc8ae4137\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"331e73df843d992999b7b15e846f9ea9\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"75313e231874d093176e2e849b66c43f\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"16c64fde35cf6dc8530651c39df83eba\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"b4c5f45691abf8f4d6ac7d721d6790f5\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"808abd0f3bc5cc76f2882742a2b9fb77\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"9fd5d06f519256e4913feea4a9739eff\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"7c7596c99a5a0cedc0b6cba6559c4940\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"3e3cbd19c527489dfda1f8e630c988ae\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"96eaa2f5b2f0adbe943994fce638b616\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"8cc7d2ea86d9826f1c3e022f018c03cd\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"98efe277ec681a6484f1d2e591cfeb8d\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"210c259d3999c9a69babec4657e41ca7\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"ec928ded61681856c7cf597007e813e6\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"1574e96fe2a62a079855dddeff8ed525\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"6a6468379a5c34f729a7aefe7e89ee51\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"11410eaeccedd4bc69bb9b4f9b2f2333\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"f0ef067bd037594e12fb8d51a82b4602\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"9a4ef05dfb8084dc3badaea323920e1b\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"bfd27e3d624bc04b5900e8312a43cc53\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"70ab707c2be3e7d6a3a3f842f7a3634b\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"7010d08f01632c36b6fa0e8797f90757\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"7cd9ed0c6977e012f78f029e2aa34c44\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"a86d4b49a7ba3c63232bc73ff09ada10\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"11977900dfe9818ec8dc875660b98506\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"6c293d98312d34ba69b5ac2f5a76e383\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"a5195f46b671284a6f4ae440274c2e85\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"74b3057d958779d892246ee63188c6c6\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"b4882fa73042c95c33e2b0d423f3489a\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"56cbe24705df20d692d622d29b3533ea\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"30df0498ebcc2eb59f81b1d691b69ff1\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"b514a4ec516d8184ad2ff4a65a60cda5\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"f798286d581a0e74fe1d5d9c6c396a41\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"5565ccf82e7cfe9e2e121774610eda45\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"151ee594248acdbe158e88842cb2ff7a\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"631a424b62199bbe1367a965f87812ee\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"b4882fa73042c95c33e2b0d423f3489a\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"99f16f5c7664920e2654dc6e5376e25e\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"3c02f3678d513130dedefdfe343947e0\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"09bd67f9ec4fc5d3be6f0c8a7d5e659b\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"dff62533d217d37f125611646e2f6c95\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"7ec1bc477d8da9df5cbf875b14ce194d\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"75c252159b55a44128bea76a28067a24\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"b07781b7a16832b05e5fb8314b20557d\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"51ac0a933b02010c21267dd35355f99b\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"f1fc3b9d9c9f6cc16cb8479f6aece146\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"cff00ca7d00c63f3c4034c31bf07d593\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"51794054cc1717fc8b3fd033f3f56669\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"8b826b67aa047030a3bc97fc7759ec30\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"28f6868d073105e3365f87342fc6c6d8\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"fab2d88b37c72d83607527573de45281\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"c6236bde53ed79aaaec60a1aca8ee2ef\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"89630b64b911ebe0daa3dfe442087cfa\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/drawlogo48.png\",\n \"revision\": \"8b13428373aca67b895364d025f42417\"\n },\n {\n \"url\": \"images/drawlogo-gray.svg\",\n \"revision\": \"0aabacbc0873816e1e09e4736ae44c7d\"\n },\n {\n \"url\": \"images/drawlogo-text-bottom.svg\",\n \"revision\": \"f6c438823ab31f290940bd4feb8dd9c2\"\n },\n {\n \"url\": \"images/default-user.jpg\",\n \"revision\": \"2c399696a87c8921f12d2f9e1990cc6e\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"73da7989a23ce9a4be565ec65658a239\"\n },\n {\n \"url\": \"images/favicon-16x16.png\",\n \"revision\": \"1a79d5461a5d2bf21f6652e0ac20d6e5\"\n },\n {\n \"url\": \"images/favicon-32x32.png\",\n \"revision\": \"e3b92da2febe70bad5372f6f3474b034\"\n },\n {\n \"url\": \"images/android-chrome-196x196.png\",\n \"revision\": \"f8c045b2d7b1c719fda64edab04c415c\"\n },\n {\n \"url\": \"images/android-chrome-512x512.png\",\n \"revision\": \"959b5fac2453963ff6d60fb85e4b73fd\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/help.png\",\n \"revision\": \"9266c6c3915bd33c243d80037d37bf61\"\n },\n {\n \"url\": \"images/download.png\",\n \"revision\": \"35418dd7bd48d87502c71b578cc6c37f\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/logo-confluence.png\",\n \"revision\": \"ed1e55d44ae5eba8f999aba2c93e8331\"\n },\n {\n \"url\": \"images/logo-jira.png\",\n \"revision\": \"f8d460555a0d1f87cfd901e940666629\"\n },\n {\n \"url\": \"images/clear.gif\",\n \"revision\": \"db13c778e4382e0b55258d0f811d5d70\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/checkmark.gif\",\n \"revision\": \"ba764ce62f2bf952df5bbc2bb4d381c5\"\n },\n {\n \"url\": \"images/hs.png\",\n \"revision\": \"fefa1a03d92ebad25c88dca94a0b63db\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"b5b7280ec98671bb6c3847a36bc7ea12\"\n },\n {\n \"url\": \"mxgraph/images/expanded.gif\",\n \"revision\": \"2b67c2c035af1e9a5cc814f0d22074cf\"\n },\n {\n \"url\": \"mxgraph/images/collapsed.gif\",\n \"revision\": \"73cc826da002a3d740ca4ce6ec5c1f4a\"\n },\n {\n \"url\": \"mxgraph/images/maximize.gif\",\n \"revision\": \"5cd13d6925493ab51e876694cc1c2ec2\"\n },\n {\n \"url\": \"mxgraph/images/minimize.gif\",\n \"revision\": \"8957741b9b0f86af9438775f2aadbb54\"\n },\n {\n \"url\": \"mxgraph/images/close.gif\",\n \"revision\": \"8b84669812ac7382984fca35de8da48b\"\n },\n {\n \"url\": \"mxgraph/images/resize.gif\",\n \"revision\": \"a6477612b3567a34033f9cac6184eed3\"\n },\n {\n \"url\": \"mxgraph/images/separator.gif\",\n \"revision\": \"7819742ff106c97da7a801c2372bbbe5\"\n },\n {\n \"url\": \"mxgraph/images/window.gif\",\n \"revision\": \"fd9a21dd4181f98052a202a0a01f18ab\"\n },\n {\n \"url\": \"mxgraph/images/window-title.gif\",\n \"revision\": \"3fb1d6c43246cdf991a11dfe826dfe99\"\n },\n {\n \"url\": \"mxgraph/images/button.gif\",\n \"revision\": \"00759bdc3ad218fa739f584369541809\"\n },\n {\n \"url\": \"mxgraph/images/point.gif\",\n \"revision\": \"83a43717b284902442620f61bc4e9fa6\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","addEventListener","event","data","type","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"szBAmBAA,KAAKC,iBAAiB,WAAYC,IAC5BA,EAAMC,MAA4B,iBAApBD,EAAMC,KAAKC,MAC3BJ,KAAKK,aACN,IAWHC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,qBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,YACPC,SAAY,oCAEd,CACED,IAAO,8CACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,wCACPC,SAAY,oCAEd,CACED,IAAO,4CACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,mCACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,cACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,sCACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,qCAEb,CACDC,4BAA+B,CAAC"}
\ No newline at end of file diff --git a/src/main/webapp/styles/atlas.css b/src/main/webapp/styles/atlas.css index e6e2b87e..f91d855d 100644 --- a/src/main/webapp/styles/atlas.css +++ b/src/main/webapp/styles/atlas.css @@ -1,4 +1,4 @@ -.geToolbarContainer .geButton, .geToolbarContainer .geLabel { +html body .geToolbarContainer .geButton, html body .geToolbarContainer .geLabel { padding:3px 5px 5px 5px; position: relative; text-align: center; diff --git a/src/main/webapp/teams.html b/src/main/webapp/teams.html index 415588cf..2c8533b4 100644 --- a/src/main/webapp/teams.html +++ b/src/main/webapp/teams.html @@ -355,7 +355,6 @@ <link rel="icon" type="image/png" sizes="16x16" href="images/favicon-16x16.png"> <link rel="mask-icon" href="images/safari-pinned-tab.svg" color="#d89000"> <link rel="stylesheet" type="text/css" href="styles/grapheditor.css"> - <link rel="preconnect" href="https://storage.googleapis.com"> <link rel="canonical" href="https://app.diagrams.net"> <link rel="manifest" href="images/manifest.json"> <link rel="shortcut icon" href="favicon.ico"> |